UNPKG

@einarlyn/custom-form-editor

Version:

An extension library for @bpmn.io/form-js that provides custom form editor functionalities

653 lines (600 loc) 3.64 MB
/******/ var __webpack_modules__ = ({ /***/ "./node_modules/@bpmn-io/cm-theme/dist/index.es.js": /*!*********************************************************!*\ !*** ./node_modules/@bpmn-io/cm-theme/dist/index.es.js ***! \*********************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ darkTheme: () => (/* binding */ darkTheme), /* harmony export */ lightTheme: () => (/* binding */ lightTheme) /* harmony export */ }); /* harmony import */ var _codemirror_view__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @codemirror/view */ "./node_modules/@codemirror/view/dist/index.js"); /* harmony import */ var _codemirror_language__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @codemirror/language */ "./node_modules/@codemirror/language/dist/index.js"); /* harmony import */ var _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @lezer/highlight */ "./node_modules/@lezer/highlight/dist/index.js"); const highlightStyle$2 = (0,_codemirror_language__WEBPACK_IMPORTED_MODULE_1__.syntaxHighlighting)(_codemirror_language__WEBPACK_IMPORTED_MODULE_1__.HighlightStyle.define([ { tag: _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.strong, fontWeight: 'bold' }, { tag: _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.emphasis, fontStyle: 'italic' }, ])); const theme$2 = _codemirror_view__WEBPACK_IMPORTED_MODULE_2__.EditorView.theme({ '& .cm-lintRange': { position: 'relative', }, '& .cm-lintRange::after': { content: '""', width: '100%', position: 'absolute', left: '0px', bottom: '-2px', height: '3px', backgroundRepeat: 'repeat-x', }, '& .cm-lintRange.cm-lintRange-warning, & .cm-lintRange.cm-lintRange-error': { backgroundImage: 'none', }, '& .cm-lintPoint::after': { bottom: '-2px' } }); var commonTheme = [ theme$2, highlightStyle$2 ]; const _urlify = (color) => `%23${color.slice(1)}`; const colors = { black: '#1f2b36', darkGrey: '#2f3d58', grey: '#404a5c', midGrey: '#576071', lightGrey: '#c5d1e5', offWhite: '#d9e0f5', snowWhite: '#eaf1ff', white: '#ffffff', mossGreen: '#7ab6aa', iceBlue: '#6cbfd8', waterBlue: '#065aaa', brightBlue: '#0a56b9', deepBlue: '#355472', red: '#9f1c15', orangeBrown: '#b4502f', yellow: '#debd71', lila: '#9a4890', purple: '#5b2c83' }; const colorByRole = { lightBackground: colors.white, darkBackground: colors.snowWhite, selection: colors.snowWhite, tooltipBackground: colors.offWhite, error: colors.red, warning: colors.yellow, invalid: '#b40000' }; const theme$1 = _codemirror_view__WEBPACK_IMPORTED_MODULE_2__.EditorView.theme( { '&': { color: colors.black, backgroundColor: colorByRole.lightBackground }, '.cm-content': { caretColor: colors.darkGrey }, '.cm-cursor, .cm-dropCursor': { borderLeftColor: colors.darkGrey }, '&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection': { backgroundColor: colorByRole.selection }, '.cm-panels': { backgroundColor: colorByRole.darkBackground, color: colors.grey }, '.cm-panels.cm-panels-top': { borderBottom: `2px solid ${ colors.black }` }, '.cm-panels.cm-panels-bottom': { borderTop: `2px solid ${ colors.black }` }, '.cm-searchMatch': { backgroundColor: '#72a1ff59', outline: `1px solid ${colors.midGrey}` }, '.cm-searchMatch.cm-searchMatch-selected': { backgroundColor: colors.offWhite }, '.cm-activeLine': { backgroundColor: colorByRole.selection }, '.cm-selectionMatch': { backgroundColor: colors.offWhite }, '&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket': { outline: `1px solid ${colors.grey}` }, '&.cm-focused .cm-matchingBracket': { backgroundColor: colors.snowWhite }, '.cm-gutters': { backgroundColor: '#f3f7fe', color: '#52668d', border: 'none', padding: '0 5px' }, '.cm-activeLineGutter': { backgroundColor: colorByRole.selection }, '.cm-foldPlaceholder': { backgroundColor: 'transparent', border: 'none', color: '#ddd' }, '.cm-tooltip': { border: 'none', backgroundColor: colorByRole.tooltipBackground }, '.cm-tooltip .cm-tooltip-arrow:before': { borderTopColor: 'transparent', borderBottomColor: 'transparent' }, '.cm-tooltip .cm-tooltip-arrow:after': { borderTopColor: colorByRole.tooltipBackground, borderBottomColor: colorByRole.tooltipBackground }, '.cm-tooltip-autocomplete': { '& > ul > li[aria-selected]': { backgroundColor: colorByRole.darkBackground, color: colors.midGrey } }, '& .cm-lintRange.cm-lintRange-warning::after': { backgroundImage: `url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='6' height='3'><path d='m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0' stroke='${_urlify(colorByRole.warning)}' fill='none' stroke-width='1.2'/></svg>")`, }, '& .cm-lintRange.cm-lintRange-error::after': { backgroundImage: `url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='6' height='3'><path d='m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0' stroke='${_urlify(colorByRole.error)}' fill='none' stroke-width='1.2'/></svg>")`, }, '& .cm-diagnostic-warning': { border: `1px solid ${colorByRole.warning}`, borderLeft: `5px solid ${colorByRole.warning}`, background: colorByRole.lightBackground, }, '& .cm-diagnostic-error': { border: `1px solid ${colorByRole.error}`, borderLeft: `5px solid ${colorByRole.error}`, background: colorByRole.lightBackground }, '& .cm-diagnostic': { padding: '3px 8px' } }, { dark: false } ); const highlightStyle$1 = (0,_codemirror_language__WEBPACK_IMPORTED_MODULE_1__.syntaxHighlighting)(_codemirror_language__WEBPACK_IMPORTED_MODULE_1__.HighlightStyle.define([ { tag: [ _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.macroName, _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.variableName ], color: colors.waterBlue }, { tag: [ _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.special(_lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.bracket) ], color: colors.waterBlue, fontWeight: 'bold' }, { tag: [ _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.color, _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.name, _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.definition(_lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.name), _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.constant(_lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.name), _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.standard(_lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.name), _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.propertyName, ], color: colors.deepBlue }, { tag: [ _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.definition(_lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.variableName), _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.function(_lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.variableName), _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.function(_lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.propertyName) ], color: colors.brightBlue, }, { tag: [ _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.labelName ], color: colors.orangeBrown }, { tag: [ _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.annotation ], color: colorByRole.invalid }, { tag: [ _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.number, _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.changed, _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.annotation, _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.modifier, _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.self, _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.namespace, _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.atom, _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.bool, _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.special(_lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.variableName) ], color: colors.red }, { tag: [ _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.typeName, _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.className, _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.attributeName ], color: colors.lila }, { tag: [ _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.operator, _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.operatorKeyword, _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.tagName, _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.keyword ], color: colors.purple }, { tag: [ _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.angleBracket, _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.squareBracket, _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.brace, _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.separator, _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.punctuation ], color: colors.midGrey }, { tag: [ _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.regexp ], color: colors.deepBlue }, { tag: [ _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.quote ], color: colors.darkGrey }, { tag: [ _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.string, _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.character, _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.deleted ], color: colors.orangeBrown }, { tag: _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.link, color: colors.mossGreen, textDecoration: 'underline', textUnderlinePosition: 'under' }, { tag: [ _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.url, _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.escape, _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.special(_lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.string) ], color: colors.red }, { tag: [ _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.meta ], color: colors.iceBlue }, { tag: [ _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.comment ], color: colors.midGrey, fontStyle: 'italic' }, { tag: _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.strong, fontWeight: 'bold', color: colors.deepBlue }, { tag: _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.emphasis, fontStyle: 'italic', color: colors.deepBlue }, { tag: _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.strikethrough, textDecoration: 'line-through' }, { tag: _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.heading, fontWeight: 'bold', color: colors.midGray }, { tag: _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.special(_lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.heading1), fontWeight: 'bold', color: colors.darkGrey }, { tag: [ _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.heading1, _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.heading2, _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.heading3, _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.heading4 ], fontWeight: 'bold', color: colors.midGrey }, { tag: [ _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.heading5, _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.heading6, _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.processingInstruction, _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.inserted ], color: colors.grey }, { tag: [ _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.contentSeparator ], color: colors.yellow }, { tag: _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.invalid, color: colors.midGrey, borderBottom: `1px dotted ${colorByRole.invalid}` } ])); var bpmnioLight = [ theme$1, highlightStyle$1 ]; const ivory = '#abb2bf', peach = '#f07178', stone = '#7d8799', invalid = '#ffffff', pastelYellow = '#fffce1', pastelOrange = '#ec9e6f', raisinBlack = '#21252b', highlightBackground = 'rgba(0, 0, 0, 0.5)', background = '#292d3e', tooltipBackground = '#353a42', selection = 'rgba(128, 203, 196, 0.2)', cursor = '#ffcc00'; const urlHash = '%23'; const warningColorHex = 'fff890'; const errorColor = 'red'; const warningBackgroundColor = '#281e16'; const errorBackgroundColor = '#281616'; const theme = _codemirror_view__WEBPACK_IMPORTED_MODULE_2__.EditorView.theme( { '&': { color: '#ffffff', backgroundColor: background }, '.cm-content': { caretColor: cursor }, '&.cm-focused .cm-cursor': { borderLeftColor: cursor }, '&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection': { backgroundColor: selection }, '.cm-panels': { backgroundColor: raisinBlack, color: '#ffffff' }, '.cm-panels.cm-panels-top': { borderBottom: '2px solid black' }, '.cm-panels.cm-panels-bottom': { borderTop: '2px solid black' }, '.cm-searchMatch': { backgroundColor: '#72a1ff59', outline: '1px solid #457dff' }, '.cm-searchMatch.cm-searchMatch-selected': { backgroundColor: '#6199ff2f' }, '.cm-activeLine': { backgroundColor: highlightBackground }, '.cm-selectionMatch': { backgroundColor: '#aafe661a' }, '&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket': { backgroundColor: '#bad0f847', outline: '1px solid #515a6b' }, '.cm-gutters': { background: '#292d3e', color: '#676e95', border: 'none', padding: '0 5px' }, '.cm-activeLineGutter': { backgroundColor: highlightBackground }, '.cm-foldPlaceholder': { backgroundColor: 'transparent', border: 'none', color: '#ddd' }, '.cm-tooltip': { border: 'none', backgroundColor: tooltipBackground }, '.cm-tooltip .cm-tooltip-arrow:before': { borderTopColor: 'transparent', borderBottomColor: 'transparent' }, '.cm-tooltip .cm-tooltip-arrow:after': { borderTopColor: tooltipBackground, borderBottomColor: tooltipBackground }, '.cm-tooltip-autocomplete': { '& > ul > li[aria-selected]': { backgroundColor: highlightBackground, color: ivory } }, '& .cm-lintRange.cm-lintRange-warning::after': { backgroundImage: `url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='6' height='3'><path d='m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0' stroke='${urlHash + warningColorHex}' fill='none' stroke-width='1.2'/></svg>")`, }, '& .cm-lintRange.cm-lintRange-error::after': { backgroundImage: `url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='6' height='3'><path d='m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0' stroke='${errorColor}' fill='none' stroke-width='1.2'/></svg>")`, }, '& .cm-diagnostic-warning': { borderLeft: `5px solid #${warningColorHex}`, background: warningBackgroundColor }, '& .cm-diagnostic-error': { borderLeft: `5px solid ${errorColor}`, background: errorBackgroundColor }, '& .cm-diagnostic': { borderRadius: '2px', padding: '3px 8px' } }, { dark: true } ); const highlightStyle = (0,_codemirror_language__WEBPACK_IMPORTED_MODULE_1__.syntaxHighlighting)(_codemirror_language__WEBPACK_IMPORTED_MODULE_1__.HighlightStyle.define([ // Markdown headings { tag: _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.heading1, color: pastelYellow }, { tag: _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.heading2, color: pastelYellow }, { tag: _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.heading3, color: pastelYellow }, { tag: _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.heading4, color: pastelYellow }, { tag: _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.heading5, color: pastelYellow }, { tag: _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.heading6, color: pastelYellow }, // Feelers { tag: _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.special(_lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.bracket), color: pastelOrange, fontWeight: 'bold' }, // Everything else { tag: _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.keyword, color: '#c792ea' }, { tag: _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.operator, color: '#89ddff' }, { tag: _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.special(_lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.variableName), color: '#eeffff' }, { tag: _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.typeName, color: '#f07178' }, { tag: _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.atom, color: '#f78c6c' }, { tag: _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.number, color: '#ff5370' }, { tag: _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.bool, color: '#ff5370' }, { tag: _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.definition(_lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.variableName), color: '#82aaff' }, { tag: _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.string, color: '#c3e88d' }, { tag: _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.comment, color: stone }, { tag: _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.tagName, color: '#ff5370' }, { tag: _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.bracket, color: '#a2a1a4' }, { tag: _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.meta, color: '#ffcb6b' }, { tag: _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.special(_lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.string), color: peach }, { tag: _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.propertyName, color: pastelOrange }, { tag: _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.variableName, color: pastelOrange }, { tag: _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.attributeName, color: peach }, { tag: _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.className, color: peach }, { tag: _lezer_highlight__WEBPACK_IMPORTED_MODULE_0__.tags.invalid, color: invalid } ])); var bpmnioDark = [ theme, highlightStyle ]; const lightTheme = [ ...commonTheme, ...bpmnioLight ]; const darkTheme = [ ...commonTheme, ...bpmnioDark ]; /***/ }), /***/ "./node_modules/@bpmn-io/feel-editor/dist/index.es.js": /*!************************************************************!*\ !*** ./node_modules/@bpmn-io/feel-editor/dist/index.es.js ***! \************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ FeelEditor) /* harmony export */ }); /* harmony import */ var _codemirror_autocomplete__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @codemirror/autocomplete */ "./node_modules/@codemirror/autocomplete/dist/index.js"); /* harmony import */ var _codemirror_commands__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @codemirror/commands */ "./node_modules/@codemirror/commands/dist/index.js"); /* harmony import */ var _codemirror_language__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @codemirror/language */ "./node_modules/@codemirror/language/dist/index.js"); /* harmony import */ var _codemirror_lint__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @codemirror/lint */ "./node_modules/@codemirror/lint/dist/index.js"); /* harmony import */ var _codemirror_state__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @codemirror/state */ "./node_modules/@codemirror/state/dist/index.js"); /* harmony import */ var _codemirror_view__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @codemirror/view */ "./node_modules/@codemirror/view/dist/index.js"); /* harmony import */ var lang_feel__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! lang-feel */ "./node_modules/lang-feel/dist/index.js"); /* harmony import */ var min_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! min-dom */ "./node_modules/@bpmn-io/feel-editor/node_modules/min-dom/dist/index.esm.js"); /* harmony import */ var _bpmn_io_feel_lint__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @bpmn-io/feel-lint */ "./node_modules/@bpmn-io/feel-lint/dist/index.esm.js"); /* harmony import */ var _lezer_highlight__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @lezer/highlight */ "./node_modules/@lezer/highlight/dist/index.js"); // helpers /////////////////////////////// function isNodeEmpty(node) { return node.from === node.to; } function isPathExpression(node) { if (!node) { return false; } if (node.name === 'PathExpression') { return true; } return isPathExpression(node.parent); } var tags = [ { name: "not(negand)", description: "<p>Returns the logical negation of the given value.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">not(negand: boolean): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">not(true)\n// false\n\nnot(null)\n// null\n</code></pre>\n" }, { name: "is defined(value)", description: "<p><em>Camunda Extension</em></p>\n<p>Checks if a given value is not <code>null</code>. If the value is <code>null</code> then the function returns <code>false</code>.\nOtherwise, the function returns <code>true</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">is defined(value: Any): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">is defined(1)\n// true\n\nis defined(null)\n// false\n\nis defined(x)\n// false - if no variable &quot;x&quot; exists\n\nis defined(x.y)\n// false - if no variable &quot;x&quot; exists or it doesn&#39;t have a property &quot;y&quot;\n</code></pre>\n<p>:::caution Breaking change</p>\n<p>This function worked differently in previous versions. It returned <code>true</code> if the value was <code>null</code>.\nSince this version, the function returns <code>false</code> if the value is <code>null</code>.</p>\n<p>:::</p>\n" }, { name: "get or else(value, default)", description: "<p><em>Camunda Extension</em></p>\n<p>Return the provided value parameter if not <code>null</code>, otherwise return the default parameter</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">get or else(value: Any, default: Any): Any\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">get or else(&quot;this&quot;, &quot;default&quot;)\n// &quot;this&quot;\n\nget or else(null, &quot;default&quot;)\n// &quot;default&quot;\n\nget or else(null, null)\n// null\n</code></pre>\n" }, { name: "assert(value, condition)", description: "<p><em>Camunda Extension</em></p>\n<p>Verify that the given condition is met. If the condition is <code>true</code>, the function returns the value.\nOtherwise, the evaluation fails with an error.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">assert(value: Any, condition: Any)\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">assert(x, x != null)\n// &quot;value&quot; - if x is &quot;value&quot;\n// error - if x is null or doesn&#39;t exist\n\nassert(x, x &gt;= 0)\n// 4 - if x is 4\n// error - if x is less than zero\n</code></pre>\n" }, { name: "assert(value, condition, cause)", description: "<p><em>Camunda Extension</em></p>\n<p>Verify that the given condition is met. If the condition is <code>true</code>, the function returns the value.\nOtherwise, the evaluation fails with an error containing the given message.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">assert(value: Any, condition: Any, cause: String)\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">assert(x, x != null, &quot;&#39;x&#39; should not be null&quot;)\n// &quot;value&quot; - if x is &quot;value&quot;\n// error(&#39;x&#39; should not be null) - if x is null or doesn&#39;t exist\n\nassert(x, x &gt;= 0, &quot;&#39;x&#39; should be positive&quot;)\n// 4 - if x is 4\n// error(&#39;x&#39; should be positive) - if x is less than zero\n</code></pre>\n" }, { name: "get value(context, key)", description: "<p>Returns the value of the context entry with the given key.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">get value(context: context, key: string): Any\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">get value({foo: 123}, &quot;foo&quot;)\n// 123\n\nget value({a: 1}, &quot;b&quot;)\n// null\n</code></pre>\n" }, { name: "get value(context, keys)", description: "<p><em>Camunda Extension</em></p>\n<p>Returns the value of the context entry for a context path defined by the given keys.</p>\n<p>If <code>keys</code> contains the keys <code>[k1, k2]</code> then it returns the value at the nested entry <code>k1.k2</code> of the context.</p>\n<p>If <code>keys</code> are empty or the nested entry defined by the keys doesn&#39;t exist in the context, it returns <code>null</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">get value(context: context, keys: list&lt;string&gt;): Any\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">get value({x:1, y: {z:0}}, [&quot;y&quot;, &quot;z&quot;])\n// 0\n\nget value({x: {y: {z:0}}}, [&quot;x&quot;, &quot;y&quot;])\n// {z:0}\n\nget value({a: {b: 3}}, [&quot;b&quot;])\n// null\n</code></pre>\n" }, { name: "get entries(context)", description: "<p>Returns the entries of the context as a list of key-value-pairs.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">get entries(context: context): list&lt;context&gt;\n</code></pre>\n<p>The return value is a list of contexts. Each context contains two entries for &quot;key&quot; and &quot;value&quot;.</p>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">get entries({foo: 123})\n// [{key: &quot;foo&quot;, value: 123}]\n</code></pre>\n" }, { name: "context put(context, key, value)", description: "<p>Adds a new entry with the given key and value to the context. Returns a new context that includes the entry.</p>\n<p>If an entry for the same key already exists in the context, it overrides the value.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">context put(context: context, key: string, value: Any): context\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">context put({x:1}, &quot;y&quot;, 2)\n// {x:1, y:2}\n</code></pre>\n<p>:::info\nThe function <code>context put()</code> replaced the previous function <code>put()</code> (Camunda Extension). The\nprevious function is deprecated and should not be used anymore.\n:::</p>\n" }, { name: "context put(context, keys, value)", description: "<p>Adds a new entry with the given value to the context. The path of the entry is defined by the keys. Returns a new context that includes the entry.</p>\n<p>If <code>keys</code> contains the keys <code>[k1, k2]</code> then it adds the nested entry <code>k1.k2 = value</code> to the context.</p>\n<p>If an entry for the same keys already exists in the context, it overrides the value.</p>\n<p>If <code>keys</code> are empty, it returns <code>null</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">context put(context: context, keys: list&lt;string&gt;, value: Any): context\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">context put({x:1}, [&quot;y&quot;], 2)\n// {x:1, y:2}\n\ncontext put({x:1, y: {z:0}}, [&quot;y&quot;, &quot;z&quot;], 2)\n// {x:1, y: {z:2}}\n\ncontext put({x:1}, [&quot;y&quot;, &quot;z&quot;], 2)\n// {x:1, y: {z:2}}\n</code></pre>\n" }, { name: "context merge(contexts)", description: "<p>Union the given contexts. Returns a new context that includes all entries of the given contexts.</p>\n<p>If an entry for the same key already exists in a context, it overrides the value. The entries are overridden in the same order as in the list of contexts.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">context merge(contexts: list&lt;context&gt;): context\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">context merge([{x:1}, {y:2}])\n// {x:1, y:2}\n\ncontext merge([{x:1, y: 0}, {y:2}])\n// {x:1, y:2}\n</code></pre>\n<p>:::info\nThe function <code>context merge()</code> replaced the previous function <code>put all()</code> (Camunda Extension). The\nprevious function is deprecated and should not be used anymore.\n:::</p>\n" }, { name: "string(from)", description: "<p>Returns the given value as a string representation.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">string(from: Any): string\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">string(1.1)\n// &quot;1.1&quot;\n\nstring(date(&quot;2012-12-25&quot;))\n// &quot;2012-12-25&quot;\n</code></pre>\n" }, { name: "number(from)", description: "<p>Parses the given string to a number.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">number(from: string): number\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">number(&quot;1500.5&quot;)\n// 1500.5\n</code></pre>\n" }, { name: "context(entries)", description: "<p>Constructs a context of the given list of key-value pairs. It is the reverse function to <a href=\"feel-built-in-functions-context.md#get-entriescontext\">get entries()</a>.</p>\n<p>Each key-value pair must be a context with two entries: <code>key</code> and <code>value</code>. The entry with name <code>key</code> must have a value of the type <code>string</code>.</p>\n<p>It might override context entries if the keys are equal. The entries are overridden in the same order as the contexts in the given list.</p>\n<p>Returns <code>null</code> if one of the entries is not a context or if a context doesn&#39;t contain the required entries.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">context(entries: list&lt;context&gt;): context\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">context([{&quot;key&quot;:&quot;a&quot;, &quot;value&quot;:1}, {&quot;key&quot;:&quot;b&quot;, &quot;value&quot;:2}])\n// {a:1, b:2}\n</code></pre>\n" }, { name: "date(from)", description: "<p>Returns a date from the given value.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">date(from: string): date\n</code></pre>\n<p>Parses the given string into a date.</p>\n<pre><code class=\"language-feel\">date(from: date and time): date\n</code></pre>\n<p>Extracts the date component from the given date and time.</p>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">date(&quot;2018-04-29&quot;)\n// date(&quot;2018-04-29&quot;)\n\ndate(date and time(&quot;2012-12-25T11:00:00&quot;))\n// date(&quot;2012-12-25&quot;)\n</code></pre>\n" }, { name: "date(year, month, day)", description: "<p>Returns a date from the given components.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">date(year: number, month: number, day: number): date\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">date(2012, 12, 25)\n// date(&quot;2012-12-25&quot;)\n</code></pre>\n" }, { name: "time(from)", description: "<p>Returns a time from the given value.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">time(from: string): time\n</code></pre>\n<p>Parses the given string into a time.</p>\n<pre><code class=\"language-feel\">time(from: date and time): time\n</code></pre>\n<p>Extracts the time component from the given date and time.</p>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">time(&quot;12:00:00&quot;)\n// time(&quot;12:00:00&quot;)\n\ntime(date and time(&quot;2012-12-25T11:00:00&quot;))\n// time(&quot;11:00:00&quot;)\n</code></pre>\n" }, { name: "time(hour, minute, second)", description: "<p>Returns a time from the given components.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">time(hour: number, minute: number, second: number): time\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">time(23, 59, 0)\n// time(&quot;23:59:00&quot;)\n</code></pre>\n" }, { name: "time(hour, minute, second, offset)", description: "<p>Returns a time from the given components, including a timezone offset.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">time(hour: number, minute: number, second: number, offset: days and time duration): time\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">time(14, 30, 0, duration(&quot;PT1H&quot;))\n// time(&quot;14:30:00+01:00&quot;)\n</code></pre>\n" }, { name: "date and time(from)", description: "<p>Parses the given string into a date and time.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">date and time(from: string): date and time\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">date and time(&quot;2018-04-29T009:30:00&quot;)\n// date and time(&quot;2018-04-29T009:30:00&quot;)\n</code></pre>\n" }, { name: "date and time(date, time)", description: "<p>Returns a date and time from the given components.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">date and time(date: date, time: time): date and time\n</code></pre>\n<pre><code class=\"language-feel\">date and time(date: date and time, time: time): date and time\n</code></pre>\n<p>Returns a date and time value that consists of the date component of <code>date</code> combined with <code>time</code>.</p>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">date and time(date(&quot;2012-12-24&quot;),time(&quot;T23:59:00&quot;))\n// date and time(&quot;2012-12-24T23:59:00&quot;)\n\ndate and time(date and time(&quot;2012-12-25T11:00:00&quot;),time(&quot;T23:59:00&quot;))\n// date and time(&quot;2012-12-25T23:59:00&quot;)\n</code></pre>\n" }, { name: "date and time(date, timezone)", description: "<p><em>Camunda Extension</em></p>\n<p>Returns the given date and time value at the given timezone.</p>\n<p>If <code>date</code> has a different timezone than <code>timezone</code> then it adjusts the time to match the local time of <code>timezone</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">date and time(date: date and time, timezone: string): date and time\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">date and time(@&quot;2020-07-31T14:27:30@Europe/Berlin&quot;, &quot;America/Los_Angeles&quot;)\n// date and time(&quot;2020-07-31T05:27:30@America/Los_Angeles&quot;)\n\ndate and time(@&quot;2020-07-31T14:27:30&quot;, &quot;Z&quot;)\n// date and time(&quot;2020-07-31T12:27:30Z&quot;)\n</code></pre>\n" }, { name: "duration(from)", description: "<p>Parses the given string into a duration. The duration is either a days and time duration or a years and months duration.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">duration(from: string): days and time duration\n</code></pre>\n<pre><code class=\"language-feel\">duration(from: string): years and months duration\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">duration(&quot;P5D&quot;)\n// duration(&quot;P5D&quot;)\n\nduration(&quot;P32Y&quot;)\n// duration(&quot;P32Y&quot;)\n</code></pre>\n" }, { name: "years and months duration(from, to)", description: "<p>Returns the years and months duration between <code>from</code> and <code>to</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">years and months duration(from: date, to: date): years and months duration\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">years and months duration(date(&quot;2011-12-22&quot;), date(&quot;2013-08-24&quot;))\n// duration(&quot;P1Y8M&quot;)\n</code></pre>\n" }, { name: "list contains(list, element)", description: "<p>Returns <code>true</code> if the given list contains the element. Otherwise, returns <code>false</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">list contains(list: list, element: Any): boolean\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">list contains([1,2,3], 2)\n// true\n</code></pre>\n" }, { name: "count(list)", description: "<p>Returns the number of elements of the given list.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">count(list: list): number\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">count([1,2,3])\n// 3\n</code></pre>\n" }, { name: "min(list)", description: "<p>Returns the minimum of the given list.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">min(list: list): Any\n</code></pre>\n<p>All elements in <code>list</code> should have the same type and be comparable.</p>\n<p>The parameter <code>list</code> can be passed as a list or as a sequence of elements.</p>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">min([1,2,3])\n// 1\n\nmin(1,2,3)\n// 1\n</code></pre>\n" }, { name: "max(list)", description: "<p>Returns the maximum of the given list.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">max(list: list): Any\n</code></pre>\n<p>All elements in <code>list</code> should have the same type and be comparable.</p>\n<p>The parameter <code>list</code> can be passed as a list or as a sequence of elements.</p>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">max([1,2,3])\n// 3\n\nmax(1,2,3)\n// 3\n</code></pre>\n" }, { name: "sum(list)", description: "<p>Returns the sum of the given list of numbers.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">sum(list: list&lt;number&gt;): number\n</code></pre>\n<p>The parameter <code>list</code> can be passed as a list or as a sequence of elements.</p>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">sum([1,2,3])\n// 6\n\nsum(1,2,3)\n// 6\n</code></pre>\n" }, { name: "product(list)", description: "<p>Returns the product of the given list of numbers.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">product(list: list&lt;number&gt;): number\n</code></pre>\n<p>The parameter <code>list</code> can be passed as a list or as a sequence of elements.</p>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">product([2, 3, 4])\n// 24\n\nproduct(2, 3, 4)\n// 24\n</code></pre>\n" }, { name: "mean(list)", description: "<p>Returns the arithmetic mean (i.e. average) of the given list of numbers.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">mean(list: list&lt;number&gt;): number\n</code></pre>\n<p>The parameter <code>list</code> can be passed as a list or as a sequence of elements.</p>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">mean([1,2,3])\n// 2\n\nmean(1,2,3)\n// 2\n</code></pre>\n" }, { name: "median(list)", description: "<p>Returns the median element of the given list of numbers.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">median(list: list&lt;number&gt;): number\n</code></pre>\n<p>The parameter <code>list</code> can be passed as a list or as a sequence of elements.</p>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">median(8, 2, 5, 3, 4)\n// 4\n\nmedian([6, 1, 2, 3])\n// 2.5\n</code></pre>\n" }, { name: "stddev(list)", description: "<p>Returns the standard deviation of the given list of numbers.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">stddev(list: list&lt;number&gt;): number\n</code></pre>\n<p>The parameter <code>list</code> can be passed as a list or as a sequence of elements.</p>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">stddev(2, 4, 7, 5)\n// 2.0816659994661326\n\nstddev([2, 4, 7, 5])\n// 2.0816659994661326\n</code></pre>\n" }, { name: "mode(list)", description: "<p>Returns the mode of the given list of numbers.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">mode(list: list&lt;number&gt;): number\n</code></pre>\n<p>The parameter <code>list</code> can be passed as a list or as a sequence of elements.</p>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">mode(6, 3, 9, 6, 6)\n// [6]\n\nmode([6, 1, 9, 6, 1])\n// [1, 6]\n</code></pre>\n" }, { name: "all(list)", description: "<p>Returns <code>false</code> if any element of the given list is <code>false</code>. Otherwise, returns <code>true</code>.</p>\n<p>If the given list is empty, it returns <code>true</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">all(list: list&lt;boolean&gt;): boolean\n</code></pre>\n<p>The parameter <code>list</code> can be passed as a list or as a sequence of elements.</p>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">all([true,false])\n// false\n\nall(false,null,true)\n// false\n</code></pre>\n<p>:::info\nThe function <code>all()</code> replaced the previous function <code>and()</code>. The previous function is deprecated and\nshould not be used anymore.\n:::</p>\n" }, { name: "any(list)", description: "<p>Returns <code>true</code> if any element of the given list is <code>true</code>. Otherwise, returns <code>false</code>.</p>\n<p>If the given list is empty, it returns <code>false</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">any(list: list&lt;boolean&gt;): boolean\n</code></pre>\n<p>The parameter <code>list</code> can be passed as a list or as a sequence of elements.</p>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">any([false,true])\n// true\n\nany(false,null,true)\n// true\n</code></pre>\n<p>:::info\nThe function <code>any()</code> replaced the previous function <code>or()</code>. The previous function is deprecated and\nshould not be used anymore.\n:::</p>\n" }, { name: "sublist(list, start position)", description: "<p>Returns a partial list of the given value starting at <code>start position</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">sublist(list: list, start position: number): list\n</code></pre>\n<p>The <code>start position</code> starts at the index <code>1</code>. The last position is <code>-1</code>.</p>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">sublist([1,2,3], 2)\n// [2,3]\n</code></pre>\n" }, { name: "sublist(list, start position, length)", description: "<p>Returns a partial list of the given value starting at <code>start position</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">sublist(list: list, start position: number, length: number): list\n</code></pre>\n<p>The <code>start position</code> starts at the index <code>1</code>. The last position is <code>-1</code>.</p>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">sublist([1,2,3], 1, 2)\n// [1,2]\n</code></pre>\n" }, { name: "append(list, items)", description: "<p>Returns the given list with all <code>items</code> appended.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">append(list: list, items: Any): list\n</code></pre>\n<p>The parameter <code>items</code> can be a single element or a sequence of elements.</p>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">append([1], 2, 3)\n// [1,2,3]\n</code></pre>\n" }, { name: "concatenate(lists)", description: "<p>Returns a list that includes all elements of the given lists.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">concatenate(lists: list): list\n</code></pre>\n<p>The parameter <code>lists</code> is a sequence of lists.</p>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">concatenate([1,2],[3])\n// [1,2,3]\n\nconcatenate([1],[2],[3])\n// [1,2,3]\n</code></pre>\n" }, { name: "insert before(list, position, newItem)", description: "<p>Returns the given list with <code>newItem</code> inserted at <code>position</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">insert before(list: list, position: number, newItem: Any): list\n</code></pre>\n<p>The <code>position</code> starts at the index <code>1</code>. The last position is <code>-1</code>.</p>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">insert before([1,3],1,2)\n// [2,1,3]\n</code></pre>\n" }, { name: "remove(list, position)", description: "<p>Returns the given list without the element at <code>position</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">remove(list: list, position: number): list\n</code></pre>\n<p>The <code>position</code> starts at the index <code>1</code>. The last position is <code>-1</code>.</p>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">remove([1,2,3], 2)\n// [1,3]\n</code></pre>\n" }, { name: "reverse(list)", description: "<p>Returns the given list in revered order.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">reverse(list: list): list\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">reverse([1,2,3])\n// [3,2,1]\n</code></pre>\n" }, { name: "index of(list, match)", description: "<p>Returns an ascending list of positions containing <code>match</code>.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">index of(list: list, match: Any): list&lt;number&gt;\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">index of([1,2,3,2],2)\n// [2,4]\n</code></pre>\n" }, { name: "union(list)", description: "<p>Returns a list that includes all elements of the given lists without duplicates.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">union(list: list): list\n</code></pre>\n<p>The parameter <code>list</code> is a sequence of lists.</p>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">union([1,2],[2,3])\n// [1,2,3]\n</code></pre>\n" }, { name: "distinct values(list)", description: "<p>Returns the given list without duplicates.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">distinct values(list: list): list\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">distinct values([1,2,3,2,1])\n// [1,2,3]\n</code></pre>\n" }, { name: "duplicate values(list)", description: "<p><em>Camunda Extension</em></p>\n<p>Returns all duplicate values of the given list.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">duplicate values(list: list): list\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">duplicate values([1,2,3,2,1])\n// [1,2]\n</code></pre>\n" }, { name: "flatten(list)", description: "<p>Returns a list that includes all elements of the given list without nested lists.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">flatten(list: list): list\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">flatten([[1,2],[[3]], 4])\n// [1,2,3,4]\n</code></pre>\n" }, { name: "sort(list, precedes)", description: "<p>Returns the given list sorted by the <code>precedes</code> function.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">sort(list: list, precedes: function&lt;(Any, Any) -&gt; boolean&gt;): list\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">sort(list: [3,1,4,5,2], precedes: function(x,y) x &lt; y)\n// [1,2,3,4,5]\n</code></pre>\n" }, { name: "string join(list)", description: "<p>Joins a list of strings into a single string. This is similar to\nJava&#39;s <a href=\"https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/stream/Collectors.html#joining(java.lang.CharSequence,java.lang.CharSequence,java.lang.CharSequence)\">joining</a>\nfunction.</p>\n<p>If an item of the list is <code>null</code>, the item is ignored for the result string. If an item is\nneither a string nor <code>null</code>, the function returns <code>null</code> instead of a string.</p>\n<p><strong>Function signature</strong></p>\n<pre><code class=\"language-feel\">string join(list: list&lt;string&gt;): string\n</code></pre>\n<p><strong>Examples</strong></p>\n<pre><code class=\"language-feel\">string join([&quot;a&quot;,&qu