diff --git a/.cicd/github.sh b/.cicd/github.sh new file mode 100644 index 000000000000..275f1095ac29 --- /dev/null +++ b/.cicd/github.sh @@ -0,0 +1,105 @@ +#!/bin/bash + +TEST_RESULTS="test-results-core-web" +GITHUB="github.com" +GITHACK="raw.githack.com" +GITHUB_TEST_RESULTS_PATH="DotCMS/${TEST_RESULTS}" +DOT_CICD_TARGET="core-web" +GITHUB_USER="victoralfaro-dotcms" +GITHUB_USER_EMAIL="victor.alfaro@dotcms.com" + +if [[ $IS_PULL_REQUEST == true ]]; then + CURRENT_BRANCH=${HEAD_REF} +else + CURRENT_BRANCH=${GITHUB_REF##*/} +fi + +DOT_CICD_PATH="./dotcicd" +OUTPUT_FOLDER="ui/karma_html" +export GITHUB_TEST_RESULTS_HOST_PATH="${GITHUB}/${GITHUB_TEST_RESULTS_PATH}" +export GITHUB_TEST_RESULTS_URL="https://${GITHUB_TEST_RESULTS_HOST_PATH}" +export GITHACK_TEST_RESULTS_URL="https://${GITHACK}/${GITHUB_TEST_RESULTS_PATH}" +export GITHUB_TEST_RESULTS_REPO="${GITHUB_TEST_RESULTS_URL}.git" +export GITHUB_TEST_RESULTS_BROWSE_URL="${GITHACK_TEST_RESULTS_URL}/${CURRENT_BRANCH}/projects/${DOT_CICD_TARGET}/${GITHUB_SHA::8}" +export GITHUB_TEST_RESULTS_REMOTE="https://${GITHUB_USER}:${GH_TOKEN}@${GITHUB_TEST_RESULTS_HOST_PATH}" +export GITHUB_TEST_RESULTS_REMOTE_REPO="https://${GITHUB_USER}:${GH_TOKEN}@${GITHUB_TEST_RESULTS_HOST_PATH}.git" + + +function existsOrCreateAndSwitch { + local results=${1} + if [[ ! -d $results ]]; then + mkdir -p $results + fi + + cd $results +} + +function gitConfig { + git config --global user.email "${GITHUB_USER_EMAIL}" + git config --global user.name "${GITHUB_USER}" + git config pull.rebase false + git config -l | grep user +} + +function addResults { + local results=${1} + if [[ -z "$results" ]]; then + echo "Cannot add results since its empty, ignoring" + exit 1 + fi + + local targetFolder=${results} + mkdir -p ${targetFolder} + echo "Adding test results to: ${targetFolder}" + echo "output: ${OUTPUT_FOLDER}/* target:${targetFolder}" + cp -r "${GITHUB_WORKSPACE}/${OUTPUT_FOLDER}/." ${targetFolder} +} + + +function persistResults { + TEST_RESULTS_PATH=${DOT_CICD_PATH}/${TEST_RESULTS} + gitConfig + + if [[ ! -d dotcicd/test-results ]]; then + echo "Cloning ${GITHUB_TEST_RESULTS_REPO} to ${TEST_RESULTS_PATH}" + git clone ${GITHUB_TEST_RESULTS_REPO} ${TEST_RESULTS_PATH} + fi + + existsOrCreateAndSwitch ${TEST_RESULTS_PATH}/projects/${DOT_CICD_TARGET} + + git fetch --all + + remoteBranch=$(git ls-remote --heads ${GITHUB_TEST_RESULTS_REMOTE_REPO} ${CURRENT_BRANCH} | wc -l | tr -d '[:space:]') + localBranch=$(git show-ref --heads ${CURRENT_BRANCH} | wc -l | tr -d '[:space:]') + + if [[ ${remoteBranch} == 1 ]]; then + if [[ ${localBranch} == 1 ]]; then + git checkout ${CURRENT_BRANCH} + else + echo "git checkout -b ${CURRENT_BRANCH} --track origin/${CURRENT_BRANCH}" + git checkout -b ${CURRENT_BRANCH} --track origin/${CURRENT_BRANCH} + fi + else + git checkout -b ${CURRENT_BRANCH} + fi + + if [[ $? != 0 ]]; then + echo "Error checking out branch '${CURRENT_BRANCH}', continuing with master" + git pull origin master + else + if [[ ${remoteBranch} == 1 ]]; then + echo "git pull origin ${CURRENT_BRANCH}" + git pull origin ${CURRENT_BRANCH} + fi + fi + + addResults ./${GITHUB_SHA::8} + git add . + git commit -m "Adding tests results for ${GITHUB_SHA::8} from ${CURRENT_BRANCH}" + git push ${GITHUB_TEST_RESULTS_REMOTE} + git status +} + +function logResults { + echo "${GITHUB_TEST_RESULTS_BROWSE_URL}/report.html" +} diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000000..95102274ad62 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# exclude package-lock from github diffs +package-lock.json -diff diff --git a/.github/actions/module-matcher/.eslintignore b/.github/actions/module-matcher/.eslintignore new file mode 100644 index 000000000000..f1c68b867e4a --- /dev/null +++ b/.github/actions/module-matcher/.eslintignore @@ -0,0 +1,4 @@ +dist/ +lib/ +node_modules/ +src/@types/ diff --git a/.github/actions/module-matcher/.eslintrc.json b/.github/actions/module-matcher/.eslintrc.json new file mode 100644 index 000000000000..6f49b294408f --- /dev/null +++ b/.github/actions/module-matcher/.eslintrc.json @@ -0,0 +1,17 @@ +{ + "plugins": ["@typescript-eslint", "github", "jest"], + "extends": ["plugin:github/typescript"], + "parser": "@typescript-eslint/parser", + "parserOptions": { + "ecmaVersion": 9, + "sourceType": "module", + "project": "./tsconfig.json" + }, + "rules": { + }, + "env": { + "node": true, + "es6": true, + "jest/globals": true + } +} \ No newline at end of file diff --git a/.github/actions/module-matcher/.prettierignore b/.github/actions/module-matcher/.prettierignore new file mode 100644 index 000000000000..6de9a76115d1 --- /dev/null +++ b/.github/actions/module-matcher/.prettierignore @@ -0,0 +1,3 @@ +dist/ +lib/ +node_modules/ diff --git a/.github/actions/module-matcher/.prettierrc.json b/.github/actions/module-matcher/.prettierrc.json new file mode 100644 index 000000000000..d1c1215e11e9 --- /dev/null +++ b/.github/actions/module-matcher/.prettierrc.json @@ -0,0 +1,11 @@ +{ + "printWidth": 80, + "tabWidth": 2, + "useTabs": false, + "semi": false, + "singleQuote": true, + "trailingComma": "none", + "bracketSpacing": false, + "arrowParens": "avoid", + "parser": "typescript" +} diff --git a/.github/actions/module-matcher/action.yml b/.github/actions/module-matcher/action.yml new file mode 100644 index 000000000000..a8cd2db7a5ec --- /dev/null +++ b/.github/actions/module-matcher/action.yml @@ -0,0 +1,38 @@ +name: 'Workflow router' +description: 'Based on event (push or pull request) gather the involved commits to determine if workflow is allowed run' +author: 'victoralfaro-dotcms' +inputs: + current: + description: 'Current module' + required: true + modules: + description: 'Modules configuration, space delimited list of modules' + required: true + default: | + [ + { + "module": "core", + "folder": ".", + "main": true + }, + { + "module": "ui" + }, + { + "module": "enterprise" + } + ] + pull_request: + description: 'Pull request id' + required: false + default: ${{ github.event.number }} + commit: + description: 'Commit SHA' + required: true + default: ${{ github.sha }} +outputs: + module_found: + description: 'Boolean result: true for ound, otherwise false' +runs: + using: 'node16' + main: 'dist/index.js' diff --git a/.github/actions/module-matcher/dist/37.index.js b/.github/actions/module-matcher/dist/37.index.js new file mode 100644 index 000000000000..c349ca0a6ea9 --- /dev/null +++ b/.github/actions/module-matcher/dist/37.index.js @@ -0,0 +1,452 @@ +"use strict"; +exports.id = 37; +exports.ids = [37]; +exports.modules = { + +/***/ 4037: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "toFormData": () => (/* binding */ toFormData) +/* harmony export */ }); +/* harmony import */ var fetch_blob_from_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2777); +/* harmony import */ var formdata_polyfill_esm_min_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8010); + + + +let s = 0; +const S = { + START_BOUNDARY: s++, + HEADER_FIELD_START: s++, + HEADER_FIELD: s++, + HEADER_VALUE_START: s++, + HEADER_VALUE: s++, + HEADER_VALUE_ALMOST_DONE: s++, + HEADERS_ALMOST_DONE: s++, + PART_DATA_START: s++, + PART_DATA: s++, + END: s++ +}; + +let f = 1; +const F = { + PART_BOUNDARY: f, + LAST_BOUNDARY: f *= 2 +}; + +const LF = 10; +const CR = 13; +const SPACE = 32; +const HYPHEN = 45; +const COLON = 58; +const A = 97; +const Z = 122; + +const lower = c => c | 0x20; + +const noop = () => {}; + +class MultipartParser { + /** + * @param {string} boundary + */ + constructor(boundary) { + this.index = 0; + this.flags = 0; + + this.onHeaderEnd = noop; + this.onHeaderField = noop; + this.onHeadersEnd = noop; + this.onHeaderValue = noop; + this.onPartBegin = noop; + this.onPartData = noop; + this.onPartEnd = noop; + + this.boundaryChars = {}; + + boundary = '\r\n--' + boundary; + const ui8a = new Uint8Array(boundary.length); + for (let i = 0; i < boundary.length; i++) { + ui8a[i] = boundary.charCodeAt(i); + this.boundaryChars[ui8a[i]] = true; + } + + this.boundary = ui8a; + this.lookbehind = new Uint8Array(this.boundary.length + 8); + this.state = S.START_BOUNDARY; + } + + /** + * @param {Uint8Array} data + */ + write(data) { + let i = 0; + const length_ = data.length; + let previousIndex = this.index; + let {lookbehind, boundary, boundaryChars, index, state, flags} = this; + const boundaryLength = this.boundary.length; + const boundaryEnd = boundaryLength - 1; + const bufferLength = data.length; + let c; + let cl; + + const mark = name => { + this[name + 'Mark'] = i; + }; + + const clear = name => { + delete this[name + 'Mark']; + }; + + const callback = (callbackSymbol, start, end, ui8a) => { + if (start === undefined || start !== end) { + this[callbackSymbol](ui8a && ui8a.subarray(start, end)); + } + }; + + const dataCallback = (name, clear) => { + const markSymbol = name + 'Mark'; + if (!(markSymbol in this)) { + return; + } + + if (clear) { + callback(name, this[markSymbol], i, data); + delete this[markSymbol]; + } else { + callback(name, this[markSymbol], data.length, data); + this[markSymbol] = 0; + } + }; + + for (i = 0; i < length_; i++) { + c = data[i]; + + switch (state) { + case S.START_BOUNDARY: + if (index === boundary.length - 2) { + if (c === HYPHEN) { + flags |= F.LAST_BOUNDARY; + } else if (c !== CR) { + return; + } + + index++; + break; + } else if (index - 1 === boundary.length - 2) { + if (flags & F.LAST_BOUNDARY && c === HYPHEN) { + state = S.END; + flags = 0; + } else if (!(flags & F.LAST_BOUNDARY) && c === LF) { + index = 0; + callback('onPartBegin'); + state = S.HEADER_FIELD_START; + } else { + return; + } + + break; + } + + if (c !== boundary[index + 2]) { + index = -2; + } + + if (c === boundary[index + 2]) { + index++; + } + + break; + case S.HEADER_FIELD_START: + state = S.HEADER_FIELD; + mark('onHeaderField'); + index = 0; + // falls through + case S.HEADER_FIELD: + if (c === CR) { + clear('onHeaderField'); + state = S.HEADERS_ALMOST_DONE; + break; + } + + index++; + if (c === HYPHEN) { + break; + } + + if (c === COLON) { + if (index === 1) { + // empty header field + return; + } + + dataCallback('onHeaderField', true); + state = S.HEADER_VALUE_START; + break; + } + + cl = lower(c); + if (cl < A || cl > Z) { + return; + } + + break; + case S.HEADER_VALUE_START: + if (c === SPACE) { + break; + } + + mark('onHeaderValue'); + state = S.HEADER_VALUE; + // falls through + case S.HEADER_VALUE: + if (c === CR) { + dataCallback('onHeaderValue', true); + callback('onHeaderEnd'); + state = S.HEADER_VALUE_ALMOST_DONE; + } + + break; + case S.HEADER_VALUE_ALMOST_DONE: + if (c !== LF) { + return; + } + + state = S.HEADER_FIELD_START; + break; + case S.HEADERS_ALMOST_DONE: + if (c !== LF) { + return; + } + + callback('onHeadersEnd'); + state = S.PART_DATA_START; + break; + case S.PART_DATA_START: + state = S.PART_DATA; + mark('onPartData'); + // falls through + case S.PART_DATA: + previousIndex = index; + + if (index === 0) { + // boyer-moore derrived algorithm to safely skip non-boundary data + i += boundaryEnd; + while (i < bufferLength && !(data[i] in boundaryChars)) { + i += boundaryLength; + } + + i -= boundaryEnd; + c = data[i]; + } + + if (index < boundary.length) { + if (boundary[index] === c) { + if (index === 0) { + dataCallback('onPartData', true); + } + + index++; + } else { + index = 0; + } + } else if (index === boundary.length) { + index++; + if (c === CR) { + // CR = part boundary + flags |= F.PART_BOUNDARY; + } else if (c === HYPHEN) { + // HYPHEN = end boundary + flags |= F.LAST_BOUNDARY; + } else { + index = 0; + } + } else if (index - 1 === boundary.length) { + if (flags & F.PART_BOUNDARY) { + index = 0; + if (c === LF) { + // unset the PART_BOUNDARY flag + flags &= ~F.PART_BOUNDARY; + callback('onPartEnd'); + callback('onPartBegin'); + state = S.HEADER_FIELD_START; + break; + } + } else if (flags & F.LAST_BOUNDARY) { + if (c === HYPHEN) { + callback('onPartEnd'); + state = S.END; + flags = 0; + } else { + index = 0; + } + } else { + index = 0; + } + } + + if (index > 0) { + // when matching a possible boundary, keep a lookbehind reference + // in case it turns out to be a false lead + lookbehind[index - 1] = c; + } else if (previousIndex > 0) { + // if our boundary turned out to be rubbish, the captured lookbehind + // belongs to partData + const _lookbehind = new Uint8Array(lookbehind.buffer, lookbehind.byteOffset, lookbehind.byteLength); + callback('onPartData', 0, previousIndex, _lookbehind); + previousIndex = 0; + mark('onPartData'); + + // reconsider the current character even so it interrupted the sequence + // it could be the beginning of a new sequence + i--; + } + + break; + case S.END: + break; + default: + throw new Error(`Unexpected state entered: ${state}`); + } + } + + dataCallback('onHeaderField'); + dataCallback('onHeaderValue'); + dataCallback('onPartData'); + + // Update properties for the next call + this.index = index; + this.state = state; + this.flags = flags; + } + + end() { + if ((this.state === S.HEADER_FIELD_START && this.index === 0) || + (this.state === S.PART_DATA && this.index === this.boundary.length)) { + this.onPartEnd(); + } else if (this.state !== S.END) { + throw new Error('MultipartParser.end(): stream ended unexpectedly'); + } + } +} + +function _fileName(headerValue) { + // matches either a quoted-string or a token (RFC 2616 section 19.5.1) + const m = headerValue.match(/\bfilename=("(.*?)"|([^()<>@,;:\\"/[\]?={}\s\t]+))($|;\s)/i); + if (!m) { + return; + } + + const match = m[2] || m[3] || ''; + let filename = match.slice(match.lastIndexOf('\\') + 1); + filename = filename.replace(/%22/g, '"'); + filename = filename.replace(/&#(\d{4});/g, (m, code) => { + return String.fromCharCode(code); + }); + return filename; +} + +async function toFormData(Body, ct) { + if (!/multipart/i.test(ct)) { + throw new TypeError('Failed to fetch'); + } + + const m = ct.match(/boundary=(?:"([^"]+)"|([^;]+))/i); + + if (!m) { + throw new TypeError('no or bad content-type header, no multipart boundary'); + } + + const parser = new MultipartParser(m[1] || m[2]); + + let headerField; + let headerValue; + let entryValue; + let entryName; + let contentType; + let filename; + const entryChunks = []; + const formData = new formdata_polyfill_esm_min_js__WEBPACK_IMPORTED_MODULE_1__/* .FormData */ .Ct(); + + const onPartData = ui8a => { + entryValue += decoder.decode(ui8a, {stream: true}); + }; + + const appendToFile = ui8a => { + entryChunks.push(ui8a); + }; + + const appendFileToFormData = () => { + const file = new fetch_blob_from_js__WEBPACK_IMPORTED_MODULE_0__/* .File */ .$B(entryChunks, filename, {type: contentType}); + formData.append(entryName, file); + }; + + const appendEntryToFormData = () => { + formData.append(entryName, entryValue); + }; + + const decoder = new TextDecoder('utf-8'); + decoder.decode(); + + parser.onPartBegin = function () { + parser.onPartData = onPartData; + parser.onPartEnd = appendEntryToFormData; + + headerField = ''; + headerValue = ''; + entryValue = ''; + entryName = ''; + contentType = ''; + filename = null; + entryChunks.length = 0; + }; + + parser.onHeaderField = function (ui8a) { + headerField += decoder.decode(ui8a, {stream: true}); + }; + + parser.onHeaderValue = function (ui8a) { + headerValue += decoder.decode(ui8a, {stream: true}); + }; + + parser.onHeaderEnd = function () { + headerValue += decoder.decode(); + headerField = headerField.toLowerCase(); + + if (headerField === 'content-disposition') { + // matches either a quoted-string or a token (RFC 2616 section 19.5.1) + const m = headerValue.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i); + + if (m) { + entryName = m[2] || m[3] || ''; + } + + filename = _fileName(headerValue); + + if (filename) { + parser.onPartData = appendToFile; + parser.onPartEnd = appendFileToFormData; + } + } else if (headerField === 'content-type') { + contentType = headerValue; + } + + headerValue = ''; + headerField = ''; + }; + + for await (const chunk of Body) { + parser.write(chunk); + } + + parser.end(); + + return formData; +} + + +/***/ }) + +}; +; \ No newline at end of file diff --git a/.github/actions/module-matcher/dist/exec-child.js b/.github/actions/module-matcher/dist/exec-child.js new file mode 100644 index 000000000000..eab86ed37bf1 --- /dev/null +++ b/.github/actions/module-matcher/dist/exec-child.js @@ -0,0 +1,39 @@ +if (require.main !== module) { + throw new Error('This file should not be required'); +} + +var childProcess = require('child_process'); +var fs = require('fs'); + +var paramFilePath = process.argv[2]; + +var serializedParams = fs.readFileSync(paramFilePath, 'utf8'); +var params = JSON.parse(serializedParams); + +var cmd = params.command; +var execOptions = params.execOptions; +var pipe = params.pipe; +var stdoutFile = params.stdoutFile; +var stderrFile = params.stderrFile; + +var c = childProcess.exec(cmd, execOptions, function (err) { + if (!err) { + process.exitCode = 0; + } else if (err.code === undefined) { + process.exitCode = 1; + } else { + process.exitCode = err.code; + } +}); + +var stdoutStream = fs.createWriteStream(stdoutFile); +var stderrStream = fs.createWriteStream(stderrFile); + +c.stdout.pipe(stdoutStream); +c.stderr.pipe(stderrStream); +c.stdout.pipe(process.stdout); +c.stderr.pipe(process.stderr); + +if (pipe) { + c.stdin.end(pipe); +} diff --git a/.github/actions/module-matcher/dist/index.js b/.github/actions/module-matcher/dist/index.js new file mode 100644 index 000000000000..9f365f46d25f --- /dev/null +++ b/.github/actions/module-matcher/dist/index.js @@ -0,0 +1,16717 @@ +/******/ (() => { // webpackBootstrap +/******/ var __webpack_modules__ = ({ + +/***/ 3109: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +const core = __importStar(__nccwpck_require__(2186)); +const matcher = __importStar(__nccwpck_require__(7957)); +/** + * Main entry point for this action. + */ +const run = () => __awaiter(void 0, void 0, void 0, function* () { + // Call module logic to discover modules + try { + const moduleFound = yield matcher.moduleMatches(); + core.info(`Module found: [ ${moduleFound} ]`); + core.setOutput('module_found', moduleFound); + } + catch (err) { + core.setOutput('module_found', false); + core.setFailed(`Failing workflow due to ${err}`); + } +}); +// Run main function +run(); + + +/***/ }), + +/***/ 7957: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.moduleMatches = void 0; +const core = __importStar(__nccwpck_require__(2186)); +const node_fetch_1 = __importDefault(__nccwpck_require__(4429)); +const shelljs = __importStar(__nccwpck_require__(3516)); +const current = core.getInput('current'); +const modulesConf = JSON.parse(core.getInput('modules')); +const pullRequest = core.getInput('pull_request'); +const commit = core.getInput('commit'); +/** + * Discover modules that were "touched" by changed contained either in pull request or commit + * + * @returns true if module was found + */ +const moduleMatches = () => __awaiter(void 0, void 0, void 0, function* () { + validateConf(); + core.info(`Provided current momdule: ${current}`); + core.info(`Provided modules configuration: ${JSON.stringify(modulesConf, null, 2)}`); + const currentModule = modulesConf.find(conf => conf.module === current); + if (!currentModule) { + core.error(`Module ${current} was not found in configuration`); + return false; + } + const commits = yield resolveCommits(); + core.info(`Commits found: ${commits.length}`); + if (commits.length >= 100) { + // Probably not found bu the amount of commits definitively calls for returning true + core.info('Commits reached max capacity, probably it\'s a good idea to allow ALL workflows to run'); + return true; + } + const found = searchInCommits(currentModule, commits); + found + ? core.info(`Current module ${current} matched with changes`) + : core.warning(`Could not match module ${current} with changes, discarding it...`); + return found; +}); +exports.moduleMatches = moduleMatches; +/** + * Validates provided module configuration + * + * @returns {@link ModuleConf} object if found otherwise undefined + */ +const validateConf = () => { + const main = modulesConf.find(conf => !!conf.main); + if (!main) { + throw new Error(`No main module was found at modules configuration: ${JSON.stringify(modulesConf, null, 2)}`); + } + return main; +}; +/** + * Searches in given commit list if module appears inside them + * + * @param module {@link ModuleConf} instance to search + * @param commits list of commits + * @returns true if found, otherwise false + */ +const searchInCommits = (module, commits) => { + var _a; + for (const sha of commits) { + const cmd = `git diff-tree --no-commit-id --name-only -r ${sha}`; + core.info(`Searching in commit ${sha} by running:\n${cmd}`); + const output = ((_a = shelljs.exec(cmd)) === null || _a === void 0 ? void 0 : _a.stdout) || ''; + core.info(`Returned these changes:\n${output}`); + const changed = output.split('\n'); + if (searchInChanges(module, changed)) { + return true; + } + } + return false; +}; +/** + * Searches in given commit changes if module appears in changes + * + * @param module {@link ModuleConf} instance to search + * @param changed list of changes + * @returns true if found, otherwise false + */ +const searchInChanges = (module, changed) => { + for (const change of changed) { + const normalized = change.trim(); + if (doesCurrentMatch(module, normalized)) { + core.info(`Found modified module ${JSON.stringify(module, null, 2)} from change at ${normalized}`); + return true; + } + } + return false; +}; +/** + * If a pull request is detected then return the list of commits included in PR. + * It a push is detected use actual commit that triggered run. + * + * @returns commits as a list of string + */ +const resolveCommits = () => __awaiter(void 0, void 0, void 0, function* () { + if (pullRequest) { + core.info(`Provided pull request: ${pullRequest}`); + const response = yield getPullRequestCommits(); + if (!response.ok) { + core.warning(`Could not get Github pull request ${pullRequest}`); + return []; + } + const commits = (yield response.json()).map(c => c.sha); + core.info(`Found pull request ${pullRequest} commits:\n${commits.join(', ')}`); + return commits; + } + else if (commit) { + core.info(`Found (push) commit: ${commit}`); + return yield Promise.resolve([commit]); + } + else { + core.warning('No commits found'); + return yield Promise.resolve([]); + } +}); +/** + * Uses fetch function to send GET http request to Github API to get pull request commits data. + * + * @param pullRequest pull request + * @returns {@link Response} object + */ +const getPullRequestCommits = () => __awaiter(void 0, void 0, void 0, function* () { + const url = `https://api.github.com/repos/dotCMS/core/pulls/${pullRequest}/commits?per_page=250`; + core.info(`Sending GET to ${url}`); + const response = yield (0, node_fetch_1.default)(url, { method: 'GET' }); + core.info(`Got response: ${response.status}`); + return response; +}); +/** + * Resolves which field to use + * + * @param module {@link ModuleConf} module to get info from + * @returns value in resolved field + */ +const location = (module) => module.folder || module.module; +/** + * Evaluates if module is included in change for the cases when the module is configured as main and when is a "child" module. + * + * @param module {@link ModuleConf} module instance + * @param change line of change from commit + * @returns true it matches, otherwise false + */ +const doesCurrentMatch = (module, change) => { + if (!!module.main) { + return !!shelljs + .ls('-A', module.folder || '.') + .find(file => change.startsWith(file)); + } + return change.startsWith(location(module)); +}; + + +/***/ }), + +/***/ 7351: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.issue = exports.issueCommand = void 0; +const os = __importStar(__nccwpck_require__(2037)); +const utils_1 = __nccwpck_require__(5278); +/** + * Commands + * + * Command Format: + * ::name key=value,key=value::message + * + * Examples: + * ::warning::This is the message + * ::set-env name=MY_VAR::some value + */ +function issueCommand(command, properties, message) { + const cmd = new Command(command, properties, message); + process.stdout.write(cmd.toString() + os.EOL); +} +exports.issueCommand = issueCommand; +function issue(name, message = '') { + issueCommand(name, {}, message); +} +exports.issue = issue; +const CMD_STRING = '::'; +class Command { + constructor(command, properties, message) { + if (!command) { + command = 'missing.command'; + } + this.command = command; + this.properties = properties; + this.message = message; + } + toString() { + let cmdStr = CMD_STRING + this.command; + if (this.properties && Object.keys(this.properties).length > 0) { + cmdStr += ' '; + let first = true; + for (const key in this.properties) { + if (this.properties.hasOwnProperty(key)) { + const val = this.properties[key]; + if (val) { + if (first) { + first = false; + } + else { + cmdStr += ','; + } + cmdStr += `${key}=${escapeProperty(val)}`; + } + } + } + } + cmdStr += `${CMD_STRING}${escapeData(this.message)}`; + return cmdStr; + } +} +function escapeData(s) { + return utils_1.toCommandValue(s) + .replace(/%/g, '%25') + .replace(/\r/g, '%0D') + .replace(/\n/g, '%0A'); +} +function escapeProperty(s) { + return utils_1.toCommandValue(s) + .replace(/%/g, '%25') + .replace(/\r/g, '%0D') + .replace(/\n/g, '%0A') + .replace(/:/g, '%3A') + .replace(/,/g, '%2C'); +} +//# sourceMappingURL=command.js.map + +/***/ }), + +/***/ 2186: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0; +const command_1 = __nccwpck_require__(7351); +const file_command_1 = __nccwpck_require__(717); +const utils_1 = __nccwpck_require__(5278); +const os = __importStar(__nccwpck_require__(2037)); +const path = __importStar(__nccwpck_require__(1017)); +const oidc_utils_1 = __nccwpck_require__(8041); +/** + * The code to exit an action + */ +var ExitCode; +(function (ExitCode) { + /** + * A code indicating that the action was successful + */ + ExitCode[ExitCode["Success"] = 0] = "Success"; + /** + * A code indicating that the action was a failure + */ + ExitCode[ExitCode["Failure"] = 1] = "Failure"; +})(ExitCode = exports.ExitCode || (exports.ExitCode = {})); +//----------------------------------------------------------------------- +// Variables +//----------------------------------------------------------------------- +/** + * Sets env variable for this action and future actions in the job + * @param name the name of the variable to set + * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify + */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function exportVariable(name, val) { + const convertedVal = utils_1.toCommandValue(val); + process.env[name] = convertedVal; + const filePath = process.env['GITHUB_ENV'] || ''; + if (filePath) { + const delimiter = '_GitHubActionsFileCommandDelimeter_'; + const commandValue = `${name}<<${delimiter}${os.EOL}${convertedVal}${os.EOL}${delimiter}`; + file_command_1.issueCommand('ENV', commandValue); + } + else { + command_1.issueCommand('set-env', { name }, convertedVal); + } +} +exports.exportVariable = exportVariable; +/** + * Registers a secret which will get masked from logs + * @param secret value of the secret + */ +function setSecret(secret) { + command_1.issueCommand('add-mask', {}, secret); +} +exports.setSecret = setSecret; +/** + * Prepends inputPath to the PATH (for this action and future actions) + * @param inputPath + */ +function addPath(inputPath) { + const filePath = process.env['GITHUB_PATH'] || ''; + if (filePath) { + file_command_1.issueCommand('PATH', inputPath); + } + else { + command_1.issueCommand('add-path', {}, inputPath); + } + process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`; +} +exports.addPath = addPath; +/** + * Gets the value of an input. + * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed. + * Returns an empty string if the value is not defined. + * + * @param name name of the input to get + * @param options optional. See InputOptions. + * @returns string + */ +function getInput(name, options) { + const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || ''; + if (options && options.required && !val) { + throw new Error(`Input required and not supplied: ${name}`); + } + if (options && options.trimWhitespace === false) { + return val; + } + return val.trim(); +} +exports.getInput = getInput; +/** + * Gets the values of an multiline input. Each value is also trimmed. + * + * @param name name of the input to get + * @param options optional. See InputOptions. + * @returns string[] + * + */ +function getMultilineInput(name, options) { + const inputs = getInput(name, options) + .split('\n') + .filter(x => x !== ''); + return inputs; +} +exports.getMultilineInput = getMultilineInput; +/** + * Gets the input value of the boolean type in the YAML 1.2 "core schema" specification. + * Support boolean input list: `true | True | TRUE | false | False | FALSE` . + * The return value is also in boolean type. + * ref: https://yaml.org/spec/1.2/spec.html#id2804923 + * + * @param name name of the input to get + * @param options optional. See InputOptions. + * @returns boolean + */ +function getBooleanInput(name, options) { + const trueValue = ['true', 'True', 'TRUE']; + const falseValue = ['false', 'False', 'FALSE']; + const val = getInput(name, options); + if (trueValue.includes(val)) + return true; + if (falseValue.includes(val)) + return false; + throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name}\n` + + `Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); +} +exports.getBooleanInput = getBooleanInput; +/** + * Sets the value of an output. + * + * @param name name of the output to set + * @param value value to store. Non-string values will be converted to a string via JSON.stringify + */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function setOutput(name, value) { + process.stdout.write(os.EOL); + command_1.issueCommand('set-output', { name }, value); +} +exports.setOutput = setOutput; +/** + * Enables or disables the echoing of commands into stdout for the rest of the step. + * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set. + * + */ +function setCommandEcho(enabled) { + command_1.issue('echo', enabled ? 'on' : 'off'); +} +exports.setCommandEcho = setCommandEcho; +//----------------------------------------------------------------------- +// Results +//----------------------------------------------------------------------- +/** + * Sets the action status to failed. + * When the action exits it will be with an exit code of 1 + * @param message add error issue message + */ +function setFailed(message) { + process.exitCode = ExitCode.Failure; + error(message); +} +exports.setFailed = setFailed; +//----------------------------------------------------------------------- +// Logging Commands +//----------------------------------------------------------------------- +/** + * Gets whether Actions Step Debug is on or not + */ +function isDebug() { + return process.env['RUNNER_DEBUG'] === '1'; +} +exports.isDebug = isDebug; +/** + * Writes debug message to user log + * @param message debug message + */ +function debug(message) { + command_1.issueCommand('debug', {}, message); +} +exports.debug = debug; +/** + * Adds an error issue + * @param message error issue message. Errors will be converted to string via toString() + * @param properties optional properties to add to the annotation. + */ +function error(message, properties = {}) { + command_1.issueCommand('error', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); +} +exports.error = error; +/** + * Adds a warning issue + * @param message warning issue message. Errors will be converted to string via toString() + * @param properties optional properties to add to the annotation. + */ +function warning(message, properties = {}) { + command_1.issueCommand('warning', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); +} +exports.warning = warning; +/** + * Adds a notice issue + * @param message notice issue message. Errors will be converted to string via toString() + * @param properties optional properties to add to the annotation. + */ +function notice(message, properties = {}) { + command_1.issueCommand('notice', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); +} +exports.notice = notice; +/** + * Writes info to log with console.log. + * @param message info message + */ +function info(message) { + process.stdout.write(message + os.EOL); +} +exports.info = info; +/** + * Begin an output group. + * + * Output until the next `groupEnd` will be foldable in this group + * + * @param name The name of the output group + */ +function startGroup(name) { + command_1.issue('group', name); +} +exports.startGroup = startGroup; +/** + * End an output group. + */ +function endGroup() { + command_1.issue('endgroup'); +} +exports.endGroup = endGroup; +/** + * Wrap an asynchronous function call in a group. + * + * Returns the same type as the function itself. + * + * @param name The name of the group + * @param fn The function to wrap in the group + */ +function group(name, fn) { + return __awaiter(this, void 0, void 0, function* () { + startGroup(name); + let result; + try { + result = yield fn(); + } + finally { + endGroup(); + } + return result; + }); +} +exports.group = group; +//----------------------------------------------------------------------- +// Wrapper action state +//----------------------------------------------------------------------- +/** + * Saves state for current action, the state can only be retrieved by this action's post job execution. + * + * @param name name of the state to store + * @param value value to store. Non-string values will be converted to a string via JSON.stringify + */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function saveState(name, value) { + command_1.issueCommand('save-state', { name }, value); +} +exports.saveState = saveState; +/** + * Gets the value of an state set by this action's main execution. + * + * @param name name of the state to get + * @returns string + */ +function getState(name) { + return process.env[`STATE_${name}`] || ''; +} +exports.getState = getState; +function getIDToken(aud) { + return __awaiter(this, void 0, void 0, function* () { + return yield oidc_utils_1.OidcClient.getIDToken(aud); + }); +} +exports.getIDToken = getIDToken; +/** + * Summary exports + */ +var summary_1 = __nccwpck_require__(1327); +Object.defineProperty(exports, "summary", ({ enumerable: true, get: function () { return summary_1.summary; } })); +/** + * @deprecated use core.summary + */ +var summary_2 = __nccwpck_require__(1327); +Object.defineProperty(exports, "markdownSummary", ({ enumerable: true, get: function () { return summary_2.markdownSummary; } })); +//# sourceMappingURL=core.js.map + +/***/ }), + +/***/ 717: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +// For internal use, subject to change. +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.issueCommand = void 0; +// We use any as a valid input type +/* eslint-disable @typescript-eslint/no-explicit-any */ +const fs = __importStar(__nccwpck_require__(7147)); +const os = __importStar(__nccwpck_require__(2037)); +const utils_1 = __nccwpck_require__(5278); +function issueCommand(command, message) { + const filePath = process.env[`GITHUB_${command}`]; + if (!filePath) { + throw new Error(`Unable to find environment variable for file command ${command}`); + } + if (!fs.existsSync(filePath)) { + throw new Error(`Missing file at path: ${filePath}`); + } + fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os.EOL}`, { + encoding: 'utf8' + }); +} +exports.issueCommand = issueCommand; +//# sourceMappingURL=file-command.js.map + +/***/ }), + +/***/ 8041: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.OidcClient = void 0; +const http_client_1 = __nccwpck_require__(6255); +const auth_1 = __nccwpck_require__(5526); +const core_1 = __nccwpck_require__(2186); +class OidcClient { + static createHttpClient(allowRetry = true, maxRetry = 10) { + const requestOptions = { + allowRetries: allowRetry, + maxRetries: maxRetry + }; + return new http_client_1.HttpClient('actions/oidc-client', [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions); + } + static getRequestToken() { + const token = process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN']; + if (!token) { + throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable'); + } + return token; + } + static getIDTokenUrl() { + const runtimeUrl = process.env['ACTIONS_ID_TOKEN_REQUEST_URL']; + if (!runtimeUrl) { + throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable'); + } + return runtimeUrl; + } + static getCall(id_token_url) { + var _a; + return __awaiter(this, void 0, void 0, function* () { + const httpclient = OidcClient.createHttpClient(); + const res = yield httpclient + .getJson(id_token_url) + .catch(error => { + throw new Error(`Failed to get ID Token. \n + Error Code : ${error.statusCode}\n + Error Message: ${error.result.message}`); + }); + const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; + if (!id_token) { + throw new Error('Response json body do not have ID Token field'); + } + return id_token; + }); + } + static getIDToken(audience) { + return __awaiter(this, void 0, void 0, function* () { + try { + // New ID Token is requested from action service + let id_token_url = OidcClient.getIDTokenUrl(); + if (audience) { + const encodedAudience = encodeURIComponent(audience); + id_token_url = `${id_token_url}&audience=${encodedAudience}`; + } + core_1.debug(`ID token url is ${id_token_url}`); + const id_token = yield OidcClient.getCall(id_token_url); + core_1.setSecret(id_token); + return id_token; + } + catch (error) { + throw new Error(`Error message: ${error.message}`); + } + }); + } +} +exports.OidcClient = OidcClient; +//# sourceMappingURL=oidc-utils.js.map + +/***/ }), + +/***/ 1327: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0; +const os_1 = __nccwpck_require__(2037); +const fs_1 = __nccwpck_require__(7147); +const { access, appendFile, writeFile } = fs_1.promises; +exports.SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY'; +exports.SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary'; +class Summary { + constructor() { + this._buffer = ''; + } + /** + * Finds the summary file path from the environment, rejects if env var is not found or file does not exist + * Also checks r/w permissions. + * + * @returns step summary file path + */ + filePath() { + return __awaiter(this, void 0, void 0, function* () { + if (this._filePath) { + return this._filePath; + } + const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR]; + if (!pathFromEnv) { + throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); + } + try { + yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); + } + catch (_a) { + throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); + } + this._filePath = pathFromEnv; + return this._filePath; + }); + } + /** + * Wraps content in an HTML tag, adding any HTML attributes + * + * @param {string} tag HTML tag to wrap + * @param {string | null} content content within the tag + * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add + * + * @returns {string} content wrapped in HTML element + */ + wrap(tag, content, attrs = {}) { + const htmlAttrs = Object.entries(attrs) + .map(([key, value]) => ` ${key}="${value}"`) + .join(''); + if (!content) { + return `<${tag}${htmlAttrs}>`; + } + return `<${tag}${htmlAttrs}>${content}`; + } + /** + * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. + * + * @param {SummaryWriteOptions} [options] (optional) options for write operation + * + * @returns {Promise} summary instance + */ + write(options) { + return __awaiter(this, void 0, void 0, function* () { + const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); + const filePath = yield this.filePath(); + const writeFunc = overwrite ? writeFile : appendFile; + yield writeFunc(filePath, this._buffer, { encoding: 'utf8' }); + return this.emptyBuffer(); + }); + } + /** + * Clears the summary buffer and wipes the summary file + * + * @returns {Summary} summary instance + */ + clear() { + return __awaiter(this, void 0, void 0, function* () { + return this.emptyBuffer().write({ overwrite: true }); + }); + } + /** + * Returns the current summary buffer as a string + * + * @returns {string} string of summary buffer + */ + stringify() { + return this._buffer; + } + /** + * If the summary buffer is empty + * + * @returns {boolen} true if the buffer is empty + */ + isEmptyBuffer() { + return this._buffer.length === 0; + } + /** + * Resets the summary buffer without writing to summary file + * + * @returns {Summary} summary instance + */ + emptyBuffer() { + this._buffer = ''; + return this; + } + /** + * Adds raw text to the summary buffer + * + * @param {string} text content to add + * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) + * + * @returns {Summary} summary instance + */ + addRaw(text, addEOL = false) { + this._buffer += text; + return addEOL ? this.addEOL() : this; + } + /** + * Adds the operating system-specific end-of-line marker to the buffer + * + * @returns {Summary} summary instance + */ + addEOL() { + return this.addRaw(os_1.EOL); + } + /** + * Adds an HTML codeblock to the summary buffer + * + * @param {string} code content to render within fenced code block + * @param {string} lang (optional) language to syntax highlight code + * + * @returns {Summary} summary instance + */ + addCodeBlock(code, lang) { + const attrs = Object.assign({}, (lang && { lang })); + const element = this.wrap('pre', this.wrap('code', code), attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML list to the summary buffer + * + * @param {string[]} items list of items to render + * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) + * + * @returns {Summary} summary instance + */ + addList(items, ordered = false) { + const tag = ordered ? 'ol' : 'ul'; + const listItems = items.map(item => this.wrap('li', item)).join(''); + const element = this.wrap(tag, listItems); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML table to the summary buffer + * + * @param {SummaryTableCell[]} rows table rows + * + * @returns {Summary} summary instance + */ + addTable(rows) { + const tableBody = rows + .map(row => { + const cells = row + .map(cell => { + if (typeof cell === 'string') { + return this.wrap('td', cell); + } + const { header, data, colspan, rowspan } = cell; + const tag = header ? 'th' : 'td'; + const attrs = Object.assign(Object.assign({}, (colspan && { colspan })), (rowspan && { rowspan })); + return this.wrap(tag, data, attrs); + }) + .join(''); + return this.wrap('tr', cells); + }) + .join(''); + const element = this.wrap('table', tableBody); + return this.addRaw(element).addEOL(); + } + /** + * Adds a collapsable HTML details element to the summary buffer + * + * @param {string} label text for the closed state + * @param {string} content collapsable content + * + * @returns {Summary} summary instance + */ + addDetails(label, content) { + const element = this.wrap('details', this.wrap('summary', label) + content); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML image tag to the summary buffer + * + * @param {string} src path to the image you to embed + * @param {string} alt text description of the image + * @param {SummaryImageOptions} options (optional) addition image attributes + * + * @returns {Summary} summary instance + */ + addImage(src, alt, options) { + const { width, height } = options || {}; + const attrs = Object.assign(Object.assign({}, (width && { width })), (height && { height })); + const element = this.wrap('img', null, Object.assign({ src, alt }, attrs)); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML section heading element + * + * @param {string} text heading text + * @param {number | string} [level=1] (optional) the heading level, default: 1 + * + * @returns {Summary} summary instance + */ + addHeading(text, level) { + const tag = `h${level}`; + const allowedTag = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(tag) + ? tag + : 'h1'; + const element = this.wrap(allowedTag, text); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML thematic break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addSeparator() { + const element = this.wrap('hr', null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML line break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addBreak() { + const element = this.wrap('br', null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML blockquote to the summary buffer + * + * @param {string} text quote text + * @param {string} cite (optional) citation url + * + * @returns {Summary} summary instance + */ + addQuote(text, cite) { + const attrs = Object.assign({}, (cite && { cite })); + const element = this.wrap('blockquote', text, attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML anchor tag to the summary buffer + * + * @param {string} text link text/content + * @param {string} href hyperlink + * + * @returns {Summary} summary instance + */ + addLink(text, href) { + const element = this.wrap('a', text, { href }); + return this.addRaw(element).addEOL(); + } +} +const _summary = new Summary(); +/** + * @deprecated use `core.summary` + */ +exports.markdownSummary = _summary; +exports.summary = _summary; +//# sourceMappingURL=summary.js.map + +/***/ }), + +/***/ 5278: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// We use any as a valid input type +/* eslint-disable @typescript-eslint/no-explicit-any */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.toCommandProperties = exports.toCommandValue = void 0; +/** + * Sanitizes an input into a string so it can be passed into issueCommand safely + * @param input input to sanitize into a string + */ +function toCommandValue(input) { + if (input === null || input === undefined) { + return ''; + } + else if (typeof input === 'string' || input instanceof String) { + return input; + } + return JSON.stringify(input); +} +exports.toCommandValue = toCommandValue; +/** + * + * @param annotationProperties + * @returns The command properties to send with the actual annotation command + * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646 + */ +function toCommandProperties(annotationProperties) { + if (!Object.keys(annotationProperties).length) { + return {}; + } + return { + title: annotationProperties.title, + file: annotationProperties.file, + line: annotationProperties.startLine, + endLine: annotationProperties.endLine, + col: annotationProperties.startColumn, + endColumn: annotationProperties.endColumn + }; +} +exports.toCommandProperties = toCommandProperties; +//# sourceMappingURL=utils.js.map + +/***/ }), + +/***/ 5526: +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; + +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.PersonalAccessTokenCredentialHandler = exports.BearerCredentialHandler = exports.BasicCredentialHandler = void 0; +class BasicCredentialHandler { + constructor(username, password) { + this.username = username; + this.password = password; + } + prepareRequest(options) { + if (!options.headers) { + throw Error('The request has no headers'); + } + options.headers['Authorization'] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString('base64')}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter(this, void 0, void 0, function* () { + throw new Error('not implemented'); + }); + } +} +exports.BasicCredentialHandler = BasicCredentialHandler; +class BearerCredentialHandler { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error('The request has no headers'); + } + options.headers['Authorization'] = `Bearer ${this.token}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter(this, void 0, void 0, function* () { + throw new Error('not implemented'); + }); + } +} +exports.BearerCredentialHandler = BearerCredentialHandler; +class PersonalAccessTokenCredentialHandler { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error('The request has no headers'); + } + options.headers['Authorization'] = `Basic ${Buffer.from(`PAT:${this.token}`).toString('base64')}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter(this, void 0, void 0, function* () { + throw new Error('not implemented'); + }); + } +} +exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; +//# sourceMappingURL=auth.js.map + +/***/ }), + +/***/ 6255: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +/* eslint-disable @typescript-eslint/no-explicit-any */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0; +const http = __importStar(__nccwpck_require__(3685)); +const https = __importStar(__nccwpck_require__(5687)); +const pm = __importStar(__nccwpck_require__(9835)); +const tunnel = __importStar(__nccwpck_require__(4294)); +var HttpCodes; +(function (HttpCodes) { + HttpCodes[HttpCodes["OK"] = 200] = "OK"; + HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices"; + HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently"; + HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved"; + HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther"; + HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified"; + HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy"; + HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy"; + HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect"; + HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect"; + HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest"; + HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized"; + HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired"; + HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden"; + HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound"; + HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed"; + HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable"; + HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; + HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout"; + HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict"; + HttpCodes[HttpCodes["Gone"] = 410] = "Gone"; + HttpCodes[HttpCodes["TooManyRequests"] = 429] = "TooManyRequests"; + HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError"; + HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented"; + HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway"; + HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout"; +})(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {})); +var Headers; +(function (Headers) { + Headers["Accept"] = "accept"; + Headers["ContentType"] = "content-type"; +})(Headers = exports.Headers || (exports.Headers = {})); +var MediaTypes; +(function (MediaTypes) { + MediaTypes["ApplicationJson"] = "application/json"; +})(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {})); +/** + * Returns the proxy URL, depending upon the supplied url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ +function getProxyUrl(serverUrl) { + const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); + return proxyUrl ? proxyUrl.href : ''; +} +exports.getProxyUrl = getProxyUrl; +const HttpRedirectCodes = [ + HttpCodes.MovedPermanently, + HttpCodes.ResourceMoved, + HttpCodes.SeeOther, + HttpCodes.TemporaryRedirect, + HttpCodes.PermanentRedirect +]; +const HttpResponseRetryCodes = [ + HttpCodes.BadGateway, + HttpCodes.ServiceUnavailable, + HttpCodes.GatewayTimeout +]; +const RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD']; +const ExponentialBackoffCeiling = 10; +const ExponentialBackoffTimeSlice = 5; +class HttpClientError extends Error { + constructor(message, statusCode) { + super(message); + this.name = 'HttpClientError'; + this.statusCode = statusCode; + Object.setPrototypeOf(this, HttpClientError.prototype); + } +} +exports.HttpClientError = HttpClientError; +class HttpClientResponse { + constructor(message) { + this.message = message; + } + readBody() { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { + let output = Buffer.alloc(0); + this.message.on('data', (chunk) => { + output = Buffer.concat([output, chunk]); + }); + this.message.on('end', () => { + resolve(output.toString()); + }); + })); + }); + } +} +exports.HttpClientResponse = HttpClientResponse; +function isHttps(requestUrl) { + const parsedUrl = new URL(requestUrl); + return parsedUrl.protocol === 'https:'; +} +exports.isHttps = isHttps; +class HttpClient { + constructor(userAgent, handlers, requestOptions) { + this._ignoreSslError = false; + this._allowRedirects = true; + this._allowRedirectDowngrade = false; + this._maxRedirects = 50; + this._allowRetries = false; + this._maxRetries = 1; + this._keepAlive = false; + this._disposed = false; + this.userAgent = userAgent; + this.handlers = handlers || []; + this.requestOptions = requestOptions; + if (requestOptions) { + if (requestOptions.ignoreSslError != null) { + this._ignoreSslError = requestOptions.ignoreSslError; + } + this._socketTimeout = requestOptions.socketTimeout; + if (requestOptions.allowRedirects != null) { + this._allowRedirects = requestOptions.allowRedirects; + } + if (requestOptions.allowRedirectDowngrade != null) { + this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; + } + if (requestOptions.maxRedirects != null) { + this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); + } + if (requestOptions.keepAlive != null) { + this._keepAlive = requestOptions.keepAlive; + } + if (requestOptions.allowRetries != null) { + this._allowRetries = requestOptions.allowRetries; + } + if (requestOptions.maxRetries != null) { + this._maxRetries = requestOptions.maxRetries; + } + } + } + options(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('OPTIONS', requestUrl, null, additionalHeaders || {}); + }); + } + get(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('GET', requestUrl, null, additionalHeaders || {}); + }); + } + del(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('DELETE', requestUrl, null, additionalHeaders || {}); + }); + } + post(requestUrl, data, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('POST', requestUrl, data, additionalHeaders || {}); + }); + } + patch(requestUrl, data, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('PATCH', requestUrl, data, additionalHeaders || {}); + }); + } + put(requestUrl, data, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('PUT', requestUrl, data, additionalHeaders || {}); + }); + } + head(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('HEAD', requestUrl, null, additionalHeaders || {}); + }); + } + sendStream(verb, requestUrl, stream, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request(verb, requestUrl, stream, additionalHeaders); + }); + } + /** + * Gets a typed object from an endpoint + * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise + */ + getJson(requestUrl, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + const res = yield this.get(requestUrl, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + postJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.post(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + putJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.put(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + patchJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.patch(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + /** + * Makes a raw http request. + * All other methods such as get, post, patch, and request ultimately call this. + * Prefer get, del, post and patch + */ + request(verb, requestUrl, data, headers) { + return __awaiter(this, void 0, void 0, function* () { + if (this._disposed) { + throw new Error('Client has already been disposed.'); + } + const parsedUrl = new URL(requestUrl); + let info = this._prepareRequest(verb, parsedUrl, headers); + // Only perform retries on reads since writes may not be idempotent. + const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) + ? this._maxRetries + 1 + : 1; + let numTries = 0; + let response; + do { + response = yield this.requestRaw(info, data); + // Check if it's an authentication challenge + if (response && + response.message && + response.message.statusCode === HttpCodes.Unauthorized) { + let authenticationHandler; + for (const handler of this.handlers) { + if (handler.canHandleAuthentication(response)) { + authenticationHandler = handler; + break; + } + } + if (authenticationHandler) { + return authenticationHandler.handleAuthentication(this, info, data); + } + else { + // We have received an unauthorized response but have no handlers to handle it. + // Let the response return to the caller. + return response; + } + } + let redirectsRemaining = this._maxRedirects; + while (response.message.statusCode && + HttpRedirectCodes.includes(response.message.statusCode) && + this._allowRedirects && + redirectsRemaining > 0) { + const redirectUrl = response.message.headers['location']; + if (!redirectUrl) { + // if there's no location to redirect to, we won't + break; + } + const parsedRedirectUrl = new URL(redirectUrl); + if (parsedUrl.protocol === 'https:' && + parsedUrl.protocol !== parsedRedirectUrl.protocol && + !this._allowRedirectDowngrade) { + throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.'); + } + // we need to finish reading the response before reassigning response + // which will leak the open socket. + yield response.readBody(); + // strip authorization header if redirected to a different hostname + if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { + for (const header in headers) { + // header names are case insensitive + if (header.toLowerCase() === 'authorization') { + delete headers[header]; + } + } + } + // let's make the request with the new redirectUrl + info = this._prepareRequest(verb, parsedRedirectUrl, headers); + response = yield this.requestRaw(info, data); + redirectsRemaining--; + } + if (!response.message.statusCode || + !HttpResponseRetryCodes.includes(response.message.statusCode)) { + // If not a retry code, return immediately instead of retrying + return response; + } + numTries += 1; + if (numTries < maxTries) { + yield response.readBody(); + yield this._performExponentialBackoff(numTries); + } + } while (numTries < maxTries); + return response; + }); + } + /** + * Needs to be called if keepAlive is set to true in request options. + */ + dispose() { + if (this._agent) { + this._agent.destroy(); + } + this._disposed = true; + } + /** + * Raw request. + * @param info + * @param data + */ + requestRaw(info, data) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => { + function callbackForResult(err, res) { + if (err) { + reject(err); + } + else if (!res) { + // If `err` is not passed, then `res` must be passed. + reject(new Error('Unknown error')); + } + else { + resolve(res); + } + } + this.requestRawWithCallback(info, data, callbackForResult); + }); + }); + } + /** + * Raw request with callback. + * @param info + * @param data + * @param onResult + */ + requestRawWithCallback(info, data, onResult) { + if (typeof data === 'string') { + if (!info.options.headers) { + info.options.headers = {}; + } + info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8'); + } + let callbackCalled = false; + function handleResult(err, res) { + if (!callbackCalled) { + callbackCalled = true; + onResult(err, res); + } + } + const req = info.httpModule.request(info.options, (msg) => { + const res = new HttpClientResponse(msg); + handleResult(undefined, res); + }); + let socket; + req.on('socket', sock => { + socket = sock; + }); + // If we ever get disconnected, we want the socket to timeout eventually + req.setTimeout(this._socketTimeout || 3 * 60000, () => { + if (socket) { + socket.end(); + } + handleResult(new Error(`Request timeout: ${info.options.path}`)); + }); + req.on('error', function (err) { + // err has statusCode property + // res should have headers + handleResult(err); + }); + if (data && typeof data === 'string') { + req.write(data, 'utf8'); + } + if (data && typeof data !== 'string') { + data.on('close', function () { + req.end(); + }); + data.pipe(req); + } + else { + req.end(); + } + } + /** + * Gets an http agent. This function is useful when you need an http agent that handles + * routing through a proxy server - depending upon the url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ + getAgent(serverUrl) { + const parsedUrl = new URL(serverUrl); + return this._getAgent(parsedUrl); + } + _prepareRequest(method, requestUrl, headers) { + const info = {}; + info.parsedUrl = requestUrl; + const usingSsl = info.parsedUrl.protocol === 'https:'; + info.httpModule = usingSsl ? https : http; + const defaultPort = usingSsl ? 443 : 80; + info.options = {}; + info.options.host = info.parsedUrl.hostname; + info.options.port = info.parsedUrl.port + ? parseInt(info.parsedUrl.port) + : defaultPort; + info.options.path = + (info.parsedUrl.pathname || '') + (info.parsedUrl.search || ''); + info.options.method = method; + info.options.headers = this._mergeHeaders(headers); + if (this.userAgent != null) { + info.options.headers['user-agent'] = this.userAgent; + } + info.options.agent = this._getAgent(info.parsedUrl); + // gives handlers an opportunity to participate + if (this.handlers) { + for (const handler of this.handlers) { + handler.prepareRequest(info.options); + } + } + return info; + } + _mergeHeaders(headers) { + if (this.requestOptions && this.requestOptions.headers) { + return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); + } + return lowercaseKeys(headers || {}); + } + _getExistingOrDefaultHeader(additionalHeaders, header, _default) { + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { + clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; + } + return additionalHeaders[header] || clientHeader || _default; + } + _getAgent(parsedUrl) { + let agent; + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (this._keepAlive && useProxy) { + agent = this._proxyAgent; + } + if (this._keepAlive && !useProxy) { + agent = this._agent; + } + // if agent is already assigned use that agent. + if (agent) { + return agent; + } + const usingSsl = parsedUrl.protocol === 'https:'; + let maxSockets = 100; + if (this.requestOptions) { + maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; + } + // This is `useProxy` again, but we need to check `proxyURl` directly for TypeScripts's flow analysis. + if (proxyUrl && proxyUrl.hostname) { + const agentOptions = { + maxSockets, + keepAlive: this._keepAlive, + proxy: Object.assign(Object.assign({}, ((proxyUrl.username || proxyUrl.password) && { + proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` + })), { host: proxyUrl.hostname, port: proxyUrl.port }) + }; + let tunnelAgent; + const overHttps = proxyUrl.protocol === 'https:'; + if (usingSsl) { + tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; + } + else { + tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; + } + agent = tunnelAgent(agentOptions); + this._proxyAgent = agent; + } + // if reusing agent across request and tunneling agent isn't assigned create a new agent + if (this._keepAlive && !agent) { + const options = { keepAlive: this._keepAlive, maxSockets }; + agent = usingSsl ? new https.Agent(options) : new http.Agent(options); + this._agent = agent; + } + // if not using private agent and tunnel agent isn't setup then use global agent + if (!agent) { + agent = usingSsl ? https.globalAgent : http.globalAgent; + } + if (usingSsl && this._ignoreSslError) { + // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process + // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options + // we have to cast it to any and change it directly + agent.options = Object.assign(agent.options || {}, { + rejectUnauthorized: false + }); + } + return agent; + } + _performExponentialBackoff(retryNumber) { + return __awaiter(this, void 0, void 0, function* () { + retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); + const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); + return new Promise(resolve => setTimeout(() => resolve(), ms)); + }); + } + _processResponse(res, options) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + const statusCode = res.message.statusCode || 0; + const response = { + statusCode, + result: null, + headers: {} + }; + // not found leads to null obj returned + if (statusCode === HttpCodes.NotFound) { + resolve(response); + } + // get the result from the body + function dateTimeDeserializer(key, value) { + if (typeof value === 'string') { + const a = new Date(value); + if (!isNaN(a.valueOf())) { + return a; + } + } + return value; + } + let obj; + let contents; + try { + contents = yield res.readBody(); + if (contents && contents.length > 0) { + if (options && options.deserializeDates) { + obj = JSON.parse(contents, dateTimeDeserializer); + } + else { + obj = JSON.parse(contents); + } + response.result = obj; + } + response.headers = res.message.headers; + } + catch (err) { + // Invalid resource (contents not json); leaving result obj null + } + // note that 3xx redirects are handled by the http layer. + if (statusCode > 299) { + let msg; + // if exception/error in body, attempt to get better error + if (obj && obj.message) { + msg = obj.message; + } + else if (contents && contents.length > 0) { + // it may be the case that the exception is in the body message as string + msg = contents; + } + else { + msg = `Failed request: (${statusCode})`; + } + const err = new HttpClientError(msg, statusCode); + err.result = response.result; + reject(err); + } + else { + resolve(response); + } + })); + }); + } +} +exports.HttpClient = HttpClient; +const lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {}); +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 9835: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.checkBypass = exports.getProxyUrl = void 0; +function getProxyUrl(reqUrl) { + const usingSsl = reqUrl.protocol === 'https:'; + if (checkBypass(reqUrl)) { + return undefined; + } + const proxyVar = (() => { + if (usingSsl) { + return process.env['https_proxy'] || process.env['HTTPS_PROXY']; + } + else { + return process.env['http_proxy'] || process.env['HTTP_PROXY']; + } + })(); + if (proxyVar) { + return new URL(proxyVar); + } + else { + return undefined; + } +} +exports.getProxyUrl = getProxyUrl; +function checkBypass(reqUrl) { + if (!reqUrl.hostname) { + return false; + } + const noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || ''; + if (!noProxy) { + return false; + } + // Determine the request port + let reqPort; + if (reqUrl.port) { + reqPort = Number(reqUrl.port); + } + else if (reqUrl.protocol === 'http:') { + reqPort = 80; + } + else if (reqUrl.protocol === 'https:') { + reqPort = 443; + } + // Format the request hostname and hostname with port + const upperReqHosts = [reqUrl.hostname.toUpperCase()]; + if (typeof reqPort === 'number') { + upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); + } + // Compare request host against noproxy + for (const upperNoProxyItem of noProxy + .split(',') + .map(x => x.trim().toUpperCase()) + .filter(x => x)) { + if (upperReqHosts.some(x => x === upperNoProxyItem)) { + return true; + } + } + return false; +} +exports.checkBypass = checkBypass; +//# sourceMappingURL=proxy.js.map + +/***/ }), + +/***/ 9417: +/***/ ((module) => { + +"use strict"; + +module.exports = balanced; +function balanced(a, b, str) { + if (a instanceof RegExp) a = maybeMatch(a, str); + if (b instanceof RegExp) b = maybeMatch(b, str); + + var r = range(a, b, str); + + return r && { + start: r[0], + end: r[1], + pre: str.slice(0, r[0]), + body: str.slice(r[0] + a.length, r[1]), + post: str.slice(r[1] + b.length) + }; +} + +function maybeMatch(reg, str) { + var m = str.match(reg); + return m ? m[0] : null; +} + +balanced.range = range; +function range(a, b, str) { + var begs, beg, left, right, result; + var ai = str.indexOf(a); + var bi = str.indexOf(b, ai + 1); + var i = ai; + + if (ai >= 0 && bi > 0) { + if(a===b) { + return [ai, bi]; + } + begs = []; + left = str.length; + + while (i >= 0 && !result) { + if (i == ai) { + begs.push(i); + ai = str.indexOf(a, i + 1); + } else if (begs.length == 1) { + result = [ begs.pop(), bi ]; + } else { + beg = begs.pop(); + if (beg < left) { + left = beg; + right = bi; + } + + bi = str.indexOf(b, i + 1); + } + + i = ai < bi && ai >= 0 ? ai : bi; + } + + if (begs.length) { + result = [ left, right ]; + } + } + + return result; +} + + +/***/ }), + +/***/ 3717: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var concatMap = __nccwpck_require__(6891); +var balanced = __nccwpck_require__(9417); + +module.exports = expandTop; + +var escSlash = '\0SLASH'+Math.random()+'\0'; +var escOpen = '\0OPEN'+Math.random()+'\0'; +var escClose = '\0CLOSE'+Math.random()+'\0'; +var escComma = '\0COMMA'+Math.random()+'\0'; +var escPeriod = '\0PERIOD'+Math.random()+'\0'; + +function numeric(str) { + return parseInt(str, 10) == str + ? parseInt(str, 10) + : str.charCodeAt(0); +} + +function escapeBraces(str) { + return str.split('\\\\').join(escSlash) + .split('\\{').join(escOpen) + .split('\\}').join(escClose) + .split('\\,').join(escComma) + .split('\\.').join(escPeriod); +} + +function unescapeBraces(str) { + return str.split(escSlash).join('\\') + .split(escOpen).join('{') + .split(escClose).join('}') + .split(escComma).join(',') + .split(escPeriod).join('.'); +} + + +// Basically just str.split(","), but handling cases +// where we have nested braced sections, which should be +// treated as individual members, like {a,{b,c},d} +function parseCommaParts(str) { + if (!str) + return ['']; + + var parts = []; + var m = balanced('{', '}', str); + + if (!m) + return str.split(','); + + var pre = m.pre; + var body = m.body; + var post = m.post; + var p = pre.split(','); + + p[p.length-1] += '{' + body + '}'; + var postParts = parseCommaParts(post); + if (post.length) { + p[p.length-1] += postParts.shift(); + p.push.apply(p, postParts); + } + + parts.push.apply(parts, p); + + return parts; +} + +function expandTop(str) { + if (!str) + return []; + + // I don't know why Bash 4.3 does this, but it does. + // Anything starting with {} will have the first two bytes preserved + // but *only* at the top level, so {},a}b will not expand to anything, + // but a{},b}c will be expanded to [a}c,abc]. + // One could argue that this is a bug in Bash, but since the goal of + // this module is to match Bash's rules, we escape a leading {} + if (str.substr(0, 2) === '{}') { + str = '\\{\\}' + str.substr(2); + } + + return expand(escapeBraces(str), true).map(unescapeBraces); +} + +function identity(e) { + return e; +} + +function embrace(str) { + return '{' + str + '}'; +} +function isPadded(el) { + return /^-?0\d/.test(el); +} + +function lte(i, y) { + return i <= y; +} +function gte(i, y) { + return i >= y; +} + +function expand(str, isTop) { + var expansions = []; + + var m = balanced('{', '}', str); + if (!m || /\$$/.test(m.pre)) return [str]; + + var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + var isSequence = isNumericSequence || isAlphaSequence; + var isOptions = m.body.indexOf(',') >= 0; + if (!isSequence && !isOptions) { + // {a},b} + if (m.post.match(/,.*\}/)) { + str = m.pre + '{' + m.body + escClose + m.post; + return expand(str); + } + return [str]; + } + + var n; + if (isSequence) { + n = m.body.split(/\.\./); + } else { + n = parseCommaParts(m.body); + if (n.length === 1) { + // x{{a,b}}y ==> x{a}y x{b}y + n = expand(n[0], false).map(embrace); + if (n.length === 1) { + var post = m.post.length + ? expand(m.post, false) + : ['']; + return post.map(function(p) { + return m.pre + n[0] + p; + }); + } + } + } + + // at this point, n is the parts, and we know it's not a comma set + // with a single entry. + + // no need to expand pre, since it is guaranteed to be free of brace-sets + var pre = m.pre; + var post = m.post.length + ? expand(m.post, false) + : ['']; + + var N; + + if (isSequence) { + var x = numeric(n[0]); + var y = numeric(n[1]); + var width = Math.max(n[0].length, n[1].length) + var incr = n.length == 3 + ? Math.abs(numeric(n[2])) + : 1; + var test = lte; + var reverse = y < x; + if (reverse) { + incr *= -1; + test = gte; + } + var pad = n.some(isPadded); + + N = []; + + for (var i = x; test(i, y); i += incr) { + var c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === '\\') + c = ''; + } else { + c = String(i); + if (pad) { + var need = width - c.length; + if (need > 0) { + var z = new Array(need + 1).join('0'); + if (i < 0) + c = '-' + z + c.slice(1); + else + c = z + c; + } + } + } + N.push(c); + } + } else { + N = concatMap(n, function(el) { return expand(el, false) }); + } + + for (var j = 0; j < N.length; j++) { + for (var k = 0; k < post.length; k++) { + var expansion = pre + N[j] + post[k]; + if (!isTop || isSequence || expansion) + expansions.push(expansion); + } + } + + return expansions; +} + + + +/***/ }), + +/***/ 6891: +/***/ ((module) => { + +module.exports = function (xs, fn) { + var res = []; + for (var i = 0; i < xs.length; i++) { + var x = fn(xs[i], i); + if (isArray(x)) res.push.apply(res, x); + else res.push(x); + } + return res; +}; + +var isArray = Array.isArray || function (xs) { + return Object.prototype.toString.call(xs) === '[object Array]'; +}; + + +/***/ }), + +/***/ 6863: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +module.exports = realpath +realpath.realpath = realpath +realpath.sync = realpathSync +realpath.realpathSync = realpathSync +realpath.monkeypatch = monkeypatch +realpath.unmonkeypatch = unmonkeypatch + +var fs = __nccwpck_require__(7147) +var origRealpath = fs.realpath +var origRealpathSync = fs.realpathSync + +var version = process.version +var ok = /^v[0-5]\./.test(version) +var old = __nccwpck_require__(1734) + +function newError (er) { + return er && er.syscall === 'realpath' && ( + er.code === 'ELOOP' || + er.code === 'ENOMEM' || + er.code === 'ENAMETOOLONG' + ) +} + +function realpath (p, cache, cb) { + if (ok) { + return origRealpath(p, cache, cb) + } + + if (typeof cache === 'function') { + cb = cache + cache = null + } + origRealpath(p, cache, function (er, result) { + if (newError(er)) { + old.realpath(p, cache, cb) + } else { + cb(er, result) + } + }) +} + +function realpathSync (p, cache) { + if (ok) { + return origRealpathSync(p, cache) + } + + try { + return origRealpathSync(p, cache) + } catch (er) { + if (newError(er)) { + return old.realpathSync(p, cache) + } else { + throw er + } + } +} + +function monkeypatch () { + fs.realpath = realpath + fs.realpathSync = realpathSync +} + +function unmonkeypatch () { + fs.realpath = origRealpath + fs.realpathSync = origRealpathSync +} + + +/***/ }), + +/***/ 1734: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +var pathModule = __nccwpck_require__(1017); +var isWindows = process.platform === 'win32'; +var fs = __nccwpck_require__(7147); + +// JavaScript implementation of realpath, ported from node pre-v6 + +var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG); + +function rethrow() { + // Only enable in debug mode. A backtrace uses ~1000 bytes of heap space and + // is fairly slow to generate. + var callback; + if (DEBUG) { + var backtrace = new Error; + callback = debugCallback; + } else + callback = missingCallback; + + return callback; + + function debugCallback(err) { + if (err) { + backtrace.message = err.message; + err = backtrace; + missingCallback(err); + } + } + + function missingCallback(err) { + if (err) { + if (process.throwDeprecation) + throw err; // Forgot a callback but don't know where? Use NODE_DEBUG=fs + else if (!process.noDeprecation) { + var msg = 'fs: missing callback ' + (err.stack || err.message); + if (process.traceDeprecation) + console.trace(msg); + else + console.error(msg); + } + } + } +} + +function maybeCallback(cb) { + return typeof cb === 'function' ? cb : rethrow(); +} + +var normalize = pathModule.normalize; + +// Regexp that finds the next partion of a (partial) path +// result is [base_with_slash, base], e.g. ['somedir/', 'somedir'] +if (isWindows) { + var nextPartRe = /(.*?)(?:[\/\\]+|$)/g; +} else { + var nextPartRe = /(.*?)(?:[\/]+|$)/g; +} + +// Regex to find the device root, including trailing slash. E.g. 'c:\\'. +if (isWindows) { + var splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/; +} else { + var splitRootRe = /^[\/]*/; +} + +exports.realpathSync = function realpathSync(p, cache) { + // make p is absolute + p = pathModule.resolve(p); + + if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { + return cache[p]; + } + + var original = p, + seenLinks = {}, + knownHard = {}; + + // current character position in p + var pos; + // the partial path so far, including a trailing slash if any + var current; + // the partial path without a trailing slash (except when pointing at a root) + var base; + // the partial path scanned in the previous round, with slash + var previous; + + start(); + + function start() { + // Skip over roots + var m = splitRootRe.exec(p); + pos = m[0].length; + current = m[0]; + base = m[0]; + previous = ''; + + // On windows, check that the root exists. On unix there is no need. + if (isWindows && !knownHard[base]) { + fs.lstatSync(base); + knownHard[base] = true; + } + } + + // walk down the path, swapping out linked pathparts for their real + // values + // NB: p.length changes. + while (pos < p.length) { + // find the next part + nextPartRe.lastIndex = pos; + var result = nextPartRe.exec(p); + previous = current; + current += result[0]; + base = previous + result[1]; + pos = nextPartRe.lastIndex; + + // continue if not a symlink + if (knownHard[base] || (cache && cache[base] === base)) { + continue; + } + + var resolvedLink; + if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { + // some known symbolic link. no need to stat again. + resolvedLink = cache[base]; + } else { + var stat = fs.lstatSync(base); + if (!stat.isSymbolicLink()) { + knownHard[base] = true; + if (cache) cache[base] = base; + continue; + } + + // read the link if it wasn't read before + // dev/ino always return 0 on windows, so skip the check. + var linkTarget = null; + if (!isWindows) { + var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); + if (seenLinks.hasOwnProperty(id)) { + linkTarget = seenLinks[id]; + } + } + if (linkTarget === null) { + fs.statSync(base); + linkTarget = fs.readlinkSync(base); + } + resolvedLink = pathModule.resolve(previous, linkTarget); + // track this, if given a cache. + if (cache) cache[base] = resolvedLink; + if (!isWindows) seenLinks[id] = linkTarget; + } + + // resolve the link, then start over + p = pathModule.resolve(resolvedLink, p.slice(pos)); + start(); + } + + if (cache) cache[original] = p; + + return p; +}; + + +exports.realpath = function realpath(p, cache, cb) { + if (typeof cb !== 'function') { + cb = maybeCallback(cache); + cache = null; + } + + // make p is absolute + p = pathModule.resolve(p); + + if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { + return process.nextTick(cb.bind(null, null, cache[p])); + } + + var original = p, + seenLinks = {}, + knownHard = {}; + + // current character position in p + var pos; + // the partial path so far, including a trailing slash if any + var current; + // the partial path without a trailing slash (except when pointing at a root) + var base; + // the partial path scanned in the previous round, with slash + var previous; + + start(); + + function start() { + // Skip over roots + var m = splitRootRe.exec(p); + pos = m[0].length; + current = m[0]; + base = m[0]; + previous = ''; + + // On windows, check that the root exists. On unix there is no need. + if (isWindows && !knownHard[base]) { + fs.lstat(base, function(err) { + if (err) return cb(err); + knownHard[base] = true; + LOOP(); + }); + } else { + process.nextTick(LOOP); + } + } + + // walk down the path, swapping out linked pathparts for their real + // values + function LOOP() { + // stop if scanned past end of path + if (pos >= p.length) { + if (cache) cache[original] = p; + return cb(null, p); + } + + // find the next part + nextPartRe.lastIndex = pos; + var result = nextPartRe.exec(p); + previous = current; + current += result[0]; + base = previous + result[1]; + pos = nextPartRe.lastIndex; + + // continue if not a symlink + if (knownHard[base] || (cache && cache[base] === base)) { + return process.nextTick(LOOP); + } + + if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { + // known symbolic link. no need to stat again. + return gotResolvedLink(cache[base]); + } + + return fs.lstat(base, gotStat); + } + + function gotStat(err, stat) { + if (err) return cb(err); + + // if not a symlink, skip to the next path part + if (!stat.isSymbolicLink()) { + knownHard[base] = true; + if (cache) cache[base] = base; + return process.nextTick(LOOP); + } + + // stat & read the link if not read before + // call gotTarget as soon as the link target is known + // dev/ino always return 0 on windows, so skip the check. + if (!isWindows) { + var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); + if (seenLinks.hasOwnProperty(id)) { + return gotTarget(null, seenLinks[id], base); + } + } + fs.stat(base, function(err) { + if (err) return cb(err); + + fs.readlink(base, function(err, target) { + if (!isWindows) seenLinks[id] = target; + gotTarget(err, target); + }); + }); + } + + function gotTarget(err, target, base) { + if (err) return cb(err); + + var resolvedLink = pathModule.resolve(previous, target); + if (cache) cache[base] = resolvedLink; + gotResolvedLink(resolvedLink); + } + + function gotResolvedLink(resolvedLink) { + // resolve the link, then start over + p = pathModule.resolve(resolvedLink, p.slice(pos)); + start(); + } +}; + + +/***/ }), + +/***/ 7625: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +exports.setopts = setopts +exports.ownProp = ownProp +exports.makeAbs = makeAbs +exports.finish = finish +exports.mark = mark +exports.isIgnored = isIgnored +exports.childrenIgnored = childrenIgnored + +function ownProp (obj, field) { + return Object.prototype.hasOwnProperty.call(obj, field) +} + +var fs = __nccwpck_require__(7147) +var path = __nccwpck_require__(1017) +var minimatch = __nccwpck_require__(3973) +var isAbsolute = __nccwpck_require__(8714) +var Minimatch = minimatch.Minimatch + +function alphasort (a, b) { + return a.localeCompare(b, 'en') +} + +function setupIgnores (self, options) { + self.ignore = options.ignore || [] + + if (!Array.isArray(self.ignore)) + self.ignore = [self.ignore] + + if (self.ignore.length) { + self.ignore = self.ignore.map(ignoreMap) + } +} + +// ignore patterns are always in dot:true mode. +function ignoreMap (pattern) { + var gmatcher = null + if (pattern.slice(-3) === '/**') { + var gpattern = pattern.replace(/(\/\*\*)+$/, '') + gmatcher = new Minimatch(gpattern, { dot: true }) + } + + return { + matcher: new Minimatch(pattern, { dot: true }), + gmatcher: gmatcher + } +} + +function setopts (self, pattern, options) { + if (!options) + options = {} + + // base-matching: just use globstar for that. + if (options.matchBase && -1 === pattern.indexOf("/")) { + if (options.noglobstar) { + throw new Error("base matching requires globstar") + } + pattern = "**/" + pattern + } + + self.silent = !!options.silent + self.pattern = pattern + self.strict = options.strict !== false + self.realpath = !!options.realpath + self.realpathCache = options.realpathCache || Object.create(null) + self.follow = !!options.follow + self.dot = !!options.dot + self.mark = !!options.mark + self.nodir = !!options.nodir + if (self.nodir) + self.mark = true + self.sync = !!options.sync + self.nounique = !!options.nounique + self.nonull = !!options.nonull + self.nosort = !!options.nosort + self.nocase = !!options.nocase + self.stat = !!options.stat + self.noprocess = !!options.noprocess + self.absolute = !!options.absolute + self.fs = options.fs || fs + + self.maxLength = options.maxLength || Infinity + self.cache = options.cache || Object.create(null) + self.statCache = options.statCache || Object.create(null) + self.symlinks = options.symlinks || Object.create(null) + + setupIgnores(self, options) + + self.changedCwd = false + var cwd = process.cwd() + if (!ownProp(options, "cwd")) + self.cwd = cwd + else { + self.cwd = path.resolve(options.cwd) + self.changedCwd = self.cwd !== cwd + } + + self.root = options.root || path.resolve(self.cwd, "/") + self.root = path.resolve(self.root) + if (process.platform === "win32") + self.root = self.root.replace(/\\/g, "/") + + // TODO: is an absolute `cwd` supposed to be resolved against `root`? + // e.g. { cwd: '/test', root: __dirname } === path.join(__dirname, '/test') + self.cwdAbs = isAbsolute(self.cwd) ? self.cwd : makeAbs(self, self.cwd) + if (process.platform === "win32") + self.cwdAbs = self.cwdAbs.replace(/\\/g, "/") + self.nomount = !!options.nomount + + // disable comments and negation in Minimatch. + // Note that they are not supported in Glob itself anyway. + options.nonegate = true + options.nocomment = true + // always treat \ in patterns as escapes, not path separators + options.allowWindowsEscape = false + + self.minimatch = new Minimatch(pattern, options) + self.options = self.minimatch.options +} + +function finish (self) { + var nou = self.nounique + var all = nou ? [] : Object.create(null) + + for (var i = 0, l = self.matches.length; i < l; i ++) { + var matches = self.matches[i] + if (!matches || Object.keys(matches).length === 0) { + if (self.nonull) { + // do like the shell, and spit out the literal glob + var literal = self.minimatch.globSet[i] + if (nou) + all.push(literal) + else + all[literal] = true + } + } else { + // had matches + var m = Object.keys(matches) + if (nou) + all.push.apply(all, m) + else + m.forEach(function (m) { + all[m] = true + }) + } + } + + if (!nou) + all = Object.keys(all) + + if (!self.nosort) + all = all.sort(alphasort) + + // at *some* point we statted all of these + if (self.mark) { + for (var i = 0; i < all.length; i++) { + all[i] = self._mark(all[i]) + } + if (self.nodir) { + all = all.filter(function (e) { + var notDir = !(/\/$/.test(e)) + var c = self.cache[e] || self.cache[makeAbs(self, e)] + if (notDir && c) + notDir = c !== 'DIR' && !Array.isArray(c) + return notDir + }) + } + } + + if (self.ignore.length) + all = all.filter(function(m) { + return !isIgnored(self, m) + }) + + self.found = all +} + +function mark (self, p) { + var abs = makeAbs(self, p) + var c = self.cache[abs] + var m = p + if (c) { + var isDir = c === 'DIR' || Array.isArray(c) + var slash = p.slice(-1) === '/' + + if (isDir && !slash) + m += '/' + else if (!isDir && slash) + m = m.slice(0, -1) + + if (m !== p) { + var mabs = makeAbs(self, m) + self.statCache[mabs] = self.statCache[abs] + self.cache[mabs] = self.cache[abs] + } + } + + return m +} + +// lotta situps... +function makeAbs (self, f) { + var abs = f + if (f.charAt(0) === '/') { + abs = path.join(self.root, f) + } else if (isAbsolute(f) || f === '') { + abs = f + } else if (self.changedCwd) { + abs = path.resolve(self.cwd, f) + } else { + abs = path.resolve(f) + } + + if (process.platform === 'win32') + abs = abs.replace(/\\/g, '/') + + return abs +} + + +// Return true, if pattern ends with globstar '**', for the accompanying parent directory. +// Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents +function isIgnored (self, path) { + if (!self.ignore.length) + return false + + return self.ignore.some(function(item) { + return item.matcher.match(path) || !!(item.gmatcher && item.gmatcher.match(path)) + }) +} + +function childrenIgnored (self, path) { + if (!self.ignore.length) + return false + + return self.ignore.some(function(item) { + return !!(item.gmatcher && item.gmatcher.match(path)) + }) +} + + +/***/ }), + +/***/ 1957: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Approach: +// +// 1. Get the minimatch set +// 2. For each pattern in the set, PROCESS(pattern, false) +// 3. Store matches per-set, then uniq them +// +// PROCESS(pattern, inGlobStar) +// Get the first [n] items from pattern that are all strings +// Join these together. This is PREFIX. +// If there is no more remaining, then stat(PREFIX) and +// add to matches if it succeeds. END. +// +// If inGlobStar and PREFIX is symlink and points to dir +// set ENTRIES = [] +// else readdir(PREFIX) as ENTRIES +// If fail, END +// +// with ENTRIES +// If pattern[n] is GLOBSTAR +// // handle the case where the globstar match is empty +// // by pruning it out, and testing the resulting pattern +// PROCESS(pattern[0..n] + pattern[n+1 .. $], false) +// // handle other cases. +// for ENTRY in ENTRIES (not dotfiles) +// // attach globstar + tail onto the entry +// // Mark that this entry is a globstar match +// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $], true) +// +// else // not globstar +// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot) +// Test ENTRY against pattern[n] +// If fails, continue +// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $]) +// +// Caveat: +// Cache all stats and readdirs results to minimize syscall. Since all +// we ever care about is existence and directory-ness, we can just keep +// `true` for files, and [children,...] for directories, or `false` for +// things that don't exist. + +module.exports = glob + +var rp = __nccwpck_require__(6863) +var minimatch = __nccwpck_require__(3973) +var Minimatch = minimatch.Minimatch +var inherits = __nccwpck_require__(4124) +var EE = (__nccwpck_require__(2361).EventEmitter) +var path = __nccwpck_require__(1017) +var assert = __nccwpck_require__(9491) +var isAbsolute = __nccwpck_require__(8714) +var globSync = __nccwpck_require__(9010) +var common = __nccwpck_require__(7625) +var setopts = common.setopts +var ownProp = common.ownProp +var inflight = __nccwpck_require__(2492) +var util = __nccwpck_require__(3837) +var childrenIgnored = common.childrenIgnored +var isIgnored = common.isIgnored + +var once = __nccwpck_require__(1223) + +function glob (pattern, options, cb) { + if (typeof options === 'function') cb = options, options = {} + if (!options) options = {} + + if (options.sync) { + if (cb) + throw new TypeError('callback provided to sync glob') + return globSync(pattern, options) + } + + return new Glob(pattern, options, cb) +} + +glob.sync = globSync +var GlobSync = glob.GlobSync = globSync.GlobSync + +// old api surface +glob.glob = glob + +function extend (origin, add) { + if (add === null || typeof add !== 'object') { + return origin + } + + var keys = Object.keys(add) + var i = keys.length + while (i--) { + origin[keys[i]] = add[keys[i]] + } + return origin +} + +glob.hasMagic = function (pattern, options_) { + var options = extend({}, options_) + options.noprocess = true + + var g = new Glob(pattern, options) + var set = g.minimatch.set + + if (!pattern) + return false + + if (set.length > 1) + return true + + for (var j = 0; j < set[0].length; j++) { + if (typeof set[0][j] !== 'string') + return true + } + + return false +} + +glob.Glob = Glob +inherits(Glob, EE) +function Glob (pattern, options, cb) { + if (typeof options === 'function') { + cb = options + options = null + } + + if (options && options.sync) { + if (cb) + throw new TypeError('callback provided to sync glob') + return new GlobSync(pattern, options) + } + + if (!(this instanceof Glob)) + return new Glob(pattern, options, cb) + + setopts(this, pattern, options) + this._didRealPath = false + + // process each pattern in the minimatch set + var n = this.minimatch.set.length + + // The matches are stored as {: true,...} so that + // duplicates are automagically pruned. + // Later, we do an Object.keys() on these. + // Keep them as a list so we can fill in when nonull is set. + this.matches = new Array(n) + + if (typeof cb === 'function') { + cb = once(cb) + this.on('error', cb) + this.on('end', function (matches) { + cb(null, matches) + }) + } + + var self = this + this._processing = 0 + + this._emitQueue = [] + this._processQueue = [] + this.paused = false + + if (this.noprocess) + return this + + if (n === 0) + return done() + + var sync = true + for (var i = 0; i < n; i ++) { + this._process(this.minimatch.set[i], i, false, done) + } + sync = false + + function done () { + --self._processing + if (self._processing <= 0) { + if (sync) { + process.nextTick(function () { + self._finish() + }) + } else { + self._finish() + } + } + } +} + +Glob.prototype._finish = function () { + assert(this instanceof Glob) + if (this.aborted) + return + + if (this.realpath && !this._didRealpath) + return this._realpath() + + common.finish(this) + this.emit('end', this.found) +} + +Glob.prototype._realpath = function () { + if (this._didRealpath) + return + + this._didRealpath = true + + var n = this.matches.length + if (n === 0) + return this._finish() + + var self = this + for (var i = 0; i < this.matches.length; i++) + this._realpathSet(i, next) + + function next () { + if (--n === 0) + self._finish() + } +} + +Glob.prototype._realpathSet = function (index, cb) { + var matchset = this.matches[index] + if (!matchset) + return cb() + + var found = Object.keys(matchset) + var self = this + var n = found.length + + if (n === 0) + return cb() + + var set = this.matches[index] = Object.create(null) + found.forEach(function (p, i) { + // If there's a problem with the stat, then it means that + // one or more of the links in the realpath couldn't be + // resolved. just return the abs value in that case. + p = self._makeAbs(p) + rp.realpath(p, self.realpathCache, function (er, real) { + if (!er) + set[real] = true + else if (er.syscall === 'stat') + set[p] = true + else + self.emit('error', er) // srsly wtf right here + + if (--n === 0) { + self.matches[index] = set + cb() + } + }) + }) +} + +Glob.prototype._mark = function (p) { + return common.mark(this, p) +} + +Glob.prototype._makeAbs = function (f) { + return common.makeAbs(this, f) +} + +Glob.prototype.abort = function () { + this.aborted = true + this.emit('abort') +} + +Glob.prototype.pause = function () { + if (!this.paused) { + this.paused = true + this.emit('pause') + } +} + +Glob.prototype.resume = function () { + if (this.paused) { + this.emit('resume') + this.paused = false + if (this._emitQueue.length) { + var eq = this._emitQueue.slice(0) + this._emitQueue.length = 0 + for (var i = 0; i < eq.length; i ++) { + var e = eq[i] + this._emitMatch(e[0], e[1]) + } + } + if (this._processQueue.length) { + var pq = this._processQueue.slice(0) + this._processQueue.length = 0 + for (var i = 0; i < pq.length; i ++) { + var p = pq[i] + this._processing-- + this._process(p[0], p[1], p[2], p[3]) + } + } + } +} + +Glob.prototype._process = function (pattern, index, inGlobStar, cb) { + assert(this instanceof Glob) + assert(typeof cb === 'function') + + if (this.aborted) + return + + this._processing++ + if (this.paused) { + this._processQueue.push([pattern, index, inGlobStar, cb]) + return + } + + //console.error('PROCESS %d', this._processing, pattern) + + // Get the first [n] parts of pattern that are all strings. + var n = 0 + while (typeof pattern[n] === 'string') { + n ++ + } + // now n is the index of the first one that is *not* a string. + + // see if there's anything else + var prefix + switch (n) { + // if not, then this is rather simple + case pattern.length: + this._processSimple(pattern.join('/'), index, cb) + return + + case 0: + // pattern *starts* with some non-trivial item. + // going to readdir(cwd), but not include the prefix in matches. + prefix = null + break + + default: + // pattern has some string bits in the front. + // whatever it starts with, whether that's 'absolute' like /foo/bar, + // or 'relative' like '../baz' + prefix = pattern.slice(0, n).join('/') + break + } + + var remain = pattern.slice(n) + + // get the list of entries. + var read + if (prefix === null) + read = '.' + else if (isAbsolute(prefix) || + isAbsolute(pattern.map(function (p) { + return typeof p === 'string' ? p : '[*]' + }).join('/'))) { + if (!prefix || !isAbsolute(prefix)) + prefix = '/' + prefix + read = prefix + } else + read = prefix + + var abs = this._makeAbs(read) + + //if ignored, skip _processing + if (childrenIgnored(this, read)) + return cb() + + var isGlobStar = remain[0] === minimatch.GLOBSTAR + if (isGlobStar) + this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb) + else + this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb) +} + +Glob.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar, cb) { + var self = this + this._readdir(abs, inGlobStar, function (er, entries) { + return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb) + }) +} + +Glob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { + + // if the abs isn't a dir, then nothing can match! + if (!entries) + return cb() + + // It will only match dot entries if it starts with a dot, or if + // dot is set. Stuff like @(.foo|.bar) isn't allowed. + var pn = remain[0] + var negate = !!this.minimatch.negate + var rawGlob = pn._glob + var dotOk = this.dot || rawGlob.charAt(0) === '.' + + var matchedEntries = [] + for (var i = 0; i < entries.length; i++) { + var e = entries[i] + if (e.charAt(0) !== '.' || dotOk) { + var m + if (negate && !prefix) { + m = !e.match(pn) + } else { + m = e.match(pn) + } + if (m) + matchedEntries.push(e) + } + } + + //console.error('prd2', prefix, entries, remain[0]._glob, matchedEntries) + + var len = matchedEntries.length + // If there are no matched entries, then nothing matches. + if (len === 0) + return cb() + + // if this is the last remaining pattern bit, then no need for + // an additional stat *unless* the user has specified mark or + // stat explicitly. We know they exist, since readdir returned + // them. + + if (remain.length === 1 && !this.mark && !this.stat) { + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + if (prefix) { + if (prefix !== '/') + e = prefix + '/' + e + else + e = prefix + e + } + + if (e.charAt(0) === '/' && !this.nomount) { + e = path.join(this.root, e) + } + this._emitMatch(index, e) + } + // This was the last one, and no stats were needed + return cb() + } + + // now test all matched entries as stand-ins for that part + // of the pattern. + remain.shift() + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + var newPattern + if (prefix) { + if (prefix !== '/') + e = prefix + '/' + e + else + e = prefix + e + } + this._process([e].concat(remain), index, inGlobStar, cb) + } + cb() +} + +Glob.prototype._emitMatch = function (index, e) { + if (this.aborted) + return + + if (isIgnored(this, e)) + return + + if (this.paused) { + this._emitQueue.push([index, e]) + return + } + + var abs = isAbsolute(e) ? e : this._makeAbs(e) + + if (this.mark) + e = this._mark(e) + + if (this.absolute) + e = abs + + if (this.matches[index][e]) + return + + if (this.nodir) { + var c = this.cache[abs] + if (c === 'DIR' || Array.isArray(c)) + return + } + + this.matches[index][e] = true + + var st = this.statCache[abs] + if (st) + this.emit('stat', e, st) + + this.emit('match', e) +} + +Glob.prototype._readdirInGlobStar = function (abs, cb) { + if (this.aborted) + return + + // follow all symlinked directories forever + // just proceed as if this is a non-globstar situation + if (this.follow) + return this._readdir(abs, false, cb) + + var lstatkey = 'lstat\0' + abs + var self = this + var lstatcb = inflight(lstatkey, lstatcb_) + + if (lstatcb) + self.fs.lstat(abs, lstatcb) + + function lstatcb_ (er, lstat) { + if (er && er.code === 'ENOENT') + return cb() + + var isSym = lstat && lstat.isSymbolicLink() + self.symlinks[abs] = isSym + + // If it's not a symlink or a dir, then it's definitely a regular file. + // don't bother doing a readdir in that case. + if (!isSym && lstat && !lstat.isDirectory()) { + self.cache[abs] = 'FILE' + cb() + } else + self._readdir(abs, false, cb) + } +} + +Glob.prototype._readdir = function (abs, inGlobStar, cb) { + if (this.aborted) + return + + cb = inflight('readdir\0'+abs+'\0'+inGlobStar, cb) + if (!cb) + return + + //console.error('RD %j %j', +inGlobStar, abs) + if (inGlobStar && !ownProp(this.symlinks, abs)) + return this._readdirInGlobStar(abs, cb) + + if (ownProp(this.cache, abs)) { + var c = this.cache[abs] + if (!c || c === 'FILE') + return cb() + + if (Array.isArray(c)) + return cb(null, c) + } + + var self = this + self.fs.readdir(abs, readdirCb(this, abs, cb)) +} + +function readdirCb (self, abs, cb) { + return function (er, entries) { + if (er) + self._readdirError(abs, er, cb) + else + self._readdirEntries(abs, entries, cb) + } +} + +Glob.prototype._readdirEntries = function (abs, entries, cb) { + if (this.aborted) + return + + // if we haven't asked to stat everything, then just + // assume that everything in there exists, so we can avoid + // having to stat it a second time. + if (!this.mark && !this.stat) { + for (var i = 0; i < entries.length; i ++) { + var e = entries[i] + if (abs === '/') + e = abs + e + else + e = abs + '/' + e + this.cache[e] = true + } + } + + this.cache[abs] = entries + return cb(null, entries) +} + +Glob.prototype._readdirError = function (f, er, cb) { + if (this.aborted) + return + + // handle errors, and cache the information + switch (er.code) { + case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 + case 'ENOTDIR': // totally normal. means it *does* exist. + var abs = this._makeAbs(f) + this.cache[abs] = 'FILE' + if (abs === this.cwdAbs) { + var error = new Error(er.code + ' invalid cwd ' + this.cwd) + error.path = this.cwd + error.code = er.code + this.emit('error', error) + this.abort() + } + break + + case 'ENOENT': // not terribly unusual + case 'ELOOP': + case 'ENAMETOOLONG': + case 'UNKNOWN': + this.cache[this._makeAbs(f)] = false + break + + default: // some unusual error. Treat as failure. + this.cache[this._makeAbs(f)] = false + if (this.strict) { + this.emit('error', er) + // If the error is handled, then we abort + // if not, we threw out of here + this.abort() + } + if (!this.silent) + console.error('glob error', er) + break + } + + return cb() +} + +Glob.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar, cb) { + var self = this + this._readdir(abs, inGlobStar, function (er, entries) { + self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb) + }) +} + + +Glob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { + //console.error('pgs2', prefix, remain[0], entries) + + // no entries means not a dir, so it can never have matches + // foo.txt/** doesn't match foo.txt + if (!entries) + return cb() + + // test without the globstar, and with every child both below + // and replacing the globstar. + var remainWithoutGlobStar = remain.slice(1) + var gspref = prefix ? [ prefix ] : [] + var noGlobStar = gspref.concat(remainWithoutGlobStar) + + // the noGlobStar pattern exits the inGlobStar state + this._process(noGlobStar, index, false, cb) + + var isSym = this.symlinks[abs] + var len = entries.length + + // If it's a symlink, and we're in a globstar, then stop + if (isSym && inGlobStar) + return cb() + + for (var i = 0; i < len; i++) { + var e = entries[i] + if (e.charAt(0) === '.' && !this.dot) + continue + + // these two cases enter the inGlobStar state + var instead = gspref.concat(entries[i], remainWithoutGlobStar) + this._process(instead, index, true, cb) + + var below = gspref.concat(entries[i], remain) + this._process(below, index, true, cb) + } + + cb() +} + +Glob.prototype._processSimple = function (prefix, index, cb) { + // XXX review this. Shouldn't it be doing the mounting etc + // before doing stat? kinda weird? + var self = this + this._stat(prefix, function (er, exists) { + self._processSimple2(prefix, index, er, exists, cb) + }) +} +Glob.prototype._processSimple2 = function (prefix, index, er, exists, cb) { + + //console.error('ps2', prefix, exists) + + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + // If it doesn't exist, then just mark the lack of results + if (!exists) + return cb() + + if (prefix && isAbsolute(prefix) && !this.nomount) { + var trail = /[\/\\]$/.test(prefix) + if (prefix.charAt(0) === '/') { + prefix = path.join(this.root, prefix) + } else { + prefix = path.resolve(this.root, prefix) + if (trail) + prefix += '/' + } + } + + if (process.platform === 'win32') + prefix = prefix.replace(/\\/g, '/') + + // Mark this as a match + this._emitMatch(index, prefix) + cb() +} + +// Returns either 'DIR', 'FILE', or false +Glob.prototype._stat = function (f, cb) { + var abs = this._makeAbs(f) + var needDir = f.slice(-1) === '/' + + if (f.length > this.maxLength) + return cb() + + if (!this.stat && ownProp(this.cache, abs)) { + var c = this.cache[abs] + + if (Array.isArray(c)) + c = 'DIR' + + // It exists, but maybe not how we need it + if (!needDir || c === 'DIR') + return cb(null, c) + + if (needDir && c === 'FILE') + return cb() + + // otherwise we have to stat, because maybe c=true + // if we know it exists, but not what it is. + } + + var exists + var stat = this.statCache[abs] + if (stat !== undefined) { + if (stat === false) + return cb(null, stat) + else { + var type = stat.isDirectory() ? 'DIR' : 'FILE' + if (needDir && type === 'FILE') + return cb() + else + return cb(null, type, stat) + } + } + + var self = this + var statcb = inflight('stat\0' + abs, lstatcb_) + if (statcb) + self.fs.lstat(abs, statcb) + + function lstatcb_ (er, lstat) { + if (lstat && lstat.isSymbolicLink()) { + // If it's a symlink, then treat it as the target, unless + // the target does not exist, then treat it as a file. + return self.fs.stat(abs, function (er, stat) { + if (er) + self._stat2(f, abs, null, lstat, cb) + else + self._stat2(f, abs, er, stat, cb) + }) + } else { + self._stat2(f, abs, er, lstat, cb) + } + } +} + +Glob.prototype._stat2 = function (f, abs, er, stat, cb) { + if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { + this.statCache[abs] = false + return cb() + } + + var needDir = f.slice(-1) === '/' + this.statCache[abs] = stat + + if (abs.slice(-1) === '/' && stat && !stat.isDirectory()) + return cb(null, false, stat) + + var c = true + if (stat) + c = stat.isDirectory() ? 'DIR' : 'FILE' + this.cache[abs] = this.cache[abs] || c + + if (needDir && c === 'FILE') + return cb() + + return cb(null, c, stat) +} + + +/***/ }), + +/***/ 9010: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +module.exports = globSync +globSync.GlobSync = GlobSync + +var rp = __nccwpck_require__(6863) +var minimatch = __nccwpck_require__(3973) +var Minimatch = minimatch.Minimatch +var Glob = (__nccwpck_require__(1957).Glob) +var util = __nccwpck_require__(3837) +var path = __nccwpck_require__(1017) +var assert = __nccwpck_require__(9491) +var isAbsolute = __nccwpck_require__(8714) +var common = __nccwpck_require__(7625) +var setopts = common.setopts +var ownProp = common.ownProp +var childrenIgnored = common.childrenIgnored +var isIgnored = common.isIgnored + +function globSync (pattern, options) { + if (typeof options === 'function' || arguments.length === 3) + throw new TypeError('callback provided to sync glob\n'+ + 'See: https://github.com/isaacs/node-glob/issues/167') + + return new GlobSync(pattern, options).found +} + +function GlobSync (pattern, options) { + if (!pattern) + throw new Error('must provide pattern') + + if (typeof options === 'function' || arguments.length === 3) + throw new TypeError('callback provided to sync glob\n'+ + 'See: https://github.com/isaacs/node-glob/issues/167') + + if (!(this instanceof GlobSync)) + return new GlobSync(pattern, options) + + setopts(this, pattern, options) + + if (this.noprocess) + return this + + var n = this.minimatch.set.length + this.matches = new Array(n) + for (var i = 0; i < n; i ++) { + this._process(this.minimatch.set[i], i, false) + } + this._finish() +} + +GlobSync.prototype._finish = function () { + assert.ok(this instanceof GlobSync) + if (this.realpath) { + var self = this + this.matches.forEach(function (matchset, index) { + var set = self.matches[index] = Object.create(null) + for (var p in matchset) { + try { + p = self._makeAbs(p) + var real = rp.realpathSync(p, self.realpathCache) + set[real] = true + } catch (er) { + if (er.syscall === 'stat') + set[self._makeAbs(p)] = true + else + throw er + } + } + }) + } + common.finish(this) +} + + +GlobSync.prototype._process = function (pattern, index, inGlobStar) { + assert.ok(this instanceof GlobSync) + + // Get the first [n] parts of pattern that are all strings. + var n = 0 + while (typeof pattern[n] === 'string') { + n ++ + } + // now n is the index of the first one that is *not* a string. + + // See if there's anything else + var prefix + switch (n) { + // if not, then this is rather simple + case pattern.length: + this._processSimple(pattern.join('/'), index) + return + + case 0: + // pattern *starts* with some non-trivial item. + // going to readdir(cwd), but not include the prefix in matches. + prefix = null + break + + default: + // pattern has some string bits in the front. + // whatever it starts with, whether that's 'absolute' like /foo/bar, + // or 'relative' like '../baz' + prefix = pattern.slice(0, n).join('/') + break + } + + var remain = pattern.slice(n) + + // get the list of entries. + var read + if (prefix === null) + read = '.' + else if (isAbsolute(prefix) || + isAbsolute(pattern.map(function (p) { + return typeof p === 'string' ? p : '[*]' + }).join('/'))) { + if (!prefix || !isAbsolute(prefix)) + prefix = '/' + prefix + read = prefix + } else + read = prefix + + var abs = this._makeAbs(read) + + //if ignored, skip processing + if (childrenIgnored(this, read)) + return + + var isGlobStar = remain[0] === minimatch.GLOBSTAR + if (isGlobStar) + this._processGlobStar(prefix, read, abs, remain, index, inGlobStar) + else + this._processReaddir(prefix, read, abs, remain, index, inGlobStar) +} + + +GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) { + var entries = this._readdir(abs, inGlobStar) + + // if the abs isn't a dir, then nothing can match! + if (!entries) + return + + // It will only match dot entries if it starts with a dot, or if + // dot is set. Stuff like @(.foo|.bar) isn't allowed. + var pn = remain[0] + var negate = !!this.minimatch.negate + var rawGlob = pn._glob + var dotOk = this.dot || rawGlob.charAt(0) === '.' + + var matchedEntries = [] + for (var i = 0; i < entries.length; i++) { + var e = entries[i] + if (e.charAt(0) !== '.' || dotOk) { + var m + if (negate && !prefix) { + m = !e.match(pn) + } else { + m = e.match(pn) + } + if (m) + matchedEntries.push(e) + } + } + + var len = matchedEntries.length + // If there are no matched entries, then nothing matches. + if (len === 0) + return + + // if this is the last remaining pattern bit, then no need for + // an additional stat *unless* the user has specified mark or + // stat explicitly. We know they exist, since readdir returned + // them. + + if (remain.length === 1 && !this.mark && !this.stat) { + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + if (prefix) { + if (prefix.slice(-1) !== '/') + e = prefix + '/' + e + else + e = prefix + e + } + + if (e.charAt(0) === '/' && !this.nomount) { + e = path.join(this.root, e) + } + this._emitMatch(index, e) + } + // This was the last one, and no stats were needed + return + } + + // now test all matched entries as stand-ins for that part + // of the pattern. + remain.shift() + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + var newPattern + if (prefix) + newPattern = [prefix, e] + else + newPattern = [e] + this._process(newPattern.concat(remain), index, inGlobStar) + } +} + + +GlobSync.prototype._emitMatch = function (index, e) { + if (isIgnored(this, e)) + return + + var abs = this._makeAbs(e) + + if (this.mark) + e = this._mark(e) + + if (this.absolute) { + e = abs + } + + if (this.matches[index][e]) + return + + if (this.nodir) { + var c = this.cache[abs] + if (c === 'DIR' || Array.isArray(c)) + return + } + + this.matches[index][e] = true + + if (this.stat) + this._stat(e) +} + + +GlobSync.prototype._readdirInGlobStar = function (abs) { + // follow all symlinked directories forever + // just proceed as if this is a non-globstar situation + if (this.follow) + return this._readdir(abs, false) + + var entries + var lstat + var stat + try { + lstat = this.fs.lstatSync(abs) + } catch (er) { + if (er.code === 'ENOENT') { + // lstat failed, doesn't exist + return null + } + } + + var isSym = lstat && lstat.isSymbolicLink() + this.symlinks[abs] = isSym + + // If it's not a symlink or a dir, then it's definitely a regular file. + // don't bother doing a readdir in that case. + if (!isSym && lstat && !lstat.isDirectory()) + this.cache[abs] = 'FILE' + else + entries = this._readdir(abs, false) + + return entries +} + +GlobSync.prototype._readdir = function (abs, inGlobStar) { + var entries + + if (inGlobStar && !ownProp(this.symlinks, abs)) + return this._readdirInGlobStar(abs) + + if (ownProp(this.cache, abs)) { + var c = this.cache[abs] + if (!c || c === 'FILE') + return null + + if (Array.isArray(c)) + return c + } + + try { + return this._readdirEntries(abs, this.fs.readdirSync(abs)) + } catch (er) { + this._readdirError(abs, er) + return null + } +} + +GlobSync.prototype._readdirEntries = function (abs, entries) { + // if we haven't asked to stat everything, then just + // assume that everything in there exists, so we can avoid + // having to stat it a second time. + if (!this.mark && !this.stat) { + for (var i = 0; i < entries.length; i ++) { + var e = entries[i] + if (abs === '/') + e = abs + e + else + e = abs + '/' + e + this.cache[e] = true + } + } + + this.cache[abs] = entries + + // mark and cache dir-ness + return entries +} + +GlobSync.prototype._readdirError = function (f, er) { + // handle errors, and cache the information + switch (er.code) { + case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 + case 'ENOTDIR': // totally normal. means it *does* exist. + var abs = this._makeAbs(f) + this.cache[abs] = 'FILE' + if (abs === this.cwdAbs) { + var error = new Error(er.code + ' invalid cwd ' + this.cwd) + error.path = this.cwd + error.code = er.code + throw error + } + break + + case 'ENOENT': // not terribly unusual + case 'ELOOP': + case 'ENAMETOOLONG': + case 'UNKNOWN': + this.cache[this._makeAbs(f)] = false + break + + default: // some unusual error. Treat as failure. + this.cache[this._makeAbs(f)] = false + if (this.strict) + throw er + if (!this.silent) + console.error('glob error', er) + break + } +} + +GlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) { + + var entries = this._readdir(abs, inGlobStar) + + // no entries means not a dir, so it can never have matches + // foo.txt/** doesn't match foo.txt + if (!entries) + return + + // test without the globstar, and with every child both below + // and replacing the globstar. + var remainWithoutGlobStar = remain.slice(1) + var gspref = prefix ? [ prefix ] : [] + var noGlobStar = gspref.concat(remainWithoutGlobStar) + + // the noGlobStar pattern exits the inGlobStar state + this._process(noGlobStar, index, false) + + var len = entries.length + var isSym = this.symlinks[abs] + + // If it's a symlink, and we're in a globstar, then stop + if (isSym && inGlobStar) + return + + for (var i = 0; i < len; i++) { + var e = entries[i] + if (e.charAt(0) === '.' && !this.dot) + continue + + // these two cases enter the inGlobStar state + var instead = gspref.concat(entries[i], remainWithoutGlobStar) + this._process(instead, index, true) + + var below = gspref.concat(entries[i], remain) + this._process(below, index, true) + } +} + +GlobSync.prototype._processSimple = function (prefix, index) { + // XXX review this. Shouldn't it be doing the mounting etc + // before doing stat? kinda weird? + var exists = this._stat(prefix) + + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + // If it doesn't exist, then just mark the lack of results + if (!exists) + return + + if (prefix && isAbsolute(prefix) && !this.nomount) { + var trail = /[\/\\]$/.test(prefix) + if (prefix.charAt(0) === '/') { + prefix = path.join(this.root, prefix) + } else { + prefix = path.resolve(this.root, prefix) + if (trail) + prefix += '/' + } + } + + if (process.platform === 'win32') + prefix = prefix.replace(/\\/g, '/') + + // Mark this as a match + this._emitMatch(index, prefix) +} + +// Returns either 'DIR', 'FILE', or false +GlobSync.prototype._stat = function (f) { + var abs = this._makeAbs(f) + var needDir = f.slice(-1) === '/' + + if (f.length > this.maxLength) + return false + + if (!this.stat && ownProp(this.cache, abs)) { + var c = this.cache[abs] + + if (Array.isArray(c)) + c = 'DIR' + + // It exists, but maybe not how we need it + if (!needDir || c === 'DIR') + return c + + if (needDir && c === 'FILE') + return false + + // otherwise we have to stat, because maybe c=true + // if we know it exists, but not what it is. + } + + var exists + var stat = this.statCache[abs] + if (!stat) { + var lstat + try { + lstat = this.fs.lstatSync(abs) + } catch (er) { + if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { + this.statCache[abs] = false + return false + } + } + + if (lstat && lstat.isSymbolicLink()) { + try { + stat = this.fs.statSync(abs) + } catch (er) { + stat = lstat + } + } else { + stat = lstat + } + } + + this.statCache[abs] = stat + + var c = true + if (stat) + c = stat.isDirectory() ? 'DIR' : 'FILE' + + this.cache[abs] = this.cache[abs] || c + + if (needDir && c === 'FILE') + return false + + return c +} + +GlobSync.prototype._mark = function (p) { + return common.mark(this, p) +} + +GlobSync.prototype._makeAbs = function (f) { + return common.makeAbs(this, f) +} + + +/***/ }), + +/***/ 2492: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var wrappy = __nccwpck_require__(2940) +var reqs = Object.create(null) +var once = __nccwpck_require__(1223) + +module.exports = wrappy(inflight) + +function inflight (key, cb) { + if (reqs[key]) { + reqs[key].push(cb) + return null + } else { + reqs[key] = [cb] + return makeres(key) + } +} + +function makeres (key) { + return once(function RES () { + var cbs = reqs[key] + var len = cbs.length + var args = slice(arguments) + + // XXX It's somewhat ambiguous whether a new callback added in this + // pass should be queued for later execution if something in the + // list of callbacks throws, or if it should just be discarded. + // However, it's such an edge case that it hardly matters, and either + // choice is likely as surprising as the other. + // As it happens, we do go ahead and schedule it for later execution. + try { + for (var i = 0; i < len; i++) { + cbs[i].apply(null, args) + } + } finally { + if (cbs.length > len) { + // added more in the interim. + // de-zalgo, just in case, but don't call again. + cbs.splice(0, len) + process.nextTick(function () { + RES.apply(null, args) + }) + } else { + delete reqs[key] + } + } + }) +} + +function slice (args) { + var length = args.length + var array = [] + + for (var i = 0; i < length; i++) array[i] = args[i] + return array +} + + +/***/ }), + +/***/ 4124: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +try { + var util = __nccwpck_require__(3837); + /* istanbul ignore next */ + if (typeof util.inherits !== 'function') throw ''; + module.exports = util.inherits; +} catch (e) { + /* istanbul ignore next */ + module.exports = __nccwpck_require__(8544); +} + + +/***/ }), + +/***/ 8544: +/***/ ((module) => { + +if (typeof Object.create === 'function') { + // implementation from standard node.js 'util' module + module.exports = function inherits(ctor, superCtor) { + if (superCtor) { + ctor.super_ = superCtor + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }) + } + }; +} else { + // old school shim for old browsers + module.exports = function inherits(ctor, superCtor) { + if (superCtor) { + ctor.super_ = superCtor + var TempCtor = function () {} + TempCtor.prototype = superCtor.prototype + ctor.prototype = new TempCtor() + ctor.prototype.constructor = ctor + } + } +} + + +/***/ }), + +/***/ 3973: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +module.exports = minimatch +minimatch.Minimatch = Minimatch + +var path = (function () { try { return __nccwpck_require__(1017) } catch (e) {}}()) || { + sep: '/' +} +minimatch.sep = path.sep + +var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} +var expand = __nccwpck_require__(3717) + +var plTypes = { + '!': { open: '(?:(?!(?:', close: '))[^/]*?)'}, + '?': { open: '(?:', close: ')?' }, + '+': { open: '(?:', close: ')+' }, + '*': { open: '(?:', close: ')*' }, + '@': { open: '(?:', close: ')' } +} + +// any single thing other than / +// don't need to escape / when using new RegExp() +var qmark = '[^/]' + +// * => any number of characters +var star = qmark + '*?' + +// ** when dots are allowed. Anything goes, except .. and . +// not (^ or / followed by one or two dots followed by $ or /), +// followed by anything, any number of times. +var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?' + +// not a ^ or / followed by a dot, +// followed by anything, any number of times. +var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?' + +// characters that need to be escaped in RegExp. +var reSpecials = charSet('().*{}+?[]^$\\!') + +// "abc" -> { a:true, b:true, c:true } +function charSet (s) { + return s.split('').reduce(function (set, c) { + set[c] = true + return set + }, {}) +} + +// normalizes slashes. +var slashSplit = /\/+/ + +minimatch.filter = filter +function filter (pattern, options) { + options = options || {} + return function (p, i, list) { + return minimatch(p, pattern, options) + } +} + +function ext (a, b) { + b = b || {} + var t = {} + Object.keys(a).forEach(function (k) { + t[k] = a[k] + }) + Object.keys(b).forEach(function (k) { + t[k] = b[k] + }) + return t +} + +minimatch.defaults = function (def) { + if (!def || typeof def !== 'object' || !Object.keys(def).length) { + return minimatch + } + + var orig = minimatch + + var m = function minimatch (p, pattern, options) { + return orig(p, pattern, ext(def, options)) + } + + m.Minimatch = function Minimatch (pattern, options) { + return new orig.Minimatch(pattern, ext(def, options)) + } + m.Minimatch.defaults = function defaults (options) { + return orig.defaults(ext(def, options)).Minimatch + } + + m.filter = function filter (pattern, options) { + return orig.filter(pattern, ext(def, options)) + } + + m.defaults = function defaults (options) { + return orig.defaults(ext(def, options)) + } + + m.makeRe = function makeRe (pattern, options) { + return orig.makeRe(pattern, ext(def, options)) + } + + m.braceExpand = function braceExpand (pattern, options) { + return orig.braceExpand(pattern, ext(def, options)) + } + + m.match = function (list, pattern, options) { + return orig.match(list, pattern, ext(def, options)) + } + + return m +} + +Minimatch.defaults = function (def) { + return minimatch.defaults(def).Minimatch +} + +function minimatch (p, pattern, options) { + assertValidPattern(pattern) + + if (!options) options = {} + + // shortcut: comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + return false + } + + return new Minimatch(pattern, options).match(p) +} + +function Minimatch (pattern, options) { + if (!(this instanceof Minimatch)) { + return new Minimatch(pattern, options) + } + + assertValidPattern(pattern) + + if (!options) options = {} + + pattern = pattern.trim() + + // windows support: need to use /, not \ + if (!options.allowWindowsEscape && path.sep !== '/') { + pattern = pattern.split(path.sep).join('/') + } + + this.options = options + this.set = [] + this.pattern = pattern + this.regexp = null + this.negate = false + this.comment = false + this.empty = false + this.partial = !!options.partial + + // make the set of regexps etc. + this.make() +} + +Minimatch.prototype.debug = function () {} + +Minimatch.prototype.make = make +function make () { + var pattern = this.pattern + var options = this.options + + // empty patterns and comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + this.comment = true + return + } + if (!pattern) { + this.empty = true + return + } + + // step 1: figure out negation, etc. + this.parseNegate() + + // step 2: expand braces + var set = this.globSet = this.braceExpand() + + if (options.debug) this.debug = function debug() { console.error.apply(console, arguments) } + + this.debug(this.pattern, set) + + // step 3: now we have a set, so turn each one into a series of path-portion + // matching patterns. + // These will be regexps, except in the case of "**", which is + // set to the GLOBSTAR object for globstar behavior, + // and will not contain any / characters + set = this.globParts = set.map(function (s) { + return s.split(slashSplit) + }) + + this.debug(this.pattern, set) + + // glob --> regexps + set = set.map(function (s, si, set) { + return s.map(this.parse, this) + }, this) + + this.debug(this.pattern, set) + + // filter out everything that didn't compile properly. + set = set.filter(function (s) { + return s.indexOf(false) === -1 + }) + + this.debug(this.pattern, set) + + this.set = set +} + +Minimatch.prototype.parseNegate = parseNegate +function parseNegate () { + var pattern = this.pattern + var negate = false + var options = this.options + var negateOffset = 0 + + if (options.nonegate) return + + for (var i = 0, l = pattern.length + ; i < l && pattern.charAt(i) === '!' + ; i++) { + negate = !negate + negateOffset++ + } + + if (negateOffset) this.pattern = pattern.substr(negateOffset) + this.negate = negate +} + +// Brace expansion: +// a{b,c}d -> abd acd +// a{b,}c -> abc ac +// a{0..3}d -> a0d a1d a2d a3d +// a{b,c{d,e}f}g -> abg acdfg acefg +// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg +// +// Invalid sets are not expanded. +// a{2..}b -> a{2..}b +// a{b}c -> a{b}c +minimatch.braceExpand = function (pattern, options) { + return braceExpand(pattern, options) +} + +Minimatch.prototype.braceExpand = braceExpand + +function braceExpand (pattern, options) { + if (!options) { + if (this instanceof Minimatch) { + options = this.options + } else { + options = {} + } + } + + pattern = typeof pattern === 'undefined' + ? this.pattern : pattern + + assertValidPattern(pattern) + + // Thanks to Yeting Li for + // improving this regexp to avoid a ReDOS vulnerability. + if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { + // shortcut. no need to expand. + return [pattern] + } + + return expand(pattern) +} + +var MAX_PATTERN_LENGTH = 1024 * 64 +var assertValidPattern = function (pattern) { + if (typeof pattern !== 'string') { + throw new TypeError('invalid pattern') + } + + if (pattern.length > MAX_PATTERN_LENGTH) { + throw new TypeError('pattern is too long') + } +} + +// parse a component of the expanded set. +// At this point, no pattern may contain "/" in it +// so we're going to return a 2d array, where each entry is the full +// pattern, split on '/', and then turned into a regular expression. +// A regexp is made at the end which joins each array with an +// escaped /, and another full one which joins each regexp with |. +// +// Following the lead of Bash 4.1, note that "**" only has special meaning +// when it is the *only* thing in a path portion. Otherwise, any series +// of * is equivalent to a single *. Globstar behavior is enabled by +// default, and can be disabled by setting options.noglobstar. +Minimatch.prototype.parse = parse +var SUBPARSE = {} +function parse (pattern, isSub) { + assertValidPattern(pattern) + + var options = this.options + + // shortcuts + if (pattern === '**') { + if (!options.noglobstar) + return GLOBSTAR + else + pattern = '*' + } + if (pattern === '') return '' + + var re = '' + var hasMagic = !!options.nocase + var escaping = false + // ? => one single character + var patternListStack = [] + var negativeLists = [] + var stateChar + var inClass = false + var reClassStart = -1 + var classStart = -1 + // . and .. never match anything that doesn't start with ., + // even when options.dot is set. + var patternStart = pattern.charAt(0) === '.' ? '' // anything + // not (start or / followed by . or .. followed by / or end) + : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' + : '(?!\\.)' + var self = this + + function clearStateChar () { + if (stateChar) { + // we had some state-tracking character + // that wasn't consumed by this pass. + switch (stateChar) { + case '*': + re += star + hasMagic = true + break + case '?': + re += qmark + hasMagic = true + break + default: + re += '\\' + stateChar + break + } + self.debug('clearStateChar %j %j', stateChar, re) + stateChar = false + } + } + + for (var i = 0, len = pattern.length, c + ; (i < len) && (c = pattern.charAt(i)) + ; i++) { + this.debug('%s\t%s %s %j', pattern, i, re, c) + + // skip over any that are escaped. + if (escaping && reSpecials[c]) { + re += '\\' + c + escaping = false + continue + } + + switch (c) { + /* istanbul ignore next */ + case '/': { + // completely not allowed, even escaped. + // Should already be path-split by now. + return false + } + + case '\\': + clearStateChar() + escaping = true + continue + + // the various stateChar values + // for the "extglob" stuff. + case '?': + case '*': + case '+': + case '@': + case '!': + this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) + + // all of those are literals inside a class, except that + // the glob [!a] means [^a] in regexp + if (inClass) { + this.debug(' in class') + if (c === '!' && i === classStart + 1) c = '^' + re += c + continue + } + + // if we already have a stateChar, then it means + // that there was something like ** or +? in there. + // Handle the stateChar, then proceed with this one. + self.debug('call clearStateChar %j', stateChar) + clearStateChar() + stateChar = c + // if extglob is disabled, then +(asdf|foo) isn't a thing. + // just clear the statechar *now*, rather than even diving into + // the patternList stuff. + if (options.noext) clearStateChar() + continue + + case '(': + if (inClass) { + re += '(' + continue + } + + if (!stateChar) { + re += '\\(' + continue + } + + patternListStack.push({ + type: stateChar, + start: i - 1, + reStart: re.length, + open: plTypes[stateChar].open, + close: plTypes[stateChar].close + }) + // negation is (?:(?!js)[^/]*) + re += stateChar === '!' ? '(?:(?!(?:' : '(?:' + this.debug('plType %j %j', stateChar, re) + stateChar = false + continue + + case ')': + if (inClass || !patternListStack.length) { + re += '\\)' + continue + } + + clearStateChar() + hasMagic = true + var pl = patternListStack.pop() + // negation is (?:(?!js)[^/]*) + // The others are (?:) + re += pl.close + if (pl.type === '!') { + negativeLists.push(pl) + } + pl.reEnd = re.length + continue + + case '|': + if (inClass || !patternListStack.length || escaping) { + re += '\\|' + escaping = false + continue + } + + clearStateChar() + re += '|' + continue + + // these are mostly the same in regexp and glob + case '[': + // swallow any state-tracking char before the [ + clearStateChar() + + if (inClass) { + re += '\\' + c + continue + } + + inClass = true + classStart = i + reClassStart = re.length + re += c + continue + + case ']': + // a right bracket shall lose its special + // meaning and represent itself in + // a bracket expression if it occurs + // first in the list. -- POSIX.2 2.8.3.2 + if (i === classStart + 1 || !inClass) { + re += '\\' + c + escaping = false + continue + } + + // handle the case where we left a class open. + // "[z-a]" is valid, equivalent to "\[z-a\]" + // split where the last [ was, make sure we don't have + // an invalid re. if so, re-walk the contents of the + // would-be class to re-translate any characters that + // were passed through as-is + // TODO: It would probably be faster to determine this + // without a try/catch and a new RegExp, but it's tricky + // to do safely. For now, this is safe and works. + var cs = pattern.substring(classStart + 1, i) + try { + RegExp('[' + cs + ']') + } catch (er) { + // not a valid class! + var sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' + hasMagic = hasMagic || sp[1] + inClass = false + continue + } + + // finish up the class. + hasMagic = true + inClass = false + re += c + continue + + default: + // swallow any state char that wasn't consumed + clearStateChar() + + if (escaping) { + // no need + escaping = false + } else if (reSpecials[c] + && !(c === '^' && inClass)) { + re += '\\' + } + + re += c + + } // switch + } // for + + // handle the case where we left a class open. + // "[abc" is valid, equivalent to "\[abc" + if (inClass) { + // split where the last [ was, and escape it + // this is a huge pita. We now have to re-walk + // the contents of the would-be class to re-translate + // any characters that were passed through as-is + cs = pattern.substr(classStart + 1) + sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + hasMagic = hasMagic || sp[1] + } + + // handle the case where we had a +( thing at the *end* + // of the pattern. + // each pattern list stack adds 3 chars, and we need to go through + // and escape any | chars that were passed through as-is for the regexp. + // Go through and escape them, taking care not to double-escape any + // | chars that were already escaped. + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + var tail = re.slice(pl.reStart + pl.open.length) + this.debug('setting tail', re, pl) + // maybe some even number of \, then maybe 1 \, followed by a | + tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) { + if (!$2) { + // the | isn't already escaped, so escape it. + $2 = '\\' + } + + // need to escape all those slashes *again*, without escaping the + // one that we need for escaping the | character. As it works out, + // escaping an even number of slashes can be done by simply repeating + // it exactly after itself. That's why this trick works. + // + // I am sorry that you have to see this. + return $1 + $1 + $2 + '|' + }) + + this.debug('tail=%j\n %s', tail, tail, pl, re) + var t = pl.type === '*' ? star + : pl.type === '?' ? qmark + : '\\' + pl.type + + hasMagic = true + re = re.slice(0, pl.reStart) + t + '\\(' + tail + } + + // handle trailing things that only matter at the very end. + clearStateChar() + if (escaping) { + // trailing \\ + re += '\\\\' + } + + // only need to apply the nodot start if the re starts with + // something that could conceivably capture a dot + var addPatternStart = false + switch (re.charAt(0)) { + case '[': case '.': case '(': addPatternStart = true + } + + // Hack to work around lack of negative lookbehind in JS + // A pattern like: *.!(x).!(y|z) needs to ensure that a name + // like 'a.xyz.yz' doesn't match. So, the first negative + // lookahead, has to look ALL the way ahead, to the end of + // the pattern. + for (var n = negativeLists.length - 1; n > -1; n--) { + var nl = negativeLists[n] + + var nlBefore = re.slice(0, nl.reStart) + var nlFirst = re.slice(nl.reStart, nl.reEnd - 8) + var nlLast = re.slice(nl.reEnd - 8, nl.reEnd) + var nlAfter = re.slice(nl.reEnd) + + nlLast += nlAfter + + // Handle nested stuff like *(*.js|!(*.json)), where open parens + // mean that we should *not* include the ) in the bit that is considered + // "after" the negated section. + var openParensBefore = nlBefore.split('(').length - 1 + var cleanAfter = nlAfter + for (i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') + } + nlAfter = cleanAfter + + var dollar = '' + if (nlAfter === '' && isSub !== SUBPARSE) { + dollar = '$' + } + var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast + re = newRe + } + + // if the re is not "" at this point, then we need to make sure + // it doesn't match against an empty path part. + // Otherwise a/* will match a/, which it should not. + if (re !== '' && hasMagic) { + re = '(?=.)' + re + } + + if (addPatternStart) { + re = patternStart + re + } + + // parsing just a piece of a larger pattern. + if (isSub === SUBPARSE) { + return [re, hasMagic] + } + + // skip the regexp for non-magical patterns + // unescape anything in it, though, so that it'll be + // an exact match against a file etc. + if (!hasMagic) { + return globUnescape(pattern) + } + + var flags = options.nocase ? 'i' : '' + try { + var regExp = new RegExp('^' + re + '$', flags) + } catch (er) /* istanbul ignore next - should be impossible */ { + // If it was an invalid regular expression, then it can't match + // anything. This trick looks for a character after the end of + // the string, which is of course impossible, except in multi-line + // mode, but it's not a /m regex. + return new RegExp('$.') + } + + regExp._glob = pattern + regExp._src = re + + return regExp +} + +minimatch.makeRe = function (pattern, options) { + return new Minimatch(pattern, options || {}).makeRe() +} + +Minimatch.prototype.makeRe = makeRe +function makeRe () { + if (this.regexp || this.regexp === false) return this.regexp + + // at this point, this.set is a 2d array of partial + // pattern strings, or "**". + // + // It's better to use .match(). This function shouldn't + // be used, really, but it's pretty convenient sometimes, + // when you just want to work with a regex. + var set = this.set + + if (!set.length) { + this.regexp = false + return this.regexp + } + var options = this.options + + var twoStar = options.noglobstar ? star + : options.dot ? twoStarDot + : twoStarNoDot + var flags = options.nocase ? 'i' : '' + + var re = set.map(function (pattern) { + return pattern.map(function (p) { + return (p === GLOBSTAR) ? twoStar + : (typeof p === 'string') ? regExpEscape(p) + : p._src + }).join('\\\/') + }).join('|') + + // must match entire pattern + // ending in a * or ** will make it less strict. + re = '^(?:' + re + ')$' + + // can match anything, as long as it's not this. + if (this.negate) re = '^(?!' + re + ').*$' + + try { + this.regexp = new RegExp(re, flags) + } catch (ex) /* istanbul ignore next - should be impossible */ { + this.regexp = false + } + return this.regexp +} + +minimatch.match = function (list, pattern, options) { + options = options || {} + var mm = new Minimatch(pattern, options) + list = list.filter(function (f) { + return mm.match(f) + }) + if (mm.options.nonull && !list.length) { + list.push(pattern) + } + return list +} + +Minimatch.prototype.match = function match (f, partial) { + if (typeof partial === 'undefined') partial = this.partial + this.debug('match', f, this.pattern) + // short-circuit in the case of busted things. + // comments, etc. + if (this.comment) return false + if (this.empty) return f === '' + + if (f === '/' && partial) return true + + var options = this.options + + // windows: need to use /, not \ + if (path.sep !== '/') { + f = f.split(path.sep).join('/') + } + + // treat the test path as a set of pathparts. + f = f.split(slashSplit) + this.debug(this.pattern, 'split', f) + + // just ONE of the pattern sets in this.set needs to match + // in order for it to be valid. If negating, then just one + // match means that we have failed. + // Either way, return on the first hit. + + var set = this.set + this.debug(this.pattern, 'set', set) + + // Find the basename of the path by looking for the last non-empty segment + var filename + var i + for (i = f.length - 1; i >= 0; i--) { + filename = f[i] + if (filename) break + } + + for (i = 0; i < set.length; i++) { + var pattern = set[i] + var file = f + if (options.matchBase && pattern.length === 1) { + file = [filename] + } + var hit = this.matchOne(file, pattern, partial) + if (hit) { + if (options.flipNegate) return true + return !this.negate + } + } + + // didn't get any hits. this is success if it's a negative + // pattern, failure otherwise. + if (options.flipNegate) return false + return this.negate +} + +// set partial to true to test if, for example, +// "/a/b" matches the start of "/*/b/*/d" +// Partial means, if you run out of file before you run +// out of pattern, then that's fine, as long as all +// the parts match. +Minimatch.prototype.matchOne = function (file, pattern, partial) { + var options = this.options + + this.debug('matchOne', + { 'this': this, file: file, pattern: pattern }) + + this.debug('matchOne', file.length, pattern.length) + + for (var fi = 0, + pi = 0, + fl = file.length, + pl = pattern.length + ; (fi < fl) && (pi < pl) + ; fi++, pi++) { + this.debug('matchOne loop') + var p = pattern[pi] + var f = file[fi] + + this.debug(pattern, p, f) + + // should be impossible. + // some invalid regexp stuff in the set. + /* istanbul ignore if */ + if (p === false) return false + + if (p === GLOBSTAR) { + this.debug('GLOBSTAR', [pattern, p, f]) + + // "**" + // a/**/b/**/c would match the following: + // a/b/x/y/z/c + // a/x/y/z/b/c + // a/b/x/b/x/c + // a/b/c + // To do this, take the rest of the pattern after + // the **, and see if it would match the file remainder. + // If so, return success. + // If not, the ** "swallows" a segment, and try again. + // This is recursively awful. + // + // a/**/b/**/c matching a/b/x/y/z/c + // - a matches a + // - doublestar + // - matchOne(b/x/y/z/c, b/**/c) + // - b matches b + // - doublestar + // - matchOne(x/y/z/c, c) -> no + // - matchOne(y/z/c, c) -> no + // - matchOne(z/c, c) -> no + // - matchOne(c, c) yes, hit + var fr = fi + var pr = pi + 1 + if (pr === pl) { + this.debug('** at the end') + // a ** at the end will just swallow the rest. + // We have found a match. + // however, it will not swallow /.x, unless + // options.dot is set. + // . and .. are *never* matched by **, for explosively + // exponential reasons. + for (; fi < fl; fi++) { + if (file[fi] === '.' || file[fi] === '..' || + (!options.dot && file[fi].charAt(0) === '.')) return false + } + return true + } + + // ok, let's see if we can swallow whatever we can. + while (fr < fl) { + var swallowee = file[fr] + + this.debug('\nglobstar while', file, fr, pattern, pr, swallowee) + + // XXX remove this slice. Just pass the start index. + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + this.debug('globstar found match!', fr, fl, swallowee) + // found a match. + return true + } else { + // can't swallow "." or ".." ever. + // can only swallow ".foo" when explicitly asked. + if (swallowee === '.' || swallowee === '..' || + (!options.dot && swallowee.charAt(0) === '.')) { + this.debug('dot detected!', file, fr, pattern, pr) + break + } + + // ** swallows a segment, and continue. + this.debug('globstar swallow a segment, and continue') + fr++ + } + } + + // no match was found. + // However, in partial mode, we can't say this is necessarily over. + // If there's more *pattern* left, then + /* istanbul ignore if */ + if (partial) { + // ran out of file + this.debug('\n>>> no match, partial?', file, fr, pattern, pr) + if (fr === fl) return true + } + return false + } + + // something other than ** + // non-magic patterns just have to match exactly + // patterns with magic have been turned into regexps. + var hit + if (typeof p === 'string') { + hit = f === p + this.debug('string match', p, f, hit) + } else { + hit = f.match(p) + this.debug('pattern match', p, f, hit) + } + + if (!hit) return false + } + + // Note: ending in / means that we'll get a final "" + // at the end of the pattern. This can only match a + // corresponding "" at the end of the file. + // If the file ends in /, then it can only match a + // a pattern that ends in /, unless the pattern just + // doesn't have any more for it. But, a/b/ should *not* + // match "a/b/*", even though "" matches against the + // [^/]*? pattern, except in partial mode, where it might + // simply not be reached yet. + // However, a/b/ should still satisfy a/* + + // now either we fell off the end of the pattern, or we're done. + if (fi === fl && pi === pl) { + // ran out of pattern and filename at the same time. + // an exact hit! + return true + } else if (fi === fl) { + // ran out of file, but still had pattern left. + // this is ok if we're doing the match as part of + // a glob fs traversal. + return partial + } else /* istanbul ignore else */ if (pi === pl) { + // ran out of pattern, still have file left. + // this is only acceptable if we're on the very last + // empty segment of a file with a trailing slash. + // a/* should match a/b/ + return (fi === fl - 1) && (file[fi] === '') + } + + // should be unreachable. + /* istanbul ignore next */ + throw new Error('wtf?') +} + +// replace stuff like \* with * +function globUnescape (s) { + return s.replace(/\\(.)/g, '$1') +} + +function regExpEscape (s) { + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') +} + + +/***/ }), + +/***/ 7760: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/*! node-domexception. MIT License. Jimmy Wärting */ + +if (!globalThis.DOMException) { + try { + const { MessageChannel } = __nccwpck_require__(1267), + port = new MessageChannel().port1, + ab = new ArrayBuffer() + port.postMessage(ab, [ab, ab]) + } catch (err) { + err.constructor.name === 'DOMException' && ( + globalThis.DOMException = err.constructor + ) + } +} + +module.exports = globalThis.DOMException + + +/***/ }), + +/***/ 1223: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var wrappy = __nccwpck_require__(2940) +module.exports = wrappy(once) +module.exports.strict = wrappy(onceStrict) + +once.proto = once(function () { + Object.defineProperty(Function.prototype, 'once', { + value: function () { + return once(this) + }, + configurable: true + }) + + Object.defineProperty(Function.prototype, 'onceStrict', { + value: function () { + return onceStrict(this) + }, + configurable: true + }) +}) + +function once (fn) { + var f = function () { + if (f.called) return f.value + f.called = true + return f.value = fn.apply(this, arguments) + } + f.called = false + return f +} + +function onceStrict (fn) { + var f = function () { + if (f.called) + throw new Error(f.onceError) + f.called = true + return f.value = fn.apply(this, arguments) + } + var name = fn.name || 'Function wrapped with `once`' + f.onceError = name + " shouldn't be called more than once" + f.called = false + return f +} + + +/***/ }), + +/***/ 8714: +/***/ ((module) => { + +"use strict"; + + +function posix(path) { + return path.charAt(0) === '/'; +} + +function win32(path) { + // https://github.com/nodejs/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56 + var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; + var result = splitDeviceRe.exec(path); + var device = result[1] || ''; + var isUnc = Boolean(device && device.charAt(1) !== ':'); + + // UNC paths are always absolute + return Boolean(result[2] || isUnc); +} + +module.exports = process.platform === 'win32' ? win32 : posix; +module.exports.posix = posix; +module.exports.win32 = win32; + + +/***/ }), + +/***/ 5123: +/***/ ((module) => { + +module.exports = [ + 'cat', + 'cd', + 'chmod', + 'cp', + 'dirs', + 'echo', + 'exec', + 'find', + 'grep', + 'head', + 'ln', + 'ls', + 'mkdir', + 'mv', + 'pwd', + 'rm', + 'sed', + 'set', + 'sort', + 'tail', + 'tempdir', + 'test', + 'to', + 'toEnd', + 'touch', + 'uniq', + 'which', +]; + + +/***/ }), + +/***/ 3516: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +// +// ShellJS +// Unix shell commands on top of Node's API +// +// Copyright (c) 2012 Artur Adib +// http://github.com/shelljs/shelljs +// + +function __ncc_wildcard$0 (arg) { + if (arg === "cat.js" || arg === "cat") return __nccwpck_require__(271); + else if (arg === "cd.js" || arg === "cd") return __nccwpck_require__(2051); + else if (arg === "chmod.js" || arg === "chmod") return __nccwpck_require__(4975); + else if (arg === "common.js" || arg === "common") return __nccwpck_require__(3687); + else if (arg === "cp.js" || arg === "cp") return __nccwpck_require__(4932); + else if (arg === "dirs.js" || arg === "dirs") return __nccwpck_require__(1178); + else if (arg === "echo.js" || arg === "echo") return __nccwpck_require__(243); + else if (arg === "error.js" || arg === "error") return __nccwpck_require__(232); + else if (arg === "exec-child.js" || arg === "exec-child") return __nccwpck_require__(9607); + else if (arg === "exec.js" || arg === "exec") return __nccwpck_require__(896); + else if (arg === "find.js" || arg === "find") return __nccwpck_require__(7838); + else if (arg === "grep.js" || arg === "grep") return __nccwpck_require__(7417); + else if (arg === "head.js" || arg === "head") return __nccwpck_require__(6613); + else if (arg === "ln.js" || arg === "ln") return __nccwpck_require__(5787); + else if (arg === "ls.js" || arg === "ls") return __nccwpck_require__(5561); + else if (arg === "mkdir.js" || arg === "mkdir") return __nccwpck_require__(2695); + else if (arg === "mv.js" || arg === "mv") return __nccwpck_require__(9849); + else if (arg === "popd.js" || arg === "popd") return __nccwpck_require__(227); + else if (arg === "pushd.js" || arg === "pushd") return __nccwpck_require__(4177); + else if (arg === "pwd.js" || arg === "pwd") return __nccwpck_require__(8553); + else if (arg === "rm.js" || arg === "rm") return __nccwpck_require__(2830); + else if (arg === "sed.js" || arg === "sed") return __nccwpck_require__(5899); + else if (arg === "set.js" || arg === "set") return __nccwpck_require__(1411); + else if (arg === "sort.js" || arg === "sort") return __nccwpck_require__(2116); + else if (arg === "tail.js" || arg === "tail") return __nccwpck_require__(2284); + else if (arg === "tempdir.js" || arg === "tempdir") return __nccwpck_require__(6150); + else if (arg === "test.js" || arg === "test") return __nccwpck_require__(9723); + else if (arg === "to.js" || arg === "to") return __nccwpck_require__(1961); + else if (arg === "toEnd.js" || arg === "toEnd") return __nccwpck_require__(3736); + else if (arg === "touch.js" || arg === "touch") return __nccwpck_require__(8358); + else if (arg === "uniq.js" || arg === "uniq") return __nccwpck_require__(7286); + else if (arg === "which.js" || arg === "which") return __nccwpck_require__(4766); +} +var common = __nccwpck_require__(3687); + +//@ +//@ All commands run synchronously, unless otherwise stated. +//@ All commands accept standard bash globbing characters (`*`, `?`, etc.), +//@ compatible with the [node `glob` module](https://github.com/isaacs/node-glob). +//@ +//@ For less-commonly used commands and features, please check out our [wiki +//@ page](https://github.com/shelljs/shelljs/wiki). +//@ + +// Include the docs for all the default commands +//@commands + +// Load all default commands +(__nccwpck_require__(5123).forEach)(function (command) { + __ncc_wildcard$0(command); +}); + +//@ +//@ ### exit(code) +//@ +//@ Exits the current process with the given exit `code`. +exports.exit = process.exit; + +//@include ./src/error +exports.error = __nccwpck_require__(232); + +//@include ./src/common +exports.ShellString = common.ShellString; + +//@ +//@ ### env['VAR_NAME'] +//@ +//@ Object containing environment variables (both getter and setter). Shortcut +//@ to `process.env`. +exports.env = process.env; + +//@ +//@ ### Pipes +//@ +//@ Examples: +//@ +//@ ```javascript +//@ grep('foo', 'file1.txt', 'file2.txt').sed(/o/g, 'a').to('output.txt'); +//@ echo('files with o\'s in the name:\n' + ls().grep('o')); +//@ cat('test.js').exec('node'); // pipe to exec() call +//@ ``` +//@ +//@ Commands can send their output to another command in a pipe-like fashion. +//@ `sed`, `grep`, `cat`, `exec`, `to`, and `toEnd` can appear on the right-hand +//@ side of a pipe. Pipes can be chained. + +//@ +//@ ## Configuration +//@ + +exports.config = common.config; + +//@ +//@ ### config.silent +//@ +//@ Example: +//@ +//@ ```javascript +//@ var sh = require('shelljs'); +//@ var silentState = sh.config.silent; // save old silent state +//@ sh.config.silent = true; +//@ /* ... */ +//@ sh.config.silent = silentState; // restore old silent state +//@ ``` +//@ +//@ Suppresses all command output if `true`, except for `echo()` calls. +//@ Default is `false`. + +//@ +//@ ### config.fatal +//@ +//@ Example: +//@ +//@ ```javascript +//@ require('shelljs/global'); +//@ config.fatal = true; // or set('-e'); +//@ cp('this_file_does_not_exist', '/dev/null'); // throws Error here +//@ /* more commands... */ +//@ ``` +//@ +//@ If `true`, the script will throw a Javascript error when any shell.js +//@ command encounters an error. Default is `false`. This is analogous to +//@ Bash's `set -e`. + +//@ +//@ ### config.verbose +//@ +//@ Example: +//@ +//@ ```javascript +//@ config.verbose = true; // or set('-v'); +//@ cd('dir/'); +//@ rm('-rf', 'foo.txt', 'bar.txt'); +//@ exec('echo hello'); +//@ ``` +//@ +//@ Will print each command as follows: +//@ +//@ ``` +//@ cd dir/ +//@ rm -rf foo.txt bar.txt +//@ exec echo hello +//@ ``` + +//@ +//@ ### config.globOptions +//@ +//@ Example: +//@ +//@ ```javascript +//@ config.globOptions = {nodir: true}; +//@ ``` +//@ +//@ Use this value for calls to `glob.sync()` instead of the default options. + +//@ +//@ ### config.reset() +//@ +//@ Example: +//@ +//@ ```javascript +//@ var shell = require('shelljs'); +//@ // Make changes to shell.config, and do stuff... +//@ /* ... */ +//@ shell.config.reset(); // reset to original state +//@ // Do more stuff, but with original settings +//@ /* ... */ +//@ ``` +//@ +//@ Reset `shell.config` to the defaults: +//@ +//@ ```javascript +//@ { +//@ fatal: false, +//@ globOptions: {}, +//@ maxdepth: 255, +//@ noglob: false, +//@ silent: false, +//@ verbose: false, +//@ } +//@ ``` + + +/***/ }), + +/***/ 271: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var common = __nccwpck_require__(3687); +var fs = __nccwpck_require__(7147); + +common.register('cat', _cat, { + canReceivePipe: true, + cmdOptions: { + 'n': 'number', + }, +}); + +//@ +//@ ### cat([options,] file [, file ...]) +//@ ### cat([options,] file_array) +//@ +//@ Available options: +//@ +//@ + `-n`: number all output lines +//@ +//@ Examples: +//@ +//@ ```javascript +//@ var str = cat('file*.txt'); +//@ var str = cat('file1', 'file2'); +//@ var str = cat(['file1', 'file2']); // same as above +//@ ``` +//@ +//@ Returns a string containing the given file, or a concatenated string +//@ containing the files if more than one file is given (a new line character is +//@ introduced between each file). +function _cat(options, files) { + var cat = common.readFromPipe(); + + if (!files && !cat) common.error('no paths given'); + + files = [].slice.call(arguments, 1); + + files.forEach(function (file) { + if (!fs.existsSync(file)) { + common.error('no such file or directory: ' + file); + } else if (common.statFollowLinks(file).isDirectory()) { + common.error(file + ': Is a directory'); + } + + cat += fs.readFileSync(file, 'utf8'); + }); + + if (options.number) { + cat = addNumbers(cat); + } + + return cat; +} +module.exports = _cat; + +function addNumbers(cat) { + var lines = cat.split('\n'); + var lastLine = lines.pop(); + + lines = lines.map(function (line, i) { + return numberedLine(i + 1, line); + }); + + if (lastLine.length) { + lastLine = numberedLine(lines.length + 1, lastLine); + } + lines.push(lastLine); + + return lines.join('\n'); +} + +function numberedLine(n, line) { + // GNU cat use six pad start number + tab. See http://lingrok.org/xref/coreutils/src/cat.c#57 + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padStart + var number = (' ' + n).slice(-6) + '\t'; + return number + line; +} + + +/***/ }), + +/***/ 2051: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var os = __nccwpck_require__(2037); +var common = __nccwpck_require__(3687); + +common.register('cd', _cd, {}); + +//@ +//@ ### cd([dir]) +//@ +//@ Changes to directory `dir` for the duration of the script. Changes to home +//@ directory if no argument is supplied. +function _cd(options, dir) { + if (!dir) dir = os.homedir(); + + if (dir === '-') { + if (!process.env.OLDPWD) { + common.error('could not find previous directory'); + } else { + dir = process.env.OLDPWD; + } + } + + try { + var curDir = process.cwd(); + process.chdir(dir); + process.env.OLDPWD = curDir; + } catch (e) { + // something went wrong, let's figure out the error + var err; + try { + common.statFollowLinks(dir); // if this succeeds, it must be some sort of file + err = 'not a directory: ' + dir; + } catch (e2) { + err = 'no such file or directory: ' + dir; + } + if (err) common.error(err); + } + return ''; +} +module.exports = _cd; + + +/***/ }), + +/***/ 4975: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var common = __nccwpck_require__(3687); +var fs = __nccwpck_require__(7147); +var path = __nccwpck_require__(1017); + +var PERMS = (function (base) { + return { + OTHER_EXEC: base.EXEC, + OTHER_WRITE: base.WRITE, + OTHER_READ: base.READ, + + GROUP_EXEC: base.EXEC << 3, + GROUP_WRITE: base.WRITE << 3, + GROUP_READ: base.READ << 3, + + OWNER_EXEC: base.EXEC << 6, + OWNER_WRITE: base.WRITE << 6, + OWNER_READ: base.READ << 6, + + // Literal octal numbers are apparently not allowed in "strict" javascript. + STICKY: parseInt('01000', 8), + SETGID: parseInt('02000', 8), + SETUID: parseInt('04000', 8), + + TYPE_MASK: parseInt('0770000', 8), + }; +}({ + EXEC: 1, + WRITE: 2, + READ: 4, +})); + +common.register('chmod', _chmod, { +}); + +//@ +//@ ### chmod([options,] octal_mode || octal_string, file) +//@ ### chmod([options,] symbolic_mode, file) +//@ +//@ Available options: +//@ +//@ + `-v`: output a diagnostic for every file processed//@ +//@ + `-c`: like verbose, but report only when a change is made//@ +//@ + `-R`: change files and directories recursively//@ +//@ +//@ Examples: +//@ +//@ ```javascript +//@ chmod(755, '/Users/brandon'); +//@ chmod('755', '/Users/brandon'); // same as above +//@ chmod('u+x', '/Users/brandon'); +//@ chmod('-R', 'a-w', '/Users/brandon'); +//@ ``` +//@ +//@ Alters the permissions of a file or directory by either specifying the +//@ absolute permissions in octal form or expressing the changes in symbols. +//@ This command tries to mimic the POSIX behavior as much as possible. +//@ Notable exceptions: +//@ +//@ + In symbolic modes, `a-r` and `-r` are identical. No consideration is +//@ given to the `umask`. +//@ + There is no "quiet" option, since default behavior is to run silent. +function _chmod(options, mode, filePattern) { + if (!filePattern) { + if (options.length > 0 && options.charAt(0) === '-') { + // Special case where the specified file permissions started with - to subtract perms, which + // get picked up by the option parser as command flags. + // If we are down by one argument and options starts with -, shift everything over. + [].unshift.call(arguments, ''); + } else { + common.error('You must specify a file.'); + } + } + + options = common.parseOptions(options, { + 'R': 'recursive', + 'c': 'changes', + 'v': 'verbose', + }); + + filePattern = [].slice.call(arguments, 2); + + var files; + + // TODO: replace this with a call to common.expand() + if (options.recursive) { + files = []; + filePattern.forEach(function addFile(expandedFile) { + var stat = common.statNoFollowLinks(expandedFile); + + if (!stat.isSymbolicLink()) { + files.push(expandedFile); + + if (stat.isDirectory()) { // intentionally does not follow symlinks. + fs.readdirSync(expandedFile).forEach(function (child) { + addFile(expandedFile + '/' + child); + }); + } + } + }); + } else { + files = filePattern; + } + + files.forEach(function innerChmod(file) { + file = path.resolve(file); + if (!fs.existsSync(file)) { + common.error('File not found: ' + file); + } + + // When recursing, don't follow symlinks. + if (options.recursive && common.statNoFollowLinks(file).isSymbolicLink()) { + return; + } + + var stat = common.statFollowLinks(file); + var isDir = stat.isDirectory(); + var perms = stat.mode; + var type = perms & PERMS.TYPE_MASK; + + var newPerms = perms; + + if (isNaN(parseInt(mode, 8))) { + // parse options + mode.split(',').forEach(function (symbolicMode) { + var pattern = /([ugoa]*)([=\+-])([rwxXst]*)/i; + var matches = pattern.exec(symbolicMode); + + if (matches) { + var applyTo = matches[1]; + var operator = matches[2]; + var change = matches[3]; + + var changeOwner = applyTo.indexOf('u') !== -1 || applyTo === 'a' || applyTo === ''; + var changeGroup = applyTo.indexOf('g') !== -1 || applyTo === 'a' || applyTo === ''; + var changeOther = applyTo.indexOf('o') !== -1 || applyTo === 'a' || applyTo === ''; + + var changeRead = change.indexOf('r') !== -1; + var changeWrite = change.indexOf('w') !== -1; + var changeExec = change.indexOf('x') !== -1; + var changeExecDir = change.indexOf('X') !== -1; + var changeSticky = change.indexOf('t') !== -1; + var changeSetuid = change.indexOf('s') !== -1; + + if (changeExecDir && isDir) { + changeExec = true; + } + + var mask = 0; + if (changeOwner) { + mask |= (changeRead ? PERMS.OWNER_READ : 0) + (changeWrite ? PERMS.OWNER_WRITE : 0) + (changeExec ? PERMS.OWNER_EXEC : 0) + (changeSetuid ? PERMS.SETUID : 0); + } + if (changeGroup) { + mask |= (changeRead ? PERMS.GROUP_READ : 0) + (changeWrite ? PERMS.GROUP_WRITE : 0) + (changeExec ? PERMS.GROUP_EXEC : 0) + (changeSetuid ? PERMS.SETGID : 0); + } + if (changeOther) { + mask |= (changeRead ? PERMS.OTHER_READ : 0) + (changeWrite ? PERMS.OTHER_WRITE : 0) + (changeExec ? PERMS.OTHER_EXEC : 0); + } + + // Sticky bit is special - it's not tied to user, group or other. + if (changeSticky) { + mask |= PERMS.STICKY; + } + + switch (operator) { + case '+': + newPerms |= mask; + break; + + case '-': + newPerms &= ~mask; + break; + + case '=': + newPerms = type + mask; + + // According to POSIX, when using = to explicitly set the + // permissions, setuid and setgid can never be cleared. + if (common.statFollowLinks(file).isDirectory()) { + newPerms |= (PERMS.SETUID + PERMS.SETGID) & perms; + } + break; + default: + common.error('Could not recognize operator: `' + operator + '`'); + } + + if (options.verbose) { + console.log(file + ' -> ' + newPerms.toString(8)); + } + + if (perms !== newPerms) { + if (!options.verbose && options.changes) { + console.log(file + ' -> ' + newPerms.toString(8)); + } + fs.chmodSync(file, newPerms); + perms = newPerms; // for the next round of changes! + } + } else { + common.error('Invalid symbolic mode change: ' + symbolicMode); + } + }); + } else { + // they gave us a full number + newPerms = type + parseInt(mode, 8); + + // POSIX rules are that setuid and setgid can only be added using numeric + // form, but not cleared. + if (common.statFollowLinks(file).isDirectory()) { + newPerms |= (PERMS.SETUID + PERMS.SETGID) & perms; + } + + fs.chmodSync(file, newPerms); + } + }); + return ''; +} +module.exports = _chmod; + + +/***/ }), + +/***/ 3687: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; +// Ignore warning about 'new String()' +/* eslint no-new-wrappers: 0 */ + + +var os = __nccwpck_require__(2037); +var fs = __nccwpck_require__(7147); +var glob = __nccwpck_require__(1957); +var shell = __nccwpck_require__(3516); + +var shellMethods = Object.create(shell); + +exports.extend = Object.assign; + +// Check if we're running under electron +var isElectron = Boolean(process.versions.electron); + +// Module globals (assume no execPath by default) +var DEFAULT_CONFIG = { + fatal: false, + globOptions: {}, + maxdepth: 255, + noglob: false, + silent: false, + verbose: false, + execPath: null, + bufLength: 64 * 1024, // 64KB +}; + +var config = { + reset: function () { + Object.assign(this, DEFAULT_CONFIG); + if (!isElectron) { + this.execPath = process.execPath; + } + }, + resetForTesting: function () { + this.reset(); + this.silent = true; + }, +}; + +config.reset(); +exports.config = config; + +// Note: commands should generally consider these as read-only values. +var state = { + error: null, + errorCode: 0, + currentCmd: 'shell.js', +}; +exports.state = state; + +delete process.env.OLDPWD; // initially, there's no previous directory + +// Reliably test if something is any sort of javascript object +function isObject(a) { + return typeof a === 'object' && a !== null; +} +exports.isObject = isObject; + +function log() { + /* istanbul ignore next */ + if (!config.silent) { + console.error.apply(console, arguments); + } +} +exports.log = log; + +// Converts strings to be equivalent across all platforms. Primarily responsible +// for making sure we use '/' instead of '\' as path separators, but this may be +// expanded in the future if necessary +function convertErrorOutput(msg) { + if (typeof msg !== 'string') { + throw new TypeError('input must be a string'); + } + return msg.replace(/\\/g, '/'); +} +exports.convertErrorOutput = convertErrorOutput; + +// Shows error message. Throws if config.fatal is true +function error(msg, _code, options) { + // Validate input + if (typeof msg !== 'string') throw new Error('msg must be a string'); + + var DEFAULT_OPTIONS = { + continue: false, + code: 1, + prefix: state.currentCmd + ': ', + silent: false, + }; + + if (typeof _code === 'number' && isObject(options)) { + options.code = _code; + } else if (isObject(_code)) { // no 'code' + options = _code; + } else if (typeof _code === 'number') { // no 'options' + options = { code: _code }; + } else if (typeof _code !== 'number') { // only 'msg' + options = {}; + } + options = Object.assign({}, DEFAULT_OPTIONS, options); + + if (!state.errorCode) state.errorCode = options.code; + + var logEntry = convertErrorOutput(options.prefix + msg); + state.error = state.error ? state.error + '\n' : ''; + state.error += logEntry; + + // Throw an error, or log the entry + if (config.fatal) throw new Error(logEntry); + if (msg.length > 0 && !options.silent) log(logEntry); + + if (!options.continue) { + throw { + msg: 'earlyExit', + retValue: (new ShellString('', state.error, state.errorCode)), + }; + } +} +exports.error = error; + +//@ +//@ ### ShellString(str) +//@ +//@ Examples: +//@ +//@ ```javascript +//@ var foo = ShellString('hello world'); +//@ ``` +//@ +//@ Turns a regular string into a string-like object similar to what each +//@ command returns. This has special methods, like `.to()` and `.toEnd()`. +function ShellString(stdout, stderr, code) { + var that; + if (stdout instanceof Array) { + that = stdout; + that.stdout = stdout.join('\n'); + if (stdout.length > 0) that.stdout += '\n'; + } else { + that = new String(stdout); + that.stdout = stdout; + } + that.stderr = stderr; + that.code = code; + // A list of all commands that can appear on the right-hand side of a pipe + // (populated by calls to common.wrap()) + pipeMethods.forEach(function (cmd) { + that[cmd] = shellMethods[cmd].bind(that); + }); + return that; +} + +exports.ShellString = ShellString; + +// Returns {'alice': true, 'bob': false} when passed a string and dictionary as follows: +// parseOptions('-a', {'a':'alice', 'b':'bob'}); +// Returns {'reference': 'string-value', 'bob': false} when passed two dictionaries of the form: +// parseOptions({'-r': 'string-value'}, {'r':'reference', 'b':'bob'}); +// Throws an error when passed a string that does not start with '-': +// parseOptions('a', {'a':'alice'}); // throws +function parseOptions(opt, map, errorOptions) { + // Validate input + if (typeof opt !== 'string' && !isObject(opt)) { + throw new Error('options must be strings or key-value pairs'); + } else if (!isObject(map)) { + throw new Error('parseOptions() internal error: map must be an object'); + } else if (errorOptions && !isObject(errorOptions)) { + throw new Error('parseOptions() internal error: errorOptions must be object'); + } + + if (opt === '--') { + // This means there are no options. + return {}; + } + + // All options are false by default + var options = {}; + Object.keys(map).forEach(function (letter) { + var optName = map[letter]; + if (optName[0] !== '!') { + options[optName] = false; + } + }); + + if (opt === '') return options; // defaults + + if (typeof opt === 'string') { + if (opt[0] !== '-') { + throw new Error("Options string must start with a '-'"); + } + + // e.g. chars = ['R', 'f'] + var chars = opt.slice(1).split(''); + + chars.forEach(function (c) { + if (c in map) { + var optionName = map[c]; + if (optionName[0] === '!') { + options[optionName.slice(1)] = false; + } else { + options[optionName] = true; + } + } else { + error('option not recognized: ' + c, errorOptions || {}); + } + }); + } else { // opt is an Object + Object.keys(opt).forEach(function (key) { + // key is a string of the form '-r', '-d', etc. + var c = key[1]; + if (c in map) { + var optionName = map[c]; + options[optionName] = opt[key]; // assign the given value + } else { + error('option not recognized: ' + c, errorOptions || {}); + } + }); + } + return options; +} +exports.parseOptions = parseOptions; + +// Expands wildcards with matching (ie. existing) file names. +// For example: +// expand(['file*.js']) = ['file1.js', 'file2.js', ...] +// (if the files 'file1.js', 'file2.js', etc, exist in the current dir) +function expand(list) { + if (!Array.isArray(list)) { + throw new TypeError('must be an array'); + } + var expanded = []; + list.forEach(function (listEl) { + // Don't expand non-strings + if (typeof listEl !== 'string') { + expanded.push(listEl); + } else { + var ret; + try { + ret = glob.sync(listEl, config.globOptions); + // if nothing matched, interpret the string literally + ret = ret.length > 0 ? ret : [listEl]; + } catch (e) { + // if glob fails, interpret the string literally + ret = [listEl]; + } + expanded = expanded.concat(ret); + } + }); + return expanded; +} +exports.expand = expand; + +// Normalizes Buffer creation, using Buffer.alloc if possible. +// Also provides a good default buffer length for most use cases. +var buffer = typeof Buffer.alloc === 'function' ? + function (len) { + return Buffer.alloc(len || config.bufLength); + } : + function (len) { + return new Buffer(len || config.bufLength); + }; +exports.buffer = buffer; + +// Normalizes _unlinkSync() across platforms to match Unix behavior, i.e. +// file can be unlinked even if it's read-only, see https://github.com/joyent/node/issues/3006 +function unlinkSync(file) { + try { + fs.unlinkSync(file); + } catch (e) { + // Try to override file permission + /* istanbul ignore next */ + if (e.code === 'EPERM') { + fs.chmodSync(file, '0666'); + fs.unlinkSync(file); + } else { + throw e; + } + } +} +exports.unlinkSync = unlinkSync; + +// wrappers around common.statFollowLinks and common.statNoFollowLinks that clarify intent +// and improve readability +function statFollowLinks() { + return fs.statSync.apply(fs, arguments); +} +exports.statFollowLinks = statFollowLinks; + +function statNoFollowLinks() { + return fs.lstatSync.apply(fs, arguments); +} +exports.statNoFollowLinks = statNoFollowLinks; + +// e.g. 'shelljs_a5f185d0443ca...' +function randomFileName() { + function randomHash(count) { + if (count === 1) { + return parseInt(16 * Math.random(), 10).toString(16); + } + var hash = ''; + for (var i = 0; i < count; i++) { + hash += randomHash(1); + } + return hash; + } + + return 'shelljs_' + randomHash(20); +} +exports.randomFileName = randomFileName; + +// Common wrapper for all Unix-like commands that performs glob expansion, +// command-logging, and other nice things +function wrap(cmd, fn, options) { + options = options || {}; + return function () { + var retValue = null; + + state.currentCmd = cmd; + state.error = null; + state.errorCode = 0; + + try { + var args = [].slice.call(arguments, 0); + + // Log the command to stderr, if appropriate + if (config.verbose) { + console.error.apply(console, [cmd].concat(args)); + } + + // If this is coming from a pipe, let's set the pipedValue (otherwise, set + // it to the empty string) + state.pipedValue = (this && typeof this.stdout === 'string') ? this.stdout : ''; + + if (options.unix === false) { // this branch is for exec() + retValue = fn.apply(this, args); + } else { // and this branch is for everything else + if (isObject(args[0]) && args[0].constructor.name === 'Object') { + // a no-op, allowing the syntax `touch({'-r': file}, ...)` + } else if (args.length === 0 || typeof args[0] !== 'string' || args[0].length <= 1 || args[0][0] !== '-') { + args.unshift(''); // only add dummy option if '-option' not already present + } + + // flatten out arrays that are arguments, to make the syntax: + // `cp([file1, file2, file3], dest);` + // equivalent to: + // `cp(file1, file2, file3, dest);` + args = args.reduce(function (accum, cur) { + if (Array.isArray(cur)) { + return accum.concat(cur); + } + accum.push(cur); + return accum; + }, []); + + // Convert ShellStrings (basically just String objects) to regular strings + args = args.map(function (arg) { + if (isObject(arg) && arg.constructor.name === 'String') { + return arg.toString(); + } + return arg; + }); + + // Expand the '~' if appropriate + var homeDir = os.homedir(); + args = args.map(function (arg) { + if (typeof arg === 'string' && arg.slice(0, 2) === '~/' || arg === '~') { + return arg.replace(/^~/, homeDir); + } + return arg; + }); + + // Perform glob-expansion on all arguments after globStart, but preserve + // the arguments before it (like regexes for sed and grep) + if (!config.noglob && options.allowGlobbing === true) { + args = args.slice(0, options.globStart).concat(expand(args.slice(options.globStart))); + } + + try { + // parse options if options are provided + if (isObject(options.cmdOptions)) { + args[0] = parseOptions(args[0], options.cmdOptions); + } + + retValue = fn.apply(this, args); + } catch (e) { + /* istanbul ignore else */ + if (e.msg === 'earlyExit') { + retValue = e.retValue; + } else { + throw e; // this is probably a bug that should be thrown up the call stack + } + } + } + } catch (e) { + /* istanbul ignore next */ + if (!state.error) { + // If state.error hasn't been set it's an error thrown by Node, not us - probably a bug... + e.name = 'ShellJSInternalError'; + throw e; + } + if (config.fatal) throw e; + } + + if (options.wrapOutput && + (typeof retValue === 'string' || Array.isArray(retValue))) { + retValue = new ShellString(retValue, state.error, state.errorCode); + } + + state.currentCmd = 'shell.js'; + return retValue; + }; +} // wrap +exports.wrap = wrap; + +// This returns all the input that is piped into the current command (or the +// empty string, if this isn't on the right-hand side of a pipe +function _readFromPipe() { + return state.pipedValue; +} +exports.readFromPipe = _readFromPipe; + +var DEFAULT_WRAP_OPTIONS = { + allowGlobbing: true, + canReceivePipe: false, + cmdOptions: null, + globStart: 1, + pipeOnly: false, + wrapOutput: true, + unix: true, +}; + +// This is populated during plugin registration +var pipeMethods = []; + +// Register a new ShellJS command +function _register(name, implementation, wrapOptions) { + wrapOptions = wrapOptions || {}; + + // Validate options + Object.keys(wrapOptions).forEach(function (option) { + if (!DEFAULT_WRAP_OPTIONS.hasOwnProperty(option)) { + throw new Error("Unknown option '" + option + "'"); + } + if (typeof wrapOptions[option] !== typeof DEFAULT_WRAP_OPTIONS[option]) { + throw new TypeError("Unsupported type '" + typeof wrapOptions[option] + + "' for option '" + option + "'"); + } + }); + + // If an option isn't specified, use the default + wrapOptions = Object.assign({}, DEFAULT_WRAP_OPTIONS, wrapOptions); + + if (shell.hasOwnProperty(name)) { + throw new Error('Command `' + name + '` already exists'); + } + + if (wrapOptions.pipeOnly) { + wrapOptions.canReceivePipe = true; + shellMethods[name] = wrap(name, implementation, wrapOptions); + } else { + shell[name] = wrap(name, implementation, wrapOptions); + } + + if (wrapOptions.canReceivePipe) { + pipeMethods.push(name); + } +} +exports.register = _register; + + +/***/ }), + +/***/ 4932: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var fs = __nccwpck_require__(7147); +var path = __nccwpck_require__(1017); +var common = __nccwpck_require__(3687); + +common.register('cp', _cp, { + cmdOptions: { + 'f': '!no_force', + 'n': 'no_force', + 'u': 'update', + 'R': 'recursive', + 'r': 'recursive', + 'L': 'followsymlink', + 'P': 'noFollowsymlink', + }, + wrapOutput: false, +}); + +// Buffered file copy, synchronous +// (Using readFileSync() + writeFileSync() could easily cause a memory overflow +// with large files) +function copyFileSync(srcFile, destFile, options) { + if (!fs.existsSync(srcFile)) { + common.error('copyFileSync: no such file or directory: ' + srcFile); + } + + var isWindows = process.platform === 'win32'; + + // Check the mtimes of the files if the '-u' flag is provided + try { + if (options.update && common.statFollowLinks(srcFile).mtime < fs.statSync(destFile).mtime) { + return; + } + } catch (e) { + // If we're here, destFile probably doesn't exist, so just do a normal copy + } + + if (common.statNoFollowLinks(srcFile).isSymbolicLink() && !options.followsymlink) { + try { + common.statNoFollowLinks(destFile); + common.unlinkSync(destFile); // re-link it + } catch (e) { + // it doesn't exist, so no work needs to be done + } + + var symlinkFull = fs.readlinkSync(srcFile); + fs.symlinkSync(symlinkFull, destFile, isWindows ? 'junction' : null); + } else { + var buf = common.buffer(); + var bufLength = buf.length; + var bytesRead = bufLength; + var pos = 0; + var fdr = null; + var fdw = null; + + try { + fdr = fs.openSync(srcFile, 'r'); + } catch (e) { + /* istanbul ignore next */ + common.error('copyFileSync: could not read src file (' + srcFile + ')'); + } + + try { + fdw = fs.openSync(destFile, 'w'); + } catch (e) { + /* istanbul ignore next */ + common.error('copyFileSync: could not write to dest file (code=' + e.code + '):' + destFile); + } + + while (bytesRead === bufLength) { + bytesRead = fs.readSync(fdr, buf, 0, bufLength, pos); + fs.writeSync(fdw, buf, 0, bytesRead); + pos += bytesRead; + } + + fs.closeSync(fdr); + fs.closeSync(fdw); + + fs.chmodSync(destFile, common.statFollowLinks(srcFile).mode); + } +} + +// Recursively copies 'sourceDir' into 'destDir' +// Adapted from https://github.com/ryanmcgrath/wrench-js +// +// Copyright (c) 2010 Ryan McGrath +// Copyright (c) 2012 Artur Adib +// +// Licensed under the MIT License +// http://www.opensource.org/licenses/mit-license.php +function cpdirSyncRecursive(sourceDir, destDir, currentDepth, opts) { + if (!opts) opts = {}; + + // Ensure there is not a run away recursive copy + if (currentDepth >= common.config.maxdepth) return; + currentDepth++; + + var isWindows = process.platform === 'win32'; + + // Create the directory where all our junk is moving to; read the mode of the + // source directory and mirror it + try { + fs.mkdirSync(destDir); + } catch (e) { + // if the directory already exists, that's okay + if (e.code !== 'EEXIST') throw e; + } + + var files = fs.readdirSync(sourceDir); + + for (var i = 0; i < files.length; i++) { + var srcFile = sourceDir + '/' + files[i]; + var destFile = destDir + '/' + files[i]; + var srcFileStat = common.statNoFollowLinks(srcFile); + + var symlinkFull; + if (opts.followsymlink) { + if (cpcheckcycle(sourceDir, srcFile)) { + // Cycle link found. + console.error('Cycle link found.'); + symlinkFull = fs.readlinkSync(srcFile); + fs.symlinkSync(symlinkFull, destFile, isWindows ? 'junction' : null); + continue; + } + } + if (srcFileStat.isDirectory()) { + /* recursion this thing right on back. */ + cpdirSyncRecursive(srcFile, destFile, currentDepth, opts); + } else if (srcFileStat.isSymbolicLink() && !opts.followsymlink) { + symlinkFull = fs.readlinkSync(srcFile); + try { + common.statNoFollowLinks(destFile); + common.unlinkSync(destFile); // re-link it + } catch (e) { + // it doesn't exist, so no work needs to be done + } + fs.symlinkSync(symlinkFull, destFile, isWindows ? 'junction' : null); + } else if (srcFileStat.isSymbolicLink() && opts.followsymlink) { + srcFileStat = common.statFollowLinks(srcFile); + if (srcFileStat.isDirectory()) { + cpdirSyncRecursive(srcFile, destFile, currentDepth, opts); + } else { + copyFileSync(srcFile, destFile, opts); + } + } else { + /* At this point, we've hit a file actually worth copying... so copy it on over. */ + if (fs.existsSync(destFile) && opts.no_force) { + common.log('skipping existing file: ' + files[i]); + } else { + copyFileSync(srcFile, destFile, opts); + } + } + } // for files + + // finally change the mode for the newly created directory (otherwise, we + // couldn't add files to a read-only directory). + var checkDir = common.statFollowLinks(sourceDir); + fs.chmodSync(destDir, checkDir.mode); +} // cpdirSyncRecursive + +// Checks if cureent file was created recently +function checkRecentCreated(sources, index) { + var lookedSource = sources[index]; + return sources.slice(0, index).some(function (src) { + return path.basename(src) === path.basename(lookedSource); + }); +} + +function cpcheckcycle(sourceDir, srcFile) { + var srcFileStat = common.statNoFollowLinks(srcFile); + if (srcFileStat.isSymbolicLink()) { + // Do cycle check. For example: + // $ mkdir -p 1/2/3/4 + // $ cd 1/2/3/4 + // $ ln -s ../../3 link + // $ cd ../../../.. + // $ cp -RL 1 copy + var cyclecheck = common.statFollowLinks(srcFile); + if (cyclecheck.isDirectory()) { + var sourcerealpath = fs.realpathSync(sourceDir); + var symlinkrealpath = fs.realpathSync(srcFile); + var re = new RegExp(symlinkrealpath); + if (re.test(sourcerealpath)) { + return true; + } + } + } + return false; +} + +//@ +//@ ### cp([options,] source [, source ...], dest) +//@ ### cp([options,] source_array, dest) +//@ +//@ Available options: +//@ +//@ + `-f`: force (default behavior) +//@ + `-n`: no-clobber +//@ + `-u`: only copy if `source` is newer than `dest` +//@ + `-r`, `-R`: recursive +//@ + `-L`: follow symlinks +//@ + `-P`: don't follow symlinks +//@ +//@ Examples: +//@ +//@ ```javascript +//@ cp('file1', 'dir1'); +//@ cp('-R', 'path/to/dir/', '~/newCopy/'); +//@ cp('-Rf', '/tmp/*', '/usr/local/*', '/home/tmp'); +//@ cp('-Rf', ['/tmp/*', '/usr/local/*'], '/home/tmp'); // same as above +//@ ``` +//@ +//@ Copies files. +function _cp(options, sources, dest) { + // If we're missing -R, it actually implies -L (unless -P is explicit) + if (options.followsymlink) { + options.noFollowsymlink = false; + } + if (!options.recursive && !options.noFollowsymlink) { + options.followsymlink = true; + } + + // Get sources, dest + if (arguments.length < 3) { + common.error('missing and/or '); + } else { + sources = [].slice.call(arguments, 1, arguments.length - 1); + dest = arguments[arguments.length - 1]; + } + + var destExists = fs.existsSync(dest); + var destStat = destExists && common.statFollowLinks(dest); + + // Dest is not existing dir, but multiple sources given + if ((!destExists || !destStat.isDirectory()) && sources.length > 1) { + common.error('dest is not a directory (too many sources)'); + } + + // Dest is an existing file, but -n is given + if (destExists && destStat.isFile() && options.no_force) { + return new common.ShellString('', '', 0); + } + + sources.forEach(function (src, srcIndex) { + if (!fs.existsSync(src)) { + if (src === '') src = "''"; // if src was empty string, display empty string + common.error('no such file or directory: ' + src, { continue: true }); + return; // skip file + } + var srcStat = common.statFollowLinks(src); + if (!options.noFollowsymlink && srcStat.isDirectory()) { + if (!options.recursive) { + // Non-Recursive + common.error("omitting directory '" + src + "'", { continue: true }); + } else { + // Recursive + // 'cp /a/source dest' should create 'source' in 'dest' + var newDest = (destStat && destStat.isDirectory()) ? + path.join(dest, path.basename(src)) : + dest; + + try { + common.statFollowLinks(path.dirname(dest)); + cpdirSyncRecursive(src, newDest, 0, { no_force: options.no_force, followsymlink: options.followsymlink }); + } catch (e) { + /* istanbul ignore next */ + common.error("cannot create directory '" + dest + "': No such file or directory"); + } + } + } else { + // If here, src is a file + + // When copying to '/path/dir': + // thisDest = '/path/dir/file1' + var thisDest = dest; + if (destStat && destStat.isDirectory()) { + thisDest = path.normalize(dest + '/' + path.basename(src)); + } + + var thisDestExists = fs.existsSync(thisDest); + if (thisDestExists && checkRecentCreated(sources, srcIndex)) { + // cannot overwrite file created recently in current execution, but we want to continue copying other files + if (!options.no_force) { + common.error("will not overwrite just-created '" + thisDest + "' with '" + src + "'", { continue: true }); + } + return; + } + + if (thisDestExists && options.no_force) { + return; // skip file + } + + if (path.relative(src, thisDest) === '') { + // a file cannot be copied to itself, but we want to continue copying other files + common.error("'" + thisDest + "' and '" + src + "' are the same file", { continue: true }); + return; + } + + copyFileSync(src, thisDest, options); + } + }); // forEach(src) + + return new common.ShellString('', common.state.error, common.state.errorCode); +} +module.exports = _cp; + + +/***/ }), + +/***/ 1178: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +var common = __nccwpck_require__(3687); +var _cd = __nccwpck_require__(2051); +var path = __nccwpck_require__(1017); + +common.register('dirs', _dirs, { + wrapOutput: false, +}); +common.register('pushd', _pushd, { + wrapOutput: false, +}); +common.register('popd', _popd, { + wrapOutput: false, +}); + +// Pushd/popd/dirs internals +var _dirStack = []; + +function _isStackIndex(index) { + return (/^[\-+]\d+$/).test(index); +} + +function _parseStackIndex(index) { + if (_isStackIndex(index)) { + if (Math.abs(index) < _dirStack.length + 1) { // +1 for pwd + return (/^-/).test(index) ? Number(index) - 1 : Number(index); + } + common.error(index + ': directory stack index out of range'); + } else { + common.error(index + ': invalid number'); + } +} + +function _actualDirStack() { + return [process.cwd()].concat(_dirStack); +} + +//@ +//@ ### pushd([options,] [dir | '-N' | '+N']) +//@ +//@ Available options: +//@ +//@ + `-n`: Suppresses the normal change of directory when adding directories to the stack, so that only the stack is manipulated. +//@ + `-q`: Supresses output to the console. +//@ +//@ Arguments: +//@ +//@ + `dir`: Sets the current working directory to the top of the stack, then executes the equivalent of `cd dir`. +//@ + `+N`: Brings the Nth directory (counting from the left of the list printed by dirs, starting with zero) to the top of the list by rotating the stack. +//@ + `-N`: Brings the Nth directory (counting from the right of the list printed by dirs, starting with zero) to the top of the list by rotating the stack. +//@ +//@ Examples: +//@ +//@ ```javascript +//@ // process.cwd() === '/usr' +//@ pushd('/etc'); // Returns /etc /usr +//@ pushd('+1'); // Returns /usr /etc +//@ ``` +//@ +//@ Save the current directory on the top of the directory stack and then `cd` to `dir`. With no arguments, `pushd` exchanges the top two directories. Returns an array of paths in the stack. +function _pushd(options, dir) { + if (_isStackIndex(options)) { + dir = options; + options = ''; + } + + options = common.parseOptions(options, { + 'n': 'no-cd', + 'q': 'quiet', + }); + + var dirs = _actualDirStack(); + + if (dir === '+0') { + return dirs; // +0 is a noop + } else if (!dir) { + if (dirs.length > 1) { + dirs = dirs.splice(1, 1).concat(dirs); + } else { + return common.error('no other directory'); + } + } else if (_isStackIndex(dir)) { + var n = _parseStackIndex(dir); + dirs = dirs.slice(n).concat(dirs.slice(0, n)); + } else { + if (options['no-cd']) { + dirs.splice(1, 0, dir); + } else { + dirs.unshift(dir); + } + } + + if (options['no-cd']) { + dirs = dirs.slice(1); + } else { + dir = path.resolve(dirs.shift()); + _cd('', dir); + } + + _dirStack = dirs; + return _dirs(options.quiet ? '-q' : ''); +} +exports.pushd = _pushd; + +//@ +//@ +//@ ### popd([options,] ['-N' | '+N']) +//@ +//@ Available options: +//@ +//@ + `-n`: Suppress the normal directory change when removing directories from the stack, so that only the stack is manipulated. +//@ + `-q`: Supresses output to the console. +//@ +//@ Arguments: +//@ +//@ + `+N`: Removes the Nth directory (counting from the left of the list printed by dirs), starting with zero. +//@ + `-N`: Removes the Nth directory (counting from the right of the list printed by dirs), starting with zero. +//@ +//@ Examples: +//@ +//@ ```javascript +//@ echo(process.cwd()); // '/usr' +//@ pushd('/etc'); // '/etc /usr' +//@ echo(process.cwd()); // '/etc' +//@ popd(); // '/usr' +//@ echo(process.cwd()); // '/usr' +//@ ``` +//@ +//@ When no arguments are given, `popd` removes the top directory from the stack and performs a `cd` to the new top directory. The elements are numbered from 0, starting at the first directory listed with dirs (i.e., `popd` is equivalent to `popd +0`). Returns an array of paths in the stack. +function _popd(options, index) { + if (_isStackIndex(options)) { + index = options; + options = ''; + } + + options = common.parseOptions(options, { + 'n': 'no-cd', + 'q': 'quiet', + }); + + if (!_dirStack.length) { + return common.error('directory stack empty'); + } + + index = _parseStackIndex(index || '+0'); + + if (options['no-cd'] || index > 0 || _dirStack.length + index === 0) { + index = index > 0 ? index - 1 : index; + _dirStack.splice(index, 1); + } else { + var dir = path.resolve(_dirStack.shift()); + _cd('', dir); + } + + return _dirs(options.quiet ? '-q' : ''); +} +exports.popd = _popd; + +//@ +//@ +//@ ### dirs([options | '+N' | '-N']) +//@ +//@ Available options: +//@ +//@ + `-c`: Clears the directory stack by deleting all of the elements. +//@ + `-q`: Supresses output to the console. +//@ +//@ Arguments: +//@ +//@ + `+N`: Displays the Nth directory (counting from the left of the list printed by dirs when invoked without options), starting with zero. +//@ + `-N`: Displays the Nth directory (counting from the right of the list printed by dirs when invoked without options), starting with zero. +//@ +//@ Display the list of currently remembered directories. Returns an array of paths in the stack, or a single path if `+N` or `-N` was specified. +//@ +//@ See also: `pushd`, `popd` +function _dirs(options, index) { + if (_isStackIndex(options)) { + index = options; + options = ''; + } + + options = common.parseOptions(options, { + 'c': 'clear', + 'q': 'quiet', + }); + + if (options.clear) { + _dirStack = []; + return _dirStack; + } + + var stack = _actualDirStack(); + + if (index) { + index = _parseStackIndex(index); + + if (index < 0) { + index = stack.length + index; + } + + if (!options.quiet) { + common.log(stack[index]); + } + return stack[index]; + } + + if (!options.quiet) { + common.log(stack.join(' ')); + } + + return stack; +} +exports.dirs = _dirs; + + +/***/ }), + +/***/ 243: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var format = (__nccwpck_require__(3837).format); + +var common = __nccwpck_require__(3687); + +common.register('echo', _echo, { + allowGlobbing: false, +}); + +//@ +//@ ### echo([options,] string [, string ...]) +//@ +//@ Available options: +//@ +//@ + `-e`: interpret backslash escapes (default) +//@ + `-n`: remove trailing newline from output +//@ +//@ Examples: +//@ +//@ ```javascript +//@ echo('hello world'); +//@ var str = echo('hello world'); +//@ echo('-n', 'no newline at end'); +//@ ``` +//@ +//@ Prints `string` to stdout, and returns string with additional utility methods +//@ like `.to()`. +function _echo(opts) { + // allow strings starting with '-', see issue #20 + var messages = [].slice.call(arguments, opts ? 0 : 1); + var options = {}; + + // If the first argument starts with '-', parse it as options string. + // If parseOptions throws, it wasn't an options string. + try { + options = common.parseOptions(messages[0], { + 'e': 'escapes', + 'n': 'no_newline', + }, { + silent: true, + }); + + // Allow null to be echoed + if (messages[0]) { + messages.shift(); + } + } catch (_) { + // Clear out error if an error occurred + common.state.error = null; + } + + var output = format.apply(null, messages); + + // Add newline if -n is not passed. + if (!options.no_newline) { + output += '\n'; + } + + process.stdout.write(output); + + return output; +} + +module.exports = _echo; + + +/***/ }), + +/***/ 232: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var common = __nccwpck_require__(3687); + +//@ +//@ ### error() +//@ +//@ Tests if error occurred in the last command. Returns a truthy value if an +//@ error returned, or a falsy value otherwise. +//@ +//@ **Note**: do not rely on the +//@ return value to be an error message. If you need the last error message, use +//@ the `.stderr` attribute from the last command's return value instead. +function error() { + return common.state.error; +} +module.exports = error; + + +/***/ }), + +/***/ 9607: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/* module decorator */ module = __nccwpck_require__.nmd(module); +if (require.main !== module) { + throw new Error('This file should not be required'); +} + +var childProcess = __nccwpck_require__(2081); +var fs = __nccwpck_require__(7147); + +var paramFilePath = process.argv[2]; + +var serializedParams = fs.readFileSync(paramFilePath, 'utf8'); +var params = JSON.parse(serializedParams); + +var cmd = params.command; +var execOptions = params.execOptions; +var pipe = params.pipe; +var stdoutFile = params.stdoutFile; +var stderrFile = params.stderrFile; + +var c = childProcess.exec(cmd, execOptions, function (err) { + if (!err) { + process.exitCode = 0; + } else if (err.code === undefined) { + process.exitCode = 1; + } else { + process.exitCode = err.code; + } +}); + +var stdoutStream = fs.createWriteStream(stdoutFile); +var stderrStream = fs.createWriteStream(stderrFile); + +c.stdout.pipe(stdoutStream); +c.stderr.pipe(stderrStream); +c.stdout.pipe(process.stdout); +c.stderr.pipe(process.stderr); + +if (pipe) { + c.stdin.end(pipe); +} + + +/***/ }), + +/***/ 896: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var common = __nccwpck_require__(3687); +var _tempDir = (__nccwpck_require__(6150).tempDir); +var _pwd = __nccwpck_require__(8553); +var path = __nccwpck_require__(1017); +var fs = __nccwpck_require__(7147); +var child = __nccwpck_require__(2081); + +var DEFAULT_MAXBUFFER_SIZE = 20 * 1024 * 1024; +var DEFAULT_ERROR_CODE = 1; + +common.register('exec', _exec, { + unix: false, + canReceivePipe: true, + wrapOutput: false, +}); + +// We use this function to run `exec` synchronously while also providing realtime +// output. +function execSync(cmd, opts, pipe) { + if (!common.config.execPath) { + common.error('Unable to find a path to the node binary. Please manually set config.execPath'); + } + + var tempDir = _tempDir(); + var paramsFile = path.resolve(tempDir + '/' + common.randomFileName()); + var stderrFile = path.resolve(tempDir + '/' + common.randomFileName()); + var stdoutFile = path.resolve(tempDir + '/' + common.randomFileName()); + + opts = common.extend({ + silent: common.config.silent, + cwd: _pwd().toString(), + env: process.env, + maxBuffer: DEFAULT_MAXBUFFER_SIZE, + encoding: 'utf8', + }, opts); + + if (fs.existsSync(paramsFile)) common.unlinkSync(paramsFile); + if (fs.existsSync(stderrFile)) common.unlinkSync(stderrFile); + if (fs.existsSync(stdoutFile)) common.unlinkSync(stdoutFile); + + opts.cwd = path.resolve(opts.cwd); + + var paramsToSerialize = { + command: cmd, + execOptions: opts, + pipe: pipe, + stdoutFile: stdoutFile, + stderrFile: stderrFile, + }; + + // Create the files and ensure these are locked down (for read and write) to + // the current user. The main concerns here are: + // + // * If we execute a command which prints sensitive output, then + // stdoutFile/stderrFile must not be readable by other users. + // * paramsFile must not be readable by other users, or else they can read it + // to figure out the path for stdoutFile/stderrFile and create these first + // (locked down to their own access), which will crash exec() when it tries + // to write to the files. + function writeFileLockedDown(filePath, data) { + fs.writeFileSync(filePath, data, { + encoding: 'utf8', + mode: parseInt('600', 8), + }); + } + writeFileLockedDown(stdoutFile, ''); + writeFileLockedDown(stderrFile, ''); + writeFileLockedDown(paramsFile, JSON.stringify(paramsToSerialize)); + + var execArgs = [ + __nccwpck_require__.ab + "exec-child.js", + paramsFile, + ]; + + /* istanbul ignore else */ + if (opts.silent) { + opts.stdio = 'ignore'; + } else { + opts.stdio = [0, 1, 2]; + } + + var code = 0; + + // Welcome to the future + try { + // Bad things if we pass in a `shell` option to child_process.execFileSync, + // so we need to explicitly remove it here. + delete opts.shell; + + child.execFileSync(common.config.execPath, execArgs, opts); + } catch (e) { + // Commands with non-zero exit code raise an exception. + code = e.status || DEFAULT_ERROR_CODE; + } + + // fs.readFileSync uses buffer encoding by default, so call + // it without the encoding option if the encoding is 'buffer'. + // Also, if the exec timeout is too short for node to start up, + // the files will not be created, so these calls will throw. + var stdout = ''; + var stderr = ''; + if (opts.encoding === 'buffer') { + stdout = fs.readFileSync(stdoutFile); + stderr = fs.readFileSync(stderrFile); + } else { + stdout = fs.readFileSync(stdoutFile, opts.encoding); + stderr = fs.readFileSync(stderrFile, opts.encoding); + } + + // No biggie if we can't erase the files now -- they're in a temp dir anyway + // and we locked down permissions (see the note above). + try { common.unlinkSync(paramsFile); } catch (e) {} + try { common.unlinkSync(stderrFile); } catch (e) {} + try { common.unlinkSync(stdoutFile); } catch (e) {} + + if (code !== 0) { + // Note: `silent` should be unconditionally true to avoid double-printing + // the command's stderr, and to avoid printing any stderr when the user has + // set `shell.config.silent`. + common.error(stderr, code, { continue: true, silent: true }); + } + var obj = common.ShellString(stdout, stderr, code); + return obj; +} // execSync() + +// Wrapper around exec() to enable echoing output to console in real time +function execAsync(cmd, opts, pipe, callback) { + opts = common.extend({ + silent: common.config.silent, + cwd: _pwd().toString(), + env: process.env, + maxBuffer: DEFAULT_MAXBUFFER_SIZE, + encoding: 'utf8', + }, opts); + + var c = child.exec(cmd, opts, function (err, stdout, stderr) { + if (callback) { + if (!err) { + callback(0, stdout, stderr); + } else if (err.code === undefined) { + // See issue #536 + /* istanbul ignore next */ + callback(1, stdout, stderr); + } else { + callback(err.code, stdout, stderr); + } + } + }); + + if (pipe) c.stdin.end(pipe); + + if (!opts.silent) { + c.stdout.pipe(process.stdout); + c.stderr.pipe(process.stderr); + } + + return c; +} + +//@ +//@ ### exec(command [, options] [, callback]) +//@ +//@ Available options: +//@ +//@ + `async`: Asynchronous execution. If a callback is provided, it will be set to +//@ `true`, regardless of the passed value (default: `false`). +//@ + `silent`: Do not echo program output to console (default: `false`). +//@ + `encoding`: Character encoding to use. Affects the values returned to stdout and stderr, and +//@ what is written to stdout and stderr when not in silent mode (default: `'utf8'`). +//@ + and any option available to Node.js's +//@ [`child_process.exec()`](https://nodejs.org/api/child_process.html#child_process_child_process_exec_command_options_callback) +//@ +//@ Examples: +//@ +//@ ```javascript +//@ var version = exec('node --version', {silent:true}).stdout; +//@ +//@ var child = exec('some_long_running_process', {async:true}); +//@ child.stdout.on('data', function(data) { +//@ /* ... do something with data ... */ +//@ }); +//@ +//@ exec('some_long_running_process', function(code, stdout, stderr) { +//@ console.log('Exit code:', code); +//@ console.log('Program output:', stdout); +//@ console.log('Program stderr:', stderr); +//@ }); +//@ ``` +//@ +//@ Executes the given `command` _synchronously_, unless otherwise specified. When in synchronous +//@ mode, this returns a `ShellString` (compatible with ShellJS v0.6.x, which returns an object +//@ of the form `{ code:..., stdout:... , stderr:... }`). Otherwise, this returns the child process +//@ object, and the `callback` receives the arguments `(code, stdout, stderr)`. +//@ +//@ Not seeing the behavior you want? `exec()` runs everything through `sh` +//@ by default (or `cmd.exe` on Windows), which differs from `bash`. If you +//@ need bash-specific behavior, try out the `{shell: 'path/to/bash'}` option. +function _exec(command, options, callback) { + options = options || {}; + if (!command) common.error('must specify command'); + + var pipe = common.readFromPipe(); + + // Callback is defined instead of options. + if (typeof options === 'function') { + callback = options; + options = { async: true }; + } + + // Callback is defined with options. + if (typeof options === 'object' && typeof callback === 'function') { + options.async = true; + } + + options = common.extend({ + silent: common.config.silent, + async: false, + }, options); + + if (options.async) { + return execAsync(command, options, pipe, callback); + } else { + return execSync(command, options, pipe); + } +} +module.exports = _exec; + + +/***/ }), + +/***/ 7838: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var path = __nccwpck_require__(1017); +var common = __nccwpck_require__(3687); +var _ls = __nccwpck_require__(5561); + +common.register('find', _find, {}); + +//@ +//@ ### find(path [, path ...]) +//@ ### find(path_array) +//@ +//@ Examples: +//@ +//@ ```javascript +//@ find('src', 'lib'); +//@ find(['src', 'lib']); // same as above +//@ find('.').filter(function(file) { return file.match(/\.js$/); }); +//@ ``` +//@ +//@ Returns array of all files (however deep) in the given paths. +//@ +//@ The main difference from `ls('-R', path)` is that the resulting file names +//@ include the base directories (e.g., `lib/resources/file1` instead of just `file1`). +function _find(options, paths) { + if (!paths) { + common.error('no path specified'); + } else if (typeof paths === 'string') { + paths = [].slice.call(arguments, 1); + } + + var list = []; + + function pushFile(file) { + if (process.platform === 'win32') { + file = file.replace(/\\/g, '/'); + } + list.push(file); + } + + // why not simply do `ls('-R', paths)`? because the output wouldn't give the base dirs + // to get the base dir in the output, we need instead `ls('-R', 'dir/*')` for every directory + + paths.forEach(function (file) { + var stat; + try { + stat = common.statFollowLinks(file); + } catch (e) { + common.error('no such file or directory: ' + file); + } + + pushFile(file); + + if (stat.isDirectory()) { + _ls({ recursive: true, all: true }, file).forEach(function (subfile) { + pushFile(path.join(file, subfile)); + }); + } + }); + + return list; +} +module.exports = _find; + + +/***/ }), + +/***/ 7417: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var common = __nccwpck_require__(3687); +var fs = __nccwpck_require__(7147); + +common.register('grep', _grep, { + globStart: 2, // don't glob-expand the regex + canReceivePipe: true, + cmdOptions: { + 'v': 'inverse', + 'l': 'nameOnly', + 'i': 'ignoreCase', + }, +}); + +//@ +//@ ### grep([options,] regex_filter, file [, file ...]) +//@ ### grep([options,] regex_filter, file_array) +//@ +//@ Available options: +//@ +//@ + `-v`: Invert `regex_filter` (only print non-matching lines). +//@ + `-l`: Print only filenames of matching files. +//@ + `-i`: Ignore case. +//@ +//@ Examples: +//@ +//@ ```javascript +//@ grep('-v', 'GLOBAL_VARIABLE', '*.js'); +//@ grep('GLOBAL_VARIABLE', '*.js'); +//@ ``` +//@ +//@ Reads input string from given files and returns a string containing all lines of the +//@ file that match the given `regex_filter`. +function _grep(options, regex, files) { + // Check if this is coming from a pipe + var pipe = common.readFromPipe(); + + if (!files && !pipe) common.error('no paths given', 2); + + files = [].slice.call(arguments, 2); + + if (pipe) { + files.unshift('-'); + } + + var grep = []; + if (options.ignoreCase) { + regex = new RegExp(regex, 'i'); + } + files.forEach(function (file) { + if (!fs.existsSync(file) && file !== '-') { + common.error('no such file or directory: ' + file, 2, { continue: true }); + return; + } + + var contents = file === '-' ? pipe : fs.readFileSync(file, 'utf8'); + if (options.nameOnly) { + if (contents.match(regex)) { + grep.push(file); + } + } else { + var lines = contents.split('\n'); + lines.forEach(function (line) { + var matched = line.match(regex); + if ((options.inverse && !matched) || (!options.inverse && matched)) { + grep.push(line); + } + }); + } + }); + + return grep.join('\n') + '\n'; +} +module.exports = _grep; + + +/***/ }), + +/***/ 6613: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var common = __nccwpck_require__(3687); +var fs = __nccwpck_require__(7147); + +common.register('head', _head, { + canReceivePipe: true, + cmdOptions: { + 'n': 'numLines', + }, +}); + +// Reads |numLines| lines or the entire file, whichever is less. +function readSomeLines(file, numLines) { + var buf = common.buffer(); + var bufLength = buf.length; + var bytesRead = bufLength; + var pos = 0; + + var fdr = fs.openSync(file, 'r'); + var numLinesRead = 0; + var ret = ''; + while (bytesRead === bufLength && numLinesRead < numLines) { + bytesRead = fs.readSync(fdr, buf, 0, bufLength, pos); + var bufStr = buf.toString('utf8', 0, bytesRead); + numLinesRead += bufStr.split('\n').length - 1; + ret += bufStr; + pos += bytesRead; + } + + fs.closeSync(fdr); + return ret; +} + +//@ +//@ ### head([{'-n': \},] file [, file ...]) +//@ ### head([{'-n': \},] file_array) +//@ +//@ Available options: +//@ +//@ + `-n `: Show the first `` lines of the files +//@ +//@ Examples: +//@ +//@ ```javascript +//@ var str = head({'-n': 1}, 'file*.txt'); +//@ var str = head('file1', 'file2'); +//@ var str = head(['file1', 'file2']); // same as above +//@ ``` +//@ +//@ Read the start of a file. +function _head(options, files) { + var head = []; + var pipe = common.readFromPipe(); + + if (!files && !pipe) common.error('no paths given'); + + var idx = 1; + if (options.numLines === true) { + idx = 2; + options.numLines = Number(arguments[1]); + } else if (options.numLines === false) { + options.numLines = 10; + } + files = [].slice.call(arguments, idx); + + if (pipe) { + files.unshift('-'); + } + + var shouldAppendNewline = false; + files.forEach(function (file) { + if (file !== '-') { + if (!fs.existsSync(file)) { + common.error('no such file or directory: ' + file, { continue: true }); + return; + } else if (common.statFollowLinks(file).isDirectory()) { + common.error("error reading '" + file + "': Is a directory", { + continue: true, + }); + return; + } + } + + var contents; + if (file === '-') { + contents = pipe; + } else if (options.numLines < 0) { + contents = fs.readFileSync(file, 'utf8'); + } else { + contents = readSomeLines(file, options.numLines); + } + + var lines = contents.split('\n'); + var hasTrailingNewline = (lines[lines.length - 1] === ''); + if (hasTrailingNewline) { + lines.pop(); + } + shouldAppendNewline = (hasTrailingNewline || options.numLines < lines.length); + + head = head.concat(lines.slice(0, options.numLines)); + }); + + if (shouldAppendNewline) { + head.push(''); // to add a trailing newline once we join + } + return head.join('\n'); +} +module.exports = _head; + + +/***/ }), + +/***/ 5787: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var fs = __nccwpck_require__(7147); +var path = __nccwpck_require__(1017); +var common = __nccwpck_require__(3687); + +common.register('ln', _ln, { + cmdOptions: { + 's': 'symlink', + 'f': 'force', + }, +}); + +//@ +//@ ### ln([options,] source, dest) +//@ +//@ Available options: +//@ +//@ + `-s`: symlink +//@ + `-f`: force +//@ +//@ Examples: +//@ +//@ ```javascript +//@ ln('file', 'newlink'); +//@ ln('-sf', 'file', 'existing'); +//@ ``` +//@ +//@ Links `source` to `dest`. Use `-f` to force the link, should `dest` already exist. +function _ln(options, source, dest) { + if (!source || !dest) { + common.error('Missing and/or '); + } + + source = String(source); + var sourcePath = path.normalize(source).replace(RegExp(path.sep + '$'), ''); + var isAbsolute = (path.resolve(source) === sourcePath); + dest = path.resolve(process.cwd(), String(dest)); + + if (fs.existsSync(dest)) { + if (!options.force) { + common.error('Destination file exists', { continue: true }); + } + + fs.unlinkSync(dest); + } + + if (options.symlink) { + var isWindows = process.platform === 'win32'; + var linkType = isWindows ? 'file' : null; + var resolvedSourcePath = isAbsolute ? sourcePath : path.resolve(process.cwd(), path.dirname(dest), source); + if (!fs.existsSync(resolvedSourcePath)) { + common.error('Source file does not exist', { continue: true }); + } else if (isWindows && common.statFollowLinks(resolvedSourcePath).isDirectory()) { + linkType = 'junction'; + } + + try { + fs.symlinkSync(linkType === 'junction' ? resolvedSourcePath : source, dest, linkType); + } catch (err) { + common.error(err.message); + } + } else { + if (!fs.existsSync(source)) { + common.error('Source file does not exist', { continue: true }); + } + try { + fs.linkSync(source, dest); + } catch (err) { + common.error(err.message); + } + } + return ''; +} +module.exports = _ln; + + +/***/ }), + +/***/ 5561: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var path = __nccwpck_require__(1017); +var fs = __nccwpck_require__(7147); +var common = __nccwpck_require__(3687); +var glob = __nccwpck_require__(1957); + +var globPatternRecursive = path.sep + '**'; + +common.register('ls', _ls, { + cmdOptions: { + 'R': 'recursive', + 'A': 'all', + 'L': 'link', + 'a': 'all_deprecated', + 'd': 'directory', + 'l': 'long', + }, +}); + +//@ +//@ ### ls([options,] [path, ...]) +//@ ### ls([options,] path_array) +//@ +//@ Available options: +//@ +//@ + `-R`: recursive +//@ + `-A`: all files (include files beginning with `.`, except for `.` and `..`) +//@ + `-L`: follow symlinks +//@ + `-d`: list directories themselves, not their contents +//@ + `-l`: list objects representing each file, each with fields containing `ls +//@ -l` output fields. See +//@ [`fs.Stats`](https://nodejs.org/api/fs.html#fs_class_fs_stats) +//@ for more info +//@ +//@ Examples: +//@ +//@ ```javascript +//@ ls('projs/*.js'); +//@ ls('-R', '/users/me', '/tmp'); +//@ ls('-R', ['/users/me', '/tmp']); // same as above +//@ ls('-l', 'file.txt'); // { name: 'file.txt', mode: 33188, nlink: 1, ...} +//@ ``` +//@ +//@ Returns array of files in the given `path`, or files in +//@ the current directory if no `path` is provided. +function _ls(options, paths) { + if (options.all_deprecated) { + // We won't support the -a option as it's hard to image why it's useful + // (it includes '.' and '..' in addition to '.*' files) + // For backwards compatibility we'll dump a deprecated message and proceed as before + common.log('ls: Option -a is deprecated. Use -A instead'); + options.all = true; + } + + if (!paths) { + paths = ['.']; + } else { + paths = [].slice.call(arguments, 1); + } + + var list = []; + + function pushFile(abs, relName, stat) { + if (process.platform === 'win32') { + relName = relName.replace(/\\/g, '/'); + } + if (options.long) { + stat = stat || (options.link ? common.statFollowLinks(abs) : common.statNoFollowLinks(abs)); + list.push(addLsAttributes(relName, stat)); + } else { + // list.push(path.relative(rel || '.', file)); + list.push(relName); + } + } + + paths.forEach(function (p) { + var stat; + + try { + stat = options.link ? common.statFollowLinks(p) : common.statNoFollowLinks(p); + // follow links to directories by default + if (stat.isSymbolicLink()) { + /* istanbul ignore next */ + // workaround for https://github.com/shelljs/shelljs/issues/795 + // codecov seems to have a bug that miscalculate this block as uncovered. + // but according to nyc report this block does get covered. + try { + var _stat = common.statFollowLinks(p); + if (_stat.isDirectory()) { + stat = _stat; + } + } catch (_) {} // bad symlink, treat it like a file + } + } catch (e) { + common.error('no such file or directory: ' + p, 2, { continue: true }); + return; + } + + // If the stat succeeded + if (stat.isDirectory() && !options.directory) { + if (options.recursive) { + // use glob, because it's simple + glob.sync(p + globPatternRecursive, { dot: options.all, follow: options.link }) + .forEach(function (item) { + // Glob pattern returns the directory itself and needs to be filtered out. + if (path.relative(p, item)) { + pushFile(item, path.relative(p, item)); + } + }); + } else if (options.all) { + // use fs.readdirSync, because it's fast + fs.readdirSync(p).forEach(function (item) { + pushFile(path.join(p, item), item); + }); + } else { + // use fs.readdirSync and then filter out secret files + fs.readdirSync(p).forEach(function (item) { + if (item[0] !== '.') { + pushFile(path.join(p, item), item); + } + }); + } + } else { + pushFile(p, p, stat); + } + }); + + // Add methods, to make this more compatible with ShellStrings + return list; +} + +function addLsAttributes(pathName, stats) { + // Note: this object will contain more information than .toString() returns + stats.name = pathName; + stats.toString = function () { + // Return a string resembling unix's `ls -l` format + return [this.mode, this.nlink, this.uid, this.gid, this.size, this.mtime, this.name].join(' '); + }; + return stats; +} + +module.exports = _ls; + + +/***/ }), + +/***/ 2695: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var common = __nccwpck_require__(3687); +var fs = __nccwpck_require__(7147); +var path = __nccwpck_require__(1017); + +common.register('mkdir', _mkdir, { + cmdOptions: { + 'p': 'fullpath', + }, +}); + +// Recursively creates `dir` +function mkdirSyncRecursive(dir) { + var baseDir = path.dirname(dir); + + // Prevents some potential problems arising from malformed UNCs or + // insufficient permissions. + /* istanbul ignore next */ + if (baseDir === dir) { + common.error('dirname() failed: [' + dir + ']'); + } + + // Base dir exists, no recursion necessary + if (fs.existsSync(baseDir)) { + fs.mkdirSync(dir, parseInt('0777', 8)); + return; + } + + // Base dir does not exist, go recursive + mkdirSyncRecursive(baseDir); + + // Base dir created, can create dir + fs.mkdirSync(dir, parseInt('0777', 8)); +} + +//@ +//@ ### mkdir([options,] dir [, dir ...]) +//@ ### mkdir([options,] dir_array) +//@ +//@ Available options: +//@ +//@ + `-p`: full path (and create intermediate directories, if necessary) +//@ +//@ Examples: +//@ +//@ ```javascript +//@ mkdir('-p', '/tmp/a/b/c/d', '/tmp/e/f/g'); +//@ mkdir('-p', ['/tmp/a/b/c/d', '/tmp/e/f/g']); // same as above +//@ ``` +//@ +//@ Creates directories. +function _mkdir(options, dirs) { + if (!dirs) common.error('no paths given'); + + if (typeof dirs === 'string') { + dirs = [].slice.call(arguments, 1); + } + // if it's array leave it as it is + + dirs.forEach(function (dir) { + try { + var stat = common.statNoFollowLinks(dir); + if (!options.fullpath) { + common.error('path already exists: ' + dir, { continue: true }); + } else if (stat.isFile()) { + common.error('cannot create directory ' + dir + ': File exists', { continue: true }); + } + return; // skip dir + } catch (e) { + // do nothing + } + + // Base dir does not exist, and no -p option given + var baseDir = path.dirname(dir); + if (!fs.existsSync(baseDir) && !options.fullpath) { + common.error('no such file or directory: ' + baseDir, { continue: true }); + return; // skip dir + } + + try { + if (options.fullpath) { + mkdirSyncRecursive(path.resolve(dir)); + } else { + fs.mkdirSync(dir, parseInt('0777', 8)); + } + } catch (e) { + var reason; + if (e.code === 'EACCES') { + reason = 'Permission denied'; + } else if (e.code === 'ENOTDIR' || e.code === 'ENOENT') { + reason = 'Not a directory'; + } else { + /* istanbul ignore next */ + throw e; + } + common.error('cannot create directory ' + dir + ': ' + reason, { continue: true }); + } + }); + return ''; +} // mkdir +module.exports = _mkdir; + + +/***/ }), + +/***/ 9849: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var fs = __nccwpck_require__(7147); +var path = __nccwpck_require__(1017); +var common = __nccwpck_require__(3687); +var cp = __nccwpck_require__(4932); +var rm = __nccwpck_require__(2830); + +common.register('mv', _mv, { + cmdOptions: { + 'f': '!no_force', + 'n': 'no_force', + }, +}); + +// Checks if cureent file was created recently +function checkRecentCreated(sources, index) { + var lookedSource = sources[index]; + return sources.slice(0, index).some(function (src) { + return path.basename(src) === path.basename(lookedSource); + }); +} + +//@ +//@ ### mv([options ,] source [, source ...], dest') +//@ ### mv([options ,] source_array, dest') +//@ +//@ Available options: +//@ +//@ + `-f`: force (default behavior) +//@ + `-n`: no-clobber +//@ +//@ Examples: +//@ +//@ ```javascript +//@ mv('-n', 'file', 'dir/'); +//@ mv('file1', 'file2', 'dir/'); +//@ mv(['file1', 'file2'], 'dir/'); // same as above +//@ ``` +//@ +//@ Moves `source` file(s) to `dest`. +function _mv(options, sources, dest) { + // Get sources, dest + if (arguments.length < 3) { + common.error('missing and/or '); + } else if (arguments.length > 3) { + sources = [].slice.call(arguments, 1, arguments.length - 1); + dest = arguments[arguments.length - 1]; + } else if (typeof sources === 'string') { + sources = [sources]; + } else { + // TODO(nate): figure out if we actually need this line + common.error('invalid arguments'); + } + + var exists = fs.existsSync(dest); + var stats = exists && common.statFollowLinks(dest); + + // Dest is not existing dir, but multiple sources given + if ((!exists || !stats.isDirectory()) && sources.length > 1) { + common.error('dest is not a directory (too many sources)'); + } + + // Dest is an existing file, but no -f given + if (exists && stats.isFile() && options.no_force) { + common.error('dest file already exists: ' + dest); + } + + sources.forEach(function (src, srcIndex) { + if (!fs.existsSync(src)) { + common.error('no such file or directory: ' + src, { continue: true }); + return; // skip file + } + + // If here, src exists + + // When copying to '/path/dir': + // thisDest = '/path/dir/file1' + var thisDest = dest; + if (fs.existsSync(dest) && common.statFollowLinks(dest).isDirectory()) { + thisDest = path.normalize(dest + '/' + path.basename(src)); + } + + var thisDestExists = fs.existsSync(thisDest); + + if (thisDestExists && checkRecentCreated(sources, srcIndex)) { + // cannot overwrite file created recently in current execution, but we want to continue copying other files + if (!options.no_force) { + common.error("will not overwrite just-created '" + thisDest + "' with '" + src + "'", { continue: true }); + } + return; + } + + if (fs.existsSync(thisDest) && options.no_force) { + common.error('dest file already exists: ' + thisDest, { continue: true }); + return; // skip file + } + + if (path.resolve(src) === path.dirname(path.resolve(thisDest))) { + common.error('cannot move to self: ' + src, { continue: true }); + return; // skip file + } + + try { + fs.renameSync(src, thisDest); + } catch (e) { + /* istanbul ignore next */ + if (e.code === 'EXDEV') { + // If we're trying to `mv` to an external partition, we'll actually need + // to perform a copy and then clean up the original file. If either the + // copy or the rm fails with an exception, we should allow this + // exception to pass up to the top level. + cp('-r', src, thisDest); + rm('-rf', src); + } + } + }); // forEach(src) + return ''; +} // mv +module.exports = _mv; + + +/***/ }), + +/***/ 227: +/***/ (() => { + +// see dirs.js + + +/***/ }), + +/***/ 4177: +/***/ (() => { + +// see dirs.js + + +/***/ }), + +/***/ 8553: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var path = __nccwpck_require__(1017); +var common = __nccwpck_require__(3687); + +common.register('pwd', _pwd, { + allowGlobbing: false, +}); + +//@ +//@ ### pwd() +//@ +//@ Returns the current directory. +function _pwd() { + var pwd = path.resolve(process.cwd()); + return pwd; +} +module.exports = _pwd; + + +/***/ }), + +/***/ 2830: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var common = __nccwpck_require__(3687); +var fs = __nccwpck_require__(7147); + +common.register('rm', _rm, { + cmdOptions: { + 'f': 'force', + 'r': 'recursive', + 'R': 'recursive', + }, +}); + +// Recursively removes 'dir' +// Adapted from https://github.com/ryanmcgrath/wrench-js +// +// Copyright (c) 2010 Ryan McGrath +// Copyright (c) 2012 Artur Adib +// +// Licensed under the MIT License +// http://www.opensource.org/licenses/mit-license.php +function rmdirSyncRecursive(dir, force, fromSymlink) { + var files; + + files = fs.readdirSync(dir); + + // Loop through and delete everything in the sub-tree after checking it + for (var i = 0; i < files.length; i++) { + var file = dir + '/' + files[i]; + var currFile = common.statNoFollowLinks(file); + + if (currFile.isDirectory()) { // Recursive function back to the beginning + rmdirSyncRecursive(file, force); + } else { // Assume it's a file - perhaps a try/catch belongs here? + if (force || isWriteable(file)) { + try { + common.unlinkSync(file); + } catch (e) { + /* istanbul ignore next */ + common.error('could not remove file (code ' + e.code + '): ' + file, { + continue: true, + }); + } + } + } + } + + // if was directory was referenced through a symbolic link, + // the contents should be removed, but not the directory itself + if (fromSymlink) return; + + // Now that we know everything in the sub-tree has been deleted, we can delete the main directory. + // Huzzah for the shopkeep. + + var result; + try { + // Retry on windows, sometimes it takes a little time before all the files in the directory are gone + var start = Date.now(); + + // TODO: replace this with a finite loop + for (;;) { + try { + result = fs.rmdirSync(dir); + if (fs.existsSync(dir)) throw { code: 'EAGAIN' }; + break; + } catch (er) { + /* istanbul ignore next */ + // In addition to error codes, also check if the directory still exists and loop again if true + if (process.platform === 'win32' && (er.code === 'ENOTEMPTY' || er.code === 'EBUSY' || er.code === 'EPERM' || er.code === 'EAGAIN')) { + if (Date.now() - start > 1000) throw er; + } else if (er.code === 'ENOENT') { + // Directory did not exist, deletion was successful + break; + } else { + throw er; + } + } + } + } catch (e) { + common.error('could not remove directory (code ' + e.code + '): ' + dir, { continue: true }); + } + + return result; +} // rmdirSyncRecursive + +// Hack to determine if file has write permissions for current user +// Avoids having to check user, group, etc, but it's probably slow +function isWriteable(file) { + var writePermission = true; + try { + var __fd = fs.openSync(file, 'a'); + fs.closeSync(__fd); + } catch (e) { + writePermission = false; + } + + return writePermission; +} + +function handleFile(file, options) { + if (options.force || isWriteable(file)) { + // -f was passed, or file is writable, so it can be removed + common.unlinkSync(file); + } else { + common.error('permission denied: ' + file, { continue: true }); + } +} + +function handleDirectory(file, options) { + if (options.recursive) { + // -r was passed, so directory can be removed + rmdirSyncRecursive(file, options.force); + } else { + common.error('path is a directory', { continue: true }); + } +} + +function handleSymbolicLink(file, options) { + var stats; + try { + stats = common.statFollowLinks(file); + } catch (e) { + // symlink is broken, so remove the symlink itself + common.unlinkSync(file); + return; + } + + if (stats.isFile()) { + common.unlinkSync(file); + } else if (stats.isDirectory()) { + if (file[file.length - 1] === '/') { + // trailing separator, so remove the contents, not the link + if (options.recursive) { + // -r was passed, so directory can be removed + var fromSymlink = true; + rmdirSyncRecursive(file, options.force, fromSymlink); + } else { + common.error('path is a directory', { continue: true }); + } + } else { + // no trailing separator, so remove the link + common.unlinkSync(file); + } + } +} + +function handleFIFO(file) { + common.unlinkSync(file); +} + +//@ +//@ ### rm([options,] file [, file ...]) +//@ ### rm([options,] file_array) +//@ +//@ Available options: +//@ +//@ + `-f`: force +//@ + `-r, -R`: recursive +//@ +//@ Examples: +//@ +//@ ```javascript +//@ rm('-rf', '/tmp/*'); +//@ rm('some_file.txt', 'another_file.txt'); +//@ rm(['some_file.txt', 'another_file.txt']); // same as above +//@ ``` +//@ +//@ Removes files. +function _rm(options, files) { + if (!files) common.error('no paths given'); + + // Convert to array + files = [].slice.call(arguments, 1); + + files.forEach(function (file) { + var lstats; + try { + var filepath = (file[file.length - 1] === '/') + ? file.slice(0, -1) // remove the '/' so lstatSync can detect symlinks + : file; + lstats = common.statNoFollowLinks(filepath); // test for existence + } catch (e) { + // Path does not exist, no force flag given + if (!options.force) { + common.error('no such file or directory: ' + file, { continue: true }); + } + return; // skip file + } + + // If here, path exists + if (lstats.isFile()) { + handleFile(file, options); + } else if (lstats.isDirectory()) { + handleDirectory(file, options); + } else if (lstats.isSymbolicLink()) { + handleSymbolicLink(file, options); + } else if (lstats.isFIFO()) { + handleFIFO(file); + } + }); // forEach(file) + return ''; +} // rm +module.exports = _rm; + + +/***/ }), + +/***/ 5899: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var common = __nccwpck_require__(3687); +var fs = __nccwpck_require__(7147); + +common.register('sed', _sed, { + globStart: 3, // don't glob-expand regexes + canReceivePipe: true, + cmdOptions: { + 'i': 'inplace', + }, +}); + +//@ +//@ ### sed([options,] search_regex, replacement, file [, file ...]) +//@ ### sed([options,] search_regex, replacement, file_array) +//@ +//@ Available options: +//@ +//@ + `-i`: Replace contents of `file` in-place. _Note that no backups will be created!_ +//@ +//@ Examples: +//@ +//@ ```javascript +//@ sed('-i', 'PROGRAM_VERSION', 'v0.1.3', 'source.js'); +//@ sed(/.*DELETE_THIS_LINE.*\n/, '', 'source.js'); +//@ ``` +//@ +//@ Reads an input string from `file`s, and performs a JavaScript `replace()` on the input +//@ using the given `search_regex` and `replacement` string or function. Returns the new string after replacement. +//@ +//@ Note: +//@ +//@ Like unix `sed`, ShellJS `sed` supports capture groups. Capture groups are specified +//@ using the `$n` syntax: +//@ +//@ ```javascript +//@ sed(/(\w+)\s(\w+)/, '$2, $1', 'file.txt'); +//@ ``` +function _sed(options, regex, replacement, files) { + // Check if this is coming from a pipe + var pipe = common.readFromPipe(); + + if (typeof replacement !== 'string' && typeof replacement !== 'function') { + if (typeof replacement === 'number') { + replacement = replacement.toString(); // fallback + } else { + common.error('invalid replacement string'); + } + } + + // Convert all search strings to RegExp + if (typeof regex === 'string') { + regex = RegExp(regex); + } + + if (!files && !pipe) { + common.error('no files given'); + } + + files = [].slice.call(arguments, 3); + + if (pipe) { + files.unshift('-'); + } + + var sed = []; + files.forEach(function (file) { + if (!fs.existsSync(file) && file !== '-') { + common.error('no such file or directory: ' + file, 2, { continue: true }); + return; + } + + var contents = file === '-' ? pipe : fs.readFileSync(file, 'utf8'); + var lines = contents.split('\n'); + var result = lines.map(function (line) { + return line.replace(regex, replacement); + }).join('\n'); + + sed.push(result); + + if (options.inplace) { + fs.writeFileSync(file, result, 'utf8'); + } + }); + + return sed.join('\n'); +} +module.exports = _sed; + + +/***/ }), + +/***/ 1411: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var common = __nccwpck_require__(3687); + +common.register('set', _set, { + allowGlobbing: false, + wrapOutput: false, +}); + +//@ +//@ ### set(options) +//@ +//@ Available options: +//@ +//@ + `+/-e`: exit upon error (`config.fatal`) +//@ + `+/-v`: verbose: show all commands (`config.verbose`) +//@ + `+/-f`: disable filename expansion (globbing) +//@ +//@ Examples: +//@ +//@ ```javascript +//@ set('-e'); // exit upon first error +//@ set('+e'); // this undoes a "set('-e')" +//@ ``` +//@ +//@ Sets global configuration variables. +function _set(options) { + if (!options) { + var args = [].slice.call(arguments, 0); + if (args.length < 2) common.error('must provide an argument'); + options = args[1]; + } + var negate = (options[0] === '+'); + if (negate) { + options = '-' + options.slice(1); // parseOptions needs a '-' prefix + } + options = common.parseOptions(options, { + 'e': 'fatal', + 'v': 'verbose', + 'f': 'noglob', + }); + + if (negate) { + Object.keys(options).forEach(function (key) { + options[key] = !options[key]; + }); + } + + Object.keys(options).forEach(function (key) { + // Only change the global config if `negate` is false and the option is true + // or if `negate` is true and the option is false (aka negate !== option) + if (negate !== options[key]) { + common.config[key] = options[key]; + } + }); + return; +} +module.exports = _set; + + +/***/ }), + +/***/ 2116: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var common = __nccwpck_require__(3687); +var fs = __nccwpck_require__(7147); + +common.register('sort', _sort, { + canReceivePipe: true, + cmdOptions: { + 'r': 'reverse', + 'n': 'numerical', + }, +}); + +// parse out the number prefix of a line +function parseNumber(str) { + var match = str.match(/^\s*(\d*)\s*(.*)$/); + return { num: Number(match[1]), value: match[2] }; +} + +// compare two strings case-insensitively, but examine case for strings that are +// case-insensitive equivalent +function unixCmp(a, b) { + var aLower = a.toLowerCase(); + var bLower = b.toLowerCase(); + return (aLower === bLower ? + -1 * a.localeCompare(b) : // unix sort treats case opposite how javascript does + aLower.localeCompare(bLower)); +} + +// compare two strings in the fashion that unix sort's -n option works +function numericalCmp(a, b) { + var objA = parseNumber(a); + var objB = parseNumber(b); + if (objA.hasOwnProperty('num') && objB.hasOwnProperty('num')) { + return ((objA.num !== objB.num) ? + (objA.num - objB.num) : + unixCmp(objA.value, objB.value)); + } else { + return unixCmp(objA.value, objB.value); + } +} + +//@ +//@ ### sort([options,] file [, file ...]) +//@ ### sort([options,] file_array) +//@ +//@ Available options: +//@ +//@ + `-r`: Reverse the results +//@ + `-n`: Compare according to numerical value +//@ +//@ Examples: +//@ +//@ ```javascript +//@ sort('foo.txt', 'bar.txt'); +//@ sort('-r', 'foo.txt'); +//@ ``` +//@ +//@ Return the contents of the `file`s, sorted line-by-line. Sorting multiple +//@ files mixes their content (just as unix `sort` does). +function _sort(options, files) { + // Check if this is coming from a pipe + var pipe = common.readFromPipe(); + + if (!files && !pipe) common.error('no files given'); + + files = [].slice.call(arguments, 1); + + if (pipe) { + files.unshift('-'); + } + + var lines = files.reduce(function (accum, file) { + if (file !== '-') { + if (!fs.existsSync(file)) { + common.error('no such file or directory: ' + file, { continue: true }); + return accum; + } else if (common.statFollowLinks(file).isDirectory()) { + common.error('read failed: ' + file + ': Is a directory', { + continue: true, + }); + return accum; + } + } + + var contents = file === '-' ? pipe : fs.readFileSync(file, 'utf8'); + return accum.concat(contents.trimRight().split('\n')); + }, []); + + var sorted = lines.sort(options.numerical ? numericalCmp : unixCmp); + + if (options.reverse) { + sorted = sorted.reverse(); + } + + return sorted.join('\n') + '\n'; +} + +module.exports = _sort; + + +/***/ }), + +/***/ 2284: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var common = __nccwpck_require__(3687); +var fs = __nccwpck_require__(7147); + +common.register('tail', _tail, { + canReceivePipe: true, + cmdOptions: { + 'n': 'numLines', + }, +}); + +//@ +//@ ### tail([{'-n': \},] file [, file ...]) +//@ ### tail([{'-n': \},] file_array) +//@ +//@ Available options: +//@ +//@ + `-n `: Show the last `` lines of `file`s +//@ +//@ Examples: +//@ +//@ ```javascript +//@ var str = tail({'-n': 1}, 'file*.txt'); +//@ var str = tail('file1', 'file2'); +//@ var str = tail(['file1', 'file2']); // same as above +//@ ``` +//@ +//@ Read the end of a `file`. +function _tail(options, files) { + var tail = []; + var pipe = common.readFromPipe(); + + if (!files && !pipe) common.error('no paths given'); + + var idx = 1; + if (options.numLines === true) { + idx = 2; + options.numLines = Number(arguments[1]); + } else if (options.numLines === false) { + options.numLines = 10; + } + options.numLines = -1 * Math.abs(options.numLines); + files = [].slice.call(arguments, idx); + + if (pipe) { + files.unshift('-'); + } + + var shouldAppendNewline = false; + files.forEach(function (file) { + if (file !== '-') { + if (!fs.existsSync(file)) { + common.error('no such file or directory: ' + file, { continue: true }); + return; + } else if (common.statFollowLinks(file).isDirectory()) { + common.error("error reading '" + file + "': Is a directory", { + continue: true, + }); + return; + } + } + + var contents = file === '-' ? pipe : fs.readFileSync(file, 'utf8'); + + var lines = contents.split('\n'); + if (lines[lines.length - 1] === '') { + lines.pop(); + shouldAppendNewline = true; + } else { + shouldAppendNewline = false; + } + + tail = tail.concat(lines.slice(options.numLines)); + }); + + if (shouldAppendNewline) { + tail.push(''); // to add a trailing newline once we join + } + return tail.join('\n'); +} +module.exports = _tail; + + +/***/ }), + +/***/ 6150: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var common = __nccwpck_require__(3687); +var os = __nccwpck_require__(2037); +var fs = __nccwpck_require__(7147); + +common.register('tempdir', _tempDir, { + allowGlobbing: false, + wrapOutput: false, +}); + +// Returns false if 'dir' is not a writeable directory, 'dir' otherwise +function writeableDir(dir) { + if (!dir || !fs.existsSync(dir)) return false; + + if (!common.statFollowLinks(dir).isDirectory()) return false; + + var testFile = dir + '/' + common.randomFileName(); + try { + fs.writeFileSync(testFile, ' '); + common.unlinkSync(testFile); + return dir; + } catch (e) { + /* istanbul ignore next */ + return false; + } +} + +// Variable to cache the tempdir value for successive lookups. +var cachedTempDir; + +//@ +//@ ### tempdir() +//@ +//@ Examples: +//@ +//@ ```javascript +//@ var tmp = tempdir(); // "/tmp" for most *nix platforms +//@ ``` +//@ +//@ Searches and returns string containing a writeable, platform-dependent temporary directory. +//@ Follows Python's [tempfile algorithm](http://docs.python.org/library/tempfile.html#tempfile.tempdir). +function _tempDir() { + if (cachedTempDir) return cachedTempDir; + + cachedTempDir = writeableDir(os.tmpdir()) || + writeableDir(process.env.TMPDIR) || + writeableDir(process.env.TEMP) || + writeableDir(process.env.TMP) || + writeableDir(process.env.Wimp$ScrapDir) || // RiscOS + writeableDir('C:\\TEMP') || // Windows + writeableDir('C:\\TMP') || // Windows + writeableDir('\\TEMP') || // Windows + writeableDir('\\TMP') || // Windows + writeableDir('/tmp') || + writeableDir('/var/tmp') || + writeableDir('/usr/tmp') || + writeableDir('.'); // last resort + + return cachedTempDir; +} + +// Indicates if the tempdir value is currently cached. This is exposed for tests +// only. The return value should only be tested for truthiness. +function isCached() { + return cachedTempDir; +} + +// Clears the cached tempDir value, if one is cached. This is exposed for tests +// only. +function clearCache() { + cachedTempDir = undefined; +} + +module.exports.tempDir = _tempDir; +module.exports.isCached = isCached; +module.exports.clearCache = clearCache; + + +/***/ }), + +/***/ 9723: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var common = __nccwpck_require__(3687); +var fs = __nccwpck_require__(7147); + +common.register('test', _test, { + cmdOptions: { + 'b': 'block', + 'c': 'character', + 'd': 'directory', + 'e': 'exists', + 'f': 'file', + 'L': 'link', + 'p': 'pipe', + 'S': 'socket', + }, + wrapOutput: false, + allowGlobbing: false, +}); + + +//@ +//@ ### test(expression) +//@ +//@ Available expression primaries: +//@ +//@ + `'-b', 'path'`: true if path is a block device +//@ + `'-c', 'path'`: true if path is a character device +//@ + `'-d', 'path'`: true if path is a directory +//@ + `'-e', 'path'`: true if path exists +//@ + `'-f', 'path'`: true if path is a regular file +//@ + `'-L', 'path'`: true if path is a symbolic link +//@ + `'-p', 'path'`: true if path is a pipe (FIFO) +//@ + `'-S', 'path'`: true if path is a socket +//@ +//@ Examples: +//@ +//@ ```javascript +//@ if (test('-d', path)) { /* do something with dir */ }; +//@ if (!test('-f', path)) continue; // skip if it's a regular file +//@ ``` +//@ +//@ Evaluates `expression` using the available primaries and returns corresponding value. +function _test(options, path) { + if (!path) common.error('no path given'); + + var canInterpret = false; + Object.keys(options).forEach(function (key) { + if (options[key] === true) { + canInterpret = true; + } + }); + + if (!canInterpret) common.error('could not interpret expression'); + + if (options.link) { + try { + return common.statNoFollowLinks(path).isSymbolicLink(); + } catch (e) { + return false; + } + } + + if (!fs.existsSync(path)) return false; + + if (options.exists) return true; + + var stats = common.statFollowLinks(path); + + if (options.block) return stats.isBlockDevice(); + + if (options.character) return stats.isCharacterDevice(); + + if (options.directory) return stats.isDirectory(); + + if (options.file) return stats.isFile(); + + /* istanbul ignore next */ + if (options.pipe) return stats.isFIFO(); + + /* istanbul ignore next */ + if (options.socket) return stats.isSocket(); + + /* istanbul ignore next */ + return false; // fallback +} // test +module.exports = _test; + + +/***/ }), + +/***/ 1961: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var common = __nccwpck_require__(3687); +var fs = __nccwpck_require__(7147); +var path = __nccwpck_require__(1017); + +common.register('to', _to, { + pipeOnly: true, + wrapOutput: false, +}); + +//@ +//@ ### ShellString.prototype.to(file) +//@ +//@ Examples: +//@ +//@ ```javascript +//@ cat('input.txt').to('output.txt'); +//@ ``` +//@ +//@ Analogous to the redirection operator `>` in Unix, but works with +//@ `ShellStrings` (such as those returned by `cat`, `grep`, etc.). _Like Unix +//@ redirections, `to()` will overwrite any existing file!_ +function _to(options, file) { + if (!file) common.error('wrong arguments'); + + if (!fs.existsSync(path.dirname(file))) { + common.error('no such file or directory: ' + path.dirname(file)); + } + + try { + fs.writeFileSync(file, this.stdout || this.toString(), 'utf8'); + return this; + } catch (e) { + /* istanbul ignore next */ + common.error('could not write to file (code ' + e.code + '): ' + file, { continue: true }); + } +} +module.exports = _to; + + +/***/ }), + +/***/ 3736: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var common = __nccwpck_require__(3687); +var fs = __nccwpck_require__(7147); +var path = __nccwpck_require__(1017); + +common.register('toEnd', _toEnd, { + pipeOnly: true, + wrapOutput: false, +}); + +//@ +//@ ### ShellString.prototype.toEnd(file) +//@ +//@ Examples: +//@ +//@ ```javascript +//@ cat('input.txt').toEnd('output.txt'); +//@ ``` +//@ +//@ Analogous to the redirect-and-append operator `>>` in Unix, but works with +//@ `ShellStrings` (such as those returned by `cat`, `grep`, etc.). +function _toEnd(options, file) { + if (!file) common.error('wrong arguments'); + + if (!fs.existsSync(path.dirname(file))) { + common.error('no such file or directory: ' + path.dirname(file)); + } + + try { + fs.appendFileSync(file, this.stdout || this.toString(), 'utf8'); + return this; + } catch (e) { + /* istanbul ignore next */ + common.error('could not append to file (code ' + e.code + '): ' + file, { continue: true }); + } +} +module.exports = _toEnd; + + +/***/ }), + +/***/ 8358: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var common = __nccwpck_require__(3687); +var fs = __nccwpck_require__(7147); + +common.register('touch', _touch, { + cmdOptions: { + 'a': 'atime_only', + 'c': 'no_create', + 'd': 'date', + 'm': 'mtime_only', + 'r': 'reference', + }, +}); + +//@ +//@ ### touch([options,] file [, file ...]) +//@ ### touch([options,] file_array) +//@ +//@ Available options: +//@ +//@ + `-a`: Change only the access time +//@ + `-c`: Do not create any files +//@ + `-m`: Change only the modification time +//@ + `-d DATE`: Parse `DATE` and use it instead of current time +//@ + `-r FILE`: Use `FILE`'s times instead of current time +//@ +//@ Examples: +//@ +//@ ```javascript +//@ touch('source.js'); +//@ touch('-c', '/path/to/some/dir/source.js'); +//@ touch({ '-r': FILE }, '/path/to/some/dir/source.js'); +//@ ``` +//@ +//@ Update the access and modification times of each `FILE` to the current time. +//@ A `FILE` argument that does not exist is created empty, unless `-c` is supplied. +//@ This is a partial implementation of [`touch(1)`](http://linux.die.net/man/1/touch). +function _touch(opts, files) { + if (!files) { + common.error('no files given'); + } else if (typeof files === 'string') { + files = [].slice.call(arguments, 1); + } else { + common.error('file arg should be a string file path or an Array of string file paths'); + } + + files.forEach(function (f) { + touchFile(opts, f); + }); + return ''; +} + +function touchFile(opts, file) { + var stat = tryStatFile(file); + + if (stat && stat.isDirectory()) { + // don't error just exit + return; + } + + // if the file doesn't already exist and the user has specified --no-create then + // this script is finished + if (!stat && opts.no_create) { + return; + } + + // open the file and then close it. this will create it if it doesn't exist but will + // not truncate the file + fs.closeSync(fs.openSync(file, 'a')); + + // + // Set timestamps + // + + // setup some defaults + var now = new Date(); + var mtime = opts.date || now; + var atime = opts.date || now; + + // use reference file + if (opts.reference) { + var refStat = tryStatFile(opts.reference); + if (!refStat) { + common.error('failed to get attributess of ' + opts.reference); + } + mtime = refStat.mtime; + atime = refStat.atime; + } else if (opts.date) { + mtime = opts.date; + atime = opts.date; + } + + if (opts.atime_only && opts.mtime_only) { + // keep the new values of mtime and atime like GNU + } else if (opts.atime_only) { + mtime = stat.mtime; + } else if (opts.mtime_only) { + atime = stat.atime; + } + + fs.utimesSync(file, atime, mtime); +} + +module.exports = _touch; + +function tryStatFile(filePath) { + try { + return common.statFollowLinks(filePath); + } catch (e) { + return null; + } +} + + +/***/ }), + +/***/ 7286: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var common = __nccwpck_require__(3687); +var fs = __nccwpck_require__(7147); + +// add c spaces to the left of str +function lpad(c, str) { + var res = '' + str; + if (res.length < c) { + res = Array((c - res.length) + 1).join(' ') + res; + } + return res; +} + +common.register('uniq', _uniq, { + canReceivePipe: true, + cmdOptions: { + 'i': 'ignoreCase', + 'c': 'count', + 'd': 'duplicates', + }, +}); + +//@ +//@ ### uniq([options,] [input, [output]]) +//@ +//@ Available options: +//@ +//@ + `-i`: Ignore case while comparing +//@ + `-c`: Prefix lines by the number of occurrences +//@ + `-d`: Only print duplicate lines, one for each group of identical lines +//@ +//@ Examples: +//@ +//@ ```javascript +//@ uniq('foo.txt'); +//@ uniq('-i', 'foo.txt'); +//@ uniq('-cd', 'foo.txt', 'bar.txt'); +//@ ``` +//@ +//@ Filter adjacent matching lines from `input`. +function _uniq(options, input, output) { + // Check if this is coming from a pipe + var pipe = common.readFromPipe(); + + if (!pipe) { + if (!input) common.error('no input given'); + + if (!fs.existsSync(input)) { + common.error(input + ': No such file or directory'); + } else if (common.statFollowLinks(input).isDirectory()) { + common.error("error reading '" + input + "'"); + } + } + if (output && fs.existsSync(output) && common.statFollowLinks(output).isDirectory()) { + common.error(output + ': Is a directory'); + } + + var lines = (input ? fs.readFileSync(input, 'utf8') : pipe). + trimRight(). + split('\n'); + + var compare = function (a, b) { + return options.ignoreCase ? + a.toLocaleLowerCase().localeCompare(b.toLocaleLowerCase()) : + a.localeCompare(b); + }; + var uniqed = lines.reduceRight(function (res, e) { + // Perform uniq -c on the input + if (res.length === 0) { + return [{ count: 1, ln: e }]; + } else if (compare(res[0].ln, e) === 0) { + return [{ count: res[0].count + 1, ln: e }].concat(res.slice(1)); + } else { + return [{ count: 1, ln: e }].concat(res); + } + }, []).filter(function (obj) { + // Do we want only duplicated objects? + return options.duplicates ? obj.count > 1 : true; + }).map(function (obj) { + // Are we tracking the counts of each line? + return (options.count ? (lpad(7, obj.count) + ' ') : '') + obj.ln; + }).join('\n') + '\n'; + + if (output) { + (new common.ShellString(uniqed)).to(output); + // if uniq writes to output, nothing is passed to the next command in the pipeline (if any) + return ''; + } else { + return uniqed; + } +} + +module.exports = _uniq; + + +/***/ }), + +/***/ 4766: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var common = __nccwpck_require__(3687); +var fs = __nccwpck_require__(7147); +var path = __nccwpck_require__(1017); + +common.register('which', _which, { + allowGlobbing: false, + cmdOptions: { + 'a': 'all', + }, +}); + +// XP's system default value for `PATHEXT` system variable, just in case it's not +// set on Windows. +var XP_DEFAULT_PATHEXT = '.com;.exe;.bat;.cmd;.vbs;.vbe;.js;.jse;.wsf;.wsh'; + +// For earlier versions of NodeJS that doesn't have a list of constants (< v6) +var FILE_EXECUTABLE_MODE = 1; + +function isWindowsPlatform() { + return process.platform === 'win32'; +} + +// Cross-platform method for splitting environment `PATH` variables +function splitPath(p) { + return p ? p.split(path.delimiter) : []; +} + +// Tests are running all cases for this func but it stays uncovered by codecov due to unknown reason +/* istanbul ignore next */ +function isExecutable(pathName) { + try { + // TODO(node-support): replace with fs.constants.X_OK once remove support for node < v6 + fs.accessSync(pathName, FILE_EXECUTABLE_MODE); + } catch (err) { + return false; + } + return true; +} + +function checkPath(pathName) { + return fs.existsSync(pathName) && !common.statFollowLinks(pathName).isDirectory() + && (isWindowsPlatform() || isExecutable(pathName)); +} + +//@ +//@ ### which(command) +//@ +//@ Examples: +//@ +//@ ```javascript +//@ var nodeExec = which('node'); +//@ ``` +//@ +//@ Searches for `command` in the system's `PATH`. On Windows, this uses the +//@ `PATHEXT` variable to append the extension if it's not already executable. +//@ Returns string containing the absolute path to `command`. +function _which(options, cmd) { + if (!cmd) common.error('must specify command'); + + var isWindows = isWindowsPlatform(); + var pathArray = splitPath(process.env.PATH); + + var queryMatches = []; + + // No relative/absolute paths provided? + if (cmd.indexOf('/') === -1) { + // Assume that there are no extensions to append to queries (this is the + // case for unix) + var pathExtArray = ['']; + if (isWindows) { + // In case the PATHEXT variable is somehow not set (e.g. + // child_process.spawn with an empty environment), use the XP default. + var pathExtEnv = process.env.PATHEXT || XP_DEFAULT_PATHEXT; + pathExtArray = splitPath(pathExtEnv.toUpperCase()); + } + + // Search for command in PATH + for (var k = 0; k < pathArray.length; k++) { + // already found it + if (queryMatches.length > 0 && !options.all) break; + + var attempt = path.resolve(pathArray[k], cmd); + + if (isWindows) { + attempt = attempt.toUpperCase(); + } + + var match = attempt.match(/\.[^<>:"/\|?*.]+$/); + if (match && pathExtArray.indexOf(match[0]) >= 0) { // this is Windows-only + // The user typed a query with the file extension, like + // `which('node.exe')` + if (checkPath(attempt)) { + queryMatches.push(attempt); + break; + } + } else { // All-platforms + // Cycle through the PATHEXT array, and check each extension + // Note: the array is always [''] on Unix + for (var i = 0; i < pathExtArray.length; i++) { + var ext = pathExtArray[i]; + var newAttempt = attempt + ext; + if (checkPath(newAttempt)) { + queryMatches.push(newAttempt); + break; + } + } + } + } + } else if (checkPath(cmd)) { // a valid absolute or relative path + queryMatches.push(path.resolve(cmd)); + } + + if (queryMatches.length > 0) { + return options.all ? queryMatches : queryMatches[0]; + } + return options.all ? [] : null; +} +module.exports = _which; + + +/***/ }), + +/***/ 4294: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +module.exports = __nccwpck_require__(4219); + + +/***/ }), + +/***/ 4219: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +var net = __nccwpck_require__(1808); +var tls = __nccwpck_require__(4404); +var http = __nccwpck_require__(3685); +var https = __nccwpck_require__(5687); +var events = __nccwpck_require__(2361); +var assert = __nccwpck_require__(9491); +var util = __nccwpck_require__(3837); + + +exports.httpOverHttp = httpOverHttp; +exports.httpsOverHttp = httpsOverHttp; +exports.httpOverHttps = httpOverHttps; +exports.httpsOverHttps = httpsOverHttps; + + +function httpOverHttp(options) { + var agent = new TunnelingAgent(options); + agent.request = http.request; + return agent; +} + +function httpsOverHttp(options) { + var agent = new TunnelingAgent(options); + agent.request = http.request; + agent.createSocket = createSecureSocket; + agent.defaultPort = 443; + return agent; +} + +function httpOverHttps(options) { + var agent = new TunnelingAgent(options); + agent.request = https.request; + return agent; +} + +function httpsOverHttps(options) { + var agent = new TunnelingAgent(options); + agent.request = https.request; + agent.createSocket = createSecureSocket; + agent.defaultPort = 443; + return agent; +} + + +function TunnelingAgent(options) { + var self = this; + self.options = options || {}; + self.proxyOptions = self.options.proxy || {}; + self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets; + self.requests = []; + self.sockets = []; + + self.on('free', function onFree(socket, host, port, localAddress) { + var options = toOptions(host, port, localAddress); + for (var i = 0, len = self.requests.length; i < len; ++i) { + var pending = self.requests[i]; + if (pending.host === options.host && pending.port === options.port) { + // Detect the request to connect same origin server, + // reuse the connection. + self.requests.splice(i, 1); + pending.request.onSocket(socket); + return; + } + } + socket.destroy(); + self.removeSocket(socket); + }); +} +util.inherits(TunnelingAgent, events.EventEmitter); + +TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) { + var self = this; + var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress)); + + if (self.sockets.length >= this.maxSockets) { + // We are over limit so we'll add it to the queue. + self.requests.push(options); + return; + } + + // If we are under maxSockets create a new one. + self.createSocket(options, function(socket) { + socket.on('free', onFree); + socket.on('close', onCloseOrRemove); + socket.on('agentRemove', onCloseOrRemove); + req.onSocket(socket); + + function onFree() { + self.emit('free', socket, options); + } + + function onCloseOrRemove(err) { + self.removeSocket(socket); + socket.removeListener('free', onFree); + socket.removeListener('close', onCloseOrRemove); + socket.removeListener('agentRemove', onCloseOrRemove); + } + }); +}; + +TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { + var self = this; + var placeholder = {}; + self.sockets.push(placeholder); + + var connectOptions = mergeOptions({}, self.proxyOptions, { + method: 'CONNECT', + path: options.host + ':' + options.port, + agent: false, + headers: { + host: options.host + ':' + options.port + } + }); + if (options.localAddress) { + connectOptions.localAddress = options.localAddress; + } + if (connectOptions.proxyAuth) { + connectOptions.headers = connectOptions.headers || {}; + connectOptions.headers['Proxy-Authorization'] = 'Basic ' + + new Buffer(connectOptions.proxyAuth).toString('base64'); + } + + debug('making CONNECT request'); + var connectReq = self.request(connectOptions); + connectReq.useChunkedEncodingByDefault = false; // for v0.6 + connectReq.once('response', onResponse); // for v0.6 + connectReq.once('upgrade', onUpgrade); // for v0.6 + connectReq.once('connect', onConnect); // for v0.7 or later + connectReq.once('error', onError); + connectReq.end(); + + function onResponse(res) { + // Very hacky. This is necessary to avoid http-parser leaks. + res.upgrade = true; + } + + function onUpgrade(res, socket, head) { + // Hacky. + process.nextTick(function() { + onConnect(res, socket, head); + }); + } + + function onConnect(res, socket, head) { + connectReq.removeAllListeners(); + socket.removeAllListeners(); + + if (res.statusCode !== 200) { + debug('tunneling socket could not be established, statusCode=%d', + res.statusCode); + socket.destroy(); + var error = new Error('tunneling socket could not be established, ' + + 'statusCode=' + res.statusCode); + error.code = 'ECONNRESET'; + options.request.emit('error', error); + self.removeSocket(placeholder); + return; + } + if (head.length > 0) { + debug('got illegal response body from proxy'); + socket.destroy(); + var error = new Error('got illegal response body from proxy'); + error.code = 'ECONNRESET'; + options.request.emit('error', error); + self.removeSocket(placeholder); + return; + } + debug('tunneling connection has established'); + self.sockets[self.sockets.indexOf(placeholder)] = socket; + return cb(socket); + } + + function onError(cause) { + connectReq.removeAllListeners(); + + debug('tunneling socket could not be established, cause=%s\n', + cause.message, cause.stack); + var error = new Error('tunneling socket could not be established, ' + + 'cause=' + cause.message); + error.code = 'ECONNRESET'; + options.request.emit('error', error); + self.removeSocket(placeholder); + } +}; + +TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { + var pos = this.sockets.indexOf(socket) + if (pos === -1) { + return; + } + this.sockets.splice(pos, 1); + + var pending = this.requests.shift(); + if (pending) { + // If we have pending requests and a socket gets closed a new one + // needs to be created to take over in the pool for the one that closed. + this.createSocket(pending, function(socket) { + pending.request.onSocket(socket); + }); + } +}; + +function createSecureSocket(options, cb) { + var self = this; + TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { + var hostHeader = options.request.getHeader('host'); + var tlsOptions = mergeOptions({}, self.options, { + socket: socket, + servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host + }); + + // 0 is dummy port for v0.6 + var secureSocket = tls.connect(0, tlsOptions); + self.sockets[self.sockets.indexOf(socket)] = secureSocket; + cb(secureSocket); + }); +} + + +function toOptions(host, port, localAddress) { + if (typeof host === 'string') { // since v0.10 + return { + host: host, + port: port, + localAddress: localAddress + }; + } + return host; // for v0.11 or later +} + +function mergeOptions(target) { + for (var i = 1, len = arguments.length; i < len; ++i) { + var overrides = arguments[i]; + if (typeof overrides === 'object') { + var keys = Object.keys(overrides); + for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { + var k = keys[j]; + if (overrides[k] !== undefined) { + target[k] = overrides[k]; + } + } + } + } + return target; +} + + +var debug; +if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { + debug = function() { + var args = Array.prototype.slice.call(arguments); + if (typeof args[0] === 'string') { + args[0] = 'TUNNEL: ' + args[0]; + } else { + args.unshift('TUNNEL:'); + } + console.error.apply(console, args); + } +} else { + debug = function() {}; +} +exports.debug = debug; // for test + + +/***/ }), + +/***/ 1452: +/***/ (function(__unused_webpack_module, exports) { + +/** + * web-streams-polyfill v3.2.1 + */ +(function (global, factory) { + true ? factory(exports) : + 0; +}(this, (function (exports) { 'use strict'; + + /// + const SymbolPolyfill = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? + Symbol : + description => `Symbol(${description})`; + + /// + function noop() { + return undefined; + } + function getGlobals() { + if (typeof self !== 'undefined') { + return self; + } + else if (typeof window !== 'undefined') { + return window; + } + else if (typeof global !== 'undefined') { + return global; + } + return undefined; + } + const globals = getGlobals(); + + function typeIsObject(x) { + return (typeof x === 'object' && x !== null) || typeof x === 'function'; + } + const rethrowAssertionErrorRejection = noop; + + const originalPromise = Promise; + const originalPromiseThen = Promise.prototype.then; + const originalPromiseResolve = Promise.resolve.bind(originalPromise); + const originalPromiseReject = Promise.reject.bind(originalPromise); + function newPromise(executor) { + return new originalPromise(executor); + } + function promiseResolvedWith(value) { + return originalPromiseResolve(value); + } + function promiseRejectedWith(reason) { + return originalPromiseReject(reason); + } + function PerformPromiseThen(promise, onFulfilled, onRejected) { + // There doesn't appear to be any way to correctly emulate the behaviour from JavaScript, so this is just an + // approximation. + return originalPromiseThen.call(promise, onFulfilled, onRejected); + } + function uponPromise(promise, onFulfilled, onRejected) { + PerformPromiseThen(PerformPromiseThen(promise, onFulfilled, onRejected), undefined, rethrowAssertionErrorRejection); + } + function uponFulfillment(promise, onFulfilled) { + uponPromise(promise, onFulfilled); + } + function uponRejection(promise, onRejected) { + uponPromise(promise, undefined, onRejected); + } + function transformPromiseWith(promise, fulfillmentHandler, rejectionHandler) { + return PerformPromiseThen(promise, fulfillmentHandler, rejectionHandler); + } + function setPromiseIsHandledToTrue(promise) { + PerformPromiseThen(promise, undefined, rethrowAssertionErrorRejection); + } + const queueMicrotask = (() => { + const globalQueueMicrotask = globals && globals.queueMicrotask; + if (typeof globalQueueMicrotask === 'function') { + return globalQueueMicrotask; + } + const resolvedPromise = promiseResolvedWith(undefined); + return (fn) => PerformPromiseThen(resolvedPromise, fn); + })(); + function reflectCall(F, V, args) { + if (typeof F !== 'function') { + throw new TypeError('Argument is not a function'); + } + return Function.prototype.apply.call(F, V, args); + } + function promiseCall(F, V, args) { + try { + return promiseResolvedWith(reflectCall(F, V, args)); + } + catch (value) { + return promiseRejectedWith(value); + } + } + + // Original from Chromium + // https://chromium.googlesource.com/chromium/src/+/0aee4434a4dba42a42abaea9bfbc0cd196a63bc1/third_party/blink/renderer/core/streams/SimpleQueue.js + const QUEUE_MAX_ARRAY_SIZE = 16384; + /** + * Simple queue structure. + * + * Avoids scalability issues with using a packed array directly by using + * multiple arrays in a linked list and keeping the array size bounded. + */ + class SimpleQueue { + constructor() { + this._cursor = 0; + this._size = 0; + // _front and _back are always defined. + this._front = { + _elements: [], + _next: undefined + }; + this._back = this._front; + // The cursor is used to avoid calling Array.shift(). + // It contains the index of the front element of the array inside the + // front-most node. It is always in the range [0, QUEUE_MAX_ARRAY_SIZE). + this._cursor = 0; + // When there is only one node, size === elements.length - cursor. + this._size = 0; + } + get length() { + return this._size; + } + // For exception safety, this method is structured in order: + // 1. Read state + // 2. Calculate required state mutations + // 3. Perform state mutations + push(element) { + const oldBack = this._back; + let newBack = oldBack; + if (oldBack._elements.length === QUEUE_MAX_ARRAY_SIZE - 1) { + newBack = { + _elements: [], + _next: undefined + }; + } + // push() is the mutation most likely to throw an exception, so it + // goes first. + oldBack._elements.push(element); + if (newBack !== oldBack) { + this._back = newBack; + oldBack._next = newBack; + } + ++this._size; + } + // Like push(), shift() follows the read -> calculate -> mutate pattern for + // exception safety. + shift() { // must not be called on an empty queue + const oldFront = this._front; + let newFront = oldFront; + const oldCursor = this._cursor; + let newCursor = oldCursor + 1; + const elements = oldFront._elements; + const element = elements[oldCursor]; + if (newCursor === QUEUE_MAX_ARRAY_SIZE) { + newFront = oldFront._next; + newCursor = 0; + } + // No mutations before this point. + --this._size; + this._cursor = newCursor; + if (oldFront !== newFront) { + this._front = newFront; + } + // Permit shifted element to be garbage collected. + elements[oldCursor] = undefined; + return element; + } + // The tricky thing about forEach() is that it can be called + // re-entrantly. The queue may be mutated inside the callback. It is easy to + // see that push() within the callback has no negative effects since the end + // of the queue is checked for on every iteration. If shift() is called + // repeatedly within the callback then the next iteration may return an + // element that has been removed. In this case the callback will be called + // with undefined values until we either "catch up" with elements that still + // exist or reach the back of the queue. + forEach(callback) { + let i = this._cursor; + let node = this._front; + let elements = node._elements; + while (i !== elements.length || node._next !== undefined) { + if (i === elements.length) { + node = node._next; + elements = node._elements; + i = 0; + if (elements.length === 0) { + break; + } + } + callback(elements[i]); + ++i; + } + } + // Return the element that would be returned if shift() was called now, + // without modifying the queue. + peek() { // must not be called on an empty queue + const front = this._front; + const cursor = this._cursor; + return front._elements[cursor]; + } + } + + function ReadableStreamReaderGenericInitialize(reader, stream) { + reader._ownerReadableStream = stream; + stream._reader = reader; + if (stream._state === 'readable') { + defaultReaderClosedPromiseInitialize(reader); + } + else if (stream._state === 'closed') { + defaultReaderClosedPromiseInitializeAsResolved(reader); + } + else { + defaultReaderClosedPromiseInitializeAsRejected(reader, stream._storedError); + } + } + // A client of ReadableStreamDefaultReader and ReadableStreamBYOBReader may use these functions directly to bypass state + // check. + function ReadableStreamReaderGenericCancel(reader, reason) { + const stream = reader._ownerReadableStream; + return ReadableStreamCancel(stream, reason); + } + function ReadableStreamReaderGenericRelease(reader) { + if (reader._ownerReadableStream._state === 'readable') { + defaultReaderClosedPromiseReject(reader, new TypeError(`Reader was released and can no longer be used to monitor the stream's closedness`)); + } + else { + defaultReaderClosedPromiseResetToRejected(reader, new TypeError(`Reader was released and can no longer be used to monitor the stream's closedness`)); + } + reader._ownerReadableStream._reader = undefined; + reader._ownerReadableStream = undefined; + } + // Helper functions for the readers. + function readerLockException(name) { + return new TypeError('Cannot ' + name + ' a stream using a released reader'); + } + // Helper functions for the ReadableStreamDefaultReader. + function defaultReaderClosedPromiseInitialize(reader) { + reader._closedPromise = newPromise((resolve, reject) => { + reader._closedPromise_resolve = resolve; + reader._closedPromise_reject = reject; + }); + } + function defaultReaderClosedPromiseInitializeAsRejected(reader, reason) { + defaultReaderClosedPromiseInitialize(reader); + defaultReaderClosedPromiseReject(reader, reason); + } + function defaultReaderClosedPromiseInitializeAsResolved(reader) { + defaultReaderClosedPromiseInitialize(reader); + defaultReaderClosedPromiseResolve(reader); + } + function defaultReaderClosedPromiseReject(reader, reason) { + if (reader._closedPromise_reject === undefined) { + return; + } + setPromiseIsHandledToTrue(reader._closedPromise); + reader._closedPromise_reject(reason); + reader._closedPromise_resolve = undefined; + reader._closedPromise_reject = undefined; + } + function defaultReaderClosedPromiseResetToRejected(reader, reason) { + defaultReaderClosedPromiseInitializeAsRejected(reader, reason); + } + function defaultReaderClosedPromiseResolve(reader) { + if (reader._closedPromise_resolve === undefined) { + return; + } + reader._closedPromise_resolve(undefined); + reader._closedPromise_resolve = undefined; + reader._closedPromise_reject = undefined; + } + + const AbortSteps = SymbolPolyfill('[[AbortSteps]]'); + const ErrorSteps = SymbolPolyfill('[[ErrorSteps]]'); + const CancelSteps = SymbolPolyfill('[[CancelSteps]]'); + const PullSteps = SymbolPolyfill('[[PullSteps]]'); + + /// + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isFinite#Polyfill + const NumberIsFinite = Number.isFinite || function (x) { + return typeof x === 'number' && isFinite(x); + }; + + /// + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc#Polyfill + const MathTrunc = Math.trunc || function (v) { + return v < 0 ? Math.ceil(v) : Math.floor(v); + }; + + // https://heycam.github.io/webidl/#idl-dictionaries + function isDictionary(x) { + return typeof x === 'object' || typeof x === 'function'; + } + function assertDictionary(obj, context) { + if (obj !== undefined && !isDictionary(obj)) { + throw new TypeError(`${context} is not an object.`); + } + } + // https://heycam.github.io/webidl/#idl-callback-functions + function assertFunction(x, context) { + if (typeof x !== 'function') { + throw new TypeError(`${context} is not a function.`); + } + } + // https://heycam.github.io/webidl/#idl-object + function isObject(x) { + return (typeof x === 'object' && x !== null) || typeof x === 'function'; + } + function assertObject(x, context) { + if (!isObject(x)) { + throw new TypeError(`${context} is not an object.`); + } + } + function assertRequiredArgument(x, position, context) { + if (x === undefined) { + throw new TypeError(`Parameter ${position} is required in '${context}'.`); + } + } + function assertRequiredField(x, field, context) { + if (x === undefined) { + throw new TypeError(`${field} is required in '${context}'.`); + } + } + // https://heycam.github.io/webidl/#idl-unrestricted-double + function convertUnrestrictedDouble(value) { + return Number(value); + } + function censorNegativeZero(x) { + return x === 0 ? 0 : x; + } + function integerPart(x) { + return censorNegativeZero(MathTrunc(x)); + } + // https://heycam.github.io/webidl/#idl-unsigned-long-long + function convertUnsignedLongLongWithEnforceRange(value, context) { + const lowerBound = 0; + const upperBound = Number.MAX_SAFE_INTEGER; + let x = Number(value); + x = censorNegativeZero(x); + if (!NumberIsFinite(x)) { + throw new TypeError(`${context} is not a finite number`); + } + x = integerPart(x); + if (x < lowerBound || x > upperBound) { + throw new TypeError(`${context} is outside the accepted range of ${lowerBound} to ${upperBound}, inclusive`); + } + if (!NumberIsFinite(x) || x === 0) { + return 0; + } + // TODO Use BigInt if supported? + // let xBigInt = BigInt(integerPart(x)); + // xBigInt = BigInt.asUintN(64, xBigInt); + // return Number(xBigInt); + return x; + } + + function assertReadableStream(x, context) { + if (!IsReadableStream(x)) { + throw new TypeError(`${context} is not a ReadableStream.`); + } + } + + // Abstract operations for the ReadableStream. + function AcquireReadableStreamDefaultReader(stream) { + return new ReadableStreamDefaultReader(stream); + } + // ReadableStream API exposed for controllers. + function ReadableStreamAddReadRequest(stream, readRequest) { + stream._reader._readRequests.push(readRequest); + } + function ReadableStreamFulfillReadRequest(stream, chunk, done) { + const reader = stream._reader; + const readRequest = reader._readRequests.shift(); + if (done) { + readRequest._closeSteps(); + } + else { + readRequest._chunkSteps(chunk); + } + } + function ReadableStreamGetNumReadRequests(stream) { + return stream._reader._readRequests.length; + } + function ReadableStreamHasDefaultReader(stream) { + const reader = stream._reader; + if (reader === undefined) { + return false; + } + if (!IsReadableStreamDefaultReader(reader)) { + return false; + } + return true; + } + /** + * A default reader vended by a {@link ReadableStream}. + * + * @public + */ + class ReadableStreamDefaultReader { + constructor(stream) { + assertRequiredArgument(stream, 1, 'ReadableStreamDefaultReader'); + assertReadableStream(stream, 'First parameter'); + if (IsReadableStreamLocked(stream)) { + throw new TypeError('This stream has already been locked for exclusive reading by another reader'); + } + ReadableStreamReaderGenericInitialize(this, stream); + this._readRequests = new SimpleQueue(); + } + /** + * Returns a promise that will be fulfilled when the stream becomes closed, + * or rejected if the stream ever errors or the reader's lock is released before the stream finishes closing. + */ + get closed() { + if (!IsReadableStreamDefaultReader(this)) { + return promiseRejectedWith(defaultReaderBrandCheckException('closed')); + } + return this._closedPromise; + } + /** + * If the reader is active, behaves the same as {@link ReadableStream.cancel | stream.cancel(reason)}. + */ + cancel(reason = undefined) { + if (!IsReadableStreamDefaultReader(this)) { + return promiseRejectedWith(defaultReaderBrandCheckException('cancel')); + } + if (this._ownerReadableStream === undefined) { + return promiseRejectedWith(readerLockException('cancel')); + } + return ReadableStreamReaderGenericCancel(this, reason); + } + /** + * Returns a promise that allows access to the next chunk from the stream's internal queue, if available. + * + * If reading a chunk causes the queue to become empty, more data will be pulled from the underlying source. + */ + read() { + if (!IsReadableStreamDefaultReader(this)) { + return promiseRejectedWith(defaultReaderBrandCheckException('read')); + } + if (this._ownerReadableStream === undefined) { + return promiseRejectedWith(readerLockException('read from')); + } + let resolvePromise; + let rejectPromise; + const promise = newPromise((resolve, reject) => { + resolvePromise = resolve; + rejectPromise = reject; + }); + const readRequest = { + _chunkSteps: chunk => resolvePromise({ value: chunk, done: false }), + _closeSteps: () => resolvePromise({ value: undefined, done: true }), + _errorSteps: e => rejectPromise(e) + }; + ReadableStreamDefaultReaderRead(this, readRequest); + return promise; + } + /** + * Releases the reader's lock on the corresponding stream. After the lock is released, the reader is no longer active. + * If the associated stream is errored when the lock is released, the reader will appear errored in the same way + * from now on; otherwise, the reader will appear closed. + * + * A reader's lock cannot be released while it still has a pending read request, i.e., if a promise returned by + * the reader's {@link ReadableStreamDefaultReader.read | read()} method has not yet been settled. Attempting to + * do so will throw a `TypeError` and leave the reader locked to the stream. + */ + releaseLock() { + if (!IsReadableStreamDefaultReader(this)) { + throw defaultReaderBrandCheckException('releaseLock'); + } + if (this._ownerReadableStream === undefined) { + return; + } + if (this._readRequests.length > 0) { + throw new TypeError('Tried to release a reader lock when that reader has pending read() calls un-settled'); + } + ReadableStreamReaderGenericRelease(this); + } + } + Object.defineProperties(ReadableStreamDefaultReader.prototype, { + cancel: { enumerable: true }, + read: { enumerable: true }, + releaseLock: { enumerable: true }, + closed: { enumerable: true } + }); + if (typeof SymbolPolyfill.toStringTag === 'symbol') { + Object.defineProperty(ReadableStreamDefaultReader.prototype, SymbolPolyfill.toStringTag, { + value: 'ReadableStreamDefaultReader', + configurable: true + }); + } + // Abstract operations for the readers. + function IsReadableStreamDefaultReader(x) { + if (!typeIsObject(x)) { + return false; + } + if (!Object.prototype.hasOwnProperty.call(x, '_readRequests')) { + return false; + } + return x instanceof ReadableStreamDefaultReader; + } + function ReadableStreamDefaultReaderRead(reader, readRequest) { + const stream = reader._ownerReadableStream; + stream._disturbed = true; + if (stream._state === 'closed') { + readRequest._closeSteps(); + } + else if (stream._state === 'errored') { + readRequest._errorSteps(stream._storedError); + } + else { + stream._readableStreamController[PullSteps](readRequest); + } + } + // Helper functions for the ReadableStreamDefaultReader. + function defaultReaderBrandCheckException(name) { + return new TypeError(`ReadableStreamDefaultReader.prototype.${name} can only be used on a ReadableStreamDefaultReader`); + } + + /// + /* eslint-disable @typescript-eslint/no-empty-function */ + const AsyncIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf(async function* () { }).prototype); + + /// + class ReadableStreamAsyncIteratorImpl { + constructor(reader, preventCancel) { + this._ongoingPromise = undefined; + this._isFinished = false; + this._reader = reader; + this._preventCancel = preventCancel; + } + next() { + const nextSteps = () => this._nextSteps(); + this._ongoingPromise = this._ongoingPromise ? + transformPromiseWith(this._ongoingPromise, nextSteps, nextSteps) : + nextSteps(); + return this._ongoingPromise; + } + return(value) { + const returnSteps = () => this._returnSteps(value); + return this._ongoingPromise ? + transformPromiseWith(this._ongoingPromise, returnSteps, returnSteps) : + returnSteps(); + } + _nextSteps() { + if (this._isFinished) { + return Promise.resolve({ value: undefined, done: true }); + } + const reader = this._reader; + if (reader._ownerReadableStream === undefined) { + return promiseRejectedWith(readerLockException('iterate')); + } + let resolvePromise; + let rejectPromise; + const promise = newPromise((resolve, reject) => { + resolvePromise = resolve; + rejectPromise = reject; + }); + const readRequest = { + _chunkSteps: chunk => { + this._ongoingPromise = undefined; + // This needs to be delayed by one microtask, otherwise we stop pulling too early which breaks a test. + // FIXME Is this a bug in the specification, or in the test? + queueMicrotask(() => resolvePromise({ value: chunk, done: false })); + }, + _closeSteps: () => { + this._ongoingPromise = undefined; + this._isFinished = true; + ReadableStreamReaderGenericRelease(reader); + resolvePromise({ value: undefined, done: true }); + }, + _errorSteps: reason => { + this._ongoingPromise = undefined; + this._isFinished = true; + ReadableStreamReaderGenericRelease(reader); + rejectPromise(reason); + } + }; + ReadableStreamDefaultReaderRead(reader, readRequest); + return promise; + } + _returnSteps(value) { + if (this._isFinished) { + return Promise.resolve({ value, done: true }); + } + this._isFinished = true; + const reader = this._reader; + if (reader._ownerReadableStream === undefined) { + return promiseRejectedWith(readerLockException('finish iterating')); + } + if (!this._preventCancel) { + const result = ReadableStreamReaderGenericCancel(reader, value); + ReadableStreamReaderGenericRelease(reader); + return transformPromiseWith(result, () => ({ value, done: true })); + } + ReadableStreamReaderGenericRelease(reader); + return promiseResolvedWith({ value, done: true }); + } + } + const ReadableStreamAsyncIteratorPrototype = { + next() { + if (!IsReadableStreamAsyncIterator(this)) { + return promiseRejectedWith(streamAsyncIteratorBrandCheckException('next')); + } + return this._asyncIteratorImpl.next(); + }, + return(value) { + if (!IsReadableStreamAsyncIterator(this)) { + return promiseRejectedWith(streamAsyncIteratorBrandCheckException('return')); + } + return this._asyncIteratorImpl.return(value); + } + }; + if (AsyncIteratorPrototype !== undefined) { + Object.setPrototypeOf(ReadableStreamAsyncIteratorPrototype, AsyncIteratorPrototype); + } + // Abstract operations for the ReadableStream. + function AcquireReadableStreamAsyncIterator(stream, preventCancel) { + const reader = AcquireReadableStreamDefaultReader(stream); + const impl = new ReadableStreamAsyncIteratorImpl(reader, preventCancel); + const iterator = Object.create(ReadableStreamAsyncIteratorPrototype); + iterator._asyncIteratorImpl = impl; + return iterator; + } + function IsReadableStreamAsyncIterator(x) { + if (!typeIsObject(x)) { + return false; + } + if (!Object.prototype.hasOwnProperty.call(x, '_asyncIteratorImpl')) { + return false; + } + try { + // noinspection SuspiciousTypeOfGuard + return x._asyncIteratorImpl instanceof + ReadableStreamAsyncIteratorImpl; + } + catch (_a) { + return false; + } + } + // Helper functions for the ReadableStream. + function streamAsyncIteratorBrandCheckException(name) { + return new TypeError(`ReadableStreamAsyncIterator.${name} can only be used on a ReadableSteamAsyncIterator`); + } + + /// + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN#Polyfill + const NumberIsNaN = Number.isNaN || function (x) { + // eslint-disable-next-line no-self-compare + return x !== x; + }; + + function CreateArrayFromList(elements) { + // We use arrays to represent lists, so this is basically a no-op. + // Do a slice though just in case we happen to depend on the unique-ness. + return elements.slice(); + } + function CopyDataBlockBytes(dest, destOffset, src, srcOffset, n) { + new Uint8Array(dest).set(new Uint8Array(src, srcOffset, n), destOffset); + } + // Not implemented correctly + function TransferArrayBuffer(O) { + return O; + } + // Not implemented correctly + // eslint-disable-next-line @typescript-eslint/no-unused-vars + function IsDetachedBuffer(O) { + return false; + } + function ArrayBufferSlice(buffer, begin, end) { + // ArrayBuffer.prototype.slice is not available on IE10 + // https://www.caniuse.com/mdn-javascript_builtins_arraybuffer_slice + if (buffer.slice) { + return buffer.slice(begin, end); + } + const length = end - begin; + const slice = new ArrayBuffer(length); + CopyDataBlockBytes(slice, 0, buffer, begin, length); + return slice; + } + + function IsNonNegativeNumber(v) { + if (typeof v !== 'number') { + return false; + } + if (NumberIsNaN(v)) { + return false; + } + if (v < 0) { + return false; + } + return true; + } + function CloneAsUint8Array(O) { + const buffer = ArrayBufferSlice(O.buffer, O.byteOffset, O.byteOffset + O.byteLength); + return new Uint8Array(buffer); + } + + function DequeueValue(container) { + const pair = container._queue.shift(); + container._queueTotalSize -= pair.size; + if (container._queueTotalSize < 0) { + container._queueTotalSize = 0; + } + return pair.value; + } + function EnqueueValueWithSize(container, value, size) { + if (!IsNonNegativeNumber(size) || size === Infinity) { + throw new RangeError('Size must be a finite, non-NaN, non-negative number.'); + } + container._queue.push({ value, size }); + container._queueTotalSize += size; + } + function PeekQueueValue(container) { + const pair = container._queue.peek(); + return pair.value; + } + function ResetQueue(container) { + container._queue = new SimpleQueue(); + container._queueTotalSize = 0; + } + + /** + * A pull-into request in a {@link ReadableByteStreamController}. + * + * @public + */ + class ReadableStreamBYOBRequest { + constructor() { + throw new TypeError('Illegal constructor'); + } + /** + * Returns the view for writing in to, or `null` if the BYOB request has already been responded to. + */ + get view() { + if (!IsReadableStreamBYOBRequest(this)) { + throw byobRequestBrandCheckException('view'); + } + return this._view; + } + respond(bytesWritten) { + if (!IsReadableStreamBYOBRequest(this)) { + throw byobRequestBrandCheckException('respond'); + } + assertRequiredArgument(bytesWritten, 1, 'respond'); + bytesWritten = convertUnsignedLongLongWithEnforceRange(bytesWritten, 'First parameter'); + if (this._associatedReadableByteStreamController === undefined) { + throw new TypeError('This BYOB request has been invalidated'); + } + if (IsDetachedBuffer(this._view.buffer)) ; + ReadableByteStreamControllerRespond(this._associatedReadableByteStreamController, bytesWritten); + } + respondWithNewView(view) { + if (!IsReadableStreamBYOBRequest(this)) { + throw byobRequestBrandCheckException('respondWithNewView'); + } + assertRequiredArgument(view, 1, 'respondWithNewView'); + if (!ArrayBuffer.isView(view)) { + throw new TypeError('You can only respond with array buffer views'); + } + if (this._associatedReadableByteStreamController === undefined) { + throw new TypeError('This BYOB request has been invalidated'); + } + if (IsDetachedBuffer(view.buffer)) ; + ReadableByteStreamControllerRespondWithNewView(this._associatedReadableByteStreamController, view); + } + } + Object.defineProperties(ReadableStreamBYOBRequest.prototype, { + respond: { enumerable: true }, + respondWithNewView: { enumerable: true }, + view: { enumerable: true } + }); + if (typeof SymbolPolyfill.toStringTag === 'symbol') { + Object.defineProperty(ReadableStreamBYOBRequest.prototype, SymbolPolyfill.toStringTag, { + value: 'ReadableStreamBYOBRequest', + configurable: true + }); + } + /** + * Allows control of a {@link ReadableStream | readable byte stream}'s state and internal queue. + * + * @public + */ + class ReadableByteStreamController { + constructor() { + throw new TypeError('Illegal constructor'); + } + /** + * Returns the current BYOB pull request, or `null` if there isn't one. + */ + get byobRequest() { + if (!IsReadableByteStreamController(this)) { + throw byteStreamControllerBrandCheckException('byobRequest'); + } + return ReadableByteStreamControllerGetBYOBRequest(this); + } + /** + * Returns the desired size to fill the controlled stream's internal queue. It can be negative, if the queue is + * over-full. An underlying byte source ought to use this information to determine when and how to apply backpressure. + */ + get desiredSize() { + if (!IsReadableByteStreamController(this)) { + throw byteStreamControllerBrandCheckException('desiredSize'); + } + return ReadableByteStreamControllerGetDesiredSize(this); + } + /** + * Closes the controlled readable stream. Consumers will still be able to read any previously-enqueued chunks from + * the stream, but once those are read, the stream will become closed. + */ + close() { + if (!IsReadableByteStreamController(this)) { + throw byteStreamControllerBrandCheckException('close'); + } + if (this._closeRequested) { + throw new TypeError('The stream has already been closed; do not close it again!'); + } + const state = this._controlledReadableByteStream._state; + if (state !== 'readable') { + throw new TypeError(`The stream (in ${state} state) is not in the readable state and cannot be closed`); + } + ReadableByteStreamControllerClose(this); + } + enqueue(chunk) { + if (!IsReadableByteStreamController(this)) { + throw byteStreamControllerBrandCheckException('enqueue'); + } + assertRequiredArgument(chunk, 1, 'enqueue'); + if (!ArrayBuffer.isView(chunk)) { + throw new TypeError('chunk must be an array buffer view'); + } + if (chunk.byteLength === 0) { + throw new TypeError('chunk must have non-zero byteLength'); + } + if (chunk.buffer.byteLength === 0) { + throw new TypeError(`chunk's buffer must have non-zero byteLength`); + } + if (this._closeRequested) { + throw new TypeError('stream is closed or draining'); + } + const state = this._controlledReadableByteStream._state; + if (state !== 'readable') { + throw new TypeError(`The stream (in ${state} state) is not in the readable state and cannot be enqueued to`); + } + ReadableByteStreamControllerEnqueue(this, chunk); + } + /** + * Errors the controlled readable stream, making all future interactions with it fail with the given error `e`. + */ + error(e = undefined) { + if (!IsReadableByteStreamController(this)) { + throw byteStreamControllerBrandCheckException('error'); + } + ReadableByteStreamControllerError(this, e); + } + /** @internal */ + [CancelSteps](reason) { + ReadableByteStreamControllerClearPendingPullIntos(this); + ResetQueue(this); + const result = this._cancelAlgorithm(reason); + ReadableByteStreamControllerClearAlgorithms(this); + return result; + } + /** @internal */ + [PullSteps](readRequest) { + const stream = this._controlledReadableByteStream; + if (this._queueTotalSize > 0) { + const entry = this._queue.shift(); + this._queueTotalSize -= entry.byteLength; + ReadableByteStreamControllerHandleQueueDrain(this); + const view = new Uint8Array(entry.buffer, entry.byteOffset, entry.byteLength); + readRequest._chunkSteps(view); + return; + } + const autoAllocateChunkSize = this._autoAllocateChunkSize; + if (autoAllocateChunkSize !== undefined) { + let buffer; + try { + buffer = new ArrayBuffer(autoAllocateChunkSize); + } + catch (bufferE) { + readRequest._errorSteps(bufferE); + return; + } + const pullIntoDescriptor = { + buffer, + bufferByteLength: autoAllocateChunkSize, + byteOffset: 0, + byteLength: autoAllocateChunkSize, + bytesFilled: 0, + elementSize: 1, + viewConstructor: Uint8Array, + readerType: 'default' + }; + this._pendingPullIntos.push(pullIntoDescriptor); + } + ReadableStreamAddReadRequest(stream, readRequest); + ReadableByteStreamControllerCallPullIfNeeded(this); + } + } + Object.defineProperties(ReadableByteStreamController.prototype, { + close: { enumerable: true }, + enqueue: { enumerable: true }, + error: { enumerable: true }, + byobRequest: { enumerable: true }, + desiredSize: { enumerable: true } + }); + if (typeof SymbolPolyfill.toStringTag === 'symbol') { + Object.defineProperty(ReadableByteStreamController.prototype, SymbolPolyfill.toStringTag, { + value: 'ReadableByteStreamController', + configurable: true + }); + } + // Abstract operations for the ReadableByteStreamController. + function IsReadableByteStreamController(x) { + if (!typeIsObject(x)) { + return false; + } + if (!Object.prototype.hasOwnProperty.call(x, '_controlledReadableByteStream')) { + return false; + } + return x instanceof ReadableByteStreamController; + } + function IsReadableStreamBYOBRequest(x) { + if (!typeIsObject(x)) { + return false; + } + if (!Object.prototype.hasOwnProperty.call(x, '_associatedReadableByteStreamController')) { + return false; + } + return x instanceof ReadableStreamBYOBRequest; + } + function ReadableByteStreamControllerCallPullIfNeeded(controller) { + const shouldPull = ReadableByteStreamControllerShouldCallPull(controller); + if (!shouldPull) { + return; + } + if (controller._pulling) { + controller._pullAgain = true; + return; + } + controller._pulling = true; + // TODO: Test controller argument + const pullPromise = controller._pullAlgorithm(); + uponPromise(pullPromise, () => { + controller._pulling = false; + if (controller._pullAgain) { + controller._pullAgain = false; + ReadableByteStreamControllerCallPullIfNeeded(controller); + } + }, e => { + ReadableByteStreamControllerError(controller, e); + }); + } + function ReadableByteStreamControllerClearPendingPullIntos(controller) { + ReadableByteStreamControllerInvalidateBYOBRequest(controller); + controller._pendingPullIntos = new SimpleQueue(); + } + function ReadableByteStreamControllerCommitPullIntoDescriptor(stream, pullIntoDescriptor) { + let done = false; + if (stream._state === 'closed') { + done = true; + } + const filledView = ReadableByteStreamControllerConvertPullIntoDescriptor(pullIntoDescriptor); + if (pullIntoDescriptor.readerType === 'default') { + ReadableStreamFulfillReadRequest(stream, filledView, done); + } + else { + ReadableStreamFulfillReadIntoRequest(stream, filledView, done); + } + } + function ReadableByteStreamControllerConvertPullIntoDescriptor(pullIntoDescriptor) { + const bytesFilled = pullIntoDescriptor.bytesFilled; + const elementSize = pullIntoDescriptor.elementSize; + return new pullIntoDescriptor.viewConstructor(pullIntoDescriptor.buffer, pullIntoDescriptor.byteOffset, bytesFilled / elementSize); + } + function ReadableByteStreamControllerEnqueueChunkToQueue(controller, buffer, byteOffset, byteLength) { + controller._queue.push({ buffer, byteOffset, byteLength }); + controller._queueTotalSize += byteLength; + } + function ReadableByteStreamControllerFillPullIntoDescriptorFromQueue(controller, pullIntoDescriptor) { + const elementSize = pullIntoDescriptor.elementSize; + const currentAlignedBytes = pullIntoDescriptor.bytesFilled - pullIntoDescriptor.bytesFilled % elementSize; + const maxBytesToCopy = Math.min(controller._queueTotalSize, pullIntoDescriptor.byteLength - pullIntoDescriptor.bytesFilled); + const maxBytesFilled = pullIntoDescriptor.bytesFilled + maxBytesToCopy; + const maxAlignedBytes = maxBytesFilled - maxBytesFilled % elementSize; + let totalBytesToCopyRemaining = maxBytesToCopy; + let ready = false; + if (maxAlignedBytes > currentAlignedBytes) { + totalBytesToCopyRemaining = maxAlignedBytes - pullIntoDescriptor.bytesFilled; + ready = true; + } + const queue = controller._queue; + while (totalBytesToCopyRemaining > 0) { + const headOfQueue = queue.peek(); + const bytesToCopy = Math.min(totalBytesToCopyRemaining, headOfQueue.byteLength); + const destStart = pullIntoDescriptor.byteOffset + pullIntoDescriptor.bytesFilled; + CopyDataBlockBytes(pullIntoDescriptor.buffer, destStart, headOfQueue.buffer, headOfQueue.byteOffset, bytesToCopy); + if (headOfQueue.byteLength === bytesToCopy) { + queue.shift(); + } + else { + headOfQueue.byteOffset += bytesToCopy; + headOfQueue.byteLength -= bytesToCopy; + } + controller._queueTotalSize -= bytesToCopy; + ReadableByteStreamControllerFillHeadPullIntoDescriptor(controller, bytesToCopy, pullIntoDescriptor); + totalBytesToCopyRemaining -= bytesToCopy; + } + return ready; + } + function ReadableByteStreamControllerFillHeadPullIntoDescriptor(controller, size, pullIntoDescriptor) { + pullIntoDescriptor.bytesFilled += size; + } + function ReadableByteStreamControllerHandleQueueDrain(controller) { + if (controller._queueTotalSize === 0 && controller._closeRequested) { + ReadableByteStreamControllerClearAlgorithms(controller); + ReadableStreamClose(controller._controlledReadableByteStream); + } + else { + ReadableByteStreamControllerCallPullIfNeeded(controller); + } + } + function ReadableByteStreamControllerInvalidateBYOBRequest(controller) { + if (controller._byobRequest === null) { + return; + } + controller._byobRequest._associatedReadableByteStreamController = undefined; + controller._byobRequest._view = null; + controller._byobRequest = null; + } + function ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(controller) { + while (controller._pendingPullIntos.length > 0) { + if (controller._queueTotalSize === 0) { + return; + } + const pullIntoDescriptor = controller._pendingPullIntos.peek(); + if (ReadableByteStreamControllerFillPullIntoDescriptorFromQueue(controller, pullIntoDescriptor)) { + ReadableByteStreamControllerShiftPendingPullInto(controller); + ReadableByteStreamControllerCommitPullIntoDescriptor(controller._controlledReadableByteStream, pullIntoDescriptor); + } + } + } + function ReadableByteStreamControllerPullInto(controller, view, readIntoRequest) { + const stream = controller._controlledReadableByteStream; + let elementSize = 1; + if (view.constructor !== DataView) { + elementSize = view.constructor.BYTES_PER_ELEMENT; + } + const ctor = view.constructor; + // try { + const buffer = TransferArrayBuffer(view.buffer); + // } catch (e) { + // readIntoRequest._errorSteps(e); + // return; + // } + const pullIntoDescriptor = { + buffer, + bufferByteLength: buffer.byteLength, + byteOffset: view.byteOffset, + byteLength: view.byteLength, + bytesFilled: 0, + elementSize, + viewConstructor: ctor, + readerType: 'byob' + }; + if (controller._pendingPullIntos.length > 0) { + controller._pendingPullIntos.push(pullIntoDescriptor); + // No ReadableByteStreamControllerCallPullIfNeeded() call since: + // - No change happens on desiredSize + // - The source has already been notified of that there's at least 1 pending read(view) + ReadableStreamAddReadIntoRequest(stream, readIntoRequest); + return; + } + if (stream._state === 'closed') { + const emptyView = new ctor(pullIntoDescriptor.buffer, pullIntoDescriptor.byteOffset, 0); + readIntoRequest._closeSteps(emptyView); + return; + } + if (controller._queueTotalSize > 0) { + if (ReadableByteStreamControllerFillPullIntoDescriptorFromQueue(controller, pullIntoDescriptor)) { + const filledView = ReadableByteStreamControllerConvertPullIntoDescriptor(pullIntoDescriptor); + ReadableByteStreamControllerHandleQueueDrain(controller); + readIntoRequest._chunkSteps(filledView); + return; + } + if (controller._closeRequested) { + const e = new TypeError('Insufficient bytes to fill elements in the given buffer'); + ReadableByteStreamControllerError(controller, e); + readIntoRequest._errorSteps(e); + return; + } + } + controller._pendingPullIntos.push(pullIntoDescriptor); + ReadableStreamAddReadIntoRequest(stream, readIntoRequest); + ReadableByteStreamControllerCallPullIfNeeded(controller); + } + function ReadableByteStreamControllerRespondInClosedState(controller, firstDescriptor) { + const stream = controller._controlledReadableByteStream; + if (ReadableStreamHasBYOBReader(stream)) { + while (ReadableStreamGetNumReadIntoRequests(stream) > 0) { + const pullIntoDescriptor = ReadableByteStreamControllerShiftPendingPullInto(controller); + ReadableByteStreamControllerCommitPullIntoDescriptor(stream, pullIntoDescriptor); + } + } + } + function ReadableByteStreamControllerRespondInReadableState(controller, bytesWritten, pullIntoDescriptor) { + ReadableByteStreamControllerFillHeadPullIntoDescriptor(controller, bytesWritten, pullIntoDescriptor); + if (pullIntoDescriptor.bytesFilled < pullIntoDescriptor.elementSize) { + return; + } + ReadableByteStreamControllerShiftPendingPullInto(controller); + const remainderSize = pullIntoDescriptor.bytesFilled % pullIntoDescriptor.elementSize; + if (remainderSize > 0) { + const end = pullIntoDescriptor.byteOffset + pullIntoDescriptor.bytesFilled; + const remainder = ArrayBufferSlice(pullIntoDescriptor.buffer, end - remainderSize, end); + ReadableByteStreamControllerEnqueueChunkToQueue(controller, remainder, 0, remainder.byteLength); + } + pullIntoDescriptor.bytesFilled -= remainderSize; + ReadableByteStreamControllerCommitPullIntoDescriptor(controller._controlledReadableByteStream, pullIntoDescriptor); + ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(controller); + } + function ReadableByteStreamControllerRespondInternal(controller, bytesWritten) { + const firstDescriptor = controller._pendingPullIntos.peek(); + ReadableByteStreamControllerInvalidateBYOBRequest(controller); + const state = controller._controlledReadableByteStream._state; + if (state === 'closed') { + ReadableByteStreamControllerRespondInClosedState(controller); + } + else { + ReadableByteStreamControllerRespondInReadableState(controller, bytesWritten, firstDescriptor); + } + ReadableByteStreamControllerCallPullIfNeeded(controller); + } + function ReadableByteStreamControllerShiftPendingPullInto(controller) { + const descriptor = controller._pendingPullIntos.shift(); + return descriptor; + } + function ReadableByteStreamControllerShouldCallPull(controller) { + const stream = controller._controlledReadableByteStream; + if (stream._state !== 'readable') { + return false; + } + if (controller._closeRequested) { + return false; + } + if (!controller._started) { + return false; + } + if (ReadableStreamHasDefaultReader(stream) && ReadableStreamGetNumReadRequests(stream) > 0) { + return true; + } + if (ReadableStreamHasBYOBReader(stream) && ReadableStreamGetNumReadIntoRequests(stream) > 0) { + return true; + } + const desiredSize = ReadableByteStreamControllerGetDesiredSize(controller); + if (desiredSize > 0) { + return true; + } + return false; + } + function ReadableByteStreamControllerClearAlgorithms(controller) { + controller._pullAlgorithm = undefined; + controller._cancelAlgorithm = undefined; + } + // A client of ReadableByteStreamController may use these functions directly to bypass state check. + function ReadableByteStreamControllerClose(controller) { + const stream = controller._controlledReadableByteStream; + if (controller._closeRequested || stream._state !== 'readable') { + return; + } + if (controller._queueTotalSize > 0) { + controller._closeRequested = true; + return; + } + if (controller._pendingPullIntos.length > 0) { + const firstPendingPullInto = controller._pendingPullIntos.peek(); + if (firstPendingPullInto.bytesFilled > 0) { + const e = new TypeError('Insufficient bytes to fill elements in the given buffer'); + ReadableByteStreamControllerError(controller, e); + throw e; + } + } + ReadableByteStreamControllerClearAlgorithms(controller); + ReadableStreamClose(stream); + } + function ReadableByteStreamControllerEnqueue(controller, chunk) { + const stream = controller._controlledReadableByteStream; + if (controller._closeRequested || stream._state !== 'readable') { + return; + } + const buffer = chunk.buffer; + const byteOffset = chunk.byteOffset; + const byteLength = chunk.byteLength; + const transferredBuffer = TransferArrayBuffer(buffer); + if (controller._pendingPullIntos.length > 0) { + const firstPendingPullInto = controller._pendingPullIntos.peek(); + if (IsDetachedBuffer(firstPendingPullInto.buffer)) ; + firstPendingPullInto.buffer = TransferArrayBuffer(firstPendingPullInto.buffer); + } + ReadableByteStreamControllerInvalidateBYOBRequest(controller); + if (ReadableStreamHasDefaultReader(stream)) { + if (ReadableStreamGetNumReadRequests(stream) === 0) { + ReadableByteStreamControllerEnqueueChunkToQueue(controller, transferredBuffer, byteOffset, byteLength); + } + else { + if (controller._pendingPullIntos.length > 0) { + ReadableByteStreamControllerShiftPendingPullInto(controller); + } + const transferredView = new Uint8Array(transferredBuffer, byteOffset, byteLength); + ReadableStreamFulfillReadRequest(stream, transferredView, false); + } + } + else if (ReadableStreamHasBYOBReader(stream)) { + // TODO: Ideally in this branch detaching should happen only if the buffer is not consumed fully. + ReadableByteStreamControllerEnqueueChunkToQueue(controller, transferredBuffer, byteOffset, byteLength); + ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(controller); + } + else { + ReadableByteStreamControllerEnqueueChunkToQueue(controller, transferredBuffer, byteOffset, byteLength); + } + ReadableByteStreamControllerCallPullIfNeeded(controller); + } + function ReadableByteStreamControllerError(controller, e) { + const stream = controller._controlledReadableByteStream; + if (stream._state !== 'readable') { + return; + } + ReadableByteStreamControllerClearPendingPullIntos(controller); + ResetQueue(controller); + ReadableByteStreamControllerClearAlgorithms(controller); + ReadableStreamError(stream, e); + } + function ReadableByteStreamControllerGetBYOBRequest(controller) { + if (controller._byobRequest === null && controller._pendingPullIntos.length > 0) { + const firstDescriptor = controller._pendingPullIntos.peek(); + const view = new Uint8Array(firstDescriptor.buffer, firstDescriptor.byteOffset + firstDescriptor.bytesFilled, firstDescriptor.byteLength - firstDescriptor.bytesFilled); + const byobRequest = Object.create(ReadableStreamBYOBRequest.prototype); + SetUpReadableStreamBYOBRequest(byobRequest, controller, view); + controller._byobRequest = byobRequest; + } + return controller._byobRequest; + } + function ReadableByteStreamControllerGetDesiredSize(controller) { + const state = controller._controlledReadableByteStream._state; + if (state === 'errored') { + return null; + } + if (state === 'closed') { + return 0; + } + return controller._strategyHWM - controller._queueTotalSize; + } + function ReadableByteStreamControllerRespond(controller, bytesWritten) { + const firstDescriptor = controller._pendingPullIntos.peek(); + const state = controller._controlledReadableByteStream._state; + if (state === 'closed') { + if (bytesWritten !== 0) { + throw new TypeError('bytesWritten must be 0 when calling respond() on a closed stream'); + } + } + else { + if (bytesWritten === 0) { + throw new TypeError('bytesWritten must be greater than 0 when calling respond() on a readable stream'); + } + if (firstDescriptor.bytesFilled + bytesWritten > firstDescriptor.byteLength) { + throw new RangeError('bytesWritten out of range'); + } + } + firstDescriptor.buffer = TransferArrayBuffer(firstDescriptor.buffer); + ReadableByteStreamControllerRespondInternal(controller, bytesWritten); + } + function ReadableByteStreamControllerRespondWithNewView(controller, view) { + const firstDescriptor = controller._pendingPullIntos.peek(); + const state = controller._controlledReadableByteStream._state; + if (state === 'closed') { + if (view.byteLength !== 0) { + throw new TypeError('The view\'s length must be 0 when calling respondWithNewView() on a closed stream'); + } + } + else { + if (view.byteLength === 0) { + throw new TypeError('The view\'s length must be greater than 0 when calling respondWithNewView() on a readable stream'); + } + } + if (firstDescriptor.byteOffset + firstDescriptor.bytesFilled !== view.byteOffset) { + throw new RangeError('The region specified by view does not match byobRequest'); + } + if (firstDescriptor.bufferByteLength !== view.buffer.byteLength) { + throw new RangeError('The buffer of view has different capacity than byobRequest'); + } + if (firstDescriptor.bytesFilled + view.byteLength > firstDescriptor.byteLength) { + throw new RangeError('The region specified by view is larger than byobRequest'); + } + const viewByteLength = view.byteLength; + firstDescriptor.buffer = TransferArrayBuffer(view.buffer); + ReadableByteStreamControllerRespondInternal(controller, viewByteLength); + } + function SetUpReadableByteStreamController(stream, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark, autoAllocateChunkSize) { + controller._controlledReadableByteStream = stream; + controller._pullAgain = false; + controller._pulling = false; + controller._byobRequest = null; + // Need to set the slots so that the assert doesn't fire. In the spec the slots already exist implicitly. + controller._queue = controller._queueTotalSize = undefined; + ResetQueue(controller); + controller._closeRequested = false; + controller._started = false; + controller._strategyHWM = highWaterMark; + controller._pullAlgorithm = pullAlgorithm; + controller._cancelAlgorithm = cancelAlgorithm; + controller._autoAllocateChunkSize = autoAllocateChunkSize; + controller._pendingPullIntos = new SimpleQueue(); + stream._readableStreamController = controller; + const startResult = startAlgorithm(); + uponPromise(promiseResolvedWith(startResult), () => { + controller._started = true; + ReadableByteStreamControllerCallPullIfNeeded(controller); + }, r => { + ReadableByteStreamControllerError(controller, r); + }); + } + function SetUpReadableByteStreamControllerFromUnderlyingSource(stream, underlyingByteSource, highWaterMark) { + const controller = Object.create(ReadableByteStreamController.prototype); + let startAlgorithm = () => undefined; + let pullAlgorithm = () => promiseResolvedWith(undefined); + let cancelAlgorithm = () => promiseResolvedWith(undefined); + if (underlyingByteSource.start !== undefined) { + startAlgorithm = () => underlyingByteSource.start(controller); + } + if (underlyingByteSource.pull !== undefined) { + pullAlgorithm = () => underlyingByteSource.pull(controller); + } + if (underlyingByteSource.cancel !== undefined) { + cancelAlgorithm = reason => underlyingByteSource.cancel(reason); + } + const autoAllocateChunkSize = underlyingByteSource.autoAllocateChunkSize; + if (autoAllocateChunkSize === 0) { + throw new TypeError('autoAllocateChunkSize must be greater than 0'); + } + SetUpReadableByteStreamController(stream, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark, autoAllocateChunkSize); + } + function SetUpReadableStreamBYOBRequest(request, controller, view) { + request._associatedReadableByteStreamController = controller; + request._view = view; + } + // Helper functions for the ReadableStreamBYOBRequest. + function byobRequestBrandCheckException(name) { + return new TypeError(`ReadableStreamBYOBRequest.prototype.${name} can only be used on a ReadableStreamBYOBRequest`); + } + // Helper functions for the ReadableByteStreamController. + function byteStreamControllerBrandCheckException(name) { + return new TypeError(`ReadableByteStreamController.prototype.${name} can only be used on a ReadableByteStreamController`); + } + + // Abstract operations for the ReadableStream. + function AcquireReadableStreamBYOBReader(stream) { + return new ReadableStreamBYOBReader(stream); + } + // ReadableStream API exposed for controllers. + function ReadableStreamAddReadIntoRequest(stream, readIntoRequest) { + stream._reader._readIntoRequests.push(readIntoRequest); + } + function ReadableStreamFulfillReadIntoRequest(stream, chunk, done) { + const reader = stream._reader; + const readIntoRequest = reader._readIntoRequests.shift(); + if (done) { + readIntoRequest._closeSteps(chunk); + } + else { + readIntoRequest._chunkSteps(chunk); + } + } + function ReadableStreamGetNumReadIntoRequests(stream) { + return stream._reader._readIntoRequests.length; + } + function ReadableStreamHasBYOBReader(stream) { + const reader = stream._reader; + if (reader === undefined) { + return false; + } + if (!IsReadableStreamBYOBReader(reader)) { + return false; + } + return true; + } + /** + * A BYOB reader vended by a {@link ReadableStream}. + * + * @public + */ + class ReadableStreamBYOBReader { + constructor(stream) { + assertRequiredArgument(stream, 1, 'ReadableStreamBYOBReader'); + assertReadableStream(stream, 'First parameter'); + if (IsReadableStreamLocked(stream)) { + throw new TypeError('This stream has already been locked for exclusive reading by another reader'); + } + if (!IsReadableByteStreamController(stream._readableStreamController)) { + throw new TypeError('Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte ' + + 'source'); + } + ReadableStreamReaderGenericInitialize(this, stream); + this._readIntoRequests = new SimpleQueue(); + } + /** + * Returns a promise that will be fulfilled when the stream becomes closed, or rejected if the stream ever errors or + * the reader's lock is released before the stream finishes closing. + */ + get closed() { + if (!IsReadableStreamBYOBReader(this)) { + return promiseRejectedWith(byobReaderBrandCheckException('closed')); + } + return this._closedPromise; + } + /** + * If the reader is active, behaves the same as {@link ReadableStream.cancel | stream.cancel(reason)}. + */ + cancel(reason = undefined) { + if (!IsReadableStreamBYOBReader(this)) { + return promiseRejectedWith(byobReaderBrandCheckException('cancel')); + } + if (this._ownerReadableStream === undefined) { + return promiseRejectedWith(readerLockException('cancel')); + } + return ReadableStreamReaderGenericCancel(this, reason); + } + /** + * Attempts to reads bytes into view, and returns a promise resolved with the result. + * + * If reading a chunk causes the queue to become empty, more data will be pulled from the underlying source. + */ + read(view) { + if (!IsReadableStreamBYOBReader(this)) { + return promiseRejectedWith(byobReaderBrandCheckException('read')); + } + if (!ArrayBuffer.isView(view)) { + return promiseRejectedWith(new TypeError('view must be an array buffer view')); + } + if (view.byteLength === 0) { + return promiseRejectedWith(new TypeError('view must have non-zero byteLength')); + } + if (view.buffer.byteLength === 0) { + return promiseRejectedWith(new TypeError(`view's buffer must have non-zero byteLength`)); + } + if (IsDetachedBuffer(view.buffer)) ; + if (this._ownerReadableStream === undefined) { + return promiseRejectedWith(readerLockException('read from')); + } + let resolvePromise; + let rejectPromise; + const promise = newPromise((resolve, reject) => { + resolvePromise = resolve; + rejectPromise = reject; + }); + const readIntoRequest = { + _chunkSteps: chunk => resolvePromise({ value: chunk, done: false }), + _closeSteps: chunk => resolvePromise({ value: chunk, done: true }), + _errorSteps: e => rejectPromise(e) + }; + ReadableStreamBYOBReaderRead(this, view, readIntoRequest); + return promise; + } + /** + * Releases the reader's lock on the corresponding stream. After the lock is released, the reader is no longer active. + * If the associated stream is errored when the lock is released, the reader will appear errored in the same way + * from now on; otherwise, the reader will appear closed. + * + * A reader's lock cannot be released while it still has a pending read request, i.e., if a promise returned by + * the reader's {@link ReadableStreamBYOBReader.read | read()} method has not yet been settled. Attempting to + * do so will throw a `TypeError` and leave the reader locked to the stream. + */ + releaseLock() { + if (!IsReadableStreamBYOBReader(this)) { + throw byobReaderBrandCheckException('releaseLock'); + } + if (this._ownerReadableStream === undefined) { + return; + } + if (this._readIntoRequests.length > 0) { + throw new TypeError('Tried to release a reader lock when that reader has pending read() calls un-settled'); + } + ReadableStreamReaderGenericRelease(this); + } + } + Object.defineProperties(ReadableStreamBYOBReader.prototype, { + cancel: { enumerable: true }, + read: { enumerable: true }, + releaseLock: { enumerable: true }, + closed: { enumerable: true } + }); + if (typeof SymbolPolyfill.toStringTag === 'symbol') { + Object.defineProperty(ReadableStreamBYOBReader.prototype, SymbolPolyfill.toStringTag, { + value: 'ReadableStreamBYOBReader', + configurable: true + }); + } + // Abstract operations for the readers. + function IsReadableStreamBYOBReader(x) { + if (!typeIsObject(x)) { + return false; + } + if (!Object.prototype.hasOwnProperty.call(x, '_readIntoRequests')) { + return false; + } + return x instanceof ReadableStreamBYOBReader; + } + function ReadableStreamBYOBReaderRead(reader, view, readIntoRequest) { + const stream = reader._ownerReadableStream; + stream._disturbed = true; + if (stream._state === 'errored') { + readIntoRequest._errorSteps(stream._storedError); + } + else { + ReadableByteStreamControllerPullInto(stream._readableStreamController, view, readIntoRequest); + } + } + // Helper functions for the ReadableStreamBYOBReader. + function byobReaderBrandCheckException(name) { + return new TypeError(`ReadableStreamBYOBReader.prototype.${name} can only be used on a ReadableStreamBYOBReader`); + } + + function ExtractHighWaterMark(strategy, defaultHWM) { + const { highWaterMark } = strategy; + if (highWaterMark === undefined) { + return defaultHWM; + } + if (NumberIsNaN(highWaterMark) || highWaterMark < 0) { + throw new RangeError('Invalid highWaterMark'); + } + return highWaterMark; + } + function ExtractSizeAlgorithm(strategy) { + const { size } = strategy; + if (!size) { + return () => 1; + } + return size; + } + + function convertQueuingStrategy(init, context) { + assertDictionary(init, context); + const highWaterMark = init === null || init === void 0 ? void 0 : init.highWaterMark; + const size = init === null || init === void 0 ? void 0 : init.size; + return { + highWaterMark: highWaterMark === undefined ? undefined : convertUnrestrictedDouble(highWaterMark), + size: size === undefined ? undefined : convertQueuingStrategySize(size, `${context} has member 'size' that`) + }; + } + function convertQueuingStrategySize(fn, context) { + assertFunction(fn, context); + return chunk => convertUnrestrictedDouble(fn(chunk)); + } + + function convertUnderlyingSink(original, context) { + assertDictionary(original, context); + const abort = original === null || original === void 0 ? void 0 : original.abort; + const close = original === null || original === void 0 ? void 0 : original.close; + const start = original === null || original === void 0 ? void 0 : original.start; + const type = original === null || original === void 0 ? void 0 : original.type; + const write = original === null || original === void 0 ? void 0 : original.write; + return { + abort: abort === undefined ? + undefined : + convertUnderlyingSinkAbortCallback(abort, original, `${context} has member 'abort' that`), + close: close === undefined ? + undefined : + convertUnderlyingSinkCloseCallback(close, original, `${context} has member 'close' that`), + start: start === undefined ? + undefined : + convertUnderlyingSinkStartCallback(start, original, `${context} has member 'start' that`), + write: write === undefined ? + undefined : + convertUnderlyingSinkWriteCallback(write, original, `${context} has member 'write' that`), + type + }; + } + function convertUnderlyingSinkAbortCallback(fn, original, context) { + assertFunction(fn, context); + return (reason) => promiseCall(fn, original, [reason]); + } + function convertUnderlyingSinkCloseCallback(fn, original, context) { + assertFunction(fn, context); + return () => promiseCall(fn, original, []); + } + function convertUnderlyingSinkStartCallback(fn, original, context) { + assertFunction(fn, context); + return (controller) => reflectCall(fn, original, [controller]); + } + function convertUnderlyingSinkWriteCallback(fn, original, context) { + assertFunction(fn, context); + return (chunk, controller) => promiseCall(fn, original, [chunk, controller]); + } + + function assertWritableStream(x, context) { + if (!IsWritableStream(x)) { + throw new TypeError(`${context} is not a WritableStream.`); + } + } + + function isAbortSignal(value) { + if (typeof value !== 'object' || value === null) { + return false; + } + try { + return typeof value.aborted === 'boolean'; + } + catch (_a) { + // AbortSignal.prototype.aborted throws if its brand check fails + return false; + } + } + const supportsAbortController = typeof AbortController === 'function'; + /** + * Construct a new AbortController, if supported by the platform. + * + * @internal + */ + function createAbortController() { + if (supportsAbortController) { + return new AbortController(); + } + return undefined; + } + + /** + * A writable stream represents a destination for data, into which you can write. + * + * @public + */ + class WritableStream { + constructor(rawUnderlyingSink = {}, rawStrategy = {}) { + if (rawUnderlyingSink === undefined) { + rawUnderlyingSink = null; + } + else { + assertObject(rawUnderlyingSink, 'First parameter'); + } + const strategy = convertQueuingStrategy(rawStrategy, 'Second parameter'); + const underlyingSink = convertUnderlyingSink(rawUnderlyingSink, 'First parameter'); + InitializeWritableStream(this); + const type = underlyingSink.type; + if (type !== undefined) { + throw new RangeError('Invalid type is specified'); + } + const sizeAlgorithm = ExtractSizeAlgorithm(strategy); + const highWaterMark = ExtractHighWaterMark(strategy, 1); + SetUpWritableStreamDefaultControllerFromUnderlyingSink(this, underlyingSink, highWaterMark, sizeAlgorithm); + } + /** + * Returns whether or not the writable stream is locked to a writer. + */ + get locked() { + if (!IsWritableStream(this)) { + throw streamBrandCheckException$2('locked'); + } + return IsWritableStreamLocked(this); + } + /** + * Aborts the stream, signaling that the producer can no longer successfully write to the stream and it is to be + * immediately moved to an errored state, with any queued-up writes discarded. This will also execute any abort + * mechanism of the underlying sink. + * + * The returned promise will fulfill if the stream shuts down successfully, or reject if the underlying sink signaled + * that there was an error doing so. Additionally, it will reject with a `TypeError` (without attempting to cancel + * the stream) if the stream is currently locked. + */ + abort(reason = undefined) { + if (!IsWritableStream(this)) { + return promiseRejectedWith(streamBrandCheckException$2('abort')); + } + if (IsWritableStreamLocked(this)) { + return promiseRejectedWith(new TypeError('Cannot abort a stream that already has a writer')); + } + return WritableStreamAbort(this, reason); + } + /** + * Closes the stream. The underlying sink will finish processing any previously-written chunks, before invoking its + * close behavior. During this time any further attempts to write will fail (without erroring the stream). + * + * The method returns a promise that will fulfill if all remaining chunks are successfully written and the stream + * successfully closes, or rejects if an error is encountered during this process. Additionally, it will reject with + * a `TypeError` (without attempting to cancel the stream) if the stream is currently locked. + */ + close() { + if (!IsWritableStream(this)) { + return promiseRejectedWith(streamBrandCheckException$2('close')); + } + if (IsWritableStreamLocked(this)) { + return promiseRejectedWith(new TypeError('Cannot close a stream that already has a writer')); + } + if (WritableStreamCloseQueuedOrInFlight(this)) { + return promiseRejectedWith(new TypeError('Cannot close an already-closing stream')); + } + return WritableStreamClose(this); + } + /** + * Creates a {@link WritableStreamDefaultWriter | writer} and locks the stream to the new writer. While the stream + * is locked, no other writer can be acquired until this one is released. + * + * This functionality is especially useful for creating abstractions that desire the ability to write to a stream + * without interruption or interleaving. By getting a writer for the stream, you can ensure nobody else can write at + * the same time, which would cause the resulting written data to be unpredictable and probably useless. + */ + getWriter() { + if (!IsWritableStream(this)) { + throw streamBrandCheckException$2('getWriter'); + } + return AcquireWritableStreamDefaultWriter(this); + } + } + Object.defineProperties(WritableStream.prototype, { + abort: { enumerable: true }, + close: { enumerable: true }, + getWriter: { enumerable: true }, + locked: { enumerable: true } + }); + if (typeof SymbolPolyfill.toStringTag === 'symbol') { + Object.defineProperty(WritableStream.prototype, SymbolPolyfill.toStringTag, { + value: 'WritableStream', + configurable: true + }); + } + // Abstract operations for the WritableStream. + function AcquireWritableStreamDefaultWriter(stream) { + return new WritableStreamDefaultWriter(stream); + } + // Throws if and only if startAlgorithm throws. + function CreateWritableStream(startAlgorithm, writeAlgorithm, closeAlgorithm, abortAlgorithm, highWaterMark = 1, sizeAlgorithm = () => 1) { + const stream = Object.create(WritableStream.prototype); + InitializeWritableStream(stream); + const controller = Object.create(WritableStreamDefaultController.prototype); + SetUpWritableStreamDefaultController(stream, controller, startAlgorithm, writeAlgorithm, closeAlgorithm, abortAlgorithm, highWaterMark, sizeAlgorithm); + return stream; + } + function InitializeWritableStream(stream) { + stream._state = 'writable'; + // The error that will be reported by new method calls once the state becomes errored. Only set when [[state]] is + // 'erroring' or 'errored'. May be set to an undefined value. + stream._storedError = undefined; + stream._writer = undefined; + // Initialize to undefined first because the constructor of the controller checks this + // variable to validate the caller. + stream._writableStreamController = undefined; + // This queue is placed here instead of the writer class in order to allow for passing a writer to the next data + // producer without waiting for the queued writes to finish. + stream._writeRequests = new SimpleQueue(); + // Write requests are removed from _writeRequests when write() is called on the underlying sink. This prevents + // them from being erroneously rejected on error. If a write() call is in-flight, the request is stored here. + stream._inFlightWriteRequest = undefined; + // The promise that was returned from writer.close(). Stored here because it may be fulfilled after the writer + // has been detached. + stream._closeRequest = undefined; + // Close request is removed from _closeRequest when close() is called on the underlying sink. This prevents it + // from being erroneously rejected on error. If a close() call is in-flight, the request is stored here. + stream._inFlightCloseRequest = undefined; + // The promise that was returned from writer.abort(). This may also be fulfilled after the writer has detached. + stream._pendingAbortRequest = undefined; + // The backpressure signal set by the controller. + stream._backpressure = false; + } + function IsWritableStream(x) { + if (!typeIsObject(x)) { + return false; + } + if (!Object.prototype.hasOwnProperty.call(x, '_writableStreamController')) { + return false; + } + return x instanceof WritableStream; + } + function IsWritableStreamLocked(stream) { + if (stream._writer === undefined) { + return false; + } + return true; + } + function WritableStreamAbort(stream, reason) { + var _a; + if (stream._state === 'closed' || stream._state === 'errored') { + return promiseResolvedWith(undefined); + } + stream._writableStreamController._abortReason = reason; + (_a = stream._writableStreamController._abortController) === null || _a === void 0 ? void 0 : _a.abort(); + // TypeScript narrows the type of `stream._state` down to 'writable' | 'erroring', + // but it doesn't know that signaling abort runs author code that might have changed the state. + // Widen the type again by casting to WritableStreamState. + const state = stream._state; + if (state === 'closed' || state === 'errored') { + return promiseResolvedWith(undefined); + } + if (stream._pendingAbortRequest !== undefined) { + return stream._pendingAbortRequest._promise; + } + let wasAlreadyErroring = false; + if (state === 'erroring') { + wasAlreadyErroring = true; + // reason will not be used, so don't keep a reference to it. + reason = undefined; + } + const promise = newPromise((resolve, reject) => { + stream._pendingAbortRequest = { + _promise: undefined, + _resolve: resolve, + _reject: reject, + _reason: reason, + _wasAlreadyErroring: wasAlreadyErroring + }; + }); + stream._pendingAbortRequest._promise = promise; + if (!wasAlreadyErroring) { + WritableStreamStartErroring(stream, reason); + } + return promise; + } + function WritableStreamClose(stream) { + const state = stream._state; + if (state === 'closed' || state === 'errored') { + return promiseRejectedWith(new TypeError(`The stream (in ${state} state) is not in the writable state and cannot be closed`)); + } + const promise = newPromise((resolve, reject) => { + const closeRequest = { + _resolve: resolve, + _reject: reject + }; + stream._closeRequest = closeRequest; + }); + const writer = stream._writer; + if (writer !== undefined && stream._backpressure && state === 'writable') { + defaultWriterReadyPromiseResolve(writer); + } + WritableStreamDefaultControllerClose(stream._writableStreamController); + return promise; + } + // WritableStream API exposed for controllers. + function WritableStreamAddWriteRequest(stream) { + const promise = newPromise((resolve, reject) => { + const writeRequest = { + _resolve: resolve, + _reject: reject + }; + stream._writeRequests.push(writeRequest); + }); + return promise; + } + function WritableStreamDealWithRejection(stream, error) { + const state = stream._state; + if (state === 'writable') { + WritableStreamStartErroring(stream, error); + return; + } + WritableStreamFinishErroring(stream); + } + function WritableStreamStartErroring(stream, reason) { + const controller = stream._writableStreamController; + stream._state = 'erroring'; + stream._storedError = reason; + const writer = stream._writer; + if (writer !== undefined) { + WritableStreamDefaultWriterEnsureReadyPromiseRejected(writer, reason); + } + if (!WritableStreamHasOperationMarkedInFlight(stream) && controller._started) { + WritableStreamFinishErroring(stream); + } + } + function WritableStreamFinishErroring(stream) { + stream._state = 'errored'; + stream._writableStreamController[ErrorSteps](); + const storedError = stream._storedError; + stream._writeRequests.forEach(writeRequest => { + writeRequest._reject(storedError); + }); + stream._writeRequests = new SimpleQueue(); + if (stream._pendingAbortRequest === undefined) { + WritableStreamRejectCloseAndClosedPromiseIfNeeded(stream); + return; + } + const abortRequest = stream._pendingAbortRequest; + stream._pendingAbortRequest = undefined; + if (abortRequest._wasAlreadyErroring) { + abortRequest._reject(storedError); + WritableStreamRejectCloseAndClosedPromiseIfNeeded(stream); + return; + } + const promise = stream._writableStreamController[AbortSteps](abortRequest._reason); + uponPromise(promise, () => { + abortRequest._resolve(); + WritableStreamRejectCloseAndClosedPromiseIfNeeded(stream); + }, (reason) => { + abortRequest._reject(reason); + WritableStreamRejectCloseAndClosedPromiseIfNeeded(stream); + }); + } + function WritableStreamFinishInFlightWrite(stream) { + stream._inFlightWriteRequest._resolve(undefined); + stream._inFlightWriteRequest = undefined; + } + function WritableStreamFinishInFlightWriteWithError(stream, error) { + stream._inFlightWriteRequest._reject(error); + stream._inFlightWriteRequest = undefined; + WritableStreamDealWithRejection(stream, error); + } + function WritableStreamFinishInFlightClose(stream) { + stream._inFlightCloseRequest._resolve(undefined); + stream._inFlightCloseRequest = undefined; + const state = stream._state; + if (state === 'erroring') { + // The error was too late to do anything, so it is ignored. + stream._storedError = undefined; + if (stream._pendingAbortRequest !== undefined) { + stream._pendingAbortRequest._resolve(); + stream._pendingAbortRequest = undefined; + } + } + stream._state = 'closed'; + const writer = stream._writer; + if (writer !== undefined) { + defaultWriterClosedPromiseResolve(writer); + } + } + function WritableStreamFinishInFlightCloseWithError(stream, error) { + stream._inFlightCloseRequest._reject(error); + stream._inFlightCloseRequest = undefined; + // Never execute sink abort() after sink close(). + if (stream._pendingAbortRequest !== undefined) { + stream._pendingAbortRequest._reject(error); + stream._pendingAbortRequest = undefined; + } + WritableStreamDealWithRejection(stream, error); + } + // TODO(ricea): Fix alphabetical order. + function WritableStreamCloseQueuedOrInFlight(stream) { + if (stream._closeRequest === undefined && stream._inFlightCloseRequest === undefined) { + return false; + } + return true; + } + function WritableStreamHasOperationMarkedInFlight(stream) { + if (stream._inFlightWriteRequest === undefined && stream._inFlightCloseRequest === undefined) { + return false; + } + return true; + } + function WritableStreamMarkCloseRequestInFlight(stream) { + stream._inFlightCloseRequest = stream._closeRequest; + stream._closeRequest = undefined; + } + function WritableStreamMarkFirstWriteRequestInFlight(stream) { + stream._inFlightWriteRequest = stream._writeRequests.shift(); + } + function WritableStreamRejectCloseAndClosedPromiseIfNeeded(stream) { + if (stream._closeRequest !== undefined) { + stream._closeRequest._reject(stream._storedError); + stream._closeRequest = undefined; + } + const writer = stream._writer; + if (writer !== undefined) { + defaultWriterClosedPromiseReject(writer, stream._storedError); + } + } + function WritableStreamUpdateBackpressure(stream, backpressure) { + const writer = stream._writer; + if (writer !== undefined && backpressure !== stream._backpressure) { + if (backpressure) { + defaultWriterReadyPromiseReset(writer); + } + else { + defaultWriterReadyPromiseResolve(writer); + } + } + stream._backpressure = backpressure; + } + /** + * A default writer vended by a {@link WritableStream}. + * + * @public + */ + class WritableStreamDefaultWriter { + constructor(stream) { + assertRequiredArgument(stream, 1, 'WritableStreamDefaultWriter'); + assertWritableStream(stream, 'First parameter'); + if (IsWritableStreamLocked(stream)) { + throw new TypeError('This stream has already been locked for exclusive writing by another writer'); + } + this._ownerWritableStream = stream; + stream._writer = this; + const state = stream._state; + if (state === 'writable') { + if (!WritableStreamCloseQueuedOrInFlight(stream) && stream._backpressure) { + defaultWriterReadyPromiseInitialize(this); + } + else { + defaultWriterReadyPromiseInitializeAsResolved(this); + } + defaultWriterClosedPromiseInitialize(this); + } + else if (state === 'erroring') { + defaultWriterReadyPromiseInitializeAsRejected(this, stream._storedError); + defaultWriterClosedPromiseInitialize(this); + } + else if (state === 'closed') { + defaultWriterReadyPromiseInitializeAsResolved(this); + defaultWriterClosedPromiseInitializeAsResolved(this); + } + else { + const storedError = stream._storedError; + defaultWriterReadyPromiseInitializeAsRejected(this, storedError); + defaultWriterClosedPromiseInitializeAsRejected(this, storedError); + } + } + /** + * Returns a promise that will be fulfilled when the stream becomes closed, or rejected if the stream ever errors or + * the writer’s lock is released before the stream finishes closing. + */ + get closed() { + if (!IsWritableStreamDefaultWriter(this)) { + return promiseRejectedWith(defaultWriterBrandCheckException('closed')); + } + return this._closedPromise; + } + /** + * Returns the desired size to fill the stream’s internal queue. It can be negative, if the queue is over-full. + * A producer can use this information to determine the right amount of data to write. + * + * It will be `null` if the stream cannot be successfully written to (due to either being errored, or having an abort + * queued up). It will return zero if the stream is closed. And the getter will throw an exception if invoked when + * the writer’s lock is released. + */ + get desiredSize() { + if (!IsWritableStreamDefaultWriter(this)) { + throw defaultWriterBrandCheckException('desiredSize'); + } + if (this._ownerWritableStream === undefined) { + throw defaultWriterLockException('desiredSize'); + } + return WritableStreamDefaultWriterGetDesiredSize(this); + } + /** + * Returns a promise that will be fulfilled when the desired size to fill the stream’s internal queue transitions + * from non-positive to positive, signaling that it is no longer applying backpressure. Once the desired size dips + * back to zero or below, the getter will return a new promise that stays pending until the next transition. + * + * If the stream becomes errored or aborted, or the writer’s lock is released, the returned promise will become + * rejected. + */ + get ready() { + if (!IsWritableStreamDefaultWriter(this)) { + return promiseRejectedWith(defaultWriterBrandCheckException('ready')); + } + return this._readyPromise; + } + /** + * If the reader is active, behaves the same as {@link WritableStream.abort | stream.abort(reason)}. + */ + abort(reason = undefined) { + if (!IsWritableStreamDefaultWriter(this)) { + return promiseRejectedWith(defaultWriterBrandCheckException('abort')); + } + if (this._ownerWritableStream === undefined) { + return promiseRejectedWith(defaultWriterLockException('abort')); + } + return WritableStreamDefaultWriterAbort(this, reason); + } + /** + * If the reader is active, behaves the same as {@link WritableStream.close | stream.close()}. + */ + close() { + if (!IsWritableStreamDefaultWriter(this)) { + return promiseRejectedWith(defaultWriterBrandCheckException('close')); + } + const stream = this._ownerWritableStream; + if (stream === undefined) { + return promiseRejectedWith(defaultWriterLockException('close')); + } + if (WritableStreamCloseQueuedOrInFlight(stream)) { + return promiseRejectedWith(new TypeError('Cannot close an already-closing stream')); + } + return WritableStreamDefaultWriterClose(this); + } + /** + * Releases the writer’s lock on the corresponding stream. After the lock is released, the writer is no longer active. + * If the associated stream is errored when the lock is released, the writer will appear errored in the same way from + * now on; otherwise, the writer will appear closed. + * + * Note that the lock can still be released even if some ongoing writes have not yet finished (i.e. even if the + * promises returned from previous calls to {@link WritableStreamDefaultWriter.write | write()} have not yet settled). + * It’s not necessary to hold the lock on the writer for the duration of the write; the lock instead simply prevents + * other producers from writing in an interleaved manner. + */ + releaseLock() { + if (!IsWritableStreamDefaultWriter(this)) { + throw defaultWriterBrandCheckException('releaseLock'); + } + const stream = this._ownerWritableStream; + if (stream === undefined) { + return; + } + WritableStreamDefaultWriterRelease(this); + } + write(chunk = undefined) { + if (!IsWritableStreamDefaultWriter(this)) { + return promiseRejectedWith(defaultWriterBrandCheckException('write')); + } + if (this._ownerWritableStream === undefined) { + return promiseRejectedWith(defaultWriterLockException('write to')); + } + return WritableStreamDefaultWriterWrite(this, chunk); + } + } + Object.defineProperties(WritableStreamDefaultWriter.prototype, { + abort: { enumerable: true }, + close: { enumerable: true }, + releaseLock: { enumerable: true }, + write: { enumerable: true }, + closed: { enumerable: true }, + desiredSize: { enumerable: true }, + ready: { enumerable: true } + }); + if (typeof SymbolPolyfill.toStringTag === 'symbol') { + Object.defineProperty(WritableStreamDefaultWriter.prototype, SymbolPolyfill.toStringTag, { + value: 'WritableStreamDefaultWriter', + configurable: true + }); + } + // Abstract operations for the WritableStreamDefaultWriter. + function IsWritableStreamDefaultWriter(x) { + if (!typeIsObject(x)) { + return false; + } + if (!Object.prototype.hasOwnProperty.call(x, '_ownerWritableStream')) { + return false; + } + return x instanceof WritableStreamDefaultWriter; + } + // A client of WritableStreamDefaultWriter may use these functions directly to bypass state check. + function WritableStreamDefaultWriterAbort(writer, reason) { + const stream = writer._ownerWritableStream; + return WritableStreamAbort(stream, reason); + } + function WritableStreamDefaultWriterClose(writer) { + const stream = writer._ownerWritableStream; + return WritableStreamClose(stream); + } + function WritableStreamDefaultWriterCloseWithErrorPropagation(writer) { + const stream = writer._ownerWritableStream; + const state = stream._state; + if (WritableStreamCloseQueuedOrInFlight(stream) || state === 'closed') { + return promiseResolvedWith(undefined); + } + if (state === 'errored') { + return promiseRejectedWith(stream._storedError); + } + return WritableStreamDefaultWriterClose(writer); + } + function WritableStreamDefaultWriterEnsureClosedPromiseRejected(writer, error) { + if (writer._closedPromiseState === 'pending') { + defaultWriterClosedPromiseReject(writer, error); + } + else { + defaultWriterClosedPromiseResetToRejected(writer, error); + } + } + function WritableStreamDefaultWriterEnsureReadyPromiseRejected(writer, error) { + if (writer._readyPromiseState === 'pending') { + defaultWriterReadyPromiseReject(writer, error); + } + else { + defaultWriterReadyPromiseResetToRejected(writer, error); + } + } + function WritableStreamDefaultWriterGetDesiredSize(writer) { + const stream = writer._ownerWritableStream; + const state = stream._state; + if (state === 'errored' || state === 'erroring') { + return null; + } + if (state === 'closed') { + return 0; + } + return WritableStreamDefaultControllerGetDesiredSize(stream._writableStreamController); + } + function WritableStreamDefaultWriterRelease(writer) { + const stream = writer._ownerWritableStream; + const releasedError = new TypeError(`Writer was released and can no longer be used to monitor the stream's closedness`); + WritableStreamDefaultWriterEnsureReadyPromiseRejected(writer, releasedError); + // The state transitions to "errored" before the sink abort() method runs, but the writer.closed promise is not + // rejected until afterwards. This means that simply testing state will not work. + WritableStreamDefaultWriterEnsureClosedPromiseRejected(writer, releasedError); + stream._writer = undefined; + writer._ownerWritableStream = undefined; + } + function WritableStreamDefaultWriterWrite(writer, chunk) { + const stream = writer._ownerWritableStream; + const controller = stream._writableStreamController; + const chunkSize = WritableStreamDefaultControllerGetChunkSize(controller, chunk); + if (stream !== writer._ownerWritableStream) { + return promiseRejectedWith(defaultWriterLockException('write to')); + } + const state = stream._state; + if (state === 'errored') { + return promiseRejectedWith(stream._storedError); + } + if (WritableStreamCloseQueuedOrInFlight(stream) || state === 'closed') { + return promiseRejectedWith(new TypeError('The stream is closing or closed and cannot be written to')); + } + if (state === 'erroring') { + return promiseRejectedWith(stream._storedError); + } + const promise = WritableStreamAddWriteRequest(stream); + WritableStreamDefaultControllerWrite(controller, chunk, chunkSize); + return promise; + } + const closeSentinel = {}; + /** + * Allows control of a {@link WritableStream | writable stream}'s state and internal queue. + * + * @public + */ + class WritableStreamDefaultController { + constructor() { + throw new TypeError('Illegal constructor'); + } + /** + * The reason which was passed to `WritableStream.abort(reason)` when the stream was aborted. + * + * @deprecated + * This property has been removed from the specification, see https://github.com/whatwg/streams/pull/1177. + * Use {@link WritableStreamDefaultController.signal}'s `reason` instead. + */ + get abortReason() { + if (!IsWritableStreamDefaultController(this)) { + throw defaultControllerBrandCheckException$2('abortReason'); + } + return this._abortReason; + } + /** + * An `AbortSignal` that can be used to abort the pending write or close operation when the stream is aborted. + */ + get signal() { + if (!IsWritableStreamDefaultController(this)) { + throw defaultControllerBrandCheckException$2('signal'); + } + if (this._abortController === undefined) { + // Older browsers or older Node versions may not support `AbortController` or `AbortSignal`. + // We don't want to bundle and ship an `AbortController` polyfill together with our polyfill, + // so instead we only implement support for `signal` if we find a global `AbortController` constructor. + throw new TypeError('WritableStreamDefaultController.prototype.signal is not supported'); + } + return this._abortController.signal; + } + /** + * Closes the controlled writable stream, making all future interactions with it fail with the given error `e`. + * + * This method is rarely used, since usually it suffices to return a rejected promise from one of the underlying + * sink's methods. However, it can be useful for suddenly shutting down a stream in response to an event outside the + * normal lifecycle of interactions with the underlying sink. + */ + error(e = undefined) { + if (!IsWritableStreamDefaultController(this)) { + throw defaultControllerBrandCheckException$2('error'); + } + const state = this._controlledWritableStream._state; + if (state !== 'writable') { + // The stream is closed, errored or will be soon. The sink can't do anything useful if it gets an error here, so + // just treat it as a no-op. + return; + } + WritableStreamDefaultControllerError(this, e); + } + /** @internal */ + [AbortSteps](reason) { + const result = this._abortAlgorithm(reason); + WritableStreamDefaultControllerClearAlgorithms(this); + return result; + } + /** @internal */ + [ErrorSteps]() { + ResetQueue(this); + } + } + Object.defineProperties(WritableStreamDefaultController.prototype, { + abortReason: { enumerable: true }, + signal: { enumerable: true }, + error: { enumerable: true } + }); + if (typeof SymbolPolyfill.toStringTag === 'symbol') { + Object.defineProperty(WritableStreamDefaultController.prototype, SymbolPolyfill.toStringTag, { + value: 'WritableStreamDefaultController', + configurable: true + }); + } + // Abstract operations implementing interface required by the WritableStream. + function IsWritableStreamDefaultController(x) { + if (!typeIsObject(x)) { + return false; + } + if (!Object.prototype.hasOwnProperty.call(x, '_controlledWritableStream')) { + return false; + } + return x instanceof WritableStreamDefaultController; + } + function SetUpWritableStreamDefaultController(stream, controller, startAlgorithm, writeAlgorithm, closeAlgorithm, abortAlgorithm, highWaterMark, sizeAlgorithm) { + controller._controlledWritableStream = stream; + stream._writableStreamController = controller; + // Need to set the slots so that the assert doesn't fire. In the spec the slots already exist implicitly. + controller._queue = undefined; + controller._queueTotalSize = undefined; + ResetQueue(controller); + controller._abortReason = undefined; + controller._abortController = createAbortController(); + controller._started = false; + controller._strategySizeAlgorithm = sizeAlgorithm; + controller._strategyHWM = highWaterMark; + controller._writeAlgorithm = writeAlgorithm; + controller._closeAlgorithm = closeAlgorithm; + controller._abortAlgorithm = abortAlgorithm; + const backpressure = WritableStreamDefaultControllerGetBackpressure(controller); + WritableStreamUpdateBackpressure(stream, backpressure); + const startResult = startAlgorithm(); + const startPromise = promiseResolvedWith(startResult); + uponPromise(startPromise, () => { + controller._started = true; + WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller); + }, r => { + controller._started = true; + WritableStreamDealWithRejection(stream, r); + }); + } + function SetUpWritableStreamDefaultControllerFromUnderlyingSink(stream, underlyingSink, highWaterMark, sizeAlgorithm) { + const controller = Object.create(WritableStreamDefaultController.prototype); + let startAlgorithm = () => undefined; + let writeAlgorithm = () => promiseResolvedWith(undefined); + let closeAlgorithm = () => promiseResolvedWith(undefined); + let abortAlgorithm = () => promiseResolvedWith(undefined); + if (underlyingSink.start !== undefined) { + startAlgorithm = () => underlyingSink.start(controller); + } + if (underlyingSink.write !== undefined) { + writeAlgorithm = chunk => underlyingSink.write(chunk, controller); + } + if (underlyingSink.close !== undefined) { + closeAlgorithm = () => underlyingSink.close(); + } + if (underlyingSink.abort !== undefined) { + abortAlgorithm = reason => underlyingSink.abort(reason); + } + SetUpWritableStreamDefaultController(stream, controller, startAlgorithm, writeAlgorithm, closeAlgorithm, abortAlgorithm, highWaterMark, sizeAlgorithm); + } + // ClearAlgorithms may be called twice. Erroring the same stream in multiple ways will often result in redundant calls. + function WritableStreamDefaultControllerClearAlgorithms(controller) { + controller._writeAlgorithm = undefined; + controller._closeAlgorithm = undefined; + controller._abortAlgorithm = undefined; + controller._strategySizeAlgorithm = undefined; + } + function WritableStreamDefaultControllerClose(controller) { + EnqueueValueWithSize(controller, closeSentinel, 0); + WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller); + } + function WritableStreamDefaultControllerGetChunkSize(controller, chunk) { + try { + return controller._strategySizeAlgorithm(chunk); + } + catch (chunkSizeE) { + WritableStreamDefaultControllerErrorIfNeeded(controller, chunkSizeE); + return 1; + } + } + function WritableStreamDefaultControllerGetDesiredSize(controller) { + return controller._strategyHWM - controller._queueTotalSize; + } + function WritableStreamDefaultControllerWrite(controller, chunk, chunkSize) { + try { + EnqueueValueWithSize(controller, chunk, chunkSize); + } + catch (enqueueE) { + WritableStreamDefaultControllerErrorIfNeeded(controller, enqueueE); + return; + } + const stream = controller._controlledWritableStream; + if (!WritableStreamCloseQueuedOrInFlight(stream) && stream._state === 'writable') { + const backpressure = WritableStreamDefaultControllerGetBackpressure(controller); + WritableStreamUpdateBackpressure(stream, backpressure); + } + WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller); + } + // Abstract operations for the WritableStreamDefaultController. + function WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller) { + const stream = controller._controlledWritableStream; + if (!controller._started) { + return; + } + if (stream._inFlightWriteRequest !== undefined) { + return; + } + const state = stream._state; + if (state === 'erroring') { + WritableStreamFinishErroring(stream); + return; + } + if (controller._queue.length === 0) { + return; + } + const value = PeekQueueValue(controller); + if (value === closeSentinel) { + WritableStreamDefaultControllerProcessClose(controller); + } + else { + WritableStreamDefaultControllerProcessWrite(controller, value); + } + } + function WritableStreamDefaultControllerErrorIfNeeded(controller, error) { + if (controller._controlledWritableStream._state === 'writable') { + WritableStreamDefaultControllerError(controller, error); + } + } + function WritableStreamDefaultControllerProcessClose(controller) { + const stream = controller._controlledWritableStream; + WritableStreamMarkCloseRequestInFlight(stream); + DequeueValue(controller); + const sinkClosePromise = controller._closeAlgorithm(); + WritableStreamDefaultControllerClearAlgorithms(controller); + uponPromise(sinkClosePromise, () => { + WritableStreamFinishInFlightClose(stream); + }, reason => { + WritableStreamFinishInFlightCloseWithError(stream, reason); + }); + } + function WritableStreamDefaultControllerProcessWrite(controller, chunk) { + const stream = controller._controlledWritableStream; + WritableStreamMarkFirstWriteRequestInFlight(stream); + const sinkWritePromise = controller._writeAlgorithm(chunk); + uponPromise(sinkWritePromise, () => { + WritableStreamFinishInFlightWrite(stream); + const state = stream._state; + DequeueValue(controller); + if (!WritableStreamCloseQueuedOrInFlight(stream) && state === 'writable') { + const backpressure = WritableStreamDefaultControllerGetBackpressure(controller); + WritableStreamUpdateBackpressure(stream, backpressure); + } + WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller); + }, reason => { + if (stream._state === 'writable') { + WritableStreamDefaultControllerClearAlgorithms(controller); + } + WritableStreamFinishInFlightWriteWithError(stream, reason); + }); + } + function WritableStreamDefaultControllerGetBackpressure(controller) { + const desiredSize = WritableStreamDefaultControllerGetDesiredSize(controller); + return desiredSize <= 0; + } + // A client of WritableStreamDefaultController may use these functions directly to bypass state check. + function WritableStreamDefaultControllerError(controller, error) { + const stream = controller._controlledWritableStream; + WritableStreamDefaultControllerClearAlgorithms(controller); + WritableStreamStartErroring(stream, error); + } + // Helper functions for the WritableStream. + function streamBrandCheckException$2(name) { + return new TypeError(`WritableStream.prototype.${name} can only be used on a WritableStream`); + } + // Helper functions for the WritableStreamDefaultController. + function defaultControllerBrandCheckException$2(name) { + return new TypeError(`WritableStreamDefaultController.prototype.${name} can only be used on a WritableStreamDefaultController`); + } + // Helper functions for the WritableStreamDefaultWriter. + function defaultWriterBrandCheckException(name) { + return new TypeError(`WritableStreamDefaultWriter.prototype.${name} can only be used on a WritableStreamDefaultWriter`); + } + function defaultWriterLockException(name) { + return new TypeError('Cannot ' + name + ' a stream using a released writer'); + } + function defaultWriterClosedPromiseInitialize(writer) { + writer._closedPromise = newPromise((resolve, reject) => { + writer._closedPromise_resolve = resolve; + writer._closedPromise_reject = reject; + writer._closedPromiseState = 'pending'; + }); + } + function defaultWriterClosedPromiseInitializeAsRejected(writer, reason) { + defaultWriterClosedPromiseInitialize(writer); + defaultWriterClosedPromiseReject(writer, reason); + } + function defaultWriterClosedPromiseInitializeAsResolved(writer) { + defaultWriterClosedPromiseInitialize(writer); + defaultWriterClosedPromiseResolve(writer); + } + function defaultWriterClosedPromiseReject(writer, reason) { + if (writer._closedPromise_reject === undefined) { + return; + } + setPromiseIsHandledToTrue(writer._closedPromise); + writer._closedPromise_reject(reason); + writer._closedPromise_resolve = undefined; + writer._closedPromise_reject = undefined; + writer._closedPromiseState = 'rejected'; + } + function defaultWriterClosedPromiseResetToRejected(writer, reason) { + defaultWriterClosedPromiseInitializeAsRejected(writer, reason); + } + function defaultWriterClosedPromiseResolve(writer) { + if (writer._closedPromise_resolve === undefined) { + return; + } + writer._closedPromise_resolve(undefined); + writer._closedPromise_resolve = undefined; + writer._closedPromise_reject = undefined; + writer._closedPromiseState = 'resolved'; + } + function defaultWriterReadyPromiseInitialize(writer) { + writer._readyPromise = newPromise((resolve, reject) => { + writer._readyPromise_resolve = resolve; + writer._readyPromise_reject = reject; + }); + writer._readyPromiseState = 'pending'; + } + function defaultWriterReadyPromiseInitializeAsRejected(writer, reason) { + defaultWriterReadyPromiseInitialize(writer); + defaultWriterReadyPromiseReject(writer, reason); + } + function defaultWriterReadyPromiseInitializeAsResolved(writer) { + defaultWriterReadyPromiseInitialize(writer); + defaultWriterReadyPromiseResolve(writer); + } + function defaultWriterReadyPromiseReject(writer, reason) { + if (writer._readyPromise_reject === undefined) { + return; + } + setPromiseIsHandledToTrue(writer._readyPromise); + writer._readyPromise_reject(reason); + writer._readyPromise_resolve = undefined; + writer._readyPromise_reject = undefined; + writer._readyPromiseState = 'rejected'; + } + function defaultWriterReadyPromiseReset(writer) { + defaultWriterReadyPromiseInitialize(writer); + } + function defaultWriterReadyPromiseResetToRejected(writer, reason) { + defaultWriterReadyPromiseInitializeAsRejected(writer, reason); + } + function defaultWriterReadyPromiseResolve(writer) { + if (writer._readyPromise_resolve === undefined) { + return; + } + writer._readyPromise_resolve(undefined); + writer._readyPromise_resolve = undefined; + writer._readyPromise_reject = undefined; + writer._readyPromiseState = 'fulfilled'; + } + + /// + const NativeDOMException = typeof DOMException !== 'undefined' ? DOMException : undefined; + + /// + function isDOMExceptionConstructor(ctor) { + if (!(typeof ctor === 'function' || typeof ctor === 'object')) { + return false; + } + try { + new ctor(); + return true; + } + catch (_a) { + return false; + } + } + function createDOMExceptionPolyfill() { + // eslint-disable-next-line no-shadow + const ctor = function DOMException(message, name) { + this.message = message || ''; + this.name = name || 'Error'; + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + }; + ctor.prototype = Object.create(Error.prototype); + Object.defineProperty(ctor.prototype, 'constructor', { value: ctor, writable: true, configurable: true }); + return ctor; + } + // eslint-disable-next-line no-redeclare + const DOMException$1 = isDOMExceptionConstructor(NativeDOMException) ? NativeDOMException : createDOMExceptionPolyfill(); + + function ReadableStreamPipeTo(source, dest, preventClose, preventAbort, preventCancel, signal) { + const reader = AcquireReadableStreamDefaultReader(source); + const writer = AcquireWritableStreamDefaultWriter(dest); + source._disturbed = true; + let shuttingDown = false; + // This is used to keep track of the spec's requirement that we wait for ongoing writes during shutdown. + let currentWrite = promiseResolvedWith(undefined); + return newPromise((resolve, reject) => { + let abortAlgorithm; + if (signal !== undefined) { + abortAlgorithm = () => { + const error = new DOMException$1('Aborted', 'AbortError'); + const actions = []; + if (!preventAbort) { + actions.push(() => { + if (dest._state === 'writable') { + return WritableStreamAbort(dest, error); + } + return promiseResolvedWith(undefined); + }); + } + if (!preventCancel) { + actions.push(() => { + if (source._state === 'readable') { + return ReadableStreamCancel(source, error); + } + return promiseResolvedWith(undefined); + }); + } + shutdownWithAction(() => Promise.all(actions.map(action => action())), true, error); + }; + if (signal.aborted) { + abortAlgorithm(); + return; + } + signal.addEventListener('abort', abortAlgorithm); + } + // Using reader and writer, read all chunks from this and write them to dest + // - Backpressure must be enforced + // - Shutdown must stop all activity + function pipeLoop() { + return newPromise((resolveLoop, rejectLoop) => { + function next(done) { + if (done) { + resolveLoop(); + } + else { + // Use `PerformPromiseThen` instead of `uponPromise` to avoid + // adding unnecessary `.catch(rethrowAssertionErrorRejection)` handlers + PerformPromiseThen(pipeStep(), next, rejectLoop); + } + } + next(false); + }); + } + function pipeStep() { + if (shuttingDown) { + return promiseResolvedWith(true); + } + return PerformPromiseThen(writer._readyPromise, () => { + return newPromise((resolveRead, rejectRead) => { + ReadableStreamDefaultReaderRead(reader, { + _chunkSteps: chunk => { + currentWrite = PerformPromiseThen(WritableStreamDefaultWriterWrite(writer, chunk), undefined, noop); + resolveRead(false); + }, + _closeSteps: () => resolveRead(true), + _errorSteps: rejectRead + }); + }); + }); + } + // Errors must be propagated forward + isOrBecomesErrored(source, reader._closedPromise, storedError => { + if (!preventAbort) { + shutdownWithAction(() => WritableStreamAbort(dest, storedError), true, storedError); + } + else { + shutdown(true, storedError); + } + }); + // Errors must be propagated backward + isOrBecomesErrored(dest, writer._closedPromise, storedError => { + if (!preventCancel) { + shutdownWithAction(() => ReadableStreamCancel(source, storedError), true, storedError); + } + else { + shutdown(true, storedError); + } + }); + // Closing must be propagated forward + isOrBecomesClosed(source, reader._closedPromise, () => { + if (!preventClose) { + shutdownWithAction(() => WritableStreamDefaultWriterCloseWithErrorPropagation(writer)); + } + else { + shutdown(); + } + }); + // Closing must be propagated backward + if (WritableStreamCloseQueuedOrInFlight(dest) || dest._state === 'closed') { + const destClosed = new TypeError('the destination writable stream closed before all data could be piped to it'); + if (!preventCancel) { + shutdownWithAction(() => ReadableStreamCancel(source, destClosed), true, destClosed); + } + else { + shutdown(true, destClosed); + } + } + setPromiseIsHandledToTrue(pipeLoop()); + function waitForWritesToFinish() { + // Another write may have started while we were waiting on this currentWrite, so we have to be sure to wait + // for that too. + const oldCurrentWrite = currentWrite; + return PerformPromiseThen(currentWrite, () => oldCurrentWrite !== currentWrite ? waitForWritesToFinish() : undefined); + } + function isOrBecomesErrored(stream, promise, action) { + if (stream._state === 'errored') { + action(stream._storedError); + } + else { + uponRejection(promise, action); + } + } + function isOrBecomesClosed(stream, promise, action) { + if (stream._state === 'closed') { + action(); + } + else { + uponFulfillment(promise, action); + } + } + function shutdownWithAction(action, originalIsError, originalError) { + if (shuttingDown) { + return; + } + shuttingDown = true; + if (dest._state === 'writable' && !WritableStreamCloseQueuedOrInFlight(dest)) { + uponFulfillment(waitForWritesToFinish(), doTheRest); + } + else { + doTheRest(); + } + function doTheRest() { + uponPromise(action(), () => finalize(originalIsError, originalError), newError => finalize(true, newError)); + } + } + function shutdown(isError, error) { + if (shuttingDown) { + return; + } + shuttingDown = true; + if (dest._state === 'writable' && !WritableStreamCloseQueuedOrInFlight(dest)) { + uponFulfillment(waitForWritesToFinish(), () => finalize(isError, error)); + } + else { + finalize(isError, error); + } + } + function finalize(isError, error) { + WritableStreamDefaultWriterRelease(writer); + ReadableStreamReaderGenericRelease(reader); + if (signal !== undefined) { + signal.removeEventListener('abort', abortAlgorithm); + } + if (isError) { + reject(error); + } + else { + resolve(undefined); + } + } + }); + } + + /** + * Allows control of a {@link ReadableStream | readable stream}'s state and internal queue. + * + * @public + */ + class ReadableStreamDefaultController { + constructor() { + throw new TypeError('Illegal constructor'); + } + /** + * Returns the desired size to fill the controlled stream's internal queue. It can be negative, if the queue is + * over-full. An underlying source ought to use this information to determine when and how to apply backpressure. + */ + get desiredSize() { + if (!IsReadableStreamDefaultController(this)) { + throw defaultControllerBrandCheckException$1('desiredSize'); + } + return ReadableStreamDefaultControllerGetDesiredSize(this); + } + /** + * Closes the controlled readable stream. Consumers will still be able to read any previously-enqueued chunks from + * the stream, but once those are read, the stream will become closed. + */ + close() { + if (!IsReadableStreamDefaultController(this)) { + throw defaultControllerBrandCheckException$1('close'); + } + if (!ReadableStreamDefaultControllerCanCloseOrEnqueue(this)) { + throw new TypeError('The stream is not in a state that permits close'); + } + ReadableStreamDefaultControllerClose(this); + } + enqueue(chunk = undefined) { + if (!IsReadableStreamDefaultController(this)) { + throw defaultControllerBrandCheckException$1('enqueue'); + } + if (!ReadableStreamDefaultControllerCanCloseOrEnqueue(this)) { + throw new TypeError('The stream is not in a state that permits enqueue'); + } + return ReadableStreamDefaultControllerEnqueue(this, chunk); + } + /** + * Errors the controlled readable stream, making all future interactions with it fail with the given error `e`. + */ + error(e = undefined) { + if (!IsReadableStreamDefaultController(this)) { + throw defaultControllerBrandCheckException$1('error'); + } + ReadableStreamDefaultControllerError(this, e); + } + /** @internal */ + [CancelSteps](reason) { + ResetQueue(this); + const result = this._cancelAlgorithm(reason); + ReadableStreamDefaultControllerClearAlgorithms(this); + return result; + } + /** @internal */ + [PullSteps](readRequest) { + const stream = this._controlledReadableStream; + if (this._queue.length > 0) { + const chunk = DequeueValue(this); + if (this._closeRequested && this._queue.length === 0) { + ReadableStreamDefaultControllerClearAlgorithms(this); + ReadableStreamClose(stream); + } + else { + ReadableStreamDefaultControllerCallPullIfNeeded(this); + } + readRequest._chunkSteps(chunk); + } + else { + ReadableStreamAddReadRequest(stream, readRequest); + ReadableStreamDefaultControllerCallPullIfNeeded(this); + } + } + } + Object.defineProperties(ReadableStreamDefaultController.prototype, { + close: { enumerable: true }, + enqueue: { enumerable: true }, + error: { enumerable: true }, + desiredSize: { enumerable: true } + }); + if (typeof SymbolPolyfill.toStringTag === 'symbol') { + Object.defineProperty(ReadableStreamDefaultController.prototype, SymbolPolyfill.toStringTag, { + value: 'ReadableStreamDefaultController', + configurable: true + }); + } + // Abstract operations for the ReadableStreamDefaultController. + function IsReadableStreamDefaultController(x) { + if (!typeIsObject(x)) { + return false; + } + if (!Object.prototype.hasOwnProperty.call(x, '_controlledReadableStream')) { + return false; + } + return x instanceof ReadableStreamDefaultController; + } + function ReadableStreamDefaultControllerCallPullIfNeeded(controller) { + const shouldPull = ReadableStreamDefaultControllerShouldCallPull(controller); + if (!shouldPull) { + return; + } + if (controller._pulling) { + controller._pullAgain = true; + return; + } + controller._pulling = true; + const pullPromise = controller._pullAlgorithm(); + uponPromise(pullPromise, () => { + controller._pulling = false; + if (controller._pullAgain) { + controller._pullAgain = false; + ReadableStreamDefaultControllerCallPullIfNeeded(controller); + } + }, e => { + ReadableStreamDefaultControllerError(controller, e); + }); + } + function ReadableStreamDefaultControllerShouldCallPull(controller) { + const stream = controller._controlledReadableStream; + if (!ReadableStreamDefaultControllerCanCloseOrEnqueue(controller)) { + return false; + } + if (!controller._started) { + return false; + } + if (IsReadableStreamLocked(stream) && ReadableStreamGetNumReadRequests(stream) > 0) { + return true; + } + const desiredSize = ReadableStreamDefaultControllerGetDesiredSize(controller); + if (desiredSize > 0) { + return true; + } + return false; + } + function ReadableStreamDefaultControllerClearAlgorithms(controller) { + controller._pullAlgorithm = undefined; + controller._cancelAlgorithm = undefined; + controller._strategySizeAlgorithm = undefined; + } + // A client of ReadableStreamDefaultController may use these functions directly to bypass state check. + function ReadableStreamDefaultControllerClose(controller) { + if (!ReadableStreamDefaultControllerCanCloseOrEnqueue(controller)) { + return; + } + const stream = controller._controlledReadableStream; + controller._closeRequested = true; + if (controller._queue.length === 0) { + ReadableStreamDefaultControllerClearAlgorithms(controller); + ReadableStreamClose(stream); + } + } + function ReadableStreamDefaultControllerEnqueue(controller, chunk) { + if (!ReadableStreamDefaultControllerCanCloseOrEnqueue(controller)) { + return; + } + const stream = controller._controlledReadableStream; + if (IsReadableStreamLocked(stream) && ReadableStreamGetNumReadRequests(stream) > 0) { + ReadableStreamFulfillReadRequest(stream, chunk, false); + } + else { + let chunkSize; + try { + chunkSize = controller._strategySizeAlgorithm(chunk); + } + catch (chunkSizeE) { + ReadableStreamDefaultControllerError(controller, chunkSizeE); + throw chunkSizeE; + } + try { + EnqueueValueWithSize(controller, chunk, chunkSize); + } + catch (enqueueE) { + ReadableStreamDefaultControllerError(controller, enqueueE); + throw enqueueE; + } + } + ReadableStreamDefaultControllerCallPullIfNeeded(controller); + } + function ReadableStreamDefaultControllerError(controller, e) { + const stream = controller._controlledReadableStream; + if (stream._state !== 'readable') { + return; + } + ResetQueue(controller); + ReadableStreamDefaultControllerClearAlgorithms(controller); + ReadableStreamError(stream, e); + } + function ReadableStreamDefaultControllerGetDesiredSize(controller) { + const state = controller._controlledReadableStream._state; + if (state === 'errored') { + return null; + } + if (state === 'closed') { + return 0; + } + return controller._strategyHWM - controller._queueTotalSize; + } + // This is used in the implementation of TransformStream. + function ReadableStreamDefaultControllerHasBackpressure(controller) { + if (ReadableStreamDefaultControllerShouldCallPull(controller)) { + return false; + } + return true; + } + function ReadableStreamDefaultControllerCanCloseOrEnqueue(controller) { + const state = controller._controlledReadableStream._state; + if (!controller._closeRequested && state === 'readable') { + return true; + } + return false; + } + function SetUpReadableStreamDefaultController(stream, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark, sizeAlgorithm) { + controller._controlledReadableStream = stream; + controller._queue = undefined; + controller._queueTotalSize = undefined; + ResetQueue(controller); + controller._started = false; + controller._closeRequested = false; + controller._pullAgain = false; + controller._pulling = false; + controller._strategySizeAlgorithm = sizeAlgorithm; + controller._strategyHWM = highWaterMark; + controller._pullAlgorithm = pullAlgorithm; + controller._cancelAlgorithm = cancelAlgorithm; + stream._readableStreamController = controller; + const startResult = startAlgorithm(); + uponPromise(promiseResolvedWith(startResult), () => { + controller._started = true; + ReadableStreamDefaultControllerCallPullIfNeeded(controller); + }, r => { + ReadableStreamDefaultControllerError(controller, r); + }); + } + function SetUpReadableStreamDefaultControllerFromUnderlyingSource(stream, underlyingSource, highWaterMark, sizeAlgorithm) { + const controller = Object.create(ReadableStreamDefaultController.prototype); + let startAlgorithm = () => undefined; + let pullAlgorithm = () => promiseResolvedWith(undefined); + let cancelAlgorithm = () => promiseResolvedWith(undefined); + if (underlyingSource.start !== undefined) { + startAlgorithm = () => underlyingSource.start(controller); + } + if (underlyingSource.pull !== undefined) { + pullAlgorithm = () => underlyingSource.pull(controller); + } + if (underlyingSource.cancel !== undefined) { + cancelAlgorithm = reason => underlyingSource.cancel(reason); + } + SetUpReadableStreamDefaultController(stream, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark, sizeAlgorithm); + } + // Helper functions for the ReadableStreamDefaultController. + function defaultControllerBrandCheckException$1(name) { + return new TypeError(`ReadableStreamDefaultController.prototype.${name} can only be used on a ReadableStreamDefaultController`); + } + + function ReadableStreamTee(stream, cloneForBranch2) { + if (IsReadableByteStreamController(stream._readableStreamController)) { + return ReadableByteStreamTee(stream); + } + return ReadableStreamDefaultTee(stream); + } + function ReadableStreamDefaultTee(stream, cloneForBranch2) { + const reader = AcquireReadableStreamDefaultReader(stream); + let reading = false; + let readAgain = false; + let canceled1 = false; + let canceled2 = false; + let reason1; + let reason2; + let branch1; + let branch2; + let resolveCancelPromise; + const cancelPromise = newPromise(resolve => { + resolveCancelPromise = resolve; + }); + function pullAlgorithm() { + if (reading) { + readAgain = true; + return promiseResolvedWith(undefined); + } + reading = true; + const readRequest = { + _chunkSteps: chunk => { + // This needs to be delayed a microtask because it takes at least a microtask to detect errors (using + // reader._closedPromise below), and we want errors in stream to error both branches immediately. We cannot let + // successful synchronously-available reads get ahead of asynchronously-available errors. + queueMicrotask(() => { + readAgain = false; + const chunk1 = chunk; + const chunk2 = chunk; + // There is no way to access the cloning code right now in the reference implementation. + // If we add one then we'll need an implementation for serializable objects. + // if (!canceled2 && cloneForBranch2) { + // chunk2 = StructuredDeserialize(StructuredSerialize(chunk2)); + // } + if (!canceled1) { + ReadableStreamDefaultControllerEnqueue(branch1._readableStreamController, chunk1); + } + if (!canceled2) { + ReadableStreamDefaultControllerEnqueue(branch2._readableStreamController, chunk2); + } + reading = false; + if (readAgain) { + pullAlgorithm(); + } + }); + }, + _closeSteps: () => { + reading = false; + if (!canceled1) { + ReadableStreamDefaultControllerClose(branch1._readableStreamController); + } + if (!canceled2) { + ReadableStreamDefaultControllerClose(branch2._readableStreamController); + } + if (!canceled1 || !canceled2) { + resolveCancelPromise(undefined); + } + }, + _errorSteps: () => { + reading = false; + } + }; + ReadableStreamDefaultReaderRead(reader, readRequest); + return promiseResolvedWith(undefined); + } + function cancel1Algorithm(reason) { + canceled1 = true; + reason1 = reason; + if (canceled2) { + const compositeReason = CreateArrayFromList([reason1, reason2]); + const cancelResult = ReadableStreamCancel(stream, compositeReason); + resolveCancelPromise(cancelResult); + } + return cancelPromise; + } + function cancel2Algorithm(reason) { + canceled2 = true; + reason2 = reason; + if (canceled1) { + const compositeReason = CreateArrayFromList([reason1, reason2]); + const cancelResult = ReadableStreamCancel(stream, compositeReason); + resolveCancelPromise(cancelResult); + } + return cancelPromise; + } + function startAlgorithm() { + // do nothing + } + branch1 = CreateReadableStream(startAlgorithm, pullAlgorithm, cancel1Algorithm); + branch2 = CreateReadableStream(startAlgorithm, pullAlgorithm, cancel2Algorithm); + uponRejection(reader._closedPromise, (r) => { + ReadableStreamDefaultControllerError(branch1._readableStreamController, r); + ReadableStreamDefaultControllerError(branch2._readableStreamController, r); + if (!canceled1 || !canceled2) { + resolveCancelPromise(undefined); + } + }); + return [branch1, branch2]; + } + function ReadableByteStreamTee(stream) { + let reader = AcquireReadableStreamDefaultReader(stream); + let reading = false; + let readAgainForBranch1 = false; + let readAgainForBranch2 = false; + let canceled1 = false; + let canceled2 = false; + let reason1; + let reason2; + let branch1; + let branch2; + let resolveCancelPromise; + const cancelPromise = newPromise(resolve => { + resolveCancelPromise = resolve; + }); + function forwardReaderError(thisReader) { + uponRejection(thisReader._closedPromise, r => { + if (thisReader !== reader) { + return; + } + ReadableByteStreamControllerError(branch1._readableStreamController, r); + ReadableByteStreamControllerError(branch2._readableStreamController, r); + if (!canceled1 || !canceled2) { + resolveCancelPromise(undefined); + } + }); + } + function pullWithDefaultReader() { + if (IsReadableStreamBYOBReader(reader)) { + ReadableStreamReaderGenericRelease(reader); + reader = AcquireReadableStreamDefaultReader(stream); + forwardReaderError(reader); + } + const readRequest = { + _chunkSteps: chunk => { + // This needs to be delayed a microtask because it takes at least a microtask to detect errors (using + // reader._closedPromise below), and we want errors in stream to error both branches immediately. We cannot let + // successful synchronously-available reads get ahead of asynchronously-available errors. + queueMicrotask(() => { + readAgainForBranch1 = false; + readAgainForBranch2 = false; + const chunk1 = chunk; + let chunk2 = chunk; + if (!canceled1 && !canceled2) { + try { + chunk2 = CloneAsUint8Array(chunk); + } + catch (cloneE) { + ReadableByteStreamControllerError(branch1._readableStreamController, cloneE); + ReadableByteStreamControllerError(branch2._readableStreamController, cloneE); + resolveCancelPromise(ReadableStreamCancel(stream, cloneE)); + return; + } + } + if (!canceled1) { + ReadableByteStreamControllerEnqueue(branch1._readableStreamController, chunk1); + } + if (!canceled2) { + ReadableByteStreamControllerEnqueue(branch2._readableStreamController, chunk2); + } + reading = false; + if (readAgainForBranch1) { + pull1Algorithm(); + } + else if (readAgainForBranch2) { + pull2Algorithm(); + } + }); + }, + _closeSteps: () => { + reading = false; + if (!canceled1) { + ReadableByteStreamControllerClose(branch1._readableStreamController); + } + if (!canceled2) { + ReadableByteStreamControllerClose(branch2._readableStreamController); + } + if (branch1._readableStreamController._pendingPullIntos.length > 0) { + ReadableByteStreamControllerRespond(branch1._readableStreamController, 0); + } + if (branch2._readableStreamController._pendingPullIntos.length > 0) { + ReadableByteStreamControllerRespond(branch2._readableStreamController, 0); + } + if (!canceled1 || !canceled2) { + resolveCancelPromise(undefined); + } + }, + _errorSteps: () => { + reading = false; + } + }; + ReadableStreamDefaultReaderRead(reader, readRequest); + } + function pullWithBYOBReader(view, forBranch2) { + if (IsReadableStreamDefaultReader(reader)) { + ReadableStreamReaderGenericRelease(reader); + reader = AcquireReadableStreamBYOBReader(stream); + forwardReaderError(reader); + } + const byobBranch = forBranch2 ? branch2 : branch1; + const otherBranch = forBranch2 ? branch1 : branch2; + const readIntoRequest = { + _chunkSteps: chunk => { + // This needs to be delayed a microtask because it takes at least a microtask to detect errors (using + // reader._closedPromise below), and we want errors in stream to error both branches immediately. We cannot let + // successful synchronously-available reads get ahead of asynchronously-available errors. + queueMicrotask(() => { + readAgainForBranch1 = false; + readAgainForBranch2 = false; + const byobCanceled = forBranch2 ? canceled2 : canceled1; + const otherCanceled = forBranch2 ? canceled1 : canceled2; + if (!otherCanceled) { + let clonedChunk; + try { + clonedChunk = CloneAsUint8Array(chunk); + } + catch (cloneE) { + ReadableByteStreamControllerError(byobBranch._readableStreamController, cloneE); + ReadableByteStreamControllerError(otherBranch._readableStreamController, cloneE); + resolveCancelPromise(ReadableStreamCancel(stream, cloneE)); + return; + } + if (!byobCanceled) { + ReadableByteStreamControllerRespondWithNewView(byobBranch._readableStreamController, chunk); + } + ReadableByteStreamControllerEnqueue(otherBranch._readableStreamController, clonedChunk); + } + else if (!byobCanceled) { + ReadableByteStreamControllerRespondWithNewView(byobBranch._readableStreamController, chunk); + } + reading = false; + if (readAgainForBranch1) { + pull1Algorithm(); + } + else if (readAgainForBranch2) { + pull2Algorithm(); + } + }); + }, + _closeSteps: chunk => { + reading = false; + const byobCanceled = forBranch2 ? canceled2 : canceled1; + const otherCanceled = forBranch2 ? canceled1 : canceled2; + if (!byobCanceled) { + ReadableByteStreamControllerClose(byobBranch._readableStreamController); + } + if (!otherCanceled) { + ReadableByteStreamControllerClose(otherBranch._readableStreamController); + } + if (chunk !== undefined) { + if (!byobCanceled) { + ReadableByteStreamControllerRespondWithNewView(byobBranch._readableStreamController, chunk); + } + if (!otherCanceled && otherBranch._readableStreamController._pendingPullIntos.length > 0) { + ReadableByteStreamControllerRespond(otherBranch._readableStreamController, 0); + } + } + if (!byobCanceled || !otherCanceled) { + resolveCancelPromise(undefined); + } + }, + _errorSteps: () => { + reading = false; + } + }; + ReadableStreamBYOBReaderRead(reader, view, readIntoRequest); + } + function pull1Algorithm() { + if (reading) { + readAgainForBranch1 = true; + return promiseResolvedWith(undefined); + } + reading = true; + const byobRequest = ReadableByteStreamControllerGetBYOBRequest(branch1._readableStreamController); + if (byobRequest === null) { + pullWithDefaultReader(); + } + else { + pullWithBYOBReader(byobRequest._view, false); + } + return promiseResolvedWith(undefined); + } + function pull2Algorithm() { + if (reading) { + readAgainForBranch2 = true; + return promiseResolvedWith(undefined); + } + reading = true; + const byobRequest = ReadableByteStreamControllerGetBYOBRequest(branch2._readableStreamController); + if (byobRequest === null) { + pullWithDefaultReader(); + } + else { + pullWithBYOBReader(byobRequest._view, true); + } + return promiseResolvedWith(undefined); + } + function cancel1Algorithm(reason) { + canceled1 = true; + reason1 = reason; + if (canceled2) { + const compositeReason = CreateArrayFromList([reason1, reason2]); + const cancelResult = ReadableStreamCancel(stream, compositeReason); + resolveCancelPromise(cancelResult); + } + return cancelPromise; + } + function cancel2Algorithm(reason) { + canceled2 = true; + reason2 = reason; + if (canceled1) { + const compositeReason = CreateArrayFromList([reason1, reason2]); + const cancelResult = ReadableStreamCancel(stream, compositeReason); + resolveCancelPromise(cancelResult); + } + return cancelPromise; + } + function startAlgorithm() { + return; + } + branch1 = CreateReadableByteStream(startAlgorithm, pull1Algorithm, cancel1Algorithm); + branch2 = CreateReadableByteStream(startAlgorithm, pull2Algorithm, cancel2Algorithm); + forwardReaderError(reader); + return [branch1, branch2]; + } + + function convertUnderlyingDefaultOrByteSource(source, context) { + assertDictionary(source, context); + const original = source; + const autoAllocateChunkSize = original === null || original === void 0 ? void 0 : original.autoAllocateChunkSize; + const cancel = original === null || original === void 0 ? void 0 : original.cancel; + const pull = original === null || original === void 0 ? void 0 : original.pull; + const start = original === null || original === void 0 ? void 0 : original.start; + const type = original === null || original === void 0 ? void 0 : original.type; + return { + autoAllocateChunkSize: autoAllocateChunkSize === undefined ? + undefined : + convertUnsignedLongLongWithEnforceRange(autoAllocateChunkSize, `${context} has member 'autoAllocateChunkSize' that`), + cancel: cancel === undefined ? + undefined : + convertUnderlyingSourceCancelCallback(cancel, original, `${context} has member 'cancel' that`), + pull: pull === undefined ? + undefined : + convertUnderlyingSourcePullCallback(pull, original, `${context} has member 'pull' that`), + start: start === undefined ? + undefined : + convertUnderlyingSourceStartCallback(start, original, `${context} has member 'start' that`), + type: type === undefined ? undefined : convertReadableStreamType(type, `${context} has member 'type' that`) + }; + } + function convertUnderlyingSourceCancelCallback(fn, original, context) { + assertFunction(fn, context); + return (reason) => promiseCall(fn, original, [reason]); + } + function convertUnderlyingSourcePullCallback(fn, original, context) { + assertFunction(fn, context); + return (controller) => promiseCall(fn, original, [controller]); + } + function convertUnderlyingSourceStartCallback(fn, original, context) { + assertFunction(fn, context); + return (controller) => reflectCall(fn, original, [controller]); + } + function convertReadableStreamType(type, context) { + type = `${type}`; + if (type !== 'bytes') { + throw new TypeError(`${context} '${type}' is not a valid enumeration value for ReadableStreamType`); + } + return type; + } + + function convertReaderOptions(options, context) { + assertDictionary(options, context); + const mode = options === null || options === void 0 ? void 0 : options.mode; + return { + mode: mode === undefined ? undefined : convertReadableStreamReaderMode(mode, `${context} has member 'mode' that`) + }; + } + function convertReadableStreamReaderMode(mode, context) { + mode = `${mode}`; + if (mode !== 'byob') { + throw new TypeError(`${context} '${mode}' is not a valid enumeration value for ReadableStreamReaderMode`); + } + return mode; + } + + function convertIteratorOptions(options, context) { + assertDictionary(options, context); + const preventCancel = options === null || options === void 0 ? void 0 : options.preventCancel; + return { preventCancel: Boolean(preventCancel) }; + } + + function convertPipeOptions(options, context) { + assertDictionary(options, context); + const preventAbort = options === null || options === void 0 ? void 0 : options.preventAbort; + const preventCancel = options === null || options === void 0 ? void 0 : options.preventCancel; + const preventClose = options === null || options === void 0 ? void 0 : options.preventClose; + const signal = options === null || options === void 0 ? void 0 : options.signal; + if (signal !== undefined) { + assertAbortSignal(signal, `${context} has member 'signal' that`); + } + return { + preventAbort: Boolean(preventAbort), + preventCancel: Boolean(preventCancel), + preventClose: Boolean(preventClose), + signal + }; + } + function assertAbortSignal(signal, context) { + if (!isAbortSignal(signal)) { + throw new TypeError(`${context} is not an AbortSignal.`); + } + } + + function convertReadableWritablePair(pair, context) { + assertDictionary(pair, context); + const readable = pair === null || pair === void 0 ? void 0 : pair.readable; + assertRequiredField(readable, 'readable', 'ReadableWritablePair'); + assertReadableStream(readable, `${context} has member 'readable' that`); + const writable = pair === null || pair === void 0 ? void 0 : pair.writable; + assertRequiredField(writable, 'writable', 'ReadableWritablePair'); + assertWritableStream(writable, `${context} has member 'writable' that`); + return { readable, writable }; + } + + /** + * A readable stream represents a source of data, from which you can read. + * + * @public + */ + class ReadableStream { + constructor(rawUnderlyingSource = {}, rawStrategy = {}) { + if (rawUnderlyingSource === undefined) { + rawUnderlyingSource = null; + } + else { + assertObject(rawUnderlyingSource, 'First parameter'); + } + const strategy = convertQueuingStrategy(rawStrategy, 'Second parameter'); + const underlyingSource = convertUnderlyingDefaultOrByteSource(rawUnderlyingSource, 'First parameter'); + InitializeReadableStream(this); + if (underlyingSource.type === 'bytes') { + if (strategy.size !== undefined) { + throw new RangeError('The strategy for a byte stream cannot have a size function'); + } + const highWaterMark = ExtractHighWaterMark(strategy, 0); + SetUpReadableByteStreamControllerFromUnderlyingSource(this, underlyingSource, highWaterMark); + } + else { + const sizeAlgorithm = ExtractSizeAlgorithm(strategy); + const highWaterMark = ExtractHighWaterMark(strategy, 1); + SetUpReadableStreamDefaultControllerFromUnderlyingSource(this, underlyingSource, highWaterMark, sizeAlgorithm); + } + } + /** + * Whether or not the readable stream is locked to a {@link ReadableStreamDefaultReader | reader}. + */ + get locked() { + if (!IsReadableStream(this)) { + throw streamBrandCheckException$1('locked'); + } + return IsReadableStreamLocked(this); + } + /** + * Cancels the stream, signaling a loss of interest in the stream by a consumer. + * + * The supplied `reason` argument will be given to the underlying source's {@link UnderlyingSource.cancel | cancel()} + * method, which might or might not use it. + */ + cancel(reason = undefined) { + if (!IsReadableStream(this)) { + return promiseRejectedWith(streamBrandCheckException$1('cancel')); + } + if (IsReadableStreamLocked(this)) { + return promiseRejectedWith(new TypeError('Cannot cancel a stream that already has a reader')); + } + return ReadableStreamCancel(this, reason); + } + getReader(rawOptions = undefined) { + if (!IsReadableStream(this)) { + throw streamBrandCheckException$1('getReader'); + } + const options = convertReaderOptions(rawOptions, 'First parameter'); + if (options.mode === undefined) { + return AcquireReadableStreamDefaultReader(this); + } + return AcquireReadableStreamBYOBReader(this); + } + pipeThrough(rawTransform, rawOptions = {}) { + if (!IsReadableStream(this)) { + throw streamBrandCheckException$1('pipeThrough'); + } + assertRequiredArgument(rawTransform, 1, 'pipeThrough'); + const transform = convertReadableWritablePair(rawTransform, 'First parameter'); + const options = convertPipeOptions(rawOptions, 'Second parameter'); + if (IsReadableStreamLocked(this)) { + throw new TypeError('ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream'); + } + if (IsWritableStreamLocked(transform.writable)) { + throw new TypeError('ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream'); + } + const promise = ReadableStreamPipeTo(this, transform.writable, options.preventClose, options.preventAbort, options.preventCancel, options.signal); + setPromiseIsHandledToTrue(promise); + return transform.readable; + } + pipeTo(destination, rawOptions = {}) { + if (!IsReadableStream(this)) { + return promiseRejectedWith(streamBrandCheckException$1('pipeTo')); + } + if (destination === undefined) { + return promiseRejectedWith(`Parameter 1 is required in 'pipeTo'.`); + } + if (!IsWritableStream(destination)) { + return promiseRejectedWith(new TypeError(`ReadableStream.prototype.pipeTo's first argument must be a WritableStream`)); + } + let options; + try { + options = convertPipeOptions(rawOptions, 'Second parameter'); + } + catch (e) { + return promiseRejectedWith(e); + } + if (IsReadableStreamLocked(this)) { + return promiseRejectedWith(new TypeError('ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream')); + } + if (IsWritableStreamLocked(destination)) { + return promiseRejectedWith(new TypeError('ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream')); + } + return ReadableStreamPipeTo(this, destination, options.preventClose, options.preventAbort, options.preventCancel, options.signal); + } + /** + * Tees this readable stream, returning a two-element array containing the two resulting branches as + * new {@link ReadableStream} instances. + * + * Teeing a stream will lock it, preventing any other consumer from acquiring a reader. + * To cancel the stream, cancel both of the resulting branches; a composite cancellation reason will then be + * propagated to the stream's underlying source. + * + * Note that the chunks seen in each branch will be the same object. If the chunks are not immutable, + * this could allow interference between the two branches. + */ + tee() { + if (!IsReadableStream(this)) { + throw streamBrandCheckException$1('tee'); + } + const branches = ReadableStreamTee(this); + return CreateArrayFromList(branches); + } + values(rawOptions = undefined) { + if (!IsReadableStream(this)) { + throw streamBrandCheckException$1('values'); + } + const options = convertIteratorOptions(rawOptions, 'First parameter'); + return AcquireReadableStreamAsyncIterator(this, options.preventCancel); + } + } + Object.defineProperties(ReadableStream.prototype, { + cancel: { enumerable: true }, + getReader: { enumerable: true }, + pipeThrough: { enumerable: true }, + pipeTo: { enumerable: true }, + tee: { enumerable: true }, + values: { enumerable: true }, + locked: { enumerable: true } + }); + if (typeof SymbolPolyfill.toStringTag === 'symbol') { + Object.defineProperty(ReadableStream.prototype, SymbolPolyfill.toStringTag, { + value: 'ReadableStream', + configurable: true + }); + } + if (typeof SymbolPolyfill.asyncIterator === 'symbol') { + Object.defineProperty(ReadableStream.prototype, SymbolPolyfill.asyncIterator, { + value: ReadableStream.prototype.values, + writable: true, + configurable: true + }); + } + // Abstract operations for the ReadableStream. + // Throws if and only if startAlgorithm throws. + function CreateReadableStream(startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark = 1, sizeAlgorithm = () => 1) { + const stream = Object.create(ReadableStream.prototype); + InitializeReadableStream(stream); + const controller = Object.create(ReadableStreamDefaultController.prototype); + SetUpReadableStreamDefaultController(stream, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark, sizeAlgorithm); + return stream; + } + // Throws if and only if startAlgorithm throws. + function CreateReadableByteStream(startAlgorithm, pullAlgorithm, cancelAlgorithm) { + const stream = Object.create(ReadableStream.prototype); + InitializeReadableStream(stream); + const controller = Object.create(ReadableByteStreamController.prototype); + SetUpReadableByteStreamController(stream, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, 0, undefined); + return stream; + } + function InitializeReadableStream(stream) { + stream._state = 'readable'; + stream._reader = undefined; + stream._storedError = undefined; + stream._disturbed = false; + } + function IsReadableStream(x) { + if (!typeIsObject(x)) { + return false; + } + if (!Object.prototype.hasOwnProperty.call(x, '_readableStreamController')) { + return false; + } + return x instanceof ReadableStream; + } + function IsReadableStreamLocked(stream) { + if (stream._reader === undefined) { + return false; + } + return true; + } + // ReadableStream API exposed for controllers. + function ReadableStreamCancel(stream, reason) { + stream._disturbed = true; + if (stream._state === 'closed') { + return promiseResolvedWith(undefined); + } + if (stream._state === 'errored') { + return promiseRejectedWith(stream._storedError); + } + ReadableStreamClose(stream); + const reader = stream._reader; + if (reader !== undefined && IsReadableStreamBYOBReader(reader)) { + reader._readIntoRequests.forEach(readIntoRequest => { + readIntoRequest._closeSteps(undefined); + }); + reader._readIntoRequests = new SimpleQueue(); + } + const sourceCancelPromise = stream._readableStreamController[CancelSteps](reason); + return transformPromiseWith(sourceCancelPromise, noop); + } + function ReadableStreamClose(stream) { + stream._state = 'closed'; + const reader = stream._reader; + if (reader === undefined) { + return; + } + defaultReaderClosedPromiseResolve(reader); + if (IsReadableStreamDefaultReader(reader)) { + reader._readRequests.forEach(readRequest => { + readRequest._closeSteps(); + }); + reader._readRequests = new SimpleQueue(); + } + } + function ReadableStreamError(stream, e) { + stream._state = 'errored'; + stream._storedError = e; + const reader = stream._reader; + if (reader === undefined) { + return; + } + defaultReaderClosedPromiseReject(reader, e); + if (IsReadableStreamDefaultReader(reader)) { + reader._readRequests.forEach(readRequest => { + readRequest._errorSteps(e); + }); + reader._readRequests = new SimpleQueue(); + } + else { + reader._readIntoRequests.forEach(readIntoRequest => { + readIntoRequest._errorSteps(e); + }); + reader._readIntoRequests = new SimpleQueue(); + } + } + // Helper functions for the ReadableStream. + function streamBrandCheckException$1(name) { + return new TypeError(`ReadableStream.prototype.${name} can only be used on a ReadableStream`); + } + + function convertQueuingStrategyInit(init, context) { + assertDictionary(init, context); + const highWaterMark = init === null || init === void 0 ? void 0 : init.highWaterMark; + assertRequiredField(highWaterMark, 'highWaterMark', 'QueuingStrategyInit'); + return { + highWaterMark: convertUnrestrictedDouble(highWaterMark) + }; + } + + // The size function must not have a prototype property nor be a constructor + const byteLengthSizeFunction = (chunk) => { + return chunk.byteLength; + }; + try { + Object.defineProperty(byteLengthSizeFunction, 'name', { + value: 'size', + configurable: true + }); + } + catch (_a) { + // This property is non-configurable in older browsers, so ignore if this throws. + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/name#browser_compatibility + } + /** + * A queuing strategy that counts the number of bytes in each chunk. + * + * @public + */ + class ByteLengthQueuingStrategy { + constructor(options) { + assertRequiredArgument(options, 1, 'ByteLengthQueuingStrategy'); + options = convertQueuingStrategyInit(options, 'First parameter'); + this._byteLengthQueuingStrategyHighWaterMark = options.highWaterMark; + } + /** + * Returns the high water mark provided to the constructor. + */ + get highWaterMark() { + if (!IsByteLengthQueuingStrategy(this)) { + throw byteLengthBrandCheckException('highWaterMark'); + } + return this._byteLengthQueuingStrategyHighWaterMark; + } + /** + * Measures the size of `chunk` by returning the value of its `byteLength` property. + */ + get size() { + if (!IsByteLengthQueuingStrategy(this)) { + throw byteLengthBrandCheckException('size'); + } + return byteLengthSizeFunction; + } + } + Object.defineProperties(ByteLengthQueuingStrategy.prototype, { + highWaterMark: { enumerable: true }, + size: { enumerable: true } + }); + if (typeof SymbolPolyfill.toStringTag === 'symbol') { + Object.defineProperty(ByteLengthQueuingStrategy.prototype, SymbolPolyfill.toStringTag, { + value: 'ByteLengthQueuingStrategy', + configurable: true + }); + } + // Helper functions for the ByteLengthQueuingStrategy. + function byteLengthBrandCheckException(name) { + return new TypeError(`ByteLengthQueuingStrategy.prototype.${name} can only be used on a ByteLengthQueuingStrategy`); + } + function IsByteLengthQueuingStrategy(x) { + if (!typeIsObject(x)) { + return false; + } + if (!Object.prototype.hasOwnProperty.call(x, '_byteLengthQueuingStrategyHighWaterMark')) { + return false; + } + return x instanceof ByteLengthQueuingStrategy; + } + + // The size function must not have a prototype property nor be a constructor + const countSizeFunction = () => { + return 1; + }; + try { + Object.defineProperty(countSizeFunction, 'name', { + value: 'size', + configurable: true + }); + } + catch (_a) { + // This property is non-configurable in older browsers, so ignore if this throws. + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/name#browser_compatibility + } + /** + * A queuing strategy that counts the number of chunks. + * + * @public + */ + class CountQueuingStrategy { + constructor(options) { + assertRequiredArgument(options, 1, 'CountQueuingStrategy'); + options = convertQueuingStrategyInit(options, 'First parameter'); + this._countQueuingStrategyHighWaterMark = options.highWaterMark; + } + /** + * Returns the high water mark provided to the constructor. + */ + get highWaterMark() { + if (!IsCountQueuingStrategy(this)) { + throw countBrandCheckException('highWaterMark'); + } + return this._countQueuingStrategyHighWaterMark; + } + /** + * Measures the size of `chunk` by always returning 1. + * This ensures that the total queue size is a count of the number of chunks in the queue. + */ + get size() { + if (!IsCountQueuingStrategy(this)) { + throw countBrandCheckException('size'); + } + return countSizeFunction; + } + } + Object.defineProperties(CountQueuingStrategy.prototype, { + highWaterMark: { enumerable: true }, + size: { enumerable: true } + }); + if (typeof SymbolPolyfill.toStringTag === 'symbol') { + Object.defineProperty(CountQueuingStrategy.prototype, SymbolPolyfill.toStringTag, { + value: 'CountQueuingStrategy', + configurable: true + }); + } + // Helper functions for the CountQueuingStrategy. + function countBrandCheckException(name) { + return new TypeError(`CountQueuingStrategy.prototype.${name} can only be used on a CountQueuingStrategy`); + } + function IsCountQueuingStrategy(x) { + if (!typeIsObject(x)) { + return false; + } + if (!Object.prototype.hasOwnProperty.call(x, '_countQueuingStrategyHighWaterMark')) { + return false; + } + return x instanceof CountQueuingStrategy; + } + + function convertTransformer(original, context) { + assertDictionary(original, context); + const flush = original === null || original === void 0 ? void 0 : original.flush; + const readableType = original === null || original === void 0 ? void 0 : original.readableType; + const start = original === null || original === void 0 ? void 0 : original.start; + const transform = original === null || original === void 0 ? void 0 : original.transform; + const writableType = original === null || original === void 0 ? void 0 : original.writableType; + return { + flush: flush === undefined ? + undefined : + convertTransformerFlushCallback(flush, original, `${context} has member 'flush' that`), + readableType, + start: start === undefined ? + undefined : + convertTransformerStartCallback(start, original, `${context} has member 'start' that`), + transform: transform === undefined ? + undefined : + convertTransformerTransformCallback(transform, original, `${context} has member 'transform' that`), + writableType + }; + } + function convertTransformerFlushCallback(fn, original, context) { + assertFunction(fn, context); + return (controller) => promiseCall(fn, original, [controller]); + } + function convertTransformerStartCallback(fn, original, context) { + assertFunction(fn, context); + return (controller) => reflectCall(fn, original, [controller]); + } + function convertTransformerTransformCallback(fn, original, context) { + assertFunction(fn, context); + return (chunk, controller) => promiseCall(fn, original, [chunk, controller]); + } + + // Class TransformStream + /** + * A transform stream consists of a pair of streams: a {@link WritableStream | writable stream}, + * known as its writable side, and a {@link ReadableStream | readable stream}, known as its readable side. + * In a manner specific to the transform stream in question, writes to the writable side result in new data being + * made available for reading from the readable side. + * + * @public + */ + class TransformStream { + constructor(rawTransformer = {}, rawWritableStrategy = {}, rawReadableStrategy = {}) { + if (rawTransformer === undefined) { + rawTransformer = null; + } + const writableStrategy = convertQueuingStrategy(rawWritableStrategy, 'Second parameter'); + const readableStrategy = convertQueuingStrategy(rawReadableStrategy, 'Third parameter'); + const transformer = convertTransformer(rawTransformer, 'First parameter'); + if (transformer.readableType !== undefined) { + throw new RangeError('Invalid readableType specified'); + } + if (transformer.writableType !== undefined) { + throw new RangeError('Invalid writableType specified'); + } + const readableHighWaterMark = ExtractHighWaterMark(readableStrategy, 0); + const readableSizeAlgorithm = ExtractSizeAlgorithm(readableStrategy); + const writableHighWaterMark = ExtractHighWaterMark(writableStrategy, 1); + const writableSizeAlgorithm = ExtractSizeAlgorithm(writableStrategy); + let startPromise_resolve; + const startPromise = newPromise(resolve => { + startPromise_resolve = resolve; + }); + InitializeTransformStream(this, startPromise, writableHighWaterMark, writableSizeAlgorithm, readableHighWaterMark, readableSizeAlgorithm); + SetUpTransformStreamDefaultControllerFromTransformer(this, transformer); + if (transformer.start !== undefined) { + startPromise_resolve(transformer.start(this._transformStreamController)); + } + else { + startPromise_resolve(undefined); + } + } + /** + * The readable side of the transform stream. + */ + get readable() { + if (!IsTransformStream(this)) { + throw streamBrandCheckException('readable'); + } + return this._readable; + } + /** + * The writable side of the transform stream. + */ + get writable() { + if (!IsTransformStream(this)) { + throw streamBrandCheckException('writable'); + } + return this._writable; + } + } + Object.defineProperties(TransformStream.prototype, { + readable: { enumerable: true }, + writable: { enumerable: true } + }); + if (typeof SymbolPolyfill.toStringTag === 'symbol') { + Object.defineProperty(TransformStream.prototype, SymbolPolyfill.toStringTag, { + value: 'TransformStream', + configurable: true + }); + } + function InitializeTransformStream(stream, startPromise, writableHighWaterMark, writableSizeAlgorithm, readableHighWaterMark, readableSizeAlgorithm) { + function startAlgorithm() { + return startPromise; + } + function writeAlgorithm(chunk) { + return TransformStreamDefaultSinkWriteAlgorithm(stream, chunk); + } + function abortAlgorithm(reason) { + return TransformStreamDefaultSinkAbortAlgorithm(stream, reason); + } + function closeAlgorithm() { + return TransformStreamDefaultSinkCloseAlgorithm(stream); + } + stream._writable = CreateWritableStream(startAlgorithm, writeAlgorithm, closeAlgorithm, abortAlgorithm, writableHighWaterMark, writableSizeAlgorithm); + function pullAlgorithm() { + return TransformStreamDefaultSourcePullAlgorithm(stream); + } + function cancelAlgorithm(reason) { + TransformStreamErrorWritableAndUnblockWrite(stream, reason); + return promiseResolvedWith(undefined); + } + stream._readable = CreateReadableStream(startAlgorithm, pullAlgorithm, cancelAlgorithm, readableHighWaterMark, readableSizeAlgorithm); + // The [[backpressure]] slot is set to undefined so that it can be initialised by TransformStreamSetBackpressure. + stream._backpressure = undefined; + stream._backpressureChangePromise = undefined; + stream._backpressureChangePromise_resolve = undefined; + TransformStreamSetBackpressure(stream, true); + stream._transformStreamController = undefined; + } + function IsTransformStream(x) { + if (!typeIsObject(x)) { + return false; + } + if (!Object.prototype.hasOwnProperty.call(x, '_transformStreamController')) { + return false; + } + return x instanceof TransformStream; + } + // This is a no-op if both sides are already errored. + function TransformStreamError(stream, e) { + ReadableStreamDefaultControllerError(stream._readable._readableStreamController, e); + TransformStreamErrorWritableAndUnblockWrite(stream, e); + } + function TransformStreamErrorWritableAndUnblockWrite(stream, e) { + TransformStreamDefaultControllerClearAlgorithms(stream._transformStreamController); + WritableStreamDefaultControllerErrorIfNeeded(stream._writable._writableStreamController, e); + if (stream._backpressure) { + // Pretend that pull() was called to permit any pending write() calls to complete. TransformStreamSetBackpressure() + // cannot be called from enqueue() or pull() once the ReadableStream is errored, so this will will be the final time + // _backpressure is set. + TransformStreamSetBackpressure(stream, false); + } + } + function TransformStreamSetBackpressure(stream, backpressure) { + // Passes also when called during construction. + if (stream._backpressureChangePromise !== undefined) { + stream._backpressureChangePromise_resolve(); + } + stream._backpressureChangePromise = newPromise(resolve => { + stream._backpressureChangePromise_resolve = resolve; + }); + stream._backpressure = backpressure; + } + // Class TransformStreamDefaultController + /** + * Allows control of the {@link ReadableStream} and {@link WritableStream} of the associated {@link TransformStream}. + * + * @public + */ + class TransformStreamDefaultController { + constructor() { + throw new TypeError('Illegal constructor'); + } + /** + * Returns the desired size to fill the readable side’s internal queue. It can be negative, if the queue is over-full. + */ + get desiredSize() { + if (!IsTransformStreamDefaultController(this)) { + throw defaultControllerBrandCheckException('desiredSize'); + } + const readableController = this._controlledTransformStream._readable._readableStreamController; + return ReadableStreamDefaultControllerGetDesiredSize(readableController); + } + enqueue(chunk = undefined) { + if (!IsTransformStreamDefaultController(this)) { + throw defaultControllerBrandCheckException('enqueue'); + } + TransformStreamDefaultControllerEnqueue(this, chunk); + } + /** + * Errors both the readable side and the writable side of the controlled transform stream, making all future + * interactions with it fail with the given error `e`. Any chunks queued for transformation will be discarded. + */ + error(reason = undefined) { + if (!IsTransformStreamDefaultController(this)) { + throw defaultControllerBrandCheckException('error'); + } + TransformStreamDefaultControllerError(this, reason); + } + /** + * Closes the readable side and errors the writable side of the controlled transform stream. This is useful when the + * transformer only needs to consume a portion of the chunks written to the writable side. + */ + terminate() { + if (!IsTransformStreamDefaultController(this)) { + throw defaultControllerBrandCheckException('terminate'); + } + TransformStreamDefaultControllerTerminate(this); + } + } + Object.defineProperties(TransformStreamDefaultController.prototype, { + enqueue: { enumerable: true }, + error: { enumerable: true }, + terminate: { enumerable: true }, + desiredSize: { enumerable: true } + }); + if (typeof SymbolPolyfill.toStringTag === 'symbol') { + Object.defineProperty(TransformStreamDefaultController.prototype, SymbolPolyfill.toStringTag, { + value: 'TransformStreamDefaultController', + configurable: true + }); + } + // Transform Stream Default Controller Abstract Operations + function IsTransformStreamDefaultController(x) { + if (!typeIsObject(x)) { + return false; + } + if (!Object.prototype.hasOwnProperty.call(x, '_controlledTransformStream')) { + return false; + } + return x instanceof TransformStreamDefaultController; + } + function SetUpTransformStreamDefaultController(stream, controller, transformAlgorithm, flushAlgorithm) { + controller._controlledTransformStream = stream; + stream._transformStreamController = controller; + controller._transformAlgorithm = transformAlgorithm; + controller._flushAlgorithm = flushAlgorithm; + } + function SetUpTransformStreamDefaultControllerFromTransformer(stream, transformer) { + const controller = Object.create(TransformStreamDefaultController.prototype); + let transformAlgorithm = (chunk) => { + try { + TransformStreamDefaultControllerEnqueue(controller, chunk); + return promiseResolvedWith(undefined); + } + catch (transformResultE) { + return promiseRejectedWith(transformResultE); + } + }; + let flushAlgorithm = () => promiseResolvedWith(undefined); + if (transformer.transform !== undefined) { + transformAlgorithm = chunk => transformer.transform(chunk, controller); + } + if (transformer.flush !== undefined) { + flushAlgorithm = () => transformer.flush(controller); + } + SetUpTransformStreamDefaultController(stream, controller, transformAlgorithm, flushAlgorithm); + } + function TransformStreamDefaultControllerClearAlgorithms(controller) { + controller._transformAlgorithm = undefined; + controller._flushAlgorithm = undefined; + } + function TransformStreamDefaultControllerEnqueue(controller, chunk) { + const stream = controller._controlledTransformStream; + const readableController = stream._readable._readableStreamController; + if (!ReadableStreamDefaultControllerCanCloseOrEnqueue(readableController)) { + throw new TypeError('Readable side is not in a state that permits enqueue'); + } + // We throttle transform invocations based on the backpressure of the ReadableStream, but we still + // accept TransformStreamDefaultControllerEnqueue() calls. + try { + ReadableStreamDefaultControllerEnqueue(readableController, chunk); + } + catch (e) { + // This happens when readableStrategy.size() throws. + TransformStreamErrorWritableAndUnblockWrite(stream, e); + throw stream._readable._storedError; + } + const backpressure = ReadableStreamDefaultControllerHasBackpressure(readableController); + if (backpressure !== stream._backpressure) { + TransformStreamSetBackpressure(stream, true); + } + } + function TransformStreamDefaultControllerError(controller, e) { + TransformStreamError(controller._controlledTransformStream, e); + } + function TransformStreamDefaultControllerPerformTransform(controller, chunk) { + const transformPromise = controller._transformAlgorithm(chunk); + return transformPromiseWith(transformPromise, undefined, r => { + TransformStreamError(controller._controlledTransformStream, r); + throw r; + }); + } + function TransformStreamDefaultControllerTerminate(controller) { + const stream = controller._controlledTransformStream; + const readableController = stream._readable._readableStreamController; + ReadableStreamDefaultControllerClose(readableController); + const error = new TypeError('TransformStream terminated'); + TransformStreamErrorWritableAndUnblockWrite(stream, error); + } + // TransformStreamDefaultSink Algorithms + function TransformStreamDefaultSinkWriteAlgorithm(stream, chunk) { + const controller = stream._transformStreamController; + if (stream._backpressure) { + const backpressureChangePromise = stream._backpressureChangePromise; + return transformPromiseWith(backpressureChangePromise, () => { + const writable = stream._writable; + const state = writable._state; + if (state === 'erroring') { + throw writable._storedError; + } + return TransformStreamDefaultControllerPerformTransform(controller, chunk); + }); + } + return TransformStreamDefaultControllerPerformTransform(controller, chunk); + } + function TransformStreamDefaultSinkAbortAlgorithm(stream, reason) { + // abort() is not called synchronously, so it is possible for abort() to be called when the stream is already + // errored. + TransformStreamError(stream, reason); + return promiseResolvedWith(undefined); + } + function TransformStreamDefaultSinkCloseAlgorithm(stream) { + // stream._readable cannot change after construction, so caching it across a call to user code is safe. + const readable = stream._readable; + const controller = stream._transformStreamController; + const flushPromise = controller._flushAlgorithm(); + TransformStreamDefaultControllerClearAlgorithms(controller); + // Return a promise that is fulfilled with undefined on success. + return transformPromiseWith(flushPromise, () => { + if (readable._state === 'errored') { + throw readable._storedError; + } + ReadableStreamDefaultControllerClose(readable._readableStreamController); + }, r => { + TransformStreamError(stream, r); + throw readable._storedError; + }); + } + // TransformStreamDefaultSource Algorithms + function TransformStreamDefaultSourcePullAlgorithm(stream) { + // Invariant. Enforced by the promises returned by start() and pull(). + TransformStreamSetBackpressure(stream, false); + // Prevent the next pull() call until there is backpressure. + return stream._backpressureChangePromise; + } + // Helper functions for the TransformStreamDefaultController. + function defaultControllerBrandCheckException(name) { + return new TypeError(`TransformStreamDefaultController.prototype.${name} can only be used on a TransformStreamDefaultController`); + } + // Helper functions for the TransformStream. + function streamBrandCheckException(name) { + return new TypeError(`TransformStream.prototype.${name} can only be used on a TransformStream`); + } + + exports.ByteLengthQueuingStrategy = ByteLengthQueuingStrategy; + exports.CountQueuingStrategy = CountQueuingStrategy; + exports.ReadableByteStreamController = ReadableByteStreamController; + exports.ReadableStream = ReadableStream; + exports.ReadableStreamBYOBReader = ReadableStreamBYOBReader; + exports.ReadableStreamBYOBRequest = ReadableStreamBYOBRequest; + exports.ReadableStreamDefaultController = ReadableStreamDefaultController; + exports.ReadableStreamDefaultReader = ReadableStreamDefaultReader; + exports.TransformStream = TransformStream; + exports.TransformStreamDefaultController = TransformStreamDefaultController; + exports.WritableStream = WritableStream; + exports.WritableStreamDefaultController = WritableStreamDefaultController; + exports.WritableStreamDefaultWriter = WritableStreamDefaultWriter; + + Object.defineProperty(exports, '__esModule', { value: true }); + +}))); +//# sourceMappingURL=ponyfill.es2018.js.map + + +/***/ }), + +/***/ 2940: +/***/ ((module) => { + +// Returns a wrapper function that returns a wrapped callback +// The wrapper function should do some stuff, and return a +// presumably different callback function. +// This makes sure that own properties are retained, so that +// decorations and such are not lost along the way. +module.exports = wrappy +function wrappy (fn, cb) { + if (fn && cb) return wrappy(fn)(cb) + + if (typeof fn !== 'function') + throw new TypeError('need wrapper function') + + Object.keys(fn).forEach(function (k) { + wrapper[k] = fn[k] + }) + + return wrapper + + function wrapper() { + var args = new Array(arguments.length) + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i] + } + var ret = fn.apply(this, args) + var cb = args[args.length-1] + if (typeof ret === 'function' && ret !== cb) { + Object.keys(cb).forEach(function (k) { + ret[k] = cb[k] + }) + } + return ret + } +} + + +/***/ }), + +/***/ 9491: +/***/ ((module) => { + +"use strict"; +module.exports = require("assert"); + +/***/ }), + +/***/ 4300: +/***/ ((module) => { + +"use strict"; +module.exports = require("buffer"); + +/***/ }), + +/***/ 2081: +/***/ ((module) => { + +"use strict"; +module.exports = require("child_process"); + +/***/ }), + +/***/ 2361: +/***/ ((module) => { + +"use strict"; +module.exports = require("events"); + +/***/ }), + +/***/ 7147: +/***/ ((module) => { + +"use strict"; +module.exports = require("fs"); + +/***/ }), + +/***/ 3685: +/***/ ((module) => { + +"use strict"; +module.exports = require("http"); + +/***/ }), + +/***/ 5687: +/***/ ((module) => { + +"use strict"; +module.exports = require("https"); + +/***/ }), + +/***/ 1808: +/***/ ((module) => { + +"use strict"; +module.exports = require("net"); + +/***/ }), + +/***/ 7742: +/***/ ((module) => { + +"use strict"; +module.exports = require("node:process"); + +/***/ }), + +/***/ 2477: +/***/ ((module) => { + +"use strict"; +module.exports = require("node:stream/web"); + +/***/ }), + +/***/ 2037: +/***/ ((module) => { + +"use strict"; +module.exports = require("os"); + +/***/ }), + +/***/ 1017: +/***/ ((module) => { + +"use strict"; +module.exports = require("path"); + +/***/ }), + +/***/ 4404: +/***/ ((module) => { + +"use strict"; +module.exports = require("tls"); + +/***/ }), + +/***/ 3837: +/***/ ((module) => { + +"use strict"; +module.exports = require("util"); + +/***/ }), + +/***/ 1267: +/***/ ((module) => { + +"use strict"; +module.exports = require("worker_threads"); + +/***/ }), + +/***/ 8572: +/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { + +/* c8 ignore start */ +// 64 KiB (same size chrome slice theirs blob into Uint8array's) +const POOL_SIZE = 65536 + +if (!globalThis.ReadableStream) { + // `node:stream/web` got introduced in v16.5.0 as experimental + // and it's preferred over the polyfilled version. So we also + // suppress the warning that gets emitted by NodeJS for using it. + try { + const process = __nccwpck_require__(7742) + const { emitWarning } = process + try { + process.emitWarning = () => {} + Object.assign(globalThis, __nccwpck_require__(2477)) + process.emitWarning = emitWarning + } catch (error) { + process.emitWarning = emitWarning + throw error + } + } catch (error) { + // fallback to polyfill implementation + Object.assign(globalThis, __nccwpck_require__(1452)) + } +} + +try { + // Don't use node: prefix for this, require+node: is not supported until node v14.14 + // Only `import()` can use prefix in 12.20 and later + const { Blob } = __nccwpck_require__(4300) + if (Blob && !Blob.prototype.stream) { + Blob.prototype.stream = function name (params) { + let position = 0 + const blob = this + + return new ReadableStream({ + type: 'bytes', + async pull (ctrl) { + const chunk = blob.slice(position, Math.min(blob.size, position + POOL_SIZE)) + const buffer = await chunk.arrayBuffer() + position += buffer.byteLength + ctrl.enqueue(new Uint8Array(buffer)) + + if (position === blob.size) { + ctrl.close() + } + } + }) + } + } +} catch (error) {} +/* c8 ignore end */ + + +/***/ }), + +/***/ 3213: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => { + +"use strict"; +/* harmony export */ __nccwpck_require__.d(__webpack_exports__, { +/* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* unused harmony export File */ +/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(1410); + + +const _File = class File extends _index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z { + #lastModified = 0 + #name = '' + + /** + * @param {*[]} fileBits + * @param {string} fileName + * @param {{lastModified?: number, type?: string}} options + */// @ts-ignore + constructor (fileBits, fileName, options = {}) { + if (arguments.length < 2) { + throw new TypeError(`Failed to construct 'File': 2 arguments required, but only ${arguments.length} present.`) + } + super(fileBits, options) + + if (options === null) options = {} + + // Simulate WebIDL type casting for NaN value in lastModified option. + const lastModified = options.lastModified === undefined ? Date.now() : Number(options.lastModified) + if (!Number.isNaN(lastModified)) { + this.#lastModified = lastModified + } + + this.#name = String(fileName) + } + + get name () { + return this.#name + } + + get lastModified () { + return this.#lastModified + } + + get [Symbol.toStringTag] () { + return 'File' + } + + static [Symbol.hasInstance] (object) { + return !!object && object instanceof _index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z && + /^(File)$/.test(object[Symbol.toStringTag]) + } +} + +/** @type {typeof globalThis.File} */// @ts-ignore +const File = _File +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (File); + + +/***/ }), + +/***/ 2777: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => { + +"use strict"; + +// EXPORTS +__nccwpck_require__.d(__webpack_exports__, { + "t6": () => (/* reexport */ fetch_blob/* default */.Z), + "$B": () => (/* reexport */ file/* default */.Z), + "xB": () => (/* binding */ blobFrom), + "SX": () => (/* binding */ blobFromSync), + "e2": () => (/* binding */ fileFrom), + "RA": () => (/* binding */ fileFromSync) +}); + +// UNUSED EXPORTS: default + +;// CONCATENATED MODULE: external "node:fs" +const external_node_fs_namespaceObject = require("node:fs"); +;// CONCATENATED MODULE: external "node:path" +const external_node_path_namespaceObject = require("node:path"); +// EXTERNAL MODULE: ./node_modules/node-domexception/index.js +var node_domexception = __nccwpck_require__(7760); +// EXTERNAL MODULE: ./node_modules/fetch-blob/file.js +var file = __nccwpck_require__(3213); +// EXTERNAL MODULE: ./node_modules/fetch-blob/index.js +var fetch_blob = __nccwpck_require__(1410); +;// CONCATENATED MODULE: ./node_modules/fetch-blob/from.js + + + + + + + +const { stat } = external_node_fs_namespaceObject.promises + +/** + * @param {string} path filepath on the disk + * @param {string} [type] mimetype to use + */ +const blobFromSync = (path, type) => fromBlob((0,external_node_fs_namespaceObject.statSync)(path), path, type) + +/** + * @param {string} path filepath on the disk + * @param {string} [type] mimetype to use + * @returns {Promise} + */ +const blobFrom = (path, type) => stat(path).then(stat => fromBlob(stat, path, type)) + +/** + * @param {string} path filepath on the disk + * @param {string} [type] mimetype to use + * @returns {Promise} + */ +const fileFrom = (path, type) => stat(path).then(stat => fromFile(stat, path, type)) + +/** + * @param {string} path filepath on the disk + * @param {string} [type] mimetype to use + */ +const fileFromSync = (path, type) => fromFile((0,external_node_fs_namespaceObject.statSync)(path), path, type) + +// @ts-ignore +const fromBlob = (stat, path, type = '') => new fetch_blob/* default */.Z([new BlobDataItem({ + path, + size: stat.size, + lastModified: stat.mtimeMs, + start: 0 +})], { type }) + +// @ts-ignore +const fromFile = (stat, path, type = '') => new file/* default */.Z([new BlobDataItem({ + path, + size: stat.size, + lastModified: stat.mtimeMs, + start: 0 +})], (0,external_node_path_namespaceObject.basename)(path), { type, lastModified: stat.mtimeMs }) + +/** + * This is a blob backed up by a file on the disk + * with minium requirement. Its wrapped around a Blob as a blobPart + * so you have no direct access to this. + * + * @private + */ +class BlobDataItem { + #path + #start + + constructor (options) { + this.#path = options.path + this.#start = options.start + this.size = options.size + this.lastModified = options.lastModified + this.originalSize = options.originalSize === undefined + ? options.size + : options.originalSize + } + + /** + * Slicing arguments is first validated and formatted + * to not be out of range by Blob.prototype.slice + */ + slice (start, end) { + return new BlobDataItem({ + path: this.#path, + lastModified: this.lastModified, + originalSize: this.originalSize, + size: end - start, + start: this.#start + start + }) + } + + async * stream () { + const { mtimeMs, size } = await stat(this.#path) + + if (mtimeMs > this.lastModified || this.originalSize !== size) { + throw new node_domexception('The requested file could not be read, typically due to permission problems that have occurred after a reference to a file was acquired.', 'NotReadableError') + } + + yield * (0,external_node_fs_namespaceObject.createReadStream)(this.#path, { + start: this.#start, + end: this.#start + this.size - 1 + }) + } + + get [Symbol.toStringTag] () { + return 'Blob' + } +} + +/* harmony default export */ const from = ((/* unused pure expression or super */ null && (blobFromSync))); + + + +/***/ }), + +/***/ 1410: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => { + +"use strict"; +/* harmony export */ __nccwpck_require__.d(__webpack_exports__, { +/* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* unused harmony export Blob */ +/* harmony import */ var _streams_cjs__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(8572); +/*! fetch-blob. MIT License. Jimmy Wärting */ + +// TODO (jimmywarting): in the feature use conditional loading with top level await (requires 14.x) +// Node has recently added whatwg stream into core + + + +// 64 KiB (same size chrome slice theirs blob into Uint8array's) +const POOL_SIZE = 65536 + +/** @param {(Blob | Uint8Array)[]} parts */ +async function * toIterator (parts, clone = true) { + for (const part of parts) { + if ('stream' in part) { + yield * (/** @type {AsyncIterableIterator} */ (part.stream())) + } else if (ArrayBuffer.isView(part)) { + if (clone) { + let position = part.byteOffset + const end = part.byteOffset + part.byteLength + while (position !== end) { + const size = Math.min(end - position, POOL_SIZE) + const chunk = part.buffer.slice(position, position + size) + position += chunk.byteLength + yield new Uint8Array(chunk) + } + } else { + yield part + } + /* c8 ignore next 10 */ + } else { + // For blobs that have arrayBuffer but no stream method (nodes buffer.Blob) + let position = 0, b = (/** @type {Blob} */ (part)) + while (position !== b.size) { + const chunk = b.slice(position, Math.min(b.size, position + POOL_SIZE)) + const buffer = await chunk.arrayBuffer() + position += buffer.byteLength + yield new Uint8Array(buffer) + } + } + } +} + +const _Blob = class Blob { + /** @type {Array.<(Blob|Uint8Array)>} */ + #parts = [] + #type = '' + #size = 0 + #endings = 'transparent' + + /** + * The Blob() constructor returns a new Blob object. The content + * of the blob consists of the concatenation of the values given + * in the parameter array. + * + * @param {*} blobParts + * @param {{ type?: string, endings?: string }} [options] + */ + constructor (blobParts = [], options = {}) { + if (typeof blobParts !== 'object' || blobParts === null) { + throw new TypeError('Failed to construct \'Blob\': The provided value cannot be converted to a sequence.') + } + + if (typeof blobParts[Symbol.iterator] !== 'function') { + throw new TypeError('Failed to construct \'Blob\': The object must have a callable @@iterator property.') + } + + if (typeof options !== 'object' && typeof options !== 'function') { + throw new TypeError('Failed to construct \'Blob\': parameter 2 cannot convert to dictionary.') + } + + if (options === null) options = {} + + const encoder = new TextEncoder() + for (const element of blobParts) { + let part + if (ArrayBuffer.isView(element)) { + part = new Uint8Array(element.buffer.slice(element.byteOffset, element.byteOffset + element.byteLength)) + } else if (element instanceof ArrayBuffer) { + part = new Uint8Array(element.slice(0)) + } else if (element instanceof Blob) { + part = element + } else { + part = encoder.encode(`${element}`) + } + + const size = ArrayBuffer.isView(part) ? part.byteLength : part.size + // Avoid pushing empty parts into the array to better GC them + if (size) { + this.#size += size + this.#parts.push(part) + } + } + + this.#endings = `${options.endings === undefined ? 'transparent' : options.endings}` + const type = options.type === undefined ? '' : String(options.type) + this.#type = /^[\x20-\x7E]*$/.test(type) ? type : '' + } + + /** + * The Blob interface's size property returns the + * size of the Blob in bytes. + */ + get size () { + return this.#size + } + + /** + * The type property of a Blob object returns the MIME type of the file. + */ + get type () { + return this.#type + } + + /** + * The text() method in the Blob interface returns a Promise + * that resolves with a string containing the contents of + * the blob, interpreted as UTF-8. + * + * @return {Promise} + */ + async text () { + // More optimized than using this.arrayBuffer() + // that requires twice as much ram + const decoder = new TextDecoder() + let str = '' + for await (const part of toIterator(this.#parts, false)) { + str += decoder.decode(part, { stream: true }) + } + // Remaining + str += decoder.decode() + return str + } + + /** + * The arrayBuffer() method in the Blob interface returns a + * Promise that resolves with the contents of the blob as + * binary data contained in an ArrayBuffer. + * + * @return {Promise} + */ + async arrayBuffer () { + // Easier way... Just a unnecessary overhead + // const view = new Uint8Array(this.size); + // await this.stream().getReader({mode: 'byob'}).read(view); + // return view.buffer; + + const data = new Uint8Array(this.size) + let offset = 0 + for await (const chunk of toIterator(this.#parts, false)) { + data.set(chunk, offset) + offset += chunk.length + } + + return data.buffer + } + + stream () { + const it = toIterator(this.#parts, true) + + return new globalThis.ReadableStream({ + // @ts-ignore + type: 'bytes', + async pull (ctrl) { + const chunk = await it.next() + chunk.done ? ctrl.close() : ctrl.enqueue(chunk.value) + }, + + async cancel () { + await it.return() + } + }) + } + + /** + * The Blob interface's slice() method creates and returns a + * new Blob object which contains data from a subset of the + * blob on which it's called. + * + * @param {number} [start] + * @param {number} [end] + * @param {string} [type] + */ + slice (start = 0, end = this.size, type = '') { + const { size } = this + + let relativeStart = start < 0 ? Math.max(size + start, 0) : Math.min(start, size) + let relativeEnd = end < 0 ? Math.max(size + end, 0) : Math.min(end, size) + + const span = Math.max(relativeEnd - relativeStart, 0) + const parts = this.#parts + const blobParts = [] + let added = 0 + + for (const part of parts) { + // don't add the overflow to new blobParts + if (added >= span) { + break + } + + const size = ArrayBuffer.isView(part) ? part.byteLength : part.size + if (relativeStart && size <= relativeStart) { + // Skip the beginning and change the relative + // start & end position as we skip the unwanted parts + relativeStart -= size + relativeEnd -= size + } else { + let chunk + if (ArrayBuffer.isView(part)) { + chunk = part.subarray(relativeStart, Math.min(size, relativeEnd)) + added += chunk.byteLength + } else { + chunk = part.slice(relativeStart, Math.min(size, relativeEnd)) + added += chunk.size + } + relativeEnd -= size + blobParts.push(chunk) + relativeStart = 0 // All next sequential parts should start at 0 + } + } + + const blob = new Blob([], { type: String(type).toLowerCase() }) + blob.#size = span + blob.#parts = blobParts + + return blob + } + + get [Symbol.toStringTag] () { + return 'Blob' + } + + static [Symbol.hasInstance] (object) { + return ( + object && + typeof object === 'object' && + typeof object.constructor === 'function' && + ( + typeof object.stream === 'function' || + typeof object.arrayBuffer === 'function' + ) && + /^(Blob|File)$/.test(object[Symbol.toStringTag]) + ) + } +} + +Object.defineProperties(_Blob.prototype, { + size: { enumerable: true }, + type: { enumerable: true }, + slice: { enumerable: true } +}) + +/** @type {typeof globalThis.Blob} */ +const Blob = _Blob +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Blob); + + +/***/ }), + +/***/ 8010: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => { + +"use strict"; +/* harmony export */ __nccwpck_require__.d(__webpack_exports__, { +/* harmony export */ "Ct": () => (/* binding */ FormData), +/* harmony export */ "au": () => (/* binding */ formDataToBlob) +/* harmony export */ }); +/* unused harmony export File */ +/* harmony import */ var fetch_blob__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(1410); +/* harmony import */ var fetch_blob_file_js__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(3213); +/*! formdata-polyfill. MIT License. Jimmy Wärting */ + + + + +var {toStringTag:t,iterator:i,hasInstance:h}=Symbol, +r=Math.random, +m='append,set,get,getAll,delete,keys,values,entries,forEach,constructor'.split(','), +f=(a,b,c)=>(a+='',/^(Blob|File)$/.test(b && b[t])?[(c=c!==void 0?c+'':b[t]=='File'?b.name:'blob',a),b.name!==c||b[t]=='blob'?new fetch_blob_file_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z([b],c,b):b]:[a,b+'']), +e=(c,f)=>(f?c:c.replace(/\r?\n|\r/g,'\r\n')).replace(/\n/g,'%0A').replace(/\r/g,'%0D').replace(/"/g,'%22'), +x=(n, a, e)=>{if(a.lengthtypeof o[m]!='function')} +append(...a){x('append',arguments,2);this.#d.push(f(...a))} +delete(a){x('delete',arguments,1);a+='';this.#d=this.#d.filter(([b])=>b!==a)} +get(a){x('get',arguments,1);a+='';for(var b=this.#d,l=b.length,c=0;cc[0]===a&&b.push(c[1]));return b} +has(a){x('has',arguments,1);a+='';return this.#d.some(b=>b[0]===a)} +forEach(a,b){x('forEach',arguments,1);for(var [c,d]of this)a.call(b,d,c,this)} +set(...a){x('set',arguments,2);var b=[],c=!0;a=f(...a);this.#d.forEach(d=>{d[0]===a[0]?c&&(c=!b.push(a)):b.push(d)});c&&b.push(a);this.#d=b} +*entries(){yield*this.#d} +*keys(){for(var[a]of this)yield a} +*values(){for(var[,a]of this)yield a}} + +/** @param {FormData} F */ +function formDataToBlob (F,B=fetch_blob__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z){ +var b=`${r()}${r()}`.replace(/\./g, '').slice(-28).padStart(32, '-'),c=[],p=`--${b}\r\nContent-Disposition: form-data; name="` +F.forEach((v,n)=>typeof v=='string' +?c.push(p+e(n)+`"\r\n\r\n${v.replace(/\r(?!\n)|(? { + +"use strict"; +// ESM COMPAT FLAG +__nccwpck_require__.r(__webpack_exports__); + +// EXPORTS +__nccwpck_require__.d(__webpack_exports__, { + "AbortError": () => (/* reexport */ AbortError), + "Blob": () => (/* reexport */ from/* Blob */.t6), + "FetchError": () => (/* reexport */ FetchError), + "File": () => (/* reexport */ from/* File */.$B), + "FormData": () => (/* reexport */ esm_min/* FormData */.Ct), + "Headers": () => (/* reexport */ Headers), + "Request": () => (/* reexport */ Request), + "Response": () => (/* reexport */ Response), + "blobFrom": () => (/* reexport */ from/* blobFrom */.xB), + "blobFromSync": () => (/* reexport */ from/* blobFromSync */.SX), + "default": () => (/* binding */ fetch), + "fileFrom": () => (/* reexport */ from/* fileFrom */.e2), + "fileFromSync": () => (/* reexport */ from/* fileFromSync */.RA), + "isRedirect": () => (/* reexport */ isRedirect) +}); + +;// CONCATENATED MODULE: external "node:http" +const external_node_http_namespaceObject = require("node:http"); +;// CONCATENATED MODULE: external "node:https" +const external_node_https_namespaceObject = require("node:https"); +;// CONCATENATED MODULE: external "node:zlib" +const external_node_zlib_namespaceObject = require("node:zlib"); +;// CONCATENATED MODULE: external "node:stream" +const external_node_stream_namespaceObject = require("node:stream"); +;// CONCATENATED MODULE: external "node:buffer" +const external_node_buffer_namespaceObject = require("node:buffer"); +;// CONCATENATED MODULE: ./node_modules/data-uri-to-buffer/dist/index.js +/** + * Returns a `Buffer` instance from the given data URI `uri`. + * + * @param {String} uri Data URI to turn into a Buffer instance + * @returns {Buffer} Buffer instance from Data URI + * @api public + */ +function dataUriToBuffer(uri) { + if (!/^data:/i.test(uri)) { + throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")'); + } + // strip newlines + uri = uri.replace(/\r?\n/g, ''); + // split the URI up into the "metadata" and the "data" portions + const firstComma = uri.indexOf(','); + if (firstComma === -1 || firstComma <= 4) { + throw new TypeError('malformed data: URI'); + } + // remove the "data:" scheme and parse the metadata + const meta = uri.substring(5, firstComma).split(';'); + let charset = ''; + let base64 = false; + const type = meta[0] || 'text/plain'; + let typeFull = type; + for (let i = 1; i < meta.length; i++) { + if (meta[i] === 'base64') { + base64 = true; + } + else { + typeFull += `;${meta[i]}`; + if (meta[i].indexOf('charset=') === 0) { + charset = meta[i].substring(8); + } + } + } + // defaults to US-ASCII only if type is not provided + if (!meta[0] && !charset.length) { + typeFull += ';charset=US-ASCII'; + charset = 'US-ASCII'; + } + // get the encoded data portion and decode URI-encoded chars + const encoding = base64 ? 'base64' : 'ascii'; + const data = unescape(uri.substring(firstComma + 1)); + const buffer = Buffer.from(data, encoding); + // set `.type` and `.typeFull` properties to MIME type + buffer.type = type; + buffer.typeFull = typeFull; + // set the `.charset` property + buffer.charset = charset; + return buffer; +} +/* harmony default export */ const dist = (dataUriToBuffer); +//# sourceMappingURL=index.js.map +;// CONCATENATED MODULE: external "node:util" +const external_node_util_namespaceObject = require("node:util"); +// EXTERNAL MODULE: ./node_modules/fetch-blob/index.js +var fetch_blob = __nccwpck_require__(1410); +// EXTERNAL MODULE: ./node_modules/formdata-polyfill/esm.min.js +var esm_min = __nccwpck_require__(8010); +;// CONCATENATED MODULE: ./node_modules/node-fetch/src/errors/base.js +class FetchBaseError extends Error { + constructor(message, type) { + super(message); + // Hide custom error implementation details from end-users + Error.captureStackTrace(this, this.constructor); + + this.type = type; + } + + get name() { + return this.constructor.name; + } + + get [Symbol.toStringTag]() { + return this.constructor.name; + } +} + +;// CONCATENATED MODULE: ./node_modules/node-fetch/src/errors/fetch-error.js + + + +/** + * @typedef {{ address?: string, code: string, dest?: string, errno: number, info?: object, message: string, path?: string, port?: number, syscall: string}} SystemError +*/ + +/** + * FetchError interface for operational errors + */ +class FetchError extends FetchBaseError { + /** + * @param {string} message - Error message for human + * @param {string} [type] - Error type for machine + * @param {SystemError} [systemError] - For Node.js system error + */ + constructor(message, type, systemError) { + super(message, type); + // When err.type is `system`, err.erroredSysCall contains system error and err.code contains system error code + if (systemError) { + // eslint-disable-next-line no-multi-assign + this.code = this.errno = systemError.code; + this.erroredSysCall = systemError.syscall; + } + } +} + +;// CONCATENATED MODULE: ./node_modules/node-fetch/src/utils/is.js +/** + * Is.js + * + * Object type checks. + */ + +const NAME = Symbol.toStringTag; + +/** + * Check if `obj` is a URLSearchParams object + * ref: https://github.com/node-fetch/node-fetch/issues/296#issuecomment-307598143 + * @param {*} object - Object to check for + * @return {boolean} + */ +const isURLSearchParameters = object => { + return ( + typeof object === 'object' && + typeof object.append === 'function' && + typeof object.delete === 'function' && + typeof object.get === 'function' && + typeof object.getAll === 'function' && + typeof object.has === 'function' && + typeof object.set === 'function' && + typeof object.sort === 'function' && + object[NAME] === 'URLSearchParams' + ); +}; + +/** + * Check if `object` is a W3C `Blob` object (which `File` inherits from) + * @param {*} object - Object to check for + * @return {boolean} + */ +const isBlob = object => { + return ( + object && + typeof object === 'object' && + typeof object.arrayBuffer === 'function' && + typeof object.type === 'string' && + typeof object.stream === 'function' && + typeof object.constructor === 'function' && + /^(Blob|File)$/.test(object[NAME]) + ); +}; + +/** + * Check if `obj` is an instance of AbortSignal. + * @param {*} object - Object to check for + * @return {boolean} + */ +const isAbortSignal = object => { + return ( + typeof object === 'object' && ( + object[NAME] === 'AbortSignal' || + object[NAME] === 'EventTarget' + ) + ); +}; + +/** + * isDomainOrSubdomain reports whether sub is a subdomain (or exact match) of + * the parent domain. + * + * Both domains must already be in canonical form. + * @param {string|URL} original + * @param {string|URL} destination + */ +const isDomainOrSubdomain = (destination, original) => { + const orig = new URL(original).hostname; + const dest = new URL(destination).hostname; + + return orig === dest || orig.endsWith(`.${dest}`); +}; + +;// CONCATENATED MODULE: ./node_modules/node-fetch/src/body.js + +/** + * Body.js + * + * Body interface provides common methods for Request and Response + */ + + + + + + + + + + + + +const pipeline = (0,external_node_util_namespaceObject.promisify)(external_node_stream_namespaceObject.pipeline); +const INTERNALS = Symbol('Body internals'); + +/** + * Body mixin + * + * Ref: https://fetch.spec.whatwg.org/#body + * + * @param Stream body Readable stream + * @param Object opts Response options + * @return Void + */ +class Body { + constructor(body, { + size = 0 + } = {}) { + let boundary = null; + + if (body === null) { + // Body is undefined or null + body = null; + } else if (isURLSearchParameters(body)) { + // Body is a URLSearchParams + body = external_node_buffer_namespaceObject.Buffer.from(body.toString()); + } else if (isBlob(body)) { + // Body is blob + } else if (external_node_buffer_namespaceObject.Buffer.isBuffer(body)) { + // Body is Buffer + } else if (external_node_util_namespaceObject.types.isAnyArrayBuffer(body)) { + // Body is ArrayBuffer + body = external_node_buffer_namespaceObject.Buffer.from(body); + } else if (ArrayBuffer.isView(body)) { + // Body is ArrayBufferView + body = external_node_buffer_namespaceObject.Buffer.from(body.buffer, body.byteOffset, body.byteLength); + } else if (body instanceof external_node_stream_namespaceObject) { + // Body is stream + } else if (body instanceof esm_min/* FormData */.Ct) { + // Body is FormData + body = (0,esm_min/* formDataToBlob */.au)(body); + boundary = body.type.split('=')[1]; + } else { + // None of the above + // coerce to string then buffer + body = external_node_buffer_namespaceObject.Buffer.from(String(body)); + } + + let stream = body; + + if (external_node_buffer_namespaceObject.Buffer.isBuffer(body)) { + stream = external_node_stream_namespaceObject.Readable.from(body); + } else if (isBlob(body)) { + stream = external_node_stream_namespaceObject.Readable.from(body.stream()); + } + + this[INTERNALS] = { + body, + stream, + boundary, + disturbed: false, + error: null + }; + this.size = size; + + if (body instanceof external_node_stream_namespaceObject) { + body.on('error', error_ => { + const error = error_ instanceof FetchBaseError ? + error_ : + new FetchError(`Invalid response body while trying to fetch ${this.url}: ${error_.message}`, 'system', error_); + this[INTERNALS].error = error; + }); + } + } + + get body() { + return this[INTERNALS].stream; + } + + get bodyUsed() { + return this[INTERNALS].disturbed; + } + + /** + * Decode response as ArrayBuffer + * + * @return Promise + */ + async arrayBuffer() { + const {buffer, byteOffset, byteLength} = await consumeBody(this); + return buffer.slice(byteOffset, byteOffset + byteLength); + } + + async formData() { + const ct = this.headers.get('content-type'); + + if (ct.startsWith('application/x-www-form-urlencoded')) { + const formData = new esm_min/* FormData */.Ct(); + const parameters = new URLSearchParams(await this.text()); + + for (const [name, value] of parameters) { + formData.append(name, value); + } + + return formData; + } + + const {toFormData} = await __nccwpck_require__.e(/* import() */ 37).then(__nccwpck_require__.bind(__nccwpck_require__, 4037)); + return toFormData(this.body, ct); + } + + /** + * Return raw response as Blob + * + * @return Promise + */ + async blob() { + const ct = (this.headers && this.headers.get('content-type')) || (this[INTERNALS].body && this[INTERNALS].body.type) || ''; + const buf = await this.arrayBuffer(); + + return new fetch_blob/* default */.Z([buf], { + type: ct + }); + } + + /** + * Decode response as json + * + * @return Promise + */ + async json() { + const text = await this.text(); + return JSON.parse(text); + } + + /** + * Decode response as text + * + * @return Promise + */ + async text() { + const buffer = await consumeBody(this); + return new TextDecoder().decode(buffer); + } + + /** + * Decode response as buffer (non-spec api) + * + * @return Promise + */ + buffer() { + return consumeBody(this); + } +} + +Body.prototype.buffer = (0,external_node_util_namespaceObject.deprecate)(Body.prototype.buffer, 'Please use \'response.arrayBuffer()\' instead of \'response.buffer()\'', 'node-fetch#buffer'); + +// In browsers, all properties are enumerable. +Object.defineProperties(Body.prototype, { + body: {enumerable: true}, + bodyUsed: {enumerable: true}, + arrayBuffer: {enumerable: true}, + blob: {enumerable: true}, + json: {enumerable: true}, + text: {enumerable: true}, + data: {get: (0,external_node_util_namespaceObject.deprecate)(() => {}, + 'data doesn\'t exist, use json(), text(), arrayBuffer(), or body instead', + 'https://github.com/node-fetch/node-fetch/issues/1000 (response)')} +}); + +/** + * Consume and convert an entire Body to a Buffer. + * + * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body + * + * @return Promise + */ +async function consumeBody(data) { + if (data[INTERNALS].disturbed) { + throw new TypeError(`body used already for: ${data.url}`); + } + + data[INTERNALS].disturbed = true; + + if (data[INTERNALS].error) { + throw data[INTERNALS].error; + } + + const {body} = data; + + // Body is null + if (body === null) { + return external_node_buffer_namespaceObject.Buffer.alloc(0); + } + + /* c8 ignore next 3 */ + if (!(body instanceof external_node_stream_namespaceObject)) { + return external_node_buffer_namespaceObject.Buffer.alloc(0); + } + + // Body is stream + // get ready to actually consume the body + const accum = []; + let accumBytes = 0; + + try { + for await (const chunk of body) { + if (data.size > 0 && accumBytes + chunk.length > data.size) { + const error = new FetchError(`content size at ${data.url} over limit: ${data.size}`, 'max-size'); + body.destroy(error); + throw error; + } + + accumBytes += chunk.length; + accum.push(chunk); + } + } catch (error) { + const error_ = error instanceof FetchBaseError ? error : new FetchError(`Invalid response body while trying to fetch ${data.url}: ${error.message}`, 'system', error); + throw error_; + } + + if (body.readableEnded === true || body._readableState.ended === true) { + try { + if (accum.every(c => typeof c === 'string')) { + return external_node_buffer_namespaceObject.Buffer.from(accum.join('')); + } + + return external_node_buffer_namespaceObject.Buffer.concat(accum, accumBytes); + } catch (error) { + throw new FetchError(`Could not create Buffer from response body for ${data.url}: ${error.message}`, 'system', error); + } + } else { + throw new FetchError(`Premature close of server response while trying to fetch ${data.url}`); + } +} + +/** + * Clone body given Res/Req instance + * + * @param Mixed instance Response or Request instance + * @param String highWaterMark highWaterMark for both PassThrough body streams + * @return Mixed + */ +const clone = (instance, highWaterMark) => { + let p1; + let p2; + let {body} = instance[INTERNALS]; + + // Don't allow cloning a used body + if (instance.bodyUsed) { + throw new Error('cannot clone body after it is used'); + } + + // Check that body is a stream and not form-data object + // note: we can't clone the form-data object without having it as a dependency + if ((body instanceof external_node_stream_namespaceObject) && (typeof body.getBoundary !== 'function')) { + // Tee instance body + p1 = new external_node_stream_namespaceObject.PassThrough({highWaterMark}); + p2 = new external_node_stream_namespaceObject.PassThrough({highWaterMark}); + body.pipe(p1); + body.pipe(p2); + // Set instance body to teed body and return the other teed body + instance[INTERNALS].stream = p1; + body = p2; + } + + return body; +}; + +const getNonSpecFormDataBoundary = (0,external_node_util_namespaceObject.deprecate)( + body => body.getBoundary(), + 'form-data doesn\'t follow the spec and requires special treatment. Use alternative package', + 'https://github.com/node-fetch/node-fetch/issues/1167' +); + +/** + * Performs the operation "extract a `Content-Type` value from |object|" as + * specified in the specification: + * https://fetch.spec.whatwg.org/#concept-bodyinit-extract + * + * This function assumes that instance.body is present. + * + * @param {any} body Any options.body input + * @returns {string | null} + */ +const extractContentType = (body, request) => { + // Body is null or undefined + if (body === null) { + return null; + } + + // Body is string + if (typeof body === 'string') { + return 'text/plain;charset=UTF-8'; + } + + // Body is a URLSearchParams + if (isURLSearchParameters(body)) { + return 'application/x-www-form-urlencoded;charset=UTF-8'; + } + + // Body is blob + if (isBlob(body)) { + return body.type || null; + } + + // Body is a Buffer (Buffer, ArrayBuffer or ArrayBufferView) + if (external_node_buffer_namespaceObject.Buffer.isBuffer(body) || external_node_util_namespaceObject.types.isAnyArrayBuffer(body) || ArrayBuffer.isView(body)) { + return null; + } + + if (body instanceof esm_min/* FormData */.Ct) { + return `multipart/form-data; boundary=${request[INTERNALS].boundary}`; + } + + // Detect form data input from form-data module + if (body && typeof body.getBoundary === 'function') { + return `multipart/form-data;boundary=${getNonSpecFormDataBoundary(body)}`; + } + + // Body is stream - can't really do much about this + if (body instanceof external_node_stream_namespaceObject) { + return null; + } + + // Body constructor defaults other things to string + return 'text/plain;charset=UTF-8'; +}; + +/** + * The Fetch Standard treats this as if "total bytes" is a property on the body. + * For us, we have to explicitly get it with a function. + * + * ref: https://fetch.spec.whatwg.org/#concept-body-total-bytes + * + * @param {any} obj.body Body object from the Body instance. + * @returns {number | null} + */ +const getTotalBytes = request => { + const {body} = request[INTERNALS]; + + // Body is null or undefined + if (body === null) { + return 0; + } + + // Body is Blob + if (isBlob(body)) { + return body.size; + } + + // Body is Buffer + if (external_node_buffer_namespaceObject.Buffer.isBuffer(body)) { + return body.length; + } + + // Detect form data input from form-data module + if (body && typeof body.getLengthSync === 'function') { + return body.hasKnownLength && body.hasKnownLength() ? body.getLengthSync() : null; + } + + // Body is stream + return null; +}; + +/** + * Write a Body to a Node.js WritableStream (e.g. http.Request) object. + * + * @param {Stream.Writable} dest The stream to write to. + * @param obj.body Body object from the Body instance. + * @returns {Promise} + */ +const writeToStream = async (dest, {body}) => { + if (body === null) { + // Body is null + dest.end(); + } else { + // Body is stream + await pipeline(body, dest); + } +}; + +;// CONCATENATED MODULE: ./node_modules/node-fetch/src/headers.js +/** + * Headers.js + * + * Headers class offers convenient helpers + */ + + + + +/* c8 ignore next 9 */ +const validateHeaderName = typeof external_node_http_namespaceObject.validateHeaderName === 'function' ? + external_node_http_namespaceObject.validateHeaderName : + name => { + if (!/^[\^`\-\w!#$%&'*+.|~]+$/.test(name)) { + const error = new TypeError(`Header name must be a valid HTTP token [${name}]`); + Object.defineProperty(error, 'code', {value: 'ERR_INVALID_HTTP_TOKEN'}); + throw error; + } + }; + +/* c8 ignore next 9 */ +const validateHeaderValue = typeof external_node_http_namespaceObject.validateHeaderValue === 'function' ? + external_node_http_namespaceObject.validateHeaderValue : + (name, value) => { + if (/[^\t\u0020-\u007E\u0080-\u00FF]/.test(value)) { + const error = new TypeError(`Invalid character in header content ["${name}"]`); + Object.defineProperty(error, 'code', {value: 'ERR_INVALID_CHAR'}); + throw error; + } + }; + +/** + * @typedef {Headers | Record | Iterable | Iterable>} HeadersInit + */ + +/** + * This Fetch API interface allows you to perform various actions on HTTP request and response headers. + * These actions include retrieving, setting, adding to, and removing. + * A Headers object has an associated header list, which is initially empty and consists of zero or more name and value pairs. + * You can add to this using methods like append() (see Examples.) + * In all methods of this interface, header names are matched by case-insensitive byte sequence. + * + */ +class Headers extends URLSearchParams { + /** + * Headers class + * + * @constructor + * @param {HeadersInit} [init] - Response headers + */ + constructor(init) { + // Validate and normalize init object in [name, value(s)][] + /** @type {string[][]} */ + let result = []; + if (init instanceof Headers) { + const raw = init.raw(); + for (const [name, values] of Object.entries(raw)) { + result.push(...values.map(value => [name, value])); + } + } else if (init == null) { // eslint-disable-line no-eq-null, eqeqeq + // No op + } else if (typeof init === 'object' && !external_node_util_namespaceObject.types.isBoxedPrimitive(init)) { + const method = init[Symbol.iterator]; + // eslint-disable-next-line no-eq-null, eqeqeq + if (method == null) { + // Record + result.push(...Object.entries(init)); + } else { + if (typeof method !== 'function') { + throw new TypeError('Header pairs must be iterable'); + } + + // Sequence> + // Note: per spec we have to first exhaust the lists then process them + result = [...init] + .map(pair => { + if ( + typeof pair !== 'object' || external_node_util_namespaceObject.types.isBoxedPrimitive(pair) + ) { + throw new TypeError('Each header pair must be an iterable object'); + } + + return [...pair]; + }).map(pair => { + if (pair.length !== 2) { + throw new TypeError('Each header pair must be a name/value tuple'); + } + + return [...pair]; + }); + } + } else { + throw new TypeError('Failed to construct \'Headers\': The provided value is not of type \'(sequence> or record)'); + } + + // Validate and lowercase + result = + result.length > 0 ? + result.map(([name, value]) => { + validateHeaderName(name); + validateHeaderValue(name, String(value)); + return [String(name).toLowerCase(), String(value)]; + }) : + undefined; + + super(result); + + // Returning a Proxy that will lowercase key names, validate parameters and sort keys + // eslint-disable-next-line no-constructor-return + return new Proxy(this, { + get(target, p, receiver) { + switch (p) { + case 'append': + case 'set': + return (name, value) => { + validateHeaderName(name); + validateHeaderValue(name, String(value)); + return URLSearchParams.prototype[p].call( + target, + String(name).toLowerCase(), + String(value) + ); + }; + + case 'delete': + case 'has': + case 'getAll': + return name => { + validateHeaderName(name); + return URLSearchParams.prototype[p].call( + target, + String(name).toLowerCase() + ); + }; + + case 'keys': + return () => { + target.sort(); + return new Set(URLSearchParams.prototype.keys.call(target)).keys(); + }; + + default: + return Reflect.get(target, p, receiver); + } + } + }); + /* c8 ignore next */ + } + + get [Symbol.toStringTag]() { + return this.constructor.name; + } + + toString() { + return Object.prototype.toString.call(this); + } + + get(name) { + const values = this.getAll(name); + if (values.length === 0) { + return null; + } + + let value = values.join(', '); + if (/^content-encoding$/i.test(name)) { + value = value.toLowerCase(); + } + + return value; + } + + forEach(callback, thisArg = undefined) { + for (const name of this.keys()) { + Reflect.apply(callback, thisArg, [this.get(name), name, this]); + } + } + + * values() { + for (const name of this.keys()) { + yield this.get(name); + } + } + + /** + * @type {() => IterableIterator<[string, string]>} + */ + * entries() { + for (const name of this.keys()) { + yield [name, this.get(name)]; + } + } + + [Symbol.iterator]() { + return this.entries(); + } + + /** + * Node-fetch non-spec method + * returning all headers and their values as array + * @returns {Record} + */ + raw() { + return [...this.keys()].reduce((result, key) => { + result[key] = this.getAll(key); + return result; + }, {}); + } + + /** + * For better console.log(headers) and also to convert Headers into Node.js Request compatible format + */ + [Symbol.for('nodejs.util.inspect.custom')]() { + return [...this.keys()].reduce((result, key) => { + const values = this.getAll(key); + // Http.request() only supports string as Host header. + // This hack makes specifying custom Host header possible. + if (key === 'host') { + result[key] = values[0]; + } else { + result[key] = values.length > 1 ? values : values[0]; + } + + return result; + }, {}); + } +} + +/** + * Re-shaping object for Web IDL tests + * Only need to do it for overridden methods + */ +Object.defineProperties( + Headers.prototype, + ['get', 'entries', 'forEach', 'values'].reduce((result, property) => { + result[property] = {enumerable: true}; + return result; + }, {}) +); + +/** + * Create a Headers object from an http.IncomingMessage.rawHeaders, ignoring those that do + * not conform to HTTP grammar productions. + * @param {import('http').IncomingMessage['rawHeaders']} headers + */ +function fromRawHeaders(headers = []) { + return new Headers( + headers + // Split into pairs + .reduce((result, value, index, array) => { + if (index % 2 === 0) { + result.push(array.slice(index, index + 2)); + } + + return result; + }, []) + .filter(([name, value]) => { + try { + validateHeaderName(name); + validateHeaderValue(name, String(value)); + return true; + } catch { + return false; + } + }) + + ); +} + +;// CONCATENATED MODULE: ./node_modules/node-fetch/src/utils/is-redirect.js +const redirectStatus = new Set([301, 302, 303, 307, 308]); + +/** + * Redirect code matching + * + * @param {number} code - Status code + * @return {boolean} + */ +const isRedirect = code => { + return redirectStatus.has(code); +}; + +;// CONCATENATED MODULE: ./node_modules/node-fetch/src/response.js +/** + * Response.js + * + * Response class provides content decoding + */ + + + + + +const response_INTERNALS = Symbol('Response internals'); + +/** + * Response class + * + * Ref: https://fetch.spec.whatwg.org/#response-class + * + * @param Stream body Readable stream + * @param Object opts Response options + * @return Void + */ +class Response extends Body { + constructor(body = null, options = {}) { + super(body, options); + + // eslint-disable-next-line no-eq-null, eqeqeq, no-negated-condition + const status = options.status != null ? options.status : 200; + + const headers = new Headers(options.headers); + + if (body !== null && !headers.has('Content-Type')) { + const contentType = extractContentType(body, this); + if (contentType) { + headers.append('Content-Type', contentType); + } + } + + this[response_INTERNALS] = { + type: 'default', + url: options.url, + status, + statusText: options.statusText || '', + headers, + counter: options.counter, + highWaterMark: options.highWaterMark + }; + } + + get type() { + return this[response_INTERNALS].type; + } + + get url() { + return this[response_INTERNALS].url || ''; + } + + get status() { + return this[response_INTERNALS].status; + } + + /** + * Convenience property representing if the request ended normally + */ + get ok() { + return this[response_INTERNALS].status >= 200 && this[response_INTERNALS].status < 300; + } + + get redirected() { + return this[response_INTERNALS].counter > 0; + } + + get statusText() { + return this[response_INTERNALS].statusText; + } + + get headers() { + return this[response_INTERNALS].headers; + } + + get highWaterMark() { + return this[response_INTERNALS].highWaterMark; + } + + /** + * Clone this response + * + * @return Response + */ + clone() { + return new Response(clone(this, this.highWaterMark), { + type: this.type, + url: this.url, + status: this.status, + statusText: this.statusText, + headers: this.headers, + ok: this.ok, + redirected: this.redirected, + size: this.size, + highWaterMark: this.highWaterMark + }); + } + + /** + * @param {string} url The URL that the new response is to originate from. + * @param {number} status An optional status code for the response (e.g., 302.) + * @returns {Response} A Response object. + */ + static redirect(url, status = 302) { + if (!isRedirect(status)) { + throw new RangeError('Failed to execute "redirect" on "response": Invalid status code'); + } + + return new Response(null, { + headers: { + location: new URL(url).toString() + }, + status + }); + } + + static error() { + const response = new Response(null, {status: 0, statusText: ''}); + response[response_INTERNALS].type = 'error'; + return response; + } + + get [Symbol.toStringTag]() { + return 'Response'; + } +} + +Object.defineProperties(Response.prototype, { + type: {enumerable: true}, + url: {enumerable: true}, + status: {enumerable: true}, + ok: {enumerable: true}, + redirected: {enumerable: true}, + statusText: {enumerable: true}, + headers: {enumerable: true}, + clone: {enumerable: true} +}); + +;// CONCATENATED MODULE: external "node:url" +const external_node_url_namespaceObject = require("node:url"); +;// CONCATENATED MODULE: ./node_modules/node-fetch/src/utils/get-search.js +const getSearch = parsedURL => { + if (parsedURL.search) { + return parsedURL.search; + } + + const lastOffset = parsedURL.href.length - 1; + const hash = parsedURL.hash || (parsedURL.href[lastOffset] === '#' ? '#' : ''); + return parsedURL.href[lastOffset - hash.length] === '?' ? '?' : ''; +}; + +;// CONCATENATED MODULE: external "node:net" +const external_node_net_namespaceObject = require("node:net"); +;// CONCATENATED MODULE: ./node_modules/node-fetch/src/utils/referrer.js + + +/** + * @external URL + * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/URL|URL} + */ + +/** + * @module utils/referrer + * @private + */ + +/** + * @see {@link https://w3c.github.io/webappsec-referrer-policy/#strip-url|Referrer Policy §8.4. Strip url for use as a referrer} + * @param {string} URL + * @param {boolean} [originOnly=false] + */ +function stripURLForUseAsAReferrer(url, originOnly = false) { + // 1. If url is null, return no referrer. + if (url == null) { // eslint-disable-line no-eq-null, eqeqeq + return 'no-referrer'; + } + + url = new URL(url); + + // 2. If url's scheme is a local scheme, then return no referrer. + if (/^(about|blob|data):$/.test(url.protocol)) { + return 'no-referrer'; + } + + // 3. Set url's username to the empty string. + url.username = ''; + + // 4. Set url's password to null. + // Note: `null` appears to be a mistake as this actually results in the password being `"null"`. + url.password = ''; + + // 5. Set url's fragment to null. + // Note: `null` appears to be a mistake as this actually results in the fragment being `"#null"`. + url.hash = ''; + + // 6. If the origin-only flag is true, then: + if (originOnly) { + // 6.1. Set url's path to null. + // Note: `null` appears to be a mistake as this actually results in the path being `"/null"`. + url.pathname = ''; + + // 6.2. Set url's query to null. + // Note: `null` appears to be a mistake as this actually results in the query being `"?null"`. + url.search = ''; + } + + // 7. Return url. + return url; +} + +/** + * @see {@link https://w3c.github.io/webappsec-referrer-policy/#enumdef-referrerpolicy|enum ReferrerPolicy} + */ +const ReferrerPolicy = new Set([ + '', + 'no-referrer', + 'no-referrer-when-downgrade', + 'same-origin', + 'origin', + 'strict-origin', + 'origin-when-cross-origin', + 'strict-origin-when-cross-origin', + 'unsafe-url' +]); + +/** + * @see {@link https://w3c.github.io/webappsec-referrer-policy/#default-referrer-policy|default referrer policy} + */ +const DEFAULT_REFERRER_POLICY = 'strict-origin-when-cross-origin'; + +/** + * @see {@link https://w3c.github.io/webappsec-referrer-policy/#referrer-policies|Referrer Policy §3. Referrer Policies} + * @param {string} referrerPolicy + * @returns {string} referrerPolicy + */ +function validateReferrerPolicy(referrerPolicy) { + if (!ReferrerPolicy.has(referrerPolicy)) { + throw new TypeError(`Invalid referrerPolicy: ${referrerPolicy}`); + } + + return referrerPolicy; +} + +/** + * @see {@link https://w3c.github.io/webappsec-secure-contexts/#is-origin-trustworthy|Referrer Policy §3.2. Is origin potentially trustworthy?} + * @param {external:URL} url + * @returns `true`: "Potentially Trustworthy", `false`: "Not Trustworthy" + */ +function isOriginPotentiallyTrustworthy(url) { + // 1. If origin is an opaque origin, return "Not Trustworthy". + // Not applicable + + // 2. Assert: origin is a tuple origin. + // Not for implementations + + // 3. If origin's scheme is either "https" or "wss", return "Potentially Trustworthy". + if (/^(http|ws)s:$/.test(url.protocol)) { + return true; + } + + // 4. If origin's host component matches one of the CIDR notations 127.0.0.0/8 or ::1/128 [RFC4632], return "Potentially Trustworthy". + const hostIp = url.host.replace(/(^\[)|(]$)/g, ''); + const hostIPVersion = (0,external_node_net_namespaceObject.isIP)(hostIp); + + if (hostIPVersion === 4 && /^127\./.test(hostIp)) { + return true; + } + + if (hostIPVersion === 6 && /^(((0+:){7})|(::(0+:){0,6}))0*1$/.test(hostIp)) { + return true; + } + + // 5. If origin's host component is "localhost" or falls within ".localhost", and the user agent conforms to the name resolution rules in [let-localhost-be-localhost], return "Potentially Trustworthy". + // We are returning FALSE here because we cannot ensure conformance to + // let-localhost-be-loalhost (https://tools.ietf.org/html/draft-west-let-localhost-be-localhost) + if (/^(.+\.)*localhost$/.test(url.host)) { + return false; + } + + // 6. If origin's scheme component is file, return "Potentially Trustworthy". + if (url.protocol === 'file:') { + return true; + } + + // 7. If origin's scheme component is one which the user agent considers to be authenticated, return "Potentially Trustworthy". + // Not supported + + // 8. If origin has been configured as a trustworthy origin, return "Potentially Trustworthy". + // Not supported + + // 9. Return "Not Trustworthy". + return false; +} + +/** + * @see {@link https://w3c.github.io/webappsec-secure-contexts/#is-url-trustworthy|Referrer Policy §3.3. Is url potentially trustworthy?} + * @param {external:URL} url + * @returns `true`: "Potentially Trustworthy", `false`: "Not Trustworthy" + */ +function isUrlPotentiallyTrustworthy(url) { + // 1. If url is "about:blank" or "about:srcdoc", return "Potentially Trustworthy". + if (/^about:(blank|srcdoc)$/.test(url)) { + return true; + } + + // 2. If url's scheme is "data", return "Potentially Trustworthy". + if (url.protocol === 'data:') { + return true; + } + + // Note: The origin of blob: and filesystem: URLs is the origin of the context in which they were + // created. Therefore, blobs created in a trustworthy origin will themselves be potentially + // trustworthy. + if (/^(blob|filesystem):$/.test(url.protocol)) { + return true; + } + + // 3. Return the result of executing §3.2 Is origin potentially trustworthy? on url's origin. + return isOriginPotentiallyTrustworthy(url); +} + +/** + * Modifies the referrerURL to enforce any extra security policy considerations. + * @see {@link https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer|Referrer Policy §8.3. Determine request's Referrer}, step 7 + * @callback module:utils/referrer~referrerURLCallback + * @param {external:URL} referrerURL + * @returns {external:URL} modified referrerURL + */ + +/** + * Modifies the referrerOrigin to enforce any extra security policy considerations. + * @see {@link https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer|Referrer Policy §8.3. Determine request's Referrer}, step 7 + * @callback module:utils/referrer~referrerOriginCallback + * @param {external:URL} referrerOrigin + * @returns {external:URL} modified referrerOrigin + */ + +/** + * @see {@link https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer|Referrer Policy §8.3. Determine request's Referrer} + * @param {Request} request + * @param {object} o + * @param {module:utils/referrer~referrerURLCallback} o.referrerURLCallback + * @param {module:utils/referrer~referrerOriginCallback} o.referrerOriginCallback + * @returns {external:URL} Request's referrer + */ +function determineRequestsReferrer(request, {referrerURLCallback, referrerOriginCallback} = {}) { + // There are 2 notes in the specification about invalid pre-conditions. We return null, here, for + // these cases: + // > Note: If request's referrer is "no-referrer", Fetch will not call into this algorithm. + // > Note: If request's referrer policy is the empty string, Fetch will not call into this + // > algorithm. + if (request.referrer === 'no-referrer' || request.referrerPolicy === '') { + return null; + } + + // 1. Let policy be request's associated referrer policy. + const policy = request.referrerPolicy; + + // 2. Let environment be request's client. + // not applicable to node.js + + // 3. Switch on request's referrer: + if (request.referrer === 'about:client') { + return 'no-referrer'; + } + + // "a URL": Let referrerSource be request's referrer. + const referrerSource = request.referrer; + + // 4. Let request's referrerURL be the result of stripping referrerSource for use as a referrer. + let referrerURL = stripURLForUseAsAReferrer(referrerSource); + + // 5. Let referrerOrigin be the result of stripping referrerSource for use as a referrer, with the + // origin-only flag set to true. + let referrerOrigin = stripURLForUseAsAReferrer(referrerSource, true); + + // 6. If the result of serializing referrerURL is a string whose length is greater than 4096, set + // referrerURL to referrerOrigin. + if (referrerURL.toString().length > 4096) { + referrerURL = referrerOrigin; + } + + // 7. The user agent MAY alter referrerURL or referrerOrigin at this point to enforce arbitrary + // policy considerations in the interests of minimizing data leakage. For example, the user + // agent could strip the URL down to an origin, modify its host, replace it with an empty + // string, etc. + if (referrerURLCallback) { + referrerURL = referrerURLCallback(referrerURL); + } + + if (referrerOriginCallback) { + referrerOrigin = referrerOriginCallback(referrerOrigin); + } + + // 8.Execute the statements corresponding to the value of policy: + const currentURL = new URL(request.url); + + switch (policy) { + case 'no-referrer': + return 'no-referrer'; + + case 'origin': + return referrerOrigin; + + case 'unsafe-url': + return referrerURL; + + case 'strict-origin': + // 1. If referrerURL is a potentially trustworthy URL and request's current URL is not a + // potentially trustworthy URL, then return no referrer. + if (isUrlPotentiallyTrustworthy(referrerURL) && !isUrlPotentiallyTrustworthy(currentURL)) { + return 'no-referrer'; + } + + // 2. Return referrerOrigin. + return referrerOrigin.toString(); + + case 'strict-origin-when-cross-origin': + // 1. If the origin of referrerURL and the origin of request's current URL are the same, then + // return referrerURL. + if (referrerURL.origin === currentURL.origin) { + return referrerURL; + } + + // 2. If referrerURL is a potentially trustworthy URL and request's current URL is not a + // potentially trustworthy URL, then return no referrer. + if (isUrlPotentiallyTrustworthy(referrerURL) && !isUrlPotentiallyTrustworthy(currentURL)) { + return 'no-referrer'; + } + + // 3. Return referrerOrigin. + return referrerOrigin; + + case 'same-origin': + // 1. If the origin of referrerURL and the origin of request's current URL are the same, then + // return referrerURL. + if (referrerURL.origin === currentURL.origin) { + return referrerURL; + } + + // 2. Return no referrer. + return 'no-referrer'; + + case 'origin-when-cross-origin': + // 1. If the origin of referrerURL and the origin of request's current URL are the same, then + // return referrerURL. + if (referrerURL.origin === currentURL.origin) { + return referrerURL; + } + + // Return referrerOrigin. + return referrerOrigin; + + case 'no-referrer-when-downgrade': + // 1. If referrerURL is a potentially trustworthy URL and request's current URL is not a + // potentially trustworthy URL, then return no referrer. + if (isUrlPotentiallyTrustworthy(referrerURL) && !isUrlPotentiallyTrustworthy(currentURL)) { + return 'no-referrer'; + } + + // 2. Return referrerURL. + return referrerURL; + + default: + throw new TypeError(`Invalid referrerPolicy: ${policy}`); + } +} + +/** + * @see {@link https://w3c.github.io/webappsec-referrer-policy/#parse-referrer-policy-from-header|Referrer Policy §8.1. Parse a referrer policy from a Referrer-Policy header} + * @param {Headers} headers Response headers + * @returns {string} policy + */ +function parseReferrerPolicyFromHeader(headers) { + // 1. Let policy-tokens be the result of extracting header list values given `Referrer-Policy` + // and response’s header list. + const policyTokens = (headers.get('referrer-policy') || '').split(/[,\s]+/); + + // 2. Let policy be the empty string. + let policy = ''; + + // 3. For each token in policy-tokens, if token is a referrer policy and token is not the empty + // string, then set policy to token. + // Note: This algorithm loops over multiple policy values to allow deployment of new policy + // values with fallbacks for older user agents, as described in § 11.1 Unknown Policy Values. + for (const token of policyTokens) { + if (token && ReferrerPolicy.has(token)) { + policy = token; + } + } + + // 4. Return policy. + return policy; +} + +;// CONCATENATED MODULE: ./node_modules/node-fetch/src/request.js +/** + * Request.js + * + * Request class contains server only options + * + * All spec algorithm step numbers are based on https://fetch.spec.whatwg.org/commit-snapshots/ae716822cb3a61843226cd090eefc6589446c1d2/. + */ + + + + + + + + + +const request_INTERNALS = Symbol('Request internals'); + +/** + * Check if `obj` is an instance of Request. + * + * @param {*} object + * @return {boolean} + */ +const isRequest = object => { + return ( + typeof object === 'object' && + typeof object[request_INTERNALS] === 'object' + ); +}; + +const doBadDataWarn = (0,external_node_util_namespaceObject.deprecate)(() => {}, + '.data is not a valid RequestInit property, use .body instead', + 'https://github.com/node-fetch/node-fetch/issues/1000 (request)'); + +/** + * Request class + * + * Ref: https://fetch.spec.whatwg.org/#request-class + * + * @param Mixed input Url or Request instance + * @param Object init Custom options + * @return Void + */ +class Request extends Body { + constructor(input, init = {}) { + let parsedURL; + + // Normalize input and force URL to be encoded as UTF-8 (https://github.com/node-fetch/node-fetch/issues/245) + if (isRequest(input)) { + parsedURL = new URL(input.url); + } else { + parsedURL = new URL(input); + input = {}; + } + + if (parsedURL.username !== '' || parsedURL.password !== '') { + throw new TypeError(`${parsedURL} is an url with embedded credentials.`); + } + + let method = init.method || input.method || 'GET'; + if (/^(delete|get|head|options|post|put)$/i.test(method)) { + method = method.toUpperCase(); + } + + if ('data' in init) { + doBadDataWarn(); + } + + // eslint-disable-next-line no-eq-null, eqeqeq + if ((init.body != null || (isRequest(input) && input.body !== null)) && + (method === 'GET' || method === 'HEAD')) { + throw new TypeError('Request with GET/HEAD method cannot have body'); + } + + const inputBody = init.body ? + init.body : + (isRequest(input) && input.body !== null ? + clone(input) : + null); + + super(inputBody, { + size: init.size || input.size || 0 + }); + + const headers = new Headers(init.headers || input.headers || {}); + + if (inputBody !== null && !headers.has('Content-Type')) { + const contentType = extractContentType(inputBody, this); + if (contentType) { + headers.set('Content-Type', contentType); + } + } + + let signal = isRequest(input) ? + input.signal : + null; + if ('signal' in init) { + signal = init.signal; + } + + // eslint-disable-next-line no-eq-null, eqeqeq + if (signal != null && !isAbortSignal(signal)) { + throw new TypeError('Expected signal to be an instanceof AbortSignal or EventTarget'); + } + + // §5.4, Request constructor steps, step 15.1 + // eslint-disable-next-line no-eq-null, eqeqeq + let referrer = init.referrer == null ? input.referrer : init.referrer; + if (referrer === '') { + // §5.4, Request constructor steps, step 15.2 + referrer = 'no-referrer'; + } else if (referrer) { + // §5.4, Request constructor steps, step 15.3.1, 15.3.2 + const parsedReferrer = new URL(referrer); + // §5.4, Request constructor steps, step 15.3.3, 15.3.4 + referrer = /^about:(\/\/)?client$/.test(parsedReferrer) ? 'client' : parsedReferrer; + } else { + referrer = undefined; + } + + this[request_INTERNALS] = { + method, + redirect: init.redirect || input.redirect || 'follow', + headers, + parsedURL, + signal, + referrer + }; + + // Node-fetch-only options + this.follow = init.follow === undefined ? (input.follow === undefined ? 20 : input.follow) : init.follow; + this.compress = init.compress === undefined ? (input.compress === undefined ? true : input.compress) : init.compress; + this.counter = init.counter || input.counter || 0; + this.agent = init.agent || input.agent; + this.highWaterMark = init.highWaterMark || input.highWaterMark || 16384; + this.insecureHTTPParser = init.insecureHTTPParser || input.insecureHTTPParser || false; + + // §5.4, Request constructor steps, step 16. + // Default is empty string per https://fetch.spec.whatwg.org/#concept-request-referrer-policy + this.referrerPolicy = init.referrerPolicy || input.referrerPolicy || ''; + } + + /** @returns {string} */ + get method() { + return this[request_INTERNALS].method; + } + + /** @returns {string} */ + get url() { + return (0,external_node_url_namespaceObject.format)(this[request_INTERNALS].parsedURL); + } + + /** @returns {Headers} */ + get headers() { + return this[request_INTERNALS].headers; + } + + get redirect() { + return this[request_INTERNALS].redirect; + } + + /** @returns {AbortSignal} */ + get signal() { + return this[request_INTERNALS].signal; + } + + // https://fetch.spec.whatwg.org/#dom-request-referrer + get referrer() { + if (this[request_INTERNALS].referrer === 'no-referrer') { + return ''; + } + + if (this[request_INTERNALS].referrer === 'client') { + return 'about:client'; + } + + if (this[request_INTERNALS].referrer) { + return this[request_INTERNALS].referrer.toString(); + } + + return undefined; + } + + get referrerPolicy() { + return this[request_INTERNALS].referrerPolicy; + } + + set referrerPolicy(referrerPolicy) { + this[request_INTERNALS].referrerPolicy = validateReferrerPolicy(referrerPolicy); + } + + /** + * Clone this request + * + * @return Request + */ + clone() { + return new Request(this); + } + + get [Symbol.toStringTag]() { + return 'Request'; + } +} + +Object.defineProperties(Request.prototype, { + method: {enumerable: true}, + url: {enumerable: true}, + headers: {enumerable: true}, + redirect: {enumerable: true}, + clone: {enumerable: true}, + signal: {enumerable: true}, + referrer: {enumerable: true}, + referrerPolicy: {enumerable: true} +}); + +/** + * Convert a Request to Node.js http request options. + * + * @param {Request} request - A Request instance + * @return The options object to be passed to http.request + */ +const getNodeRequestOptions = request => { + const {parsedURL} = request[request_INTERNALS]; + const headers = new Headers(request[request_INTERNALS].headers); + + // Fetch step 1.3 + if (!headers.has('Accept')) { + headers.set('Accept', '*/*'); + } + + // HTTP-network-or-cache fetch steps 2.4-2.7 + let contentLengthValue = null; + if (request.body === null && /^(post|put)$/i.test(request.method)) { + contentLengthValue = '0'; + } + + if (request.body !== null) { + const totalBytes = getTotalBytes(request); + // Set Content-Length if totalBytes is a number (that is not NaN) + if (typeof totalBytes === 'number' && !Number.isNaN(totalBytes)) { + contentLengthValue = String(totalBytes); + } + } + + if (contentLengthValue) { + headers.set('Content-Length', contentLengthValue); + } + + // 4.1. Main fetch, step 2.6 + // > If request's referrer policy is the empty string, then set request's referrer policy to the + // > default referrer policy. + if (request.referrerPolicy === '') { + request.referrerPolicy = DEFAULT_REFERRER_POLICY; + } + + // 4.1. Main fetch, step 2.7 + // > If request's referrer is not "no-referrer", set request's referrer to the result of invoking + // > determine request's referrer. + if (request.referrer && request.referrer !== 'no-referrer') { + request[request_INTERNALS].referrer = determineRequestsReferrer(request); + } else { + request[request_INTERNALS].referrer = 'no-referrer'; + } + + // 4.5. HTTP-network-or-cache fetch, step 6.9 + // > If httpRequest's referrer is a URL, then append `Referer`/httpRequest's referrer, serialized + // > and isomorphic encoded, to httpRequest's header list. + if (request[request_INTERNALS].referrer instanceof URL) { + headers.set('Referer', request.referrer); + } + + // HTTP-network-or-cache fetch step 2.11 + if (!headers.has('User-Agent')) { + headers.set('User-Agent', 'node-fetch'); + } + + // HTTP-network-or-cache fetch step 2.15 + if (request.compress && !headers.has('Accept-Encoding')) { + headers.set('Accept-Encoding', 'gzip,deflate,br'); + } + + let {agent} = request; + if (typeof agent === 'function') { + agent = agent(parsedURL); + } + + if (!headers.has('Connection') && !agent) { + headers.set('Connection', 'close'); + } + + // HTTP-network fetch step 4.2 + // chunked encoding is handled by Node.js + + const search = getSearch(parsedURL); + + // Pass the full URL directly to request(), but overwrite the following + // options: + const options = { + // Overwrite search to retain trailing ? (issue #776) + path: parsedURL.pathname + search, + // The following options are not expressed in the URL + method: request.method, + headers: headers[Symbol.for('nodejs.util.inspect.custom')](), + insecureHTTPParser: request.insecureHTTPParser, + agent + }; + + return { + /** @type {URL} */ + parsedURL, + options + }; +}; + +;// CONCATENATED MODULE: ./node_modules/node-fetch/src/errors/abort-error.js + + +/** + * AbortError interface for cancelled requests + */ +class AbortError extends FetchBaseError { + constructor(message, type = 'aborted') { + super(message, type); + } +} + +// EXTERNAL MODULE: ./node_modules/fetch-blob/from.js + 2 modules +var from = __nccwpck_require__(2777); +;// CONCATENATED MODULE: ./node_modules/node-fetch/src/index.js +/** + * Index.js + * + * a request API compatible with window.fetch + * + * All spec algorithm step numbers are based on https://fetch.spec.whatwg.org/commit-snapshots/ae716822cb3a61843226cd090eefc6589446c1d2/. + */ + + + + + + + + + + + + + + + + + + + + + + + + +const supportedSchemas = new Set(['data:', 'http:', 'https:']); + +/** + * Fetch function + * + * @param {string | URL | import('./request').default} url - Absolute url or Request instance + * @param {*} [options_] - Fetch options + * @return {Promise} + */ +async function fetch(url, options_) { + return new Promise((resolve, reject) => { + // Build request object + const request = new Request(url, options_); + const {parsedURL, options} = getNodeRequestOptions(request); + if (!supportedSchemas.has(parsedURL.protocol)) { + throw new TypeError(`node-fetch cannot load ${url}. URL scheme "${parsedURL.protocol.replace(/:$/, '')}" is not supported.`); + } + + if (parsedURL.protocol === 'data:') { + const data = dist(request.url); + const response = new Response(data, {headers: {'Content-Type': data.typeFull}}); + resolve(response); + return; + } + + // Wrap http.request into fetch + const send = (parsedURL.protocol === 'https:' ? external_node_https_namespaceObject : external_node_http_namespaceObject).request; + const {signal} = request; + let response = null; + + const abort = () => { + const error = new AbortError('The operation was aborted.'); + reject(error); + if (request.body && request.body instanceof external_node_stream_namespaceObject.Readable) { + request.body.destroy(error); + } + + if (!response || !response.body) { + return; + } + + response.body.emit('error', error); + }; + + if (signal && signal.aborted) { + abort(); + return; + } + + const abortAndFinalize = () => { + abort(); + finalize(); + }; + + // Send request + const request_ = send(parsedURL.toString(), options); + + if (signal) { + signal.addEventListener('abort', abortAndFinalize); + } + + const finalize = () => { + request_.abort(); + if (signal) { + signal.removeEventListener('abort', abortAndFinalize); + } + }; + + request_.on('error', error => { + reject(new FetchError(`request to ${request.url} failed, reason: ${error.message}`, 'system', error)); + finalize(); + }); + + fixResponseChunkedTransferBadEnding(request_, error => { + response.body.destroy(error); + }); + + /* c8 ignore next 18 */ + if (process.version < 'v14') { + // Before Node.js 14, pipeline() does not fully support async iterators and does not always + // properly handle when the socket close/end events are out of order. + request_.on('socket', s => { + let endedWithEventsCount; + s.prependListener('end', () => { + endedWithEventsCount = s._eventsCount; + }); + s.prependListener('close', hadError => { + // if end happened before close but the socket didn't emit an error, do it now + if (response && endedWithEventsCount < s._eventsCount && !hadError) { + const error = new Error('Premature close'); + error.code = 'ERR_STREAM_PREMATURE_CLOSE'; + response.body.emit('error', error); + } + }); + }); + } + + request_.on('response', response_ => { + request_.setTimeout(0); + const headers = fromRawHeaders(response_.rawHeaders); + + // HTTP fetch step 5 + if (isRedirect(response_.statusCode)) { + // HTTP fetch step 5.2 + const location = headers.get('Location'); + + // HTTP fetch step 5.3 + let locationURL = null; + try { + locationURL = location === null ? null : new URL(location, request.url); + } catch { + // error here can only be invalid URL in Location: header + // do not throw when options.redirect == manual + // let the user extract the errorneous redirect URL + if (request.redirect !== 'manual') { + reject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, 'invalid-redirect')); + finalize(); + return; + } + } + + // HTTP fetch step 5.5 + switch (request.redirect) { + case 'error': + reject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect')); + finalize(); + return; + case 'manual': + // Nothing to do + break; + case 'follow': { + // HTTP-redirect fetch step 2 + if (locationURL === null) { + break; + } + + // HTTP-redirect fetch step 5 + if (request.counter >= request.follow) { + reject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect')); + finalize(); + return; + } + + // HTTP-redirect fetch step 6 (counter increment) + // Create a new Request object. + const requestOptions = { + headers: new Headers(request.headers), + follow: request.follow, + counter: request.counter + 1, + agent: request.agent, + compress: request.compress, + method: request.method, + body: clone(request), + signal: request.signal, + size: request.size, + referrer: request.referrer, + referrerPolicy: request.referrerPolicy + }; + + // when forwarding sensitive headers like "Authorization", + // "WWW-Authenticate", and "Cookie" to untrusted targets, + // headers will be ignored when following a redirect to a domain + // that is not a subdomain match or exact match of the initial domain. + // For example, a redirect from "foo.com" to either "foo.com" or "sub.foo.com" + // will forward the sensitive headers, but a redirect to "bar.com" will not. + if (!isDomainOrSubdomain(request.url, locationURL)) { + for (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) { + requestOptions.headers.delete(name); + } + } + + // HTTP-redirect fetch step 9 + if (response_.statusCode !== 303 && request.body && options_.body instanceof external_node_stream_namespaceObject.Readable) { + reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect')); + finalize(); + return; + } + + // HTTP-redirect fetch step 11 + if (response_.statusCode === 303 || ((response_.statusCode === 301 || response_.statusCode === 302) && request.method === 'POST')) { + requestOptions.method = 'GET'; + requestOptions.body = undefined; + requestOptions.headers.delete('content-length'); + } + + // HTTP-redirect fetch step 14 + const responseReferrerPolicy = parseReferrerPolicyFromHeader(headers); + if (responseReferrerPolicy) { + requestOptions.referrerPolicy = responseReferrerPolicy; + } + + // HTTP-redirect fetch step 15 + resolve(fetch(new Request(locationURL, requestOptions))); + finalize(); + return; + } + + default: + return reject(new TypeError(`Redirect option '${request.redirect}' is not a valid value of RequestRedirect`)); + } + } + + // Prepare response + if (signal) { + response_.once('end', () => { + signal.removeEventListener('abort', abortAndFinalize); + }); + } + + let body = (0,external_node_stream_namespaceObject.pipeline)(response_, new external_node_stream_namespaceObject.PassThrough(), error => { + if (error) { + reject(error); + } + }); + // see https://github.com/nodejs/node/pull/29376 + /* c8 ignore next 3 */ + if (process.version < 'v12.10') { + response_.on('aborted', abortAndFinalize); + } + + const responseOptions = { + url: request.url, + status: response_.statusCode, + statusText: response_.statusMessage, + headers, + size: request.size, + counter: request.counter, + highWaterMark: request.highWaterMark + }; + + // HTTP-network fetch step 12.1.1.3 + const codings = headers.get('Content-Encoding'); + + // HTTP-network fetch step 12.1.1.4: handle content codings + + // in following scenarios we ignore compression support + // 1. compression support is disabled + // 2. HEAD request + // 3. no Content-Encoding header + // 4. no content response (204) + // 5. content not modified response (304) + if (!request.compress || request.method === 'HEAD' || codings === null || response_.statusCode === 204 || response_.statusCode === 304) { + response = new Response(body, responseOptions); + resolve(response); + return; + } + + // For Node v6+ + // Be less strict when decoding compressed responses, since sometimes + // servers send slightly invalid responses that are still accepted + // by common browsers. + // Always using Z_SYNC_FLUSH is what cURL does. + const zlibOptions = { + flush: external_node_zlib_namespaceObject.Z_SYNC_FLUSH, + finishFlush: external_node_zlib_namespaceObject.Z_SYNC_FLUSH + }; + + // For gzip + if (codings === 'gzip' || codings === 'x-gzip') { + body = (0,external_node_stream_namespaceObject.pipeline)(body, external_node_zlib_namespaceObject.createGunzip(zlibOptions), error => { + if (error) { + reject(error); + } + }); + response = new Response(body, responseOptions); + resolve(response); + return; + } + + // For deflate + if (codings === 'deflate' || codings === 'x-deflate') { + // Handle the infamous raw deflate response from old servers + // a hack for old IIS and Apache servers + const raw = (0,external_node_stream_namespaceObject.pipeline)(response_, new external_node_stream_namespaceObject.PassThrough(), error => { + if (error) { + reject(error); + } + }); + raw.once('data', chunk => { + // See http://stackoverflow.com/questions/37519828 + if ((chunk[0] & 0x0F) === 0x08) { + body = (0,external_node_stream_namespaceObject.pipeline)(body, external_node_zlib_namespaceObject.createInflate(), error => { + if (error) { + reject(error); + } + }); + } else { + body = (0,external_node_stream_namespaceObject.pipeline)(body, external_node_zlib_namespaceObject.createInflateRaw(), error => { + if (error) { + reject(error); + } + }); + } + + response = new Response(body, responseOptions); + resolve(response); + }); + raw.once('end', () => { + // Some old IIS servers return zero-length OK deflate responses, so + // 'data' is never emitted. See https://github.com/node-fetch/node-fetch/pull/903 + if (!response) { + response = new Response(body, responseOptions); + resolve(response); + } + }); + return; + } + + // For br + if (codings === 'br') { + body = (0,external_node_stream_namespaceObject.pipeline)(body, external_node_zlib_namespaceObject.createBrotliDecompress(), error => { + if (error) { + reject(error); + } + }); + response = new Response(body, responseOptions); + resolve(response); + return; + } + + // Otherwise, use response as-is + response = new Response(body, responseOptions); + resolve(response); + }); + + // eslint-disable-next-line promise/prefer-await-to-then + writeToStream(request_, request).catch(reject); + }); +} + +function fixResponseChunkedTransferBadEnding(request, errorCallback) { + const LAST_CHUNK = external_node_buffer_namespaceObject.Buffer.from('0\r\n\r\n'); + + let isChunkedTransfer = false; + let properLastChunkReceived = false; + let previousChunk; + + request.on('response', response => { + const {headers} = response; + isChunkedTransfer = headers['transfer-encoding'] === 'chunked' && !headers['content-length']; + }); + + request.on('socket', socket => { + const onSocketClose = () => { + if (isChunkedTransfer && !properLastChunkReceived) { + const error = new Error('Premature close'); + error.code = 'ERR_STREAM_PREMATURE_CLOSE'; + errorCallback(error); + } + }; + + socket.prependListener('close', onSocketClose); + + request.on('abort', () => { + socket.removeListener('close', onSocketClose); + }); + + socket.on('data', buf => { + properLastChunkReceived = external_node_buffer_namespaceObject.Buffer.compare(buf.slice(-5), LAST_CHUNK) === 0; + + // Sometimes final 0-length chunk and end of message code are in separate packets + if (!properLastChunkReceived && previousChunk) { + properLastChunkReceived = ( + external_node_buffer_namespaceObject.Buffer.compare(previousChunk.slice(-3), LAST_CHUNK.slice(0, 3)) === 0 && + external_node_buffer_namespaceObject.Buffer.compare(buf.slice(-2), LAST_CHUNK.slice(3)) === 0 + ); + } + + previousChunk = buf; + }); + }); +} + + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __nccwpck_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ id: moduleId, +/******/ loaded: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ var threw = true; +/******/ try { +/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __nccwpck_require__); +/******/ threw = false; +/******/ } finally { +/******/ if(threw) delete __webpack_module_cache__[moduleId]; +/******/ } +/******/ +/******/ // Flag the module as loaded +/******/ module.loaded = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __nccwpck_require__.m = __webpack_modules__; +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/define property getters */ +/******/ (() => { +/******/ // define getter functions for harmony exports +/******/ __nccwpck_require__.d = (exports, definition) => { +/******/ for(var key in definition) { +/******/ if(__nccwpck_require__.o(definition, key) && !__nccwpck_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/ensure chunk */ +/******/ (() => { +/******/ __nccwpck_require__.f = {}; +/******/ // This file contains only the entry chunk. +/******/ // The chunk loading function for additional chunks +/******/ __nccwpck_require__.e = (chunkId) => { +/******/ return Promise.all(Object.keys(__nccwpck_require__.f).reduce((promises, key) => { +/******/ __nccwpck_require__.f[key](chunkId, promises); +/******/ return promises; +/******/ }, [])); +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/get javascript chunk filename */ +/******/ (() => { +/******/ // This function allow to reference async chunks +/******/ __nccwpck_require__.u = (chunkId) => { +/******/ // return url for filenames based on template +/******/ return "" + chunkId + ".index.js"; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __nccwpck_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __nccwpck_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/node module decorator */ +/******/ (() => { +/******/ __nccwpck_require__.nmd = (module) => { +/******/ module.paths = []; +/******/ if (!module.children) module.children = []; +/******/ return module; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/compat */ +/******/ +/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/"; +/******/ +/******/ /* webpack/runtime/require chunk loading */ +/******/ (() => { +/******/ // no baseURI +/******/ +/******/ // object to store loaded chunks +/******/ // "1" means "loaded", otherwise not loaded yet +/******/ var installedChunks = { +/******/ 179: 1 +/******/ }; +/******/ +/******/ // no on chunks loaded +/******/ +/******/ var installChunk = (chunk) => { +/******/ var moreModules = chunk.modules, chunkIds = chunk.ids, runtime = chunk.runtime; +/******/ for(var moduleId in moreModules) { +/******/ if(__nccwpck_require__.o(moreModules, moduleId)) { +/******/ __nccwpck_require__.m[moduleId] = moreModules[moduleId]; +/******/ } +/******/ } +/******/ if(runtime) runtime(__nccwpck_require__); +/******/ for(var i = 0; i < chunkIds.length; i++) +/******/ installedChunks[chunkIds[i]] = 1; +/******/ +/******/ }; +/******/ +/******/ // require() chunk loading for javascript +/******/ __nccwpck_require__.f.require = (chunkId, promises) => { +/******/ // "1" is the signal for "already loaded" +/******/ if(!installedChunks[chunkId]) { +/******/ if(true) { // all chunks have JS +/******/ installChunk(require("./" + __nccwpck_require__.u(chunkId))); +/******/ } else installedChunks[chunkId] = 1; +/******/ } +/******/ }; +/******/ +/******/ // no external install chunk +/******/ +/******/ // no HMR +/******/ +/******/ // no HMR manifest +/******/ })(); +/******/ +/************************************************************************/ +/******/ +/******/ // startup +/******/ // Load entry module and return exports +/******/ // This entry module is referenced by other modules so it can't be inlined +/******/ var __webpack_exports__ = __nccwpck_require__(3109); +/******/ module.exports = __webpack_exports__; +/******/ +/******/ })() +; \ No newline at end of file diff --git a/.github/actions/module-matcher/lib/main.js b/.github/actions/module-matcher/lib/main.js new file mode 100644 index 000000000000..a802ee71c112 --- /dev/null +++ b/.github/actions/module-matcher/lib/main.js @@ -0,0 +1,53 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const core = __importStar(require("@actions/core")); +const matcher = __importStar(require("./module-matcher")); +/** + * Main entry point for this action. + */ +const run = () => __awaiter(void 0, void 0, void 0, function* () { + // Call module logic to discover modules + try { + const moduleFound = yield matcher.moduleMatches(); + core.info(`Module found: [ ${moduleFound} ]`); + core.setOutput('module_found', moduleFound); + } + catch (err) { + core.setOutput('module_found', false); + core.setFailed(`Failing workflow due to ${err}`); + } +}); +// Run main function +run(); diff --git a/.github/actions/module-matcher/lib/module-matcher.js b/.github/actions/module-matcher/lib/module-matcher.js new file mode 100644 index 000000000000..355e84981cb6 --- /dev/null +++ b/.github/actions/module-matcher/lib/module-matcher.js @@ -0,0 +1,185 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.moduleMatches = void 0; +const core = __importStar(require("@actions/core")); +const node_fetch_1 = __importDefault(require("node-fetch")); +const shelljs = __importStar(require("shelljs")); +const current = core.getInput('current'); +const modulesConf = JSON.parse(core.getInput('modules')); +const pullRequest = core.getInput('pull_request'); +const commit = core.getInput('commit'); +/** + * Discover modules that were "touched" by changed contained either in pull request or commit + * + * @returns true if module was found + */ +const moduleMatches = () => __awaiter(void 0, void 0, void 0, function* () { + validateConf(); + core.info(`Provided current momdule: ${current}`); + core.info(`Provided modules configuration: ${JSON.stringify(modulesConf, null, 2)}`); + const currentModule = modulesConf.find(conf => conf.module === current); + if (!currentModule) { + core.error(`Module ${current} was not found in configuration`); + return false; + } + const commits = yield resolveCommits(); + core.info(`Commits found: ${commits.length}`); + if (commits.length >= 100) { + // Probably not found bu the amount of commits definitively calls for returning true + core.info('Commits reached max capacity, probably it\'s a good idea to allow ALL workflows to run'); + return true; + } + const found = searchInCommits(currentModule, commits); + found + ? core.info(`Current module ${current} matched with changes`) + : core.warning(`Could not match module ${current} with changes, discarding it...`); + return found; +}); +exports.moduleMatches = moduleMatches; +/** + * Validates provided module configuration + * + * @returns {@link ModuleConf} object if found otherwise undefined + */ +const validateConf = () => { + const main = modulesConf.find(conf => !!conf.main); + if (!main) { + throw new Error(`No main module was found at modules configuration: ${JSON.stringify(modulesConf, null, 2)}`); + } + return main; +}; +/** + * Searches in given commit list if module appears inside them + * + * @param module {@link ModuleConf} instance to search + * @param commits list of commits + * @returns true if found, otherwise false + */ +const searchInCommits = (module, commits) => { + var _a; + for (const sha of commits) { + const cmd = `git diff-tree --no-commit-id --name-only -r ${sha}`; + core.info(`Searching in commit ${sha} by running:\n${cmd}`); + const output = ((_a = shelljs.exec(cmd)) === null || _a === void 0 ? void 0 : _a.stdout) || ''; + core.info(`Returned these changes:\n${output}`); + const changed = output.split('\n'); + if (searchInChanges(module, changed)) { + return true; + } + } + return false; +}; +/** + * Searches in given commit changes if module appears in changes + * + * @param module {@link ModuleConf} instance to search + * @param changed list of changes + * @returns true if found, otherwise false + */ +const searchInChanges = (module, changed) => { + for (const change of changed) { + const normalized = change.trim(); + if (doesCurrentMatch(module, normalized)) { + core.info(`Found modified module ${JSON.stringify(module, null, 2)} from change at ${normalized}`); + return true; + } + } + return false; +}; +/** + * If a pull request is detected then return the list of commits included in PR. + * It a push is detected use actual commit that triggered run. + * + * @returns commits as a list of string + */ +const resolveCommits = () => __awaiter(void 0, void 0, void 0, function* () { + if (pullRequest) { + core.info(`Provided pull request: ${pullRequest}`); + const response = yield getPullRequestCommits(); + if (!response.ok) { + core.warning(`Could not get Github pull request ${pullRequest}`); + return []; + } + const commits = (yield response.json()).map(c => c.sha); + core.info(`Found pull request ${pullRequest} commits:\n${commits.join(', ')}`); + return commits; + } + else if (commit) { + core.info(`Found (push) commit: ${commit}`); + return yield Promise.resolve([commit]); + } + else { + core.warning('No commits found'); + return yield Promise.resolve([]); + } +}); +/** + * Uses fetch function to send GET http request to Github API to get pull request commits data. + * + * @param pullRequest pull request + * @returns {@link Response} object + */ +const getPullRequestCommits = () => __awaiter(void 0, void 0, void 0, function* () { + const url = `https://api.github.com/repos/dotCMS/core/pulls/${pullRequest}/commits?per_page=250`; + core.info(`Sending GET to ${url}`); + const response = yield (0, node_fetch_1.default)(url, { method: 'GET' }); + core.info(`Got response: ${response.status}`); + return response; +}); +/** + * Resolves which field to use + * + * @param module {@link ModuleConf} module to get info from + * @returns value in resolved field + */ +const location = (module) => module.folder || module.module; +/** + * Evaluates if module is included in change for the cases when the module is configured as main and when is a "child" module. + * + * @param module {@link ModuleConf} module instance + * @param change line of change from commit + * @returns true it matches, otherwise false + */ +const doesCurrentMatch = (module, change) => { + if (!!module.main) { + return !!shelljs + .ls('-A', module.folder || '.') + .find(file => change.startsWith(file)); + } + return change.startsWith(location(module)); +}; diff --git a/.github/actions/module-matcher/package-lock.json b/.github/actions/module-matcher/package-lock.json new file mode 100644 index 000000000000..515a3e72b870 --- /dev/null +++ b/.github/actions/module-matcher/package-lock.json @@ -0,0 +1,4813 @@ +{ + "name": "module-matcher", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "module-matcher", + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "@actions/core": "^1.6.0", + "node-fetch": "^3.2.3", + "shelljs": "^0.8.5" + }, + "devDependencies": { + "@tsconfig/node16": "^1.0.2", + "@types/node": "^16.0.0", + "@types/node-fetch": "^2.6.1", + "@types/shelljs": "^0.8.11", + "@vercel/ncc": "^0.33.3", + "eslint": "^8.11.0", + "eslint-plugin-github": "^4.3.5", + "eslint-plugin-jest": "^26.1.1", + "prettier": "^2.5.1", + "typescript": "^4.6.2" + } + }, + "node_modules/@actions/core": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.8.2.tgz", + "integrity": "sha512-FXcBL7nyik8K5ODeCKlxi+vts7torOkoDAKfeh61EAkAy1HAvwn9uVzZBY0f15YcQTcZZ2/iSGBFHEuioZWfDA==", + "dependencies": { + "@actions/http-client": "^2.0.1" + } + }, + "node_modules/@actions/http-client": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz", + "integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==", + "dependencies": { + "tunnel": "^0.0.6" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.3.tgz", + "integrity": "sha512-uGo44hIwoLGNyduRpjdEpovcbMdd+Nv7amtmJxnKmI8xj6yd5LncmSwDa5NgX/41lIFJtkjD6YdVfgEzPfJ5UA==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.3.2", + "globals": "^13.9.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.9.5", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.5.tgz", + "integrity": "sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw==", + "dev": true, + "dependencies": { + "@humanwhocodes/object-schema": "^1.2.1", + "debug": "^4.1.1", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "dev": true + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.2.tgz", + "integrity": "sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA==", + "dev": true + }, + "node_modules/@types/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==", + "dev": true, + "dependencies": { + "@types/minimatch": "*", + "@types/node": "*" + } + }, + "node_modules/@types/json-schema": { + "version": "7.0.11", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", + "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", + "dev": true + }, + "node_modules/@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", + "dev": true + }, + "node_modules/@types/minimatch": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz", + "integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==", + "dev": true + }, + "node_modules/@types/node": { + "version": "16.11.36", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.36.tgz", + "integrity": "sha512-FR5QJe+TaoZ2GsMHkjuwoNabr+UrJNRr2HNOo+r/7vhcuntM6Ee/pRPOnRhhL2XE9OOvX9VLEq+BcXl3VjNoWA==", + "dev": true + }, + "node_modules/@types/node-fetch": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.1.tgz", + "integrity": "sha512-oMqjURCaxoSIsHSr1E47QHzbmzNR5rK8McHuNb11BOM9cHcIK3Avy0s/b2JlXHoQGTYS3NsvWzV1M0iK7l0wbA==", + "dev": true, + "dependencies": { + "@types/node": "*", + "form-data": "^3.0.0" + } + }, + "node_modules/@types/shelljs": { + "version": "0.8.11", + "resolved": "https://registry.npmjs.org/@types/shelljs/-/shelljs-0.8.11.tgz", + "integrity": "sha512-x9yaMvEh5BEaZKeVQC4vp3l+QoFj3BXcd4aYfuKSzIIyihjdVARAadYy3SMNIz0WCCdS2vB9JL/U6GQk5PaxQw==", + "dev": true, + "dependencies": { + "@types/glob": "*", + "@types/node": "*" + } + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "5.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.25.0.tgz", + "integrity": "sha512-icYrFnUzvm+LhW0QeJNKkezBu6tJs9p/53dpPLFH8zoM9w1tfaKzVurkPotEpAqQ8Vf8uaFyL5jHd0Vs6Z0ZQg==", + "dev": true, + "dependencies": { + "@typescript-eslint/scope-manager": "5.25.0", + "@typescript-eslint/type-utils": "5.25.0", + "@typescript-eslint/utils": "5.25.0", + "debug": "^4.3.4", + "functional-red-black-tree": "^1.0.1", + "ignore": "^5.2.0", + "regexpp": "^3.2.0", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^5.0.0", + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "5.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.25.0.tgz", + "integrity": "sha512-r3hwrOWYbNKP1nTcIw/aZoH+8bBnh/Lh1iDHoFpyG4DnCpvEdctrSl6LOo19fZbzypjQMHdajolxs6VpYoChgA==", + "dev": true, + "dependencies": { + "@typescript-eslint/scope-manager": "5.25.0", + "@typescript-eslint/types": "5.25.0", + "@typescript-eslint/typescript-estree": "5.25.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "5.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.25.0.tgz", + "integrity": "sha512-p4SKTFWj+2VpreUZ5xMQsBMDdQ9XdRvODKXN4EksyBjFp2YvQdLkyHqOffakYZPuWJUDNu3jVXtHALDyTv3cww==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.25.0", + "@typescript-eslint/visitor-keys": "5.25.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "5.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.25.0.tgz", + "integrity": "sha512-B6nb3GK3Gv1Rsb2pqalebe/RyQoyG/WDy9yhj8EE0Ikds4Xa8RR28nHz+wlt4tMZk5bnAr0f3oC8TuDAd5CPrw==", + "dev": true, + "dependencies": { + "@typescript-eslint/utils": "5.25.0", + "debug": "^4.3.4", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/types": { + "version": "5.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.25.0.tgz", + "integrity": "sha512-7fWqfxr0KNHj75PFqlGX24gWjdV/FDBABXL5dyvBOWHpACGyveok8Uj4ipPX/1fGU63fBkzSIycEje4XsOxUFA==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "5.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.25.0.tgz", + "integrity": "sha512-MrPODKDych/oWs/71LCnuO7NyR681HuBly2uLnX3r5i4ME7q/yBqC4hW33kmxtuauLTM0OuBOhhkFaxCCOjEEw==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.25.0", + "@typescript-eslint/visitor-keys": "5.25.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "5.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.25.0.tgz", + "integrity": "sha512-qNC9bhnz/n9Kba3yI6HQgQdBLuxDoMgdjzdhSInZh6NaDnFpTUlwNGxplUFWfY260Ya0TRPvkg9dd57qxrJI9g==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.9", + "@typescript-eslint/scope-manager": "5.25.0", + "@typescript-eslint/types": "5.25.0", + "@typescript-eslint/typescript-estree": "5.25.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "5.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.25.0.tgz", + "integrity": "sha512-yd26vFgMsC4h2dgX4+LR+GeicSKIfUvZREFLf3DDjZPtqgLx5AJZr6TetMNwFP9hcKreTTeztQYBTNbNoOycwA==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.25.0", + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@vercel/ncc": { + "version": "0.33.4", + "resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.33.4.tgz", + "integrity": "sha512-ln18hs7dMffelP47tpkaR+V5Tj6coykNyxJrlcmCormPqRQjB/Gv4cu2FfBG+PMzIfdZp2CLDsrrB1NPU22Qhg==", + "dev": true, + "bin": { + "ncc": "dist/ncc/cli.js" + } + }, + "node_modules/acorn": { + "version": "8.7.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz", + "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/array-includes": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.5.tgz", + "integrity": "sha512-iSDYZMMyTPkiFasVqfuAQnWAYcvO/SeBSCGKePoEthjp4LEMTe4uLc7b025o4jAZpHhihh8xPo99TNWUWWkGDQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.19.5", + "get-intrinsic": "^1.1.1", + "is-string": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/array.prototype.flat": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.0.tgz", + "integrity": "sha512-12IUEkHsAhA4DY5s0FPgNXIdc8VRSqD9Zp78a5au9abH/SOBrsp082JOWFNTjkMozh8mqcdiKuaLGhPeYztxSw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.2", + "es-shim-unscopables": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "dev": true + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browserslist": { + "version": "4.20.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.20.3.tgz", + "integrity": "sha512-NBhymBQl1zM0Y5dQT/O+xiLP9/rzOIQdKM/eMJBAq7yBgaB6krIYLGejrwVYnSHZdqjscB1SPuAjHwxjvN6Wdg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + } + ], + "dependencies": { + "caniuse-lite": "^1.0.30001332", + "electron-to-chromium": "^1.4.118", + "escalade": "^3.1.1", + "node-releases": "^2.0.3", + "picocolors": "^1.0.0" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001341", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001341.tgz", + "integrity": "sha512-2SodVrFFtvGENGCv0ChVJIDQ0KPaS1cg7/qtfMaICgeMolDdo/Z2OD32F0Aq9yl6F4YFwGPBS5AaPqNYiW4PoA==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + } + ] + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/data-uri-to-buffer": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.0.tgz", + "integrity": "sha512-Vr3mLBA8qWmcuschSLAOogKgQ/Jwxulv3RNE4FXnYWRGujzrRWQI4m12fQqRkwX06C0KanhLr4hK+GydchZsaA==", + "engines": { + "node": ">= 12" + } + }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true + }, + "node_modules/define-properties": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", + "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", + "dev": true, + "dependencies": { + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/electron-to-chromium": { + "version": "1.4.137", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.137.tgz", + "integrity": "sha512-0Rcpald12O11BUogJagX3HsCN3FE83DSqWjgXoHo5a72KUKMSfI39XBgJpgNNxS9fuGzytaFjE06kZkiVFy2qA==", + "dev": true + }, + "node_modules/es-abstract": { + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.1.tgz", + "integrity": "sha512-WEm2oBhfoI2sImeM4OF2zE2V3BYdSF+KnSi9Sidz51fQHd7+JuF8Xgcj9/0o+OWeIeIS/MiuNnlruQrJf16GQA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "function.prototype.name": "^1.1.5", + "get-intrinsic": "^1.1.1", + "get-symbol-description": "^1.0.0", + "has": "^1.0.3", + "has-property-descriptors": "^1.0.0", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.3", + "is-callable": "^1.2.4", + "is-negative-zero": "^2.0.2", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "is-string": "^1.0.7", + "is-weakref": "^1.0.2", + "object-inspect": "^1.12.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.2", + "regexp.prototype.flags": "^1.4.3", + "string.prototype.trimend": "^1.0.5", + "string.prototype.trimstart": "^1.0.5", + "unbox-primitive": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-shim-unscopables": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", + "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + } + }, + "node_modules/es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.15.0.tgz", + "integrity": "sha512-GG5USZ1jhCu8HJkzGgeK8/+RGnHaNYZGrGDzUtigK3BsGESW/rs2az23XqE0WVwDxy1VRvvjSSGu5nB0Bu+6SA==", + "dev": true, + "dependencies": { + "@eslint/eslintrc": "^1.2.3", + "@humanwhocodes/config-array": "^0.9.2", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.1.1", + "eslint-utils": "^3.0.0", + "eslint-visitor-keys": "^3.3.0", + "espree": "^9.3.2", + "esquery": "^1.4.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^6.0.1", + "globals": "^13.6.0", + "ignore": "^5.2.0", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "regexpp": "^3.2.0", + "strip-ansi": "^6.0.1", + "strip-json-comments": "^3.1.0", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-config-prettier": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz", + "integrity": "sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q==", + "dev": true, + "bin": { + "eslint-config-prettier": "bin/cli.js" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } + }, + "node_modules/eslint-import-resolver-node": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz", + "integrity": "sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw==", + "dev": true, + "dependencies": { + "debug": "^3.2.7", + "resolve": "^1.20.0" + } + }, + "node_modules/eslint-import-resolver-node/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-module-utils": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.7.3.tgz", + "integrity": "sha512-088JEC7O3lDZM9xGe0RerkOMd0EjFl+Yvd1jPWIkMT5u3H9+HC34mWWPnqPrN13gieT9pBOO+Qt07Nb/6TresQ==", + "dev": true, + "dependencies": { + "debug": "^3.2.7", + "find-up": "^2.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-module-utils/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-escompat": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-escompat/-/eslint-plugin-escompat-3.1.0.tgz", + "integrity": "sha512-Fon3eRv8fOQPZTjT3h8Ga85Xx7Eg+CNZBL7OIYSM2f+p3W4oXTxiSnFUbNDrayRBK3CQjG2dwR+iYeKDDSkXyA==", + "dev": true, + "dependencies": { + "browserslist": "^4.12.0" + }, + "peerDependencies": { + "eslint": ">=5.14.1" + } + }, + "node_modules/eslint-plugin-eslint-comments": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-eslint-comments/-/eslint-plugin-eslint-comments-3.2.0.tgz", + "integrity": "sha512-0jkOl0hfojIHHmEHgmNdqv4fmh7300NdpA9FFpF7zaoLvB/QeXOGNLIo86oAveJFrfB1p05kC8hpEMHM8DwWVQ==", + "dev": true, + "dependencies": { + "escape-string-regexp": "^1.0.5", + "ignore": "^5.0.5" + }, + "engines": { + "node": ">=6.5.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=4.19.1" + } + }, + "node_modules/eslint-plugin-eslint-comments/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/eslint-plugin-filenames": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-filenames/-/eslint-plugin-filenames-1.3.2.tgz", + "integrity": "sha512-tqxJTiEM5a0JmRCUYQmxw23vtTxrb2+a3Q2mMOPhFxvt7ZQQJmdiuMby9B/vUAuVMghyP7oET+nIf6EO6CBd/w==", + "dev": true, + "dependencies": { + "lodash.camelcase": "4.3.0", + "lodash.kebabcase": "4.1.1", + "lodash.snakecase": "4.1.1", + "lodash.upperfirst": "4.3.1" + }, + "peerDependencies": { + "eslint": "*" + } + }, + "node_modules/eslint-plugin-github": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/eslint-plugin-github/-/eslint-plugin-github-4.3.6.tgz", + "integrity": "sha512-W4l9CV1DdSaWYZXWiuH/v0bh3c55iFyyhw2EgIwdAeRxogn7svsI5MLBRA9YZ0cdQyekWMZUfAHEeFhDpOyzWg==", + "dev": true, + "dependencies": { + "@typescript-eslint/eslint-plugin": "^5.1.0", + "@typescript-eslint/parser": "^5.1.0", + "eslint-config-prettier": ">=8.0.0", + "eslint-plugin-escompat": "^3.1.0", + "eslint-plugin-eslint-comments": "^3.2.0", + "eslint-plugin-filenames": "^1.3.2", + "eslint-plugin-i18n-text": "^1.0.1", + "eslint-plugin-import": "^2.25.2", + "eslint-plugin-no-only-tests": "^2.6.0", + "eslint-plugin-prettier": "^4.0.0", + "eslint-rule-documentation": ">=1.0.0", + "prettier": "^2.2.1", + "svg-element-attributes": "^1.3.1" + }, + "bin": { + "eslint-ignore-errors": "bin/eslint-ignore-errors.js" + }, + "peerDependencies": { + "eslint": "^8.0.1" + } + }, + "node_modules/eslint-plugin-i18n-text": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-i18n-text/-/eslint-plugin-i18n-text-1.0.1.tgz", + "integrity": "sha512-3G3UetST6rdqhqW9SfcfzNYMpQXS7wNkJvp6dsXnjzGiku6Iu5hl3B0kmk6lIcFPwYjhQIY+tXVRtK9TlGT7RA==", + "dev": true, + "peerDependencies": { + "eslint": ">=5.0.0" + } + }, + "node_modules/eslint-plugin-import": { + "version": "2.26.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.26.0.tgz", + "integrity": "sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==", + "dev": true, + "dependencies": { + "array-includes": "^3.1.4", + "array.prototype.flat": "^1.2.5", + "debug": "^2.6.9", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.6", + "eslint-module-utils": "^2.7.3", + "has": "^1.0.3", + "is-core-module": "^2.8.1", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "object.values": "^1.1.5", + "resolve": "^1.22.0", + "tsconfig-paths": "^3.14.1" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" + } + }, + "node_modules/eslint-plugin-import/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/eslint-plugin-import/node_modules/doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eslint-plugin-import/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "node_modules/eslint-plugin-jest": { + "version": "26.2.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-26.2.2.tgz", + "integrity": "sha512-etSFZ8VIFX470aA6kTqDPhIq7YWe0tjBcboFNV3WeiC18PJ/AVonGhuTwlmuz2fBkH8FJHA7JQ4k7GsQIj1Gew==", + "dev": true, + "dependencies": { + "@typescript-eslint/utils": "^5.10.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "@typescript-eslint/eslint-plugin": "^5.0.0", + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "@typescript-eslint/eslint-plugin": { + "optional": true + }, + "jest": { + "optional": true + } + } + }, + "node_modules/eslint-plugin-no-only-tests": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-no-only-tests/-/eslint-plugin-no-only-tests-2.6.0.tgz", + "integrity": "sha512-T9SmE/g6UV1uZo1oHAqOvL86XWl7Pl2EpRpnLI8g/bkJu+h7XBCB+1LnubRZ2CUQXj805vh4/CYZdnqtVaEo2Q==", + "dev": true, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/eslint-plugin-prettier": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.0.0.tgz", + "integrity": "sha512-98MqmCJ7vJodoQK359bqQWaxOE0CS8paAz/GgjaZLyex4TTk3g9HugoO89EqWCrFiOqn9EVvcoo7gZzONCWVwQ==", + "dev": true, + "dependencies": { + "prettier-linter-helpers": "^1.0.0" + }, + "engines": { + "node": ">=6.0.0" + }, + "peerDependencies": { + "eslint": ">=7.28.0", + "prettier": ">=2.0.0" + }, + "peerDependenciesMeta": { + "eslint-config-prettier": { + "optional": true + } + } + }, + "node_modules/eslint-rule-documentation": { + "version": "1.0.23", + "resolved": "https://registry.npmjs.org/eslint-rule-documentation/-/eslint-rule-documentation-1.0.23.tgz", + "integrity": "sha512-pWReu3fkohwyvztx/oQWWgld2iad25TfUdi6wvhhaDPIQjHU/pyvlKgXFw1kX31SQK2Nq9MH+vRDWB0ZLy8fYw==", + "dev": true, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/eslint-scope": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", + "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/eslint-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^2.0.0" + }, + "engines": { + "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=5" + } + }, + "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/espree": { + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.2.tgz", + "integrity": "sha512-D211tC7ZwouTIuY5x9XnS0E9sWNChB7IYKX/Xp5eQj3nFXhqmiUDB9q27y76oFl8jTg3pXcQx/bpxMfs3CIZbA==", + "dev": true, + "dependencies": { + "acorn": "^8.7.1", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/esquery": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "dev": true, + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "node_modules/fast-diff": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", + "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", + "dev": true + }, + "node_modules/fast-glob": { + "version": "3.2.11", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz", + "integrity": "sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "node_modules/fastq": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", + "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fetch-blob": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.1.5.tgz", + "integrity": "sha512-N64ZpKqoLejlrwkIAnb9iLSA3Vx/kjgzpcDhygcqJ2KKjky8nCgUQ+dzXtbrLaWZGZNmNfQTsiQ0weZ1svglHg==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "paypal", + "url": "https://paypal.me/jimmywarting" + } + ], + "dependencies": { + "node-domexception": "^1.0.0", + "web-streams-polyfill": "^3.0.3" + }, + "engines": { + "node": "^12.20 || >= 14.13" + } + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "dependencies": { + "locate-path": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "dev": true, + "dependencies": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.5.tgz", + "integrity": "sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg==", + "dev": true + }, + "node_modules/form-data": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", + "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", + "dev": true, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/formdata-polyfill": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", + "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", + "dependencies": { + "fetch-blob": "^3.1.2" + }, + "engines": { + "node": ">=12.20.0" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "node_modules/function.prototype.name": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", + "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.0", + "functions-have-names": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-symbol-description": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", + "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/globals": { + "version": "13.15.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.15.0.tgz", + "integrity": "sha512-bpzcOlgDhMG070Av0Vy5Owklpv1I6+j96GhUI7Rh7IzDCKLzboflLrrfqMu8NquDbiR4EOQk7XzJwqVJxicxog==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", + "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/ignore": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true, + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/internal-slot": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", + "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.0", + "has": "^1.0.3", + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/interpret": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dev": true, + "dependencies": { + "has-bigints": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-callable": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", + "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-core-module": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz", + "integrity": "sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==", + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-negative-zero": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, + "node_modules/json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "dependencies": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=", + "dev": true + }, + "node_modules/lodash.kebabcase": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz", + "integrity": "sha1-hImxyw0p/4gZXM7KRI/21swpXDY=", + "dev": true + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "node_modules/lodash.snakecase": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz", + "integrity": "sha1-OdcUo1NXFHg3rv1ktdy7Fr7Nj40=", + "dev": true + }, + "node_modules/lodash.upperfirst": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz", + "integrity": "sha1-E2Xt9DFIBIHvDRxolXpe2Z1J984=", + "dev": true + }, + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", + "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", + "dev": true + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "node_modules/node-domexception": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", + "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "github", + "url": "https://paypal.me/jimmywarting" + } + ], + "engines": { + "node": ">=10.5.0" + } + }, + "node_modules/node-fetch": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.2.4.tgz", + "integrity": "sha512-WvYJRN7mMyOLurFR2YpysQGuwYrJN+qrrpHjJDuKMcSPdfFccRUla/kng2mz6HWSBxJcqPbvatS6Gb4RhOzCJw==", + "dependencies": { + "data-uri-to-buffer": "^4.0.0", + "fetch-blob": "^3.1.4", + "formdata-polyfill": "^4.0.10" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/node-fetch" + } + }, + "node_modules/node-releases": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.4.tgz", + "integrity": "sha512-gbMzqQtTtDz/00jQzZ21PQzdI9PyLYqUSvD0p3naOhX4odFji0ZxYdnVwPTxmSwkmxhcFImpozceidSG+AgoPQ==", + "dev": true + }, + "node_modules/object-inspect": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz", + "integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.values": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.5.tgz", + "integrity": "sha512-QUZRW0ilQ3PnPpbNtgdNV1PDbEqLIiSFB3l+EnGtBQ/8SUTLj1PZwtQHABZtLgwpJZTSZhuGLOGk57Drx2IvYg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/optionator": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "dev": true, + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "dependencies": { + "p-try": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "dependencies": { + "p-limit": "^1.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prettier": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.6.2.tgz", + "integrity": "sha512-PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew==", + "dev": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "dev": true, + "dependencies": { + "fast-diff": "^1.1.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "dependencies": { + "resolve": "^1.1.6" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/regexp.prototype.flags": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", + "integrity": "sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "functions-have-names": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/regexpp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + } + }, + "node_modules/resolve": { + "version": "1.22.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz", + "integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==", + "dependencies": { + "is-core-module": "^2.8.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/semver": { + "version": "7.3.7", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", + "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/shelljs": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", + "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", + "dependencies": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + }, + "bin": { + "shjs": "bin/shjs" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/string.prototype.trimend": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz", + "integrity": "sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.19.5" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz", + "integrity": "sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.19.5" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/svg-element-attributes": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/svg-element-attributes/-/svg-element-attributes-1.3.1.tgz", + "integrity": "sha512-Bh05dSOnJBf3miNMqpsormfNtfidA/GxQVakhtn0T4DECWKeXQRQUceYjJ+OxYiiLdGe4Jo9iFV8wICFapFeIA==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/tsconfig-paths": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz", + "integrity": "sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ==", + "dev": true, + "dependencies": { + "@types/json5": "^0.0.29", + "json5": "^1.0.1", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + } + }, + "node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "node_modules/tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "dev": true, + "dependencies": { + "tslib": "^1.8.1" + }, + "engines": { + "node": ">= 6" + }, + "peerDependencies": { + "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" + } + }, + "node_modules/tunnel": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", + "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", + "engines": { + "node": ">=0.6.11 <=0.7.0 || >=0.7.3" + } + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typescript": { + "version": "4.6.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.4.tgz", + "integrity": "sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/unbox-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/v8-compile-cache": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", + "dev": true + }, + "node_modules/web-streams-polyfill": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz", + "integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==", + "engines": { + "node": ">= 8" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "dependencies": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } + }, + "dependencies": { + "@actions/core": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.8.2.tgz", + "integrity": "sha512-FXcBL7nyik8K5ODeCKlxi+vts7torOkoDAKfeh61EAkAy1HAvwn9uVzZBY0f15YcQTcZZ2/iSGBFHEuioZWfDA==", + "requires": { + "@actions/http-client": "^2.0.1" + } + }, + "@actions/http-client": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz", + "integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==", + "requires": { + "tunnel": "^0.0.6" + } + }, + "@eslint/eslintrc": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.3.tgz", + "integrity": "sha512-uGo44hIwoLGNyduRpjdEpovcbMdd+Nv7amtmJxnKmI8xj6yd5LncmSwDa5NgX/41lIFJtkjD6YdVfgEzPfJ5UA==", + "dev": true, + "requires": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.3.2", + "globals": "^13.9.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + } + }, + "@humanwhocodes/config-array": { + "version": "0.9.5", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.5.tgz", + "integrity": "sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw==", + "dev": true, + "requires": { + "@humanwhocodes/object-schema": "^1.2.1", + "debug": "^4.1.1", + "minimatch": "^3.0.4" + } + }, + "@humanwhocodes/object-schema": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "dev": true + }, + "@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + } + }, + "@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true + }, + "@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "requires": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + } + }, + "@tsconfig/node16": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.2.tgz", + "integrity": "sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA==", + "dev": true + }, + "@types/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==", + "dev": true, + "requires": { + "@types/minimatch": "*", + "@types/node": "*" + } + }, + "@types/json-schema": { + "version": "7.0.11", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", + "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", + "dev": true + }, + "@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", + "dev": true + }, + "@types/minimatch": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz", + "integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==", + "dev": true + }, + "@types/node": { + "version": "16.11.36", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.36.tgz", + "integrity": "sha512-FR5QJe+TaoZ2GsMHkjuwoNabr+UrJNRr2HNOo+r/7vhcuntM6Ee/pRPOnRhhL2XE9OOvX9VLEq+BcXl3VjNoWA==", + "dev": true + }, + "@types/node-fetch": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.1.tgz", + "integrity": "sha512-oMqjURCaxoSIsHSr1E47QHzbmzNR5rK8McHuNb11BOM9cHcIK3Avy0s/b2JlXHoQGTYS3NsvWzV1M0iK7l0wbA==", + "dev": true, + "requires": { + "@types/node": "*", + "form-data": "^3.0.0" + } + }, + "@types/shelljs": { + "version": "0.8.11", + "resolved": "https://registry.npmjs.org/@types/shelljs/-/shelljs-0.8.11.tgz", + "integrity": "sha512-x9yaMvEh5BEaZKeVQC4vp3l+QoFj3BXcd4aYfuKSzIIyihjdVARAadYy3SMNIz0WCCdS2vB9JL/U6GQk5PaxQw==", + "dev": true, + "requires": { + "@types/glob": "*", + "@types/node": "*" + } + }, + "@typescript-eslint/eslint-plugin": { + "version": "5.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.25.0.tgz", + "integrity": "sha512-icYrFnUzvm+LhW0QeJNKkezBu6tJs9p/53dpPLFH8zoM9w1tfaKzVurkPotEpAqQ8Vf8uaFyL5jHd0Vs6Z0ZQg==", + "dev": true, + "requires": { + "@typescript-eslint/scope-manager": "5.25.0", + "@typescript-eslint/type-utils": "5.25.0", + "@typescript-eslint/utils": "5.25.0", + "debug": "^4.3.4", + "functional-red-black-tree": "^1.0.1", + "ignore": "^5.2.0", + "regexpp": "^3.2.0", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + } + }, + "@typescript-eslint/parser": { + "version": "5.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.25.0.tgz", + "integrity": "sha512-r3hwrOWYbNKP1nTcIw/aZoH+8bBnh/Lh1iDHoFpyG4DnCpvEdctrSl6LOo19fZbzypjQMHdajolxs6VpYoChgA==", + "dev": true, + "requires": { + "@typescript-eslint/scope-manager": "5.25.0", + "@typescript-eslint/types": "5.25.0", + "@typescript-eslint/typescript-estree": "5.25.0", + "debug": "^4.3.4" + } + }, + "@typescript-eslint/scope-manager": { + "version": "5.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.25.0.tgz", + "integrity": "sha512-p4SKTFWj+2VpreUZ5xMQsBMDdQ9XdRvODKXN4EksyBjFp2YvQdLkyHqOffakYZPuWJUDNu3jVXtHALDyTv3cww==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.25.0", + "@typescript-eslint/visitor-keys": "5.25.0" + } + }, + "@typescript-eslint/type-utils": { + "version": "5.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.25.0.tgz", + "integrity": "sha512-B6nb3GK3Gv1Rsb2pqalebe/RyQoyG/WDy9yhj8EE0Ikds4Xa8RR28nHz+wlt4tMZk5bnAr0f3oC8TuDAd5CPrw==", + "dev": true, + "requires": { + "@typescript-eslint/utils": "5.25.0", + "debug": "^4.3.4", + "tsutils": "^3.21.0" + } + }, + "@typescript-eslint/types": { + "version": "5.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.25.0.tgz", + "integrity": "sha512-7fWqfxr0KNHj75PFqlGX24gWjdV/FDBABXL5dyvBOWHpACGyveok8Uj4ipPX/1fGU63fBkzSIycEje4XsOxUFA==", + "dev": true + }, + "@typescript-eslint/typescript-estree": { + "version": "5.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.25.0.tgz", + "integrity": "sha512-MrPODKDych/oWs/71LCnuO7NyR681HuBly2uLnX3r5i4ME7q/yBqC4hW33kmxtuauLTM0OuBOhhkFaxCCOjEEw==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.25.0", + "@typescript-eslint/visitor-keys": "5.25.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + } + }, + "@typescript-eslint/utils": { + "version": "5.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.25.0.tgz", + "integrity": "sha512-qNC9bhnz/n9Kba3yI6HQgQdBLuxDoMgdjzdhSInZh6NaDnFpTUlwNGxplUFWfY260Ya0TRPvkg9dd57qxrJI9g==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.9", + "@typescript-eslint/scope-manager": "5.25.0", + "@typescript-eslint/types": "5.25.0", + "@typescript-eslint/typescript-estree": "5.25.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0" + }, + "dependencies": { + "eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + } + }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true + } + } + }, + "@typescript-eslint/visitor-keys": { + "version": "5.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.25.0.tgz", + "integrity": "sha512-yd26vFgMsC4h2dgX4+LR+GeicSKIfUvZREFLf3DDjZPtqgLx5AJZr6TetMNwFP9hcKreTTeztQYBTNbNoOycwA==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.25.0", + "eslint-visitor-keys": "^3.3.0" + } + }, + "@vercel/ncc": { + "version": "0.33.4", + "resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.33.4.tgz", + "integrity": "sha512-ln18hs7dMffelP47tpkaR+V5Tj6coykNyxJrlcmCormPqRQjB/Gv4cu2FfBG+PMzIfdZp2CLDsrrB1NPU22Qhg==", + "dev": true + }, + "acorn": { + "version": "8.7.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz", + "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==", + "dev": true + }, + "acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "requires": {} + }, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "array-includes": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.5.tgz", + "integrity": "sha512-iSDYZMMyTPkiFasVqfuAQnWAYcvO/SeBSCGKePoEthjp4LEMTe4uLc7b025o4jAZpHhihh8xPo99TNWUWWkGDQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.19.5", + "get-intrinsic": "^1.1.1", + "is-string": "^1.0.7" + } + }, + "array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true + }, + "array.prototype.flat": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.0.tgz", + "integrity": "sha512-12IUEkHsAhA4DY5s0FPgNXIdc8VRSqD9Zp78a5au9abH/SOBrsp082JOWFNTjkMozh8mqcdiKuaLGhPeYztxSw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.2", + "es-shim-unscopables": "^1.0.0" + } + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "dev": true + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "browserslist": { + "version": "4.20.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.20.3.tgz", + "integrity": "sha512-NBhymBQl1zM0Y5dQT/O+xiLP9/rzOIQdKM/eMJBAq7yBgaB6krIYLGejrwVYnSHZdqjscB1SPuAjHwxjvN6Wdg==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30001332", + "electron-to-chromium": "^1.4.118", + "escalade": "^3.1.1", + "node-releases": "^2.0.3", + "picocolors": "^1.0.0" + } + }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true + }, + "caniuse-lite": { + "version": "1.0.30001341", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001341.tgz", + "integrity": "sha512-2SodVrFFtvGENGCv0ChVJIDQ0KPaS1cg7/qtfMaICgeMolDdo/Z2OD32F0Aq9yl6F4YFwGPBS5AaPqNYiW4PoA==", + "dev": true + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "data-uri-to-buffer": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.0.tgz", + "integrity": "sha512-Vr3mLBA8qWmcuschSLAOogKgQ/Jwxulv3RNE4FXnYWRGujzrRWQI4m12fQqRkwX06C0KanhLr4hK+GydchZsaA==" + }, + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true + }, + "define-properties": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", + "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", + "dev": true, + "requires": { + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true + }, + "dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "requires": { + "path-type": "^4.0.0" + } + }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "electron-to-chromium": { + "version": "1.4.137", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.137.tgz", + "integrity": "sha512-0Rcpald12O11BUogJagX3HsCN3FE83DSqWjgXoHo5a72KUKMSfI39XBgJpgNNxS9fuGzytaFjE06kZkiVFy2qA==", + "dev": true + }, + "es-abstract": { + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.1.tgz", + "integrity": "sha512-WEm2oBhfoI2sImeM4OF2zE2V3BYdSF+KnSi9Sidz51fQHd7+JuF8Xgcj9/0o+OWeIeIS/MiuNnlruQrJf16GQA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "function.prototype.name": "^1.1.5", + "get-intrinsic": "^1.1.1", + "get-symbol-description": "^1.0.0", + "has": "^1.0.3", + "has-property-descriptors": "^1.0.0", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.3", + "is-callable": "^1.2.4", + "is-negative-zero": "^2.0.2", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "is-string": "^1.0.7", + "is-weakref": "^1.0.2", + "object-inspect": "^1.12.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.2", + "regexp.prototype.flags": "^1.4.3", + "string.prototype.trimend": "^1.0.5", + "string.prototype.trimstart": "^1.0.5", + "unbox-primitive": "^1.0.2" + } + }, + "es-shim-unscopables": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", + "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true + }, + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true + }, + "eslint": { + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.15.0.tgz", + "integrity": "sha512-GG5USZ1jhCu8HJkzGgeK8/+RGnHaNYZGrGDzUtigK3BsGESW/rs2az23XqE0WVwDxy1VRvvjSSGu5nB0Bu+6SA==", + "dev": true, + "requires": { + "@eslint/eslintrc": "^1.2.3", + "@humanwhocodes/config-array": "^0.9.2", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.1.1", + "eslint-utils": "^3.0.0", + "eslint-visitor-keys": "^3.3.0", + "espree": "^9.3.2", + "esquery": "^1.4.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^6.0.1", + "globals": "^13.6.0", + "ignore": "^5.2.0", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "regexpp": "^3.2.0", + "strip-ansi": "^6.0.1", + "strip-json-comments": "^3.1.0", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + } + }, + "eslint-config-prettier": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz", + "integrity": "sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q==", + "dev": true, + "requires": {} + }, + "eslint-import-resolver-node": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz", + "integrity": "sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw==", + "dev": true, + "requires": { + "debug": "^3.2.7", + "resolve": "^1.20.0" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "eslint-module-utils": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.7.3.tgz", + "integrity": "sha512-088JEC7O3lDZM9xGe0RerkOMd0EjFl+Yvd1jPWIkMT5u3H9+HC34mWWPnqPrN13gieT9pBOO+Qt07Nb/6TresQ==", + "dev": true, + "requires": { + "debug": "^3.2.7", + "find-up": "^2.1.0" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "eslint-plugin-escompat": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-escompat/-/eslint-plugin-escompat-3.1.0.tgz", + "integrity": "sha512-Fon3eRv8fOQPZTjT3h8Ga85Xx7Eg+CNZBL7OIYSM2f+p3W4oXTxiSnFUbNDrayRBK3CQjG2dwR+iYeKDDSkXyA==", + "dev": true, + "requires": { + "browserslist": "^4.12.0" + } + }, + "eslint-plugin-eslint-comments": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-eslint-comments/-/eslint-plugin-eslint-comments-3.2.0.tgz", + "integrity": "sha512-0jkOl0hfojIHHmEHgmNdqv4fmh7300NdpA9FFpF7zaoLvB/QeXOGNLIo86oAveJFrfB1p05kC8hpEMHM8DwWVQ==", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5", + "ignore": "^5.0.5" + }, + "dependencies": { + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + } + } + }, + "eslint-plugin-filenames": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-filenames/-/eslint-plugin-filenames-1.3.2.tgz", + "integrity": "sha512-tqxJTiEM5a0JmRCUYQmxw23vtTxrb2+a3Q2mMOPhFxvt7ZQQJmdiuMby9B/vUAuVMghyP7oET+nIf6EO6CBd/w==", + "dev": true, + "requires": { + "lodash.camelcase": "4.3.0", + "lodash.kebabcase": "4.1.1", + "lodash.snakecase": "4.1.1", + "lodash.upperfirst": "4.3.1" + } + }, + "eslint-plugin-github": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/eslint-plugin-github/-/eslint-plugin-github-4.3.6.tgz", + "integrity": "sha512-W4l9CV1DdSaWYZXWiuH/v0bh3c55iFyyhw2EgIwdAeRxogn7svsI5MLBRA9YZ0cdQyekWMZUfAHEeFhDpOyzWg==", + "dev": true, + "requires": { + "@typescript-eslint/eslint-plugin": "^5.1.0", + "@typescript-eslint/parser": "^5.1.0", + "eslint-config-prettier": ">=8.0.0", + "eslint-plugin-escompat": "^3.1.0", + "eslint-plugin-eslint-comments": "^3.2.0", + "eslint-plugin-filenames": "^1.3.2", + "eslint-plugin-i18n-text": "^1.0.1", + "eslint-plugin-import": "^2.25.2", + "eslint-plugin-no-only-tests": "^2.6.0", + "eslint-plugin-prettier": "^4.0.0", + "eslint-rule-documentation": ">=1.0.0", + "prettier": "^2.2.1", + "svg-element-attributes": "^1.3.1" + } + }, + "eslint-plugin-i18n-text": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-i18n-text/-/eslint-plugin-i18n-text-1.0.1.tgz", + "integrity": "sha512-3G3UetST6rdqhqW9SfcfzNYMpQXS7wNkJvp6dsXnjzGiku6Iu5hl3B0kmk6lIcFPwYjhQIY+tXVRtK9TlGT7RA==", + "dev": true, + "requires": {} + }, + "eslint-plugin-import": { + "version": "2.26.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.26.0.tgz", + "integrity": "sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==", + "dev": true, + "requires": { + "array-includes": "^3.1.4", + "array.prototype.flat": "^1.2.5", + "debug": "^2.6.9", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.6", + "eslint-module-utils": "^2.7.3", + "has": "^1.0.3", + "is-core-module": "^2.8.1", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "object.values": "^1.1.5", + "resolve": "^1.22.0", + "tsconfig-paths": "^3.14.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "eslint-plugin-jest": { + "version": "26.2.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-26.2.2.tgz", + "integrity": "sha512-etSFZ8VIFX470aA6kTqDPhIq7YWe0tjBcboFNV3WeiC18PJ/AVonGhuTwlmuz2fBkH8FJHA7JQ4k7GsQIj1Gew==", + "dev": true, + "requires": { + "@typescript-eslint/utils": "^5.10.0" + } + }, + "eslint-plugin-no-only-tests": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-no-only-tests/-/eslint-plugin-no-only-tests-2.6.0.tgz", + "integrity": "sha512-T9SmE/g6UV1uZo1oHAqOvL86XWl7Pl2EpRpnLI8g/bkJu+h7XBCB+1LnubRZ2CUQXj805vh4/CYZdnqtVaEo2Q==", + "dev": true + }, + "eslint-plugin-prettier": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.0.0.tgz", + "integrity": "sha512-98MqmCJ7vJodoQK359bqQWaxOE0CS8paAz/GgjaZLyex4TTk3g9HugoO89EqWCrFiOqn9EVvcoo7gZzONCWVwQ==", + "dev": true, + "requires": { + "prettier-linter-helpers": "^1.0.0" + } + }, + "eslint-rule-documentation": { + "version": "1.0.23", + "resolved": "https://registry.npmjs.org/eslint-rule-documentation/-/eslint-rule-documentation-1.0.23.tgz", + "integrity": "sha512-pWReu3fkohwyvztx/oQWWgld2iad25TfUdi6wvhhaDPIQjHU/pyvlKgXFw1kX31SQK2Nq9MH+vRDWB0ZLy8fYw==", + "dev": true + }, + "eslint-scope": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", + "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", + "dev": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + } + }, + "eslint-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^2.0.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true + } + } + }, + "eslint-visitor-keys": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", + "dev": true + }, + "espree": { + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.2.tgz", + "integrity": "sha512-D211tC7ZwouTIuY5x9XnS0E9sWNChB7IYKX/Xp5eQj3nFXhqmiUDB9q27y76oFl8jTg3pXcQx/bpxMfs3CIZbA==", + "dev": true, + "requires": { + "acorn": "^8.7.1", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.3.0" + } + }, + "esquery": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "dev": true, + "requires": { + "estraverse": "^5.1.0" + } + }, + "esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "requires": { + "estraverse": "^5.2.0" + } + }, + "estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "fast-diff": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", + "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", + "dev": true + }, + "fast-glob": { + "version": "3.2.11", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz", + "integrity": "sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "dependencies": { + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + } + } + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "fastq": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", + "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", + "dev": true, + "requires": { + "reusify": "^1.0.4" + } + }, + "fetch-blob": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.1.5.tgz", + "integrity": "sha512-N64ZpKqoLejlrwkIAnb9iLSA3Vx/kjgzpcDhygcqJ2KKjky8nCgUQ+dzXtbrLaWZGZNmNfQTsiQ0weZ1svglHg==", + "requires": { + "node-domexception": "^1.0.0", + "web-streams-polyfill": "^3.0.3" + } + }, + "file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "requires": { + "flat-cache": "^3.0.4" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "dev": true, + "requires": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + } + }, + "flatted": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.5.tgz", + "integrity": "sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg==", + "dev": true + }, + "form-data": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", + "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, + "formdata-polyfill": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", + "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", + "requires": { + "fetch-blob": "^3.1.2" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "function.prototype.name": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", + "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.0", + "functions-have-names": "^1.2.2" + } + }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, + "functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true + }, + "get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + } + }, + "get-symbol-description": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", + "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + } + }, + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "requires": { + "is-glob": "^4.0.3" + } + }, + "globals": { + "version": "13.15.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.15.0.tgz", + "integrity": "sha512-bpzcOlgDhMG070Av0Vy5Owklpv1I6+j96GhUI7Rh7IzDCKLzboflLrrfqMu8NquDbiR4EOQk7XzJwqVJxicxog==", + "dev": true, + "requires": { + "type-fest": "^0.20.2" + } + }, + "globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "requires": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "has-property-descriptors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", + "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "dev": true, + "requires": { + "get-intrinsic": "^1.1.1" + } + }, + "has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true + }, + "has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "dev": true, + "requires": { + "has-symbols": "^1.0.2" + } + }, + "ignore": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", + "dev": true + }, + "import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "internal-slot": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", + "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", + "dev": true, + "requires": { + "get-intrinsic": "^1.1.0", + "has": "^1.0.3", + "side-channel": "^1.0.4" + } + }, + "interpret": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==" + }, + "is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dev": true, + "requires": { + "has-bigints": "^1.0.1" + } + }, + "is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, + "is-callable": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", + "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==", + "dev": true + }, + "is-core-module": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz", + "integrity": "sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==", + "requires": { + "has": "^1.0.3" + } + }, + "is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dev": true, + "requires": { + "has-tostringtag": "^1.0.0" + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-negative-zero": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", + "dev": true + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "dev": true, + "requires": { + "has-tostringtag": "^1.0.0" + } + }, + "is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, + "is-shared-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2" + } + }, + "is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, + "requires": { + "has-tostringtag": "^1.0.0" + } + }, + "is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dev": true, + "requires": { + "has-symbols": "^1.0.2" + } + }, + "is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.2" + } + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "requires": { + "argparse": "^2.0.1" + } + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, + "requires": { + "minimist": "^1.2.0" + } + }, + "levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=", + "dev": true + }, + "lodash.kebabcase": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz", + "integrity": "sha1-hImxyw0p/4gZXM7KRI/21swpXDY=", + "dev": true + }, + "lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "lodash.snakecase": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz", + "integrity": "sha1-OdcUo1NXFHg3rv1ktdy7Fr7Nj40=", + "dev": true + }, + "lodash.upperfirst": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz", + "integrity": "sha1-E2Xt9DFIBIHvDRxolXpe2Z1J984=", + "dev": true + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true + }, + "micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "requires": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + } + }, + "mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true + }, + "mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "requires": { + "mime-db": "1.52.0" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", + "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", + "dev": true + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "node-domexception": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", + "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==" + }, + "node-fetch": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.2.4.tgz", + "integrity": "sha512-WvYJRN7mMyOLurFR2YpysQGuwYrJN+qrrpHjJDuKMcSPdfFccRUla/kng2mz6HWSBxJcqPbvatS6Gb4RhOzCJw==", + "requires": { + "data-uri-to-buffer": "^4.0.0", + "fetch-blob": "^3.1.4", + "formdata-polyfill": "^4.0.10" + } + }, + "node-releases": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.4.tgz", + "integrity": "sha512-gbMzqQtTtDz/00jQzZ21PQzdI9PyLYqUSvD0p3naOhX4odFji0ZxYdnVwPTxmSwkmxhcFImpozceidSG+AgoPQ==", + "dev": true + }, + "object-inspect": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz", + "integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==", + "dev": true + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true + }, + "object.assign": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + } + }, + "object.values": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.5.tgz", + "integrity": "sha512-QUZRW0ilQ3PnPpbNtgdNV1PDbEqLIiSFB3l+EnGtBQ/8SUTLj1PZwtQHABZtLgwpJZTSZhuGLOGk57Drx2IvYg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.1" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "optionator": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "dev": true, + "requires": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + } + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + }, + "path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true + }, + "picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, + "picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true + }, + "prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true + }, + "prettier": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.6.2.tgz", + "integrity": "sha512-PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew==", + "dev": true + }, + "prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "dev": true, + "requires": { + "fast-diff": "^1.1.2" + } + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, + "queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true + }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "requires": { + "resolve": "^1.1.6" + } + }, + "regexp.prototype.flags": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", + "integrity": "sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "functions-have-names": "^1.2.2" + } + }, + "regexpp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", + "dev": true + }, + "resolve": { + "version": "1.22.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz", + "integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==", + "requires": { + "is-core-module": "^2.8.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + } + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + }, + "reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "requires": { + "queue-microtask": "^1.2.2" + } + }, + "semver": { + "version": "7.3.7", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", + "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "shelljs": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", + "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", + "requires": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + } + }, + "side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + } + }, + "slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true + }, + "string.prototype.trimend": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz", + "integrity": "sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.19.5" + } + }, + "string.prototype.trimstart": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz", + "integrity": "sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.19.5" + } + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.1" + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==" + }, + "svg-element-attributes": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/svg-element-attributes/-/svg-element-attributes-1.3.1.tgz", + "integrity": "sha512-Bh05dSOnJBf3miNMqpsormfNtfidA/GxQVakhtn0T4DECWKeXQRQUceYjJ+OxYiiLdGe4Jo9iFV8wICFapFeIA==", + "dev": true + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + }, + "tsconfig-paths": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz", + "integrity": "sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ==", + "dev": true, + "requires": { + "@types/json5": "^0.0.29", + "json5": "^1.0.1", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + } + }, + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + }, + "tunnel": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", + "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==" + }, + "type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1" + } + }, + "type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true + }, + "typescript": { + "version": "4.6.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.4.tgz", + "integrity": "sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg==", + "dev": true + }, + "unbox-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + } + }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "v8-compile-cache": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", + "dev": true + }, + "web-streams-polyfill": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz", + "integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==" + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "requires": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + } + }, + "word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } + } +} diff --git a/.github/actions/module-matcher/package.json b/.github/actions/module-matcher/package.json new file mode 100644 index 000000000000..57342895e893 --- /dev/null +++ b/.github/actions/module-matcher/package.json @@ -0,0 +1,39 @@ +{ + "name": "module-matcher", + "version": "1.0.0", + "description": "Validates if current module matches with commits (from PR or push) changes", + "main": "lib/main.js", + "scripts": { + "build": "tsc", + "format": "prettier --write **/*.ts", + "format-check": "prettier --check **/*.ts", + "lint": "eslint src/**/*.ts", + "pack": "ncc build -o dist", + "all": "npm run build && npm run format && npm run lint && npm run pack" + }, + "keywords": [], + "author": "victoralfaro-dotcms", + "files": [ + "action.yml", + "dist", + "lib" + ], + "license": "MIT", + "dependencies": { + "@actions/core": "^1.6.0", + "node-fetch": "^3.2.3", + "shelljs": "^0.8.5" + }, + "devDependencies": { + "@tsconfig/node16": "^1.0.2", + "@types/node": "^16.0.0", + "@types/node-fetch": "^2.6.1", + "@types/shelljs": "^0.8.11", + "@vercel/ncc": "^0.33.3", + "eslint": "^8.11.0", + "eslint-plugin-github": "^4.3.5", + "eslint-plugin-jest": "^26.1.1", + "prettier": "^2.5.1", + "typescript": "^4.6.2" + } +} diff --git a/.github/actions/module-matcher/src/main.ts b/.github/actions/module-matcher/src/main.ts new file mode 100644 index 000000000000..f6636de24315 --- /dev/null +++ b/.github/actions/module-matcher/src/main.ts @@ -0,0 +1,20 @@ +import * as core from '@actions/core' +import * as matcher from './module-matcher' + +/** + * Main entry point for this action. + */ +const run = async () => { + // Call module logic to discover modules + try { + const moduleFound = await matcher.moduleMatches() + core.info(`Module found: [ ${moduleFound} ]`) + core.setOutput('module_found', moduleFound) + } catch (err) { + core.setOutput('module_found', false) + core.setFailed(`Failing workflow due to ${err}`) + } +} + +// Run main function +run() diff --git a/.github/actions/module-matcher/src/module-matcher.ts b/.github/actions/module-matcher/src/module-matcher.ts new file mode 100644 index 000000000000..a01af4aa8907 --- /dev/null +++ b/.github/actions/module-matcher/src/module-matcher.ts @@ -0,0 +1,192 @@ +import * as core from '@actions/core' +import fetch, {Response} from 'node-fetch' +import * as shelljs from 'shelljs' + +interface Commit { + sha: string +} + +interface ModuleConf { + module: string + folder?: string + main?: boolean +} + +const current = core.getInput('current') +const modulesConf: ModuleConf[] = JSON.parse(core.getInput('modules')) +const pullRequest = core.getInput('pull_request') +const commit = core.getInput('commit') + +/** + * Discover modules that were "touched" by changed contained either in pull request or commit + * + * @returns true if module was found + */ +export const moduleMatches = async (): Promise => { + validateConf() + + core.info(`Provided current momdule: ${current}`) + core.info( + `Provided modules configuration: ${JSON.stringify(modulesConf, null, 2)}` + ) + + const currentModule = modulesConf.find(conf => conf.module === current) + if (!currentModule) { + core.error(`Module ${current} was not found in configuration`) + return false + } + + const commits = await resolveCommits() + core.info(`Commits found: ${commits.length}`) + if (commits.length >= 100) { + // Probably not found bu the amount of commits definitively calls for returning true + core.info( + "Commits reached max capacity, probably it's a good idea to allow ALL workflows to run" + ) + return true + } + + const found = searchInCommits(currentModule, commits) + found + ? core.info(`Current module ${current} matched with changes`) + : core.warning( + `Could not match module ${current} with changes, discarding it...` + ) + + return found +} + +/** + * Validates provided module configuration + * + * @returns {@link ModuleConf} object if found otherwise undefined + */ +const validateConf = (): ModuleConf => { + const main = modulesConf.find(conf => !!conf.main) + if (!main) { + throw new Error( + `No main module was found at modules configuration: ${JSON.stringify( + modulesConf, + null, + 2 + )}` + ) + } + return main +} + +/** + * Searches in given commit list if module appears inside them + * + * @param module {@link ModuleConf} instance to search + * @param commits list of commits + * @returns true if found, otherwise false + */ +const searchInCommits = (module: ModuleConf, commits: string[]): boolean => { + for (const sha of commits) { + const cmd = `git diff-tree --no-commit-id --name-only -r ${sha}` + core.info(`Searching in commit ${sha} by running:\n${cmd}`) + + const output = shelljs.exec(cmd)?.stdout || '' + core.info(`Returned these changes:\n${output}`) + const changed = output.split('\n') + if (searchInChanges(module, changed)) { + return true + } + } + + return false +} + +/** + * Searches in given commit changes if module appears in changes + * + * @param module {@link ModuleConf} instance to search + * @param changed list of changes + * @returns true if found, otherwise false + */ +const searchInChanges = (module: ModuleConf, changed: string[]): boolean => { + for (const change of changed) { + const normalized = change.trim() + if (doesCurrentMatch(module, normalized)) { + core.info( + `Found modified module ${JSON.stringify( + module, + null, + 2 + )} from change at ${normalized}` + ) + return true + } + } + + return false +} + +/** + * If a pull request is detected then return the list of commits included in PR. + * It a push is detected use actual commit that triggered run. + * + * @returns commits as a list of string + */ +const resolveCommits = async (): Promise => { + if (pullRequest) { + core.info(`Provided pull request: ${pullRequest}`) + const response = await getPullRequestCommits() + if (!response.ok) { + core.warning(`Could not get Github pull request ${pullRequest}`) + return [] + } + + const commits = ((await response.json()) as Commit[]).map(c => c.sha) + core.info( + `Found pull request ${pullRequest} commits:\n${commits.join(', ')}` + ) + return commits + } else if (commit) { + core.info(`Found (push) commit: ${commit}`) + return await Promise.resolve([commit]) + } else { + core.warning('No commits found') + return await Promise.resolve([]) + } +} + +/** + * Uses fetch function to send GET http request to Github API to get pull request commits data. + * + * @param pullRequest pull request + * @returns {@link Response} object + */ +const getPullRequestCommits = async (): Promise => { + const url = `https://api.github.com/repos/dotCMS/core/pulls/${pullRequest}/commits?per_page=250` + core.info(`Sending GET to ${url}`) + const response: Response = await fetch(url, {method: 'GET'}) + core.info(`Got response: ${response.status}`) + return response +} + +/** + * Resolves which field to use + * + * @param module {@link ModuleConf} module to get info from + * @returns value in resolved field + */ +const location = (module: ModuleConf): string => module.folder || module.module + +/** + * Evaluates if module is included in change for the cases when the module is configured as main and when is a "child" module. + * + * @param module {@link ModuleConf} module instance + * @param change line of change from commit + * @returns true it matches, otherwise false + */ +const doesCurrentMatch = (module: ModuleConf, change: string): boolean => { + if (!!module.main) { + return !!shelljs + .ls('-A', module.folder || '.') + .find(file => change.startsWith(file)) + } + + return change.startsWith(location(module)) +} diff --git a/.github/actions/module-matcher/tsconfig.json b/.github/actions/module-matcher/tsconfig.json new file mode 100644 index 000000000000..a2ad9038ca3b --- /dev/null +++ b/.github/actions/module-matcher/tsconfig.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "target": "es6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ + "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ + "outDir": "./lib", /* Redirect output structure to the directory. */ + "rootDir": "./src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + "strict": true, /* Enable all strict type-checking options. */ + "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ + "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + "baseUrl": "./" + }, + "exclude": ["node_modules", "**/*.test.ts"] + } \ No newline at end of file diff --git a/.github/main.workflow b/.github/main.workflow new file mode 100644 index 000000000000..969547b0cec0 --- /dev/null +++ b/.github/main.workflow @@ -0,0 +1,14 @@ +workflow "Run tests" { + resolves = ["Run Angular Tests in dotcms-ui"] + on = "pull_request" +} + +action "Install dependencies" { + uses = "actions/npm@59b64a598378f31e49cb76f27d6f3312b582f680" + runs = "npm i" +} + +action "Run Angular Tests in dotcms-ui" { + uses = "actions/npm@59b64a598378f31e49cb76f27d6f3312b582f680" + runs = "npm run test dotcms-ui" +} diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 000000000000..56b4d32a9578 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,16 @@ +### Proposed Changes +* change 1 +* change 2 + +### Checklist +- [ ] Tests +- [ ] Translations +- [ ] Security Implications Contemplated (add notes if applicable) + +### Additional Info +** any additional useful context or info ** + +### Screenshots +Original | Updated +:-------------------------:|:-------------------------: +** original screenshot ** | ** updated screenshot ** diff --git a/.github/workflows/core-cicd-tests.yml b/.github/workflows/core-cicd-tests.yml index 1e705df4020e..e6526dcb3159 100644 --- a/.github/workflows/core-cicd-tests.yml +++ b/.github/workflows/core-cicd-tests.yml @@ -6,15 +6,33 @@ on: - master - release-* jobs: + module-matcher-job: + name: Module Matcher + runs-on: ubuntu-latest + outputs: + module_found: ${{ steps.module-matcher.outputs.module_found }} + steps: + - id: fetch-core + name: Fetch Core repo + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - id: module-matcher + name: Module Matcher + uses: ./.github/actions/module-matcher + with: + current: core run-unit-tests-job: name: Unit Tests runs-on: ubuntu-latest + needs: module-matcher-job env: DOT_CICD_BRANCH: master EXPORT_REPORTS: true GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_USER_TOKEN: ${{ secrets.CICD_GITHUB_TOKEN }} PULL_REQUEST: ${{ github.event.number }} + if: needs.module-matcher-job.outputs.module_found == 'true' steps: - name: GITHUB CONTEXT env: @@ -56,6 +74,8 @@ jobs: run-curl-tests-job: name: Curl Tests runs-on: ubuntu-latest + needs: module-matcher-job + if: needs.module-matcher-job.outputs.module_found == 'true' env: DOT_CICD_BRANCH: master EXPORT_REPORTS: true @@ -71,7 +91,7 @@ jobs: - name: Get commit message id: get-commit-message uses: dotcms/get-commit-message@master - + with: accessToken: ${{ secrets.GITHUB_TOKEN }} - name: Set Common Vars @@ -117,11 +137,13 @@ jobs: run-integration-tests-job: name: Integration Tests runs-on: ubuntu-latest + needs: module-matcher-job + if: needs.module-matcher-job.outputs.module_found == 'true' continue-on-error: true strategy: fail-fast: false matrix: - databaseType: [ postgres, mssql ] + databaseType: [postgres, mssql] env: DOT_CICD_BRANCH: master EXPORT_REPORTS: true @@ -205,8 +227,14 @@ jobs: GITHUB_USER: victoralfaro-dotcms GITHUB_USER_TOKEN: ${{ secrets.CICD_GITHUB_TOKEN }} PULL_REQUEST: ${{ github.event.number }} - if: success() || failure() - needs: [run-unit-tests-job, run-curl-tests-job, run-integration-tests-job] + needs: + [ + module-matcher-job, + run-unit-tests-job, + run-curl-tests-job, + run-integration-tests-job, + ] + if: (success() || failure()) && needs.module-matcher-job.outputs.module_found == 'true' steps: - name: GITHUB CONTEXT env: diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 000000000000..ee386ae6e878 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,132 @@ +name: DotCMS/UI Tests +on: + pull_request: + types: [synchronize, opened, reopened, ready_for_review] + push: + branches: + - master + - release-* +env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_TOKEN: ${{ secrets.CICD_GITHUB_TOKEN }} + PULL_REQUEST_URL: ${{ github.event.pull_request._links.html.href }} + IS_PULL_REQUEST: ${{ github.event_name == 'pull_request' }} + HEAD_REF: ${{ github.head_ref }} +jobs: + module-matcher-job: + name: Module Matcher + runs-on: ubuntu-latest + outputs: + module_found: ${{ steps.module-matcher.outputs.module_found }} + steps: + - id: fetch-core + name: Fetch Core repo + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - id: module-matcher + name: Module Matcher + uses: ./.github/actions/module-matcher + with: + current: ui + lint: + runs-on: ubuntu-latest + needs: module-matcher-job + if: needs.module-matcher-job.outputs.module_found == 'true' + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + persist-credentials: false + fetch-depth: 1 + - uses: actions/cache@v2 + with: + path: | + ./ui/node_modules + key: ${{ runner.os }}-modules-${{ hashFiles('./ui/**/package-lock.json') }} + - name: Configuring Node.js + uses: actions/setup-node@v2-beta + with: + node-version: "16.13.2" + - name: Installing dependencies + run: | + cd ui + npm install + - name: Running Lint in dotcms-ui + id: lint_step + run: | + cd ui + if ! (npm run nx lint -- dotcms-ui) then + echo "::set-output name=status::failure"; + echo "::set-output name=color::#ff2400"; + exit 1; + fi + - name: Slack Notification + if: failure() + uses: rtCamp/action-slack-notify@master + env: + SLACK_WEBHOOK: ${{ secrets.UI_SLACK_WEBHOOK }} + SLACK_USERNAME: dotBot + SLACK_COLOR: ${{ steps.lint_step.outputs.color }} + SLACK_TITLE: "Lint: (FAILED)" + SLACK_MESSAGE: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}} + SLACK_FOOTER: ${{ env.PULL_REQUEST_URL }} + build: + needs: [module-matcher-job, lint] + if: needs.module-matcher-job.outputs.module_found == 'true' && github.event.pull_request.draft == false + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + persist-credentials: false + fetch-depth: 1 + - uses: actions/cache@v2 + with: + path: | + ./ui/node_modules + key: ${{ runner.os }}-modules-${{ hashFiles('./ui/**/package-lock.json') }} + - name: Configuring Node.js + uses: actions/setup-node@v2-beta + with: + node-version: "16.13.2" + - name: Installing dependencies + run: | + cd ui + npm install + - name: + Building for production + ## Build dotcms-webcomponents because dotcms-ui doesn't have the lib as a direct dep + ## so Nx can't be identified and build it. + run: | + cd ui + npm run nx build dotcms-webcomponents && npm run nx build dotcms-ui -- --prod + - name: Running tests + id: test_run + run: | + cd ui + if ! (npm run nx test --target=dotcms-ui --prod) then + echo "::set-output name=status::failure"; + echo "::set-output name=color::#ff2400"; + exit 1; + else + echo "::set-output name=status::success"; + echo "::set-output name=color::#5E7D00"; + fi + - name: Push Tests to GitHub + id: persist_results + if: success() || failure() + run: | + chmod +x .cicd/github.sh && source .cicd/github.sh + persistResults + echo "::set-output name=message::$(logResults)"; + - name: Slack Notification + if: success() || failure() + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_WEBHOOK: ${{ secrets.UI_SLACK_WEBHOOK }} + SLACK_USERNAME: dotBot + SLACK_COLOR: ${{ steps.test_run.outputs.color }} + SLACK_TITLE: "Report: (${{ steps.test_run.outputs.status }})" + SLACK_MESSAGE: ${{ steps.persist_results.outputs.message }} + SLACK_FOOTER: ${{ env.PULL_REQUEST_URL }} diff --git a/.github/workflows/publish_docs.yml b/.github/workflows/publish_docs.yml new file mode 100644 index 000000000000..8c62a65ace0d --- /dev/null +++ b/.github/workflows/publish_docs.yml @@ -0,0 +1,35 @@ +name: Publish Docs & Storybook +on: + workflow_dispatch: + push: + branches: + - master +jobs: + publish: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 1 + - name: Configuring Node.js + uses: actions/setup-node@v2-beta + with: + node-version: "16.13.2" + - name: Installing dependencies + run: | + cd ui + npm install + - name: Run NX Commands + run: | + cd ui + npm run nx build dotcms-webcomponents -- --with-deps + npm run nx run-many -- --target=build-storybook --parallel --projects=dotcms-ui,dotcms-webcomponents + npm run nx build-storybook dotcms-block-editor + npm run build:docs:dotcms + npm run build:docs:dotcms-models + - name: Deploy to GitHub Pages + uses: JamesIves/github-pages-deploy-action@4.1.0 + with: + branch: gh-pages + folder: dist-docs diff --git a/.github/workflows/publish_dotcms_ui.yml b/.github/workflows/publish_dotcms_ui.yml new file mode 100644 index 000000000000..164d18982940 --- /dev/null +++ b/.github/workflows/publish_dotcms_ui.yml @@ -0,0 +1,127 @@ +name: Publish to Dotcms UI +on: + push: + branches: + - release-* + - master +jobs: + changes: + runs-on: ubuntu-latest + outputs: + dotcms-ui: ${{ steps.filter.outputs.dotcms-ui }} + steps: + - name: Checkout core + uses: actions/checkout@v3 + - name: Get specific changed files + uses: dorny/paths-filter@v2 + id: filter + with: + base: ${{ github.ref }} + list-files: "json" + working-directory: "core" + filters: | + dotcms-ui: + - 'ui/apps/dotcms-ui/src/**' + - 'ui/libs/!(dotcms-webcomponents/**)/**' + - name: Changes found + if: steps.filter.outputs.dotcms-ui == 'true' + run: | + cd ui + echo "Found Dotcms-UI files changed." + echo ${{ steps.filter.outputs.dotcms-ui }} + - name: No changes found + if: steps.filter.outputs.dotcms-ui == 'false' + run: | + echo "No changes found in Dotcms-UI" + publish: + needs: changes + if: ${{ needs.changes.outputs.dotcms-ui == 'true' }} + runs-on: ubuntu-latest + steps: + - name: Checkout core + run: | + git clone https://victoralfaro-dotcms:${{ secrets.CICD_GITHUB_TOKEN }}@github.com/dotCMS/core + cd core + git pull + cd .. + - name: Configuring Node.js + uses: actions/setup-node@v2-beta + with: + node-version: "16.13.2" + - name: Installing dependencies + run: | + # Get Branch Name + if [[ "${{ github.event_name }}" == "pull_request" ]]; then + branchName="${{ github.head_ref }}" + else + branchName=$(basename "${{ github.ref }}") + fi + + echo "******brach name: " $branchName + cd core + + if [[ "$branchName" != 'master' ]]; then + git checkout -b $branchName --track origin/$branchName + fi + + cd ui + npm install + cd .. + - name: Version Bump - dotcms-ui - if it's Master/Release Branch + run: | + # Get Branch Name + if [[ "${{ github.event_name }}" == "pull_request" ]]; then + branchName="${{ github.head_ref }}" + else + branchName=$(basename "${{ github.ref }}") + fi + + echo "******version brach name: " $branchName + # Checks if branch is release or master + if [[ $branchName == *master* ]]; then + preReleaseTag=next + elif [[ $branchName == *release* ]]; then + preReleaseTag=rc + fi + + echo "******tag brach name: " $preReleaseTag + + # Get version from package.json + cd core/ui + + pkgVersion=`awk -F'"' '/"version": ".+"/{ print $4; exit; }' package.json` + arrIN=(${pkgVersion//./ }) + + # Bump version + if [[ $pkgVersion == *$preReleaseTag* ]]; then + preReleaseVersion=${arrIN[-1]} + pkgVersion="${arrIN[0]}.${arrIN[1]}.0-$preReleaseTag.$((preReleaseVersion+1))" + else + pkgVersion="${arrIN[0]}.${arrIN[1]}.0-$preReleaseTag.0" + fi + sed -i -E "s/\"version\": \".*\"/\"version\": \"$pkgVersion\"/g" ./package.json + + # Commits new version + git config --global user.email "victor.alfaro@dotcms.com" + git config --global user.name "victoralfaro-dotcms" + + git add package.json + git commit -m "CI: bumps version to $pkgVersion [skip ci]" + git push https://victoralfaro-dotcms:${{ secrets.CICD_GITHUB_TOKEN }}@github.com/dotcms/core-web + + - name: Build dotcms-ui with deps + run: | + cd core/ui + npm run nx build dotcms-webcomponents && npm run nx build dotcms-ui -- --prod + cp package.json ./dist/apps/dotcms-ui/package.json + - name: "publish to npm" + run: | + cd core/ui + npm set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }} + cd dist/apps/dotcms-ui + if [[ $(basename "${{ github.ref }}") =~ ^release-.* ]]; then + npm publish --tag rc + fi + if [[ $(basename "${{ github.ref }}") =~ ^master ]]; then + npm publish --tag next + fi diff --git a/.github/workflows/publish_webcomponents.yml b/.github/workflows/publish_webcomponents.yml new file mode 100644 index 000000000000..80ba7d7f4f8c --- /dev/null +++ b/.github/workflows/publish_webcomponents.yml @@ -0,0 +1,120 @@ +name: Publish to Dotcms Webcomponents +on: + push: + branches: + - release-* + - master +jobs: + changes: + runs-on: ubuntu-latest + outputs: + dotcms-webcomponents: ${{ steps.filter.outputs.dotcms-webcomponents }} + steps: + - name: Checkout core + uses: actions/checkout@v3 + - name: Get specific changed files + uses: dorny/paths-filter@v2 + id: filter + with: + base: ${{ github.ref }} + list-files: "json" + working-directory: "core" + filters: | + dotcms-webcomponents: + - 'ui/libs/dotcms-webcomponents/**' + - name: Changes found + if: steps.filter.outputs.dotcms-webcomponents == 'true' + run: | + echo "Found Dotcms-webcomponent files changed." + echo ${{ steps.filter.outputs.dotcms-webcomponents_files }} + - name: No changes found + if: steps.filter.outputs.dotcms-webcomponents == 'false' + run: | + echo "No changes found in dotcms-webcomponents" + publish: + needs: changes + if: ${{ needs.changes.outputs.dotcms-webcomponents == 'true' }} + runs-on: ubuntu-latest + steps: + - name: Checkout core + run: | + git clone https://victoralfaro-dotcms:${{ secrets.CICD_GITHUB_TOKEN }}@github.com/dotCMS/core + cd core + git pull + cd .. + - name: Configuring Node.js + uses: actions/setup-node@v2-beta + with: + node-version: "16.13.2" + - name: Installing dependencies + run: | + # Get Branch Name + if [[ "${{ github.event_name }}" == "pull_request" ]]; then + branchName="${{ github.head_ref }}" + else + branchName=$(basename "${{ github.ref }}") + fi + + cd core/ui + if [[ "$branchName" != 'master' ]]; then + git checkout -b $branchName --track origin/$branchName + fi + + npm install + - name: Version Bump - dotcms-webcomponents - if it's Master/Release Branch + run: | + + # Get Branch Name + if [[ "${{ github.event_name }}" == "pull_request" ]]; then + branchName="${{ github.head_ref }}" + else + branchName=$(basename "${{ github.ref }}") + fi + + # Checks if branch is release or master + if [[ $branchName == *master* ]]; then + preReleaseTag=next + elif [[ $branchName == *release* ]]; then + preReleaseTag=rc + fi + + cd core/ui + + # Get version from package.json + cd libs/dotcms-webcomponents + + pkgVersion=`awk -F'"' '/"version": ".+"/{ print $4; exit; }' package.json` + arrIN=(${pkgVersion//./ }) + + # Bump version + if [[ $pkgVersion == *$preReleaseTag* ]]; then + preReleaseVersion=${arrIN[-1]} + pkgVersion="${arrIN[0]}.${arrIN[1]}.0-$preReleaseTag.$((preReleaseVersion+1))" + else + pkgVersion="${arrIN[0]}.${arrIN[1]}.0-$preReleaseTag.0" + fi + sed -i -E "s/\"version\": \".*\"/\"version\": \"$pkgVersion\"/g" ./package.json + + # Commits new version + git config --global user.email "victor.alfaro@dotcms.com" + git config --global user.name "victoralfaro-dotcms" + + git add package.json + git commit -m "CI: bumps version to $pkgVersion [skip ci]" + git push https://victoralfaro-dotcms:${{ secrets.CICD_GITHUB_TOKEN }}@github.com/dotcms/core-web + + - name: Build dotcms-webcomponents with deps + run: | + cd core/ui + npm run nx build dotcms-webcomponents && npm run nx build dotcms-ui -- --prod + - name: "publish to npm" + run: | + cd core/ui + npm set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }} + cd dist/libs/dotcms-webcomponents + if [[ $(basename "${{ github.ref }}") =~ ^release-.* ]]; then + npm publish --tag rc + fi + if [[ $(basename "${{ github.ref }}") =~ ^master ]]; then + npm publish --tag next + fi diff --git a/.gitignore b/.gitignore index 1ed29e492060..e5072766ac4d 100644 --- a/.gitignore +++ b/.gitignore @@ -6,10 +6,20 @@ bin/*.sh .settings/* .project .idea/ -.vscode *.iml *.ipr *.iws +*.launch +.settings/ +*.sublime-workspace + +# IDE - VSCode +.vscode +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json # none enterprise stuff should make it here # ####################################### @@ -56,14 +66,14 @@ dotCMS/classes # Changes after gradle migration # ############################### -dist/ +/dist/ dist-output/ dotCMS/build/ dotCMS/.gradle/ dotCMS/.settings/ dotCMS/src/main/webapp/WEB-INF/classes/ dotCMS/src/main/webapp/WEB-INF/lib/ -dotCMS/src/main/webapp/WEB-INF/velocity/static/plugins/ +dotCMS/src/main/webapp/WEB-INF/velocity/static/plugiga ns/ dotCMS/src/main/webapp/html/plugins/ # immutables.github.io generated folder# @@ -77,4 +87,35 @@ docker/tests/integration/license docker/tests/integration/backup dot-cicd/ -tmp/ \ No newline at end of file +tmp/ + +/node_modules +/**/node_modules + +# compiled output +/ui/dist +/ui/dist-lib +/ui/docs +/ui/tmp +/ui/out-tsc +/ui/karma_html + +# misc +/ui/.angular/cache +/ui/.sass-cache +/ui/connect.lock +/ui/coverage +/ui/libpeerconnection.log +npm-debug.log +yarn-error.log +testem.log +/ui/typings +karma_html/ + +# e2e +/ui/e2e/*.js +/ui/e2e/*.map + +/ui/storybook +/ui/out*/ +dist-docs/ diff --git a/docker/docker-compose-examples/README.md b/docker/docker-compose-examples/README.md index aa06866e558d..1e396dbb9070 100644 --- a/docker/docker-compose-examples/README.md +++ b/docker/docker-compose-examples/README.md @@ -4,11 +4,19 @@ This directory contains docker-compose examples ready to use The following examples are provided: -- **dotcms-cluster-mode:** dotcms instance with 2 nodes in a cluster -- **dotcms-redis:** dotcms cluster with redis cache and pub/sub provider -- **dotcms-single-node:** basic dotcms instance running with postgres database -- **dotcms-with-kibana:** basic dotcms instance running with postgres database and kibana -- **dotcms-with-oracle:** basic dotcms instance running with oracle database +- **cluster-mode:** dotcms instance with 2 nodes in a cluster - **elasticsearch-with-kibana:** elasticsearch server with kibana - **oracle-database:** oracle database running on port 1521 +- **push-publish:** dotcms environment with a sender and a receiver +- **single-node:** basic dotcms instance running with postgres database +- **single-node-debug-mode:** basic dotcms instance running with postgres database and debug mode enabled +- **single-node-demo-site:** basic dotcms instance running demo site +- **with-kibana:** basic dotcms instance running with postgres database and kibana +- **with-mssql:** basic dotcms instance running with MSSQL database +- **with-oracle:** basic dotcms instance running with oracle database +- **with-redis:** dotcms cluster with redis cache and pub/sub provider + + + + diff --git a/docker/docker-compose-examples/cluster-mode/README.md b/docker/docker-compose-examples/cluster-mode/README.md index c71e7eee3ae5..5f608a3bec41 100644 --- a/docker/docker-compose-examples/cluster-mode/README.md +++ b/docker/docker-compose-examples/cluster-mode/README.md @@ -4,7 +4,7 @@ Cluster with 2 dotCMS instances running on ports 8080 and 8081 respectively. Dat ## Usage -####Environment setup +#### Environment setup 1) A local path to license pack must be set here: @@ -28,7 +28,7 @@ The license pack must contain at least two licenses (one for each node in the cl #"CUSTOM_STARTER_URL": 'https://repo.dotcms.com/artifactory/libs-release-local/com/dotcms/starter/20210920/starter-20210920.zip' ``` -####Deploying nodes: +#### Deploying nodes: ```bash docker-compose -f docker-compose-node-1.yml up @@ -42,7 +42,7 @@ docker-compose -f docker-compose-node-2.yml up ``` -####Undeploying nodes: +#### Undeploying nodes: ```bash docker-compose -f docker-compose-node-2.yml down diff --git a/docker/docker-compose-examples/elasticsearch-with-kibana/README.md b/docker/docker-compose-examples/elasticsearch-with-kibana/README.md index a5d955ec4544..b149d69dc5c0 100644 --- a/docker/docker-compose-examples/elasticsearch-with-kibana/README.md +++ b/docker/docker-compose-examples/elasticsearch-with-kibana/README.md @@ -4,15 +4,17 @@ Elasticsearch runs on port 9200 and Kibana on 5601 ## Usage -####Run an example: +#### Run an example: ```bash -docker-compose up``` +docker-compose up +``` -####Shut down instances: +#### Shut down instances: ```bash -docker-compose down``` +docker-compose down +``` **Important note:** `ctrl+c` does not destroy instances diff --git a/docker/docker-compose-examples/oracle-database/README.md b/docker/docker-compose-examples/oracle-database/README.md index 4eba1d88a7bc..815b2821fce9 100644 --- a/docker/docker-compose-examples/oracle-database/README.md +++ b/docker/docker-compose-examples/oracle-database/README.md @@ -8,15 +8,17 @@ oracle 11g express edition running on port 1521 ## Usage -####Run an example: +#### Run an example: ```bash -docker-compose up``` +docker-compose up +``` -####Shut down instances: +#### Shut down instances: ```bash -docker-compose down``` +docker-compose down +``` **Important note:** `ctrl+c` does not destroy instances diff --git a/docker/docker-compose-examples/push-publish/README.md b/docker/docker-compose-examples/push-publish/README.md index 98982a4f4a60..1ae8639d878c 100644 --- a/docker/docker-compose-examples/push-publish/README.md +++ b/docker/docker-compose-examples/push-publish/README.md @@ -6,7 +6,7 @@ Push publish environment where the sender runs on port 8080 and the receiver on ## Usage -####Environment setup +#### Environment setup 1) A local path to license pack must be set here: @@ -30,7 +30,7 @@ The license pack must contain at least two licenses (one for each node in the cl #"CUSTOM_STARTER_URL": 'https://repo.dotcms.com/artifactory/libs-release-local/com/dotcms/starter/20210920/starter-20210920.zip' ``` -####Deploying nodes: +#### Deploying nodes: ```bash docker-compose -f docker-compose-sender.yml up @@ -38,7 +38,7 @@ docker-compose -f docker-compose-receiver.yml up ``` -####Undeploying nodes: +#### Undeploying nodes: ```bash docker-compose -f docker-compose-sender.yml down diff --git a/docker/docker-compose-examples/single-node-debug-mode/Intellij Debug Mode.png b/docker/docker-compose-examples/single-node-debug-mode/Intellij Debug Mode.png new file mode 100644 index 000000000000..a215dfbcea4f Binary files /dev/null and b/docker/docker-compose-examples/single-node-debug-mode/Intellij Debug Mode.png differ diff --git a/docker/docker-compose-examples/single-node-debug-mode/README.md b/docker/docker-compose-examples/single-node-debug-mode/README.md new file mode 100644 index 000000000000..5f495f530136 --- /dev/null +++ b/docker/docker-compose-examples/single-node-debug-mode/README.md @@ -0,0 +1,50 @@ +# Dotcms Single Node (Debug Mode) + +A single instance of dotcms running on port 8080. Database: postgres. Debug mode enabled on port 8000 + +## Usage + +#### Environment setup + + +1) A local path to license pack must be set here: + +``` +- {license_local_path}/license.zip:/data/shared/assets/license.zip +``` + +2) A local path to access data in the instance can be set uncommenting this line: + +``` +#- {local_data_path}:/data/shared +``` + +3) A custom starter can be set through this line (uncomment and change the starter url accordingly): + +``` +#"CUSTOM_STARTER_URL": 'https://repo.dotcms.com/artifactory/libs-release-local/com/dotcms/starter/20210920/starter-20210920.zip' +``` + +#### Run an example: + +```bash +docker-compose up +``` + +#### Shut down instances: + +```bash +docker-compose down +``` + +**Important note:** `ctrl+c` does not destroy instances + + +4) Configure your IDE enabling remote debugging: + +![Remote Debugging](https://github.com/dotCMS/core/blob/new-docker-compose-examples/docker/docker-compose-examples/single-node-debug-mode/Intellij%20Debug%20Mode.png?raw=true) + + + + + diff --git a/docker/docker-compose-examples/single-node-debug-mode/docker-compose.yml b/docker/docker-compose-examples/single-node-debug-mode/docker-compose.yml new file mode 100644 index 000000000000..d0d2108af550 --- /dev/null +++ b/docker/docker-compose-examples/single-node-debug-mode/docker-compose.yml @@ -0,0 +1,64 @@ +version: '3.5' + +networks: + db_net: + es_net: + +volumes: + cms-shared: + dbdata: + esdata: + +services: + elasticsearch: + image: docker.elastic.co/elasticsearch/elasticsearch:7.9.1 + environment: + - cluster.name=elastic-cluster + - discovery.type=single-node + - data + - bootstrap.memory_lock=true + - "ES_JAVA_OPTS=-Xmx1G " + ports: + - 9200:9200 + - 9600:9600 + volumes: + - esdata + networks: + - es_net + + dotcms: + image: dotcms/dotcms:latest + environment: + "CMS_JAVA_OPTS": '-Xmx1g -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=*:8000 ' + "DB_BASE_URL": "jdbc:postgresql://db/dotcms" + "DB_USERNAME": 'dotcmsdbuser' + "DB_PASSWORD": 'password' + "DOT_ES_AUTH_BASIC_PASSWORD": 'admin' + "DOT_ES_ENDPOINTS": 'http://elasticsearch:9200' + "DOT_INITIAL_ADMIN_PASSWORD": 'admin' + #"CUSTOM_STARTER_URL": 'https://repo.dotcms.com/artifactory/libs-release-local/com/dotcms/starter/20211201/starter-20211201.zip' + depends_on: + - elasticsearch + - db + volumes: + - cms-shared + #- {license_local_path}/license.zip:/data/shared/assets/license.zip + networks: + - db_net + - es_net + ports: + - "8080:8080" + - "8000:8000" + - "8443:8443" + + db: + image: postgres:13 + command: postgres -c 'max_connections=400' -c 'shared_buffers=128MB' + environment: + "POSTGRES_USER": 'dotcmsdbuser' + "POSTGRES_PASSWORD": 'password' + "POSTGRES_DB": 'dotcms' + volumes: + - dbdata + networks: + - db_net diff --git a/docker/docker-compose-examples/single-node-demo-site/README.md b/docker/docker-compose-examples/single-node-demo-site/README.md index 12d997832be2..01dc143eb4e9 100644 --- a/docker/docker-compose-examples/single-node-demo-site/README.md +++ b/docker/docker-compose-examples/single-node-demo-site/README.md @@ -4,7 +4,7 @@ A single instance of dotcms running on port 8080 that will download and install ## Usage -####Environment setup +#### Environment setup 1) A local path to license pack can be set here: @@ -18,13 +18,13 @@ You can specifiy a custom starter that will be included: "CUSTOM_STARTER_URL": "https://repo.dotcms.com/artifactory/libs-release-local/com/dotcms/xxxxxxxxxx.zip" ``` -####Run an example: +#### Run an example: ```bash docker-compose up ``` -####Shut down instances: +#### Shut down instances: ```bash docker-compose down diff --git a/docker/docker-compose-examples/single-node-demo-site/docker-compose.yml b/docker/docker-compose-examples/single-node-demo-site/docker-compose.yml index 5dd7e2e4ca19..4d06fec9c133 100644 --- a/docker/docker-compose-examples/single-node-demo-site/docker-compose.yml +++ b/docker/docker-compose-examples/single-node-demo-site/docker-compose.yml @@ -36,7 +36,7 @@ services: "DOT_ES_AUTH_BASIC_PASSWORD": 'admin' "DOT_ES_ENDPOINTS": 'http://elasticsearch:9200' "DOT_INITIAL_ADMIN_PASSWORD": 'admin' - "CUSTOM_STARTER_URL": "https://repo.dotcms.com/artifactory/libs-release-local/com/dotcms/starter/20220209/starter-20220209.zip" + "CUSTOM_STARTER_URL": "https://repo.dotcms.com/artifactory/libs-release-local/com/dotcms/starter/20220504/starter-20220504.zip" depends_on: - elasticsearch - db diff --git a/docker/docker-compose-examples/single-node/README.md b/docker/docker-compose-examples/single-node/README.md index fbdc46d92a07..ce652efc1ba7 100644 --- a/docker/docker-compose-examples/single-node/README.md +++ b/docker/docker-compose-examples/single-node/README.md @@ -4,7 +4,7 @@ A single instance of dotcms running on port 8080. Database: postgres ## Usage -####Environment setup +#### Environment setup 1) A local path to license pack must be set here: @@ -25,16 +25,16 @@ A single instance of dotcms running on port 8080. Database: postgres #"CUSTOM_STARTER_URL": 'https://repo.dotcms.com/artifactory/libs-release-local/com/dotcms/starter/20210920/starter-20210920.zip' ``` -####Run an example: +#### Run an example: ```bash -docker-compose up``` +docker-compose up +``` -####Shut down instances: +#### Shut down instances: ```bash -docker-compose down``` +docker-compose down +``` **Important note:** `ctrl+c` does not destroy instances - - diff --git a/docker/docker-compose-examples/with-kibana/README.md b/docker/docker-compose-examples/with-kibana/README.md index 5c1c0ed99345..f03818c242b3 100644 --- a/docker/docker-compose-examples/with-kibana/README.md +++ b/docker/docker-compose-examples/with-kibana/README.md @@ -4,7 +4,7 @@ A single instance of dotcms running on port 8080. Kibana was included for torubl ## Usage -####Environment setup +#### Environment setup 1) A local path to license pack must be set here: @@ -25,15 +25,17 @@ A single instance of dotcms running on port 8080. Kibana was included for torubl #"CUSTOM_STARTER_URL": 'https://repo.dotcms.com/artifactory/libs-release-local/com/dotcms/starter/20210920/starter-20210920.zip' ``` -####Run an example: +#### Run an example: ```bash -docker-compose up``` +docker-compose up +``` -####Shut down instances: +#### Shut down instances: ```bash -docker-compose down``` +docker-compose down +``` **Important note:** `ctrl+c` does not destroy instances diff --git a/docker/docker-compose-examples/with-mssql/README.md b/docker/docker-compose-examples/with-mssql/README.md new file mode 100644 index 000000000000..f2e481d59ade --- /dev/null +++ b/docker/docker-compose-examples/with-mssql/README.md @@ -0,0 +1,35 @@ +# Dotcms Single Node (MSSQL Database) + +A single instance of dotcms running on port 8080. Database: MSSQL + +## Usage + +#### Environment setup + + +1) A local path to license pack can be set here: + +``` +- {license_local_path}/license.zip:/data/shared/assets/license.zip +``` + +You can specifiy a custom starter that will be included: +``` +"CUSTOM_STARTER_URL": "https://repo.dotcms.com/artifactory/libs-release-local/com/dotcms/xxxxxxxxxx.zip" +``` + +#### Run an example: + +```bash +docker-compose up +``` + +#### Shut down instances: + +```bash +docker-compose down +``` + +**Important note:** `ctrl+c` does not destroy instances + + diff --git a/docker/docker-compose-examples/with-mssql/docker-compose.yml b/docker/docker-compose-examples/with-mssql/docker-compose.yml new file mode 100644 index 000000000000..515dd4019074 --- /dev/null +++ b/docker/docker-compose-examples/with-mssql/docker-compose.yml @@ -0,0 +1,64 @@ +version: '3.5' + +networks: + db_net: + es_net: + +volumes: + db-data-dev: + esdata: + +services: + elasticsearch: + image: docker.elastic.co/elasticsearch/elasticsearch:7.9.1 + environment: + - cluster.name=elastic-cluster + - discovery.type=single-node + - data + - bootstrap.memory_lock=true + - "ES_JAVA_OPTS=-Xmx1G" + volumes: + - esdata:/usr/share/elasticsearch/data + networks: + - es_net + + dotcms-dev: + image: dotcms/dotcms:latest + environment: + "CATALINA_OPTS": ' -Xms1g -Xmx1g ' + "DB_BASE_URL": "jdbc:sqlserver://db-dev:1433;databaseName=dotcms" + "DB_USERNAME": 'SA' + "DB_PASSWORD": 'Test1234' + "DOT_ES_AUTH_BASIC_PASSWORD": 'admin' + "DOT_ES_ENDPOINTS": 'http://elasticsearch:9200' + "DB_DRIVER": 'com.microsoft.sqlserver.jdbc.SQLServerDriver' + "ES_ADMIN_PASSWORD": 'admin' + "DOT_INITIAL_ADMIN_PASSWORD": 'admin' + #"CUSTOM_STARTER_URL": 'https://repo.dotcms.com/artifactory/libs-release-local/com/dotcms/starter/20220504/starter-20220504.zip' + depends_on: + - elasticsearch + - db-dev + volumes: + #- {license_local_path}/license.zip:/data/shared/assets/license.zip + networks: + - db_net + - es_net + ports: + - "8080:8080" + - "8000:8000" + + db-dev: + image: mcr.microsoft.com/mssql/server:2019-latest + environment: + "ACCEPT_EULA": 'Y' + "SA_PASSWORD": 'Test1234' + "MSSQL_PID": 'Developer' + volumes: + - db-data-dev:/var/opt/mssql + - ./mssql-init/entrypoint.sh:/srv/entrypoint.sh + - ./mssql-init/mssql-dotcms-init.sql:/srv/mssql-dotcms-init.sql + - ./mssql-init/run-initialization.sh:/srv/run-initialization.sh + command: + - /srv/entrypoint.sh + networks: + - db_net \ No newline at end of file diff --git a/docker/docker-compose-examples/with-mssql/mssql-init/entrypoint.sh b/docker/docker-compose-examples/with-mssql/mssql-init/entrypoint.sh new file mode 100755 index 000000000000..482e0196dd32 --- /dev/null +++ b/docker/docker-compose-examples/with-mssql/mssql-init/entrypoint.sh @@ -0,0 +1,2 @@ +# Run Microsoft SQl Server and initialization script (at the same time) +/srv/run-initialization.sh & /opt/mssql/bin/sqlservr diff --git a/docker/docker-compose-examples/with-mssql/mssql-init/mssql-dotcms-init.sql b/docker/docker-compose-examples/with-mssql/mssql-init/mssql-dotcms-init.sql new file mode 100644 index 000000000000..bc47befb2619 --- /dev/null +++ b/docker/docker-compose-examples/with-mssql/mssql-init/mssql-dotcms-init.sql @@ -0,0 +1,11 @@ +use master; +go +drop database dotcms; +go +create database dotcms; +go +ALTER DATABASE dotcms SET READ_COMMITTED_SNAPSHOT ON; +go +ALTER DATABASE dotcms SET ALLOW_SNAPSHOT_ISOLATION ON; +go + diff --git a/docker/docker-compose-examples/with-mssql/mssql-init/run-initialization.sh b/docker/docker-compose-examples/with-mssql/mssql-init/run-initialization.sh new file mode 100755 index 000000000000..7ee48e859ed7 --- /dev/null +++ b/docker/docker-compose-examples/with-mssql/mssql-init/run-initialization.sh @@ -0,0 +1,6 @@ +# Wait to be sure that SQL Server came up +sleep 10s + +# Run the setup script to create the DB and the schema in the DB +# Note: make sure that your password matches what is in the Dockerfile +/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P Test1234 -d master -i /srv/mssql-dotcms-init.sql diff --git a/docker/docker-compose-examples/with-oracle/README.md b/docker/docker-compose-examples/with-oracle/README.md index cdcf32f17f3c..ba9d0d132b3d 100644 --- a/docker/docker-compose-examples/with-oracle/README.md +++ b/docker/docker-compose-examples/with-oracle/README.md @@ -4,7 +4,7 @@ A single instance of dotcms running on port 8080. Database: oracle ## Usage -####Environment setup +#### Environment setup 1) Start the Oracle database using the example provided on this repo (view directory ***oracle-database***) @@ -34,15 +34,17 @@ A single instance of dotcms running on port 8080. Database: oracle ``` -####Run an example: +#### Run an example: ```bash -docker-compose up``` +docker-compose up +``` -####Shut down instances: +#### Shut down instances: ```bash -docker-compose down``` +docker-compose down +``` **Important note:** `ctrl+c` does not destroy instances diff --git a/docker/docker-compose-examples/with-redis/README.md b/docker/docker-compose-examples/with-redis/README.md index fe73e9cf8b84..bca540373b42 100644 --- a/docker/docker-compose-examples/with-redis/README.md +++ b/docker/docker-compose-examples/with-redis/README.md @@ -6,7 +6,7 @@ This environment uses Redis Pub/Sub and Cache. Redis runs on port 6379 with pass ## Usage -####Environment setup +#### Environment setup 1) A local path to license pack must be set here: @@ -30,7 +30,7 @@ The license pack must contain at least two licenses (one for each node in the cl #"CUSTOM_STARTER_URL": 'https://repo.dotcms.com/artifactory/libs-release-local/com/dotcms/starter/20210920/starter-20210920.zip' ``` -####Deploying nodes: +#### Deploying nodes: ```bash docker-compose -f docker-compose-node-1.yml up @@ -44,7 +44,7 @@ docker-compose -f docker-compose-node-2.yml up ``` -####Undeploying nodes: +#### Undeploying nodes: ```bash docker-compose -f docker-compose-node-2.yml down diff --git a/dotCMS/src/integration-test/java/com/dotmarketing/startup/runonce/Task220330ChangeVanityURLSiteFieldTypeTest.java b/dotCMS/src/integration-test/java/com/dotmarketing/startup/runonce/Task220330ChangeVanityURLSiteFieldTypeTest.java index b244ab1e5606..9f4db0db533a 100644 --- a/dotCMS/src/integration-test/java/com/dotmarketing/startup/runonce/Task220330ChangeVanityURLSiteFieldTypeTest.java +++ b/dotCMS/src/integration-test/java/com/dotmarketing/startup/runonce/Task220330ChangeVanityURLSiteFieldTypeTest.java @@ -45,8 +45,8 @@ public static void prepare() throws Exception { /** * Method to test: {@link Task220330ChangeVanityURLSiteFieldType#executeUpgrade} - * When: you hace a Vanity URl COntent Type with the site field as a {@link CustomField} - * Should: CHange the field type to {@link HostFolderField} + * When: you have a Vanity URl Content Type with the site field as a {@link CustomField} + * Should: Change the field type to {@link HostFolderField} * * @throws DotDataException * @throws DotSecurityException @@ -90,6 +90,7 @@ public void test_upgradeTask_success() throws DotDataException, DotSecurityExcep .setProperty(ACTION_FIELD_VAR, 301) .setProperty(ORDER_FIELD_VAR, 0) .setProperty("site", host.getIdentifier()) + .host(host) .nextPersistedAndPublish(); Config.setProperty(SAVE_CONTENTLET_AS_JSON, true); @@ -100,6 +101,7 @@ public void test_upgradeTask_success() throws DotDataException, DotSecurityExcep .setProperty(ACTION_FIELD_VAR, 301) .setProperty(ORDER_FIELD_VAR, 0) .setProperty("site", host.getIdentifier()) + .host(host) .nextPersistedAndPublish(); final Task220330ChangeVanityURLSiteFieldType task = new Task220330ChangeVanityURLSiteFieldType(); diff --git a/dotCMS/src/integration-test/java/com/dotmarketing/util/ResourceCollectorUtilTest.java b/dotCMS/src/integration-test/java/com/dotmarketing/util/ResourceCollectorUtilTest.java index e94f5676bcb1..cfcc20ee0f64 100644 --- a/dotCMS/src/integration-test/java/com/dotmarketing/util/ResourceCollectorUtilTest.java +++ b/dotCMS/src/integration-test/java/com/dotmarketing/util/ResourceCollectorUtilTest.java @@ -41,4 +41,27 @@ public void test_getPackages_bundle() { Assert.assertTrue(importPackages.contains("com.dotmarketing.portlets.workflows.model;version=0")); } } + + + + /** + * Get the packages for a bundle + */ + @Test + public void test_getPackages_bundle_version_range() { + + + final String packageString ="com.liferay.portal.model,com.liferay.portal.util,io.vavr;version=\"[0.10,1)\",javax.servlet.http;version=\"[3.1,4)\",org.apache.velocity,org.apache.velocity.app,org.apache.velocity.context,org.apache.velocity.exception,org.apache.velocity.runtime,org.apache.velocity.runtime.directive,org.apache.velocity.runtime.parser.node,org.osgi.framework;version=\"[1.8,2)\""; + + Collection importPackages = ResourceCollectorUtil.getPackages(packageString); + Assert.assertNotNull(importPackages); + Assert.assertTrue(importPackages.size()>0); + Assert.assertEquals(12, importPackages.size()); + Assert.assertTrue(importPackages.contains("io.vavr;version=0.10")); + Assert.assertTrue(importPackages.contains("org.osgi.framework;version=1.8")); + + } + + + } diff --git a/dotCMS/src/main/java/com/dotcms/rendering/velocity/servlet/VelocityLiveMode.java b/dotCMS/src/main/java/com/dotcms/rendering/velocity/servlet/VelocityLiveMode.java index 9d4fa4c3d1b7..025d51c0086f 100644 --- a/dotCMS/src/main/java/com/dotcms/rendering/velocity/servlet/VelocityLiveMode.java +++ b/dotCMS/src/main/java/com/dotcms/rendering/velocity/servlet/VelocityLiveMode.java @@ -174,8 +174,8 @@ public final void serve(final OutputStream out) throws DotDataException, IOExcep HttpServletRequestThreadLocal.INSTANCE.setRequest(request); this.getTemplate(htmlPage, mode).merge(context, tmpOut); - - if (cacheKey != null) { + // We should only cache if status == 200 + if (null != cacheKey && response.getStatus() == 200) { final String trimmedPage = tmpOut.toString().trim(); out.write(trimmedPage.getBytes()); synchronized (cacheKey.intern()) { diff --git a/dotCMS/src/main/java/com/dotcms/rest/OSGIResource.java b/dotCMS/src/main/java/com/dotcms/rest/OSGIResource.java index 01697506dda5..5a28242af59f 100644 --- a/dotCMS/src/main/java/com/dotcms/rest/OSGIResource.java +++ b/dotCMS/src/main/java/com/dotcms/rest/OSGIResource.java @@ -1,24 +1,15 @@ package com.dotcms.rest; -import com.dotcms.repackage.org.apache.commons.io.IOUtils; -import com.dotcms.rest.annotation.NoCache; -import com.dotcms.rest.api.MultiPartUtils; -import com.dotcms.rest.exception.ForbiddenException; -import com.dotmarketing.business.APILocator; -import com.dotmarketing.exception.DotDataException; -import com.dotmarketing.util.Logger; -import com.dotmarketing.util.PortletID; -import com.dotmarketing.util.SecurityLogger; -import com.dotmarketing.util.json.JSONArray; -import com.dotmarketing.util.json.JSONException; -import com.dotmarketing.util.json.JSONObject; -import com.liferay.portal.model.User; -import io.vavr.Tuple2; -import org.apache.felix.framework.OSGIUtil; -import org.glassfish.jersey.media.multipart.FormDataMultiPart; -import org.glassfish.jersey.server.JSONP; -import org.osgi.framework.Bundle; - +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.nio.file.Files; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.ws.rs.Consumes; @@ -30,15 +21,20 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.nio.file.Files; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; +import org.apache.felix.framework.OSGIUtil; +import org.glassfish.jersey.media.multipart.FormDataMultiPart; +import org.glassfish.jersey.server.JSONP; +import org.osgi.framework.Bundle; +import com.dotcms.repackage.org.apache.commons.io.IOUtils; +import com.dotcms.rest.annotation.NoCache; +import com.dotcms.rest.api.MultiPartUtils; +import com.dotmarketing.util.Logger; +import com.dotmarketing.util.PortletID; +import com.dotmarketing.util.SecurityLogger; +import com.dotmarketing.util.json.JSONArray; +import com.dotmarketing.util.json.JSONException; +import com.dotmarketing.util.json.JSONObject; +import io.vavr.Tuple2; /** * @author Jonathan Gamba @@ -68,6 +64,7 @@ public Response getInstalledBundles (@Context HttpServletRequest request, @Conte .requiredFrontendUser(false) .requestAndResponse(request, response) .params(params) + .requiredPortlet("dynamic-plugins") .rejectWhenNoUser(true) .init(); @@ -75,22 +72,6 @@ public Response getInstalledBundles (@Context HttpServletRequest request, @Conte ResourceResponse responseResource = new ResourceResponse( initData.getParamsMap() ); StringBuilder responseMessage = new StringBuilder(); - //Verify if the user have access to the OSGI portlet - User currentUser = initData.getUser(); - try { - if ( currentUser == null || !APILocator.getLayoutAPI().doesUserHaveAccessToPortlet( "dynamic-plugins", currentUser ) ) { - throw new ForbiddenException("User does not have access to the Dynamic Plugins Portlet"); - } - } catch ( DotDataException e ) { - Logger.error( this.getClass(), "Error validating User access to the Dynamic Plugins Portlet.", e ); - - if ( e.getMessage() != null ) { - responseMessage.append( e.getMessage() ); - } else { - responseMessage.append( "Error validating User access to the Dynamic Plugins Portlet." ); - } - return responseResource.responseError( responseMessage.toString() ); - } /* This method returns a list of all bundles installed in the OSGi environment at the time of the call to this method. However, @@ -151,6 +132,45 @@ public Response getInstalledBundles (@Context HttpServletRequest request, @Conte return responseResource.response( responseMessage.toString() ); } + /** + * This method returns a list of all bundles installed in the OSGi environment at the time of the call to this method. + * + * @param request + * @param params + * @return + * @throws JSONException + */ + @GET + @Path ("/_processExports/{bundle:.*}") + @Produces (MediaType.APPLICATION_JSON) + public Response processBundle (@Context HttpServletRequest request, @Context final HttpServletResponse response, @PathParam ("bundle") String bundle ) throws JSONException { + + new WebResource.InitBuilder(webResource) + .requiredBackendUser(true) + .requiredFrontendUser(false) + .requestAndResponse(request, response) + .requiredPortlet("dynamic-plugins") + .rejectWhenNoUser(true) + .init(); + + //Creating an utility response object + ResourceResponse responseResource = new ResourceResponse( new HashMap<>() ); + StringBuilder responseMessage = new StringBuilder(); + + + try { + OSGIUtil.getInstance().processExports(bundle); + return responseResource.response( responseMessage.toString() ); + } catch (Exception e) { + Logger.warn(this.getClass(), "Error getting installed OSGI bundles.", e); + return responseResource.responseError(e.getMessage()); + } + + } + + + + /** * This endpoint receives multiples jar files in order to upload to the osgi. * @@ -220,7 +240,7 @@ public final Response updateBundles(@Context final HttpServletRequest request, // since we already upload jar, we would like to try to run the upload folder when the // refresh strategy is running by schedule job - OSGIUtil.getInstance().tryUploadFolderReload(); + OSGIUtil.getInstance().checkUploadFolder(); return Response.ok(new ResponseEntityView( files.stream().map(File::getName).collect(Collectors.toSet()))) diff --git a/dotCMS/src/main/java/com/dotcms/rest/api/v1/maintenance/MaintenanceResource.java b/dotCMS/src/main/java/com/dotcms/rest/api/v1/maintenance/MaintenanceResource.java index 32e0a6ba604f..8a8bdef9103f 100644 --- a/dotCMS/src/main/java/com/dotcms/rest/api/v1/maintenance/MaintenanceResource.java +++ b/dotCMS/src/main/java/com/dotcms/rest/api/v1/maintenance/MaintenanceResource.java @@ -1,25 +1,12 @@ package com.dotcms.rest.api.v1.maintenance; -import com.dotcms.concurrent.DotConcurrentFactory; -import com.dotcms.repackage.com.google.common.annotations.VisibleForTesting; -import com.dotcms.rest.InitDataObject; -import com.dotcms.rest.ResponseEntityView; -import com.dotcms.rest.WebResource; -import com.dotcms.rest.annotation.NoCache; -import com.dotcms.util.AssetExporterUtil; -import com.dotcms.util.DbExporterUtil; -import com.dotmarketing.business.ApiProvider; -import com.dotmarketing.business.Role; -import com.dotmarketing.exception.DoesNotExistException; -import com.dotmarketing.exception.DotRuntimeException; -import com.dotmarketing.util.Config; -import com.dotmarketing.util.ExportStarterUtil; -import com.dotmarketing.util.FileUtil; -import com.dotmarketing.util.Logger; -import com.dotmarketing.util.SecurityLogger; import java.io.File; import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; import java.io.Serializable; +import java.text.SimpleDateFormat; +import java.util.Date; import java.util.Optional; import java.util.concurrent.TimeUnit; import javax.servlet.http.HttpServletRequest; @@ -30,15 +17,34 @@ import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; +import javax.ws.rs.WebApplicationException; import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import javax.ws.rs.core.Response.Status; - +import javax.ws.rs.core.StreamingOutput; +import org.apache.commons.io.IOUtils; +import org.glassfish.jersey.server.JSONP; +import com.dotcms.concurrent.DotConcurrentFactory; +import com.dotcms.repackage.com.google.common.annotations.VisibleForTesting; +import com.dotcms.rest.InitDataObject; +import com.dotcms.rest.ResponseEntityView; +import com.dotcms.rest.WebResource; +import com.dotcms.rest.annotation.NoCache; +import com.dotcms.util.AssetExporterUtil; +import com.dotcms.util.DbExporterUtil; +import com.dotmarketing.business.APILocator; +import com.dotmarketing.business.ApiProvider; +import com.dotmarketing.business.Role; +import com.dotmarketing.exception.DoesNotExistException; +import com.dotmarketing.util.Config; +import com.dotmarketing.util.ExportStarterUtil; +import com.dotmarketing.util.FileUtil; +import com.dotmarketing.util.Logger; +import com.dotmarketing.util.SecurityLogger; +import com.dotmarketing.util.StringUtils; import com.liferay.portal.model.User; -import com.liferay.util.StringPool; import io.vavr.control.Try; -import org.glassfish.jersey.server.JSONP; /** @@ -175,15 +181,40 @@ public final Response isPgDumpAvailable(@Context final HttpServletRequest reques @Produces({MediaType.APPLICATION_OCTET_STREAM, MediaType.APPLICATION_JSON}) public final Response downloadDb(@Context final HttpServletRequest request, @Context final HttpServletResponse response) throws IOException { - assertBackendUser(request, response); + User user = assertBackendUser(request, response).getUser(); + + final String hostName = Try.of(()-> APILocator.getHostAPI().findDefaultHost(APILocator.systemUser(), false).getHostname()).getOrElse("dotcms"); - final File dbFile = DbExporterUtil.exportToFile(); - Logger.info(this.getClass(), "Requested dbFile: " + dbFile.getCanonicalPath()); + final SimpleDateFormat dateToString = new SimpleDateFormat("yyyy-MM-dd_hh-mm-ss"); + final String fileName = StringUtils.sanitizeFileName(hostName) + "_db_" + dateToString.format(new Date()) + ".sql.gz"; - response.setHeader("Content-Disposition", "attachment; filename=" + dbFile.getName()); - return Response.ok(dbFile, MediaType.APPLICATION_OCTET_STREAM).build(); + SecurityLogger.logInfo(this.getClass(), "User : " + user.getEmailAddress() + " downloading database"); + + response.setHeader("Content-Type", MediaType.APPLICATION_OCTET_STREAM); + response.setHeader("Content-Disposition", "attachment; filename=\"" + fileName + "\""); + + return Response.ok(new PGDumpStreamingOutput()).build(); } + + public static class PGDumpStreamingOutput implements StreamingOutput { + + @Override + public void write(OutputStream output) throws IOException, WebApplicationException { + + synchronized (PGDumpStreamingOutput.class) { + try (InputStream input = DbExporterUtil.exportSql()) { + IOUtils.copy(input, output); + + } catch (Exception e) { + throw new RuntimeException(e); + } + } + + } + } + + /** * This method attempts to send resolved DB dump file using an octet stream http response. * diff --git a/dotCMS/src/main/java/com/dotcms/util/DbExporterUtil.java b/dotCMS/src/main/java/com/dotcms/util/DbExporterUtil.java index fd601d93803a..2e867e681c47 100644 --- a/dotCMS/src/main/java/com/dotcms/util/DbExporterUtil.java +++ b/dotCMS/src/main/java/com/dotcms/util/DbExporterUtil.java @@ -247,7 +247,7 @@ static void copyPgDump(final File pgDumpFile) { * @return input stream with commands output * @throws IOException */ - static InputStream exportSql() throws IOException { + public static InputStream exportSql() throws IOException { return RuntimeUtils.getRunProcessStream(getCommandAndArgs(PG_DUMP_PATH.get(), getDatasource().getDbUrl())); } diff --git a/dotCMS/src/main/java/com/dotmarketing/portlets/osgi/AJAX/OSGIAJAX.java b/dotCMS/src/main/java/com/dotmarketing/portlets/osgi/AJAX/OSGIAJAX.java index 92f798bffd0b..ecad9df5bcb5 100644 --- a/dotCMS/src/main/java/com/dotmarketing/portlets/osgi/AJAX/OSGIAJAX.java +++ b/dotCMS/src/main/java/com/dotmarketing/portlets/osgi/AJAX/OSGIAJAX.java @@ -11,6 +11,7 @@ import com.dotmarketing.util.Logger; import org.apache.felix.framework.OSGIUtil; import com.dotmarketing.util.SecurityLogger; +import com.dotmarketing.util.UUIDGenerator; import com.liferay.util.FileUtil; import java.io.BufferedWriter; import java.io.File; @@ -32,7 +33,8 @@ public void action ( HttpServletRequest request, HttpServletResponse response ) } public void undeploy ( HttpServletRequest request, HttpServletResponse response ) throws ServletException, IOException, InterruptedException { - + validateUser() ; + String jar = request.getParameter( "jar" ); String bundleId = request.getParameter( "bundleId" ); @@ -74,6 +76,8 @@ public void undeploy ( HttpServletRequest request, HttpServletResponse response } public void deploy ( HttpServletRequest request, HttpServletResponse response ) throws ServletException, IOException { + validateUser() ; + String loadPath = OSGIUtil.getInstance().getFelixDeployPath(); String undeployedPath = OSGIUtil.getInstance().getFelixUndeployPath(); @@ -92,7 +96,8 @@ public void deploy ( HttpServletRequest request, HttpServletResponse response ) } public void stop ( HttpServletRequest request, HttpServletResponse response ) throws ServletException, IOException { - + validateUser() ; + String bundleID = request.getParameter( "bundleId" ); String jar = request.getParameter( "jar" ); try { @@ -110,7 +115,8 @@ public void stop ( HttpServletRequest request, HttpServletResponse response ) th } public void start ( HttpServletRequest request, HttpServletResponse response ) throws ServletException, IOException { - + validateUser() ; + String bundleID = request.getParameter( "bundleId" ); String jar = request.getParameter( "jar" ); try { @@ -127,7 +133,8 @@ public void start ( HttpServletRequest request, HttpServletResponse response ) t } public void add ( HttpServletRequest request, HttpServletResponse response ) throws ServletException, IOException { - + validateUser() ; + FileItemFactory factory = new DiskFileItemFactory(); ServletFileUpload upload = new ServletFileUpload( factory ); FileItemIterator iterator = null; @@ -145,7 +152,7 @@ public void add ( HttpServletRequest request, HttpServletResponse response ) thr break; } - String felixDeployFolder = OSGIUtil.getInstance().getFelixDeployPath(); + String felixDeployFolder = OSGIUtil.getInstance().getFelixUploadPath(); File felixFolder = new File(felixDeployFolder); File osgiJar = new File(felixDeployFolder + File.separator + fname); @@ -163,6 +170,9 @@ public void add ( HttpServletRequest request, HttpServletResponse response ) thr IOUtils.closeQuietly( in ); } } + OSGIUtil.getInstance().checkUploadFolder(); + + Logger.info( OSGIAJAX.class, "OSGI Bundle "+jar+ " Uploaded"); } catch ( FileUploadException e ) { Logger.error( OSGIBaseAJAX.class, e.getMessage(), e ); @@ -180,7 +190,8 @@ public void add ( HttpServletRequest request, HttpServletResponse response ) thr * @throws IOException */ public void getExtraPackages ( HttpServletRequest request, HttpServletResponse response ) throws ServletException, IOException { - + validateUser() ; + //Read the list of the dotCMS exposed packages to the OSGI context String extraPackages = OSGIUtil.getInstance().getExtraOSGIPackages(); @@ -197,21 +208,21 @@ public void getExtraPackages ( HttpServletRequest request, HttpServletResponse r * @throws IOException */ public void modifyExtraPackages ( HttpServletRequest request, HttpServletResponse response ) throws ServletException, IOException { - + validateUser() ; + //Get the packages from the form String extraPackages = request.getParameter( "packages" ); - //Override the file with the values we just read - BufferedWriter writer = new BufferedWriter( new FileWriter( OSGIUtil.getInstance().FELIX_EXTRA_PACKAGES_FILE ) ); - writer.write( extraPackages ); - writer.close(); - Logger.info( OSGIAJAX.class, "OSGI Extra Packages Saved"); - //Send a response + + OSGIUtil.getInstance().writeOsgiExtras(extraPackages); + + writeSuccess( response, "OSGI Extra Packages Saved" ); } public void restart ( HttpServletRequest request, HttpServletResponse response ) throws ServletException, IOException { - + validateUser() ; + // restart the framework at notify to all nodes to do the same OSGIUtil.getInstance().restartOsgiClusterWide(); //Send a respose @@ -219,7 +230,8 @@ public void restart ( HttpServletRequest request, HttpServletResponse response ) } private void remove () { - + validateUser() ; + //Remove Portlets in the list OSGIUtil.getInstance().portletIDsStopped.stream().forEach(p -> {APILocator.getPortletAPI().deletePortlet(p);}); Logger.info( this, "Portlets Removed: " + OSGIUtil.getInstance().portletIDsStopped.toString() ); diff --git a/dotCMS/src/main/java/com/dotmarketing/portlets/osgi/AJAX/OSGIBaseAJAX.java b/dotCMS/src/main/java/com/dotmarketing/portlets/osgi/AJAX/OSGIBaseAJAX.java index 2eec505b43b8..726f813f9f12 100644 --- a/dotCMS/src/main/java/com/dotmarketing/portlets/osgi/AJAX/OSGIBaseAJAX.java +++ b/dotCMS/src/main/java/com/dotmarketing/portlets/osgi/AJAX/OSGIBaseAJAX.java @@ -4,15 +4,38 @@ import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import com.dotcms.api.web.HttpServletRequestThreadLocal; +import com.dotcms.repackage.org.directwebremoting.WebContextFactory; import com.dotmarketing.business.APILocator; import com.dotmarketing.cms.factories.PublicCompanyFactory; +import com.dotmarketing.exception.DotRuntimeException; +import com.dotmarketing.exception.DotSecurityException; import com.dotmarketing.servlets.ajax.AjaxAction; import com.dotmarketing.util.Logger; import com.dotmarketing.util.WebKeys; import com.liferay.portal.language.LanguageUtil; +import com.liferay.portal.model.User; abstract class OSGIBaseAJAX extends AjaxAction { + public boolean validateUser() { + HttpServletRequest req = HttpServletRequestThreadLocal.INSTANCE.getRequest(); + User user = null; + try { + user = com.liferay.portal.util.PortalUtil.getUser(req); + if(user == null || !APILocator.getLayoutAPI().doesUserHaveAccessToPortlet("dynamic-plugins", user)){ + throw new DotSecurityException("User does not have access to the Plugin Portlet"); + } + return true; + } catch (Exception e) { + Logger.error(this, e.getMessage()); + throw new DotRuntimeException (e.getMessage()); + } + } + + + + public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { if(System.getProperty(WebKeys.OSGI_ENABLED)==null){ diff --git a/dotCMS/src/main/java/com/dotmarketing/startup/runonce/Task220330ChangeVanityURLSiteFieldType.java b/dotCMS/src/main/java/com/dotmarketing/startup/runonce/Task220330ChangeVanityURLSiteFieldType.java index 20597c0aaec2..d9c1b90dbada 100644 --- a/dotCMS/src/main/java/com/dotmarketing/startup/runonce/Task220330ChangeVanityURLSiteFieldType.java +++ b/dotCMS/src/main/java/com/dotmarketing/startup/runonce/Task220330ChangeVanityURLSiteFieldType.java @@ -51,8 +51,6 @@ public class Task220330ChangeVanityURLSiteFieldType implements StartupTask { final String GET_FIELD_CONTENTLET = "SELECT structure_inode,field_contentlet FROM field " + "WHERE velocity_var_name ='site' AND field_contentlet <> 'system_field' AND structure_inode in (SELECT inode FROM structure WHERE structuretype = 7)"; - final String UPDATE_HOST_INODE = "UPDATE identifier SET host_inode = ? WHERE id = ?"; - @Override public boolean forceRun() { return true; @@ -60,27 +58,9 @@ public boolean forceRun() { @Override public void executeUpgrade() throws DotDataException, DotRuntimeException { - try { - final List contentlets = getContentlets(); - - updateHost(contentlets); - updateFieldType(); - - CacheLocator.getContentTypeCache2().clearCache(); - } catch (JsonProcessingException | DotSecurityException e) { - Logger.error(Task220330ChangeVanityURLSiteFieldType.class, e.getMessage()); - } - } - - private List getContentlets() - throws DotDataException, DotSecurityException, JsonProcessingException { + updateFieldType(); - final List result = new ArrayList<>(); - - addNotJsonContentlet(result); - addJsonContentlet(result); - - return result; + CacheLocator.getContentTypeCache2().clearCache(); } private void addJsonContentlet(final List result) @@ -124,16 +104,6 @@ private void updateFieldType() throws DotDataException { dotConnect.loadResult(); } - private void updateHost(final List contentlets) throws DotDataException { - final DotConnect dotConnect = new DotConnect(); - - final List batchParams = contentlets.stream() - .map(contentletHost -> new Params(contentletHost.hostInode, contentletHost.contentletIdentifier)) - .collect(Collectors.toList()); - - dotConnect.executeBatch(UPDATE_HOST_INODE, batchParams); - } - private List> getFromQuery(final String contentletQuery) throws DotDataException { diff --git a/dotCMS/src/main/java/com/dotmarketing/util/ResourceCollectorUtil.java b/dotCMS/src/main/java/com/dotmarketing/util/ResourceCollectorUtil.java index c14b75649349..d979e9976948 100644 --- a/dotCMS/src/main/java/com/dotmarketing/util/ResourceCollectorUtil.java +++ b/dotCMS/src/main/java/com/dotmarketing/util/ResourceCollectorUtil.java @@ -1,21 +1,26 @@ package com.dotmarketing.util; -import com.liferay.util.StringPool; - import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.URLDecoder; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.Enumeration; +import java.util.HashSet; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; import java.util.jar.JarFile; import java.util.jar.Manifest; import java.util.regex.Pattern; -import java.util.stream.Collectors; -import java.util.stream.Stream; import java.util.zip.ZipEntry; import java.util.zip.ZipException; import java.util.zip.ZipFile; +import com.google.common.collect.ImmutableList; /** * list resources available from the classpath @ * @@ -50,8 +55,8 @@ public static boolean isFragmentJar (final File file) { * @param file File * @return Collection string */ + public static Collection getPackages(final File file) { - String importPackage = null; try (final JarFile jarFile = new JarFile(file)){ @@ -65,12 +70,55 @@ public static Collection getPackages(final File file) { Logger.error(ResourceCollectorUtil.class, e.getMessage(), e); } - - return UtilMethods.isSet(importPackage)? - Stream.of(importPackage.split(StringPool.COMMA)).collect(Collectors.toList()): - Collections.emptyList(); + + + return getPackages(importPackage); + + } + public static Collection getPackages(final String importPackage) { + + + if(UtilMethods.isEmpty(importPackage)) { + return ImmutableList.of(); + } + return removeVersionRange(importPackage); + + } + + + + + + private static Collection removeVersionRange(String packages){ + + final Set finalSet = new LinkedHashSet<>(); + + for(final String pkg :StringUtils.splitOnCommasWithQuotes(packages) ) { + int brace = pkg.indexOf("\"["); + int comma = pkg.indexOf(","); + int parans = pkg.indexOf(")\""); + + String version = pkg; + + if(brace> 0 && brace < comma && comma < parans){ + version = pkg.substring(0,brace) + pkg.substring(brace+2, parans).split(",")[0] ; + } + finalSet.add(version); + + + } + + return finalSet; + + + } + + + + + /** * Get the Import-Package from the jar file * @param file File @@ -82,9 +130,9 @@ public static Collection getImports(final File file) { final Manifest manifest = jarFile.getManifest(); final String importPackage = manifest.getMainAttributes().getValue("Import-Package"); - return UtilMethods.isSet(importPackage)? - Stream.of(importPackage.split(StringPool.COMMA)).collect(Collectors.toList()): - Collections.emptyList(); + + return StringUtils.splitOnCommasWithQuotes(importPackage); + } catch (Exception e) { Logger.error(ResourceCollectorUtil.class, e.getMessage(), e); @@ -104,9 +152,7 @@ public static Collection getExports(final File file) { final Manifest manifest = jarFile.getManifest(); final String exportPackage = manifest.getMainAttributes().getValue("Export-Package"); - return UtilMethods.isSet(exportPackage)? - Stream.of(exportPackage.split(StringPool.COMMA)).collect(Collectors.toList()): - Collections.emptyList(); + return StringUtils.splitOnCommasWithQuotes(exportPackage); } catch (Exception e) { Logger.error(ResourceCollectorUtil.class, e.getMessage(), e); diff --git a/dotCMS/src/main/java/com/dotmarketing/util/StringUtils.java b/dotCMS/src/main/java/com/dotmarketing/util/StringUtils.java index 8e2720116874..2fbed3b2b729 100644 --- a/dotCMS/src/main/java/com/dotmarketing/util/StringUtils.java +++ b/dotCMS/src/main/java/com/dotmarketing/util/StringUtils.java @@ -65,6 +65,42 @@ public static boolean isHtml(final String htmlString) { } + public static List splitOnCommasWithQuotes(String importPackage){ + + if(UtilMethods.isEmpty(importPackage)){ + return Collections.emptyList(); + } + + List tokensList = new ArrayList(); + boolean inQuotes = false; + StringBuilder b = new StringBuilder(); + for (char c : importPackage.toCharArray()) { + switch (c) { + case ',': + if (inQuotes) { + b.append(c); + } else { + tokensList.add(b.toString()); + b = new StringBuilder(); + } + break; + case '\"': + inQuotes = !inQuotes; + default: + b.append(c); + break; + } + } + tokensList.add(b.toString()); + + return tokensList; + + } + + + + + public static boolean isJson(String jsonString) { if(!jsonString.contains("{") || !jsonString.contains("}")){ diff --git a/dotCMS/src/main/java/org/apache/felix/framework/OSGIUtil.java b/dotCMS/src/main/java/org/apache/felix/framework/OSGIUtil.java index fd6689adb53e..b818cd05a149 100644 --- a/dotCMS/src/main/java/org/apache/felix/framework/OSGIUtil.java +++ b/dotCMS/src/main/java/org/apache/felix/framework/OSGIUtil.java @@ -1,5 +1,44 @@ package org.apache.felix.framework; +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.OutputStream; +import java.io.StringWriter; +import java.net.URL; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.time.Instant; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.Iterator; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Properties; +import java.util.Set; +import java.util.TreeSet; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.function.Supplier; +import javax.servlet.ServletException; +import org.apache.commons.io.FileUtils; +import org.apache.commons.io.filefilter.SuffixFileFilter; +import org.apache.felix.framework.util.FelixConstants; +import org.apache.felix.main.AutoProcessor; +import org.apache.felix.main.Main; +import org.apache.velocity.tools.view.PrimitiveToolboxManager; +import org.osgi.framework.Bundle; +import org.osgi.framework.BundleContext; +import org.osgi.framework.ServiceReference; +import org.osgi.framework.launch.Framework; import com.dotcms.api.system.event.Payload; import com.dotcms.api.system.event.SystemEventType; import com.dotcms.api.system.event.message.MessageSeverity; @@ -13,59 +52,23 @@ import com.dotcms.dotpubsub.DotPubSubProviderLocator; import com.dotcms.repackage.org.apache.commons.io.IOUtils; import com.dotmarketing.business.APILocator; +import com.dotmarketing.exception.DotRuntimeException; import com.dotmarketing.osgi.HostActivator; +import com.dotmarketing.portlets.osgi.AJAX.OSGIAJAX; import com.dotmarketing.portlets.workflows.business.WorkflowAPIOsgiService; import com.dotmarketing.util.Config; import com.dotmarketing.util.DateUtil; import com.dotmarketing.util.Logger; import com.dotmarketing.util.ResourceCollectorUtil; +import com.dotmarketing.util.StringUtils; +import com.dotmarketing.util.UUIDGenerator; import com.dotmarketing.util.UtilMethods; import com.dotmarketing.util.WebKeys; import com.google.common.collect.ImmutableList; import com.liferay.portal.language.LanguageUtil; import com.liferay.util.FileUtil; import com.liferay.util.MathUtil; -import com.liferay.util.StringPool; import io.vavr.control.Try; -import org.apache.commons.io.FileUtils; -import org.apache.commons.io.filefilter.SuffixFileFilter; -import org.apache.felix.framework.util.FelixConstants; -import org.apache.felix.main.AutoProcessor; -import org.apache.felix.main.Main; -import org.apache.velocity.tools.view.PrimitiveToolboxManager; -import org.osgi.framework.Bundle; -import org.osgi.framework.BundleContext; -import org.osgi.framework.ServiceReference; -import org.osgi.framework.launch.Framework; - -import java.io.BufferedReader; -import java.io.BufferedWriter; -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.OutputStream; -import java.io.OutputStreamWriter; -import java.io.StringWriter; -import java.net.URL; -import java.nio.file.Files; -import java.nio.file.Paths; -import java.time.Instant; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Properties; -import java.util.Set; -import java.util.TreeSet; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicBoolean; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.function.Supplier; -import java.util.stream.Collectors; -import java.util.stream.Stream; /** * Created by Jonathan Gamba @@ -74,16 +77,13 @@ public class OSGIUtil { private static final String OSGI_EXTRA_CONFIG_FILE_PATH_KEY = "OSGI_EXTRA_CONFIG_FILE_PATH_KEY"; - private static final String OSGI_USE_FILE_WATCHER = "OSGI_USE_FILE_WATCHER"; private static final String OSGI_RESTART_LOCK_KEY = "osgi_restart_lock"; private static final String OSGI_CHECK_UPLOAD_FOLDER_FREQUENCY = "OSGI_CHECK_UPLOAD_FOLDER_FREQUENCY"; // by default the upload folder checker is 10 seconds private static final int OSGI_CHECK_UPLOAD_FOLDER_FREQUENCY_DEFAULT_VAL = 10; - // by default the max number of count for upload folder read is 10, after that the cycle reinits. - private static final int MAX_UPLOAD_FOLDER_COUNT_VAL = 10; + //List of jar prefixes of the jars to be included in the osgi-extra.conf file - private List dotCMSJarPrefixes = ImmutableList.of("dotcms", "ee-"); public final List portletIDsStopped = Collections.synchronizedList(new ArrayList<>()); public final List actionletsStopped = Collections.synchronizedList(new ArrayList<>()); public WorkflowAPIOsgiService workflowOsgiService; @@ -94,8 +94,8 @@ public class OSGIUtil { private static final String FELIX_UNDEPLOYED_DIR = "felix.undeployed.dir"; private static final String FELIX_FRAMEWORK_STORAGE = org.osgi.framework.Constants.FRAMEWORK_STORAGE; private static final String AUTO_DEPLOY_DIR_PROPERTY = AutoProcessor.AUTO_DEPLOY_DIR_PROPERTY; - private static final String UTF_8 = "utf-8"; - private final TreeSet exportedPackagesSet = new TreeSet<>(); + + private final Debouncer debouncer = new Debouncer(); // PUBSUB @@ -138,6 +138,7 @@ private static class OSGIUtilHolder{ private OSGIUtil() { + this.pubsub = DotPubSubProviderLocator.provider.get(); this.osgiRestartTopic = new OsgiRestartTopic(); Logger.debug(this.getClass(), "Starting hook with PubSub on OSGI"); @@ -187,8 +188,58 @@ private Properties defaultProperties() { return felixProps; } + + final long delay = Config.getLongProperty("OSGI_UPLOAD_DEBOUNCE_DELAY_MILLIS", 5000); + /** + * Overrides the content of the osgi-extra.conf file + * + * @param request + * @param response + * @throws ServletException + * @throws IOException + */ + public void writeOsgiExtras ( final String extraPackages ) { + + if(UtilMethods.isEmpty(extraPackages)) { + return ; + } + + if("RESET".equals(extraPackages)) { + new File(OSGIUtil.getInstance().getOsgiExtraConfigPath()).delete(); + debouncer.debounce("restartOsgi", this::restartOsgi, delay, TimeUnit.MILLISECONDS); + return; + } + + //Override the file with the values we just read + + final String osgiExtraFile = OSGIUtil.getInstance().getOsgiExtraConfigPath(); + final String osgiExtraFileTmp = osgiExtraFile + "_" + UUIDGenerator.shorty(); + + + try(BufferedWriter writer = new BufferedWriter( new FileWriter( osgiExtraFileTmp ) )){ + writer.write( extraPackages ); + Logger.info( OSGIAJAX.class, "OSGI Extra Packages Saved"); + } + catch(Exception e) { + Logger.error( OSGIUtil.class, e.getMessage(), e ); + throw new DotRuntimeException( e.getMessage(), e ); + } + new File(osgiExtraFileTmp).renameTo(new File(osgiExtraFile)); + + + //restart OSGI after delay + debouncer.debounce("restartOsgi", this::restartOsgi, delay, TimeUnit.MILLISECONDS); + + + + + } + + + + - private String getOsgiExtraConfigPath () { + public String getOsgiExtraConfigPath () { final Supplier supplier = () -> APILocator.getFileAssetAPI().getRealAssetsRootPath() + File.separator + "server" + File.separator + "osgi" + File.separator + "osgi-extra.conf"; @@ -231,13 +282,8 @@ public synchronized Framework initializeFramework() { verifyBundles(felixProps); // Set all OSGI Packages - String extraPackages; - try { - extraPackages = getExtraOSGIPackages(); - } catch (IOException e) { - Logger.error(this, "Error loading the OSGI framework properties: " + e); - throw new RuntimeException(e); - } + String extraPackages = getExtraOSGIPackages(); + // Setting the OSGI extra packages property felixProps.setProperty(PROPERTY_OSGI_PACKAGES_EXTRA, extraPackages); @@ -288,20 +334,9 @@ public synchronized Framework initializeFramework() { } private void startWatchingUploadFolder(final String uploadFolder) { - - final boolean useFileWatcher = Config.getBooleanProperty(OSGI_USE_FILE_WATCHER, false); - - if (useFileWatcher) { - - this.runFileWatcher(uploadFolder); - } else if(!this.isStartedOsgiRestartSchedule.get()) { - - this.runUploadFolderCheckerJob(uploadFolder); - this.isStartedOsgiRestartSchedule.set(true); + if(this.isStartedOsgiRestartSchedule.getAndSet(true)) { + return; } - } - - private void runUploadFolderCheckerJob(final String uploadFolder) { Logger.debug(this, ()-> "Using Schedule fixed job to discover changes on the OSGI upload folder: " + uploadFolder); @@ -318,41 +353,35 @@ private void runUploadFolderCheckerJob(final String uploadFolder) { initialDelay, delay, TimeUnit.SECONDS); } - private void runFileWatcher(final String uploadFolder) { - try { - Logger.debug(this, ()-> "Using file watcher to discover changes on the OSGI upload folder"); - final File uploadFolderFile = new File(uploadFolder); - Logger.debug(APILocator.class, ()-> "Start watching OSGI Upload dir: " + uploadFolder); - APILocator.getFileWatcherAPI().watchFile(uploadFolderFile, - () -> this.fireReload(uploadFolderFile)); - } catch (IOException e) { - Logger.error(Config.class, e.getMessage(), e); - } + public void checkUploadFolder() { + final ClusterLockManager lockManager = DotConcurrentFactory.getInstance().getClusterLockManager(OSGI_RESTART_LOCK_KEY); + checkUploadFolder(new File(OSGIUtil.getInstance().getFelixUploadPath()),lockManager); } - - // fi the job counts is great or equals to the upload folder reads, allow to do a new retry to read the upload folder for jar - private boolean allowedToReadUploadFolder () { - - if (this.currentJobRestartIterationsCount.intValue() >= this.uploadFolderReadsCount.intValue()) { - - // if gonna enter then reset the job counts - this.currentJobRestartIterationsCount.set(0); - return true; + + + + + public void processExports(final String jarFile) { + if(!jarFile.equals(StringUtils.sanitizeFileName(jarFile))){ + throw new DotRuntimeException("Invalid bundle name: " + jarFile); } - - this.currentJobRestartIterationsCount.incrementAndGet(); - return false; - } - - /** - * Tries to run the upload folder now - */ - public void tryUploadFolderReload() { - - this.uploadFolderReadsCount.set(0); - this.currentJobRestartIterationsCount.set(0); + File jarfile = new File(getFelixDeployPath() + File.separator + jarFile); + File newJarfile = new File(getFelixUploadPath() + File.separator + jarFile); + + if(!jarfile.exists() || newJarfile.exists()) { + throw new DotRuntimeException("Bundle does not exist or is processing: " + jarFile); + } + + jarfile.renameTo(newJarfile); + + final ClusterLockManager lockManager = DotConcurrentFactory.getInstance().getClusterLockManager(OSGI_RESTART_LOCK_KEY); + checkUploadFolder(new File(OSGIUtil.getInstance().getFelixUploadPath()),lockManager); } + + + + // this method is called by the schedule to see if jars has been added to the framework private void checkUploadFolder(final File uploadFolderFile, final ClusterLockManager lockManager) { @@ -361,13 +390,11 @@ private void checkUploadFolder(final File uploadFolderFile, final ClusterLockMan uploadFolderFile + ", currentJobRestartIterationsCount: " + this.currentJobRestartIterationsCount.intValue() + ", uploadFolderReadsCount: " + this.uploadFolderReadsCount.intValue()); // we do not want to read every 10 seconds, so we read at 20, 30, 40, etc - if (this.allowedToReadUploadFolder()) { Logger.debug(this, ()-> "***** Checking the upload folder for jars"); if (this.anyJarOnUploadFolder(uploadFolderFile)) { - // if enter here, means there are jars on the upload folder. - uploadFolderReadsCount.set(0); + Logger.debug(this, ()-> "****** Has found jars on upload, folder, acquiring the lock and reloading the OSGI restart *****"); @@ -383,28 +410,28 @@ private void checkUploadFolder(final File uploadFolderFile, final ClusterLockMan } } else { - Logger.debug(this, ()-> "Not jars on upload folder"); + Logger.debug(this, ()-> "No jars on upload folder"); // if not jars we want to wait for the next read of the upload folder - this.uploadFolderReadsCount.incrementAndGet(); - if (this.uploadFolderReadsCount.intValue() >= MAX_UPLOAD_FOLDER_COUNT_VAL) { - // no more than 10, if so, reset to zero - uploadFolderReadsCount.set(0); - } + } - } + } private boolean anyJarOnUploadFolder(final File uploadFolderFile) { - Logger.debug(this, ()-> "Check if any jar on the upload folder"); + Logger.debug(this, ()-> "Check if any jar in the upload folder"); final String[] pathnames = uploadFolderFile.list(new SuffixFileFilter(".jar")); return UtilMethods.isSet(pathnames) && pathnames.length > 0; } + + + + private void fireReload(final File uploadFolderFile) { - Logger.debug(this, ()-> "Starting the osgi reload on folder: " + uploadFolderFile); + Logger.info(this, ()-> "Starting the osgi reload on folder: " + uploadFolderFile); APILocator.getLocalSystemEventsAPI().asyncNotify( new OSGIUploadBundleEvent(Instant.now(), uploadFolderFile)); @@ -430,35 +457,23 @@ private void fireReload(final File uploadFolderFile) { processOsgiPackages(uploadFolderFile, pathnames, osgiUserPackages); } } - + private void processOsgiPackages(final File uploadFolderFile, final String[] pathnames, final Set osgiUserPackages) { try { - boolean needManuallyRestartFramework = false; - final TreeSet copyExportedPackagesSet = new TreeSet<>(this.exportedPackagesSet); - copyExportedPackagesSet.addAll(osgiUserPackages); - if (!copyExportedPackagesSet.equals(this.exportedPackagesSet)) { - - Logger.info(this, "There are a new changes into the exported packages"); - this.exportedPackagesSet.addAll(copyExportedPackagesSet); - this.writeExtraPackagesFiles(FELIX_EXTRA_PACKAGES_FILE, this.exportedPackagesSet); - needManuallyRestartFramework = true; - } - - if (needManuallyRestartFramework) { - - final long delay = Config.getLongProperty("OSGI_UPLOAD_DEBOUNCE_DELAY_MILLIS", DateUtil.TEN_SECOND_MILLIS); - - if(delay>0) { - - debouncer.debounce("restartOsgi", this::restartOsgi, delay, TimeUnit.MILLISECONDS); - } - } else { - + final LinkedHashSet exportedPackagesSet = new LinkedHashSet<>(StringUtils.splitOnCommasWithQuotes(getExtraOSGIPackages())); + + if (exportedPackagesSet.containsAll(osgiUserPackages)) { this.moveNewBundlesToFelixLoadFolder(uploadFolderFile, pathnames); + return; } + + Logger.info(this, "There are a new changes into the exported packages"); + exportedPackagesSet.addAll(osgiUserPackages); + this.writeExtraPackagesFiles(exportedPackagesSet); + } catch (IOException e) { Logger.error(this, e.getMessage(), e); } @@ -466,7 +481,7 @@ private void processOsgiPackages(final File uploadFolderFile, // move all on upload folder to load, and restarts osgi. private void restartOsgi() { - + Logger.info(this, ()-> "Restarting OSGI"); final File uploadPath = new File(this.getFelixUploadPath()); final String[] pathnames = uploadPath.list(new SuffixFileFilter(".jar")); @@ -487,7 +502,7 @@ private void restartOsgi() { * Restart the current instance and notify the rest of the nodes in the cluster that restart is needed */ public void restartOsgiClusterWide() { - + Logger.info(this, ()-> "Restarting OSGI Cluster Wide"); this.restartOsgiOnlyLocal(); Logger.debug(this, ()-> "Sending a PubSub Osgi Restart event"); @@ -504,7 +519,7 @@ public void restartOsgiClusterWide() { * Do the restart only for the current node (locally) */ public void restartOsgiOnlyLocal() { - + Logger.info(this, ()-> "Restarting OSGI Locally"); //Remove Portlets in the list this.portletIDsStopped.stream().forEach(APILocator.getPortletAPI()::deletePortlet); Logger.info(this, "Portlets Removed: " + this.portletIDsStopped.toString()); @@ -716,107 +731,69 @@ private Properties loadConfig() { * @return String * @throws IOException Any IOException */ - public String getExtraOSGIPackages() throws IOException { + public String getExtraOSGIPackages() { final File extraPackagesFile = new File(FELIX_EXTRA_PACKAGES_FILE); - StringWriter stringWriter = null; - if (!extraPackagesFile.exists()) { - - if (extraPackagesFile.getParentFile().mkdirs()) { - this.createNewExtraPackageFile (extraPackagesFile); - } - } else { - - mergeInternalAndExternalOsgiExtraPackagesFile(extraPackagesFile); + if (!extraPackagesFile.exists() || extraPackagesFile.length()<2) { + extraPackagesFile.getParentFile().mkdirs(); + this.createNewExtraPackageFile (extraPackagesFile); } + String packageString = readExtraPackagesFiles(extraPackagesFile).toString().replace("\n", ""); + // and merge with the one on the external directory - stringWriter = readExtraPackagesFiles(extraPackagesFile); - this.exportedPackagesSet.addAll(Stream.of(stringWriter.toString() - .split(StringPool.COMMA)).filter(UtilMethods::isSet).collect(Collectors.toList())); - - //Clean up the properties, it is better to keep it simple and in a standard format - return stringWriter.toString().replaceAll("\\\n", ""). - replaceAll("\\\r", "").replaceAll("\\\\", ""); - } + Collection packages= StringUtils.splitOnCommasWithQuotes(packageString); - // if the osgi on the classpath has any addition which is not on the file system, we merge it. - private void mergeInternalAndExternalOsgiExtraPackagesFile(final File extraPackagesFile) throws IOException { - - // read always the original - final TreeSet internalExportedPackagesSet = new TreeSet<>(); - final TreeSet externalExportedPackagesSet = new TreeSet<>(); - internalExportedPackagesSet.addAll(Stream.of(this.readInternalOsgiExtraPackageFile().toString() - .split(StringPool.COMMA)).filter(UtilMethods::isSet).collect(Collectors.toList())); - externalExportedPackagesSet.addAll(Stream.of(readExtraPackagesFiles(extraPackagesFile).toString() - .split(StringPool.COMMA)).filter(UtilMethods::isSet).collect(Collectors.toList())); + + + return packagesToOrderedString(packages); - if(!externalExportedPackagesSet.containsAll(internalExportedPackagesSet)) { - internalExportedPackagesSet.addAll(externalExportedPackagesSet); - this.writeExtraPackagesFiles(FELIX_EXTRA_PACKAGES_FILE, internalExportedPackagesSet); - } } - private void createNewExtraPackageFile(final File extraPackagesFile) throws IOException { - + private void createNewExtraPackageFile(final File extraPackagesFile) { - try (BufferedWriter writer = new BufferedWriter( - new OutputStreamWriter(Files.newOutputStream(extraPackagesFile.toPath()), UTF_8)); - InputStream initialStream = OSGIUtil.class.getResourceAsStream("/osgi/osgi-extra.conf")) { - final byte[] buffer = new byte[1024]; - int bytesRead = -1; - while ((bytesRead = initialStream.read(buffer)) != -1) { - writer.write(new String(buffer, UTF_8), 0, bytesRead); - } + try (OutputStream out = Files.newOutputStream(extraPackagesFile.toPath()); + InputStream in = OSGIUtil.class.getResourceAsStream("/osgi/osgi-extra.conf")) { - writer.flush(); + org.apache.commons.io.IOUtils.copy(in, out); + }catch(Exception e) { + throw new DotRuntimeException(e); } } - private StringWriter readInternalOsgiExtraPackageFile() throws IOException { - - final StringWriter writer = new StringWriter(); - try (InputStream initialStream = OSGIUtil.class.getResourceAsStream("/osgi/osgi-extra.conf")) { - final byte[] buffer = new byte[1024]; - int bytesRead = -1; - while ((bytesRead = initialStream.read(buffer)) != -1) { - writer.write(new String(buffer, UTF_8), 0, bytesRead); - } - } - return writer; - } - - private StringWriter readExtraPackagesFiles(final File extraPackagesFile) - throws IOException { + private String readExtraPackagesFiles(final File extraPackagesFile) { + final StringWriter writer = new StringWriter(); try (InputStream inputStream = Files.newInputStream(extraPackagesFile.toPath())) { writer.append(IOUtils.toString(inputStream)); + }catch(Exception e) { + throw new DotRuntimeException(e); } - return writer; + return writer.toString(); } - private void writeExtraPackagesFiles(final String extraPackagesFile, final Set packages) - throws IOException { + private String packagesToOrderedString(final Collection packages) { - int count = 0; - try (OutputStream outputStream = Files.newOutputStream(new File(extraPackagesFile).toPath())) { - for (final String myPackage : packages) { + //List treeSet= new ArrayList<>(packages); + TreeSet treeSet= new TreeSet<>(packages); + treeSet.removeIf(item -> item == null || "".equals(item.trim())); + + return String.join(",\n", treeSet); + - if (count < packages.size()-1) { - outputStream.write((myPackage.trim() + ",\n").getBytes(UTF_8)); - } else { - outputStream.write((myPackage.trim()).getBytes(UTF_8)); - } - count++; - } - } + } + + + private void writeExtraPackagesFiles(final Set packages) throws IOException { + + this.writeOsgiExtras(packagesToOrderedString(packages)); } /** @@ -856,32 +833,12 @@ private String getFelixPath(String felixDirProperty, String manualDefaultPath) { manualDefaultPath, manualDefaultPath)); felixPath = "/WEB-INF/felix/" + manualDefaultPath; } + new File(felixPath).mkdirs(); - createFolder(felixPath); return felixPath; } - /** - * Create the path if it does not exist. Required for felix install and undeploy folder - * - * @param path The path to create - * @return boolean - */ - private boolean createFolder(String path) { - boolean created = false; - File directory = new File(path); - if (!directory.exists()) { - Logger.debug(this, - () -> String.format("Felix directory %s does not exist. Trying to create it...", - path)); - created = directory.mkdirs(); - if (!created) { - Logger.error(this, String.format("Unable to create Felix directory: %s", path)); - } - } - return created; - } /** * Fetches the Felix Upload path diff --git a/dotCMS/src/main/resources/dotmarketing-config.properties b/dotCMS/src/main/resources/dotmarketing-config.properties index b1ac31fd8d03..d598078b42aa 100644 --- a/dotCMS/src/main/resources/dotmarketing-config.properties +++ b/dotCMS/src/main/resources/dotmarketing-config.properties @@ -34,11 +34,6 @@ PER_PAGE = 40 ## in minutes LANGUAGES_REFRESH_INTERVAL=5 -## Spell Checker -MASTER_DICTS_DIR=/WEB-INF/dicts/ -DEFAULT_DIC=english -INIT_DICTS_AT_STARTUP=true - ## PATHS CMS_STRUTS_PATH = /dotCMS/ PATH_TO_REDIRECT = /redirectURL @@ -111,41 +106,6 @@ EXEC_CONTENT_REINDEXATION_DELAY=86400 EXEC_CONTENT_REINDEXATION_INIT_DELAY=86400 ENABLE_CONTENT_REINDEXATION_THREAD=false -## DeliverCampaignThread -ENABLE_DELIVER_CAMPAIGN_THREAD=false -EXEC_DELIVER_CAMPAIGN_THREAD_DELAY=300 -DELIVER_CAMPAIGN_THREAD_INIT_DELAY=30 -DELIVER_CAMPAIGN_THREAD_REVIEW_DELAY=30 - -## every 5 minutes -DELIVER_CAMPAIGN_THREAD_CRON_EXPRESSION=0 0/5 * * * ? - -## Pop 3 config for email bounces retrieval -ENABLE_POP_BOUNCES_THREAD=false -EXEC_POP_BOUNCES_INIT_DELAY=0 - -## every minute -POP_BOUNCES_THREAD_CRON_EXPRESSION=0 0/30 * * * ? -POP3_SERVER = pop.xxx - -## 110 default pop3 port - 995 default port for ssl connections -POP3_PORT = 110 -POP3_SSL_ENABLED = false - -## pop accounts to use multiple accounts can be specified -## numerically using a number suffix starting from 1 -POP3_USER_1 = xxx@xxx -POP3_PASSWORD_1 = xxx -#POP3_USER_2 = xxx@xxx -#POP3_PASSWORD_2 = xxx - -## UpdateRatingThread -ENABLE_UPDATE_RATINGS_THREAD=false - -## every 30 minutes -UPDATE_RATINGS_THREAD_CRON_EXPRESSION=0 0/10 2/14 * * ? -UPDATE_RATINGS_THREAD_INIT_DELAY=180 -RATING_MAX_VALUE=5 ## UsersToDeleteThread ENABLE_USERS_TO_DELETE_THREAD=false @@ -175,6 +135,10 @@ CONTENT_CHANGE_NOTIFICATIONS=false ## #WYSIWYG_CSS=//myhost.dotcms.com/global/css/base.css +## Update WYSIWYG image pattern +WYSIWYG_IMAGE_URL_PATTERN=/dA/{shortyId}/{name}?language_id={languageId} + + ## UploadFileMaxSize UPLOAD_FILE_MAX_SIZE=10737418240 @@ -185,13 +149,6 @@ DEFAULT_COUNTRY_CODE = United States of America USERMANAGER_PER_PAGE=50 - -## -## commentEmail -## -commentSubject=There is a new comment for: ${commentQuestion} - - ## Turns clickstream tracking on/off ENABLE_CLICKSTREAM_TRACKING=false @@ -260,12 +217,6 @@ STARTERSITE_BUILD=true ## it would deploy to /html/plugin.name/my_starter.zip #STARTER_DATA_LOAD=/html/plugin.name/my_starter.zip -## SendVCalendar Event Info -PRODID=-//Microsoft Corporation//Outlook 9.0 MIMEDIR//EN -METHOD=PUBLISH -SCALE=GREGORIAN -VERSION=2.0 - ## Fix Assets and incosistencies RUN_FIX_INCONSISTENCIES_ON_STARTUP=false @@ -478,9 +429,14 @@ cache.concurrencylevel=32 cache.adminconfigpool.size=100 cache.companypool.size=10 cache.contentletcache.size=5000 +cache.categoryparentscache.size=30000 +cache.taginodecache.size=50000 +cache.taginodesbyinodecache.size=50000 +cache.tagcache.size=50000 cache.csscache.size=2500 cache.assetmetadatacache.size=10000 cache.identifiercache.size=50000 +cache.identifier404cache.size=30000 cache.indiciescache.size=8 cache.logmappercache.size=10 cache.navcache.size=1000 @@ -495,9 +451,9 @@ cache.versioncache.size=50000 cache.versioninfocache.size=50000 cache.workflowactioncache.size=10000 cache.workflowtaskcache.size=10000 -cache.shorty.size=25000 +cache.shortyidcache.size=25000 cache.identifier404cache.size=5000 -cache.velocitycache.size=1000 +cache.velocitycache.size=5000 cache.vanityurldirectcache.size=25000 cache.vanityurlsitecache.size=5000 @@ -589,16 +545,6 @@ ESCALATION_CHECK_INTERVAL_CRON=0/30 * * * * ? ## END PLUGINS -###################################### -## -## GRAZIANO issue-12-dnd-template -## Design Template -## -###################################### -PREVIEW_ENABLE=true - -path.sql.file.design.template=dnd-template-sql - ###################################### ## ## Alberto - Publisher queue job @@ -621,7 +567,7 @@ PUSH_PUBLISHING_WORKFLOW_ACTION_NEXT_ASSIGN_DEFAULT_USER=dotcms.org.1 # If true, the Rules coming from pushing a Site (Host) or a Content Page will overwrite the existing Rules in the destination # end point (i.e., deleting the existing Rules and adding the ones in the pushed bundle). Otherwise, existing Rules will be # left as they are (or updated if required), and new rules will be added -PUSH_PUBLISHING_RULES_OVERWRITE=true +PUSH_PUBLISHING_RULES_OVERWRITE=false ## BEGIN ## https://github.com/dotCMS/dotCMS/issues/2671 @@ -680,7 +626,7 @@ CONTENT_ALLOW_ZERO_LENGTH_FILES=true ## Default cache for pages -DEFAULT_PAGE_CACHE_SECONDS=15 +DEFAULT_PAGE_CACHE_SECONDS=3600 ## do permission check on menu items for every request ENABLE_NAV_PERMISSION_CHECK=false @@ -701,37 +647,13 @@ CONTENT_ESCAPE_HTML_TEXT=true ## ENABLE_SCRIPTING VARIABLE SHOULD BE SET TO TRUE IN ORDER TO MAKE THIS MACRO TO WORK ALLOW_VELOCITY_SQL_ACCESS_TO_DOTCMS_DB=false -######################################## -## XMLSitemap properties -######################################## -org.dotcms.XMLSitemap.ENABLE=false -org.dotcms.XMLSitemap.JOB_NAME=XML SiteMap Job -org.dotcms.XMLSitemap.JOB_GROUP=XML SiteMap Job -org.dotcms.XMLSitemap.JOB_DESCRIPTION=XML SiteMap Indexation Job -org.dotcms.XMLSitemap.CRON_EXPRESSION=1 1 1 * * ? -org.dotcms.XMLSitemap.USE_PERMALINKS=false -##org.dotcms.XMLSitemap.USE_STRUCTURE_URL_MAP=true is processed if and only if org.dotcms.XMLSitemap.USE_PERMALINKS=false -org.dotcms.XMLSitemap.USE_STRUCTURE_URL_MAP=false -org.dotcms.XMLSitemap.XML_SITEMAPS_FOLDER=/XMLSitemaps/ -org.dotcms.XMLSitemap.SITEMAP_XML_FILENAME=XMLSitemap -org.dotcms.XMLSitemap.SITEMAP_XML_GZ_FILENAME=XMLSitemapGenerated - -##use the below configuration to ignore certain structures from the XML Site Map configuration -org.dotcms.XMLSitemap.IGNORE_Structure_Ids=MergerCampaign -## use the below configuration to remove the occurance of specific words from generated URL, this would be required when we have custom url redirections. -##MarketingCampaign in this case is the structure Name -org.dotcms.XMLSitemap.MarketingCampaign.IGNORE_UrlText=/campaign + ##Disable External Referer DISABLE_EXTERNAL_REFERERS=false CMS_INDEX_PAGE = index -## MySQL System Variables -## Newer versions of MySQL will only recognize "default_storage_engine" instead -## of the old "storage_engine" variable, which was deprecated as of version 5.5.3 -## and became invalid as of version 5.7.5 -mysql_storage_engine_varname=default_storage_engine ## GeoIP2 DB Path Override (absolute path) (defaults to : ## $TOMCAT_HOME/webapps/ROOT/WEB-INF/geoip2/GeoLite2-City.mmdb) @@ -743,9 +665,6 @@ SLOW_RULE_LOG_MIN=100 ## Actionlets api.system.ruleengine.actionlet.VisitorTagsActionlet.MAX_TAGS=20 -## Translation actionlet service key -#GOOGLE_TRANSLATE_SERVICE_API_KEY=put-your-key-here - ## Max Number of element to display in the rest pagination DEFAULT_REST_PAGE_COUNT=20 @@ -757,7 +676,7 @@ STATIC_PUSH_RETRY_ATTEMPTS=3 # Allow HTTP Authentication # THIS IS A SECURITY RISK FOR DEVELOPMENT ONLY, CHANGE THIS IN PRODUCTION ENVIRONMENTS -json.web.token.allowhttp=true +json.web.token.allowhttp=false # Max "Remember Me" Token Age in Days json.web.token.days.max.age=14 diff --git a/dotCMS/src/main/webapp/WEB-INF/messages/Language.properties b/dotCMS/src/main/webapp/WEB-INF/messages/Language.properties index 93f909d918a7..1b6162a8588b 100644 --- a/dotCMS/src/main/webapp/WEB-INF/messages/Language.properties +++ b/dotCMS/src/main/webapp/WEB-INF/messages/Language.properties @@ -2876,6 +2876,9 @@ OSGI-Load-Bundle = Load Plugin OSGI-MANAGER = Manager OSGI-modify-packages-confirmation = This operation will restart the OSGI framework and all dynamic plugins; Are you sure you want to continue? OSGI-modify-packages = Save Packages +OSGI-Reset-Packages = Reset Packages +OSGI-process-bundle-confirmation = This will read the bundle imports and exports, add them to the exported packages and restart OSGi. if needed. Are you sure you want to continue? +Process-Exports=Process Bundle Exports OSGI-Name = Name OSGI-restart-confirmation = This will restart the OSGI framework and all dynamic plugins. Are you sure you want to continue? OSGI-restart-framework = Restart Framework @@ -4675,7 +4678,7 @@ Workflow-Bulk-Actions-Finished = Finished execution of bulk actions Workflow-cannot-archive-system-workflow = The System Workflow can not be archived Workflow-Comment-on-workflow-howto = Prompts the user to add a comment on the Workflow task. Workflow-Comment-on-workflow = Comment on Workflow -Workflow-Content-Needs-Be-Saved = Unable to perform the Workflow Action. The content must be be saved for this Action to be executed. +Workflow-Content-Needs-Be-Saved = Unable to perform the Workflow Action. The content must be saved for this Action to be executed. Workflow-could-not-save-action = Unable to save the Workflow Action Workflow-delete-non-archived = Unable to delete the Workflow Scheme. You must archive a Workflow Scheme before it can be deleted. Workflow-delete-null-workflow = Internal error: The Workflow Scheme is invalid (null). diff --git a/dotCMS/src/main/webapp/html/dotcms-block-editor.js b/dotCMS/src/main/webapp/html/dotcms-block-editor.js index b3accfbfa39e..460ca72c3d5e 100644 --- a/dotCMS/src/main/webapp/html/dotcms-block-editor.js +++ b/dotCMS/src/main/webapp/html/dotcms-block-editor.js @@ -1 +1 @@ -var runtime=function(s){"use strict";var v,C=Object.prototype,p=C.hasOwnProperty,G="function"==typeof Symbol?Symbol:{},w=G.iterator||"@@iterator",$=G.asyncIterator||"@@asyncIterator",_=G.toStringTag||"@@toStringTag";function h(r,t,e){return Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}),r[t]}try{h({},"")}catch(r){h=function(t,e,o){return t[e]=o}}function M(r,t,e,o){var i=Object.create((t&&t.prototype instanceof k?t:k).prototype),a=new I(o||[]);return i._invoke=function B(r,t,e){var o=R;return function(i,a){if(o===Y)throw new Error("Generator is already running");if(o===L){if("throw"===i)throw a;return W()}for(e.method=i,e.arg=a;;){var u=e.delegate;if(u){var c=D(u,e);if(c){if(c===l)continue;return c}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if(o===R)throw o=L,e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);o=Y;var f=O(r,t,e);if("normal"===f.type){if(o=e.done?L:z,f.arg===l)continue;return{value:f.arg,done:e.done}}"throw"===f.type&&(o=L,e.method="throw",e.arg=f.arg)}}}(r,e,a),i}function O(r,t,e){try{return{type:"normal",arg:r.call(t,e)}}catch(o){return{type:"throw",arg:o}}}s.wrap=M;var R="suspendedStart",z="suspendedYield",Y="executing",L="completed",l={};function k(){}function b(){}function d(){}var T={};h(T,w,function(){return this});var N=Object.getPrototypeOf,S=N&&N(N(P([])));S&&S!==C&&p.call(S,w)&&(T=S);var g=d.prototype=k.prototype=Object.create(T);function q(r){["next","throw","return"].forEach(function(t){h(r,t,function(e){return this._invoke(t,e)})})}function E(r,t){function e(i,a,u,c){var f=O(r[i],r,a);if("throw"!==f.type){var A=f.arg,m=A.value;return m&&"object"==typeof m&&p.call(m,"__await")?t.resolve(m.__await).then(function(y){e("next",y,u,c)},function(y){e("throw",y,u,c)}):t.resolve(m).then(function(y){A.value=y,u(A)},function(y){return e("throw",y,u,c)})}c(f.arg)}var o;this._invoke=function n(i,a){function u(){return new t(function(c,f){e(i,a,c,f)})}return o=o?o.then(u,u):u()}}function D(r,t){var e=r.iterator[t.method];if(e===v){if(t.delegate=null,"throw"===t.method){if(r.iterator.return&&(t.method="return",t.arg=v,D(r,t),"throw"===t.method))return l;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var o=O(e,r.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,l;var n=o.arg;return n?n.done?(t[r.resultName]=n.value,t.next=r.nextLoc,"return"!==t.method&&(t.method="next",t.arg=v),t.delegate=null,l):n:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,l)}function H(r){var t={tryLoc:r[0]};1 in r&&(t.catchLoc=r[1]),2 in r&&(t.finallyLoc=r[2],t.afterLoc=r[3]),this.tryEntries.push(t)}function j(r){var t=r.completion||{};t.type="normal",delete t.arg,r.completion=t}function I(r){this.tryEntries=[{tryLoc:"root"}],r.forEach(H,this),this.reset(!0)}function P(r){if(r){var t=r[w];if(t)return t.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var e=-1,o=function n(){for(;++e=0;--o){var n=this.tryEntries[o],i=n.completion;if("root"===n.tryLoc)return e("end");if(n.tryLoc<=this.prev){var a=p.call(n,"catchLoc"),u=p.call(n,"finallyLoc");if(a&&u){if(this.prev=0;--e){var o=this.tryEntries[e];if(o.tryLoc<=this.prev&&p.call(o,"finallyLoc")&&this.prev=0;--t){var e=this.tryEntries[t];if(e.finallyLoc===r)return this.complete(e.completion,e.afterLoc),j(e),l}},catch:function(r){for(var t=this.tryEntries.length-1;t>=0;--t){var e=this.tryEntries[t];if(e.tryLoc===r){var o=e.completion;if("throw"===o.type){var n=o.arg;j(e)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(r,t,e){return this.delegate={iterator:P(r),resultName:t,nextLoc:e},"next"===this.method&&(this.arg=v),l}},s}("object"==typeof module?module.exports:{});try{regeneratorRuntime=runtime}catch(s){"object"==typeof globalThis?globalThis.regeneratorRuntime=runtime:Function("r","regeneratorRuntime = r")(runtime)}(()=>{"use strict";var e,v={},d={};function n(e){var a=d[e];if(void 0!==a)return a.exports;var r=d[e]={exports:{}};return v[e](r,r.exports,n),r.exports}n.m=v,e=[],n.O=(a,r,l,o)=>{if(!r){var u=1/0;for(t=0;t=o)&&Object.keys(n.O).every(h=>n.O[h](r[f]))?r.splice(f--,1):(s=!1,o0&&e[t-1][2]>o;t--)e[t]=e[t-1];e[t]=[r,l,o]},n.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return n.d(a,{a}),a},n.d=(e,a)=>{for(var r in a)n.o(a,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:a[r]})},n.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),(()=>{var e={666:0};n.O.j=l=>0===e[l];var a=(l,o)=>{var f,c,[t,u,s]=o,_=0;if(t.some(i=>0!==e[i])){for(f in u)n.o(u,f)&&(n.m[f]=u[f]);if(s)var b=s(n)}for(l&&l(o);_{"use strict";ge(583),ge(757)},757:()=>{!function(X,oe){"use strict";function ge(){var e=Ue.splice(0,Ue.length);for(F=0;e.length;)e.shift().call(null,e.shift())}function ye(e,r){for(var i=0,h=e.length;i1)&&tt(this)}}}),x(o,pe,{value:function(p){-1>0,de="__"+se+dt,be="addEventListener",Le="attached",ce="Callback",me="detached",te="extends",pe="attributeChanged"+ce,vt=Le+ce,rt="connected"+ce,mt="disconnected"+ce,ze="created"+ce,kt=me+ce,ot="ADDITION",pt="REMOVAL",Oe="DOMAttrModified",bt="DOMContentLoaded",Et="DOMSubtreeModified",qe="<",st="=",Mt=/^[A-Z][._A-Z0-9]*-[-._A-Z0-9]*$/,wt=["ANNOTATION-XML","COLOR-PROFILE","FONT-FACE","FONT-FACE-SRC","FONT-FACE-URI","FONT-FACE-FORMAT","FONT-FACE-NAME","MISSING-GLYPH"],He=[],We=[],le="",De=A.documentElement,Ee=He.indexOf||function(e){for(var r=this.length;r--&&this[r]!==e;);return r},it=ne.prototype,Pe=it.hasOwnProperty,at=it.isPrototypeOf,Re=ne.defineProperty,Ne=[],Xe=ne.getOwnPropertyDescriptor,Y=ne.getOwnPropertyNames,Ct=ne.getPrototypeOf,Ye=ne.setPrototypeOf,Se=!!ne.__proto__,$e="__dreCEv1",Me=X.customElements,t=!/^force/.test(oe.type)&&!!(Me&&Me.define&&Me.get&&Me.whenDefined),a=ne.create||ne,u=X.Map||function(){var e,r=[],i=[];return{get:function(h){return i[Ee.call(r,h)]},set:function(h,s){(e=Ee.call(r,h))<0?i[r.push(h)-1]=s:i[e]=s}}},c=X.Promise||function(e){function r(o){for(h=!0;i.length;)i.shift()(o)}var i=[],h=!1,s={catch:function(){return s},then:function(o){return i.push(o),h&&setTimeout(r,1),s}};return e(r),s},f=!1,m=a(null),E=a(null),v=new u,C=function(e){return e.toLowerCase()},w=ne.create||function e(r){return r?(e.prototype=r,new e):this},b=Ye||(Se?function(e,r){return e.__proto__=r,e}:Y&&Xe?function(){function e(r,i){for(var h,s=Y(i),o=0,l=s.length;o
",new H(function(e,r){if(e[0]&&"childList"==e[0].type&&!e[0].removedNodes[0].childNodes.length){var i=(Ce=Xe(P,"innerHTML"))&&Ce.set;i&&Re(P,"innerHTML",{set:function(h){for(;this.lastChild;)this.removeChild(this.lastChild);i.call(this,h)}})}r.disconnect(),Ce=null}).observe(Ce,{childList:!0,subtree:!0}),Ce.innerHTML=""),ue||(Ye||Se?(we=function(e,r){at.call(r,e)||Fe(e,r)},ae=Fe):(we=function(e,r){e[de]||(e[de]=ne(!0),Fe(e,r))},ae=we),G?(I=!1,e=Xe(P,be),r=e.value,i=function(o){var l=new CustomEvent(Oe,{bubbles:!0});l.attrName=o,l.prevValue=R.call(this,o),l.newValue=null,l[pt]=l.attrChange=2,V.call(this,o),$.call(this,l)},h=function(o,l){var d=Q.call(this,o),p=d&&R.call(this,o),y=new CustomEvent(Oe,{bubbles:!0});K.call(this,o,l),y.attrName=o,y.prevValue=d?p:null,y.newValue=l,d?y.MODIFICATION=y.attrChange=1:y[ot]=y.attrChange=0,$.call(this,y)},s=function(o){var l,d=o.currentTarget,p=d[de],y=o.propertyName;p.hasOwnProperty(y)&&(p=p[y],(l=new CustomEvent(Oe,{bubbles:!0})).attrName=p.name,l.prevValue=p.value||null,l.newValue=p.value=d[y]||null,null==l.prevValue?l[ot]=l.attrChange=0:l.MODIFICATION=l.attrChange=1,$.call(d,l))},e.value=function(o,l,d){o===Oe&&this[pe]&&this.setAttribute!==h&&(this[de]={className:{name:"class",value:this.className}},this.setAttribute=h,this.removeAttribute=i,r.call(this,"propertychange",s)),r.call(this,o,l,d)},Re(P,be,e)):H||(De[be](Oe,Te),De.setAttribute(de,1),De.removeAttribute(de),I&&(je=function(e){var r,i,h,s=this;if(s===e.target){for(h in r=s[de],s[de]=i=nt(s),i){if(!(h in r))return Be(0,s,h,r[h],i[h],ot);if(i[h]!==r[h])return Be(1,s,h,r[h],i[h],"MODIFICATION")}for(h in r)if(!(h in i))return Be(2,s,h,r[h],i[h],pt)}},Be=function(e,r,i,h,s,o){var l={attrChange:e,currentTarget:r,attrName:i,prevValue:h,newValue:s};l[o]=e,Qe(l)},nt=function(e){for(var r,i,h={},s=e.attributes,o=0,l=s.length;o$");if(r[te]="a",(e.prototype=w(S.prototype)).constructor=e,X.customElements.define(i,e,r),!h.test(A.createElement("a",{is:i}).outerHTML)||!h.test((new e).outerHTML))throw r}(function e(){return Reflect.construct(S,[],e)},{},"document-register-element-a"+dt)}catch(e){ft()}if(!oe.noBuiltIn)try{if(N.call(A,"a","a").outerHTML.indexOf("is")<0)throw{}}catch(e){C=function(r){return{is:r.toLowerCase()}}}}(window)},583:()=>{"use strict";!function(t){const a=t.performance;function u(I){a&&a.mark&&a.mark(I)}function c(I,k){a&&a.measure&&a.measure(I,k)}u("Zone");const f=t.__Zone_symbol_prefix||"__zone_symbol__";function m(I){return f+I}const E=!0===t[m("forceDuplicateZoneCheck")];if(t.Zone){if(E||"function"!=typeof t.Zone.__symbol__)throw new Error("Zone already loaded.");return t.Zone}let v=(()=>{class I{constructor(n,e){this._parent=n,this._name=e?e.name||"unnamed":"",this._properties=e&&e.properties||{},this._zoneDelegate=new w(this,this._parent&&this._parent._zoneDelegate,e)}static assertZonePatched(){if(t.Promise!==re.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")}static get root(){let n=I.current;for(;n.parent;)n=n.parent;return n}static get current(){return F.zone}static get currentTask(){return ue}static __load_patch(n,e,r=!1){if(re.hasOwnProperty(n)){if(!r&&E)throw Error("Already loaded patch: "+n)}else if(!t["__Zone_disable_"+n]){const i="Zone:"+n;u(i),re[n]=e(t,I,Te),c(i,i)}}get parent(){return this._parent}get name(){return this._name}get(n){const e=this.getZoneWith(n);if(e)return e._properties[n]}getZoneWith(n){let e=this;for(;e;){if(e._properties.hasOwnProperty(n))return e;e=e._parent}return null}fork(n){if(!n)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,n)}wrap(n,e){if("function"!=typeof n)throw new Error("Expecting function got: "+n);const r=this._zoneDelegate.intercept(this,n,e),i=this;return function(){return i.runGuarded(r,this,arguments,e)}}run(n,e,r,i){F={parent:F,zone:this};try{return this._zoneDelegate.invoke(this,n,e,r,i)}finally{F=F.parent}}runGuarded(n,e=null,r,i){F={parent:F,zone:this};try{try{return this._zoneDelegate.invoke(this,n,e,r,i)}catch(h){if(this._zoneDelegate.handleError(this,h))throw h}}finally{F=F.parent}}runTask(n,e,r){if(n.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(n.zone||z).name+"; Execution: "+this.name+")");if(n.state===B&&(n.type===O||n.type===j))return;const i=n.state!=Q;i&&n._transitionTo(Q,R),n.runCount++;const h=ue;ue=n,F={parent:F,zone:this};try{n.type==j&&n.data&&!n.data.isPeriodic&&(n.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,n,e,r)}catch(s){if(this._zoneDelegate.handleError(this,s))throw s}}finally{n.state!==B&&n.state!==K&&(n.type==O||n.data&&n.data.isPeriodic?i&&n._transitionTo(R,Q):(n.runCount=0,this._updateTaskCount(n,-1),i&&n._transitionTo(B,Q,B))),F=F.parent,ue=h}}scheduleTask(n){if(n.zone&&n.zone!==this){let r=this;for(;r;){if(r===n.zone)throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${n.zone.name}`);r=r.parent}}n._transitionTo($,B);const e=[];n._zoneDelegates=e,n._zone=this;try{n=this._zoneDelegate.scheduleTask(this,n)}catch(r){throw n._transitionTo(K,$,B),this._zoneDelegate.handleError(this,r),r}return n._zoneDelegates===e&&this._updateTaskCount(n,1),n.state==$&&n._transitionTo(R,$),n}scheduleMicroTask(n,e,r,i){return this.scheduleTask(new b(N,n,e,r,i,void 0))}scheduleMacroTask(n,e,r,i,h){return this.scheduleTask(new b(j,n,e,r,i,h))}scheduleEventTask(n,e,r,i,h){return this.scheduleTask(new b(O,n,e,r,i,h))}cancelTask(n){if(n.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(n.zone||z).name+"; Execution: "+this.name+")");n._transitionTo(V,R,Q);try{this._zoneDelegate.cancelTask(this,n)}catch(e){throw n._transitionTo(K,V),this._zoneDelegate.handleError(this,e),e}return this._updateTaskCount(n,-1),n._transitionTo(B,V),n.runCount=0,n}_updateTaskCount(n,e){const r=n._zoneDelegates;-1==e&&(n._zoneDelegates=null);for(let i=0;iI.hasTask(n,e),onScheduleTask:(I,k,n,e)=>I.scheduleTask(n,e),onInvokeTask:(I,k,n,e,r,i)=>I.invokeTask(n,e,r,i),onCancelTask:(I,k,n,e)=>I.cancelTask(n,e)};class w{constructor(k,n,e){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this.zone=k,this._parentDelegate=n,this._forkZS=e&&(e&&e.onFork?e:n._forkZS),this._forkDlgt=e&&(e.onFork?n:n._forkDlgt),this._forkCurrZone=e&&(e.onFork?this.zone:n._forkCurrZone),this._interceptZS=e&&(e.onIntercept?e:n._interceptZS),this._interceptDlgt=e&&(e.onIntercept?n:n._interceptDlgt),this._interceptCurrZone=e&&(e.onIntercept?this.zone:n._interceptCurrZone),this._invokeZS=e&&(e.onInvoke?e:n._invokeZS),this._invokeDlgt=e&&(e.onInvoke?n:n._invokeDlgt),this._invokeCurrZone=e&&(e.onInvoke?this.zone:n._invokeCurrZone),this._handleErrorZS=e&&(e.onHandleError?e:n._handleErrorZS),this._handleErrorDlgt=e&&(e.onHandleError?n:n._handleErrorDlgt),this._handleErrorCurrZone=e&&(e.onHandleError?this.zone:n._handleErrorCurrZone),this._scheduleTaskZS=e&&(e.onScheduleTask?e:n._scheduleTaskZS),this._scheduleTaskDlgt=e&&(e.onScheduleTask?n:n._scheduleTaskDlgt),this._scheduleTaskCurrZone=e&&(e.onScheduleTask?this.zone:n._scheduleTaskCurrZone),this._invokeTaskZS=e&&(e.onInvokeTask?e:n._invokeTaskZS),this._invokeTaskDlgt=e&&(e.onInvokeTask?n:n._invokeTaskDlgt),this._invokeTaskCurrZone=e&&(e.onInvokeTask?this.zone:n._invokeTaskCurrZone),this._cancelTaskZS=e&&(e.onCancelTask?e:n._cancelTaskZS),this._cancelTaskDlgt=e&&(e.onCancelTask?n:n._cancelTaskDlgt),this._cancelTaskCurrZone=e&&(e.onCancelTask?this.zone:n._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;const r=e&&e.onHasTask;(r||n&&n._hasTaskZS)&&(this._hasTaskZS=r?e:C,this._hasTaskDlgt=n,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=k,e.onScheduleTask||(this._scheduleTaskZS=C,this._scheduleTaskDlgt=n,this._scheduleTaskCurrZone=this.zone),e.onInvokeTask||(this._invokeTaskZS=C,this._invokeTaskDlgt=n,this._invokeTaskCurrZone=this.zone),e.onCancelTask||(this._cancelTaskZS=C,this._cancelTaskDlgt=n,this._cancelTaskCurrZone=this.zone))}fork(k,n){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,k,n):new v(k,n)}intercept(k,n,e){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,k,n,e):n}invoke(k,n,e,r,i){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,k,n,e,r,i):n.apply(e,r)}handleError(k,n){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,k,n)}scheduleTask(k,n){let e=n;if(this._scheduleTaskZS)this._hasTaskZS&&e._zoneDelegates.push(this._hasTaskDlgtOwner),e=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,k,n),e||(e=n);else if(n.scheduleFn)n.scheduleFn(n);else{if(n.type!=N)throw new Error("Task is missing scheduleFn.");T(n)}return e}invokeTask(k,n,e,r){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,k,n,e,r):n.callback.apply(e,r)}cancelTask(k,n){let e;if(this._cancelTaskZS)e=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,k,n);else{if(!n.cancelFn)throw Error("Task is not cancelable");e=n.cancelFn(n)}return e}hasTask(k,n){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,k,n)}catch(e){this.handleError(k,e)}}_updateTaskCount(k,n){const e=this._taskCounts,r=e[k],i=e[k]=r+n;if(i<0)throw new Error("More tasks executed then were scheduled.");0!=r&&0!=i||this.hasTask(this.zone,{microTask:e.microTask>0,macroTask:e.macroTask>0,eventTask:e.eventTask>0,change:k})}}class b{constructor(k,n,e,r,i,h){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=k,this.source=n,this.data=r,this.scheduleFn=i,this.cancelFn=h,!e)throw new Error("callback is not defined");this.callback=e;const s=this;this.invoke=k===O&&r&&r.useG?b.invokeTask:function(){return b.invokeTask.call(t,s,this,arguments)}}static invokeTask(k,n,e){k||(k=this),fe++;try{return k.runCount++,k.zone.runTask(k,n,e)}finally{1==fe&&Z(),fe--}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(B,$)}_transitionTo(k,n,e){if(this._state!==n&&this._state!==e)throw new Error(`${this.type} '${this.source}': can not transition to '${k}', expecting state '${n}'${e?" or '"+e+"'":""}, was '${this._state}'.`);this._state=k,k==B&&(this._zoneDelegates=null)}toString(){return this.data&&void 0!==this.data.handleId?this.data.handleId.toString():Object.prototype.toString.call(this)}toJSON(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}}}const H=m("setTimeout"),S=m("Promise"),P=m("then");let L,G=[],x=!1;function T(I){if(0===fe&&0===G.length)if(L||t[S]&&(L=t[S].resolve(0)),L){let k=L[P];k||(k=L.then),k.call(L,Z)}else t[H](Z,0);I&&G.push(I)}function Z(){if(!x){for(x=!0;G.length;){const I=G;G=[];for(let k=0;kF,onUnhandledError:W,microtaskDrainDone:W,scheduleMicroTask:T,showUncaughtError:()=>!v[m("ignoreConsoleErrorUncaughtError")],patchEventTarget:()=>[],patchOnProperties:W,patchMethod:()=>W,bindArguments:()=>[],patchThen:()=>W,patchMacroTask:()=>W,patchEventPrototype:()=>W,isIEOrEdge:()=>!1,getGlobalObjects:()=>{},ObjectDefineProperty:()=>W,ObjectGetOwnPropertyDescriptor:()=>{},ObjectCreate:()=>{},ArraySlice:()=>[],patchClass:()=>W,wrapWithCurrentZone:()=>W,filterProperties:()=>[],attachOriginToPatched:()=>W,_redefineProperty:()=>W,patchCallbacks:()=>W};let F={parent:null,zone:new v(null,null)},ue=null,fe=0;function W(){}c("Zone","Zone"),t.Zone=v}("undefined"!=typeof window&&window||"undefined"!=typeof self&&self||global);const oe=Object.getOwnPropertyDescriptor,ge=Object.defineProperty,ye=Object.getPrototypeOf,_t=Object.create,Ve=Array.prototype.slice,Ie="addEventListener",Je="removeEventListener",Qe=Zone.__symbol__(Ie),et=Zone.__symbol__(Je),he="true",ve="false",Ze=Zone.__symbol__("");function Fe(t,a){return Zone.current.wrap(t,a)}function lt(t,a,u,c,f){return Zone.current.scheduleMacroTask(t,a,u,c,f)}const U=Zone.__symbol__,Ae="undefined"!=typeof window,ke=Ae?window:void 0,J=Ae&&ke||"object"==typeof self&&self||global,yt=[null];function tt(t,a){for(let u=t.length-1;u>=0;u--)"function"==typeof t[u]&&(t[u]=Fe(t[u],a+"_"+u));return t}function ft(t){return!t||!1!==t.writable&&!("function"==typeof t.get&&void 0===t.set)}const A="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,ne=!("nw"in J)&&void 0!==J.process&&"[object process]"==={}.toString.call(J.process),ht=!ne&&!A&&!(!Ae||!ke.HTMLElement),Ue=void 0!==J.process&&"[object process]"==={}.toString.call(J.process)&&!A&&!(!Ae||!ke.HTMLElement),je={},Be=function(t){if(!(t=t||J.event))return;let a=je[t.type];a||(a=je[t.type]=U("ON_PROPERTY"+t.type));const u=this||t.target||J,c=u[a];let f;if(ht&&u===ke&&"error"===t.type){const m=t;f=c&&c.call(this,m.message,m.filename,m.lineno,m.colno,m.error),!0===f&&t.preventDefault()}else f=c&&c.apply(this,arguments),null!=f&&!f&&t.preventDefault();return f};function nt(t,a,u){let c=oe(t,a);if(!c&&u&&oe(u,a)&&(c={enumerable:!0,configurable:!0}),!c||!c.configurable)return;const f=U("on"+a+"patched");if(t.hasOwnProperty(f)&&t[f])return;delete c.writable,delete c.value;const m=c.get,E=c.set,v=a.substr(2);let C=je[v];C||(C=je[v]=U("ON_PROPERTY"+v)),c.set=function(w){let b=this;!b&&t===J&&(b=J),b&&(b[C]&&b.removeEventListener(v,Be),E&&E.apply(b,yt),"function"==typeof w?(b[C]=w,b.addEventListener(v,Be,!1)):b[C]=null)},c.get=function(){let w=this;if(!w&&t===J&&(w=J),!w)return null;const b=w[C];if(b)return b;if(m){let H=m&&m.call(this);if(H)return c.set.call(this,H),"function"==typeof w.removeAttribute&&w.removeAttribute(a),H}return null},ge(t,a,c),t[f]=!0}function Ge(t,a,u){if(a)for(let c=0;cfunction(E,v){const C=u(E,v);return C.cbIdx>=0&&"function"==typeof v[C.cbIdx]?lt(C.name,v[C.cbIdx],C,f):m.apply(E,v)})}function se(t,a){t[U("OriginalDelegate")]=a}let dt=!1,de=!1;function Le(){if(dt)return de;dt=!0;try{const t=ke.navigator.userAgent;(-1!==t.indexOf("MSIE ")||-1!==t.indexOf("Trident/")||-1!==t.indexOf("Edge/"))&&(de=!0)}catch(t){}return de}Zone.__load_patch("ZoneAwarePromise",(t,a,u)=>{const c=Object.getOwnPropertyDescriptor,f=Object.defineProperty,E=u.symbol,v=[],C=!0===t[E("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")],w=E("Promise"),b=E("then");u.onUnhandledError=s=>{if(u.showUncaughtError()){const o=s&&s.rejection;o?console.error("Unhandled Promise rejection:",o instanceof Error?o.message:o,"; Zone:",s.zone.name,"; Task:",s.task&&s.task.source,"; Value:",o,o instanceof Error?o.stack:void 0):console.error(s)}},u.microtaskDrainDone=()=>{for(;v.length;){const s=v.shift();try{s.zone.runGuarded(()=>{throw s.throwOriginal?s.rejection:s})}catch(o){P(o)}}};const S=E("unhandledPromiseRejectionHandler");function P(s){u.onUnhandledError(s);try{const o=a[S];"function"==typeof o&&o.call(this,s)}catch(o){}}function G(s){return s&&s.then}function x(s){return s}function L(s){return n.reject(s)}const T=E("state"),Z=E("value"),z=E("finally"),B=E("parentPromiseValue"),$=E("parentPromiseState"),Q=null,V=!0,K=!1;function j(s,o){return l=>{try{F(s,o,l)}catch(d){F(s,!1,d)}}}const Te=E("currentTaskTrace");function F(s,o,l){const d=function(){let s=!1;return function(l){return function(){s||(s=!0,l.apply(null,arguments))}}}();if(s===l)throw new TypeError("Promise resolved with itself");if(s[T]===Q){let p=null;try{("object"==typeof l||"function"==typeof l)&&(p=l&&l.then)}catch(y){return d(()=>{F(s,!1,y)})(),s}if(o!==K&&l instanceof n&&l.hasOwnProperty(T)&&l.hasOwnProperty(Z)&&l[T]!==Q)fe(l),F(s,l[T],l[Z]);else if(o!==K&&"function"==typeof p)try{p.call(l,d(j(s,o)),d(j(s,!1)))}catch(y){d(()=>{F(s,!1,y)})()}else{s[T]=o;const y=s[Z];if(s[Z]=l,s[z]===z&&o===V&&(s[T]=s[$],s[Z]=s[B]),o===K&&l instanceof Error){const _=a.currentTask&&a.currentTask.data&&a.currentTask.data.__creationTrace__;_&&f(l,Te,{configurable:!0,enumerable:!1,writable:!0,value:_})}for(let _=0;_{try{const g=s[Z],M=!!l&&z===l[z];M&&(l[B]=g,l[$]=y);const D=o.run(_,void 0,M&&_!==L&&_!==x?[]:[g]);F(l,!0,D)}catch(g){F(l,!1,g)}},l)}const k=function(){};class n{static toString(){return"function ZoneAwarePromise() { [native code] }"}static resolve(o){return F(new this(null),V,o)}static reject(o){return F(new this(null),K,o)}static race(o){let l,d,p=new this((g,M)=>{l=g,d=M});function y(g){l(g)}function _(g){d(g)}for(let g of o)G(g)||(g=this.resolve(g)),g.then(y,_);return p}static all(o){return n.allWithCallback(o)}static allSettled(o){return(this&&this.prototype instanceof n?this:n).allWithCallback(o,{thenCallback:d=>({status:"fulfilled",value:d}),errorCallback:d=>({status:"rejected",reason:d})})}static allWithCallback(o,l){let d,p,y=new this((D,q)=>{d=D,p=q}),_=2,g=0;const M=[];for(let D of o){G(D)||(D=this.resolve(D));const q=g;try{D.then(ee=>{M[q]=l?l.thenCallback(ee):ee,_--,0===_&&d(M)},ee=>{l?(M[q]=l.errorCallback(ee),_--,0===_&&d(M)):p(ee)})}catch(ee){p(ee)}_++,g++}return _-=2,0===_&&d(M),y}constructor(o){const l=this;if(!(l instanceof n))throw new Error("Must be an instanceof Promise.");l[T]=Q,l[Z]=[];try{o&&o(j(l,V),j(l,K))}catch(d){F(l,!1,d)}}get[Symbol.toStringTag](){return"Promise"}get[Symbol.species](){return n}then(o,l){let d=this.constructor[Symbol.species];(!d||"function"!=typeof d)&&(d=this.constructor||n);const p=new d(k),y=a.current;return this[T]==Q?this[Z].push(y,p,o,l):W(this,y,p,o,l),p}catch(o){return this.then(null,o)}finally(o){let l=this.constructor[Symbol.species];(!l||"function"!=typeof l)&&(l=n);const d=new l(k);d[z]=z;const p=a.current;return this[T]==Q?this[Z].push(p,d,o,o):W(this,p,d,o,o),d}}n.resolve=n.resolve,n.reject=n.reject,n.race=n.race,n.all=n.all;const e=t[w]=t.Promise;t.Promise=n;const r=E("thenPatched");function i(s){const o=s.prototype,l=c(o,"then");if(l&&(!1===l.writable||!l.configurable))return;const d=o.then;o[b]=d,s.prototype.then=function(p,y){return new n((g,M)=>{d.call(this,g,M)}).then(p,y)},s[r]=!0}return u.patchThen=i,e&&(i(e),ae(t,"fetch",s=>function h(s){return function(o,l){let d=s.apply(o,l);if(d instanceof n)return d;let p=d.constructor;return p[r]||i(p),d}}(s))),Promise[a.__symbol__("uncaughtPromiseErrors")]=v,n}),Zone.__load_patch("toString",t=>{const a=Function.prototype.toString,u=U("OriginalDelegate"),c=U("Promise"),f=U("Error"),m=function(){if("function"==typeof this){const w=this[u];if(w)return"function"==typeof w?a.call(w):Object.prototype.toString.call(w);if(this===Promise){const b=t[c];if(b)return a.call(b)}if(this===Error){const b=t[f];if(b)return a.call(b)}}return a.call(this)};m[u]=a,Function.prototype.toString=m;const E=Object.prototype.toString;Object.prototype.toString=function(){return"function"==typeof Promise&&this instanceof Promise?"[object Promise]":E.call(this)}});let ce=!1;if("undefined"!=typeof window)try{const t=Object.defineProperty({},"passive",{get:function(){ce=!0}});window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch(t){ce=!1}const me={useG:!0},te={},pe={},vt=new RegExp("^"+Ze+"(\\w+)(true|false)$"),rt=U("propagationStopped");function mt(t,a){const u=(a?a(t):t)+ve,c=(a?a(t):t)+he,f=Ze+u,m=Ze+c;te[t]={},te[t][ve]=f,te[t][he]=m}function ze(t,a,u){const c=u&&u.add||Ie,f=u&&u.rm||Je,m=u&&u.listeners||"eventListeners",E=u&&u.rmAll||"removeAllListeners",v=U(c),C="."+c+":",H=function(L,T,Z){if(L.isRemoved)return;const z=L.callback;"object"==typeof z&&z.handleEvent&&(L.callback=$=>z.handleEvent($),L.originalDelegate=z),L.invoke(L,T,[Z]);const B=L.options;B&&"object"==typeof B&&B.once&&T[f].call(T,Z.type,L.originalDelegate?L.originalDelegate:L.callback,B)},S=function(L){if(!(L=L||t.event))return;const T=this||L.target||t,Z=T[te[L.type][ve]];if(Z)if(1===Z.length)H(Z[0],T,L);else{const z=Z.slice();for(let B=0;Bfunction(f,m){f[rt]=!0,c&&c.apply(f,m)})}function pt(t,a,u,c,f){const m=Zone.__symbol__(c);if(a[m])return;const E=a[m]=a[c];a[c]=function(v,C,w){return C&&C.prototype&&f.forEach(function(b){const H=`${u}.${c}::`+b,S=C.prototype;if(S.hasOwnProperty(b)){const P=t.ObjectGetOwnPropertyDescriptor(S,b);P&&P.value?(P.value=t.wrapWithCurrentZone(P.value,H),t._redefineProperty(C.prototype,b,P)):S[b]&&(S[b]=t.wrapWithCurrentZone(S[b],H))}else S[b]&&(S[b]=t.wrapWithCurrentZone(S[b],H))}),E.call(a,v,C,w)},t.attachOriginToPatched(a[c],E)}const Et=["absolutedeviceorientation","afterinput","afterprint","appinstalled","beforeinstallprompt","beforeprint","beforeunload","devicelight","devicemotion","deviceorientation","deviceorientationabsolute","deviceproximity","hashchange","languagechange","message","mozbeforepaint","offline","online","paint","pageshow","pagehide","popstate","rejectionhandled","storage","unhandledrejection","unload","userproximity","vrdisplayconnected","vrdisplaydisconnected","vrdisplaypresentchange"],st=["encrypted","waitingforkey","msneedkey","mozinterruptbegin","mozinterruptend"],le=["load"],De=["blur","error","focus","load","resize","scroll","messageerror"],Ee=["bounce","finish","start"],it=["loadstart","progress","abort","error","load","progress","timeout","loadend","readystatechange"],Pe=["upgradeneeded","complete","abort","success","error","blocked","versionchange","close"],at=["close","error","open","message"],Re=["error","message"],Ne=["abort","animationcancel","animationend","animationiteration","auxclick","beforeinput","blur","cancel","canplay","canplaythrough","change","compositionstart","compositionupdate","compositionend","cuechange","click","close","contextmenu","curechange","dblclick","drag","dragend","dragenter","dragexit","dragleave","dragover","drop","durationchange","emptied","ended","error","focus","focusin","focusout","gotpointercapture","input","invalid","keydown","keypress","keyup","load","loadstart","loadeddata","loadedmetadata","lostpointercapture","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","mousewheel","orientationchange","pause","play","playing","pointercancel","pointerdown","pointerenter","pointerleave","pointerlockchange","mozpointerlockchange","webkitpointerlockerchange","pointerlockerror","mozpointerlockerror","webkitpointerlockerror","pointermove","pointout","pointerover","pointerup","progress","ratechange","reset","resize","scroll","seeked","seeking","select","selectionchange","selectstart","show","sort","stalled","submit","suspend","timeupdate","volumechange","touchcancel","touchmove","touchstart","touchend","transitioncancel","transitionend","waiting","wheel"].concat(["webglcontextrestored","webglcontextlost","webglcontextcreationerror"],["autocomplete","autocompleteerror"],["toggle"],["afterscriptexecute","beforescriptexecute","DOMContentLoaded","freeze","fullscreenchange","mozfullscreenchange","webkitfullscreenchange","msfullscreenchange","fullscreenerror","mozfullscreenerror","webkitfullscreenerror","msfullscreenerror","readystatechange","visibilitychange","resume"],Et,["beforecopy","beforecut","beforepaste","copy","cut","paste","dragstart","loadend","animationstart","search","transitionrun","transitionstart","webkitanimationend","webkitanimationiteration","webkitanimationstart","webkittransitionend"],["activate","afterupdate","ariarequest","beforeactivate","beforedeactivate","beforeeditfocus","beforeupdate","cellchange","controlselect","dataavailable","datasetchanged","datasetcomplete","errorupdate","filterchange","layoutcomplete","losecapture","move","moveend","movestart","propertychange","resizeend","resizestart","rowenter","rowexit","rowsdelete","rowsinserted","command","compassneedscalibration","deactivate","help","mscontentzoom","msmanipulationstatechanged","msgesturechange","msgesturedoubletap","msgestureend","msgesturehold","msgesturestart","msgesturetap","msgotpointercapture","msinertiastart","mslostpointercapture","mspointercancel","mspointerdown","mspointerenter","mspointerhover","mspointerleave","mspointermove","mspointerout","mspointerover","mspointerup","pointerout","mssitemodejumplistitemremoved","msthumbnailclick","stop","storagecommit"]);function Xe(t,a,u){if(!u||0===u.length)return a;const c=u.filter(m=>m.target===t);if(!c||0===c.length)return a;const f=c[0].ignoreProperties;return a.filter(m=>-1===f.indexOf(m))}function Y(t,a,u,c){t&&Ge(t,Xe(t,a,u),c)}Zone.__load_patch("util",(t,a,u)=>{u.patchOnProperties=Ge,u.patchMethod=ae,u.bindArguments=tt,u.patchMacroTask=Ce;const c=a.__symbol__("BLACK_LISTED_EVENTS"),f=a.__symbol__("UNPATCHED_EVENTS");t[f]&&(t[c]=t[f]),t[c]&&(a[c]=a[f]=t[c]),u.patchEventPrototype=ot,u.patchEventTarget=ze,u.isIEOrEdge=Le,u.ObjectDefineProperty=ge,u.ObjectGetOwnPropertyDescriptor=oe,u.ObjectCreate=_t,u.ArraySlice=Ve,u.patchClass=we,u.wrapWithCurrentZone=Fe,u.filterProperties=Xe,u.attachOriginToPatched=se,u._redefineProperty=Object.defineProperty,u.patchCallbacks=pt,u.getGlobalObjects=()=>({globalSources:pe,zoneSymbolEventNames:te,eventNames:Ne,isBrowser:ht,isMix:Ue,isNode:ne,TRUE_STR:he,FALSE_STR:ve,ZONE_SYMBOL_PREFIX:Ze,ADD_EVENT_LISTENER_STR:Ie,REMOVE_EVENT_LISTENER_STR:Je})});const Ye=U("zoneTask");function Se(t,a,u,c){let f=null,m=null;u+=c;const E={};function v(w){const b=w.data;return b.args[0]=function(){return w.invoke.apply(this,arguments)},b.handleId=f.apply(t,b.args),w}function C(w){return m.call(t,w.data.handleId)}f=ae(t,a+=c,w=>function(b,H){if("function"==typeof H[0]){const S={isPeriodic:"Interval"===c,delay:"Timeout"===c||"Interval"===c?H[1]||0:void 0,args:H},P=H[0];H[0]=function(){try{return P.apply(this,arguments)}finally{S.isPeriodic||("number"==typeof S.handleId?delete E[S.handleId]:S.handleId&&(S.handleId[Ye]=null))}};const G=lt(a,H[0],S,v,C);if(!G)return G;const x=G.data.handleId;return"number"==typeof x?E[x]=G:x&&(x[Ye]=G),x&&x.ref&&x.unref&&"function"==typeof x.ref&&"function"==typeof x.unref&&(G.ref=x.ref.bind(x),G.unref=x.unref.bind(x)),"number"==typeof x||x?x:G}return w.apply(t,H)}),m=ae(t,u,w=>function(b,H){const S=H[0];let P;"number"==typeof S?P=E[S]:(P=S&&S[Ye],P||(P=S)),P&&"string"==typeof P.type?"notScheduled"!==P.state&&(P.cancelFn&&P.data.isPeriodic||0===P.runCount)&&("number"==typeof S?delete E[S]:S&&(S[Ye]=null),P.zone.cancelTask(P)):w.apply(t,H)})}Zone.__load_patch("legacy",t=>{const a=t[Zone.__symbol__("legacyPatch")];a&&a()}),Zone.__load_patch("queueMicrotask",(t,a,u)=>{u.patchMethod(t,"queueMicrotask",c=>function(f,m){a.current.scheduleMicroTask("queueMicrotask",m[0])})}),Zone.__load_patch("timers",t=>{const a="set",u="clear";Se(t,a,u,"Timeout"),Se(t,a,u,"Interval"),Se(t,a,u,"Immediate")}),Zone.__load_patch("requestAnimationFrame",t=>{Se(t,"request","cancel","AnimationFrame"),Se(t,"mozRequest","mozCancel","AnimationFrame"),Se(t,"webkitRequest","webkitCancel","AnimationFrame")}),Zone.__load_patch("blocking",(t,a)=>{const u=["alert","prompt","confirm"];for(let c=0;cfunction(C,w){return a.current.run(m,t,w,v)})}),Zone.__load_patch("EventTarget",(t,a,u)=>{(function Me(t,a){a.patchEventPrototype(t,a)})(t,u),function $e(t,a){if(Zone[a.symbol("patchEventTarget")])return;const{eventNames:u,zoneSymbolEventNames:c,TRUE_STR:f,FALSE_STR:m,ZONE_SYMBOL_PREFIX:E}=a.getGlobalObjects();for(let C=0;C{we("MutationObserver"),we("WebKitMutationObserver")}),Zone.__load_patch("IntersectionObserver",(t,a,u)=>{we("IntersectionObserver")}),Zone.__load_patch("FileReader",(t,a,u)=>{we("FileReader")}),Zone.__load_patch("on_property",(t,a,u)=>{!function Ct(t,a){if(ne&&!Ue||Zone[t.symbol("patchEvents")])return;const u="undefined"!=typeof WebSocket,c=a.__Zone_ignore_on_properties;if(ht){const E=window,v=function be(){try{const t=ke.navigator.userAgent;if(-1!==t.indexOf("MSIE ")||-1!==t.indexOf("Trident/"))return!0}catch(t){}return!1}()?[{target:E,ignoreProperties:["error"]}]:[];Y(E,Ne.concat(["messageerror"]),c&&c.concat(v),ye(E)),Y(Document.prototype,Ne,c),void 0!==E.SVGElement&&Y(E.SVGElement.prototype,Ne,c),Y(Element.prototype,Ne,c),Y(HTMLElement.prototype,Ne,c),Y(HTMLMediaElement.prototype,st,c),Y(HTMLFrameSetElement.prototype,Et.concat(De),c),Y(HTMLBodyElement.prototype,Et.concat(De),c),Y(HTMLFrameElement.prototype,le,c),Y(HTMLIFrameElement.prototype,le,c);const C=E.HTMLMarqueeElement;C&&Y(C.prototype,Ee,c);const w=E.Worker;w&&Y(w.prototype,Re,c)}const f=a.XMLHttpRequest;f&&Y(f.prototype,it,c);const m=a.XMLHttpRequestEventTarget;m&&Y(m&&m.prototype,it,c),"undefined"!=typeof IDBIndex&&(Y(IDBIndex.prototype,Pe,c),Y(IDBRequest.prototype,Pe,c),Y(IDBOpenDBRequest.prototype,Pe,c),Y(IDBDatabase.prototype,Pe,c),Y(IDBTransaction.prototype,Pe,c),Y(IDBCursor.prototype,Pe,c)),u&&Y(WebSocket.prototype,at,c)}(u,t)}),Zone.__load_patch("customElements",(t,a,u)=>{!function Pt(t,a){const{isBrowser:u,isMix:c}=a.getGlobalObjects();(u||c)&&t.customElements&&"customElements"in t&&a.patchCallbacks(a,t.customElements,"customElements","define",["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback"])}(t,u)}),Zone.__load_patch("XHR",(t,a)=>{!function C(w){const b=w.XMLHttpRequest;if(!b)return;const H=b.prototype;let P=H[Qe],G=H[et];if(!P){const N=w.XMLHttpRequestEventTarget;if(N){const j=N.prototype;P=j[Qe],G=j[et]}}const x="readystatechange",L="scheduled";function T(N){const j=N.data,O=j.target;O[m]=!1,O[v]=!1;const re=O[f];P||(P=O[Qe],G=O[et]),re&&G.call(O,x,re);const Te=O[f]=()=>{if(O.readyState===O.DONE)if(!j.aborted&&O[m]&&N.state===L){const ue=O[a.__symbol__("loadfalse")];if(0!==O.status&&ue&&ue.length>0){const fe=N.invoke;N.invoke=function(){const W=O[a.__symbol__("loadfalse")];for(let I=0;Ifunction(N,j){return N[c]=0==j[2],N[E]=j[1],B.apply(N,j)}),R=U("fetchTaskAborting"),Q=U("fetchTaskScheduling"),V=ae(H,"send",()=>function(N,j){if(!0===a.current[Q]||N[c])return V.apply(N,j);{const O={target:N,url:N[E],isPeriodic:!1,args:j,aborted:!1},re=lt("XMLHttpRequest.send",Z,O,T,z);N&&!0===N[v]&&!O.aborted&&re.state===L&&re.invoke()}}),K=ae(H,"abort",()=>function(N,j){const O=function S(N){return N[u]}(N);if(O&&"string"==typeof O.type){if(null==O.cancelFn||O.data&&O.data.aborted)return;O.zone.cancelTask(O)}else if(!0===a.current[R])return K.apply(N,j)})}(t);const u=U("xhrTask"),c=U("xhrSync"),f=U("xhrListener"),m=U("xhrScheduled"),E=U("xhrURL"),v=U("xhrErrorBeforeScheduled")}),Zone.__load_patch("geolocation",t=>{t.navigator&&t.navigator.geolocation&&function ut(t,a){const u=t.constructor.name;for(let c=0;c{const C=function(){return v.apply(this,tt(arguments,u+"."+f))};return se(C,v),C})(m)}}}(t.navigator.geolocation,["getCurrentPosition","watchPosition"])}),Zone.__load_patch("PromiseRejectionEvent",(t,a)=>{function u(c){return function(f){kt(t,c).forEach(E=>{const v=t.PromiseRejectionEvent;if(v){const C=new v(c,{promise:f.promise,reason:f.rejection});E.invoke(C)}})}}t.PromiseRejectionEvent&&(a[U("unhandledPromiseRejectionHandler")]=u("unhandledrejection"),a[U("rejectionHandledHandler")]=u("rejectionhandled"))})}},X=>{X(X.s=61)}]);"use strict";var LQ=Object.defineProperty,BQ=Object.defineProperties,jQ=Object.getOwnPropertyDescriptors,fp=Object.getOwnPropertySymbols,E1=Object.prototype.hasOwnProperty,w1=Object.prototype.propertyIsEnumerable,C1=(tt,vt,ze)=>vt in tt?LQ(tt,vt,{enumerable:!0,configurable:!0,writable:!0,value:ze}):tt[vt]=ze,w=(tt,vt)=>{for(var ze in vt||(vt={}))E1.call(vt,ze)&&C1(tt,ze,vt[ze]);if(fp)for(var ze of fp(vt))w1.call(vt,ze)&&C1(tt,ze,vt[ze]);return tt},en=(tt,vt)=>BQ(tt,jQ(vt)),S1=(tt,vt)=>{var ze={};for(var Ft in tt)E1.call(tt,Ft)&&vt.indexOf(Ft)<0&&(ze[Ft]=tt[Ft]);if(null!=tt&&fp)for(var Ft of fp(tt))vt.indexOf(Ft)<0&&w1.call(tt,Ft)&&(ze[Ft]=tt[Ft]);return ze};(self.webpackChunkdotcms_block_editor=self.webpackChunkdotcms_block_editor||[]).push([[179],{75:()=>{function tt(n){return"function"==typeof n}let vt=!1;const ze={Promise:void 0,set useDeprecatedSynchronousErrorHandling(n){if(n){const e=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+e.stack)}else vt&&console.log("RxJS: Back to a better error behavior. Thank you. <3");vt=n},get useDeprecatedSynchronousErrorHandling(){return vt}};function Ft(n){setTimeout(()=>{throw n},0)}const Iu={closed:!0,next(n){},error(n){if(ze.useDeprecatedSynchronousErrorHandling)throw n;Ft(n)},complete(){}},gl=Array.isArray||(n=>n&&"number"==typeof n.length);function hp(n){return null!==n&&"object"==typeof n}const Tu=(()=>{function n(e){return Error.call(this),this.message=e?`${e.length} errors occurred during unsubscription:\n${e.map((t,r)=>`${r+1}) ${t.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=e,this}return n.prototype=Object.create(Error.prototype),n})();class ke{constructor(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}unsubscribe(){let e;if(this.closed)return;let{_parentOrParents:t,_ctorUnsubscribe:r,_unsubscribe:i,_subscriptions:o}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,t instanceof ke)t.remove(this);else if(null!==t)for(let s=0;se.concat(t instanceof Tu?t.errors:t),[])}ke.EMPTY=((n=new ke).closed=!0,n);const xu="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random();class nt extends ke{constructor(e,t,r){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=Iu;break;case 1:if(!e){this.destination=Iu;break}if("object"==typeof e){e instanceof nt?(this.syncErrorThrowable=e.syncErrorThrowable,this.destination=e,e.add(this)):(this.syncErrorThrowable=!0,this.destination=new Sb(this,e));break}default:this.syncErrorThrowable=!0,this.destination=new Sb(this,e,t,r)}}[xu](){return this}static create(e,t,r){const i=new nt(e,t,r);return i.syncErrorThrowable=!1,i}next(e){this.isStopped||this._next(e)}error(e){this.isStopped||(this.isStopped=!0,this._error(e))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(e){this.destination.next(e)}_error(e){this.destination.error(e),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parentOrParents:e}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this}}class Sb extends nt{constructor(e,t,r,i){super(),this._parentSubscriber=e;let o,s=this;tt(t)?o=t:t&&(o=t.next,r=t.error,i=t.complete,t!==Iu&&(s=Object.create(t),tt(s.unsubscribe)&&this.add(s.unsubscribe.bind(s)),s.unsubscribe=this.unsubscribe.bind(this))),this._context=s,this._next=o,this._error=r,this._complete=i}next(e){if(!this.isStopped&&this._next){const{_parentSubscriber:t}=this;ze.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}}error(e){if(!this.isStopped){const{_parentSubscriber:t}=this,{useDeprecatedSynchronousErrorHandling:r}=ze;if(this._error)r&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(t.syncErrorThrowable)r?(t.syncErrorValue=e,t.syncErrorThrown=!0):Ft(e),this.unsubscribe();else{if(this.unsubscribe(),r)throw e;Ft(e)}}}complete(){if(!this.isStopped){const{_parentSubscriber:e}=this;if(this._complete){const t=()=>this._complete.call(this._context);ze.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,t),this.unsubscribe()):(this.__tryOrUnsub(t),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(e,t){try{e.call(this._context,t)}catch(r){if(this.unsubscribe(),ze.useDeprecatedSynchronousErrorHandling)throw r;Ft(r)}}__tryOrSetError(e,t,r){if(!ze.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,r)}catch(i){return ze.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=i,e.syncErrorThrown=!0,!0):(Ft(i),!0)}return!1}_unsubscribe(){const{_parentSubscriber:e}=this;this._context=null,this._parentSubscriber=null,e.unsubscribe()}}const ml="function"==typeof Symbol&&Symbol.observable||"@@observable";function Au(n){return n}let Ne=(()=>{class n{constructor(t){this._isScalar=!1,t&&(this._subscribe=t)}lift(t){const r=new n;return r.source=this,r.operator=t,r}subscribe(t,r,i){const{operator:o}=this,s=function I1(n,e,t){if(n){if(n instanceof nt)return n;if(n[xu])return n[xu]()}return n||e||t?new nt(n,e,t):new nt(Iu)}(t,r,i);if(s.add(o?o.call(s,this.source):this.source||ze.useDeprecatedSynchronousErrorHandling&&!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),ze.useDeprecatedSynchronousErrorHandling&&s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s}_trySubscribe(t){try{return this._subscribe(t)}catch(r){ze.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=r),function M1(n){for(;n;){const{closed:e,destination:t,isStopped:r}=n;if(e||r)return!1;n=t&&t instanceof nt?t:null}return!0}(t)?t.error(r):console.warn(r)}}forEach(t,r){return new(r=Ib(r))((i,o)=>{let s;s=this.subscribe(a=>{try{t(a)}catch(l){o(l),s&&s.unsubscribe()}},o,i)})}_subscribe(t){const{source:r}=this;return r&&r.subscribe(t)}[ml](){return this}pipe(...t){return 0===t.length?this:function Mb(n){return 0===n.length?Au:1===n.length?n[0]:function(t){return n.reduce((r,i)=>i(r),t)}}(t)(this)}toPromise(t){return new(t=Ib(t))((r,i)=>{let o;this.subscribe(s=>o=s,s=>i(s),()=>r(o))})}}return n.create=e=>new n(e),n})();function Ib(n){if(n||(n=ze.Promise||Promise),!n)throw new Error("no Promise impl found");return n}const Uo=(()=>{function n(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return n.prototype=Object.create(Error.prototype),n})();class Tb extends ke{constructor(e,t){super(),this.subject=e,this.subscriber=t,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const e=this.subject,t=e.observers;if(this.subject=null,!t||0===t.length||e.isStopped||e.closed)return;const r=t.indexOf(this.subscriber);-1!==r&&t.splice(r,1)}}class xb extends nt{constructor(e){super(e),this.destination=e}}let Me=(()=>{class n extends Ne{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[xu](){return new xb(this)}lift(t){const r=new Ab(this,this);return r.operator=t,r}next(t){if(this.closed)throw new Uo;if(!this.isStopped){const{observers:r}=this,i=r.length,o=r.slice();for(let s=0;snew Ab(e,t),n})();class Ab extends Me{constructor(e,t){super(),this.destination=e,this.source=t}next(e){const{destination:t}=this;t&&t.next&&t.next(e)}error(e){const{destination:t}=this;t&&t.error&&this.destination.error(e)}complete(){const{destination:e}=this;e&&e.complete&&this.destination.complete()}_subscribe(e){const{source:t}=this;return t?this.source.subscribe(e):ke.EMPTY}}function Os(n){return n&&"function"==typeof n.schedule}function be(n,e){return function(r){if("function"!=typeof n)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return r.lift(new T1(n,e))}}class T1{constructor(e,t){this.project=e,this.thisArg=t}call(e,t){return t.subscribe(new x1(e,this.project,this.thisArg))}}class x1 extends nt{constructor(e,t,r){super(e),this.project=t,this.count=0,this.thisArg=r||this}_next(e){let t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(r){return void this.destination.error(r)}this.destination.next(t)}}const Ob=n=>e=>{for(let t=0,r=n.length;tn&&"number"==typeof n.length&&"function"!=typeof n;function Nb(n){return!!n&&"function"!=typeof n.subscribe&&"function"==typeof n.then}const pp=n=>{if(n&&"function"==typeof n[ml])return(n=>e=>{const t=n[ml]();if("function"!=typeof t.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return t.subscribe(e)})(n);if(kb(n))return Ob(n);if(Nb(n))return(n=>e=>(n.then(t=>{e.closed||(e.next(t),e.complete())},t=>e.error(t)).then(null,Ft),e))(n);if(n&&"function"==typeof n[Ou])return(n=>e=>{const t=n[Ou]();for(;;){let r;try{r=t.next()}catch(i){return e.error(i),e}if(r.done){e.complete();break}if(e.next(r.value),e.closed)break}return"function"==typeof t.return&&e.add(()=>{t.return&&t.return()}),e})(n);{const t=`You provided ${hp(n)?"an invalid object":`'${n}'`} where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.`;throw new TypeError(t)}};function gp(n,e){return new Ne(t=>{const r=new ke;let i=0;return r.add(e.schedule(function(){i!==n.length?(t.next(n[i++]),t.closed||r.add(this.schedule())):t.complete()})),r})}function zt(n,e){return e?function j1(n,e){if(null!=n){if(function L1(n){return n&&"function"==typeof n[ml]}(n))return function R1(n,e){return new Ne(t=>{const r=new ke;return r.add(e.schedule(()=>{const i=n[ml]();r.add(i.subscribe({next(o){r.add(e.schedule(()=>t.next(o)))},error(o){r.add(e.schedule(()=>t.error(o)))},complete(){r.add(e.schedule(()=>t.complete()))}}))})),r})}(n,e);if(Nb(n))return function P1(n,e){return new Ne(t=>{const r=new ke;return r.add(e.schedule(()=>n.then(i=>{r.add(e.schedule(()=>{t.next(i),r.add(e.schedule(()=>t.complete()))}))},i=>{r.add(e.schedule(()=>t.error(i)))}))),r})}(n,e);if(kb(n))return gp(n,e);if(function B1(n){return n&&"function"==typeof n[Ou]}(n)||"string"==typeof n)return function F1(n,e){if(!n)throw new Error("Iterable cannot be null");return new Ne(t=>{const r=new ke;let i;return r.add(()=>{i&&"function"==typeof i.return&&i.return()}),r.add(e.schedule(()=>{i=n[Ou](),r.add(e.schedule(function(){if(t.closed)return;let o,s;try{const a=i.next();o=a.value,s=a.done}catch(a){return void t.error(a)}s?t.complete():(t.next(o),this.schedule())}))})),r})}(n,e)}throw new TypeError((null!==n&&typeof n||n)+" is not observable")}(n,e):n instanceof Ne?n:new Ne(pp(n))}class vl extends nt{constructor(e){super(),this.parent=e}_next(e){this.parent.notifyNext(e)}_error(e){this.parent.notifyError(e),this.unsubscribe()}_complete(){this.parent.notifyComplete(),this.unsubscribe()}}class yl extends nt{notifyNext(e){this.destination.next(e)}notifyError(e){this.destination.error(e)}notifyComplete(){this.destination.complete()}}function _l(n,e){if(e.closed)return;if(n instanceof Ne)return n.subscribe(e);let t;try{t=pp(n)(e)}catch(r){e.error(r)}return t}function Wt(n,e,t=Number.POSITIVE_INFINITY){return"function"==typeof e?r=>r.pipe(Wt((i,o)=>zt(n(i,o)).pipe(be((s,a)=>e(i,s,o,a))),t)):("number"==typeof e&&(t=e),r=>r.lift(new V1(n,t)))}class V1{constructor(e,t=Number.POSITIVE_INFINITY){this.project=e,this.concurrent=t}call(e,t){return t.subscribe(new H1(e,this.project,this.concurrent))}}class H1 extends yl{constructor(e,t,r=Number.POSITIVE_INFINITY){super(e),this.project=t,this.concurrent=r,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}_next(e){this.active0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}function bl(n=Number.POSITIVE_INFINITY){return Wt(Au,n)}function mp(n,e){return e?gp(n,e):new Ne(Ob(n))}function vp(...n){let e=Number.POSITIVE_INFINITY,t=null,r=n[n.length-1];return Os(r)?(t=n.pop(),n.length>1&&"number"==typeof n[n.length-1]&&(e=n.pop())):"number"==typeof r&&(e=n.pop()),null===t&&1===n.length&&n[0]instanceof Ne?n[0]:bl(e)(mp(n,t))}function yp(){return function(e){return e.lift(new U1(e))}}class U1{constructor(e){this.connectable=e}call(e,t){const{connectable:r}=this;r._refCount++;const i=new z1(e,r),o=t.subscribe(i);return i.closed||(i.connection=r.connect()),o}}class z1 extends nt{constructor(e,t){super(e),this.connectable=t}_unsubscribe(){const{connectable:e}=this;if(!e)return void(this.connection=null);this.connectable=null;const t=e._refCount;if(t<=0)return void(this.connection=null);if(e._refCount=t-1,t>1)return void(this.connection=null);const{connection:r}=this,i=e._connection;this.connection=null,i&&(!r||i===r)&&i.unsubscribe()}}class Rb extends Ne{constructor(e,t){super(),this.source=e,this.subjectFactory=t,this._refCount=0,this._isComplete=!1}_subscribe(e){return this.getSubject().subscribe(e)}getSubject(){const e=this._subject;return(!e||e.isStopped)&&(this._subject=this.subjectFactory()),this._subject}connect(){let e=this._connection;return e||(this._isComplete=!1,e=this._connection=new ke,e.add(this.source.subscribe(new $1(this.getSubject(),this))),e.closed&&(this._connection=null,e=ke.EMPTY)),e}refCount(){return yp()(this)}}const W1=(()=>{const n=Rb.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:n._subscribe},_isComplete:{value:n._isComplete,writable:!0},getSubject:{value:n.getSubject},connect:{value:n.connect},refCount:{value:n.refCount}}})();class $1 extends xb{constructor(e,t){super(e),this.connectable=t}_error(e){this._unsubscribe(),super._error(e)}_complete(){this.connectable._isComplete=!0,this._unsubscribe(),super._complete()}_unsubscribe(){const e=this.connectable;if(e){this.connectable=null;const t=e._connection;e._refCount=0,e._subject=null,e._connection=null,t&&t.unsubscribe()}}}class K1{constructor(e,t){this.subjectFactory=e,this.selector=t}call(e,t){const{selector:r}=this,i=this.subjectFactory(),o=r(i).subscribe(e);return o.add(t.subscribe(i)),o}}function Z1(){return new Me}function We(n){for(let e in n)if(n[e]===We)return e;throw Error("Could not find renamed property on target object.")}function _p(n,e){for(const t in e)e.hasOwnProperty(t)&&!n.hasOwnProperty(t)&&(n[t]=e[t])}function Re(n){if("string"==typeof n)return n;if(Array.isArray(n))return"["+n.map(Re).join(", ")+"]";if(null==n)return""+n;if(n.overriddenName)return`${n.overriddenName}`;if(n.name)return`${n.name}`;const e=n.toString();if(null==e)return""+e;const t=e.indexOf("\n");return-1===t?e:e.substring(0,t)}function bp(n,e){return null==n||""===n?null===e?"":e:null==e||""===e?n:n+" "+e}const Q1=We({__forward_ref__:We});function Be(n){return n.__forward_ref__=Be,n.toString=function(){return Re(this())},n}function de(n){return Pb(n)?n():n}function Pb(n){return"function"==typeof n&&n.hasOwnProperty(Q1)&&n.__forward_ref__===Be}class we extends Error{constructor(e,t){super(function Dp(n,e){return`NG0${Math.abs(n)}${e?": "+e:""}`}(e,t)),this.code=e}}function se(n){return"string"==typeof n?n:null==n?"":String(n)}function pn(n){return"function"==typeof n?n.name||n.toString():"object"==typeof n&&null!=n&&"function"==typeof n.type?n.type.name||n.type.toString():se(n)}function ku(n,e){const t=e?` in ${e}`:"";throw new we(-201,`No provider for ${pn(n)} found${t}`)}function Ln(n,e){null==n&&function rt(n,e,t,r){throw new Error(`ASSERTION ERROR: ${n}`+(null==r?"":` [Expected=> ${t} ${r} ${e} <=Actual]`))}(e,n,null,"!=")}function W(n){return{token:n.token,providedIn:n.providedIn||null,factory:n.factory,value:void 0}}function at(n){return{providers:n.providers||[],imports:n.imports||[]}}function Cp(n){return Fb(n,Nu)||Fb(n,Bb)}function Fb(n,e){return n.hasOwnProperty(e)?n[e]:null}function Lb(n){return n&&(n.hasOwnProperty(Ep)||n.hasOwnProperty(iN))?n[Ep]:null}const Nu=We({\u0275prov:We}),Ep=We({\u0275inj:We}),Bb=We({ngInjectableDef:We}),iN=We({ngInjectorDef:We});var ce=(()=>((ce=ce||{})[ce.Default=0]="Default",ce[ce.Host=1]="Host",ce[ce.Self=2]="Self",ce[ce.SkipSelf=4]="SkipSelf",ce[ce.Optional=8]="Optional",ce))();let wp;function eo(n){const e=wp;return wp=n,e}function jb(n,e,t){const r=Cp(n);return r&&"root"==r.providedIn?void 0===r.value?r.value=r.factory():r.value:t&ce.Optional?null:void 0!==e?e:void ku(Re(n),"Injector")}function to(n){return{toString:n}.toString()}var Cr=(()=>((Cr=Cr||{})[Cr.OnPush=0]="OnPush",Cr[Cr.Default=1]="Default",Cr))(),$r=(()=>(function(n){n[n.Emulated=0]="Emulated",n[n.None=2]="None",n[n.ShadowDom=3]="ShadowDom"}($r||($r={})),$r))();const sN="undefined"!=typeof globalThis&&globalThis,aN="undefined"!=typeof window&&window,lN="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,je=sN||"undefined"!=typeof global&&global||aN||lN,ks={},$e=[],Ru=We({\u0275cmp:We}),Sp=We({\u0275dir:We}),Mp=We({\u0275pipe:We}),Vb=We({\u0275mod:We}),Mi=We({\u0275fac:We}),Dl=We({__NG_ELEMENT_ID__:We});let cN=0;function wt(n){return to(()=>{const t={},r={type:n.type,providersResolver:null,decls:n.decls,vars:n.vars,factory:null,template:n.template||null,consts:n.consts||null,ngContentSelectors:n.ngContentSelectors,hostBindings:n.hostBindings||null,hostVars:n.hostVars||0,hostAttrs:n.hostAttrs||null,contentQueries:n.contentQueries||null,declaredInputs:t,inputs:null,outputs:null,exportAs:n.exportAs||null,onPush:n.changeDetection===Cr.OnPush,directiveDefs:null,pipeDefs:null,selectors:n.selectors||$e,viewQuery:n.viewQuery||null,features:n.features||null,data:n.data||{},encapsulation:n.encapsulation||$r.Emulated,id:"c",styles:n.styles||$e,_:null,setInput:null,schemas:n.schemas||null,tView:null},i=n.directives,o=n.features,s=n.pipes;return r.id+=cN++,r.inputs=Wb(n.inputs,t),r.outputs=Wb(n.outputs),o&&o.forEach(a=>a(r)),r.directiveDefs=i?()=>("function"==typeof i?i():i).map(Hb):null,r.pipeDefs=s?()=>("function"==typeof s?s():s).map(Ub):null,r})}function Hb(n){return tn(n)||function no(n){return n[Sp]||null}(n)}function Ub(n){return function zo(n){return n[Mp]||null}(n)}const zb={};function ut(n){return to(()=>{const e={type:n.type,bootstrap:n.bootstrap||$e,declarations:n.declarations||$e,imports:n.imports||$e,exports:n.exports||$e,transitiveCompileScopes:null,schemas:n.schemas||null,id:n.id||null};return null!=n.id&&(zb[n.id]=n.type),e})}function Wb(n,e){if(null==n)return ks;const t={};for(const r in n)if(n.hasOwnProperty(r)){let i=n[r],o=i;Array.isArray(i)&&(o=i[1],i=i[0]),t[i]=r,e&&(e[i]=o)}return t}const Y=wt;function gn(n){return{type:n.type,name:n.name,factory:null,pure:!1!==n.pure,onDestroy:n.type.prototype.ngOnDestroy||null}}function tn(n){return n[Ru]||null}function Xn(n,e){const t=n[Vb]||null;if(!t&&!0===e)throw new Error(`Type ${Re(n)} does not have '\u0275mod' property.`);return t}function Gr(n){return Array.isArray(n)&&"object"==typeof n[1]}function wr(n){return Array.isArray(n)&&!0===n[1]}function xp(n){return 0!=(8&n.flags)}function Bu(n){return 2==(2&n.flags)}function ju(n){return 1==(1&n.flags)}function Sr(n){return null!==n.template}function gN(n){return 0!=(512&n[2])}function qo(n,e){return n.hasOwnProperty(Mi)?n[Mi]:null}class Gb{constructor(e,t,r){this.previousValue=e,this.currentValue=t,this.firstChange=r}isFirstChange(){return this.firstChange}}function tr(){return qb}function qb(n){return n.type.prototype.ngOnChanges&&(n.setInput=_N),yN}function yN(){const n=Zb(this),e=null==n?void 0:n.current;if(e){const t=n.previous;if(t===ks)n.previous=e;else for(let r in e)t[r]=e[r];n.current=null,this.ngOnChanges(e)}}function _N(n,e,t,r){const i=Zb(n)||function bN(n,e){return n[Kb]=e}(n,{previous:ks,current:null}),o=i.current||(i.current={}),s=i.previous,a=this.declaredInputs[t],l=s[a];o[a]=new Gb(l&&l.currentValue,e,s===ks),n[r]=e}tr.ngInherit=!0;const Kb="__ngSimpleChanges__";function Zb(n){return n[Kb]||null}let Rp;function Pp(){return void 0!==Rp?Rp:"undefined"!=typeof document?document:void 0}function dt(n){return!!n.listen}const Yb={createRenderer:(n,e)=>Pp()};function St(n){for(;Array.isArray(n);)n=n[0];return n}function Vu(n,e){return St(e[n])}function rr(n,e){return St(e[n.index])}function Fp(n,e){return n.data[e]}function Ls(n,e){return n[e]}function jn(n,e){const t=e[n];return Gr(t)?t:t[0]}function Qb(n){return 4==(4&n[2])}function Lp(n){return 128==(128&n[2])}function ro(n,e){return null==e?null:n[e]}function Jb(n){n[18]=0}function Bp(n,e){n[5]+=e;let t=n,r=n[3];for(;null!==r&&(1===e&&1===t[5]||-1===e&&0===t[5]);)r[5]+=e,t=r,r=r[3]}const te={lFrame:sD(null),bindingsEnabled:!0,isInCheckNoChangesMode:!1};function Xb(){return te.bindingsEnabled}function I(){return te.lFrame.lView}function Se(){return te.lFrame.tView}function Bt(n){return te.lFrame.contextLView=n,n[8]}function Ot(){let n=eD();for(;null!==n&&64===n.type;)n=n.parent;return n}function eD(){return te.lFrame.currentTNode}function qr(n,e){const t=te.lFrame;t.currentTNode=n,t.isParent=e}function jp(){return te.lFrame.isParent}function Vp(){te.lFrame.isParent=!1}function Hu(){return te.isInCheckNoChangesMode}function Uu(n){te.isInCheckNoChangesMode=n}function mn(){const n=te.lFrame;let e=n.bindingRootIndex;return-1===e&&(e=n.bindingRootIndex=n.tView.bindingStartIndex),e}function Bs(){return te.lFrame.bindingIndex++}function Ti(n){const e=te.lFrame,t=e.bindingIndex;return e.bindingIndex=e.bindingIndex+n,t}function LN(n,e){const t=te.lFrame;t.bindingIndex=t.bindingRootIndex=n,Hp(e)}function Hp(n){te.lFrame.currentDirectiveIndex=n}function rD(){return te.lFrame.currentQueryIndex}function zp(n){te.lFrame.currentQueryIndex=n}function jN(n){const e=n[1];return 2===e.type?e.declTNode:1===e.type?n[6]:null}function iD(n,e,t){if(t&ce.SkipSelf){let i=e,o=n;for(;!(i=i.parent,null!==i||t&ce.Host||(i=jN(o),null===i||(o=o[15],10&i.type))););if(null===i)return!1;e=i,n=o}const r=te.lFrame=oD();return r.currentTNode=e,r.lView=n,!0}function zu(n){const e=oD(),t=n[1];te.lFrame=e,e.currentTNode=t.firstChild,e.lView=n,e.tView=t,e.contextLView=n,e.bindingIndex=t.bindingStartIndex,e.inI18n=!1}function oD(){const n=te.lFrame,e=null===n?null:n.child;return null===e?sD(n):e}function sD(n){const e={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:n,child:null,inI18n:!1};return null!==n&&(n.child=e),e}function aD(){const n=te.lFrame;return te.lFrame=n.parent,n.currentTNode=null,n.lView=null,n}const lD=aD;function Wu(){const n=aD();n.isParent=!0,n.tView=null,n.selectedIndex=-1,n.contextLView=null,n.elementDepthCount=0,n.currentDirectiveIndex=-1,n.currentNamespace=null,n.bindingRootIndex=-1,n.bindingIndex=-1,n.currentQueryIndex=0}function vn(){return te.lFrame.selectedIndex}function io(n){te.lFrame.selectedIndex=n}function ft(){const n=te.lFrame;return Fp(n.tView,n.selectedIndex)}function $u(n,e){for(let t=e.directiveStart,r=e.directiveEnd;t=r)break}else e[l]<0&&(n[18]+=65536),(a>11>16&&(3&n[2])===e){n[2]+=2048;try{o.call(a)}finally{}}}else try{o.call(a)}finally{}}class Ml{constructor(e,t,r){this.factory=e,this.resolving=!1,this.canSeeViewProviders=t,this.injectImpl=r}}function Ku(n,e,t){const r=dt(n);let i=0;for(;ie){s=o-1;break}}}for(;o>16}(n),r=e;for(;t>0;)r=r[15],t--;return r}let qp=!0;function Yu(n){const e=qp;return qp=n,e}let eR=0;function Tl(n,e){const t=Zp(n,e);if(-1!==t)return t;const r=e[1];r.firstCreatePass&&(n.injectorIndex=e.length,Kp(r.data,n),Kp(e,null),Kp(r.blueprint,null));const i=Qu(n,e),o=n.injectorIndex;if(fD(i)){const s=js(i),a=Vs(i,e),l=a[1].data;for(let c=0;c<8;c++)e[o+c]=a[s+c]|l[s+c]}return e[o+8]=i,o}function Kp(n,e){n.push(0,0,0,0,0,0,0,0,e)}function Zp(n,e){return-1===n.injectorIndex||n.parent&&n.parent.injectorIndex===n.injectorIndex||null===e[n.injectorIndex+8]?-1:n.injectorIndex}function Qu(n,e){if(n.parent&&-1!==n.parent.injectorIndex)return n.parent.injectorIndex;let t=0,r=null,i=e;for(;null!==i;){const o=i[1],s=o.type;if(r=2===s?o.declTNode:1===s?i[6]:null,null===r)return-1;if(t++,i=i[15],-1!==r.injectorIndex)return r.injectorIndex|t<<16}return-1}function Ju(n,e,t){!function tR(n,e,t){let r;"string"==typeof t?r=t.charCodeAt(0)||0:t.hasOwnProperty(Dl)&&(r=t[Dl]),null==r&&(r=t[Dl]=eR++);const i=255&r;e.data[n+(i>>5)]|=1<=0?255&e:rR:e}(t);if("function"==typeof o){if(!iD(e,n,r))return r&ce.Host?gD(i,t,r):mD(e,t,r,i);try{const s=o(r);if(null!=s||r&ce.Optional)return s;ku(t)}finally{lD()}}else if("number"==typeof o){let s=null,a=Zp(n,e),l=-1,c=r&ce.Host?e[16][6]:null;for((-1===a||r&ce.SkipSelf)&&(l=-1===a?Qu(n,e):e[a+8],-1!==l&&bD(r,!1)?(s=e[1],a=js(l),e=Vs(l,e)):a=-1);-1!==a;){const u=e[1];if(_D(o,a,u.data)){const d=iR(a,e,t,s,r,c);if(d!==yD)return d}l=e[a+8],-1!==l&&bD(r,e[1].data[a+8]===c)&&_D(o,a,e)?(s=u,a=js(l),e=Vs(l,e)):a=-1}}}return mD(e,t,r,i)}const yD={};function rR(){return new Hs(Ot(),I())}function iR(n,e,t,r,i,o){const s=e[1],a=s.data[n+8],u=Xu(a,s,t,null==r?Bu(a)&&qp:r!=s&&0!=(3&a.type),i&ce.Host&&o===a);return null!==u?xl(e,s,u,a):yD}function Xu(n,e,t,r,i){const o=n.providerIndexes,s=e.data,a=1048575&o,l=n.directiveStart,u=o>>20,f=i?a+u:n.directiveEnd;for(let h=r?a:a+u;h=l&&p.type===t)return h}if(i){const h=s[l];if(h&&Sr(h)&&h.type===t)return l}return null}function xl(n,e,t,r){let i=n[t];const o=e.data;if(function ZN(n){return n instanceof Ml}(i)){const s=i;s.resolving&&function J1(n,e){const t=e?`. Dependency path: ${e.join(" > ")} > ${n}`:"";throw new we(-200,`Circular dependency in DI detected for ${n}${t}`)}(pn(o[t]));const a=Yu(s.canSeeViewProviders);s.resolving=!0;const l=s.injectImpl?eo(s.injectImpl):null;iD(n,r,ce.Default);try{i=n[t]=s.factory(void 0,o,n,r),e.firstCreatePass&&t>=r.directiveStart&&function qN(n,e,t){const{ngOnChanges:r,ngOnInit:i,ngDoCheck:o}=e.type.prototype;if(r){const s=qb(e);(t.preOrderHooks||(t.preOrderHooks=[])).push(n,s),(t.preOrderCheckHooks||(t.preOrderCheckHooks=[])).push(n,s)}i&&(t.preOrderHooks||(t.preOrderHooks=[])).push(0-n,i),o&&((t.preOrderHooks||(t.preOrderHooks=[])).push(n,o),(t.preOrderCheckHooks||(t.preOrderCheckHooks=[])).push(n,o))}(t,o[t],e)}finally{null!==l&&eo(l),Yu(a),s.resolving=!1,lD()}}return i}function _D(n,e,t){return!!(t[e+(n>>5)]&1<{const e=n.prototype.constructor,t=e[Mi]||Yp(e),r=Object.prototype;let i=Object.getPrototypeOf(n.prototype).constructor;for(;i&&i!==r;){const o=i[Mi]||Yp(i);if(o&&o!==t)return o;i=Object.getPrototypeOf(i)}return o=>new o})}function Yp(n){return Pb(n)?()=>{const e=Yp(de(n));return e&&e()}:qo(n)}const zs="__parameters__";function $s(n,e,t){return to(()=>{const r=function Qp(n){return function(...t){if(n){const r=n(...t);for(const i in r)this[i]=r[i]}}}(e);function i(...o){if(this instanceof i)return r.apply(this,o),this;const s=new i(...o);return a.annotation=s,a;function a(l,c,u){const d=l.hasOwnProperty(zs)?l[zs]:Object.defineProperty(l,zs,{value:[]})[zs];for(;d.length<=u;)d.push(null);return(d[u]=d[u]||[]).push(s),l}}return t&&(i.prototype=Object.create(t.prototype)),i.prototype.ngMetadataName=n,i.annotationCls=i,i})}class ${constructor(e,t){this._desc=e,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof t?this.__NG_ELEMENT_ID__=t:void 0!==t&&(this.\u0275prov=W({token:this,providedIn:t.providedIn||"root",factory:t.factory}))}toString(){return`InjectionToken ${this._desc}`}}const aR=new $("AnalyzeForEntryComponents");function ir(n,e){void 0===e&&(e=n);for(let t=0;tArray.isArray(t)?Kr(t,e):e(t))}function CD(n,e,t){e>=n.length?n.push(t):n.splice(e,0,t)}function ed(n,e){return e>=n.length-1?n.pop():n.splice(e,1)[0]}function Nl(n,e){const t=[];for(let r=0;r=0?n[1|r]=t:(r=~r,function uR(n,e,t,r){let i=n.length;if(i==e)n.push(t,r);else if(1===i)n.push(r,n[0]),n[0]=t;else{for(i--,n.push(n[i-1],n[i]);i>e;)n[i]=n[i-2],i--;n[e]=t,n[e+1]=r}}(n,r,e,t)),r}function Xp(n,e){const t=Gs(n,e);if(t>=0)return n[1|t]}function Gs(n,e){return function SD(n,e,t){let r=0,i=n.length>>t;for(;i!==r;){const o=r+(i-r>>1),s=n[o<e?i=o:r=o+1}return~(i<({token:n})),-1),Zr=Fl($s("Optional"),8),Ks=Fl($s("SkipSelf"),4);let id,od;function Ys(n){var e;return(null===(e=function ig(){if(void 0===id&&(id=null,je.trustedTypes))try{id=je.trustedTypes.createPolicy("angular",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch(n){}return id}())||void 0===e?void 0:e.createHTML(n))||n}function RD(n){var e;return(null===(e=function og(){if(void 0===od&&(od=null,je.trustedTypes))try{od=je.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch(n){}return od}())||void 0===e?void 0:e.createHTML(n))||n}class Ko{constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see https://g.co/ng/security#xss)`}}class RR extends Ko{getTypeName(){return"HTML"}}class PR extends Ko{getTypeName(){return"Style"}}class FR extends Ko{getTypeName(){return"Script"}}class LR extends Ko{getTypeName(){return"URL"}}class BR extends Ko{getTypeName(){return"ResourceURL"}}function Hn(n){return n instanceof Ko?n.changingThisBreaksApplicationSecurity:n}function Yr(n,e){const t=LD(n);if(null!=t&&t!==e){if("ResourceURL"===t&&"URL"===e)return!0;throw new Error(`Required a safe ${e}, got a ${t} (see https://g.co/ng/security#xss)`)}return t===e}function LD(n){return n instanceof Ko&&n.getTypeName()||null}class WR{constructor(e){this.inertDocumentHelper=e}getInertBodyElement(e){e=""+e;try{const t=(new window.DOMParser).parseFromString(Ys(e),"text/html").body;return null===t?this.inertDocumentHelper.getInertBodyElement(e):(t.removeChild(t.firstChild),t)}catch(t){return null}}}class $R{constructor(e){if(this.defaultDoc=e,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert"),null==this.inertDocument.body){const t=this.inertDocument.createElement("html");this.inertDocument.appendChild(t);const r=this.inertDocument.createElement("body");t.appendChild(r)}}getInertBodyElement(e){const t=this.inertDocument.createElement("template");if("content"in t)return t.innerHTML=Ys(e),t;const r=this.inertDocument.createElement("body");return r.innerHTML=Ys(e),this.defaultDoc.documentMode&&this.stripCustomNsAttrs(r),r}stripCustomNsAttrs(e){const t=e.attributes;for(let i=t.length-1;0Bl(e.trim())).join(", ")}function Qr(n){const e={};for(const t of n.split(","))e[t]=!0;return e}function jl(...n){const e={};for(const t of n)for(const r in t)t.hasOwnProperty(r)&&(e[r]=!0);return e}const VD=Qr("area,br,col,hr,img,wbr"),HD=Qr("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),UD=Qr("rp,rt"),sg=jl(VD,jl(HD,Qr("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),jl(UD,Qr("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),jl(UD,HD)),ag=Qr("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),lg=Qr("srcset"),zD=jl(ag,lg,Qr("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),Qr("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext")),ZR=Qr("script,style,template");class YR{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(e){let t=e.firstChild,r=!0;for(;t;)if(t.nodeType===Node.ELEMENT_NODE?r=this.startElement(t):t.nodeType===Node.TEXT_NODE?this.chars(t.nodeValue):this.sanitizedSomething=!0,r&&t.firstChild)t=t.firstChild;else for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);let i=this.checkClobberedElement(t,t.nextSibling);if(i){t=i;break}t=this.checkClobberedElement(t,t.parentNode)}return this.buf.join("")}startElement(e){const t=e.nodeName.toLowerCase();if(!sg.hasOwnProperty(t))return this.sanitizedSomething=!0,!ZR.hasOwnProperty(t);this.buf.push("<"),this.buf.push(t);const r=e.attributes;for(let i=0;i"),!0}endElement(e){const t=e.nodeName.toLowerCase();sg.hasOwnProperty(t)&&!VD.hasOwnProperty(t)&&(this.buf.push(""))}chars(e){this.buf.push(WD(e))}checkClobberedElement(e,t){if(t&&(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${e.outerHTML}`);return t}}const QR=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,JR=/([^\#-~ |!])/g;function WD(n){return n.replace(/&/g,"&").replace(QR,function(e){return"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";"}).replace(JR,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(//g,">")}let sd;function $D(n,e){let t=null;try{sd=sd||function BD(n){const e=new $R(n);return function GR(){try{return!!(new window.DOMParser).parseFromString(Ys(""),"text/html")}catch(n){return!1}}()?new WR(e):e}(n);let r=e?String(e):"";t=sd.getInertBodyElement(r);let i=5,o=r;do{if(0===i)throw new Error("Failed to sanitize html because the input is unstable");i--,r=o,o=t.innerHTML,t=sd.getInertBodyElement(r)}while(r!==o);return Ys((new YR).sanitizeChildren(cg(t)||t))}finally{if(t){const r=cg(t)||t;for(;r.firstChild;)r.removeChild(r.firstChild)}}}function cg(n){return"content"in n&&function XR(n){return n.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===n.nodeName}(n)?n.content:null}var Ke=(()=>((Ke=Ke||{})[Ke.NONE=0]="NONE",Ke[Ke.HTML=1]="HTML",Ke[Ke.STYLE=2]="STYLE",Ke[Ke.SCRIPT=3]="SCRIPT",Ke[Ke.URL=4]="URL",Ke[Ke.RESOURCE_URL=5]="RESOURCE_URL",Ke))();function ug(n){const e=Vl();return e?RD(e.sanitize(Ke.HTML,n)||""):Yr(n,"HTML")?RD(Hn(n)):$D(Pp(),se(n))}function so(n){const e=Vl();return e?e.sanitize(Ke.URL,n)||"":Yr(n,"URL")?Hn(n):Bl(se(n))}function Vl(){const n=I();return n&&n[12]}const KD="__ngContext__";function rn(n,e){n[KD]=e}function fg(n){const e=function Hl(n){return n[KD]||null}(n);return e?Array.isArray(e)?e:e.lView:null}function pg(n){return n.ngOriginalError}function gP(n,...e){n.error(...e)}class Qs{constructor(){this._console=console}handleError(e){const t=this._findOriginalError(e),r=function pP(n){return n&&n.ngErrorLogger||gP}(e);r(this._console,"ERROR",e),t&&r(this._console,"ORIGINAL ERROR",t)}_findOriginalError(e){let t=e&&pg(e);for(;t&&pg(t);)t=pg(t);return t||null}}const XD=(()=>("undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||setTimeout).bind(je))();function Jr(n){return n instanceof Function?n():n}var Un=(()=>((Un=Un||{})[Un.Important=1]="Important",Un[Un.DashCase=2]="DashCase",Un))();function mg(n,e){return undefined(n,e)}function Ul(n){const e=n[3];return wr(e)?e[3]:e}function vg(n){return iC(n[13])}function yg(n){return iC(n[4])}function iC(n){for(;null!==n&&!wr(n);)n=n[4];return n}function Xs(n,e,t,r,i){if(null!=r){let o,s=!1;wr(r)?o=r:Gr(r)&&(s=!0,r=r[0]);const a=St(r);0===n&&null!==t?null==i?uC(e,t,a):Zo(e,t,a,i||null,!0):1===n&&null!==t?Zo(e,t,a,i||null,!0):2===n?function vC(n,e,t){const r=ad(n,e);r&&function BP(n,e,t,r){dt(n)?n.removeChild(e,t,r):e.removeChild(t)}(n,r,e,t)}(e,a,s):3===n&&e.destroyNode(a),null!=o&&function HP(n,e,t,r,i){const o=t[7];o!==St(t)&&Xs(e,n,r,o,i);for(let a=10;a0&&(n[t-1][4]=r[4]);const o=ed(n,10+e);!function AP(n,e){zl(n,e,e[11],2,null,null),e[0]=null,e[6]=null}(r[1],r);const s=o[19];null!==s&&s.detachView(o[1]),r[3]=null,r[4]=null,r[2]&=-129}return r}function aC(n,e){if(!(256&e[2])){const t=e[11];dt(t)&&t.destroyNode&&zl(n,e,t,3,null,null),function NP(n){let e=n[13];if(!e)return Cg(n[1],n);for(;e;){let t=null;if(Gr(e))t=e[13];else{const r=e[10];r&&(t=r)}if(!t){for(;e&&!e[4]&&e!==n;)Gr(e)&&Cg(e[1],e),e=e[3];null===e&&(e=n),Gr(e)&&Cg(e[1],e),t=e&&e[4]}e=t}}(e)}}function Cg(n,e){if(!(256&e[2])){e[2]&=-129,e[2]|=256,function LP(n,e){let t;if(null!=n&&null!=(t=n.destroyHooks))for(let r=0;r=0?r[i=c]():r[i=-c].unsubscribe(),o+=2}else{const s=r[i=t[o+1]];t[o].call(s)}if(null!==r){for(let o=i+1;oo?"":i[d+1].toLowerCase();const h=8&r?f:null;if(h&&-1!==bC(h,c,0)||2&r&&c!==f){if(Mr(r))return!1;s=!0}}}}else{if(!s&&!Mr(r)&&!Mr(l))return!1;if(s&&Mr(l))continue;s=!1,r=l|1&r}}return Mr(r)||s}function Mr(n){return 0==(1&n)}function GP(n,e,t,r){if(null===e)return-1;let i=0;if(r||!t){let o=!1;for(;i-1)for(t++;t0?'="'+a+'"':"")+"]"}else 8&r?i+="."+s:4&r&&(i+=" "+s);else""!==i&&!Mr(s)&&(e+=wC(o,i),i=""),r=s,o=o||!Mr(r);t++}return""!==i&&(e+=wC(o,i)),e}const ae={};function N(n){SC(Se(),I(),vn()+n,Hu())}function SC(n,e,t,r){if(!r)if(3==(3&e[2])){const o=n.preOrderCheckHooks;null!==o&&Gu(e,o,t)}else{const o=n.preOrderHooks;null!==o&&qu(e,o,0,t)}io(t)}function ud(n,e){return n<<17|e<<2}function Ir(n){return n>>17&32767}function Ig(n){return 2|n}function xi(n){return(131068&n)>>2}function Tg(n,e){return-131069&n|e<<2}function xg(n){return 1|n}function FC(n,e){const t=n.contentQueries;if(null!==t)for(let r=0;r20&&SC(n,e,20,Hu()),t(r,i)}finally{io(o)}}function BC(n,e,t){if(xp(e)){const i=e.directiveEnd;for(let o=e.directiveStart;o0;){const t=n[--e];if("number"==typeof t&&t<0)return t}return 0})(a)!=l&&a.push(l),a.push(r,i,s)}}function GC(n,e){null!==n.hostBindings&&n.hostBindings(1,e)}function qC(n,e){e.flags|=2,(n.components||(n.components=[])).push(e.index)}function MF(n,e,t){if(t){if(e.exportAs)for(let r=0;r0&&zg(t)}}function zg(n){for(let r=vg(n);null!==r;r=yg(r))for(let i=10;i0&&zg(o)}const t=n[1].components;if(null!==t)for(let r=0;r0&&zg(i)}}function NF(n,e){const t=jn(e,n),r=t[1];(function RF(n,e){for(let t=e.length;tPromise.resolve(null))();function JC(n){return n[7]||(n[7]=[])}function XC(n){return n.cleanup||(n.cleanup=[])}function t0(n,e){const t=n[9],r=t?t.get(Qs,null):null;r&&r.handleError(e)}function n0(n,e,t,r,i){for(let o=0;othis.processProvider(a,e,t)),Kr([e],a=>this.processInjectorType(a,[],o)),this.records.set(Kg,ra(void 0,this));const s=this.records.get(Zg);this.scope=null!=s?s.value:null,this.source=i||("object"==typeof e?null:Re(e))}get destroyed(){return this._destroyed}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{this.onDestroy.forEach(e=>e.ngOnDestroy())}finally{this.records.clear(),this.onDestroy.clear(),this.injectorDefTypes.clear()}}get(e,t=Rl,r=ce.Default){this.assertNotDestroyed();const i=TD(this),o=eo(void 0);try{if(!(r&ce.SkipSelf)){let a=this.records.get(e);if(void 0===a){const l=function YF(n){return"function"==typeof n||"object"==typeof n&&n instanceof $}(e)&&Cp(e);a=l&&this.injectableDefInScope(l)?ra(Qg(e),Gl):null,this.records.set(e,a)}if(null!=a)return this.hydrate(e,a)}return(r&ce.Self?o0():this.parent).get(e,t=r&ce.Optional&&t===Rl?null:t)}catch(s){if("NullInjectorError"===s.name){if((s[nd]=s[nd]||[]).unshift(Re(e)),i)throw s;return function CR(n,e,t,r){const i=n[nd];throw e[ID]&&i.unshift(e[ID]),n.message=function ER(n,e,t,r=null){n=n&&"\n"===n.charAt(0)&&"\u0275"==n.charAt(1)?n.substr(2):n;let i=Re(e);if(Array.isArray(e))i=e.map(Re).join(" -> ");else if("object"==typeof e){let o=[];for(let s in e)if(e.hasOwnProperty(s)){let a=e[s];o.push(s+":"+("string"==typeof a?JSON.stringify(a):Re(a)))}i=`{${o.join(", ")}}`}return`${t}${r?"("+r+")":""}[${i}]: ${n.replace(vR,"\n ")}`}("\n"+n.message,i,t,r),n.ngTokenPath=i,n[nd]=null,n}(s,e,"R3InjectorError",this.source)}throw s}finally{eo(o),TD(i)}}_resolveInjectorDefTypes(){this.injectorDefTypes.forEach(e=>this.get(e))}toString(){const e=[];return this.records.forEach((r,i)=>e.push(Re(i))),`R3Injector[${e.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new we(205,!1)}processInjectorType(e,t,r){if(!(e=de(e)))return!1;let i=Lb(e);const o=null==i&&e.ngModule||void 0,s=void 0===o?e:o,a=-1!==r.indexOf(s);if(void 0!==o&&(i=Lb(o)),null==i)return!1;if(null!=i.imports&&!a){let u;r.push(s);try{Kr(i.imports,d=>{this.processInjectorType(d,t,r)&&(void 0===u&&(u=[]),u.push(d))})}finally{}if(void 0!==u)for(let d=0;dthis.processProvider(p,f,h||$e))}}this.injectorDefTypes.add(s);const l=qo(s)||(()=>new s);this.records.set(s,ra(l,Gl));const c=i.providers;if(null!=c&&!a){const u=e;Kr(c,d=>this.processProvider(d,u,c))}return void 0!==o&&void 0!==e.providers}processProvider(e,t,r){let i=ia(e=de(e))?e:de(e&&e.provide);const o=function WF(n,e,t){return c0(n)?ra(void 0,n.useValue):ra(l0(n),Gl)}(e);if(ia(e)||!0!==e.multi)this.records.get(i);else{let s=this.records.get(i);s||(s=ra(void 0,Gl,!0),s.factory=()=>ng(s.multi),this.records.set(i,s)),i=e,s.multi.push(e)}this.records.set(i,o)}hydrate(e,t){return t.value===Gl&&(t.value=HF,t.value=t.factory()),"object"==typeof t.value&&t.value&&function ZF(n){return null!==n&&"object"==typeof n&&"function"==typeof n.ngOnDestroy}(t.value)&&this.onDestroy.add(t.value),t.value}injectableDefInScope(e){if(!e.providedIn)return!1;const t=de(e.providedIn);return"string"==typeof t?"any"===t||t===this.scope:this.injectorDefTypes.has(t)}}function Qg(n){const e=Cp(n),t=null!==e?e.factory:qo(n);if(null!==t)return t;if(n instanceof $)throw new we(204,!1);if(n instanceof Function)return function zF(n){const e=n.length;if(e>0)throw Nl(e,"?"),new we(204,!1);const t=function nN(n){const e=n&&(n[Nu]||n[Bb]);if(e){const t=function rN(n){if(n.hasOwnProperty("name"))return n.name;const e=(""+n).match(/^function\s*([^\s(]+)/);return null===e?"":e[1]}(n);return console.warn(`DEPRECATED: DI is instantiating a token "${t}" that inherits its @Injectable decorator but does not provide one itself.\nThis will become an error in a future version of Angular. Please add @Injectable() to the "${t}" class.`),e}return null}(n);return null!==t?()=>t.factory(n):()=>new n}(n);throw new we(204,!1)}function l0(n,e,t){let r;if(ia(n)){const i=de(n);return qo(i)||Qg(i)}if(c0(n))r=()=>de(n.useValue);else if(function GF(n){return!(!n||!n.useFactory)}(n))r=()=>n.useFactory(...ng(n.deps||[]));else if(function $F(n){return!(!n||!n.useExisting)}(n))r=()=>R(de(n.useExisting));else{const i=de(n&&(n.useClass||n.provide));if(!function KF(n){return!!n.deps}(n))return qo(i)||Qg(i);r=()=>new i(...ng(n.deps))}return r}function ra(n,e,t=!1){return{factory:n,value:e,multi:t?[]:void 0}}function c0(n){return null!==n&&"object"==typeof n&&_R in n}function ia(n){return"function"==typeof n}let _t=(()=>{class n{static create(t,r){var i;if(Array.isArray(t))return s0({name:""},r,t,"");{const o=null!==(i=t.name)&&void 0!==i?i:"";return s0({name:o},t.parent,t.providers,o)}}}return n.THROW_IF_NOT_FOUND=Rl,n.NULL=new r0,n.\u0275prov=W({token:n,providedIn:"any",factory:()=>R(Kg)}),n.__NG_ELEMENT_ID__=-1,n})();function iL(n,e){$u(fg(n)[1],Ot())}function Te(n){let e=function D0(n){return Object.getPrototypeOf(n.prototype).constructor}(n.type),t=!0;const r=[n];for(;e;){let i;if(Sr(n))i=e.\u0275cmp||e.\u0275dir;else{if(e.\u0275cmp)throw new we(903,"");i=e.\u0275dir}if(i){if(t){r.push(i);const s=n;s.inputs=em(n.inputs),s.declaredInputs=em(n.declaredInputs),s.outputs=em(n.outputs);const a=i.hostBindings;a&&lL(n,a);const l=i.viewQuery,c=i.contentQueries;if(l&&sL(n,l),c&&aL(n,c),_p(n.inputs,i.inputs),_p(n.declaredInputs,i.declaredInputs),_p(n.outputs,i.outputs),Sr(i)&&i.data.animation){const u=n.data;u.animation=(u.animation||[]).concat(i.data.animation)}}const o=i.features;if(o)for(let s=0;s=0;r--){const i=n[r];i.hostVars=e+=i.hostVars,i.hostAttrs=Zu(i.hostAttrs,t=Zu(t,i.hostAttrs))}}(r)}function em(n){return n===ks?{}:n===$e?[]:n}function sL(n,e){const t=n.viewQuery;n.viewQuery=t?(r,i)=>{e(r,i),t(r,i)}:e}function aL(n,e){const t=n.contentQueries;n.contentQueries=t?(r,i,o)=>{e(r,i,o),t(r,i,o)}:e}function lL(n,e){const t=n.hostBindings;n.hostBindings=t?(r,i)=>{e(r,i),t(r,i)}:e}let md=null;function oa(){if(!md){const n=je.Symbol;if(n&&n.iterator)md=n.iterator;else{const e=Object.getOwnPropertyNames(Map.prototype);for(let t=0;ta(St(y[r.index])):r.index;if(dt(t)){let y=null;if(!a&&l&&(y=function BL(n,e,t,r){const i=n.cleanup;if(null!=i)for(let o=0;ol?a[l]:null}"string"==typeof s&&(o+=2)}return null}(n,e,i,r.index)),null!==y)(y.__ngLastListenerFn__||y).__ngNextListenerFn__=o,y.__ngLastListenerFn__=o,h=!1;else{o=cm(r,e,d,o,!1);const D=t.listen(_,i,o);f.push(o,D),u&&u.push(i,b,v,v+1)}}else o=cm(r,e,d,o,!0),_.addEventListener(i,o,s),f.push(o),u&&u.push(i,b,v,s)}else o=cm(r,e,d,o,!1);const p=r.outputs;let g;if(h&&null!==p&&(g=p[i])){const m=g.length;if(m)for(let _=0;_0;)e=e[15],n--;return e}(n,te.lFrame.contextLView))[8]}(n)}function jL(n,e){let t=null;const r=function qP(n){const e=n.attrs;if(null!=e){const t=e.indexOf(5);if(0==(1&t))return e[t+1]}return null}(n);for(let i=0;i=0}const Nt={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function tE(n){return n.substring(Nt.key,Nt.keyEnd)}function nE(n,e){const t=Nt.textEnd;return t===e?-1:(e=Nt.keyEnd=function GL(n,e,t){for(;e32;)e++;return e}(n,Nt.key=e,t),va(n,e,t))}function va(n,e,t){for(;e=0;t=nE(e,t))Vn(n,tE(e),!0)}function lE(n,e){return e>=n.expandoStartIndex}function cE(n,e,t,r){const i=n.data;if(null===i[t+1]){const o=i[vn()],s=lE(n,t);hE(o,r)&&null===e&&!s&&(e=!1),e=function YL(n,e,t,r){const i=function Up(n){const e=te.lFrame.currentDirectiveIndex;return-1===e?null:n[e]}(n);let o=r?e.residualClasses:e.residualStyles;if(null===i)0===(r?e.classBindings:e.styleBindings)&&(t=Ql(t=dm(null,n,e,t,r),e.attrs,r),o=null);else{const s=e.directiveStylingLast;if(-1===s||n[s]!==i)if(t=dm(i,n,e,t,r),null===o){let l=function QL(n,e,t){const r=t?e.classBindings:e.styleBindings;if(0!==xi(r))return n[Ir(r)]}(n,e,r);void 0!==l&&Array.isArray(l)&&(l=dm(null,n,e,l[1],r),l=Ql(l,e.attrs,r),function JL(n,e,t,r){n[Ir(t?e.classBindings:e.styleBindings)]=r}(n,e,r,l))}else o=function XL(n,e,t){let r;const i=e.directiveEnd;for(let o=1+e.directiveStylingLast;o0)&&(c=!0)}else u=t;if(i)if(0!==l){const f=Ir(n[a+1]);n[r+1]=ud(f,a),0!==f&&(n[f+1]=Tg(n[f+1],r)),n[a+1]=function eF(n,e){return 131071&n|e<<17}(n[a+1],r)}else n[r+1]=ud(a,0),0!==a&&(n[a+1]=Tg(n[a+1],r)),a=r;else n[r+1]=ud(l,0),0===a?a=r:n[l+1]=Tg(n[l+1],r),l=r;c&&(n[r+1]=Ig(n[r+1])),eE(n,u,r,!0),eE(n,u,r,!1),function HL(n,e,t,r,i){const o=i?n.residualClasses:n.residualStyles;null!=o&&"string"==typeof e&&Gs(o,e)>=0&&(t[r+1]=xg(t[r+1]))}(e,u,n,r,o),s=ud(a,l),o?e.classBindings=s:e.styleBindings=s}(i,o,e,t,s,r)}}function dm(n,e,t,r,i){let o=null;const s=t.directiveEnd;let a=t.directiveStylingLast;for(-1===a?a=t.directiveStart:a++;a0;){const l=n[i],c=Array.isArray(l),u=c?l[1]:l,d=null===u;let f=t[i+1];f===ae&&(f=d?$e:void 0);let h=d?Xp(f,r):u===r?f:void 0;if(c&&!bd(h)&&(h=Xp(l,r)),bd(h)&&(a=h,s))return a;const p=n[i+1];i=s?Ir(p):xi(p)}if(null!==e){let l=o?e.residualClasses:e.residualStyles;null!=l&&(a=Xp(l,r))}return a}function bd(n){return void 0!==n}function hE(n,e){return 0!=(n.flags&(e?16:32))}function Ze(n,e=""){const t=I(),r=Se(),i=n+20,o=r.firstCreatePass?ea(r,i,1,e,null):r.data[i],s=t[i]=function _g(n,e){return dt(n)?n.createText(e):n.createTextNode(e)}(t[11],e);ld(r,t,s,o),qr(o,!1)}function Tn(n){return uo("",n,""),Tn}function uo(n,e,t){const r=I(),i=function aa(n,e,t,r){return on(n,Bs(),t)?e+se(t)+r:ae}(r,n,e,t);return i!==ae&&Ai(r,vn(),i),uo}const Qo=void 0;var CB=["en",[["a","p"],["AM","PM"],Qo],[["AM","PM"],Qo,Qo],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],Qo,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],Qo,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",Qo,"{1} 'at' {0}",Qo],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function DB(n){const t=Math.floor(Math.abs(n)),r=n.toString().replace(/^[^.]*\.?/,"").length;return 1===t&&0===r?1:5}];let ya={};function RE(n){return n in ya||(ya[n]=je.ng&&je.ng.common&&je.ng.common.locales&&je.ng.common.locales[n]),ya[n]}var L=(()=>((L=L||{})[L.LocaleId=0]="LocaleId",L[L.DayPeriodsFormat=1]="DayPeriodsFormat",L[L.DayPeriodsStandalone=2]="DayPeriodsStandalone",L[L.DaysFormat=3]="DaysFormat",L[L.DaysStandalone=4]="DaysStandalone",L[L.MonthsFormat=5]="MonthsFormat",L[L.MonthsStandalone=6]="MonthsStandalone",L[L.Eras=7]="Eras",L[L.FirstDayOfWeek=8]="FirstDayOfWeek",L[L.WeekendRange=9]="WeekendRange",L[L.DateFormat=10]="DateFormat",L[L.TimeFormat=11]="TimeFormat",L[L.DateTimeFormat=12]="DateTimeFormat",L[L.NumberSymbols=13]="NumberSymbols",L[L.NumberFormats=14]="NumberFormats",L[L.CurrencyCode=15]="CurrencyCode",L[L.CurrencySymbol=16]="CurrencySymbol",L[L.CurrencyName=17]="CurrencyName",L[L.Currencies=18]="Currencies",L[L.Directionality=19]="Directionality",L[L.PluralCase=20]="PluralCase",L[L.ExtraData=21]="ExtraData",L))();const Dd="en-US";let PE=Dd;function pm(n,e,t,r,i){if(n=de(n),Array.isArray(n))for(let o=0;o>20;if(ia(n)||!n.multi){const h=new Ml(l,i,S),p=mm(a,e,i?u:u+f,d);-1===p?(Ju(Tl(c,s),o,a),gm(o,n,e.length),e.push(a),c.directiveStart++,c.directiveEnd++,i&&(c.providerIndexes+=1048576),t.push(h),s.push(h)):(t[p]=h,s[p]=h)}else{const h=mm(a,e,u+f,d),p=mm(a,e,u,u+f),g=h>=0&&t[h],m=p>=0&&t[p];if(i&&!m||!i&&!g){Ju(Tl(c,s),o,a);const _=function Dj(n,e,t,r,i){const o=new Ml(n,t,S);return o.multi=[],o.index=e,o.componentProviders=0,ow(o,i,r&&!t),o}(i?bj:_j,t.length,i,r,l);!i&&m&&(t[p].providerFactory=_),gm(o,n,e.length,0),e.push(a),c.directiveStart++,c.directiveEnd++,i&&(c.providerIndexes+=1048576),t.push(_),s.push(_)}else gm(o,n,h>-1?h:p,ow(t[i?p:h],l,!i&&r));!i&&r&&m&&t[p].componentProviders++}}}function gm(n,e,t,r){const i=ia(e),o=function qF(n){return!!n.useClass}(e);if(i||o){const l=(o?de(e.useClass):e).prototype.ngOnDestroy;if(l){const c=n.destroyHooks||(n.destroyHooks=[]);if(!i&&e.multi){const u=c.indexOf(t);-1===u?c.push(t,[r,l]):c[u+1].push(r,l)}else c.push(t,l)}}}function ow(n,e,t){return t&&n.componentProviders++,n.multi.push(e)-1}function mm(n,e,t,r){for(let i=t;i{t.providersResolver=(r,i)=>function yj(n,e,t){const r=Se();if(r.firstCreatePass){const i=Sr(n);pm(t,r.data,r.blueprint,i,!0),pm(e,r.data,r.blueprint,i,!1)}}(r,i?i(n):n,e)}}class sw{}class wj{resolveComponentFactory(e){throw function Ej(n){const e=Error(`No component factory found for ${Re(n)}. Did you add it to @NgModule.entryComponents?`);return e.ngComponent=n,e}(e)}}let Ri=(()=>{class n{}return n.NULL=new wj,n})();function Sj(){return ba(Ot(),I())}function ba(n,e){return new bt(rr(n,e))}let bt=(()=>{class n{constructor(t){this.nativeElement=t}}return n.__NG_ELEMENT_ID__=Sj,n})();function Mj(n){return n instanceof bt?n.nativeElement:n}class lw{}let ii=(()=>{class n{}return n.__NG_ELEMENT_ID__=()=>function Tj(){const n=I(),t=jn(Ot().index,n);return function Ij(n){return n[11]}(Gr(t)?t:n)}(),n})(),xj=(()=>{class n{}return n.\u0275prov=W({token:n,providedIn:"root",factory:()=>null}),n})();class Da{constructor(e){this.full=e,this.major=e.split(".")[0],this.minor=e.split(".")[1],this.patch=e.split(".").slice(2).join(".")}}const Aj=new Da("13.2.3"),ym={};function Md(n,e,t,r,i=!1){for(;null!==t;){const o=e[t.index];if(null!==o&&r.push(St(o)),wr(o))for(let a=10;a-1&&(Dg(e,r),ed(t,r))}this._attachedToViewContainer=!1}aC(this._lView[1],this._lView)}onDestroy(e){UC(this._lView[1],this._lView,null,e)}markForCheck(){Wg(this._cdRefInjectingView||this._lView)}detach(){this._lView[2]&=-129}reattach(){this._lView[2]|=128}detectChanges(){Gg(this._lView[1],this._lView,this.context)}checkNoChanges(){!function FF(n,e,t){Uu(!0);try{Gg(n,e,t)}finally{Uu(!1)}}(this._lView[1],this._lView,this.context)}attachToViewContainerRef(){if(this._appRef)throw new we(902,"");this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function kP(n,e){zl(n,e,e[11],2,null,null)}(this._lView[1],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new we(902,"");this._appRef=e}}class Oj extends nc{constructor(e){super(e),this._view=e}detectChanges(){QC(this._view)}checkNoChanges(){!function LF(n){Uu(!0);try{QC(n)}finally{Uu(!1)}}(this._view)}get context(){return null}}class cw extends Ri{constructor(e){super(),this.ngModule=e}resolveComponentFactory(e){const t=tn(e);return new _m(t,this.ngModule)}}function uw(n){const e=[];for(let t in n)n.hasOwnProperty(t)&&e.push({propName:n[t],templateName:t});return e}const Nj=new $("SCHEDULER_TOKEN",{providedIn:"root",factory:()=>XD});class _m extends sw{constructor(e,t){super(),this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=function JP(n){return n.map(QP).join(",")}(e.selectors),this.ngContentSelectors=e.ngContentSelectors?e.ngContentSelectors:[],this.isBoundToModule=!!t}get inputs(){return uw(this.componentDef.inputs)}get outputs(){return uw(this.componentDef.outputs)}create(e,t,r,i){const o=(i=i||this.ngModule)?function Rj(n,e){return{get:(t,r,i)=>{const o=n.get(t,ym,i);return o!==ym||r===ym?o:e.get(t,r,i)}}}(e,i.injector):e,s=o.get(lw,Yb),a=o.get(xj,null),l=s.createRenderer(null,this.componentDef),c=this.componentDef.selectors[0][0]||"div",u=r?function HC(n,e,t){if(dt(n))return n.selectRootElement(e,t===$r.ShadowDom);let r="string"==typeof e?n.querySelector(e):e;return r.textContent="",r}(l,r,this.componentDef.encapsulation):bg(s.createRenderer(null,this.componentDef),c,function kj(n){const e=n.toLowerCase();return"svg"===e?"svg":"math"===e?"math":null}(c)),d=this.componentDef.onPush?576:528,f=function b0(n,e){return{components:[],scheduler:n||XD,clean:BF,playerHandler:e||null,flags:0}}(),h=hd(0,null,null,1,0,null,null,null,null,null),p=Wl(null,h,f,d,null,null,s,l,a,o);let g,m;zu(p);try{const _=function y0(n,e,t,r,i,o){const s=t[1];t[20]=n;const l=ea(s,20,2,"#host",null),c=l.mergedAttrs=e.hostAttrs;null!==c&&(gd(l,c,!0),null!==n&&(Ku(i,n,c),null!==l.classes&&Mg(i,n,l.classes),null!==l.styles&&_C(i,n,l.styles)));const u=r.createRenderer(n,e),d=Wl(t,jC(e),null,e.onPush?64:16,t[20],l,r,u,o||null,null);return s.firstCreatePass&&(Ju(Tl(l,t),s,e.type),qC(s,l),KC(l,t.length,1)),pd(t,d),t[20]=d}(u,this.componentDef,p,s,l);if(u)if(r)Ku(l,u,["ng-version",Aj.full]);else{const{attrs:v,classes:b}=function XP(n){const e=[],t=[];let r=1,i=2;for(;r0&&Mg(l,u,b.join(" "))}if(m=Fp(h,20),void 0!==t){const v=m.projection=[];for(let b=0;bl(s,e)),e.contentQueries){const l=Ot();e.contentQueries(1,s,l.directiveStart)}const a=Ot();return!o.firstCreatePass||null===e.hostBindings&&null===e.hostAttrs||(io(a.index),$C(t[1],a,0,a.directiveStart,a.directiveEnd,e),GC(e,s)),s}(_,this.componentDef,p,f,[iL]),$l(h,p,null)}finally{Wu()}return new Fj(this.componentType,g,ba(m,p),p,m)}}class Fj extends class Cj{}{constructor(e,t,r,i,o){super(),this.location=r,this._rootLView=i,this._tNode=o,this.instance=t,this.hostView=this.changeDetectorRef=new Oj(i),this.componentType=e}get injector(){return new Hs(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}}class Pi{}class dw{}const Ca=new Map;class pw extends Pi{constructor(e,t){super(),this._parent=t,this._bootstrapComponents=[],this.injector=this,this.destroyCbs=[],this.componentFactoryResolver=new cw(this);const r=Xn(e);this._bootstrapComponents=Jr(r.bootstrap),this._r3Injector=a0(e,t,[{provide:Pi,useValue:this},{provide:Ri,useValue:this.componentFactoryResolver}],Re(e)),this._r3Injector._resolveInjectorDefTypes(),this.instance=this.get(e)}get(e,t=_t.THROW_IF_NOT_FOUND,r=ce.Default){return e===_t||e===Pi||e===Kg?this:this._r3Injector.get(e,t,r)}destroy(){const e=this._r3Injector;!e.destroyed&&e.destroy(),this.destroyCbs.forEach(t=>t()),this.destroyCbs=null}onDestroy(e){this.destroyCbs.push(e)}}class bm extends dw{constructor(e){super(),this.moduleType=e,null!==Xn(e)&&function Bj(n){const e=new Set;!function t(r){const i=Xn(r,!0),o=i.id;null!==o&&(function fw(n,e,t){if(e&&e!==t)throw new Error(`Duplicate module registered for ${n} - ${Re(e)} vs ${Re(e.name)}`)}(o,Ca.get(o),r),Ca.set(o,r));const s=Jr(i.imports);for(const a of s)e.has(a)||(e.add(a),t(a))}(n)}(e)}create(e){return new pw(this.moduleType,e)}}function Or(n,e,t,r){return mw(I(),mn(),n,e,t,r)}function Dm(n,e,t,r,i){return function vw(n,e,t,r,i,o,s){const a=e+t;return Yo(n,a,i,o)?ei(n,a+2,s?r.call(s,i,o):r(i,o)):rc(n,a+2)}(I(),mn(),n,e,t,r,i)}function rc(n,e){const t=n[e];return t===ae?void 0:t}function mw(n,e,t,r,i,o){const s=e+t;return on(n,s,i)?ei(n,s+1,o?r.call(o,i):r(i)):rc(n,s+1)}function yw(n,e,t,r,i,o,s,a){const l=e+t;return function vd(n,e,t,r,i){const o=Yo(n,e,t,r);return on(n,e+2,i)||o}(n,l,i,o,s)?ei(n,l+3,a?r.call(a,i,o,s):r(i,o,s)):rc(n,l+3)}function Id(n,e){const t=Se();let r;const i=n+20;t.firstCreatePass?(r=function Gj(n,e){if(e)for(let t=e.length-1;t>=0;t--){const r=e[t];if(n===r.name)return r}}(e,t.pipeRegistry),t.data[i]=r,r.onDestroy&&(t.destroyHooks||(t.destroyHooks=[])).push(i,r.onDestroy)):r=t.data[i];const o=r.factory||(r.factory=qo(r.type)),s=eo(S);try{const a=Yu(!1),l=o();return Yu(a),function mL(n,e,t,r){t>=n.data.length&&(n.data[t]=null,n.blueprint[t]=null),e[t]=r}(t,I(),i,l),l}finally{eo(s)}}function Cm(n,e,t){const r=n+20,i=I(),o=Ls(i,r);return ic(i,r)?mw(i,mn(),e,o.transform,t,o):o.transform(t)}function ic(n,e){return n[1].data[e].pure}function Em(n){return e=>{setTimeout(n,void 0,e)}}const Ae=class Yj extends Me{constructor(e=!1){super(),this.__isAsync=e}emit(e){super.next(e)}subscribe(e,t,r){var i,o,s;let a=e,l=t||(()=>null),c=r;if(e&&"object"==typeof e){const d=e;a=null===(i=d.next)||void 0===i?void 0:i.bind(d),l=null===(o=d.error)||void 0===o?void 0:o.bind(d),c=null===(s=d.complete)||void 0===s?void 0:s.bind(d)}this.__isAsync&&(l=Em(l),a&&(a=Em(a)),c&&(c=Em(c)));const u=super.subscribe({next:a,error:l,complete:c});return e instanceof ke&&e.add(u),u}};function Qj(){return this._results[oa()]()}class oc{constructor(e=!1){this._emitDistinctChangesOnly=e,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;const t=oa(),r=oc.prototype;r[t]||(r[t]=Qj)}get changes(){return this._changes||(this._changes=new Ae)}get(e){return this._results[e]}map(e){return this._results.map(e)}filter(e){return this._results.filter(e)}find(e){return this._results.find(e)}reduce(e,t){return this._results.reduce(e,t)}forEach(e){this._results.forEach(e)}some(e){return this._results.some(e)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(e,t){const r=this;r.dirty=!1;const i=ir(e);(this._changesDetected=!function lR(n,e,t){if(n.length!==e.length)return!1;for(let r=0;r{class n{}return n.__NG_ELEMENT_ID__=eV,n})();const Jj=oi,Xj=class extends Jj{constructor(e,t,r){super(),this._declarationLView=e,this._declarationTContainer=t,this.elementRef=r}createEmbeddedView(e){const t=this._declarationTContainer.tViews,r=Wl(this._declarationLView,t,e,16,null,t.declTNode,null,null,null,null);r[17]=this._declarationLView[this._declarationTContainer.index];const o=this._declarationLView[19];return null!==o&&(r[19]=o.createEmbeddedView(t)),$l(t,r,e),new nc(r)}};function eV(){return Td(Ot(),I())}function Td(n,e){return 4&n.type?new Xj(e,n,ba(n,e)):null}let sr=(()=>{class n{}return n.__NG_ELEMENT_ID__=tV,n})();function tV(){return ww(Ot(),I())}const nV=sr,Cw=class extends nV{constructor(e,t,r){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=r}get element(){return ba(this._hostTNode,this._hostLView)}get injector(){return new Hs(this._hostTNode,this._hostLView)}get parentInjector(){const e=Qu(this._hostTNode,this._hostLView);if(fD(e)){const t=Vs(e,this._hostLView),r=js(e);return new Hs(t[1].data[r+8],t)}return new Hs(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){const t=Ew(this._lContainer);return null!==t&&t[e]||null}get length(){return this._lContainer.length-10}createEmbeddedView(e,t,r){const i=e.createEmbeddedView(t||{});return this.insert(i,r),i}createComponent(e,t,r,i,o){const s=e&&!function kl(n){return"function"==typeof n}(e);let a;if(s)a=t;else{const d=t||{};a=d.index,r=d.injector,i=d.projectableNodes,o=d.ngModuleRef}const l=s?e:new _m(tn(e)),c=r||this.parentInjector;if(!o&&null==l.ngModule){const f=(s?c:this.parentInjector).get(Pi,null);f&&(o=f)}const u=l.create(c,i,void 0,o);return this.insert(u.hostView,a),u}insert(e,t){const r=e._lView,i=r[1];if(function xN(n){return wr(n[3])}(r)){const u=this.indexOf(e);if(-1!==u)this.detach(u);else{const d=r[3],f=new Cw(d,d[6],d[3]);f.detach(f.indexOf(e))}}const o=this._adjustIndex(t),s=this._lContainer;!function RP(n,e,t,r){const i=10+r,o=t.length;r>0&&(t[i-1][4]=e),r0)r.push(s[a/2]);else{const c=o[a+1],u=e[-l];for(let d=10;d{class n{constructor(t){this.appInits=t,this.resolve=kd,this.reject=kd,this.initialized=!1,this.done=!1,this.donePromise=new Promise((r,i)=>{this.resolve=r,this.reject=i})}runInitializers(){if(this.initialized)return;const t=[],r=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let i=0;i{o.subscribe({complete:a,error:l})});t.push(s)}}Promise.all(t).then(()=>{r()}).catch(i=>{this.reject(i)}),0===t.length&&r(),this.initialized=!0}}return n.\u0275fac=function(t){return new(t||n)(R(Nd,8))},n.\u0275prov=W({token:n,factory:n.\u0275fac}),n})();const ac=new $("AppId"),TV={provide:ac,useFactory:function IV(){return`${Pm()}${Pm()}${Pm()}`},deps:[]};function Pm(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const Gw=new $("Platform Initializer"),lc=new $("Platform ID"),qw=new $("appBootstrapListener");let Kw=(()=>{class n{log(t){console.log(t)}warn(t){console.warn(t)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=W({token:n,factory:n.\u0275fac}),n})();const fo=new $("LocaleId"),Zw=new $("DefaultCurrencyCode");class xV{constructor(e,t){this.ngModuleFactory=e,this.componentFactories=t}}let Rd=(()=>{class n{compileModuleSync(t){return new bm(t)}compileModuleAsync(t){return Promise.resolve(this.compileModuleSync(t))}compileModuleAndAllComponentsSync(t){const r=this.compileModuleSync(t),o=Jr(Xn(t).declarations).reduce((s,a)=>{const l=tn(a);return l&&s.push(new _m(l)),s},[]);return new xV(r,o)}compileModuleAndAllComponentsAsync(t){return Promise.resolve(this.compileModuleAndAllComponentsSync(t))}clearCache(){}clearCacheFor(t){}getModuleId(t){}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=W({token:n,factory:n.\u0275fac}),n})();const OV=(()=>Promise.resolve(0))();function Fm(n){"undefined"==typeof Zone?OV.then(()=>{n&&n.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",n)}class ot{constructor({enableLongStackTrace:e=!1,shouldCoalesceEventChangeDetection:t=!1,shouldCoalesceRunChangeDetection:r=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new Ae(!1),this.onMicrotaskEmpty=new Ae(!1),this.onStable=new Ae(!1),this.onError=new Ae(!1),"undefined"==typeof Zone)throw new Error("In this configuration Angular requires Zone.js");Zone.assertZonePatched();const i=this;i._nesting=0,i._outer=i._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(i._inner=i._inner.fork(new Zone.TaskTrackingZoneSpec)),e&&Zone.longStackTraceZoneSpec&&(i._inner=i._inner.fork(Zone.longStackTraceZoneSpec)),i.shouldCoalesceEventChangeDetection=!r&&t,i.shouldCoalesceRunChangeDetection=r,i.lastRequestAnimationFrameId=-1,i.nativeRequestAnimationFrame=function kV(){let n=je.requestAnimationFrame,e=je.cancelAnimationFrame;if("undefined"!=typeof Zone&&n&&e){const t=n[Zone.__symbol__("OriginalDelegate")];t&&(n=t);const r=e[Zone.__symbol__("OriginalDelegate")];r&&(e=r)}return{nativeRequestAnimationFrame:n,nativeCancelAnimationFrame:e}}().nativeRequestAnimationFrame,function PV(n){const e=()=>{!function RV(n){n.isCheckStableRunning||-1!==n.lastRequestAnimationFrameId||(n.lastRequestAnimationFrameId=n.nativeRequestAnimationFrame.call(je,()=>{n.fakeTopEventTask||(n.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{n.lastRequestAnimationFrameId=-1,Bm(n),n.isCheckStableRunning=!0,Lm(n),n.isCheckStableRunning=!1},void 0,()=>{},()=>{})),n.fakeTopEventTask.invoke()}),Bm(n))}(n)};n._inner=n._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(t,r,i,o,s,a)=>{try{return Yw(n),t.invokeTask(i,o,s,a)}finally{(n.shouldCoalesceEventChangeDetection&&"eventTask"===o.type||n.shouldCoalesceRunChangeDetection)&&e(),Qw(n)}},onInvoke:(t,r,i,o,s,a,l)=>{try{return Yw(n),t.invoke(i,o,s,a,l)}finally{n.shouldCoalesceRunChangeDetection&&e(),Qw(n)}},onHasTask:(t,r,i,o)=>{t.hasTask(i,o),r===i&&("microTask"==o.change?(n._hasPendingMicrotasks=o.microTask,Bm(n),Lm(n)):"macroTask"==o.change&&(n.hasPendingMacrotasks=o.macroTask))},onHandleError:(t,r,i,o)=>(t.handleError(i,o),n.runOutsideAngular(()=>n.onError.emit(o)),!1)})}(i)}static isInAngularZone(){return"undefined"!=typeof Zone&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!ot.isInAngularZone())throw new Error("Expected to be in Angular Zone, but it is not!")}static assertNotInAngularZone(){if(ot.isInAngularZone())throw new Error("Expected to not be in Angular Zone, but it is!")}run(e,t,r){return this._inner.run(e,t,r)}runTask(e,t,r,i){const o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+i,e,NV,kd,kd);try{return o.runTask(s,t,r)}finally{o.cancelTask(s)}}runGuarded(e,t,r){return this._inner.runGuarded(e,t,r)}runOutsideAngular(e){return this._outer.run(e)}}const NV={};function Lm(n){if(0==n._nesting&&!n.hasPendingMicrotasks&&!n.isStable)try{n._nesting++,n.onMicrotaskEmpty.emit(null)}finally{if(n._nesting--,!n.hasPendingMicrotasks)try{n.runOutsideAngular(()=>n.onStable.emit(null))}finally{n.isStable=!0}}}function Bm(n){n.hasPendingMicrotasks=!!(n._hasPendingMicrotasks||(n.shouldCoalesceEventChangeDetection||n.shouldCoalesceRunChangeDetection)&&-1!==n.lastRequestAnimationFrameId)}function Yw(n){n._nesting++,n.isStable&&(n.isStable=!1,n.onUnstable.emit(null))}function Qw(n){n._nesting--,Lm(n)}class FV{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new Ae,this.onMicrotaskEmpty=new Ae,this.onStable=new Ae,this.onError=new Ae}run(e,t,r){return e.apply(t,r)}runGuarded(e,t,r){return e.apply(t,r)}runOutsideAngular(e){return e()}runTask(e,t,r,i){return e.apply(t,r)}}let jm=(()=>{class n{constructor(t){this._ngZone=t,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,this._watchAngularEvents(),t.run(()=>{this.taskTrackingZone="undefined"==typeof Zone?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{ot.assertNotInAngularZone(),Fm(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())Fm(()=>{for(;0!==this._callbacks.length;){let t=this._callbacks.pop();clearTimeout(t.timeoutId),t.doneCb(this._didWork)}this._didWork=!1});else{let t=this.getPendingTasks();this._callbacks=this._callbacks.filter(r=>!r.updateCb||!r.updateCb(t)||(clearTimeout(r.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(t=>({source:t.source,creationLocation:t.creationLocation,data:t.data})):[]}addCallback(t,r,i){let o=-1;r&&r>0&&(o=setTimeout(()=>{this._callbacks=this._callbacks.filter(s=>s.timeoutId!==o),t(this._didWork,this.getPendingTasks())},r)),this._callbacks.push({doneCb:t,timeoutId:o,updateCb:i})}whenStable(t,r,i){if(i&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(t,r,i),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}findProviders(t,r,i){return[]}}return n.\u0275fac=function(t){return new(t||n)(R(ot))},n.\u0275prov=W({token:n,factory:n.\u0275fac}),n})(),Jw=(()=>{class n{constructor(){this._applications=new Map,Vm.addToWindow(this)}registerApplication(t,r){this._applications.set(t,r)}unregisterApplication(t){this._applications.delete(t)}unregisterAllApplications(){this._applications.clear()}getTestability(t){return this._applications.get(t)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(t,r=!0){return Vm.findTestabilityInTree(this,t,r)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=W({token:n,factory:n.\u0275fac}),n})();class LV{addToWindow(e){}findTestabilityInTree(e,t,r){return null}}let kr,Vm=new LV;const Xw=new $("AllowMultipleToken");class eS{constructor(e,t){this.name=e,this.token=t}}function tS(n,e,t=[]){const r=`Platform: ${e}`,i=new $(r);return(o=[])=>{let s=nS();if(!s||s.injector.get(Xw,!1))if(n)n(t.concat(o).concat({provide:i,useValue:!0}));else{const a=t.concat(o).concat({provide:i,useValue:!0},{provide:Zg,useValue:"platform"});!function HV(n){if(kr&&!kr.destroyed&&!kr.injector.get(Xw,!1))throw new we(400,"");kr=n.get(rS);const e=n.get(Gw,null);e&&e.forEach(t=>t())}(_t.create({providers:a,name:r}))}return function UV(n){const e=nS();if(!e)throw new we(401,"");return e}()}}function nS(){return kr&&!kr.destroyed?kr:null}let rS=(()=>{class n{constructor(t){this._injector=t,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(t,r){const a=function zV(n,e){let t;return t="noop"===n?new FV:("zone.js"===n?void 0:n)||new ot({enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!!(null==e?void 0:e.ngZoneEventCoalescing),shouldCoalesceRunChangeDetection:!!(null==e?void 0:e.ngZoneRunCoalescing)}),t}(r?r.ngZone:void 0,{ngZoneEventCoalescing:r&&r.ngZoneEventCoalescing||!1,ngZoneRunCoalescing:r&&r.ngZoneRunCoalescing||!1}),l=[{provide:ot,useValue:a}];return a.run(()=>{const c=_t.create({providers:l,parent:this.injector,name:t.moduleType.name}),u=t.create(c),d=u.injector.get(Qs,null);if(!d)throw new we(402,"");return a.runOutsideAngular(()=>{const f=a.onError.subscribe({next:h=>{d.handleError(h)}});u.onDestroy(()=>{Hm(this._modules,u),f.unsubscribe()})}),function WV(n,e,t){try{const r=t();return Zl(r)?r.catch(i=>{throw e.runOutsideAngular(()=>n.handleError(i)),i}):r}catch(r){throw e.runOutsideAngular(()=>n.handleError(r)),r}}(d,a,()=>{const f=u.injector.get(wa);return f.runInitializers(),f.donePromise.then(()=>(function IB(n){Ln(n,"Expected localeId to be defined"),"string"==typeof n&&(PE=n.toLowerCase().replace(/_/g,"-"))}(u.injector.get(fo,Dd)||Dd),this._moduleDoBootstrap(u),u))})})}bootstrapModule(t,r=[]){const i=iS({},r);return function jV(n,e,t){const r=new bm(t);return Promise.resolve(r)}(0,0,t).then(o=>this.bootstrapModuleFactory(o,i))}_moduleDoBootstrap(t){const r=t.injector.get(Xo);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(i=>r.bootstrap(i));else{if(!t.instance.ngDoBootstrap)throw new we(403,"");t.instance.ngDoBootstrap(r)}this._modules.push(t)}onDestroy(t){this._destroyListeners.push(t)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new we(404,"");this._modules.slice().forEach(t=>t.destroy()),this._destroyListeners.forEach(t=>t()),this._destroyed=!0}get destroyed(){return this._destroyed}}return n.\u0275fac=function(t){return new(t||n)(R(_t))},n.\u0275prov=W({token:n,factory:n.\u0275fac}),n})();function iS(n,e){return Array.isArray(e)?e.reduce(iS,n):Object.assign(Object.assign({},n),e)}let Xo=(()=>{class n{constructor(t,r,i,o,s){this._zone=t,this._injector=r,this._exceptionHandler=i,this._componentFactoryResolver=o,this._initStatus=s,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const a=new Ne(c=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{c.next(this._stable),c.complete()})}),l=new Ne(c=>{let u;this._zone.runOutsideAngular(()=>{u=this._zone.onStable.subscribe(()=>{ot.assertNotInAngularZone(),Fm(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,c.next(!0))})})});const d=this._zone.onUnstable.subscribe(()=>{ot.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{c.next(!1)}))});return()=>{u.unsubscribe(),d.unsubscribe()}});this.isStable=vp(a,l.pipe(function Y1(){return n=>yp()(function q1(n,e){return function(r){let i;if(i="function"==typeof n?n:function(){return n},"function"==typeof e)return r.lift(new K1(i,e));const o=Object.create(r,W1);return o.source=r,o.subjectFactory=i,o}}(Z1)(n))}()))}bootstrap(t,r){if(!this._initStatus.done)throw new we(405,"");let i;i=t instanceof sw?t:this._componentFactoryResolver.resolveComponentFactory(t),this.componentTypes.push(i.componentType);const o=function VV(n){return n.isBoundToModule}(i)?void 0:this._injector.get(Pi),a=i.create(_t.NULL,[],r||i.selector,o),l=a.location.nativeElement,c=a.injector.get(jm,null),u=c&&a.injector.get(Jw);return c&&u&&u.registerApplication(l,c),a.onDestroy(()=>{this.detachView(a.hostView),Hm(this.components,a),u&&u.unregisterApplication(l)}),this._loadComponent(a),a}tick(){if(this._runningTick)throw new we(101,"");try{this._runningTick=!0;for(let t of this._views)t.detectChanges()}catch(t){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(t))}finally{this._runningTick=!1}}attachView(t){const r=t;this._views.push(r),r.attachToAppRef(this)}detachView(t){const r=t;Hm(this._views,r),r.detachFromAppRef()}_loadComponent(t){this.attachView(t.hostView),this.tick(),this.components.push(t),this._injector.get(qw,[]).concat(this._bootstrapListeners).forEach(i=>i(t))}ngOnDestroy(){this._views.slice().forEach(t=>t.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}get viewCount(){return this._views.length}}return n.\u0275fac=function(t){return new(t||n)(R(ot),R(_t),R(Qs),R(Ri),R(wa))},n.\u0275prov=W({token:n,factory:n.\u0275fac}),n})();function Hm(n,e){const t=n.indexOf(e);t>-1&&n.splice(t,1)}let sS=!0,es=(()=>{class n{}return n.__NG_ELEMENT_ID__=qV,n})();function qV(n){return function KV(n,e,t){if(Bu(n)&&!t){const r=jn(n.index,e);return new nc(r,r)}return 47&n.type?new nc(e[16],e):null}(Ot(),I(),16==(16&n))}class dS{constructor(){}supports(e){return ql(e)}create(e){return new e2(e)}}const XV=(n,e)=>e;class e2{constructor(e){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=e||XV}forEachItem(e){let t;for(t=this._itHead;null!==t;t=t._next)e(t)}forEachOperation(e){let t=this._itHead,r=this._removalsHead,i=0,o=null;for(;t||r;){const s=!r||t&&t.currentIndex{s=this._trackByFn(i,a),null!==t&&Object.is(t.trackById,s)?(r&&(t=this._verifyReinsertion(t,a,s,i)),Object.is(t.item,a)||this._addIdentityChange(t,a)):(t=this._mismatch(t,a,s,i),r=!0),t=t._next,i++}),this.length=i;return this._truncate(t),this.collection=e,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let e;for(e=this._previousItHead=this._itHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._additionsHead;null!==e;e=e._nextAdded)e.previousIndex=e.currentIndex;for(this._additionsHead=this._additionsTail=null,e=this._movesHead;null!==e;e=e._nextMoved)e.previousIndex=e.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(e,t,r,i){let o;return null===e?o=this._itTail:(o=e._prev,this._remove(e)),null!==(e=null===this._unlinkedRecords?null:this._unlinkedRecords.get(r,null))?(Object.is(e.item,t)||this._addIdentityChange(e,t),this._reinsertAfter(e,o,i)):null!==(e=null===this._linkedRecords?null:this._linkedRecords.get(r,i))?(Object.is(e.item,t)||this._addIdentityChange(e,t),this._moveAfter(e,o,i)):e=this._addAfter(new t2(t,r),o,i),e}_verifyReinsertion(e,t,r,i){let o=null===this._unlinkedRecords?null:this._unlinkedRecords.get(r,null);return null!==o?e=this._reinsertAfter(o,e._prev,i):e.currentIndex!=i&&(e.currentIndex=i,this._addToMoves(e,i)),e}_truncate(e){for(;null!==e;){const t=e._next;this._addToRemovals(this._unlink(e)),e=t}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(e,t,r){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(e);const i=e._prevRemoved,o=e._nextRemoved;return null===i?this._removalsHead=o:i._nextRemoved=o,null===o?this._removalsTail=i:o._prevRemoved=i,this._insertAfter(e,t,r),this._addToMoves(e,r),e}_moveAfter(e,t,r){return this._unlink(e),this._insertAfter(e,t,r),this._addToMoves(e,r),e}_addAfter(e,t,r){return this._insertAfter(e,t,r),this._additionsTail=null===this._additionsTail?this._additionsHead=e:this._additionsTail._nextAdded=e,e}_insertAfter(e,t,r){const i=null===t?this._itHead:t._next;return e._next=i,e._prev=t,null===i?this._itTail=e:i._prev=e,null===t?this._itHead=e:t._next=e,null===this._linkedRecords&&(this._linkedRecords=new fS),this._linkedRecords.put(e),e.currentIndex=r,e}_remove(e){return this._addToRemovals(this._unlink(e))}_unlink(e){null!==this._linkedRecords&&this._linkedRecords.remove(e);const t=e._prev,r=e._next;return null===t?this._itHead=r:t._next=r,null===r?this._itTail=t:r._prev=t,e}_addToMoves(e,t){return e.previousIndex===t||(this._movesTail=null===this._movesTail?this._movesHead=e:this._movesTail._nextMoved=e),e}_addToRemovals(e){return null===this._unlinkedRecords&&(this._unlinkedRecords=new fS),this._unlinkedRecords.put(e),e.currentIndex=null,e._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=e,e._prevRemoved=null):(e._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=e),e}_addIdentityChange(e,t){return e.item=t,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=e:this._identityChangesTail._nextIdentityChange=e,e}}class t2{constructor(e,t){this.item=e,this.trackById=t,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class n2{constructor(){this._head=null,this._tail=null}add(e){null===this._head?(this._head=this._tail=e,e._nextDup=null,e._prevDup=null):(this._tail._nextDup=e,e._prevDup=this._tail,e._nextDup=null,this._tail=e)}get(e,t){let r;for(r=this._head;null!==r;r=r._nextDup)if((null===t||t<=r.currentIndex)&&Object.is(r.trackById,e))return r;return null}remove(e){const t=e._prevDup,r=e._nextDup;return null===t?this._head=r:t._nextDup=r,null===r?this._tail=t:r._prevDup=t,null===this._head}}class fS{constructor(){this.map=new Map}put(e){const t=e.trackById;let r=this.map.get(t);r||(r=new n2,this.map.set(t,r)),r.add(e)}get(e,t){const i=this.map.get(e);return i?i.get(e,t):null}remove(e){const t=e.trackById;return this.map.get(t).remove(e)&&this.map.delete(t),e}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function hS(n,e,t){const r=n.previousIndex;if(null===r)return r;let i=0;return t&&r{if(t&&t.key===i)this._maybeAddToChanges(t,r),this._appendAfter=t,t=t._next;else{const o=this._getOrCreateRecordForKey(i,r);t=this._insertBeforeOrAppend(t,o)}}),t){t._prev&&(t._prev._next=null),this._removalsHead=t;for(let r=t;null!==r;r=r._nextRemoved)r===this._mapHead&&(this._mapHead=null),this._records.delete(r.key),r._nextRemoved=r._next,r.previousValue=r.currentValue,r.currentValue=null,r._prev=null,r._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(e,t){if(e){const r=e._prev;return t._next=e,t._prev=r,e._prev=t,r&&(r._next=t),e===this._mapHead&&(this._mapHead=t),this._appendAfter=e,e}return this._appendAfter?(this._appendAfter._next=t,t._prev=this._appendAfter):this._mapHead=t,this._appendAfter=t,null}_getOrCreateRecordForKey(e,t){if(this._records.has(e)){const i=this._records.get(e);this._maybeAddToChanges(i,t);const o=i._prev,s=i._next;return o&&(o._next=s),s&&(s._prev=o),i._next=null,i._prev=null,i}const r=new o2(e);return this._records.set(e,r),r.currentValue=t,this._addToAdditions(r),r}_reset(){if(this.isDirty){let e;for(this._previousMapHead=this._mapHead,e=this._previousMapHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._changesHead;null!==e;e=e._nextChanged)e.previousValue=e.currentValue;for(e=this._additionsHead;null!=e;e=e._nextAdded)e.previousValue=e.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(e,t){Object.is(t,e.currentValue)||(e.previousValue=e.currentValue,e.currentValue=t,this._addToChanges(e))}_addToAdditions(e){null===this._additionsHead?this._additionsHead=this._additionsTail=e:(this._additionsTail._nextAdded=e,this._additionsTail=e)}_addToChanges(e){null===this._changesHead?this._changesHead=this._changesTail=e:(this._changesTail._nextChanged=e,this._changesTail=e)}_forEach(e,t){e instanceof Map?e.forEach(t):Object.keys(e).forEach(r=>t(e[r],r))}}class o2{constructor(e){this.key=e,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}function gS(){return new cc([new dS])}let cc=(()=>{class n{constructor(t){this.factories=t}static create(t,r){if(null!=r){const i=r.factories.slice();t=t.concat(i)}return new n(t)}static extend(t){return{provide:n,useFactory:r=>n.create(t,r||gS()),deps:[[n,new Ks,new Zr]]}}find(t){const r=this.factories.find(i=>i.supports(t));if(null!=r)return r;throw new we(901,"")}}return n.\u0275prov=W({token:n,providedIn:"root",factory:gS}),n})();function mS(){return new Sa([new pS])}let Sa=(()=>{class n{constructor(t){this.factories=t}static create(t,r){if(r){const i=r.factories.slice();t=t.concat(i)}return new n(t)}static extend(t){return{provide:n,useFactory:r=>n.create(t,r||mS()),deps:[[n,new Ks,new Zr]]}}find(t){const r=this.factories.find(o=>o.supports(t));if(r)return r;throw new we(901,"")}}return n.\u0275prov=W({token:n,providedIn:"root",factory:mS}),n})();const s2=[new pS],l2=new cc([new dS]),c2=new Sa(s2),u2=tS(null,"core",[{provide:lc,useValue:"unknown"},{provide:rS,deps:[_t]},{provide:Jw,deps:[]},{provide:Kw,deps:[]}]),g2=[{provide:Xo,useClass:Xo,deps:[ot,_t,Qs,Ri,wa]},{provide:Nj,deps:[ot],useFactory:function m2(n){let e=[];return n.onStable.subscribe(()=>{for(;e.length;)e.pop()()}),function(t){e.push(t)}}},{provide:wa,useClass:wa,deps:[[new Zr,Nd]]},{provide:Rd,useClass:Rd,deps:[]},TV,{provide:cc,useFactory:function d2(){return l2},deps:[]},{provide:Sa,useFactory:function f2(){return c2},deps:[]},{provide:fo,useFactory:function h2(n){return n||function p2(){return"undefined"!=typeof $localize&&$localize.locale||Dd}()},deps:[[new qs(fo),new Zr,new Ks]]},{provide:Zw,useValue:"USD"}];let v2=(()=>{class n{constructor(t){}}return n.\u0275fac=function(t){return new(t||n)(R(Xo))},n.\u0275mod=ut({type:n}),n.\u0275inj=at({providers:g2}),n})(),Ld=null;function ai(){return Ld}const Vt=new $("DocumentToken");let ns=(()=>{class n{historyGo(t){throw new Error("Not implemented")}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=W({token:n,factory:function(){return function D2(){return R(vS)}()},providedIn:"platform"}),n})();const C2=new $("Location Initialized");let vS=(()=>{class n extends ns{constructor(t){super(),this._doc=t,this._init()}_init(){this.location=window.location,this._history=window.history}getBaseHrefFromDOM(){return ai().getBaseHref(this._doc)}onPopState(t){const r=ai().getGlobalEventTarget(this._doc,"window");return r.addEventListener("popstate",t,!1),()=>r.removeEventListener("popstate",t)}onHashChange(t){const r=ai().getGlobalEventTarget(this._doc,"window");return r.addEventListener("hashchange",t,!1),()=>r.removeEventListener("hashchange",t)}get href(){return this.location.href}get protocol(){return this.location.protocol}get hostname(){return this.location.hostname}get port(){return this.location.port}get pathname(){return this.location.pathname}get search(){return this.location.search}get hash(){return this.location.hash}set pathname(t){this.location.pathname=t}pushState(t,r,i){yS()?this._history.pushState(t,r,i):this.location.hash=i}replaceState(t,r,i){yS()?this._history.replaceState(t,r,i):this.location.hash=i}forward(){this._history.forward()}back(){this._history.back()}historyGo(t=0){this._history.go(t)}getState(){return this._history.state}}return n.\u0275fac=function(t){return new(t||n)(R(Vt))},n.\u0275prov=W({token:n,factory:function(){return function E2(){return new vS(R(Vt))}()},providedIn:"platform"}),n})();function yS(){return!!window.history.pushState}function Gm(n,e){if(0==n.length)return e;if(0==e.length)return n;let t=0;return n.endsWith("/")&&t++,e.startsWith("/")&&t++,2==t?n+e.substring(1):1==t?n+e:n+"/"+e}function _S(n){const e=n.match(/#|\?|$/),t=e&&e.index||n.length;return n.slice(0,t-("/"===n[t-1]?1:0))+n.slice(t)}function Fi(n){return n&&"?"!==n[0]?"?"+n:n}let Ma=(()=>{class n{historyGo(t){throw new Error("Not implemented")}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=W({token:n,factory:function(){return function w2(n){const e=R(Vt).location;return new bS(R(ns),e&&e.origin||"")}()},providedIn:"root"}),n})();const qm=new $("appBaseHref");let bS=(()=>{class n extends Ma{constructor(t,r){if(super(),this._platformLocation=t,this._removeListenerFns=[],null==r&&(r=this._platformLocation.getBaseHrefFromDOM()),null==r)throw new Error("No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.");this._baseHref=r}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(t){this._removeListenerFns.push(this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t))}getBaseHref(){return this._baseHref}prepareExternalUrl(t){return Gm(this._baseHref,t)}path(t=!1){const r=this._platformLocation.pathname+Fi(this._platformLocation.search),i=this._platformLocation.hash;return i&&t?`${r}${i}`:r}pushState(t,r,i,o){const s=this.prepareExternalUrl(i+Fi(o));this._platformLocation.pushState(t,r,s)}replaceState(t,r,i,o){const s=this.prepareExternalUrl(i+Fi(o));this._platformLocation.replaceState(t,r,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}historyGo(t=0){var r,i;null===(i=(r=this._platformLocation).historyGo)||void 0===i||i.call(r,t)}}return n.\u0275fac=function(t){return new(t||n)(R(ns),R(qm,8))},n.\u0275prov=W({token:n,factory:n.\u0275fac}),n})(),S2=(()=>{class n extends Ma{constructor(t,r){super(),this._platformLocation=t,this._baseHref="",this._removeListenerFns=[],null!=r&&(this._baseHref=r)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(t){this._removeListenerFns.push(this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t))}getBaseHref(){return this._baseHref}path(t=!1){let r=this._platformLocation.hash;return null==r&&(r="#"),r.length>0?r.substring(1):r}prepareExternalUrl(t){const r=Gm(this._baseHref,t);return r.length>0?"#"+r:r}pushState(t,r,i,o){let s=this.prepareExternalUrl(i+Fi(o));0==s.length&&(s=this._platformLocation.pathname),this._platformLocation.pushState(t,r,s)}replaceState(t,r,i,o){let s=this.prepareExternalUrl(i+Fi(o));0==s.length&&(s=this._platformLocation.pathname),this._platformLocation.replaceState(t,r,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}historyGo(t=0){var r,i;null===(i=(r=this._platformLocation).historyGo)||void 0===i||i.call(r,t)}}return n.\u0275fac=function(t){return new(t||n)(R(ns),R(qm,8))},n.\u0275prov=W({token:n,factory:n.\u0275fac}),n})(),Km=(()=>{class n{constructor(t,r){this._subject=new Ae,this._urlChangeListeners=[],this._platformStrategy=t;const i=this._platformStrategy.getBaseHref();this._platformLocation=r,this._baseHref=_S(DS(i)),this._platformStrategy.onPopState(o=>{this._subject.emit({url:this.path(!0),pop:!0,state:o.state,type:o.type})})}path(t=!1){return this.normalize(this._platformStrategy.path(t))}getState(){return this._platformLocation.getState()}isCurrentPathEqualTo(t,r=""){return this.path()==this.normalize(t+Fi(r))}normalize(t){return n.stripTrailingSlash(function I2(n,e){return n&&e.startsWith(n)?e.substring(n.length):e}(this._baseHref,DS(t)))}prepareExternalUrl(t){return t&&"/"!==t[0]&&(t="/"+t),this._platformStrategy.prepareExternalUrl(t)}go(t,r="",i=null){this._platformStrategy.pushState(i,"",t,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+Fi(r)),i)}replaceState(t,r="",i=null){this._platformStrategy.replaceState(i,"",t,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+Fi(r)),i)}forward(){this._platformStrategy.forward()}back(){this._platformStrategy.back()}historyGo(t=0){var r,i;null===(i=(r=this._platformStrategy).historyGo)||void 0===i||i.call(r,t)}onUrlChange(t){this._urlChangeListeners.push(t),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(r=>{this._notifyUrlChangeListeners(r.url,r.state)}))}_notifyUrlChangeListeners(t="",r){this._urlChangeListeners.forEach(i=>i(t,r))}subscribe(t,r,i){return this._subject.subscribe({next:t,error:r,complete:i})}}return n.normalizeQueryParams=Fi,n.joinWithSlash=Gm,n.stripTrailingSlash=_S,n.\u0275fac=function(t){return new(t||n)(R(Ma),R(ns))},n.\u0275prov=W({token:n,factory:function(){return function M2(){return new Km(R(Ma),R(ns))}()},providedIn:"root"}),n})();function DS(n){return n.replace(/\/index.html$/,"")}var Mt=(()=>((Mt=Mt||{})[Mt.Zero=0]="Zero",Mt[Mt.One=1]="One",Mt[Mt.Two=2]="Two",Mt[Mt.Few=3]="Few",Mt[Mt.Many=4]="Many",Mt[Mt.Other=5]="Other",Mt))();const R2=function NE(n){return function bn(n){const e=function EB(n){return n.toLowerCase().replace(/_/g,"-")}(n);let t=RE(e);if(t)return t;const r=e.split("-")[0];if(t=RE(r),t)return t;if("en"===r)return CB;throw new Error(`Missing locale data for the locale "${n}".`)}(n)[L.PluralCase]};class qd{}let cH=(()=>{class n extends qd{constructor(t){super(),this.locale=t}getPluralCategory(t,r){switch(R2(r||this.locale)(t)){case Mt.Zero:return"zero";case Mt.One:return"one";case Mt.Two:return"two";case Mt.Few:return"few";case Mt.Many:return"many";default:return"other"}}}return n.\u0275fac=function(t){return new(t||n)(R(fo))},n.\u0275prov=W({token:n,factory:n.\u0275fac}),n})();function AS(n,e){e=encodeURIComponent(e);for(const t of n.split(";")){const r=t.indexOf("="),[i,o]=-1==r?[t,""]:[t.slice(0,r),t.slice(r+1)];if(i.trim()===e)return decodeURIComponent(o)}return null}let fc=(()=>{class n{constructor(t,r,i,o){this._iterableDiffers=t,this._keyValueDiffers=r,this._ngEl=i,this._renderer=o,this._iterableDiffer=null,this._keyValueDiffer=null,this._initialClasses=[],this._rawClass=null}set klass(t){this._removeClasses(this._initialClasses),this._initialClasses="string"==typeof t?t.split(/\s+/):[],this._applyClasses(this._initialClasses),this._applyClasses(this._rawClass)}set ngClass(t){this._removeClasses(this._rawClass),this._applyClasses(this._initialClasses),this._iterableDiffer=null,this._keyValueDiffer=null,this._rawClass="string"==typeof t?t.split(/\s+/):t,this._rawClass&&(ql(this._rawClass)?this._iterableDiffer=this._iterableDiffers.find(this._rawClass).create():this._keyValueDiffer=this._keyValueDiffers.find(this._rawClass).create())}ngDoCheck(){if(this._iterableDiffer){const t=this._iterableDiffer.diff(this._rawClass);t&&this._applyIterableChanges(t)}else if(this._keyValueDiffer){const t=this._keyValueDiffer.diff(this._rawClass);t&&this._applyKeyValueChanges(t)}}_applyKeyValueChanges(t){t.forEachAddedItem(r=>this._toggleClass(r.key,r.currentValue)),t.forEachChangedItem(r=>this._toggleClass(r.key,r.currentValue)),t.forEachRemovedItem(r=>{r.previousValue&&this._toggleClass(r.key,!1)})}_applyIterableChanges(t){t.forEachAddedItem(r=>{if("string"!=typeof r.item)throw new Error(`NgClass can only toggle CSS classes expressed as strings, got ${Re(r.item)}`);this._toggleClass(r.item,!0)}),t.forEachRemovedItem(r=>this._toggleClass(r.item,!1))}_applyClasses(t){t&&(Array.isArray(t)||t instanceof Set?t.forEach(r=>this._toggleClass(r,!0)):Object.keys(t).forEach(r=>this._toggleClass(r,!!t[r])))}_removeClasses(t){t&&(Array.isArray(t)||t instanceof Set?t.forEach(r=>this._toggleClass(r,!1)):Object.keys(t).forEach(r=>this._toggleClass(r,!1)))}_toggleClass(t,r){(t=t.trim())&&t.split(/\s+/g).forEach(i=>{r?this._renderer.addClass(this._ngEl.nativeElement,i):this._renderer.removeClass(this._ngEl.nativeElement,i)})}}return n.\u0275fac=function(t){return new(t||n)(S(cc),S(Sa),S(bt),S(ii))},n.\u0275dir=Y({type:n,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"}}),n})();class dH{constructor(e,t,r,i){this.$implicit=e,this.ngForOf=t,this.index=r,this.count=i}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let Kd=(()=>{class n{constructor(t,r,i){this._viewContainer=t,this._template=r,this._differs=i,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForOf(t){this._ngForOf=t,this._ngForOfDirty=!0}set ngForTrackBy(t){this._trackByFn=t}get ngForTrackBy(){return this._trackByFn}set ngForTemplate(t){t&&(this._template=t)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const t=this._ngForOf;!this._differ&&t&&(this._differ=this._differs.find(t).create(this.ngForTrackBy))}if(this._differ){const t=this._differ.diff(this._ngForOf);t&&this._applyChanges(t)}}_applyChanges(t){const r=this._viewContainer;t.forEachOperation((i,o,s)=>{if(null==i.previousIndex)r.createEmbeddedView(this._template,new dH(i.item,this._ngForOf,-1,-1),null===s?void 0:s);else if(null==s)r.remove(null===o?void 0:o);else if(null!==o){const a=r.get(o);r.move(a,s),OS(a,i)}});for(let i=0,o=r.length;i{OS(r.get(i.currentIndex),i)})}static ngTemplateContextGuard(t,r){return!0}}return n.\u0275fac=function(t){return new(t||n)(S(sr),S(oi),S(cc))},n.\u0275dir=Y({type:n,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"}}),n})();function OS(n,e){n.context.$implicit=e.item}let ho=(()=>{class n{constructor(t,r){this._viewContainer=t,this._context=new fH,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=r}set ngIf(t){this._context.$implicit=this._context.ngIf=t,this._updateView()}set ngIfThen(t){kS("ngIfThen",t),this._thenTemplateRef=t,this._thenViewRef=null,this._updateView()}set ngIfElse(t){kS("ngIfElse",t),this._elseTemplateRef=t,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(t,r){return!0}}return n.\u0275fac=function(t){return new(t||n)(S(sr),S(oi))},n.\u0275dir=Y({type:n,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"}}),n})();class fH{constructor(){this.$implicit=null,this.ngIf=null}}function kS(n,e){if(e&&!e.createEmbeddedView)throw new Error(`${n} must be a TemplateRef, but received '${Re(e)}'.`)}let ov=(()=>{class n{constructor(t,r,i){this._ngEl=t,this._differs=r,this._renderer=i,this._ngStyle=null,this._differ=null}set ngStyle(t){this._ngStyle=t,!this._differ&&t&&(this._differ=this._differs.find(t).create())}ngDoCheck(){if(this._differ){const t=this._differ.diff(this._ngStyle);t&&this._applyChanges(t)}}_setStyle(t,r){const[i,o]=t.split(".");null!=(r=null!=r&&o?`${r}${o}`:r)?this._renderer.setStyle(this._ngEl.nativeElement,i,r):this._renderer.removeStyle(this._ngEl.nativeElement,i)}_applyChanges(t){t.forEachRemovedItem(r=>this._setStyle(r.key,null)),t.forEachAddedItem(r=>this._setStyle(r.key,r.currentValue)),t.forEachChangedItem(r=>this._setStyle(r.key,r.currentValue))}}return n.\u0275fac=function(t){return new(t||n)(S(bt),S(Sa),S(ii))},n.\u0275dir=Y({type:n,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"}}),n})(),sv=(()=>{class n{constructor(t){this._viewContainerRef=t,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null}ngOnChanges(t){if(t.ngTemplateOutlet){const r=this._viewContainerRef;this._viewRef&&r.remove(r.indexOf(this._viewRef)),this._viewRef=this.ngTemplateOutlet?r.createEmbeddedView(this.ngTemplateOutlet,this.ngTemplateOutletContext):null}else this._viewRef&&t.ngTemplateOutletContext&&this.ngTemplateOutletContext&&(this._viewRef.context=this.ngTemplateOutletContext)}}return n.\u0275fac=function(t){return new(t||n)(S(sr))},n.\u0275dir=Y({type:n,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet"},features:[tr]}),n})();function Rr(n,e){return new we(2100,"")}let RS=(()=>{class n{transform(t){if(null==t)return null;if("string"!=typeof t)throw Rr();return t.toLowerCase()}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275pipe=gn({name:"lowercase",type:n,pure:!0}),n})(),FS=(()=>{class n{transform(t,r,i){if(null==t)return null;if(!this.supports(t))throw Rr();return t.slice(r,i)}supports(t){return"string"==typeof t||Array.isArray(t)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275pipe=gn({name:"slice",type:n,pure:!1}),n})(),Pr=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=ut({type:n}),n.\u0275inj=at({providers:[{provide:qd,useClass:cH}]}),n})();const LS="browser";let jH=(()=>{class n{}return n.\u0275prov=W({token:n,providedIn:"root",factory:()=>new VH(R(Vt),window)}),n})();class VH{constructor(e,t){this.document=e,this.window=t,this.offset=()=>[0,0]}setOffset(e){this.offset=Array.isArray(e)?()=>e:e}getScrollPosition(){return this.supportsScrolling()?[this.window.pageXOffset,this.window.pageYOffset]:[0,0]}scrollToPosition(e){this.supportsScrolling()&&this.window.scrollTo(e[0],e[1])}scrollToAnchor(e){if(!this.supportsScrolling())return;const t=function HH(n,e){const t=n.getElementById(e)||n.getElementsByName(e)[0];if(t)return t;if("function"==typeof n.createTreeWalker&&n.body&&(n.body.createShadowRoot||n.body.attachShadow)){const r=n.createTreeWalker(n.body,NodeFilter.SHOW_ELEMENT);let i=r.currentNode;for(;i;){const o=i.shadowRoot;if(o){const s=o.getElementById(e)||o.querySelector(`[name="${e}"]`);if(s)return s}i=r.nextNode()}}return null}(this.document,e);t&&(this.scrollToElement(t),t.focus())}setHistoryScrollRestoration(e){if(this.supportScrollRestoration()){const t=this.window.history;t&&t.scrollRestoration&&(t.scrollRestoration=e)}}scrollToElement(e){const t=e.getBoundingClientRect(),r=t.left+this.window.pageXOffset,i=t.top+this.window.pageYOffset,o=this.offset();this.window.scrollTo(r-o[0],i-o[1])}supportScrollRestoration(){try{if(!this.supportsScrolling())return!1;const e=BS(this.window.history)||BS(Object.getPrototypeOf(this.window.history));return!(!e||!e.writable&&!e.set)}catch(e){return!1}}supportsScrolling(){try{return!!this.window&&!!this.window.scrollTo&&"pageXOffset"in this.window}catch(e){return!1}}}function BS(n){return Object.getOwnPropertyDescriptor(n,"scrollRestoration")}class jS{}class cv extends class UH extends class b2{}{constructor(){super(...arguments),this.supportsDOMEvents=!0}}{static makeCurrent(){!function _2(n){Ld||(Ld=n)}(new cv)}onAndCancel(e,t,r){return e.addEventListener(t,r,!1),()=>{e.removeEventListener(t,r,!1)}}dispatchEvent(e,t){e.dispatchEvent(t)}remove(e){e.parentNode&&e.parentNode.removeChild(e)}createElement(e,t){return(t=t||this.getDefaultDocument()).createElement(e)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(e){return e.nodeType===Node.ELEMENT_NODE}isShadowRoot(e){return e instanceof DocumentFragment}getGlobalEventTarget(e,t){return"window"===t?window:"document"===t?e:"body"===t?e.body:null}getBaseHref(e){const t=function zH(){return hc=hc||document.querySelector("base"),hc?hc.getAttribute("href"):null}();return null==t?null:function WH(n){Zd=Zd||document.createElement("a"),Zd.setAttribute("href",n);const e=Zd.pathname;return"/"===e.charAt(0)?e:`/${e}`}(t)}resetBaseElement(){hc=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return AS(document.cookie,e)}}let Zd,hc=null;const VS=new $("TRANSITION_ID"),GH=[{provide:Nd,useFactory:function $H(n,e,t){return()=>{t.get(wa).donePromise.then(()=>{const r=ai(),i=e.querySelectorAll(`style[ng-transition="${n}"]`);for(let o=0;o{const o=e.findTestabilityInTree(r,i);if(null==o)throw new Error("Could not find testability for element.");return o},je.getAllAngularTestabilities=()=>e.getAllTestabilities(),je.getAllAngularRootElements=()=>e.getAllRootElements(),je.frameworkStabilizers||(je.frameworkStabilizers=[]),je.frameworkStabilizers.push(r=>{const i=je.getAllAngularTestabilities();let o=i.length,s=!1;const a=function(l){s=s||l,o--,0==o&&r(s)};i.forEach(function(l){l.whenStable(a)})})}findTestabilityInTree(e,t,r){if(null==t)return null;const i=e.getTestability(t);return null!=i?i:r?ai().isShadowRoot(t)?this.findTestabilityInTree(e,t.host,!0):this.findTestabilityInTree(e,t.parentElement,!0):null}}let qH=(()=>{class n{build(){return new XMLHttpRequest}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=W({token:n,factory:n.\u0275fac}),n})();const Yd=new $("EventManagerPlugins");let Qd=(()=>{class n{constructor(t,r){this._zone=r,this._eventNameToPlugin=new Map,t.forEach(i=>i.manager=this),this._plugins=t.slice().reverse()}addEventListener(t,r,i){return this._findPluginFor(r).addEventListener(t,r,i)}addGlobalEventListener(t,r,i){return this._findPluginFor(r).addGlobalEventListener(t,r,i)}getZone(){return this._zone}_findPluginFor(t){const r=this._eventNameToPlugin.get(t);if(r)return r;const i=this._plugins;for(let o=0;o{class n{constructor(){this._stylesSet=new Set}addStyles(t){const r=new Set;t.forEach(i=>{this._stylesSet.has(i)||(this._stylesSet.add(i),r.add(i))}),this.onStylesAdded(r)}onStylesAdded(t){}getAllStyles(){return Array.from(this._stylesSet)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=W({token:n,factory:n.\u0275fac}),n})(),pc=(()=>{class n extends US{constructor(t){super(),this._doc=t,this._hostNodes=new Map,this._hostNodes.set(t.head,[])}_addStylesToHost(t,r,i){t.forEach(o=>{const s=this._doc.createElement("style");s.textContent=o,i.push(r.appendChild(s))})}addHost(t){const r=[];this._addStylesToHost(this._stylesSet,t,r),this._hostNodes.set(t,r)}removeHost(t){const r=this._hostNodes.get(t);r&&r.forEach(zS),this._hostNodes.delete(t)}onStylesAdded(t){this._hostNodes.forEach((r,i)=>{this._addStylesToHost(t,i,r)})}ngOnDestroy(){this._hostNodes.forEach(t=>t.forEach(zS))}}return n.\u0275fac=function(t){return new(t||n)(R(Vt))},n.\u0275prov=W({token:n,factory:n.\u0275fac}),n})();function zS(n){ai().remove(n)}const dv={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/MathML/"},fv=/%COMP%/g;function Jd(n,e,t){for(let r=0;r{if("__ngUnwrap__"===e)return n;!1===n(e)&&(e.preventDefault(),e.returnValue=!1)}}let hv=(()=>{class n{constructor(t,r,i){this.eventManager=t,this.sharedStylesHost=r,this.appId=i,this.rendererByCompId=new Map,this.defaultRenderer=new pv(t)}createRenderer(t,r){if(!t||!r)return this.defaultRenderer;switch(r.encapsulation){case $r.Emulated:{let i=this.rendererByCompId.get(r.id);return i||(i=new XH(this.eventManager,this.sharedStylesHost,r,this.appId),this.rendererByCompId.set(r.id,i)),i.applyToHost(t),i}case 1:case $r.ShadowDom:return new eU(this.eventManager,this.sharedStylesHost,t,r);default:if(!this.rendererByCompId.has(r.id)){const i=Jd(r.id,r.styles,[]);this.sharedStylesHost.addStyles(i),this.rendererByCompId.set(r.id,this.defaultRenderer)}return this.defaultRenderer}}begin(){}end(){}}return n.\u0275fac=function(t){return new(t||n)(R(Qd),R(pc),R(ac))},n.\u0275prov=W({token:n,factory:n.\u0275fac}),n})();class pv{constructor(e){this.eventManager=e,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(e,t){return t?document.createElementNS(dv[t]||t,e):document.createElement(e)}createComment(e){return document.createComment(e)}createText(e){return document.createTextNode(e)}appendChild(e,t){e.appendChild(t)}insertBefore(e,t,r){e&&e.insertBefore(t,r)}removeChild(e,t){e&&e.removeChild(t)}selectRootElement(e,t){let r="string"==typeof e?document.querySelector(e):e;if(!r)throw new Error(`The selector "${e}" did not match any elements`);return t||(r.textContent=""),r}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,t,r,i){if(i){t=i+":"+t;const o=dv[i];o?e.setAttributeNS(o,t,r):e.setAttribute(t,r)}else e.setAttribute(t,r)}removeAttribute(e,t,r){if(r){const i=dv[r];i?e.removeAttributeNS(i,t):e.removeAttribute(`${r}:${t}`)}else e.removeAttribute(t)}addClass(e,t){e.classList.add(t)}removeClass(e,t){e.classList.remove(t)}setStyle(e,t,r,i){i&(Un.DashCase|Un.Important)?e.style.setProperty(t,r,i&Un.Important?"important":""):e.style[t]=r}removeStyle(e,t,r){r&Un.DashCase?e.style.removeProperty(t):e.style[t]=""}setProperty(e,t,r){e[t]=r}setValue(e,t){e.nodeValue=t}listen(e,t,r){return"string"==typeof e?this.eventManager.addGlobalEventListener(e,t,GS(r)):this.eventManager.addEventListener(e,t,GS(r))}}class XH extends pv{constructor(e,t,r,i){super(e),this.component=r;const o=Jd(i+"-"+r.id,r.styles,[]);t.addStyles(o),this.contentAttr=function YH(n){return"_ngcontent-%COMP%".replace(fv,n)}(i+"-"+r.id),this.hostAttr=function QH(n){return"_nghost-%COMP%".replace(fv,n)}(i+"-"+r.id)}applyToHost(e){super.setAttribute(e,this.hostAttr,"")}createElement(e,t){const r=super.createElement(e,t);return super.setAttribute(r,this.contentAttr,""),r}}class eU extends pv{constructor(e,t,r,i){super(e),this.sharedStylesHost=t,this.hostEl=r,this.shadowRoot=r.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const o=Jd(i.id,i.styles,[]);for(let s=0;s{class n extends HS{constructor(t){super(t)}supports(t){return!0}addEventListener(t,r,i){return t.addEventListener(r,i,!1),()=>this.removeEventListener(t,r,i)}removeEventListener(t,r,i){return t.removeEventListener(r,i)}}return n.\u0275fac=function(t){return new(t||n)(R(Vt))},n.\u0275prov=W({token:n,factory:n.\u0275fac}),n})();const KS=["alt","control","meta","shift"],rU={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},ZS={A:"1",B:"2",C:"3",D:"4",E:"5",F:"6",G:"7",H:"8",I:"9",J:"*",K:"+",M:"-",N:".",O:"/","`":"0","\x90":"NumLock"},iU={alt:n=>n.altKey,control:n=>n.ctrlKey,meta:n=>n.metaKey,shift:n=>n.shiftKey};let oU=(()=>{class n extends HS{constructor(t){super(t)}supports(t){return null!=n.parseEventName(t)}addEventListener(t,r,i){const o=n.parseEventName(r),s=n.eventCallback(o.fullKey,i,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>ai().onAndCancel(t,o.domEventName,s))}static parseEventName(t){const r=t.toLowerCase().split("."),i=r.shift();if(0===r.length||"keydown"!==i&&"keyup"!==i)return null;const o=n._normalizeKey(r.pop());let s="";if(KS.forEach(l=>{const c=r.indexOf(l);c>-1&&(r.splice(c,1),s+=l+".")}),s+=o,0!=r.length||0===o.length)return null;const a={};return a.domEventName=i,a.fullKey=s,a}static getEventFullKey(t){let r="",i=function sU(n){let e=n.key;if(null==e){if(e=n.keyIdentifier,null==e)return"Unidentified";e.startsWith("U+")&&(e=String.fromCharCode(parseInt(e.substring(2),16)),3===n.location&&ZS.hasOwnProperty(e)&&(e=ZS[e]))}return rU[e]||e}(t);return i=i.toLowerCase()," "===i?i="space":"."===i&&(i="dot"),KS.forEach(o=>{o!=i&&iU[o](t)&&(r+=o+".")}),r+=i,r}static eventCallback(t,r,i){return o=>{n.getEventFullKey(o)===t&&i.runGuarded(()=>r(o))}}static _normalizeKey(t){return"esc"===t?"escape":t}}return n.\u0275fac=function(t){return new(t||n)(R(Vt))},n.\u0275prov=W({token:n,factory:n.\u0275fac}),n})();const uU=tS(u2,"browser",[{provide:lc,useValue:LS},{provide:Gw,useValue:function aU(){cv.makeCurrent(),uv.init()},multi:!0},{provide:Vt,useFactory:function cU(){return function SN(n){Rp=n}(document),document},deps:[]}]),dU=[{provide:Zg,useValue:"root"},{provide:Qs,useFactory:function lU(){return new Qs},deps:[]},{provide:Yd,useClass:tU,multi:!0,deps:[Vt,ot,lc]},{provide:Yd,useClass:oU,multi:!0,deps:[Vt]},{provide:hv,useClass:hv,deps:[Qd,pc,ac]},{provide:lw,useExisting:hv},{provide:US,useExisting:pc},{provide:pc,useClass:pc,deps:[Vt]},{provide:jm,useClass:jm,deps:[ot]},{provide:Qd,useClass:Qd,deps:[Yd,ot]},{provide:jS,useClass:qH,deps:[]}];let fU=(()=>{class n{constructor(t){if(t)throw new Error("BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.")}static withServerTransition(t){return{ngModule:n,providers:[{provide:ac,useValue:t.appId},{provide:VS,useExisting:ac},GH]}}}return n.\u0275fac=function(t){return new(t||n)(R(n,12))},n.\u0275mod=ut({type:n}),n.\u0275inj=at({providers:dU,imports:[Pr,v2]}),n})();"undefined"!=typeof window&&window;let CU=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=W({token:n,factory:function(t){let r=null;return r=t?new(t||n):R(mv),r},providedIn:"root"}),n})(),mv=(()=>{class n extends CU{constructor(t){super(),this._doc=t}sanitize(t,r){if(null==r)return null;switch(t){case Ke.NONE:return r;case Ke.HTML:return Yr(r,"HTML")?Hn(r):$D(this._doc,String(r)).toString();case Ke.STYLE:return Yr(r,"Style")?Hn(r):r;case Ke.SCRIPT:if(Yr(r,"Script"))return Hn(r);throw new Error("unsafe value used in a script context");case Ke.URL:return LD(r),Yr(r,"URL")?Hn(r):Bl(String(r));case Ke.RESOURCE_URL:if(Yr(r,"ResourceURL"))return Hn(r);throw new Error("unsafe value used in a resource URL context (see https://g.co/ng/security#xss)");default:throw new Error(`Unexpected SecurityContext ${t} (see https://g.co/ng/security#xss)`)}}bypassSecurityTrustHtml(t){return function jR(n){return new RR(n)}(t)}bypassSecurityTrustStyle(t){return function VR(n){return new PR(n)}(t)}bypassSecurityTrustScript(t){return function HR(n){return new FR(n)}(t)}bypassSecurityTrustUrl(t){return function UR(n){return new LR(n)}(t)}bypassSecurityTrustResourceUrl(t){return function zR(n){return new BR(n)}(t)}}return n.\u0275fac=function(t){return new(t||n)(R(Vt))},n.\u0275prov=W({token:n,factory:function(t){let r=null;return r=t?new t:function EU(n){return new mv(n.get(Vt))}(R(_t)),r},providedIn:"root"}),n})();function Xd(n,e){return new Ne(t=>{const r=n.length;if(0===r)return void t.complete();const i=new Array(r);let o=0,s=0;for(let a=0;a{c||(c=!0,s++),i[a]=u},error:u=>t.error(u),complete:()=>{o++,(o===r||!c)&&(s===r&&t.next(e?e.reduce((u,d,f)=>(u[d]=i[f],u),{}):i),t.complete())}}))}})}let JS=(()=>{class n{constructor(t,r){this._renderer=t,this._elementRef=r,this.onChange=i=>{},this.onTouched=()=>{}}setProperty(t,r){this._renderer.setProperty(this._elementRef.nativeElement,t,r)}registerOnTouched(t){this.onTouched=t}registerOnChange(t){this.onChange=t}setDisabledState(t){this.setProperty("disabled",t)}}return n.\u0275fac=function(t){return new(t||n)(S(ii),S(bt))},n.\u0275dir=Y({type:n}),n})(),rs=(()=>{class n extends JS{}return n.\u0275fac=function(){let e;return function(r){return(e||(e=jt(n)))(r||n)}}(),n.\u0275dir=Y({type:n,features:[Te]}),n})();const cr=new $("NgValueAccessor"),MU={provide:cr,useExisting:Be(()=>ef),multi:!0},TU=new $("CompositionEventMode");let ef=(()=>{class n extends JS{constructor(t,r,i){super(t,r),this._compositionMode=i,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function IU(){const n=ai()?ai().getUserAgent():"";return/android (\d+)/.test(n.toLowerCase())}())}writeValue(t){this.setProperty("value",null==t?"":t)}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}}return n.\u0275fac=function(t){return new(t||n)(S(ii),S(bt),S(TU,8))},n.\u0275dir=Y({type:n,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(t,r){1&t&&Pe("input",function(o){return r._handleInput(o.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(o){return r._compositionEnd(o.target.value)})},features:[Ye([MU]),Te]}),n})();const sn=new $("NgValidators"),mo=new $("NgAsyncValidators");function cM(n){return null!=n}function uM(n){const e=Zl(n)?zt(n):n;return lm(e),e}function dM(n){let e={};return n.forEach(t=>{e=null!=t?Object.assign(Object.assign({},e),t):e}),0===Object.keys(e).length?null:e}function fM(n,e){return e.map(t=>t(n))}function hM(n){return n.map(e=>function AU(n){return!n.validate}(e)?e:t=>e.validate(t))}function vv(n){return null!=n?function pM(n){if(!n)return null;const e=n.filter(cM);return 0==e.length?null:function(t){return dM(fM(t,e))}}(hM(n)):null}function yv(n){return null!=n?function gM(n){if(!n)return null;const e=n.filter(cM);return 0==e.length?null:function(t){return function wU(...n){if(1===n.length){const e=n[0];if(gl(e))return Xd(e,null);if(hp(e)&&Object.getPrototypeOf(e)===Object.prototype){const t=Object.keys(e);return Xd(t.map(r=>e[r]),t)}}if("function"==typeof n[n.length-1]){const e=n.pop();return Xd(n=1===n.length&&gl(n[0])?n[0]:n,null).pipe(be(t=>e(...t)))}return Xd(n,null)}(fM(t,e).map(uM)).pipe(be(dM))}}(hM(n)):null}function mM(n,e){return null===n?[e]:Array.isArray(n)?[...n,e]:[n,e]}function _v(n){return n?Array.isArray(n)?n:[n]:[]}function nf(n,e){return Array.isArray(n)?n.includes(e):n===e}function _M(n,e){const t=_v(e);return _v(n).forEach(i=>{nf(t,i)||t.push(i)}),t}function bM(n,e){return _v(e).filter(t=>!nf(n,t))}class DM{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(e){this._rawValidators=e||[],this._composedValidatorFn=vv(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=yv(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e){this.control&&this.control.reset(e)}hasError(e,t){return!!this.control&&this.control.hasError(e,t)}getError(e,t){return this.control?this.control.getError(e,t):null}}class vo extends DM{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class Cn extends DM{get formDirective(){return null}get path(){return null}}class CM{constructor(e){this._cd=e}is(e){var t,r,i;return"submitted"===e?!!(null===(t=this._cd)||void 0===t?void 0:t.submitted):!!(null===(i=null===(r=this._cd)||void 0===r?void 0:r.control)||void 0===i?void 0:i[e])}}let bv=(()=>{class n extends CM{constructor(t){super(t)}}return n.\u0275fac=function(t){return new(t||n)(S(vo,2))},n.\u0275dir=Y({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(t,r){2&t&&Yl("ng-untouched",r.is("untouched"))("ng-touched",r.is("touched"))("ng-pristine",r.is("pristine"))("ng-dirty",r.is("dirty"))("ng-valid",r.is("valid"))("ng-invalid",r.is("invalid"))("ng-pending",r.is("pending"))},features:[Te]}),n})(),EM=(()=>{class n extends CM{constructor(t){super(t)}}return n.\u0275fac=function(t){return new(t||n)(S(Cn,10))},n.\u0275dir=Y({type:n,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(t,r){2&t&&Yl("ng-untouched",r.is("untouched"))("ng-touched",r.is("touched"))("ng-pristine",r.is("pristine"))("ng-dirty",r.is("dirty"))("ng-valid",r.is("valid"))("ng-invalid",r.is("invalid"))("ng-pending",r.is("pending"))("ng-submitted",r.is("submitted"))},features:[Te]}),n})();function gc(n,e){Ev(n,e),e.valueAccessor.writeValue(n.value),function BU(n,e){e.valueAccessor.registerOnChange(t=>{n._pendingValue=t,n._pendingChange=!0,n._pendingDirty=!0,"change"===n.updateOn&&SM(n,e)})}(n,e),function VU(n,e){const t=(r,i)=>{e.valueAccessor.writeValue(r),i&&e.viewToModelUpdate(r)};n.registerOnChange(t),e._registerOnDestroy(()=>{n._unregisterOnChange(t)})}(n,e),function jU(n,e){e.valueAccessor.registerOnTouched(()=>{n._pendingTouched=!0,"blur"===n.updateOn&&n._pendingChange&&SM(n,e),"submit"!==n.updateOn&&n.markAsTouched()})}(n,e),function LU(n,e){if(e.valueAccessor.setDisabledState){const t=r=>{e.valueAccessor.setDisabledState(r)};n.registerOnDisabledChange(t),e._registerOnDestroy(()=>{n._unregisterOnDisabledChange(t)})}}(n,e)}function lf(n,e){n.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(e)})}function Ev(n,e){const t=function vM(n){return n._rawValidators}(n);null!==e.validator?n.setValidators(mM(t,e.validator)):"function"==typeof t&&n.setValidators([t]);const r=function yM(n){return n._rawAsyncValidators}(n);null!==e.asyncValidator?n.setAsyncValidators(mM(r,e.asyncValidator)):"function"==typeof r&&n.setAsyncValidators([r]);const i=()=>n.updateValueAndValidity();lf(e._rawValidators,i),lf(e._rawAsyncValidators,i)}function SM(n,e){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function Mv(n,e){const t=n.indexOf(e);t>-1&&n.splice(t,1)}const mc="VALID",uf="INVALID",Ia="PENDING",vc="DISABLED";function Tv(n){return(df(n)?n.validators:n)||null}function TM(n){return Array.isArray(n)?vv(n):n||null}function xv(n,e){return(df(e)?e.asyncValidators:n)||null}function xM(n){return Array.isArray(n)?yv(n):n||null}function df(n){return null!=n&&!Array.isArray(n)&&"object"==typeof n}const Av=n=>n instanceof kv;function OM(n){return(n=>n instanceof RM)(n)?n.value:n.getRawValue()}function kM(n,e){const t=Av(n),r=n.controls;if(!(t?Object.keys(r):r).length)throw new we(1e3,"");if(!r[e])throw new we(1001,"")}function NM(n,e){Av(n),n._forEachChild((r,i)=>{if(void 0===e[i])throw new we(1002,"")})}class Ov{constructor(e,t){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._rawValidators=e,this._rawAsyncValidators=t,this._composedValidatorFn=TM(this._rawValidators),this._composedAsyncValidatorFn=xM(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get valid(){return this.status===mc}get invalid(){return this.status===uf}get pending(){return this.status==Ia}get disabled(){return this.status===vc}get enabled(){return this.status!==vc}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this._rawValidators=e,this._composedValidatorFn=TM(e)}setAsyncValidators(e){this._rawAsyncValidators=e,this._composedAsyncValidatorFn=xM(e)}addValidators(e){this.setValidators(_M(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(_M(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(bM(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(bM(e,this._rawAsyncValidators))}hasValidator(e){return nf(this._rawValidators,e)}hasAsyncValidator(e){return nf(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){this.touched=!0,this._parent&&!e.onlySelf&&this._parent.markAsTouched(e)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(e=>e.markAllAsTouched())}markAsUntouched(e={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(t=>{t.markAsUntouched({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}markAsDirty(e={}){this.pristine=!1,this._parent&&!e.onlySelf&&this._parent.markAsDirty(e)}markAsPristine(e={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(t=>{t.markAsPristine({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}markAsPending(e={}){this.status=Ia,!1!==e.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!e.onlySelf&&this._parent.markAsPending(e)}disable(e={}){const t=this._parentMarkedDirty(e.onlySelf);this.status=vc,this.errors=null,this._forEachChild(r=>{r.disable(Object.assign(Object.assign({},e),{onlySelf:!0}))}),this._updateValue(),!1!==e.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(Object.assign(Object.assign({},e),{skipPristineCheck:t})),this._onDisabledChange.forEach(r=>r(!0))}enable(e={}){const t=this._parentMarkedDirty(e.onlySelf);this.status=mc,this._forEachChild(r=>{r.enable(Object.assign(Object.assign({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(Object.assign(Object.assign({},e),{skipPristineCheck:t})),this._onDisabledChange.forEach(r=>r(!1))}_updateAncestors(e){this._parent&&!e.onlySelf&&(this._parent.updateValueAndValidity(e),e.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(e){this._parent=e}updateValueAndValidity(e={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===mc||this.status===Ia)&&this._runAsyncValidator(e.emitEvent)),!1!==e.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.updateValueAndValidity(e)}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(t=>t._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?vc:mc}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e){if(this.asyncValidator){this.status=Ia,this._hasOwnPendingAsyncValidator=!0;const t=uM(this.asyncValidator(this));this._asyncValidationSubscription=t.subscribe(r=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(r,{emitEvent:e})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(e,t={}){this.errors=e,this._updateControlsErrors(!1!==t.emitEvent)}get(e){return function WU(n,e,t){if(null==e||(Array.isArray(e)||(e=e.split(t)),Array.isArray(e)&&0===e.length))return null;let r=n;return e.forEach(i=>{r=Av(r)?r.controls.hasOwnProperty(i)?r.controls[i]:null:(n=>n instanceof GU)(r)&&r.at(i)||null}),r}(this,e,".")}getError(e,t){const r=t?this.get(t):this;return r&&r.errors?r.errors[e]:null}hasError(e,t){return!!this.getError(e,t)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(e)}_initObservables(){this.valueChanges=new Ae,this.statusChanges=new Ae}_calculateStatus(){return this._allControlsDisabled()?vc:this.errors?uf:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Ia)?Ia:this._anyControlsHaveStatus(uf)?uf:mc}_anyControlsHaveStatus(e){return this._anyControls(t=>t.status===e)}_anyControlsDirty(){return this._anyControls(e=>e.dirty)}_anyControlsTouched(){return this._anyControls(e=>e.touched)}_updatePristine(e={}){this.pristine=!this._anyControlsDirty(),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}_updateTouched(e={}){this.touched=this._anyControlsTouched(),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}_isBoxedValue(e){return"object"==typeof e&&null!==e&&2===Object.keys(e).length&&"value"in e&&"disabled"in e}_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){df(e)&&null!=e.updateOn&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){return!e&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}}class RM extends Ov{constructor(e=null,t,r){super(Tv(t),xv(r,t)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(e),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),df(t)&&t.initialValueIsDefault&&(this.defaultValue=this._isBoxedValue(e)?e.value:e)}setValue(e,t={}){this.value=this._pendingValue=e,this._onChange.length&&!1!==t.emitModelToViewChange&&this._onChange.forEach(r=>r(this.value,!1!==t.emitViewToModelChange)),this.updateValueAndValidity(t)}patchValue(e,t={}){this.setValue(e,t)}reset(e=this.defaultValue,t={}){this._applyFormState(e),this.markAsPristine(t),this.markAsUntouched(t),this.setValue(this.value,t),this._pendingChange=!1}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){Mv(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){Mv(this._onDisabledChange,e)}_forEachChild(e){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(e){this._isBoxedValue(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e}}class kv extends Ov{constructor(e,t,r){super(Tv(t),xv(r,t)),this.controls=e,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(e,t){return this.controls[e]?this.controls[e]:(this.controls[e]=t,t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange),t)}addControl(e,t,r={}){this.registerControl(e,t),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}removeControl(e,t={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}setControl(e,t,r={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],t&&this.registerControl(e,t),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}contains(e){return this.controls.hasOwnProperty(e)&&this.controls[e].enabled}setValue(e,t={}){NM(this,e),Object.keys(e).forEach(r=>{kM(this,r),this.controls[r].setValue(e[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(e,t={}){null!=e&&(Object.keys(e).forEach(r=>{this.controls[r]&&this.controls[r].patchValue(e[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t))}reset(e={},t={}){this._forEachChild((r,i)=>{r.reset(e[i],{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t),this._updateTouched(t),this.updateValueAndValidity(t)}getRawValue(){return this._reduceChildren({},(e,t,r)=>(e[r]=OM(t),e))}_syncPendingControls(){let e=this._reduceChildren(!1,(t,r)=>!!r._syncPendingControls()||t);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){Object.keys(this.controls).forEach(t=>{const r=this.controls[t];r&&e(r,t)})}_setUpControls(){this._forEachChild(e=>{e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(e){for(const t of Object.keys(this.controls)){const r=this.controls[t];if(this.contains(t)&&e(r))return!0}return!1}_reduceValue(){return this._reduceChildren({},(e,t,r)=>((t.enabled||this.disabled)&&(e[r]=t.value),e))}_reduceChildren(e,t){let r=e;return this._forEachChild((i,o)=>{r=t(r,i,o)}),r}_allControlsDisabled(){for(const e of Object.keys(this.controls))if(this.controls[e].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}}class GU extends Ov{constructor(e,t,r){super(Tv(t),xv(r,t)),this.controls=e,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(e){return this.controls[e]}push(e,t={}){this.controls.push(e),this._registerControl(e),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}insert(e,t,r={}){this.controls.splice(e,0,t),this._registerControl(t),this.updateValueAndValidity({emitEvent:r.emitEvent})}removeAt(e,t={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),this.controls.splice(e,1),this.updateValueAndValidity({emitEvent:t.emitEvent})}setControl(e,t,r={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),this.controls.splice(e,1),t&&(this.controls.splice(e,0,t),this._registerControl(t)),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(e,t={}){NM(this,e),e.forEach((r,i)=>{kM(this,i),this.at(i).setValue(r,{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(e,t={}){null!=e&&(e.forEach((r,i)=>{this.at(i)&&this.at(i).patchValue(r,{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t))}reset(e=[],t={}){this._forEachChild((r,i)=>{r.reset(e[i],{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t),this._updateTouched(t),this.updateValueAndValidity(t)}getRawValue(){return this.controls.map(e=>OM(e))}clear(e={}){this.controls.length<1||(this._forEachChild(t=>t._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:e.emitEvent}))}_syncPendingControls(){let e=this.controls.reduce((t,r)=>!!r._syncPendingControls()||t,!1);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){this.controls.forEach((t,r)=>{e(t,r)})}_updateValue(){this.value=this.controls.filter(e=>e.enabled||this.disabled).map(e=>e.value)}_anyControls(e){return this.controls.some(t=>t.enabled&&e(t))}_setUpControls(){this._forEachChild(e=>this._registerControl(e))}_allControlsDisabled(){for(const e of this.controls)if(e.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(e){e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)}}const qU={provide:Cn,useExisting:Be(()=>ff)},yc=(()=>Promise.resolve(null))();let ff=(()=>{class n extends Cn{constructor(t,r){super(),this.submitted=!1,this._directives=new Set,this.ngSubmit=new Ae,this.form=new kv({},vv(t),yv(r))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(t){yc.then(()=>{const r=this._findContainer(t.path);t.control=r.registerControl(t.name,t.control),gc(t.control,t),t.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(t)})}getControl(t){return this.form.get(t.path)}removeControl(t){yc.then(()=>{const r=this._findContainer(t.path);r&&r.removeControl(t.name),this._directives.delete(t)})}addFormGroup(t){yc.then(()=>{const r=this._findContainer(t.path),i=new kv({});(function MM(n,e){Ev(n,e)})(i,t),r.registerControl(t.name,i),i.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(t){yc.then(()=>{const r=this._findContainer(t.path);r&&r.removeControl(t.name)})}getFormGroup(t){return this.form.get(t.path)}updateModel(t,r){yc.then(()=>{this.form.get(t.path).setValue(r)})}setValue(t){this.control.setValue(t)}onSubmit(t){return this.submitted=!0,function IM(n,e){n._syncPendingControls(),e.forEach(t=>{const r=t.control;"submit"===r.updateOn&&r._pendingChange&&(t.viewToModelUpdate(r._pendingValue),r._pendingChange=!1)})}(this.form,this._directives),this.ngSubmit.emit(t),!1}onReset(){this.resetForm()}resetForm(t){this.form.reset(t),this.submitted=!1}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(t){return t.pop(),t.length?this.form.get(t):this.form}}return n.\u0275fac=function(t){return new(t||n)(S(sn,10),S(mo,10))},n.\u0275dir=Y({type:n,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(t,r){1&t&&Pe("submit",function(o){return r.onSubmit(o)})("reset",function(){return r.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Ye([qU]),Te]}),n})();const ZU={provide:vo,useExisting:Be(()=>hf)},LM=(()=>Promise.resolve(null))();let hf=(()=>{class n extends vo{constructor(t,r,i,o,s){super(),this._changeDetectorRef=s,this.control=new RM,this._registered=!1,this.update=new Ae,this._parent=t,this._setValidators(r),this._setAsyncValidators(i),this.valueAccessor=function Sv(n,e){if(!e)return null;let t,r,i;return Array.isArray(e),e.forEach(o=>{o.constructor===ef?t=o:function zU(n){return Object.getPrototypeOf(n.constructor)===rs}(o)?r=o:i=o}),i||r||t||null}(0,o)}ngOnChanges(t){if(this._checkForErrors(),!this._registered||"name"in t){if(this._registered&&(this._checkName(),this.formDirective)){const r=t.name.previousValue;this.formDirective.removeControl({name:r,path:this._getPath(r)})}this._setUpControl()}"isDisabled"in t&&this._updateDisabled(t),function wv(n,e){if(!n.hasOwnProperty("model"))return!1;const t=n.model;return!!t.isFirstChange()||!Object.is(e,t.currentValue)}(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){gc(this.control,this),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()}_updateValue(t){LM.then(()=>{var r;this.control.setValue(t,{emitViewToModelChange:!1}),null===(r=this._changeDetectorRef)||void 0===r||r.markForCheck()})}_updateDisabled(t){const r=t.isDisabled.currentValue,i=""===r||r&&"false"!==r;LM.then(()=>{var o;i&&!this.control.disabled?this.control.disable():!i&&this.control.disabled&&this.control.enable(),null===(o=this._changeDetectorRef)||void 0===o||o.markForCheck()})}_getPath(t){return this._parent?function sf(n,e){return[...e.path,n]}(t,this._parent):[t]}}return n.\u0275fac=function(t){return new(t||n)(S(Cn,9),S(sn,10),S(mo,10),S(cr,10),S(es,8))},n.\u0275dir=Y({type:n,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[Ye([ZU]),Te,tr]}),n})(),BM=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275dir=Y({type:n,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),n})(),VM=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=ut({type:n}),n.\u0275inj=at({}),n})(),bz=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=ut({type:n}),n.\u0275inj=at({imports:[[VM]]}),n})(),iI=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=ut({type:n}),n.\u0275inj=at({imports:[bz]}),n})(),Pt=(()=>{class n{static addClass(t,r){t.classList?t.classList.add(r):t.className+=" "+r}static addMultipleClasses(t,r){if(t.classList){let i=r.trim().split(" ");for(let o=0;oa.height?(l=-1*i.height,t.style.transformOrigin="bottom",s.top+l<0&&(l=-1*s.top)):(l=o,t.style.transformOrigin="top"),c=i.width>a.width?-1*s.left:s.left+i.width>a.width?-1*(s.left+i.width-a.width):0,t.style.top=l+"px",t.style.left=c+"px"}static absolutePosition(t,r){let h,p,i=t.offsetParent?{width:t.offsetWidth,height:t.offsetHeight}:this.getHiddenElementDimensions(t),o=i.height,s=i.width,a=r.offsetHeight,l=r.offsetWidth,c=r.getBoundingClientRect(),u=this.getWindowScrollTop(),d=this.getWindowScrollLeft(),f=this.getViewport();c.top+a+o>f.height?(h=c.top+u-o,t.style.transformOrigin="bottom",h<0&&(h=u)):(h=a+c.top+u,t.style.transformOrigin="top"),p=c.left+s>f.width?Math.max(0,c.left+d+l-s):c.left+d,t.style.top=h+"px",t.style.left=p+"px"}static getParents(t,r=[]){return null===t.parentNode?r:this.getParents(t.parentNode,r.concat([t.parentNode]))}static getScrollableParents(t){let r=[];if(t){let i=this.getParents(t);const o=/(auto|scroll)/,s=a=>{let l=window.getComputedStyle(a,null);return o.test(l.getPropertyValue("overflow"))||o.test(l.getPropertyValue("overflowX"))||o.test(l.getPropertyValue("overflowY"))};for(let a of i){let l=1===a.nodeType&&a.dataset.scrollselectors;if(l){let c=l.split(",");for(let u of c){let d=this.findSingle(a,u);d&&s(d)&&r.push(d)}}9!==a.nodeType&&s(a)&&r.push(a)}}return r}static getHiddenElementOuterHeight(t){t.style.visibility="hidden",t.style.display="block";let r=t.offsetHeight;return t.style.display="none",t.style.visibility="visible",r}static getHiddenElementOuterWidth(t){t.style.visibility="hidden",t.style.display="block";let r=t.offsetWidth;return t.style.display="none",t.style.visibility="visible",r}static getHiddenElementDimensions(t){let r={};return t.style.visibility="hidden",t.style.display="block",r.width=t.offsetWidth,r.height=t.offsetHeight,t.style.display="none",t.style.visibility="visible",r}static scrollInView(t,r){let i=getComputedStyle(t).getPropertyValue("borderTopWidth"),o=i?parseFloat(i):0,s=getComputedStyle(t).getPropertyValue("paddingTop"),a=s?parseFloat(s):0,l=t.getBoundingClientRect(),u=r.getBoundingClientRect().top+document.body.scrollTop-(l.top+document.body.scrollTop)-o-a,d=t.scrollTop,f=t.clientHeight,h=this.getOuterHeight(r);u<0?t.scrollTop=d+u:u+h>f&&(t.scrollTop=d+u-f+h)}static fadeIn(t,r){t.style.opacity=0;let i=+new Date,o=0,s=function(){o=+t.style.opacity.replace(",",".")+((new Date).getTime()-i)/r,t.style.opacity=o,i=+new Date,+o<1&&(window.requestAnimationFrame&&requestAnimationFrame(s)||setTimeout(s,16))};s()}static fadeOut(t,r){var i=1,a=50/r;let l=setInterval(()=>{(i-=a)<=0&&(i=0,clearInterval(l)),t.style.opacity=i},50)}static getWindowScrollTop(){let t=document.documentElement;return(window.pageYOffset||t.scrollTop)-(t.clientTop||0)}static getWindowScrollLeft(){let t=document.documentElement;return(window.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}static matches(t,r){var i=Element.prototype;return(i.matches||i.webkitMatchesSelector||i.mozMatchesSelector||i.msMatchesSelector||function(s){return-1!==[].indexOf.call(document.querySelectorAll(s),this)}).call(t,r)}static getOuterWidth(t,r){let i=t.offsetWidth;if(r){let o=getComputedStyle(t);i+=parseFloat(o.marginLeft)+parseFloat(o.marginRight)}return i}static getHorizontalPadding(t){let r=getComputedStyle(t);return parseFloat(r.paddingLeft)+parseFloat(r.paddingRight)}static getHorizontalMargin(t){let r=getComputedStyle(t);return parseFloat(r.marginLeft)+parseFloat(r.marginRight)}static innerWidth(t){let r=t.offsetWidth,i=getComputedStyle(t);return r+=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight),r}static width(t){let r=t.offsetWidth,i=getComputedStyle(t);return r-=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight),r}static getInnerHeight(t){let r=t.offsetHeight,i=getComputedStyle(t);return r+=parseFloat(i.paddingTop)+parseFloat(i.paddingBottom),r}static getOuterHeight(t,r){let i=t.offsetHeight;if(r){let o=getComputedStyle(t);i+=parseFloat(o.marginTop)+parseFloat(o.marginBottom)}return i}static getHeight(t){let r=t.offsetHeight,i=getComputedStyle(t);return r-=parseFloat(i.paddingTop)+parseFloat(i.paddingBottom)+parseFloat(i.borderTopWidth)+parseFloat(i.borderBottomWidth),r}static getWidth(t){let r=t.offsetWidth,i=getComputedStyle(t);return r-=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight)+parseFloat(i.borderLeftWidth)+parseFloat(i.borderRightWidth),r}static getViewport(){let t=window,r=document,i=r.documentElement,o=r.getElementsByTagName("body")[0];return{width:t.innerWidth||i.clientWidth||o.clientWidth,height:t.innerHeight||i.clientHeight||o.clientHeight}}static getOffset(t){var r=t.getBoundingClientRect();return{top:r.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:r.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0)}}static replaceElementWith(t,r){let i=t.parentNode;if(!i)throw"Can't replace element";return i.replaceChild(r,t)}static getUserAgent(){return navigator.userAgent}static isIE(){var t=window.navigator.userAgent;return t.indexOf("MSIE ")>0||(t.indexOf("Trident/")>0?(t.indexOf("rv:"),!0):t.indexOf("Edge/")>0)}static isIOS(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream}static isAndroid(){return/(android)/i.test(navigator.userAgent)}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0}static appendChild(t,r){if(this.isElement(r))r.appendChild(t);else{if(!r.el||!r.el.nativeElement)throw"Cannot append "+r+" to "+t;r.el.nativeElement.appendChild(t)}}static removeChild(t,r){if(this.isElement(r))r.removeChild(t);else{if(!r.el||!r.el.nativeElement)throw"Cannot remove "+t+" from "+r;r.el.nativeElement.removeChild(t)}}static removeElement(t){"remove"in Element.prototype?t.remove():t.parentNode.removeChild(t)}static isElement(t){return"object"==typeof HTMLElement?t instanceof HTMLElement:t&&"object"==typeof t&&null!==t&&1===t.nodeType&&"string"==typeof t.nodeName}static calculateScrollbarWidth(t){if(t){let r=getComputedStyle(t);return t.offsetWidth-t.clientWidth-parseFloat(r.borderLeftWidth)-parseFloat(r.borderRightWidth)}{if(null!==this.calculatedScrollbarWidth)return this.calculatedScrollbarWidth;let r=document.createElement("div");r.className="p-scrollbar-measure",document.body.appendChild(r);let i=r.offsetWidth-r.clientWidth;return document.body.removeChild(r),this.calculatedScrollbarWidth=i,i}}static calculateScrollbarHeight(){if(null!==this.calculatedScrollbarHeight)return this.calculatedScrollbarHeight;let t=document.createElement("div");t.className="p-scrollbar-measure",document.body.appendChild(t);let r=t.offsetHeight-t.clientHeight;return document.body.removeChild(t),this.calculatedScrollbarWidth=r,r}static invokeElementMethod(t,r,i){t[r].apply(t,i)}static clearSelection(){if(window.getSelection)window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().rangeCount>0&&window.getSelection().getRangeAt(0).getClientRects().length>0&&window.getSelection().removeAllRanges();else if(document.selection&&document.selection.empty)try{document.selection.empty()}catch(t){}}static getBrowser(){if(!this.browser){let t=this.resolveUserAgent();this.browser={},t.browser&&(this.browser[t.browser]=!0,this.browser.version=t.version),this.browser.chrome?this.browser.webkit=!0:this.browser.webkit&&(this.browser.safari=!0)}return this.browser}static resolveUserAgent(){let t=navigator.userAgent.toLowerCase(),r=/(chrome)[ \/]([\w.]+)/.exec(t)||/(webkit)[ \/]([\w.]+)/.exec(t)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(t)||/(msie) ([\w.]+)/.exec(t)||t.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(t)||[];return{browser:r[1]||"",version:r[2]||"0"}}static isInteger(t){return Number.isInteger?Number.isInteger(t):"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}static isHidden(t){return null===t.offsetParent}static getFocusableElements(t){let r=n.find(t,'button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n [href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]), select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]), [tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n [contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]):not(.p-disabled)'),i=[];for(let o of r)"none"!=getComputedStyle(o).display&&"hidden"!=getComputedStyle(o).visibility&&i.push(o);return i}static generateZIndex(){return this.zindex=this.zindex||999,++this.zindex}}return n.zindex=1e3,n.calculatedScrollbarWidth=null,n.calculatedScrollbarHeight=null,n})();class pt{static equals(e,t,r){return r?this.resolveFieldData(e,r)===this.resolveFieldData(t,r):this.equalsByValue(e,t)}static equalsByValue(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){var o,s,a,r=Array.isArray(e),i=Array.isArray(t);if(r&&i){if((s=e.length)!=t.length)return!1;for(o=s;0!=o--;)if(!this.equalsByValue(e[o],t[o]))return!1;return!0}if(r!=i)return!1;var l=e instanceof Date,c=t instanceof Date;if(l!=c)return!1;if(l&&c)return e.getTime()==t.getTime();var u=e instanceof RegExp,d=t instanceof RegExp;if(u!=d)return!1;if(u&&d)return e.toString()==t.toString();var f=Object.keys(e);if((s=f.length)!==Object.keys(t).length)return!1;for(o=s;0!=o--;)if(!Object.prototype.hasOwnProperty.call(t,f[o]))return!1;for(o=s;0!=o--;)if(!this.equalsByValue(e[a=f[o]],t[a]))return!1;return!0}return e!=e&&t!=t}static resolveFieldData(e,t){if(e&&t){if(this.isFunction(t))return t(e);if(-1==t.indexOf("."))return e[t];{let r=t.split("."),i=e;for(let o=0,s=r.length;o=e.length&&(r%=e.length,t%=e.length),e.splice(r,0,e.splice(t,1)[0]))}static insertIntoOrderedArray(e,t,r,i){if(r.length>0){let o=!1;for(let s=0;st){r.splice(s,0,e),o=!0;break}o||r.push(e)}else r.push(e)}static findIndexInList(e,t){let r=-1;if(t)for(let i=0;i-1&&(e=e.replace(/[\xC0-\xC5]/g,"A").replace(/[\xC6]/g,"AE").replace(/[\xC7]/g,"C").replace(/[\xC8-\xCB]/g,"E").replace(/[\xCC-\xCF]/g,"I").replace(/[\xD0]/g,"D").replace(/[\xD1]/g,"N").replace(/[\xD2-\xD6\xD8]/g,"O").replace(/[\xD9-\xDC]/g,"U").replace(/[\xDD]/g,"Y").replace(/[\xDE]/g,"P").replace(/[\xE0-\xE5]/g,"a").replace(/[\xE6]/g,"ae").replace(/[\xE7]/g,"c").replace(/[\xE8-\xEB]/g,"e").replace(/[\xEC-\xEF]/g,"i").replace(/[\xF1]/g,"n").replace(/[\xF2-\xF6\xF8]/g,"o").replace(/[\xF9-\xFC]/g,"u").replace(/[\xFE]/g,"p").replace(/[\xFD\xFF]/g,"y")),e}static isEmpty(e){return null==e||""===e||Array.isArray(e)&&0===e.length||!(e instanceof Date)&&"object"==typeof e&&0===Object.keys(e).length}static isNotEmpty(e){return!this.isEmpty(e)}}!function Dz(){let n=[];const i=o=>o&&parseInt(o.style.zIndex,10)||0}();const sI=["*"];let Vv,an=(()=>{class n{}return n.STARTS_WITH="startsWith",n.CONTAINS="contains",n.NOT_CONTAINS="notContains",n.ENDS_WITH="endsWith",n.EQUALS="equals",n.NOT_EQUALS="notEquals",n.IN="in",n.LESS_THAN="lt",n.LESS_THAN_OR_EQUAL_TO="lte",n.GREATER_THAN="gt",n.GREATER_THAN_OR_EQUAL_TO="gte",n.BETWEEN="between",n.IS="is",n.IS_NOT="isNot",n.BEFORE="before",n.AFTER="after",n.DATE_IS="dateIs",n.DATE_IS_NOT="dateIsNot",n.DATE_BEFORE="dateBefore",n.DATE_AFTER="dateAfter",n})(),aI=(()=>{class n{constructor(){this.ripple=!1,this.filterMatchModeOptions={text:[an.STARTS_WITH,an.CONTAINS,an.NOT_CONTAINS,an.ENDS_WITH,an.EQUALS,an.NOT_EQUALS],numeric:[an.EQUALS,an.NOT_EQUALS,an.LESS_THAN,an.LESS_THAN_OR_EQUAL_TO,an.GREATER_THAN,an.GREATER_THAN_OR_EQUAL_TO],date:[an.DATE_IS,an.DATE_IS_NOT,an.DATE_BEFORE,an.DATE_AFTER]},this.translation={startsWith:"Starts with",contains:"Contains",notContains:"Not contains",endsWith:"Ends with",equals:"Equals",notEquals:"Not equals",noFilter:"No Filter",lt:"Less than",lte:"Less than or equal to",gt:"Greater than",gte:"Greater than or equal to",is:"Is",isNot:"Is not",before:"Before",after:"After",dateIs:"Date is",dateIsNot:"Date is not",dateBefore:"Date is before",dateAfter:"Date is after",clear:"Clear",apply:"Apply",matchAll:"Match All",matchAny:"Match Any",addRule:"Add Rule",removeRule:"Remove Rule",accept:"Yes",reject:"No",choose:"Choose",upload:"Upload",cancel:"Cancel",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dateFormat:"mm/dd/yy",firstDayOfWeek:0,today:"Today",weekHeader:"Wk",weak:"Weak",medium:"Medium",strong:"Strong",passwordPrompt:"Enter a password",emptyMessage:"No results found",emptyFilterMessage:"No results found"},this.zIndex={modal:1100,overlay:1e3,menu:1e3,tooltip:1100},this.translationSource=new Me,this.translationObserver=this.translationSource.asObservable()}getTranslation(t){return this.translation[t]}setTranslation(t){this.translation=Object.assign(Object.assign({},this.translation),t),this.translationSource.next(this.translation)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=W({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),lI=(()=>{class n{}return n.STARTS_WITH="startsWith",n.CONTAINS="contains",n.NOT_CONTAINS="notContains",n.ENDS_WITH="endsWith",n.EQUALS="equals",n.NOT_EQUALS="notEquals",n.NO_FILTER="noFilter",n.LT="lt",n.LTE="lte",n.GT="gt",n.GTE="gte",n.IS="is",n.IS_NOT="isNot",n.BEFORE="before",n.AFTER="after",n.CLEAR="clear",n.APPLY="apply",n.MATCH_ALL="matchAll",n.MATCH_ANY="matchAny",n.ADD_RULE="addRule",n.REMOVE_RULE="removeRule",n.ACCEPT="accept",n.REJECT="reject",n.CHOOSE="choose",n.UPLOAD="upload",n.CANCEL="cancel",n.DAY_NAMES="dayNames",n.DAY_NAMES_SHORT="dayNamesShort",n.DAY_NAMES_MIN="dayNamesMin",n.MONTH_NAMES="monthNames",n.MONTH_NAMES_SHORT="monthNamesShort",n.FIRST_DAY_OF_WEEK="firstDayOfWeek",n.TODAY="today",n.WEEK_HEADER="weekHeader",n.WEAK="weak",n.MEDIUM="medium",n.STRONG="strong",n.PASSWORD_PROMPT="passwordPrompt",n.EMPTY_MESSAGE="emptyMessage",n.EMPTY_FILTER_MESSAGE="emptyFilterMessage",n})(),Cz=(()=>{class n{constructor(){this.filters={startsWith:(t,r,i)=>{if(null==r||""===r.trim())return!0;if(null==t)return!1;let o=pt.removeAccents(r.toString()).toLocaleLowerCase(i);return pt.removeAccents(t.toString()).toLocaleLowerCase(i).slice(0,o.length)===o},contains:(t,r,i)=>{if(null==r||"string"==typeof r&&""===r.trim())return!0;if(null==t)return!1;let o=pt.removeAccents(r.toString()).toLocaleLowerCase(i);return-1!==pt.removeAccents(t.toString()).toLocaleLowerCase(i).indexOf(o)},notContains:(t,r,i)=>{if(null==r||"string"==typeof r&&""===r.trim())return!0;if(null==t)return!1;let o=pt.removeAccents(r.toString()).toLocaleLowerCase(i);return-1===pt.removeAccents(t.toString()).toLocaleLowerCase(i).indexOf(o)},endsWith:(t,r,i)=>{if(null==r||""===r.trim())return!0;if(null==t)return!1;let o=pt.removeAccents(r.toString()).toLocaleLowerCase(i),s=pt.removeAccents(t.toString()).toLocaleLowerCase(i);return-1!==s.indexOf(o,s.length-o.length)},equals:(t,r,i)=>null==r||"string"==typeof r&&""===r.trim()||null!=t&&(t.getTime&&r.getTime?t.getTime()===r.getTime():pt.removeAccents(t.toString()).toLocaleLowerCase(i)==pt.removeAccents(r.toString()).toLocaleLowerCase(i)),notEquals:(t,r,i)=>!(null==r||"string"==typeof r&&""===r.trim()||null!=t&&(t.getTime&&r.getTime?t.getTime()===r.getTime():pt.removeAccents(t.toString()).toLocaleLowerCase(i)==pt.removeAccents(r.toString()).toLocaleLowerCase(i))),in:(t,r)=>{if(null==r||0===r.length)return!0;for(let i=0;inull==r||null==r[0]||null==r[1]||null!=t&&(t.getTime?r[0].getTime()<=t.getTime()&&t.getTime()<=r[1].getTime():r[0]<=t&&t<=r[1]),lt:(t,r,i)=>null==r||null!=t&&(t.getTime&&r.getTime?t.getTime()null==r||null!=t&&(t.getTime&&r.getTime?t.getTime()<=r.getTime():t<=r),gt:(t,r,i)=>null==r||null!=t&&(t.getTime&&r.getTime?t.getTime()>r.getTime():t>r),gte:(t,r,i)=>null==r||null!=t&&(t.getTime&&r.getTime?t.getTime()>=r.getTime():t>=r),is:(t,r,i)=>this.filters.equals(t,r,i),isNot:(t,r,i)=>this.filters.notEquals(t,r,i),before:(t,r,i)=>this.filters.lt(t,r,i),after:(t,r,i)=>this.filters.gt(t,r,i),dateIs:(t,r)=>null==r||null!=t&&t.toDateString()===r.toDateString(),dateIsNot:(t,r)=>null==r||null!=t&&t.toDateString()!==r.toDateString(),dateBefore:(t,r)=>null==r||null!=t&&t.getTime()null==r||null!=t&&t.getTime()>r.getTime()}}filter(t,r,i,o,s){let a=[];if(t)for(let l of t)for(let c of r){let u=pt.resolveFieldData(l,c);if(this.filters[o](u,i,s)){a.push(l);break}}return a}register(t,r){this.filters[t]=r}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=W({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),cI=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=wt({type:n,selectors:[["p-header"]],ngContentSelectors:sI,decls:1,vars:0,template:function(t,r){1&t&&(ma(),Ni(0))},encapsulation:2}),n})(),uI=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=wt({type:n,selectors:[["p-footer"]],ngContentSelectors:sI,decls:1,vars:0,template:function(t,r){1&t&&(ma(),Ni(0))},encapsulation:2}),n})(),jv=(()=>{class n{constructor(t){this.template=t}getType(){return this.name}}return n.\u0275fac=function(t){return new(t||n)(S(oi))},n.\u0275dir=Y({type:n,selectors:[["","pTemplate",""]],inputs:{type:"type",name:["pTemplate","name"]}}),n})(),_c=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=ut({type:n}),n.\u0275inj=at({imports:[[Pr]]}),n})(),Ez=(()=>{class n{constructor(t,r,i){this.el=t,this.zone=r,this.config=i}ngAfterViewInit(){this.config&&this.config.ripple&&this.zone.runOutsideAngular(()=>{this.create(),this.mouseDownListener=this.onMouseDown.bind(this),this.el.nativeElement.addEventListener("mousedown",this.mouseDownListener)})}onMouseDown(t){let r=this.getInk();if(!r||"none"===getComputedStyle(r,null).display)return;if(Pt.removeClass(r,"p-ink-active"),!Pt.getHeight(r)&&!Pt.getWidth(r)){let a=Math.max(Pt.getOuterWidth(this.el.nativeElement),Pt.getOuterHeight(this.el.nativeElement));r.style.height=a+"px",r.style.width=a+"px"}let i=Pt.getOffset(this.el.nativeElement),o=t.pageX-i.left+document.body.scrollTop-Pt.getWidth(r)/2,s=t.pageY-i.top+document.body.scrollLeft-Pt.getHeight(r)/2;r.style.top=s+"px",r.style.left=o+"px",Pt.addClass(r,"p-ink-active")}getInk(){for(let t=0;t{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=ut({type:n}),n.\u0275inj=at({imports:[[Pr]]}),n})(),Sz=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=ut({type:n}),n.\u0275inj=at({imports:[[Pr,pf]]}),n})();try{Vv="undefined"!=typeof Intl&&Intl.v8BreakIterator}catch(n){Vv=!1}let bc,Hv,Mz=(()=>{class n{constructor(t){this._platformId=t,this.isBrowser=this._platformId?function BH(n){return n===LS}(this._platformId):"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!Vv)&&"undefined"!=typeof CSS&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}}return n.\u0275fac=function(t){return new(t||n)(R(lc))},n.\u0275prov=W({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function Dc(n){return function Iz(){if(null==bc&&"undefined"!=typeof window)try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>bc=!0}))}finally{bc=bc||!1}return bc}()?n:!!n.capture}function fI(n){if(function Tz(){if(null==Hv){const n="undefined"!=typeof document?document.head:null;Hv=!(!n||!n.createShadowRoot&&!n.attachShadow)}return Hv}()){const e=n.getRootNode?n.getRootNode():null;if("undefined"!=typeof ShadowRoot&&ShadowRoot&&e instanceof ShadowRoot)return e}return null}function mf(n){return n.composedPath?n.composedPath()[0]:n.target}function ur(n){return n instanceof bt?n.nativeElement:n}function yo(){}function An(n,e,t){return function(i){return i.lift(new Kz(n,e,t))}}class Kz{constructor(e,t,r){this.nextOrObserver=e,this.error=t,this.complete=r}call(e,t){return t.subscribe(new Zz(e,this.nextOrObserver,this.error,this.complete))}}class Zz extends nt{constructor(e,t,r,i){super(e),this._tapNext=yo,this._tapError=yo,this._tapComplete=yo,this._tapError=r||yo,this._tapComplete=i||yo,tt(t)?(this._context=this,this._tapNext=t):t&&(this._context=t,this._tapNext=t.next||yo,this._tapError=t.error||yo,this._tapComplete=t.complete||yo)}_next(e){try{this._tapNext.call(this._context,e)}catch(t){return void this.destination.error(t)}this.destination.next(e)}_error(e){try{this._tapError.call(this._context,e)}catch(t){return void this.destination.error(t)}this.destination.error(e)}_complete(){try{this._tapComplete.call(this._context)}catch(e){return void this.destination.error(e)}return this.destination.complete()}}class Yz extends ke{constructor(e,t){super()}schedule(e,t=0){return this}}class vf extends Yz{constructor(e,t){super(e,t),this.scheduler=e,this.work=t,this.pending=!1}schedule(e,t=0){if(this.closed)return this;this.state=e;const r=this.id,i=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(i,r,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(i,this.id,t),this}requestAsyncId(e,t,r=0){return setInterval(e.flush.bind(e,this),r)}recycleAsyncId(e,t,r=0){if(null!==r&&this.delay===r&&!1===this.pending)return t;clearInterval(t)}execute(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const r=this._execute(e,t);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(e,t){let i,r=!1;try{this.work(e)}catch(o){r=!0,i=!!o&&o||new Error(o)}if(r)return this.unsubscribe(),i}_unsubscribe(){const e=this.id,t=this.scheduler,r=t.actions,i=r.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==i&&r.splice(i,1),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null}}let hI=(()=>{class n{constructor(t,r=n.now){this.SchedulerAction=t,this.now=r}schedule(t,r=0,i){return new this.SchedulerAction(this,t).schedule(i,r)}}return n.now=()=>Date.now(),n})();class Fr extends hI{constructor(e,t=hI.now){super(e,()=>Fr.delegate&&Fr.delegate!==this?Fr.delegate.now():t()),this.actions=[],this.active=!1,this.scheduled=void 0}schedule(e,t=0,r){return Fr.delegate&&Fr.delegate!==this?Fr.delegate.schedule(e,t,r):super.schedule(e,t,r)}flush(e){const{actions:t}=this;if(this.active)return void t.push(e);let r;this.active=!0;do{if(r=e.execute(e.state,e.delay))break}while(e=t.shift());if(this.active=!1,r){for(;e=t.shift();)e.unsubscribe();throw r}}}const Cc=new Fr(vf);class Jz{constructor(e,t){this.dueTime=e,this.scheduler=t}call(e,t){return t.subscribe(new Xz(e,this.dueTime,this.scheduler))}}class Xz extends nt{constructor(e,t,r){super(e),this.dueTime=t,this.scheduler=r,this.debouncedSubscription=null,this.lastValue=null,this.hasValue=!1}_next(e){this.clearDebounce(),this.lastValue=e,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(e3,this.dueTime,this))}_complete(){this.debouncedNext(),this.destination.complete()}debouncedNext(){if(this.clearDebounce(),this.hasValue){const{lastValue:e}=this;this.lastValue=null,this.hasValue=!1,this.destination.next(e)}}clearDebounce(){const e=this.debouncedSubscription;null!==e&&(this.remove(e),e.unsubscribe(),this.debouncedSubscription=null)}}function e3(n){n.debouncedNext()}function _o(n,e){return function(r){return r.lift(new t3(n,e))}}class t3{constructor(e,t){this.predicate=e,this.thisArg=t}call(e,t){return t.subscribe(new n3(e,this.predicate,this.thisArg))}}class n3 extends nt{constructor(e,t,r){super(e),this.predicate=t,this.thisArg=r,this.count=0}_next(e){let t;try{t=this.predicate.call(this.thisArg,e,this.count++)}catch(r){return void this.destination.error(r)}t&&this.destination.next(e)}}class mI extends class s3{constructor(e){this._items=e,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new Me,this._typeaheadSubscription=ke.EMPTY,this._vertical=!0,this._allowedModifierKeys=[],this._homeAndEnd=!1,this._skipPredicateFn=t=>t.disabled,this._pressedLetters=[],this.tabOut=new Me,this.change=new Me,e instanceof oc&&e.changes.subscribe(t=>{if(this._activeItem){const i=t.toArray().indexOf(this._activeItem);i>-1&&i!==this._activeItemIndex&&(this._activeItemIndex=i)}})}skipPredicate(e){return this._skipPredicateFn=e,this}withWrap(e=!0){return this._wrap=e,this}withVerticalOrientation(e=!0){return this._vertical=e,this}withHorizontalOrientation(e){return this._horizontal=e,this}withAllowedModifierKeys(e){return this._allowedModifierKeys=e,this}withTypeAhead(e=200){return this._typeaheadSubscription.unsubscribe(),this._typeaheadSubscription=this._letterKeyStream.pipe(An(t=>this._pressedLetters.push(t)),function Qz(n,e=Cc){return t=>t.lift(new Jz(n,e))}(e),_o(()=>this._pressedLetters.length>0),be(()=>this._pressedLetters.join(""))).subscribe(t=>{const r=this._getItemsArray();for(let i=1;i!e[o]||this._allowedModifierKeys.indexOf(o)>-1);switch(t){case 9:return void this.tabOut.next();case 40:if(this._vertical&&i){this.setNextItemActive();break}return;case 38:if(this._vertical&&i){this.setPreviousItemActive();break}return;case 39:if(this._horizontal&&i){"rtl"===this._horizontal?this.setPreviousItemActive():this.setNextItemActive();break}return;case 37:if(this._horizontal&&i){"rtl"===this._horizontal?this.setNextItemActive():this.setPreviousItemActive();break}return;case 36:if(this._homeAndEnd&&i){this.setFirstItemActive();break}return;case 35:if(this._homeAndEnd&&i){this.setLastItemActive();break}return;default:return void((i||function qz(n,...e){return e.length?e.some(t=>n[t]):n.altKey||n.shiftKey||n.ctrlKey||n.metaKey}(e,"shiftKey"))&&(e.key&&1===e.key.length?this._letterKeyStream.next(e.key.toLocaleUpperCase()):(t>=65&&t<=90||t>=48&&t<=57)&&this._letterKeyStream.next(String.fromCharCode(t))))}this._pressedLetters=[],e.preventDefault()}get activeItemIndex(){return this._activeItemIndex}get activeItem(){return this._activeItem}isTyping(){return this._pressedLetters.length>0}setFirstItemActive(){this._setActiveItemByIndex(0,1)}setLastItemActive(){this._setActiveItemByIndex(this._items.length-1,-1)}setNextItemActive(){this._activeItemIndex<0?this.setFirstItemActive():this._setActiveItemByDelta(1)}setPreviousItemActive(){this._activeItemIndex<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)}updateActiveItem(e){const t=this._getItemsArray(),r="number"==typeof e?e:t.indexOf(e),i=t[r];this._activeItem=null==i?null:i,this._activeItemIndex=r}_setActiveItemByDelta(e){this._wrap?this._setActiveInWrapMode(e):this._setActiveInDefaultMode(e)}_setActiveInWrapMode(e){const t=this._getItemsArray();for(let r=1;r<=t.length;r++){const i=(this._activeItemIndex+e*r+t.length)%t.length;if(!this._skipPredicateFn(t[i]))return void this.setActiveItem(i)}}_setActiveInDefaultMode(e){this._setActiveItemByIndex(this._activeItemIndex+e,e)}_setActiveItemByIndex(e,t){const r=this._getItemsArray();if(r[e]){for(;this._skipPredicateFn(r[e]);)if(!r[e+=t])return;this.setActiveItem(e)}}_getItemsArray(){return this._items instanceof oc?this._items.toArray():this._items}}{constructor(){super(...arguments),this._origin="program"}setFocusOrigin(e){return this._origin=e,this}setActiveItem(e){super.setActiveItem(e),this.activeItem&&this.activeItem.focus(this._origin)}}function Uv(n){return!gl(n)&&n-parseFloat(n)+1>=0}function m3(n){const{subscriber:e,counter:t,period:r}=n;e.next(t),this.schedule({subscriber:e,counter:t+1,period:r},r)}const yI=new class y3 extends Fr{flush(e){this.active=!0,this.scheduled=void 0;const{actions:t}=this;let r,i=-1,o=t.length;e=e||t.shift();do{if(r=e.execute(e.state,e.delay))break}while(++i0?super.requestAsyncId(e,t,r):(e.actions.push(this),e.scheduled||(e.scheduled=requestAnimationFrame(()=>e.flush(null))))}recycleAsyncId(e,t,r=0){if(null!==r&&r>0||null===r&&this.delay>0)return super.recycleAsyncId(e,t,r);0===e.actions.length&&(cancelAnimationFrame(t),e.scheduled=void 0)}});function _I(n){return e=>e.lift(new _3(n))}class _3{constructor(e){this.notifier=e}call(e,t){const r=new b3(e),i=_l(this.notifier,new vl(r));return i&&!r.seenValue?(r.add(i),t.subscribe(r)):r}}class b3 extends yl{constructor(e){super(e),this.seenValue=!1}notifyNext(){this.seenValue=!0,this.complete()}notifyComplete(){}}let D3=1;const C3=Promise.resolve(),yf={};function bI(n){return n in yf&&(delete yf[n],!0)}const DI={setImmediate(n){const e=D3++;return yf[e]=!0,C3.then(()=>bI(e)&&n()),e},clearImmediate(n){bI(n)}};new class w3 extends Fr{flush(e){this.active=!0,this.scheduled=void 0;const{actions:t}=this;let r,i=-1,o=t.length;e=e||t.shift();do{if(r=e.execute(e.state,e.delay))break}while(++i0?super.requestAsyncId(e,t,r):(e.actions.push(this),e.scheduled||(e.scheduled=DI.setImmediate(e.flush.bind(e,null))))}recycleAsyncId(e,t,r=0){if(null!==r&&r>0||null===r&&this.delay>0)return super.recycleAsyncId(e,t,r);0===e.actions.length&&(DI.clearImmediate(t),e.scheduled=void 0)}});class I3{constructor(e){this.durationSelector=e}call(e,t){return t.subscribe(new T3(e,this.durationSelector))}}class T3 extends yl{constructor(e,t){super(e),this.durationSelector=t,this.hasValue=!1}_next(e){if(this.value=e,this.hasValue=!0,!this.throttled){let t;try{const{durationSelector:i}=this;t=i(e)}catch(i){return this.destination.error(i)}const r=_l(t,new vl(this));!r||r.closed?this.clearThrottle():this.add(this.throttled=r)}}clearThrottle(){const{value:e,hasValue:t,throttled:r}=this;r&&(this.remove(r),this.throttled=void 0,r.unsubscribe()),t&&(this.value=void 0,this.hasValue=!1,this.destination.next(e))}notifyNext(){this.clearThrottle()}notifyComplete(){this.clearThrottle()}}function A3(n){const{index:e,period:t,subscriber:r}=n;if(r.next(e),!r.closed){if(-1===t)return r.complete();n.index=e+1,this.schedule(n,t)}}let N3=(()=>{class n{constructor(t,r,i){this._platform=t,this._change=new Me,this._changeListener=o=>{this._change.next(o)},this._document=i,r.runOutsideAngular(()=>{if(t.isBrowser){const o=this._getWindow();o.addEventListener("resize",this._changeListener),o.addEventListener("orientationchange",this._changeListener)}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){if(this._platform.isBrowser){const t=this._getWindow();t.removeEventListener("resize",this._changeListener),t.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();const t={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),t}getViewportRect(){const t=this.getViewportScrollPosition(),{width:r,height:i}=this.getViewportSize();return{top:t.top,left:t.left,bottom:t.top+i,right:t.left+r,height:i,width:r}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};const t=this._document,r=this._getWindow(),i=t.documentElement,o=i.getBoundingClientRect();return{top:-o.top||t.body.scrollTop||r.scrollY||i.scrollTop||0,left:-o.left||t.body.scrollLeft||r.scrollX||i.scrollLeft||0}}change(t=20){return t>0?this._change.pipe(function O3(n,e=Cc){return function M3(n){return function(t){return t.lift(new I3(n))}}(()=>function x3(n=0,e,t){let r=-1;return Uv(e)?r=Number(e)<1?1:Number(e):Os(e)&&(t=e),Os(t)||(t=Cc),new Ne(i=>{const o=Uv(n)?n:+n-t.now();return t.schedule(A3,o,{index:0,period:r,subscriber:i})})}(n,e))}(t)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){const t=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:t.innerWidth,height:t.innerHeight}:{width:0,height:0}}}return n.\u0275fac=function(t){return new(t||n)(R(Mz),R(ot),R(Vt,8))},n.\u0275prov=W({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),R3=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=ut({type:n}),n.\u0275inj=at({}),n})();function zv(n,e,t){for(let r in e)if(e.hasOwnProperty(r)){const i=e[r];i?n.setProperty(r,i,(null==t?void 0:t.has(r))?"important":""):n.removeProperty(r)}return n}function xa(n,e){const t=e?"":"none";zv(n.style,{"touch-action":e?"":"none","-webkit-user-drag":e?"":"none","-webkit-tap-highlight-color":e?"":"transparent","user-select":t,"-ms-user-select":t,"-webkit-user-select":t,"-moz-user-select":t})}function CI(n,e,t){zv(n.style,{position:e?"":"fixed",top:e?"":"0",opacity:e?"":"0",left:e?"":"-999em"},t)}function _f(n,e){return e&&"none"!=e?n+" "+e:n}function EI(n){const e=n.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(n)*e}function Wv(n,e){return n.getPropertyValue(e).split(",").map(r=>r.trim())}function $v(n){const e=n.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height,x:e.x,y:e.y}}function Gv(n,e,t){const{top:r,bottom:i,left:o,right:s}=n;return t>=r&&t<=i&&e>=o&&e<=s}function Ec(n,e,t){n.top+=e,n.bottom=n.top+n.height,n.left+=t,n.right=n.left+n.width}function wI(n,e,t,r){const{top:i,right:o,bottom:s,left:a,width:l,height:c}=n,u=l*e,d=c*e;return r>i-d&&ra-u&&t{this.positions.set(t,{scrollPosition:{top:t.scrollTop,left:t.scrollLeft},clientRect:$v(t)})})}handleScroll(e){const t=mf(e),r=this.positions.get(t);if(!r)return null;const i=r.scrollPosition;let o,s;if(t===this._document){const c=this._viewportRuler.getViewportScrollPosition();o=c.top,s=c.left}else o=t.scrollTop,s=t.scrollLeft;const a=i.top-o,l=i.left-s;return this.positions.forEach((c,u)=>{c.clientRect&&t!==u&&t.contains(u)&&Ec(c.clientRect,a,l)}),i.top=o,i.left=s,{top:a,left:l}}}function MI(n){const e=n.cloneNode(!0),t=e.querySelectorAll("[id]"),r=n.nodeName.toLowerCase();e.removeAttribute("id");for(let i=0;i{if(this.beforeStarted.next(),this._handles.length){const l=this._handles.find(c=>a.target&&(a.target===c||c.contains(a.target)));l&&!this._disabledHandles.has(l)&&!this.disabled&&this._initializeDragSequence(l,a)}else this.disabled||this._initializeDragSequence(this._rootElement,a)},this._pointerMove=a=>{const l=this._getPointerPositionOnPage(a);if(!this._hasStartedDragging){if(Math.abs(l.x-this._pickupPositionOnPage.x)+Math.abs(l.y-this._pickupPositionOnPage.y)>=this._config.dragStartThreshold){const h=Date.now()>=this._dragStartTime+this._getDragStartDelay(a),p=this._dropContainer;if(!h)return void this._endDragSequence(a);(!p||!p.isDragging()&&!p.isReceiving())&&(a.preventDefault(),this._hasStartedDragging=!0,this._ngZone.run(()=>this._startDragSequence(a)))}return}this._boundaryElement&&(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=(this._preview||this._rootElement).getBoundingClientRect()),a.preventDefault();const c=this._getConstrainedPointerPosition(l);if(this._hasMoved=!0,this._lastKnownPointerPosition=l,this._updatePointerDirectionDelta(c),this._dropContainer)this._updateActiveDropContainer(c,l);else{const u=this._activeTransform;u.x=c.x-this._pickupPositionOnPage.x+this._passiveTransform.x,u.y=c.y-this._pickupPositionOnPage.y+this._passiveTransform.y,this._applyRootElementTransform(u.x,u.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:c,event:a,distance:this._getDragDistance(c),delta:this._pointerDirectionDelta})})},this._pointerUp=a=>{this._endDragSequence(a)},this.withRootElement(e).withParent(t.parentDragRef||null),this._parentPositions=new SI(r,o),s.registerDragItem(this)}get disabled(){return this._disabled||!(!this._dropContainer||!this._dropContainer.disabled)}set disabled(e){const t=function xz(n){return null!=n&&"false"!=`${n}`}(e);t!==this._disabled&&(this._disabled=t,this._toggleNativeDragInteractions(),this._handles.forEach(r=>xa(r,t)))}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(e){this._handles=e.map(r=>ur(r)),this._handles.forEach(r=>xa(r,this.disabled)),this._toggleNativeDragInteractions();const t=new Set;return this._disabledHandles.forEach(r=>{this._handles.indexOf(r)>-1&&t.add(r)}),this._disabledHandles=t,this}withPreviewTemplate(e){return this._previewTemplate=e,this}withPlaceholderTemplate(e){return this._placeholderTemplate=e,this}withRootElement(e){const t=ur(e);return t!==this._rootElement&&(this._rootElement&&this._removeRootElementListeners(this._rootElement),this._ngZone.runOutsideAngular(()=>{t.addEventListener("mousedown",this._pointerDown,OI),t.addEventListener("touchstart",this._pointerDown,AI)}),this._initialTransform=void 0,this._rootElement=t),"undefined"!=typeof SVGElement&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(e){return this._boundaryElement=e?ur(e):null,this._resizeSubscription.unsubscribe(),e&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(e){return this._parentDragRef=e,this}dispose(){var e,t;this._removeRootElementListeners(this._rootElement),this.isDragging()&&(null===(e=this._rootElement)||void 0===e||e.remove()),null===(t=this._anchor)||void 0===t||t.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeSubscriptions(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=this._parentDragRef=null}isDragging(){return this._hasStartedDragging&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}disableHandle(e){!this._disabledHandles.has(e)&&this._handles.indexOf(e)>-1&&(this._disabledHandles.add(e),xa(e,!0))}enableHandle(e){this._disabledHandles.has(e)&&(this._disabledHandles.delete(e),xa(e,this.disabled))}withDirection(e){return this._direction=e,this}_withDropContainer(e){this._dropContainer=e}getFreeDragPosition(){const e=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:e.x,y:e.y}}setFreeDragPosition(e){return this._activeTransform={x:0,y:0},this._passiveTransform.x=e.x,this._passiveTransform.y=e.y,this._dropContainer||this._applyRootElementTransform(e.x,e.y),this}withPreviewContainer(e){return this._previewContainer=e,this}_sortFromLastPointerPosition(){const e=this._lastKnownPointerPosition;e&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(e),e)}_removeSubscriptions(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe()}_destroyPreview(){var e,t;null===(e=this._preview)||void 0===e||e.remove(),null===(t=this._previewRef)||void 0===t||t.destroy(),this._preview=this._previewRef=null}_destroyPlaceholder(){var e,t;null===(e=this._placeholder)||void 0===e||e.remove(),null===(t=this._placeholderRef)||void 0===t||t.destroy(),this._placeholder=this._placeholderRef=null}_endDragSequence(e){if(this._dragDropRegistry.isDragging(this)&&(this._removeSubscriptions(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),this._hasStartedDragging))if(this.released.next({source:this}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(e),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;const t=this._getPointerPositionOnPage(e);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(t),dropPoint:t})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(e){wc(e)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();const t=this._dropContainer;if(t){const r=this._rootElement,i=r.parentNode,o=this._placeholder=this._createPlaceholderElement(),s=this._anchor=this._anchor||this._document.createComment(""),a=this._getShadowRoot();i.insertBefore(s,r),this._initialTransform=r.style.transform||"",this._preview=this._createPreviewElement(),CI(r,!1,qv),this._document.body.appendChild(i.replaceChild(o,r)),this._getPreviewInsertionPoint(i,a).appendChild(this._preview),this.started.next({source:this}),t.start(),this._initialContainer=t,this._initialIndex=t.getItemIndex(this)}else this.started.next({source:this}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(t?t.getScrollableParents():[])}_initializeDragSequence(e,t){this._parentDragRef&&t.stopPropagation();const r=this.isDragging(),i=wc(t),o=!i&&0!==t.button,s=this._rootElement,a=mf(t),l=!i&&this._lastTouchEventTime&&this._lastTouchEventTime+800>Date.now(),c=i?function h3(n){const e=n.touches&&n.touches[0]||n.changedTouches&&n.changedTouches[0];return!(!e||-1!==e.identifier||null!=e.radiusX&&1!==e.radiusX||null!=e.radiusY&&1!==e.radiusY)}(t):function f3(n){return 0===n.buttons||0===n.offsetX&&0===n.offsetY}(t);if(a&&a.draggable&&"mousedown"===t.type&&t.preventDefault(),r||o||l||c)return;if(this._handles.length){const f=s.style;this._rootElementTapHighlight=f.webkitTapHighlightColor||"",f.webkitTapHighlightColor="transparent"}this._hasStartedDragging=this._hasMoved=!1,this._removeSubscriptions(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(f=>this._updateOnScroll(f)),this._boundaryElement&&(this._boundaryRect=$v(this._boundaryElement));const u=this._previewTemplate;this._pickupPositionInElement=u&&u.template&&!u.matchSize?{x:0,y:0}:this._getPointerPositionInElement(e,t);const d=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(t);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:d.x,y:d.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,t)}_cleanupDragArtifacts(e){CI(this._rootElement,!0,qv),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{const t=this._dropContainer,r=t.getItemIndex(this),i=this._getPointerPositionOnPage(e),o=this._getDragDistance(i),s=t._isOverContainer(i.x,i.y);this.ended.next({source:this,distance:o,dropPoint:i}),this.dropped.next({item:this,currentIndex:r,previousIndex:this._initialIndex,container:t,previousContainer:this._initialContainer,isPointerOverContainer:s,distance:o,dropPoint:i}),t.drop(this,r,this._initialIndex,this._initialContainer,s,o,i),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:e,y:t},{x:r,y:i}){let o=this._initialContainer._getSiblingContainerFromPosition(this,e,t);!o&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(e,t)&&(o=this._initialContainer),o&&o!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=o,this._dropContainer.enter(this,e,t,o===this._initialContainer&&o.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:o,currentIndex:o.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(r,i),this._dropContainer._sortItem(this,e,t,this._pointerDirectionDelta),this._applyPreviewTransform(e-this._pickupPositionInElement.x,t-this._pickupPositionInElement.y))}_createPreviewElement(){const e=this._previewTemplate,t=this.previewClass,r=e?e.template:null;let i;if(r&&e){const o=e.matchSize?this._rootElement.getBoundingClientRect():null,s=e.viewContainer.createEmbeddedView(r,e.context);s.detectChanges(),i=NI(s,this._document),this._previewRef=s,e.matchSize?RI(i,o):i.style.transform=bf(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else{const o=this._rootElement;i=MI(o),RI(i,o.getBoundingClientRect()),this._initialTransform&&(i.style.transform=this._initialTransform)}return zv(i.style,{"pointer-events":"none",margin:"0",position:"fixed",top:"0",left:"0","z-index":`${this._config.zIndex||1e3}`},qv),xa(i,!1),i.classList.add("cdk-drag-preview"),i.setAttribute("dir",this._direction),t&&(Array.isArray(t)?t.forEach(o=>i.classList.add(o)):i.classList.add(t)),i}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();const e=this._placeholder.getBoundingClientRect();this._preview.classList.add("cdk-drag-animating"),this._applyPreviewTransform(e.left,e.top);const t=function P3(n){const e=getComputedStyle(n),t=Wv(e,"transition-property"),r=t.find(a=>"transform"===a||"all"===a);if(!r)return 0;const i=t.indexOf(r),o=Wv(e,"transition-duration"),s=Wv(e,"transition-delay");return EI(o[i])+EI(s[i])}(this._preview);return 0===t?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(r=>{const i=s=>{var a;(!s||mf(s)===this._preview&&"transform"===s.propertyName)&&(null===(a=this._preview)||void 0===a||a.removeEventListener("transitionend",i),r(),clearTimeout(o))},o=setTimeout(i,1.5*t);this._preview.addEventListener("transitionend",i)}))}_createPlaceholderElement(){const e=this._placeholderTemplate,t=e?e.template:null;let r;return t?(this._placeholderRef=e.viewContainer.createEmbeddedView(t,e.context),this._placeholderRef.detectChanges(),r=NI(this._placeholderRef,this._document)):r=MI(this._rootElement),r.classList.add("cdk-drag-placeholder"),r}_getPointerPositionInElement(e,t){const r=this._rootElement.getBoundingClientRect(),i=e===this._rootElement?null:e,o=i?i.getBoundingClientRect():r,s=wc(t)?t.targetTouches[0]:t,a=this._getViewportScrollPosition();return{x:o.left-r.left+(s.pageX-o.left-a.left),y:o.top-r.top+(s.pageY-o.top-a.top)}}_getPointerPositionOnPage(e){const t=this._getViewportScrollPosition(),r=wc(e)?e.touches[0]||e.changedTouches[0]||{pageX:0,pageY:0}:e,i=r.pageX-t.left,o=r.pageY-t.top;if(this._ownerSVGElement){const s=this._ownerSVGElement.getScreenCTM();if(s){const a=this._ownerSVGElement.createSVGPoint();return a.x=i,a.y=o,a.matrixTransform(s.inverse())}}return{x:i,y:o}}_getConstrainedPointerPosition(e){const t=this._dropContainer?this._dropContainer.lockAxis:null;let{x:r,y:i}=this.constrainPosition?this.constrainPosition(e,this):e;if("x"===this.lockAxis||"x"===t?i=this._pickupPositionOnPage.y:("y"===this.lockAxis||"y"===t)&&(r=this._pickupPositionOnPage.x),this._boundaryRect){const{x:o,y:s}=this._pickupPositionInElement,a=this._boundaryRect,l=this._previewRect,c=a.top+s,u=a.bottom-(l.height-s);r=kI(r,a.left+o,a.right-(l.width-o)),i=kI(i,c,u)}return{x:r,y:i}}_updatePointerDirectionDelta(e){const{x:t,y:r}=e,i=this._pointerDirectionDelta,o=this._pointerPositionAtLastDirectionChange,s=Math.abs(t-o.x),a=Math.abs(r-o.y);return s>this._config.pointerDirectionChangeThreshold&&(i.x=t>o.x?1:-1,o.x=t),a>this._config.pointerDirectionChangeThreshold&&(i.y=r>o.y?1:-1,o.y=r),i}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;const e=this._handles.length>0||!this.isDragging();e!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=e,xa(this._rootElement,e))}_removeRootElementListeners(e){e.removeEventListener("mousedown",this._pointerDown,OI),e.removeEventListener("touchstart",this._pointerDown,AI)}_applyRootElementTransform(e,t){const r=bf(e,t),i=this._rootElement.style;null==this._initialTransform&&(this._initialTransform=i.transform&&"none"!=i.transform?i.transform:""),i.transform=_f(r,this._initialTransform)}_applyPreviewTransform(e,t){var r;const i=(null===(r=this._previewTemplate)||void 0===r?void 0:r.template)?void 0:this._initialTransform,o=bf(e,t);this._preview.style.transform=_f(o,i)}_getDragDistance(e){const t=this._pickupPositionOnPage;return t?{x:e.x-t.x,y:e.y-t.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:e,y:t}=this._passiveTransform;if(0===e&&0===t||this.isDragging()||!this._boundaryElement)return;const r=this._boundaryElement.getBoundingClientRect(),i=this._rootElement.getBoundingClientRect();if(0===r.width&&0===r.height||0===i.width&&0===i.height)return;const o=r.left-i.left,s=i.right-r.right,a=r.top-i.top,l=i.bottom-r.bottom;r.width>i.width?(o>0&&(e+=o),s>0&&(e-=s)):e=0,r.height>i.height?(a>0&&(t+=a),l>0&&(t-=l)):t=0,(e!==this._passiveTransform.x||t!==this._passiveTransform.y)&&this.setFreeDragPosition({y:t,x:e})}_getDragStartDelay(e){const t=this.dragStartDelay;return"number"==typeof t?t:wc(e)?t.touch:t?t.mouse:0}_updateOnScroll(e){const t=this._parentPositions.handleScroll(e);if(t){const r=mf(e);this._boundaryRect&&r!==this._boundaryElement&&r.contains(this._boundaryElement)&&Ec(this._boundaryRect,t.top,t.left),this._pickupPositionOnPage.x+=t.left,this._pickupPositionOnPage.y+=t.top,this._dropContainer||(this._activeTransform.x-=t.left,this._activeTransform.y-=t.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){const e=this._parentPositions.positions.get(this._document);return e?e.scrollPosition:this._viewportRuler.getViewportScrollPosition()}_getShadowRoot(){return void 0===this._cachedShadowRoot&&(this._cachedShadowRoot=fI(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(e,t){const r=this._previewContainer||"global";if("parent"===r)return e;if("global"===r){const i=this._document;return t||i.fullscreenElement||i.webkitFullscreenElement||i.mozFullScreenElement||i.msFullscreenElement||i.body}return ur(r)}}function bf(n,e){return`translate3d(${Math.round(n)}px, ${Math.round(e)}px, 0)`}function kI(n,e,t){return Math.max(e,Math.min(t,n))}function wc(n){return"t"===n.type[0]}function NI(n,e){const t=n.rootNodes;if(1===t.length&&t[0].nodeType===e.ELEMENT_NODE)return t[0];const r=e.createElement("div");return t.forEach(i=>r.appendChild(i)),r}function RI(n,e){n.style.width=`${e.width}px`,n.style.height=`${e.height}px`,n.style.transform=bf(e.left,e.top)}function Sc(n,e){return Math.max(0,Math.min(e,n))}class V3{constructor(e,t,r,i,o){this._dragDropRegistry=t,this._ngZone=i,this._viewportRuler=o,this.disabled=!1,this.sortingDisabled=!1,this.autoScrollDisabled=!1,this.autoScrollStep=2,this.enterPredicate=()=>!0,this.sortPredicate=()=>!0,this.beforeStarted=new Me,this.entered=new Me,this.exited=new Me,this.dropped=new Me,this.sorted=new Me,this._isDragging=!1,this._itemPositions=[],this._previousSwap={drag:null,delta:0,overlaps:!1},this._draggables=[],this._siblings=[],this._orientation="vertical",this._activeSiblings=new Set,this._direction="ltr",this._viewportScrollSubscription=ke.EMPTY,this._verticalScrollDirection=0,this._horizontalScrollDirection=0,this._stopScrollTimers=new Me,this._cachedShadowRoot=null,this._startScrollInterval=()=>{this._stopScrolling(),function g3(n=0,e=Cc){return(!Uv(n)||n<0)&&(n=0),(!e||"function"!=typeof e.schedule)&&(e=Cc),new Ne(t=>(t.add(e.schedule(m3,n,{subscriber:t,counter:0,period:n})),t))}(0,yI).pipe(_I(this._stopScrollTimers)).subscribe(()=>{const s=this._scrollNode,a=this.autoScrollStep;1===this._verticalScrollDirection?s.scrollBy(0,-a):2===this._verticalScrollDirection&&s.scrollBy(0,a),1===this._horizontalScrollDirection?s.scrollBy(-a,0):2===this._horizontalScrollDirection&&s.scrollBy(a,0)})},this.element=ur(e),this._document=r,this.withScrollableParents([this.element]),t.registerDropContainer(this),this._parentPositions=new SI(r,o)}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(e,t,r,i){let o;this._draggingStarted(),null==i?(o=this.sortingDisabled?this._draggables.indexOf(e):-1,-1===o&&(o=this._getItemIndexFromPointerPosition(e,t,r))):o=i;const s=this._activeDraggables,a=s.indexOf(e),l=e.getPlaceholderElement();let c=s[o];if(c===e&&(c=s[o+1]),!c&&(null==o||-1===o||o-1&&s.splice(a,1),c&&!this._dragDropRegistry.isDragging(c)){const u=c.getRootElement();u.parentElement.insertBefore(l,u),s.splice(o,0,e)}else ur(this.element).appendChild(l),s.push(e);l.style.transform="",this._cacheItemPositions(),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:e,container:this,currentIndex:this.getItemIndex(e)})}exit(e){this._reset(),this.exited.next({item:e,container:this})}drop(e,t,r,i,o,s,a){this._reset(),this.dropped.next({item:e,currentIndex:t,previousIndex:r,container:this,previousContainer:i,isPointerOverContainer:o,distance:s,dropPoint:a})}withItems(e){const t=this._draggables;return this._draggables=e,e.forEach(r=>r._withDropContainer(this)),this.isDragging()&&(t.filter(i=>i.isDragging()).every(i=>-1===e.indexOf(i))?this._reset():this._cacheItems()),this}withDirection(e){return this._direction=e,this}connectedTo(e){return this._siblings=e.slice(),this}withOrientation(e){return this._orientation=e,this}withScrollableParents(e){const t=ur(this.element);return this._scrollableElements=-1===e.indexOf(t)?[t,...e]:e.slice(),this}getScrollableParents(){return this._scrollableElements}getItemIndex(e){return this._isDragging?("horizontal"===this._orientation&&"rtl"===this._direction?this._itemPositions.slice().reverse():this._itemPositions).findIndex(r=>r.drag===e):this._draggables.indexOf(e)}isReceiving(){return this._activeSiblings.size>0}_sortItem(e,t,r,i){if(this.sortingDisabled||!this._clientRect||!wI(this._clientRect,.05,t,r))return;const o=this._itemPositions,s=this._getItemIndexFromPointerPosition(e,t,r,i);if(-1===s&&o.length>0)return;const a="horizontal"===this._orientation,l=o.findIndex(m=>m.drag===e),c=o[s],d=c.clientRect,f=l>s?1:-1,h=this._getItemOffsetPx(o[l].clientRect,d,f),p=this._getSiblingOffsetPx(l,o,f),g=o.slice();(function j3(n,e,t){const r=Sc(e,n.length-1),i=Sc(t,n.length-1);if(r===i)return;const o=n[r],s=i{if(g[_]===m)return;const v=m.drag===e,b=v?h:p,y=v?e.getPlaceholderElement():m.drag.getRootElement();m.offset+=b,a?(y.style.transform=_f(`translate3d(${Math.round(m.offset)}px, 0, 0)`,m.initialTransform),Ec(m.clientRect,0,b)):(y.style.transform=_f(`translate3d(0, ${Math.round(m.offset)}px, 0)`,m.initialTransform),Ec(m.clientRect,b,0))}),this._previousSwap.overlaps=Gv(d,t,r),this._previousSwap.drag=c.drag,this._previousSwap.delta=a?i.x:i.y}_startScrollingIfNecessary(e,t){if(this.autoScrollDisabled)return;let r,i=0,o=0;if(this._parentPositions.positions.forEach((s,a)=>{a===this._document||!s.clientRect||r||wI(s.clientRect,.05,e,t)&&([i,o]=function H3(n,e,t,r){const i=LI(e,r),o=BI(e,t);let s=0,a=0;if(i){const l=n.scrollTop;1===i?l>0&&(s=1):n.scrollHeight-l>n.clientHeight&&(s=2)}if(o){const l=n.scrollLeft;1===o?l>0&&(a=1):n.scrollWidth-l>n.clientWidth&&(a=2)}return[s,a]}(a,s.clientRect,e,t),(i||o)&&(r=a))}),!i&&!o){const{width:s,height:a}=this._viewportRuler.getViewportSize(),l={width:s,height:a,top:0,right:s,bottom:a,left:0};i=LI(l,t),o=BI(l,e),r=window}r&&(i!==this._verticalScrollDirection||o!==this._horizontalScrollDirection||r!==this._scrollNode)&&(this._verticalScrollDirection=i,this._horizontalScrollDirection=o,this._scrollNode=r,(i||o)&&r?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){const e=ur(this.element).style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=e.msScrollSnapType||e.scrollSnapType||"",e.scrollSnapType=e.msScrollSnapType="none",this._cacheItems(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){const e=ur(this.element);this._parentPositions.cache(this._scrollableElements),this._clientRect=this._parentPositions.positions.get(e).clientRect}_cacheItemPositions(){const e="horizontal"===this._orientation;this._itemPositions=this._activeDraggables.map(t=>{const r=t.getVisibleElement();return{drag:t,offset:0,initialTransform:r.style.transform||"",clientRect:$v(r)}}).sort((t,r)=>e?t.clientRect.left-r.clientRect.left:t.clientRect.top-r.clientRect.top)}_reset(){this._isDragging=!1;const e=ur(this.element).style;e.scrollSnapType=e.msScrollSnapType=this._initialScrollSnap,this._activeDraggables.forEach(t=>{var r;const i=t.getRootElement();if(i){const o=null===(r=this._itemPositions.find(s=>s.drag===t))||void 0===r?void 0:r.initialTransform;i.style.transform=o||""}}),this._siblings.forEach(t=>t._stopReceiving(this)),this._activeDraggables=[],this._itemPositions=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1,this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_getSiblingOffsetPx(e,t,r){const i="horizontal"===this._orientation,o=t[e].clientRect,s=t[e+-1*r];let a=o[i?"width":"height"]*r;if(s){const l=i?"left":"top",c=i?"right":"bottom";-1===r?a-=s.clientRect[l]-o[c]:a+=o[l]-s.clientRect[c]}return a}_getItemOffsetPx(e,t,r){const i="horizontal"===this._orientation;let o=i?t.left-e.left:t.top-e.top;return-1===r&&(o+=i?t.width-e.width:t.height-e.height),o}_shouldEnterAsFirstChild(e,t){if(!this._activeDraggables.length)return!1;const r=this._itemPositions,i="horizontal"===this._orientation;if(r[0].drag!==this._activeDraggables[0]){const s=r[r.length-1].clientRect;return i?e>=s.right:t>=s.bottom}{const s=r[0].clientRect;return i?e<=s.left:t<=s.top}}_getItemIndexFromPointerPosition(e,t,r,i){const o="horizontal"===this._orientation,s=this._itemPositions.findIndex(({drag:a,clientRect:l})=>{if(a===e)return!1;if(i){const c=o?i.x:i.y;if(a===this._previousSwap.drag&&this._previousSwap.overlaps&&c===this._previousSwap.delta)return!1}return o?t>=Math.floor(l.left)&&t=Math.floor(l.top)&&ri._canReceive(e,t,r))}_canReceive(e,t,r){if(!this._clientRect||!Gv(this._clientRect,t,r)||!this.enterPredicate(e,this))return!1;const i=this._getShadowRoot().elementFromPoint(t,r);if(!i)return!1;const o=ur(this.element);return i===o||o.contains(i)}_startReceiving(e,t){const r=this._activeSiblings;!r.has(e)&&t.every(i=>this.enterPredicate(i,this)||this._draggables.indexOf(i)>-1)&&(r.add(e),this._cacheParentPositions(),this._listenToScrollEvents())}_stopReceiving(e){this._activeSiblings.delete(e),this._viewportScrollSubscription.unsubscribe()}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(e=>{if(this.isDragging()){const t=this._parentPositions.handleScroll(e);t&&(this._itemPositions.forEach(({clientRect:r})=>{Ec(r,t.top,t.left)}),this._itemPositions.forEach(({drag:r})=>{this._dragDropRegistry.isDragging(r)&&r._sortFromLastPointerPosition()}))}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){const e=fI(ur(this.element));this._cachedShadowRoot=e||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){const e=this._activeDraggables.filter(t=>t.isDragging());this._siblings.forEach(t=>t._startReceiving(this,e))}}function LI(n,e){const{top:t,bottom:r,height:i}=n,o=.05*i;return e>=t-o&&e<=t+o?1:e>=r-o&&e<=r+o?2:0}function BI(n,e){const{left:t,right:r,width:i}=n,o=.05*i;return e>=t-o&&e<=t+o?1:e>=r-o&&e<=r+o?2:0}const Df=Dc({passive:!1,capture:!0});let U3=(()=>{class n{constructor(t,r){this._ngZone=t,this._dropInstances=new Set,this._dragInstances=new Set,this._activeDragInstances=[],this._globalListeners=new Map,this._draggingPredicate=i=>i.isDragging(),this.pointerMove=new Me,this.pointerUp=new Me,this.scroll=new Me,this._preventDefaultWhileDragging=i=>{this._activeDragInstances.length>0&&i.preventDefault()},this._persistentTouchmoveListener=i=>{this._activeDragInstances.length>0&&(this._activeDragInstances.some(this._draggingPredicate)&&i.preventDefault(),this.pointerMove.next(i))},this._document=r}registerDropContainer(t){this._dropInstances.has(t)||this._dropInstances.add(t)}registerDragItem(t){this._dragInstances.add(t),1===this._dragInstances.size&&this._ngZone.runOutsideAngular(()=>{this._document.addEventListener("touchmove",this._persistentTouchmoveListener,Df)})}removeDropContainer(t){this._dropInstances.delete(t)}removeDragItem(t){this._dragInstances.delete(t),this.stopDragging(t),0===this._dragInstances.size&&this._document.removeEventListener("touchmove",this._persistentTouchmoveListener,Df)}startDragging(t,r){if(!(this._activeDragInstances.indexOf(t)>-1)&&(this._activeDragInstances.push(t),1===this._activeDragInstances.length)){const i=r.type.startsWith("touch");this._globalListeners.set(i?"touchend":"mouseup",{handler:o=>this.pointerUp.next(o),options:!0}).set("scroll",{handler:o=>this.scroll.next(o),options:!0}).set("selectstart",{handler:this._preventDefaultWhileDragging,options:Df}),i||this._globalListeners.set("mousemove",{handler:o=>this.pointerMove.next(o),options:Df}),this._ngZone.runOutsideAngular(()=>{this._globalListeners.forEach((o,s)=>{this._document.addEventListener(s,o.handler,o.options)})})}}stopDragging(t){const r=this._activeDragInstances.indexOf(t);r>-1&&(this._activeDragInstances.splice(r,1),0===this._activeDragInstances.length&&this._clearGlobalListeners())}isDragging(t){return this._activeDragInstances.indexOf(t)>-1}scrolled(t){const r=[this.scroll];return t&&t!==this._document&&r.push(new Ne(i=>this._ngZone.runOutsideAngular(()=>{const s=a=>{this._activeDragInstances.length&&i.next(a)};return t.addEventListener("scroll",s,!0),()=>{t.removeEventListener("scroll",s,!0)}}))),vp(...r)}ngOnDestroy(){this._dragInstances.forEach(t=>this.removeDragItem(t)),this._dropInstances.forEach(t=>this.removeDropContainer(t)),this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_clearGlobalListeners(){this._globalListeners.forEach((t,r)=>{this._document.removeEventListener(r,t.handler,t.options)}),this._globalListeners.clear()}}return n.\u0275fac=function(t){return new(t||n)(R(ot),R(Vt))},n.\u0275prov=W({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const z3={dragStartThreshold:5,pointerDirectionChangeThreshold:5};let W3=(()=>{class n{constructor(t,r,i,o){this._document=t,this._ngZone=r,this._viewportRuler=i,this._dragDropRegistry=o}createDrag(t,r=z3){return new B3(t,r,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry)}createDropList(t){return new V3(t,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}}return n.\u0275fac=function(t){return new(t||n)(R(Vt),R(ot),R(N3),R(U3))},n.\u0275prov=W({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),jI=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=ut({type:n}),n.\u0275inj=at({providers:[W3],imports:[R3]}),n})(),t4=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=ut({type:n}),n.\u0275inj=at({imports:[[Pr,Sz,_c,pf,jI],_c,jI]}),n})();const n4=["headerchkbox"];function r4(n,e){1&n&&_n(0)}function o4(n,e){if(1&n&&(H(0,"div",6),Ni(1),G(2,r4,1,0,"ng-container",7),z()),2&n){const t=U();N(2),k("ngTemplateOutlet",t.headerTemplate)}}const VI=function(n){return{"p-checkbox-disabled":n}},s4=function(n,e,t){return{"p-highlight":n,"p-focus":e,"p-disabled":t}},HI=function(n){return{"pi pi-check":n}};function a4(n,e){if(1&n){const t=ti();H(0,"div",10)(1,"div",11)(2,"input",12),Pe("focus",function(){return Bt(t),U(2).onHeaderCheckboxFocus()})("blur",function(){return Bt(t),U(2).onHeaderCheckboxBlur()})("keydown.space",function(i){return Bt(t),U(2).toggleAll(i)}),z()(),H(3,"div",13,14),Pe("click",function(i){return Bt(t),U(2).toggleAll(i)}),$t(5,"span",15),z()()}if(2&n){const t=U(2);k("ngClass",Or(5,VI,t.disabled||t.toggleAllDisabled)),N(2),k("checked",t.allChecked)("disabled",t.disabled||t.toggleAllDisabled),N(1),k("ngClass",function gw(n,e,t,r,i,o){return yw(I(),mn(),n,e,t,r,i,o)}(7,s4,t.allChecked,t.headerCheckboxFocus,t.disabled||t.toggleAllDisabled)),N(2),k("ngClass",Or(11,HI,t.allChecked))}}function l4(n,e){if(1&n){const t=ti();H(0,"div",16)(1,"input",17),Pe("input",function(i){return Bt(t),U(2).onFilter(i)}),z(),$t(2,"span",18),z()}if(2&n){const t=U(2);N(1),k("value",t.filterValue||"")("disabled",t.disabled),Wn("placeholder",t.filterPlaceHolder)("aria-label",t.ariaFilterLabel)}}function c4(n,e){if(1&n&&(H(0,"div",6),G(1,a4,6,13,"div",8),G(2,l4,3,4,"div",9),z()),2&n){const t=U();N(1),k("ngIf",t.checkbox&&t.multiple&&t.showToggleAll),N(1),k("ngIf",t.filter)}}function u4(n,e){if(1&n&&(H(0,"span"),Ze(1),z()),2&n){const t=U().$implicit,r=U(2);N(1),Tn(r.getOptionGroupLabel(t)||"empty")}}function d4(n,e){1&n&&_n(0)}function f4(n,e){1&n&&_n(0)}const Kv=function(n){return{$implicit:n}};function h4(n,e){if(1&n&&(H(0,"li",20),G(1,u4,2,1,"span",3),G(2,d4,1,0,"ng-container",21),z(),G(3,f4,1,0,"ng-container",21)),2&n){const t=e.$implicit,r=U(2),i=co(8);N(1),k("ngIf",!r.groupTemplate),N(1),k("ngTemplateOutlet",r.groupTemplate)("ngTemplateOutletContext",Or(5,Kv,t)),N(1),k("ngTemplateOutlet",i)("ngTemplateOutletContext",Or(7,Kv,r.getOptionGroupChildren(t)))}}function p4(n,e){if(1&n&&(Oi(0),G(1,h4,4,9,"ng-template",19),ki()),2&n){const t=U();N(1),k("ngForOf",t.optionsToRender)}}function g4(n,e){1&n&&_n(0)}function m4(n,e){if(1&n&&(Oi(0),G(1,g4,1,0,"ng-container",21),ki()),2&n){const t=U(),r=co(8);N(1),k("ngTemplateOutlet",r)("ngTemplateOutletContext",Or(2,Kv,t.optionsToRender))}}const v4=function(n){return{"p-highlight":n}};function y4(n,e){if(1&n&&(H(0,"div",10)(1,"div",25),$t(2,"span",15),z()()),2&n){const t=U().$implicit,r=U(2);k("ngClass",Or(3,VI,r.disabled||r.isOptionDisabled(t))),N(1),k("ngClass",Or(5,v4,r.isSelected(t))),N(1),k("ngClass",Or(7,HI,r.isSelected(t)))}}function _4(n,e){if(1&n&&(H(0,"span"),Ze(1),z()),2&n){const t=U().$implicit,r=U(2);N(1),Tn(r.getOptionLabel(t))}}function b4(n,e){1&n&&_n(0)}const D4=function(n,e){return{"p-listbox-item":!0,"p-highlight":n,"p-disabled":e}},C4=function(n,e){return{$implicit:n,index:e}};function E4(n,e){if(1&n){const t=ti();H(0,"li",24),Pe("click",function(i){const s=Bt(t).$implicit;return U(2).onOptionClick(i,s)})("dblclick",function(i){const s=Bt(t).$implicit;return U(2).onOptionDoubleClick(i,s)})("touchend",function(){const o=Bt(t).$implicit;return U(2).onOptionTouchEnd(o)})("keydown",function(i){const s=Bt(t).$implicit;return U(2).onOptionKeyDown(i,s)}),G(1,y4,3,9,"div",8),G(2,_4,2,1,"span",3),G(3,b4,1,0,"ng-container",21),z()}if(2&n){const t=e.$implicit,r=e.index,i=U(2);k("ngClass",Dm(8,D4,i.isSelected(t),i.isOptionDisabled(t))),Wn("tabindex",i.disabled||i.isOptionDisabled(t)?null:"0")("aria-label",i.getOptionLabel(t))("aria-selected",i.isSelected(t)),N(1),k("ngIf",i.checkbox&&i.multiple),N(1),k("ngIf",!i.itemTemplate),N(1),k("ngTemplateOutlet",i.itemTemplate)("ngTemplateOutletContext",Dm(11,C4,t,r))}}function w4(n,e){if(1&n&&(Oi(0),Ze(1),ki()),2&n){const t=U(3);N(1),uo(" ",t.emptyFilterMessageLabel," ")}}function S4(n,e){1&n&&_n(0,null,28)}function M4(n,e){if(1&n&&(H(0,"li",26),G(1,w4,2,1,"ng-container",27),G(2,S4,2,0,"ng-container",7),z()),2&n){const t=U(2);N(1),k("ngIf",!t.emptyFilterTemplate&&!t.emptyTemplate)("ngIfElse",t.emptyFilter),N(1),k("ngTemplateOutlet",t.emptyFilterTemplate||t.emptyTemplate)}}function I4(n,e){if(1&n&&(Oi(0),Ze(1),ki()),2&n){const t=U(3);N(1),uo(" ",t.emptyMessageLabel," ")}}function T4(n,e){1&n&&_n(0,null,29)}function x4(n,e){if(1&n&&(H(0,"li",26),G(1,I4,2,1,"ng-container",27),G(2,T4,2,0,"ng-container",7),z()),2&n){const t=U(2);N(1),k("ngIf",!t.emptyTemplate)("ngIfElse",t.empty),N(1),k("ngTemplateOutlet",t.emptyTemplate)}}function A4(n,e){if(1&n&&(G(0,E4,4,14,"li",22),G(1,M4,3,3,"li",23),G(2,x4,3,3,"li",23)),2&n){const t=e.$implicit,r=U();k("ngForOf",t),N(1),k("ngIf",r.hasFilter()&&r.isEmpty(t)),N(1),k("ngIf",!r.hasFilter()&&r.isEmpty(t))}}function O4(n,e){1&n&&_n(0)}function k4(n,e){if(1&n&&(H(0,"div",30),Ni(1,1),G(2,O4,1,0,"ng-container",7),z()),2&n){const t=U();N(2),k("ngTemplateOutlet",t.footerTemplate)}}const N4=[[["p-header"]],[["p-footer"]]],R4=function(n){return{"p-listbox p-component":!0,"p-disabled":n}},P4=["p-header","p-footer"],F4={provide:cr,useExisting:Be(()=>L4),multi:!0};let L4=(()=>{class n{constructor(t,r,i,o){this.el=t,this.cd=r,this.filterService=i,this.config=o,this.checkbox=!1,this.filter=!1,this.filterMatchMode="contains",this.metaKeySelection=!0,this.showToggleAll=!0,this.optionGroupChildren="items",this.onChange=new Ae,this.onClick=new Ae,this.onDblClick=new Ae,this.onModelChange=()=>{},this.onModelTouched=()=>{}}get options(){return this._options}set options(t){this._options=t,this.hasFilter()&&this.activateFilter()}get filterValue(){return this._filterValue}set filterValue(t){this._filterValue=t,this.activateFilter()}ngOnInit(){this.translationSubscription=this.config.translationObserver.subscribe(()=>{this.cd.markForCheck()})}ngAfterContentInit(){this.templates.forEach(t=>{switch(t.getType()){case"item":default:this.itemTemplate=t.template;break;case"group":this.groupTemplate=t.template;break;case"header":this.headerTemplate=t.template;break;case"footer":this.footerTemplate=t.template;break;case"empty":this.emptyTemplate=t.template;break;case"emptyfilter":this.emptyFilterTemplate=t.template}})}getOptionLabel(t){return this.optionLabel?pt.resolveFieldData(t,this.optionLabel):null!=t.label?t.label:t}getOptionGroupChildren(t){return this.optionGroupChildren?pt.resolveFieldData(t,this.optionGroupChildren):t.items}getOptionGroupLabel(t){return this.optionGroupLabel?pt.resolveFieldData(t,this.optionGroupLabel):null!=t.label?t.label:t}getOptionValue(t){return this.optionValue?pt.resolveFieldData(t,this.optionValue):this.optionLabel||void 0===t.value?t:t.value}isOptionDisabled(t){return this.optionDisabled?pt.resolveFieldData(t,this.optionDisabled):void 0!==t.disabled&&t.disabled}writeValue(t){this.value=t,this.cd.markForCheck()}registerOnChange(t){this.onModelChange=t}registerOnTouched(t){this.onModelTouched=t}setDisabledState(t){this.disabled=t,this.cd.markForCheck()}onOptionClick(t,r){this.disabled||this.isOptionDisabled(r)||this.readonly||(this.multiple?this.checkbox?this.onOptionClickCheckbox(t,r):this.onOptionClickMultiple(t,r):this.onOptionClickSingle(t,r),this.onClick.emit({originalEvent:t,option:r,value:this.value}),this.optionTouched=!1)}onOptionTouchEnd(t){this.disabled||this.isOptionDisabled(t)||this.readonly||(this.optionTouched=!0)}onOptionDoubleClick(t,r){this.disabled||this.isOptionDisabled(r)||this.readonly||this.onDblClick.emit({originalEvent:t,option:r,value:this.value})}onOptionClickSingle(t,r){let i=this.isSelected(r),o=!1;if(!this.optionTouched&&this.metaKeySelection){let a=t.metaKey||t.ctrlKey;i?a&&(this.value=null,o=!0):(this.value=this.getOptionValue(r),o=!0)}else this.value=i?null:this.getOptionValue(r),o=!0;o&&(this.onModelChange(this.value),this.onChange.emit({originalEvent:t,value:this.value}))}onOptionClickMultiple(t,r){let i=this.isSelected(r),o=!1;if(!this.optionTouched&&this.metaKeySelection){let a=t.metaKey||t.ctrlKey;i?(a?this.removeOption(r):this.value=[this.getOptionValue(r)],o=!0):(this.value=a&&this.value||[],this.value=[...this.value,this.getOptionValue(r)],o=!0)}else i?this.removeOption(r):this.value=[...this.value||[],this.getOptionValue(r)],o=!0;o&&(this.onModelChange(this.value),this.onChange.emit({originalEvent:t,value:this.value}))}onOptionClickCheckbox(t,r){this.disabled||this.readonly||(this.isSelected(r)?this.removeOption(r):(this.value=this.value?this.value:[],this.value=[...this.value,this.getOptionValue(r)]),this.onModelChange(this.value),this.onChange.emit({originalEvent:t,value:this.value}))}removeOption(t){this.value=this.value.filter(r=>!pt.equals(r,this.getOptionValue(t),this.dataKey))}isSelected(t){let r=!1,i=this.getOptionValue(t);if(this.multiple){if(this.value)for(let o of this.value)if(pt.equals(o,i,this.dataKey)){r=!0;break}}else r=pt.equals(this.value,i,this.dataKey);return r}get allChecked(){let t=this.optionsToRender;if(!t||0===t.length)return!1;{let r=0,i=0,o=0,s=this.group?0:this.optionsToRender.length;for(let a of t)if(this.group)for(let l of this.getOptionGroupChildren(a)){let c=this.isOptionDisabled(l),u=this.isSelected(l);if(c)u?r++:i++;else{if(!u)return!1;o++}s++}else{let l=this.isOptionDisabled(a),c=this.isSelected(a);if(l)c?r++:i++;else{if(!c)return!1;o++}}return s===r||s===o||o&&s===o+i+r}}get optionsToRender(){return this._filteredOptions||this.options}get emptyMessageLabel(){return this.emptyMessage||this.config.getTranslation(lI.EMPTY_MESSAGE)}get emptyFilterMessageLabel(){return this.emptyFilterMessage||this.config.getTranslation(lI.EMPTY_FILTER_MESSAGE)}hasFilter(){return this._filterValue&&this._filterValue.trim().length>0}isEmpty(t){return!t||t&&0===t.length}onFilter(t){this._filterValue=t.target.value,this.activateFilter()}activateFilter(){if(this.hasFilter()&&this._options)if(this.group){let t=(this.optionLabel||"label").split(","),r=[];for(let i of this.options){let o=this.filterService.filter(this.getOptionGroupChildren(i),t,this.filterValue,this.filterMatchMode,this.filterLocale);o&&o.length&&r.push(Object.assign(Object.assign({},i),{[this.optionGroupChildren]:o}))}this._filteredOptions=r}else this._filteredOptions=this._options.filter(t=>this.filterService.filters[this.filterMatchMode](this.getOptionLabel(t),this._filterValue,this.filterLocale));else this._filteredOptions=null}get toggleAllDisabled(){let t=this.optionsToRender;if(!t||0===t.length)return!0;for(let r of t)if(!this.isOptionDisabled(r))return!1;return!0}toggleAll(t){this.disabled||this.toggleAllDisabled||this.readonly||(this.allChecked?this.uncheckAll():this.checkAll(),this.onModelChange(this.value),this.onChange.emit({originalEvent:t,value:this.value}),t.preventDefault())}checkAll(){let r=[];this.optionsToRender.forEach(i=>{if(this.group){let o=this.getOptionGroupChildren(i);o&&o.forEach(s=>{let a=this.isOptionDisabled(s);(!a||a&&this.isSelected(s))&&r.push(this.getOptionValue(s))})}else{let o=this.isOptionDisabled(i);(!o||o&&this.isSelected(i))&&r.push(this.getOptionValue(i))}}),this.value=r}uncheckAll(){let r=[];this.optionsToRender.forEach(i=>{this.group?i.items&&i.items.forEach(o=>{this.isOptionDisabled(o)&&this.isSelected(o)&&r.push(this.getOptionValue(o))}):this.isOptionDisabled(i)&&this.isSelected(i)&&r.push(this.getOptionValue(i))}),this.value=r}onOptionKeyDown(t,r){if(this.readonly)return;let i=t.currentTarget;switch(t.which){case 40:var o=this.findNextItem(i);o&&o.focus(),t.preventDefault();break;case 38:var s=this.findPrevItem(i);s&&s.focus(),t.preventDefault();break;case 13:this.onOptionClick(t,r),t.preventDefault()}}findNextItem(t){let r=t.nextElementSibling;return r?Pt.hasClass(r,"p-disabled")||Pt.isHidden(r)||Pt.hasClass(r,"p-listbox-item-group")?this.findNextItem(r):r:null}findPrevItem(t){let r=t.previousElementSibling;return r?Pt.hasClass(r,"p-disabled")||Pt.isHidden(r)||Pt.hasClass(r,"p-listbox-item-group")?this.findPrevItem(r):r:null}onHeaderCheckboxFocus(){this.headerCheckboxFocus=!0}onHeaderCheckboxBlur(){this.headerCheckboxFocus=!1}ngOnDestroy(){this.translationSubscription&&this.translationSubscription.unsubscribe()}}return n.\u0275fac=function(t){return new(t||n)(S(bt),S(es),S(Cz),S(aI))},n.\u0275cmp=wt({type:n,selectors:[["p-listbox"]],contentQueries:function(t,r,i){if(1&t&&(si(i,cI,5),si(i,uI,5),si(i,jv,4)),2&t){let o;$n(o=Gn())&&(r.headerFacet=o.first),$n(o=Gn())&&(r.footerFacet=o.first),$n(o=Gn())&&(r.templates=o)}},viewQuery:function(t,r){if(1&t&&xd(n4,5),2&t){let i;$n(i=Gn())&&(r.headerCheckboxViewChild=i.first)}},hostAttrs:[1,"p-element"],inputs:{multiple:"multiple",style:"style",styleClass:"styleClass",listStyle:"listStyle",listStyleClass:"listStyleClass",readonly:"readonly",disabled:"disabled",checkbox:"checkbox",filter:"filter",filterMatchMode:"filterMatchMode",filterLocale:"filterLocale",metaKeySelection:"metaKeySelection",dataKey:"dataKey",showToggleAll:"showToggleAll",optionLabel:"optionLabel",optionValue:"optionValue",optionGroupChildren:"optionGroupChildren",optionGroupLabel:"optionGroupLabel",optionDisabled:"optionDisabled",ariaFilterLabel:"ariaFilterLabel",filterPlaceHolder:"filterPlaceHolder",emptyFilterMessage:"emptyFilterMessage",emptyMessage:"emptyMessage",group:"group",options:"options",filterValue:"filterValue"},outputs:{onChange:"onChange",onClick:"onClick",onDblClick:"onDblClick"},features:[Ye([F4])],ngContentSelectors:P4,decls:10,vars:15,consts:[[3,"ngClass","ngStyle"],["class","p-listbox-header",4,"ngIf"],["role","listbox","aria-multiselectable","multiple",1,"p-listbox-list"],[4,"ngIf"],["itemslist",""],["class","p-listbox-footer",4,"ngIf"],[1,"p-listbox-header"],[4,"ngTemplateOutlet"],["class","p-checkbox p-component",3,"ngClass",4,"ngIf"],["class","p-listbox-filter-container",4,"ngIf"],[1,"p-checkbox","p-component",3,"ngClass"],[1,"p-hidden-accessible"],["type","checkbox","readonly","readonly",3,"checked","disabled","focus","blur","keydown.space"],[1,"p-checkbox-box",3,"ngClass","click"],["headerchkbox",""],[1,"p-checkbox-icon",3,"ngClass"],[1,"p-listbox-filter-container"],["type","text",1,"p-listbox-filter","p-inputtext","p-component",3,"value","disabled","input"],[1,"p-listbox-filter-icon","pi","pi-search"],["ngFor","",3,"ngForOf"],[1,"p-listbox-item-group"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["pRipple","","role","option",3,"ngClass","click","dblclick","touchend","keydown",4,"ngFor","ngForOf"],["class","p-listbox-empty-message",4,"ngIf"],["pRipple","","role","option",3,"ngClass","click","dblclick","touchend","keydown"],[1,"p-checkbox-box",3,"ngClass"],[1,"p-listbox-empty-message"],[4,"ngIf","ngIfElse"],["emptyFilter",""],["empty",""],[1,"p-listbox-footer"]],template:function(t,r){1&t&&(ma(N4),H(0,"div",0),G(1,o4,3,1,"div",1),G(2,c4,3,2,"div",1),H(3,"div",0)(4,"ul",2),G(5,p4,2,1,"ng-container",3),G(6,m4,2,4,"ng-container",3),G(7,A4,3,3,"ng-template",null,4,Jo),z()(),G(9,k4,3,1,"div",5),z()),2&t&&(_d(r.styleClass),k("ngClass",Or(13,R4,r.disabled))("ngStyle",r.style),N(1),k("ngIf",r.headerFacet||r.headerTemplate),N(1),k("ngIf",r.checkbox&&r.multiple&&r.showToggleAll||r.filter),N(1),_d(r.listStyleClass),k("ngClass","p-listbox-list-wrapper")("ngStyle",r.listStyle),N(2),k("ngIf",r.group),N(1),k("ngIf",!r.group),N(3),k("ngIf",r.footerFacet||r.footerTemplate))},directives:[fc,ov,ho,sv,Kd,Ez],styles:[".p-listbox-list-wrapper{overflow:auto}.p-listbox-list{list-style-type:none;margin:0;padding:0}.p-listbox-item{cursor:pointer;position:relative;overflow:hidden;display:flex;align-items:center;-webkit-user-select:none;user-select:none}.p-listbox-header{display:flex;align-items:center}.p-listbox-filter-container{position:relative;flex:1 1 auto}.p-listbox-filter-icon{position:absolute;top:50%;margin-top:-.5rem}.p-listbox-filter{width:100%}\n"],encapsulation:2,changeDetection:0}),n})(),B4=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=ut({type:n}),n.\u0275inj=at({imports:[[Pr,_c,pf],_c]}),n})();function ln(n){this.content=n}ln.prototype={constructor:ln,find:function(n){for(var e=0;e>1}},ln.from=function(n){if(n instanceof ln)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new ln(e)};const UI=ln;function zI(n,e,t){for(var r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;var i=n.child(r),o=e.child(r);if(i!=o){if(!i.sameMarkup(o))return t;if(i.isText&&i.text!=o.text){for(var s=0;i.text[s]==o.text[s];s++)t++;return t}if(i.content.size||o.content.size){var a=zI(i.content,o.content,t+1);if(null!=a)return a}t+=i.nodeSize}else t+=i.nodeSize}}function WI(n,e,t,r){for(var i=n.childCount,o=e.childCount;;){if(0==i||0==o)return i==o?null:{a:t,b:r};var s=n.child(--i),a=e.child(--o),l=s.nodeSize;if(s!=a){if(!s.sameMarkup(a))return{a:t,b:r};if(s.isText&&s.text!=a.text){for(var c=0,u=Math.min(s.text.length,a.text.length);ce&&!1!==r(l,i+a,o,s)&&l.content.size){var u=a+1;l.nodesBetween(Math.max(0,e-u),Math.min(l.content.size,t-u),r,i+u)}a=c}},M.prototype.descendants=function(e){this.nodesBetween(0,this.size,e)},M.prototype.textBetween=function(e,t,r,i){var o="",s=!0;return this.nodesBetween(e,t,function(a,l){a.isText?(o+=a.text.slice(Math.max(e,l)-l,t-l),s=!r):a.isLeaf&&i?(o+="function"==typeof i?i(a):i,s=!r):!s&&a.isBlock&&(o+=r,s=!0)},0),o},M.prototype.append=function(e){if(!e.size)return this;if(!this.size)return e;var t=this.lastChild,r=e.firstChild,i=this.content.slice(),o=0;for(t.isText&&t.sameMarkup(r)&&(i[i.length-1]=t.withText(t.text+r.text),o=1);oe)for(var o=0,s=0;se&&((st)&&(a=a.isText?a.cut(Math.max(0,e-s),Math.min(a.text.length,t-s)):a.cut(Math.max(0,e-s-1),Math.min(a.content.size,t-s-1))),r.push(a),i+=a.nodeSize),s=l}return new M(r,i)},M.prototype.cutByIndex=function(e,t){return e==t?M.empty:0==e&&t==this.content.length?this:new M(this.content.slice(e,t))},M.prototype.replaceChild=function(e,t){var r=this.content[e];if(r==t)return this;var i=this.content.slice(),o=this.size+t.nodeSize-r.nodeSize;return i[e]=t,new M(i,o)},M.prototype.addToStart=function(e){return new M([e].concat(this.content),this.size+e.nodeSize)},M.prototype.addToEnd=function(e){return new M(this.content.concat(e),this.size+e.nodeSize)},M.prototype.eq=function(e){if(this.content.length!=e.content.length)return!1;for(var t=0;tthis.size||e<0)throw new RangeError("Position "+e+" outside of fragment ("+this+")");for(var r=0,i=0;;r++){var s=i+this.child(r).nodeSize;if(s>=e)return s==e||t>0?Ef(r+1,s):Ef(r,i);i=s}},M.prototype.toString=function(){return"<"+this.toStringInner()+">"},M.prototype.toStringInner=function(){return this.content.join(", ")},M.prototype.toJSON=function(){return this.content.length?this.content.map(function(e){return e.toJSON()}):null},M.fromJSON=function(e,t){if(!t)return M.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new M(t.map(e.nodeFromJSON))},M.fromArray=function(e){if(!e.length)return M.empty;for(var t,r=0,i=0;ithis.type.rank&&(t||(t=e.slice(0,i)),t.push(this),r=!0),t&&t.push(o)}}return t||(t=e.slice()),r||t.push(this),t},De.prototype.removeFromSet=function(e){for(var t=0;tn.depth)throw new li("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new li("Inconsistent open depths");return KI(n,e,t,0)}function KI(n,e,t,r){var i=n.index(r),o=n.node(r);if(i==e.index(r)&&r=0;o--)i=e.node(o).copy(M.from(i));return{start:i.resolveNoCache(n.openStart+t),end:i.resolveNoCache(i.content.size-n.openEnd-t)}}(t,n);return ls(o,YI(n,c.start,c.end,e,r))}var a=n.parent,l=a.content;return ls(a,l.cut(0,n.parentOffset).append(t.content).append(l.cut(e.parentOffset)))}return ls(o,Sf(n,e,r))}function ZI(n,e){if(!e.type.compatibleContent(n.type))throw new li("Cannot join "+e.type.name+" onto "+n.type.name)}function Yv(n,e,t){var r=n.node(t);return ZI(r,e.node(t)),r}function as(n,e){var t=e.length-1;t>=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function Mc(n,e,t,r){var i=(e||n).node(t),o=0,s=e?e.index(t):i.childCount;n&&(o=n.index(t),n.depth>t?o++:n.textOffset&&(as(n.nodeAfter,r),o++));for(var a=o;ai&&Yv(n,e,i+1),s=r.depth>i&&Yv(t,r,i+1),a=[];return Mc(null,n,i,a),o&&s&&e.index(i)==t.index(i)?(ZI(o,s),as(ls(o,YI(n,e,t,r,i+1)),a)):(o&&as(ls(o,Sf(n,e,i+1)),a),Mc(e,t,i,a),s&&as(ls(s,Sf(t,r,i+1)),a)),Mc(r,null,i,a),new M(a)}function Sf(n,e,t){var r=[];return Mc(null,n,t,r),n.depth>t&&as(ls(Yv(n,e,t+1),Sf(n,e,t+1)),r),Mc(e,null,t,r),new M(r)}$I.size.get=function(){return this.content.size-this.openStart-this.openEnd},F.prototype.insertAt=function(e,t){var r=qI(this.content,e+this.openStart,t,null);return r&&new F(r,this.openStart,this.openEnd)},F.prototype.removeBetween=function(e,t){return new F(GI(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)},F.prototype.eq=function(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd},F.prototype.toString=function(){return this.content+"("+this.openStart+","+this.openEnd+")"},F.prototype.toJSON=function(){if(!this.content.size)return null;var e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e},F.fromJSON=function(e,t){if(!t)return F.empty;var r=t.openStart||0,i=t.openEnd||0;if("number"!=typeof r||"number"!=typeof i)throw new RangeError("Invalid input for Slice.fromJSON");return new F(M.fromJSON(e,t.content),r,i)},F.maxOpen=function(e,t){void 0===t&&(t=!0);for(var r=0,i=0,o=e.firstChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.firstChild)r++;for(var s=e.lastChild;s&&!s.isLeaf&&(t||!s.type.spec.isolating);s=s.lastChild)i++;return new F(e,r,i)},Object.defineProperties(F.prototype,$I),F.empty=new F(M.empty,0,0);var st=function(e,t,r){this.pos=e,this.path=t,this.depth=t.length/3-1,this.parentOffset=r},Aa={parent:{configurable:!0},doc:{configurable:!0},textOffset:{configurable:!0},nodeAfter:{configurable:!0},nodeBefore:{configurable:!0}};st.prototype.resolveDepth=function(e){return null==e?this.depth:e<0?this.depth+e:e},Aa.parent.get=function(){return this.node(this.depth)},Aa.doc.get=function(){return this.node(0)},st.prototype.node=function(e){return this.path[3*this.resolveDepth(e)]},st.prototype.index=function(e){return this.path[3*this.resolveDepth(e)+1]},st.prototype.indexAfter=function(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)},st.prototype.start=function(e){return 0==(e=this.resolveDepth(e))?0:this.path[3*e-1]+1},st.prototype.end=function(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size},st.prototype.before=function(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]},st.prototype.after=function(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize},Aa.textOffset.get=function(){return this.pos-this.path[this.path.length-1]},Aa.nodeAfter.get=function(){var n=this.parent,e=this.index(this.depth);if(e==n.childCount)return null;var t=this.pos-this.path[this.path.length-1],r=n.child(e);return t?n.child(e).cut(t):r},Aa.nodeBefore.get=function(){var n=this.index(this.depth),e=this.pos-this.path[this.path.length-1];return e?this.parent.child(n).cut(0,e):0==n?null:this.parent.child(n-1)},st.prototype.posAtIndex=function(e,t){t=this.resolveDepth(t);for(var r=this.path[3*t],i=0==t?0:this.path[3*t-1]+1,o=0;o0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0},st.prototype.blockRange=function(e,t){if(void 0===e&&(e=this),e.pos=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new Ic(this,e,r)},st.prototype.sameParent=function(e){return this.pos-this.parentOffset==e.pos-e.parentOffset},st.prototype.max=function(e){return e.pos>this.pos?e:this},st.prototype.min=function(e){return e.pos=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");for(var r=[],i=0,o=t,s=e;;){var a=s.content.findIndex(o),l=a.index,c=a.offset,u=o-c;if(r.push(s,l,i+c),!u||(s=s.child(l)).isText)break;o=u-1,i+=c+1}return new st(t,r,o)},st.resolveCached=function(e,t){for(var r=0;re&&this.nodesBetween(e,t,function(o){return r.isInSet(o.marks)&&(i=!0),!i}),i},qn.isBlock.get=function(){return this.type.isBlock},qn.isTextblock.get=function(){return this.type.isTextblock},qn.inlineContent.get=function(){return this.type.inlineContent},qn.isInline.get=function(){return this.type.isInline},qn.isText.get=function(){return this.type.isText},qn.isLeaf.get=function(){return this.type.isLeaf},qn.isAtom.get=function(){return this.type.isAtom},Ee.prototype.toString=function(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);var e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),QI(this.marks,e)},Ee.prototype.contentMatchAt=function(e){var t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t},Ee.prototype.canReplace=function(e,t,r,i,o){void 0===r&&(r=M.empty),void 0===i&&(i=0),void 0===o&&(o=r.childCount);var s=this.contentMatchAt(e).matchFragment(r,i,o),a=s&&s.matchFragment(this.content,t);if(!a||!a.validEnd)return!1;for(var l=i;l=0;t--)e=n[t].type.name+"("+e+")";return e}var cn=function(e){this.validEnd=e,this.next=[],this.wrapCache=[]},Mf={inlineContent:{configurable:!0},defaultType:{configurable:!0},edgeCount:{configurable:!0}};cn.parse=function(e,t){var r=new If(e,t);if(null==r.next)return cn.empty;var i=XI(r);r.next&&r.err("Unexpected trailing text");var o=function Q4(n){var e=Object.create(null);return function t(r){var i=[];r.forEach(function(l){n[l].forEach(function(c){var u=c.term,d=c.to;if(u){var f=i.indexOf(u),h=f>-1&&i[f+1];nT(n,d).forEach(function(p){h||i.push(u,h=[]),-1==h.indexOf(p)&&h.push(p)})}})});for(var o=e[r.join(",")]=new cn(r.indexOf(n.length-1)>-1),s=0;s>1},cn.prototype.edge=function(e){var t=e<<1;if(t>=this.next.length)throw new RangeError("There's no "+e+"th edge in this content match");return{type:this.next[t],next:this.next[t+1]}},cn.prototype.toString=function(){var e=[];return function t(r){e.push(r);for(var i=1;i"+e.indexOf(r.next[s+1]);return o}).join("\n")},Object.defineProperties(cn.prototype,Mf),cn.empty=new cn(!0);var If=function(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()},JI={next:{configurable:!0}};function XI(n){var e=[];do{e.push($4(n))}while(n.eat("|"));return 1==e.length?e[0]:{type:"choice",exprs:e}}function $4(n){var e=[];do{e.push(G4(n))}while(n.next&&")"!=n.next&&"|"!=n.next);return 1==e.length?e[0]:{type:"seq",exprs:e}}function G4(n){for(var e=function Z4(n){if(n.eat("(")){var e=XI(n);return n.eat(")")||n.err("Missing closing paren"),e}if(!/\W/.test(n.next)){var t=function K4(n,e){var t=n.nodeTypes,r=t[e];if(r)return[r];var i=[];for(var o in t){var s=t[o];s.groups.indexOf(e)>-1&&i.push(s)}return 0==i.length&&n.err("No node type or group '"+e+"' found"),i}(n,n.next).map(function(r){return null==n.inline?n.inline=r.isInline:n.inline!=r.isInline&&n.err("Mixing inline and block content"),{type:"name",value:r}});return n.pos++,1==t.length?t[0]:{type:"choice",exprs:t}}n.err("Unexpected token '"+n.next+"'")}(n);;)if(n.eat("+"))e={type:"plus",expr:e};else if(n.eat("*"))e={type:"star",expr:e};else if(n.eat("?"))e={type:"opt",expr:e};else{if(!n.eat("{"))break;e=q4(n,e)}return e}function eT(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");var e=Number(n.next);return n.pos++,e}function q4(n,e){var t=eT(n),r=t;return n.eat(",")&&(r="}"!=n.next?eT(n):-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:t,max:r,expr:e}}function tT(n,e){return e-n}function nT(n,e){var t=[];return function r(i){var o=n[i];if(1==o.length&&!o[0].term)return r(o[0].to);t.push(i);for(var s=0;s-1},En.prototype.allowsMarks=function(e){if(null==this.markSet)return!0;for(var t=0;t-1};var cs=function(e){for(var t in this.spec={},e)this.spec[t]=e[t];this.spec.nodes=UI.from(e.nodes),this.spec.marks=UI.from(e.marks),this.nodes=En.compile(this.spec.nodes,this),this.marks=bo.compile(this.spec.marks,this);var r=Object.create(null);for(var i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");var o=this.nodes[i],s=o.spec.content||"",a=o.spec.marks;o.contentMatch=r[s]||(r[s]=cn.parse(s,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.markSet="_"==a?null:a?lT(this,a.split(" ")):""!=a&&o.inlineContent?null:[]}for(var l in this.marks){var c=this.marks[l],u=c.spec.excludes;c.excluded=null==u?[c]:""==u?[]:lT(this,u.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached=Object.create(null),this.cached.wrappings=Object.create(null)};function lT(n,e){for(var t=[],r=0;r-1)&&t.push(s=l)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return t}cs.prototype.node=function(e,t,r,i){if("string"==typeof e)e=this.nodeType(e);else{if(!(e instanceof En))throw new RangeError("Invalid node type: "+e);if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}return e.createChecked(t,r,i)},cs.prototype.text=function(e,t){var r=this.nodes.text;return new W4(r,r.defaultAttrs,e,De.setFrom(t))},cs.prototype.mark=function(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)},cs.prototype.nodeFromJSON=function(e){return Ee.fromJSON(this,e)},cs.prototype.markFromJSON=function(e){return De.fromJSON(this,e)},cs.prototype.nodeType=function(e){var t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t};var Lr=function(e,t){var r=this;this.schema=e,this.rules=t,this.tags=[],this.styles=[],t.forEach(function(i){i.tag?r.tags.push(i):i.style&&r.styles.push(i)}),this.normalizeLists=!this.tags.some(function(i){if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;var o=e.nodes[i.node];return o.contentMatch.matchType(o)})};Lr.prototype.parse=function(e,t){void 0===t&&(t={});var r=new Je(this,t,!1);return r.addAll(e,null,t.from,t.to),r.finish()},Lr.prototype.parseSlice=function(e,t){void 0===t&&(t={});var r=new Je(this,t,!0);return r.addAll(e,null,t.from,t.to),F.maxOpen(r.finish())},Lr.prototype.matchTag=function(e,t,r){for(var i=r?this.tags.indexOf(r)+1:0;ie.length&&(61!=s.style.charCodeAt(e.length)||s.style.slice(e.length+1)!=t))){if(s.getAttrs){var a=s.getAttrs(t);if(!1===a)continue;s.attrs=a}return s}}},Lr.schemaRules=function(e){var t=[];function r(l){for(var c=null==l.priority?50:l.priority,u=0;u=0;t--)if(e.eq(this.stashMarks[t]))return this.stashMarks.splice(t,1)[0]},Bi.prototype.applyPending=function(e){for(var t=0,r=this.pendingMarks;t=0;i--){var o=this.nodes[i],s=o.findWrapping(e);if(s&&(!t||t.length>s.length)&&(t=s,r=o,!s.length)||o.solid)break}if(!t)return!1;this.sync(r);for(var a=0;athis.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}},Je.prototype.finish=function(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)},Je.prototype.sync=function(e){for(var t=this.open;t>=0;t--)if(this.nodes[t]==e)return void(this.open=t)},ey.currentPos.get=function(){this.closeExtra();for(var n=0,e=this.open;e>=0;e--){for(var t=this.nodes[e].content,r=t.length-1;r>=0;r--)n+=t[r].nodeSize;e&&n++}return n},Je.prototype.findAtPoint=function(e,t){if(this.find)for(var r=0;r-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);var r=e.split("/"),i=this.options.context,o=!(this.isOpen||i&&i.parent.type!=this.nodes[0].type),s=(o?0:1)-(i?i.depth+1:0),a=function(l,c){for(;l>=0;l--){var u=r[l];if(""==u){if(l==r.length-1||0==l)continue;for(;c>=s;c--)if(a(l-1,c))return!0;return!1}var d=c>0||0==c&&o?t.nodes[c].type:i&&c>=s?i.node(c-s).type:null;if(!d||d.name!=u&&-1==d.groups.indexOf(u))return!1;c--}return!0};return a(r.length-1,this.open)},Je.prototype.textblockFromContext=function(){var e=this.options.context;if(e)for(var t=e.depth;t>=0;t--){var r=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(var i in this.parser.schema.nodes){var o=this.parser.schema.nodes[i];if(o.isTextblock&&o.defaultAttrs)return o}},Je.prototype.addPendingMark=function(e){var t=function i8(n,e){for(var t=0;t=0;r--){var i=this.nodes[r];if(i.pendingMarks.lastIndexOf(e)>-1)i.pendingMarks=e.removeFromSet(i.pendingMarks);else{i.activeMarks=e.removeFromSet(i.activeMarks);var s=i.popFromStashMark(e);s&&i.type&&i.type.allowsMarkType(s.type)&&(i.activeMarks=s.addToSet(i.activeMarks))}if(i==t)break}},Object.defineProperties(Je.prototype,ey);var Gt=function(e,t){this.nodes=e||{},this.marks=t||{}};function fT(n){var e={};for(var t in n){var r=n[t].spec.toDOM;r&&(e[t]=r)}return e}function ty(n){return n.document||window.document}Gt.prototype.serializeFragment=function(e,t,r){var i=this;void 0===t&&(t={}),r||(r=ty(t).createDocumentFragment());var o=r,s=null;return e.forEach(function(a){if(s||a.marks.length){s||(s=[]);for(var l=0,c=0;l=0;i--){var o=this.serializeMark(e.marks[i],e.isInline,t);o&&((o.contentDOM||o.dom).appendChild(r),r=o.dom)}return r},Gt.prototype.serializeMark=function(e,t,r){void 0===r&&(r={});var i=this.marks[e.type.name];return i&&Gt.renderSpec(ty(r),i(e,t))},Gt.renderSpec=function(e,t,r){if(void 0===r&&(r=null),"string"==typeof t)return{dom:e.createTextNode(t)};if(null!=t.nodeType)return{dom:t};if(t.dom&&null!=t.dom.nodeType)return t;var i=t[0],o=i.indexOf(" ");o>0&&(r=i.slice(0,o),i=i.slice(o+1));var s=null,a=r?e.createElementNS(r,i):e.createElement(i),l=t[1],c=1;if(l&&"object"==typeof l&&null==l.nodeType&&!Array.isArray(l))for(var u in c=2,l)if(null!=l[u]){var d=u.indexOf(" ");d>0?a.setAttributeNS(u.slice(0,d),u.slice(d+1),l[u]):a.setAttribute(u,l[u])}for(var f=c;fc)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}var p=Gt.renderSpec(e,h,r),m=p.contentDOM;if(a.appendChild(p.dom),m){if(s)throw new RangeError("Multiple content holes");s=m}}return{dom:a,contentDOM:s}},Gt.fromSchema=function(e){return e.cached.domSerializer||(e.cached.domSerializer=new Gt(this.nodesFromSchema(e),this.marksFromSchema(e)))},Gt.nodesFromSchema=function(e){var t=fT(e.nodes);return t.text||(t.text=function(r){return r.text}),t},Gt.marksFromSchema=function(e){return fT(e.marks)};var pT=Math.pow(2,16);function o8(n,e){return n+e*pT}function gT(n){return 65535&n}var ny=function(e,t,r){void 0===t&&(t=!1),void 0===r&&(r=null),this.pos=e,this.deleted=t,this.recover=r},qt=function n(e,t){if(void 0===t&&(t=!1),!e.length&&n.empty)return n.empty;this.ranges=e,this.inverted=t};qt.prototype.recover=function(e){var t=0,r=gT(e);if(!this.inverted)for(var i=0;ie)break;var c=this.ranges[a+o],u=this.ranges[a+s],d=l+c;if(e<=d){var h=l+i+((c?e==l?-1:e==d?1:t:t)<0?0:u);if(r)return h;var p=e==(t<0?l:d)?null:o8(a/3,e-l);return new ny(h,t<0?e!=l:e!=d,p)}i+=u-c}return r?e+i:new ny(e+i)},qt.prototype.touches=function(e,t){for(var r=0,i=gT(t),o=this.inverted?2:1,s=this.inverted?1:2,a=0;ae)break;var c=this.ranges[a+o];if(e<=l+c&&a==3*i)return!0;r+=this.ranges[a+s]-c}return!1},qt.prototype.forEach=function(e){for(var t=this.inverted?2:1,r=this.inverted?1:2,i=0,o=0;i=0;t--){var i=e.getMirror(t);this.appendMap(e.maps[t].invert(),null!=i&&i>t?r-i-1:null)}},un.prototype.invert=function(){var e=new un;return e.appendMappingInverted(this),e},un.prototype.map=function(e,t){if(void 0===t&&(t=1),this.mirror)return this._map(e,t,!0);for(var r=this.from;ro&&l0},gt.prototype.addStep=function(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t},Object.defineProperties(gt.prototype,ry);var iy=Object.create(null),dn=function(){};dn.prototype.apply=function(e){return Af()},dn.prototype.getMap=function(){return qt.empty},dn.prototype.invert=function(e){return Af()},dn.prototype.map=function(e){return Af()},dn.prototype.merge=function(e){return null},dn.prototype.toJSON=function(){return Af()},dn.fromJSON=function(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");var r=iy[t.stepType];if(!r)throw new RangeError("No step type "+t.stepType+" defined");return r.fromJSON(e,t)},dn.jsonID=function(e,t){if(e in iy)throw new RangeError("Duplicate use of step JSON ID "+e);return iy[e]=t,t.prototype.jsonID=e,t};var wn=function(e,t){this.doc=e,this.failed=t};wn.ok=function(e){return new wn(e,null)},wn.fail=function(e){return new wn(null,e)},wn.fromReplace=function(e,t,r,i){try{return wn.ok(e.replace(t,r,i))}catch(o){if(o instanceof li)return wn.fail(o.message);throw o}};var ji=function(n){function e(t,r,i,o){n.call(this),this.from=t,this.to=r,this.slice=i,this.structure=!!o}return n&&(e.__proto__=n),(e.prototype=Object.create(n&&n.prototype)).constructor=e,e.prototype.apply=function(r){return this.structure&&oy(r,this.from,this.to)?wn.fail("Structure replace would overwrite content"):wn.fromReplace(r,this.from,this.to,this.slice)},e.prototype.getMap=function(){return new qt([this.from,this.to-this.from,this.slice.size])},e.prototype.invert=function(r){return new e(this.from,this.from+this.slice.size,r.slice(this.from,this.to))},e.prototype.map=function(r){var i=r.mapResult(this.from,1),o=r.mapResult(this.to,-1);return i.deleted&&o.deleted?null:new e(i.pos,Math.max(i.pos,o.pos),this.slice)},e.prototype.merge=function(r){if(!(r instanceof e)||r.structure||this.structure)return null;if(this.from+this.slice.size!=r.from||this.slice.openEnd||r.slice.openStart){if(r.to!=this.from||this.slice.openStart||r.slice.openEnd)return null;var o=this.slice.size+r.slice.size==0?F.empty:new F(r.slice.content.append(this.slice.content),r.slice.openStart,this.slice.openEnd);return new e(r.from,this.to,o,this.structure)}var i=this.slice.size+r.slice.size==0?F.empty:new F(this.slice.content.append(r.slice.content),this.slice.openStart,r.slice.openEnd);return new e(this.from,this.to+(r.to-r.from),i,this.structure)},e.prototype.toJSON=function(){var r={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(r.slice=this.slice.toJSON()),this.structure&&(r.structure=!0),r},e.fromJSON=function(r,i){if("number"!=typeof i.from||"number"!=typeof i.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new e(i.from,i.to,F.fromJSON(r,i.slice),!!i.structure)},e}(dn);dn.jsonID("replace",ji);var On=function(n){function e(t,r,i,o,s,a,l){n.call(this),this.from=t,this.to=r,this.gapFrom=i,this.gapTo=o,this.slice=s,this.insert=a,this.structure=!!l}return n&&(e.__proto__=n),(e.prototype=Object.create(n&&n.prototype)).constructor=e,e.prototype.apply=function(r){if(this.structure&&(oy(r,this.from,this.gapFrom)||oy(r,this.gapTo,this.to)))return wn.fail("Structure gap-replace would overwrite content");var i=r.slice(this.gapFrom,this.gapTo);if(i.openStart||i.openEnd)return wn.fail("Gap is not a flat range");var o=this.slice.insertAt(this.insert,i.content);return o?wn.fromReplace(r,this.from,this.to,o):wn.fail("Content does not fit in gap")},e.prototype.getMap=function(){return new qt([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])},e.prototype.invert=function(r){var i=this.gapTo-this.gapFrom;return new e(this.from,this.from+this.slice.size+i,this.from+this.insert,this.from+this.insert+i,r.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)},e.prototype.map=function(r){var i=r.mapResult(this.from,1),o=r.mapResult(this.to,-1),s=r.map(this.gapFrom,-1),a=r.map(this.gapTo,1);return i.deleted&&o.deleted||so.pos?null:new e(i.pos,o.pos,s,a,this.slice,this.insert,this.structure)},e.prototype.toJSON=function(){var r={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(r.slice=this.slice.toJSON()),this.structure&&(r.structure=!0),r},e.fromJSON=function(r,i){if("number"!=typeof i.from||"number"!=typeof i.to||"number"!=typeof i.gapFrom||"number"!=typeof i.gapTo||"number"!=typeof i.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new e(i.from,i.to,i.gapFrom,i.gapTo,F.fromJSON(r,i.slice),i.insert,!!i.structure)},e}(dn);function oy(n,e,t){for(var r=n.resolve(e),i=t-e,o=r.depth;i>0&&o>0&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0)for(var s=r.node(o).maybeChild(r.indexAfter(o));i>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,i--}return!1}function a8(n,e,t){return(0==e||n.canReplace(e,n.childCount))&&(t==n.childCount||n.canReplace(0,t))}function Ra(n){for(var t=n.parent.content.cutByIndex(n.startIndex,n.endIndex),r=n.depth;;--r){var i=n.$from.node(r),o=n.$from.index(r),s=n.$to.indexAfter(r);if(ro;a--,l--){var c=i.node(a),u=i.index(a);if(c.type.spec.isolating)return!1;var d=c.content.cutByIndex(u,c.childCount),f=r&&r[l]||c;if(f!=c&&(d=d.replaceChild(0,f.type.create(f.attrs))),!c.canReplace(u+1,c.childCount)||!f.type.validContent(d))return!1}var h=i.indexAfter(o),p=r&&r[0];return i.node(o).canReplaceWith(h,h,p?p.type:i.node(o+1).type)}function xc(n,e){var t=n.resolve(e),r=t.index();return function vT(n,e){return n&&e&&!n.isLeaf&&n.canAppend(e)}(t.nodeBefore,t.nodeAfter)&&t.parent.canReplace(r,r+1)}function yT(n,e,t){var r=n.resolve(e);if(!t.content.size)return e;for(var i=t.content,o=0;o=0;a--){var l=a==r.depth?0:r.pos<=(r.start(a+1)+r.end(a+1))/2?-1:1,c=r.index(a)+(l>0?1:0),u=r.node(a),d=!1;if(1==s)d=u.canReplace(c,c,i);else{var f=u.contentMatchAt(c).findWrapping(i.firstChild.type);d=f&&u.canReplaceWith(c,c,f[0])}if(d)return 0==l?r.pos:l<0?r.before(a+1):r.after(a+1)}return null}function ay(n,e,t){for(var r=[],i=0;ie;d--)f||t.index(d)>0?(f=!0,c=M.from(t.node(d).copy(c)),u++):a--;for(var h=M.empty,p=0,g=i,m=!1;g>e;g--)m||r.after(g+1)=0;r--){if(t.size){var i=e[r].type.contentMatch.matchFragment(t);if(!i||!i.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}t=M.from(e[r].type.create(e[r].attrs,t))}var o=n.start,s=n.end;return this.step(new On(o,s,o,s,new F(t,0,0),e.length,!0))},gt.prototype.setBlockType=function(n,e,t,r){var i=this;if(void 0===e&&(e=n),!t.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var o=this.steps.length;return this.doc.nodesBetween(n,e,function(s,a){if(s.isTextblock&&!s.hasMarkup(t,r)&&function u8(n,e,t){var r=n.resolve(e),i=r.index();return r.parent.canReplaceWith(i,i+1,t)}(i.doc,i.mapping.slice(o).map(a),t)){i.clearIncompatible(i.mapping.slice(o).map(a,1),t);var l=i.mapping.slice(o),c=l.map(a,1),u=l.map(a+s.nodeSize,1);return i.step(new On(c,u,c+1,u-1,new F(M.from(t.create(r,null,s.marks)),0,0),1,!0)),!1}}),this},gt.prototype.setNodeMarkup=function(n,e,t,r){var i=this.doc.nodeAt(n);if(!i)throw new RangeError("No node at given position");e||(e=i.type);var o=e.create(t,null,r||i.marks);if(i.isLeaf)return this.replaceWith(n,n+i.nodeSize,o);if(!e.validContent(i.content))throw new RangeError("Invalid content for node type "+e.name);return this.step(new On(n,n+i.nodeSize,n+1,n+i.nodeSize-1,new F(M.from(o),0,0),1,!0))},gt.prototype.split=function(n,e,t){void 0===e&&(e=1);for(var r=this.doc.resolve(n),i=M.empty,o=M.empty,s=r.depth,a=r.depth-e,l=e-1;s>a;s--,l--){i=M.from(r.node(s).copy(i));var c=t&&t[l];o=M.from(c?c.type.create(c.attrs,o):r.node(s).copy(o))}return this.step(new ji(n,n,new F(i.append(o),e,e),!0))},gt.prototype.join=function(n,e){void 0===e&&(e=1);var t=new ji(n-e,n+e,F.empty,!0);return this.step(t)};var ly=function(n){function e(t,r,i){n.call(this),this.from=t,this.to=r,this.mark=i}return n&&(e.__proto__=n),(e.prototype=Object.create(n&&n.prototype)).constructor=e,e.prototype.apply=function(r){var i=this,o=r.slice(this.from,this.to),s=r.resolve(this.from),a=s.node(s.sharedDepth(this.to)),l=new F(ay(o.content,function(c,u){return c.isAtom&&u.type.allowsMarkType(i.mark.type)?c.mark(i.mark.addToSet(c.marks)):c},a),o.openStart,o.openEnd);return wn.fromReplace(r,this.from,this.to,l)},e.prototype.invert=function(){return new Ac(this.from,this.to,this.mark)},e.prototype.map=function(r){var i=r.mapResult(this.from,1),o=r.mapResult(this.to,-1);return i.deleted&&o.deleted||i.pos>=o.pos?null:new e(i.pos,o.pos,this.mark)},e.prototype.merge=function(r){if(r instanceof e&&r.mark.eq(this.mark)&&this.from<=r.to&&this.to>=r.from)return new e(Math.min(this.from,r.from),Math.max(this.to,r.to),this.mark)},e.prototype.toJSON=function(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}},e.fromJSON=function(r,i){if("number"!=typeof i.from||"number"!=typeof i.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new e(i.from,i.to,r.markFromJSON(i.mark))},e}(dn);dn.jsonID("addMark",ly);var Ac=function(n){function e(t,r,i){n.call(this),this.from=t,this.to=r,this.mark=i}return n&&(e.__proto__=n),(e.prototype=Object.create(n&&n.prototype)).constructor=e,e.prototype.apply=function(r){var i=this,o=r.slice(this.from,this.to),s=new F(ay(o.content,function(a){return a.mark(i.mark.removeFromSet(a.marks))}),o.openStart,o.openEnd);return wn.fromReplace(r,this.from,this.to,s)},e.prototype.invert=function(){return new ly(this.from,this.to,this.mark)},e.prototype.map=function(r){var i=r.mapResult(this.from,1),o=r.mapResult(this.to,-1);return i.deleted&&o.deleted||i.pos>=o.pos?null:new e(i.pos,o.pos,this.mark)},e.prototype.merge=function(r){if(r instanceof e&&r.mark.eq(this.mark)&&this.from<=r.to&&this.to>=r.from)return new e(Math.min(this.from,r.from),Math.max(this.to,r.to),this.mark)},e.prototype.toJSON=function(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}},e.fromJSON=function(r,i){if("number"!=typeof i.from||"number"!=typeof i.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new e(i.from,i.to,r.markFromJSON(i.mark))},e}(dn);function cy(n,e,t,r){if(void 0===t&&(t=e),void 0===r&&(r=F.empty),e==t&&!r.size)return null;var i=n.resolve(e),o=n.resolve(t);return _T(i,o,r)?new ji(e,t,r):new dr(i,o,r).fit()}function _T(n,e,t){return!t.openStart&&!t.openEnd&&n.start()==e.start()&&n.parent.canReplace(n.index(),e.index(),t.content)}dn.jsonID("removeMark",Ac),gt.prototype.addMark=function(n,e,t){var r=this,i=[],o=[],s=null,a=null;return this.doc.nodesBetween(n,e,function(l,c,u){if(l.isInline){var d=l.marks;if(!t.isInSet(d)&&u.type.allowsMarkType(t.type)){for(var f=Math.max(c,n),h=Math.min(c+l.nodeSize,e),p=t.addToSet(d),g=0;g=0;f--)this.step(i[f]);return this},gt.prototype.replace=function(n,e,t){void 0===e&&(e=n),void 0===t&&(t=F.empty);var r=cy(this.doc,n,e,t);return r&&this.step(r),this},gt.prototype.replaceWith=function(n,e,t){return this.replace(n,e,new F(M.from(t),0,0))},gt.prototype.delete=function(n,e){return this.replace(n,e,F.empty)},gt.prototype.insert=function(n,e){return this.replaceWith(n,n,e)};var dr=function(e,t,r){this.$to=t,this.$from=e,this.unplaced=r,this.frontier=[];for(var i=0;i<=e.depth;i++){var o=e.node(i);this.frontier.push({type:o.type,match:o.contentMatchAt(e.indexAfter(i))})}this.placed=M.empty;for(var s=e.depth;s>0;s--)this.placed=M.from(e.node(s).copy(this.placed))},bT={depth:{configurable:!0}};function Oc(n,e,t){return 0==e?n.cutByIndex(t):n.replaceChild(0,n.firstChild.copy(Oc(n.firstChild.content,e-1,t)))}function kc(n,e,t){return 0==e?n.append(t):n.replaceChild(n.childCount-1,n.lastChild.copy(kc(n.lastChild.content,e-1,t)))}function uy(n,e){for(var t=0;t1&&(r=r.replaceChild(0,DT(r.firstChild,e-1,1==r.childCount?t-1:0))),e>0&&(r=n.type.contentMatch.fillBefore(r).append(r),t<=0&&(r=r.append(n.type.contentMatch.matchFragment(r).fillBefore(M.empty,!0)))),n.copy(r)}function dy(n,e,t,r,i){var o=n.node(e),s=i?n.indexAfter(e):n.index(e);if(s==o.childCount&&!t.compatibleContent(o.type))return null;var a=r.fillBefore(o.content,!0,s);return a&&!function f8(n,e,t){for(var r=t;rr){var s=i.contentMatchAt(0),a=s.fillBefore(n).append(n);n=a.append(s.matchFragment(a).fillBefore(M.empty,!0))}return n}function ET(n,e){for(var t=[],i=Math.min(n.depth,e.depth);i>=0;i--){var o=n.start(i);if(oe.pos+(e.depth-i)||n.node(i).type.spec.isolating||e.node(i).type.spec.isolating)break;(o==e.start(i)||i==n.depth&&i==e.depth&&n.parent.inlineContent&&e.parent.inlineContent&&i&&e.start(i-1)==o-1)&&t.push(i)}return t}bT.depth.get=function(){return this.frontier.length-1},dr.prototype.fit=function(){for(;this.unplaced.size;){var e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}var t=this.mustMoveInline(),r=this.placed.size-this.depth-this.$from.depth,i=this.$from,o=this.close(t<0?this.$to:i.doc.resolve(t));if(!o)return null;for(var s=this.placed,a=i.depth,l=o.depth;a&&l&&1==s.childCount;)s=s.firstChild.content,a--,l--;var c=new F(s,a,l);return t>-1?new On(i.pos,t,this.$to.pos,this.$to.end(),c,r):c.size||i.pos!=this.$to.pos?new ji(i.pos,o.pos,c):void 0},dr.prototype.findFittable=function(){for(var e=1;e<=2;e++)for(var t=this.unplaced.openStart;t>=0;t--)for(var i=void 0,o=(t?(i=uy(this.unplaced.content,t-1).firstChild).content:this.unplaced.content).firstChild,s=this.depth;s>=0;s--){var a=this.frontier[s],l=a.type,c=a.match,u=void 0,d=void 0;if(1==e&&(o?c.matchType(o.type)||(d=c.fillBefore(M.from(o),!1)):l.compatibleContent(i.type)))return{sliceDepth:t,frontierDepth:s,parent:i,inject:d};if(2==e&&o&&(u=c.findWrapping(o.type)))return{sliceDepth:t,frontierDepth:s,parent:i,wrap:u};if(i&&c.matchType(i.type))break}},dr.prototype.openMore=function(){var e=this.unplaced,t=e.content,r=e.openStart,i=e.openEnd,o=uy(t,r);return!(!o.childCount||o.firstChild.isLeaf||(this.unplaced=new F(t,r+1,Math.max(i,o.size+r>=t.size-i?r+1:0)),0))},dr.prototype.dropNode=function(){var e=this.unplaced,t=e.content,r=e.openStart,i=e.openEnd,o=uy(t,r);if(o.childCount<=1&&r>0){var s=t.size-r<=r+o.size;this.unplaced=new F(Oc(t,r-1,1),r-1,s?r-1:i)}else this.unplaced=new F(Oc(t,r,1),r,i)},dr.prototype.placeNodes=function(e){for(var t=e.sliceDepth,r=e.frontierDepth,i=e.parent,o=e.inject,s=e.wrap;this.depth>r;)this.closeFrontierNode();if(s)for(var a=0;a1||0==u||v.content.size)&&(p=b,f.push(DT(v.mark(g.allowedMarks(v.marks)),1==d?u:0,d==c.childCount?_:-1)))}var y=d==c.childCount;y||(_=-1),this.placed=kc(this.placed,r,M.from(f)),this.frontier[r].match=p,y&&_<0&&i&&i.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(var D=0,C=c;D<_;D++){var x=C.lastChild;this.frontier.push({type:x.type,match:x.contentMatchAt(x.childCount)}),C=x.content}this.unplaced=y?0==t?F.empty:new F(Oc(l.content,t-1,1),t-1,_<0?l.openEnd:t-1):new F(Oc(l.content,t,d),l.openStart,l.openEnd)},dr.prototype.mustMoveInline=function(){if(!this.$to.parent.isTextblock)return-1;var t,e=this.frontier[this.depth];if(!e.type.isTextblock||!dy(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return-1;for(var i=this.$to.depth,o=this.$to.after(i);i>1&&o==this.$to.end(--i);)++o;return o},dr.prototype.findCloseLevel=function(e){e:for(var t=Math.min(this.depth,e.depth);t>=0;t--){var r=this.frontier[t],i=r.match,o=r.type,s=t=0;l--){var c=this.frontier[l],f=dy(e,l,c.type,c.match,!0);if(!f||f.childCount)continue e}return{depth:t,fit:a,move:s?e.doc.resolve(e.after(t+1)):e}}}},dr.prototype.close=function(e){var t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=kc(this.placed,t.depth,t.fit)),e=t.move;for(var r=t.depth+1;r<=e.depth;r++){var i=e.node(r),o=i.type.contentMatch.fillBefore(i.content,!0,e.index(r));this.openFrontierNode(i.type,i.attrs,o)}return e},dr.prototype.openFrontierNode=function(e,t,r){var i=this.frontier[this.depth];i.match=i.match.matchType(e),this.placed=kc(this.placed,this.depth,M.from(e.create(t,r))),this.frontier.push({type:e,match:e.contentMatch})},dr.prototype.closeFrontierNode=function(){var t=this.frontier.pop().match.fillBefore(M.empty,!0);t.childCount&&(this.placed=kc(this.placed,this.frontier.length,t))},Object.defineProperties(dr.prototype,bT),gt.prototype.replaceRange=function(n,e,t){if(!t.size)return this.deleteRange(n,e);var r=this.doc.resolve(n),i=this.doc.resolve(e);if(_T(r,i,t))return this.step(new ji(n,e,t));var o=ET(r,this.doc.resolve(e));0==o[o.length-1]&&o.pop();var s=-(r.depth+1);o.unshift(s);for(var a=r.depth,l=r.pos-1;a>0;a--,l--){var c=r.node(a).type.spec;if(c.defining||c.definingAsContext||c.isolating)break;o.indexOf(a)>-1?s=a:r.before(a)==l&&o.splice(1,0,-a)}for(var u=o.indexOf(s),d=[],f=t.openStart,h=t.content,p=0;;p++){var g=h.firstChild;if(d.push(g),p==t.openStart)break;h=g.content}for(var m=f-1;m>=0;m--){var _=d[m].type,v=h8(_);if(v&&r.node(u).type!=_)f=m;else if(v||!_.isTextblock)break}for(var b=t.openStart;b>=0;b--){var y=(b+f+1)%(t.openStart+1),D=d[y];if(D)for(var C=0;C=0&&(this.replace(n,e,t),!(this.steps.length>ee));oe--){var K=o[oe];K<0||(n=r.before(K),e=i.after(K))}return this},gt.prototype.replaceRangeWith=function(n,e,t){if(!t.isInline&&n==e&&this.doc.resolve(n).parent.content.size){var r=function d8(n,e,t){var r=n.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),t))return e;if(0==r.parentOffset)for(var i=r.depth-1;i>=0;i--){var o=r.index(i);if(r.node(i).canReplaceWith(o,o,t))return r.before(i+1);if(o>0)return null}if(r.parentOffset==r.parent.content.size)for(var s=r.depth-1;s>=0;s--){var a=r.indexAfter(s);if(r.node(s).canReplaceWith(a,a,t))return r.after(s+1);if(a0&&(a||t.node(s-1).canReplace(t.index(s-1),r.indexAfter(s-1))))return this.delete(t.before(s),r.after(s))}for(var l=1;l<=t.depth&&l<=r.depth;l++)if(n-t.start(l)==t.depth-l&&e>t.end(l)&&r.end(l)-e!=r.depth-l)return this.delete(t.before(l),e);return this.delete(n,e)};var fy=Object.create(null),ue=function(e,t,r){this.ranges=r||[new p8(e.min(t),e.max(t))],this.$anchor=e,this.$head=t},Do={anchor:{configurable:!0},head:{configurable:!0},from:{configurable:!0},to:{configurable:!0},$from:{configurable:!0},$to:{configurable:!0},empty:{configurable:!0}};Do.anchor.get=function(){return this.$anchor.pos},Do.head.get=function(){return this.$head.pos},Do.from.get=function(){return this.$from.pos},Do.to.get=function(){return this.$to.pos},Do.$from.get=function(){return this.ranges[0].$from},Do.$to.get=function(){return this.ranges[0].$to},Do.empty.get=function(){for(var n=this.ranges,e=0;e=0;o--){var s=t<0?Pa(e.node(0),e.node(o),e.before(o+1),e.index(o),t,r):Pa(e.node(0),e.node(o),e.after(o+1),e.index(o)+1,t,r);if(s)return s}},ue.near=function(e,t){return void 0===t&&(t=1),this.findFrom(e,t)||this.findFrom(e,-t)||new Hi(e.node(0))},ue.atStart=function(e){return Pa(e,e,0,0,1)||new Hi(e)},ue.atEnd=function(e){return Pa(e,e,e.content.size,e.childCount,-1)||new Hi(e)},ue.fromJSON=function(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");var r=fy[t.type];if(!r)throw new RangeError("No selection type "+t.type+" defined");return r.fromJSON(e,t)},ue.jsonID=function(e,t){if(e in fy)throw new RangeError("Duplicate use of selection JSON ID "+e);return fy[e]=t,t.prototype.jsonID=e,t},ue.prototype.getBookmark=function(){return ye.between(this.$anchor,this.$head).getBookmark()},Object.defineProperties(ue.prototype,Do),ue.prototype.visible=!0;var p8=function(e,t){this.$from=e,this.$to=t},ye=function(n){function e(r,i){void 0===i&&(i=r),n.call(this,r,i)}n&&(e.__proto__=n),(e.prototype=Object.create(n&&n.prototype)).constructor=e;var t={$cursor:{configurable:!0}};return t.$cursor.get=function(){return this.$anchor.pos==this.$head.pos?this.$head:null},e.prototype.map=function(i,o){var s=i.resolve(o.map(this.head));if(!s.parent.inlineContent)return n.near(s);var a=i.resolve(o.map(this.anchor));return new e(a.parent.inlineContent?a:s,s)},e.prototype.replace=function(i,o){if(void 0===o&&(o=F.empty),n.prototype.replace.call(this,i,o),o==F.empty){var s=this.$from.marksAcross(this.$to);s&&i.ensureMarks(s)}},e.prototype.eq=function(i){return i instanceof e&&i.anchor==this.anchor&&i.head==this.head},e.prototype.getBookmark=function(){return new Nc(this.anchor,this.head)},e.prototype.toJSON=function(){return{type:"text",anchor:this.anchor,head:this.head}},e.fromJSON=function(i,o){if("number"!=typeof o.anchor||"number"!=typeof o.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new e(i.resolve(o.anchor),i.resolve(o.head))},e.create=function(i,o,s){void 0===s&&(s=o);var a=i.resolve(o);return new this(a,s==o?a:i.resolve(s))},e.between=function(i,o,s){var a=i.pos-o.pos;if((!s||a)&&(s=a>=0?1:-1),!o.parent.inlineContent){var l=n.findFrom(o,s,!0)||n.findFrom(o,-s,!0);if(!l)return n.near(o,s);o=l.$head}return i.parent.inlineContent||(0==a||(i=(n.findFrom(i,-s,!0)||n.findFrom(i,s,!0)).$anchor).pos0?0:1);i>0?s=0;s+=i){var a=e.child(s);if(a.isAtom){if(!o&&ne.isSelectable(a))return ne.create(n,t-(i<0?a.nodeSize:0))}else{var l=Pa(n,a,t+i,i<0?a.childCount:0,i,o);if(l)return l}t+=a.nodeSize*i}}function wT(n,e,t){var r=n.steps.length-1;if(!(r0},e.prototype.setStoredMarks=function(i){return this.storedMarks=i,this.updated|=2,this},e.prototype.ensureMarks=function(i){return De.sameSet(this.storedMarks||this.selection.$from.marks(),i)||this.setStoredMarks(i),this},e.prototype.addStoredMark=function(i){return this.ensureMarks(i.addToSet(this.storedMarks||this.selection.$head.marks()))},e.prototype.removeStoredMark=function(i){return this.ensureMarks(i.removeFromSet(this.storedMarks||this.selection.$head.marks()))},t.storedMarksSet.get=function(){return(2&this.updated)>0},e.prototype.addStep=function(i,o){n.prototype.addStep.call(this,i,o),this.updated=-3&this.updated,this.storedMarks=null},e.prototype.setTime=function(i){return this.time=i,this},e.prototype.replaceSelection=function(i){return this.selection.replace(this,i),this},e.prototype.replaceSelectionWith=function(i,o){var s=this.selection;return!1!==o&&(i=i.mark(this.storedMarks||(s.empty?s.$from.marks():s.$from.marksAcross(s.$to)||De.none))),s.replaceWith(this,i),this},e.prototype.deleteSelection=function(){return this.selection.replace(this),this},e.prototype.insertText=function(i,o,s){void 0===s&&(s=o);var a=this.doc.type.schema;if(null==o)return i?this.replaceSelectionWith(a.text(i),!0):this.deleteSelection();if(!i)return this.deleteRange(o,s);var l=this.storedMarks;if(!l){var c=this.doc.resolve(o);l=s==o?c.marks():c.marksAcross(this.doc.resolve(s))}return this.replaceRangeWith(o,s,a.text(i,l)),this.selection.empty||this.setSelection(ue.near(this.selection.$to)),this},e.prototype.setMeta=function(i,o){return this.meta["string"==typeof i?i:i.key]=o,this},e.prototype.getMeta=function(i){return this.meta["string"==typeof i?i:i.key]},t.isGeneric.get=function(){for(var r in this.meta)return!1;return!0},e.prototype.scrollIntoView=function(){return this.updated|=4,this},t.scrolledIntoView.get=function(){return(4&this.updated)>0},Object.defineProperties(e.prototype,t),e}(gt);function IT(n,e){return e&&n?n.bind(e):n}var Rc=function(e,t,r){this.name=e,this.init=IT(t.init,r),this.apply=IT(t.apply,r)},v8=[new Rc("doc",{init:function(e){return e.doc||e.schema.topNodeType.createAndFill()},apply:function(e){return e.doc}}),new Rc("selection",{init:function(e,t){return e.selection||ue.atStart(t.doc)},apply:function(e){return e.selection}}),new Rc("storedMarks",{init:function(e){return e.storedMarks||null},apply:function(e,t,r,i){return i.selection.$cursor?e.storedMarks:null}}),new Rc("scrollToSelection",{init:function(){return 0},apply:function(e,t){return e.scrolledIntoView?t+1:t}})],hy=function(e,t){var r=this;this.schema=e,this.fields=v8.concat(),this.plugins=[],this.pluginsByKey=Object.create(null),t&&t.forEach(function(i){if(r.pluginsByKey[i.key])throw new RangeError("Adding different instances of a keyed plugin ("+i.key+")");r.plugins.push(i),r.pluginsByKey[i.key]=i,i.spec.state&&r.fields.push(new Rc(i.key,i.spec.state,i))})},fn=function(e){this.config=e},Nf={schema:{configurable:!0},plugins:{configurable:!0},tr:{configurable:!0}};Nf.schema.get=function(){return this.config.schema},Nf.plugins.get=function(){return this.config.plugins},fn.prototype.apply=function(e){return this.applyTransaction(e).state},fn.prototype.filterTransaction=function(e,t){void 0===t&&(t=-1);for(var r=0;r-1&&Pc.splice(t,1)},Object.defineProperties(fn.prototype,Nf);var Pc=[];function TT(n,e,t){for(var r in n){var i=n[r];i instanceof Function?i=i.bind(e):"handleDOMEvents"==r&&(i=TT(i,e,{})),t[r]=i}return t}var Xe=function(e){this.props={},e.props&&TT(e.props,this,this.props),this.spec=e,this.key=e.key?e.key.key:xT("plugin")};Xe.prototype.getState=function(e){return e[this.key]};var py=Object.create(null);function xT(n){return n in py?n+"$"+ ++py[n]:(py[n]=0,n+"$")}var mt=function(e){void 0===e&&(e="key"),this.key=xT(e)};function gy(n,e){return!n.selection.empty&&(e&&e(n.tr.deleteSelection().scrollIntoView()),!0)}function AT(n,e,t){var i=n.selection.$cursor;if(!i||(t?!t.endOfTextblock("backward",n):i.parentOffset>0))return!1;var o=kT(i);if(!o){var s=i.blockRange(),a=s&&Ra(s);return null!=a&&(e&&e(n.tr.lift(s,a).scrollIntoView()),!0)}var l=o.nodeBefore;if(!l.type.spec.isolating&&HT(n,o,e))return!0;if(0==i.parent.content.size&&(Fa(l,"end")||ne.isSelectable(l))){var c=cy(n.doc,i.before(),i.after(),F.empty);if(c.slice.size0)return!1;s=kT(i)}var a=s&&s.nodeBefore;return!(!a||!ne.isSelectable(a)||(e&&e(n.tr.setSelection(ne.create(n.doc,s.pos-a.nodeSize)).scrollIntoView()),0))}function kT(n){if(!n.parent.type.spec.isolating)for(var e=n.depth-1;e>=0;e--){if(n.index(e)>0)return n.doc.resolve(n.before(e+1));if(n.node(e).type.spec.isolating)break}return null}function NT(n,e,t){var i=n.selection.$cursor;if(!i||(t?!t.endOfTextblock("forward",n):i.parentOffset=0;e--){var t=n.node(e);if(n.index(e)+11&&r.after()!=r.end(-1)){var i=r.before();if(Vi(n.doc,i))return e&&e(n.tr.split(i).scrollIntoView()),!0}var o=r.blockRange(),s=o&&Ra(o);return null!=s&&(e&&e(n.tr.lift(o,s).scrollIntoView()),!0)}function HT(n,e,t){var o,s,r=e.nodeBefore,i=e.nodeAfter;if(r.type.spec.isolating||i.type.spec.isolating)return!1;if(function D8(n,e,t){var r=e.nodeBefore,i=e.nodeAfter,o=e.index();return!(!(r&&i&&r.type.compatibleContent(i.type))||(!r.content.size&&e.parent.canReplace(o-1,o)?(t&&t(n.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),0):!e.parent.canReplace(o,o+1)||!i.isTextblock&&!xc(n.doc,e.pos)||(t&&t(n.tr.clearIncompatible(e.pos,r.type,r.contentMatchAt(r.childCount)).join(e.pos).scrollIntoView()),0)))}(n,e,t))return!0;var a=e.parent.canReplace(e.index(),e.index()+1);if(a&&(o=(s=r.contentMatchAt(r.childCount)).findWrapping(i.type))&&s.matchType(o[0]||i.type).validEnd){if(t){for(var l=e.pos+i.nodeSize,c=M.empty,u=o.length-1;u>=0;u--)c=M.from(o[u].create(null,c));c=M.from(r.copy(c));var d=n.tr.step(new On(e.pos-1,l,e.pos,l,new F(c,1,0),o.length,!0)),f=l+2*o.length;xc(d.doc,f)&&d.join(f),t(d.scrollIntoView())}return!0}var h=ue.findFrom(e,1),p=h&&h.$from.blockRange(h.$to),g=p&&Ra(p);if(null!=g&&g>=e.depth)return t&&t(n.tr.lift(p,g).scrollIntoView()),!0;if(a&&Fa(i,"start",!0)&&Fa(r,"end")){for(var m=r,_=[];_.push(m),!m.isTextblock;)m=m.lastChild;for(var v=i,b=1;!v.isTextblock;v=v.firstChild)b++;if(m.canReplace(m.childCount,m.childCount,v.content)){if(t){for(var y=M.empty,D=_.length-1;D>=0;D--)y=M.from(_[D].copy(y));t(n.tr.step(new On(e.pos-_.length,e.pos+i.nodeSize,e.pos+b,e.pos+i.nodeSize-b,new F(y,_.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function UT(n){return function(e,t){for(var r=e.selection,i=n<0?r.$from:r.$to,o=i.depth;i.node(o).isInline;){if(!o)return!1;o--}return!!i.node(o).isTextblock&&(t&&t(e.tr.setSelection(ye.create(e.doc,n<0?i.start(o):i.end(o)))),!0)}}mt.prototype.get=function(e){return e.config.pluginsByKey[this.key]},mt.prototype.getState=function(e){return e[this.key]};var zT=UT(-1),WT=UT(1);function $T(n,e){return function(t,r){var i=t.selection,o=i.from,s=i.to,a=!1;return t.doc.nodesBetween(o,s,function(l,c){if(a)return!1;if(l.isTextblock&&!l.hasMarkup(n,e))if(l.type==n)a=!0;else{var u=t.doc.resolve(c),d=u.index();a=u.parent.canReplaceWith(d,d+1,n)}}),!!a&&(r&&r(t.tr.setBlockType(o,s,n,e).scrollIntoView()),!0)}}function vy(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return function(t,r,i){for(var o=0;o2),T.mac=T.ios||/Mac/.test(navigator.platform),T.android=/Android \d/.test(navigator.userAgent),T.webkit="webkitFontSmoothing"in document.documentElement.style,T.webkit_version=T.webkit&&+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]}var Kn=function(n){for(var e=0;;e++)if(!(n=n.previousSibling))return e},wy=function(n){var e=n.assignedSlot||n.parentNode;return e&&11==e.nodeType?e.host:e},ZT=null,Ui=function(n,e,t){var r=ZT||(ZT=document.createRange());return r.setEnd(n,null==t?n.nodeValue.length:t),r.setStart(n,e||0),r},Fc=function(n,e,t,r){return t&&(YT(n,e,t,r,-1)||YT(n,e,t,r,1))},B8=/^(img|br|input|textarea|hr)$/i;function YT(n,e,t,r,i){for(;;){if(n==t&&e==r)return!0;if(e==(i<0?0:ci(n))){var o=n.parentNode;if(!o||1!=o.nodeType||V8(n)||B8.test(n.nodeName)||"false"==n.contentEditable)return!1;e=Kn(n)+(i<0?0:1),n=o}else{if(1!=n.nodeType)return!1;if("false"==(n=n.childNodes[e+(i<0?-1:0)]).contentEditable)return!1;e=i<0?ci(n):0}}}function ci(n){return 3==n.nodeType?n.nodeValue.length:n.childNodes.length}function V8(n){for(var e,t=n;t&&!(e=t.pmViewDesc);t=t.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==n||e.contentDOM==n)}var Sy=function(n){var e=n.isCollapsed;return e&&T.chrome&&n.rangeCount&&!n.getRangeAt(0).collapsed&&(e=!1),e};function La(n,e){var t=document.createEvent("Event");return t.initEvent("keydown",!0,!0),t.keyCode=n,t.key=t.code=e,t}function H8(n){return{left:0,right:n.documentElement.clientWidth,top:0,bottom:n.documentElement.clientHeight}}function Eo(n,e){return"number"==typeof n?n:n[e]}function U8(n){var e=n.getBoundingClientRect();return{left:e.left,right:e.left+n.clientWidth*(e.width/n.offsetWidth||1),top:e.top,bottom:e.top+n.clientHeight*(e.height/n.offsetHeight||1)}}function JT(n){for(var e=[],t=n.ownerDocument;n&&(e.push({dom:n,top:n.scrollTop,left:n.scrollLeft}),n!=t);n=wy(n));return e}function XT(n,e){for(var t=0;t=a){s=Math.max(f.bottom,s),a=Math.min(f.top,a);var h=f.left>e.left?f.left-e.left:f.right=(f.left+f.right)/2?1:0));continue}}!t&&(e.left>=f.right&&e.top>=f.top||e.left>=f.left&&e.top>=f.bottom)&&(o=c+1)}}return t&&3==t.nodeType?function G8(n,e){for(var t=n.nodeValue.length,r=document.createRange(),i=0;i=(o.left+o.right)/2?1:0)}}return{node:n,offset:0}}(t,i):!t||r&&1==t.nodeType?{node:n,offset:o}:ex(t,i)}function My(n,e){return n.left>=e.left-1&&n.left<=e.right+1&&n.top>=e.top-1&&n.top<=e.bottom+1}function tx(n,e,t){var r=n.childNodes.length;if(r&&t.tope.top&&s++}o==n.dom&&s==o.childNodes.length-1&&1==o.lastChild.nodeType&&e.top>o.lastChild.getBoundingClientRect().bottom?u=n.state.doc.content.size:(0==s||1!=o.nodeType||"BR"!=o.childNodes[s-1].nodeName)&&(u=function Z8(n,e,t,r){for(var i=-1,o=e;o!=n.dom;){var s=n.docView.nearestDesc(o,!0);if(!s)return null;if(s.node.isBlock&&s.parent){var a=s.dom.getBoundingClientRect();if(a.left>r.left||a.top>r.top)i=s.posBefore;else{if(!(a.right-1?i:n.docView.posFromDOM(e,t)}(n,o,s,e))}null==u&&(u=function K8(n,e,t){var r=ex(e,t),i=r.node,o=r.offset,s=-1;if(1==i.nodeType&&!i.firstChild){var a=i.getBoundingClientRect();s=a.left!=a.right&&t.left>(a.left+a.right)/2?1:-1}return n.docView.posFromDOM(i,o,s)}(n,c,e));var g=n.docView.nearestDesc(c,!0);return{pos:u,inside:g?g.posAtStart-g.border:-1}}function wo(n,e){var t=n.getClientRects();return t.length?t[e<0?0:t.length-1]:n.getBoundingClientRect()}var Q8=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function nx(n,e,t){var r=n.docView.domFromPos(e,t<0?-1:1),i=r.node,o=r.offset,s=T.webkit||T.gecko;if(3==i.nodeType){if(!s||!Q8.test(i.nodeValue)&&(t<0?o:o!=i.nodeValue.length)){var u=o,d=o,f=t<0?1:-1;return t<0&&!o?(d++,f=-1):t>=0&&o==i.nodeValue.length?(u--,f=1):t<0?u--:d++,Lc(wo(Ui(i,u,d),f),f<0)}var a=wo(Ui(i,o,o),t);if(T.gecko&&o&&/\s/.test(i.nodeValue[o-1])&&o=0)}if(o&&(t<0||o==ci(i))){var g=i.childNodes[o-1],m=3==g.nodeType?Ui(g,ci(g)-(s?0:1)):1!=g.nodeType||"BR"==g.nodeName&&g.nextSibling?null:g;if(m)return Lc(wo(m,1),!1)}if(o=0)}function Lc(n,e){if(0==n.width)return n;var t=e?n.left:n.right;return{top:n.top,bottom:n.bottom,left:t,right:t}}function Iy(n,e){if(0==n.height)return n;var t=e?n.top:n.bottom;return{top:t,bottom:t,left:n.left,right:n.right}}function rx(n,e,t){var r=n.state,i=n.root.activeElement;r!=e&&n.updateState(e),i!=n.dom&&n.focus();try{return t()}finally{r!=e&&n.updateState(r),i!=n.dom&&i&&i.focus()}}var X8=/[\u0590-\u08ac]/,ix=null,ox=null,sx=!1;var Ge=function(e,t,r,i){this.parent=e,this.children=t,this.dom=r,r.pmViewDesc=this,this.contentDOM=i,this.dirty=0},ui={size:{configurable:!0},border:{configurable:!0},posBefore:{configurable:!0},posAtStart:{configurable:!0},posAfter:{configurable:!0},posAtEnd:{configurable:!0},contentLost:{configurable:!0},domAtom:{configurable:!0},ignoreForCoords:{configurable:!0}};Ge.prototype.matchesWidget=function(){return!1},Ge.prototype.matchesMark=function(){return!1},Ge.prototype.matchesNode=function(){return!1},Ge.prototype.matchesHack=function(e){return!1},Ge.prototype.parseRule=function(){return null},Ge.prototype.stopEvent=function(){return!1},ui.size.get=function(){for(var n=0,e=0;eKn(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))l=2&e.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==t)for(var c=e;;c=c.parentNode){if(c==this.dom){l=!1;break}if(c.parentNode.firstChild!=c)break}if(null==l&&t==e.childNodes.length)for(var u=e;;u=u.parentNode){if(u==this.dom){l=!0;break}if(u.parentNode.lastChild!=u)break}}return(null==l?r>0:l)?this.posAtEnd:this.posAtStart},Ge.prototype.nearestDesc=function(e,t){for(var r=!0,i=e;i;i=i.parentNode){var o=this.getDesc(i);if(o&&(!t||o.node)){if(!r||!o.nodeDOM||(1==o.nodeDOM.nodeType?o.nodeDOM.contains(1==e.nodeType?e:e.parentNode):o.nodeDOM==e))return o;r=!1}}},Ge.prototype.getDesc=function(e){for(var t=e.pmViewDesc,r=t;r;r=r.parent)if(r==this)return t},Ge.prototype.posFromDOM=function(e,t,r){for(var i=e;i;i=i.parentNode){var o=this.getDesc(i);if(o)return o.localPosFromDOM(e,t,r)}return-1},Ge.prototype.descAt=function(e){for(var t=0,r=0;te||s instanceof dx){i=e-o;break}o=a}if(i)return this.children[r].domFromPos(i-this.children[r].border,t);for(var l=void 0;r&&!(l=this.children[r-1]).size&&l instanceof lx&&l.widget.type.side>=0;r--);if(t<=0){for(var c,u=!0;(c=r?this.children[r-1]:null)&&c.dom.parentNode!=this.contentDOM;r--,u=!1);return c&&t&&u&&!c.border&&!c.domAtom?c.domFromPos(c.size,t):{node:this.contentDOM,offset:c?Kn(c.dom)+1:0}}for(var d,f=!0;(d=r=u&&t<=c-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(e,t,u);e=s;for(var d=a;d>0;d--){var f=this.children[d-1];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(1)){i=Kn(f.dom)+1;break}e-=f.size}-1==i&&(i=0)}if(i>-1&&(c>t||a==this.children.length-1)){t=c;for(var h=a+1;hl&&st){var x=d;d=f,f=x}var A=document.createRange();A.setEnd(f.node,f.offset),A.setStart(d.node,d.offset),h.removeAllRanges(),h.addRange(A)}}},Ge.prototype.ignoreMutation=function(e){return!this.contentDOM&&"selection"!=e.type},ui.contentLost.get=function(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)},Ge.prototype.markDirty=function(e,t){for(var r=0,i=0;i=r:er){var a=r+o.border,l=s-o.border;if(e>=a&&t<=l)return this.dirty=e==r||t==s?2:1,void(e!=a||t!=l||!o.contentLost&&o.dom.parentNode==this.contentDOM?o.markDirty(e-a,t-a):o.dirty=3);o.dirty=o.dom!=o.contentDOM||o.dom.parentNode!=this.contentDOM||o.children.length?3:2}r=s}this.dirty=2},Ge.prototype.markParentsDirty=function(){for(var e=1,t=this.parent;t;t=t.parent,e++){var r=1==e?2:1;t.dirty0&&(a=Ay(a,0,r,o));for(var c=0;c=0;s--){var a=this.children[s];if(this.dom.contains(a.dom.parentNode)){o.contentElement=a.dom.parentNode;break}}o.contentElement||(o.getContent=function(){return M.empty})}else o.contentElement=this.contentDOM;else o.getContent=function(){return i.node.content};return o},e.prototype.matchesNode=function(i,o,s){return 0==this.dirty&&i.eq(this.node)&&xy(o,this.outerDeco)&&s.eq(this.innerDeco)},t.size.get=function(){return this.node.nodeSize},t.border.get=function(){return this.node.isLeaf?0:1},e.prototype.updateChildren=function(i,o){var s=this,a=this.node.inlineContent,l=o,c=i.composing&&this.localCompositionInfo(i,o),u=c&&c.pos>-1?c:null,d=c&&c.pos<0,f=new fr(this,u&&u.node);(function aW(n,e,t,r){var i=e.locals(n),o=0;if(0!=i.length)for(var l=0,c=[],u=null,d=0;;){if(lo;)c.push(i[l++]);var v=o+g.nodeSize;if(g.isText){var b=v;l=0&&!g&&f.syncToMarks(p==s.node.childCount?De.none:s.node.child(p).marks,a,i),f.placeWidget(h,i,l)},function(h,p,g,m){var _;f.syncToMarks(h.marks,a,i),f.findNodeMatch(h,p,g,m)||d&&i.state.selection.from>l&&i.state.selection.to-1&&f.updateNodeAt(h,p,g,_,i)||f.updateNextNode(h,p,g,i,m)||f.addNode(h,p,g,i,l),l+=h.nodeSize}),f.syncToMarks(So,a,i),this.node.isTextblock&&f.addTextblockHacks(),f.destroyRest(),(f.changed||2==this.dirty)&&(u&&this.protectLocalComposition(i,u),fx(this.contentDOM,this.children,i),T.ios&&function lW(n){if("UL"==n.nodeName||"OL"==n.nodeName){var e=n.style.cssText;n.style.cssText=e+"; list-style: square !important",window.getComputedStyle(n),n.style.cssText=e}}(this.dom))},e.prototype.localCompositionInfo=function(i,o){var s=i.state.selection,a=s.from,l=s.to;if(!(!(i.state.selection instanceof ye)||ao+this.node.content.size)){var c=i.root.getSelection(),u=function cW(n,e){for(;;){if(3==n.nodeType)return n;if(1==n.nodeType&&e>0){if(n.childNodes.length>e&&3==n.childNodes[e].nodeType)return n.childNodes[e];e=ci(n=n.childNodes[e-1])}else{if(!(1==n.nodeType&&e=t){var u=a=0&&u+e.length+a>=t)return a+u;if(t==r&&l.length>=r+e.length-a&&l.slice(r-a,r-a+e.length)==e)return r}}}return-1}(this.node.content,d,a-o,l-o);return f<0?null:{node:u,pos:f,text:d}}return{node:u,pos:-1}}}},e.prototype.protectLocalComposition=function(i,o){var s=o.node,a=o.pos,l=o.text;if(!this.getDesc(s)){for(var c=s;c.parentNode!=this.contentDOM;c=c.parentNode){for(;c.previousSibling;)c.parentNode.removeChild(c.previousSibling);for(;c.nextSibling;)c.parentNode.removeChild(c.nextSibling);c.pmViewDesc&&(c.pmViewDesc=null)}var u=new nW(this,c,s,l);i.compositionNodes.push(u),this.children=Ay(this.children,a,a+l.length,i,u)}},e.prototype.update=function(i,o,s,a){return!(3==this.dirty||!i.sameMarkup(this.node)||(this.updateInner(i,o,s,a),0))},e.prototype.updateInner=function(i,o,s,a){this.updateOuterDeco(o),this.node=i,this.innerDeco=s,this.contentDOM&&this.updateChildren(a,this.posAtStart),this.dirty=0},e.prototype.updateOuterDeco=function(i){if(!xy(i,this.outerDeco)){var o=1!=this.nodeDOM.nodeType,s=this.dom;this.dom=hx(this.dom,this.nodeDOM,Ty(this.outerDeco,this.node,o),Ty(i,this.node,o)),this.dom!=s&&(s.pmViewDesc=null,this.dom.pmViewDesc=this),this.outerDeco=i}},e.prototype.selectNode=function(){this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)},e.prototype.deselectNode=function(){this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable")},t.domAtom.get=function(){return this.node.isAtom},Object.defineProperties(e.prototype,t),e}(Ge);function cx(n,e,t,r,i){return px(r,e,n),new jc(null,n,e,t,r,r,r,i,0)}var ux=function(n){function e(r,i,o,s,a,l,c){n.call(this,r,i,o,s,a,null,l,c)}n&&(e.__proto__=n),(e.prototype=Object.create(n&&n.prototype)).constructor=e;var t={domAtom:{configurable:!0}};return e.prototype.parseRule=function(){for(var i=this.nodeDOM.parentNode;i&&i!=this.dom&&!i.pmIsDeco;)i=i.parentNode;return{skip:i||!0}},e.prototype.update=function(i,o,s,a){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!i.sameMarkup(this.node)||(this.updateOuterDeco(o),(0!=this.dirty||i.text!=this.node.text)&&i.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=i.text,a.trackWrites==this.nodeDOM&&(a.trackWrites=null)),this.node=i,this.dirty=0,0))},e.prototype.inParent=function(){for(var i=this.parent.contentDOM,o=this.nodeDOM;o;o=o.parentNode)if(o==i)return!0;return!1},e.prototype.domFromPos=function(i){return{node:this.nodeDOM,offset:i}},e.prototype.localPosFromDOM=function(i,o,s){return i==this.nodeDOM?this.posAtStart+Math.min(o,this.node.text.length):n.prototype.localPosFromDOM.call(this,i,o,s)},e.prototype.ignoreMutation=function(i){return"characterData"!=i.type&&"selection"!=i.type},e.prototype.slice=function(i,o,s){var a=this.node.cut(i,o),l=document.createTextNode(a.text);return new e(this.parent,a,this.outerDeco,this.innerDeco,l,l,s)},e.prototype.markDirty=function(i,o){n.prototype.markDirty.call(this,i,o),this.dom!=this.nodeDOM&&(0==i||o==this.nodeDOM.nodeValue.length)&&(this.dirty=3)},t.domAtom.get=function(){return!1},Object.defineProperties(e.prototype,t),e}(jc),dx=function(n){function e(){n.apply(this,arguments)}n&&(e.__proto__=n),(e.prototype=Object.create(n&&n.prototype)).constructor=e;var t={domAtom:{configurable:!0},ignoreForCoords:{configurable:!0}};return e.prototype.parseRule=function(){return{ignore:!0}},e.prototype.matchesHack=function(i){return 0==this.dirty&&this.dom.nodeName==i},t.domAtom.get=function(){return!0},t.ignoreForCoords.get=function(){return"IMG"==this.dom.nodeName},Object.defineProperties(e.prototype,t),e}(Ge),rW=function(n){function e(t,r,i,o,s,a,l,c,u,d){n.call(this,t,r,i,o,s,a,l,u,d),this.spec=c}return n&&(e.__proto__=n),(e.prototype=Object.create(n&&n.prototype)).constructor=e,e.prototype.update=function(r,i,o,s){if(3==this.dirty)return!1;if(this.spec.update){var a=this.spec.update(r,i,o);return a&&this.updateInner(r,i,o,s),a}return!(!this.contentDOM&&!r.isLeaf)&&n.prototype.update.call(this,r,i,o,s)},e.prototype.selectNode=function(){this.spec.selectNode?this.spec.selectNode():n.prototype.selectNode.call(this)},e.prototype.deselectNode=function(){this.spec.deselectNode?this.spec.deselectNode():n.prototype.deselectNode.call(this)},e.prototype.setSelection=function(r,i,o,s){this.spec.setSelection?this.spec.setSelection(r,i,o):n.prototype.setSelection.call(this,r,i,o,s)},e.prototype.destroy=function(){this.spec.destroy&&this.spec.destroy(),n.prototype.destroy.call(this)},e.prototype.stopEvent=function(r){return!!this.spec.stopEvent&&this.spec.stopEvent(r)},e.prototype.ignoreMutation=function(r){return this.spec.ignoreMutation?this.spec.ignoreMutation(r):n.prototype.ignoreMutation.call(this,r)},e}(jc);function fx(n,e,t){for(var r=n.firstChild,i=!1,o=0;o0;){for(var a=void 0;;)if(r){var l=t.children[r-1];if(!(l instanceof Rf)){a=l,r--;break}t=l,r=l.children.length}else{if(t==e)break e;r=t.parent.children.indexOf(t),t=t.parent}var c=a.node;if(c){if(c!=n.child(i-1))break;--i,o.set(a,i),s.push(a)}}return{index:i,matched:o,matches:s.reverse()}}(e.node.content,e)};function sW(n,e){return n.type.side-e.type.side}function Ay(n,e,t,r,i){for(var o=[],s=0,a=0;s=t||u<=e?o.push(l):(ct&&o.push(l.slice(t-c,l.size,r)))}return o}function mx(n,e){var t=n.root.getSelection(),r=n.state.doc;if(!t.focusNode)return null;var i=n.docView.nearestDesc(t.focusNode),o=i&&0==i.size,s=n.docView.posFromDOM(t.focusNode,t.focusOffset);if(s<0)return null;var l,c,a=r.resolve(s);if(Sy(t)){for(l=a;i&&!i.node;)i=i.parent;if(i&&i.node.isAtom&&ne.isSelectable(i.node)&&i.parent&&(!i.node.isInline||!function j8(n,e,t){for(var r=0==e,i=e==ci(n);r||i;){if(n==t)return!0;var o=Kn(n);if(!(n=n.parentNode))return!1;r=r&&0==o,i=i&&o==ci(n)}}(t.focusNode,t.focusOffset,i.dom))){var u=i.posBefore;c=new ne(s==u?a:r.resolve(u))}}else{var d=n.docView.posFromDOM(t.anchorNode,t.anchorOffset);if(d<0)return null;l=r.resolve(d)}return c||(c=ky(n,l,a,"pointer"==e||n.state.selection.head>1,s=Math.min(o,e.length);i-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{var c=Rf.create(this.top,e[o],t,r);this.top.children.splice(this.index,0,c),this.top=c,this.changed=!0}this.index=0,o++}},fr.prototype.findNodeMatch=function(e,t,r,i){var s,o=-1;if(i>=this.preMatch.index&&(s=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&s.matchesNode(e,t,r))o=this.top.children.indexOf(s,this.index);else for(var a=this.index,l=Math.min(this.top.children.length,a+5);a0?r.max(i):r.min(i),s=o.parent.inlineContent?o.depth?n.doc.resolve(e>0?o.after():o.before()):null:o;return s&&ue.findFrom(s,e)}function ds(n,e){return n.dispatch(n.state.tr.setSelection(e).scrollIntoView()),!0}function Ex(n,e,t){var r=n.state.selection;if(!(r instanceof ye)){if(r instanceof ne&&r.node.isInline)return ds(n,new ye(e>0?r.$to:r.$from));var c=Ry(n.state,e);return!!c&&ds(n,c)}if(!r.empty||t.indexOf("s")>-1)return!1;if(n.endOfTextblock(e>0?"right":"left")){var i=Ry(n.state,e);return!!(i&&i instanceof ne)&&ds(n,i)}if(!(T.mac&&t.indexOf("m")>-1)){var a,o=r.$head,s=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter;if(!s||s.isText)return!1;var l=e<0?o.pos-s.nodeSize:o.pos;return!!(s.isAtom||(a=n.docView.descAt(l))&&!a.contentDOM)&&(ne.isSelectable(s)?ds(n,new ne(e<0?n.state.doc.resolve(o.pos-s.nodeSize):o)):!!T.webkit&&ds(n,new ye(n.state.doc.resolve(e<0?l:l+s.nodeSize))))}}function Pf(n){return 3==n.nodeType?n.nodeValue.length:n.childNodes.length}function Hc(n){var e=n.pmViewDesc;return e&&0==e.size&&(n.nextSibling||"BR"!=n.nodeName)}function Py(n){var e=n.root.getSelection(),t=e.focusNode,r=e.focusOffset;if(t){var i,o,s=!1;for(T.gecko&&1==t.nodeType&&r0){if(1!=t.nodeType)break;var a=t.childNodes[r-1];if(Hc(a))i=t,o=--r;else{if(3!=a.nodeType)break;r=(t=a).nodeValue.length}}else{if(wx(t))break;for(var l=t.previousSibling;l&&Hc(l);)i=t.parentNode,o=Kn(l),l=l.previousSibling;if(l)r=Pf(t=l);else{if((t=t.parentNode)==n.dom)break;r=0}}s?Ly(n,e,t,r):i&&Ly(n,e,i,o)}}function Fy(n){var e=n.root.getSelection(),t=e.focusNode,r=e.focusOffset;if(t){for(var o,s,i=Pf(t);;)if(r-1||T.mac&&t.indexOf("m")>-1)return!1;var i=r.$from,o=r.$to;if(!i.parent.inlineContent||n.endOfTextblock(e<0?"up":"down")){var s=Ry(n.state,e);if(s&&s instanceof ne)return ds(n,s)}if(!i.parent.inlineContent){var a=e<0?i:o,l=r instanceof Hi?ue.near(a,e):ue.findFrom(a,e);return!!l&&ds(n,l)}return!1}function Mx(n,e){if(!(n.state.selection instanceof ye))return!0;var t=n.state.selection,r=t.$head,o=t.empty;if(!r.sameParent(t.$anchor))return!0;if(!o)return!1;if(n.endOfTextblock(e>0?"forward":"backward"))return!0;var s=!r.textOffset&&(e<0?r.nodeBefore:r.nodeAfter);if(s&&!s.isText){var a=n.state.tr;return e<0?a.delete(r.pos-s.nodeSize,r.pos):a.delete(r.pos,r.pos+s.nodeSize),n.dispatch(a),!0}return!1}function Ix(n,e,t){n.domObserver.stop(),e.contentEditable=t,n.domObserver.start()}function _W(n){var e=n.pmViewDesc;if(e)return e.parseRule();if("BR"==n.nodeName&&n.parentNode){if(T.safari&&/^(ul|ol)$/i.test(n.parentNode.nodeName)){var t=document.createElement("div");return t.appendChild(document.createElement("li")),{skip:t}}if(n.parentNode.lastChild==n||T.safari&&/^(tr|table)$/i.test(n.parentNode.nodeName))return{ignore:!0}}else if("IMG"==n.nodeName&&n.getAttribute("mark-placeholder"))return{ignore:!0}}function Tx(n,e,t){return Math.max(t.anchor,t.head)>e.content.size?null:ky(n,e.resolve(t.anchor),e.resolve(t.head))}function By(n,e,t){for(var r=n.depth,i=e?n.end():n.pos;r>0&&(e||n.indexAfter(r)==n.node(r).childCount);)r--,i++,e=!1;if(t)for(var o=n.node(r).maybeChild(n.indexAfter(r));o&&!o.isLeaf;)o=o.firstChild,i++;return i}function xx(n,e){for(var t=[],r=e.content,i=e.openStart,o=e.openEnd;i>1&&o>1&&1==r.childCount&&1==r.firstChild.childCount;){i--,o--;var s=r.firstChild;t.push(s.type.name,s.attrs!=s.type.defaultAttrs?s.attrs:null),r=s.content}var a=n.someProp("clipboardSerializer")||Gt.fromSchema(n.state.schema),l=Lx(),c=l.createElement("div");c.appendChild(a.serializeFragment(r,{document:l}));for(var d,u=c.firstChild;u&&1==u.nodeType&&(d=Px[u.nodeName.toLowerCase()]);){for(var f=d.length-1;f>=0;f--){for(var h=l.createElement(d[f]);c.firstChild;)h.appendChild(c.firstChild);c.appendChild(h),"tbody"!=d[f]&&(i++,o++)}u=c.firstChild}return u&&1==u.nodeType&&u.setAttribute("data-pm-slice",i+" "+o+" "+JSON.stringify(t)),{dom:c,text:n.someProp("clipboardTextSerializer",function(g){return g(e)})||e.content.textBetween(0,e.content.size,"\n\n")}}function Ax(n,e,t,r,i){var o,a,s=i.parent.type.spec.code;if(!t&&!e)return null;var l=e&&(r||s||!t);if(l){if(n.someProp("transformPastedText",function(D){e=D(e,s||r)}),s)return e?new F(M.from(n.state.schema.text(e.replace(/\r\n?/g,"\n"))),0,0):F.empty;var c=n.someProp("clipboardTextParser",function(D){return D(e,i,r)});if(c)a=c;else{var u=i.marks(),f=n.state.schema,h=Gt.fromSchema(f);o=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(function(D){var C=o.appendChild(document.createElement("p"));D&&C.appendChild(h.serializeNode(f.text(D,u)))})}}else n.someProp("transformPastedHTML",function(D){t=D(t)}),o=function MW(n){var e=/^(\s*]*>)*/.exec(n);e&&(n=n.slice(e[0].length));var i,t=Lx().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(n);if((i=r&&Px[r[1].toLowerCase()])&&(n=i.map(function(s){return"<"+s+">"}).join("")+n+i.map(function(s){return""}).reverse().join("")),t.innerHTML=n,i)for(var o=0;o=0;a-=2){var l=t.nodes[r[a]];if(!l||l.hasRequiredAttrs())break;i=M.from(l.create(r[a+1],i)),o++,s++}return new F(i,o,s)}(Rx(a,+g[1],+g[2]),g[3]);else if(a=F.maxOpen(function SW(n,e){if(n.childCount<2)return n;for(var t=function(o){var a=e.node(o).contentMatchAt(e.index(o)),l=void 0,c=[];if(n.forEach(function(u){if(c){var f,d=a.findWrapping(u.type);if(!d)return c=null;if(f=c.length&&l.length&&kx(d,l,u,c[c.length-1],0))c[c.length-1]=f;else{c.length&&(c[c.length-1]=Nx(c[c.length-1],l.length));var h=Ox(u,d);c.push(h),a=a.matchType(h.type,h.attrs),l=d}}}),c)return{v:M.from(c)}},r=e.depth;r>=0;r--){var i=t(r);if(i)return i.v}return n}(a.content,i),!0),a.openStart||a.openEnd){for(var _=0,v=0,b=a.content.firstChild;_=t;r--)n=e[r].create(null,M.from(n));return n}function kx(n,e,t,r,i){if(i=t&&(a=e<0?s.contentMatchAt(0).fillBefore(a,n.childCount>1||o<=i).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(M.empty,!0))),n.replaceChild(e<0?0:n.childCount-1,s.copy(a))}function Rx(n,e,t){return es.target.nodeValue.length})?r.flushSoon():r.flush()}),this.currentSelection=new Hy,Vy&&(this.onCharData=function(i){r.queue.push({target:i.target,type:"characterData",oldValue:i.prevValue}),r.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.suppressingSelectionUpdates=!1};Zn.prototype.flushSoon=function(){var e=this;this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(function(){e.flushingSoon=-1,e.flush()},20))},Zn.prototype.forceFlush=function(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())},Zn.prototype.start=function(){this.observer&&this.observer.observe(this.view.dom,xW),Vy&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()},Zn.prototype.stop=function(){var e=this;if(this.observer){var t=this.observer.takeRecords();if(t.length){for(var r=0;r-1)){var e=this.observer?this.observer.takeRecords():[];this.queue.length&&(e=this.queue.concat(e),this.queue.length=0);var t=this.view.root.getSelection(),r=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(t)&&Ny(this.view)&&!this.ignoreSelectionChange(t),i=-1,o=-1,s=!1,a=[];if(this.view.editable)for(var l=0;l1){var u=a.filter(function(h){return"BR"==h.nodeName});if(2==u.length){var d=u[0],f=u[1];d.parentNode&&d.parentNode.parentNode==f.parentNode?f.remove():d.remove()}}(i>-1||r)&&(i>-1&&(this.view.docView.markDirty(i,o),function AW(n){Bx||(Bx=!0,"normal"==getComputedStyle(n.dom).whiteSpace&&console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."))}(this.view)),this.handleDOMChange(i,o,s,a),this.view.docView&&this.view.docView.dirty?this.view.updateState(this.view.state):this.currentSelection.eq(t)||Mo(this.view),this.currentSelection.set(t))}},Zn.prototype.registerMutation=function(e,t){if(t.indexOf(e.target)>-1)return null;var r=this.view.docView.nearestDesc(e.target);if("attributes"==e.type&&(r==this.view.docView||"contenteditable"==e.attributeName||"style"==e.attributeName&&!e.oldValue&&!e.target.getAttribute("style"))||!r||r.ignoreMutation(e))return null;if("childList"==e.type){for(var i=0;io.depth?u(n,t,o.nodeAfter,o.before(c),i,!0):u(n,t,o.node(c),o.before(c),i,!1)}))return{v:!0}},a=o.depth+1;a>0;a--){var l=s(a);if(l)return l.v}return!1}function ja(n,e,t){n.focused||n.focus();var r=n.state.tr.setSelection(e);"pointer"==t&&r.setMeta("pointer",!0),n.dispatch(r)}function jW(n,e,t,r){return Wy(n,"handleDoubleClickOn",e,t,r)||n.someProp("handleDoubleClick",function(i){return i(n,e,r)})}function VW(n,e,t,r){return Wy(n,"handleTripleClickOn",e,t,r)||n.someProp("handleTripleClick",function(i){return i(n,e,r)})||function HW(n,e,t){if(0!=t.button)return!1;var r=n.state.doc;if(-1==e)return!!r.inlineContent&&(ja(n,ye.create(r,0,r.content.size),"pointer"),!0);for(var i=r.resolve(e),o=i.depth+1;o>0;o--){var s=o>i.depth?i.nodeAfter:i.node(o),a=i.before(o);if(s.inlineContent)ja(n,ye.create(r,a+1,a+1+s.content.size),"pointer");else{if(!ne.isSelectable(s))continue;ja(n,ne.create(r,a),"pointer")}return!0}}(n,t,r)}function $y(n){return Bf(n)}Sn.keydown=function(n,e){if(n.shiftKey=16==e.keyCode||e.shiftKey,!Vx(n,e)&&(n.lastKeyCode=e.keyCode,n.lastKeyCodeTime=Date.now(),!T.android||!T.chrome||13!=e.keyCode))if(229!=e.keyCode&&n.domObserver.forceFlush(),!T.ios||13!=e.keyCode||e.ctrlKey||e.altKey||e.metaKey)n.someProp("handleKeyDown",function(r){return r(n,e)})||function vW(n,e){var t=e.keyCode,r=function mW(n){var e="";return n.ctrlKey&&(e+="c"),n.metaKey&&(e+="m"),n.altKey&&(e+="a"),n.shiftKey&&(e+="s"),e}(e);return 8==t||T.mac&&72==t&&"c"==r?Mx(n,-1)||Py(n):46==t||T.mac&&68==t&&"c"==r?Mx(n,1)||Fy(n):13==t||27==t||(37==t?Ex(n,-1,r)||Py(n):39==t?Ex(n,1,r)||Fy(n):38==t?Sx(n,-1,r)||Py(n):40==t?function gW(n){if(T.safari&&!(n.state.selection.$head.parentOffset>0)){var e=n.root.getSelection(),t=e.focusNode;if(t&&1==t.nodeType&&0==e.focusOffset&&t.firstChild&&"false"==t.firstChild.contentEditable){var i=t.firstChild;Ix(n,i,!0),setTimeout(function(){return Ix(n,i,!1)},20)}}}(n)||Sx(n,1,r)||Fy(n):r==(T.mac?"m":"c")&&(66==t||73==t||89==t||90==t))}(n,e)?e.preventDefault():fs(n,"key");else{var t=Date.now();n.lastIOSEnter=t,n.lastIOSEnterFallbackTimeout=setTimeout(function(){n.lastIOSEnter==t&&(n.someProp("handleKeyDown",function(r){return r(n,La(13,"Enter"))}),n.lastIOSEnter=0)},200)}},Sn.keyup=function(n,e){16==e.keyCode&&(n.shiftKey=!1)},Sn.keypress=function(n,e){if(!(Vx(n,e)||!e.charCode||e.ctrlKey&&!e.altKey||T.mac&&e.metaKey)){if(n.someProp("handleKeyPress",function(i){return i(n,e)}))return void e.preventDefault();var t=n.state.selection;if(!(t instanceof ye&&t.$from.sameParent(t.$to))){var r=String.fromCharCode(e.charCode);n.someProp("handleTextInput",function(i){return i(n,t.$from.pos,t.$to.pos,r)})||n.dispatch(n.state.tr.insertText(r).scrollIntoView()),e.preventDefault()}}};var jx=T.mac?"metaKey":"ctrlKey";kn.mousedown=function(n,e){n.shiftKey=e.shiftKey;var t=$y(n),r=Date.now(),i="singleClick";r-n.lastClick.time<500&&function PW(n,e){var t=e.x-n.clientX,r=e.y-n.clientY;return t*t+r*r<100}(e,n.lastClick)&&!e[jx]&&("singleClick"==n.lastClick.type?i="doubleClick":"doubleClick"==n.lastClick.type&&(i="tripleClick")),n.lastClick={time:r,x:e.clientX,y:e.clientY,type:i};var o=n.posAtCoords(Ff(e));!o||("singleClick"==i?(n.mouseDown&&n.mouseDown.done(),n.mouseDown=new Lf(n,o,e,t)):("doubleClick"==i?jW:VW)(n,o.pos,o.inside,e)?e.preventDefault():fs(n,"pointer"))};var Lf=function(e,t,r,i){var s,a,o=this;if(this.view=e,this.startDoc=e.state.doc,this.pos=t,this.event=r,this.flushed=i,this.selectNode=r[jx],this.allowDefault=r.shiftKey,this.delayedSelectionSync=!1,t.inside>-1)s=e.state.doc.nodeAt(t.inside),a=t.inside;else{var l=e.state.doc.resolve(t.pos);s=l.parent,a=l.depth?l.before():0}this.mightDrag=null;var c=i?null:r.target,u=c?e.docView.nearestDesc(c,!0):null;this.target=u?u.dom:null;var f=e.state.selection;(0==r.button&&s.type.spec.draggable&&!1!==s.type.spec.selectable||f instanceof ne&&f.from<=a&&f.to>a)&&(this.mightDrag={node:s,pos:a,addAttr:this.target&&!this.target.draggable,setUneditable:this.target&&T.gecko&&!this.target.hasAttribute("contentEditable")}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(function(){o.view.mouseDown==o&&o.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),fs(e,"pointer")};function Vx(n,e){return!!n.composing||!!(T.safari&&Math.abs(e.timeStamp-n.compositionEndedAt)<500)&&(n.compositionEndedAt=-2e8,!0)}Lf.prototype.done=function(){var e=this;this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(function(){return Mo(e.view)}),this.view.mouseDown=null},Lf.prototype.up=function(e){if(this.done(),this.view.dom.contains(3==e.target.nodeType?e.target.parentNode:e.target)){var t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(Ff(e))),this.allowDefault||!t?fs(this.view,"pointer"):function BW(n,e,t,r,i){return Wy(n,"handleClickOn",e,t,r)||n.someProp("handleClick",function(o){return o(n,e,r)})||(i?function LW(n,e){if(-1==e)return!1;var r,i,t=n.state.selection;t instanceof ne&&(r=t.node);for(var o=n.state.doc.resolve(e),s=o.depth+1;s>0;s--){var a=s>o.depth?o.nodeAfter:o.node(s);if(ne.isSelectable(a)){i=r&&t.$from.depth>0&&s>=t.$from.depth&&o.before(t.$from.depth+1)==t.$from.pos?o.before(t.$from.depth):o.before(s);break}}return null!=i&&(ja(n,ne.create(n.state.doc,i),"pointer"),!0)}(n,t):function FW(n,e){if(-1==e)return!1;var t=n.state.doc.resolve(e),r=t.nodeAfter;return!!(r&&r.isAtom&&ne.isSelectable(r))&&(ja(n,new ne(t),"pointer"),!0)}(n,t))}(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():0==e.button&&(this.flushed||T.safari&&this.mightDrag&&!this.mightDrag.node.isAtom||T.chrome&&!(this.view.state.selection instanceof ye)&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(ja(this.view,ue.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):fs(this.view,"pointer")}},Lf.prototype.move=function(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0),fs(this.view,"pointer"),0==e.buttons&&this.done()},kn.touchdown=function(n){$y(n),fs(n,"pointer")},kn.contextmenu=function(n){return $y(n)};var UW=T.android?5e3:-1;function Hx(n,e){clearTimeout(n.composingTimeout),e>-1&&(n.composingTimeout=setTimeout(function(){return Bf(n)},e))}function Ux(n){for(n.composing&&(n.composing=!1,n.compositionEndedAt=function zW(){var n=document.createEvent("Event");return n.initEvent("event",!0,!0),n.timeStamp}());n.compositionNodes.length>0;)n.compositionNodes.pop().markParentsDirty()}function Bf(n,e){if(!(T.android&&n.domObserver.flushingSoon>=0)){if(n.domObserver.forceFlush(),Ux(n),e||n.docView&&n.docView.dirty){var t=mx(n);return t&&!t.eq(n.state.selection)?n.dispatch(n.state.tr.setSelection(t)):n.updateState(n.state),!0}return!1}}Sn.compositionstart=Sn.compositionupdate=function(n){if(!n.composing){n.domObserver.flush();var e=n.state,t=e.selection.$from;if(e.selection.empty&&(e.storedMarks||!t.textOffset&&t.parentOffset&&t.nodeBefore.marks.some(function(a){return!1===a.type.spec.inclusive})))n.markCursor=n.state.storedMarks||t.marks(),Bf(n,!0),n.markCursor=null;else if(Bf(n),T.gecko&&e.selection.empty&&t.parentOffset&&!t.textOffset&&t.nodeBefore.marks.length)for(var r=n.root.getSelection(),i=r.focusNode,o=r.focusOffset;i&&1==i.nodeType&&0!=o;){var s=o<0?i.lastChild:i.childNodes[o-1];if(!s)break;if(3==s.nodeType){r.collapse(s,s.nodeValue.length);break}i=s,o=-1}n.composing=!0}Hx(n,UW)},Sn.compositionend=function(n,e){n.composing&&(n.composing=!1,n.compositionEndedAt=e.timeStamp,Hx(n,20))};var Va=T.ie&&T.ie_version<15||T.ios&&T.webkit_version<604;function Gy(n,e,t,r){var i=Ax(n,e,t,n.shiftKey,n.state.selection.$from);if(n.someProp("handlePaste",function(a){return a(n,r,i||F.empty)}))return!0;if(!i)return!1;var o=function $W(n){return 0==n.openStart&&0==n.openEnd&&1==n.content.childCount?n.content.firstChild:null}(i),s=o?n.state.tr.replaceSelectionWith(o,n.shiftKey):n.state.tr.replaceSelection(i);return n.dispatch(s.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}kn.copy=Sn.cut=function(n,e){var t=n.state.selection,r="cut"==e.type;if(!t.empty){var i=Va?null:e.clipboardData,s=xx(n,t.content()),a=s.dom,l=s.text;i?(e.preventDefault(),i.clearData(),i.setData("text/html",a.innerHTML),i.setData("text/plain",l)):function WW(n,e){if(n.dom.parentNode){var t=n.dom.parentNode.appendChild(document.createElement("div"));t.appendChild(e),t.style.cssText="position: fixed; left: -10000px; top: 10px";var r=getSelection(),i=document.createRange();i.selectNodeContents(e),n.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout(function(){t.parentNode&&t.parentNode.removeChild(t),n.focus()},50)}}(n,a),r&&n.dispatch(n.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))}},Sn.paste=function(n,e){if(!n.composing||T.android){var t=Va?null:e.clipboardData;t&&Gy(n,t.getData("text/plain"),t.getData("text/html"),e)?e.preventDefault():function GW(n,e){if(n.dom.parentNode){var t=n.shiftKey||n.state.selection.$from.parent.type.spec.code,r=n.dom.parentNode.appendChild(document.createElement(t?"textarea":"div"));t||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus(),setTimeout(function(){n.focus(),r.parentNode&&r.parentNode.removeChild(r),t?Gy(n,r.value,null,e):Gy(n,r.textContent,r.innerHTML,e)},50)}}(n,e)}};var qW=function(e,t){this.slice=e,this.move=t},zx=T.mac?"altKey":"ctrlKey";for(var Wx in kn.dragstart=function(n,e){var t=n.mouseDown;if(t&&t.done(),e.dataTransfer){var r=n.state.selection,i=r.empty?null:n.posAtCoords(Ff(e));if(!(i&&i.pos>=r.from&&i.pos<=(r instanceof ne?r.to-1:r.to)))if(t&&t.mightDrag)n.dispatch(n.state.tr.setSelection(ne.create(n.state.doc,t.mightDrag.pos)));else if(e.target&&1==e.target.nodeType){var o=n.docView.nearestDesc(e.target,!0);o&&o.node.type.spec.draggable&&o!=n.docView&&n.dispatch(n.state.tr.setSelection(ne.create(n.state.doc,o.posBefore)))}var s=n.state.selection.content(),a=xx(n,s),l=a.dom,c=a.text;e.dataTransfer.clearData(),e.dataTransfer.setData(Va?"Text":"text/html",l.innerHTML),e.dataTransfer.effectAllowed="copyMove",Va||e.dataTransfer.setData("text/plain",c),n.dragging=new qW(s,!e[zx])}},kn.dragend=function(n){var e=n.dragging;window.setTimeout(function(){n.dragging==e&&(n.dragging=null)},50)},Sn.dragover=Sn.dragenter=function(n,e){return e.preventDefault()},Sn.drop=function(n,e){var t=n.dragging;if(n.dragging=null,e.dataTransfer){var r=n.posAtCoords(Ff(e));if(r){var i=n.state.doc.resolve(r.pos);if(i){var o=t&&t.slice;o?n.someProp("transformPasted",function(p){o=p(o)}):o=Ax(n,e.dataTransfer.getData(Va?"Text":"text/plain"),Va?null:e.dataTransfer.getData("text/html"),!1,i);var s=t&&!e[zx];if(n.someProp("handleDrop",function(p){return p(n,e,o||F.empty,s)}))return void e.preventDefault();if(o){e.preventDefault();var a=o?yT(n.state.doc,i.pos,o):i.pos;null==a&&(a=i.pos);var l=n.state.tr;s&&l.deleteSelection();var c=l.mapping.map(a),u=0==o.openStart&&0==o.openEnd&&1==o.content.childCount,d=l.doc;if(u?l.replaceRangeWith(c,c,o.content.firstChild):l.replaceRange(c,c,o),!l.doc.eq(d)){var f=l.doc.resolve(c);if(u&&ne.isSelectable(o.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(o.content.firstChild))l.setSelection(new ne(f));else{var h=l.mapping.map(a);l.mapping.maps[l.mapping.maps.length-1].forEach(function(p,g,m,_){return h=_}),l.setSelection(ky(n,f,l.doc.resolve(h)))}n.focus(),n.dispatch(l.setMeta("uiEvent","drop"))}}}}}},kn.focus=function(n){n.focused||(n.domObserver.stop(),n.dom.classList.add("ProseMirror-focused"),n.domObserver.start(),n.focused=!0,setTimeout(function(){n.docView&&n.hasFocus()&&!n.domObserver.currentSelection.eq(n.root.getSelection())&&Mo(n)},20))},kn.blur=function(n,e){n.focused&&(n.domObserver.stop(),n.dom.classList.remove("ProseMirror-focused"),n.domObserver.start(),e.relatedTarget&&n.dom.contains(e.relatedTarget)&&n.domObserver.currentSelection.set({}),n.focused=!1)},kn.beforeinput=function(n,e){if(T.chrome&&T.android&&"deleteContentBackward"==e.inputType){n.domObserver.flushSoon();var t=n.domChangeCount;setTimeout(function(){if(n.domChangeCount==t&&(n.dom.blur(),n.focus(),!n.someProp("handleKeyDown",function(o){return o(n,La(8,"Backspace"))}))){var i=n.state.selection.$cursor;i&&i.pos>0&&n.dispatch(n.state.tr.delete(i.pos-1,i.pos).scrollIntoView())}},50)}},Sn)kn[Wx]=Sn[Wx];function Uc(n,e){if(n==e)return!0;for(var t in n)if(n[t]!==e[t])return!1;for(var r in e)if(!(r in n))return!1;return!0}var Ha=function(e,t){this.spec=t||hs,this.side=this.spec.side||0,this.toDOM=e};Ha.prototype.map=function(e,t,r,i){var o=e.mapResult(t.from+i,this.side<0?-1:1),s=o.pos;return o.deleted?null:new Ct(s-r,s-r,this)},Ha.prototype.valid=function(){return!0},Ha.prototype.eq=function(e){return this==e||e instanceof Ha&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Uc(this.spec,e.spec))},Ha.prototype.destroy=function(e){this.spec.destroy&&this.spec.destroy(e)};var jr=function(e,t){this.spec=t||hs,this.attrs=e};jr.prototype.map=function(e,t,r,i){var o=e.map(t.from+i,this.spec.inclusiveStart?-1:1)-r,s=e.map(t.to+i,this.spec.inclusiveEnd?1:-1)-r;return o>=s?null:new Ct(o,s,this)},jr.prototype.valid=function(e,t){return t.from=e&&(!o||o(a.spec))&&r.push(a.copy(a.from+i,a.to+i))}for(var l=0;le){var c=this.children[l]+1;this.children[l+2].findInner(e-c,t-c,r,i+c,o)}},Oe.prototype.map=function(e,t,r){return this==Kt||0==e.maps.length?this:this.mapInner(e,t,0,0,r||hs)},Oe.prototype.mapInner=function(e,t,r,i,o){for(var s,a=0;aZ+o)){var He=a[le]+o;oe>=He?a[le+1]=ee<=He?-2:-1:K>=i&&(et=xe-K-(oe-ee))&&(a[le]+=et,a[le+1]+=et)}}},c=0;c=r.content.size){u=!0;continue}var g=t.map(n[d+1]+o,-1)-i,m=r.content.findIndex(h),v=m.offset,b=r.maybeChild(m.index);if(b&&v==h&&v+b.nodeSize==g){var y=a[d+2].mapInner(t,b,f+1,n[d]+o+1,s);y!=Kt?(a[d]=h,a[d+1]=g,a[d+2]=y):(a[d+1]=-2,u=!0)}else u=!0}if(u){var D=function ZW(n,e,t,r,i,o,s){function a(c,u){for(var d=0;da&&u.to=e){this.children[o]==e&&(r=this.children[o+2]);break}for(var s=e+1,a=s+t.content.size,l=0;ls&&c.type instanceof jr){var u=Math.max(s,c.from)-s,d=Math.min(a,c.to)-s;ut&&s.to0;)e++;n.splice(e,0,t)}function Zy(n){var e=[];return n.someProp("decorations",function(t){var r=t(n.state);r&&r!=Kt&&e.push(r)}),n.cursorWrapper&&e.push(Oe.create(n.state.doc,[n.cursorWrapper.deco])),hr.from(e)}hr.prototype.map=function(e,t){var r=this.members.map(function(i){return i.map(e,t,hs)});return hr.from(r)},hr.prototype.forChild=function(e,t){if(t.isLeaf)return Oe.empty;for(var r=[],i=0;iDate.now()-50?n.lastSelectionOrigin:null,s=mx(n,o);if(s&&!n.state.selection.eq(s)){var a=n.state.tr.setSelection(s);"pointer"==o?a.setMeta("pointer",!0):"key"==o&&a.scrollIntoView(),n.dispatch(a)}}else{var l=n.state.doc.resolve(e),c=l.sharedDepth(t);e=l.before(c+1),t=n.state.doc.resolve(t).after(c+1);var u=n.state.selection,d=function yW(n,e,t){var r=n.docView.parseRange(e,t),i=r.node,o=r.fromOffset,s=r.toOffset,a=r.from,l=r.to,c=n.root.getSelection(),u=null,d=c.anchorNode;if(d&&n.dom.contains(1==d.nodeType?d:d.parentNode)&&(u=[{node:d,offset:c.anchorOffset}],Sy(c)||u.push({node:c.focusNode,offset:c.focusOffset})),T.chrome&&8===n.lastKeyCode)for(var f=s;f>o;f--){var h=i.childNodes[f-1],p=h.pmViewDesc;if("BR"==h.nodeName&&!p){s=f;break}if(!p||p.size)break}var g=n.state.doc,m=n.someProp("domParser")||Lr.fromSchema(n.state.schema),_=g.resolve(a),v=null,b=m.parse(i,{topNode:_.parent,topMatch:_.parent.contentMatchAt(_.index()),topOpen:!0,from:o,to:s,preserveWhitespace:"pre"!=_.parent.type.whitespace||"full",editableContent:!0,findPositions:u,ruleFromNode:_W,context:_});if(u&&null!=u[0].pos){var y=u[0].pos,D=u[1]&&u[1].pos;null==D&&(D=y),v={anchor:y+a,head:D+a}}return{doc:b,sel:v,from:a,to:l}}(n,e,t);if(T.chrome&&n.cursorWrapper&&d.sel&&d.sel.anchor==n.cursorWrapper.deco.from){var f=n.cursorWrapper.deco.type.toDOM.nextSibling,h=f&&f.nodeValue?f.nodeValue.length:1;d.sel={anchor:d.sel.anchor+h,head:d.sel.anchor+h}}var m,_,p=n.state.doc,g=p.slice(d.from,d.to);8===n.lastKeyCode&&Date.now()-100=a?o-r:0)+(l-a),a=o):l=l?o-r:0)+(a-l),l=o),{start:o,endA:a,endB:l}}(g.content,d.doc.content,d.from,m,_);if((T.ios&&n.lastIOSEnter>Date.now()-225||T.android)&&i.some(function(Z){return"DIV"==Z.nodeName||"P"==Z.nodeName})&&(!v||v.endA>=v.endB)&&n.someProp("handleKeyDown",function(Z){return Z(n,La(13,"Enter"))}))n.lastIOSEnter=0;else{if(!v){if(!(r&&u instanceof ye&&!u.empty&&u.$head.sameParent(u.$anchor))||n.composing||d.sel&&d.sel.anchor!=d.sel.head){if(d.sel){var b=Tx(n,n.state.doc,d.sel);b&&!b.eq(n.state.selection)&&n.dispatch(n.state.tr.setSelection(b))}return}v={start:u.from,endA:u.to,endB:u.to}}n.domChangeCount++,n.state.selection.fromn.state.selection.from&&v.start<=n.state.selection.from+2&&n.state.selection.from>=d.from?v.start=n.state.selection.from:v.endA=n.state.selection.to-2&&n.state.selection.to<=d.to&&(v.endB+=n.state.selection.to-v.endA,v.endA=n.state.selection.to)),T.ie&&T.ie_version<=11&&v.endB==v.start+1&&v.endA==v.start&&v.start>d.from&&" \xa0"==d.doc.textBetween(v.start-d.from-1,v.start-d.from+1)&&(v.start--,v.endA--,v.endB--);var x,y=d.doc.resolveNoCache(v.start-d.from),D=d.doc.resolveNoCache(v.endB-d.from),C=y.sameParent(D)&&y.parent.inlineContent;if((T.ios&&n.lastIOSEnter>Date.now()-225&&(!C||i.some(function(Z){return"DIV"==Z.nodeName||"P"==Z.nodeName}))||!C&&y.posv.start&&function CW(n,e,t,r,i){if(!r.parent.isTextblock||t-e<=i.pos-r.pos||By(r,!0,!1)t||By(s,!0,!1)i.scrollToSelection?"to selection":"preserve",d=o||!this.docView.matchesNode(e.doc,c,l);(d||!e.selection.eq(i.selection))&&(s=!0);var f="preserve"==u&&s&&null==this.dom.style.overflowAnchor&&function z8(n){for(var r,i,e=n.dom.getBoundingClientRect(),t=Math.max(0,e.top),o=(e.left+e.right)/2,s=t+1;s=t-20){r=a,i=l.top;break}}}return{refDOM:r,refTop:i,stack:JT(n.dom)}}(this);if(s){this.domObserver.stop();var h=d&&(T.ie||T.chrome)&&!this.composing&&!i.selection.empty&&!e.selection.empty&&function YW(n,e){var t=Math.min(n.$anchor.sharedDepth(n.head),e.$anchor.sharedDepth(e.head));return n.$anchor.start(t)!=e.$anchor.start(t)}(i.selection,e.selection);if(d){var p=T.chrome?this.trackWrites=this.root.getSelection().focusNode:null;(o||!this.docView.update(e.doc,c,l,this))&&(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=cx(e.doc,c,l,this.dom,this)),p&&!this.trackWrites&&(h=!0)}h||!(this.mouseDown&&this.domObserver.currentSelection.eq(this.root.getSelection())&&function pW(n){var e=n.docView.domFromPos(n.state.selection.anchor,0),t=n.root.getSelection();return Fc(e.node,e.offset,t.anchorNode,t.anchorOffset)}(this))?Mo(this,h):(Dx(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}if(this.updatePluginViews(i),"reset"==u)this.dom.scrollTop=0;else if("to selection"==u){var g=this.root.getSelection().focusNode;this.someProp("handleScrollToSelection",function(m){return m(r)})||function QT(n,e,t){for(var r=n.someProp("scrollThreshold")||0,i=n.someProp("scrollMargin")||5,o=n.dom.ownerDocument,s=t||n.dom;s;s=wy(s))if(1==s.nodeType){var a=s==o.body||1!=s.nodeType,l=a?H8(o):U8(s),c=0,u=0;if(e.topl.bottom-Eo(r,"bottom")&&(u=e.bottom-l.bottom+Eo(i,"bottom")),e.leftl.right-Eo(r,"right")&&(c=e.right-l.right+Eo(i,"right")),c||u)if(a)o.defaultView.scrollBy(c,u);else{var d=s.scrollLeft,f=s.scrollTop;u&&(s.scrollTop+=u),c&&(s.scrollLeft+=c);var h=s.scrollLeft-d,p=s.scrollTop-f;e={left:e.left-h,top:e.top-p,right:e.right-h,bottom:e.bottom-p}}if(a)break}}(this,e.selection instanceof ne?this.docView.domAfterPos(e.selection.from).getBoundingClientRect():this.coordsAtPos(e.selection.head,1),g)}else f&&function W8(n){var e=n.refDOM,t=n.refTop,r=n.stack,i=e?e.getBoundingClientRect().top:0;XT(r,0==i?0:i-t)}(f)},Tt.prototype.destroyPluginViews=function(){for(var e;e=this.pluginViews.pop();)e.destroy&&e.destroy()},Tt.prototype.updatePluginViews=function(e){if(e&&e.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(var s=0;sf.top+1&&("up"==t?l.top-f.top>2*(f.bottom-l.top):f.bottom-l.bottom>2*(l.bottom-f.top)))return!1}}return!0})}(n,e,t):function eW(n,e,t){var i=e.selection.$head;if(!i.parent.isTextblock)return!1;var o=i.parentOffset,s=!o,a=o==i.parent.content.size,l=n.root.getSelection();return X8.test(i.parent.textContent)&&l.modify?rx(n,e,function(){var c=l.getRangeAt(0),u=l.focusNode,d=l.focusOffset,f=l.caretBidiLevel;l.modify("move",t,"character");var p=!(i.depth?n.docView.domAfterPos(i.before()):n.dom).contains(1==l.focusNode.nodeType?l.focusNode:l.focusNode.parentNode)||u==l.focusNode&&d==l.focusOffset;return l.removeAllRanges(),l.addRange(c),null!=f&&(l.caretBidiLevel=f),p}):"left"==t||"backward"==t?s:a}(n,e,t))}(this,t||this.state,e)},Tt.prototype.destroy=function(){!this.docView||(function kW(n){for(var e in n.domObserver.stop(),n.eventHandlers)n.dom.removeEventListener(e,n.eventHandlers[e]);clearTimeout(n.composingTimeout),clearTimeout(n.lastIOSEnterFallbackTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Zy(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)},Hf.isDestroyed.get=function(){return null==this.docView},Tt.prototype.dispatchEvent=function(e){return function RW(n,e){!zy(n,e)&&kn[e.type]&&(n.editable||!(e.type in Sn))&&kn[e.type](n,e)}(this,e)},Tt.prototype.dispatch=function(e){var t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))},Object.defineProperties(Tt.prototype,Hf);for(var Io={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",229:"q"},Uf={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"',229:"Q"},eA="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent),JW="undefined"!=typeof navigator&&/Apple Computer/.test(navigator.vendor),XW="undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent),tA="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),e$="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),t$=eA&&(tA||+eA[1]<57)||XW&&tA,Zt=0;Zt<10;Zt++)Io[48+Zt]=Io[96+Zt]=String(Zt);for(Zt=1;Zt<=24;Zt++)Io[Zt+111]="F"+Zt;for(Zt=65;Zt<=90;Zt++)Io[Zt]=String.fromCharCode(Zt+32),Uf[Zt]=String.fromCharCode(Zt);for(var Yy in Io)Uf.hasOwnProperty(Yy)||(Uf[Yy]=Io[Yy]);var r$="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function i$(n){var e=n.split(/-(?!$)/),t=e[e.length-1];"Space"==t&&(t=" ");for(var r,i,o,s,a=0;a127)&&(s=Io[r.keyCode])&&s!=i){var l=e[Qy(s,r,!0)];if(l&&l(t.state,t.dispatch,t))return!0}else if(o&&r.shiftKey){var c=e[Qy(i,r,!0)];if(c&&c(t.state,t.dispatch,t))return!0}return!1}}function Jy(n){return"Object"===function a$(n){return Object.prototype.toString.call(n).slice(8,-1)}(n)&&n.constructor===Object&&Object.getPrototypeOf(n)===Object.prototype}function zf(n,e){const t=w({},n);return Jy(n)&&Jy(e)&&Object.keys(e).forEach(r=>{Jy(e[r])?r in n?t[r]=zf(n[r],e[r]):Object.assign(t,{[r]:e[r]}):Object.assign(t,{[r]:e[r]})}),t}function rA(n){return"function"==typeof n}function pe(n,e,...t){return rA(n)?e?n.bind(e)(...t):n(...t):n}function B(n,e,t){return void 0===n.config[e]&&n.parent?B(n.parent,e,t):"function"==typeof n.config[e]?n.config[e].bind(en(w({},t),{parent:n.parent?B(n.parent,e,t):null})):n.config[e]}class Et{constructor(e={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config=w(w({},this.config),e),this.name=this.config.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=pe(B(this,"addOptions",{name:this.name}))),this.storage=pe(B(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Et(e)}configure(e={}){const t=this.extend();return t.options=zf(this.options,e),t.storage=pe(B(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){const t=new Et(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=pe(B(t,"addOptions",{name:t.name})),t.storage=pe(B(t,"addStorage",{name:t.name,options:t.options})),t}}function iA(n,e,t){const{from:r,to:i}=e,{blockSeparator:o="\n\n",textSerializers:s={}}=t||{};let a="",l=!0;return n.nodesBetween(r,i,(c,u,d,f)=>{var h;const p=null==s?void 0:s[c.type.name];p?(c.isBlock&&!l&&(a+=o,l=!0),a+=p({node:c,pos:u,parent:d,index:f})):c.isText?(a+=null===(h=null==c?void 0:c.text)||void 0===h?void 0:h.slice(Math.max(r,u)-u,i-u),l=!1):c.isBlock&&!l&&(a+=o,l=!0)}),a}function Xy(n){return Object.fromEntries(Object.entries(n.nodes).filter(([,e])=>e.spec.toText).map(([e,t])=>[e,t.spec.toText]))}const l$=Et.create({name:"clipboardTextSerializer",addProseMirrorPlugins(){return[new Xe({key:new mt("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:n}=this,{state:e,schema:t}=n,{doc:r,selection:i}=e,{ranges:o}=i;return iA(r,{from:Math.min(...o.map(u=>u.$from.pos)),to:Math.max(...o.map(u=>u.$to.pos))},{textSerializers:Xy(t)})}}})]}});var c$=Object.freeze({__proto__:null,blur:()=>({editor:n,view:e})=>(requestAnimationFrame(()=>{var t;n.isDestroyed||(e.dom.blur(),null===(t=null==window?void 0:window.getSelection())||void 0===t||t.removeAllRanges())}),!0)}),u$=Object.freeze({__proto__:null,clearContent:(n=!1)=>({commands:e})=>e.setContent("",n)}),d$=Object.freeze({__proto__:null,clearNodes:()=>({state:n,tr:e,dispatch:t})=>{const{selection:r}=e,{ranges:i}=r;return t&&i.forEach(({$from:o,$to:s})=>{n.doc.nodesBetween(o.pos,s.pos,(a,l)=>{if(a.type.isText)return;const{doc:c,mapping:u}=e,d=c.resolve(u.map(l)),f=c.resolve(u.map(l+a.nodeSize)),h=d.blockRange(f);if(!h)return;const p=Ra(h);if(a.type.isTextblock){const{defaultType:g}=d.parent.contentMatchAt(d.index());e.setNodeMarkup(h.start,g)}(p||0===p)&&e.lift(h,p)})}),!0}}),f$=Object.freeze({__proto__:null,command:n=>e=>n(e)}),h$=Object.freeze({__proto__:null,createParagraphNear:()=>({state:n,dispatch:e})=>BT(n,e)});function Ht(n,e){if("string"==typeof n){if(!e.nodes[n])throw Error(`There is no node type named '${n}'. Maybe you forgot to add the extension?`);return e.nodes[n]}return n}var p$=Object.freeze({__proto__:null,deleteNode:n=>({tr:e,state:t,dispatch:r})=>{const i=Ht(n,t.schema),o=e.selection.$anchor;for(let s=o.depth;s>0;s-=1)if(o.node(s).type===i){if(r){const l=o.before(s),c=o.after(s);e.delete(l,c).scrollIntoView()}return!0}return!1}}),g$=Object.freeze({__proto__:null,deleteRange:n=>({tr:e,dispatch:t})=>{const{from:r,to:i}=n;return t&&e.delete(r,i),!0}}),m$=Object.freeze({__proto__:null,deleteSelection:()=>({state:n,dispatch:e})=>gy(n,e)}),v$=Object.freeze({__proto__:null,enter:()=>({commands:n})=>n.keyboardShortcut("Enter")}),y$=Object.freeze({__proto__:null,exitCode:()=>({state:n,dispatch:e})=>LT(n,e)});function To(n,e){if("string"==typeof n){if(!e.marks[n])throw Error(`There is no mark type named '${n}'. Maybe you forgot to add the extension?`);return e.marks[n]}return n}function e_(n){return"[object RegExp]"===Object.prototype.toString.call(n)}function Wf(n,e,t={strict:!0}){const r=Object.keys(e);return!r.length||r.every(i=>t.strict?e[i]===n[i]:e_(e[i])?e[i].test(n[i]):e[i]===n[i])}function t_(n,e,t={}){return n.find(r=>r.type===e&&Wf(r.attrs,t))}function _$(n,e,t={}){return!!t_(n,e,t)}function n_(n,e,t={}){if(!n||!e)return;const r=n.parent.childAfter(n.parentOffset);if(!r.node)return;const i=t_(r.node.marks,e,t);if(!i)return;let o=n.index(),s=n.start()+r.offset,a=o+1,l=s+r.node.nodeSize;for(t_(r.node.marks,e,t);o>0&&i.isInSet(n.parent.child(o-1).marks);)o-=1,s-=n.parent.child(o).nodeSize;for(;a({tr:t,state:r,dispatch:i})=>{const o=To(n,r.schema),{doc:s,selection:a}=t,{$from:l,from:c,to:u}=a;if(i){const d=n_(l,o,e);if(d&&d.from<=c&&d.to>=u){const f=ye.create(s,d.from,d.to);t.setSelection(f)}}return!0}}),D$=Object.freeze({__proto__:null,first:n=>e=>{const t="function"==typeof n?n(e):n;for(let r=0;r({editor:t,view:r,tr:i,dispatch:o})=>{e=w({scrollIntoView:!0},e);const s=()=>{$f()&&r.dom.focus(),requestAnimationFrame(()=>{t.isDestroyed||(r.focus(),(null==e?void 0:e.scrollIntoView)&&t.commands.scrollIntoView())})};if(r.hasFocus()&&null===n||!1===n)return!0;if(o&&null===n&&!r_(t.state.selection))return s(),!0;const a=sA(t.state.doc,n)||t.state.selection,l=t.state.selection.eq(a);return o&&(l||i.setSelection(a),l&&i.storedMarks&&i.setStoredMarks(i.storedMarks),s()),!0}}),w$=Object.freeze({__proto__:null,forEach:(n,e)=>t=>n.every((r,i)=>e(r,en(w({},t),{index:i})))}),S$=Object.freeze({__proto__:null,insertContent:(n,e)=>({tr:t,commands:r})=>r.insertContentAt({from:t.selection.from,to:t.selection.to},n,e)});function i_(n){const e=`${n}`;return(new window.DOMParser).parseFromString(e,"text/html").body}function Gf(n,e,t){if(t=w({slice:!0,parseOptions:{}},t),"object"==typeof n&&null!==n)try{return Array.isArray(n)?M.fromArray(n.map(r=>e.nodeFromJSON(r))):e.nodeFromJSON(n)}catch(r){return console.warn("[tiptap warn]: Invalid content.","Passed value:",n,"Error:",r),Gf("",e,t)}if("string"==typeof n){const r=Lr.fromSchema(e);return t.slice?r.parseSlice(i_(n),t.parseOptions).content:r.parse(i_(n),t.parseOptions)}return Gf("",e,t)}var T$=Object.freeze({__proto__:null,insertContentAt:(n,e,t)=>({tr:r,dispatch:i,editor:o})=>{if(i){t=w({parseOptions:{},updateSelection:!0},t);const s=Gf(e,o.schema,{parseOptions:w({preserveWhitespace:"full"},t.parseOptions)});if("<>"===s.toString())return!0;let{from:a,to:l}="number"==typeof n?{from:n,to:n}:n,c=!0,u=!0;if(((n=>n.toString().startsWith("<"))(s)?s:[s]).forEach(f=>{f.check(),c=!!c&&f.isText&&0===f.marks.length,u=!!u&&f.isBlock}),a===l&&u){const{parent:f}=r.doc.resolve(a);f.isTextblock&&!f.type.spec.code&&!f.childCount&&(a-=1,l+=1)}c?r.insertText(e,a,l):r.replaceWith(a,l,s),t.updateSelection&&function M$(n,e,t){const r=n.steps.length-1;if(r{0===s&&(s=u)}),n.setSelection(ue.near(n.doc.resolve(s),t))}(r,r.steps.length-1,-1)}return!0}}),x$=Object.freeze({__proto__:null,joinBackward:()=>({state:n,dispatch:e})=>AT(n,e)}),A$=Object.freeze({__proto__:null,joinForward:()=>({state:n,dispatch:e})=>NT(n,e)});function aA(){return"undefined"!=typeof navigator&&/Mac/.test(navigator.platform)}var k$=Object.freeze({__proto__:null,keyboardShortcut:n=>({editor:e,view:t,tr:r,dispatch:i})=>{const o=function O$(n){const e=n.split(/-(?!$)/);let r,i,o,s,t=e[e.length-1];"Space"===t&&(t=" ");for(let a=0;a!["Alt","Ctrl","Meta","Shift"].includes(c)),a=new KeyboardEvent("keydown",{key:"Space"===s?" ":s,altKey:o.includes("Alt"),ctrlKey:o.includes("Ctrl"),metaKey:o.includes("Meta"),shiftKey:o.includes("Shift"),bubbles:!0,cancelable:!0}),l=e.captureTransaction(()=>{t.someProp("handleKeyDown",c=>c(t,a))});return null==l||l.steps.forEach(c=>{const u=c.map(r.mapping);u&&i&&r.maybeStep(u)}),!0}});function Wc(n,e,t={}){const{from:r,to:i,empty:o}=n.selection,s=e?Ht(e,n.schema):null,a=[];n.doc.nodesBetween(r,i,(d,f)=>{if(d.isText)return;const h=Math.max(r,f),p=Math.min(i,f+d.nodeSize);a.push({node:d,from:h,to:p})});const l=i-r,c=a.filter(d=>!s||s.name===d.node.type.name).filter(d=>Wf(d.node.attrs,t,{strict:!1}));return o?!!c.length:c.reduce((d,f)=>d+f.to-f.from,0)>=l}var N$=Object.freeze({__proto__:null,lift:(n,e={})=>({state:t,dispatch:r})=>!!Wc(t,Ht(n,t.schema),e)&&function y8(n,e){var t=n.selection,o=t.$from.blockRange(t.$to),s=o&&Ra(o);return null!=s&&(e&&e(n.tr.lift(o,s).scrollIntoView()),!0)}(t,r)}),R$=Object.freeze({__proto__:null,liftEmptyBlock:()=>({state:n,dispatch:e})=>jT(n,e)}),P$=Object.freeze({__proto__:null,liftListItem:n=>({state:e,dispatch:t})=>function R8(n){return function(e,t){var r=e.selection,i=r.$from,s=i.blockRange(r.$to,function(a){return a.childCount&&a.firstChild.type==n});return!!s&&(!t||(i.node(s.depth-1).type==n?function P8(n,e,t,r){var i=n.tr,o=r.end,s=r.$to.end(r.depth);return oa;s--)o-=i.child(s).nodeSize,r.delete(o-1,o+1);var l=r.doc.resolve(t.start),c=l.nodeAfter;if(r.mapping.map(t.end)!=t.start+l.nodeAfter.nodeSize)return!1;var u=0==t.startIndex,d=t.endIndex==i.childCount,f=l.node(-1),h=l.index(-1);if(!f.canReplace(h+(u?0:1),h+1,c.content.append(d?M.empty:M.from(i))))return!1;var p=l.pos,g=p+c.nodeSize;return r.step(new On(p-(u?1:0),g+(d?1:0),p+1,g-1,new F((u?M.empty:M.from(i.copy(M.empty))).append(d?M.empty:M.from(i.copy(M.empty))),u?0:1,d?0:1),u?0:1)),e(r.scrollIntoView()),!0}(e,t,s)))}}(Ht(n,e.schema))(e,t)}),F$=Object.freeze({__proto__:null,newlineInCode:()=>({state:n,dispatch:e})=>FT(n,e)});function qf(n,e){return e.nodes[n]?"node":e.marks[n]?"mark":null}function lA(n,e){const t="string"==typeof e?[e]:e;return Object.keys(n).reduce((r,i)=>(t.includes(i)||(r[i]=n[i]),r),{})}var L$=Object.freeze({__proto__:null,resetAttributes:(n,e)=>({tr:t,state:r,dispatch:i})=>{let o=null,s=null;const a=qf("string"==typeof n?n:n.name,r.schema);return!!a&&("node"===a&&(o=Ht(n,r.schema)),"mark"===a&&(s=To(n,r.schema)),i&&t.selection.ranges.forEach(l=>{r.doc.nodesBetween(l.$from.pos,l.$to.pos,(c,u)=>{o&&o===c.type&&t.setNodeMarkup(u,void 0,lA(c.attrs,e)),s&&c.marks.length&&c.marks.forEach(d=>{s===d.type&&t.addMark(u,u+c.nodeSize,s.create(lA(d.attrs,e)))})})}),!0)}}),B$=Object.freeze({__proto__:null,scrollIntoView:()=>({tr:n,dispatch:e})=>(e&&n.scrollIntoView(),!0)}),j$=Object.freeze({__proto__:null,selectAll:()=>({tr:n,commands:e})=>e.setTextSelection({from:0,to:n.doc.content.size})}),V$=Object.freeze({__proto__:null,selectNodeBackward:()=>({state:n,dispatch:e})=>OT(n,e)}),H$=Object.freeze({__proto__:null,selectNodeForward:()=>({state:n,dispatch:e})=>RT(n,e)}),U$=Object.freeze({__proto__:null,selectParentNode:()=>({state:n,dispatch:e})=>function _8(n,e){var o,t=n.selection,r=t.$from,s=r.sharedDepth(t.to);return 0!=s&&(o=r.before(s),e&&e(n.tr.setSelection(ne.create(n.doc,o))),!0)}(n,e)}),z$=Object.freeze({__proto__:null,selectTextblockEnd:()=>({state:n,dispatch:e})=>WT(n,e)}),W$=Object.freeze({__proto__:null,selectTextblockStart:()=>({state:n,dispatch:e})=>zT(n,e)});function cA(n,e,t={}){return Gf(n,e,{slice:!1,parseOptions:t})}var $$=Object.freeze({__proto__:null,setContent:(n,e=!1,t={})=>({tr:r,editor:i,dispatch:o})=>{const{doc:s}=r,a=cA(n,i.schema,t),l=ye.create(s,0,s.content.size);return o&&r.setSelection(l).replaceSelectionWith(a,!1).setMeta("preventUpdate",!e),!0}});function uA(n,e){const t=To(e,n.schema),{from:r,to:i,empty:o}=n.selection,s=[];o?(n.storedMarks&&s.push(...n.storedMarks),s.push(...n.selection.$head.marks())):n.doc.nodesBetween(r,i,l=>{s.push(...l.marks)});const a=s.find(l=>l.type.name===t.name);return a?w({},a.attrs):{}}var G$=Object.freeze({__proto__:null,setMark:(n,e={})=>({tr:t,state:r,dispatch:i})=>{const{selection:o}=t,{empty:s,ranges:a}=o,l=To(n,r.schema);if(i)if(s){const c=uA(r,l);t.addStoredMark(l.create(w(w({},c),e)))}else a.forEach(c=>{const u=c.$from.pos,d=c.$to.pos;r.doc.nodesBetween(u,d,(f,h)=>{const p=Math.max(h,u),g=Math.min(h+f.nodeSize,d);f.marks.find(_=>_.type===l)?f.marks.forEach(_=>{l===_.type&&t.addMark(p,g,l.create(w(w({},_.attrs),e)))}):t.addMark(p,g,l.create(e))})});return!0}}),q$=Object.freeze({__proto__:null,setMeta:(n,e)=>({tr:t})=>(t.setMeta(n,e),!0)}),K$=Object.freeze({__proto__:null,setNode:(n,e={})=>({state:t,dispatch:r,chain:i})=>{const o=Ht(n,t.schema);return o.isTextblock?i().command(({commands:s})=>!!$T(o,e)(t)||s.clearNodes()).command(({state:s})=>$T(o,e)(s,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)}}),Z$=Object.freeze({__proto__:null,setNodeSelection:n=>({tr:e,dispatch:t})=>{if(t){const{doc:r}=e,i=ue.atStart(r).from,o=ue.atEnd(r).to,s=Wi(n,i,o),a=ne.create(r,s);e.setSelection(a)}return!0}}),Y$=Object.freeze({__proto__:null,setTextSelection:n=>({tr:e,dispatch:t})=>{if(t){const{doc:r}=e,{from:i,to:o}="number"==typeof n?{from:n,to:n}:n,s=ye.atStart(r).from,a=ye.atEnd(r).to,l=Wi(i,s,a),c=Wi(o,s,a),u=ye.create(r,l,c);e.setSelection(u)}return!0}}),Q$=Object.freeze({__proto__:null,sinkListItem:n=>({state:e,dispatch:t})=>function L8(n){return function(e,t){var r=e.selection,s=r.$from.blockRange(r.$to,function(g){return g.childCount&&g.firstChild.type==n});if(!s)return!1;var a=s.startIndex;if(0==a)return!1;var l=s.parent,c=l.child(a-1);if(c.type!=n)return!1;if(t){var u=c.lastChild&&c.lastChild.type==l.type,d=M.from(u?n.create():null),f=new F(M.from(n.create(null,M.from(l.type.create(null,d)))),u?3:1,0),h=s.start,p=s.end;t(e.tr.step(new On(h-(u?3:1),p,h,p,f,1,!0)).scrollIntoView())}return!0}}(Ht(n,e.schema))(e,t)});function Kf(n,e,t){return Object.fromEntries(Object.entries(t).filter(([r])=>{const i=n.find(o=>o.type===e&&o.name===r);return!!i&&i.attribute.keepOnSplit}))}function dA(n,e){const t=n.storedMarks||n.selection.$to.parentOffset&&n.selection.$from.marks();if(t){const r=t.filter(i=>null==e?void 0:e.includes(i.type.name));n.tr.ensureMarks(r)}}var X$=Object.freeze({__proto__:null,splitBlock:({keepMarks:n=!0}={})=>({tr:e,state:t,dispatch:r,editor:i})=>{const{selection:o,doc:s}=e,{$from:a,$to:l}=o,u=Kf(i.extensionManager.attributes,a.node().type.name,a.node().attrs);if(o instanceof ne&&o.node.isBlock)return!(!a.parentOffset||!Vi(s,a.pos)||(r&&(n&&dA(t,i.extensionManager.splittableMarks),e.split(a.pos).scrollIntoView()),0));if(!a.parent.isBlock)return!1;if(r){const d=l.parentOffset===l.parent.content.size;o instanceof ye&&e.deleteSelection();const f=0===a.depth?void 0:function J$(n){for(let e=0;e({tr:e,state:t,dispatch:r,editor:i})=>{var o;const s=Ht(n,t.schema),{$from:a,$to:l}=t.selection,c=t.selection.node;if(c&&c.isBlock||a.depth<2||!a.sameParent(l))return!1;const u=a.node(-1);if(u.type!==s)return!1;const d=i.extensionManager.attributes;if(0===a.parent.content.size&&a.node(-1).childCount===a.indexAfter(-1)){if(2===a.depth||a.node(-3).type!==s||a.index(-2)!==a.node(-2).childCount-1)return!1;if(r){let m=M.empty;const _=a.index(-1)?1:a.index(-2)?2:3;for(let x=a.depth-_;x>=a.depth-3;x-=1)m=M.from(a.node(x).copy(m));const v=a.indexAfter(-1){if(C>-1)return!1;x.isTextblock&&0===x.content.size&&(C=A+1)}),C>-1&&e.setSelection(ye.near(e.doc.resolve(C))),e.scrollIntoView()}return!0}const f=l.pos===a.end()?u.contentMatchAt(0).defaultType:null,h=Kf(d,u.type.name,u.attrs),p=Kf(d,a.node().type.name,a.node().attrs);e.delete(a.pos,l.pos);const g=f?[{type:s,attrs:h},{type:f,attrs:p}]:[{type:s,attrs:h}];return!!Vi(e.doc,a.pos,2)&&(r&&e.split(a.pos,2,g).scrollIntoView(),!0)}});function o_(n){return e=>function t5(n,e){for(let t=n.depth;t>0;t-=1){const r=n.node(t);if(e(r))return{pos:t>0?n.before(t):0,start:n.start(t),depth:t,node:r}}}(e.$from,n)}function Zf(n){return{baseExtensions:n.filter(i=>"extension"===i.type),nodeExtensions:n.filter(i=>"node"===i.type),markExtensions:n.filter(i=>"mark"===i.type)}}function fA(n,e){const{nodeExtensions:t}=Zf(e),r=t.find(s=>s.name===n);if(!r)return!1;const o=pe(B(r,"group",{name:r.name,options:r.options,storage:r.storage}));return"string"==typeof o&&o.split(" ").includes("list")}const hA=(n,e)=>{const t=o_(s=>s.type===e)(n.selection);if(!t)return!0;const r=n.doc.resolve(Math.max(0,t.pos-1)).before(t.depth);if(void 0===r)return!0;const i=n.doc.nodeAt(r);return t.node.type===(null==i?void 0:i.type)&&xc(n.doc,t.pos)&&n.join(t.pos),!0},pA=(n,e)=>{const t=o_(s=>s.type===e)(n.selection);if(!t)return!0;const r=n.doc.resolve(t.start).after(t.depth);if(void 0===r)return!0;const i=n.doc.nodeAt(r);return t.node.type===(null==i?void 0:i.type)&&xc(n.doc,r)&&n.join(r),!0};var n5=Object.freeze({__proto__:null,toggleList:(n,e)=>({editor:t,tr:r,state:i,dispatch:o,chain:s,commands:a,can:l})=>{const{extensions:c}=t.extensionManager,u=Ht(n,i.schema),d=Ht(e,i.schema),{selection:f}=i,{$from:h,$to:p}=f,g=h.blockRange(p);if(!g)return!1;const m=o_(_=>fA(_.type.name,c))(f);if(g.depth>=1&&m&&g.depth-m.depth<=1){if(m.node.type===u)return a.liftListItem(d);if(fA(m.node.type.name,c)&&u.validContent(m.node.content)&&o)return s().command(()=>(r.setNodeMarkup(m.pos,u),!0)).command(()=>hA(r,u)).command(()=>pA(r,u)).run()}return s().command(()=>!!l().wrapInList(u)||a.clearNodes()).wrapInList(u).command(()=>hA(r,u)).command(()=>pA(r,u)).run()}});function s_(n,e,t={}){const{empty:r,ranges:i}=n.selection,o=e?To(e,n.schema):null;if(r)return!!(n.storedMarks||n.selection.$from.marks()).filter(d=>!o||o.name===d.type.name).find(d=>Wf(d.attrs,t,{strict:!1}));let s=0;const a=[];if(i.forEach(({$from:d,$to:f})=>{const h=d.pos,p=f.pos;n.doc.nodesBetween(h,p,(g,m)=>{if(!g.isText&&!g.marks.length)return;const _=Math.max(h,m),v=Math.min(p,m+g.nodeSize);s+=v-_,a.push(...g.marks.map(y=>({mark:y,from:_,to:v})))})}),0===s)return!1;const l=a.filter(d=>!o||o.name===d.mark.type.name).filter(d=>Wf(d.mark.attrs,t,{strict:!1})).reduce((d,f)=>d+f.to-f.from,0),c=a.filter(d=>!o||d.mark.type!==o&&d.mark.type.excludes(o)).reduce((d,f)=>d+f.to-f.from,0);return(l>0?l+c:l)>=s}var r5=Object.freeze({__proto__:null,toggleMark:(n,e={},t={})=>({state:r,commands:i})=>{const{extendEmptyMarkRange:o=!1}=t,s=To(n,r.schema);return s_(r,s,e)?i.unsetMark(s,{extendEmptyMarkRange:o}):i.setMark(s,e)}}),o5=Object.freeze({__proto__:null,toggleNode:(n,e,t={})=>({state:r,commands:i})=>{const o=Ht(n,r.schema),s=Ht(e,r.schema);return Wc(r,o,t)?i.setNode(s):i.setNode(o,t)}}),s5=Object.freeze({__proto__:null,toggleWrap:(n,e={})=>({state:t,commands:r})=>{const i=Ht(n,t.schema);return Wc(t,i,e)?r.lift(i):r.wrapIn(i,e)}}),a5=Object.freeze({__proto__:null,undoInputRule:()=>({state:n,dispatch:e})=>{const t=n.plugins;for(let r=0;r=0;l-=1)s.step(a.steps[l].invert(a.docs[l]));if(o.text){const l=s.doc.resolve(o.from).marks();s.replaceWith(o.from,o.to,n.schema.text(o.text,l))}else s.delete(o.from,o.to)}return!0}}return!1}}),l5=Object.freeze({__proto__:null,unsetAllMarks:()=>({tr:n,dispatch:e})=>{const{selection:t}=n,{empty:r,ranges:i}=t;return r||e&&i.forEach(o=>{n.removeMark(o.$from.pos,o.$to.pos)}),!0}}),c5=Object.freeze({__proto__:null,unsetMark:(n,e={})=>({tr:t,state:r,dispatch:i})=>{var o;const{extendEmptyMarkRange:s=!1}=e,{selection:a}=t,l=To(n,r.schema),{$from:c,empty:u,ranges:d}=a;if(!i)return!0;if(u&&s){let{from:f,to:h}=a;const p=null===(o=c.marks().find(m=>m.type===l))||void 0===o?void 0:o.attrs,g=n_(c,l,p);g&&(f=g.from,h=g.to),t.removeMark(f,h,l)}else d.forEach(f=>{t.removeMark(f.$from.pos,f.$to.pos,l)});return t.removeStoredMark(l),!0}}),u5=Object.freeze({__proto__:null,updateAttributes:(n,e={})=>({tr:t,state:r,dispatch:i})=>{let o=null,s=null;const a=qf("string"==typeof n?n:n.name,r.schema);return!!a&&("node"===a&&(o=Ht(n,r.schema)),"mark"===a&&(s=To(n,r.schema)),i&&t.selection.ranges.forEach(l=>{const c=l.$from.pos,u=l.$to.pos;r.doc.nodesBetween(c,u,(d,f)=>{o&&o===d.type&&t.setNodeMarkup(f,void 0,w(w({},d.attrs),e)),s&&d.marks.length&&d.marks.forEach(h=>{if(s===h.type){const p=Math.max(f,c),g=Math.min(f+d.nodeSize,u);t.addMark(p,g,s.create(w(w({},h.attrs),e)))}})})}),!0)}}),d5=Object.freeze({__proto__:null,wrapIn:(n,e={})=>({state:t,dispatch:r})=>function C8(n,e){return function(t,r){var i=t.selection,a=i.$from.blockRange(i.$to),l=a&&sy(a,n,e);return!!l&&(r&&r(t.tr.wrap(a,l).scrollIntoView()),!0)}}(Ht(n,t.schema),e)(t,r)}),f5=Object.freeze({__proto__:null,wrapInList:(n,e={})=>({state:t,dispatch:r})=>function k8(n,e){return function(t,r){var i=t.selection,o=i.$from,s=i.$to,a=o.blockRange(s),l=!1,c=a;if(!a)return!1;if(a.depth>=2&&o.node(a.depth-1).type.compatibleContent(n)&&0==a.startIndex){if(0==o.index(a.depth-1))return!1;var u=t.doc.resolve(a.start-2);c=new Ic(u,u,a.depth),a.endIndex=0;s--)o=M.from(t[s].type.create(t[s].attrs,o));n.step(new On(e.start-(r?2:0),e.end,e.start,e.end,new F(o,0,0),t.length,!0));for(var a=0,l=0;lw(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w(w({},c$),u$),d$),f$),h$),p$),g$),m$),v$),y$),b$),D$),E$),w$),S$),T$),x$),A$),k$),N$),R$),P$),F$),L$),B$),j$),V$),H$),U$),z$),W$),$$),G$),q$),K$),Z$),Y$),Q$),X$),e5),n5),r5),o5),s5),a5),l5),c5),u5),d5),f5)}),p5=Et.create({name:"editable",addProseMirrorPlugins(){return[new Xe({key:new mt("editable"),props:{editable:()=>this.editor.options.editable}})]}}),g5=Et.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:n}=this;return[new Xe({key:new mt("focusEvents"),props:{handleDOMEvents:{focus:(e,t)=>{n.isFocused=!0;const r=n.state.tr.setMeta("focus",{event:t}).setMeta("addToHistory",!1);return e.dispatch(r),!1},blur:(e,t)=>{n.isFocused=!1;const r=n.state.tr.setMeta("blur",{event:t}).setMeta("addToHistory",!1);return e.dispatch(r),!1}}}})]}});function Yf(n){const{state:e,transaction:t}=n;let{selection:r}=t,{doc:i}=t,{storedMarks:o}=t;return en(w({},e),{schema:e.schema,plugins:e.plugins,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return o},get selection(){return r},get doc(){return i},get tr(){return r=t.selection,i=t.doc,o=t.storedMarks,t}})}class Qf{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:e,editor:t,state:r}=this,{view:i}=t,{tr:o}=r,s=this.buildProps(o);return Object.fromEntries(Object.entries(e).map(([a,l])=>[a,(...u)=>{const d=l(...u)(s);return!o.getMeta("preventDispatch")&&!this.hasCustomState&&i.dispatch(o),d}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){const{rawCommands:r,editor:i,state:o}=this,{view:s}=i,a=[],l=!!e,c=e||o.tr,d=en(w({},Object.fromEntries(Object.entries(r).map(([f,h])=>[f,(...g)=>{const m=this.buildProps(c,t),_=h(...g)(m);return a.push(_),d}]))),{run:()=>(!l&&t&&!c.getMeta("preventDispatch")&&!this.hasCustomState&&s.dispatch(c),a.every(f=>!0===f))});return d}createCan(e){const{rawCommands:t,state:r}=this,i=void 0,o=e||r.tr,s=this.buildProps(o,i),a=Object.fromEntries(Object.entries(t).map(([l,c])=>[l,(...u)=>c(...u)(en(w({},s),{dispatch:i}))]));return en(w({},a),{chain:()=>this.createChain(o,i)})}buildProps(e,t=!0){const{rawCommands:r,editor:i,state:o}=this,{view:s}=i;o.storedMarks&&e.setStoredMarks(o.storedMarks);const a={tr:e,editor:i,view:s,state:Yf({state:o,transaction:e}),dispatch:t?()=>{}:void 0,chain:()=>this.createChain(e),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(r).map(([l,c])=>[l,(...u)=>c(...u)(a)]))}};return a}}const m5=Et.create({name:"keymap",addKeyboardShortcuts(){const n=()=>this.editor.commands.first(({commands:s})=>[()=>s.undoInputRule(),()=>s.command(({tr:a})=>{const{selection:l,doc:c}=a,{empty:u,$anchor:d}=l,{pos:f,parent:h}=d,p=ue.atStart(c).from===f;return!(!(u&&p&&h.type.isTextblock)||h.textContent.length)&&s.clearNodes()}),()=>s.deleteSelection(),()=>s.joinBackward(),()=>s.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:s})=>[()=>s.deleteSelection(),()=>s.joinForward(),()=>s.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:s})=>[()=>s.newlineInCode(),()=>s.createParagraphNear(),()=>s.liftEmptyBlock(),()=>s.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:n,"Mod-Backspace":n,"Shift-Backspace":n,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},i=en(w({},r),{Home:()=>this.editor.commands.selectTextblockStart(),End:()=>this.editor.commands.selectTextblockEnd()}),o=en(w({},r),{"Ctrl-h":n,"Alt-Backspace":n,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()});return $f()||aA()?o:i},addProseMirrorPlugins(){return[new Xe({key:new mt("clearDocument"),appendTransaction:(n,e,t)=>{if(!n.some(p=>p.docChanged)||e.doc.eq(t.doc))return;const{empty:i,from:o,to:s}=e.selection,a=ue.atStart(e.doc).from,l=ue.atEnd(e.doc).to,c=o===a&&s===l,u=0===t.doc.textBetween(0,t.doc.content.size," "," ").length;if(i||!c||!u)return;const d=t.tr,f=Yf({state:t,transaction:d}),{commands:h}=new Qf({editor:this.editor,state:f});return h.clearNodes(),d.steps.length?d:void 0}})]}}),v5=Et.create({name:"tabindex",addProseMirrorPlugins(){return[new Xe({key:new mt("tabindex"),props:{attributes:()=>{if(this.editor.isEditable)return{tabindex:"0"}}}})]}});var y5=Object.freeze({__proto__:null,ClipboardTextSerializer:l$,Commands:h5,Editable:p5,FocusEvents:g5,Keymap:m5,Tabindex:v5});function gA(n,e){const t=qf("string"==typeof e?e:e.name,n.schema);return"node"===t?function _5(n,e){const t=Ht(e,n.schema),{from:r,to:i}=n.selection,o=[];n.doc.nodesBetween(r,i,a=>{o.push(a)});const s=o.reverse().find(a=>a.type.name===t.name);return s?w({},s.attrs):{}}(n,e):"mark"===t?uA(n,e):{}}class $c{constructor(e){this.find=e.find,this.handler=e.handler}}function a_(n){var e;const{editor:t,from:r,to:i,text:o,rules:s,plugin:a}=n,{view:l}=t;if(l.composing)return!1;const c=l.state.doc.resolve(r);if(c.parent.type.spec.code||(null===(e=c.nodeBefore||c.nodeAfter)||void 0===e?void 0:e.marks.find(h=>h.type.spec.code)))return!1;let u=!1;const f=c.parent.textBetween(Math.max(0,c.parentOffset-500),c.parentOffset,void 0," ")+o;return s.forEach(h=>{if(u)return;const p=((n,e)=>{if(e_(e))return e.exec(n);const t=e(n);if(!t)return null;const r=[];return r.push(t.text),r.index=t.index,r.input=n,r.data=t.data,t.replaceWith&&(t.text.includes(t.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(t.replaceWith)),r})(f,h.find);if(!p)return;const g=l.state.tr,m=Yf({state:l.state,transaction:g}),_={from:r-(p[0].length-o.length),to:i},{commands:v,chain:b,can:y}=new Qf({editor:t,state:m});null===h.handler({state:m,range:_,match:p,commands:v,chain:b,can:y})||!g.steps.length||(g.setMeta(a,{transform:g,from:r,to:i,text:o}),l.dispatch(g),u=!0)}),u}function w5(n){const{editor:e,rules:t}=n,r=new Xe({state:{init:()=>null,apply(i,o){return i.getMeta(this)||(i.selectionSet||i.docChanged?null:o)}},props:{handleTextInput:(i,o,s,a)=>a_({editor:e,from:o,to:s,text:a,rules:t,plugin:r}),handleDOMEvents:{compositionend:i=>(setTimeout(()=>{const{$cursor:o}=i.state.selection;o&&a_({editor:e,from:o.pos,to:o.pos,text:"",rules:t,plugin:r})}),!1)},handleKeyDown(i,o){if("Enter"!==o.key)return!1;const{$cursor:s}=i.state.selection;return!!s&&a_({editor:e,from:s.pos,to:s.pos,text:"\n",rules:t,plugin:r})}},isInputRules:!0});return r}class yA{constructor(e){this.find=e.find,this.handler=e.handler}}function T5(n){const{editor:e,rules:t}=n;let r=null,i=!1,o=!1;return t.map(a=>new Xe({view(l){const c=u=>{var d;r=(null===(d=l.dom.parentElement)||void 0===d?void 0:d.contains(u.target))?l.dom.parentElement:null};return window.addEventListener("dragstart",c),{destroy(){window.removeEventListener("dragstart",c)}}},props:{handleDOMEvents:{drop:l=>(o=r===l.dom.parentElement,!1),paste:(l,c)=>{var u;const d=null===(u=c.clipboardData)||void 0===u?void 0:u.getData("text/html");return i=!!(null==d?void 0:d.includes("data-pm-slice")),!1}}},appendTransaction:(l,c,u)=>{const d=l[0],f="paste"===d.getMeta("uiEvent")&&!i,h="drop"===d.getMeta("uiEvent")&&!o;if(!f&&!h)return;const p=c.doc.content.findDiffStart(u.doc.content),g=c.doc.content.findDiffEnd(u.doc.content);if(!function S5(n){return"number"==typeof n}(p)||!g||p===g.b)return;const m=u.tr,_=Yf({state:u,transaction:m});return function I5(n){const{editor:e,state:t,from:r,to:i,rule:o}=n,{commands:s,chain:a,can:l}=new Qf({editor:e,state:t}),c=[];return t.doc.nodesBetween(r,i,(d,f)=>{if(!d.isTextblock||d.type.spec.code)return;const h=Math.max(r,f),p=Math.min(i,f+d.content.size);((n,e)=>{if(e_(e))return[...n.matchAll(e)];const t=e(n);return t?t.map(r=>{const i=[];return i.push(r.text),i.index=r.index,i.input=n,i.data=r.data,r.replaceWith&&(r.text.includes(r.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),i.push(r.replaceWith)),i}):[]})(d.textBetween(h-f,p-f,void 0,"\ufffc"),o.find).forEach(_=>{if(void 0===_.index)return;const v=h+_.index+1,b=v+_[0].length,y={from:t.tr.mapping.map(v),to:t.tr.mapping.map(b)},D=o.handler({state:t,range:y,match:_,commands:s,chain:a,can:l});c.push(D)})}),c.every(d=>null!==d)}({editor:e,state:_,from:Math.max(p-1,0),to:g.b,rule:a})&&m.steps.length?m:void 0}}))}function _A(n){const e=[],{nodeExtensions:t,markExtensions:r}=Zf(n),i=[...t,...r],o={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0};return n.forEach(s=>{const l=B(s,"addGlobalAttributes",{name:s.name,options:s.options,storage:s.storage});l&&l().forEach(u=>{u.types.forEach(d=>{Object.entries(u.attributes).forEach(([f,h])=>{e.push({type:d,name:f,attribute:w(w({},o),h)})})})})}),i.forEach(s=>{const l=B(s,"addAttributes",{name:s.name,options:s.options,storage:s.storage});if(!l)return;const c=l();Object.entries(c).forEach(([u,d])=>{e.push({type:s.name,name:u,attribute:w(w({},o),d)})})}),e}function xt(...n){return n.filter(e=>!!e).reduce((e,t)=>{const r=w({},e);return Object.entries(t).forEach(([i,o])=>{r[i]=r[i]?"class"===i?[r[i],o].join(" "):"style"===i?[r[i],o].join("; "):o:o}),r},{})}function l_(n,e){return e.filter(t=>t.attribute.rendered).map(t=>t.attribute.renderHTML?t.attribute.renderHTML(n.attrs)||{}:{[t.name]:n.attrs[t.name]}).reduce((t,r)=>xt(t,r),{})}function bA(n,e){return n.style?n:en(w({},n),{getAttrs:t=>{const r=n.getAttrs?n.getAttrs(t):n.attrs;if(!1===r)return!1;const i=e.reduce((o,s)=>{const a=s.attribute.parseHTML?s.attribute.parseHTML(t):function A5(n){return"string"!=typeof n?n:n.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(n):"true"===n||"false"!==n&&n}(t.getAttribute(s.name));return null==a?o:en(w({},o),{[s.name]:a})},{});return w(w({},r),i)}})}function DA(n){return Object.fromEntries(Object.entries(n).filter(([e,t])=>("attrs"!==e||!function x5(n={}){return 0===Object.keys(n).length&&n.constructor===Object}(t))&&null!=t))}function c_(n,e){return e.nodes[n]||e.marks[n]||null}function EA(n,e){return Array.isArray(e)?e.some(t=>("string"==typeof t?t:t.name)===n.name):e}class gs{constructor(e,t){this.splittableMarks=[],this.editor=t,this.extensions=gs.resolve(e),this.schema=function CA(n){var e;const t=_A(n),{nodeExtensions:r,markExtensions:i}=Zf(n),o=null===(e=r.find(l=>B(l,"topNode")))||void 0===e?void 0:e.name,s=Object.fromEntries(r.map(l=>{const c=t.filter(m=>m.type===l.name),u={name:l.name,options:l.options,storage:l.storage},d=n.reduce((m,_)=>{const v=B(_,"extendNodeSchema",u);return w(w({},m),v?v(l):{})},{}),f=DA(en(w({},d),{content:pe(B(l,"content",u)),marks:pe(B(l,"marks",u)),group:pe(B(l,"group",u)),inline:pe(B(l,"inline",u)),atom:pe(B(l,"atom",u)),selectable:pe(B(l,"selectable",u)),draggable:pe(B(l,"draggable",u)),code:pe(B(l,"code",u)),defining:pe(B(l,"defining",u)),isolating:pe(B(l,"isolating",u)),attrs:Object.fromEntries(c.map(m=>{var _;return[m.name,{default:null===(_=null==m?void 0:m.attribute)||void 0===_?void 0:_.default}]}))})),h=pe(B(l,"parseHTML",u));h&&(f.parseDOM=h.map(m=>bA(m,c)));const p=B(l,"renderHTML",u);p&&(f.toDOM=m=>p({node:m,HTMLAttributes:l_(m,c)}));const g=B(l,"renderText",u);return g&&(f.toText=g),[l.name,f]})),a=Object.fromEntries(i.map(l=>{const c=t.filter(g=>g.type===l.name),u={name:l.name,options:l.options,storage:l.storage},d=n.reduce((g,m)=>{const _=B(m,"extendMarkSchema",u);return w(w({},g),_?_(l):{})},{}),f=DA(en(w({},d),{inclusive:pe(B(l,"inclusive",u)),excludes:pe(B(l,"excludes",u)),group:pe(B(l,"group",u)),spanning:pe(B(l,"spanning",u)),code:pe(B(l,"code",u)),attrs:Object.fromEntries(c.map(g=>{var m;return[g.name,{default:null===(m=null==g?void 0:g.attribute)||void 0===m?void 0:m.default}]}))})),h=pe(B(l,"parseHTML",u));h&&(f.parseDOM=h.map(g=>bA(g,c)));const p=B(l,"renderHTML",u);return p&&(f.toDOM=g=>p({mark:g,HTMLAttributes:l_(g,c)})),[l.name,f]}));return new cs({topNode:o,nodes:s,marks:a})}(this.extensions),this.extensions.forEach(r=>{var i;this.editor.extensionStorage[r.name]=r.storage;const o={name:r.name,options:r.options,storage:r.storage,editor:this.editor,type:c_(r.name,this.schema)};"mark"===r.type&&(null===(i=pe(B(r,"keepOnSplit",o)))||void 0===i||i)&&this.splittableMarks.push(r.name);const s=B(r,"onBeforeCreate",o);s&&this.editor.on("beforeCreate",s);const a=B(r,"onCreate",o);a&&this.editor.on("create",a);const l=B(r,"onUpdate",o);l&&this.editor.on("update",l);const c=B(r,"onSelectionUpdate",o);c&&this.editor.on("selectionUpdate",c);const u=B(r,"onTransaction",o);u&&this.editor.on("transaction",u);const d=B(r,"onFocus",o);d&&this.editor.on("focus",d);const f=B(r,"onBlur",o);f&&this.editor.on("blur",f);const h=B(r,"onDestroy",o);h&&this.editor.on("destroy",h)})}static resolve(e){const t=gs.sort(gs.flatten(e)),r=function O5(n){const e=n.filter((t,r)=>n.indexOf(t)!==r);return[...new Set(e)]}(t.map(i=>i.name));return r.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${r.map(i=>`'${i}'`).join(", ")}]. This can lead to issues.`),t}static flatten(e){return e.map(t=>{const i=B(t,"addExtensions",{name:t.name,options:t.options,storage:t.storage});return i?[t,...this.flatten(i())]:t}).flat(10)}static sort(e){return e.sort((r,i)=>{const o=B(r,"priority")||100,s=B(i,"priority")||100;return o>s?-1:o{const i=B(t,"addCommands",{name:t.name,options:t.options,storage:t.storage,editor:this.editor,type:c_(t.name,this.schema)});return i?w(w({},e),i()):e},{})}get plugins(){const{editor:e}=this,t=gs.sort([...this.extensions].reverse()),r=[],i=[],o=t.map(s=>{const a={name:s.name,options:s.options,storage:s.storage,editor:e,type:c_(s.name,this.schema)},l=[],c=B(s,"addKeyboardShortcuts",a);if(c){const p=function s$(n){return new Xe({props:{handleKeyDown:nA(n)}})}(Object.fromEntries(Object.entries(c()).map(([g,m])=>[g,()=>m({editor:e})])));l.push(p)}const u=B(s,"addInputRules",a);EA(s,e.options.enableInputRules)&&u&&r.push(...u());const d=B(s,"addPasteRules",a);EA(s,e.options.enablePasteRules)&&d&&i.push(...d());const f=B(s,"addProseMirrorPlugins",a);if(f){const h=f();l.push(...h)}return l}).flat();return[w5({editor:e,rules:r}),...T5({editor:e,rules:i}),...o]}get attributes(){return _A(this.extensions)}get nodeViews(){const{editor:e}=this,{nodeExtensions:t}=Zf(this.extensions);return Object.fromEntries(t.filter(r=>!!B(r,"addNodeView")).map(r=>{const i=this.attributes.filter(l=>l.type===r.name),o={name:r.name,options:r.options,storage:r.storage,editor:e,type:Ht(r.name,this.schema)},s=B(r,"addNodeView",o);return s?[r.name,(l,c,u,d)=>{const f=l_(l,i);return s()({editor:e,node:l,getPos:u,decorations:d,HTMLAttributes:f,extension:r})}]:[]}))}}class R5 extends class k5{constructor(){this.callbacks={}}on(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}emit(e,...t){const r=this.callbacks[e];return r&&r.forEach(i=>i.apply(this,t)),this}off(e,t){const r=this.callbacks[e];return r&&(t?this.callbacks[e]=r.filter(i=>i!==t):delete this.callbacks[e]),this}removeAllListeners(){this.callbacks={}}}{constructor(e={}){super(),this.isFocused=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}))},0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=function C5(n){const e=document.querySelector("style[data-tiptap-style]");if(null!==e)return e;const t=document.createElement("style");return t.setAttribute("data-tiptap-style",""),t.innerHTML=n,document.getElementsByTagName("head")[0].appendChild(t),t}('.ProseMirror {\n position: relative;\n}\n\n.ProseMirror {\n word-wrap: break-word;\n white-space: pre-wrap;\n white-space: break-spaces;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: "liga" 0; /* the above doesn\'t seem to work in Edge */\n}\n\n.ProseMirror [contenteditable="false"] {\n white-space: normal;\n}\n\n.ProseMirror [contenteditable="false"] [contenteditable="true"] {\n white-space: pre-wrap;\n}\n\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n\nimg.ProseMirror-separator {\n display: inline !important;\n border: none !important;\n margin: 0 !important;\n width: 1px !important;\n height: 1px !important;\n}\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n margin: 0;\n}\n\n.ProseMirror-gapcursor:after {\n content: "";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n\n.ProseMirror-hideselection *::selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection * {\n caret-color: transparent;\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n\n.tippy-box[data-animation=fade][data-state=hidden] {\n opacity: 0\n}'))}setOptions(e={}){this.options=w(w({},this.options),e),this.view&&this.state&&!this.isDestroyed&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e){this.setOptions({editable:e})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(e,t){const r=rA(t)?t(e,this.state.plugins):[...this.state.plugins,e],i=this.state.reconfigure({plugins:r});this.view.updateState(i)}unregisterPlugin(e){if(this.isDestroyed)return;const t="string"==typeof e?`${e}$`:e.key,r=this.state.reconfigure({plugins:this.state.plugins.filter(i=>!i.key.startsWith(t))});this.view.updateState(r)}createExtensionManager(){const t=[...this.options.enableCoreExtensions?Object.values(y5):[],...this.options.extensions].filter(r=>["extension","node","mark"].includes(null==r?void 0:r.type));this.extensionManager=new gs(t,this)}createCommandManager(){this.commandManager=new Qf({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){const e=cA(this.options.content,this.schema,this.options.parseOptions),t=sA(e,this.options.autofocus);this.view=new Tt(this.options.element,en(w({},this.options.editorProps),{dispatchTransaction:this.dispatchTransaction.bind(this),state:fn.create({doc:e,selection:t})}));const r=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(r),this.createNodeViews(),this.view.dom.editor=this}createNodeViews(){this.view.setProps({nodeViews:this.extensionManager.nodeViews})}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;const t=this.capturedTransaction;return this.capturedTransaction=null,t}dispatchTransaction(e){if(this.isCapturingTransaction)return this.capturedTransaction?void e.steps.forEach(s=>{var a;return null===(a=this.capturedTransaction)||void 0===a?void 0:a.step(s)}):void(this.capturedTransaction=e);const t=this.state.apply(e),r=!this.state.selection.eq(t.selection);this.view.updateState(t),this.emit("transaction",{editor:this,transaction:e}),r&&this.emit("selectionUpdate",{editor:this,transaction:e});const i=e.getMeta("focus"),o=e.getMeta("blur");i&&this.emit("focus",{editor:this,event:i.event,transaction:e}),o&&this.emit("blur",{editor:this,event:o.event,transaction:e}),e.docChanged&&!e.getMeta("preventUpdate")&&this.emit("update",{editor:this,transaction:e})}getAttributes(e){return gA(this.state,e)}isActive(e,t){return function b5(n,e,t={}){if(!e)return Wc(n,null,t)||s_(n,null,t);const r=qf(e,n.schema);return"node"===r?Wc(n,e,t):"mark"===r&&s_(n,e,t)}(this.state,"string"==typeof e?e:null,"string"==typeof e?t:e)}getJSON(){return this.state.doc.toJSON()}getHTML(){return function mA(n,e){const t=Gt.fromSchema(e).serializeFragment(n),i=document.implementation.createHTMLDocument().createElement("div");return i.appendChild(t),i.innerHTML}(this.state.doc.content,this.schema)}getText(e){const{blockSeparator:t="\n\n",textSerializers:r={}}=e||{};return function vA(n,e){return iA(n,{from:0,to:n.content.size},e)}(this.state.doc,{blockSeparator:t,textSerializers:w(w({},r),Xy(this.schema))})}get isEmpty(){return function D5(n){var e;const t=null===(e=n.type.createAndFill())||void 0===e?void 0:e.toJSON(),r=n.toJSON();return JSON.stringify(t)===JSON.stringify(r)}(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){this.emit("destroy"),this.view&&this.view.destroy(),this.removeAllListeners()}get isDestroyed(){var e;return!(null===(e=this.view)||void 0===e?void 0:e.docView)}}class hn{constructor(e={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config=w(w({},this.config),e),this.name=this.config.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=pe(B(this,"addOptions",{name:this.name}))),this.storage=pe(B(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new hn(e)}configure(e={}){const t=this.extend();return t.options=zf(this.options,e),t.storage=pe(B(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){const t=new hn(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=pe(B(t,"addOptions",{name:t.name})),t.storage=pe(B(t,"addStorage",{name:t.name,options:t.options})),t}}class di{constructor(e={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config=w(w({},this.config),e),this.name=this.config.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=pe(B(this,"addOptions",{name:this.name}))),this.storage=pe(B(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new di(e)}configure(e={}){const t=this.extend();return t.options=zf(this.options,e),t.storage=pe(B(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){const t=new di(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=pe(B(t,"addOptions",{name:t.name})),t.storage=pe(B(t,"addStorage",{name:t.name,options:t.options})),t}}function F5(n){return new $c({find:n.find,handler:({state:e,range:t,match:r})=>{const i=pe(n.getAttributes,void 0,r)||{},{tr:o}=e,s=t.from;let a=t.to;if(r[1]){let c=s+r[0].lastIndexOf(r[1]);c>a?c=a:a=c+r[1].length,o.insertText(r[0][r[0].length-1],s+r[0].length-1),o.replaceWith(c,a,n.type.create(i))}else r[0]&&o.replaceWith(s,a,n.type.create(i))}})}function Jf(n,e,t){const r=[];return n===e?t.resolve(n).marks().forEach(i=>{const s=n_(t.resolve(n-1),i.type);!s||r.push(w({mark:i},s))}):t.nodesBetween(n,e,(i,o)=>{r.push(...i.marks.map(s=>({from:o,to:o+i.nodeSize,mark:s})))}),r}function ms(n){return new $c({find:n.find,handler:({state:e,range:t,match:r})=>{const i=pe(n.getAttributes,void 0,r);if(!1===i||null===i)return null;const{tr:o}=e,s=r[r.length-1],a=r[0];let l=t.to;if(s){const c=a.search(/\S/),u=t.from+a.indexOf(s),d=u+s.length;if(Jf(t.from,t.to,e.doc).filter(h=>h.mark.type.excluded.find(g=>g===n.type&&g!==h.mark.type)).filter(h=>h.to>u).length)return null;dt.from&&o.delete(t.from+c,u),l=t.from+c+s.length,o.addMark(t.from+c,l,n.type.create(i||{})),o.removeStoredMark(n.type)}}})}function u_(n){return new $c({find:n.find,handler:({state:e,range:t,match:r})=>{const i=e.doc.resolve(t.from),o=pe(n.getAttributes,void 0,r)||{};if(!i.node(-1).canReplaceWith(i.index(-1),i.indexAfter(-1),n.type))return null;e.tr.delete(t.from,t.to).setBlockType(t.from,t.from,n.type,o)}})}function d_(n){return new $c({find:n.find,handler:({state:e,range:t,match:r})=>{const i=pe(n.getAttributes,void 0,r)||{},o=e.tr.delete(t.from,t.to),a=o.doc.resolve(t.from).blockRange(),l=a&&sy(a,n.type,i);if(!l)return null;o.wrap(a,l);const c=o.doc.resolve(t.from-1).nodeBefore;c&&c.type===n.type&&xc(o.doc,t.from-1)&&(!n.joinPredicate||n.joinPredicate(r,c))&&o.join(t.from-1)}})}function xo(n){return new yA({find:n.find,handler:({state:e,range:t,match:r})=>{const i=pe(n.getAttributes,void 0,r);if(!1===i||null===i)return null;const{tr:o}=e,s=r[r.length-1],a=r[0];let l=t.to;if(s){const c=a.search(/\S/),u=t.from+a.indexOf(s),d=u+s.length;if(Jf(t.from,t.to,e.doc).filter(h=>h.mark.type.excluded.find(g=>g===n.type&&g!==h.mark.type)).filter(h=>h.to>u).length)return null;dt.from&&o.delete(t.from+c,u),l=t.from+c+s.length,o.addMark(t.from+c,l,n.type.create(i||{})),o.removeStoredMark(n.type)}}})}function wA(n){return oA(n)&&n instanceof ne}function Ua(n,e,t){const i=n.state.doc.content.size,o=Wi(e,0,i),s=Wi(t,0,i),a=n.coordsAtPos(o),l=n.coordsAtPos(s,-1),c=Math.min(a.top,l.top),u=Math.max(a.bottom,l.bottom),d=Math.min(a.left,l.left),f=Math.max(a.right,l.right),_={top:c,bottom:u,left:d,right:f,width:f-d,height:u-c,x:d,y:c};return en(w({},_),{toJSON:()=>_})}const W5=/^\s*>\s$/,$5=hn.create({name:"blockquote",addOptions:()=>({HTMLAttributes:{}}),content:"block+",group:"block",defining:!0,parseHTML:()=>[{tag:"blockquote"}],renderHTML({HTMLAttributes:n}){return["blockquote",xt(this.options.HTMLAttributes,n),0]},addCommands(){return{setBlockquote:()=>({commands:n})=>n.wrapIn(this.name),toggleBlockquote:()=>({commands:n})=>n.toggleWrap(this.name),unsetBlockquote:()=>({commands:n})=>n.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[d_({find:W5,type:this.type})]}}),G5=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))$/,q5=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))/g,K5=/(?:^|\s)((?:__)((?:[^__]+))(?:__))$/,Z5=/(?:^|\s)((?:__)((?:[^__]+))(?:__))/g,Y5=di.create({name:"bold",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"strong"},{tag:"b",getAttrs:n=>"normal"!==n.style.fontWeight&&null},{style:"font-weight",getAttrs:n=>/^(bold(er)?|[5-9]\d{2,})$/.test(n)&&null}],renderHTML({HTMLAttributes:n}){return["strong",xt(this.options.HTMLAttributes,n),0]},addCommands(){return{setBold:()=>({commands:n})=>n.setMark(this.name),toggleBold:()=>({commands:n})=>n.toggleMark(this.name),unsetBold:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[ms({find:G5,type:this.type}),ms({find:K5,type:this.type})]},addPasteRules(){return[xo({find:q5,type:this.type}),xo({find:Z5,type:this.type})]}}),Q5=/^\s*([-+*])\s$/,J5=hn.create({name:"bulletList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{}}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML:()=>[{tag:"ul"}],renderHTML({HTMLAttributes:n}){return["ul",xt(this.options.HTMLAttributes,n),0]},addCommands(){return{toggleBulletList:()=>({commands:n})=>n.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){return[d_({find:Q5,type:this.type})]}}),X5=/(?:^|\s)((?:`)((?:[^`]+))(?:`))$/,eG=/(?:^|\s)((?:`)((?:[^`]+))(?:`))/g,tG=di.create({name:"code",addOptions:()=>({HTMLAttributes:{}}),excludes:"_",code:!0,parseHTML:()=>[{tag:"code"}],renderHTML({HTMLAttributes:n}){return["code",xt(this.options.HTMLAttributes,n),0]},addCommands(){return{setCode:()=>({commands:n})=>n.setMark(this.name),toggleCode:()=>({commands:n})=>n.toggleMark(this.name),unsetCode:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[ms({find:X5,type:this.type})]},addPasteRules(){return[xo({find:eG,type:this.type})]}}),nG=/^```([a-z]+)?[\s\n]$/,rG=/^~~~([a-z]+)?[\s\n]$/,iG=hn.create({name:"codeBlock",addOptions:()=>({languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,HTMLAttributes:{}}),content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:null,parseHTML:n=>{var e;const{languageClassPrefix:t}=this.options;return[...(null===(e=n.firstElementChild)||void 0===e?void 0:e.classList)||[]].filter(s=>s.startsWith(t)).map(s=>s.replace(t,""))[0]||null},rendered:!1}}},parseHTML:()=>[{tag:"pre",preserveWhitespace:"full"}],renderHTML({node:n,HTMLAttributes:e}){return["pre",xt(this.options.HTMLAttributes,e),["code",{class:n.attrs.language?this.options.languageClassPrefix+n.attrs.language:null},0]]},addCommands(){return{setCodeBlock:n=>({commands:e})=>e.setNode(this.name,n),toggleCodeBlock:n=>({commands:e})=>e.toggleNode(this.name,"paragraph",n)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:n,$anchor:e}=this.editor.state.selection;return!(!n||e.parent.type.name!==this.name)&&!(1!==e.pos&&e.parent.textContent.length)&&this.editor.commands.clearNodes()},Enter:({editor:n})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:e}=n,{selection:t}=e,{$from:r,empty:i}=t;if(!i||r.parent.type!==this.type)return!1;const o=r.parentOffset===r.parent.nodeSize-2,s=r.parent.textContent.endsWith("\n\n");return!(!o||!s)&&n.chain().command(({tr:a})=>(a.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:n})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=n,{selection:t,doc:r}=e,{$from:i,empty:o}=t;if(!o||i.parent.type!==this.type||i.parentOffset!==i.parent.nodeSize-2)return!1;const a=i.after();return void 0!==a&&!r.nodeAt(a)&&n.commands.exitCode()}}},addInputRules(){return[u_({find:nG,type:this.type,getAttributes:n=>({language:n[1]})}),u_({find:rG,type:this.type,getAttributes:n=>({language:n[1]})})]},addProseMirrorPlugins(){return[new Xe({key:new mt("codeBlockVSCodeHandler"),props:{handlePaste:(n,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;const t=e.clipboardData.getData("text/plain"),r=e.clipboardData.getData("vscode-editor-data"),i=r?JSON.parse(r):void 0,o=null==i?void 0:i.mode;if(!t||!o)return!1;const{tr:s}=n.state;return s.replaceSelectionWith(this.type.create({language:o})),s.setSelection(ye.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.insertText(t.replace(/\r\n?/g,"\n")),s.setMeta("paste",!0),n.dispatch(s),!0}}})]}}),oG=hn.create({name:"doc",topNode:!0,content:"block+"});function sG(n){return void 0===n&&(n={}),new Xe({view:function(t){return new fi(t,n)}})}var fi=function(e,t){var r=this;this.editorView=e,this.width=t.width||1,this.color=t.color||"black",this.class=t.class,this.cursorPos=null,this.element=null,this.timeout=null,this.handlers=["dragover","dragend","drop","dragleave"].map(function(i){var o=function(s){return r[i](s)};return e.dom.addEventListener(i,o),{name:i,handler:o}})};fi.prototype.destroy=function(){var e=this;this.handlers.forEach(function(t){return e.editorView.dom.removeEventListener(t.name,t.handler)})},fi.prototype.update=function(e,t){null!=this.cursorPos&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())},fi.prototype.setCursor=function(e){e!=this.cursorPos&&(this.cursorPos=e,null==e?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())},fi.prototype.updateOverlay=function(){var t,e=this.editorView.state.doc.resolve(this.cursorPos);if(!e.parent.inlineContent){var r=e.nodeBefore,i=e.nodeAfter;if(r||i){var o=this.editorView.nodeDOM(this.cursorPos-(r?r.nodeSize:0)).getBoundingClientRect(),s=r?o.bottom:o.top;r&&i&&(s=(s+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),t={left:o.left,right:o.right,top:s-this.width/2,bottom:s+this.width/2}}}if(!t){var a=this.editorView.coordsAtPos(this.cursorPos);t={left:a.left-this.width/2,right:a.left+this.width/2,top:a.top,bottom:a.bottom}}var c,u,l=this.editorView.dom.offsetParent;if(this.element||(this.element=l.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none; background-color: "+this.color),!l||l==document.body&&"static"==getComputedStyle(l).position)c=-pageXOffset,u=-pageYOffset;else{var d=l.getBoundingClientRect();c=d.left-l.scrollLeft,u=d.top-l.scrollTop}this.element.style.left=t.left-c+"px",this.element.style.top=t.top-u+"px",this.element.style.width=t.right-t.left+"px",this.element.style.height=t.bottom-t.top+"px"},fi.prototype.scheduleRemoval=function(e){var t=this;clearTimeout(this.timeout),this.timeout=setTimeout(function(){return t.setCursor(null)},e)},fi.prototype.dragover=function(e){if(this.editorView.editable){var t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),r=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),i=r&&r.type.spec.disableDropCursor,o="function"==typeof i?i(this.editorView,t):i;if(t&&!o){var s=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice&&null==(s=yT(this.editorView.state.doc,s,this.editorView.dragging.slice)))return this.setCursor(null);this.setCursor(s),this.scheduleRemoval(5e3)}}},fi.prototype.dragend=function(){this.scheduleRemoval(20)},fi.prototype.drop=function(){this.scheduleRemoval(20)},fi.prototype.dragleave=function(e){(e.target==this.editorView.dom||!this.editorView.dom.contains(e.relatedTarget))&&this.setCursor(null)};const aG=Et.create({name:"dropCursor",addOptions:()=>({color:"currentColor",width:1,class:null}),addProseMirrorPlugins(){return[sG(this.options)]}});var pr=function(n){function e(t){n.call(this,t,t)}return n&&(e.__proto__=n),(e.prototype=Object.create(n&&n.prototype)).constructor=e,e.prototype.map=function(r,i){var o=r.resolve(i.map(this.head));return e.valid(o)?new e(o):n.near(o)},e.prototype.content=function(){return F.empty},e.prototype.eq=function(r){return r instanceof e&&r.head==this.head},e.prototype.toJSON=function(){return{type:"gapcursor",pos:this.head}},e.fromJSON=function(r,i){if("number"!=typeof i.pos)throw new RangeError("Invalid input for GapCursor.fromJSON");return new e(r.resolve(i.pos))},e.prototype.getBookmark=function(){return new Xf(this.anchor)},e.valid=function(r){var i=r.parent;if(i.isTextblock||!function lG(n){for(var e=n.depth;e>=0;e--){var t=n.index(e),r=n.node(e);if(0!=t)for(var i=r.child(t-1);;i=i.lastChild){if(0==i.childCount&&!i.inlineContent||i.isAtom||i.type.spec.isolating)return!0;if(i.inlineContent)return!1}else if(r.type.spec.isolating)return!0}return!0}(r)||!function cG(n){for(var e=n.depth;e>=0;e--){var t=n.indexAfter(e),r=n.node(e);if(t!=r.childCount)for(var i=r.child(t);;i=i.firstChild){if(0==i.childCount&&!i.inlineContent||i.isAtom||i.type.spec.isolating)return!0;if(i.inlineContent)return!1}else if(r.type.spec.isolating)return!0}return!0}(r))return!1;var o=i.type.spec.allowGapCursor;if(null!=o)return o;var s=i.contentMatchAt(r.index()).defaultType;return s&&s.isTextblock},e.findFrom=function(r,i,o){e:for(;;){if(!o&&e.valid(r))return r;for(var s=r.pos,a=null,l=r.depth;;l--){var c=r.node(l);if(i>0?r.indexAfter(l)0){a=c.child(i>0?r.indexAfter(l):r.index(l)-1);break}if(0==l)return null;var u=r.doc.resolve(s+=i);if(e.valid(u))return u}for(;;){var d=i>0?a.firstChild:a.lastChild;if(!d){if(a.isAtom&&!a.isText&&!ne.isSelectable(a)){r=r.doc.resolve(s+a.nodeSize*i),o=!1;continue e}break}a=d;var f=r.doc.resolve(s+=i);if(e.valid(f))return f}return null}},e}(ue);pr.prototype.visible=!1,ue.jsonID("gapcursor",pr);var Xf=function(e){this.pos=e};Xf.prototype.map=function(e){return new Xf(e.map(this.pos))},Xf.prototype.resolve=function(e){var t=e.resolve(this.pos);return pr.valid(t)?new pr(t):ue.near(t)};var dG=nA({ArrowLeft:eh("horiz",-1),ArrowRight:eh("horiz",1),ArrowUp:eh("vert",-1),ArrowDown:eh("vert",1)});function eh(n,e){var t="vert"==n?e>0?"down":"up":e>0?"right":"left";return function(r,i,o){var s=r.selection,a=e>0?s.$to:s.$from,l=s.empty;if(s instanceof ye){if(!o.endOfTextblock(t)||0==a.depth)return!1;l=!1,a=r.doc.resolve(e>0?a.after():a.before())}var c=pr.findFrom(a,e,l);return!!c&&(i&&i(r.tr.setSelection(new pr(c))),!0)}}function fG(n,e,t){if(!n.editable)return!1;var r=n.state.doc.resolve(e);if(!pr.valid(r))return!1;var o=n.posAtCoords({left:t.clientX,top:t.clientY}).inside;return!(o>-1&&ne.isSelectable(n.state.doc.nodeAt(o))||(n.dispatch(n.state.tr.setSelection(new pr(r))),0))}function hG(n,e){if("insertCompositionText"!=e.inputType||!(n.state.selection instanceof pr))return!1;var r=n.state.selection.$from,i=r.parent.contentMatchAt(r.index()).findWrapping(n.state.schema.nodes.text);if(!i)return!1;for(var o=M.empty,s=i.length-1;s>=0;s--)o=M.from(i[s].createAndFill(null,o));var a=n.state.tr.replace(r.pos,r.pos,new F(o,0,0));return a.setSelection(ye.near(a.doc.resolve(r.pos+1))),n.dispatch(a),!1}function pG(n){if(!(n.selection instanceof pr))return null;var e=document.createElement("div");return e.className="ProseMirror-gapcursor",Oe.create(n.doc,[Ct.widget(n.selection.head,e,{key:"gapcursor"})])}const gG=Et.create({name:"gapCursor",addProseMirrorPlugins:()=>[new Xe({props:{decorations:pG,createSelectionBetween:function(e,t,r){if(t.pos==r.pos&&pr.valid(r))return new pr(r)},handleClick:fG,handleKeyDown:dG,handleDOMEvents:{beforeinput:hG}}})],extendNodeSchema(n){var e;return{allowGapCursor:null!==(e=pe(B(n,"allowGapCursor",{name:n.name,options:n.options,storage:n.storage})))&&void 0!==e?e:null}}}),mG=hn.create({name:"hardBreak",addOptions:()=>({keepMarks:!0,HTMLAttributes:{}}),inline:!0,group:"inline",selectable:!1,parseHTML:()=>[{tag:"br"}],renderHTML({HTMLAttributes:n}){return["br",xt(this.options.HTMLAttributes,n)]},renderText:()=>"\n",addCommands(){return{setHardBreak:()=>({commands:n,chain:e,state:t,editor:r})=>n.first([()=>n.exitCode(),()=>n.command(()=>{const{selection:i,storedMarks:o}=t;if(i.$from.parent.type.spec.isolating)return!1;const{keepMarks:s}=this.options,{splittableMarks:a}=r.extensionManager,l=o||i.$to.parentOffset&&i.$from.marks();return e().insertContent({type:this.name}).command(({tr:c,dispatch:u})=>{if(u&&l&&s){const d=l.filter(f=>a.includes(f.type.name));c.ensureMarks(d)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),vG=hn.create({name:"heading",addOptions:()=>({levels:[1,2,3,4,5,6],HTMLAttributes:{}}),content:"inline*",group:"block",defining:!0,addAttributes:()=>({level:{default:1,rendered:!1}}),parseHTML(){return this.options.levels.map(n=>({tag:`h${n}`,attrs:{level:n}}))},renderHTML({node:n,HTMLAttributes:e}){return[`h${this.options.levels.includes(n.attrs.level)?n.attrs.level:this.options.levels[0]}`,xt(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:n=>({commands:e})=>!!this.options.levels.includes(n.level)&&e.setNode(this.name,n),toggleHeading:n=>({commands:e})=>!!this.options.levels.includes(n.level)&&e.toggleNode(this.name,"paragraph",n)}},addKeyboardShortcuts(){return this.options.levels.reduce((n,e)=>en(w({},n),{[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(n=>u_({find:new RegExp(`^(#{1,${n}})\\s$`),type:this.type,getAttributes:{level:n}}))}});var Yt=function(){};Yt.prototype.append=function(e){return e.length?(e=Yt.from(e),!this.length&&e||e.length<200&&this.leafAppend(e)||this.length<200&&e.leafPrepend(this)||this.appendInner(e)):this},Yt.prototype.prepend=function(e){return e.length?Yt.from(e).append(this):this},Yt.prototype.appendInner=function(e){return new yG(this,e)},Yt.prototype.slice=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.length),e>=t?Yt.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},Yt.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},Yt.prototype.forEach=function(e,t,r){void 0===t&&(t=0),void 0===r&&(r=this.length),t<=r?this.forEachInner(e,t,r,0):this.forEachInvertedInner(e,t,r,0)},Yt.prototype.map=function(e,t,r){void 0===t&&(t=0),void 0===r&&(r=this.length);var i=[];return this.forEach(function(o,s){return i.push(e(o,s))},t,r),i},Yt.from=function(e){return e instanceof Yt?e:e&&e.length?new SA(e):Yt.empty};var SA=function(n){function e(r){n.call(this),this.values=r}n&&(e.__proto__=n),(e.prototype=Object.create(n&&n.prototype)).constructor=e;var t={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(i,o){return 0==i&&o==this.length?this:new e(this.values.slice(i,o))},e.prototype.getInner=function(i){return this.values[i]},e.prototype.forEachInner=function(i,o,s,a){for(var l=o;l=s;l--)if(!1===i(this.values[l],a+l))return!1},e.prototype.leafAppend=function(i){if(this.length+i.length<=200)return new e(this.values.concat(i.flatten()))},e.prototype.leafPrepend=function(i){if(this.length+i.length<=200)return new e(i.flatten().concat(this.values))},t.length.get=function(){return this.values.length},t.depth.get=function(){return 0},Object.defineProperties(e.prototype,t),e}(Yt);Yt.empty=new SA([]);var yG=function(n){function e(t,r){n.call(this),this.left=t,this.right=r,this.length=t.length+r.length,this.depth=Math.max(t.depth,r.depth)+1}return n&&(e.__proto__=n),(e.prototype=Object.create(n&&n.prototype)).constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return ra&&!1===this.right.forEachInner(r,Math.max(i-a,0),Math.min(this.length,o)-a,s+a))return!1},e.prototype.forEachInvertedInner=function(r,i,o,s){var a=this.left.length;if(i>a&&!1===this.right.forEachInvertedInner(r,i-a,Math.max(o,a)-a,s+a)||o=o?this.right.slice(r-o,i-o):this.left.slice(r,o).append(this.right.slice(0,i-o))},e.prototype.leafAppend=function(r){var i=this.right.leafAppend(r);if(i)return new e(this.left,i)},e.prototype.leafPrepend=function(r){var i=this.left.leafPrepend(r);if(i)return new e(i,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e}(Yt);const MA=Yt;var Qt=function(e,t){this.items=e,this.eventCount=t};Qt.prototype.popEvent=function(e,t){var s,a,r=this;if(0==this.eventCount)return null;for(var i=this.items.length;;i--)if(this.items.get(i-1).selection){--i;break}t&&(s=this.remapping(i,this.items.length),a=s.maps.length);var c,u,l=e.tr,d=[],f=[];return this.items.forEach(function(h,p){if(!h.step)return s||(s=r.remapping(i,p+1),a=s.maps.length),a--,void f.push(h);if(s){f.push(new hi(h.map));var m,g=h.step.map(s.slice(a));g&&l.maybeStep(g).doc&&d.push(new hi(m=l.mapping.maps[l.mapping.maps.length-1],null,null,d.length+f.length)),a--,m&&s.appendMap(m,a)}else l.maybeStep(h.step);return h.selection?(c=s?h.selection.map(s.slice(a)):h.selection,u=new Qt(r.items.slice(0,i).append(f.reverse().concat(d)),r.eventCount-1),!1):void 0},this.items.length,0),{remaining:u,transform:l,selection:c}},Qt.prototype.addTransform=function(e,t,r,i){for(var o=[],s=this.eventCount,a=this.items,l=!i&&a.length?a.get(a.length-1):null,c=0;cCG&&(a=function DG(n,e){var t;return n.forEach(function(r,i){if(r.selection&&0==e--)return t=i,!1}),n.slice(t)}(a,h),s-=h),new Qt(a.append(o),s)},Qt.prototype.remapping=function(e,t){var r=new un;return this.items.forEach(function(i,o){r.appendMap(i.map,null!=i.mirrorOffset&&o-i.mirrorOffset>=e?r.maps.length-i.mirrorOffset:null)},e,t),r},Qt.prototype.addMaps=function(e){return 0==this.eventCount?this:new Qt(this.items.append(e.map(function(t){return new hi(t)})),this.eventCount)},Qt.prototype.rebased=function(e,t){if(!this.eventCount)return this;var r=[],i=Math.max(0,this.items.length-t),o=e.mapping,s=e.steps.length,a=this.eventCount;this.items.forEach(function(h){h.selection&&a--},i);var l=t;this.items.forEach(function(h){var p=o.getMirror(--l);if(null!=p){s=Math.min(s,p);var g=o.maps[p];if(h.step){var m=e.steps[p].invert(e.docs[p]),_=h.selection&&h.selection.map(o.slice(l+1,p));_&&a++,r.push(new hi(g,m,_))}else r.push(new hi(g))}},i);for(var c=[],u=t;u500&&(f=f.compress(this.items.length-r.length)),f},Qt.prototype.emptyItemCount=function(){var e=0;return this.items.forEach(function(t){t.step||e++}),e},Qt.prototype.compress=function(e){void 0===e&&(e=this.items.length);var t=this.remapping(0,e),r=t.maps.length,i=[],o=0;return this.items.forEach(function(s,a){if(a>=e)i.push(s),s.selection&&o++;else if(s.step){var l=s.step.map(t.slice(r)),c=l&&l.getMap();if(r--,c&&t.appendMap(c,r),l){var u=s.selection&&s.selection.map(t.slice(r));u&&o++;var f,d=new hi(c.invert(),l,u),h=i.length-1;(f=i.length&&i[h].merge(d))?i[h]=f:i.push(d)}}else s.map&&r--},this.items.length,0),new Qt(MA.from(i.reverse()),o)},Qt.empty=new Qt(MA.empty,0);var hi=function(e,t,r,i){this.map=e,this.step=t,this.selection=r,this.mirrorOffset=i};hi.prototype.merge=function(e){if(this.step&&e.step&&!e.selection){var t=e.step.merge(this.step);if(t)return new hi(t.getMap().invert(),t,this.selection)}};var Ao=function(e,t,r,i){this.done=e,this.undone=t,this.prevRanges=r,this.prevTime=i},CG=20;function IA(n){var e=[];return n.forEach(function(t,r,i,o){return e.push(i,o)}),e}function h_(n,e){if(!n)return null;for(var t=[],r=0;r=e[o]&&(t=!0)}),t}(t,n.prevRanges)),l=s?h_(n.prevRanges,t.mapping):IA(t.mapping.maps[t.steps.length-1]);return new Ao(n.done.addTransform(t,a?e.selection.getBookmark():null,r,nh(e)),Qt.empty,l,t.time)}(r,i,t,n)}},config:n={depth:n&&n.depth||100,newGroupDelay:n&&n.newGroupDelay||500},props:{handleDOMEvents:{beforeinput:function(t,r){var i="historyUndo"==r.inputType?OA(t.state,t.dispatch):"historyRedo"==r.inputType&&kA(t.state,t.dispatch);return i&&r.preventDefault(),i}}}})}function OA(n,e){var t=pi.getState(n);return!(!t||0==t.done.eventCount||(e&&TA(t,n,e,!1),0))}function kA(n,e){var t=pi.getState(n);return!(!t||0==t.undone.eventCount||(e&&TA(t,n,e,!0),0))}const MG=Et.create({name:"history",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>({state:n,dispatch:e})=>OA(n,e),redo:()=>({state:n,dispatch:e})=>kA(n,e)}),addProseMirrorPlugins(){return[SG(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Mod-y":()=>this.editor.commands.redo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-\u044f":()=>this.editor.commands.undo(),"Shift-Mod-\u044f":()=>this.editor.commands.redo()}}}),IG=hn.create({name:"horizontalRule",addOptions:()=>({HTMLAttributes:{}}),group:"block",parseHTML:()=>[{tag:"hr"}],renderHTML({HTMLAttributes:n}){return["hr",xt(this.options.HTMLAttributes,n)]},addCommands(){return{setHorizontalRule:()=>({chain:n})=>n().insertContent({type:this.name}).command(({tr:e,dispatch:t})=>{var r;if(t){const{$to:i}=e.selection,o=i.end();if(i.nodeAfter)e.setSelection(ye.create(e.doc,i.pos));else{const s=null===(r=i.parent.type.contentMatch.defaultType)||void 0===r?void 0:r.create();s&&(e.insert(o,s),e.setSelection(ye.create(e.doc,o)))}e.scrollIntoView()}return!0}).run()}},addInputRules(){return[F5({find:/^(?:---|\u2014-|___\s|\*\*\*\s)$/,type:this.type})]}}),TG=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))$/,xG=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))/g,AG=/(?:^|\s)((?:_)((?:[^_]+))(?:_))$/,OG=/(?:^|\s)((?:_)((?:[^_]+))(?:_))/g,kG=di.create({name:"italic",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"em"},{tag:"i",getAttrs:n=>"normal"!==n.style.fontStyle&&null},{style:"font-style=italic"}],renderHTML({HTMLAttributes:n}){return["em",xt(this.options.HTMLAttributes,n),0]},addCommands(){return{setItalic:()=>({commands:n})=>n.setMark(this.name),toggleItalic:()=>({commands:n})=>n.toggleMark(this.name),unsetItalic:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[ms({find:TG,type:this.type}),ms({find:AG,type:this.type})]},addPasteRules(){return[xo({find:xG,type:this.type}),xo({find:OG,type:this.type})]}}),NG=hn.create({name:"listItem",addOptions:()=>({HTMLAttributes:{}}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:n}){return["li",xt(this.options.HTMLAttributes,n),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),RG=/^(\d+)\.\s$/,PG=hn.create({name:"orderedList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{}}),group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes:()=>({start:{default:1,parseHTML:n=>n.hasAttribute("start")?parseInt(n.getAttribute("start")||"",10):1}}),parseHTML:()=>[{tag:"ol"}],renderHTML({HTMLAttributes:n}){const r=n,{start:e}=r,t=S1(r,["start"]);return 1===e?["ol",xt(this.options.HTMLAttributes,t),0]:["ol",xt(this.options.HTMLAttributes,n),0]},addCommands(){return{toggleOrderedList:()=>({commands:n})=>n.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){return[d_({find:RG,type:this.type,getAttributes:n=>({start:+n[1]}),joinPredicate:(n,e)=>e.childCount+e.attrs.start===+n[1]})]}}),FG=hn.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:n}){return["p",xt(this.options.HTMLAttributes,n),0]},addCommands(){return{setParagraph:()=>({commands:n})=>n.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),LG=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))$/,BG=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))/g,jG=di.create({name:"strike",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:n=>!!n.includes("line-through")&&{}}],renderHTML({HTMLAttributes:n}){return["s",xt(this.options.HTMLAttributes,n),0]},addCommands(){return{setStrike:()=>({commands:n})=>n.setMark(this.name),toggleStrike:()=>({commands:n})=>n.toggleMark(this.name),unsetStrike:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-x":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[ms({find:LG,type:this.type})]},addPasteRules(){return[xo({find:BG,type:this.type})]}}),VG=hn.create({name:"text",group:"inline"}),HG=Et.create({name:"starterKit",addExtensions(){var n,e,t,r,i,o,s,a,l,c,u,d,f,h,p,g,m,_;const v=[];return!1!==this.options.blockquote&&v.push($5.configure(null===(n=this.options)||void 0===n?void 0:n.blockquote)),!1!==this.options.bold&&v.push(Y5.configure(null===(e=this.options)||void 0===e?void 0:e.bold)),!1!==this.options.bulletList&&v.push(J5.configure(null===(t=this.options)||void 0===t?void 0:t.bulletList)),!1!==this.options.code&&v.push(tG.configure(null===(r=this.options)||void 0===r?void 0:r.code)),!1!==this.options.codeBlock&&v.push(iG.configure(null===(i=this.options)||void 0===i?void 0:i.codeBlock)),!1!==this.options.document&&v.push(oG.configure(null===(o=this.options)||void 0===o?void 0:o.document)),!1!==this.options.dropcursor&&v.push(aG.configure(null===(s=this.options)||void 0===s?void 0:s.dropcursor)),!1!==this.options.gapcursor&&v.push(gG.configure(null===(a=this.options)||void 0===a?void 0:a.gapcursor)),!1!==this.options.hardBreak&&v.push(mG.configure(null===(l=this.options)||void 0===l?void 0:l.hardBreak)),!1!==this.options.heading&&v.push(vG.configure(null===(c=this.options)||void 0===c?void 0:c.heading)),!1!==this.options.history&&v.push(MG.configure(null===(u=this.options)||void 0===u?void 0:u.history)),!1!==this.options.horizontalRule&&v.push(IG.configure(null===(d=this.options)||void 0===d?void 0:d.horizontalRule)),!1!==this.options.italic&&v.push(kG.configure(null===(f=this.options)||void 0===f?void 0:f.italic)),!1!==this.options.listItem&&v.push(NG.configure(null===(h=this.options)||void 0===h?void 0:h.listItem)),!1!==this.options.orderedList&&v.push(PG.configure(null===(p=this.options)||void 0===p?void 0:p.orderedList)),!1!==this.options.paragraph&&v.push(FG.configure(null===(g=this.options)||void 0===g?void 0:g.paragraph)),!1!==this.options.strike&&v.push(jG.configure(null===(m=this.options)||void 0===m?void 0:m.strike)),!1!==this.options.text&&v.push(VG.configure(null===(_=this.options)||void 0===_?void 0:_.text)),v}}),UG=Et.create({name:"placeholder",addOptions:()=>({emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something \u2026",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}),addProseMirrorPlugins(){return[new Xe({props:{decorations:({doc:n,selection:e})=>{const t=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=e,i=[];if(t)return n.descendants((o,s)=>{const a=r>=s&&r<=s+o.nodeSize;if((a||!this.options.showOnlyCurrent)&&!o.isLeaf&&!o.childCount){const c=[this.options.emptyNodeClass];this.editor.isEmpty&&c.push(this.options.emptyEditorClass);const u=Ct.node(s,s+o.nodeSize,{class:c.join(" "),"data-placeholder":"function"==typeof this.options.placeholder?this.options.placeholder({editor:this.editor,node:o,pos:s,hasAnchor:a}):this.options.placeholder});i.push(u)}return this.options.includeChildren}),Oe.create(n,i)}}})]}});function Vr(n){if(null==n)return window;if("[object Window]"!==n.toString()){var e=n.ownerDocument;return e&&e.defaultView||window}return n}function za(n){return n instanceof Vr(n).Element||n instanceof Element}function gr(n){return n instanceof Vr(n).HTMLElement||n instanceof HTMLElement}function g_(n){return"undefined"!=typeof ShadowRoot&&(n instanceof Vr(n).ShadowRoot||n instanceof ShadowRoot)}var vs=Math.max,rh=Math.min,Wa=Math.round;function $a(n,e){void 0===e&&(e=!1);var t=n.getBoundingClientRect(),r=1,i=1;if(gr(n)&&e){var o=n.offsetHeight,s=n.offsetWidth;s>0&&(r=Wa(t.width)/s||1),o>0&&(i=Wa(t.height)/o||1)}return{width:t.width/r,height:t.height/i,top:t.top/i,right:t.right/r,bottom:t.bottom/i,left:t.left/r,x:t.left/r,y:t.top/i}}function m_(n){var e=Vr(n);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function gi(n){return n?(n.nodeName||"").toLowerCase():null}function Oo(n){return((za(n)?n.ownerDocument:n.document)||window.document).documentElement}function v_(n){return $a(Oo(n)).left+m_(n).scrollLeft}function $i(n){return Vr(n).getComputedStyle(n)}function y_(n){var e=$i(n);return/auto|scroll|overlay|hidden/.test(e.overflow+e.overflowY+e.overflowX)}function GG(n,e,t){void 0===t&&(t=!1);var r=gr(e),i=gr(e)&&function $G(n){var e=n.getBoundingClientRect(),t=Wa(e.width)/n.offsetWidth||1,r=Wa(e.height)/n.offsetHeight||1;return 1!==t||1!==r}(e),o=Oo(e),s=$a(n,i),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!t)&&(("body"!==gi(e)||y_(o))&&(a=function WG(n){return n!==Vr(n)&&gr(n)?function zG(n){return{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}}(n):m_(n)}(e)),gr(e)?((l=$a(e,!0)).x+=e.clientLeft,l.y+=e.clientTop):o&&(l.x=v_(o))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function __(n){var e=$a(n),t=n.offsetWidth,r=n.offsetHeight;return Math.abs(e.width-t)<=1&&(t=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:n.offsetLeft,y:n.offsetTop,width:t,height:r}}function ih(n){return"html"===gi(n)?n:n.assignedSlot||n.parentNode||(g_(n)?n.host:null)||Oo(n)}function NA(n){return["html","body","#document"].indexOf(gi(n))>=0?n.ownerDocument.body:gr(n)&&y_(n)?n:NA(ih(n))}function Gc(n,e){var t;void 0===e&&(e=[]);var r=NA(n),i=r===(null==(t=n.ownerDocument)?void 0:t.body),o=Vr(r),s=i?[o].concat(o.visualViewport||[],y_(r)?r:[]):r,a=e.concat(s);return i?a:a.concat(Gc(ih(s)))}function qG(n){return["table","td","th"].indexOf(gi(n))>=0}function RA(n){return gr(n)&&"fixed"!==$i(n).position?n.offsetParent:null}function qc(n){for(var e=Vr(n),t=RA(n);t&&qG(t)&&"static"===$i(t).position;)t=RA(t);return t&&("html"===gi(t)||"body"===gi(t)&&"static"===$i(t).position)?e:t||function KG(n){var e=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&gr(n)&&"fixed"===$i(n).position)return null;var i=ih(n);for(g_(i)&&(i=i.host);gr(i)&&["html","body"].indexOf(gi(i))<0;){var o=$i(i);if("none"!==o.transform||"none"!==o.perspective||"paint"===o.contain||-1!==["transform","perspective"].indexOf(o.willChange)||e&&"filter"===o.willChange||e&&o.filter&&"none"!==o.filter)return i;i=i.parentNode}return null}(n)||e}var Nn="top",mr="bottom",vr="right",Rn="left",b_="auto",Kc=[Nn,mr,vr,Rn],Ga="start",Zc="end",PA="viewport",Yc="popper",FA=Kc.reduce(function(n,e){return n.concat([e+"-"+Ga,e+"-"+Zc])},[]),LA=[].concat(Kc,[b_]).reduce(function(n,e){return n.concat([e,e+"-"+Ga,e+"-"+Zc])},[]),s6=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function a6(n){var e=new Map,t=new Set,r=[];function i(o){t.add(o.name),[].concat(o.requires||[],o.requiresIfExists||[]).forEach(function(a){if(!t.has(a)){var l=e.get(a);l&&i(l)}}),r.push(o)}return n.forEach(function(o){e.set(o.name,o)}),n.forEach(function(o){t.has(o.name)||i(o)}),r}function c6(n){var e;return function(){return e||(e=new Promise(function(t){Promise.resolve().then(function(){e=void 0,t(n())})})),e}}var BA={placement:"bottom",modifiers:[],strategy:"absolute"};function jA(){for(var n=arguments.length,e=new Array(n),t=0;t=0?"x":"y"}function VA(n){var l,e=n.reference,t=n.element,r=n.placement,i=r?mi(r):null,o=r?qa(r):null,s=e.x+e.width/2-t.width/2,a=e.y+e.height/2-t.height/2;switch(i){case Nn:l={x:s,y:e.y-t.height};break;case mr:l={x:s,y:e.y+e.height};break;case vr:l={x:e.x+e.width,y:a};break;case Rn:l={x:e.x-t.width,y:a};break;default:l={x:e.x,y:e.y}}var c=i?D_(i):null;if(null!=c){var u="y"===c?"height":"width";switch(o){case Ga:l[c]=l[c]-(e[u]/2-t[u]/2);break;case Zc:l[c]=l[c]+(e[u]/2-t[u]/2)}}return l}const g6={name:"popperOffsets",enabled:!0,phase:"read",fn:function p6(n){var e=n.state;e.modifiersData[n.name]=VA({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}};var m6={top:"auto",right:"auto",bottom:"auto",left:"auto"};function HA(n){var e,t=n.popper,r=n.popperRect,i=n.placement,o=n.variation,s=n.offsets,a=n.position,l=n.gpuAcceleration,c=n.adaptive,u=n.roundOffsets,d=n.isFixed,f=s.x,h=void 0===f?0:f,p=s.y,g=void 0===p?0:p,m="function"==typeof u?u({x:h,y:g}):{x:h,y:g};h=m.x,g=m.y;var _=s.hasOwnProperty("x"),v=s.hasOwnProperty("y"),b=Rn,y=Nn,D=window;if(c){var C=qc(t),x="clientHeight",A="clientWidth";C===Vr(t)&&"static"!==$i(C=Oo(t)).position&&"absolute"===a&&(x="scrollHeight",A="scrollWidth"),C=C,(i===Nn||(i===Rn||i===vr)&&o===Zc)&&(y=mr,g-=(d&&C===D&&D.visualViewport?D.visualViewport.height:C[x])-r.height,g*=l?1:-1),i!==Rn&&(i!==Nn&&i!==mr||o!==Zc)||(b=vr,h-=(d&&C===D&&D.visualViewport?D.visualViewport.width:C[A])-r.width,h*=l?1:-1)}var K,ee=Object.assign({position:a},c&&m6),oe=!0===u?function v6(n){var t=n.y,i=window.devicePixelRatio||1;return{x:Wa(n.x*i)/i||0,y:Wa(t*i)/i||0}}({x:h,y:g}):{x:h,y:g};return h=oe.x,g=oe.y,Object.assign({},ee,l?((K={})[y]=v?"0":"",K[b]=_?"0":"",K.transform=(D.devicePixelRatio||1)<=1?"translate("+h+"px, "+g+"px)":"translate3d("+h+"px, "+g+"px, 0)",K):((e={})[y]=v?g+"px":"",e[b]=_?h+"px":"",e.transform="",e))}const _6={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function y6(n){var e=n.state,t=n.options,r=t.gpuAcceleration,i=void 0===r||r,o=t.adaptive,s=void 0===o||o,a=t.roundOffsets,l=void 0===a||a,u={placement:mi(e.placement),variation:qa(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,HA(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,HA(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},UA={name:"applyStyles",enabled:!0,phase:"write",fn:function b6(n){var e=n.state;Object.keys(e.elements).forEach(function(t){var r=e.styles[t]||{},i=e.attributes[t]||{},o=e.elements[t];!gr(o)||!gi(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(s){var a=i[s];!1===a?o.removeAttribute(s):o.setAttribute(s,!0===a?"":a)}))})},effect:function D6(n){var e=n.state,t={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,t.popper),e.styles=t,e.elements.arrow&&Object.assign(e.elements.arrow.style,t.arrow),function(){Object.keys(e.elements).forEach(function(r){var i=e.elements[r],o=e.attributes[r]||{},a=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:t[r]).reduce(function(l,c){return l[c]="",l},{});!gr(i)||!gi(i)||(Object.assign(i.style,a),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}},requires:["computeStyles"]},w6={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function E6(n){var e=n.state,r=n.name,i=n.options.offset,o=void 0===i?[0,0]:i,s=LA.reduce(function(u,d){return u[d]=function C6(n,e,t){var r=mi(n),i=[Rn,Nn].indexOf(r)>=0?-1:1,o="function"==typeof t?t(Object.assign({},e,{placement:n})):t,s=o[0],a=o[1];return s=s||0,a=(a||0)*i,[Rn,vr].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}(d,e.rects,o),u},{}),a=s[e.placement],c=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=a.x,e.modifiersData.popperOffsets.y+=c),e.modifiersData[r]=s}};var S6={left:"right",right:"left",bottom:"top",top:"bottom"};function sh(n){return n.replace(/left|right|bottom|top/g,function(e){return S6[e]})}var M6={start:"end",end:"start"};function zA(n){return n.replace(/start|end/g,function(e){return M6[e]})}function WA(n,e){var t=e.getRootNode&&e.getRootNode();if(n.contains(e))return!0;if(t&&g_(t)){var r=e;do{if(r&&n.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function C_(n){return Object.assign({},n,{left:n.x,top:n.y,right:n.x+n.width,bottom:n.y+n.height})}function $A(n,e){return e===PA?C_(function I6(n){var e=Vr(n),t=Oo(n),r=e.visualViewport,i=t.clientWidth,o=t.clientHeight,s=0,a=0;return r&&(i=r.width,o=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(s=r.offsetLeft,a=r.offsetTop)),{width:i,height:o,x:s+v_(n),y:a}}(n)):za(e)?function x6(n){var e=$a(n);return e.top=e.top+n.clientTop,e.left=e.left+n.clientLeft,e.bottom=e.top+n.clientHeight,e.right=e.left+n.clientWidth,e.width=n.clientWidth,e.height=n.clientHeight,e.x=e.left,e.y=e.top,e}(e):C_(function T6(n){var e,t=Oo(n),r=m_(n),i=null==(e=n.ownerDocument)?void 0:e.body,o=vs(t.scrollWidth,t.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=vs(t.scrollHeight,t.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+v_(n),l=-r.scrollTop;return"rtl"===$i(i||t).direction&&(a+=vs(t.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}(Oo(n)))}function qA(n){return Object.assign({},{top:0,right:0,bottom:0,left:0},n)}function KA(n,e){return e.reduce(function(t,r){return t[r]=n,t},{})}function Qc(n,e){void 0===e&&(e={});var r=e.placement,i=void 0===r?n.placement:r,o=e.boundary,s=void 0===o?"clippingParents":o,a=e.rootBoundary,l=void 0===a?PA:a,c=e.elementContext,u=void 0===c?Yc:c,d=e.altBoundary,f=void 0!==d&&d,h=e.padding,p=void 0===h?0:h,g=qA("number"!=typeof p?p:KA(p,Kc)),_=n.rects.popper,v=n.elements[f?u===Yc?"reference":Yc:u],b=function O6(n,e,t){var r="clippingParents"===e?function A6(n){var e=Gc(ih(n)),r=["absolute","fixed"].indexOf($i(n).position)>=0&&gr(n)?qc(n):n;return za(r)?e.filter(function(i){return za(i)&&WA(i,r)&&"body"!==gi(i)}):[]}(n):[].concat(e),i=[].concat(r,[t]),s=i.reduce(function(a,l){var c=$A(n,l);return a.top=vs(c.top,a.top),a.right=rh(c.right,a.right),a.bottom=rh(c.bottom,a.bottom),a.left=vs(c.left,a.left),a},$A(n,i[0]));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}(za(v)?v:v.contextElement||Oo(n.elements.popper),s,l),y=$a(n.elements.reference),D=VA({reference:y,element:_,strategy:"absolute",placement:i}),C=C_(Object.assign({},_,D)),x=u===Yc?C:y,A={top:b.top-x.top+g.top,bottom:x.bottom-b.bottom+g.bottom,left:b.left-x.left+g.left,right:x.right-b.right+g.right},V=n.modifiersData.offset;if(u===Yc&&V){var q=V[i];Object.keys(A).forEach(function(ee){var oe=[vr,mr].indexOf(ee)>=0?1:-1,K=[Nn,mr].indexOf(ee)>=0?"y":"x";A[ee]+=q[K]*oe})}return A}const P6={name:"flip",enabled:!0,phase:"main",fn:function R6(n){var e=n.state,t=n.options,r=n.name;if(!e.modifiersData[r]._skip){for(var i=t.mainAxis,o=void 0===i||i,s=t.altAxis,a=void 0===s||s,l=t.fallbackPlacements,c=t.padding,u=t.boundary,d=t.rootBoundary,f=t.altBoundary,h=t.flipVariations,p=void 0===h||h,g=t.allowedAutoPlacements,m=e.options.placement,_=mi(m),b=l||(_!==m&&p?function N6(n){if(mi(n)===b_)return[];var e=sh(n);return[zA(n),e,zA(e)]}(m):[sh(m)]),y=[m].concat(b).reduce(function(Yi,Wr){return Yi.concat(mi(Wr)===b_?function k6(n,e){void 0===e&&(e={});var i=e.boundary,o=e.rootBoundary,s=e.padding,a=e.flipVariations,l=e.allowedAutoPlacements,c=void 0===l?LA:l,u=qa(e.placement),d=u?a?FA:FA.filter(function(p){return qa(p)===u}):Kc,f=d.filter(function(p){return c.indexOf(p)>=0});0===f.length&&(f=d);var h=f.reduce(function(p,g){return p[g]=Qc(n,{placement:g,boundary:i,rootBoundary:o,padding:s})[mi(g)],p},{});return Object.keys(h).sort(function(p,g){return h[p]-h[g]})}(e,{placement:Wr,boundary:u,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:g}):Wr)},[]),D=e.rects.reference,C=e.rects.popper,x=new Map,A=!0,V=y[0],q=0;q=0,le=xe?"width":"height",Z=Qc(e,{placement:ee,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),et=xe?K?vr:Rn:K?mr:Nn;D[le]>C[le]&&(et=sh(et));var He=sh(et),Fe=[];if(o&&Fe.push(Z[oe]<=0),a&&Fe.push(Z[et]<=0,Z[He]<=0),Fe.every(function(Yi){return Yi})){V=ee,A=!1;break}x.set(ee,Fe)}if(A)for(var Jn=function(Wr){var Qi=y.find(function(ul){var Ji=x.get(ul);if(Ji)return Ji.slice(0,Wr).every(function(dl){return dl})});if(Qi)return V=Qi,"break"},wi=p?3:1;wi>0&&"break"!==Jn(wi);wi--);e.placement!==V&&(e.modifiersData[r]._skip=!0,e.placement=V,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Jc(n,e,t){return vs(n,rh(e,t))}const j6={name:"preventOverflow",enabled:!0,phase:"main",fn:function B6(n){var e=n.state,t=n.options,r=n.name,i=t.mainAxis,o=void 0===i||i,s=t.altAxis,a=void 0!==s&&s,f=t.tether,h=void 0===f||f,p=t.tetherOffset,g=void 0===p?0:p,m=Qc(e,{boundary:t.boundary,rootBoundary:t.rootBoundary,padding:t.padding,altBoundary:t.altBoundary}),_=mi(e.placement),v=qa(e.placement),b=!v,y=D_(_),D=function F6(n){return"x"===n?"y":"x"}(y),C=e.modifiersData.popperOffsets,x=e.rects.reference,A=e.rects.popper,V="function"==typeof g?g(Object.assign({},e.rects,{placement:e.placement})):g,q="number"==typeof V?{mainAxis:V,altAxis:V}:Object.assign({mainAxis:0,altAxis:0},V),ee=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,oe={x:0,y:0};if(C){if(o){var K,xe="y"===y?Nn:Rn,le="y"===y?mr:vr,Z="y"===y?"height":"width",et=C[y],He=et+m[xe],Fe=et-m[le],Ue=h?-A[Z]/2:0,Jn=v===Ga?x[Z]:A[Z],wi=v===Ga?-A[Z]:-x[Z],Ts=e.elements.arrow,Yi=h&&Ts?__(Ts):{width:0,height:0},Wr=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Qi=Wr[xe],ul=Wr[le],Ji=Jc(0,x[Z],Yi[Z]),dl=b?x[Z]/2-Ue-Ji-Qi-q.mainAxis:Jn-Ji-Qi-q.mainAxis,Vo=b?-x[Z]/2+Ue+Ji+ul+q.mainAxis:wi+Ji+ul+q.mainAxis,fl=e.elements.arrow&&qc(e.elements.arrow),Cu=null!=(K=null==ee?void 0:ee[y])?K:0,rp=et+Vo-Cu,Eu=Jc(h?rh(He,et+dl-Cu-(fl?"y"===y?fl.clientTop||0:fl.clientLeft||0:0)):He,et,h?vs(Fe,rp):Fe);C[y]=Eu,oe[y]=Eu-et}if(a){var wu,Xi=C[D],Ho="y"===D?"height":"width",Su=Xi+m["x"===y?Nn:Rn],xs=Xi-m["x"===y?mr:vr],Mu=-1!==[Nn,Rn].indexOf(_),sp=null!=(wu=null==ee?void 0:ee[D])?wu:0,ap=Mu?Su:Xi-x[Ho]-A[Ho]-sp+q.altAxis,lp=Mu?Xi+x[Ho]+A[Ho]-sp-q.altAxis:xs,cp=h&&Mu?function L6(n,e,t){var r=Jc(n,e,t);return r>t?t:r}(ap,Xi,lp):Jc(h?ap:Su,Xi,h?lp:xs);C[D]=cp,oe[D]=cp-Xi}e.modifiersData[r]=oe}},requiresIfExists:["offset"]},z6={name:"arrow",enabled:!0,phase:"main",fn:function H6(n){var e,t=n.state,r=n.name,i=n.options,o=t.elements.arrow,s=t.modifiersData.popperOffsets,a=mi(t.placement),l=D_(a),u=[Rn,vr].indexOf(a)>=0?"height":"width";if(o&&s){var d=function(e,t){return qA("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:KA(e,Kc))}(i.padding,t),f=__(o),h="y"===l?Nn:Rn,p="y"===l?mr:vr,g=t.rects.reference[u]+t.rects.reference[l]-s[l]-t.rects.popper[u],m=s[l]-t.rects.reference[l],_=qc(o),v=_?"y"===l?_.clientHeight||0:_.clientWidth||0:0,C=v/2-f[u]/2+(g/2-m/2),x=Jc(d[h],C,v-f[u]-d[p]);t.modifiersData[r]=((e={})[l]=x,e.centerOffset=x-C,e)}},effect:function U6(n){var e=n.state,r=n.options.element,i=void 0===r?"[data-popper-arrow]":r;null!=i&&("string"==typeof i&&!(i=e.elements.popper.querySelector(i))||!WA(e.elements.popper,i)||(e.elements.arrow=i))},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ZA(n,e,t){return void 0===t&&(t={x:0,y:0}),{top:n.top-e.height-t.y,right:n.right-e.width+t.x,bottom:n.bottom-e.height+t.y,left:n.left-e.width-t.x}}function YA(n){return[Nn,vr,mr,Rn].some(function(e){return n[e]>=0})}var $6=[h6,g6,_6,UA,w6,P6,j6,z6,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function W6(n){var e=n.state,t=n.name,r=e.rects.reference,i=e.rects.popper,o=e.modifiersData.preventOverflow,s=Qc(e,{elementContext:"reference"}),a=Qc(e,{altBoundary:!0}),l=ZA(s,r),c=ZA(a,i,o),u=YA(l),d=YA(c);e.modifiersData[t]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}}],G6=d6({defaultModifiers:$6}),QA="tippy-content",XA="tippy-arrow",eO="tippy-svg-arrow",ko={passive:!0,capture:!0},tO=function(){return document.body};function E_(n,e,t){if(Array.isArray(n)){var r=n[e];return null==r?Array.isArray(t)?t[e]:t:r}return n}function w_(n,e){var t={}.toString.call(n);return 0===t.indexOf("[object")&&t.indexOf(e+"]")>-1}function nO(n,e){return"function"==typeof n?n.apply(void 0,e):n}function rO(n,e){return 0===e?n:function(r){clearTimeout(t),t=setTimeout(function(){n(r)},e)};var t}function No(n){return[].concat(n)}function iO(n,e){-1===n.indexOf(e)&&n.push(e)}function Ka(n){return[].slice.call(n)}function sO(n){return Object.keys(n).reduce(function(e,t){return void 0!==n[t]&&(e[t]=n[t]),e},{})}function ys(){return document.createElement("div")}function ah(n){return["Element","Fragment"].some(function(e){return w_(n,e)})}function I_(n,e){n.forEach(function(t){t&&(t.style.transitionDuration=e+"ms")})}function Xc(n,e){n.forEach(function(t){t&&t.setAttribute("data-state",e)})}function T_(n,e,t){var r=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(i){n[r](i,t)})}function cO(n,e){for(var t=e;t;){var r;if(n.contains(t))return!0;t=null==t.getRootNode||null==(r=t.getRootNode())?void 0:r.host}return!1}var vi={isTouch:!1},uO=0;function eq(){vi.isTouch||(vi.isTouch=!0,window.performance&&document.addEventListener("mousemove",dO))}function dO(){var n=performance.now();n-uO<20&&(vi.isTouch=!1,document.removeEventListener("mousemove",dO)),uO=n}function tq(){var n=document.activeElement;(function aO(n){return!(!n||!n._tippy||n._tippy.reference!==n)})(n)&&n.blur&&!n._tippy.state.isVisible&&n.blur()}var iq=!("undefined"==typeof window||"undefined"==typeof document||!window.msCrypto),Pn=Object.assign({appendTo:tO,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),lq=Object.keys(Pn);function mO(n){var t=(n.plugins||[]).reduce(function(r,i){var a,o=i.name;return o&&(r[o]=void 0!==n[o]?n[o]:null!=(a=Pn[o])?a:i.defaultValue),r},{});return Object.assign({},n,t)}function vO(n,e){var t=Object.assign({},e,{content:nO(e.content,[n])},e.ignoreAttributes?{}:function uq(n,e){return(e?Object.keys(mO(Object.assign({},Pn,{plugins:e}))):lq).reduce(function(i,o){var s=(n.getAttribute("data-tippy-"+o)||"").trim();if(!s)return i;if("content"===o)i[o]=s;else try{i[o]=JSON.parse(s)}catch(a){i[o]=s}return i},{})}(n,e.plugins));return t.aria=Object.assign({},Pn.aria,t.aria),t.aria={expanded:"auto"===t.aria.expanded?e.interactive:t.aria.expanded,content:"auto"===t.aria.content?e.interactive?null:"describedby":t.aria.content},t}function x_(n,e){n.innerHTML=e}function yO(n){var e=ys();return!0===n?e.className=XA:(e.className=eO,ah(n)?e.appendChild(n):x_(e,n)),e}function _O(n,e){ah(e.content)?(x_(n,""),n.appendChild(e.content)):"function"!=typeof e.content&&(e.allowHTML?x_(n,e.content):n.textContent=e.content)}function lh(n){var e=n.firstElementChild,t=Ka(e.children);return{box:e,content:t.find(function(r){return r.classList.contains(QA)}),arrow:t.find(function(r){return r.classList.contains(XA)||r.classList.contains(eO)}),backdrop:t.find(function(r){return r.classList.contains("tippy-backdrop")})}}function bO(n){var e=ys(),t=ys();t.className="tippy-box",t.setAttribute("data-state","hidden"),t.setAttribute("tabindex","-1");var r=ys();function i(o,s){var a=lh(e),l=a.box,c=a.content,u=a.arrow;s.theme?l.setAttribute("data-theme",s.theme):l.removeAttribute("data-theme"),"string"==typeof s.animation?l.setAttribute("data-animation",s.animation):l.removeAttribute("data-animation"),s.inertia?l.setAttribute("data-inertia",""):l.removeAttribute("data-inertia"),l.style.maxWidth="number"==typeof s.maxWidth?s.maxWidth+"px":s.maxWidth,s.role?l.setAttribute("role",s.role):l.removeAttribute("role"),(o.content!==s.content||o.allowHTML!==s.allowHTML)&&_O(c,n.props),s.arrow?u?o.arrow!==s.arrow&&(l.removeChild(u),l.appendChild(yO(s.arrow))):l.appendChild(yO(s.arrow)):u&&l.removeChild(u)}return r.className=QA,r.setAttribute("data-state","hidden"),_O(r,n.props),e.appendChild(t),t.appendChild(r),i(n.props,n.props),{popper:e,onUpdate:i}}bO.$$tippy=!0;var fq=1,ch=[],uh=[];function hq(n,e){var r,i,o,u,d,f,g,t=vO(n,Object.assign({},Pn,mO(sO(e)))),s=!1,a=!1,l=!1,c=!1,h=[],p=rO(np,t.interactiveDebounce),m=fq++,v=function Y6(n){return n.filter(function(e,t){return n.indexOf(e)===t})}(t.plugins),y={id:m,reference:n,popper:ys(),popperInstance:null,props:t,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:v,clearDelayTimeouts:function ap(){clearTimeout(r),clearTimeout(i),cancelAnimationFrame(o)},setProps:function lp(E){if(!y.state.isDestroyed){He("onBeforeUpdate",[y,E]),tp();var j=y.props,re=vO(n,Object.assign({},j,sO(E),{ignoreAttributes:!0}));y.props=re,fl(),j.interactiveDebounce!==re.interactiveDebounce&&(Jn(),p=rO(np,re.interactiveDebounce)),j.triggerTarget&&!re.triggerTarget?No(j.triggerTarget).forEach(function(Le){Le.removeAttribute("aria-expanded")}):re.triggerTarget&&n.removeAttribute("aria-expanded"),Ue(),et(),x&&x(j,re),y.popperInstance&&(ip(),Ho().forEach(function(Le){requestAnimationFrame(Le._tippy.popperInstance.forceUpdate)})),He("onAfterUpdate",[y,E])}},setContent:function cp(E){y.setProps({content:E})},show:function OQ(){var E=y.state.isVisible,j=y.state.isDestroyed,re=!y.state.isEnabled,Le=vi.isTouch&&!y.props.touch,Ie=E_(y.props.duration,0,Pn.duration);if(!(E||j||re||Le||K().hasAttribute("disabled")||(He("onShow",[y],!1),!1===y.props.onShow(y)))){if(y.state.isVisible=!0,oe()&&(C.style.visibility="visible"),et(),Wr(),y.state.isMounted||(C.style.transition="none"),oe()){var Mn=le();I_([Mn.box,Mn.content],0)}f=function(){var As;if(y.state.isVisible&&!c){if(c=!0,C.style.transition=y.props.moveTransition,oe()&&y.props.animation){var Cb=le(),up=Cb.box,pl=Cb.content;I_([up,pl],Ie),Xc([up,pl],"visible")}Fe(),Ue(),iO(uh,y),null==(As=y.popperInstance)||As.forceUpdate(),He("onMount",[y]),y.props.animation&&oe()&&function Ji(E,j){dl(E,j)}(Ie,function(){y.state.isShown=!0,He("onShown",[y])})}},function Xi(){var j,E=y.props.appendTo,re=K();(j=y.props.interactive&&E===tO||"parent"===E?re.parentNode:nO(E,[re])).contains(C)||j.appendChild(C),y.state.isMounted=!0,ip()}()}},hide:function kQ(){var E=!y.state.isVisible,j=y.state.isDestroyed,re=!y.state.isEnabled,Le=E_(y.props.duration,1,Pn.duration);if(!(E||j||re)&&(He("onHide",[y],!1),!1!==y.props.onHide(y))){if(y.state.isVisible=!1,y.state.isShown=!1,c=!1,s=!1,oe()&&(C.style.visibility="hidden"),Jn(),Qi(),et(!0),oe()){var Ie=le(),Mn=Ie.box,Dr=Ie.content;y.props.animation&&(I_([Mn,Dr],Le),Xc([Mn,Dr],"hidden"))}Fe(),Ue(),y.props.animation?oe()&&function ul(E,j){dl(E,function(){!y.state.isVisible&&C.parentNode&&C.parentNode.contains(C)&&j()})}(Le,y.unmount):y.unmount()}},hideWithInteractivity:function NQ(E){xe().addEventListener("mousemove",p),iO(ch,p),p(E)},enable:function Mu(){y.state.isEnabled=!0},disable:function sp(){y.hide(),y.state.isEnabled=!1},unmount:function RQ(){y.state.isVisible&&y.hide(),y.state.isMounted&&(op(),Ho().forEach(function(E){E._tippy.unmount()}),C.parentNode&&C.parentNode.removeChild(C),uh=uh.filter(function(E){return E!==y}),y.state.isMounted=!1,He("onHidden",[y]))},destroy:function PQ(){y.state.isDestroyed||(y.clearDelayTimeouts(),y.unmount(),tp(),delete n._tippy,y.state.isDestroyed=!0,He("onDestroy",[y]))}};if(!t.render)return y;var D=t.render(y),C=D.popper,x=D.onUpdate;C.setAttribute("data-tippy-root",""),C.id="tippy-"+y.id,y.popper=C,n._tippy=y,C._tippy=y;var A=v.map(function(E){return E.fn(y)}),V=n.hasAttribute("aria-expanded");return fl(),Ue(),et(),He("onCreate",[y]),t.showOnCreate&&Su(),C.addEventListener("mouseenter",function(){y.props.interactive&&y.state.isVisible&&y.clearDelayTimeouts()}),C.addEventListener("mouseleave",function(){y.props.interactive&&y.props.trigger.indexOf("mouseenter")>=0&&xe().addEventListener("mousemove",p)}),y;function q(){var E=y.props.touch;return Array.isArray(E)?E:[E,0]}function ee(){return"hold"===q()[0]}function oe(){var E;return!(null==(E=y.props.render)||!E.$$tippy)}function K(){return g||n}function xe(){var E=K().parentNode;return E?function lO(n){var e,r=No(n)[0];return null!=r&&null!=(e=r.ownerDocument)&&e.body?r.ownerDocument:document}(E):document}function le(){return lh(C)}function Z(E){return y.state.isMounted&&!y.state.isVisible||vi.isTouch||u&&"focus"===u.type?0:E_(y.props.delay,E?0:1,Pn.delay)}function et(E){void 0===E&&(E=!1),C.style.pointerEvents=y.props.interactive&&!E?"":"none",C.style.zIndex=""+y.props.zIndex}function He(E,j,re){var Le;void 0===re&&(re=!0),A.forEach(function(Ie){Ie[E]&&Ie[E].apply(Ie,j)}),re&&(Le=y.props)[E].apply(Le,j)}function Fe(){var E=y.props.aria;if(E.content){var j="aria-"+E.content,re=C.id;No(y.props.triggerTarget||n).forEach(function(Ie){var Mn=Ie.getAttribute(j);if(y.state.isVisible)Ie.setAttribute(j,Mn?Mn+" "+re:re);else{var Dr=Mn&&Mn.replace(re,"").trim();Dr?Ie.setAttribute(j,Dr):Ie.removeAttribute(j)}})}}function Ue(){!V&&y.props.aria.expanded&&No(y.props.triggerTarget||n).forEach(function(j){y.props.interactive?j.setAttribute("aria-expanded",y.state.isVisible&&j===K()?"true":"false"):j.removeAttribute("aria-expanded")})}function Jn(){xe().removeEventListener("mousemove",p),ch=ch.filter(function(E){return E!==p})}function wi(E){if(!vi.isTouch||!l&&"mousedown"!==E.type){var j=E.composedPath&&E.composedPath()[0]||E.target;if(!y.props.interactive||!cO(C,j)){if(No(y.props.triggerTarget||n).some(function(re){return cO(re,j)})){if(vi.isTouch||y.state.isVisible&&y.props.trigger.indexOf("click")>=0)return}else He("onClickOutside",[y,E]);!0===y.props.hideOnClick&&(y.clearDelayTimeouts(),y.hide(),a=!0,setTimeout(function(){a=!1}),y.state.isMounted||Qi())}}}function Ts(){l=!0}function Yi(){l=!1}function Wr(){var E=xe();E.addEventListener("mousedown",wi,!0),E.addEventListener("touchend",wi,ko),E.addEventListener("touchstart",Yi,ko),E.addEventListener("touchmove",Ts,ko)}function Qi(){var E=xe();E.removeEventListener("mousedown",wi,!0),E.removeEventListener("touchend",wi,ko),E.removeEventListener("touchstart",Yi,ko),E.removeEventListener("touchmove",Ts,ko)}function dl(E,j){var re=le().box;function Le(Ie){Ie.target===re&&(T_(re,"remove",Le),j())}if(0===E)return j();T_(re,"remove",d),T_(re,"add",Le),d=Le}function Vo(E,j,re){void 0===re&&(re=!1),No(y.props.triggerTarget||n).forEach(function(Ie){Ie.addEventListener(E,j,re),h.push({node:Ie,eventType:E,handler:j,options:re})})}function fl(){ee()&&(Vo("touchstart",Cu,{passive:!0}),Vo("touchend",rp,{passive:!0})),function Z6(n){return n.split(/\s+/).filter(Boolean)}(y.props.trigger).forEach(function(E){if("manual"!==E)switch(Vo(E,Cu),E){case"mouseenter":Vo("mouseleave",rp);break;case"focus":Vo(iq?"focusout":"blur",Eu);break;case"focusin":Vo("focusout",Eu)}})}function tp(){h.forEach(function(E){E.node.removeEventListener(E.eventType,E.handler,E.options)}),h=[]}function Cu(E){var j,re=!1;if(y.state.isEnabled&&!wu(E)&&!a){var Le="focus"===(null==(j=u)?void 0:j.type);u=E,g=E.currentTarget,Ue(),!y.state.isVisible&&function M_(n){return w_(n,"MouseEvent")}(E)&&ch.forEach(function(Ie){return Ie(E)}),"click"===E.type&&(y.props.trigger.indexOf("mouseenter")<0||s)&&!1!==y.props.hideOnClick&&y.state.isVisible?re=!0:Su(E),"click"===E.type&&(s=!re),re&&!Le&&xs(E)}}function np(E){var j=E.target,re=K().contains(j)||C.contains(j);"mousemove"===E.type&&re||function X6(n,e){var t=e.clientX,r=e.clientY;return n.every(function(i){var o=i.popperRect,s=i.popperState,l=i.props.interactiveBorder,c=function oO(n){return n.split("-")[0]}(s.placement),u=s.modifiersData.offset;return!u||o.top-r+("bottom"===c?u.top.y:0)>l||r-o.bottom-("top"===c?u.bottom.y:0)>l||o.left-t+("right"===c?u.left.x:0)>l||t-o.right-("left"===c?u.right.x:0)>l})}(Ho().concat(C).map(function(Ie){var Mn,hl=null==(Mn=Ie._tippy.popperInstance)?void 0:Mn.state;return hl?{popperRect:Ie.getBoundingClientRect(),popperState:hl,props:t}:null}).filter(Boolean),E)&&(Jn(),xs(E))}function rp(E){if(!(wu(E)||y.props.trigger.indexOf("click")>=0&&s)){if(y.props.interactive)return void y.hideWithInteractivity(E);xs(E)}}function Eu(E){y.props.trigger.indexOf("focusin")<0&&E.target!==K()||y.props.interactive&&E.relatedTarget&&C.contains(E.relatedTarget)||xs(E)}function wu(E){return!!vi.isTouch&&ee()!==E.type.indexOf("touch")>=0}function ip(){op();var E=y.props,j=E.popperOptions,re=E.placement,Le=E.offset,Ie=E.getReferenceClientRect,Mn=E.moveTransition,Dr=oe()?lh(C).arrow:null,hl=Ie?{getBoundingClientRect:Ie,contextElement:Ie.contextElement||K()}:n,As=[{name:"offset",options:{offset:Le}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!Mn}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(up){var pl=up.state;if(oe()){var Eb=le().box;["placement","reference-hidden","escaped"].forEach(function(dp){"placement"===dp?Eb.setAttribute("data-placement",pl.placement):pl.attributes.popper["data-popper-"+dp]?Eb.setAttribute("data-"+dp,""):Eb.removeAttribute("data-"+dp)}),pl.attributes.popper={}}}}];oe()&&Dr&&As.push({name:"arrow",options:{element:Dr,padding:3}}),As.push.apply(As,(null==j?void 0:j.modifiers)||[]),y.popperInstance=G6(hl,C,Object.assign({},j,{placement:re,onFirstUpdate:f,modifiers:As}))}function op(){y.popperInstance&&(y.popperInstance.destroy(),y.popperInstance=null)}function Ho(){return Ka(C.querySelectorAll("[data-tippy-root]"))}function Su(E){y.clearDelayTimeouts(),E&&He("onTrigger",[y,E]),Wr();var j=Z(!0),re=q(),Ie=re[1];vi.isTouch&&"hold"===re[0]&&Ie&&(j=Ie),j?r=setTimeout(function(){y.show()},j):y.show()}function xs(E){if(y.clearDelayTimeouts(),He("onUntrigger",[y,E]),y.state.isVisible){if(!(y.props.trigger.indexOf("mouseenter")>=0&&y.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(E.type)>=0&&s)){var j=Z(!1);j?i=setTimeout(function(){y.state.isVisible&&y.hide()},j):o=requestAnimationFrame(function(){y.hide()})}}else Qi()}}function Ro(n,e){void 0===e&&(e={});var t=Pn.plugins.concat(e.plugins||[]);!function nq(){document.addEventListener("touchstart",eq,ko),window.addEventListener("blur",tq)}();var r=Object.assign({},e,{plugins:t}),a=function J6(n){return ah(n)?[n]:function Q6(n){return w_(n,"NodeList")}(n)?Ka(n):Array.isArray(n)?n:Ka(document.querySelectorAll(n))}(n).reduce(function(l,c){var u=c&&hq(c,r);return u&&l.push(u),l},[]);return ah(n)?a[0]:a}Ro.defaultProps=Pn,Ro.setDefaultProps=function(e){Object.keys(e).forEach(function(r){Pn[r]=e[r]})},Ro.currentInput=vi,Object.assign({},UA,{effect:function(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow)}}),Ro.setDefaultProps({render:bO});const Za=Ro;class Dq{constructor({editor:e,element:t,view:r,tippyOptions:i={},shouldShow:o}){this.preventHide=!1,this.shouldShow=({view:s,state:a})=>{const{selection:l}=a,{$anchor:c,empty:u}=l,d=1===c.depth,f=c.parent.isTextblock&&!c.parent.type.spec.code&&!c.parent.textContent;return!!(s.hasFocus()&&u&&d&&f)},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:s})=>{var a;this.preventHide?this.preventHide=!1:(null==s?void 0:s.relatedTarget)&&(null===(a=this.element.parentNode)||void 0===a?void 0:a.contains(s.relatedTarget))||this.hide()},this.editor=e,this.element=t,this.view=r,o&&(this.shouldShow=o),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=i,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:e}=this.editor.options;this.tippy||!e.parentElement||(this.tippy=Za(e,w({duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"right",hideOnClick:"toggle"},this.tippyOptions)),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",r=>{this.blurHandler({event:r})}))}update(e,t){var r,i;const{state:o}=e,{doc:s,selection:a}=o,{from:l,to:c}=a;t&&t.doc.eq(s)&&t.selection.eq(a)||(this.createTooltip(),(null===(r=this.shouldShow)||void 0===r?void 0:r.call(this,{editor:this.editor,view:e,state:o,oldState:t}))?(null===(i=this.tippy)||void 0===i||i.setProps({getReferenceClientRect:()=>Ua(e,l,c)}),this.show()):this.hide())}show(){var e;null===(e=this.tippy)||void 0===e||e.show()}hide(){var e;null===(e=this.tippy)||void 0===e||e.hide()}destroy(){var e;null===(e=this.tippy)||void 0===e||e.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const Cq=n=>new Xe({key:"string"==typeof n.pluginKey?new mt(n.pluginKey):n.pluginKey,view:e=>new Dq(w({view:e},n))});Et.create({name:"floatingMenu",addOptions:()=>({element:null,tippyOptions:{},pluginKey:"floatingMenu",shouldShow:null}),addProseMirrorPlugins(){return this.options.element?[Cq({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow})]:[]}});class EO{constructor({editor:e,element:t,view:r,tippyOptions:i={},shouldShow:o}){this.preventHide=!1,this.shouldShow=({view:s,state:a,from:l,to:c})=>{const{doc:u,selection:d}=a,{empty:f}=d,h=!u.textBetween(l,c).length&&r_(a.selection);return!(!s.hasFocus()||f||h)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:s})=>{var a;this.preventHide?this.preventHide=!1:(null==s?void 0:s.relatedTarget)&&(null===(a=this.element.parentNode)||void 0===a?void 0:a.contains(s.relatedTarget))||this.hide()},this.editor=e,this.element=t,this.view=r,o&&(this.shouldShow=o),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=i,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:e}=this.editor.options;this.tippy||!e.parentElement||(this.tippy=Za(e,w({duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"top",hideOnClick:"toggle"},this.tippyOptions)),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",r=>{this.blurHandler({event:r})}))}update(e,t){var r,i;const{state:o,composing:s}=e,{doc:a,selection:l}=o,c=t&&t.doc.eq(a)&&t.selection.eq(l);if(s||c)return;this.createTooltip();const{ranges:u}=l,d=Math.min(...u.map(p=>p.$from.pos)),f=Math.max(...u.map(p=>p.$to.pos));(null===(r=this.shouldShow)||void 0===r?void 0:r.call(this,{editor:this.editor,view:e,state:o,oldState:t,from:d,to:f}))?(null===(i=this.tippy)||void 0===i||i.setProps({getReferenceClientRect:()=>{if(wA(o.selection)){const p=e.nodeDOM(d);if(p)return p.getBoundingClientRect()}return Ua(e,d,f)}}),this.show()):this.hide()}show(){var e;null===(e=this.tippy)||void 0===e||e.show()}hide(){var e;null===(e=this.tippy)||void 0===e||e.hide()}destroy(){var e;null===(e=this.tippy)||void 0===e||e.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const Eq=n=>new Xe({key:"string"==typeof n.pluginKey?new mt(n.pluginKey):n.pluginKey,view:e=>new EO(w({view:e},n))}),wq=Et.create({name:"bubbleMenu",addOptions:()=>({element:null,tippyOptions:{},pluginKey:"bubbleMenu",shouldShow:null}),addProseMirrorPlugins(){return this.options.element?[Eq({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow})]:[]}});function ie(...n){let e=n[n.length-1];return Os(e)?(n.pop(),gp(n,e)):mp(n)}class Hr extends Me{constructor(e){super(),this._value=e}get value(){return this.getValue()}_subscribe(e){const t=super._subscribe(e);return t&&!t.closed&&e.next(this._value),t}getValue(){if(this.hasError)throw this.thrownError;if(this.closed)throw new Uo;return this._value}next(e){super.next(this._value=e)}}class Sq extends nt{notifyNext(e,t,r,i,o){this.destination.next(t)}notifyError(e,t){this.destination.error(e)}notifyComplete(e){this.destination.complete()}}class Mq extends nt{constructor(e,t,r){super(),this.parent=e,this.outerValue=t,this.outerIndex=r,this.index=0}_next(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this.index++,this)}_error(e){this.parent.notifyError(e,this),this.unsubscribe()}_complete(){this.parent.notifyComplete(this),this.unsubscribe()}}function Iq(n,e,t,r,i=new Mq(n,t,r)){if(!i.closed)return e instanceof Ne?e.subscribe(i):pp(e)(i)}const wO={};class xq{constructor(e){this.resultSelector=e}call(e,t){return t.subscribe(new Aq(e,this.resultSelector))}}class Aq extends Sq{constructor(e,t){super(e),this.resultSelector=t,this.active=0,this.values=[],this.observables=[]}_next(e){this.values.push(wO),this.observables.push(e)}_complete(){const e=this.observables,t=e.length;if(0===t)this.destination.complete();else{this.active=t,this.toRespond=t;for(let r=0;r{function n(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return n.prototype=Object.create(Error.prototype),n})();function O_(...n){return function Oq(){return bl(1)}()(ie(...n))}const Ya=new Ne(n=>n.complete());function hh(n){return n?function kq(n){return new Ne(e=>n.schedule(()=>e.complete()))}(n):Ya}function SO(n){return new Ne(e=>{let t;try{t=n()}catch(i){return void e.error(i)}return(t?zt(t):hh()).subscribe(e)})}function yi(n,e){return"function"==typeof e?t=>t.pipe(yi((r,i)=>zt(n(r,i)).pipe(be((o,s)=>e(r,o,i,s))))):t=>t.lift(new Nq(n))}class Nq{constructor(e){this.project=e}call(e,t){return t.subscribe(new Rq(e,this.project))}}class Rq extends yl{constructor(e,t){super(e),this.project=t,this.index=0}_next(e){let t;const r=this.index++;try{t=this.project(e,r)}catch(i){return void this.destination.error(i)}this._innerSub(t)}_innerSub(e){const t=this.innerSubscription;t&&t.unsubscribe();const r=new vl(this),i=this.destination;i.add(r),this.innerSubscription=_l(e,r),this.innerSubscription!==r&&i.add(this.innerSubscription)}_complete(){const{innerSubscription:e}=this;(!e||e.closed)&&super._complete(),this.unsubscribe()}_unsubscribe(){this.innerSubscription=void 0}notifyComplete(){this.innerSubscription=void 0,this.isStopped&&super._complete()}notifyNext(e){this.destination.next(e)}}const MO=(()=>{function n(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return n.prototype=Object.create(Error.prototype),n})();function _s(n){return e=>0===n?hh():e.lift(new Pq(n))}class Pq{constructor(e){if(this.total=e,this.total<0)throw new MO}call(e,t){return t.subscribe(new Fq(e,this.total))}}class Fq extends nt{constructor(e,t){super(e),this.total=t,this.count=0}_next(e){const t=this.total,r=++this.count;r<=t&&(this.destination.next(e),r===t&&(this.destination.complete(),this.unsubscribe()))}}function IO(n,e){let t=!1;return arguments.length>=2&&(t=!0),function(i){return i.lift(new Bq(n,e,t))}}class Bq{constructor(e,t,r=!1){this.accumulator=e,this.seed=t,this.hasSeed=r}call(e,t){return t.subscribe(new jq(e,this.accumulator,this.seed,this.hasSeed))}}class jq extends nt{constructor(e,t,r,i){super(e),this.accumulator=t,this._seed=r,this.hasSeed=i,this.index=0}get seed(){return this._seed}set seed(e){this.hasSeed=!0,this._seed=e}_next(e){if(this.hasSeed)return this._tryNext(e);this.seed=e,this.destination.next(e)}_tryNext(e){const t=this.index++;let r;try{r=this.accumulator(this.seed,e,t)}catch(i){this.destination.error(i)}this.seed=r,this.destination.next(r)}}function Po(n){return function(t){const r=new Vq(n),i=t.lift(r);return r.caught=i}}class Vq{constructor(e){this.selector=e}call(e,t){return t.subscribe(new Hq(e,this.selector,this.caught))}}class Hq extends yl{constructor(e,t,r){super(e),this.selector=t,this.caught=r}error(e){if(!this.isStopped){let t;try{t=this.selector(e,this.caught)}catch(o){return void super.error(o)}this._unsubscribeAndRecycle();const r=new vl(this);this.add(r);const i=_l(t,r);i!==r&&this.add(i)}}}function Qa(n,e){return Wt(n,e,1)}function k_(n){return function(t){return 0===n?hh():t.lift(new Uq(n))}}class Uq{constructor(e){if(this.total=e,this.total<0)throw new MO}call(e,t){return t.subscribe(new zq(e,this.total))}}class zq extends nt{constructor(e,t){super(e),this.total=t,this.ring=new Array,this.count=0}_next(e){const t=this.ring,r=this.total,i=this.count++;t.length0){const r=this.count>=this.total?this.total:this.count,i=this.ring;for(let o=0;oe.lift(new Wq(n))}class Wq{constructor(e){this.errorFactory=e}call(e,t){return t.subscribe(new $q(e,this.errorFactory))}}class $q extends nt{constructor(e,t){super(e),this.errorFactory=t,this.hasValue=!1}_next(e){this.hasValue=!0,this.destination.next(e)}_complete(){if(this.hasValue)return this.destination.complete();{let e;try{e=this.errorFactory()}catch(t){e=t}this.destination.error(e)}}}function Gq(){return new fh}function xO(n=null){return e=>e.lift(new qq(n))}class qq{constructor(e){this.defaultValue=e}call(e,t){return t.subscribe(new Kq(e,this.defaultValue))}}class Kq extends nt{constructor(e,t){super(e),this.defaultValue=t,this.isEmpty=!0}_next(e){this.isEmpty=!1,this.destination.next(e)}_complete(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()}}function Ja(n,e){const t=arguments.length>=2;return r=>r.pipe(n?_o((i,o)=>n(i,o,r)):Au,_s(1),t?xO(e):TO(()=>new fh))}class Qq{constructor(e){this.callback=e}call(e,t){return t.subscribe(new Jq(e,this.callback))}}class Jq extends nt{constructor(e,t){super(e),this.add(new ke(t))}}class Gi{constructor(e,t){this.id=e,this.url=t}}class N_ extends Gi{constructor(e,t,r="imperative",i=null){super(e,t),this.navigationTrigger=r,this.restoredState=i}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class tu extends Gi{constructor(e,t,r){super(e,t),this.urlAfterRedirects=r}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}class AO extends Gi{constructor(e,t,r){super(e,t),this.reason=r}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class Xq extends Gi{constructor(e,t,r){super(e,t),this.error=r}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class e9 extends Gi{constructor(e,t,r,i){super(e,t),this.urlAfterRedirects=r,this.state=i}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class t9 extends Gi{constructor(e,t,r,i){super(e,t),this.urlAfterRedirects=r,this.state=i}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class n9 extends Gi{constructor(e,t,r,i,o){super(e,t),this.urlAfterRedirects=r,this.state=i,this.shouldActivate=o}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class r9 extends Gi{constructor(e,t,r,i){super(e,t),this.urlAfterRedirects=r,this.state=i}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class i9 extends Gi{constructor(e,t,r,i){super(e,t),this.urlAfterRedirects=r,this.state=i}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class OO{constructor(e){this.route=e}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class kO{constructor(e){this.route=e}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class o9{constructor(e){this.snapshot=e}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class s9{constructor(e){this.snapshot=e}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class a9{constructor(e){this.snapshot=e}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class l9{constructor(e){this.snapshot=e}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class NO{constructor(e,t,r){this.routerEvent=e,this.position=t,this.anchor=r}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}const me="primary";class c9{constructor(e){this.params=e||{}}has(e){return Object.prototype.hasOwnProperty.call(this.params,e)}get(e){if(this.has(e)){const t=this.params[e];return Array.isArray(t)?t[0]:t}return null}getAll(e){if(this.has(e)){const t=this.params[e];return Array.isArray(t)?t:[t]}return[]}get keys(){return Object.keys(this.params)}}function Xa(n){return new c9(n)}const RO="ngNavigationCancelingError";function R_(n){const e=Error("NavigationCancelingError: "+n);return e[RO]=!0,e}function d9(n,e,t){const r=t.path.split("/");if(r.length>n.length||"full"===t.pathMatch&&(e.hasChildren()||r.lengthr[o]===i)}return n===e}function FO(n){return Array.prototype.concat.apply([],n)}function LO(n){return n.length>0?n[n.length-1]:null}function Jt(n,e){for(const t in n)n.hasOwnProperty(t)&&e(n[t],t)}function bi(n){return lm(n)?n:Zl(n)?zt(Promise.resolve(n)):ie(n)}const p9={exact:function VO(n,e,t){if(!Ds(n.segments,e.segments)||!ph(n.segments,e.segments,t)||n.numberOfChildren!==e.numberOfChildren)return!1;for(const r in e.children)if(!n.children[r]||!VO(n.children[r],e.children[r],t))return!1;return!0},subset:HO},BO={exact:function g9(n,e){return _i(n,e)},subset:function m9(n,e){return Object.keys(e).length<=Object.keys(n).length&&Object.keys(e).every(t=>PO(n[t],e[t]))},ignored:()=>!0};function jO(n,e,t){return p9[t.paths](n.root,e.root,t.matrixParams)&&BO[t.queryParams](n.queryParams,e.queryParams)&&!("exact"===t.fragment&&n.fragment!==e.fragment)}function HO(n,e,t){return UO(n,e,e.segments,t)}function UO(n,e,t,r){if(n.segments.length>t.length){const i=n.segments.slice(0,t.length);return!(!Ds(i,t)||e.hasChildren()||!ph(i,t,r))}if(n.segments.length===t.length){if(!Ds(n.segments,t)||!ph(n.segments,t,r))return!1;for(const i in e.children)if(!n.children[i]||!HO(n.children[i],e.children[i],r))return!1;return!0}{const i=t.slice(0,n.segments.length),o=t.slice(n.segments.length);return!!(Ds(n.segments,i)&&ph(n.segments,i,r)&&n.children[me])&&UO(n.children[me],e,o,r)}}function ph(n,e,t){return e.every((r,i)=>BO[t](n[i].parameters,r.parameters))}class bs{constructor(e,t,r){this.root=e,this.queryParams=t,this.fragment=r}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Xa(this.queryParams)),this._queryParamMap}toString(){return _9.serialize(this)}}class Ce{constructor(e,t){this.segments=e,this.children=t,this.parent=null,Jt(t,(r,i)=>r.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return gh(this)}}class nu{constructor(e,t){this.path=e,this.parameters=t}get parameterMap(){return this._parameterMap||(this._parameterMap=Xa(this.parameters)),this._parameterMap}toString(){return qO(this)}}function Ds(n,e){return n.length===e.length&&n.every((t,r)=>t.path===e[r].path)}class zO{}class WO{parse(e){const t=new T9(e);return new bs(t.parseRootSegment(),t.parseQueryParams(),t.parseFragment())}serialize(e){const t=`/${ru(e.root,!0)}`,r=function C9(n){const e=Object.keys(n).map(t=>{const r=n[t];return Array.isArray(r)?r.map(i=>`${mh(t)}=${mh(i)}`).join("&"):`${mh(t)}=${mh(r)}`}).filter(t=>!!t);return e.length?`?${e.join("&")}`:""}(e.queryParams),i="string"==typeof e.fragment?`#${function b9(n){return encodeURI(n)}(e.fragment)}`:"";return`${t}${r}${i}`}}const _9=new WO;function gh(n){return n.segments.map(e=>qO(e)).join("/")}function ru(n,e){if(!n.hasChildren())return gh(n);if(e){const t=n.children[me]?ru(n.children[me],!1):"",r=[];return Jt(n.children,(i,o)=>{o!==me&&r.push(`${o}:${ru(i,!1)}`)}),r.length>0?`${t}(${r.join("//")})`:t}{const t=function y9(n,e){let t=[];return Jt(n.children,(r,i)=>{i===me&&(t=t.concat(e(r,i)))}),Jt(n.children,(r,i)=>{i!==me&&(t=t.concat(e(r,i)))}),t}(n,(r,i)=>i===me?[ru(n.children[me],!1)]:[`${i}:${ru(r,!1)}`]);return 1===Object.keys(n.children).length&&null!=n.children[me]?`${gh(n)}/${t[0]}`:`${gh(n)}/(${t.join("//")})`}}function $O(n){return encodeURIComponent(n).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function mh(n){return $O(n).replace(/%3B/gi,";")}function P_(n){return $O(n).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function vh(n){return decodeURIComponent(n)}function GO(n){return vh(n.replace(/\+/g,"%20"))}function qO(n){return`${P_(n.path)}${function D9(n){return Object.keys(n).map(e=>`;${P_(e)}=${P_(n[e])}`).join("")}(n.parameters)}`}const E9=/^[^\/()?;=#]+/;function yh(n){const e=n.match(E9);return e?e[0]:""}const w9=/^[^=?&#]+/,M9=/^[^&#]+/;class T9{constructor(e){this.url=e,this.remaining=e}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Ce([],{}):new Ce([],this.parseChildren())}parseQueryParams(){const e={};if(this.consumeOptional("?"))do{this.parseQueryParam(e)}while(this.consumeOptional("&"));return e}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const e=[];for(this.peekStartsWith("(")||e.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),e.push(this.parseSegment());let t={};this.peekStartsWith("/(")&&(this.capture("/"),t=this.parseParens(!0));let r={};return this.peekStartsWith("(")&&(r=this.parseParens(!1)),(e.length>0||Object.keys(t).length>0)&&(r[me]=new Ce(e,t)),r}parseSegment(){const e=yh(this.remaining);if(""===e&&this.peekStartsWith(";"))throw new Error(`Empty path url segment cannot have parameters: '${this.remaining}'.`);return this.capture(e),new nu(vh(e),this.parseMatrixParams())}parseMatrixParams(){const e={};for(;this.consumeOptional(";");)this.parseParam(e);return e}parseParam(e){const t=yh(this.remaining);if(!t)return;this.capture(t);let r="";if(this.consumeOptional("=")){const i=yh(this.remaining);i&&(r=i,this.capture(r))}e[vh(t)]=vh(r)}parseQueryParam(e){const t=function S9(n){const e=n.match(w9);return e?e[0]:""}(this.remaining);if(!t)return;this.capture(t);let r="";if(this.consumeOptional("=")){const s=function I9(n){const e=n.match(M9);return e?e[0]:""}(this.remaining);s&&(r=s,this.capture(r))}const i=GO(t),o=GO(r);if(e.hasOwnProperty(i)){let s=e[i];Array.isArray(s)||(s=[s],e[i]=s),s.push(o)}else e[i]=o}parseParens(e){const t={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const r=yh(this.remaining),i=this.remaining[r.length];if("/"!==i&&")"!==i&&";"!==i)throw new Error(`Cannot parse url '${this.url}'`);let o;r.indexOf(":")>-1?(o=r.substr(0,r.indexOf(":")),this.capture(o),this.capture(":")):e&&(o=me);const s=this.parseChildren();t[o]=1===Object.keys(s).length?s[me]:new Ce([],s),this.consumeOptional("//")}return t}peekStartsWith(e){return this.remaining.startsWith(e)}consumeOptional(e){return!!this.peekStartsWith(e)&&(this.remaining=this.remaining.substring(e.length),!0)}capture(e){if(!this.consumeOptional(e))throw new Error(`Expected "${e}".`)}}class KO{constructor(e){this._root=e}get root(){return this._root.value}parent(e){const t=this.pathFromRoot(e);return t.length>1?t[t.length-2]:null}children(e){const t=F_(e,this._root);return t?t.children.map(r=>r.value):[]}firstChild(e){const t=F_(e,this._root);return t&&t.children.length>0?t.children[0].value:null}siblings(e){const t=L_(e,this._root);return t.length<2?[]:t[t.length-2].children.map(i=>i.value).filter(i=>i!==e)}pathFromRoot(e){return L_(e,this._root).map(t=>t.value)}}function F_(n,e){if(n===e.value)return e;for(const t of e.children){const r=F_(n,t);if(r)return r}return null}function L_(n,e){if(n===e.value)return[e];for(const t of e.children){const r=L_(n,t);if(r.length)return r.unshift(e),r}return[]}class qi{constructor(e,t){this.value=e,this.children=t}toString(){return`TreeNode(${this.value})`}}function el(n){const e={};return n&&n.children.forEach(t=>e[t.value.outlet]=t),e}class ZO extends KO{constructor(e,t){super(e),this.snapshot=t,B_(this,e)}toString(){return this.snapshot.toString()}}function YO(n,e){const t=function x9(n,e){const s=new _h([],{},{},"",{},me,e,null,n.root,-1,{});return new JO("",new qi(s,[]))}(n,e),r=new Hr([new nu("",{})]),i=new Hr({}),o=new Hr({}),s=new Hr({}),a=new Hr(""),l=new tl(r,i,s,a,o,me,e,t.root);return l.snapshot=t.root,new ZO(new qi(l,[]),t)}class tl{constructor(e,t,r,i,o,s,a,l){this.url=e,this.params=t,this.queryParams=r,this.fragment=i,this.data=o,this.outlet=s,this.component=a,this._futureSnapshot=l}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=this.params.pipe(be(e=>Xa(e)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(be(e=>Xa(e)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function QO(n,e="emptyOnly"){const t=n.pathFromRoot;let r=0;if("always"!==e)for(r=t.length-1;r>=1;){const i=t[r],o=t[r-1];if(i.routeConfig&&""===i.routeConfig.path)r--;else{if(o.component)break;r--}}return function A9(n){return n.reduce((e,t)=>({params:Object.assign(Object.assign({},e.params),t.params),data:Object.assign(Object.assign({},e.data),t.data),resolve:Object.assign(Object.assign({},e.resolve),t._resolvedData)}),{params:{},data:{},resolve:{}})}(t.slice(r))}class _h{constructor(e,t,r,i,o,s,a,l,c,u,d){this.url=e,this.params=t,this.queryParams=r,this.fragment=i,this.data=o,this.outlet=s,this.component=a,this.routeConfig=l,this._urlSegment=c,this._lastPathIndex=u,this._resolve=d}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=Xa(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Xa(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(r=>r.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class JO extends KO{constructor(e,t){super(t),this.url=e,B_(this,t)}toString(){return XO(this._root)}}function B_(n,e){e.value._routerState=n,e.children.forEach(t=>B_(n,t))}function XO(n){const e=n.children.length>0?` { ${n.children.map(XO).join(", ")} } `:"";return`${n.value}${e}`}function j_(n){if(n.snapshot){const e=n.snapshot,t=n._futureSnapshot;n.snapshot=t,_i(e.queryParams,t.queryParams)||n.queryParams.next(t.queryParams),e.fragment!==t.fragment&&n.fragment.next(t.fragment),_i(e.params,t.params)||n.params.next(t.params),function f9(n,e){if(n.length!==e.length)return!1;for(let t=0;t_i(t.parameters,e[r].parameters))}(n.url,e.url);return t&&!(!n.parent!=!e.parent)&&(!n.parent||V_(n.parent,e.parent))}function iu(n,e,t){if(t&&n.shouldReuseRoute(e.value,t.value.snapshot)){const r=t.value;r._futureSnapshot=e.value;const i=function k9(n,e,t){return e.children.map(r=>{for(const i of t.children)if(n.shouldReuseRoute(r.value,i.value.snapshot))return iu(n,r,i);return iu(n,r)})}(n,e,t);return new qi(r,i)}{if(n.shouldAttach(e.value)){const o=n.retrieve(e.value);if(null!==o){const s=o.route;return s.value._futureSnapshot=e.value,s.children=e.children.map(a=>iu(n,a)),s}}const r=function N9(n){return new tl(new Hr(n.url),new Hr(n.params),new Hr(n.queryParams),new Hr(n.fragment),new Hr(n.data),n.outlet,n.component,n)}(e.value),i=e.children.map(o=>iu(n,o));return new qi(r,i)}}function bh(n){return"object"==typeof n&&null!=n&&!n.outlets&&!n.segmentPath}function ou(n){return"object"==typeof n&&null!=n&&n.outlets}function H_(n,e,t,r,i){let o={};return r&&Jt(r,(s,a)=>{o[a]=Array.isArray(s)?s.map(l=>`${l}`):`${s}`}),new bs(t.root===n?e:ek(t.root,n,e),o,i)}function ek(n,e,t){const r={};return Jt(n.children,(i,o)=>{r[o]=i===e?t:ek(i,e,t)}),new Ce(n.segments,r)}class tk{constructor(e,t,r){if(this.isAbsolute=e,this.numberOfDoubleDots=t,this.commands=r,e&&r.length>0&&bh(r[0]))throw new Error("Root segment cannot have matrix parameters");const i=r.find(ou);if(i&&i!==LO(r))throw new Error("{outlets:{}} has to be the last command")}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class U_{constructor(e,t,r){this.segmentGroup=e,this.processChildren=t,this.index=r}}function nk(n,e,t){if(n||(n=new Ce([],{})),0===n.segments.length&&n.hasChildren())return Dh(n,e,t);const r=function j9(n,e,t){let r=0,i=e;const o={match:!1,pathIndex:0,commandIndex:0};for(;i=t.length)return o;const s=n.segments[i],a=t[r];if(ou(a))break;const l=`${a}`,c=r0&&void 0===l)break;if(l&&c&&"object"==typeof c&&void 0===c.outlets){if(!ik(l,c,s))return o;r+=2}else{if(!ik(l,{},s))return o;r++}i++}return{match:!0,pathIndex:i,commandIndex:r}}(n,e,t),i=t.slice(r.commandIndex);if(r.match&&r.pathIndex{"string"==typeof o&&(o=[o]),null!==o&&(i[s]=nk(n.children[s],e,o))}),Jt(n.children,(o,s)=>{void 0===r[s]&&(i[s]=o)}),new Ce(n.segments,i)}}function z_(n,e,t){const r=n.segments.slice(0,e);let i=0;for(;i{"string"==typeof t&&(t=[t]),null!==t&&(e[r]=z_(new Ce([],{}),0,t))}),e}function rk(n){const e={};return Jt(n,(t,r)=>e[r]=`${t}`),e}function ik(n,e,t){return n==t.path&&_i(e,t.parameters)}class U9{constructor(e,t,r,i){this.routeReuseStrategy=e,this.futureState=t,this.currState=r,this.forwardEvent=i}activate(e){const t=this.futureState._root,r=this.currState?this.currState._root:null;this.deactivateChildRoutes(t,r,e),j_(this.futureState.root),this.activateChildRoutes(t,r,e)}deactivateChildRoutes(e,t,r){const i=el(t);e.children.forEach(o=>{const s=o.value.outlet;this.deactivateRoutes(o,i[s],r),delete i[s]}),Jt(i,(o,s)=>{this.deactivateRouteAndItsChildren(o,r)})}deactivateRoutes(e,t,r){const i=e.value,o=t?t.value:null;if(i===o)if(i.component){const s=r.getContext(i.outlet);s&&this.deactivateChildRoutes(e,t,s.children)}else this.deactivateChildRoutes(e,t,r);else o&&this.deactivateRouteAndItsChildren(t,r)}deactivateRouteAndItsChildren(e,t){e.value.component&&this.routeReuseStrategy.shouldDetach(e.value.snapshot)?this.detachAndStoreRouteSubtree(e,t):this.deactivateRouteAndOutlet(e,t)}detachAndStoreRouteSubtree(e,t){const r=t.getContext(e.value.outlet),i=r&&e.value.component?r.children:t,o=el(e);for(const s of Object.keys(o))this.deactivateRouteAndItsChildren(o[s],i);if(r&&r.outlet){const s=r.outlet.detach(),a=r.children.onOutletDeactivated();this.routeReuseStrategy.store(e.value.snapshot,{componentRef:s,route:e,contexts:a})}}deactivateRouteAndOutlet(e,t){const r=t.getContext(e.value.outlet),i=r&&e.value.component?r.children:t,o=el(e);for(const s of Object.keys(o))this.deactivateRouteAndItsChildren(o[s],i);r&&r.outlet&&(r.outlet.deactivate(),r.children.onOutletDeactivated(),r.attachRef=null,r.resolver=null,r.route=null)}activateChildRoutes(e,t,r){const i=el(t);e.children.forEach(o=>{this.activateRoutes(o,i[o.value.outlet],r),this.forwardEvent(new l9(o.value.snapshot))}),e.children.length&&this.forwardEvent(new s9(e.value.snapshot))}activateRoutes(e,t,r){const i=e.value,o=t?t.value:null;if(j_(i),i===o)if(i.component){const s=r.getOrCreateContext(i.outlet);this.activateChildRoutes(e,t,s.children)}else this.activateChildRoutes(e,t,r);else if(i.component){const s=r.getOrCreateContext(i.outlet);if(this.routeReuseStrategy.shouldAttach(i.snapshot)){const a=this.routeReuseStrategy.retrieve(i.snapshot);this.routeReuseStrategy.store(i.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),j_(a.route.value),this.activateChildRoutes(e,null,s.children)}else{const a=function z9(n){for(let e=n.parent;e;e=e.parent){const t=e.routeConfig;if(t&&t._loadedConfig)return t._loadedConfig;if(t&&t.component)return null}return null}(i.snapshot),l=a?a.module.componentFactoryResolver:null;s.attachRef=null,s.route=i,s.resolver=l,s.outlet&&s.outlet.activateWith(i,l),this.activateChildRoutes(e,null,s.children)}}else this.activateChildRoutes(e,null,r)}}class W_{constructor(e,t){this.routes=e,this.module=t}}function Fo(n){return"function"==typeof n}function Cs(n){return n instanceof bs}const su=Symbol("INITIAL_VALUE");function au(){return yi(n=>function Tq(...n){let e,t;return Os(n[n.length-1])&&(t=n.pop()),"function"==typeof n[n.length-1]&&(e=n.pop()),1===n.length&&gl(n[0])&&(n=n[0]),mp(n,t).lift(new xq(e))}(n.map(e=>e.pipe(_s(1),function Lq(...n){const e=n[n.length-1];return Os(e)?(n.pop(),t=>O_(n,t,e)):t=>O_(n,t)}(su)))).pipe(IO((e,t)=>{let r=!1;return t.reduce((i,o,s)=>i!==su?i:(o===su&&(r=!0),r||!1!==o&&s!==t.length-1&&!Cs(o)?i:o),e)},su),_o(e=>e!==su),be(e=>Cs(e)?e:!0===e),_s(1)))}class Z9{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.children=new lu,this.attachRef=null}}class lu{constructor(){this.contexts=new Map}onChildOutletCreated(e,t){const r=this.getOrCreateContext(e);r.outlet=t,this.contexts.set(e,r)}onChildOutletDestroyed(e){const t=this.getContext(e);t&&(t.outlet=null,t.attachRef=null)}onOutletDeactivated(){const e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let t=this.getContext(e);return t||(t=new Z9,this.contexts.set(e,t)),t}getContext(e){return this.contexts.get(e)||null}}let ok=(()=>{class n{constructor(t,r,i,o,s){this.parentContexts=t,this.location=r,this.resolver=i,this.changeDetector=s,this.activated=null,this._activatedRoute=null,this.activateEvents=new Ae,this.deactivateEvents=new Ae,this.attachEvents=new Ae,this.detachEvents=new Ae,this.name=o||me,t.onChildOutletCreated(this.name,this)}ngOnDestroy(){this.parentContexts.onChildOutletDestroyed(this.name)}ngOnInit(){if(!this.activated){const t=this.parentContexts.getContext(this.name);t&&t.route&&(t.attachRef?this.attach(t.attachRef,t.route):this.activateWith(t.route,t.resolver||null))}}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new Error("Outlet is not activated");return this.activated.instance}get activatedRoute(){if(!this.activated)throw new Error("Outlet is not activated");return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new Error("Outlet is not activated");this.location.detach();const t=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(t.instance),t}attach(t,r){this.activated=t,this._activatedRoute=r,this.location.insert(t.hostView),this.attachEvents.emit(t.instance)}deactivate(){if(this.activated){const t=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(t)}}activateWith(t,r){if(this.isActivated)throw new Error("Cannot activate an already activated outlet");this._activatedRoute=t;const s=(r=r||this.resolver).resolveComponentFactory(t._futureSnapshot.routeConfig.component),a=this.parentContexts.getOrCreateContext(this.name).children,l=new Y9(t,a,this.location.injector);this.activated=this.location.createComponent(s,this.location.length,l),this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)}}return n.\u0275fac=function(t){return new(t||n)(S(lu),S(sr),S(Ri),function Al(n){return function nR(n,e){if("class"===e)return n.classes;if("style"===e)return n.styles;const t=n.attrs;if(t){const r=t.length;let i=0;for(;i{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=wt({type:n,selectors:[["ng-component"]],decls:1,vars:0,template:function(t,r){1&t&&$t(0,"router-outlet")},directives:[ok],encapsulation:2}),n})();function ak(n,e=""){for(let t=0;tyr(r)===e);return t.push(...n.filter(r=>yr(r)!==e)),t}const ck={matched:!1,consumedSegments:[],lastChild:0,parameters:{},positionalParamSegments:{}};function Ch(n,e,t){var r;if(""===e.path)return"full"===e.pathMatch&&(n.hasChildren()||t.length>0)?Object.assign({},ck):{matched:!0,consumedSegments:[],lastChild:0,parameters:{},positionalParamSegments:{}};const o=(e.matcher||d9)(t,n,e);if(!o)return Object.assign({},ck);const s={};Jt(o.posParams,(l,c)=>{s[c]=l.path});const a=o.consumed.length>0?Object.assign(Object.assign({},s),o.consumed[o.consumed.length-1].parameters):s;return{matched:!0,consumedSegments:o.consumed,lastChild:o.consumed.length,parameters:a,positionalParamSegments:null!==(r=o.posParams)&&void 0!==r?r:{}}}function Eh(n,e,t,r,i="corrected"){if(t.length>0&&function t7(n,e,t){return t.some(r=>wh(n,e,r)&&yr(r)!==me)}(n,t,r)){const s=new Ce(e,function e7(n,e,t,r){const i={};i[me]=r,r._sourceSegment=n,r._segmentIndexShift=e.length;for(const o of t)if(""===o.path&&yr(o)!==me){const s=new Ce([],{});s._sourceSegment=n,s._segmentIndexShift=e.length,i[yr(o)]=s}return i}(n,e,r,new Ce(t,n.children)));return s._sourceSegment=n,s._segmentIndexShift=e.length,{segmentGroup:s,slicedSegments:[]}}if(0===t.length&&function n7(n,e,t){return t.some(r=>wh(n,e,r))}(n,t,r)){const s=new Ce(n.segments,function X9(n,e,t,r,i,o){const s={};for(const a of r)if(wh(n,t,a)&&!i[yr(a)]){const l=new Ce([],{});l._sourceSegment=n,l._segmentIndexShift="legacy"===o?n.segments.length:e.length,s[yr(a)]=l}return Object.assign(Object.assign({},i),s)}(n,e,t,r,n.children,i));return s._sourceSegment=n,s._segmentIndexShift=e.length,{segmentGroup:s,slicedSegments:t}}const o=new Ce(n.segments,n.children);return o._sourceSegment=n,o._segmentIndexShift=e.length,{segmentGroup:o,slicedSegments:t}}function wh(n,e,t){return(!(n.hasChildren()||e.length>0)||"full"!==t.pathMatch)&&""===t.path}function uk(n,e,t,r){return!!(yr(n)===r||r!==me&&wh(e,t,n))&&("**"===n.path||Ch(e,n,t).matched)}function dk(n,e,t){return 0===e.length&&!n.children[t]}class cu{constructor(e){this.segmentGroup=e||null}}class fk{constructor(e){this.urlTree=e}}function Sh(n){return new Ne(e=>e.error(new cu(n)))}function hk(n){return new Ne(e=>e.error(new fk(n)))}function r7(n){return new Ne(e=>e.error(new Error(`Only absolute redirects can have named outlets. redirectTo: '${n}'`)))}class s7{constructor(e,t,r,i,o){this.configLoader=t,this.urlSerializer=r,this.urlTree=i,this.config=o,this.allowRedirects=!0,this.ngModule=e.get(Pi)}apply(){const e=Eh(this.urlTree.root,[],[],this.config).segmentGroup,t=new Ce(e.segments,e.children);return this.expandSegmentGroup(this.ngModule,this.config,t,me).pipe(be(o=>this.createUrlTree(G_(o),this.urlTree.queryParams,this.urlTree.fragment))).pipe(Po(o=>{if(o instanceof fk)return this.allowRedirects=!1,this.match(o.urlTree);throw o instanceof cu?this.noMatchError(o):o}))}match(e){return this.expandSegmentGroup(this.ngModule,this.config,e.root,me).pipe(be(i=>this.createUrlTree(G_(i),e.queryParams,e.fragment))).pipe(Po(i=>{throw i instanceof cu?this.noMatchError(i):i}))}noMatchError(e){return new Error(`Cannot match any routes. URL Segment: '${e.segmentGroup}'`)}createUrlTree(e,t,r){const i=e.segments.length>0?new Ce([],{[me]:e}):e;return new bs(i,t,r)}expandSegmentGroup(e,t,r,i){return 0===r.segments.length&&r.hasChildren()?this.expandChildren(e,t,r).pipe(be(o=>new Ce([],o))):this.expandSegment(e,r,t,r.segments,i,!0)}expandChildren(e,t,r){const i=[];for(const o of Object.keys(r.children))"primary"===o?i.unshift(o):i.push(o);return zt(i).pipe(Qa(o=>{const s=r.children[o],a=lk(t,o);return this.expandSegmentGroup(e,a,s,o).pipe(be(l=>({segment:l,outlet:o})))}),IO((o,s)=>(o[s.outlet]=s.segment,o),{}),function Zq(n,e){const t=arguments.length>=2;return r=>r.pipe(n?_o((i,o)=>n(i,o,r)):Au,k_(1),t?xO(e):TO(()=>new fh))}())}expandSegment(e,t,r,i,o,s){return zt(r).pipe(Qa(a=>this.expandSegmentAgainstRoute(e,t,r,a,i,o,s).pipe(Po(c=>{if(c instanceof cu)return ie(null);throw c}))),Ja(a=>!!a),Po((a,l)=>{if(a instanceof fh||"EmptyError"===a.name){if(dk(t,i,o))return ie(new Ce([],{}));throw new cu(t)}throw a}))}expandSegmentAgainstRoute(e,t,r,i,o,s,a){return uk(i,t,o,s)?void 0===i.redirectTo?this.matchSegmentAgainstRoute(e,t,i,o,s):a&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(e,t,r,i,o,s):Sh(t):Sh(t)}expandSegmentAgainstRouteUsingRedirect(e,t,r,i,o,s){return"**"===i.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(e,r,i,s):this.expandRegularSegmentAgainstRouteUsingRedirect(e,t,r,i,o,s)}expandWildCardWithParamsAgainstRouteUsingRedirect(e,t,r,i){const o=this.applyRedirectCommands([],r.redirectTo,{});return r.redirectTo.startsWith("/")?hk(o):this.lineralizeSegments(r,o).pipe(Wt(s=>{const a=new Ce(s,{});return this.expandSegment(e,a,t,s,i,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(e,t,r,i,o,s){const{matched:a,consumedSegments:l,lastChild:c,positionalParamSegments:u}=Ch(t,i,o);if(!a)return Sh(t);const d=this.applyRedirectCommands(l,i.redirectTo,u);return i.redirectTo.startsWith("/")?hk(d):this.lineralizeSegments(i,d).pipe(Wt(f=>this.expandSegment(e,t,r,f.concat(o.slice(c)),s,!1)))}matchSegmentAgainstRoute(e,t,r,i,o){if("**"===r.path)return r.loadChildren?(r._loadedConfig?ie(r._loadedConfig):this.configLoader.load(e.injector,r)).pipe(be(f=>(r._loadedConfig=f,new Ce(i,{})))):ie(new Ce(i,{}));const{matched:s,consumedSegments:a,lastChild:l}=Ch(t,r,i);if(!s)return Sh(t);const c=i.slice(l);return this.getChildConfig(e,r,i).pipe(Wt(d=>{const f=d.module,h=d.routes,{segmentGroup:p,slicedSegments:g}=Eh(t,a,c,h),m=new Ce(p.segments,p.children);if(0===g.length&&m.hasChildren())return this.expandChildren(f,h,m).pipe(be(y=>new Ce(a,y)));if(0===h.length&&0===g.length)return ie(new Ce(a,{}));const _=yr(r)===o;return this.expandSegment(f,m,h,g,_?me:o,!0).pipe(be(b=>new Ce(a.concat(b.segments),b.children)))}))}getChildConfig(e,t,r){return t.children?ie(new W_(t.children,e)):t.loadChildren?void 0!==t._loadedConfig?ie(t._loadedConfig):this.runCanLoadGuards(e.injector,t,r).pipe(Wt(i=>i?this.configLoader.load(e.injector,t).pipe(be(o=>(t._loadedConfig=o,o))):function i7(n){return new Ne(e=>e.error(R_(`Cannot load children because the guard of the route "path: '${n.path}'" returned false`)))}(t))):ie(new W_([],e))}runCanLoadGuards(e,t,r){const i=t.canLoad;if(!i||0===i.length)return ie(!0);const o=i.map(s=>{const a=e.get(s);let l;if(function $9(n){return n&&Fo(n.canLoad)}(a))l=a.canLoad(t,r);else{if(!Fo(a))throw new Error("Invalid CanLoad guard");l=a(t,r)}return bi(l)});return ie(o).pipe(au(),An(s=>{if(!Cs(s))return;const a=R_(`Redirecting to "${this.urlSerializer.serialize(s)}"`);throw a.url=s,a}),be(s=>!0===s))}lineralizeSegments(e,t){let r=[],i=t.root;for(;;){if(r=r.concat(i.segments),0===i.numberOfChildren)return ie(r);if(i.numberOfChildren>1||!i.children[me])return r7(e.redirectTo);i=i.children[me]}}applyRedirectCommands(e,t,r){return this.applyRedirectCreatreUrlTree(t,this.urlSerializer.parse(t),e,r)}applyRedirectCreatreUrlTree(e,t,r,i){const o=this.createSegmentGroup(e,t.root,r,i);return new bs(o,this.createQueryParams(t.queryParams,this.urlTree.queryParams),t.fragment)}createQueryParams(e,t){const r={};return Jt(e,(i,o)=>{if("string"==typeof i&&i.startsWith(":")){const a=i.substring(1);r[o]=t[a]}else r[o]=i}),r}createSegmentGroup(e,t,r,i){const o=this.createSegments(e,t.segments,r,i);let s={};return Jt(t.children,(a,l)=>{s[l]=this.createSegmentGroup(e,a,r,i)}),new Ce(o,s)}createSegments(e,t,r,i){return t.map(o=>o.path.startsWith(":")?this.findPosParam(e,o,i):this.findOrReturn(o,r))}findPosParam(e,t,r){const i=r[t.path.substring(1)];if(!i)throw new Error(`Cannot redirect to '${e}'. Cannot find '${t.path}'.`);return i}findOrReturn(e,t){let r=0;for(const i of t){if(i.path===e.path)return t.splice(r),i;r++}return e}}function G_(n){const e={};for(const r of Object.keys(n.children)){const o=G_(n.children[r]);(o.segments.length>0||o.hasChildren())&&(e[r]=o)}return function a7(n){if(1===n.numberOfChildren&&n.children[me]){const e=n.children[me];return new Ce(n.segments.concat(e.segments),e.children)}return n}(new Ce(n.segments,e))}class pk{constructor(e){this.path=e,this.route=this.path[this.path.length-1]}}class Mh{constructor(e,t){this.component=e,this.route=t}}function c7(n,e,t){const r=n._root;return uu(r,e?e._root:null,t,[r.value])}function Ih(n,e,t){const r=function d7(n){if(!n)return null;for(let e=n.parent;e;e=e.parent){const t=e.routeConfig;if(t&&t._loadedConfig)return t._loadedConfig}return null}(e);return(r?r.module.injector:t).get(n)}function uu(n,e,t,r,i={canDeactivateChecks:[],canActivateChecks:[]}){const o=el(e);return n.children.forEach(s=>{(function f7(n,e,t,r,i={canDeactivateChecks:[],canActivateChecks:[]}){const o=n.value,s=e?e.value:null,a=t?t.getContext(n.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){const l=function h7(n,e,t){if("function"==typeof t)return t(n,e);switch(t){case"pathParamsChange":return!Ds(n.url,e.url);case"pathParamsOrQueryParamsChange":return!Ds(n.url,e.url)||!_i(n.queryParams,e.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!V_(n,e)||!_i(n.queryParams,e.queryParams);default:return!V_(n,e)}}(s,o,o.routeConfig.runGuardsAndResolvers);l?i.canActivateChecks.push(new pk(r)):(o.data=s.data,o._resolvedData=s._resolvedData),uu(n,e,o.component?a?a.children:null:t,r,i),l&&a&&a.outlet&&a.outlet.isActivated&&i.canDeactivateChecks.push(new Mh(a.outlet.component,s))}else s&&du(e,a,i),i.canActivateChecks.push(new pk(r)),uu(n,null,o.component?a?a.children:null:t,r,i)})(s,o[s.value.outlet],t,r.concat([s.value]),i),delete o[s.value.outlet]}),Jt(o,(s,a)=>du(s,t.getContext(a),i)),i}function du(n,e,t){const r=el(n),i=n.value;Jt(r,(o,s)=>{du(o,i.component?e?e.children.getContext(s):null:e,t)}),t.canDeactivateChecks.push(new Mh(i.component&&e&&e.outlet&&e.outlet.isActivated?e.outlet.component:null,i))}class C7{}function gk(n){return new Ne(e=>e.error(n))}class w7{constructor(e,t,r,i,o,s){this.rootComponentType=e,this.config=t,this.urlTree=r,this.url=i,this.paramsInheritanceStrategy=o,this.relativeLinkResolution=s}recognize(){const e=Eh(this.urlTree.root,[],[],this.config.filter(s=>void 0===s.redirectTo),this.relativeLinkResolution).segmentGroup,t=this.processSegmentGroup(this.config,e,me);if(null===t)return null;const r=new _h([],Object.freeze({}),Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,{},me,this.rootComponentType,null,this.urlTree.root,-1,{}),i=new qi(r,t),o=new JO(this.url,i);return this.inheritParamsAndData(o._root),o}inheritParamsAndData(e){const t=e.value,r=QO(t,this.paramsInheritanceStrategy);t.params=Object.freeze(r.params),t.data=Object.freeze(r.data),e.children.forEach(i=>this.inheritParamsAndData(i))}processSegmentGroup(e,t,r){return 0===t.segments.length&&t.hasChildren()?this.processChildren(e,t):this.processSegment(e,t,t.segments,r)}processChildren(e,t){const r=[];for(const o of Object.keys(t.children)){const s=t.children[o],a=lk(e,o),l=this.processSegmentGroup(a,s,o);if(null===l)return null;r.push(...l)}const i=mk(r);return function S7(n){n.sort((e,t)=>e.value.outlet===me?-1:t.value.outlet===me?1:e.value.outlet.localeCompare(t.value.outlet))}(i),i}processSegment(e,t,r,i){for(const o of e){const s=this.processSegmentAgainstRoute(o,t,r,i);if(null!==s)return s}return dk(t,r,i)?[]:null}processSegmentAgainstRoute(e,t,r,i){if(e.redirectTo||!uk(e,t,r,i))return null;let o,s=[],a=[];if("**"===e.path){const h=r.length>0?LO(r).parameters:{};o=new _h(r,h,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,_k(e),yr(e),e.component,e,vk(t),yk(t)+r.length,bk(e))}else{const h=Ch(t,e,r);if(!h.matched)return null;s=h.consumedSegments,a=r.slice(h.lastChild),o=new _h(s,h.parameters,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,_k(e),yr(e),e.component,e,vk(t),yk(t)+s.length,bk(e))}const l=function M7(n){return n.children?n.children:n.loadChildren?n._loadedConfig.routes:[]}(e),{segmentGroup:c,slicedSegments:u}=Eh(t,s,a,l.filter(h=>void 0===h.redirectTo),this.relativeLinkResolution);if(0===u.length&&c.hasChildren()){const h=this.processChildren(l,c);return null===h?null:[new qi(o,h)]}if(0===l.length&&0===u.length)return[new qi(o,[])];const d=yr(e)===i,f=this.processSegment(l,c,u,d?me:i);return null===f?null:[new qi(o,f)]}}function I7(n){const e=n.value.routeConfig;return e&&""===e.path&&void 0===e.redirectTo}function mk(n){const e=[],t=new Set;for(const r of n){if(!I7(r)){e.push(r);continue}const i=e.find(o=>r.value.routeConfig===o.value.routeConfig);void 0!==i?(i.children.push(...r.children),t.add(i)):e.push(r)}for(const r of t){const i=mk(r.children);e.push(new qi(r.value,i))}return e.filter(r=>!t.has(r))}function vk(n){let e=n;for(;e._sourceSegment;)e=e._sourceSegment;return e}function yk(n){let e=n,t=e._segmentIndexShift?e._segmentIndexShift:0;for(;e._sourceSegment;)e=e._sourceSegment,t+=e._segmentIndexShift?e._segmentIndexShift:0;return t-1}function _k(n){return n.data||{}}function bk(n){return n.resolve||{}}function Dk(n){return[...Object.keys(n),...Object.getOwnPropertySymbols(n)]}function q_(n){return yi(e=>{const t=n(e);return t?zt(t).pipe(be(()=>e)):ie(e)})}class P7 extends class R7{shouldDetach(e){return!1}store(e,t){}shouldAttach(e){return!1}retrieve(e){return null}shouldReuseRoute(e,t){return e.routeConfig===t.routeConfig}}{}const K_=new $("ROUTES");class Ck{constructor(e,t,r,i){this.injector=e,this.compiler=t,this.onLoadStartListener=r,this.onLoadEndListener=i}load(e,t){if(t._loader$)return t._loader$;this.onLoadStartListener&&this.onLoadStartListener(t);const i=this.loadModuleFactory(t.loadChildren).pipe(be(o=>{this.onLoadEndListener&&this.onLoadEndListener(t);const s=o.create(e);return new W_(FO(s.injector.get(K_,void 0,ce.Self|ce.Optional)).map($_),s)}),Po(o=>{throw t._loader$=void 0,o}));return t._loader$=new Rb(i,()=>new Me).pipe(yp()),t._loader$}loadModuleFactory(e){return bi(e()).pipe(Wt(t=>t instanceof dw?ie(t):zt(this.compiler.compileModuleAsync(t))))}}class L7{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,t){return e}}function B7(n){throw n}function j7(n,e,t){return e.parse("/")}function Ek(n,e){return ie(null)}const V7={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},H7={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let Yn=(()=>{class n{constructor(t,r,i,o,s,a,l){this.rootComponentType=t,this.urlSerializer=r,this.rootContexts=i,this.location=o,this.config=l,this.lastSuccessfulNavigation=null,this.currentNavigation=null,this.disposed=!1,this.navigationId=0,this.currentPageId=0,this.isNgZoneEnabled=!1,this.events=new Me,this.errorHandler=B7,this.malformedUriErrorHandler=j7,this.navigated=!1,this.lastSuccessfulId=-1,this.hooks={beforePreactivation:Ek,afterPreactivation:Ek},this.urlHandlingStrategy=new L7,this.routeReuseStrategy=new P7,this.onSameUrlNavigation="ignore",this.paramsInheritanceStrategy="emptyOnly",this.urlUpdateStrategy="deferred",this.relativeLinkResolution="corrected",this.canceledNavigationResolution="replace",this.ngModule=s.get(Pi),this.console=s.get(Kw);const d=s.get(ot);this.isNgZoneEnabled=d instanceof ot&&ot.isInAngularZone(),this.resetConfig(l),this.currentUrlTree=function h9(){return new bs(new Ce([],{}),{},null)}(),this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.configLoader=new Ck(s,a,f=>this.triggerEvent(new OO(f)),f=>this.triggerEvent(new kO(f))),this.routerState=YO(this.currentUrlTree,this.rootComponentType),this.transitions=new Hr({id:0,targetPageId:0,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,extractedUrl:this.urlHandlingStrategy.extract(this.currentUrlTree),urlAfterRedirects:this.urlHandlingStrategy.extract(this.currentUrlTree),rawUrl:this.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:"imperative",restoredState:null,currentSnapshot:this.routerState.snapshot,targetSnapshot:null,currentRouterState:this.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.navigations=this.setupNavigations(this.transitions),this.processNavigations()}get browserPageId(){var t;return null===(t=this.location.getState())||void 0===t?void 0:t.\u0275routerPageId}setupNavigations(t){const r=this.events;return t.pipe(_o(i=>0!==i.id),be(i=>Object.assign(Object.assign({},i),{extractedUrl:this.urlHandlingStrategy.extract(i.rawUrl)})),yi(i=>{let o=!1,s=!1;return ie(i).pipe(An(a=>{this.currentNavigation={id:a.id,initialUrl:a.currentRawUrl,extractedUrl:a.extractedUrl,trigger:a.source,extras:a.extras,previousNavigation:this.lastSuccessfulNavigation?Object.assign(Object.assign({},this.lastSuccessfulNavigation),{previousNavigation:null}):null}}),yi(a=>{const l=this.browserUrlTree.toString(),c=!this.navigated||a.extractedUrl.toString()!==l||l!==this.currentUrlTree.toString();if(("reload"===this.onSameUrlNavigation||c)&&this.urlHandlingStrategy.shouldProcessUrl(a.rawUrl))return Th(a.source)&&(this.browserUrlTree=a.extractedUrl),ie(a).pipe(yi(d=>{const f=this.transitions.getValue();return r.next(new N_(d.id,this.serializeUrl(d.extractedUrl),d.source,d.restoredState)),f!==this.transitions.getValue()?Ya:Promise.resolve(d)}),function l7(n,e,t,r){return yi(i=>function o7(n,e,t,r,i){return new s7(n,e,t,r,i).apply()}(n,e,t,i.extractedUrl,r).pipe(be(o=>Object.assign(Object.assign({},i),{urlAfterRedirects:o}))))}(this.ngModule.injector,this.configLoader,this.urlSerializer,this.config),An(d=>{this.currentNavigation=Object.assign(Object.assign({},this.currentNavigation),{finalUrl:d.urlAfterRedirects})}),function T7(n,e,t,r,i){return Wt(o=>function E7(n,e,t,r,i="emptyOnly",o="legacy"){try{const s=new w7(n,e,t,r,i,o).recognize();return null===s?gk(new C7):ie(s)}catch(s){return gk(s)}}(n,e,o.urlAfterRedirects,t(o.urlAfterRedirects),r,i).pipe(be(s=>Object.assign(Object.assign({},o),{targetSnapshot:s}))))}(this.rootComponentType,this.config,d=>this.serializeUrl(d),this.paramsInheritanceStrategy,this.relativeLinkResolution),An(d=>{if("eager"===this.urlUpdateStrategy){if(!d.extras.skipLocationChange){const h=this.urlHandlingStrategy.merge(d.urlAfterRedirects,d.rawUrl);this.setBrowserUrl(h,d)}this.browserUrlTree=d.urlAfterRedirects}const f=new e9(d.id,this.serializeUrl(d.extractedUrl),this.serializeUrl(d.urlAfterRedirects),d.targetSnapshot);r.next(f)}));if(c&&this.rawUrlTree&&this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree)){const{id:f,extractedUrl:h,source:p,restoredState:g,extras:m}=a,_=new N_(f,this.serializeUrl(h),p,g);r.next(_);const v=YO(h,this.rootComponentType).snapshot;return ie(Object.assign(Object.assign({},a),{targetSnapshot:v,urlAfterRedirects:h,extras:Object.assign(Object.assign({},m),{skipLocationChange:!1,replaceUrl:!1})}))}return this.rawUrlTree=a.rawUrl,a.resolve(null),Ya}),q_(a=>{const{targetSnapshot:l,id:c,extractedUrl:u,rawUrl:d,extras:{skipLocationChange:f,replaceUrl:h}}=a;return this.hooks.beforePreactivation(l,{navigationId:c,appliedUrlTree:u,rawUrlTree:d,skipLocationChange:!!f,replaceUrl:!!h})}),An(a=>{const l=new t9(a.id,this.serializeUrl(a.extractedUrl),this.serializeUrl(a.urlAfterRedirects),a.targetSnapshot);this.triggerEvent(l)}),be(a=>Object.assign(Object.assign({},a),{guards:c7(a.targetSnapshot,a.currentSnapshot,this.rootContexts)})),function p7(n,e){return Wt(t=>{const{targetSnapshot:r,currentSnapshot:i,guards:{canActivateChecks:o,canDeactivateChecks:s}}=t;return 0===s.length&&0===o.length?ie(Object.assign(Object.assign({},t),{guardsResult:!0})):function g7(n,e,t,r){return zt(n).pipe(Wt(i=>function D7(n,e,t,r,i){const o=e&&e.routeConfig?e.routeConfig.canDeactivate:null;return o&&0!==o.length?ie(o.map(a=>{const l=Ih(a,e,i);let c;if(function K9(n){return n&&Fo(n.canDeactivate)}(l))c=bi(l.canDeactivate(n,e,t,r));else{if(!Fo(l))throw new Error("Invalid CanDeactivate guard");c=bi(l(n,e,t,r))}return c.pipe(Ja())})).pipe(au()):ie(!0)}(i.component,i.route,t,e,r)),Ja(i=>!0!==i,!0))}(s,r,i,n).pipe(Wt(a=>a&&function W9(n){return"boolean"==typeof n}(a)?function m7(n,e,t,r){return zt(e).pipe(Qa(i=>O_(function y7(n,e){return null!==n&&e&&e(new o9(n)),ie(!0)}(i.route.parent,r),function v7(n,e){return null!==n&&e&&e(new a9(n)),ie(!0)}(i.route,r),function b7(n,e,t){const r=e[e.length-1],o=e.slice(0,e.length-1).reverse().map(s=>function u7(n){const e=n.routeConfig?n.routeConfig.canActivateChild:null;return e&&0!==e.length?{node:n,guards:e}:null}(s)).filter(s=>null!==s).map(s=>SO(()=>ie(s.guards.map(l=>{const c=Ih(l,s.node,t);let u;if(function q9(n){return n&&Fo(n.canActivateChild)}(c))u=bi(c.canActivateChild(r,n));else{if(!Fo(c))throw new Error("Invalid CanActivateChild guard");u=bi(c(r,n))}return u.pipe(Ja())})).pipe(au())));return ie(o).pipe(au())}(n,i.path,t),function _7(n,e,t){const r=e.routeConfig?e.routeConfig.canActivate:null;if(!r||0===r.length)return ie(!0);const i=r.map(o=>SO(()=>{const s=Ih(o,e,t);let a;if(function G9(n){return n&&Fo(n.canActivate)}(s))a=bi(s.canActivate(e,n));else{if(!Fo(s))throw new Error("Invalid CanActivate guard");a=bi(s(e,n))}return a.pipe(Ja())}));return ie(i).pipe(au())}(n,i.route,t))),Ja(i=>!0!==i,!0))}(r,o,n,e):ie(a)),be(a=>Object.assign(Object.assign({},t),{guardsResult:a})))})}(this.ngModule.injector,a=>this.triggerEvent(a)),An(a=>{if(Cs(a.guardsResult)){const c=R_(`Redirecting to "${this.serializeUrl(a.guardsResult)}"`);throw c.url=a.guardsResult,c}const l=new n9(a.id,this.serializeUrl(a.extractedUrl),this.serializeUrl(a.urlAfterRedirects),a.targetSnapshot,!!a.guardsResult);this.triggerEvent(l)}),_o(a=>!!a.guardsResult||(this.restoreHistory(a),this.cancelNavigationTransition(a,""),!1)),q_(a=>{if(a.guards.canActivateChecks.length)return ie(a).pipe(An(l=>{const c=new r9(l.id,this.serializeUrl(l.extractedUrl),this.serializeUrl(l.urlAfterRedirects),l.targetSnapshot);this.triggerEvent(c)}),yi(l=>{let c=!1;return ie(l).pipe(function x7(n,e){return Wt(t=>{const{targetSnapshot:r,guards:{canActivateChecks:i}}=t;if(!i.length)return ie(t);let o=0;return zt(i).pipe(Qa(s=>function A7(n,e,t,r){return function O7(n,e,t,r){const i=Dk(n);if(0===i.length)return ie({});const o={};return zt(i).pipe(Wt(s=>function k7(n,e,t,r){const i=Ih(n,e,r);return bi(i.resolve?i.resolve(e,t):i(e,t))}(n[s],e,t,r).pipe(An(a=>{o[s]=a}))),k_(1),Wt(()=>Dk(o).length===i.length?ie(o):Ya))}(n._resolve,n,e,r).pipe(be(o=>(n._resolvedData=o,n.data=Object.assign(Object.assign({},n.data),QO(n,t).resolve),null)))}(s.route,r,n,e)),An(()=>o++),k_(1),Wt(s=>o===i.length?ie(t):Ya))})}(this.paramsInheritanceStrategy,this.ngModule.injector),An({next:()=>c=!0,complete:()=>{c||(this.restoreHistory(l),this.cancelNavigationTransition(l,"At least one route resolver didn't emit any value."))}}))}),An(l=>{const c=new i9(l.id,this.serializeUrl(l.extractedUrl),this.serializeUrl(l.urlAfterRedirects),l.targetSnapshot);this.triggerEvent(c)}))}),q_(a=>{const{targetSnapshot:l,id:c,extractedUrl:u,rawUrl:d,extras:{skipLocationChange:f,replaceUrl:h}}=a;return this.hooks.afterPreactivation(l,{navigationId:c,appliedUrlTree:u,rawUrlTree:d,skipLocationChange:!!f,replaceUrl:!!h})}),be(a=>{const l=function O9(n,e,t){const r=iu(n,e._root,t?t._root:void 0);return new ZO(r,e)}(this.routeReuseStrategy,a.targetSnapshot,a.currentRouterState);return Object.assign(Object.assign({},a),{targetRouterState:l})}),An(a=>{this.currentUrlTree=a.urlAfterRedirects,this.rawUrlTree=this.urlHandlingStrategy.merge(a.urlAfterRedirects,a.rawUrl),this.routerState=a.targetRouterState,"deferred"===this.urlUpdateStrategy&&(a.extras.skipLocationChange||this.setBrowserUrl(this.rawUrlTree,a),this.browserUrlTree=a.urlAfterRedirects)}),((n,e,t)=>be(r=>(new U9(e,r.targetRouterState,r.currentRouterState,t).activate(n),r)))(this.rootContexts,this.routeReuseStrategy,a=>this.triggerEvent(a)),An({next(){o=!0},complete(){o=!0}}),function Yq(n){return e=>e.lift(new Qq(n))}(()=>{var a;o||s||this.cancelNavigationTransition(i,`Navigation ID ${i.id} is not equal to the current navigation id ${this.navigationId}`),(null===(a=this.currentNavigation)||void 0===a?void 0:a.id)===i.id&&(this.currentNavigation=null)}),Po(a=>{if(s=!0,function u9(n){return n&&n[RO]}(a)){const l=Cs(a.url);l||(this.navigated=!0,this.restoreHistory(i,!0));const c=new AO(i.id,this.serializeUrl(i.extractedUrl),a.message);r.next(c),l?setTimeout(()=>{const u=this.urlHandlingStrategy.merge(a.url,this.rawUrlTree),d={skipLocationChange:i.extras.skipLocationChange,replaceUrl:"eager"===this.urlUpdateStrategy||Th(i.source)};this.scheduleNavigation(u,"imperative",null,d,{resolve:i.resolve,reject:i.reject,promise:i.promise})},0):i.resolve(!1)}else{this.restoreHistory(i,!0);const l=new Xq(i.id,this.serializeUrl(i.extractedUrl),a);r.next(l);try{i.resolve(this.errorHandler(a))}catch(c){i.reject(c)}}return Ya}))}))}resetRootComponentType(t){this.rootComponentType=t,this.routerState.root.component=this.rootComponentType}setTransition(t){this.transitions.next(Object.assign(Object.assign({},this.transitions.value),t))}initialNavigation(){this.setUpLocationChangeListener(),0===this.navigationId&&this.navigateByUrl(this.location.path(!0),{replaceUrl:!0})}setUpLocationChangeListener(){this.locationSubscription||(this.locationSubscription=this.location.subscribe(t=>{const r="popstate"===t.type?"popstate":"hashchange";"popstate"===r&&setTimeout(()=>{var i;const o={replaceUrl:!0},s=(null===(i=t.state)||void 0===i?void 0:i.navigationId)?t.state:null;if(s){const l=Object.assign({},s);delete l.navigationId,delete l.\u0275routerPageId,0!==Object.keys(l).length&&(o.state=l)}const a=this.parseUrl(t.url);this.scheduleNavigation(a,r,s,o)},0)}))}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.currentNavigation}triggerEvent(t){this.events.next(t)}resetConfig(t){ak(t),this.config=t.map($_),this.navigated=!1,this.lastSuccessfulId=-1}ngOnDestroy(){this.dispose()}dispose(){this.transitions.complete(),this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0),this.disposed=!0}createUrlTree(t,r={}){const{relativeTo:i,queryParams:o,fragment:s,queryParamsHandling:a,preserveFragment:l}=r,c=i||this.routerState.root,u=l?this.currentUrlTree.fragment:s;let d=null;switch(a){case"merge":d=Object.assign(Object.assign({},this.currentUrlTree.queryParams),o);break;case"preserve":d=this.currentUrlTree.queryParams;break;default:d=o||null}return null!==d&&(d=this.removeEmptyProps(d)),function R9(n,e,t,r,i){if(0===t.length)return H_(e.root,e.root,e,r,i);const o=function P9(n){if("string"==typeof n[0]&&1===n.length&&"/"===n[0])return new tk(!0,0,n);let e=0,t=!1;const r=n.reduce((i,o,s)=>{if("object"==typeof o&&null!=o){if(o.outlets){const a={};return Jt(o.outlets,(l,c)=>{a[c]="string"==typeof l?l.split("/"):l}),[...i,{outlets:a}]}if(o.segmentPath)return[...i,o.segmentPath]}return"string"!=typeof o?[...i,o]:0===s?(o.split("/").forEach((a,l)=>{0==l&&"."===a||(0==l&&""===a?t=!0:".."===a?e++:""!=a&&i.push(a))}),i):[...i,o]},[]);return new tk(t,e,r)}(t);if(o.toRoot())return H_(e.root,new Ce([],{}),e,r,i);const s=function F9(n,e,t){if(n.isAbsolute)return new U_(e.root,!0,0);if(-1===t.snapshot._lastPathIndex){const o=t.snapshot._urlSegment;return new U_(o,o===e.root,0)}const r=bh(n.commands[0])?0:1;return function L9(n,e,t){let r=n,i=e,o=t;for(;o>i;){if(o-=i,r=r.parent,!r)throw new Error("Invalid number of '../'");i=r.segments.length}return new U_(r,!1,i-o)}(t.snapshot._urlSegment,t.snapshot._lastPathIndex+r,n.numberOfDoubleDots)}(o,e,n),a=s.processChildren?Dh(s.segmentGroup,s.index,o.commands):nk(s.segmentGroup,s.index,o.commands);return H_(s.segmentGroup,a,e,r,i)}(c,this.currentUrlTree,t,d,null!=u?u:null)}navigateByUrl(t,r={skipLocationChange:!1}){const i=Cs(t)?t:this.parseUrl(t),o=this.urlHandlingStrategy.merge(i,this.rawUrlTree);return this.scheduleNavigation(o,"imperative",null,r)}navigate(t,r={skipLocationChange:!1}){return function U7(n){for(let e=0;e{const o=t[i];return null!=o&&(r[i]=o),r},{})}processNavigations(){this.navigations.subscribe(t=>{this.navigated=!0,this.lastSuccessfulId=t.id,this.currentPageId=t.targetPageId,this.events.next(new tu(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(this.currentUrlTree))),this.lastSuccessfulNavigation=this.currentNavigation,t.resolve(!0)},t=>{this.console.warn(`Unhandled Navigation Error: ${t}`)})}scheduleNavigation(t,r,i,o,s){var a,l,c;if(this.disposed)return Promise.resolve(!1);const u=this.transitions.value,d=Th(r)&&u&&!Th(u.source),f=u.rawUrl.toString()===t.toString(),h=u.id===(null===(a=this.currentNavigation)||void 0===a?void 0:a.id);if(d&&f&&h)return Promise.resolve(!0);let g,m,_;s?(g=s.resolve,m=s.reject,_=s.promise):_=new Promise((y,D)=>{g=y,m=D});const v=++this.navigationId;let b;return"computed"===this.canceledNavigationResolution?(0===this.currentPageId&&(i=this.location.getState()),b=i&&i.\u0275routerPageId?i.\u0275routerPageId:o.replaceUrl||o.skipLocationChange?null!==(l=this.browserPageId)&&void 0!==l?l:0:(null!==(c=this.browserPageId)&&void 0!==c?c:0)+1):b=0,this.setTransition({id:v,targetPageId:b,source:r,restoredState:i,currentUrlTree:this.currentUrlTree,currentRawUrl:this.rawUrlTree,rawUrl:t,extras:o,resolve:g,reject:m,promise:_,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),_.catch(y=>Promise.reject(y))}setBrowserUrl(t,r){const i=this.urlSerializer.serialize(t),o=Object.assign(Object.assign({},r.extras.state),this.generateNgRouterState(r.id,r.targetPageId));this.location.isCurrentPathEqualTo(i)||r.extras.replaceUrl?this.location.replaceState(i,"",o):this.location.go(i,"",o)}restoreHistory(t,r=!1){var i,o;if("computed"===this.canceledNavigationResolution){const s=this.currentPageId-t.targetPageId;"popstate"!==t.source&&"eager"!==this.urlUpdateStrategy&&this.currentUrlTree!==(null===(i=this.currentNavigation)||void 0===i?void 0:i.finalUrl)||0===s?this.currentUrlTree===(null===(o=this.currentNavigation)||void 0===o?void 0:o.finalUrl)&&0===s&&(this.resetState(t),this.browserUrlTree=t.currentUrlTree,this.resetUrlToCurrentUrlTree()):this.location.historyGo(s)}else"replace"===this.canceledNavigationResolution&&(r&&this.resetState(t),this.resetUrlToCurrentUrlTree())}resetState(t){this.routerState=t.currentRouterState,this.currentUrlTree=t.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,t.rawUrl)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}cancelNavigationTransition(t,r){const i=new AO(t.id,this.serializeUrl(t.extractedUrl),r);this.triggerEvent(i),t.resolve(!1)}generateNgRouterState(t,r){return"computed"===this.canceledNavigationResolution?{navigationId:t,\u0275routerPageId:r}:{navigationId:t}}}return n.\u0275fac=function(t){sm()},n.\u0275prov=W({token:n,factory:n.\u0275fac}),n})();function Th(n){return"imperative"!==n}class wk{}class Sk{preload(e,t){return ie(null)}}let Mk=(()=>{class n{constructor(t,r,i,o){this.router=t,this.injector=i,this.preloadingStrategy=o,this.loader=new Ck(i,r,l=>t.triggerEvent(new OO(l)),l=>t.triggerEvent(new kO(l)))}setUpPreloading(){this.subscription=this.router.events.pipe(_o(t=>t instanceof tu),Qa(()=>this.preload())).subscribe(()=>{})}preload(){const t=this.injector.get(Pi);return this.processRoutes(t,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(t,r){const i=[];for(const o of r)if(o.loadChildren&&!o.canLoad&&o._loadedConfig){const s=o._loadedConfig;i.push(this.processRoutes(s.module,s.routes))}else o.loadChildren&&!o.canLoad?i.push(this.preloadConfig(t,o)):o.children&&i.push(this.processRoutes(t,o.children));return zt(i).pipe(bl(),be(o=>{}))}preloadConfig(t,r){return this.preloadingStrategy.preload(r,()=>(r._loadedConfig?ie(r._loadedConfig):this.loader.load(t.injector,r)).pipe(Wt(o=>(r._loadedConfig=o,this.processRoutes(o.module,o.routes)))))}}return n.\u0275fac=function(t){return new(t||n)(R(Yn),R(Rd),R(_t),R(wk))},n.\u0275prov=W({token:n,factory:n.\u0275fac}),n})(),Q_=(()=>{class n{constructor(t,r,i={}){this.router=t,this.viewportScroller=r,this.options=i,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},i.scrollPositionRestoration=i.scrollPositionRestoration||"disabled",i.anchorScrolling=i.anchorScrolling||"disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.router.events.subscribe(t=>{t instanceof N_?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=t.navigationTrigger,this.restoredId=t.restoredState?t.restoredState.navigationId:0):t instanceof tu&&(this.lastId=t.id,this.scheduleScrollEvent(t,this.router.parseUrl(t.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.router.events.subscribe(t=>{t instanceof NO&&(t.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(t.position):t.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(t.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(t,r){this.router.triggerEvent(new NO(t,"popstate"===this.lastSource?this.store[this.restoredId]:null,r))}ngOnDestroy(){this.routerEventsSubscription&&this.routerEventsSubscription.unsubscribe(),this.scrollEventsSubscription&&this.scrollEventsSubscription.unsubscribe()}}return n.\u0275fac=function(t){sm()},n.\u0275prov=W({token:n,factory:n.\u0275fac}),n})();const Es=new $("ROUTER_CONFIGURATION"),Ik=new $("ROUTER_FORROOT_GUARD"),G7=[Km,{provide:zO,useClass:WO},{provide:Yn,useFactory:function Q7(n,e,t,r,i,o,s={},a,l){const c=new Yn(null,n,e,t,r,i,FO(o));return a&&(c.urlHandlingStrategy=a),l&&(c.routeReuseStrategy=l),function J7(n,e){n.errorHandler&&(e.errorHandler=n.errorHandler),n.malformedUriErrorHandler&&(e.malformedUriErrorHandler=n.malformedUriErrorHandler),n.onSameUrlNavigation&&(e.onSameUrlNavigation=n.onSameUrlNavigation),n.paramsInheritanceStrategy&&(e.paramsInheritanceStrategy=n.paramsInheritanceStrategy),n.relativeLinkResolution&&(e.relativeLinkResolution=n.relativeLinkResolution),n.urlUpdateStrategy&&(e.urlUpdateStrategy=n.urlUpdateStrategy),n.canceledNavigationResolution&&(e.canceledNavigationResolution=n.canceledNavigationResolution)}(s,c),s.enableTracing&&c.events.subscribe(u=>{var d,f;null===(d=console.group)||void 0===d||d.call(console,`Router Event: ${u.constructor.name}`),console.log(u.toString()),console.log(u),null===(f=console.groupEnd)||void 0===f||f.call(console)}),c},deps:[zO,lu,Km,_t,Rd,K_,Es,[class F7{},new Zr],[class N7{},new Zr]]},lu,{provide:tl,useFactory:function X7(n){return n.routerState.root},deps:[Yn]},Mk,Sk,class $7{preload(e,t){return t().pipe(Po(()=>ie(null)))}},{provide:Es,useValue:{enableTracing:!1}}];function q7(){return new eS("Router",Yn)}let Tk=(()=>{class n{constructor(t,r){}static forRoot(t,r){return{ngModule:n,providers:[G7,xk(t),{provide:Ik,useFactory:Y7,deps:[[Yn,new Zr,new Ks]]},{provide:Es,useValue:r||{}},{provide:Ma,useFactory:Z7,deps:[ns,[new qs(qm),new Zr],Es]},{provide:Q_,useFactory:K7,deps:[Yn,jH,Es]},{provide:wk,useExisting:r&&r.preloadingStrategy?r.preloadingStrategy:Sk},{provide:eS,multi:!0,useFactory:q7},[J_,{provide:Nd,multi:!0,useFactory:eK,deps:[J_]},{provide:Ak,useFactory:tK,deps:[J_]},{provide:qw,multi:!0,useExisting:Ak}]]}}static forChild(t){return{ngModule:n,providers:[xk(t)]}}}return n.\u0275fac=function(t){return new(t||n)(R(Ik,8),R(Yn,8))},n.\u0275mod=ut({type:n}),n.\u0275inj=at({}),n})();function K7(n,e,t){return t.scrollOffset&&e.setOffset(t.scrollOffset),new Q_(n,e,t)}function Z7(n,e,t={}){return t.useHash?new S2(n,e):new bS(n,e)}function Y7(n){return"guarded"}function xk(n){return[{provide:aR,multi:!0,useValue:n},{provide:K_,multi:!0,useValue:n}]}let J_=(()=>{class n{constructor(t){this.injector=t,this.initNavigation=!1,this.destroyed=!1,this.resultOfPreactivationDone=new Me}appInitializer(){return this.injector.get(C2,Promise.resolve(null)).then(()=>{if(this.destroyed)return Promise.resolve(!0);let r=null;const i=new Promise(a=>r=a),o=this.injector.get(Yn),s=this.injector.get(Es);return"disabled"===s.initialNavigation?(o.setUpLocationChangeListener(),r(!0)):"enabled"===s.initialNavigation||"enabledBlocking"===s.initialNavigation?(o.hooks.afterPreactivation=()=>this.initNavigation?ie(null):(this.initNavigation=!0,r(!0),this.resultOfPreactivationDone),o.initialNavigation()):r(!0),i})}bootstrapListener(t){const r=this.injector.get(Es),i=this.injector.get(Mk),o=this.injector.get(Q_),s=this.injector.get(Yn),a=this.injector.get(Xo);t===a.components[0]&&(("enabledNonBlocking"===r.initialNavigation||void 0===r.initialNavigation)&&s.initialNavigation(),i.setUpPreloading(),o.init(),s.resetRootComponentType(a.componentTypes[0]),this.resultOfPreactivationDone.next(null),this.resultOfPreactivationDone.complete())}ngOnDestroy(){this.destroyed=!0}}return n.\u0275fac=function(t){return new(t||n)(R(_t))},n.\u0275prov=W({token:n,factory:n.\u0275fac}),n})();function eK(n){return n.appInitializer.bind(n)}function tK(n){return n.bootstrapListener.bind(n)}const Ak=new $("Router Initializer");let Ok=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=ut({type:n}),n.\u0275inj=at({imports:[[Pr]]}),n})(),MK=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=ut({type:n}),n.\u0275inj=at({imports:[[Pr,Tk,pf,Ok],Tk,Ok]}),n})();function IK(n,e){1&n&&_n(0)}function TK(n,e){if(1&n&&(H(0,"div",8),Ni(1,1),G(2,IK,1,0,"ng-container",6),z()),2&n){const t=U();N(2),k("ngTemplateOutlet",t.headerTemplate)}}function xK(n,e){1&n&&_n(0)}function AK(n,e){if(1&n&&(H(0,"div",9),Ze(1),G(2,xK,1,0,"ng-container",6),z()),2&n){const t=U();N(1),uo(" ",t.header," "),N(1),k("ngTemplateOutlet",t.titleTemplate)}}function OK(n,e){1&n&&_n(0)}function kK(n,e){if(1&n&&(H(0,"div",10),Ze(1),G(2,OK,1,0,"ng-container",6),z()),2&n){const t=U();N(1),uo(" ",t.subheader," "),N(1),k("ngTemplateOutlet",t.subtitleTemplate)}}function NK(n,e){1&n&&_n(0)}function RK(n,e){1&n&&_n(0)}function PK(n,e){if(1&n&&(H(0,"div",11),Ni(1,2),G(2,RK,1,0,"ng-container",6),z()),2&n){const t=U();N(2),k("ngTemplateOutlet",t.footerTemplate)}}const FK=["*",[["p-header"]],[["p-footer"]]],LK=["*","p-header","p-footer"];let BK=(()=>{class n{constructor(t){this.el=t}ngAfterContentInit(){this.templates.forEach(t=>{switch(t.getType()){case"header":this.headerTemplate=t.template;break;case"title":this.titleTemplate=t.template;break;case"subtitle":this.subtitleTemplate=t.template;break;case"content":default:this.contentTemplate=t.template;break;case"footer":this.footerTemplate=t.template}})}getBlockableElement(){return this.el.nativeElement.children[0]}}return n.\u0275fac=function(t){return new(t||n)(S(bt))},n.\u0275cmp=wt({type:n,selectors:[["p-card"]],contentQueries:function(t,r,i){if(1&t&&(si(i,cI,5),si(i,uI,5),si(i,jv,4)),2&t){let o;$n(o=Gn())&&(r.headerFacet=o.first),$n(o=Gn())&&(r.footerFacet=o.first),$n(o=Gn())&&(r.templates=o)}},hostAttrs:[1,"p-element"],inputs:{header:"header",subheader:"subheader",style:"style",styleClass:"styleClass"},ngContentSelectors:LK,decls:9,vars:9,consts:[[3,"ngClass","ngStyle"],["class","p-card-header",4,"ngIf"],[1,"p-card-body"],["class","p-card-title",4,"ngIf"],["class","p-card-subtitle",4,"ngIf"],[1,"p-card-content"],[4,"ngTemplateOutlet"],["class","p-card-footer",4,"ngIf"],[1,"p-card-header"],[1,"p-card-title"],[1,"p-card-subtitle"],[1,"p-card-footer"]],template:function(t,r){1&t&&(ma(FK),H(0,"div",0),G(1,TK,3,1,"div",1),H(2,"div",2),G(3,AK,3,2,"div",3),G(4,kK,3,2,"div",4),H(5,"div",5),Ni(6),G(7,NK,1,0,"ng-container",6),z(),G(8,PK,3,1,"div",7),z()()),2&t&&(_d(r.styleClass),k("ngClass","p-card p-component")("ngStyle",r.style),N(1),k("ngIf",r.headerFacet||r.headerTemplate),N(2),k("ngIf",r.header||r.titleTemplate),N(1),k("ngIf",r.subheader||r.subtitleTemplate),N(3),k("ngTemplateOutlet",r.contentTemplate),N(1),k("ngIf",r.footerFacet||r.footerTemplate))},directives:[fc,ov,ho,sv],styles:[".p-card-header img{width:100%}\n"],encapsulation:2,changeDetection:0}),n})(),jK=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=ut({type:n}),n.\u0275inj=at({imports:[[Pr],_c]}),n})();function xh(...n){const e=n.length;if(0===e)throw new Error("list of properties cannot be empty.");return t=>be(function VK(n,e){return r=>{let i=r;for(let o=0;o{this.headers=new Map,e.split("\n").forEach(t=>{const r=t.indexOf(":");if(r>0){const i=t.slice(0,r),o=i.toLowerCase(),s=t.slice(r+1).trim();this.maybeSetNormalizedName(i,o),this.headers.has(o)?this.headers.get(o).push(s):this.headers.set(o,[s])}})}:()=>{this.headers=new Map,Object.keys(e).forEach(t=>{let r=e[t];const i=t.toLowerCase();"string"==typeof r&&(r=[r]),r.length>0&&(this.headers.set(i,r),this.maybeSetNormalizedName(t,i))})}:this.headers=new Map}has(e){return this.init(),this.headers.has(e.toLowerCase())}get(e){this.init();const t=this.headers.get(e.toLowerCase());return t&&t.length>0?t[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(e){return this.init(),this.headers.get(e.toLowerCase())||null}append(e,t){return this.clone({name:e,value:t,op:"a"})}set(e,t){return this.clone({name:e,value:t,op:"s"})}delete(e,t){return this.clone({name:e,value:t,op:"d"})}maybeSetNormalizedName(e,t){this.normalizedNames.has(t)||this.normalizedNames.set(t,e)}init(){this.lazyInit&&(this.lazyInit instanceof Ur?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(e=>this.applyUpdate(e)),this.lazyUpdate=null))}copyFrom(e){e.init(),Array.from(e.headers.keys()).forEach(t=>{this.headers.set(t,e.headers.get(t)),this.normalizedNames.set(t,e.normalizedNames.get(t))})}clone(e){const t=new Ur;return t.lazyInit=this.lazyInit&&this.lazyInit instanceof Ur?this.lazyInit:this,t.lazyUpdate=(this.lazyUpdate||[]).concat([e]),t}applyUpdate(e){const t=e.name.toLowerCase();switch(e.op){case"a":case"s":let r=e.value;if("string"==typeof r&&(r=[r]),0===r.length)return;this.maybeSetNormalizedName(e.name,t);const i=("a"===e.op?this.headers.get(t):void 0)||[];i.push(...r),this.headers.set(t,i);break;case"d":const o=e.value;if(o){let s=this.headers.get(t);if(!s)return;s=s.filter(a=>-1===o.indexOf(a)),0===s.length?(this.headers.delete(t),this.normalizedNames.delete(t)):this.headers.set(t,s)}else this.headers.delete(t),this.normalizedNames.delete(t)}}forEach(e){this.init(),Array.from(this.normalizedNames.keys()).forEach(t=>e(this.normalizedNames.get(t),this.headers.get(t)))}}class HK{encodeKey(e){return Pk(e)}encodeValue(e){return Pk(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}}const zK=/%(\d[a-f0-9])/gi,WK={40:"@","3A":":",24:"$","2C":",","3B":";","2B":"+","3D":"=","3F":"?","2F":"/"};function Pk(n){return encodeURIComponent(n).replace(zK,(e,t)=>{var r;return null!==(r=WK[t])&&void 0!==r?r:e})}function Fk(n){return`${n}`}class Lo{constructor(e={}){if(this.updates=null,this.cloneFrom=null,this.encoder=e.encoder||new HK,e.fromString){if(e.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function UK(n,e){const t=new Map;return n.length>0&&n.replace(/^\?/,"").split("&").forEach(i=>{const o=i.indexOf("="),[s,a]=-1==o?[e.decodeKey(i),""]:[e.decodeKey(i.slice(0,o)),e.decodeValue(i.slice(o+1))],l=t.get(s)||[];l.push(a),t.set(s,l)}),t}(e.fromString,this.encoder)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach(t=>{const r=e.fromObject[t];this.map.set(t,Array.isArray(r)?r:[r])})):this.map=null}has(e){return this.init(),this.map.has(e)}get(e){this.init();const t=this.map.get(e);return t?t[0]:null}getAll(e){return this.init(),this.map.get(e)||null}keys(){return this.init(),Array.from(this.map.keys())}append(e,t){return this.clone({param:e,value:t,op:"a"})}appendAll(e){const t=[];return Object.keys(e).forEach(r=>{const i=e[r];Array.isArray(i)?i.forEach(o=>{t.push({param:r,value:o,op:"a"})}):t.push({param:r,value:i,op:"a"})}),this.clone(t)}set(e,t){return this.clone({param:e,value:t,op:"s"})}delete(e,t){return this.clone({param:e,value:t,op:"d"})}toString(){return this.init(),this.keys().map(e=>{const t=this.encoder.encodeKey(e);return this.map.get(e).map(r=>t+"="+this.encoder.encodeValue(r)).join("&")}).filter(e=>""!==e).join("&")}clone(e){const t=new Lo({encoder:this.encoder});return t.cloneFrom=this.cloneFrom||this,t.updates=(this.updates||[]).concat(e),t}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(e=>this.map.set(e,this.cloneFrom.map.get(e))),this.updates.forEach(e=>{switch(e.op){case"a":case"s":const t=("a"===e.op?this.map.get(e.param):void 0)||[];t.push(Fk(e.value)),this.map.set(e.param,t);break;case"d":if(void 0===e.value){this.map.delete(e.param);break}{let r=this.map.get(e.param)||[];const i=r.indexOf(Fk(e.value));-1!==i&&r.splice(i,1),r.length>0?this.map.set(e.param,r):this.map.delete(e.param)}}}),this.cloneFrom=this.updates=null)}}class $K{constructor(){this.map=new Map}set(e,t){return this.map.set(e,t),this}get(e){return this.map.has(e)||this.map.set(e,e.defaultValue()),this.map.get(e)}delete(e){return this.map.delete(e),this}has(e){return this.map.has(e)}keys(){return this.map.keys()}}function Lk(n){return"undefined"!=typeof ArrayBuffer&&n instanceof ArrayBuffer}function Bk(n){return"undefined"!=typeof Blob&&n instanceof Blob}function jk(n){return"undefined"!=typeof FormData&&n instanceof FormData}class fu{constructor(e,t,r,i){let o;if(this.url=t,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=e.toUpperCase(),function GK(n){switch(n){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||i?(this.body=void 0!==r?r:null,o=i):o=r,o&&(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params)),this.headers||(this.headers=new Ur),this.context||(this.context=new $K),this.params){const s=this.params.toString();if(0===s.length)this.urlWithParams=t;else{const a=t.indexOf("?");this.urlWithParams=t+(-1===a?"?":af.set(h,e.setHeaders[h]),c)),e.setParams&&(u=Object.keys(e.setParams).reduce((f,h)=>f.set(h,e.setParams[h]),u)),new fu(r,i,s,{params:u,headers:c,context:d,reportProgress:l,responseType:o,withCredentials:a})}}var At=(()=>((At=At||{})[At.Sent=0]="Sent",At[At.UploadProgress=1]="UploadProgress",At[At.ResponseHeader=2]="ResponseHeader",At[At.DownloadProgress=3]="DownloadProgress",At[At.Response=4]="Response",At[At.User=5]="User",At))();class X_{constructor(e,t=200,r="OK"){this.headers=e.headers||new Ur,this.status=void 0!==e.status?e.status:t,this.statusText=e.statusText||r,this.url=e.url||null,this.ok=this.status>=200&&this.status<300}}class eb extends X_{constructor(e={}){super(e),this.type=At.ResponseHeader}clone(e={}){return new eb({headers:e.headers||this.headers,status:void 0!==e.status?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}}class Ah extends X_{constructor(e={}){super(e),this.type=At.Response,this.body=void 0!==e.body?e.body:null}clone(e={}){return new Ah({body:void 0!==e.body?e.body:this.body,headers:e.headers||this.headers,status:void 0!==e.status?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}}class Vk extends X_{constructor(e){super(e,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?`Http failure during parsing for ${e.url||"(unknown url)"}`:`Http failure response for ${e.url||"(unknown url)"}: ${e.status} ${e.statusText}`,this.error=e.error||null}}function tb(n,e){return{body:e,headers:n.headers,context:n.context,observe:n.observe,params:n.params,reportProgress:n.reportProgress,responseType:n.responseType,withCredentials:n.withCredentials}}let Oh=(()=>{class n{constructor(t){this.handler=t}request(t,r,i={}){let o;if(t instanceof fu)o=t;else{let l,c;l=i.headers instanceof Ur?i.headers:new Ur(i.headers),i.params&&(c=i.params instanceof Lo?i.params:new Lo({fromObject:i.params})),o=new fu(t,r,void 0!==i.body?i.body:null,{headers:l,context:i.context,params:c,reportProgress:i.reportProgress,responseType:i.responseType||"json",withCredentials:i.withCredentials})}const s=ie(o).pipe(Qa(l=>this.handler.handle(l)));if(t instanceof fu||"events"===i.observe)return s;const a=s.pipe(_o(l=>l instanceof Ah));switch(i.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return a.pipe(be(l=>{if(null!==l.body&&!(l.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return l.body}));case"blob":return a.pipe(be(l=>{if(null!==l.body&&!(l.body instanceof Blob))throw new Error("Response is not a Blob.");return l.body}));case"text":return a.pipe(be(l=>{if(null!==l.body&&"string"!=typeof l.body)throw new Error("Response is not a string.");return l.body}));default:return a.pipe(be(l=>l.body))}case"response":return a;default:throw new Error(`Unreachable: unhandled observe type ${i.observe}}`)}}delete(t,r={}){return this.request("DELETE",t,r)}get(t,r={}){return this.request("GET",t,r)}head(t,r={}){return this.request("HEAD",t,r)}jsonp(t,r){return this.request("JSONP",t,{params:(new Lo).append(r,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,r={}){return this.request("OPTIONS",t,r)}patch(t,r,i={}){return this.request("PATCH",t,tb(i,r))}post(t,r,i={}){return this.request("POST",t,tb(i,r))}put(t,r,i={}){return this.request("PUT",t,tb(i,r))}}return n.\u0275fac=function(t){return new(t||n)(R(Nk))},n.\u0275prov=W({token:n,factory:n.\u0275fac}),n})();class Hk{constructor(e,t){this.next=e,this.interceptor=t}handle(e){return this.interceptor.intercept(e,this.next)}}const Uk=new $("HTTP_INTERCEPTORS");let KK=(()=>{class n{intercept(t,r){return r.handle(t)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=W({token:n,factory:n.\u0275fac}),n})();const ZK=/^\)\]\}',?\n/;let zk=(()=>{class n{constructor(t){this.xhrFactory=t}handle(t){if("JSONP"===t.method)throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");return new Ne(r=>{const i=this.xhrFactory.build();if(i.open(t.method,t.urlWithParams),t.withCredentials&&(i.withCredentials=!0),t.headers.forEach((h,p)=>i.setRequestHeader(h,p.join(","))),t.headers.has("Accept")||i.setRequestHeader("Accept","application/json, text/plain, */*"),!t.headers.has("Content-Type")){const h=t.detectContentTypeHeader();null!==h&&i.setRequestHeader("Content-Type",h)}if(t.responseType){const h=t.responseType.toLowerCase();i.responseType="json"!==h?h:"text"}const o=t.serializeBody();let s=null;const a=()=>{if(null!==s)return s;const h=i.statusText||"OK",p=new Ur(i.getAllResponseHeaders()),g=function YK(n){return"responseURL"in n&&n.responseURL?n.responseURL:/^X-Request-URL:/m.test(n.getAllResponseHeaders())?n.getResponseHeader("X-Request-URL"):null}(i)||t.url;return s=new eb({headers:p,status:i.status,statusText:h,url:g}),s},l=()=>{let{headers:h,status:p,statusText:g,url:m}=a(),_=null;204!==p&&(_=void 0===i.response?i.responseText:i.response),0===p&&(p=_?200:0);let v=p>=200&&p<300;if("json"===t.responseType&&"string"==typeof _){const b=_;_=_.replace(ZK,"");try{_=""!==_?JSON.parse(_):null}catch(y){_=b,v&&(v=!1,_={error:y,text:_})}}v?(r.next(new Ah({body:_,headers:h,status:p,statusText:g,url:m||void 0})),r.complete()):r.error(new Vk({error:_,headers:h,status:p,statusText:g,url:m||void 0}))},c=h=>{const{url:p}=a(),g=new Vk({error:h,status:i.status||0,statusText:i.statusText||"Unknown Error",url:p||void 0});r.error(g)};let u=!1;const d=h=>{u||(r.next(a()),u=!0);let p={type:At.DownloadProgress,loaded:h.loaded};h.lengthComputable&&(p.total=h.total),"text"===t.responseType&&!!i.responseText&&(p.partialText=i.responseText),r.next(p)},f=h=>{let p={type:At.UploadProgress,loaded:h.loaded};h.lengthComputable&&(p.total=h.total),r.next(p)};return i.addEventListener("load",l),i.addEventListener("error",c),i.addEventListener("timeout",c),i.addEventListener("abort",c),t.reportProgress&&(i.addEventListener("progress",d),null!==o&&i.upload&&i.upload.addEventListener("progress",f)),i.send(o),r.next({type:At.Sent}),()=>{i.removeEventListener("error",c),i.removeEventListener("abort",c),i.removeEventListener("load",l),i.removeEventListener("timeout",c),t.reportProgress&&(i.removeEventListener("progress",d),null!==o&&i.upload&&i.upload.removeEventListener("progress",f)),i.readyState!==i.DONE&&i.abort()}})}}return n.\u0275fac=function(t){return new(t||n)(R(jS))},n.\u0275prov=W({token:n,factory:n.\u0275fac}),n})();const nb=new $("XSRF_COOKIE_NAME"),rb=new $("XSRF_HEADER_NAME");class Wk{}let QK=(()=>{class n{constructor(t,r,i){this.doc=t,this.platform=r,this.cookieName=i,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=AS(t,this.cookieName),this.lastCookieString=t),this.lastToken}}return n.\u0275fac=function(t){return new(t||n)(R(Vt),R(lc),R(nb))},n.\u0275prov=W({token:n,factory:n.\u0275fac}),n})(),ib=(()=>{class n{constructor(t,r){this.tokenService=t,this.headerName=r}intercept(t,r){const i=t.url.toLowerCase();if("GET"===t.method||"HEAD"===t.method||i.startsWith("http://")||i.startsWith("https://"))return r.handle(t);const o=this.tokenService.getToken();return null!==o&&!t.headers.has(this.headerName)&&(t=t.clone({headers:t.headers.set(this.headerName,o)})),r.handle(t)}}return n.\u0275fac=function(t){return new(t||n)(R(Wk),R(rb))},n.\u0275prov=W({token:n,factory:n.\u0275fac}),n})(),JK=(()=>{class n{constructor(t,r){this.backend=t,this.injector=r,this.chain=null}handle(t){if(null===this.chain){const r=this.injector.get(Uk,[]);this.chain=r.reduceRight((i,o)=>new Hk(i,o),this.backend)}return this.chain.handle(t)}}return n.\u0275fac=function(t){return new(t||n)(R(Rk),R(_t))},n.\u0275prov=W({token:n,factory:n.\u0275fac}),n})(),XK=(()=>{class n{static disable(){return{ngModule:n,providers:[{provide:ib,useClass:KK}]}}static withOptions(t={}){return{ngModule:n,providers:[t.cookieName?{provide:nb,useValue:t.cookieName}:[],t.headerName?{provide:rb,useValue:t.headerName}:[]]}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=ut({type:n}),n.\u0275inj=at({providers:[ib,{provide:Uk,useExisting:ib,multi:!0},{provide:Wk,useClass:QK},{provide:nb,useValue:"XSRF-TOKEN"},{provide:rb,useValue:"X-XSRF-TOKEN"}]}),n})(),eZ=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=ut({type:n}),n.\u0275inj=at({providers:[Oh,{provide:Nk,useClass:JK},zk,{provide:Rk,useExisting:zk}],imports:[[XK.withOptions({cookieName:"XSRF-TOKEN",headerName:"X-XSRF-TOKEN"})]]}),n})(),$k=(()=>{class n{constructor(t){this.http=t}get defaultHeaders(){const t=new Ur;return t.set("Accept","*/*").set("Content-Type","application/json"),t}getContentTypes(t="",r=""){return this.http.post("/api/v1/contenttype/_filter",{filter:{types:r,query:t},orderBy:"name",direction:"ASC",perPage:40}).pipe(xh("entity"))}getContentlets({contentType:t,filter:r,currentLanguage:i}){return this.http.post("/api/content/_search",{query:`+contentType:${t} +languageId:${i} +deleted:false +working:true +catchall:${r}* title:'${r}'^15`,sort:"modDate desc",offset:0,limit:40}).pipe(xh("entity","jsonObjectView","contentlets"))}}return n.\u0275fac=function(t){return new(t||n)(R(Oh))},n.\u0275prov=W({token:n,factory:n.\u0275fac}),n})();class nZ{getQueryParams(){const e=window.location.search.substring(1).split("&"),t=new Map;return e.forEach(r=>{const i=r.split("=");t.set(i[0],i[1])}),t}getQueryStringParam(e){let t=null;const i=new RegExp("[?&]"+e.replace(/[\[\]]/g,"\\$&")+"(=([^&#]*)|&|#|$)").exec(window.location.href);return i&&i[2]&&(t=decodeURIComponent(i[2].replace(/\+/g," "))),t}}let Gk=(()=>{class n{getLine(t,r){let i=null;if(t){const o=t.split("\n");i=o&&o.length>r?o[r]:null}return i}camelize(t){return t.replace(/(?:^\w|[A-Z]|\b\w)/g,(r,i)=>0===i?r.toLowerCase():r.toUpperCase()).replace(/\s+/g,"")}titleCase(t){return`${t.charAt(0).toLocaleUpperCase()}${t.slice(1)}`}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=W({token:n,factory:n.\u0275fac}),n})(),iZ=(()=>{class n{constructor(t){this.stringUtils=t,this.showLogs=!0,this.httpRequestUtils=new nZ,this.showLogs=this.shouldShowLogs(),this.showLogs&&console.info("Setting the logger --\x3e Developer mode logger on")}info(t,...r){r&&r.length>0?console.info(this.wrapMessage(t),r):console.info(this.wrapMessage(t))}error(t,...r){r&&r.length>0?console.error(this.wrapMessage(t),r):console.error(this.wrapMessage(t))}warn(t,...r){r&&r.length>0?console.warn(this.wrapMessage(t),r):console.warn(this.wrapMessage(t))}debug(t,...r){r&&r.length>0?console.debug(this.wrapMessage(t),r):console.debug(this.wrapMessage(t))}shouldShowLogs(){this.httpRequestUtils.getQueryStringParam("devMode");return!0}wrapMessage(t){return this.showLogs?t:this.getCaller()+">> "+t}getCaller(){let t="unknown";try{throw new Error}catch(r){t=this.cleanCaller(this.stringUtils.getLine(r.stack,4))}return t}cleanCaller(t){return t?t.trim().substr(3):"unknown"}}return n.\u0275fac=function(t){return new(t||n)(R(Gk))},n.\u0275prov=W({token:n,factory:n.\u0275fac}),n})();let dZ=(()=>{class n{constructor(){this.iconPath="./src/assets/images/icons",this.dotCMSURLKey="siteURLJWT"}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=W({token:n,factory:n.\u0275fac}),n})(),hu=class{constructor(e){this.iconPath=e.iconPath}displayErrorMessage(e){this.displayMessage("Error",e,"error")}displaySuccessMessage(e){this.displayMessage("Success",e,"success")}displayInfoMessage(e){this.displayMessage("Info",e,"info")}displayMessage(e,t,r){let i;return i=new Notification(r,{body:t,icon:this.iconPath+"/"+r+".png"}),i}};hu.\u0275prov=W({token:hu,factory:hu.\u0275fac}),hu=function sZ(n,e,t,r){var s,i=arguments.length,o=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,t):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(n,e,t,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(e,t,o):s(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o}([qs("config"),function aZ(n,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(n,e)}("design:paramtypes",[dZ])],hu);const Yk={500:"500 Internal Server Error",400:"400 Bad Request",401:"401 Unauthorized Error"},Qk="/api/v1/temp";function fZ({file:n,progressCallBack:e,maxSize:t}){return"string"==typeof n?function hZ(n){return fetch(`${Qk}/byUrl`,{method:"POST",headers:{"Content-Type":"application/json",Origin:window.location.hostname},body:JSON.stringify({remoteUrl:n})}).then(t=>function lZ(n,e,t,r){return new(t||(t=Promise))(function(o,s){function a(u){try{c(r.next(u))}catch(d){s(d)}}function l(u){try{c(r.throw(u))}catch(d){s(d)}}function c(u){u.done?o(u.value):function i(o){return o instanceof t?o:new t(function(s){s(o)})}(u.value).then(a,l)}c((r=r.apply(n,e||[])).next())})}(this,void 0,void 0,function*(){if(200===t.status)return(yield t.json()).tempFiles[0];throw Jk(yield t.json(),t.status)}))}(n):function pZ({file:n,progressCallBack:e,maxSize:t}){let r=Qk;r+=t?`?maxFileLength=${t}`:"";const i=new FormData;return(Array.isArray(n)?n:[n]).forEach(s=>i.append("files",s)),function gZ(n,e,t){return new Promise((r,i)=>{const o=new XMLHttpRequest;o.open(e.method||"get",n);for(const s in e.headers||{})o.setRequestHeader(s,e.headers[s]);o.onload=()=>r(o),o.onerror=i,o.upload&&t&&(o.upload.onprogress=s=>{t(s.loaded/s.total*100)}),o.send(e.body)})}(r,{method:"POST",headers:{},body:i},e).then(s=>{if(200===s.status){const a=JSON.parse(s.response).tempFiles;return a.length>1?a:a[0]}throw s}).catch(s=>{throw Jk(JSON.parse(s.response),s.status)})}({file:n,progressCallBack:e,maxSize:t})}function Jk(n,e){let t="";try{t=n.message||Yk[e]}catch(r){t=Yk[e||500]}return{message:t,status:500|e}}function Xk(n,e){return new Ne(e?t=>e.schedule(vZ,0,{error:n,subscriber:t}):t=>t.error(n))}function vZ({error:n,subscriber:e}){e.error(n)}let e1=(()=>{class n{constructor(t){this.http=t}publishContent(t,r){return this.setTempResource(t,r).pipe(yi(i=>{const o=Array.isArray(i)?i:[i],s=[];return o.forEach(a=>{s.push({baseType:"dotAsset",asset:a.id,hostFolder:"",indexPolicy:"WAIT_FOR"})}),this.http.post("/api/v1/workflow/actions/default/fire/PUBLISH",JSON.stringify({contentlets:s}),{headers:{Origin:window.location.hostname,"Content-Type":"application/json;charset=UTF-8"}}).pipe(xh("entity","results"))}),Po(i=>Xk(i)))}setTempResource(t,r){return zt(fZ({file:t,progressCallBack:()=>{},maxSize:r}))}}return n.\u0275fac=function(t){return new(t||n)(R(Oh))},n.\u0275prov=W({token:n,factory:n.\u0275fac}),n})(),yZ=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=ut({type:n}),n.\u0275inj=at({providers:[$k,e1,iZ,Gk],imports:[[Pr,iI,jK,MK]]}),n})(),_Z=(()=>{class n{constructor(t){this.http=t}get defaultHeaders(){const t=new Ur;return t.set("Accept","*/*").set("Content-Type","application/json"),t}getLanguages(){return this.languages?ie(this.languages):this.http.get("/api/v2/languages",{headers:this.defaultHeaders}).pipe(xh("entity"),be(t=>{const r=this.getDotLanguageObject(t);return this.languages=r,r}))}getDotLanguageObject(t){return t.reduce((r,i)=>Object.assign(r,{[i.id]:i}),{})}}return n.\u0275fac=function(t){return new(t||n)(R(Oh))},n.\u0275prov=W({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function bZ(n,e){if(1&n&&(H(0,"i",6),Ze(1),z()),2&n){const t=U();N(1),Tn(t.url)}}function DZ(n,e){1&n&&$t(0,"dot-contentlet-thumbnail",8),2&n&&k("contentlet",U(2).data.contentlet)("width",42)("height",42)("iconSize","42px")}function CZ(n,e){if(1&n&&G(0,DZ,1,4,"dot-contentlet-thumbnail",7),2&n){const t=U(),r=co(9);k("ngIf",null==t.data?null:t.data.contentlet)("ngIfElse",r)}}function EZ(n,e){if(1&n&&(H(0,"div",9),$t(1,"dot-state-icon",10),H(2,"dot-badge",11),Ze(3),z()()),2&n){const t=U();N(1),k("state",t.data.contentlet),N(2),Tn(t.data.contentlet.language)}}function wZ(n,e){1&n&&$t(0,"img",12),2&n&&k("src",U().url,so)}let t1=(()=>{class n{constructor(t){this.element=t,this.role="list-item",this.tabindex="-1",this.label="",this.url="",this.data=null,this.icon=!1}ngOnInit(){this.icon=this.icon="string"==typeof this.url&&!(this.url.split("/").length>1)}getLabel(){return this.element.nativeElement.innerText}focus(){this.element.nativeElement.style="background: #eee"}unfocus(){this.element.nativeElement.style=""}scrollIntoView(){this.isIntoView()||this.element.nativeElement.scrollIntoView(this.alignToTop())}isIntoView(){const{bottom:t,top:r}=this.element.nativeElement.getBoundingClientRect(),i=this.element.nativeElement.parentElement.getBoundingClientRect();return r>=i.top&&t<=i.bottom}alignToTop(){const{top:t}=this.element.nativeElement.getBoundingClientRect(),{top:r}=this.element.nativeElement.parentElement.getBoundingClientRect();return t span[_ngcontent-%COMP%]{overflow:hidden;display:block;white-space:nowrap;text-overflow:ellipsis}.data-wrapper[_ngcontent-%COMP%] .state[_ngcontent-%COMP%]{margin-top:.5rem;display:flex}.data-wrapper[_ngcontent-%COMP%] .state[_ngcontent-%COMP%] dot-state-icon[_ngcontent-%COMP%]{margin-right:.5rem}"]}),n})();const SZ=["*"];let MZ=(()=>{class n{ngAfterContentInit(){this.keyManager=new mI(this.items).withWrap()}updateSelection(t){this.keyManager.activeItem&&this.keyManager.activeItem.unfocus(),this.keyManager.onKeydown(t),this.keyManager.activeItem.scrollIntoView()}execCommand(){this.keyManager.activeItem.command()}setFirstItemActive(){var t,r;null===(t=this.keyManager.activeItem)||void 0===t||t.unfocus(),this.keyManager.setFirstItemActive(),null===(r=this.keyManager.activeItem)||void 0===r||r.focus()}resetKeyManager(){this.keyManager=new mI(this.items).withWrap(),setTimeout(()=>{this.setFirstItemActive()},0)}updateActiveItem(t){var r;null===(r=this.keyManager.activeItem)||void 0===r||r.unfocus(),this.keyManager.setActiveItem(t)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=wt({type:n,selectors:[["dotcms-suggestion-list"]],contentQueries:function(t,r,i){if(1&t&&si(i,t1,4),2&t){let o;$n(o=Gn())&&(r.items=o)}},ngContentSelectors:SZ,decls:1,vars:0,template:function(t,r){1&t&&(ma(),Ni(0))},styles:[""]}),n})();const IZ=["list"];function TZ(n,e){if(1&n){const t=ti();H(0,"dotcms-suggestions-list-item",7),Pe("mousedown",function(i){const s=Bt(t).$implicit;return U(2).onMouseDown(i,s)})("mouseenter",function(i){return Bt(t),U(2).onMouseEnter(i)}),z()}if(2&n){const t=e.$implicit,r=e.index;k("command",t.command)("index",r)("label",t.label)("url",t.icon)("data",t.data)}}function xZ(n,e){if(1&n){const t=ti();H(0,"div",3),Pe("mousedown",function(i){return Bt(t),U().onMouseDownHandler(i)}),H(1,"h3"),Ze(2),z(),H(3,"dotcms-suggestion-list",4,5),G(5,TZ,1,5,"dotcms-suggestions-list-item",6),z()()}if(2&n){const t=U();N(2),Tn(t.title),N(3),k("ngForOf",t.items)}}function AZ(n,e){if(1&n){const t=ti();H(0,"div",8),$t(1,"p",9),H(2,"button",3),Pe("mousedown",function(i){return Bt(t),U().handleBackButton(i)}),Ze(3,"Back"),z()()}if(2&n){const t=U();N(1),k("innerHTML",t.title,ug)}}function OZ(n,e){if(1&n&&(H(0,"div",8),$t(1,"p",9),z()),2&n){const t=U();N(1),k("innerHTML",t.noResultsMessage,ug)}}var Qn=(()=>(function(n){n.BLOCK="block",n.CONTENTTYPE="contentType",n.CONTENT="content"}(Qn||(Qn={})),Qn))();let n1=(()=>{class n{constructor(t,r,i){this.suggestionsService=t,this.dotLanguageService=r,this.cd=i,this.items=[],this.title="Select a block",this.noResultsMessage="No Results",this.isOpen=!1,this.currentLanguage=d1,this.allowedContentTypes="",this.clearFilter=new Ae,this.mouseMove=!0,this.isFilterActive=!1}onMousemove(){this.mouseMove=!0}ngOnInit(){var t;0===(null===(t=this.items)||void 0===t?void 0:t.length)&&(this.items=s1,this.items.forEach(r=>{r.command=()=>{this.clearFilter.emit(Qn.BLOCK),r.id.includes("heading")?this.onSelection({type:Object.assign({name:"heading"},r.attributes)}):this.onSelection({type:{name:r.id}})}}),this.items=[{label:"Contentlets",icon:"receipt",command:()=>{this.clearFilter.emit(Qn.CONTENTTYPE),this.loadContentTypes()}},...this.items]),this.initialItems=this.items,this.itemsLoaded=Qn.BLOCK,this.dotLanguageService.getLanguages().pipe(_s(1)).subscribe(r=>this.dotLangs=r)}ngAfterViewInit(){this.setFirstItemActive()}execCommand(){this.items.length?this.list.execCommand():this.handleBackButton(new MouseEvent("click"))}updateSelection(t){this.list.updateSelection(t),this.mouseMove=!1}setFirstItemActive(){var t;null===(t=this.list)||void 0===t||t.setFirstItemActive()}updateActiveItem(t){this.list.updateActiveItem(t)}resetKeyManager(){var t;null===(t=this.list)||void 0===t||t.resetKeyManager()}onMouseDownHandler(t){t.preventDefault()}onMouseEnter(t){if(!this.mouseMove)return;t.preventDefault();const r=Number(t.target.dataset.index);this.updateActiveItem(r)}onMouseDown(t,r){t.preventDefault(),r.command()}handleBackButton(t){t.preventDefault(),t.stopPropagation(),this.loadContentTypes()}filterItems(t=""){switch(this.itemsLoaded){case Qn.BLOCK:this.items=this.initialItems.filter(r=>r.label.toLowerCase().includes(t.trim().toLowerCase()));break;case Qn.CONTENTTYPE:this.loadContentTypes(t);break;case Qn.CONTENT:this.loadContentlets(this.selectedContentType,t)}this.isFilterActive=!!t.length,this.setFirstItemActive()}loadContentTypes(t=""){this.suggestionsService.getContentTypes(t,this.allowedContentTypes).pipe(be(r=>r.map(i=>({label:i.name,icon:i.icon,command:()=>{this.selectedContentType=i,this.itemsLoaded=Qn.CONTENT,this.loadContentlets(i),this.clearFilter.emit(Qn.CONTENT)}}))),_s(1)).subscribe(r=>{this.title="Select a content type",this.items=r,this.itemsLoaded=Qn.CONTENTTYPE,this.cd.detectChanges(),this.resetKeyManager()})}loadContentlets(t,r=""){this.suggestionsService.getContentlets({contentType:t.variable,filter:r,currentLanguage:this.currentLanguage}).pipe(_s(1)).subscribe(i=>{this.items=i.map(o=>{const{languageId:s}=o;return o.language=this.getContentletLanguage(s),{label:o.title,icon:"contentlet/image",data:{contentlet:o},command:()=>{this.onSelection({payload:o,type:{name:"dotContent"}})}}}),this.items.length?(this.title="Select a contentlet",this.cd.detectChanges(),this.resetKeyManager()):(this.title=`No results for ${t.name}`,this.cd.detectChanges())})}getContentletLanguage(t){const{languageCode:r,countryCode:i}=this.dotLangs[t];return r&&i?`${r}-${i}`:""}}return n.\u0275fac=function(t){return new(t||n)(S($k),S(_Z),S(es))},n.\u0275cmp=wt({type:n,selectors:[["dotcms-suggestions"]],viewQuery:function(t,r){if(1&t&&xd(IZ,5),2&t){let i;$n(i=Gn())&&(r.list=i.first)}},hostBindings:function(t,r){1&t&&Pe("mousemove",function(o){return r.onMousemove(o)})},inputs:{onSelection:"onSelection",items:"items",title:"title",noResultsMessage:"noResultsMessage",isOpen:"isOpen",currentLanguage:"currentLanguage",allowedContentTypes:"allowedContentTypes"},outputs:{clearFilter:"clearFilter"},decls:5,vars:2,consts:[[3,"mousedown",4,"ngIf","ngIfElse"],["emptyBlock",""],["noResults",""],[3,"mousedown"],[1,"suggestion-list-container"],["list",""],[3,"command","index","label","url","data","mousedown","mouseenter",4,"ngFor","ngForOf"],[3,"command","index","label","url","data","mousedown","mouseenter"],[1,"empty"],[3,"innerHTML"]],template:function(t,r){if(1&t&&(G(0,xZ,6,2,"div",0),G(1,AZ,4,1,"ng-template",null,1,Jo),G(3,OZ,2,1,"ng-template",null,2,Jo)),2&t){const i=co(2),o=co(4);k("ngIf",r.items.length)("ngIfElse",r.isFilterActive?o:i)}},directives:[ho,MZ,Kd,t1],styles:['[_nghost-%COMP%]{display:block;min-width:240px;box-shadow:0 4px 20px #0000001a;padding:.5rem 0;background:#ffffff;font-family:Roboto,Helvetica,sans-serif,Arial}h3[_ngcontent-%COMP%]{text-transform:uppercase;font-size:1rem;margin:.5rem 1rem;color:#999}.suggestion-list-container[_ngcontent-%COMP%]{width:100%;height:100%;max-height:400px;overflow:auto;display:block}.material-icons[_ngcontent-%COMP%]{font-family:Material Icons;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-feature-settings:"liga";-webkit-font-smoothing:antialiased}.empty[_ngcontent-%COMP%]{align-items:center;flex-direction:column;display:flex;justify-content:center;padding:1rem;height:15rem}button[_ngcontent-%COMP%]{background:none;border-radius:2px;border:0;border:1px solid var(--color-sec);color:var(--color-sec);cursor:pointer;font-size:1rem;font-weight:500;line-height:normal;padding:.75rem 2rem;text-transform:uppercase}.empty[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover, .empty[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:active, .empty[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:focus{border-color:var(--color-main);color:var(--color-main)}']}),n})();const kZ=function(n){return{"btn-bubble-menu":!0,"btn-active":n}};let NZ=(()=>{class n{constructor(){this.active=!1}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=wt({type:n,selectors:[["dotcms-bubble-menu-button"]],inputs:{item:"item",active:"active"},decls:3,vars:4,consts:[[3,"ngClass"],[1,"material-icons"]],template:function(t,r){1&t&&(H(0,"button",0)(1,"span",1),Ze(2),z()()),2&t&&(k("ngClass",Or(2,kZ,r.active)),N(2),Tn(r.item.icon))},directives:[fc],styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:center}.btn-bubble-menu[_ngcontent-%COMP%]{background:#ffffff;border:none;color:#0a0725;display:flex;justify-content:center;align-items:center;cursor:pointer;width:2.286rem;height:2.286rem;border-radius:2px}.btn-bubble-menu[_ngcontent-%COMP%]:hover{background:#f1f3f4}.btn-bubble-menu.btn-active[_ngcontent-%COMP%]{background:#f1f3f4;color:#0a0725;border:1px solid #b3b1b8}"]}),n})();function RZ(n,e){if(1&n){const t=ti();Oi(0),H(1,"button",3),Pe("click",function(){return Bt(t),U().toggleChangeTo.emit()}),Ze(2),z(),$t(3,"div",4),ki()}if(2&n){const t=U();N(2),Tn(t.selected)}}function PZ(n,e){1&n&&$t(0,"div",4)}function FZ(n,e){if(1&n){const t=ti();Oi(0),H(1,"dotcms-bubble-menu-button",5),Pe("click",function(){const o=Bt(t).$implicit;return U().command.emit(o)}),z(),G(2,PZ,1,0,"div",6),ki()}if(2&n){const t=e.$implicit;N(1),k("active",t.active)("item",t),N(1),k("ngIf",t.divider)}}let LZ=(()=>{class n{constructor(){this.items=[],this.command=new Ae,this.toggleChangeTo=new Ae}preventDeSelection(t){t.preventDefault()}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=wt({type:n,selectors:[["dotcms-bubble-menu"]],inputs:{items:"items",selected:"selected"},outputs:{command:"command",toggleChangeTo:"toggleChangeTo"},decls:3,vars:2,consts:[["id","bubble-menu",1,"bubble-menu",3,"mousedown"],[4,"ngIf"],[4,"ngFor","ngForOf"],[1,"btn-dropdown",3,"click"],[1,"divider"],[3,"active","item","click"],["class","divider",4,"ngIf"]],template:function(t,r){1&t&&(H(0,"div",0),Pe("mousedown",function(o){return r.preventDeSelection(o)}),G(1,RZ,4,1,"ng-container",1),G(2,FZ,3,3,"ng-container",2),z()),2&t&&(N(1),k("ngIf",r.selected),N(1),k("ngForOf",r.items))},directives:[ho,Kd,NZ],styles:['[_nghost-%COMP%]{height:100%;width:100%}.bubble-menu[_ngcontent-%COMP%]{box-sizing:border-box;align-items:center;background:#ffffff;border-radius:2px;box-shadow:0 10px 24px #0003;display:flex;justify-content:center;padding:.4rem;height:40px}.bubble-menu[_ngcontent-%COMP%] .btn-dropdown[_ngcontent-%COMP%]{background:none;border:none;outline:none;padding:.3rem;cursor:pointer}.bubble-menu[_ngcontent-%COMP%] .btn-dropdown[_ngcontent-%COMP%]:hover{background:#f1f3f4}.bubble-menu[_ngcontent-%COMP%] .btn-dropdown[_ngcontent-%COMP%]:after{content:"";border:solid #0a0725;border-width:0 .15rem .15rem 0;display:inline-block;padding:.25rem;transform:rotate(45deg);margin-left:.75rem}.bubble-menu[_ngcontent-%COMP%] .divider[_ngcontent-%COMP%]{border-left:1px solid #f1f3f4;height:100%;margin:0px .5rem}']}),n})();function r1(n,e,t,r,i,o,s){try{var a=n[o](s),l=a.value}catch(c){return void t(c)}a.done?e(l):Promise.resolve(l).then(r,i)}const VZ=new mt("suggestion");function HZ({pluginKey:n=VZ,editor:e,char:t="@",allowSpaces:r=!1,prefixSpace:i=!0,startOfLine:o=!1,decorationTag:s="span",decorationClass:a="suggestion",command:l=(()=>null),items:c=(()=>[]),render:u=(()=>({})),allow:d=(()=>!0)}){let f;const h=null==u?void 0:u();return new Xe({key:n,view(){var g,p=this;return{update:(g=function BZ(n){return function(){var e=this,t=arguments;return new Promise(function(r,i){var o=n.apply(e,t);function s(l){r1(o,r,i,s,a,"next",l)}function a(l){r1(o,r,i,s,a,"throw",l)}s(void 0)})}}(function*(m,_){var v,b,y,D,C;const x=null===(v=p.key)||void 0===v?void 0:v.getState(_),A=null===(b=p.key)||void 0===b?void 0:b.getState(m.state),V=x.active&&A.active&&x.range.from!==A.range.from,q=!x.active&&A.active,ee=x.active&&!A.active,K=q||V,xe=!q&&!ee&&x.query!==A.query&&!V,le=ee||V;if(!K&&!xe&&!le)return;const Z=le&&!K?x:A,et=document.querySelector(`[data-decoration-id="${Z.decorationId}"]`);f={editor:e,range:Z.range,query:Z.query,text:Z.text,items:xe||K?yield c({editor:e,query:Z.query}):[],command:He=>{l({editor:e,range:Z.range,props:He})},decorationNode:et,clientRect:et?()=>{var He;const{decorationId:Fe}=null===(He=p.key)||void 0===He?void 0:He.getState(e.state);return document.querySelector(`[data-decoration-id="${Fe}"]`).getBoundingClientRect()}:null},le&&(null===(y=null==h?void 0:h.onExit)||void 0===y||y.call(h,f)),xe&&(null===(D=null==h?void 0:h.onUpdate)||void 0===D||D.call(h,f)),K&&(null===(C=null==h?void 0:h.onStart)||void 0===C||C.call(h,f))}),function(_,v){return g.apply(this,arguments)}),destroy:()=>{var g;!f||null===(g=null==h?void 0:h.onExit)||void 0===g||g.call(h,f)}}},state:{init:()=>({active:!1,range:{},query:null,text:null,composing:!1}),apply(p,g,m,_){const{composing:v}=e.view,{selection:b}=p,{empty:y,from:D}=b,C=w({},g);if(C.composing=v,y||e.view.composing){(Dg.range.to)&&!v&&!g.composing&&(C.active=!1);const x=function jZ(n){const{char:e,allowSpaces:t,prefixSpace:r,startOfLine:i,$position:o}=n,s=function L5(n){return n.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}(e),a=new RegExp(`\\s${s}$`),l=i?"^":"",c=t?new RegExp(`${l}${s}.*?(?=\\s${s}|$)`,"gm"):new RegExp(`${l}(?:^)?${s}[^\\s${s}]*`,"gm"),d=o.depth<=0?0:o.before(),h=o.doc.textBetween(d,o.pos,"\0","\0"),p=Array.from(h.matchAll(c)).pop();if(!p||void 0===p.input||void 0===p.index)return null;const g=p.input.slice(Math.max(0,p.index-1),p.index),m=/^[\s\0]?$/.test(g);if(r&&!m)return null;const _=p.index+o.start();let v=_+p[0].length;return t&&a.test(h.slice(v-1,v+1))&&(p[0]+=" ",v+=1),_=o.pos?{range:{from:_,to:v},query:p[0].slice(e.length),text:p[0]}:null}({char:t,allowSpaces:r,prefixSpace:i,startOfLine:o,$position:b.$from}),A=`id_${Math.floor(4294967295*Math.random())}`;x&&d({editor:e,state:_,range:x.range})?(C.active=!0,C.decorationId=g.decorationId?g.decorationId:A,C.range=x.range,C.query=x.query,C.text=x.text):C.active=!1}else C.active=!1;return C.active||(C.decorationId=null,C.range={},C.query=null,C.text=null),C}},props:{handleKeyDown(p,g){var m;const{active:_,range:v}=this.getState(p.state);return _&&(null===(m=null==h?void 0:h.onKeyDown)||void 0===m?void 0:m.call(h,{view:p,event:g,range:v}))||!1},decorations(p){const{active:g,range:m,decorationId:_}=this.getState(p);return g?Oe.create(p.doc,[Ct.inline(m.from,m.to,{nodeName:s,class:a,"data-decoration-id":_})]):null}}})}const sb="menuFloating";class UZ{constructor({editor:e,element:t,view:r,tippyOptions:i,render:o,command:s,key:a}){this.invalidNodes=["codeBlock","blockquote"],this.mousedownHandler=l=>{l.preventDefault(),this.editor.chain().insertContent("/").run()},this.editor=e,this.element=t,this.view=r,this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",()=>{this.tippy.unmount(),this.update(this.editor.view)}),this.element.style.visibility="visible",this.render=o,this.command=s,this.key=a,this.createTooltip(i)}createTooltip(e={}){this.tippy=Za(this.view.dom,Object.assign({duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"left",hideOnClick:"toggle"},e))}update(e,t){var r,i;const{selection:o}=e.state,{$anchor:s,empty:a,from:l,to:c}=o,f=1===s.depth&&!o.$anchor.parent.isLeaf&&!o.$anchor.parent.textContent,h=s.parent.type.name,p=null===(r=this.key)||void 0===r?void 0:r.getState(e.state),g=t?null===(i=this.key)||void 0===i?void 0:i.getState(t):null;if((null==g?void 0:g.open)||a&&f)if((null==g?void 0:g.open)||!this.invalidNodes.includes(h))if(this.tippy.setProps({getReferenceClientRect:()=>Ua(e,l,c)}),this.show(),p.open){const{from:m,to:_}=this.editor.state.selection,v=Ua(this.view,m,_);this.render().onStart({clientRect:()=>v,range:{from:m,to:_},editor:this.editor,command:this.command})}else g&&g.open&&this.render().onExit(null);else this.hide();else this.hide()}show(){this.tippy.show()}hide(){this.tippy.hide()}destroy(){this.tippy.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler)}}const o1=new mt(sb),zZ=n=>new Xe({key:o1,view:e=>new UZ(Object.assign({key:o1,view:e},n)),state:{init:()=>({open:!1}),apply(e){const t=e.getMeta(sb);return(null==t?void 0:t.open)?{open:null==t?void 0:t.open}:{open:!1}}},props:{handleKeyDown(e,t){const{open:r,range:i}=this.getState(e.state);return!!r&&n.render().onKeyDown({event:t,range:i,view:e})}}});let WZ=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=wt({type:n,selectors:[["dotcms-action-button"]],decls:3,vars:0,consts:[[1,"material-icons"]],template:function(t,r){1&t&&(H(0,"button")(1,"i",0),Ze(2,"add"),z()())},styles:["[_nghost-%COMP%]{display:block}button[_ngcontent-%COMP%]{all:unset;cursor:pointer;border:solid 1px #eee;width:32px;height:32px;display:flex;align-items:center;justify-content:center;color:#666;background:#ffffff}"]}),n})();const $Z=["data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTYuNjMyODEgMjJWMjEuMDE1Nkw3LjkwNjI1IDIwLjc5NjlWMTEuODM1OUw2LjYzMjgxIDExLjYxNzJWMTAuNjI1SDEwLjcxODhWMTEuNjE3Mkw5LjQ0NTMxIDExLjgzNTlWMTUuNzY1NkgxNC44ODI4VjExLjgzNTlMMTMuNjA5NCAxMS42MTcyVjEwLjYyNUgxNy42OTUzVjExLjYxNzJMMTYuNDIxOSAxMS44MzU5VjIwLjc5NjlMMTcuNjk1MyAyMS4wMTU2VjIySDEzLjYwOTRWMjEuMDE1NkwxNC44ODI4IDIwLjc5NjlWMTYuOTc2Nkg5LjQ0NTMxVjIwLjc5NjlMMTAuNzE4OCAyMS4wMTU2VjIySDYuNjMyODFaTTE5LjI3MzQgMjJWMjEuMDE1NkwyMS4wMzEyIDIwLjc5NjlWMTIuMjczNEwxOS4yNDIyIDEyLjMwNDdWMTEuMzQzOEwyMi41NzAzIDEwLjYyNVYyMC43OTY5TDI0LjMyMDMgMjEuMDE1NlYyMkgxOS4yNzM0WiIgZmlsbD0iIzIyMjIyMiIvPgo8L3N2Zz4K","data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTUuNjMyODEgMjJWMjEuMDE1Nkw2LjkwNjI1IDIwLjc5NjlWMTEuODM1OUw1LjYzMjgxIDExLjYxNzJWMTAuNjI1SDkuNzE4NzVWMTEuNjE3Mkw4LjQ0NTMxIDExLjgzNTlWMTUuNzY1NkgxMy44ODI4VjExLjgzNTlMMTIuNjA5NCAxMS42MTcyVjEwLjYyNUgxNi42OTUzVjExLjYxNzJMMTUuNDIxOSAxMS44MzU5VjIwLjc5NjlMMTYuNjk1MyAyMS4wMTU2VjIySDEyLjYwOTRWMjEuMDE1NkwxMy44ODI4IDIwLjc5NjlWMTYuOTc2Nkg4LjQ0NTMxVjIwLjc5NjlMOS43MTg3NSAyMS4wMTU2VjIySDUuNjMyODFaTTE4LjA4NTkgMjJWMjAuOTQ1M0wyMS44MTI1IDE2LjgwNDdDMjIuMjU1MiAxNi4zMDk5IDIyLjYwMTYgMTUuODg4IDIyLjg1MTYgMTUuNTM5MUMyMy4xMDE2IDE1LjE4NDkgMjMuMjc2IDE0Ljg2NDYgMjMuMzc1IDE0LjU3ODFDMjMuNDc0IDE0LjI5MTcgMjMuNTIzNCAxMy45OTQ4IDIzLjUyMzQgMTMuNjg3NUMyMy41MjM0IDEzLjExOTggMjMuMzUxNiAxMi42NDMyIDIzLjAwNzggMTIuMjU3OEMyMi42NjQxIDExLjg2NzIgMjIuMTcxOSAxMS42NzE5IDIxLjUzMTIgMTEuNjcxOUMyMC44NjQ2IDExLjY3MTkgMjAuMzQzOCAxMS44NzI0IDE5Ljk2ODggMTIuMjczNEMxOS41OTkgMTIuNjc0NSAxOS40MTQxIDEzLjI0MjIgMTkuNDE0MSAxMy45NzY2SDE3LjkzNzVMMTcuOTIxOSAxMy45Mjk3QzE3LjkwNjIgMTMuMjczNCAxOC4wNDQzIDEyLjY4NDkgMTguMzM1OSAxMi4xNjQxQzE4LjYyNzYgMTEuNjM4IDE5LjA0OTUgMTEuMjI0IDE5LjYwMTYgMTAuOTIxOUMyMC4xNTg5IDEwLjYxNDYgMjAuODIwMyAxMC40NjA5IDIxLjU4NTkgMTAuNDYwOUMyMi4zMDQ3IDEwLjQ2MDkgMjIuOTIxOSAxMC41OTkgMjMuNDM3NSAxMC44NzVDMjMuOTU4MyAxMS4xNDU4IDI0LjM1OTQgMTEuNTE4MiAyNC42NDA2IDExLjk5MjJDMjQuOTIxOSAxMi40NjYxIDI1LjA2MjUgMTMuMDEwNCAyNS4wNjI1IDEzLjYyNUMyNS4wNjI1IDE0LjI1IDI0Ljg3NzYgMTQuODcyNCAyNC41MDc4IDE1LjQ5MjJDMjQuMTQzMiAxNi4xMTIgMjMuNjI3NiAxNi43ODEyIDIyLjk2MDkgMTcuNUwxOS45Njg4IDIwLjc1NzhMMTkuOTg0NCAyMC43OTY5SDI0LjAyMzRMMjQuMTQ4NCAxOS40OTIySDI1LjQ1MzFWMjJIMTguMDg1OVoiIGZpbGw9IiMyMjIyMjIiLz4KPC9zdmc+Cg==","data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTUuNjMyODEgMjJWMjEuMDE1Nkw2LjkwNjI1IDIwLjc5NjlWMTEuODM1OUw1LjYzMjgxIDExLjYxNzJWMTAuNjI1SDkuNzE4NzVWMTEuNjE3Mkw4LjQ0NTMxIDExLjgzNTlWMTUuNzY1NkgxMy44ODI4VjExLjgzNTlMMTIuNjA5NCAxMS42MTcyVjEwLjYyNUgxNi42OTUzVjExLjYxNzJMMTUuNDIxOSAxMS44MzU5VjIwLjc5NjlMMTYuNjk1MyAyMS4wMTU2VjIySDEyLjYwOTRWMjEuMDE1NkwxMy44ODI4IDIwLjc5NjlWMTYuOTc2Nkg4LjQ0NTMxVjIwLjc5NjlMOS43MTg3NSAyMS4wMTU2VjIySDUuNjMyODFaTTIxLjQ2ODggMjIuMTY0MUMyMC43NzYgMjIuMTY0MSAyMC4xNTg5IDIyLjAzOTEgMTkuNjE3MiAyMS43ODkxQzE5LjA3NTUgMjEuNTMzOSAxOC42NTEgMjEuMTc0NSAxOC4zNDM4IDIwLjcxMDlDMTguMDQxNyAyMC4yNDIyIDE3Ljg5ODQgMTkuNjg3NSAxNy45MTQxIDE5LjA0NjlMMTcuOTM3NSAxOUgxOS40MDYyQzE5LjQwNjIgMTkuNTk5IDE5LjU4ODUgMjAuMDc1NSAxOS45NTMxIDIwLjQyOTdDMjAuMzIyOSAyMC43ODM5IDIwLjgyODEgMjAuOTYwOSAyMS40Njg4IDIwLjk2MDlDMjIuMTE5OCAyMC45NjA5IDIyLjYzMDIgMjAuNzgzOSAyMyAyMC40Mjk3QzIzLjM2OTggMjAuMDc1NSAyMy41NTQ3IDE5LjU1MjEgMjMuNTU0NyAxOC44NTk0QzIzLjU1NDcgMTguMTU2MiAyMy4zOTA2IDE3LjYzOCAyMy4wNjI1IDE3LjMwNDdDMjIuNzM0NCAxNi45NzE0IDIyLjIxNjEgMTYuODA0NyAyMS41MDc4IDE2LjgwNDdIMjAuMTY0MVYxNS42MDE2SDIxLjUwNzhDMjIuMTkwMSAxNS42MDE2IDIyLjY3MTkgMTUuNDMyMyAyMi45NTMxIDE1LjA5MzhDMjMuMjM5NiAxNC43NSAyMy4zODI4IDE0LjI3MzQgMjMuMzgyOCAxMy42NjQxQzIzLjM4MjggMTIuMzM1OSAyMi43NDQ4IDExLjY3MTkgMjEuNDY4OCAxMS42NzE5QzIwLjg2OTggMTEuNjcxOSAyMC4zODggMTEuODQ5IDIwLjAyMzQgMTIuMjAzMUMxOS42NjQxIDEyLjU1MjEgMTkuNDg0NCAxMy4wMTgyIDE5LjQ4NDQgMTMuNjAxNkgxOC4wMDc4TDE3Ljk5MjIgMTMuNTU0N0MxNy45NzY2IDEyLjk4MTggMTguMTEyIDEyLjQ2MDkgMTguMzk4NCAxMS45OTIyQzE4LjY5MDEgMTEuNTIzNCAxOS4wOTkgMTEuMTUxIDE5LjYyNSAxMC44NzVDMjAuMTU2MiAxMC41OTkgMjAuNzcwOCAxMC40NjA5IDIxLjQ2ODggMTAuNDYwOUMyMi41MjA4IDEwLjQ2MDkgMjMuMzU5NCAxMC43NDIyIDIzLjk4NDQgMTEuMzA0N0MyNC42MDk0IDExLjg2MiAyNC45MjE5IDEyLjY1ODkgMjQuOTIxOSAxMy42OTUzQzI0LjkyMTkgMTQuMTY0MSAyNC43Nzg2IDE0LjYzMjggMjQuNDkyMiAxNS4xMDE2QzI0LjIxMDkgMTUuNTY1MSAyMy43ODY1IDE1LjkxOTMgMjMuMjE4OCAxNi4xNjQxQzIzLjkwMSAxNi4zODggMjQuMzgyOCAxNi43Mzk2IDI0LjY2NDEgMTcuMjE4OEMyNC45NTA1IDE3LjY5NzkgMjUuMDkzOCAxOC4yMzQ0IDI1LjA5MzggMTguODI4MUMyNS4wOTM4IDE5LjUyMDggMjQuOTM3NSAyMC4xMTcyIDI0LjYyNSAyMC42MTcyQzI0LjMxNzcgMjEuMTEyIDIzLjg5MDYgMjEuNDk0OCAyMy4zNDM4IDIxLjc2NTZDMjIuNzk2OSAyMi4wMzEyIDIyLjE3MTkgMjIuMTY0MSAyMS40Njg4IDIyLjE2NDFaIiBmaWxsPSIjMjIyMjIyIi8+Cjwvc3ZnPgo="],JZ=new mv(document),XZ=[...Array(3).keys()].map(n=>{const e=n+1;return{label:`Heading ${e}`,icon:ws($Z[n]),id:`heading${e}`,attributes:{level:e}}});function ws(n){return JZ.bypassSecurityTrustUrl(n)}const s1=[...XZ,{label:"Paragraph",icon:ws("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTYuNDc0NjEgMTZWMTUuMjYxN0w3LjQyOTY5IDE1LjA5NzdWOC4zNzY5NUw2LjQ3NDYxIDguMjEyODlWNy40Njg3NUgxMC4zOTQ1QzExLjMwNDcgNy40Njg3NSAxMi4wMTE3IDcuNzAzMTIgMTIuNTE1NiA4LjE3MTg4QzEzLjAyMzQgOC42NDA2MiAxMy4yNzczIDkuMjU3ODEgMTMuMjc3MyAxMC4wMjM0QzEzLjI3NzMgMTAuNzk2OSAxMy4wMjM0IDExLjQxNiAxMi41MTU2IDExLjg4MDlDMTIuMDExNyAxMi4zNDU3IDExLjMwNDcgMTIuNTc4MSAxMC4zOTQ1IDEyLjU3ODFIOC41ODM5OFYxNS4wOTc3TDkuNTM5MDYgMTUuMjYxN1YxNkg2LjQ3NDYxWk04LjU4Mzk4IDExLjY3NThIMTAuMzk0NUMxMC45NzI3IDExLjY3NTggMTEuNDA0MyAxMS41MjE1IDExLjY4OTUgMTEuMjEyOUMxMS45Nzg1IDEwLjkwMDQgMTIuMTIzIDEwLjUwNzggMTIuMTIzIDEwLjAzNTJDMTIuMTIzIDkuNTYyNSAxMS45Nzg1IDkuMTY3OTcgMTEuNjg5NSA4Ljg1MTU2QzExLjQwNDMgOC41MzUxNiAxMC45NzI3IDguMzc2OTUgMTAuMzk0NSA4LjM3Njk1SDguNTgzOThWMTEuNjc1OFoiIGZpbGw9IiMyMjIyMjIiLz4KPHJlY3QgeD0iMTUiIHk9IjE0IiB3aWR0aD0iMTEiIGhlaWdodD0iMSIgZmlsbD0iIzIyMjIyMiIvPgo8cmVjdCB4PSI2IiB5PSIxOCIgd2lkdGg9IjIwIiBoZWlnaHQ9IjEiIGZpbGw9IiMyMjIyMjIiLz4KPHJlY3QgeD0iNiIgeT0iMjIiIHdpZHRoPSIyMCIgaGVpZ2h0PSIxIiBmaWxsPSIjMjIyMjIyIi8+Cjwvc3ZnPgo="),id:"paragraph"},{label:"List Ordered",icon:ws("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTYuNzA4OTggMjAuNTMxMlYxOS43OTNMOC4wMjczNCAxOS42Mjg5VjEzLjIzNjNMNi42ODU1NSAxMy4yNTk4VjEyLjUzOTFMOS4xODE2NCAxMlYxOS42Mjg5TDEwLjQ5NDEgMTkuNzkzVjIwLjUzMTJINi43MDg5OFoiIGZpbGw9IiMyMjIyMjIiLz4KPHBhdGggZD0iTTExLjc5NDkgMjAuNTMxMlYxOS4zNDc3SDEyLjk0OTJWMjAuNTMxMkgxMS43OTQ5WiIgZmlsbD0iIzIyMjIyMiIvPgo8cmVjdCB4PSIxNSIgeT0iMTMiIHdpZHRoPSIxMSIgaGVpZ2h0PSIxIiBmaWxsPSIjMjIyMjIyIi8+CjxyZWN0IHg9IjE1IiB5PSIxNiIgd2lkdGg9IjExIiBoZWlnaHQ9IjEiIGZpbGw9IiMyMjIyMjIiLz4KPHJlY3QgeD0iMTUiIHk9IjE5IiB3aWR0aD0iMTEiIGhlaWdodD0iMSIgZmlsbD0iIzIyMjIyMiIvPgo8L3N2Zz4K"),id:"orderedList"},{label:"List Unordered",icon:ws("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgeD0iMTQiIHk9IjEyIiB3aWR0aD0iMTIiIGhlaWdodD0iMSIgZmlsbD0iIzIyMjIyMiIvPgo8cmVjdCB4PSIxNCIgeT0iMTUiIHdpZHRoPSIxMiIgaGVpZ2h0PSIxIiBmaWxsPSIjMjIyMjIyIi8+CjxyZWN0IHg9IjE0IiB5PSIxOCIgd2lkdGg9IjEyIiBoZWlnaHQ9IjEiIGZpbGw9IiMyMjIyMjIiLz4KPGNpcmNsZSBjeD0iOC41IiBjeT0iMTUuNSIgcj0iMi41IiBmaWxsPSIjMjIyMjIyIi8+Cjwvc3ZnPgo="),id:"bulletList"},{label:"Blockquote",icon:ws("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTcuNjI1IDEzQzcuMTI1IDEzIDYuNzI1IDEyLjg1IDYuNDI1IDEyLjU1QzYuMTQxNjcgMTIuMjMzMyA2IDExLjggNiAxMS4yNUM2IDEwLjAzMzMgNi4zNzUgOC45NjY2NyA3LjEyNSA4LjA1QzcuNDU4MzMgNy42MTY2NyA3LjgzMzMzIDcuMjY2NjcgOC4yNSA3TDkgNy44NzVDOC43NjY2NyA4LjA0MTY3IDguNTMzMzMgOC4yNTgzMyA4LjMgOC41MjVDNy44NSA5LjAwODMzIDcuNjI1IDkuNSA3LjYyNSAxMEM4LjAwODMzIDEwIDguMzMzMzMgMTAuMTQxNyA4LjYgMTAuNDI1QzguODY2NjcgMTAuNzA4MyA5IDExLjA2NjcgOSAxMS41QzkgMTEuOTMzMyA4Ljg2NjY3IDEyLjI5MTcgOC42IDEyLjU3NUM4LjMzMzMzIDEyLjg1ODMgOC4wMDgzMyAxMyA3LjYyNSAxM1pNMTEuNjI1IDEzQzExLjEyNSAxMyAxMC43MjUgMTIuODUgMTAuNDI1IDEyLjU1QzEwLjE0MTcgMTIuMjMzMyAxMCAxMS44IDEwIDExLjI1QzEwIDEwLjAzMzMgMTAuMzc1IDguOTY2NjcgMTEuMTI1IDguMDVDMTEuNDU4MyA3LjYxNjY3IDExLjgzMzMgNy4yNjY2NyAxMi4yNSA3TDEzIDcuODc1QzEyLjc2NjcgOC4wNDE2NyAxMi41MzMzIDguMjU4MzMgMTIuMyA4LjUyNUMxMS44NSA5LjAwODMzIDExLjYyNSA5LjUgMTEuNjI1IDEwQzEyLjAwODMgMTAgMTIuMzMzMyAxMC4xNDE3IDEyLjYgMTAuNDI1QzEyLjg2NjcgMTAuNzA4MyAxMyAxMS4wNjY3IDEzIDExLjVDMTMgMTEuOTMzMyAxMi44NjY3IDEyLjI5MTcgMTIuNiAxMi41NzVDMTIuMzMzMyAxMi44NTgzIDEyLjAwODMgMTMgMTEuNjI1IDEzWiIgZmlsbD0iIzIyMjIyMiIvPgo8cmVjdCB4PSIxNSIgeT0iMTQiIHdpZHRoPSIxMSIgaGVpZ2h0PSIxIiBmaWxsPSIjMjIyMjIyIi8+CjxyZWN0IHg9IjYiIHk9IjE4IiB3aWR0aD0iMjAiIGhlaWdodD0iMSIgZmlsbD0iIzIyMjIyMiIvPgo8cmVjdCB4PSI2IiB5PSIyMiIgd2lkdGg9IjIwIiBoZWlnaHQ9IjEiIGZpbGw9IiMyMjIyMjIiLz4KPC9zdmc+Cg=="),id:"blockquote"},{label:"Code Block",icon:ws("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEzLjQgMjAuNkw4LjggMTZMMTMuNCAxMS40TDEyIDEwTDYgMTZMMTIgMjJMMTMuNCAyMC42Wk0xOC42IDIwLjZMMjMuMiAxNkwxOC42IDExLjRMMjAgMTBMMjYgMTZMMjAgMjJMMTguNiAyMC42WiIgZmlsbD0iYmxhY2siLz4KPC9zdmc+Cg=="),id:"codeBlock"},{label:"Horizontal Line",icon:ws("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgeD0iNiIgeT0iMTUiIHdpZHRoPSIyMCIgaGVpZ2h0PSIyIiBmaWxsPSJibGFjayIvPgo8L3N2Zz4K"),id:"horizontalLine"}],rY=[{name:"flip",options:{fallbackPlacements:["top"]}},{name:"preventOverflow",options:{altAxis:!1,tether:!1}}];function a1({editor:n,range:e,props:t}){const r={dotContent:()=>{n.chain().addContentletBlock({range:e,payload:t.payload}).run()},heading:()=>{n.chain().addHeading({range:e,type:t.type}).run()},orderedList:()=>{n.chain().deleteRange(e).toggleOrderedList().focus().run()},bulletList:()=>{n.chain().deleteRange(e).toggleBulletList().focus().run()},blockquote:()=>{n.chain().deleteRange(e).setBlockquote().focus().run()},codeBlock:()=>{n.chain().deleteRange(e).setCodeBlock().focus().run()},horizontalLine:()=>{n.chain().deleteRange(e).setHorizontalRule().focus().run()}};r[t.type.name]?r[t.type.name]():n.chain().setTextSelection(e).focus().run()}const sY=n=>{let e,t;const r=new mt("suggestionPlugin"),i=new Me;function o({editor:l,range:c,clientRect:u}){t=function iY(n){const e=n.createComponent(n1);return e.changeDetectorRef.detectChanges(),e}(n),t.instance.currentLanguage=l.storage.dotConfig.lang,t.instance.allowedContentTypes=l.storage.dotConfig.allowedContentTypes,t.instance.onSelection=d=>{var f;const h=(null===(f=r.getState(l.view.state).query)||void 0===f?void 0:f.length)||0;c.to=c.to+h,a1({editor:l,range:c,props:d})},t.instance.clearFilter.pipe(_I(i)).subscribe(d=>{const f={to:c.to+r.getState(l.view.state).query.length,from:d===Qn.BLOCK?c.from:c.from+1};l.chain().deleteRange(f).run()}),e=function oY({element:n,content:e,rect:t,onHide:r}){return Za(n,{appendTo:document.body,content:e,placement:"bottom",popperOptions:{modifiers:rY},getReferenceClientRect:t,showOnCreate:!0,interactive:!0,offset:[120,10],trigger:"manual",maxWidth:"none",onHide:r})}({element:l.view.dom,content:t.location.nativeElement,rect:u,onHide:()=>{const d=l.state.tr.setMeta(sb,{open:!1});l.view.dispatch(d)}})}function s({event:l}){const{key:c}=l;return"Escape"===c?(e.hide(),!0):"Enter"===c?(t.instance.execCommand(),!0):("ArrowDown"===c||"ArrowUp"===c)&&(t.instance.updateSelection(l),!0)}function a(){null==e||e.destroy(),t.destroy(),i.next(!0),i.complete()}return Et.create({name:"actionsMenu",defaultOptions:{pluginKey:"actionsMenu",element:null,suggestion:{char:"/",pluginKey:r,allowSpaces:!0,startOfLine:!0,render:()=>({onStart:o,onKeyDown:s,onExit:a}),items:({query:l})=>(t&&t.instance.filterItems(l),[])}},addCommands:()=>({addHeading:({range:l,type:c})=>({chain:u})=>u().focus().deleteRange(l).toggleHeading({level:c.level}).focus().run(),addContentletBlock:({range:l,payload:c})=>({chain:u})=>u().deleteRange(l).command(d=>{const f=d.editor.schema.nodes.dotContent.create({data:c});return d.tr.replaceSelectionWith(f),!0}).focus().run()}),addProseMirrorPlugins(){const l=n.createComponent(WZ);return[zZ({command:a1,editor:this.editor,element:l.location.nativeElement,render:()=>({onStart:o,onKeyDown:s,onExit:a})}),HZ(Object.assign({editor:this.editor},this.options.suggestion))]}})};class aY{constructor(e,t,r){this.applicationRef=t.get(Xo);const o=t.get(Ri).resolveComponentFactory(e);this.componentRef=o.create(t,[]),this.updateProps(r),this.applicationRef.attachView(this.componentRef.hostView)}get instance(){return this.componentRef.instance}get elementRef(){return this.componentRef.injector.get(bt)}get dom(){return this.elementRef.nativeElement}updateProps(e){Object.entries(e).forEach(([t,r])=>{this.instance[t]=r})}detectChanges(){this.componentRef.changeDetectorRef.detectChanges()}destroy(){this.componentRef.destroy(),this.applicationRef.detachView(this.componentRef.hostView)}}let ab=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=wt({type:n,selectors:[["ng-component"]],inputs:{editor:"editor",node:"node",decorations:"decorations",selected:"selected",extension:"extension",getPos:"getPos",updateAttributes:"updateAttributes",deleteNode:"deleteNode"},decls:0,vars:0,template:function(t,r){},encapsulation:2}),n})();class lY extends class P5{constructor(e,t,r){this.isDragging=!1,this.component=e,this.editor=t.editor,this.options=w({stopEvent:null,ignoreMutation:null},r),this.extension=t.extension,this.node=t.node,this.decorations=t.decorations,this.getPos=t.getPos,this.mount()}mount(){}get dom(){return null}get contentDOM(){return null}onDragStart(e){var t,r,i;const{view:o}=this.editor,s=e.target,a=3===s.nodeType?null===(t=s.parentElement)||void 0===t?void 0:t.closest("[data-drag-handle]"):s.closest("[data-drag-handle]");if(!this.dom||(null===(r=this.contentDOM)||void 0===r?void 0:r.contains(s))||!a)return;let l=0,c=0;if(this.dom!==a){const f=this.dom.getBoundingClientRect(),h=a.getBoundingClientRect();l=h.x-f.x+e.offsetX,c=h.y-f.y+e.offsetY}null===(i=e.dataTransfer)||void 0===i||i.setDragImage(this.dom,l,c);const u=ne.create(o.state.doc,this.getPos()),d=o.state.tr.setSelection(u);o.dispatch(d)}stopEvent(e){var t;if(!this.dom)return!1;if("function"==typeof this.options.stopEvent)return this.options.stopEvent({event:e});const r=e.target;if(!this.dom.contains(r)||(null===(t=this.contentDOM)||void 0===t?void 0:t.contains(r)))return!1;const o="drop"===e.type;if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(r.tagName)||r.isContentEditable)&&!o)return!0;const{isEditable:a}=this.editor,{isDragging:l}=this,c=!!this.node.type.spec.draggable,u=ne.isSelectable(this.node),d="copy"===e.type,f="paste"===e.type,h="cut"===e.type,p="mousedown"===e.type,g=e.type.startsWith("drag");if(!c&&u&&g&&e.preventDefault(),c&&g&&!l)return e.preventDefault(),!1;if(c&&a&&!l&&p){const m=r.closest("[data-drag-handle]");m&&(this.dom===m||this.dom.contains(m))&&(this.isDragging=!0,document.addEventListener("dragend",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("mouseup",()=>{this.isDragging=!1},{once:!0}))}return!(l||o||d||f||h||p&&u)}ignoreMutation(e){return!this.dom||!this.contentDOM||("function"==typeof this.options.ignoreMutation?this.options.ignoreMutation({mutation:e}):!(!this.node.isLeaf&&!this.node.isAtom&&("selection"===e.type||this.dom.contains(e.target)&&"childList"===e.type&&$f()&&this.editor.isFocused&&[...Array.from(e.addedNodes),...Array.from(e.removedNodes)].every(r=>r.isContentEditable)||(this.contentDOM!==e.target||"attributes"!==e.type)&&this.contentDOM.contains(e.target))))}updateAttributes(e){this.editor.commands.command(({tr:t})=>{const r=this.getPos();return t.setNodeMarkup(r,void 0,w(w({},this.node.attrs),e)),!0})}deleteNode(){const e=this.getPos();this.editor.commands.deleteRange({from:e,to:e+this.node.nodeSize})}}{mount(){this.renderer=new aY(this.component,this.options.injector,{editor:this.editor,node:this.node,decorations:this.decorations,selected:!1,extension:this.extension,getPos:()=>this.getPos(),updateAttributes:(r={})=>this.updateAttributes(r),deleteNode:()=>this.deleteNode()}),this.extension.config.draggable&&(this.renderer.elementRef.nativeElement.ondragstart=r=>{this.onDragStart(r)}),this.contentDOMElement=this.node.isLeaf?null:document.createElement(this.node.isInline?"span":"div"),this.contentDOMElement&&(this.contentDOMElement.style.whiteSpace="inherit",this.renderer.detectChanges())}get dom(){return this.renderer.dom}get contentDOM(){return this.node.isLeaf?null:(this.maybeMoveContentDOM(),this.contentDOMElement)}maybeMoveContentDOM(){const e=this.dom.querySelector("[data-node-view-content]");this.contentDOMElement&&e&&!e.contains(this.contentDOMElement)&&e.appendChild(this.contentDOMElement)}update(e,t){return this.options.update?this.options.update(e,t):e.type===this.node.type&&(e===this.node&&this.decorations===t||(this.node=e,this.decorations=t,this.renderer.updateProps({node:e,decorations:t}),this.maybeMoveContentDOM()),!0)}selectNode(){this.renderer.updateProps({selected:!0})}deselectNode(){this.renderer.updateProps({selected:!1})}destroy(){this.renderer.destroy()}}const l1=(n,e)=>t=>new lY(n,t,e);function cY(n,e){if(1&n&&(H(0,"a",2),$t(1,"img",3),z()),2&n){const t=U();k("href",t.href,so),N(1),k("src",t.data.asset,so)("alt",t.data.name)}}function uY(n,e){if(1&n&&$t(0,"img",4),2&n){const t=U();k("src",t.data.asset,so)("alt",t.data.name)}}let dY=(()=>{class n extends ab{constructor(t){super(),this._elementRef=t}ngOnInit(){this.data=this.node.attrs.data,this.editor.on("update",this.updateImageAttributes.bind(this)),this.updateImageAttributes()}ngOnDestroy(){this.editor.off("update",this.updateImageAttributes.bind(this))}updateImageAttributes(){this._elementRef.nativeElement.style.textAlign=this.node.attrs.textAlign,this.href=this.node.attrs.href}}return n.\u0275fac=function(t){return new(t||n)(S(bt))},n.\u0275cmp=wt({type:n,selectors:[["dotcms-image-block"]],features:[Te],decls:3,vars:2,consts:[["target","_blank","rel","noreferrer",3,"href",4,"ngIf","ngIfElse"],["noLink",""],["target","_blank","rel","noreferrer",3,"href"],[3,"src","alt"],["loading","lazy",3,"src","alt"]],template:function(t,r){if(1&t&&(G(0,cY,2,3,"a",0),G(1,uY,1,2,"ng-template",null,1,Jo)),2&t){const i=co(2);k("ngIf",r.href)("ngIfElse",i)}},directives:[ho],styles:["[_nghost-%COMP%]{display:block;margin-bottom:1rem}[_nghost-%COMP%] img[_ngcontent-%COMP%]{max-width:100%}"]}),n})();const fY=n=>hn.create({name:"dotImage",group:"block",inline:!1,draggable:!0,addAttributes:()=>({data:{default:null,parseHTML:e=>e.getAttribute("data"),renderHTML:e=>({data:e.data})},href:{default:null,parseHTML:e=>e.getAttribute("href"),renderHTML:e=>({href:e.href})}}),addCommands:()=>({setImageLink:e=>({commands:t})=>t.updateAttributes("dotImage",e),unsetImageLink:()=>({commands:e})=>e.updateAttributes("dotImage",{href:""})}),parseHTML:()=>[{tag:"dotcms-image-block"}],renderHTML:({HTMLAttributes:e})=>["dotcms-image-block",xt(e)],addNodeView:()=>l1(dY,{injector:n})});let hY=(()=>{class n extends ab{}return n.\u0275fac=function(){let e;return function(r){return(e||(e=jt(n)))(r||n)}}(),n.\u0275cmp=wt({type:n,selectors:[["dotcms-message"]],features:[Te],decls:2,vars:2,consts:[[3,"ngClass"]],template:function(t,r){1&t&&(H(0,"span",0),Ze(1),z()),2&t&&(k("ngClass",r.data.type),N(1),Tn(r.data.message))},directives:[fc],styles:["dotcms-message{background-color:#b3b1b8;display:block;padding:1rem}\n"],encapsulation:2}),n})();const lb=new Xe({state:{init:()=>Oe.empty,apply(n,e){e=e.map(n.mapping,n.doc);const t=n.getMeta(this);if(t&&t.add){const r=Ct.widget(t.add.pos,t.add.element,{id:t.add.id});e=e.add(n.doc,[r])}else t&&t.remove&&(e=e.remove(e.find(null,null,r=>r.id==t.remove.id)));return e}},props:{decorations(n){return this.getState(n)}}}),pY=(n,e)=>Et.create({name:"imageUpload",addProseMirrorPlugins(){const t=n.get(e1),r=this.editor;function i(c){let u;if(u="drop"===c.type?c.dataTransfer.files:c.clipboardData.files,u.length>0)for(let d=0;d{const g={attrs:{data:h[0][Object.keys(h[0])[0]]},type:"dotImage"};r.commands.insertContentAt(d,g)},h=>alert(h.message),()=>function a(c){const{view:u}=r,{state:d}=u;u.dispatch(d.tr.setMeta(lb,{remove:{id:c}}))}(f))}return[lb,new Xe({key:new mt("imageUpload"),props:{handleDOMEvents:{paste(c,u){if(i(u)){if(1!==u.clipboardData.files.length)return alert("Can paste just one image at a time"),!1;const{from:d}=function l(c){const{state:u}=c,{selection:d}=u,{ranges:f}=d;return{from:Math.min(...f.map(g=>g.$from.pos)),to:Math.max(...f.map(g=>g.$to.pos))}}(c);s(c,Array.from(u.clipboardData.files),d)}return!1},drop(c,u){if(i(u)){if(u.preventDefault(),1!==u.dataTransfer.files.length)return alert("Can drop just one image at a time"),!1;const{pos:d}=c.posAtCoords({left:u.clientX,top:u.clientY});s(c,Array.from(u.dataTransfer.files),d)}return!1}}}})]}});let gY=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=wt({type:n,selectors:[["dotcms-drag-handler"]],decls:2,vars:0,consts:[[1,"material-icons"]],template:function(t,r){1&t&&(H(0,"i",0),Ze(1,"drag_indicator"),z())},styles:["[_nghost-%COMP%]{position:absolute;cursor:grab;z-index:1;opacity:0;color:var(--color-background);transition:opacity .25s,top .15s}.visible[_nghost-%COMP%]{opacity:1}"]}),n})();const mY=n=>Et.create({name:"dragHandler",addProseMirrorPlugins(){let e=null;const i=n.createComponent(gY).location.nativeElement;function c(p){for(var g,m;p&&p.parentNode&&!(null===(g=p.classList)||void 0===g?void 0:g.contains("ProseMirror"))&&!(null===(m=p.parentNode.classList)||void 0===m?void 0:m.contains("ProseMirror"));)p=p.parentNode;return p}function f(){i.classList.remove("visible")}return[new Xe({key:new mt("dragHandler"),view:p=>(requestAnimationFrame(()=>function d(p){i.setAttribute("draggable","true"),i.addEventListener("dragstart",g=>function l(p,g){if(!p.dataTransfer)return;const _=function a(p,g){const m=g.posAtCoords(p);if(m){const _=c(g.nodeDOM(m.inside));if(_&&1===_.nodeType){const v=g.docView.nearestDesc(_,!0);if(v&&v!==g.docView)return v.posBefore}}return null}({left:p.clientX+50,top:p.clientY},g);if(null!=_){g.dispatch(g.state.tr.setSelection(ne.create(g.state.doc,_)));const v=g.state.selection.content();p.dataTransfer.clearData(),p.dataTransfer.setDragImage(e,10,10),g.dragging={slice:v,move:!0}}}(g,p)),i.classList.remove("visible"),p.dom.parentElement.appendChild(i)}(p)),document.body.addEventListener("scroll",f,!0),{destroy(){(function s(p){p&&p.parentNode&&p.parentNode.removeChild(p)})(i),document.body.removeEventListener("scroll",f,!0)}}),props:{handleDOMEvents:{drop:()=>(setTimeout(()=>{const p=document.querySelector(".ProseMirror-hideselection");p&&p.classList.remove("ProseMirror-hideselection"),i.classList.remove("visible")}),!1),mousemove(p,g){const _=p.posAtCoords({left:g.clientX+50,top:g.clientY});if(_&&function u(p,g){const m=p.nodeDOM(g);return!(!(null==m?void 0:m.hasChildNodes())||1===m.childNodes.length&&"BR"==m.childNodes[0].nodeName)}(p,_.inside))if(e=c(p.nodeDOM(_.inside)),function h(p){var g;return p&&!(null===(g=p.classList)||void 0===g?void 0:g.contains("ProseMirror"))&&!p.innerText.startsWith("/")}(e)){const{top:v,left:b}=function o(p,g){return{top:g.getBoundingClientRect().top-p.getBoundingClientRect().top,left:g.getBoundingClientRect().left-p.getBoundingClientRect().left}}(p.dom.parentElement,e);i.style.left=b-25+"px",i.style.top=v<0?0:v+"px",i.classList.add("visible")}else i.classList.remove("visible");else e=null,i.classList.remove("visible");return!1}}}})]}}),vY=["input"];function yY(n,e){if(1&n){const t=ti();H(0,"div",6)(1,"div",7)(2,"span",8),Ze(3,"LINKED TO"),z(),H(4,"div",9)(5,"a",10)(6,"span",11),Ze(7,"language"),z(),Ze(8),Id(9,"slice"),z()()(),H(10,"div",12)(11,"button",13),Pe("click",function(){return Bt(t),U().copyLink()}),Ze(12," COPY LINK "),z(),H(13,"button",14),Pe("click",function(){return Bt(t),U().removeLink.emit(!0)}),Ze(14," REMOVE LINK "),z()()()}if(2&n){const t=U();N(5),k("href",t.nodeLink,so),N(3),uo(" ",t.nodeLink.length>50?function Dw(n,e,t,r,i){const o=n+20,s=I(),a=Ls(s,o);return ic(s,o)?yw(s,mn(),e,a.transform,t,r,i,a):a.transform(t,r,i)}(9,2,t.nodeLink,0,50)+"...":t.nodeLink," ")}}let _Y=(()=>{class n{constructor(){this.hideForm=new Ae(!1),this.removeLink=new Ae(!1),this.setLink=new Ae,this.nodeLink="",this.newLink=""}addLink(){this.setLink.emit(this.newLink)}copyLink(){navigator.clipboard.writeText(this.nodeLink).then(()=>this.hideForm.emit(!0)).catch(()=>alert("Could not copy link"))}focusInput(){this.input.nativeElement.focus()}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=wt({type:n,selectors:[["dotcms-bubble-menu-link-form"]],viewQuery:function(t,r){if(1&t&&xd(vY,5),2&t){let i;$n(i=Gn())&&(r.input=i.first)}},inputs:{nodeLink:"nodeLink",newLink:"newLink"},outputs:{hideForm:"hideForm",removeLink:"removeLink",setLink:"setLink"},decls:7,vars:2,consts:[[1,"form-container"],["autoComplete","off",3,"mousedown","submit"],["name","link","placeholder","Type or Paste Link","type","text",3,"ngModel","ngModelChange"],["input",""],["click","addLink()",1,"btn","btn-add"],["class","card-container",4,"ngIf"],[1,"card-container"],[1,"card-header"],[1,"linked-to"],[1,"link-container"],["target","_blank",1,"link",3,"href"],[1,"material-icons"],[1,"card-footer"],[1,"btn","btn-copy",3,"click"],[1,"btn","btn-remove",3,"click"]],template:function(t,r){1&t&&(H(0,"div",0)(1,"form",1),Pe("mousedown",function(){return r.focusInput()})("submit",function(){return r.addLink()}),H(2,"input",2,3),Pe("ngModelChange",function(o){return r.newLink=o}),z(),H(4,"button",4),Ze(5,"ADD"),z()(),G(6,yY,15,6,"div",5),z()),2&t&&(N(2),k("ngModel",r.newLink),N(4),k("ngIf",r.nodeLink))},directives:[BM,EM,ff,ef,bv,hf,ho],pipes:[FS],styles:[".form-container[_ngcontent-%COMP%]{background:#ffffff;border-radius:2px;box-shadow:0 4px 10px #0a07251a;display:flex;flex-direction:column;padding:.5rem;width:400px}form[_ngcontent-%COMP%]{align-items:center;display:flex;flex-direction:row;gap:.5rem;justify-content:space-between;width:100%}form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{background:#FFFFFF;border-radius:2px;border:1px solid #B3B1B8;box-sizing:border-box;padding:.85rem;width:calc(100% - 5.5rem)}form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus{outline:none}.card-container[_ngcontent-%COMP%]{padding:.5rem}.card-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding-bottom:.75rem;padding-top:1rem}.linked-to[_ngcontent-%COMP%]{color:#7e7a86;font-size:.85rem;font-weight:500}.link-container[_ngcontent-%COMP%]{cursor:pointer;white-space:nowrap;word-wrap:normal}.link-container[_ngcontent-%COMP%]:hover{background-color:#f1f3f4}.link[_ngcontent-%COMP%]{align-items:center;color:#0a0725;display:flex;font-size:1rem;gap:.5rem;height:100%;justify-content:flex-start;padding:.5rem 0;text-decoration:none;width:100%}.card-footer[_ngcontent-%COMP%]{align-items:center;display:flex;justify-content:space-between}.btn[_ngcontent-%COMP%]{align-items:center;background:#ffffff;border-radius:2px;cursor:pointer;display:flex;font-weight:700;justify-content:center;padding:.85rem 1rem;width:180px}.btn-add[_ngcontent-%COMP%]{width:5.5rem;background:#576BE8;border:1px solid #576BE8;color:#fff}.btn-copy[_ngcontent-%COMP%]{border:1px solid #576BE8;color:#576be8}.btn-remove[_ngcontent-%COMP%]{border:1px solid #EC4B41;color:#ec4b41}"]}),n})();class bY{constructor({editor:e,element:t,view:r,tippyOptions:i={},pluginKey:o,storage:s,component:a}){this.focusHandler=()=>{var l;(null===(l=this.tippy)||void 0===l?void 0:l.state.isVisible)&&this.hide()},this.editor=e,this.element=t,this.view=r,this.tippyOptions=i,this.element.remove(),this.element.style.visibility="visible",this.pluginKey=o,this.component=a,this.storage=s,this.editor.on("focus",this.focusHandler),this.setComponentEvents(),document.body.addEventListener("scroll",this.hanlderScroll.bind(this),!0)}update(e,t){var r;const i=this.pluginKey.getState(e.state),o=this.pluginKey.getState(t);i.toggle!==o.toggle?(this.createTooltip(),(null===(r=this.tippy)||void 0===r?void 0:r.state.isVisible)?this.hide():this.show(),this.detectLinkFormChanges()):this.detectLinkFormChanges()}createTooltip(){const{element:e}=this.editor.options;this.tippy||!e.parentElement||(this.tippy=Za(e,Object.assign({appendTo:document.body,duration:250,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"bottom-start",hideOnClick:"toggle"},this.tippyOptions)))}show(){var e,t;null===(e=this.tippy)||void 0===e||e.show(),this.setInputValues(),this.focusInput(),null===(t=this.tippy)||void 0===t||t.setProps({getReferenceClientRect:()=>this.setTippyPosition()})}hide(){var e;null===(e=this.tippy)||void 0===e||e.hide(),this.editor.view.focus(),this.editor.commands.unsetHighlight()}setTippyPosition(){const{view:e}=this.editor,{state:t}=e,{doc:r,selection:i}=t,{ranges:o}=i,s=Math.min(...o.map(g=>g.$from.pos)),l=Ua(e,s,Math.max(...o.map(g=>g.$to.pos))),{element:c}=this.editor.options,u=c.parentElement.getBoundingClientRect(),d=document.querySelector("#bubble-menu").getBoundingClientRect(),f=u.bottomthis.hide()),this.component.instance.removeLink.subscribe(()=>this.removeLink()),this.component.instance.setLink.subscribe(e=>this.addLink(e))}detectLinkFormChanges(){this.component.changeDetectorRef.detectChanges()}getNodeLink(){return this.editor.isActive("link")?this.editor.getAttributes("link").href:this.editor.getAttributes("dotImage").href||""}getLinkSelect(){const{state:e}=this.editor,{from:t,to:r}=e.selection,i=e.doc.textBetween(t,r," ");return this.isLink(i)?i:""}isLink(e){return!!new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i").test(e)}isDotImageNode(){const{type:e}=this.editor.state.doc.nodeAt(this.editor.state.selection.from);return"dotImage"===e.name}destroy(){var e;null===(e=this.tippy)||void 0===e||e.destroy(),this.editor.off("focus",this.focusHandler)}hanlderScroll(){var e,t;(null===(e=this.tippy)||void 0===e?void 0:e.state.isVisible)&&(null===(t=this.tippy)||void 0===t||t.hide())}}const DY=n=>new Xe({key:n.pluginKey,view:e=>new bY(Object.assign({view:e},n)),state:{init:()=>({toggle:!0}),apply:e=>(e.getMeta(n.pluginKey),{toggle:n.storage.show})}}),CY=new mt("addLink"),EY=(n,e)=>Et.create({name:"bubbleLinkForm",defaultOptions:{element:null,tippyOptions:{},pluginKey:CY},addStorage:()=>({show:!0}),addCommands(){return{toogleLinkForm:()=>({commands:t})=>(this.storage.show=!this.storage.show,t.setHighlight())}},addProseMirrorPlugins(){const t=e.createComponent(_Y);return t.changeDetectorRef.detectChanges(),[DY({pluginKey:this.options.pluginKey,editor:this.editor,element:t.location.nativeElement,tippyOptions:this.options.tippyOptions,storage:this.storage,component:t})]}}),wY=({editor:n,state:e,from:t,to:r})=>{const{doc:i,selection:o}=e,{empty:s}=o,a=n.state.doc.nodeAt(n.state.selection.from),l=!i.textBetween(t,r).length&&r_(e.selection);return!(!n.isFocused||s||l||"dotContent"==(null==a?void 0:a.type.name))},c1=n=>n.isActive("bulletList")||n.isActive("orderedList"),MY=[{icon:"format_bold",markAction:"bold",active:!1},{icon:"format_underlined",markAction:"underline",active:!1},{icon:"format_italic",markAction:"italic",active:!1},{icon:"strikethrough_s",markAction:"strike",active:!1,divider:!0},{icon:"format_align_left",markAction:"left",active:!1},{icon:"format_align_center",markAction:"center",active:!1},{icon:"format_align_right",markAction:"right",active:!1,divider:!0},{icon:"format_list_bulleted",markAction:"bulletList",active:!1},{icon:"format_list_numbered",markAction:"orderedList",active:!1},{icon:"format_indent_decrease",markAction:"outdent",active:!1},{icon:"format_indent_increase",markAction:"indent",active:!1,divider:!0},{icon:"link",markAction:"link",active:!1,divider:!0},{icon:"format_clear",markAction:"clearAll",active:!1,divider:!0},{icon:"delete",markAction:"deleteNode",active:!1}],IY=[{icon:"format_align_left",markAction:"left",active:!1},{icon:"format_align_center",markAction:"center",active:!1},{icon:"format_align_right",markAction:"right",active:!1,divider:!0},{icon:"link",markAction:"link",active:!1,divider:!0},{icon:"delete",markAction:"deleteNode",active:!1,divider:!1}],TY=[{name:"offset",options:{offset:[0,5]}},{name:"flip",options:{fallbackPlacements:["bottom-start","top-start"]}},{name:"preventOverflow",options:{altAxis:!0,tether:!0}}],u1=(n,e)=>{let r,t=n.depth;do{if(r=n.node(t),r){if(Array.isArray(e)&&e.includes(r.type.name))break;t--}}while(t>0&&r);return r},xY=n=>{const e=n.component.instance,t=n.changeToComponent.instance;return new Xe({key:"string"==typeof n.pluginKey?new mt(n.pluginKey):n.pluginKey,view:r=>new AY(Object.assign({view:r},n)),props:{handleKeyDown(r,i){const{key:o}=i;if(t.isOpen){if("Escape"===o)return e.toggleChangeTo.emit(),!0;if("Enter"===o)return t.execCommand(),!0;if("ArrowDown"===o||"ArrowUp"===o)return t.updateSelection(i),!0}return!1}}})};class AY extends EO{constructor(e){super(e),this.shouldShowProp=!1,this.updateActiveItems=(i=[],o)=>i.map(s=>(s.active=o.includes(s.markAction),s)),this.enabledMarks=()=>[...Object.keys(this.editor.schema.marks),...Object.keys(this.editor.schema.nodes)],this.setActiveMarks=(i=[])=>[...this.enabledMarks().filter(o=>this.editor.isActive(o)),...i.filter(o=>this.editor.isActive({textAlign:o}))];const{component:t,changeToComponent:r}=e;this.component=t,this.changeTo=r,this.changeToElement=this.changeTo.location.nativeElement,this.component.instance.command.subscribe(this.exeCommand.bind(this)),this.component.instance.toggleChangeTo.subscribe(this.toggleChangeTo.bind(this)),this.changeTo.instance.items=this.setChangeToOptions(),this.changeTo.instance.title="Change To",this.changeToElement.remove(),this.changeTo.changeDetectorRef.detectChanges(),document.body.addEventListener("scroll",this.hanlderScroll.bind(this),!0),document.body.addEventListener("mouseup",this.showMenu.bind(this),!0),document.body.addEventListener("keyup",this.showMenu.bind(this),!0)}showMenu(){var e;this.shouldShowProp&&(null===(e=this.tippyChangeTo)||void 0===e||e.setProps({getReferenceClientRect:()=>{var t;return null===(t=this.tippy)||void 0===t?void 0:t.popper.getBoundingClientRect()}}),this.show())}update(e,t){var r,i,o;const{state:s,composing:a}=e,{doc:l,selection:c}=s,u=t&&t.doc.eq(l)&&t.selection.eq(c);if(a||u)return;this.createTooltip(),this.createChangeToTooltip();const{ranges:d}=c;this.selection$FromPos=d[0].$from;const f=Math.min(...d.map(p=>p.$from.pos)),h=Math.max(...d.map(p=>p.$to.pos));if(this.shouldShowProp=null===(r=this.shouldShow)||void 0===r?void 0:r.call(this,{editor:this.editor,view:e,state:s,oldState:t,from:f,to:h}),!this.shouldShowProp)return this.hide(),void(null===(i=this.tippyChangeTo)||void 0===i||i.hide());null===(o=this.tippy)||void 0===o||o.setProps({getReferenceClientRect:()=>{if(wA(c)){const p=e.nodeDOM(f);if(p)return((n,e)=>{const t=n.getElementsByTagName("img")[0];return"dotImage"===e&&t?t.getBoundingClientRect():n.getBoundingClientRect()})(p,l.nodeAt(f).type.name)}return Ua(e,f,h)}}),this.updateComponent(),this.setMenuItems(l,f)}destroy(){var e,t;null===(e=this.tippy)||void 0===e||e.destroy(),null===(t=this.tippyChangeTo)||void 0===t||t.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.component.instance.command.unsubscribe(),this.component.instance.toggleChangeTo.unsubscribe(),this.component.destroy(),this.changeTo.destroy(),document.body.removeEventListener("scroll",this.hanlderScroll.bind(this),!0),document.body.removeEventListener("mouseup",this.showMenu.bind(this),!0),document.body.removeEventListener("keyup",this.showMenu.bind(this),!0)}updateComponent(){const{items:e}=this.component.instance,r=this.setActiveMarks(["left","center","right"]);this.setSelectedNodeItem(),this.component.instance.items=this.updateActiveItems(e,r),this.component.changeDetectorRef.detectChanges()}setMenuItems(e,t){const r=e.nodeAt(t),i="dotImage"==(null==r?void 0:r.type.name);this.selectionNode=r,this.component.instance.items=i?IY:MY}exeCommand(e){const{markAction:t,active:r}=e;switch(t){case"bold":this.editor.commands.toggleBold();break;case"italic":this.editor.commands.toggleItalic();break;case"strike":this.editor.commands.toggleStrike();break;case"underline":this.editor.commands.toggleUnderline();break;case"left":case"center":case"right":this.toggleTextAlign(t,r);break;case"bulletList":this.editor.commands.toggleBulletList();break;case"orderedList":this.editor.commands.toggleOrderedList();break;case"indent":c1(this.editor)&&this.editor.commands.sinkListItem("listItem");break;case"outdent":c1(this.editor)&&this.editor.commands.liftListItem("listItem");break;case"link":this.editor.commands.toogleLinkForm();break;case"deleteNode":this.deleteNode();break;case"clearAll":this.editor.commands.unsetAllMarks(),this.editor.commands.clearNodes()}}toggleTextAlign(e,t){t?this.editor.commands.unsetTextAlign():this.editor.commands.setTextAlign(e)}setChangeToOptions(){const e=s1.filter(r=>"horizontalLine"!=r.id),t={heading1:()=>{this.editor.chain().focus().clearNodes().setHeading({level:1}).run()},heading2:()=>{this.editor.chain().focus().clearNodes().setHeading({level:2}).run()},heading3:()=>{this.editor.chain().focus().clearNodes().setHeading({level:3}).run()},paragraph:()=>{this.editor.chain().focus().clearNodes().setParagraph().run()},orderedList:()=>{this.editor.chain().focus().clearNodes().toggleOrderedList().run()},bulletList:()=>{this.editor.chain().focus().clearNodes().toggleBulletList().run()},blockquote:()=>{this.editor.chain().focus().clearNodes().toggleBlockquote().run()},codeBlock:()=>{this.editor.chain().focus().clearNodes().toggleCodeBlock().run()}};return e.forEach(r=>{r.isActive=()=>r.id.includes("heading")?this.editor.isActive("heading",r.attributes):this.editor.isActive(r.id),r.command=()=>{t[r.id](),this.tippyChangeTo.hide(),this.setSelectedNodeItem()}}),e}setSelectedNodeItem(){const e=this.changeTo.instance.items,t=e.filter(i=>null==i?void 0:i.isActive()),r=t.length>1?t[1]:t[0];this.changeTo.instance.updateActiveItem(e.findIndex(i=>i===r)),this.component.instance.selected=(null==r?void 0:r.label)||""}createChangeToTooltip(){const{element:e}=this.editor.options;this.tippyChangeTo||!e||(this.tippyChangeTo=Za(e,Object.assign(Object.assign({},this.tippyOptions),{appendTo:document.body,getReferenceClientRect:null,content:this.changeToElement,placement:"bottom-start",duration:0,hideOnClick:!1,popperOptions:{modifiers:TY},onHide:()=>{this.changeTo.instance.isOpen=!1},onShow:()=>{this.changeTo.instance.isOpen=!0,this.setSelectedNodeItem()}})))}toggleChangeTo(){var e,t;this.tippyChangeTo.state.isVisible?null===(e=this.tippyChangeTo)||void 0===e||e.hide():null===(t=this.tippyChangeTo)||void 0===t||t.show()}hanlderScroll(){var e,t;(null===(e=this.tippyChangeTo)||void 0===e?void 0:e.state.isVisible)&&(null===(t=this.tippyChangeTo)||void 0===t||t.hide())}deleteNode(){VY.includes(this.selectionNode.type.name)?this.deleteSelectedCustomNodeType():this.deleteSelectionNode()}deleteSelectedCustomNodeType(){const e=this.selection$FromPos.pos,t=e+1;this.editor.chain().deleteRange({from:e,to:t}).blur().run()}deleteSelectionNode(){const e=u1(this.selection$FromPos);switch(e.type.name){case Ci.ORDERED_LIST:case Ci.BULLET_LIST:const r=u1(this.selection$FromPos,[Ci.ORDERED_LIST,Ci.BULLET_LIST]),{childCount:i}=r;i>1?this.editor.chain().deleteNode(Ci.LIST_ITEM).blur().run():this.editor.chain().deleteNode(r.type).blur().run();break;default:this.editor.chain().deleteNode(e.type).blur().run()}}}const OY={duration:500,maxWidth:"none",placement:"top-start",trigger:"manual",interactive:!0};function kY(n){const e=n.createComponent(LZ),t=e.location.nativeElement,r=n.createComponent(n1),i=r.location.nativeElement;return wq.extend({addOptions:()=>({element:null,tippyOptions:OY,pluginKey:"bubbleMenu",shouldShow:wY}),addProseMirrorPlugins(){return t?[xY({component:e,changeToComponent:r,pluginKey:this.options.pluginKey,editor:this.editor,element:t,changeToElement:i,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow})]:[]}})}let NY=(()=>{class n{transform({live:t,working:r,deleted:i,hasLiveVersion:o}){return{live:t,working:r,deleted:i,hasLiveVersion:o}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275pipe=gn({name:"contentletState",type:n,pure:!0}),n})();function RY(n,e){if(1&n&&$t(0,"dot-contentlet-thumbnail",3),2&n){const t=U();k("width",94)("height",94)("iconSize","72px")("contentlet",t.data)}}function PY(n,e){if(1&n&&(H(0,"h3"),Ze(1),z()),2&n){const t=U();N(1),Tn(t.data.title)}}function FY(n,e){if(1&n&&(H(0,"span"),Ze(1),z()),2&n){const t=U();N(1),Tn(t.data.contentType)}}function LY(n,e){if(1&n&&(H(0,"div",4),$t(1,"dot-state-icon",5),Id(2,"contentletState"),H(3,"dot-badge",6),Ze(4),Id(5,"lowercase"),z()()),2&n){const t=U();N(1),k("state",Cm(2,3,t.data)),N(2),k("bordered",!0),N(1),Tn(Cm(5,5,t.data.language))}}let BY=(()=>{class n extends ab{ngOnInit(){this.data=this.node.attrs.data}}return n.\u0275fac=function(){let e;return function(r){return(e||(e=jt(n)))(r||n)}}(),n.\u0275cmp=wt({type:n,selectors:[["dotcms-contentlet-block"]],features:[Te],decls:5,vars:2,consts:[["pTemplate","header"],[4,"pTemplate"],["pTemplate","footer"],[3,"width","height","iconSize","contentlet"],[1,"state"],["size","16px",3,"state"],[3,"bordered"]],template:function(t,r){1&t&&(H(0,"p-card"),G(1,RY,1,4,"ng-template",0),G(2,PY,2,1,"h3",1),G(3,FY,2,1,"span",1),G(4,LY,6,7,"ng-template",2),z()),2&t&&(N(2),k("pTemplate","title"),N(1),k("pTemplate","subtitle"))},directives:[BK,jv],pipes:[NY,RS],styles:["dotcms-contentlet-block{display:block;height:100%;width:100%;box-sizing:border-box;margin-bottom:1rem}.p-card{background:#ffffff;border:1px solid #b3b1b8;color:#0a0725;display:flex}.p-card .p-card-header{box-sizing:border-box;min-width:110px;padding:.5rem;width:110px}.p-card .p-card-body{box-sizing:border-box;min-width:100px;padding:1rem 1.5rem 1rem 1rem;flex:1}.p-card .p-card-body .p-card-content{padding:0}.p-card .p-card-content{padding:1rem 0}.p-card .p-card-title{overflow:hidden;width:100%}.p-card .p-card-title h3{font-size:1.5rem;overflow:hidden;font-weight:700;margin:0;margin-bottom:.5rem;text-overflow:ellipsis;white-space:nowrap}.p-card .p-card-subtitle{color:#7e7a86;font-size:.85rem;font-weight:regular;margin-bottom:1rem}.p-card dot-contentlet-thumbnail{align-items:center;display:block;position:relative;width:94px;height:94px}.p-card .state{align-items:center;display:flex}.p-card .state>*{margin-right:.5rem}.p-card .state>*:last-child{margin-right:0}\n"],encapsulation:2}),n})();const jY=n=>hn.create({name:"dotContent",group:"block",inline:!1,draggable:!0,addAttributes:()=>({data:{default:null,parseHTML:e=>({data:e.getAttribute("data")}),renderHTML:e=>({data:e.data})}}),parseHTML:()=>[{tag:"dotcms-contentlet-block"}],renderHTML:({HTMLAttributes:e})=>["dotcms-contentlet-block",xt(e)],addNodeView:()=>l1(BY,{injector:n})}),d1=1;var Ci=(()=>(function(n){n.DOT_IMAGE="dotImage",n.LIST_ITEM="listItem",n.BULLET_LIST="bulletList",n.ORDERED_LIST="orderedList",n.BLOCKQUOTE="blockquote",n.CODE_BLOCK="codeBlock",n.DOC="doc",n.DOT_CONTENT="dotContent",n.PARAGRAPH="paragraph",n.HARD_BREAK="hardBreak",n.HEADING="heading",n.HORIZONTAL_RULE="horizontalRule",n.TEXT="text"}(Ci||(Ci={})),Ci))();const VY=[Ci.DOT_IMAGE,Ci.DOT_CONTENT],HY=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))$/,UY=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))/g,zY=di.create({name:"highlight",addOptions:()=>({multicolor:!1,HTMLAttributes:{}}),addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:n=>n.getAttribute("data-color")||n.style.backgroundColor,renderHTML:n=>n.color?{"data-color":n.color,style:`background-color: ${n.color}`}:{}}}:{}},parseHTML:()=>[{tag:"mark"}],renderHTML({HTMLAttributes:n}){return["mark",xt(this.options.HTMLAttributes,n),0]},addCommands(){return{setHighlight:n=>({commands:e})=>e.setMark(this.name,n),toggleHighlight:n=>({commands:e})=>e.toggleMark(this.name,n),unsetHighlight:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[ms({find:HY,type:this.type})]},addPasteRules(){return[xo({find:UY,type:this.type})]}});function cb(n){this.j={},this.jr=[],this.jd=null,this.t=n}cb.prototype={accepts:function(){return!!this.t},tt:function(e,t){if(t&&t.j)return this.j[e]=t,t;var r=t,i=this.j[e];if(i)return r&&(i.t=r),i;i=Ve();var o=Nh(this,e);return o?(Object.assign(i.j,o.j),i.jr.append(o.jr),i.jr=o.jd,i.t=r||o.t):i.t=r,this.j[e]=i,i}};var Ve=function(){return new cb},J=function(e){return new cb(e)},O=function(e,t,r){e.j[t]||(e.j[t]=r)},Ut=function(e,t,r){e.jr.push([t,r])},Nh=function(e,t){var r=e.j[t];if(r)return r;for(var i=0;i=s)return[];for(;o0&&void 0!==arguments[0]?arguments[0]:[],e=Ve(),t=J(_r),r=J(zr),i=Ve(),o=J("WS"),s=[[Du,r],[yu,r],[_u,r],[bu,r]],a=function(){var y=J(zr);return y.j={"-":i},y.jr=[].concat(s),y},l=function(y){var D=a();return D.t=y,D};WY(e,[["'",J(Ph)],["{",J(ol)],["[",J(pu)],["<",J(gu)],["(",J(mu)],["}",J(Ms)],["]",J(sl)],[">",J(al)],[")",J(ll)],["&",J(Rh)],["*",J(Fh)],["@",J(cl)],["`",J(Bh)],["^",J(jh)],[":",J(vu)],[",",J(fb)],["$",J(Vh)],[".",J(Bo)],["=",J(Hh)],["!",J(hb)],["-",J(Uh)],["%",J(zh)],["|",J(Wh)],["+",J($h)],["#",J(Gh)],["?",J(qh)],['"',J(pb)],["/",J(Zi)],[";",J(gb)],["~",J(Kh)],["_",J(Zh)],["\\",J(Lh)]]),O(e,"\n",J("NL")),Ut(e,p1,o),O(o,"\n",Ve()),Ut(o,p1,o);for(var c=0;c2&&void 0!==arguments[2]?arguments[2]:{},r=Object.create(n.prototype);for(var i in t)r[i]=t[i];r.constructor=e,e.prototype=r}(Jh,t,e),t}Jh.prototype={t:"token",isLink:!1,toString:function(){return this.v},toHref:function(){return this.toString()},startIndex:function(){return this.tk[0].s},endIndex:function(){return this.tk[this.tk.length-1].e},toObject:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Xt.defaultProtocol;return{type:this.t,value:this.v,isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}}};var v1=Is("email",{isLink:!0}),mb=Is("email",{isLink:!0,toHref:function(){return"mailto:"+this.toString()}}),vb=Is("text"),y1=Is("nl"),jo=Is("url",{isLink:!0,toHref:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Xt.defaultProtocol,t=this.tk,r=!1,i=!1,o=[],s=0;t[s].t===il;)r=!0,o.push(t[s].v),s++;for(;t[s].t===Zi;)i=!0,o.push(t[s].v),s++;for(;s=0&&f++,i++,u++;if(f<0)for(var h=i-u;h0&&(o.push(yb(vb,e,s)),s=[]);var p=d.t,g=t.slice((i-=f)-(u-=f),i);o.push(yb(p,e,g))}}return s.length>0&&o.push(yb(vb,e,s)),o}(ct.parser.start,n,function qY(n,e){for(var t=function KY(n){for(var e=[],t=n.length,r=0;r56319||r+1===t||(o=n.charCodeAt(r+1))<56320||o>57343?n[r]:n.slice(r,r+2);e.push(s),r+=s.length}return e}(e.replace(/[A-Z]/g,function(h){return h.toLowerCase()})),r=t.length,i=[],o=0,s=0;s=0&&(d+=t[s].length,f++),c+=t[s].length,o+=t[s].length,s++;s-=f,i.push({t:u.t,v:e.substr((o-=d)-(c-=d),c),s:o-c,e:o})}return i}(ct.scanner.start,n))}function bb(n){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,t=_1(n),r=[],i=0;i1&&void 0!==arguments[1]?arguments[1]:null,t=_1(n);return 1===t.length&&t[0].isLink&&(!e||t[0].t===e)}function eQ(n){return new Xe({key:new mt("autolink"),appendTransaction:(e,t,r)=>{const i=e.some(u=>u.docChanged)&&!t.doc.eq(r.doc),o=e.some(u=>u.getMeta("preventAutolink"));if(!i||o)return;const{tr:s}=r,a=function B5(n,e){const t=new gt(n);return e.forEach(r=>{r.steps.forEach(i=>{t.step(i)})}),t}(t.doc,e),{mapping:l}=a;return function U5(n){const{mapping:e,steps:t}=n,r=[];return e.maps.forEach((i,o)=>{const s=[];if(i.ranges.length)i.forEach((a,l)=>{s.push({from:a,to:l})});else{const{from:a,to:l}=t[o];if(void 0===a||void 0===l)return;s.push({from:a,to:l})}s.forEach(({from:a,to:l})=>{const c=e.slice(o).map(a,-1),u=e.slice(o).map(l),d=e.invert().map(c,-1),f=e.invert().map(u);r.push({oldRange:{from:d,to:f},newRange:{from:c,to:u}})})}),function H5(n){const e=function V5(n,e=JSON.stringify){const t={};return n.filter(r=>{const i=e(r);return!Object.prototype.hasOwnProperty.call(t,i)&&(t[i]=!0)})}(n);return 1===e.length?e:e.filter((t,r)=>!e.filter((o,s)=>s!==r).some(o=>t.oldRange.from>=o.oldRange.from&&t.oldRange.to<=o.oldRange.to&&t.newRange.from>=o.newRange.from&&t.newRange.to<=o.newRange.to))}(r)}(a).forEach(({oldRange:u,newRange:d})=>{Jf(u.from,u.to,t.doc).filter(f=>f.mark.type===n.type).forEach(f=>{const g=Jf(l.map(f.from),l.map(f.to),r.doc).filter(D=>D.mark.type===n.type);if(!g.length)return;const m=g[0],_=t.doc.textBetween(f.from,f.to,void 0," "),v=r.doc.textBetween(m.from,m.to,void 0," "),b=b1(_),y=b1(v);b&&!y&&s.removeMark(m.from,m.to,n.type)}),function j5(n,e,t){const r=[];return n.nodesBetween(e.from,e.to,(i,o)=>{t(i)&&r.push({node:i,pos:o})}),r}(r.doc,d,f=>f.isTextblock).forEach(f=>{bb(r.doc.textBetween(f.pos,f.pos+f.node.nodeSize,void 0," ")).filter(p=>p.isLink).map(p=>en(w({},p),{from:f.pos+p.start+1,to:f.pos+p.end+1})).filter(p=>d.from>=p.from&&d.from<=p.to||d.to>=p.from&&d.to<=p.to).forEach(p=>{s.addMark(p.from,p.to,n.type.create({href:p.href}))})})}),s.steps.length?s:void 0}})}const rQ=di.create({name:"link",priority:1e3,keepOnSplit:!1,inclusive(){return this.options.autolink},addOptions:()=>({openOnClick:!0,linkOnPaste:!0,autolink:!0,HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow"}}),addAttributes(){return{href:{default:null},target:{default:this.options.HTMLAttributes.target}}},parseHTML:()=>[{tag:"a[href]"}],renderHTML({HTMLAttributes:n}){return["a",xt(this.options.HTMLAttributes,n),0]},addCommands(){return{setLink:n=>({chain:e})=>e().setMark(this.name,n).setMeta("preventAutolink",!0).run(),toggleLink:n=>({chain:e})=>e().toggleMark(this.name,n,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:n})=>n().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[xo({find:n=>bb(n).filter(e=>e.isLink).map(e=>({text:e.value,index:e.start,data:e})),type:this.type,getAttributes:n=>{var e;return{href:null===(e=n.data)||void 0===e?void 0:e.href}}})]},addProseMirrorPlugins(){const n=[];return this.options.autolink&&n.push(eQ({type:this.type})),this.options.openOnClick&&n.push(function tQ(n){return new Xe({key:new mt("handleClickLink"),props:{handleClick:(e,t,r)=>{var i;const o=gA(e.state,n.type.name);return!(!(null===(i=r.target)||void 0===i?void 0:i.closest("a"))||!o.href||(window.open(o.href,o.target),0))}}})}({type:this.type})),this.options.linkOnPaste&&n.push(function nQ(n){return new Xe({key:new mt("handlePasteLink"),props:{handlePaste:(e,t,r)=>{const{state:i}=e,{selection:o}=i,{empty:s}=o;if(s)return!1;let a="";r.content.forEach(c=>{a+=c.textContent});const l=bb(a).find(c=>c.isLink&&c.value===a);return!(!a||!l||(n.editor.commands.setMark(n.type,{href:l.href}),0))}}})}({editor:this.editor,type:this.type})),n}}),iQ=Et.create({name:"textAlign",addOptions:()=>({types:[],alignments:["left","center","right","justify"],defaultAlignment:"left"}),addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:n=>n.style.textAlign||this.options.defaultAlignment,renderHTML:n=>n.textAlign===this.options.defaultAlignment?{}:{style:`text-align: ${n.textAlign}`}}}}]},addCommands(){return{setTextAlign:n=>({commands:e})=>!!this.options.alignments.includes(n)&&this.options.types.every(t=>e.updateAttributes(t,{textAlign:n})),unsetTextAlign:()=>({commands:n})=>this.options.types.every(e=>n.resetAttributes(e,"textAlign"))}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}}),oQ=di.create({name:"underline",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:n=>!!n.includes("underline")&&{}}],renderHTML({HTMLAttributes:n}){return["u",xt(this.options.HTMLAttributes,n),0]},addCommands(){return{setUnderline:()=>({commands:n})=>n.setMark(this.name),toggleUnderline:()=>({commands:n})=>n.toggleMark(this.name),unsetUnderline:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});let sQ=(()=>{class n{constructor(t,r){this.el=t,this._renderer=r,this.outputFormat="html",this.onChange=()=>{},this.onTouched=()=>{},this.handleChange=({transaction:i})=>{if(i.docChanged){if("html"===this.outputFormat)return void this.onChange(this.editor.getHTML());this.onChange(this.editor.getJSON())}}}writeValue(t){!t||(!this.outputFormat&&"string"==typeof t&&(this.outputFormat="html"),this.editor.chain().setContent(t,!1).run())}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.editor.setEditable(!t),this._renderer.setProperty(this.el.nativeElement,"disabled",t)}ngOnInit(){if(!this.editor)throw new Error("Required: Input `editor`");const t=this.el.nativeElement.innerHTML;this.el.nativeElement.innerHTML="",this.el.nativeElement.appendChild(this.editor.options.element.firstChild),this.editor.setOptions({element:this.el.nativeElement}),t&&this.editor.chain().setContent(t,!1).run(),this.editor.on("blur",()=>{this.onTouched()}),this.editor.on("transaction",this.handleChange)}ngOnDestroy(){this.editor.destroy()}}return n.\u0275fac=function(t){return new(t||n)(S(bt),S(ii))},n.\u0275dir=Y({type:n,selectors:[["tiptap","editor",""],["","tiptap","","editor",""],["tiptap-editor","editor",""],["","tiptapEditor","","editor",""]],inputs:{editor:"editor",outputFormat:"outputFormat"},features:[Ye([{provide:cr,useExisting:Be(()=>n),multi:!0}])]}),n})(),lQ=(()=>{class n{constructor(t,r){this.injector=t,this.viewContainerRef=r,this.lang=d1,this.allowedContentTypes="",this.value=""}ngOnInit(){this.editor=new R5({extensions:[HG,jY(this.injector),fY(this.injector),sY(this.viewContainerRef),mY(this.viewContainerRef),pY(this.injector,this.viewContainerRef),EY(0,this.viewContainerRef),kY(this.viewContainerRef),oQ,iQ.configure({types:["heading","paragraph","listItem","dotImage"]}),zY.configure({HTMLAttributes:{style:"background: #accef7;"}}),rQ.configure({openOnClick:!0}),UG.configure({placeholder:({node:t})=>"heading"===t.type.name?`${function aQ(n){return n.replace(/\p{L}+('\p{L}+)?/gu,function(e){return e.charAt(0).toUpperCase()+e.slice(1)})}(t.type.name)} ${t.attrs.level}`:'Type "/" for commmands'})]}),this.setEditorStorageData()}setEditorStorageData(){this.editor.storage.dotConfig={lang:this.lang,allowedContentTypes:this.allowedContentTypes}}}return n.\u0275fac=function(t){return new(t||n)(S(_t),S(sr))},n.\u0275cmp=wt({type:n,selectors:[["dotcms-block-editor"]],inputs:{lang:"lang",allowedContentTypes:"allowedContentTypes"},decls:1,vars:2,consts:[[3,"editor","ngModel","ngModelChange"]],template:function(t,r){1&t&&(H(0,"tiptap-editor",0),Pe("ngModelChange",function(o){return r.value=o}),z()),2&t&&k("editor",r.editor)("ngModel",r.value)},directives:[sQ,bv,hf],styles:['@import"https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400&display=swap";@import"https://fonts.googleapis.com/icon?family=Material+Icons";[_nghost-%COMP%]{border-radius:4px;display:block;height:500px;overflow-y:hidden;position:relative;outline:#b3b1b8 solid 1px;resize:vertical}[_nghost-%COMP%]:focus-within{outline-color:var(--color-main)}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] {display:block;height:100%;overflow-y:auto;width:100%}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror{box-sizing:border-box;display:block;min-height:100%;outline:none;padding:1rem 4rem;font:14px/1.3}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror ul, [_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror ol{margin:0;padding-inline-start:1rem;margin-left:1rem}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror ol li{list-style-type:decimal}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror ul li{list-style-type:disc}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror li{padding-top:.286em}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror li p{padding:0;margin:0}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror h1{font-size:2.43em;line-height:1.06em;padding-top:.176em;margin-bottom:.353em}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror h2{font-size:1.93em;line-height:1.33em;padding-top:.333em;margin-bottom:.333em}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror h3{font-size:1.57em;line-height:1.64em;padding-top:.5em;margin-bottom:.318em}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror h4{font-size:1.29em;line-height:2em;padding-top:.667em;margin-bottom:.333em}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror p{font-size:1em;line-height:1.29em;padding-top:.286em;margin-bottom:1em}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror blockquote{margin:1rem;border-left:3px solid rgba(10,7,37,.1);padding-left:1rem}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror pre{background:#0a0725;border-radius:.5rem;color:#fff;padding:.75rem 1rem}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror pre code{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;background:none;color:inherit;padding:0}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror .is-empty:before{color:#b3b1b8;content:attr(data-placeholder);float:left;height:0;pointer-events:none}']}),n})();const dQ=new class uQ extends Fr{}(class cQ extends vf{constructor(e,t){super(e,t),this.scheduler=e,this.work=t}schedule(e,t=0){return t>0?super.schedule(e,t):(this.delay=t,this.state=e,this.scheduler.flush(this),this)}execute(e,t){return t>0||this.closed?super.execute(e,t):this._execute(e,t)}requestAsyncId(e,t,r=0){return null!==r&&r>0||null===r&&this.delay>0?super.requestAsyncId(e,t,r):e.flush(this)}});class br{constructor(e,t,r){this.kind=e,this.value=t,this.error=r,this.hasValue="N"===e}observe(e){switch(this.kind){case"N":return e.next&&e.next(this.value);case"E":return e.error&&e.error(this.error);case"C":return e.complete&&e.complete()}}do(e,t,r){switch(this.kind){case"N":return e&&e(this.value);case"E":return t&&t(this.error);case"C":return r&&r()}}accept(e,t,r){return e&&"function"==typeof e.next?this.observe(e):this.do(e,t,r)}toObservable(){switch(this.kind){case"N":return ie(this.value);case"E":return Xk(this.error);case"C":return hh()}throw new Error("unexpected notification kind value")}static createNext(e){return void 0!==e?new br("N",e):br.undefinedValueNotification}static createError(e){return new br("E",void 0,e)}static createComplete(){return br.completeNotification}}br.completeNotification=new br("C"),br.undefinedValueNotification=new br("N",void 0);class Xh extends nt{constructor(e,t,r=0){super(e),this.scheduler=t,this.delay=r}static dispatch(e){const{notification:t,destination:r}=e;t.observe(r),this.unsubscribe()}scheduleMessage(e){this.destination.add(this.scheduler.schedule(Xh.dispatch,this.delay,new hQ(e,this.destination)))}_next(e){this.scheduleMessage(br.createNext(e))}_error(e){this.scheduleMessage(br.createError(e)),this.unsubscribe()}_complete(){this.scheduleMessage(br.createComplete()),this.unsubscribe()}}class hQ{constructor(e,t){this.notification=e,this.destination=t}}class pQ extends Me{constructor(e=Number.POSITIVE_INFINITY,t=Number.POSITIVE_INFINITY,r){super(),this.scheduler=r,this._events=[],this._infiniteTimeWindow=!1,this._bufferSize=e<1?1:e,this._windowTime=t<1?1:t,t===Number.POSITIVE_INFINITY?(this._infiniteTimeWindow=!0,this.next=this.nextInfiniteTimeWindow):this.next=this.nextTimeWindow}nextInfiniteTimeWindow(e){if(!this.isStopped){const t=this._events;t.push(e),t.length>this._bufferSize&&t.shift()}super.next(e)}nextTimeWindow(e){this.isStopped||(this._events.push(new gQ(this._getNow(),e)),this._trimBufferThenGetEvents()),super.next(e)}_subscribe(e){const t=this._infiniteTimeWindow,r=t?this._events:this._trimBufferThenGetEvents(),i=this.scheduler,o=r.length;let s;if(this.closed)throw new Uo;if(this.isStopped||this.hasError?s=ke.EMPTY:(this.observers.push(e),s=new Tb(this,e)),i&&e.add(e=new Xh(e,i)),t)for(let a=0;at&&(s=Math.max(s,o-t)),s>0&&i.splice(0,s),i}}class gQ{constructor(e,t){this.time=e,this.value=t}}const ep={schedule(n,e){const t=setTimeout(n,e);return()=>clearTimeout(t)},scheduleBeforeRender(n){if("undefined"==typeof window)return ep.schedule(n,0);if(void 0===window.requestAnimationFrame)return ep.schedule(n,16);const e=window.requestAnimationFrame(n);return()=>window.cancelAnimationFrame(e)}};let Db;function wQ(n,e,t){let r=t;return function vQ(n){return!!n&&n.nodeType===Node.ELEMENT_NODE}(n)&&e.some((i,o)=>!("*"===i||!function _Q(n,e){if(!Db){const t=Element.prototype;Db=t.matches||t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector}return n.nodeType===Node.ELEMENT_NODE&&Db.call(n,e)}(n,i)||(r=o,0))),r}class MQ{constructor(e,t){this.componentFactory=t.get(Ri).resolveComponentFactory(e)}create(e){return new IQ(this.componentFactory,e)}}class IQ{constructor(e,t){this.componentFactory=e,this.injector=t,this.eventEmitters=new pQ(1),this.events=this.eventEmitters.pipe(yi(r=>vp(...r))),this.componentRef=null,this.viewChangeDetectorRef=null,this.inputChanges=null,this.hasInputChanges=!1,this.implementsOnChanges=!1,this.scheduledChangeDetectionFn=null,this.scheduledDestroyFn=null,this.initialInputValues=new Map,this.unchangedInputs=new Set(this.componentFactory.inputs.map(({propName:r})=>r)),this.ngZone=this.injector.get(ot),this.elementZone="undefined"==typeof Zone?null:this.ngZone.run(()=>Zone.current)}connect(e){this.runInZone(()=>{if(null!==this.scheduledDestroyFn)return this.scheduledDestroyFn(),void(this.scheduledDestroyFn=null);null===this.componentRef&&this.initializeComponent(e)})}disconnect(){this.runInZone(()=>{null===this.componentRef||null!==this.scheduledDestroyFn||(this.scheduledDestroyFn=ep.schedule(()=>{null!==this.componentRef&&(this.componentRef.destroy(),this.componentRef=null,this.viewChangeDetectorRef=null)},10))})}getInputValue(e){return this.runInZone(()=>null===this.componentRef?this.initialInputValues.get(e):this.componentRef.instance[e])}setInputValue(e,t){this.runInZone(()=>{null!==this.componentRef?function bQ(n,e){return n===e||n!=n&&e!=e}(t,this.getInputValue(e))&&(void 0!==t||!this.unchangedInputs.has(e))||(this.recordInputChange(e,t),this.unchangedInputs.delete(e),this.hasInputChanges=!0,this.componentRef.instance[e]=t,this.scheduleDetectChanges()):this.initialInputValues.set(e,t)})}initializeComponent(e){const t=_t.create({providers:[],parent:this.injector}),r=function EQ(n,e){const t=n.childNodes,r=e.map(()=>[]);let i=-1;e.some((o,s)=>"*"===o&&(i=s,!0));for(let o=0,s=t.length;o{this.initialInputValues.has(e)&&this.setInputValue(e,this.initialInputValues.get(e))}),this.initialInputValues.clear()}initializeOutputs(e){const t=this.componentFactory.outputs.map(({propName:r,templateName:i})=>e.instance[r].pipe(be(s=>({name:i,value:s}))));this.eventEmitters.next(t)}callNgOnChanges(e){if(!this.implementsOnChanges||null===this.inputChanges)return;const t=this.inputChanges;this.inputChanges=null,e.instance.ngOnChanges(t)}markViewForCheck(e){this.hasInputChanges&&(this.hasInputChanges=!1,e.markForCheck())}scheduleDetectChanges(){this.scheduledChangeDetectionFn||(this.scheduledChangeDetectionFn=ep.scheduleBeforeRender(()=>{this.scheduledChangeDetectionFn=null,this.detectChanges()}))}recordInputChange(e,t){if(!this.implementsOnChanges)return;null===this.inputChanges&&(this.inputChanges={});const r=this.inputChanges[e];if(r)return void(r.currentValue=t);const i=this.unchangedInputs.has(e),o=i?void 0:this.getInputValue(e);this.inputChanges[e]=new Gb(o,t,i)}detectChanges(){null!==this.componentRef&&(this.callNgOnChanges(this.componentRef),this.markViewForCheck(this.viewChangeDetectorRef),this.componentRef.changeDetectorRef.detectChanges())}runInZone(e){return this.elementZone&&Zone.current!==this.elementZone?this.ngZone.run(e):e()}}class TQ extends HTMLElement{constructor(){super(...arguments),this.ngElementEventsSubscription=null}}let AQ=(()=>{class n{constructor(t){this.injector=t}ngDoBootstrap(){const t=function xQ(n,e){const t=function CQ(n,e){return e.get(Ri).resolveComponentFactory(n).inputs}(n,e.injector),r=e.strategyFactory||new MQ(n,e.injector),i=function DQ(n){const e={};return n.forEach(({propName:t,templateName:r})=>{e[function mQ(n){return n.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}(r)]=t}),e}(t);class o extends TQ{constructor(a){super(),this.injector=a}get ngElementStrategy(){if(!this._ngElementStrategy){const a=this._ngElementStrategy=r.create(this.injector||e.injector);t.forEach(({propName:l})=>{if(!this.hasOwnProperty(l))return;const c=this[l];delete this[l],a.setInputValue(l,c)})}return this._ngElementStrategy}attributeChangedCallback(a,l,c,u){this.ngElementStrategy.setInputValue(i[a],c)}connectedCallback(){let a=!1;this.ngElementStrategy.events&&(this.subscribeToEvents(),a=!0),this.ngElementStrategy.connect(this),a||this.subscribeToEvents()}disconnectedCallback(){this._ngElementStrategy&&this._ngElementStrategy.disconnect(),this.ngElementEventsSubscription&&(this.ngElementEventsSubscription.unsubscribe(),this.ngElementEventsSubscription=null)}subscribeToEvents(){this.ngElementEventsSubscription=this.ngElementStrategy.events.subscribe(a=>{const l=new CustomEvent(a.name,{detail:a.value});this.dispatchEvent(l)})}}return o.observedAttributes=Object.keys(i),t.forEach(({propName:s})=>{Object.defineProperty(o.prototype,s,{get(){return this.ngElementStrategy.getInputValue(s)},set(a){this.ngElementStrategy.setInputValue(s,a)},configurable:!0,enumerable:!0})}),o}(lQ,{injector:this.injector});customElements.define("dotcms-block-editor",t)}}return n.\u0275fac=function(t){return new(t||n)(R(_t))},n.\u0275mod=ut({type:n}),n.\u0275inj=at({providers:[],imports:[[fU,Pr,iI,yZ,t4,B4,eZ]]}),n})();(function GV(){sS=!1})(),uU().bootstrapModule(AQ).catch(n=>console.error(n))}},tt=>{tt(tt.s=75)}]); \ No newline at end of file +var runtime=function(s){"use strict";var v,C=Object.prototype,p=C.hasOwnProperty,G="function"==typeof Symbol?Symbol:{},w=G.iterator||"@@iterator",$=G.asyncIterator||"@@asyncIterator",_=G.toStringTag||"@@toStringTag";function h(r,t,e){return Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}),r[t]}try{h({},"")}catch(r){h=function(t,e,o){return t[e]=o}}function M(r,t,e,o){var i=Object.create((t&&t.prototype instanceof k?t:k).prototype),a=new I(o||[]);return i._invoke=function B(r,t,e){var o=R;return function(i,a){if(o===Y)throw new Error("Generator is already running");if(o===L){if("throw"===i)throw a;return W()}for(e.method=i,e.arg=a;;){var u=e.delegate;if(u){var c=D(u,e);if(c){if(c===l)continue;return c}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if(o===R)throw o=L,e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);o=Y;var f=O(r,t,e);if("normal"===f.type){if(o=e.done?L:z,f.arg===l)continue;return{value:f.arg,done:e.done}}"throw"===f.type&&(o=L,e.method="throw",e.arg=f.arg)}}}(r,e,a),i}function O(r,t,e){try{return{type:"normal",arg:r.call(t,e)}}catch(o){return{type:"throw",arg:o}}}s.wrap=M;var R="suspendedStart",z="suspendedYield",Y="executing",L="completed",l={};function k(){}function b(){}function d(){}var T={};h(T,w,function(){return this});var N=Object.getPrototypeOf,S=N&&N(N(P([])));S&&S!==C&&p.call(S,w)&&(T=S);var g=d.prototype=k.prototype=Object.create(T);function q(r){["next","throw","return"].forEach(function(t){h(r,t,function(e){return this._invoke(t,e)})})}function E(r,t){function e(i,a,u,c){var f=O(r[i],r,a);if("throw"!==f.type){var A=f.arg,m=A.value;return m&&"object"==typeof m&&p.call(m,"__await")?t.resolve(m.__await).then(function(y){e("next",y,u,c)},function(y){e("throw",y,u,c)}):t.resolve(m).then(function(y){A.value=y,u(A)},function(y){return e("throw",y,u,c)})}c(f.arg)}var o;this._invoke=function n(i,a){function u(){return new t(function(c,f){e(i,a,c,f)})}return o=o?o.then(u,u):u()}}function D(r,t){var e=r.iterator[t.method];if(e===v){if(t.delegate=null,"throw"===t.method){if(r.iterator.return&&(t.method="return",t.arg=v,D(r,t),"throw"===t.method))return l;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var o=O(e,r.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,l;var n=o.arg;return n?n.done?(t[r.resultName]=n.value,t.next=r.nextLoc,"return"!==t.method&&(t.method="next",t.arg=v),t.delegate=null,l):n:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,l)}function H(r){var t={tryLoc:r[0]};1 in r&&(t.catchLoc=r[1]),2 in r&&(t.finallyLoc=r[2],t.afterLoc=r[3]),this.tryEntries.push(t)}function j(r){var t=r.completion||{};t.type="normal",delete t.arg,r.completion=t}function I(r){this.tryEntries=[{tryLoc:"root"}],r.forEach(H,this),this.reset(!0)}function P(r){if(r){var t=r[w];if(t)return t.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var e=-1,o=function n(){for(;++e=0;--o){var n=this.tryEntries[o],i=n.completion;if("root"===n.tryLoc)return e("end");if(n.tryLoc<=this.prev){var a=p.call(n,"catchLoc"),u=p.call(n,"finallyLoc");if(a&&u){if(this.prev=0;--e){var o=this.tryEntries[e];if(o.tryLoc<=this.prev&&p.call(o,"finallyLoc")&&this.prev=0;--t){var e=this.tryEntries[t];if(e.finallyLoc===r)return this.complete(e.completion,e.afterLoc),j(e),l}},catch:function(r){for(var t=this.tryEntries.length-1;t>=0;--t){var e=this.tryEntries[t];if(e.tryLoc===r){var o=e.completion;if("throw"===o.type){var n=o.arg;j(e)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(r,t,e){return this.delegate={iterator:P(r),resultName:t,nextLoc:e},"next"===this.method&&(this.arg=v),l}},s}("object"==typeof module?module.exports:{});try{regeneratorRuntime=runtime}catch(s){"object"==typeof globalThis?globalThis.regeneratorRuntime=runtime:Function("r","regeneratorRuntime = r")(runtime)}(()=>{"use strict";var e,v={},d={};function n(e){var a=d[e];if(void 0!==a)return a.exports;var r=d[e]={exports:{}};return v[e](r,r.exports,n),r.exports}n.m=v,e=[],n.O=(a,r,l,o)=>{if(!r){var u=1/0;for(t=0;t=o)&&Object.keys(n.O).every(h=>n.O[h](r[f]))?r.splice(f--,1):(s=!1,o0&&e[t-1][2]>o;t--)e[t]=e[t-1];e[t]=[r,l,o]},n.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return n.d(a,{a}),a},n.d=(e,a)=>{for(var r in a)n.o(a,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:a[r]})},n.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),(()=>{var e={666:0};n.O.j=l=>0===e[l];var a=(l,o)=>{var f,c,[t,u,s]=o,_=0;if(t.some(i=>0!==e[i])){for(f in u)n.o(u,f)&&(n.m[f]=u[f]);if(s)var b=s(n)}for(l&&l(o);_{"use strict";ge(583),ge(757)},757:()=>{!function(X,oe){"use strict";function ge(){var e=Ue.splice(0,Ue.length);for(F=0;e.length;)e.shift().call(null,e.shift())}function ye(e,r){for(var i=0,h=e.length;i1)&&tt(this)}}}),x(o,pe,{value:function(p){-1>0,de="__"+se+dt,be="addEventListener",Le="attached",ce="Callback",me="detached",te="extends",pe="attributeChanged"+ce,vt=Le+ce,rt="connected"+ce,mt="disconnected"+ce,ze="created"+ce,kt=me+ce,ot="ADDITION",pt="REMOVAL",Oe="DOMAttrModified",bt="DOMContentLoaded",Et="DOMSubtreeModified",qe="<",st="=",Mt=/^[A-Z][._A-Z0-9]*-[-._A-Z0-9]*$/,wt=["ANNOTATION-XML","COLOR-PROFILE","FONT-FACE","FONT-FACE-SRC","FONT-FACE-URI","FONT-FACE-FORMAT","FONT-FACE-NAME","MISSING-GLYPH"],He=[],We=[],le="",De=A.documentElement,Ee=He.indexOf||function(e){for(var r=this.length;r--&&this[r]!==e;);return r},it=ne.prototype,Pe=it.hasOwnProperty,at=it.isPrototypeOf,Re=ne.defineProperty,Ne=[],Xe=ne.getOwnPropertyDescriptor,Y=ne.getOwnPropertyNames,Ct=ne.getPrototypeOf,Ye=ne.setPrototypeOf,Se=!!ne.__proto__,$e="__dreCEv1",Me=X.customElements,t=!/^force/.test(oe.type)&&!!(Me&&Me.define&&Me.get&&Me.whenDefined),a=ne.create||ne,u=X.Map||function(){var e,r=[],i=[];return{get:function(h){return i[Ee.call(r,h)]},set:function(h,s){(e=Ee.call(r,h))<0?i[r.push(h)-1]=s:i[e]=s}}},c=X.Promise||function(e){function r(o){for(h=!0;i.length;)i.shift()(o)}var i=[],h=!1,s={catch:function(){return s},then:function(o){return i.push(o),h&&setTimeout(r,1),s}};return e(r),s},f=!1,m=a(null),E=a(null),v=new u,C=function(e){return e.toLowerCase()},w=ne.create||function e(r){return r?(e.prototype=r,new e):this},b=Ye||(Se?function(e,r){return e.__proto__=r,e}:Y&&Xe?function(){function e(r,i){for(var h,s=Y(i),o=0,l=s.length;o
",new H(function(e,r){if(e[0]&&"childList"==e[0].type&&!e[0].removedNodes[0].childNodes.length){var i=(Ce=Xe(P,"innerHTML"))&&Ce.set;i&&Re(P,"innerHTML",{set:function(h){for(;this.lastChild;)this.removeChild(this.lastChild);i.call(this,h)}})}r.disconnect(),Ce=null}).observe(Ce,{childList:!0,subtree:!0}),Ce.innerHTML=""),ue||(Ye||Se?(we=function(e,r){at.call(r,e)||Fe(e,r)},ae=Fe):(we=function(e,r){e[de]||(e[de]=ne(!0),Fe(e,r))},ae=we),G?(I=!1,e=Xe(P,be),r=e.value,i=function(o){var l=new CustomEvent(Oe,{bubbles:!0});l.attrName=o,l.prevValue=R.call(this,o),l.newValue=null,l[pt]=l.attrChange=2,V.call(this,o),$.call(this,l)},h=function(o,l){var d=Q.call(this,o),p=d&&R.call(this,o),y=new CustomEvent(Oe,{bubbles:!0});K.call(this,o,l),y.attrName=o,y.prevValue=d?p:null,y.newValue=l,d?y.MODIFICATION=y.attrChange=1:y[ot]=y.attrChange=0,$.call(this,y)},s=function(o){var l,d=o.currentTarget,p=d[de],y=o.propertyName;p.hasOwnProperty(y)&&(p=p[y],(l=new CustomEvent(Oe,{bubbles:!0})).attrName=p.name,l.prevValue=p.value||null,l.newValue=p.value=d[y]||null,null==l.prevValue?l[ot]=l.attrChange=0:l.MODIFICATION=l.attrChange=1,$.call(d,l))},e.value=function(o,l,d){o===Oe&&this[pe]&&this.setAttribute!==h&&(this[de]={className:{name:"class",value:this.className}},this.setAttribute=h,this.removeAttribute=i,r.call(this,"propertychange",s)),r.call(this,o,l,d)},Re(P,be,e)):H||(De[be](Oe,Te),De.setAttribute(de,1),De.removeAttribute(de),I&&(je=function(e){var r,i,h,s=this;if(s===e.target){for(h in r=s[de],s[de]=i=nt(s),i){if(!(h in r))return Be(0,s,h,r[h],i[h],ot);if(i[h]!==r[h])return Be(1,s,h,r[h],i[h],"MODIFICATION")}for(h in r)if(!(h in i))return Be(2,s,h,r[h],i[h],pt)}},Be=function(e,r,i,h,s,o){var l={attrChange:e,currentTarget:r,attrName:i,prevValue:h,newValue:s};l[o]=e,Qe(l)},nt=function(e){for(var r,i,h={},s=e.attributes,o=0,l=s.length;o$");if(r[te]="a",(e.prototype=w(S.prototype)).constructor=e,X.customElements.define(i,e,r),!h.test(A.createElement("a",{is:i}).outerHTML)||!h.test((new e).outerHTML))throw r}(function e(){return Reflect.construct(S,[],e)},{},"document-register-element-a"+dt)}catch(e){ft()}if(!oe.noBuiltIn)try{if(N.call(A,"a","a").outerHTML.indexOf("is")<0)throw{}}catch(e){C=function(r){return{is:r.toLowerCase()}}}}(window)},583:()=>{"use strict";!function(t){const a=t.performance;function u(I){a&&a.mark&&a.mark(I)}function c(I,k){a&&a.measure&&a.measure(I,k)}u("Zone");const f=t.__Zone_symbol_prefix||"__zone_symbol__";function m(I){return f+I}const E=!0===t[m("forceDuplicateZoneCheck")];if(t.Zone){if(E||"function"!=typeof t.Zone.__symbol__)throw new Error("Zone already loaded.");return t.Zone}let v=(()=>{class I{constructor(n,e){this._parent=n,this._name=e?e.name||"unnamed":"",this._properties=e&&e.properties||{},this._zoneDelegate=new w(this,this._parent&&this._parent._zoneDelegate,e)}static assertZonePatched(){if(t.Promise!==re.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")}static get root(){let n=I.current;for(;n.parent;)n=n.parent;return n}static get current(){return F.zone}static get currentTask(){return ue}static __load_patch(n,e,r=!1){if(re.hasOwnProperty(n)){if(!r&&E)throw Error("Already loaded patch: "+n)}else if(!t["__Zone_disable_"+n]){const i="Zone:"+n;u(i),re[n]=e(t,I,Te),c(i,i)}}get parent(){return this._parent}get name(){return this._name}get(n){const e=this.getZoneWith(n);if(e)return e._properties[n]}getZoneWith(n){let e=this;for(;e;){if(e._properties.hasOwnProperty(n))return e;e=e._parent}return null}fork(n){if(!n)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,n)}wrap(n,e){if("function"!=typeof n)throw new Error("Expecting function got: "+n);const r=this._zoneDelegate.intercept(this,n,e),i=this;return function(){return i.runGuarded(r,this,arguments,e)}}run(n,e,r,i){F={parent:F,zone:this};try{return this._zoneDelegate.invoke(this,n,e,r,i)}finally{F=F.parent}}runGuarded(n,e=null,r,i){F={parent:F,zone:this};try{try{return this._zoneDelegate.invoke(this,n,e,r,i)}catch(h){if(this._zoneDelegate.handleError(this,h))throw h}}finally{F=F.parent}}runTask(n,e,r){if(n.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(n.zone||z).name+"; Execution: "+this.name+")");if(n.state===B&&(n.type===O||n.type===j))return;const i=n.state!=Q;i&&n._transitionTo(Q,R),n.runCount++;const h=ue;ue=n,F={parent:F,zone:this};try{n.type==j&&n.data&&!n.data.isPeriodic&&(n.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,n,e,r)}catch(s){if(this._zoneDelegate.handleError(this,s))throw s}}finally{n.state!==B&&n.state!==K&&(n.type==O||n.data&&n.data.isPeriodic?i&&n._transitionTo(R,Q):(n.runCount=0,this._updateTaskCount(n,-1),i&&n._transitionTo(B,Q,B))),F=F.parent,ue=h}}scheduleTask(n){if(n.zone&&n.zone!==this){let r=this;for(;r;){if(r===n.zone)throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${n.zone.name}`);r=r.parent}}n._transitionTo($,B);const e=[];n._zoneDelegates=e,n._zone=this;try{n=this._zoneDelegate.scheduleTask(this,n)}catch(r){throw n._transitionTo(K,$,B),this._zoneDelegate.handleError(this,r),r}return n._zoneDelegates===e&&this._updateTaskCount(n,1),n.state==$&&n._transitionTo(R,$),n}scheduleMicroTask(n,e,r,i){return this.scheduleTask(new b(N,n,e,r,i,void 0))}scheduleMacroTask(n,e,r,i,h){return this.scheduleTask(new b(j,n,e,r,i,h))}scheduleEventTask(n,e,r,i,h){return this.scheduleTask(new b(O,n,e,r,i,h))}cancelTask(n){if(n.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(n.zone||z).name+"; Execution: "+this.name+")");n._transitionTo(V,R,Q);try{this._zoneDelegate.cancelTask(this,n)}catch(e){throw n._transitionTo(K,V),this._zoneDelegate.handleError(this,e),e}return this._updateTaskCount(n,-1),n._transitionTo(B,V),n.runCount=0,n}_updateTaskCount(n,e){const r=n._zoneDelegates;-1==e&&(n._zoneDelegates=null);for(let i=0;iI.hasTask(n,e),onScheduleTask:(I,k,n,e)=>I.scheduleTask(n,e),onInvokeTask:(I,k,n,e,r,i)=>I.invokeTask(n,e,r,i),onCancelTask:(I,k,n,e)=>I.cancelTask(n,e)};class w{constructor(k,n,e){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this.zone=k,this._parentDelegate=n,this._forkZS=e&&(e&&e.onFork?e:n._forkZS),this._forkDlgt=e&&(e.onFork?n:n._forkDlgt),this._forkCurrZone=e&&(e.onFork?this.zone:n._forkCurrZone),this._interceptZS=e&&(e.onIntercept?e:n._interceptZS),this._interceptDlgt=e&&(e.onIntercept?n:n._interceptDlgt),this._interceptCurrZone=e&&(e.onIntercept?this.zone:n._interceptCurrZone),this._invokeZS=e&&(e.onInvoke?e:n._invokeZS),this._invokeDlgt=e&&(e.onInvoke?n:n._invokeDlgt),this._invokeCurrZone=e&&(e.onInvoke?this.zone:n._invokeCurrZone),this._handleErrorZS=e&&(e.onHandleError?e:n._handleErrorZS),this._handleErrorDlgt=e&&(e.onHandleError?n:n._handleErrorDlgt),this._handleErrorCurrZone=e&&(e.onHandleError?this.zone:n._handleErrorCurrZone),this._scheduleTaskZS=e&&(e.onScheduleTask?e:n._scheduleTaskZS),this._scheduleTaskDlgt=e&&(e.onScheduleTask?n:n._scheduleTaskDlgt),this._scheduleTaskCurrZone=e&&(e.onScheduleTask?this.zone:n._scheduleTaskCurrZone),this._invokeTaskZS=e&&(e.onInvokeTask?e:n._invokeTaskZS),this._invokeTaskDlgt=e&&(e.onInvokeTask?n:n._invokeTaskDlgt),this._invokeTaskCurrZone=e&&(e.onInvokeTask?this.zone:n._invokeTaskCurrZone),this._cancelTaskZS=e&&(e.onCancelTask?e:n._cancelTaskZS),this._cancelTaskDlgt=e&&(e.onCancelTask?n:n._cancelTaskDlgt),this._cancelTaskCurrZone=e&&(e.onCancelTask?this.zone:n._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;const r=e&&e.onHasTask;(r||n&&n._hasTaskZS)&&(this._hasTaskZS=r?e:C,this._hasTaskDlgt=n,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=k,e.onScheduleTask||(this._scheduleTaskZS=C,this._scheduleTaskDlgt=n,this._scheduleTaskCurrZone=this.zone),e.onInvokeTask||(this._invokeTaskZS=C,this._invokeTaskDlgt=n,this._invokeTaskCurrZone=this.zone),e.onCancelTask||(this._cancelTaskZS=C,this._cancelTaskDlgt=n,this._cancelTaskCurrZone=this.zone))}fork(k,n){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,k,n):new v(k,n)}intercept(k,n,e){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,k,n,e):n}invoke(k,n,e,r,i){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,k,n,e,r,i):n.apply(e,r)}handleError(k,n){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,k,n)}scheduleTask(k,n){let e=n;if(this._scheduleTaskZS)this._hasTaskZS&&e._zoneDelegates.push(this._hasTaskDlgtOwner),e=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,k,n),e||(e=n);else if(n.scheduleFn)n.scheduleFn(n);else{if(n.type!=N)throw new Error("Task is missing scheduleFn.");T(n)}return e}invokeTask(k,n,e,r){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,k,n,e,r):n.callback.apply(e,r)}cancelTask(k,n){let e;if(this._cancelTaskZS)e=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,k,n);else{if(!n.cancelFn)throw Error("Task is not cancelable");e=n.cancelFn(n)}return e}hasTask(k,n){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,k,n)}catch(e){this.handleError(k,e)}}_updateTaskCount(k,n){const e=this._taskCounts,r=e[k],i=e[k]=r+n;if(i<0)throw new Error("More tasks executed then were scheduled.");0!=r&&0!=i||this.hasTask(this.zone,{microTask:e.microTask>0,macroTask:e.macroTask>0,eventTask:e.eventTask>0,change:k})}}class b{constructor(k,n,e,r,i,h){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=k,this.source=n,this.data=r,this.scheduleFn=i,this.cancelFn=h,!e)throw new Error("callback is not defined");this.callback=e;const s=this;this.invoke=k===O&&r&&r.useG?b.invokeTask:function(){return b.invokeTask.call(t,s,this,arguments)}}static invokeTask(k,n,e){k||(k=this),fe++;try{return k.runCount++,k.zone.runTask(k,n,e)}finally{1==fe&&Z(),fe--}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(B,$)}_transitionTo(k,n,e){if(this._state!==n&&this._state!==e)throw new Error(`${this.type} '${this.source}': can not transition to '${k}', expecting state '${n}'${e?" or '"+e+"'":""}, was '${this._state}'.`);this._state=k,k==B&&(this._zoneDelegates=null)}toString(){return this.data&&void 0!==this.data.handleId?this.data.handleId.toString():Object.prototype.toString.call(this)}toJSON(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}}}const H=m("setTimeout"),S=m("Promise"),P=m("then");let L,G=[],x=!1;function T(I){if(0===fe&&0===G.length)if(L||t[S]&&(L=t[S].resolve(0)),L){let k=L[P];k||(k=L.then),k.call(L,Z)}else t[H](Z,0);I&&G.push(I)}function Z(){if(!x){for(x=!0;G.length;){const I=G;G=[];for(let k=0;kF,onUnhandledError:W,microtaskDrainDone:W,scheduleMicroTask:T,showUncaughtError:()=>!v[m("ignoreConsoleErrorUncaughtError")],patchEventTarget:()=>[],patchOnProperties:W,patchMethod:()=>W,bindArguments:()=>[],patchThen:()=>W,patchMacroTask:()=>W,patchEventPrototype:()=>W,isIEOrEdge:()=>!1,getGlobalObjects:()=>{},ObjectDefineProperty:()=>W,ObjectGetOwnPropertyDescriptor:()=>{},ObjectCreate:()=>{},ArraySlice:()=>[],patchClass:()=>W,wrapWithCurrentZone:()=>W,filterProperties:()=>[],attachOriginToPatched:()=>W,_redefineProperty:()=>W,patchCallbacks:()=>W};let F={parent:null,zone:new v(null,null)},ue=null,fe=0;function W(){}c("Zone","Zone"),t.Zone=v}("undefined"!=typeof window&&window||"undefined"!=typeof self&&self||global);const oe=Object.getOwnPropertyDescriptor,ge=Object.defineProperty,ye=Object.getPrototypeOf,_t=Object.create,Ve=Array.prototype.slice,Ie="addEventListener",Je="removeEventListener",Qe=Zone.__symbol__(Ie),et=Zone.__symbol__(Je),he="true",ve="false",Ze=Zone.__symbol__("");function Fe(t,a){return Zone.current.wrap(t,a)}function lt(t,a,u,c,f){return Zone.current.scheduleMacroTask(t,a,u,c,f)}const U=Zone.__symbol__,Ae="undefined"!=typeof window,ke=Ae?window:void 0,J=Ae&&ke||"object"==typeof self&&self||global,yt=[null];function tt(t,a){for(let u=t.length-1;u>=0;u--)"function"==typeof t[u]&&(t[u]=Fe(t[u],a+"_"+u));return t}function ft(t){return!t||!1!==t.writable&&!("function"==typeof t.get&&void 0===t.set)}const A="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,ne=!("nw"in J)&&void 0!==J.process&&"[object process]"==={}.toString.call(J.process),ht=!ne&&!A&&!(!Ae||!ke.HTMLElement),Ue=void 0!==J.process&&"[object process]"==={}.toString.call(J.process)&&!A&&!(!Ae||!ke.HTMLElement),je={},Be=function(t){if(!(t=t||J.event))return;let a=je[t.type];a||(a=je[t.type]=U("ON_PROPERTY"+t.type));const u=this||t.target||J,c=u[a];let f;if(ht&&u===ke&&"error"===t.type){const m=t;f=c&&c.call(this,m.message,m.filename,m.lineno,m.colno,m.error),!0===f&&t.preventDefault()}else f=c&&c.apply(this,arguments),null!=f&&!f&&t.preventDefault();return f};function nt(t,a,u){let c=oe(t,a);if(!c&&u&&oe(u,a)&&(c={enumerable:!0,configurable:!0}),!c||!c.configurable)return;const f=U("on"+a+"patched");if(t.hasOwnProperty(f)&&t[f])return;delete c.writable,delete c.value;const m=c.get,E=c.set,v=a.substr(2);let C=je[v];C||(C=je[v]=U("ON_PROPERTY"+v)),c.set=function(w){let b=this;!b&&t===J&&(b=J),b&&(b[C]&&b.removeEventListener(v,Be),E&&E.apply(b,yt),"function"==typeof w?(b[C]=w,b.addEventListener(v,Be,!1)):b[C]=null)},c.get=function(){let w=this;if(!w&&t===J&&(w=J),!w)return null;const b=w[C];if(b)return b;if(m){let H=m&&m.call(this);if(H)return c.set.call(this,H),"function"==typeof w.removeAttribute&&w.removeAttribute(a),H}return null},ge(t,a,c),t[f]=!0}function Ge(t,a,u){if(a)for(let c=0;cfunction(E,v){const C=u(E,v);return C.cbIdx>=0&&"function"==typeof v[C.cbIdx]?lt(C.name,v[C.cbIdx],C,f):m.apply(E,v)})}function se(t,a){t[U("OriginalDelegate")]=a}let dt=!1,de=!1;function Le(){if(dt)return de;dt=!0;try{const t=ke.navigator.userAgent;(-1!==t.indexOf("MSIE ")||-1!==t.indexOf("Trident/")||-1!==t.indexOf("Edge/"))&&(de=!0)}catch(t){}return de}Zone.__load_patch("ZoneAwarePromise",(t,a,u)=>{const c=Object.getOwnPropertyDescriptor,f=Object.defineProperty,E=u.symbol,v=[],C=!0===t[E("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")],w=E("Promise"),b=E("then");u.onUnhandledError=s=>{if(u.showUncaughtError()){const o=s&&s.rejection;o?console.error("Unhandled Promise rejection:",o instanceof Error?o.message:o,"; Zone:",s.zone.name,"; Task:",s.task&&s.task.source,"; Value:",o,o instanceof Error?o.stack:void 0):console.error(s)}},u.microtaskDrainDone=()=>{for(;v.length;){const s=v.shift();try{s.zone.runGuarded(()=>{throw s.throwOriginal?s.rejection:s})}catch(o){P(o)}}};const S=E("unhandledPromiseRejectionHandler");function P(s){u.onUnhandledError(s);try{const o=a[S];"function"==typeof o&&o.call(this,s)}catch(o){}}function G(s){return s&&s.then}function x(s){return s}function L(s){return n.reject(s)}const T=E("state"),Z=E("value"),z=E("finally"),B=E("parentPromiseValue"),$=E("parentPromiseState"),Q=null,V=!0,K=!1;function j(s,o){return l=>{try{F(s,o,l)}catch(d){F(s,!1,d)}}}const Te=E("currentTaskTrace");function F(s,o,l){const d=function(){let s=!1;return function(l){return function(){s||(s=!0,l.apply(null,arguments))}}}();if(s===l)throw new TypeError("Promise resolved with itself");if(s[T]===Q){let p=null;try{("object"==typeof l||"function"==typeof l)&&(p=l&&l.then)}catch(y){return d(()=>{F(s,!1,y)})(),s}if(o!==K&&l instanceof n&&l.hasOwnProperty(T)&&l.hasOwnProperty(Z)&&l[T]!==Q)fe(l),F(s,l[T],l[Z]);else if(o!==K&&"function"==typeof p)try{p.call(l,d(j(s,o)),d(j(s,!1)))}catch(y){d(()=>{F(s,!1,y)})()}else{s[T]=o;const y=s[Z];if(s[Z]=l,s[z]===z&&o===V&&(s[T]=s[$],s[Z]=s[B]),o===K&&l instanceof Error){const _=a.currentTask&&a.currentTask.data&&a.currentTask.data.__creationTrace__;_&&f(l,Te,{configurable:!0,enumerable:!1,writable:!0,value:_})}for(let _=0;_{try{const g=s[Z],M=!!l&&z===l[z];M&&(l[B]=g,l[$]=y);const D=o.run(_,void 0,M&&_!==L&&_!==x?[]:[g]);F(l,!0,D)}catch(g){F(l,!1,g)}},l)}const k=function(){};class n{static toString(){return"function ZoneAwarePromise() { [native code] }"}static resolve(o){return F(new this(null),V,o)}static reject(o){return F(new this(null),K,o)}static race(o){let l,d,p=new this((g,M)=>{l=g,d=M});function y(g){l(g)}function _(g){d(g)}for(let g of o)G(g)||(g=this.resolve(g)),g.then(y,_);return p}static all(o){return n.allWithCallback(o)}static allSettled(o){return(this&&this.prototype instanceof n?this:n).allWithCallback(o,{thenCallback:d=>({status:"fulfilled",value:d}),errorCallback:d=>({status:"rejected",reason:d})})}static allWithCallback(o,l){let d,p,y=new this((D,q)=>{d=D,p=q}),_=2,g=0;const M=[];for(let D of o){G(D)||(D=this.resolve(D));const q=g;try{D.then(ee=>{M[q]=l?l.thenCallback(ee):ee,_--,0===_&&d(M)},ee=>{l?(M[q]=l.errorCallback(ee),_--,0===_&&d(M)):p(ee)})}catch(ee){p(ee)}_++,g++}return _-=2,0===_&&d(M),y}constructor(o){const l=this;if(!(l instanceof n))throw new Error("Must be an instanceof Promise.");l[T]=Q,l[Z]=[];try{o&&o(j(l,V),j(l,K))}catch(d){F(l,!1,d)}}get[Symbol.toStringTag](){return"Promise"}get[Symbol.species](){return n}then(o,l){let d=this.constructor[Symbol.species];(!d||"function"!=typeof d)&&(d=this.constructor||n);const p=new d(k),y=a.current;return this[T]==Q?this[Z].push(y,p,o,l):W(this,y,p,o,l),p}catch(o){return this.then(null,o)}finally(o){let l=this.constructor[Symbol.species];(!l||"function"!=typeof l)&&(l=n);const d=new l(k);d[z]=z;const p=a.current;return this[T]==Q?this[Z].push(p,d,o,o):W(this,p,d,o,o),d}}n.resolve=n.resolve,n.reject=n.reject,n.race=n.race,n.all=n.all;const e=t[w]=t.Promise;t.Promise=n;const r=E("thenPatched");function i(s){const o=s.prototype,l=c(o,"then");if(l&&(!1===l.writable||!l.configurable))return;const d=o.then;o[b]=d,s.prototype.then=function(p,y){return new n((g,M)=>{d.call(this,g,M)}).then(p,y)},s[r]=!0}return u.patchThen=i,e&&(i(e),ae(t,"fetch",s=>function h(s){return function(o,l){let d=s.apply(o,l);if(d instanceof n)return d;let p=d.constructor;return p[r]||i(p),d}}(s))),Promise[a.__symbol__("uncaughtPromiseErrors")]=v,n}),Zone.__load_patch("toString",t=>{const a=Function.prototype.toString,u=U("OriginalDelegate"),c=U("Promise"),f=U("Error"),m=function(){if("function"==typeof this){const w=this[u];if(w)return"function"==typeof w?a.call(w):Object.prototype.toString.call(w);if(this===Promise){const b=t[c];if(b)return a.call(b)}if(this===Error){const b=t[f];if(b)return a.call(b)}}return a.call(this)};m[u]=a,Function.prototype.toString=m;const E=Object.prototype.toString;Object.prototype.toString=function(){return"function"==typeof Promise&&this instanceof Promise?"[object Promise]":E.call(this)}});let ce=!1;if("undefined"!=typeof window)try{const t=Object.defineProperty({},"passive",{get:function(){ce=!0}});window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch(t){ce=!1}const me={useG:!0},te={},pe={},vt=new RegExp("^"+Ze+"(\\w+)(true|false)$"),rt=U("propagationStopped");function mt(t,a){const u=(a?a(t):t)+ve,c=(a?a(t):t)+he,f=Ze+u,m=Ze+c;te[t]={},te[t][ve]=f,te[t][he]=m}function ze(t,a,u){const c=u&&u.add||Ie,f=u&&u.rm||Je,m=u&&u.listeners||"eventListeners",E=u&&u.rmAll||"removeAllListeners",v=U(c),C="."+c+":",H=function(L,T,Z){if(L.isRemoved)return;const z=L.callback;"object"==typeof z&&z.handleEvent&&(L.callback=$=>z.handleEvent($),L.originalDelegate=z),L.invoke(L,T,[Z]);const B=L.options;B&&"object"==typeof B&&B.once&&T[f].call(T,Z.type,L.originalDelegate?L.originalDelegate:L.callback,B)},S=function(L){if(!(L=L||t.event))return;const T=this||L.target||t,Z=T[te[L.type][ve]];if(Z)if(1===Z.length)H(Z[0],T,L);else{const z=Z.slice();for(let B=0;Bfunction(f,m){f[rt]=!0,c&&c.apply(f,m)})}function pt(t,a,u,c,f){const m=Zone.__symbol__(c);if(a[m])return;const E=a[m]=a[c];a[c]=function(v,C,w){return C&&C.prototype&&f.forEach(function(b){const H=`${u}.${c}::`+b,S=C.prototype;if(S.hasOwnProperty(b)){const P=t.ObjectGetOwnPropertyDescriptor(S,b);P&&P.value?(P.value=t.wrapWithCurrentZone(P.value,H),t._redefineProperty(C.prototype,b,P)):S[b]&&(S[b]=t.wrapWithCurrentZone(S[b],H))}else S[b]&&(S[b]=t.wrapWithCurrentZone(S[b],H))}),E.call(a,v,C,w)},t.attachOriginToPatched(a[c],E)}const Et=["absolutedeviceorientation","afterinput","afterprint","appinstalled","beforeinstallprompt","beforeprint","beforeunload","devicelight","devicemotion","deviceorientation","deviceorientationabsolute","deviceproximity","hashchange","languagechange","message","mozbeforepaint","offline","online","paint","pageshow","pagehide","popstate","rejectionhandled","storage","unhandledrejection","unload","userproximity","vrdisplayconnected","vrdisplaydisconnected","vrdisplaypresentchange"],st=["encrypted","waitingforkey","msneedkey","mozinterruptbegin","mozinterruptend"],le=["load"],De=["blur","error","focus","load","resize","scroll","messageerror"],Ee=["bounce","finish","start"],it=["loadstart","progress","abort","error","load","progress","timeout","loadend","readystatechange"],Pe=["upgradeneeded","complete","abort","success","error","blocked","versionchange","close"],at=["close","error","open","message"],Re=["error","message"],Ne=["abort","animationcancel","animationend","animationiteration","auxclick","beforeinput","blur","cancel","canplay","canplaythrough","change","compositionstart","compositionupdate","compositionend","cuechange","click","close","contextmenu","curechange","dblclick","drag","dragend","dragenter","dragexit","dragleave","dragover","drop","durationchange","emptied","ended","error","focus","focusin","focusout","gotpointercapture","input","invalid","keydown","keypress","keyup","load","loadstart","loadeddata","loadedmetadata","lostpointercapture","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","mousewheel","orientationchange","pause","play","playing","pointercancel","pointerdown","pointerenter","pointerleave","pointerlockchange","mozpointerlockchange","webkitpointerlockerchange","pointerlockerror","mozpointerlockerror","webkitpointerlockerror","pointermove","pointout","pointerover","pointerup","progress","ratechange","reset","resize","scroll","seeked","seeking","select","selectionchange","selectstart","show","sort","stalled","submit","suspend","timeupdate","volumechange","touchcancel","touchmove","touchstart","touchend","transitioncancel","transitionend","waiting","wheel"].concat(["webglcontextrestored","webglcontextlost","webglcontextcreationerror"],["autocomplete","autocompleteerror"],["toggle"],["afterscriptexecute","beforescriptexecute","DOMContentLoaded","freeze","fullscreenchange","mozfullscreenchange","webkitfullscreenchange","msfullscreenchange","fullscreenerror","mozfullscreenerror","webkitfullscreenerror","msfullscreenerror","readystatechange","visibilitychange","resume"],Et,["beforecopy","beforecut","beforepaste","copy","cut","paste","dragstart","loadend","animationstart","search","transitionrun","transitionstart","webkitanimationend","webkitanimationiteration","webkitanimationstart","webkittransitionend"],["activate","afterupdate","ariarequest","beforeactivate","beforedeactivate","beforeeditfocus","beforeupdate","cellchange","controlselect","dataavailable","datasetchanged","datasetcomplete","errorupdate","filterchange","layoutcomplete","losecapture","move","moveend","movestart","propertychange","resizeend","resizestart","rowenter","rowexit","rowsdelete","rowsinserted","command","compassneedscalibration","deactivate","help","mscontentzoom","msmanipulationstatechanged","msgesturechange","msgesturedoubletap","msgestureend","msgesturehold","msgesturestart","msgesturetap","msgotpointercapture","msinertiastart","mslostpointercapture","mspointercancel","mspointerdown","mspointerenter","mspointerhover","mspointerleave","mspointermove","mspointerout","mspointerover","mspointerup","pointerout","mssitemodejumplistitemremoved","msthumbnailclick","stop","storagecommit"]);function Xe(t,a,u){if(!u||0===u.length)return a;const c=u.filter(m=>m.target===t);if(!c||0===c.length)return a;const f=c[0].ignoreProperties;return a.filter(m=>-1===f.indexOf(m))}function Y(t,a,u,c){t&&Ge(t,Xe(t,a,u),c)}Zone.__load_patch("util",(t,a,u)=>{u.patchOnProperties=Ge,u.patchMethod=ae,u.bindArguments=tt,u.patchMacroTask=Ce;const c=a.__symbol__("BLACK_LISTED_EVENTS"),f=a.__symbol__("UNPATCHED_EVENTS");t[f]&&(t[c]=t[f]),t[c]&&(a[c]=a[f]=t[c]),u.patchEventPrototype=ot,u.patchEventTarget=ze,u.isIEOrEdge=Le,u.ObjectDefineProperty=ge,u.ObjectGetOwnPropertyDescriptor=oe,u.ObjectCreate=_t,u.ArraySlice=Ve,u.patchClass=we,u.wrapWithCurrentZone=Fe,u.filterProperties=Xe,u.attachOriginToPatched=se,u._redefineProperty=Object.defineProperty,u.patchCallbacks=pt,u.getGlobalObjects=()=>({globalSources:pe,zoneSymbolEventNames:te,eventNames:Ne,isBrowser:ht,isMix:Ue,isNode:ne,TRUE_STR:he,FALSE_STR:ve,ZONE_SYMBOL_PREFIX:Ze,ADD_EVENT_LISTENER_STR:Ie,REMOVE_EVENT_LISTENER_STR:Je})});const Ye=U("zoneTask");function Se(t,a,u,c){let f=null,m=null;u+=c;const E={};function v(w){const b=w.data;return b.args[0]=function(){return w.invoke.apply(this,arguments)},b.handleId=f.apply(t,b.args),w}function C(w){return m.call(t,w.data.handleId)}f=ae(t,a+=c,w=>function(b,H){if("function"==typeof H[0]){const S={isPeriodic:"Interval"===c,delay:"Timeout"===c||"Interval"===c?H[1]||0:void 0,args:H},P=H[0];H[0]=function(){try{return P.apply(this,arguments)}finally{S.isPeriodic||("number"==typeof S.handleId?delete E[S.handleId]:S.handleId&&(S.handleId[Ye]=null))}};const G=lt(a,H[0],S,v,C);if(!G)return G;const x=G.data.handleId;return"number"==typeof x?E[x]=G:x&&(x[Ye]=G),x&&x.ref&&x.unref&&"function"==typeof x.ref&&"function"==typeof x.unref&&(G.ref=x.ref.bind(x),G.unref=x.unref.bind(x)),"number"==typeof x||x?x:G}return w.apply(t,H)}),m=ae(t,u,w=>function(b,H){const S=H[0];let P;"number"==typeof S?P=E[S]:(P=S&&S[Ye],P||(P=S)),P&&"string"==typeof P.type?"notScheduled"!==P.state&&(P.cancelFn&&P.data.isPeriodic||0===P.runCount)&&("number"==typeof S?delete E[S]:S&&(S[Ye]=null),P.zone.cancelTask(P)):w.apply(t,H)})}Zone.__load_patch("legacy",t=>{const a=t[Zone.__symbol__("legacyPatch")];a&&a()}),Zone.__load_patch("queueMicrotask",(t,a,u)=>{u.patchMethod(t,"queueMicrotask",c=>function(f,m){a.current.scheduleMicroTask("queueMicrotask",m[0])})}),Zone.__load_patch("timers",t=>{const a="set",u="clear";Se(t,a,u,"Timeout"),Se(t,a,u,"Interval"),Se(t,a,u,"Immediate")}),Zone.__load_patch("requestAnimationFrame",t=>{Se(t,"request","cancel","AnimationFrame"),Se(t,"mozRequest","mozCancel","AnimationFrame"),Se(t,"webkitRequest","webkitCancel","AnimationFrame")}),Zone.__load_patch("blocking",(t,a)=>{const u=["alert","prompt","confirm"];for(let c=0;cfunction(C,w){return a.current.run(m,t,w,v)})}),Zone.__load_patch("EventTarget",(t,a,u)=>{(function Me(t,a){a.patchEventPrototype(t,a)})(t,u),function $e(t,a){if(Zone[a.symbol("patchEventTarget")])return;const{eventNames:u,zoneSymbolEventNames:c,TRUE_STR:f,FALSE_STR:m,ZONE_SYMBOL_PREFIX:E}=a.getGlobalObjects();for(let C=0;C{we("MutationObserver"),we("WebKitMutationObserver")}),Zone.__load_patch("IntersectionObserver",(t,a,u)=>{we("IntersectionObserver")}),Zone.__load_patch("FileReader",(t,a,u)=>{we("FileReader")}),Zone.__load_patch("on_property",(t,a,u)=>{!function Ct(t,a){if(ne&&!Ue||Zone[t.symbol("patchEvents")])return;const u="undefined"!=typeof WebSocket,c=a.__Zone_ignore_on_properties;if(ht){const E=window,v=function be(){try{const t=ke.navigator.userAgent;if(-1!==t.indexOf("MSIE ")||-1!==t.indexOf("Trident/"))return!0}catch(t){}return!1}()?[{target:E,ignoreProperties:["error"]}]:[];Y(E,Ne.concat(["messageerror"]),c&&c.concat(v),ye(E)),Y(Document.prototype,Ne,c),void 0!==E.SVGElement&&Y(E.SVGElement.prototype,Ne,c),Y(Element.prototype,Ne,c),Y(HTMLElement.prototype,Ne,c),Y(HTMLMediaElement.prototype,st,c),Y(HTMLFrameSetElement.prototype,Et.concat(De),c),Y(HTMLBodyElement.prototype,Et.concat(De),c),Y(HTMLFrameElement.prototype,le,c),Y(HTMLIFrameElement.prototype,le,c);const C=E.HTMLMarqueeElement;C&&Y(C.prototype,Ee,c);const w=E.Worker;w&&Y(w.prototype,Re,c)}const f=a.XMLHttpRequest;f&&Y(f.prototype,it,c);const m=a.XMLHttpRequestEventTarget;m&&Y(m&&m.prototype,it,c),"undefined"!=typeof IDBIndex&&(Y(IDBIndex.prototype,Pe,c),Y(IDBRequest.prototype,Pe,c),Y(IDBOpenDBRequest.prototype,Pe,c),Y(IDBDatabase.prototype,Pe,c),Y(IDBTransaction.prototype,Pe,c),Y(IDBCursor.prototype,Pe,c)),u&&Y(WebSocket.prototype,at,c)}(u,t)}),Zone.__load_patch("customElements",(t,a,u)=>{!function Pt(t,a){const{isBrowser:u,isMix:c}=a.getGlobalObjects();(u||c)&&t.customElements&&"customElements"in t&&a.patchCallbacks(a,t.customElements,"customElements","define",["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback"])}(t,u)}),Zone.__load_patch("XHR",(t,a)=>{!function C(w){const b=w.XMLHttpRequest;if(!b)return;const H=b.prototype;let P=H[Qe],G=H[et];if(!P){const N=w.XMLHttpRequestEventTarget;if(N){const j=N.prototype;P=j[Qe],G=j[et]}}const x="readystatechange",L="scheduled";function T(N){const j=N.data,O=j.target;O[m]=!1,O[v]=!1;const re=O[f];P||(P=O[Qe],G=O[et]),re&&G.call(O,x,re);const Te=O[f]=()=>{if(O.readyState===O.DONE)if(!j.aborted&&O[m]&&N.state===L){const ue=O[a.__symbol__("loadfalse")];if(0!==O.status&&ue&&ue.length>0){const fe=N.invoke;N.invoke=function(){const W=O[a.__symbol__("loadfalse")];for(let I=0;Ifunction(N,j){return N[c]=0==j[2],N[E]=j[1],B.apply(N,j)}),R=U("fetchTaskAborting"),Q=U("fetchTaskScheduling"),V=ae(H,"send",()=>function(N,j){if(!0===a.current[Q]||N[c])return V.apply(N,j);{const O={target:N,url:N[E],isPeriodic:!1,args:j,aborted:!1},re=lt("XMLHttpRequest.send",Z,O,T,z);N&&!0===N[v]&&!O.aborted&&re.state===L&&re.invoke()}}),K=ae(H,"abort",()=>function(N,j){const O=function S(N){return N[u]}(N);if(O&&"string"==typeof O.type){if(null==O.cancelFn||O.data&&O.data.aborted)return;O.zone.cancelTask(O)}else if(!0===a.current[R])return K.apply(N,j)})}(t);const u=U("xhrTask"),c=U("xhrSync"),f=U("xhrListener"),m=U("xhrScheduled"),E=U("xhrURL"),v=U("xhrErrorBeforeScheduled")}),Zone.__load_patch("geolocation",t=>{t.navigator&&t.navigator.geolocation&&function ut(t,a){const u=t.constructor.name;for(let c=0;c{const C=function(){return v.apply(this,tt(arguments,u+"."+f))};return se(C,v),C})(m)}}}(t.navigator.geolocation,["getCurrentPosition","watchPosition"])}),Zone.__load_patch("PromiseRejectionEvent",(t,a)=>{function u(c){return function(f){kt(t,c).forEach(E=>{const v=t.PromiseRejectionEvent;if(v){const C=new v(c,{promise:f.promise,reason:f.rejection});E.invoke(C)}})}}t.PromiseRejectionEvent&&(a[U("unhandledPromiseRejectionHandler")]=u("unhandledrejection"),a[U("rejectionHandledHandler")]=u("rejectionhandled"))})}},X=>{X(X.s=61)}]);"use strict";var RQ=Object.defineProperty,PQ=Object.defineProperties,FQ=Object.getOwnPropertyDescriptors,fp=Object.getOwnPropertySymbols,w1=Object.prototype.hasOwnProperty,S1=Object.prototype.propertyIsEnumerable,E1=(et,mt,ze)=>mt in et?RQ(et,mt,{enumerable:!0,configurable:!0,writable:!0,value:ze}):et[mt]=ze,S=(et,mt)=>{for(var ze in mt||(mt={}))w1.call(mt,ze)&&E1(et,ze,mt[ze]);if(fp)for(var ze of fp(mt))S1.call(mt,ze)&&E1(et,ze,mt[ze]);return et},pn=(et,mt)=>PQ(et,FQ(mt)),M1=(et,mt)=>{var ze={};for(var Ft in et)w1.call(et,Ft)&&mt.indexOf(Ft)<0&&(ze[Ft]=et[Ft]);if(null!=et&&fp)for(var Ft of fp(et))mt.indexOf(Ft)<0&&S1.call(et,Ft)&&(ze[Ft]=et[Ft]);return ze};(self.webpackChunkdotcms_block_editor=self.webpackChunkdotcms_block_editor||[]).push([[179],{712:()=>{function et(n){return"function"==typeof n}let mt=!1;const ze={Promise:void 0,set useDeprecatedSynchronousErrorHandling(n){if(n){const e=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+e.stack)}else mt&&console.log("RxJS: Back to a better error behavior. Thank you. <3");mt=n},get useDeprecatedSynchronousErrorHandling(){return mt}};function Ft(n){setTimeout(()=>{throw n},0)}const Iu={closed:!0,next(n){},error(n){if(ze.useDeprecatedSynchronousErrorHandling)throw n;Ft(n)},complete(){}},hl=Array.isArray||(n=>n&&"number"==typeof n.length);function hp(n){return null!==n&&"object"==typeof n}const Tu=(()=>{function n(e){return Error.call(this),this.message=e?`${e.length} errors occurred during unsubscription:\n${e.map((t,r)=>`${r+1}) ${t.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=e,this}return n.prototype=Object.create(Error.prototype),n})();class ke{constructor(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}unsubscribe(){let e;if(this.closed)return;let{_parentOrParents:t,_ctorUnsubscribe:r,_unsubscribe:i,_subscriptions:o}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,t instanceof ke)t.remove(this);else if(null!==t)for(let s=0;se.concat(t instanceof Tu?t.errors:t),[])}ke.EMPTY=((n=new ke).closed=!0,n);const xu="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random();class tt extends ke{constructor(e,t,r){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=Iu;break;case 1:if(!e){this.destination=Iu;break}if("object"==typeof e){e instanceof tt?(this.syncErrorThrowable=e.syncErrorThrowable,this.destination=e,e.add(this)):(this.syncErrorThrowable=!0,this.destination=new wb(this,e));break}default:this.syncErrorThrowable=!0,this.destination=new wb(this,e,t,r)}}[xu](){return this}static create(e,t,r){const i=new tt(e,t,r);return i.syncErrorThrowable=!1,i}next(e){this.isStopped||this._next(e)}error(e){this.isStopped||(this.isStopped=!0,this._error(e))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(e){this.destination.next(e)}_error(e){this.destination.error(e),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parentOrParents:e}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this}}class wb extends tt{constructor(e,t,r,i){super(),this._parentSubscriber=e;let o,s=this;et(t)?o=t:t&&(o=t.next,r=t.error,i=t.complete,t!==Iu&&(s=Object.create(t),et(s.unsubscribe)&&this.add(s.unsubscribe.bind(s)),s.unsubscribe=this.unsubscribe.bind(this))),this._context=s,this._next=o,this._error=r,this._complete=i}next(e){if(!this.isStopped&&this._next){const{_parentSubscriber:t}=this;ze.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}}error(e){if(!this.isStopped){const{_parentSubscriber:t}=this,{useDeprecatedSynchronousErrorHandling:r}=ze;if(this._error)r&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(t.syncErrorThrowable)r?(t.syncErrorValue=e,t.syncErrorThrown=!0):Ft(e),this.unsubscribe();else{if(this.unsubscribe(),r)throw e;Ft(e)}}}complete(){if(!this.isStopped){const{_parentSubscriber:e}=this;if(this._complete){const t=()=>this._complete.call(this._context);ze.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,t),this.unsubscribe()):(this.__tryOrUnsub(t),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(e,t){try{e.call(this._context,t)}catch(r){if(this.unsubscribe(),ze.useDeprecatedSynchronousErrorHandling)throw r;Ft(r)}}__tryOrSetError(e,t,r){if(!ze.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,r)}catch(i){return ze.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=i,e.syncErrorThrown=!0,!0):(Ft(i),!0)}return!1}_unsubscribe(){const{_parentSubscriber:e}=this;this._context=null,this._parentSubscriber=null,e.unsubscribe()}}const pl="function"==typeof Symbol&&Symbol.observable||"@@observable";function Au(n){return n}let Ne=(()=>{class n{constructor(t){this._isScalar=!1,t&&(this._subscribe=t)}lift(t){const r=new n;return r.source=this,r.operator=t,r}subscribe(t,r,i){const{operator:o}=this,s=function T1(n,e,t){if(n){if(n instanceof tt)return n;if(n[xu])return n[xu]()}return n||e||t?new tt(n,e,t):new tt(Iu)}(t,r,i);if(s.add(o?o.call(s,this.source):this.source||ze.useDeprecatedSynchronousErrorHandling&&!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),ze.useDeprecatedSynchronousErrorHandling&&s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s}_trySubscribe(t){try{return this._subscribe(t)}catch(r){ze.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=r),function I1(n){for(;n;){const{closed:e,destination:t,isStopped:r}=n;if(e||r)return!1;n=t&&t instanceof tt?t:null}return!0}(t)?t.error(r):console.warn(r)}}forEach(t,r){return new(r=Mb(r))((i,o)=>{let s;s=this.subscribe(a=>{try{t(a)}catch(l){o(l),s&&s.unsubscribe()}},o,i)})}_subscribe(t){const{source:r}=this;return r&&r.subscribe(t)}[pl](){return this}pipe(...t){return 0===t.length?this:function Sb(n){return 0===n.length?Au:1===n.length?n[0]:function(t){return n.reduce((r,i)=>i(r),t)}}(t)(this)}toPromise(t){return new(t=Mb(t))((r,i)=>{let o;this.subscribe(s=>o=s,s=>i(s),()=>r(o))})}}return n.create=e=>new n(e),n})();function Mb(n){if(n||(n=ze.Promise||Promise),!n)throw new Error("no Promise impl found");return n}const Uo=(()=>{function n(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return n.prototype=Object.create(Error.prototype),n})();class Ib extends ke{constructor(e,t){super(),this.subject=e,this.subscriber=t,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const e=this.subject,t=e.observers;if(this.subject=null,!t||0===t.length||e.isStopped||e.closed)return;const r=t.indexOf(this.subscriber);-1!==r&&t.splice(r,1)}}class Tb extends tt{constructor(e){super(e),this.destination=e}}let Me=(()=>{class n extends Ne{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[xu](){return new Tb(this)}lift(t){const r=new xb(this,this);return r.operator=t,r}next(t){if(this.closed)throw new Uo;if(!this.isStopped){const{observers:r}=this,i=r.length,o=r.slice();for(let s=0;snew xb(e,t),n})();class xb extends Me{constructor(e,t){super(),this.destination=e,this.source=t}next(e){const{destination:t}=this;t&&t.next&&t.next(e)}error(e){const{destination:t}=this;t&&t.error&&this.destination.error(e)}complete(){const{destination:e}=this;e&&e.complete&&this.destination.complete()}_subscribe(e){const{source:t}=this;return t?this.source.subscribe(e):ke.EMPTY}}function Os(n){return n&&"function"==typeof n.schedule}function be(n,e){return function(r){if("function"!=typeof n)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return r.lift(new x1(n,e))}}class x1{constructor(e,t){this.project=e,this.thisArg=t}call(e,t){return t.subscribe(new A1(e,this.project,this.thisArg))}}class A1 extends tt{constructor(e,t,r){super(e),this.project=t,this.count=0,this.thisArg=r||this}_next(e){let t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(r){return void this.destination.error(r)}this.destination.next(t)}}const Ab=n=>e=>{for(let t=0,r=n.length;tn&&"number"==typeof n.length&&"function"!=typeof n;function kb(n){return!!n&&"function"!=typeof n.subscribe&&"function"==typeof n.then}const pp=n=>{if(n&&"function"==typeof n[pl])return(n=>e=>{const t=n[pl]();if("function"!=typeof t.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return t.subscribe(e)})(n);if(Ob(n))return Ab(n);if(kb(n))return(n=>e=>(n.then(t=>{e.closed||(e.next(t),e.complete())},t=>e.error(t)).then(null,Ft),e))(n);if(n&&"function"==typeof n[Ou])return(n=>e=>{const t=n[Ou]();for(;;){let r;try{r=t.next()}catch(i){return e.error(i),e}if(r.done){e.complete();break}if(e.next(r.value),e.closed)break}return"function"==typeof t.return&&e.add(()=>{t.return&&t.return()}),e})(n);{const t=`You provided ${hp(n)?"an invalid object":`'${n}'`} where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.`;throw new TypeError(t)}};function gp(n,e){return new Ne(t=>{const r=new ke;let i=0;return r.add(e.schedule(function(){i!==n.length?(t.next(n[i++]),t.closed||r.add(this.schedule())):t.complete()})),r})}function zt(n,e){return e?function V1(n,e){if(null!=n){if(function B1(n){return n&&"function"==typeof n[pl]}(n))return function P1(n,e){return new Ne(t=>{const r=new ke;return r.add(e.schedule(()=>{const i=n[pl]();r.add(i.subscribe({next(o){r.add(e.schedule(()=>t.next(o)))},error(o){r.add(e.schedule(()=>t.error(o)))},complete(){r.add(e.schedule(()=>t.complete()))}}))})),r})}(n,e);if(kb(n))return function F1(n,e){return new Ne(t=>{const r=new ke;return r.add(e.schedule(()=>n.then(i=>{r.add(e.schedule(()=>{t.next(i),r.add(e.schedule(()=>t.complete()))}))},i=>{r.add(e.schedule(()=>t.error(i)))}))),r})}(n,e);if(Ob(n))return gp(n,e);if(function j1(n){return n&&"function"==typeof n[Ou]}(n)||"string"==typeof n)return function L1(n,e){if(!n)throw new Error("Iterable cannot be null");return new Ne(t=>{const r=new ke;let i;return r.add(()=>{i&&"function"==typeof i.return&&i.return()}),r.add(e.schedule(()=>{i=n[Ou](),r.add(e.schedule(function(){if(t.closed)return;let o,s;try{const a=i.next();o=a.value,s=a.done}catch(a){return void t.error(a)}s?t.complete():(t.next(o),this.schedule())}))})),r})}(n,e)}throw new TypeError((null!==n&&typeof n||n)+" is not observable")}(n,e):n instanceof Ne?n:new Ne(pp(n))}class gl extends tt{constructor(e){super(),this.parent=e}_next(e){this.parent.notifyNext(e)}_error(e){this.parent.notifyError(e),this.unsubscribe()}_complete(){this.parent.notifyComplete(),this.unsubscribe()}}class ml extends tt{notifyNext(e){this.destination.next(e)}notifyError(e){this.destination.error(e)}notifyComplete(){this.destination.complete()}}function vl(n,e){if(e.closed)return;if(n instanceof Ne)return n.subscribe(e);let t;try{t=pp(n)(e)}catch(r){e.error(r)}return t}function Wt(n,e,t=Number.POSITIVE_INFINITY){return"function"==typeof e?r=>r.pipe(Wt((i,o)=>zt(n(i,o)).pipe(be((s,a)=>e(i,s,o,a))),t)):("number"==typeof e&&(t=e),r=>r.lift(new H1(n,t)))}class H1{constructor(e,t=Number.POSITIVE_INFINITY){this.project=e,this.concurrent=t}call(e,t){return t.subscribe(new U1(e,this.project,this.concurrent))}}class U1 extends ml{constructor(e,t,r=Number.POSITIVE_INFINITY){super(e),this.project=t,this.concurrent=r,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}_next(e){this.active0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}function yl(n=Number.POSITIVE_INFINITY){return Wt(Au,n)}function mp(n,e){return e?gp(n,e):new Ne(Ab(n))}function vp(...n){let e=Number.POSITIVE_INFINITY,t=null,r=n[n.length-1];return Os(r)?(t=n.pop(),n.length>1&&"number"==typeof n[n.length-1]&&(e=n.pop())):"number"==typeof r&&(e=n.pop()),null===t&&1===n.length&&n[0]instanceof Ne?n[0]:yl(e)(mp(n,t))}function yp(){return function(e){return e.lift(new z1(e))}}class z1{constructor(e){this.connectable=e}call(e,t){const{connectable:r}=this;r._refCount++;const i=new W1(e,r),o=t.subscribe(i);return i.closed||(i.connection=r.connect()),o}}class W1 extends tt{constructor(e,t){super(e),this.connectable=t}_unsubscribe(){const{connectable:e}=this;if(!e)return void(this.connection=null);this.connectable=null;const t=e._refCount;if(t<=0)return void(this.connection=null);if(e._refCount=t-1,t>1)return void(this.connection=null);const{connection:r}=this,i=e._connection;this.connection=null,i&&(!r||i===r)&&i.unsubscribe()}}class Nb extends Ne{constructor(e,t){super(),this.source=e,this.subjectFactory=t,this._refCount=0,this._isComplete=!1}_subscribe(e){return this.getSubject().subscribe(e)}getSubject(){const e=this._subject;return(!e||e.isStopped)&&(this._subject=this.subjectFactory()),this._subject}connect(){let e=this._connection;return e||(this._isComplete=!1,e=this._connection=new ke,e.add(this.source.subscribe(new G1(this.getSubject(),this))),e.closed&&(this._connection=null,e=ke.EMPTY)),e}refCount(){return yp()(this)}}const $1=(()=>{const n=Nb.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:n._subscribe},_isComplete:{value:n._isComplete,writable:!0},getSubject:{value:n.getSubject},connect:{value:n.connect},refCount:{value:n.refCount}}})();class G1 extends Tb{constructor(e,t){super(e),this.connectable=t}_error(e){this._unsubscribe(),super._error(e)}_complete(){this.connectable._isComplete=!0,this._unsubscribe(),super._complete()}_unsubscribe(){const e=this.connectable;if(e){this.connectable=null;const t=e._connection;e._refCount=0,e._subject=null,e._connection=null,t&&t.unsubscribe()}}}class Z1{constructor(e,t){this.subjectFactory=e,this.selector=t}call(e,t){const{selector:r}=this,i=this.subjectFactory(),o=r(i).subscribe(e);return o.add(t.subscribe(i)),o}}function Y1(){return new Me}function We(n){for(let e in n)if(n[e]===We)return e;throw Error("Could not find renamed property on target object.")}function _p(n,e){for(const t in e)e.hasOwnProperty(t)&&!n.hasOwnProperty(t)&&(n[t]=e[t])}function Fe(n){if("string"==typeof n)return n;if(Array.isArray(n))return"["+n.map(Fe).join(", ")+"]";if(null==n)return""+n;if(n.overriddenName)return`${n.overriddenName}`;if(n.name)return`${n.name}`;const e=n.toString();if(null==e)return""+e;const t=e.indexOf("\n");return-1===t?e:e.substring(0,t)}function bp(n,e){return null==n||""===n?null===e?"":e:null==e||""===e?n:n+" "+e}const J1=We({__forward_ref__:We});function Ve(n){return n.__forward_ref__=Ve,n.toString=function(){return Fe(this())},n}function de(n){return Rb(n)?n():n}function Rb(n){return"function"==typeof n&&n.hasOwnProperty(J1)&&n.__forward_ref__===Ve}class we extends Error{constructor(e,t){super(function Cp(n,e){return`NG0${Math.abs(n)}${e?": "+e:""}`}(e,t)),this.code=e}}function ae(n){return"string"==typeof n?n:null==n?"":String(n)}function gn(n){return"function"==typeof n?n.name||n.toString():"object"==typeof n&&null!=n&&"function"==typeof n.type?n.type.name||n.type.toString():ae(n)}function ku(n,e){const t=e?` in ${e}`:"";throw new we(-201,`No provider for ${gn(n)} found${t}`)}function jn(n,e){null==n&&function nt(n,e,t,r){throw new Error(`ASSERTION ERROR: ${n}`+(null==r?"":` [Expected=> ${t} ${r} ${e} <=Actual]`))}(e,n,null,"!=")}function $(n){return{token:n.token,providedIn:n.providedIn||null,factory:n.factory,value:void 0}}function at(n){return{providers:n.providers||[],imports:n.imports||[]}}function Dp(n){return Pb(n,Nu)||Pb(n,Lb)}function Pb(n,e){return n.hasOwnProperty(e)?n[e]:null}function Fb(n){return n&&(n.hasOwnProperty(Ep)||n.hasOwnProperty(oN))?n[Ep]:null}const Nu=We({\u0275prov:We}),Ep=We({\u0275inj:We}),Lb=We({ngInjectableDef:We}),oN=We({ngInjectorDef:We});var ce=(()=>((ce=ce||{})[ce.Default=0]="Default",ce[ce.Host=1]="Host",ce[ce.Self=2]="Self",ce[ce.SkipSelf=4]="SkipSelf",ce[ce.Optional=8]="Optional",ce))();let wp;function eo(n){const e=wp;return wp=n,e}function Bb(n,e,t){const r=Dp(n);return r&&"root"==r.providedIn?void 0===r.value?r.value=r.factory():r.value:t&ce.Optional?null:void 0!==e?e:void ku(Fe(n),"Injector")}function to(n){return{toString:n}.toString()}var Dr=(()=>((Dr=Dr||{})[Dr.OnPush=0]="OnPush",Dr[Dr.Default=1]="Default",Dr))(),Gr=(()=>(function(n){n[n.Emulated=0]="Emulated",n[n.None=2]="None",n[n.ShadowDom=3]="ShadowDom"}(Gr||(Gr={})),Gr))();const aN="undefined"!=typeof globalThis&&globalThis,lN="undefined"!=typeof window&&window,cN="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,He=aN||"undefined"!=typeof global&&global||lN||cN,ks={},$e=[],Ru=We({\u0275cmp:We}),Sp=We({\u0275dir:We}),Mp=We({\u0275pipe:We}),jb=We({\u0275mod:We}),Mi=We({\u0275fac:We}),_l=We({__NG_ELEMENT_ID__:We});let uN=0;function Et(n){return to(()=>{const t={},r={type:n.type,providersResolver:null,decls:n.decls,vars:n.vars,factory:null,template:n.template||null,consts:n.consts||null,ngContentSelectors:n.ngContentSelectors,hostBindings:n.hostBindings||null,hostVars:n.hostVars||0,hostAttrs:n.hostAttrs||null,contentQueries:n.contentQueries||null,declaredInputs:t,inputs:null,outputs:null,exportAs:n.exportAs||null,onPush:n.changeDetection===Dr.OnPush,directiveDefs:null,pipeDefs:null,selectors:n.selectors||$e,viewQuery:n.viewQuery||null,features:n.features||null,data:n.data||{},encapsulation:n.encapsulation||Gr.Emulated,id:"c",styles:n.styles||$e,_:null,setInput:null,schemas:n.schemas||null,tView:null},i=n.directives,o=n.features,s=n.pipes;return r.id+=uN++,r.inputs=zb(n.inputs,t),r.outputs=zb(n.outputs),o&&o.forEach(a=>a(r)),r.directiveDefs=i?()=>("function"==typeof i?i():i).map(Vb):null,r.pipeDefs=s?()=>("function"==typeof s?s():s).map(Hb):null,r})}function Vb(n){return en(n)||function no(n){return n[Sp]||null}(n)}function Hb(n){return function zo(n){return n[Mp]||null}(n)}const Ub={};function ut(n){return to(()=>{const e={type:n.type,bootstrap:n.bootstrap||$e,declarations:n.declarations||$e,imports:n.imports||$e,exports:n.exports||$e,transitiveCompileScopes:null,schemas:n.schemas||null,id:n.id||null};return null!=n.id&&(Ub[n.id]=n.type),e})}function zb(n,e){if(null==n)return ks;const t={};for(const r in n)if(n.hasOwnProperty(r)){let i=n[r],o=i;Array.isArray(i)&&(o=i[1],i=i[0]),t[i]=r,e&&(e[i]=o)}return t}const Y=Et;function mn(n){return{type:n.type,name:n.name,factory:null,pure:!1!==n.pure,onDestroy:n.type.prototype.ngOnDestroy||null}}function en(n){return n[Ru]||null}function Xn(n,e){const t=n[jb]||null;if(!t&&!0===e)throw new Error(`Type ${Fe(n)} does not have '\u0275mod' property.`);return t}function qr(n){return Array.isArray(n)&&"object"==typeof n[1]}function wr(n){return Array.isArray(n)&&!0===n[1]}function xp(n){return 0!=(8&n.flags)}function Bu(n){return 2==(2&n.flags)}function ju(n){return 1==(1&n.flags)}function Sr(n){return null!==n.template}function mN(n){return 0!=(512&n[2])}function qo(n,e){return n.hasOwnProperty(Mi)?n[Mi]:null}class $b{constructor(e,t,r){this.previousValue=e,this.currentValue=t,this.firstChange=r}isFirstChange(){return this.firstChange}}function tr(){return Gb}function Gb(n){return n.type.prototype.ngOnChanges&&(n.setInput=bN),_N}function _N(){const n=Kb(this),e=null==n?void 0:n.current;if(e){const t=n.previous;if(t===ks)n.previous=e;else for(let r in e)t[r]=e[r];n.current=null,this.ngOnChanges(e)}}function bN(n,e,t,r){const i=Kb(n)||function CN(n,e){return n[qb]=e}(n,{previous:ks,current:null}),o=i.current||(i.current={}),s=i.previous,a=this.declaredInputs[t],l=s[a];o[a]=new $b(l&&l.currentValue,e,s===ks),n[r]=e}tr.ngInherit=!0;const qb="__ngSimpleChanges__";function Kb(n){return n[qb]||null}let Rp;function Pp(){return void 0!==Rp?Rp:"undefined"!=typeof document?document:void 0}function dt(n){return!!n.listen}const Zb={createRenderer:(n,e)=>Pp()};function wt(n){for(;Array.isArray(n);)n=n[0];return n}function Vu(n,e){return wt(e[n])}function rr(n,e){return wt(e[n.index])}function Fp(n,e){return n.data[e]}function Ls(n,e){return n[e]}function Hn(n,e){const t=e[n];return qr(t)?t:t[0]}function Yb(n){return 4==(4&n[2])}function Lp(n){return 128==(128&n[2])}function ro(n,e){return null==e?null:n[e]}function Qb(n){n[18]=0}function Bp(n,e){n[5]+=e;let t=n,r=n[3];for(;null!==r&&(1===e&&1===t[5]||-1===e&&0===t[5]);)r[5]+=e,t=r,r=r[3]}const te={lFrame:oC(null),bindingsEnabled:!0,isInCheckNoChangesMode:!1};function Jb(){return te.bindingsEnabled}function T(){return te.lFrame.lView}function Se(){return te.lFrame.tView}function Bt(n){return te.lFrame.contextLView=n,n[8]}function Ot(){let n=Xb();for(;null!==n&&64===n.type;)n=n.parent;return n}function Xb(){return te.lFrame.currentTNode}function Kr(n,e){const t=te.lFrame;t.currentTNode=n,t.isParent=e}function jp(){return te.lFrame.isParent}function Vp(){te.lFrame.isParent=!1}function Hu(){return te.isInCheckNoChangesMode}function Uu(n){te.isInCheckNoChangesMode=n}function vn(){const n=te.lFrame;let e=n.bindingRootIndex;return-1===e&&(e=n.bindingRootIndex=n.tView.bindingStartIndex),e}function Bs(){return te.lFrame.bindingIndex++}function Ti(n){const e=te.lFrame,t=e.bindingIndex;return e.bindingIndex=e.bindingIndex+n,t}function BN(n,e){const t=te.lFrame;t.bindingIndex=t.bindingRootIndex=n,Hp(e)}function Hp(n){te.lFrame.currentDirectiveIndex=n}function nC(){return te.lFrame.currentQueryIndex}function zp(n){te.lFrame.currentQueryIndex=n}function VN(n){const e=n[1];return 2===e.type?e.declTNode:1===e.type?n[6]:null}function rC(n,e,t){if(t&ce.SkipSelf){let i=e,o=n;for(;!(i=i.parent,null!==i||t&ce.Host||(i=VN(o),null===i||(o=o[15],10&i.type))););if(null===i)return!1;e=i,n=o}const r=te.lFrame=iC();return r.currentTNode=e,r.lView=n,!0}function zu(n){const e=iC(),t=n[1];te.lFrame=e,e.currentTNode=t.firstChild,e.lView=n,e.tView=t,e.contextLView=n,e.bindingIndex=t.bindingStartIndex,e.inI18n=!1}function iC(){const n=te.lFrame,e=null===n?null:n.child;return null===e?oC(n):e}function oC(n){const e={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:n,child:null,inI18n:!1};return null!==n&&(n.child=e),e}function sC(){const n=te.lFrame;return te.lFrame=n.parent,n.currentTNode=null,n.lView=null,n}const aC=sC;function Wu(){const n=sC();n.isParent=!0,n.tView=null,n.selectedIndex=-1,n.contextLView=null,n.elementDepthCount=0,n.currentDirectiveIndex=-1,n.currentNamespace=null,n.bindingRootIndex=-1,n.bindingIndex=-1,n.currentQueryIndex=0}function yn(){return te.lFrame.selectedIndex}function io(n){te.lFrame.selectedIndex=n}function ft(){const n=te.lFrame;return Fp(n.tView,n.selectedIndex)}function $u(n,e){for(let t=e.directiveStart,r=e.directiveEnd;t=r)break}else e[l]<0&&(n[18]+=65536),(a>11>16&&(3&n[2])===e){n[2]+=2048;try{o.call(a)}finally{}}}else try{o.call(a)}finally{}}class wl{constructor(e,t,r){this.factory=e,this.resolving=!1,this.canSeeViewProviders=t,this.injectImpl=r}}function Ku(n,e,t){const r=dt(n);let i=0;for(;ie){s=o-1;break}}}for(;o>16}(n),r=e;for(;t>0;)r=r[15],t--;return r}let qp=!0;function Yu(n){const e=qp;return qp=n,e}let tR=0;function Ml(n,e){const t=Zp(n,e);if(-1!==t)return t;const r=e[1];r.firstCreatePass&&(n.injectorIndex=e.length,Kp(r.data,n),Kp(e,null),Kp(r.blueprint,null));const i=Qu(n,e),o=n.injectorIndex;if(dC(i)){const s=js(i),a=Vs(i,e),l=a[1].data;for(let c=0;c<8;c++)e[o+c]=a[s+c]|l[s+c]}return e[o+8]=i,o}function Kp(n,e){n.push(0,0,0,0,0,0,0,0,e)}function Zp(n,e){return-1===n.injectorIndex||n.parent&&n.parent.injectorIndex===n.injectorIndex||null===e[n.injectorIndex+8]?-1:n.injectorIndex}function Qu(n,e){if(n.parent&&-1!==n.parent.injectorIndex)return n.parent.injectorIndex;let t=0,r=null,i=e;for(;null!==i;){const o=i[1],s=o.type;if(r=2===s?o.declTNode:1===s?i[6]:null,null===r)return-1;if(t++,i=i[15],-1!==r.injectorIndex)return r.injectorIndex|t<<16}return-1}function Ju(n,e,t){!function nR(n,e,t){let r;"string"==typeof t?r=t.charCodeAt(0)||0:t.hasOwnProperty(_l)&&(r=t[_l]),null==r&&(r=t[_l]=tR++);const i=255&r;e.data[n+(i>>5)]|=1<=0?255&e:iR:e}(t);if("function"==typeof o){if(!rC(e,n,r))return r&ce.Host?pC(i,t,r):gC(e,t,r,i);try{const s=o(r);if(null!=s||r&ce.Optional)return s;ku(t)}finally{aC()}}else if("number"==typeof o){let s=null,a=Zp(n,e),l=-1,c=r&ce.Host?e[16][6]:null;for((-1===a||r&ce.SkipSelf)&&(l=-1===a?Qu(n,e):e[a+8],-1!==l&&_C(r,!1)?(s=e[1],a=js(l),e=Vs(l,e)):a=-1);-1!==a;){const u=e[1];if(yC(o,a,u.data)){const d=oR(a,e,t,s,r,c);if(d!==vC)return d}l=e[a+8],-1!==l&&_C(r,e[1].data[a+8]===c)&&yC(o,a,e)?(s=u,a=js(l),e=Vs(l,e)):a=-1}}}return gC(e,t,r,i)}const vC={};function iR(){return new Hs(Ot(),T())}function oR(n,e,t,r,i,o){const s=e[1],a=s.data[n+8],u=Xu(a,s,t,null==r?Bu(a)&&qp:r!=s&&0!=(3&a.type),i&ce.Host&&o===a);return null!==u?Il(e,s,u,a):vC}function Xu(n,e,t,r,i){const o=n.providerIndexes,s=e.data,a=1048575&o,l=n.directiveStart,u=o>>20,f=i?a+u:n.directiveEnd;for(let h=r?a:a+u;h=l&&p.type===t)return h}if(i){const h=s[l];if(h&&Sr(h)&&h.type===t)return l}return null}function Il(n,e,t,r){let i=n[t];const o=e.data;if(function YN(n){return n instanceof wl}(i)){const s=i;s.resolving&&function X1(n,e){const t=e?`. Dependency path: ${e.join(" > ")} > ${n}`:"";throw new we(-200,`Circular dependency in DI detected for ${n}${t}`)}(gn(o[t]));const a=Yu(s.canSeeViewProviders);s.resolving=!0;const l=s.injectImpl?eo(s.injectImpl):null;rC(n,r,ce.Default);try{i=n[t]=s.factory(void 0,o,n,r),e.firstCreatePass&&t>=r.directiveStart&&function KN(n,e,t){const{ngOnChanges:r,ngOnInit:i,ngDoCheck:o}=e.type.prototype;if(r){const s=Gb(e);(t.preOrderHooks||(t.preOrderHooks=[])).push(n,s),(t.preOrderCheckHooks||(t.preOrderCheckHooks=[])).push(n,s)}i&&(t.preOrderHooks||(t.preOrderHooks=[])).push(0-n,i),o&&((t.preOrderHooks||(t.preOrderHooks=[])).push(n,o),(t.preOrderCheckHooks||(t.preOrderCheckHooks=[])).push(n,o))}(t,o[t],e)}finally{null!==l&&eo(l),Yu(a),s.resolving=!1,aC()}}return i}function yC(n,e,t){return!!(t[e+(n>>5)]&1<{const e=n.prototype.constructor,t=e[Mi]||Yp(e),r=Object.prototype;let i=Object.getPrototypeOf(n.prototype).constructor;for(;i&&i!==r;){const o=i[Mi]||Yp(i);if(o&&o!==t)return o;i=Object.getPrototypeOf(i)}return o=>new o})}function Yp(n){return Rb(n)?()=>{const e=Yp(de(n));return e&&e()}:qo(n)}const zs="__parameters__";function $s(n,e,t){return to(()=>{const r=function Qp(n){return function(...t){if(n){const r=n(...t);for(const i in r)this[i]=r[i]}}}(e);function i(...o){if(this instanceof i)return r.apply(this,o),this;const s=new i(...o);return a.annotation=s,a;function a(l,c,u){const d=l.hasOwnProperty(zs)?l[zs]:Object.defineProperty(l,zs,{value:[]})[zs];for(;d.length<=u;)d.push(null);return(d[u]=d[u]||[]).push(s),l}}return t&&(i.prototype=Object.create(t.prototype)),i.prototype.ngMetadataName=n,i.annotationCls=i,i})}class G{constructor(e,t){this._desc=e,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof t?this.__NG_ELEMENT_ID__=t:void 0!==t&&(this.\u0275prov=$({token:this,providedIn:t.providedIn||"root",factory:t.factory}))}toString(){return`InjectionToken ${this._desc}`}}const lR=new G("AnalyzeForEntryComponents");function ir(n,e){void 0===e&&(e=n);for(let t=0;tArray.isArray(t)?Zr(t,e):e(t))}function CC(n,e,t){e>=n.length?n.push(t):n.splice(e,0,t)}function ed(n,e){return e>=n.length-1?n.pop():n.splice(e,1)[0]}function Ol(n,e){const t=[];for(let r=0;r=0?n[1|r]=t:(r=~r,function dR(n,e,t,r){let i=n.length;if(i==e)n.push(t,r);else if(1===i)n.push(r,n[0]),n[0]=t;else{for(i--,n.push(n[i-1],n[i]);i>e;)n[i]=n[i-2],i--;n[e]=t,n[e+1]=r}}(n,r,e,t)),r}function Xp(n,e){const t=Gs(n,e);if(t>=0)return n[1|t]}function Gs(n,e){return function wC(n,e,t){let r=0,i=n.length>>t;for(;i!==r;){const o=r+(i-r>>1),s=n[o<e?i=o:r=o+1}return~(i<({token:n})),-1),Yr=Rl($s("Optional"),8),Ks=Rl($s("SkipSelf"),4);let id,od;function Ys(n){var e;return(null===(e=function ig(){if(void 0===id&&(id=null,He.trustedTypes))try{id=He.trustedTypes.createPolicy("angular",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch(n){}return id}())||void 0===e?void 0:e.createHTML(n))||n}function NC(n){var e;return(null===(e=function og(){if(void 0===od&&(od=null,He.trustedTypes))try{od=He.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch(n){}return od}())||void 0===e?void 0:e.createHTML(n))||n}class Ko{constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see https://g.co/ng/security#xss)`}}class PR extends Ko{getTypeName(){return"HTML"}}class FR extends Ko{getTypeName(){return"Style"}}class LR extends Ko{getTypeName(){return"Script"}}class BR extends Ko{getTypeName(){return"URL"}}class jR extends Ko{getTypeName(){return"ResourceURL"}}function zn(n){return n instanceof Ko?n.changingThisBreaksApplicationSecurity:n}function Qr(n,e){const t=FC(n);if(null!=t&&t!==e){if("ResourceURL"===t&&"URL"===e)return!0;throw new Error(`Required a safe ${e}, got a ${t} (see https://g.co/ng/security#xss)`)}return t===e}function FC(n){return n instanceof Ko&&n.getTypeName()||null}class $R{constructor(e){this.inertDocumentHelper=e}getInertBodyElement(e){e=""+e;try{const t=(new window.DOMParser).parseFromString(Ys(e),"text/html").body;return null===t?this.inertDocumentHelper.getInertBodyElement(e):(t.removeChild(t.firstChild),t)}catch(t){return null}}}class GR{constructor(e){if(this.defaultDoc=e,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert"),null==this.inertDocument.body){const t=this.inertDocument.createElement("html");this.inertDocument.appendChild(t);const r=this.inertDocument.createElement("body");t.appendChild(r)}}getInertBodyElement(e){const t=this.inertDocument.createElement("template");if("content"in t)return t.innerHTML=Ys(e),t;const r=this.inertDocument.createElement("body");return r.innerHTML=Ys(e),this.defaultDoc.documentMode&&this.stripCustomNsAttrs(r),r}stripCustomNsAttrs(e){const t=e.attributes;for(let i=t.length-1;0Fl(e.trim())).join(", ")}function Jr(n){const e={};for(const t of n.split(","))e[t]=!0;return e}function Ll(...n){const e={};for(const t of n)for(const r in t)t.hasOwnProperty(r)&&(e[r]=!0);return e}const jC=Jr("area,br,col,hr,img,wbr"),VC=Jr("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),HC=Jr("rp,rt"),sg=Ll(jC,Ll(VC,Jr("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),Ll(HC,Jr("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),Ll(HC,VC)),ag=Jr("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),lg=Jr("srcset"),UC=Ll(ag,lg,Jr("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),Jr("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext")),YR=Jr("script,style,template");class QR{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(e){let t=e.firstChild,r=!0;for(;t;)if(t.nodeType===Node.ELEMENT_NODE?r=this.startElement(t):t.nodeType===Node.TEXT_NODE?this.chars(t.nodeValue):this.sanitizedSomething=!0,r&&t.firstChild)t=t.firstChild;else for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);let i=this.checkClobberedElement(t,t.nextSibling);if(i){t=i;break}t=this.checkClobberedElement(t,t.parentNode)}return this.buf.join("")}startElement(e){const t=e.nodeName.toLowerCase();if(!sg.hasOwnProperty(t))return this.sanitizedSomething=!0,!YR.hasOwnProperty(t);this.buf.push("<"),this.buf.push(t);const r=e.attributes;for(let i=0;i"),!0}endElement(e){const t=e.nodeName.toLowerCase();sg.hasOwnProperty(t)&&!jC.hasOwnProperty(t)&&(this.buf.push(""))}chars(e){this.buf.push(zC(e))}checkClobberedElement(e,t){if(t&&(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${e.outerHTML}`);return t}}const JR=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,XR=/([^\#-~ |!])/g;function zC(n){return n.replace(/&/g,"&").replace(JR,function(e){return"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";"}).replace(XR,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(//g,">")}let sd;function WC(n,e){let t=null;try{sd=sd||function LC(n){const e=new GR(n);return function qR(){try{return!!(new window.DOMParser).parseFromString(Ys(""),"text/html")}catch(n){return!1}}()?new $R(e):e}(n);let r=e?String(e):"";t=sd.getInertBodyElement(r);let i=5,o=r;do{if(0===i)throw new Error("Failed to sanitize html because the input is unstable");i--,r=o,o=t.innerHTML,t=sd.getInertBodyElement(r)}while(r!==o);return Ys((new QR).sanitizeChildren(cg(t)||t))}finally{if(t){const r=cg(t)||t;for(;r.firstChild;)r.removeChild(r.firstChild)}}}function cg(n){return"content"in n&&function eP(n){return n.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===n.nodeName}(n)?n.content:null}var Ze=(()=>((Ze=Ze||{})[Ze.NONE=0]="NONE",Ze[Ze.HTML=1]="HTML",Ze[Ze.STYLE=2]="STYLE",Ze[Ze.SCRIPT=3]="SCRIPT",Ze[Ze.URL=4]="URL",Ze[Ze.RESOURCE_URL=5]="RESOURCE_URL",Ze))();function ug(n){const e=Bl();return e?NC(e.sanitize(Ze.HTML,n)||""):Qr(n,"HTML")?NC(zn(n)):WC(Pp(),ae(n))}function so(n){const e=Bl();return e?e.sanitize(Ze.URL,n)||"":Qr(n,"URL")?zn(n):Fl(ae(n))}function Bl(){const n=T();return n&&n[12]}const qC="__ngContext__";function nn(n,e){n[qC]=e}function fg(n){const e=function jl(n){return n[qC]||null}(n);return e?Array.isArray(e)?e:e.lView:null}function pg(n){return n.ngOriginalError}function mP(n,...e){n.error(...e)}class Qs{constructor(){this._console=console}handleError(e){const t=this._findOriginalError(e),r=function gP(n){return n&&n.ngErrorLogger||mP}(e);r(this._console,"ERROR",e),t&&r(this._console,"ORIGINAL ERROR",t)}_findOriginalError(e){let t=e&&pg(e);for(;t&&pg(t);)t=pg(t);return t||null}}const JC=(()=>("undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||setTimeout).bind(He))();function Xr(n){return n instanceof Function?n():n}var Wn=(()=>((Wn=Wn||{})[Wn.Important=1]="Important",Wn[Wn.DashCase=2]="DashCase",Wn))();function mg(n,e){return undefined(n,e)}function Vl(n){const e=n[3];return wr(e)?e[3]:e}function vg(n){return rD(n[13])}function yg(n){return rD(n[4])}function rD(n){for(;null!==n&&!wr(n);)n=n[4];return n}function Xs(n,e,t,r,i){if(null!=r){let o,s=!1;wr(r)?o=r:qr(r)&&(s=!0,r=r[0]);const a=wt(r);0===n&&null!==t?null==i?cD(e,t,a):Zo(e,t,a,i||null,!0):1===n&&null!==t?Zo(e,t,a,i||null,!0):2===n?function mD(n,e,t){const r=ad(n,e);r&&function jP(n,e,t,r){dt(n)?n.removeChild(e,t,r):e.removeChild(t)}(n,r,e,t)}(e,a,s):3===n&&e.destroyNode(a),null!=o&&function UP(n,e,t,r,i){const o=t[7];o!==wt(t)&&Xs(e,n,r,o,i);for(let a=10;a0&&(n[t-1][4]=r[4]);const o=ed(n,10+e);!function OP(n,e){Hl(n,e,e[11],2,null,null),e[0]=null,e[6]=null}(r[1],r);const s=o[19];null!==s&&s.detachView(o[1]),r[3]=null,r[4]=null,r[2]&=-129}return r}function sD(n,e){if(!(256&e[2])){const t=e[11];dt(t)&&t.destroyNode&&Hl(n,e,t,3,null,null),function RP(n){let e=n[13];if(!e)return Dg(n[1],n);for(;e;){let t=null;if(qr(e))t=e[13];else{const r=e[10];r&&(t=r)}if(!t){for(;e&&!e[4]&&e!==n;)qr(e)&&Dg(e[1],e),e=e[3];null===e&&(e=n),qr(e)&&Dg(e[1],e),t=e&&e[4]}e=t}}(e)}}function Dg(n,e){if(!(256&e[2])){e[2]&=-129,e[2]|=256,function BP(n,e){let t;if(null!=n&&null!=(t=n.destroyHooks))for(let r=0;r=0?r[i=c]():r[i=-c].unsubscribe(),o+=2}else{const s=r[i=t[o+1]];t[o].call(s)}if(null!==r){for(let o=i+1;oo?"":i[d+1].toLowerCase();const h=8&r?f:null;if(h&&-1!==_D(h,c,0)||2&r&&c!==f){if(Mr(r))return!1;s=!0}}}}else{if(!s&&!Mr(r)&&!Mr(l))return!1;if(s&&Mr(l))continue;s=!1,r=l|1&r}}return Mr(r)||s}function Mr(n){return 0==(1&n)}function qP(n,e,t,r){if(null===e)return-1;let i=0;if(r||!t){let o=!1;for(;i-1)for(t++;t0?'="'+a+'"':"")+"]"}else 8&r?i+="."+s:4&r&&(i+=" "+s);else""!==i&&!Mr(s)&&(e+=ED(o,i),i=""),r=s,o=o||!Mr(r);t++}return""!==i&&(e+=ED(o,i)),e}const le={};function N(n){wD(Se(),T(),yn()+n,Hu())}function wD(n,e,t,r){if(!r)if(3==(3&e[2])){const o=n.preOrderCheckHooks;null!==o&&Gu(e,o,t)}else{const o=n.preOrderHooks;null!==o&&qu(e,o,0,t)}io(t)}function ud(n,e){return n<<17|e<<2}function Ir(n){return n>>17&32767}function Ig(n){return 2|n}function xi(n){return(131068&n)>>2}function Tg(n,e){return-131069&n|e<<2}function xg(n){return 1|n}function PD(n,e){const t=n.contentQueries;if(null!==t)for(let r=0;r20&&wD(n,e,20,Hu()),t(r,i)}finally{io(o)}}function LD(n,e,t){if(xp(e)){const i=e.directiveEnd;for(let o=e.directiveStart;o0;){const t=n[--e];if("number"==typeof t&&t<0)return t}return 0})(a)!=l&&a.push(l),a.push(r,i,s)}}function $D(n,e){null!==n.hostBindings&&n.hostBindings(1,e)}function GD(n,e){e.flags|=2,(n.components||(n.components=[])).push(e.index)}function IF(n,e,t){if(t){if(e.exportAs)for(let r=0;r0&&zg(t)}}function zg(n){for(let r=vg(n);null!==r;r=yg(r))for(let i=10;i0&&zg(o)}const t=n[1].components;if(null!==t)for(let r=0;r0&&zg(i)}}function RF(n,e){const t=Hn(e,n),r=t[1];(function PF(n,e){for(let t=e.length;tPromise.resolve(null))();function QD(n){return n[7]||(n[7]=[])}function JD(n){return n.cleanup||(n.cleanup=[])}function e0(n,e){const t=n[9],r=t?t.get(Qs,null):null;r&&r.handleError(e)}function t0(n,e,t,r,i){for(let o=0;othis.processProvider(a,e,t)),Zr([e],a=>this.processInjectorType(a,[],o)),this.records.set(Kg,ra(void 0,this));const s=this.records.get(Zg);this.scope=null!=s?s.value:null,this.source=i||("object"==typeof e?null:Fe(e))}get destroyed(){return this._destroyed}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{this.onDestroy.forEach(e=>e.ngOnDestroy())}finally{this.records.clear(),this.onDestroy.clear(),this.injectorDefTypes.clear()}}get(e,t=kl,r=ce.Default){this.assertNotDestroyed();const i=IC(this),o=eo(void 0);try{if(!(r&ce.SkipSelf)){let a=this.records.get(e);if(void 0===a){const l=function QF(n){return"function"==typeof n||"object"==typeof n&&n instanceof G}(e)&&Dp(e);a=l&&this.injectableDefInScope(l)?ra(Qg(e),Wl):null,this.records.set(e,a)}if(null!=a)return this.hydrate(e,a)}return(r&ce.Self?r0():this.parent).get(e,t=r&ce.Optional&&t===kl?null:t)}catch(s){if("NullInjectorError"===s.name){if((s[nd]=s[nd]||[]).unshift(Fe(e)),i)throw s;return function ER(n,e,t,r){const i=n[nd];throw e[MC]&&i.unshift(e[MC]),n.message=function wR(n,e,t,r=null){n=n&&"\n"===n.charAt(0)&&"\u0275"==n.charAt(1)?n.substr(2):n;let i=Fe(e);if(Array.isArray(e))i=e.map(Fe).join(" -> ");else if("object"==typeof e){let o=[];for(let s in e)if(e.hasOwnProperty(s)){let a=e[s];o.push(s+":"+("string"==typeof a?JSON.stringify(a):Fe(a)))}i=`{${o.join(", ")}}`}return`${t}${r?"("+r+")":""}[${i}]: ${n.replace(yR,"\n ")}`}("\n"+n.message,i,t,r),n.ngTokenPath=i,n[nd]=null,n}(s,e,"R3InjectorError",this.source)}throw s}finally{eo(o),IC(i)}}_resolveInjectorDefTypes(){this.injectorDefTypes.forEach(e=>this.get(e))}toString(){const e=[];return this.records.forEach((r,i)=>e.push(Fe(i))),`R3Injector[${e.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new we(205,!1)}processInjectorType(e,t,r){if(!(e=de(e)))return!1;let i=Fb(e);const o=null==i&&e.ngModule||void 0,s=void 0===o?e:o,a=-1!==r.indexOf(s);if(void 0!==o&&(i=Fb(o)),null==i)return!1;if(null!=i.imports&&!a){let u;r.push(s);try{Zr(i.imports,d=>{this.processInjectorType(d,t,r)&&(void 0===u&&(u=[]),u.push(d))})}finally{}if(void 0!==u)for(let d=0;dthis.processProvider(p,f,h||$e))}}this.injectorDefTypes.add(s);const l=qo(s)||(()=>new s);this.records.set(s,ra(l,Wl));const c=i.providers;if(null!=c&&!a){const u=e;Zr(c,d=>this.processProvider(d,u,c))}return void 0!==o&&void 0!==e.providers}processProvider(e,t,r){let i=ia(e=de(e))?e:de(e&&e.provide);const o=function $F(n,e,t){return l0(n)?ra(void 0,n.useValue):ra(a0(n),Wl)}(e);if(ia(e)||!0!==e.multi)this.records.get(i);else{let s=this.records.get(i);s||(s=ra(void 0,Wl,!0),s.factory=()=>ng(s.multi),this.records.set(i,s)),i=e,s.multi.push(e)}this.records.set(i,o)}hydrate(e,t){return t.value===Wl&&(t.value=UF,t.value=t.factory()),"object"==typeof t.value&&t.value&&function YF(n){return null!==n&&"object"==typeof n&&"function"==typeof n.ngOnDestroy}(t.value)&&this.onDestroy.add(t.value),t.value}injectableDefInScope(e){if(!e.providedIn)return!1;const t=de(e.providedIn);return"string"==typeof t?"any"===t||t===this.scope:this.injectorDefTypes.has(t)}}function Qg(n){const e=Dp(n),t=null!==e?e.factory:qo(n);if(null!==t)return t;if(n instanceof G)throw new we(204,!1);if(n instanceof Function)return function WF(n){const e=n.length;if(e>0)throw Ol(e,"?"),new we(204,!1);const t=function rN(n){const e=n&&(n[Nu]||n[Lb]);if(e){const t=function iN(n){if(n.hasOwnProperty("name"))return n.name;const e=(""+n).match(/^function\s*([^\s(]+)/);return null===e?"":e[1]}(n);return console.warn(`DEPRECATED: DI is instantiating a token "${t}" that inherits its @Injectable decorator but does not provide one itself.\nThis will become an error in a future version of Angular. Please add @Injectable() to the "${t}" class.`),e}return null}(n);return null!==t?()=>t.factory(n):()=>new n}(n);throw new we(204,!1)}function a0(n,e,t){let r;if(ia(n)){const i=de(n);return qo(i)||Qg(i)}if(l0(n))r=()=>de(n.useValue);else if(function qF(n){return!(!n||!n.useFactory)}(n))r=()=>n.useFactory(...ng(n.deps||[]));else if(function GF(n){return!(!n||!n.useExisting)}(n))r=()=>R(de(n.useExisting));else{const i=de(n&&(n.useClass||n.provide));if(!function ZF(n){return!!n.deps}(n))return qo(i)||Qg(i);r=()=>new i(...ng(n.deps))}return r}function ra(n,e,t=!1){return{factory:n,value:e,multi:t?[]:void 0}}function l0(n){return null!==n&&"object"==typeof n&&bR in n}function ia(n){return"function"==typeof n}let yt=(()=>{class n{static create(t,r){var i;if(Array.isArray(t))return o0({name:""},r,t,"");{const o=null!==(i=t.name)&&void 0!==i?i:"";return o0({name:o},t.parent,t.providers,o)}}}return n.THROW_IF_NOT_FOUND=kl,n.NULL=new n0,n.\u0275prov=$({token:n,providedIn:"any",factory:()=>R(Kg)}),n.__NG_ELEMENT_ID__=-1,n})();function oL(n,e){$u(fg(n)[1],Ot())}function xe(n){let e=function b0(n){return Object.getPrototypeOf(n.prototype).constructor}(n.type),t=!0;const r=[n];for(;e;){let i;if(Sr(n))i=e.\u0275cmp||e.\u0275dir;else{if(e.\u0275cmp)throw new we(903,"");i=e.\u0275dir}if(i){if(t){r.push(i);const s=n;s.inputs=em(n.inputs),s.declaredInputs=em(n.declaredInputs),s.outputs=em(n.outputs);const a=i.hostBindings;a&&cL(n,a);const l=i.viewQuery,c=i.contentQueries;if(l&&aL(n,l),c&&lL(n,c),_p(n.inputs,i.inputs),_p(n.declaredInputs,i.declaredInputs),_p(n.outputs,i.outputs),Sr(i)&&i.data.animation){const u=n.data;u.animation=(u.animation||[]).concat(i.data.animation)}}const o=i.features;if(o)for(let s=0;s=0;r--){const i=n[r];i.hostVars=e+=i.hostVars,i.hostAttrs=Zu(i.hostAttrs,t=Zu(t,i.hostAttrs))}}(r)}function em(n){return n===ks?{}:n===$e?[]:n}function aL(n,e){const t=n.viewQuery;n.viewQuery=t?(r,i)=>{e(r,i),t(r,i)}:e}function lL(n,e){const t=n.contentQueries;n.contentQueries=t?(r,i,o)=>{e(r,i,o),t(r,i,o)}:e}function cL(n,e){const t=n.hostBindings;n.hostBindings=t?(r,i)=>{e(r,i),t(r,i)}:e}let md=null;function oa(){if(!md){const n=He.Symbol;if(n&&n.iterator)md=n.iterator;else{const e=Object.getOwnPropertyNames(Map.prototype);for(let t=0;ta(wt(_[r.index])):r.index;if(dt(t)){let _=null;if(!a&&l&&(_=function jL(n,e,t,r){const i=n.cleanup;if(null!=i)for(let o=0;ol?a[l]:null}"string"==typeof s&&(o+=2)}return null}(n,e,i,r.index)),null!==_)(_.__ngLastListenerFn__||_).__ngNextListenerFn__=o,_.__ngLastListenerFn__=o,h=!1;else{o=cm(r,e,d,o,!1);const C=t.listen(y,i,o);f.push(o,C),u&&u.push(i,b,v,v+1)}}else o=cm(r,e,d,o,!0),y.addEventListener(i,o,s),f.push(o),u&&u.push(i,b,v,s)}else o=cm(r,e,d,o,!1);const p=r.outputs;let g;if(h&&null!==p&&(g=p[i])){const m=g.length;if(m)for(let y=0;y0;)e=e[15],n--;return e}(n,te.lFrame.contextLView))[8]}(n)}function VL(n,e){let t=null;const r=function KP(n){const e=n.attrs;if(null!=e){const t=e.indexOf(5);if(0==(1&t))return e[t+1]}return null}(n);for(let i=0;i=0}const Nt={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function eE(n){return n.substring(Nt.key,Nt.keyEnd)}function tE(n,e){const t=Nt.textEnd;return t===e?-1:(e=Nt.keyEnd=function qL(n,e,t){for(;e32;)e++;return e}(n,Nt.key=e,t),va(n,e,t))}function va(n,e,t){for(;e=0;t=tE(e,t))Un(n,eE(e),!0)}function aE(n,e){return e>=n.expandoStartIndex}function lE(n,e,t,r){const i=n.data;if(null===i[t+1]){const o=i[yn()],s=aE(n,t);fE(o,r)&&null===e&&!s&&(e=!1),e=function QL(n,e,t,r){const i=function Up(n){const e=te.lFrame.currentDirectiveIndex;return-1===e?null:n[e]}(n);let o=r?e.residualClasses:e.residualStyles;if(null===i)0===(r?e.classBindings:e.styleBindings)&&(t=Zl(t=dm(null,n,e,t,r),e.attrs,r),o=null);else{const s=e.directiveStylingLast;if(-1===s||n[s]!==i)if(t=dm(i,n,e,t,r),null===o){let l=function JL(n,e,t){const r=t?e.classBindings:e.styleBindings;if(0!==xi(r))return n[Ir(r)]}(n,e,r);void 0!==l&&Array.isArray(l)&&(l=dm(null,n,e,l[1],r),l=Zl(l,e.attrs,r),function XL(n,e,t,r){n[Ir(t?e.classBindings:e.styleBindings)]=r}(n,e,r,l))}else o=function eB(n,e,t){let r;const i=e.directiveEnd;for(let o=1+e.directiveStylingLast;o0)&&(c=!0)}else u=t;if(i)if(0!==l){const f=Ir(n[a+1]);n[r+1]=ud(f,a),0!==f&&(n[f+1]=Tg(n[f+1],r)),n[a+1]=function tF(n,e){return 131071&n|e<<17}(n[a+1],r)}else n[r+1]=ud(a,0),0!==a&&(n[a+1]=Tg(n[a+1],r)),a=r;else n[r+1]=ud(l,0),0===a?a=r:n[l+1]=Tg(n[l+1],r),l=r;c&&(n[r+1]=Ig(n[r+1])),X0(n,u,r,!0),X0(n,u,r,!1),function UL(n,e,t,r,i){const o=i?n.residualClasses:n.residualStyles;null!=o&&"string"==typeof e&&Gs(o,e)>=0&&(t[r+1]=xg(t[r+1]))}(e,u,n,r,o),s=ud(a,l),o?e.classBindings=s:e.styleBindings=s}(i,o,e,t,s,r)}}function dm(n,e,t,r,i){let o=null;const s=t.directiveEnd;let a=t.directiveStylingLast;for(-1===a?a=t.directiveStart:a++;a0;){const l=n[i],c=Array.isArray(l),u=c?l[1]:l,d=null===u;let f=t[i+1];f===le&&(f=d?$e:void 0);let h=d?Xp(f,r):u===r?f:void 0;if(c&&!bd(h)&&(h=Xp(l,r)),bd(h)&&(a=h,s))return a;const p=n[i+1];i=s?Ir(p):xi(p)}if(null!==e){let l=o?e.residualClasses:e.residualStyles;null!=l&&(a=Xp(l,r))}return a}function bd(n){return void 0!==n}function fE(n,e){return 0!=(n.flags&(e?16:32))}function Ye(n,e=""){const t=T(),r=Se(),i=n+20,o=r.firstCreatePass?ea(r,i,1,e,null):r.data[i],s=t[i]=function _g(n,e){return dt(n)?n.createText(e):n.createTextNode(e)}(t[11],e);ld(r,t,s,o),Kr(o,!1)}function An(n){return uo("",n,""),An}function uo(n,e,t){const r=T(),i=function aa(n,e,t,r){return rn(n,Bs(),t)?e+ae(t)+r:le}(r,n,e,t);return i!==le&&Ai(r,yn(),i),uo}const Qo=void 0;var EB=["en",[["a","p"],["AM","PM"],Qo],[["AM","PM"],Qo,Qo],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],Qo,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],Qo,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",Qo,"{1} 'at' {0}",Qo],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function DB(n){const t=Math.floor(Math.abs(n)),r=n.toString().replace(/^[^.]*\.?/,"").length;return 1===t&&0===r?1:5}];let ya={};function NE(n){return n in ya||(ya[n]=He.ng&&He.ng.common&&He.ng.common.locales&&He.ng.common.locales[n]),ya[n]}var L=(()=>((L=L||{})[L.LocaleId=0]="LocaleId",L[L.DayPeriodsFormat=1]="DayPeriodsFormat",L[L.DayPeriodsStandalone=2]="DayPeriodsStandalone",L[L.DaysFormat=3]="DaysFormat",L[L.DaysStandalone=4]="DaysStandalone",L[L.MonthsFormat=5]="MonthsFormat",L[L.MonthsStandalone=6]="MonthsStandalone",L[L.Eras=7]="Eras",L[L.FirstDayOfWeek=8]="FirstDayOfWeek",L[L.WeekendRange=9]="WeekendRange",L[L.DateFormat=10]="DateFormat",L[L.TimeFormat=11]="TimeFormat",L[L.DateTimeFormat=12]="DateTimeFormat",L[L.NumberSymbols=13]="NumberSymbols",L[L.NumberFormats=14]="NumberFormats",L[L.CurrencyCode=15]="CurrencyCode",L[L.CurrencySymbol=16]="CurrencySymbol",L[L.CurrencyName=17]="CurrencyName",L[L.Currencies=18]="Currencies",L[L.Directionality=19]="Directionality",L[L.PluralCase=20]="PluralCase",L[L.ExtraData=21]="ExtraData",L))();const Cd="en-US";let RE=Cd;function pm(n,e,t,r,i){if(n=de(n),Array.isArray(n))for(let o=0;o>20;if(ia(n)||!n.multi){const h=new wl(l,i,w),p=mm(a,e,i?u:u+f,d);-1===p?(Ju(Ml(c,s),o,a),gm(o,n,e.length),e.push(a),c.directiveStart++,c.directiveEnd++,i&&(c.providerIndexes+=1048576),t.push(h),s.push(h)):(t[p]=h,s[p]=h)}else{const h=mm(a,e,u+f,d),p=mm(a,e,u,u+f),g=h>=0&&t[h],m=p>=0&&t[p];if(i&&!m||!i&&!g){Ju(Ml(c,s),o,a);const y=function Dj(n,e,t,r,i){const o=new wl(n,t,w);return o.multi=[],o.index=e,o.componentProviders=0,iw(o,i,r&&!t),o}(i?Cj:bj,t.length,i,r,l);!i&&m&&(t[p].providerFactory=y),gm(o,n,e.length,0),e.push(a),c.directiveStart++,c.directiveEnd++,i&&(c.providerIndexes+=1048576),t.push(y),s.push(y)}else gm(o,n,h>-1?h:p,iw(t[i?p:h],l,!i&&r));!i&&r&&m&&t[p].componentProviders++}}}function gm(n,e,t,r){const i=ia(e),o=function KF(n){return!!n.useClass}(e);if(i||o){const l=(o?de(e.useClass):e).prototype.ngOnDestroy;if(l){const c=n.destroyHooks||(n.destroyHooks=[]);if(!i&&e.multi){const u=c.indexOf(t);-1===u?c.push(t,[r,l]):c[u+1].push(r,l)}else c.push(t,l)}}}function iw(n,e,t){return t&&n.componentProviders++,n.multi.push(e)-1}function mm(n,e,t,r){for(let i=t;i{t.providersResolver=(r,i)=>function _j(n,e,t){const r=Se();if(r.firstCreatePass){const i=Sr(n);pm(t,r.data,r.blueprint,i,!0),pm(e,r.data,r.blueprint,i,!1)}}(r,i?i(n):n,e)}}class ow{}class Sj{resolveComponentFactory(e){throw function wj(n){const e=Error(`No component factory found for ${Fe(n)}. Did you add it to @NgModule.entryComponents?`);return e.ngComponent=n,e}(e)}}let Ri=(()=>{class n{}return n.NULL=new Sj,n})();function Mj(){return ba(Ot(),T())}function ba(n,e){return new _t(rr(n,e))}let _t=(()=>{class n{constructor(t){this.nativeElement=t}}return n.__NG_ELEMENT_ID__=Mj,n})();function Ij(n){return n instanceof _t?n.nativeElement:n}class aw{}let oi=(()=>{class n{}return n.__NG_ELEMENT_ID__=()=>function xj(){const n=T(),t=Hn(Ot().index,n);return function Tj(n){return n[11]}(qr(t)?t:n)}(),n})(),Aj=(()=>{class n{}return n.\u0275prov=$({token:n,providedIn:"root",factory:()=>null}),n})();class Ca{constructor(e){this.full=e,this.major=e.split(".")[0],this.minor=e.split(".")[1],this.patch=e.split(".").slice(2).join(".")}}const Oj=new Ca("13.2.3"),ym={};function Md(n,e,t,r,i=!1){for(;null!==t;){const o=e[t.index];if(null!==o&&r.push(wt(o)),wr(o))for(let a=10;a-1&&(Cg(e,r),ed(t,r))}this._attachedToViewContainer=!1}sD(this._lView[1],this._lView)}onDestroy(e){HD(this._lView[1],this._lView,null,e)}markForCheck(){Wg(this._cdRefInjectingView||this._lView)}detach(){this._lView[2]&=-129}reattach(){this._lView[2]|=128}detectChanges(){Gg(this._lView[1],this._lView,this.context)}checkNoChanges(){!function LF(n,e,t){Uu(!0);try{Gg(n,e,t)}finally{Uu(!1)}}(this._lView[1],this._lView,this.context)}attachToViewContainerRef(){if(this._appRef)throw new we(902,"");this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function NP(n,e){Hl(n,e,e[11],2,null,null)}(this._lView[1],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new we(902,"");this._appRef=e}}class kj extends ec{constructor(e){super(e),this._view=e}detectChanges(){YD(this._view)}checkNoChanges(){!function BF(n){Uu(!0);try{YD(n)}finally{Uu(!1)}}(this._view)}get context(){return null}}class lw extends Ri{constructor(e){super(),this.ngModule=e}resolveComponentFactory(e){const t=en(e);return new _m(t,this.ngModule)}}function cw(n){const e=[];for(let t in n)n.hasOwnProperty(t)&&e.push({propName:n[t],templateName:t});return e}const Rj=new G("SCHEDULER_TOKEN",{providedIn:"root",factory:()=>JC});class _m extends ow{constructor(e,t){super(),this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=function XP(n){return n.map(JP).join(",")}(e.selectors),this.ngContentSelectors=e.ngContentSelectors?e.ngContentSelectors:[],this.isBoundToModule=!!t}get inputs(){return cw(this.componentDef.inputs)}get outputs(){return cw(this.componentDef.outputs)}create(e,t,r,i){const o=(i=i||this.ngModule)?function Pj(n,e){return{get:(t,r,i)=>{const o=n.get(t,ym,i);return o!==ym||r===ym?o:e.get(t,r,i)}}}(e,i.injector):e,s=o.get(aw,Zb),a=o.get(Aj,null),l=s.createRenderer(null,this.componentDef),c=this.componentDef.selectors[0][0]||"div",u=r?function VD(n,e,t){if(dt(n))return n.selectRootElement(e,t===Gr.ShadowDom);let r="string"==typeof e?n.querySelector(e):e;return r.textContent="",r}(l,r,this.componentDef.encapsulation):bg(s.createRenderer(null,this.componentDef),c,function Nj(n){const e=n.toLowerCase();return"svg"===e?"svg":"math"===e?"math":null}(c)),d=this.componentDef.onPush?576:528,f=function _0(n,e){return{components:[],scheduler:n||JC,clean:jF,playerHandler:e||null,flags:0}}(),h=hd(0,null,null,1,0,null,null,null,null,null),p=Ul(null,h,f,d,null,null,s,l,a,o);let g,m;zu(p);try{const y=function v0(n,e,t,r,i,o){const s=t[1];t[20]=n;const l=ea(s,20,2,"#host",null),c=l.mergedAttrs=e.hostAttrs;null!==c&&(gd(l,c,!0),null!==n&&(Ku(i,n,c),null!==l.classes&&Mg(i,n,l.classes),null!==l.styles&&yD(i,n,l.styles)));const u=r.createRenderer(n,e),d=Ul(t,BD(e),null,e.onPush?64:16,t[20],l,r,u,o||null,null);return s.firstCreatePass&&(Ju(Ml(l,t),s,e.type),GD(s,l),qD(l,t.length,1)),pd(t,d),t[20]=d}(u,this.componentDef,p,s,l);if(u)if(r)Ku(l,u,["ng-version",Oj.full]);else{const{attrs:v,classes:b}=function eF(n){const e=[],t=[];let r=1,i=2;for(;r0&&Mg(l,u,b.join(" "))}if(m=Fp(h,20),void 0!==t){const v=m.projection=[];for(let b=0;bl(s,e)),e.contentQueries){const l=Ot();e.contentQueries(1,s,l.directiveStart)}const a=Ot();return!o.firstCreatePass||null===e.hostBindings&&null===e.hostAttrs||(io(a.index),WD(t[1],a,0,a.directiveStart,a.directiveEnd,e),$D(e,s)),s}(y,this.componentDef,p,f,[oL]),zl(h,p,null)}finally{Wu()}return new Lj(this.componentType,g,ba(m,p),p,m)}}class Lj extends class Ej{}{constructor(e,t,r,i,o){super(),this.location=r,this._rootLView=i,this._tNode=o,this.instance=t,this.hostView=this.changeDetectorRef=new kj(i),this.componentType=e}get injector(){return new Hs(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}}class Pi{}class uw{}const Da=new Map;class hw extends Pi{constructor(e,t){super(),this._parent=t,this._bootstrapComponents=[],this.injector=this,this.destroyCbs=[],this.componentFactoryResolver=new lw(this);const r=Xn(e);this._bootstrapComponents=Xr(r.bootstrap),this._r3Injector=s0(e,t,[{provide:Pi,useValue:this},{provide:Ri,useValue:this.componentFactoryResolver}],Fe(e)),this._r3Injector._resolveInjectorDefTypes(),this.instance=this.get(e)}get(e,t=yt.THROW_IF_NOT_FOUND,r=ce.Default){return e===yt||e===Pi||e===Kg?this:this._r3Injector.get(e,t,r)}destroy(){const e=this._r3Injector;!e.destroyed&&e.destroy(),this.destroyCbs.forEach(t=>t()),this.destroyCbs=null}onDestroy(e){this.destroyCbs.push(e)}}class bm extends uw{constructor(e){super(),this.moduleType=e,null!==Xn(e)&&function jj(n){const e=new Set;!function t(r){const i=Xn(r,!0),o=i.id;null!==o&&(function dw(n,e,t){if(e&&e!==t)throw new Error(`Duplicate module registered for ${n} - ${Fe(e)} vs ${Fe(e.name)}`)}(o,Da.get(o),r),Da.set(o,r));const s=Xr(i.imports);for(const a of s)e.has(a)||(e.add(a),t(a))}(n)}(e)}create(e){return new hw(this.moduleType,e)}}function Or(n,e,t,r){return gw(T(),vn(),n,e,t,r)}function Cm(n,e,t,r,i){return function mw(n,e,t,r,i,o,s){const a=e+t;return Yo(n,a,i,o)?ti(n,a+2,s?r.call(s,i,o):r(i,o)):tc(n,a+2)}(T(),vn(),n,e,t,r,i)}function tc(n,e){const t=n[e];return t===le?void 0:t}function gw(n,e,t,r,i,o){const s=e+t;return rn(n,s,i)?ti(n,s+1,o?r.call(o,i):r(i)):tc(n,s+1)}function vw(n,e,t,r,i,o,s,a){const l=e+t;return function vd(n,e,t,r,i){const o=Yo(n,e,t,r);return rn(n,e+2,i)||o}(n,l,i,o,s)?ti(n,l+3,a?r.call(a,i,o,s):r(i,o,s)):tc(n,l+3)}function Id(n,e){const t=Se();let r;const i=n+20;t.firstCreatePass?(r=function qj(n,e){if(e)for(let t=e.length-1;t>=0;t--){const r=e[t];if(n===r.name)return r}}(e,t.pipeRegistry),t.data[i]=r,r.onDestroy&&(t.destroyHooks||(t.destroyHooks=[])).push(i,r.onDestroy)):r=t.data[i];const o=r.factory||(r.factory=qo(r.type)),s=eo(w);try{const a=Yu(!1),l=o();return Yu(a),function vL(n,e,t,r){t>=n.data.length&&(n.data[t]=null,n.blueprint[t]=null),e[t]=r}(t,T(),i,l),l}finally{eo(s)}}function Dm(n,e,t){const r=n+20,i=T(),o=Ls(i,r);return nc(i,r)?gw(i,vn(),e,o.transform,t,o):o.transform(t)}function nc(n,e){return n[1].data[e].pure}function Em(n){return e=>{setTimeout(n,void 0,e)}}const Ae=class Qj extends Me{constructor(e=!1){super(),this.__isAsync=e}emit(e){super.next(e)}subscribe(e,t,r){var i,o,s;let a=e,l=t||(()=>null),c=r;if(e&&"object"==typeof e){const d=e;a=null===(i=d.next)||void 0===i?void 0:i.bind(d),l=null===(o=d.error)||void 0===o?void 0:o.bind(d),c=null===(s=d.complete)||void 0===s?void 0:s.bind(d)}this.__isAsync&&(l=Em(l),a&&(a=Em(a)),c&&(c=Em(c)));const u=super.subscribe({next:a,error:l,complete:c});return e instanceof ke&&e.add(u),u}};function Jj(){return this._results[oa()]()}class rc{constructor(e=!1){this._emitDistinctChangesOnly=e,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;const t=oa(),r=rc.prototype;r[t]||(r[t]=Jj)}get changes(){return this._changes||(this._changes=new Ae)}get(e){return this._results[e]}map(e){return this._results.map(e)}filter(e){return this._results.filter(e)}find(e){return this._results.find(e)}reduce(e,t){return this._results.reduce(e,t)}forEach(e){this._results.forEach(e)}some(e){return this._results.some(e)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(e,t){const r=this;r.dirty=!1;const i=ir(e);(this._changesDetected=!function cR(n,e,t){if(n.length!==e.length)return!1;for(let r=0;r{class n{}return n.__NG_ELEMENT_ID__=tV,n})();const Xj=si,eV=class extends Xj{constructor(e,t,r){super(),this._declarationLView=e,this._declarationTContainer=t,this.elementRef=r}createEmbeddedView(e){const t=this._declarationTContainer.tViews,r=Ul(this._declarationLView,t,e,16,null,t.declTNode,null,null,null,null);r[17]=this._declarationLView[this._declarationTContainer.index];const o=this._declarationLView[19];return null!==o&&(r[19]=o.createEmbeddedView(t)),zl(t,r,e),new ec(r)}};function tV(){return Td(Ot(),T())}function Td(n,e){return 4&n.type?new eV(e,n,ba(n,e)):null}let sr=(()=>{class n{}return n.__NG_ELEMENT_ID__=nV,n})();function nV(){return Ew(Ot(),T())}const rV=sr,Cw=class extends rV{constructor(e,t,r){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=r}get element(){return ba(this._hostTNode,this._hostLView)}get injector(){return new Hs(this._hostTNode,this._hostLView)}get parentInjector(){const e=Qu(this._hostTNode,this._hostLView);if(dC(e)){const t=Vs(e,this._hostLView),r=js(e);return new Hs(t[1].data[r+8],t)}return new Hs(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){const t=Dw(this._lContainer);return null!==t&&t[e]||null}get length(){return this._lContainer.length-10}createEmbeddedView(e,t,r){const i=e.createEmbeddedView(t||{});return this.insert(i,r),i}createComponent(e,t,r,i,o){const s=e&&!function Al(n){return"function"==typeof n}(e);let a;if(s)a=t;else{const d=t||{};a=d.index,r=d.injector,i=d.projectableNodes,o=d.ngModuleRef}const l=s?e:new _m(en(e)),c=r||this.parentInjector;if(!o&&null==l.ngModule){const f=(s?c:this.parentInjector).get(Pi,null);f&&(o=f)}const u=l.create(c,i,void 0,o);return this.insert(u.hostView,a),u}insert(e,t){const r=e._lView,i=r[1];if(function AN(n){return wr(n[3])}(r)){const u=this.indexOf(e);if(-1!==u)this.detach(u);else{const d=r[3],f=new Cw(d,d[6],d[3]);f.detach(f.indexOf(e))}}const o=this._adjustIndex(t),s=this._lContainer;!function PP(n,e,t,r){const i=10+r,o=t.length;r>0&&(t[i-1][4]=e),r0)r.push(s[a/2]);else{const c=o[a+1],u=e[-l];for(let d=10;d{class n{constructor(t){this.appInits=t,this.resolve=kd,this.reject=kd,this.initialized=!1,this.done=!1,this.donePromise=new Promise((r,i)=>{this.resolve=r,this.reject=i})}runInitializers(){if(this.initialized)return;const t=[],r=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let i=0;i{o.subscribe({complete:a,error:l})});t.push(s)}}Promise.all(t).then(()=>{r()}).catch(i=>{this.reject(i)}),0===t.length&&r(),this.initialized=!0}}return n.\u0275fac=function(t){return new(t||n)(R(Nd,8))},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})();const oc=new G("AppId"),xV={provide:oc,useFactory:function TV(){return`${Pm()}${Pm()}${Pm()}`},deps:[]};function Pm(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const $w=new G("Platform Initializer"),sc=new G("Platform ID"),Gw=new G("appBootstrapListener");let qw=(()=>{class n{log(t){console.log(t)}warn(t){console.warn(t)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})();const fo=new G("LocaleId"),Kw=new G("DefaultCurrencyCode");class AV{constructor(e,t){this.ngModuleFactory=e,this.componentFactories=t}}let Rd=(()=>{class n{compileModuleSync(t){return new bm(t)}compileModuleAsync(t){return Promise.resolve(this.compileModuleSync(t))}compileModuleAndAllComponentsSync(t){const r=this.compileModuleSync(t),o=Xr(Xn(t).declarations).reduce((s,a)=>{const l=en(a);return l&&s.push(new _m(l)),s},[]);return new AV(r,o)}compileModuleAndAllComponentsAsync(t){return Promise.resolve(this.compileModuleAndAllComponentsSync(t))}clearCache(){}clearCacheFor(t){}getModuleId(t){}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})();const kV=(()=>Promise.resolve(0))();function Fm(n){"undefined"==typeof Zone?kV.then(()=>{n&&n.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",n)}class ot{constructor({enableLongStackTrace:e=!1,shouldCoalesceEventChangeDetection:t=!1,shouldCoalesceRunChangeDetection:r=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new Ae(!1),this.onMicrotaskEmpty=new Ae(!1),this.onStable=new Ae(!1),this.onError=new Ae(!1),"undefined"==typeof Zone)throw new Error("In this configuration Angular requires Zone.js");Zone.assertZonePatched();const i=this;i._nesting=0,i._outer=i._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(i._inner=i._inner.fork(new Zone.TaskTrackingZoneSpec)),e&&Zone.longStackTraceZoneSpec&&(i._inner=i._inner.fork(Zone.longStackTraceZoneSpec)),i.shouldCoalesceEventChangeDetection=!r&&t,i.shouldCoalesceRunChangeDetection=r,i.lastRequestAnimationFrameId=-1,i.nativeRequestAnimationFrame=function NV(){let n=He.requestAnimationFrame,e=He.cancelAnimationFrame;if("undefined"!=typeof Zone&&n&&e){const t=n[Zone.__symbol__("OriginalDelegate")];t&&(n=t);const r=e[Zone.__symbol__("OriginalDelegate")];r&&(e=r)}return{nativeRequestAnimationFrame:n,nativeCancelAnimationFrame:e}}().nativeRequestAnimationFrame,function FV(n){const e=()=>{!function PV(n){n.isCheckStableRunning||-1!==n.lastRequestAnimationFrameId||(n.lastRequestAnimationFrameId=n.nativeRequestAnimationFrame.call(He,()=>{n.fakeTopEventTask||(n.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{n.lastRequestAnimationFrameId=-1,Bm(n),n.isCheckStableRunning=!0,Lm(n),n.isCheckStableRunning=!1},void 0,()=>{},()=>{})),n.fakeTopEventTask.invoke()}),Bm(n))}(n)};n._inner=n._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(t,r,i,o,s,a)=>{try{return Zw(n),t.invokeTask(i,o,s,a)}finally{(n.shouldCoalesceEventChangeDetection&&"eventTask"===o.type||n.shouldCoalesceRunChangeDetection)&&e(),Yw(n)}},onInvoke:(t,r,i,o,s,a,l)=>{try{return Zw(n),t.invoke(i,o,s,a,l)}finally{n.shouldCoalesceRunChangeDetection&&e(),Yw(n)}},onHasTask:(t,r,i,o)=>{t.hasTask(i,o),r===i&&("microTask"==o.change?(n._hasPendingMicrotasks=o.microTask,Bm(n),Lm(n)):"macroTask"==o.change&&(n.hasPendingMacrotasks=o.macroTask))},onHandleError:(t,r,i,o)=>(t.handleError(i,o),n.runOutsideAngular(()=>n.onError.emit(o)),!1)})}(i)}static isInAngularZone(){return"undefined"!=typeof Zone&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!ot.isInAngularZone())throw new Error("Expected to be in Angular Zone, but it is not!")}static assertNotInAngularZone(){if(ot.isInAngularZone())throw new Error("Expected to not be in Angular Zone, but it is!")}run(e,t,r){return this._inner.run(e,t,r)}runTask(e,t,r,i){const o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+i,e,RV,kd,kd);try{return o.runTask(s,t,r)}finally{o.cancelTask(s)}}runGuarded(e,t,r){return this._inner.runGuarded(e,t,r)}runOutsideAngular(e){return this._outer.run(e)}}const RV={};function Lm(n){if(0==n._nesting&&!n.hasPendingMicrotasks&&!n.isStable)try{n._nesting++,n.onMicrotaskEmpty.emit(null)}finally{if(n._nesting--,!n.hasPendingMicrotasks)try{n.runOutsideAngular(()=>n.onStable.emit(null))}finally{n.isStable=!0}}}function Bm(n){n.hasPendingMicrotasks=!!(n._hasPendingMicrotasks||(n.shouldCoalesceEventChangeDetection||n.shouldCoalesceRunChangeDetection)&&-1!==n.lastRequestAnimationFrameId)}function Zw(n){n._nesting++,n.isStable&&(n.isStable=!1,n.onUnstable.emit(null))}function Yw(n){n._nesting--,Lm(n)}class LV{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new Ae,this.onMicrotaskEmpty=new Ae,this.onStable=new Ae,this.onError=new Ae}run(e,t,r){return e.apply(t,r)}runGuarded(e,t,r){return e.apply(t,r)}runOutsideAngular(e){return e()}runTask(e,t,r,i){return e.apply(t,r)}}let jm=(()=>{class n{constructor(t){this._ngZone=t,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,this._watchAngularEvents(),t.run(()=>{this.taskTrackingZone="undefined"==typeof Zone?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{ot.assertNotInAngularZone(),Fm(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())Fm(()=>{for(;0!==this._callbacks.length;){let t=this._callbacks.pop();clearTimeout(t.timeoutId),t.doneCb(this._didWork)}this._didWork=!1});else{let t=this.getPendingTasks();this._callbacks=this._callbacks.filter(r=>!r.updateCb||!r.updateCb(t)||(clearTimeout(r.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(t=>({source:t.source,creationLocation:t.creationLocation,data:t.data})):[]}addCallback(t,r,i){let o=-1;r&&r>0&&(o=setTimeout(()=>{this._callbacks=this._callbacks.filter(s=>s.timeoutId!==o),t(this._didWork,this.getPendingTasks())},r)),this._callbacks.push({doneCb:t,timeoutId:o,updateCb:i})}whenStable(t,r,i){if(i&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(t,r,i),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}findProviders(t,r,i){return[]}}return n.\u0275fac=function(t){return new(t||n)(R(ot))},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})(),Qw=(()=>{class n{constructor(){this._applications=new Map,Vm.addToWindow(this)}registerApplication(t,r){this._applications.set(t,r)}unregisterApplication(t){this._applications.delete(t)}unregisterAllApplications(){this._applications.clear()}getTestability(t){return this._applications.get(t)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(t,r=!0){return Vm.findTestabilityInTree(this,t,r)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})();class BV{addToWindow(e){}findTestabilityInTree(e,t,r){return null}}let kr,Vm=new BV;const Jw=new G("AllowMultipleToken");class Xw{constructor(e,t){this.name=e,this.token=t}}function eS(n,e,t=[]){const r=`Platform: ${e}`,i=new G(r);return(o=[])=>{let s=tS();if(!s||s.injector.get(Jw,!1))if(n)n(t.concat(o).concat({provide:i,useValue:!0}));else{const a=t.concat(o).concat({provide:i,useValue:!0},{provide:Zg,useValue:"platform"});!function UV(n){if(kr&&!kr.destroyed&&!kr.injector.get(Jw,!1))throw new we(400,"");kr=n.get(nS);const e=n.get($w,null);e&&e.forEach(t=>t())}(yt.create({providers:a,name:r}))}return function zV(n){const e=tS();if(!e)throw new we(401,"");return e}()}}function tS(){return kr&&!kr.destroyed?kr:null}let nS=(()=>{class n{constructor(t){this._injector=t,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(t,r){const a=function WV(n,e){let t;return t="noop"===n?new LV:("zone.js"===n?void 0:n)||new ot({enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!!(null==e?void 0:e.ngZoneEventCoalescing),shouldCoalesceRunChangeDetection:!!(null==e?void 0:e.ngZoneRunCoalescing)}),t}(r?r.ngZone:void 0,{ngZoneEventCoalescing:r&&r.ngZoneEventCoalescing||!1,ngZoneRunCoalescing:r&&r.ngZoneRunCoalescing||!1}),l=[{provide:ot,useValue:a}];return a.run(()=>{const c=yt.create({providers:l,parent:this.injector,name:t.moduleType.name}),u=t.create(c),d=u.injector.get(Qs,null);if(!d)throw new we(402,"");return a.runOutsideAngular(()=>{const f=a.onError.subscribe({next:h=>{d.handleError(h)}});u.onDestroy(()=>{Hm(this._modules,u),f.unsubscribe()})}),function $V(n,e,t){try{const r=t();return ql(r)?r.catch(i=>{throw e.runOutsideAngular(()=>n.handleError(i)),i}):r}catch(r){throw e.runOutsideAngular(()=>n.handleError(r)),r}}(d,a,()=>{const f=u.injector.get(wa);return f.runInitializers(),f.donePromise.then(()=>(function TB(n){jn(n,"Expected localeId to be defined"),"string"==typeof n&&(RE=n.toLowerCase().replace(/_/g,"-"))}(u.injector.get(fo,Cd)||Cd),this._moduleDoBootstrap(u),u))})})}bootstrapModule(t,r=[]){const i=rS({},r);return function VV(n,e,t){const r=new bm(t);return Promise.resolve(r)}(0,0,t).then(o=>this.bootstrapModuleFactory(o,i))}_moduleDoBootstrap(t){const r=t.injector.get(Xo);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(i=>r.bootstrap(i));else{if(!t.instance.ngDoBootstrap)throw new we(403,"");t.instance.ngDoBootstrap(r)}this._modules.push(t)}onDestroy(t){this._destroyListeners.push(t)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new we(404,"");this._modules.slice().forEach(t=>t.destroy()),this._destroyListeners.forEach(t=>t()),this._destroyed=!0}get destroyed(){return this._destroyed}}return n.\u0275fac=function(t){return new(t||n)(R(yt))},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})();function rS(n,e){return Array.isArray(e)?e.reduce(rS,n):Object.assign(Object.assign({},n),e)}let Xo=(()=>{class n{constructor(t,r,i,o,s){this._zone=t,this._injector=r,this._exceptionHandler=i,this._componentFactoryResolver=o,this._initStatus=s,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const a=new Ne(c=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{c.next(this._stable),c.complete()})}),l=new Ne(c=>{let u;this._zone.runOutsideAngular(()=>{u=this._zone.onStable.subscribe(()=>{ot.assertNotInAngularZone(),Fm(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,c.next(!0))})})});const d=this._zone.onUnstable.subscribe(()=>{ot.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{c.next(!1)}))});return()=>{u.unsubscribe(),d.unsubscribe()}});this.isStable=vp(a,l.pipe(function Q1(){return n=>yp()(function K1(n,e){return function(r){let i;if(i="function"==typeof n?n:function(){return n},"function"==typeof e)return r.lift(new Z1(i,e));const o=Object.create(r,$1);return o.source=r,o.subjectFactory=i,o}}(Y1)(n))}()))}bootstrap(t,r){if(!this._initStatus.done)throw new we(405,"");let i;i=t instanceof ow?t:this._componentFactoryResolver.resolveComponentFactory(t),this.componentTypes.push(i.componentType);const o=function HV(n){return n.isBoundToModule}(i)?void 0:this._injector.get(Pi),a=i.create(yt.NULL,[],r||i.selector,o),l=a.location.nativeElement,c=a.injector.get(jm,null),u=c&&a.injector.get(Qw);return c&&u&&u.registerApplication(l,c),a.onDestroy(()=>{this.detachView(a.hostView),Hm(this.components,a),u&&u.unregisterApplication(l)}),this._loadComponent(a),a}tick(){if(this._runningTick)throw new we(101,"");try{this._runningTick=!0;for(let t of this._views)t.detectChanges()}catch(t){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(t))}finally{this._runningTick=!1}}attachView(t){const r=t;this._views.push(r),r.attachToAppRef(this)}detachView(t){const r=t;Hm(this._views,r),r.detachFromAppRef()}_loadComponent(t){this.attachView(t.hostView),this.tick(),this.components.push(t),this._injector.get(Gw,[]).concat(this._bootstrapListeners).forEach(i=>i(t))}ngOnDestroy(){this._views.slice().forEach(t=>t.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}get viewCount(){return this._views.length}}return n.\u0275fac=function(t){return new(t||n)(R(ot),R(yt),R(Qs),R(Ri),R(wa))},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})();function Hm(n,e){const t=n.indexOf(e);t>-1&&n.splice(t,1)}let oS=!0,es=(()=>{class n{}return n.__NG_ELEMENT_ID__=KV,n})();function KV(n){return function ZV(n,e,t){if(Bu(n)&&!t){const r=Hn(n.index,e);return new ec(r,r)}return 47&n.type?new ec(e[16],e):null}(Ot(),T(),16==(16&n))}class uS{constructor(){}supports(e){return $l(e)}create(e){return new t2(e)}}const e2=(n,e)=>e;class t2{constructor(e){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=e||e2}forEachItem(e){let t;for(t=this._itHead;null!==t;t=t._next)e(t)}forEachOperation(e){let t=this._itHead,r=this._removalsHead,i=0,o=null;for(;t||r;){const s=!r||t&&t.currentIndex{s=this._trackByFn(i,a),null!==t&&Object.is(t.trackById,s)?(r&&(t=this._verifyReinsertion(t,a,s,i)),Object.is(t.item,a)||this._addIdentityChange(t,a)):(t=this._mismatch(t,a,s,i),r=!0),t=t._next,i++}),this.length=i;return this._truncate(t),this.collection=e,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let e;for(e=this._previousItHead=this._itHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._additionsHead;null!==e;e=e._nextAdded)e.previousIndex=e.currentIndex;for(this._additionsHead=this._additionsTail=null,e=this._movesHead;null!==e;e=e._nextMoved)e.previousIndex=e.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(e,t,r,i){let o;return null===e?o=this._itTail:(o=e._prev,this._remove(e)),null!==(e=null===this._unlinkedRecords?null:this._unlinkedRecords.get(r,null))?(Object.is(e.item,t)||this._addIdentityChange(e,t),this._reinsertAfter(e,o,i)):null!==(e=null===this._linkedRecords?null:this._linkedRecords.get(r,i))?(Object.is(e.item,t)||this._addIdentityChange(e,t),this._moveAfter(e,o,i)):e=this._addAfter(new n2(t,r),o,i),e}_verifyReinsertion(e,t,r,i){let o=null===this._unlinkedRecords?null:this._unlinkedRecords.get(r,null);return null!==o?e=this._reinsertAfter(o,e._prev,i):e.currentIndex!=i&&(e.currentIndex=i,this._addToMoves(e,i)),e}_truncate(e){for(;null!==e;){const t=e._next;this._addToRemovals(this._unlink(e)),e=t}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(e,t,r){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(e);const i=e._prevRemoved,o=e._nextRemoved;return null===i?this._removalsHead=o:i._nextRemoved=o,null===o?this._removalsTail=i:o._prevRemoved=i,this._insertAfter(e,t,r),this._addToMoves(e,r),e}_moveAfter(e,t,r){return this._unlink(e),this._insertAfter(e,t,r),this._addToMoves(e,r),e}_addAfter(e,t,r){return this._insertAfter(e,t,r),this._additionsTail=null===this._additionsTail?this._additionsHead=e:this._additionsTail._nextAdded=e,e}_insertAfter(e,t,r){const i=null===t?this._itHead:t._next;return e._next=i,e._prev=t,null===i?this._itTail=e:i._prev=e,null===t?this._itHead=e:t._next=e,null===this._linkedRecords&&(this._linkedRecords=new dS),this._linkedRecords.put(e),e.currentIndex=r,e}_remove(e){return this._addToRemovals(this._unlink(e))}_unlink(e){null!==this._linkedRecords&&this._linkedRecords.remove(e);const t=e._prev,r=e._next;return null===t?this._itHead=r:t._next=r,null===r?this._itTail=t:r._prev=t,e}_addToMoves(e,t){return e.previousIndex===t||(this._movesTail=null===this._movesTail?this._movesHead=e:this._movesTail._nextMoved=e),e}_addToRemovals(e){return null===this._unlinkedRecords&&(this._unlinkedRecords=new dS),this._unlinkedRecords.put(e),e.currentIndex=null,e._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=e,e._prevRemoved=null):(e._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=e),e}_addIdentityChange(e,t){return e.item=t,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=e:this._identityChangesTail._nextIdentityChange=e,e}}class n2{constructor(e,t){this.item=e,this.trackById=t,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class r2{constructor(){this._head=null,this._tail=null}add(e){null===this._head?(this._head=this._tail=e,e._nextDup=null,e._prevDup=null):(this._tail._nextDup=e,e._prevDup=this._tail,e._nextDup=null,this._tail=e)}get(e,t){let r;for(r=this._head;null!==r;r=r._nextDup)if((null===t||t<=r.currentIndex)&&Object.is(r.trackById,e))return r;return null}remove(e){const t=e._prevDup,r=e._nextDup;return null===t?this._head=r:t._nextDup=r,null===r?this._tail=t:r._prevDup=t,null===this._head}}class dS{constructor(){this.map=new Map}put(e){const t=e.trackById;let r=this.map.get(t);r||(r=new r2,this.map.set(t,r)),r.add(e)}get(e,t){const i=this.map.get(e);return i?i.get(e,t):null}remove(e){const t=e.trackById;return this.map.get(t).remove(e)&&this.map.delete(t),e}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function fS(n,e,t){const r=n.previousIndex;if(null===r)return r;let i=0;return t&&r{if(t&&t.key===i)this._maybeAddToChanges(t,r),this._appendAfter=t,t=t._next;else{const o=this._getOrCreateRecordForKey(i,r);t=this._insertBeforeOrAppend(t,o)}}),t){t._prev&&(t._prev._next=null),this._removalsHead=t;for(let r=t;null!==r;r=r._nextRemoved)r===this._mapHead&&(this._mapHead=null),this._records.delete(r.key),r._nextRemoved=r._next,r.previousValue=r.currentValue,r.currentValue=null,r._prev=null,r._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(e,t){if(e){const r=e._prev;return t._next=e,t._prev=r,e._prev=t,r&&(r._next=t),e===this._mapHead&&(this._mapHead=t),this._appendAfter=e,e}return this._appendAfter?(this._appendAfter._next=t,t._prev=this._appendAfter):this._mapHead=t,this._appendAfter=t,null}_getOrCreateRecordForKey(e,t){if(this._records.has(e)){const i=this._records.get(e);this._maybeAddToChanges(i,t);const o=i._prev,s=i._next;return o&&(o._next=s),s&&(s._prev=o),i._next=null,i._prev=null,i}const r=new s2(e);return this._records.set(e,r),r.currentValue=t,this._addToAdditions(r),r}_reset(){if(this.isDirty){let e;for(this._previousMapHead=this._mapHead,e=this._previousMapHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._changesHead;null!==e;e=e._nextChanged)e.previousValue=e.currentValue;for(e=this._additionsHead;null!=e;e=e._nextAdded)e.previousValue=e.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(e,t){Object.is(t,e.currentValue)||(e.previousValue=e.currentValue,e.currentValue=t,this._addToChanges(e))}_addToAdditions(e){null===this._additionsHead?this._additionsHead=this._additionsTail=e:(this._additionsTail._nextAdded=e,this._additionsTail=e)}_addToChanges(e){null===this._changesHead?this._changesHead=this._changesTail=e:(this._changesTail._nextChanged=e,this._changesTail=e)}_forEach(e,t){e instanceof Map?e.forEach(t):Object.keys(e).forEach(r=>t(e[r],r))}}class s2{constructor(e){this.key=e,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}function pS(){return new ac([new uS])}let ac=(()=>{class n{constructor(t){this.factories=t}static create(t,r){if(null!=r){const i=r.factories.slice();t=t.concat(i)}return new n(t)}static extend(t){return{provide:n,useFactory:r=>n.create(t,r||pS()),deps:[[n,new Ks,new Yr]]}}find(t){const r=this.factories.find(i=>i.supports(t));if(null!=r)return r;throw new we(901,"")}}return n.\u0275prov=$({token:n,providedIn:"root",factory:pS}),n})();function gS(){return new Sa([new hS])}let Sa=(()=>{class n{constructor(t){this.factories=t}static create(t,r){if(r){const i=r.factories.slice();t=t.concat(i)}return new n(t)}static extend(t){return{provide:n,useFactory:r=>n.create(t,r||gS()),deps:[[n,new Ks,new Yr]]}}find(t){const r=this.factories.find(o=>o.supports(t));if(r)return r;throw new we(901,"")}}return n.\u0275prov=$({token:n,providedIn:"root",factory:gS}),n})();const a2=[new hS],c2=new ac([new uS]),u2=new Sa(a2),d2=eS(null,"core",[{provide:sc,useValue:"unknown"},{provide:nS,deps:[yt]},{provide:Qw,deps:[]},{provide:qw,deps:[]}]),m2=[{provide:Xo,useClass:Xo,deps:[ot,yt,Qs,Ri,wa]},{provide:Rj,deps:[ot],useFactory:function v2(n){let e=[];return n.onStable.subscribe(()=>{for(;e.length;)e.pop()()}),function(t){e.push(t)}}},{provide:wa,useClass:wa,deps:[[new Yr,Nd]]},{provide:Rd,useClass:Rd,deps:[]},xV,{provide:ac,useFactory:function f2(){return c2},deps:[]},{provide:Sa,useFactory:function h2(){return u2},deps:[]},{provide:fo,useFactory:function p2(n){return n||function g2(){return"undefined"!=typeof $localize&&$localize.locale||Cd}()},deps:[[new qs(fo),new Yr,new Ks]]},{provide:Kw,useValue:"USD"}];let y2=(()=>{class n{constructor(t){}}return n.\u0275fac=function(t){return new(t||n)(R(Xo))},n.\u0275mod=ut({type:n}),n.\u0275inj=at({providers:m2}),n})(),Ld=null;function li(){return Ld}const Vt=new G("DocumentToken");let ns=(()=>{class n{historyGo(t){throw new Error("Not implemented")}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:function(){return function D2(){return R(mS)}()},providedIn:"platform"}),n})();const E2=new G("Location Initialized");let mS=(()=>{class n extends ns{constructor(t){super(),this._doc=t,this._init()}_init(){this.location=window.location,this._history=window.history}getBaseHrefFromDOM(){return li().getBaseHref(this._doc)}onPopState(t){const r=li().getGlobalEventTarget(this._doc,"window");return r.addEventListener("popstate",t,!1),()=>r.removeEventListener("popstate",t)}onHashChange(t){const r=li().getGlobalEventTarget(this._doc,"window");return r.addEventListener("hashchange",t,!1),()=>r.removeEventListener("hashchange",t)}get href(){return this.location.href}get protocol(){return this.location.protocol}get hostname(){return this.location.hostname}get port(){return this.location.port}get pathname(){return this.location.pathname}get search(){return this.location.search}get hash(){return this.location.hash}set pathname(t){this.location.pathname=t}pushState(t,r,i){vS()?this._history.pushState(t,r,i):this.location.hash=i}replaceState(t,r,i){vS()?this._history.replaceState(t,r,i):this.location.hash=i}forward(){this._history.forward()}back(){this._history.back()}historyGo(t=0){this._history.go(t)}getState(){return this._history.state}}return n.\u0275fac=function(t){return new(t||n)(R(Vt))},n.\u0275prov=$({token:n,factory:function(){return function w2(){return new mS(R(Vt))}()},providedIn:"platform"}),n})();function vS(){return!!window.history.pushState}function Gm(n,e){if(0==n.length)return e;if(0==e.length)return n;let t=0;return n.endsWith("/")&&t++,e.startsWith("/")&&t++,2==t?n+e.substring(1):1==t?n+e:n+"/"+e}function yS(n){const e=n.match(/#|\?|$/),t=e&&e.index||n.length;return n.slice(0,t-("/"===n[t-1]?1:0))+n.slice(t)}function Fi(n){return n&&"?"!==n[0]?"?"+n:n}let Ma=(()=>{class n{historyGo(t){throw new Error("Not implemented")}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:function(){return function S2(n){const e=R(Vt).location;return new _S(R(ns),e&&e.origin||"")}()},providedIn:"root"}),n})();const qm=new G("appBaseHref");let _S=(()=>{class n extends Ma{constructor(t,r){if(super(),this._platformLocation=t,this._removeListenerFns=[],null==r&&(r=this._platformLocation.getBaseHrefFromDOM()),null==r)throw new Error("No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.");this._baseHref=r}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(t){this._removeListenerFns.push(this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t))}getBaseHref(){return this._baseHref}prepareExternalUrl(t){return Gm(this._baseHref,t)}path(t=!1){const r=this._platformLocation.pathname+Fi(this._platformLocation.search),i=this._platformLocation.hash;return i&&t?`${r}${i}`:r}pushState(t,r,i,o){const s=this.prepareExternalUrl(i+Fi(o));this._platformLocation.pushState(t,r,s)}replaceState(t,r,i,o){const s=this.prepareExternalUrl(i+Fi(o));this._platformLocation.replaceState(t,r,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}historyGo(t=0){var r,i;null===(i=(r=this._platformLocation).historyGo)||void 0===i||i.call(r,t)}}return n.\u0275fac=function(t){return new(t||n)(R(ns),R(qm,8))},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})(),M2=(()=>{class n extends Ma{constructor(t,r){super(),this._platformLocation=t,this._baseHref="",this._removeListenerFns=[],null!=r&&(this._baseHref=r)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(t){this._removeListenerFns.push(this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t))}getBaseHref(){return this._baseHref}path(t=!1){let r=this._platformLocation.hash;return null==r&&(r="#"),r.length>0?r.substring(1):r}prepareExternalUrl(t){const r=Gm(this._baseHref,t);return r.length>0?"#"+r:r}pushState(t,r,i,o){let s=this.prepareExternalUrl(i+Fi(o));0==s.length&&(s=this._platformLocation.pathname),this._platformLocation.pushState(t,r,s)}replaceState(t,r,i,o){let s=this.prepareExternalUrl(i+Fi(o));0==s.length&&(s=this._platformLocation.pathname),this._platformLocation.replaceState(t,r,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}historyGo(t=0){var r,i;null===(i=(r=this._platformLocation).historyGo)||void 0===i||i.call(r,t)}}return n.\u0275fac=function(t){return new(t||n)(R(ns),R(qm,8))},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})(),Km=(()=>{class n{constructor(t,r){this._subject=new Ae,this._urlChangeListeners=[],this._platformStrategy=t;const i=this._platformStrategy.getBaseHref();this._platformLocation=r,this._baseHref=yS(bS(i)),this._platformStrategy.onPopState(o=>{this._subject.emit({url:this.path(!0),pop:!0,state:o.state,type:o.type})})}path(t=!1){return this.normalize(this._platformStrategy.path(t))}getState(){return this._platformLocation.getState()}isCurrentPathEqualTo(t,r=""){return this.path()==this.normalize(t+Fi(r))}normalize(t){return n.stripTrailingSlash(function T2(n,e){return n&&e.startsWith(n)?e.substring(n.length):e}(this._baseHref,bS(t)))}prepareExternalUrl(t){return t&&"/"!==t[0]&&(t="/"+t),this._platformStrategy.prepareExternalUrl(t)}go(t,r="",i=null){this._platformStrategy.pushState(i,"",t,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+Fi(r)),i)}replaceState(t,r="",i=null){this._platformStrategy.replaceState(i,"",t,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+Fi(r)),i)}forward(){this._platformStrategy.forward()}back(){this._platformStrategy.back()}historyGo(t=0){var r,i;null===(i=(r=this._platformStrategy).historyGo)||void 0===i||i.call(r,t)}onUrlChange(t){this._urlChangeListeners.push(t),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(r=>{this._notifyUrlChangeListeners(r.url,r.state)}))}_notifyUrlChangeListeners(t="",r){this._urlChangeListeners.forEach(i=>i(t,r))}subscribe(t,r,i){return this._subject.subscribe({next:t,error:r,complete:i})}}return n.normalizeQueryParams=Fi,n.joinWithSlash=Gm,n.stripTrailingSlash=yS,n.\u0275fac=function(t){return new(t||n)(R(Ma),R(ns))},n.\u0275prov=$({token:n,factory:function(){return function I2(){return new Km(R(Ma),R(ns))}()},providedIn:"root"}),n})();function bS(n){return n.replace(/\/index.html$/,"")}var St=(()=>((St=St||{})[St.Zero=0]="Zero",St[St.One=1]="One",St[St.Two=2]="Two",St[St.Few=3]="Few",St[St.Many=4]="Many",St[St.Other=5]="Other",St))();const P2=function kE(n){return function Cn(n){const e=function wB(n){return n.toLowerCase().replace(/_/g,"-")}(n);let t=NE(e);if(t)return t;const r=e.split("-")[0];if(t=NE(r),t)return t;if("en"===r)return EB;throw new Error(`Missing locale data for the locale "${n}".`)}(n)[L.PluralCase]};class qd{}let uH=(()=>{class n extends qd{constructor(t){super(),this.locale=t}getPluralCategory(t,r){switch(P2(r||this.locale)(t)){case St.Zero:return"zero";case St.One:return"one";case St.Two:return"two";case St.Few:return"few";case St.Many:return"many";default:return"other"}}}return n.\u0275fac=function(t){return new(t||n)(R(fo))},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})();function xS(n,e){e=encodeURIComponent(e);for(const t of n.split(";")){const r=t.indexOf("="),[i,o]=-1==r?[t,""]:[t.slice(0,r),t.slice(r+1)];if(i.trim()===e)return decodeURIComponent(o)}return null}let uc=(()=>{class n{constructor(t,r,i,o){this._iterableDiffers=t,this._keyValueDiffers=r,this._ngEl=i,this._renderer=o,this._iterableDiffer=null,this._keyValueDiffer=null,this._initialClasses=[],this._rawClass=null}set klass(t){this._removeClasses(this._initialClasses),this._initialClasses="string"==typeof t?t.split(/\s+/):[],this._applyClasses(this._initialClasses),this._applyClasses(this._rawClass)}set ngClass(t){this._removeClasses(this._rawClass),this._applyClasses(this._initialClasses),this._iterableDiffer=null,this._keyValueDiffer=null,this._rawClass="string"==typeof t?t.split(/\s+/):t,this._rawClass&&($l(this._rawClass)?this._iterableDiffer=this._iterableDiffers.find(this._rawClass).create():this._keyValueDiffer=this._keyValueDiffers.find(this._rawClass).create())}ngDoCheck(){if(this._iterableDiffer){const t=this._iterableDiffer.diff(this._rawClass);t&&this._applyIterableChanges(t)}else if(this._keyValueDiffer){const t=this._keyValueDiffer.diff(this._rawClass);t&&this._applyKeyValueChanges(t)}}_applyKeyValueChanges(t){t.forEachAddedItem(r=>this._toggleClass(r.key,r.currentValue)),t.forEachChangedItem(r=>this._toggleClass(r.key,r.currentValue)),t.forEachRemovedItem(r=>{r.previousValue&&this._toggleClass(r.key,!1)})}_applyIterableChanges(t){t.forEachAddedItem(r=>{if("string"!=typeof r.item)throw new Error(`NgClass can only toggle CSS classes expressed as strings, got ${Fe(r.item)}`);this._toggleClass(r.item,!0)}),t.forEachRemovedItem(r=>this._toggleClass(r.item,!1))}_applyClasses(t){t&&(Array.isArray(t)||t instanceof Set?t.forEach(r=>this._toggleClass(r,!0)):Object.keys(t).forEach(r=>this._toggleClass(r,!!t[r])))}_removeClasses(t){t&&(Array.isArray(t)||t instanceof Set?t.forEach(r=>this._toggleClass(r,!1)):Object.keys(t).forEach(r=>this._toggleClass(r,!1)))}_toggleClass(t,r){(t=t.trim())&&t.split(/\s+/g).forEach(i=>{r?this._renderer.addClass(this._ngEl.nativeElement,i):this._renderer.removeClass(this._ngEl.nativeElement,i)})}}return n.\u0275fac=function(t){return new(t||n)(w(ac),w(Sa),w(_t),w(oi))},n.\u0275dir=Y({type:n,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"}}),n})();class fH{constructor(e,t,r,i){this.$implicit=e,this.ngForOf=t,this.index=r,this.count=i}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let Kd=(()=>{class n{constructor(t,r,i){this._viewContainer=t,this._template=r,this._differs=i,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForOf(t){this._ngForOf=t,this._ngForOfDirty=!0}set ngForTrackBy(t){this._trackByFn=t}get ngForTrackBy(){return this._trackByFn}set ngForTemplate(t){t&&(this._template=t)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const t=this._ngForOf;!this._differ&&t&&(this._differ=this._differs.find(t).create(this.ngForTrackBy))}if(this._differ){const t=this._differ.diff(this._ngForOf);t&&this._applyChanges(t)}}_applyChanges(t){const r=this._viewContainer;t.forEachOperation((i,o,s)=>{if(null==i.previousIndex)r.createEmbeddedView(this._template,new fH(i.item,this._ngForOf,-1,-1),null===s?void 0:s);else if(null==s)r.remove(null===o?void 0:o);else if(null!==o){const a=r.get(o);r.move(a,s),AS(a,i)}});for(let i=0,o=r.length;i{AS(r.get(i.currentIndex),i)})}static ngTemplateContextGuard(t,r){return!0}}return n.\u0275fac=function(t){return new(t||n)(w(sr),w(si),w(ac))},n.\u0275dir=Y({type:n,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"}}),n})();function AS(n,e){n.context.$implicit=e.item}let ho=(()=>{class n{constructor(t,r){this._viewContainer=t,this._context=new hH,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=r}set ngIf(t){this._context.$implicit=this._context.ngIf=t,this._updateView()}set ngIfThen(t){OS("ngIfThen",t),this._thenTemplateRef=t,this._thenViewRef=null,this._updateView()}set ngIfElse(t){OS("ngIfElse",t),this._elseTemplateRef=t,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(t,r){return!0}}return n.\u0275fac=function(t){return new(t||n)(w(sr),w(si))},n.\u0275dir=Y({type:n,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"}}),n})();class hH{constructor(){this.$implicit=null,this.ngIf=null}}function OS(n,e){if(e&&!e.createEmbeddedView)throw new Error(`${n} must be a TemplateRef, but received '${Fe(e)}'.`)}let ov=(()=>{class n{constructor(t,r,i){this._ngEl=t,this._differs=r,this._renderer=i,this._ngStyle=null,this._differ=null}set ngStyle(t){this._ngStyle=t,!this._differ&&t&&(this._differ=this._differs.find(t).create())}ngDoCheck(){if(this._differ){const t=this._differ.diff(this._ngStyle);t&&this._applyChanges(t)}}_setStyle(t,r){const[i,o]=t.split(".");null!=(r=null!=r&&o?`${r}${o}`:r)?this._renderer.setStyle(this._ngEl.nativeElement,i,r):this._renderer.removeStyle(this._ngEl.nativeElement,i)}_applyChanges(t){t.forEachRemovedItem(r=>this._setStyle(r.key,null)),t.forEachAddedItem(r=>this._setStyle(r.key,r.currentValue)),t.forEachChangedItem(r=>this._setStyle(r.key,r.currentValue))}}return n.\u0275fac=function(t){return new(t||n)(w(_t),w(Sa),w(oi))},n.\u0275dir=Y({type:n,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"}}),n})(),sv=(()=>{class n{constructor(t){this._viewContainerRef=t,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null}ngOnChanges(t){if(t.ngTemplateOutlet){const r=this._viewContainerRef;this._viewRef&&r.remove(r.indexOf(this._viewRef)),this._viewRef=this.ngTemplateOutlet?r.createEmbeddedView(this.ngTemplateOutlet,this.ngTemplateOutletContext):null}else this._viewRef&&t.ngTemplateOutletContext&&this.ngTemplateOutletContext&&(this._viewRef.context=this.ngTemplateOutletContext)}}return n.\u0275fac=function(t){return new(t||n)(w(sr))},n.\u0275dir=Y({type:n,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet"},features:[tr]}),n})();function Rr(n,e){return new we(2100,"")}let NS=(()=>{class n{transform(t){if(null==t)return null;if("string"!=typeof t)throw Rr();return t.toLowerCase()}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275pipe=mn({name:"lowercase",type:n,pure:!0}),n})(),PS=(()=>{class n{transform(t,r,i){if(null==t)return null;if(!this.supports(t))throw Rr();return t.slice(r,i)}supports(t){return"string"==typeof t||Array.isArray(t)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275pipe=mn({name:"slice",type:n,pure:!1}),n})(),Pr=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=ut({type:n}),n.\u0275inj=at({providers:[{provide:qd,useClass:uH}]}),n})();const FS="browser";let VH=(()=>{class n{}return n.\u0275prov=$({token:n,providedIn:"root",factory:()=>new HH(R(Vt),window)}),n})();class HH{constructor(e,t){this.document=e,this.window=t,this.offset=()=>[0,0]}setOffset(e){this.offset=Array.isArray(e)?()=>e:e}getScrollPosition(){return this.supportsScrolling()?[this.window.pageXOffset,this.window.pageYOffset]:[0,0]}scrollToPosition(e){this.supportsScrolling()&&this.window.scrollTo(e[0],e[1])}scrollToAnchor(e){if(!this.supportsScrolling())return;const t=function UH(n,e){const t=n.getElementById(e)||n.getElementsByName(e)[0];if(t)return t;if("function"==typeof n.createTreeWalker&&n.body&&(n.body.createShadowRoot||n.body.attachShadow)){const r=n.createTreeWalker(n.body,NodeFilter.SHOW_ELEMENT);let i=r.currentNode;for(;i;){const o=i.shadowRoot;if(o){const s=o.getElementById(e)||o.querySelector(`[name="${e}"]`);if(s)return s}i=r.nextNode()}}return null}(this.document,e);t&&(this.scrollToElement(t),t.focus())}setHistoryScrollRestoration(e){if(this.supportScrollRestoration()){const t=this.window.history;t&&t.scrollRestoration&&(t.scrollRestoration=e)}}scrollToElement(e){const t=e.getBoundingClientRect(),r=t.left+this.window.pageXOffset,i=t.top+this.window.pageYOffset,o=this.offset();this.window.scrollTo(r-o[0],i-o[1])}supportScrollRestoration(){try{if(!this.supportsScrolling())return!1;const e=LS(this.window.history)||LS(Object.getPrototypeOf(this.window.history));return!(!e||!e.writable&&!e.set)}catch(e){return!1}}supportsScrolling(){try{return!!this.window&&!!this.window.scrollTo&&"pageXOffset"in this.window}catch(e){return!1}}}function LS(n){return Object.getOwnPropertyDescriptor(n,"scrollRestoration")}class BS{}class cv extends class zH extends class C2{}{constructor(){super(...arguments),this.supportsDOMEvents=!0}}{static makeCurrent(){!function b2(n){Ld||(Ld=n)}(new cv)}onAndCancel(e,t,r){return e.addEventListener(t,r,!1),()=>{e.removeEventListener(t,r,!1)}}dispatchEvent(e,t){e.dispatchEvent(t)}remove(e){e.parentNode&&e.parentNode.removeChild(e)}createElement(e,t){return(t=t||this.getDefaultDocument()).createElement(e)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(e){return e.nodeType===Node.ELEMENT_NODE}isShadowRoot(e){return e instanceof DocumentFragment}getGlobalEventTarget(e,t){return"window"===t?window:"document"===t?e:"body"===t?e.body:null}getBaseHref(e){const t=function WH(){return dc=dc||document.querySelector("base"),dc?dc.getAttribute("href"):null}();return null==t?null:function $H(n){Zd=Zd||document.createElement("a"),Zd.setAttribute("href",n);const e=Zd.pathname;return"/"===e.charAt(0)?e:`/${e}`}(t)}resetBaseElement(){dc=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return xS(document.cookie,e)}}let Zd,dc=null;const jS=new G("TRANSITION_ID"),qH=[{provide:Nd,useFactory:function GH(n,e,t){return()=>{t.get(wa).donePromise.then(()=>{const r=li(),i=e.querySelectorAll(`style[ng-transition="${n}"]`);for(let o=0;o{const o=e.findTestabilityInTree(r,i);if(null==o)throw new Error("Could not find testability for element.");return o},He.getAllAngularTestabilities=()=>e.getAllTestabilities(),He.getAllAngularRootElements=()=>e.getAllRootElements(),He.frameworkStabilizers||(He.frameworkStabilizers=[]),He.frameworkStabilizers.push(r=>{const i=He.getAllAngularTestabilities();let o=i.length,s=!1;const a=function(l){s=s||l,o--,0==o&&r(s)};i.forEach(function(l){l.whenStable(a)})})}findTestabilityInTree(e,t,r){if(null==t)return null;const i=e.getTestability(t);return null!=i?i:r?li().isShadowRoot(t)?this.findTestabilityInTree(e,t.host,!0):this.findTestabilityInTree(e,t.parentElement,!0):null}}let KH=(()=>{class n{build(){return new XMLHttpRequest}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})();const Yd=new G("EventManagerPlugins");let Qd=(()=>{class n{constructor(t,r){this._zone=r,this._eventNameToPlugin=new Map,t.forEach(i=>i.manager=this),this._plugins=t.slice().reverse()}addEventListener(t,r,i){return this._findPluginFor(r).addEventListener(t,r,i)}addGlobalEventListener(t,r,i){return this._findPluginFor(r).addGlobalEventListener(t,r,i)}getZone(){return this._zone}_findPluginFor(t){const r=this._eventNameToPlugin.get(t);if(r)return r;const i=this._plugins;for(let o=0;o{class n{constructor(){this._stylesSet=new Set}addStyles(t){const r=new Set;t.forEach(i=>{this._stylesSet.has(i)||(this._stylesSet.add(i),r.add(i))}),this.onStylesAdded(r)}onStylesAdded(t){}getAllStyles(){return Array.from(this._stylesSet)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})(),fc=(()=>{class n extends HS{constructor(t){super(),this._doc=t,this._hostNodes=new Map,this._hostNodes.set(t.head,[])}_addStylesToHost(t,r,i){t.forEach(o=>{const s=this._doc.createElement("style");s.textContent=o,i.push(r.appendChild(s))})}addHost(t){const r=[];this._addStylesToHost(this._stylesSet,t,r),this._hostNodes.set(t,r)}removeHost(t){const r=this._hostNodes.get(t);r&&r.forEach(US),this._hostNodes.delete(t)}onStylesAdded(t){this._hostNodes.forEach((r,i)=>{this._addStylesToHost(t,i,r)})}ngOnDestroy(){this._hostNodes.forEach(t=>t.forEach(US))}}return n.\u0275fac=function(t){return new(t||n)(R(Vt))},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})();function US(n){li().remove(n)}const dv={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/MathML/"},fv=/%COMP%/g;function Jd(n,e,t){for(let r=0;r{if("__ngUnwrap__"===e)return n;!1===n(e)&&(e.preventDefault(),e.returnValue=!1)}}let hv=(()=>{class n{constructor(t,r,i){this.eventManager=t,this.sharedStylesHost=r,this.appId=i,this.rendererByCompId=new Map,this.defaultRenderer=new pv(t)}createRenderer(t,r){if(!t||!r)return this.defaultRenderer;switch(r.encapsulation){case Gr.Emulated:{let i=this.rendererByCompId.get(r.id);return i||(i=new eU(this.eventManager,this.sharedStylesHost,r,this.appId),this.rendererByCompId.set(r.id,i)),i.applyToHost(t),i}case 1:case Gr.ShadowDom:return new tU(this.eventManager,this.sharedStylesHost,t,r);default:if(!this.rendererByCompId.has(r.id)){const i=Jd(r.id,r.styles,[]);this.sharedStylesHost.addStyles(i),this.rendererByCompId.set(r.id,this.defaultRenderer)}return this.defaultRenderer}}begin(){}end(){}}return n.\u0275fac=function(t){return new(t||n)(R(Qd),R(fc),R(oc))},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})();class pv{constructor(e){this.eventManager=e,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(e,t){return t?document.createElementNS(dv[t]||t,e):document.createElement(e)}createComment(e){return document.createComment(e)}createText(e){return document.createTextNode(e)}appendChild(e,t){e.appendChild(t)}insertBefore(e,t,r){e&&e.insertBefore(t,r)}removeChild(e,t){e&&e.removeChild(t)}selectRootElement(e,t){let r="string"==typeof e?document.querySelector(e):e;if(!r)throw new Error(`The selector "${e}" did not match any elements`);return t||(r.textContent=""),r}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,t,r,i){if(i){t=i+":"+t;const o=dv[i];o?e.setAttributeNS(o,t,r):e.setAttribute(t,r)}else e.setAttribute(t,r)}removeAttribute(e,t,r){if(r){const i=dv[r];i?e.removeAttributeNS(i,t):e.removeAttribute(`${r}:${t}`)}else e.removeAttribute(t)}addClass(e,t){e.classList.add(t)}removeClass(e,t){e.classList.remove(t)}setStyle(e,t,r,i){i&(Wn.DashCase|Wn.Important)?e.style.setProperty(t,r,i&Wn.Important?"important":""):e.style[t]=r}removeStyle(e,t,r){r&Wn.DashCase?e.style.removeProperty(t):e.style[t]=""}setProperty(e,t,r){e[t]=r}setValue(e,t){e.nodeValue=t}listen(e,t,r){return"string"==typeof e?this.eventManager.addGlobalEventListener(e,t,$S(r)):this.eventManager.addEventListener(e,t,$S(r))}}class eU extends pv{constructor(e,t,r,i){super(e),this.component=r;const o=Jd(i+"-"+r.id,r.styles,[]);t.addStyles(o),this.contentAttr=function QH(n){return"_ngcontent-%COMP%".replace(fv,n)}(i+"-"+r.id),this.hostAttr=function JH(n){return"_nghost-%COMP%".replace(fv,n)}(i+"-"+r.id)}applyToHost(e){super.setAttribute(e,this.hostAttr,"")}createElement(e,t){const r=super.createElement(e,t);return super.setAttribute(r,this.contentAttr,""),r}}class tU extends pv{constructor(e,t,r,i){super(e),this.sharedStylesHost=t,this.hostEl=r,this.shadowRoot=r.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const o=Jd(i.id,i.styles,[]);for(let s=0;s{class n extends VS{constructor(t){super(t)}supports(t){return!0}addEventListener(t,r,i){return t.addEventListener(r,i,!1),()=>this.removeEventListener(t,r,i)}removeEventListener(t,r,i){return t.removeEventListener(r,i)}}return n.\u0275fac=function(t){return new(t||n)(R(Vt))},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})();const qS=["alt","control","meta","shift"],iU={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},KS={A:"1",B:"2",C:"3",D:"4",E:"5",F:"6",G:"7",H:"8",I:"9",J:"*",K:"+",M:"-",N:".",O:"/","`":"0","\x90":"NumLock"},oU={alt:n=>n.altKey,control:n=>n.ctrlKey,meta:n=>n.metaKey,shift:n=>n.shiftKey};let sU=(()=>{class n extends VS{constructor(t){super(t)}supports(t){return null!=n.parseEventName(t)}addEventListener(t,r,i){const o=n.parseEventName(r),s=n.eventCallback(o.fullKey,i,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>li().onAndCancel(t,o.domEventName,s))}static parseEventName(t){const r=t.toLowerCase().split("."),i=r.shift();if(0===r.length||"keydown"!==i&&"keyup"!==i)return null;const o=n._normalizeKey(r.pop());let s="";if(qS.forEach(l=>{const c=r.indexOf(l);c>-1&&(r.splice(c,1),s+=l+".")}),s+=o,0!=r.length||0===o.length)return null;const a={};return a.domEventName=i,a.fullKey=s,a}static getEventFullKey(t){let r="",i=function aU(n){let e=n.key;if(null==e){if(e=n.keyIdentifier,null==e)return"Unidentified";e.startsWith("U+")&&(e=String.fromCharCode(parseInt(e.substring(2),16)),3===n.location&&KS.hasOwnProperty(e)&&(e=KS[e]))}return iU[e]||e}(t);return i=i.toLowerCase()," "===i?i="space":"."===i&&(i="dot"),qS.forEach(o=>{o!=i&&oU[o](t)&&(r+=o+".")}),r+=i,r}static eventCallback(t,r,i){return o=>{n.getEventFullKey(o)===t&&i.runGuarded(()=>r(o))}}static _normalizeKey(t){return"esc"===t?"escape":t}}return n.\u0275fac=function(t){return new(t||n)(R(Vt))},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})();const dU=eS(d2,"browser",[{provide:sc,useValue:FS},{provide:$w,useValue:function lU(){cv.makeCurrent(),uv.init()},multi:!0},{provide:Vt,useFactory:function uU(){return function MN(n){Rp=n}(document),document},deps:[]}]),fU=[{provide:Zg,useValue:"root"},{provide:Qs,useFactory:function cU(){return new Qs},deps:[]},{provide:Yd,useClass:nU,multi:!0,deps:[Vt,ot,sc]},{provide:Yd,useClass:sU,multi:!0,deps:[Vt]},{provide:hv,useClass:hv,deps:[Qd,fc,oc]},{provide:aw,useExisting:hv},{provide:HS,useExisting:fc},{provide:fc,useClass:fc,deps:[Vt]},{provide:jm,useClass:jm,deps:[ot]},{provide:Qd,useClass:Qd,deps:[Yd,ot]},{provide:BS,useClass:KH,deps:[]}];let hU=(()=>{class n{constructor(t){if(t)throw new Error("BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.")}static withServerTransition(t){return{ngModule:n,providers:[{provide:oc,useValue:t.appId},{provide:jS,useExisting:oc},qH]}}}return n.\u0275fac=function(t){return new(t||n)(R(n,12))},n.\u0275mod=ut({type:n}),n.\u0275inj=at({providers:fU,imports:[Pr,y2]}),n})();"undefined"!=typeof window&&window;let EU=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:function(t){let r=null;return r=t?new(t||n):R(mv),r},providedIn:"root"}),n})(),mv=(()=>{class n extends EU{constructor(t){super(),this._doc=t}sanitize(t,r){if(null==r)return null;switch(t){case Ze.NONE:return r;case Ze.HTML:return Qr(r,"HTML")?zn(r):WC(this._doc,String(r)).toString();case Ze.STYLE:return Qr(r,"Style")?zn(r):r;case Ze.SCRIPT:if(Qr(r,"Script"))return zn(r);throw new Error("unsafe value used in a script context");case Ze.URL:return FC(r),Qr(r,"URL")?zn(r):Fl(String(r));case Ze.RESOURCE_URL:if(Qr(r,"ResourceURL"))return zn(r);throw new Error("unsafe value used in a resource URL context (see https://g.co/ng/security#xss)");default:throw new Error(`Unexpected SecurityContext ${t} (see https://g.co/ng/security#xss)`)}}bypassSecurityTrustHtml(t){return function VR(n){return new PR(n)}(t)}bypassSecurityTrustStyle(t){return function HR(n){return new FR(n)}(t)}bypassSecurityTrustScript(t){return function UR(n){return new LR(n)}(t)}bypassSecurityTrustUrl(t){return function zR(n){return new BR(n)}(t)}bypassSecurityTrustResourceUrl(t){return function WR(n){return new jR(n)}(t)}}return n.\u0275fac=function(t){return new(t||n)(R(Vt))},n.\u0275prov=$({token:n,factory:function(t){let r=null;return r=t?new t:function wU(n){return new mv(n.get(Vt))}(R(yt)),r},providedIn:"root"}),n})();function Xd(n,e){return new Ne(t=>{const r=n.length;if(0===r)return void t.complete();const i=new Array(r);let o=0,s=0;for(let a=0;a{c||(c=!0,s++),i[a]=u},error:u=>t.error(u),complete:()=>{o++,(o===r||!c)&&(s===r&&t.next(e?e.reduce((u,d,f)=>(u[d]=i[f],u),{}):i),t.complete())}}))}})}let QS=(()=>{class n{constructor(t,r){this._renderer=t,this._elementRef=r,this.onChange=i=>{},this.onTouched=()=>{}}setProperty(t,r){this._renderer.setProperty(this._elementRef.nativeElement,t,r)}registerOnTouched(t){this.onTouched=t}registerOnChange(t){this.onChange=t}setDisabledState(t){this.setProperty("disabled",t)}}return n.\u0275fac=function(t){return new(t||n)(w(oi),w(_t))},n.\u0275dir=Y({type:n}),n})(),rs=(()=>{class n extends QS{}return n.\u0275fac=function(){let e;return function(r){return(e||(e=jt(n)))(r||n)}}(),n.\u0275dir=Y({type:n,features:[xe]}),n})();const cr=new G("NgValueAccessor"),IU={provide:cr,useExisting:Ve(()=>ef),multi:!0},xU=new G("CompositionEventMode");let ef=(()=>{class n extends QS{constructor(t,r,i){super(t,r),this._compositionMode=i,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function TU(){const n=li()?li().getUserAgent():"";return/android (\d+)/.test(n.toLowerCase())}())}writeValue(t){this.setProperty("value",null==t?"":t)}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}}return n.\u0275fac=function(t){return new(t||n)(w(oi),w(_t),w(xU,8))},n.\u0275dir=Y({type:n,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(t,r){1&t&&Le("input",function(o){return r._handleInput(o.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(o){return r._compositionEnd(o.target.value)})},features:[Qe([IU]),xe]}),n})();const on=new G("NgValidators"),mo=new G("NgAsyncValidators");function lM(n){return null!=n}function cM(n){const e=ql(n)?zt(n):n;return lm(e),e}function uM(n){let e={};return n.forEach(t=>{e=null!=t?Object.assign(Object.assign({},e),t):e}),0===Object.keys(e).length?null:e}function dM(n,e){return e.map(t=>t(n))}function fM(n){return n.map(e=>function OU(n){return!n.validate}(e)?e:t=>e.validate(t))}function vv(n){return null!=n?function hM(n){if(!n)return null;const e=n.filter(lM);return 0==e.length?null:function(t){return uM(dM(t,e))}}(fM(n)):null}function yv(n){return null!=n?function pM(n){if(!n)return null;const e=n.filter(lM);return 0==e.length?null:function(t){return function SU(...n){if(1===n.length){const e=n[0];if(hl(e))return Xd(e,null);if(hp(e)&&Object.getPrototypeOf(e)===Object.prototype){const t=Object.keys(e);return Xd(t.map(r=>e[r]),t)}}if("function"==typeof n[n.length-1]){const e=n.pop();return Xd(n=1===n.length&&hl(n[0])?n[0]:n,null).pipe(be(t=>e(...t)))}return Xd(n,null)}(dM(t,e).map(cM)).pipe(be(uM))}}(fM(n)):null}function gM(n,e){return null===n?[e]:Array.isArray(n)?[...n,e]:[n,e]}function _v(n){return n?Array.isArray(n)?n:[n]:[]}function nf(n,e){return Array.isArray(n)?n.includes(e):n===e}function yM(n,e){const t=_v(e);return _v(n).forEach(i=>{nf(t,i)||t.push(i)}),t}function _M(n,e){return _v(e).filter(t=>!nf(n,t))}class bM{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(e){this._rawValidators=e||[],this._composedValidatorFn=vv(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=yv(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e){this.control&&this.control.reset(e)}hasError(e,t){return!!this.control&&this.control.hasError(e,t)}getError(e,t){return this.control?this.control.getError(e,t):null}}class vo extends bM{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class En extends bM{get formDirective(){return null}get path(){return null}}class CM{constructor(e){this._cd=e}is(e){var t,r,i;return"submitted"===e?!!(null===(t=this._cd)||void 0===t?void 0:t.submitted):!!(null===(i=null===(r=this._cd)||void 0===r?void 0:r.control)||void 0===i?void 0:i[e])}}let bv=(()=>{class n extends CM{constructor(t){super(t)}}return n.\u0275fac=function(t){return new(t||n)(w(vo,2))},n.\u0275dir=Y({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(t,r){2&t&&Kl("ng-untouched",r.is("untouched"))("ng-touched",r.is("touched"))("ng-pristine",r.is("pristine"))("ng-dirty",r.is("dirty"))("ng-valid",r.is("valid"))("ng-invalid",r.is("invalid"))("ng-pending",r.is("pending"))},features:[xe]}),n})(),DM=(()=>{class n extends CM{constructor(t){super(t)}}return n.\u0275fac=function(t){return new(t||n)(w(En,10))},n.\u0275dir=Y({type:n,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(t,r){2&t&&Kl("ng-untouched",r.is("untouched"))("ng-touched",r.is("touched"))("ng-pristine",r.is("pristine"))("ng-dirty",r.is("dirty"))("ng-valid",r.is("valid"))("ng-invalid",r.is("invalid"))("ng-pending",r.is("pending"))("ng-submitted",r.is("submitted"))},features:[xe]}),n})();function hc(n,e){Ev(n,e),e.valueAccessor.writeValue(n.value),function jU(n,e){e.valueAccessor.registerOnChange(t=>{n._pendingValue=t,n._pendingChange=!0,n._pendingDirty=!0,"change"===n.updateOn&&wM(n,e)})}(n,e),function HU(n,e){const t=(r,i)=>{e.valueAccessor.writeValue(r),i&&e.viewToModelUpdate(r)};n.registerOnChange(t),e._registerOnDestroy(()=>{n._unregisterOnChange(t)})}(n,e),function VU(n,e){e.valueAccessor.registerOnTouched(()=>{n._pendingTouched=!0,"blur"===n.updateOn&&n._pendingChange&&wM(n,e),"submit"!==n.updateOn&&n.markAsTouched()})}(n,e),function BU(n,e){if(e.valueAccessor.setDisabledState){const t=r=>{e.valueAccessor.setDisabledState(r)};n.registerOnDisabledChange(t),e._registerOnDestroy(()=>{n._unregisterOnDisabledChange(t)})}}(n,e)}function lf(n,e){n.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(e)})}function Ev(n,e){const t=function mM(n){return n._rawValidators}(n);null!==e.validator?n.setValidators(gM(t,e.validator)):"function"==typeof t&&n.setValidators([t]);const r=function vM(n){return n._rawAsyncValidators}(n);null!==e.asyncValidator?n.setAsyncValidators(gM(r,e.asyncValidator)):"function"==typeof r&&n.setAsyncValidators([r]);const i=()=>n.updateValueAndValidity();lf(e._rawValidators,i),lf(e._rawAsyncValidators,i)}function wM(n,e){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function Mv(n,e){const t=n.indexOf(e);t>-1&&n.splice(t,1)}const pc="VALID",uf="INVALID",Ia="PENDING",gc="DISABLED";function Tv(n){return(df(n)?n.validators:n)||null}function IM(n){return Array.isArray(n)?vv(n):n||null}function xv(n,e){return(df(e)?e.asyncValidators:n)||null}function TM(n){return Array.isArray(n)?yv(n):n||null}function df(n){return null!=n&&!Array.isArray(n)&&"object"==typeof n}const Av=n=>n instanceof kv;function AM(n){return(n=>n instanceof NM)(n)?n.value:n.getRawValue()}function OM(n,e){const t=Av(n),r=n.controls;if(!(t?Object.keys(r):r).length)throw new we(1e3,"");if(!r[e])throw new we(1001,"")}function kM(n,e){Av(n),n._forEachChild((r,i)=>{if(void 0===e[i])throw new we(1002,"")})}class Ov{constructor(e,t){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._rawValidators=e,this._rawAsyncValidators=t,this._composedValidatorFn=IM(this._rawValidators),this._composedAsyncValidatorFn=TM(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get valid(){return this.status===pc}get invalid(){return this.status===uf}get pending(){return this.status==Ia}get disabled(){return this.status===gc}get enabled(){return this.status!==gc}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this._rawValidators=e,this._composedValidatorFn=IM(e)}setAsyncValidators(e){this._rawAsyncValidators=e,this._composedAsyncValidatorFn=TM(e)}addValidators(e){this.setValidators(yM(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(yM(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(_M(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(_M(e,this._rawAsyncValidators))}hasValidator(e){return nf(this._rawValidators,e)}hasAsyncValidator(e){return nf(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){this.touched=!0,this._parent&&!e.onlySelf&&this._parent.markAsTouched(e)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(e=>e.markAllAsTouched())}markAsUntouched(e={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(t=>{t.markAsUntouched({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}markAsDirty(e={}){this.pristine=!1,this._parent&&!e.onlySelf&&this._parent.markAsDirty(e)}markAsPristine(e={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(t=>{t.markAsPristine({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}markAsPending(e={}){this.status=Ia,!1!==e.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!e.onlySelf&&this._parent.markAsPending(e)}disable(e={}){const t=this._parentMarkedDirty(e.onlySelf);this.status=gc,this.errors=null,this._forEachChild(r=>{r.disable(Object.assign(Object.assign({},e),{onlySelf:!0}))}),this._updateValue(),!1!==e.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(Object.assign(Object.assign({},e),{skipPristineCheck:t})),this._onDisabledChange.forEach(r=>r(!0))}enable(e={}){const t=this._parentMarkedDirty(e.onlySelf);this.status=pc,this._forEachChild(r=>{r.enable(Object.assign(Object.assign({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(Object.assign(Object.assign({},e),{skipPristineCheck:t})),this._onDisabledChange.forEach(r=>r(!1))}_updateAncestors(e){this._parent&&!e.onlySelf&&(this._parent.updateValueAndValidity(e),e.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(e){this._parent=e}updateValueAndValidity(e={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===pc||this.status===Ia)&&this._runAsyncValidator(e.emitEvent)),!1!==e.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.updateValueAndValidity(e)}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(t=>t._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?gc:pc}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e){if(this.asyncValidator){this.status=Ia,this._hasOwnPendingAsyncValidator=!0;const t=cM(this.asyncValidator(this));this._asyncValidationSubscription=t.subscribe(r=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(r,{emitEvent:e})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(e,t={}){this.errors=e,this._updateControlsErrors(!1!==t.emitEvent)}get(e){return function $U(n,e,t){if(null==e||(Array.isArray(e)||(e=e.split(t)),Array.isArray(e)&&0===e.length))return null;let r=n;return e.forEach(i=>{r=Av(r)?r.controls.hasOwnProperty(i)?r.controls[i]:null:(n=>n instanceof qU)(r)&&r.at(i)||null}),r}(this,e,".")}getError(e,t){const r=t?this.get(t):this;return r&&r.errors?r.errors[e]:null}hasError(e,t){return!!this.getError(e,t)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(e)}_initObservables(){this.valueChanges=new Ae,this.statusChanges=new Ae}_calculateStatus(){return this._allControlsDisabled()?gc:this.errors?uf:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Ia)?Ia:this._anyControlsHaveStatus(uf)?uf:pc}_anyControlsHaveStatus(e){return this._anyControls(t=>t.status===e)}_anyControlsDirty(){return this._anyControls(e=>e.dirty)}_anyControlsTouched(){return this._anyControls(e=>e.touched)}_updatePristine(e={}){this.pristine=!this._anyControlsDirty(),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}_updateTouched(e={}){this.touched=this._anyControlsTouched(),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}_isBoxedValue(e){return"object"==typeof e&&null!==e&&2===Object.keys(e).length&&"value"in e&&"disabled"in e}_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){df(e)&&null!=e.updateOn&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){return!e&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}}class NM extends Ov{constructor(e=null,t,r){super(Tv(t),xv(r,t)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(e),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),df(t)&&t.initialValueIsDefault&&(this.defaultValue=this._isBoxedValue(e)?e.value:e)}setValue(e,t={}){this.value=this._pendingValue=e,this._onChange.length&&!1!==t.emitModelToViewChange&&this._onChange.forEach(r=>r(this.value,!1!==t.emitViewToModelChange)),this.updateValueAndValidity(t)}patchValue(e,t={}){this.setValue(e,t)}reset(e=this.defaultValue,t={}){this._applyFormState(e),this.markAsPristine(t),this.markAsUntouched(t),this.setValue(this.value,t),this._pendingChange=!1}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){Mv(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){Mv(this._onDisabledChange,e)}_forEachChild(e){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(e){this._isBoxedValue(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e}}class kv extends Ov{constructor(e,t,r){super(Tv(t),xv(r,t)),this.controls=e,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(e,t){return this.controls[e]?this.controls[e]:(this.controls[e]=t,t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange),t)}addControl(e,t,r={}){this.registerControl(e,t),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}removeControl(e,t={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}setControl(e,t,r={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],t&&this.registerControl(e,t),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}contains(e){return this.controls.hasOwnProperty(e)&&this.controls[e].enabled}setValue(e,t={}){kM(this,e),Object.keys(e).forEach(r=>{OM(this,r),this.controls[r].setValue(e[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(e,t={}){null!=e&&(Object.keys(e).forEach(r=>{this.controls[r]&&this.controls[r].patchValue(e[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t))}reset(e={},t={}){this._forEachChild((r,i)=>{r.reset(e[i],{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t),this._updateTouched(t),this.updateValueAndValidity(t)}getRawValue(){return this._reduceChildren({},(e,t,r)=>(e[r]=AM(t),e))}_syncPendingControls(){let e=this._reduceChildren(!1,(t,r)=>!!r._syncPendingControls()||t);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){Object.keys(this.controls).forEach(t=>{const r=this.controls[t];r&&e(r,t)})}_setUpControls(){this._forEachChild(e=>{e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(e){for(const t of Object.keys(this.controls)){const r=this.controls[t];if(this.contains(t)&&e(r))return!0}return!1}_reduceValue(){return this._reduceChildren({},(e,t,r)=>((t.enabled||this.disabled)&&(e[r]=t.value),e))}_reduceChildren(e,t){let r=e;return this._forEachChild((i,o)=>{r=t(r,i,o)}),r}_allControlsDisabled(){for(const e of Object.keys(this.controls))if(this.controls[e].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}}class qU extends Ov{constructor(e,t,r){super(Tv(t),xv(r,t)),this.controls=e,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(e){return this.controls[e]}push(e,t={}){this.controls.push(e),this._registerControl(e),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}insert(e,t,r={}){this.controls.splice(e,0,t),this._registerControl(t),this.updateValueAndValidity({emitEvent:r.emitEvent})}removeAt(e,t={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),this.controls.splice(e,1),this.updateValueAndValidity({emitEvent:t.emitEvent})}setControl(e,t,r={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),this.controls.splice(e,1),t&&(this.controls.splice(e,0,t),this._registerControl(t)),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(e,t={}){kM(this,e),e.forEach((r,i)=>{OM(this,i),this.at(i).setValue(r,{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(e,t={}){null!=e&&(e.forEach((r,i)=>{this.at(i)&&this.at(i).patchValue(r,{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t))}reset(e=[],t={}){this._forEachChild((r,i)=>{r.reset(e[i],{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t),this._updateTouched(t),this.updateValueAndValidity(t)}getRawValue(){return this.controls.map(e=>AM(e))}clear(e={}){this.controls.length<1||(this._forEachChild(t=>t._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:e.emitEvent}))}_syncPendingControls(){let e=this.controls.reduce((t,r)=>!!r._syncPendingControls()||t,!1);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){this.controls.forEach((t,r)=>{e(t,r)})}_updateValue(){this.value=this.controls.filter(e=>e.enabled||this.disabled).map(e=>e.value)}_anyControls(e){return this.controls.some(t=>t.enabled&&e(t))}_setUpControls(){this._forEachChild(e=>this._registerControl(e))}_allControlsDisabled(){for(const e of this.controls)if(e.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(e){e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)}}const KU={provide:En,useExisting:Ve(()=>ff)},mc=(()=>Promise.resolve(null))();let ff=(()=>{class n extends En{constructor(t,r){super(),this.submitted=!1,this._directives=new Set,this.ngSubmit=new Ae,this.form=new kv({},vv(t),yv(r))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(t){mc.then(()=>{const r=this._findContainer(t.path);t.control=r.registerControl(t.name,t.control),hc(t.control,t),t.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(t)})}getControl(t){return this.form.get(t.path)}removeControl(t){mc.then(()=>{const r=this._findContainer(t.path);r&&r.removeControl(t.name),this._directives.delete(t)})}addFormGroup(t){mc.then(()=>{const r=this._findContainer(t.path),i=new kv({});(function SM(n,e){Ev(n,e)})(i,t),r.registerControl(t.name,i),i.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(t){mc.then(()=>{const r=this._findContainer(t.path);r&&r.removeControl(t.name)})}getFormGroup(t){return this.form.get(t.path)}updateModel(t,r){mc.then(()=>{this.form.get(t.path).setValue(r)})}setValue(t){this.control.setValue(t)}onSubmit(t){return this.submitted=!0,function MM(n,e){n._syncPendingControls(),e.forEach(t=>{const r=t.control;"submit"===r.updateOn&&r._pendingChange&&(t.viewToModelUpdate(r._pendingValue),r._pendingChange=!1)})}(this.form,this._directives),this.ngSubmit.emit(t),!1}onReset(){this.resetForm()}resetForm(t){this.form.reset(t),this.submitted=!1}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(t){return t.pop(),t.length?this.form.get(t):this.form}}return n.\u0275fac=function(t){return new(t||n)(w(on,10),w(mo,10))},n.\u0275dir=Y({type:n,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(t,r){1&t&&Le("submit",function(o){return r.onSubmit(o)})("reset",function(){return r.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Qe([KU]),xe]}),n})();const YU={provide:vo,useExisting:Ve(()=>hf)},FM=(()=>Promise.resolve(null))();let hf=(()=>{class n extends vo{constructor(t,r,i,o,s){super(),this._changeDetectorRef=s,this.control=new NM,this._registered=!1,this.update=new Ae,this._parent=t,this._setValidators(r),this._setAsyncValidators(i),this.valueAccessor=function Sv(n,e){if(!e)return null;let t,r,i;return Array.isArray(e),e.forEach(o=>{o.constructor===ef?t=o:function WU(n){return Object.getPrototypeOf(n.constructor)===rs}(o)?r=o:i=o}),i||r||t||null}(0,o)}ngOnChanges(t){if(this._checkForErrors(),!this._registered||"name"in t){if(this._registered&&(this._checkName(),this.formDirective)){const r=t.name.previousValue;this.formDirective.removeControl({name:r,path:this._getPath(r)})}this._setUpControl()}"isDisabled"in t&&this._updateDisabled(t),function wv(n,e){if(!n.hasOwnProperty("model"))return!1;const t=n.model;return!!t.isFirstChange()||!Object.is(e,t.currentValue)}(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){hc(this.control,this),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()}_updateValue(t){FM.then(()=>{var r;this.control.setValue(t,{emitViewToModelChange:!1}),null===(r=this._changeDetectorRef)||void 0===r||r.markForCheck()})}_updateDisabled(t){const r=t.isDisabled.currentValue,i=""===r||r&&"false"!==r;FM.then(()=>{var o;i&&!this.control.disabled?this.control.disable():!i&&this.control.disabled&&this.control.enable(),null===(o=this._changeDetectorRef)||void 0===o||o.markForCheck()})}_getPath(t){return this._parent?function sf(n,e){return[...e.path,n]}(t,this._parent):[t]}}return n.\u0275fac=function(t){return new(t||n)(w(En,9),w(on,10),w(mo,10),w(cr,10),w(es,8))},n.\u0275dir=Y({type:n,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[Qe([YU]),xe,tr]}),n})(),LM=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275dir=Y({type:n,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),n})(),jM=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=ut({type:n}),n.\u0275inj=at({}),n})(),Cz=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=ut({type:n}),n.\u0275inj=at({imports:[[jM]]}),n})(),rI=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=ut({type:n}),n.\u0275inj=at({imports:[Cz]}),n})(),Pt=(()=>{class n{static addClass(t,r){t.classList?t.classList.add(r):t.className+=" "+r}static addMultipleClasses(t,r){if(t.classList){let i=r.trim().split(" ");for(let o=0;oa.height?(l=-1*i.height,t.style.transformOrigin="bottom",s.top+l<0&&(l=-1*s.top)):(l=o,t.style.transformOrigin="top"),c=i.width>a.width?-1*s.left:s.left+i.width>a.width?-1*(s.left+i.width-a.width):0,t.style.top=l+"px",t.style.left=c+"px"}static absolutePosition(t,r){let h,p,i=t.offsetParent?{width:t.offsetWidth,height:t.offsetHeight}:this.getHiddenElementDimensions(t),o=i.height,s=i.width,a=r.offsetHeight,l=r.offsetWidth,c=r.getBoundingClientRect(),u=this.getWindowScrollTop(),d=this.getWindowScrollLeft(),f=this.getViewport();c.top+a+o>f.height?(h=c.top+u-o,t.style.transformOrigin="bottom",h<0&&(h=u)):(h=a+c.top+u,t.style.transformOrigin="top"),p=c.left+s>f.width?Math.max(0,c.left+d+l-s):c.left+d,t.style.top=h+"px",t.style.left=p+"px"}static getParents(t,r=[]){return null===t.parentNode?r:this.getParents(t.parentNode,r.concat([t.parentNode]))}static getScrollableParents(t){let r=[];if(t){let i=this.getParents(t);const o=/(auto|scroll)/,s=a=>{let l=window.getComputedStyle(a,null);return o.test(l.getPropertyValue("overflow"))||o.test(l.getPropertyValue("overflowX"))||o.test(l.getPropertyValue("overflowY"))};for(let a of i){let l=1===a.nodeType&&a.dataset.scrollselectors;if(l){let c=l.split(",");for(let u of c){let d=this.findSingle(a,u);d&&s(d)&&r.push(d)}}9!==a.nodeType&&s(a)&&r.push(a)}}return r}static getHiddenElementOuterHeight(t){t.style.visibility="hidden",t.style.display="block";let r=t.offsetHeight;return t.style.display="none",t.style.visibility="visible",r}static getHiddenElementOuterWidth(t){t.style.visibility="hidden",t.style.display="block";let r=t.offsetWidth;return t.style.display="none",t.style.visibility="visible",r}static getHiddenElementDimensions(t){let r={};return t.style.visibility="hidden",t.style.display="block",r.width=t.offsetWidth,r.height=t.offsetHeight,t.style.display="none",t.style.visibility="visible",r}static scrollInView(t,r){let i=getComputedStyle(t).getPropertyValue("borderTopWidth"),o=i?parseFloat(i):0,s=getComputedStyle(t).getPropertyValue("paddingTop"),a=s?parseFloat(s):0,l=t.getBoundingClientRect(),u=r.getBoundingClientRect().top+document.body.scrollTop-(l.top+document.body.scrollTop)-o-a,d=t.scrollTop,f=t.clientHeight,h=this.getOuterHeight(r);u<0?t.scrollTop=d+u:u+h>f&&(t.scrollTop=d+u-f+h)}static fadeIn(t,r){t.style.opacity=0;let i=+new Date,o=0,s=function(){o=+t.style.opacity.replace(",",".")+((new Date).getTime()-i)/r,t.style.opacity=o,i=+new Date,+o<1&&(window.requestAnimationFrame&&requestAnimationFrame(s)||setTimeout(s,16))};s()}static fadeOut(t,r){var i=1,a=50/r;let l=setInterval(()=>{(i-=a)<=0&&(i=0,clearInterval(l)),t.style.opacity=i},50)}static getWindowScrollTop(){let t=document.documentElement;return(window.pageYOffset||t.scrollTop)-(t.clientTop||0)}static getWindowScrollLeft(){let t=document.documentElement;return(window.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}static matches(t,r){var i=Element.prototype;return(i.matches||i.webkitMatchesSelector||i.mozMatchesSelector||i.msMatchesSelector||function(s){return-1!==[].indexOf.call(document.querySelectorAll(s),this)}).call(t,r)}static getOuterWidth(t,r){let i=t.offsetWidth;if(r){let o=getComputedStyle(t);i+=parseFloat(o.marginLeft)+parseFloat(o.marginRight)}return i}static getHorizontalPadding(t){let r=getComputedStyle(t);return parseFloat(r.paddingLeft)+parseFloat(r.paddingRight)}static getHorizontalMargin(t){let r=getComputedStyle(t);return parseFloat(r.marginLeft)+parseFloat(r.marginRight)}static innerWidth(t){let r=t.offsetWidth,i=getComputedStyle(t);return r+=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight),r}static width(t){let r=t.offsetWidth,i=getComputedStyle(t);return r-=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight),r}static getInnerHeight(t){let r=t.offsetHeight,i=getComputedStyle(t);return r+=parseFloat(i.paddingTop)+parseFloat(i.paddingBottom),r}static getOuterHeight(t,r){let i=t.offsetHeight;if(r){let o=getComputedStyle(t);i+=parseFloat(o.marginTop)+parseFloat(o.marginBottom)}return i}static getHeight(t){let r=t.offsetHeight,i=getComputedStyle(t);return r-=parseFloat(i.paddingTop)+parseFloat(i.paddingBottom)+parseFloat(i.borderTopWidth)+parseFloat(i.borderBottomWidth),r}static getWidth(t){let r=t.offsetWidth,i=getComputedStyle(t);return r-=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight)+parseFloat(i.borderLeftWidth)+parseFloat(i.borderRightWidth),r}static getViewport(){let t=window,r=document,i=r.documentElement,o=r.getElementsByTagName("body")[0];return{width:t.innerWidth||i.clientWidth||o.clientWidth,height:t.innerHeight||i.clientHeight||o.clientHeight}}static getOffset(t){var r=t.getBoundingClientRect();return{top:r.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:r.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0)}}static replaceElementWith(t,r){let i=t.parentNode;if(!i)throw"Can't replace element";return i.replaceChild(r,t)}static getUserAgent(){return navigator.userAgent}static isIE(){var t=window.navigator.userAgent;return t.indexOf("MSIE ")>0||(t.indexOf("Trident/")>0?(t.indexOf("rv:"),!0):t.indexOf("Edge/")>0)}static isIOS(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream}static isAndroid(){return/(android)/i.test(navigator.userAgent)}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0}static appendChild(t,r){if(this.isElement(r))r.appendChild(t);else{if(!r.el||!r.el.nativeElement)throw"Cannot append "+r+" to "+t;r.el.nativeElement.appendChild(t)}}static removeChild(t,r){if(this.isElement(r))r.removeChild(t);else{if(!r.el||!r.el.nativeElement)throw"Cannot remove "+t+" from "+r;r.el.nativeElement.removeChild(t)}}static removeElement(t){"remove"in Element.prototype?t.remove():t.parentNode.removeChild(t)}static isElement(t){return"object"==typeof HTMLElement?t instanceof HTMLElement:t&&"object"==typeof t&&null!==t&&1===t.nodeType&&"string"==typeof t.nodeName}static calculateScrollbarWidth(t){if(t){let r=getComputedStyle(t);return t.offsetWidth-t.clientWidth-parseFloat(r.borderLeftWidth)-parseFloat(r.borderRightWidth)}{if(null!==this.calculatedScrollbarWidth)return this.calculatedScrollbarWidth;let r=document.createElement("div");r.className="p-scrollbar-measure",document.body.appendChild(r);let i=r.offsetWidth-r.clientWidth;return document.body.removeChild(r),this.calculatedScrollbarWidth=i,i}}static calculateScrollbarHeight(){if(null!==this.calculatedScrollbarHeight)return this.calculatedScrollbarHeight;let t=document.createElement("div");t.className="p-scrollbar-measure",document.body.appendChild(t);let r=t.offsetHeight-t.clientHeight;return document.body.removeChild(t),this.calculatedScrollbarWidth=r,r}static invokeElementMethod(t,r,i){t[r].apply(t,i)}static clearSelection(){if(window.getSelection)window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().rangeCount>0&&window.getSelection().getRangeAt(0).getClientRects().length>0&&window.getSelection().removeAllRanges();else if(document.selection&&document.selection.empty)try{document.selection.empty()}catch(t){}}static getBrowser(){if(!this.browser){let t=this.resolveUserAgent();this.browser={},t.browser&&(this.browser[t.browser]=!0,this.browser.version=t.version),this.browser.chrome?this.browser.webkit=!0:this.browser.webkit&&(this.browser.safari=!0)}return this.browser}static resolveUserAgent(){let t=navigator.userAgent.toLowerCase(),r=/(chrome)[ \/]([\w.]+)/.exec(t)||/(webkit)[ \/]([\w.]+)/.exec(t)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(t)||/(msie) ([\w.]+)/.exec(t)||t.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(t)||[];return{browser:r[1]||"",version:r[2]||"0"}}static isInteger(t){return Number.isInteger?Number.isInteger(t):"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}static isHidden(t){return null===t.offsetParent}static getFocusableElements(t){let r=n.find(t,'button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n [href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]), select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]), [tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n [contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]):not(.p-disabled)'),i=[];for(let o of r)"none"!=getComputedStyle(o).display&&"hidden"!=getComputedStyle(o).visibility&&i.push(o);return i}static generateZIndex(){return this.zindex=this.zindex||999,++this.zindex}}return n.zindex=1e3,n.calculatedScrollbarWidth=null,n.calculatedScrollbarHeight=null,n})();class pt{static equals(e,t,r){return r?this.resolveFieldData(e,r)===this.resolveFieldData(t,r):this.equalsByValue(e,t)}static equalsByValue(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){var o,s,a,r=Array.isArray(e),i=Array.isArray(t);if(r&&i){if((s=e.length)!=t.length)return!1;for(o=s;0!=o--;)if(!this.equalsByValue(e[o],t[o]))return!1;return!0}if(r!=i)return!1;var l=e instanceof Date,c=t instanceof Date;if(l!=c)return!1;if(l&&c)return e.getTime()==t.getTime();var u=e instanceof RegExp,d=t instanceof RegExp;if(u!=d)return!1;if(u&&d)return e.toString()==t.toString();var f=Object.keys(e);if((s=f.length)!==Object.keys(t).length)return!1;for(o=s;0!=o--;)if(!Object.prototype.hasOwnProperty.call(t,f[o]))return!1;for(o=s;0!=o--;)if(!this.equalsByValue(e[a=f[o]],t[a]))return!1;return!0}return e!=e&&t!=t}static resolveFieldData(e,t){if(e&&t){if(this.isFunction(t))return t(e);if(-1==t.indexOf("."))return e[t];{let r=t.split("."),i=e;for(let o=0,s=r.length;o=e.length&&(r%=e.length,t%=e.length),e.splice(r,0,e.splice(t,1)[0]))}static insertIntoOrderedArray(e,t,r,i){if(r.length>0){let o=!1;for(let s=0;st){r.splice(s,0,e),o=!0;break}o||r.push(e)}else r.push(e)}static findIndexInList(e,t){let r=-1;if(t)for(let i=0;i-1&&(e=e.replace(/[\xC0-\xC5]/g,"A").replace(/[\xC6]/g,"AE").replace(/[\xC7]/g,"C").replace(/[\xC8-\xCB]/g,"E").replace(/[\xCC-\xCF]/g,"I").replace(/[\xD0]/g,"D").replace(/[\xD1]/g,"N").replace(/[\xD2-\xD6\xD8]/g,"O").replace(/[\xD9-\xDC]/g,"U").replace(/[\xDD]/g,"Y").replace(/[\xDE]/g,"P").replace(/[\xE0-\xE5]/g,"a").replace(/[\xE6]/g,"ae").replace(/[\xE7]/g,"c").replace(/[\xE8-\xEB]/g,"e").replace(/[\xEC-\xEF]/g,"i").replace(/[\xF1]/g,"n").replace(/[\xF2-\xF6\xF8]/g,"o").replace(/[\xF9-\xFC]/g,"u").replace(/[\xFE]/g,"p").replace(/[\xFD\xFF]/g,"y")),e}static isEmpty(e){return null==e||""===e||Array.isArray(e)&&0===e.length||!(e instanceof Date)&&"object"==typeof e&&0===Object.keys(e).length}static isNotEmpty(e){return!this.isEmpty(e)}}!function Dz(){let n=[];const i=o=>o&&parseInt(o.style.zIndex,10)||0}();const oI=["*"];let Vv,sn=(()=>{class n{}return n.STARTS_WITH="startsWith",n.CONTAINS="contains",n.NOT_CONTAINS="notContains",n.ENDS_WITH="endsWith",n.EQUALS="equals",n.NOT_EQUALS="notEquals",n.IN="in",n.LESS_THAN="lt",n.LESS_THAN_OR_EQUAL_TO="lte",n.GREATER_THAN="gt",n.GREATER_THAN_OR_EQUAL_TO="gte",n.BETWEEN="between",n.IS="is",n.IS_NOT="isNot",n.BEFORE="before",n.AFTER="after",n.DATE_IS="dateIs",n.DATE_IS_NOT="dateIsNot",n.DATE_BEFORE="dateBefore",n.DATE_AFTER="dateAfter",n})(),sI=(()=>{class n{constructor(){this.ripple=!1,this.filterMatchModeOptions={text:[sn.STARTS_WITH,sn.CONTAINS,sn.NOT_CONTAINS,sn.ENDS_WITH,sn.EQUALS,sn.NOT_EQUALS],numeric:[sn.EQUALS,sn.NOT_EQUALS,sn.LESS_THAN,sn.LESS_THAN_OR_EQUAL_TO,sn.GREATER_THAN,sn.GREATER_THAN_OR_EQUAL_TO],date:[sn.DATE_IS,sn.DATE_IS_NOT,sn.DATE_BEFORE,sn.DATE_AFTER]},this.translation={startsWith:"Starts with",contains:"Contains",notContains:"Not contains",endsWith:"Ends with",equals:"Equals",notEquals:"Not equals",noFilter:"No Filter",lt:"Less than",lte:"Less than or equal to",gt:"Greater than",gte:"Greater than or equal to",is:"Is",isNot:"Is not",before:"Before",after:"After",dateIs:"Date is",dateIsNot:"Date is not",dateBefore:"Date is before",dateAfter:"Date is after",clear:"Clear",apply:"Apply",matchAll:"Match All",matchAny:"Match Any",addRule:"Add Rule",removeRule:"Remove Rule",accept:"Yes",reject:"No",choose:"Choose",upload:"Upload",cancel:"Cancel",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dateFormat:"mm/dd/yy",firstDayOfWeek:0,today:"Today",weekHeader:"Wk",weak:"Weak",medium:"Medium",strong:"Strong",passwordPrompt:"Enter a password",emptyMessage:"No results found",emptyFilterMessage:"No results found"},this.zIndex={modal:1100,overlay:1e3,menu:1e3,tooltip:1100},this.translationSource=new Me,this.translationObserver=this.translationSource.asObservable()}getTranslation(t){return this.translation[t]}setTranslation(t){this.translation=Object.assign(Object.assign({},this.translation),t),this.translationSource.next(this.translation)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),aI=(()=>{class n{}return n.STARTS_WITH="startsWith",n.CONTAINS="contains",n.NOT_CONTAINS="notContains",n.ENDS_WITH="endsWith",n.EQUALS="equals",n.NOT_EQUALS="notEquals",n.NO_FILTER="noFilter",n.LT="lt",n.LTE="lte",n.GT="gt",n.GTE="gte",n.IS="is",n.IS_NOT="isNot",n.BEFORE="before",n.AFTER="after",n.CLEAR="clear",n.APPLY="apply",n.MATCH_ALL="matchAll",n.MATCH_ANY="matchAny",n.ADD_RULE="addRule",n.REMOVE_RULE="removeRule",n.ACCEPT="accept",n.REJECT="reject",n.CHOOSE="choose",n.UPLOAD="upload",n.CANCEL="cancel",n.DAY_NAMES="dayNames",n.DAY_NAMES_SHORT="dayNamesShort",n.DAY_NAMES_MIN="dayNamesMin",n.MONTH_NAMES="monthNames",n.MONTH_NAMES_SHORT="monthNamesShort",n.FIRST_DAY_OF_WEEK="firstDayOfWeek",n.TODAY="today",n.WEEK_HEADER="weekHeader",n.WEAK="weak",n.MEDIUM="medium",n.STRONG="strong",n.PASSWORD_PROMPT="passwordPrompt",n.EMPTY_MESSAGE="emptyMessage",n.EMPTY_FILTER_MESSAGE="emptyFilterMessage",n})(),Ez=(()=>{class n{constructor(){this.filters={startsWith:(t,r,i)=>{if(null==r||""===r.trim())return!0;if(null==t)return!1;let o=pt.removeAccents(r.toString()).toLocaleLowerCase(i);return pt.removeAccents(t.toString()).toLocaleLowerCase(i).slice(0,o.length)===o},contains:(t,r,i)=>{if(null==r||"string"==typeof r&&""===r.trim())return!0;if(null==t)return!1;let o=pt.removeAccents(r.toString()).toLocaleLowerCase(i);return-1!==pt.removeAccents(t.toString()).toLocaleLowerCase(i).indexOf(o)},notContains:(t,r,i)=>{if(null==r||"string"==typeof r&&""===r.trim())return!0;if(null==t)return!1;let o=pt.removeAccents(r.toString()).toLocaleLowerCase(i);return-1===pt.removeAccents(t.toString()).toLocaleLowerCase(i).indexOf(o)},endsWith:(t,r,i)=>{if(null==r||""===r.trim())return!0;if(null==t)return!1;let o=pt.removeAccents(r.toString()).toLocaleLowerCase(i),s=pt.removeAccents(t.toString()).toLocaleLowerCase(i);return-1!==s.indexOf(o,s.length-o.length)},equals:(t,r,i)=>null==r||"string"==typeof r&&""===r.trim()||null!=t&&(t.getTime&&r.getTime?t.getTime()===r.getTime():pt.removeAccents(t.toString()).toLocaleLowerCase(i)==pt.removeAccents(r.toString()).toLocaleLowerCase(i)),notEquals:(t,r,i)=>!(null==r||"string"==typeof r&&""===r.trim()||null!=t&&(t.getTime&&r.getTime?t.getTime()===r.getTime():pt.removeAccents(t.toString()).toLocaleLowerCase(i)==pt.removeAccents(r.toString()).toLocaleLowerCase(i))),in:(t,r)=>{if(null==r||0===r.length)return!0;for(let i=0;inull==r||null==r[0]||null==r[1]||null!=t&&(t.getTime?r[0].getTime()<=t.getTime()&&t.getTime()<=r[1].getTime():r[0]<=t&&t<=r[1]),lt:(t,r,i)=>null==r||null!=t&&(t.getTime&&r.getTime?t.getTime()null==r||null!=t&&(t.getTime&&r.getTime?t.getTime()<=r.getTime():t<=r),gt:(t,r,i)=>null==r||null!=t&&(t.getTime&&r.getTime?t.getTime()>r.getTime():t>r),gte:(t,r,i)=>null==r||null!=t&&(t.getTime&&r.getTime?t.getTime()>=r.getTime():t>=r),is:(t,r,i)=>this.filters.equals(t,r,i),isNot:(t,r,i)=>this.filters.notEquals(t,r,i),before:(t,r,i)=>this.filters.lt(t,r,i),after:(t,r,i)=>this.filters.gt(t,r,i),dateIs:(t,r)=>null==r||null!=t&&t.toDateString()===r.toDateString(),dateIsNot:(t,r)=>null==r||null!=t&&t.toDateString()!==r.toDateString(),dateBefore:(t,r)=>null==r||null!=t&&t.getTime()null==r||null!=t&&t.getTime()>r.getTime()}}filter(t,r,i,o,s){let a=[];if(t)for(let l of t)for(let c of r){let u=pt.resolveFieldData(l,c);if(this.filters[o](u,i,s)){a.push(l);break}}return a}register(t,r){this.filters[t]=r}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),lI=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=Et({type:n,selectors:[["p-header"]],ngContentSelectors:oI,decls:1,vars:0,template:function(t,r){1&t&&(ma(),Ni(0))},encapsulation:2}),n})(),cI=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=Et({type:n,selectors:[["p-footer"]],ngContentSelectors:oI,decls:1,vars:0,template:function(t,r){1&t&&(ma(),Ni(0))},encapsulation:2}),n})(),jv=(()=>{class n{constructor(t){this.template=t}getType(){return this.name}}return n.\u0275fac=function(t){return new(t||n)(w(si))},n.\u0275dir=Y({type:n,selectors:[["","pTemplate",""]],inputs:{type:"type",name:["pTemplate","name"]}}),n})(),vc=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=ut({type:n}),n.\u0275inj=at({imports:[[Pr]]}),n})(),wz=(()=>{class n{constructor(t,r,i){this.el=t,this.zone=r,this.config=i}ngAfterViewInit(){this.config&&this.config.ripple&&this.zone.runOutsideAngular(()=>{this.create(),this.mouseDownListener=this.onMouseDown.bind(this),this.el.nativeElement.addEventListener("mousedown",this.mouseDownListener)})}onMouseDown(t){let r=this.getInk();if(!r||"none"===getComputedStyle(r,null).display)return;if(Pt.removeClass(r,"p-ink-active"),!Pt.getHeight(r)&&!Pt.getWidth(r)){let a=Math.max(Pt.getOuterWidth(this.el.nativeElement),Pt.getOuterHeight(this.el.nativeElement));r.style.height=a+"px",r.style.width=a+"px"}let i=Pt.getOffset(this.el.nativeElement),o=t.pageX-i.left+document.body.scrollTop-Pt.getWidth(r)/2,s=t.pageY-i.top+document.body.scrollLeft-Pt.getHeight(r)/2;r.style.top=s+"px",r.style.left=o+"px",Pt.addClass(r,"p-ink-active")}getInk(){for(let t=0;t{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=ut({type:n}),n.\u0275inj=at({imports:[[Pr]]}),n})(),Mz=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=ut({type:n}),n.\u0275inj=at({imports:[[Pr,pf]]}),n})();try{Vv="undefined"!=typeof Intl&&Intl.v8BreakIterator}catch(n){Vv=!1}let yc,Hv,Iz=(()=>{class n{constructor(t){this._platformId=t,this.isBrowser=this._platformId?function jH(n){return n===FS}(this._platformId):"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!Vv)&&"undefined"!=typeof CSS&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}}return n.\u0275fac=function(t){return new(t||n)(R(sc))},n.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function _c(n){return function Tz(){if(null==yc&&"undefined"!=typeof window)try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>yc=!0}))}finally{yc=yc||!1}return yc}()?n:!!n.capture}function dI(n){if(function xz(){if(null==Hv){const n="undefined"!=typeof document?document.head:null;Hv=!(!n||!n.createShadowRoot&&!n.attachShadow)}return Hv}()){const e=n.getRootNode?n.getRootNode():null;if("undefined"!=typeof ShadowRoot&&ShadowRoot&&e instanceof ShadowRoot)return e}return null}function mf(n){return n.composedPath?n.composedPath()[0]:n.target}function ur(n){return n instanceof _t?n.nativeElement:n}function yo(){}function kn(n,e,t){return function(i){return i.lift(new Zz(n,e,t))}}class Zz{constructor(e,t,r){this.nextOrObserver=e,this.error=t,this.complete=r}call(e,t){return t.subscribe(new Yz(e,this.nextOrObserver,this.error,this.complete))}}class Yz extends tt{constructor(e,t,r,i){super(e),this._tapNext=yo,this._tapError=yo,this._tapComplete=yo,this._tapError=r||yo,this._tapComplete=i||yo,et(t)?(this._context=this,this._tapNext=t):t&&(this._context=t,this._tapNext=t.next||yo,this._tapError=t.error||yo,this._tapComplete=t.complete||yo)}_next(e){try{this._tapNext.call(this._context,e)}catch(t){return void this.destination.error(t)}this.destination.next(e)}_error(e){try{this._tapError.call(this._context,e)}catch(t){return void this.destination.error(t)}this.destination.error(e)}_complete(){try{this._tapComplete.call(this._context)}catch(e){return void this.destination.error(e)}return this.destination.complete()}}class Qz extends ke{constructor(e,t){super()}schedule(e,t=0){return this}}class vf extends Qz{constructor(e,t){super(e,t),this.scheduler=e,this.work=t,this.pending=!1}schedule(e,t=0){if(this.closed)return this;this.state=e;const r=this.id,i=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(i,r,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(i,this.id,t),this}requestAsyncId(e,t,r=0){return setInterval(e.flush.bind(e,this),r)}recycleAsyncId(e,t,r=0){if(null!==r&&this.delay===r&&!1===this.pending)return t;clearInterval(t)}execute(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const r=this._execute(e,t);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(e,t){let i,r=!1;try{this.work(e)}catch(o){r=!0,i=!!o&&o||new Error(o)}if(r)return this.unsubscribe(),i}_unsubscribe(){const e=this.id,t=this.scheduler,r=t.actions,i=r.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==i&&r.splice(i,1),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null}}let fI=(()=>{class n{constructor(t,r=n.now){this.SchedulerAction=t,this.now=r}schedule(t,r=0,i){return new this.SchedulerAction(this,t).schedule(i,r)}}return n.now=()=>Date.now(),n})();class Fr extends fI{constructor(e,t=fI.now){super(e,()=>Fr.delegate&&Fr.delegate!==this?Fr.delegate.now():t()),this.actions=[],this.active=!1,this.scheduled=void 0}schedule(e,t=0,r){return Fr.delegate&&Fr.delegate!==this?Fr.delegate.schedule(e,t,r):super.schedule(e,t,r)}flush(e){const{actions:t}=this;if(this.active)return void t.push(e);let r;this.active=!0;do{if(r=e.execute(e.state,e.delay))break}while(e=t.shift());if(this.active=!1,r){for(;e=t.shift();)e.unsubscribe();throw r}}}const bc=new Fr(vf);class Xz{constructor(e,t){this.dueTime=e,this.scheduler=t}call(e,t){return t.subscribe(new e3(e,this.dueTime,this.scheduler))}}class e3 extends tt{constructor(e,t,r){super(e),this.dueTime=t,this.scheduler=r,this.debouncedSubscription=null,this.lastValue=null,this.hasValue=!1}_next(e){this.clearDebounce(),this.lastValue=e,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(t3,this.dueTime,this))}_complete(){this.debouncedNext(),this.destination.complete()}debouncedNext(){if(this.clearDebounce(),this.hasValue){const{lastValue:e}=this;this.lastValue=null,this.hasValue=!1,this.destination.next(e)}}clearDebounce(){const e=this.debouncedSubscription;null!==e&&(this.remove(e),e.unsubscribe(),this.debouncedSubscription=null)}}function t3(n){n.debouncedNext()}function _o(n,e){return function(r){return r.lift(new n3(n,e))}}class n3{constructor(e,t){this.predicate=e,this.thisArg=t}call(e,t){return t.subscribe(new r3(e,this.predicate,this.thisArg))}}class r3 extends tt{constructor(e,t,r){super(e),this.predicate=t,this.thisArg=r,this.count=0}_next(e){let t;try{t=this.predicate.call(this.thisArg,e,this.count++)}catch(r){return void this.destination.error(r)}t&&this.destination.next(e)}}class gI extends class a3{constructor(e){this._items=e,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new Me,this._typeaheadSubscription=ke.EMPTY,this._vertical=!0,this._allowedModifierKeys=[],this._homeAndEnd=!1,this._skipPredicateFn=t=>t.disabled,this._pressedLetters=[],this.tabOut=new Me,this.change=new Me,e instanceof rc&&e.changes.subscribe(t=>{if(this._activeItem){const i=t.toArray().indexOf(this._activeItem);i>-1&&i!==this._activeItemIndex&&(this._activeItemIndex=i)}})}skipPredicate(e){return this._skipPredicateFn=e,this}withWrap(e=!0){return this._wrap=e,this}withVerticalOrientation(e=!0){return this._vertical=e,this}withHorizontalOrientation(e){return this._horizontal=e,this}withAllowedModifierKeys(e){return this._allowedModifierKeys=e,this}withTypeAhead(e=200){return this._typeaheadSubscription.unsubscribe(),this._typeaheadSubscription=this._letterKeyStream.pipe(kn(t=>this._pressedLetters.push(t)),function Jz(n,e=bc){return t=>t.lift(new Xz(n,e))}(e),_o(()=>this._pressedLetters.length>0),be(()=>this._pressedLetters.join(""))).subscribe(t=>{const r=this._getItemsArray();for(let i=1;i!e[o]||this._allowedModifierKeys.indexOf(o)>-1);switch(t){case 9:return void this.tabOut.next();case 40:if(this._vertical&&i){this.setNextItemActive();break}return;case 38:if(this._vertical&&i){this.setPreviousItemActive();break}return;case 39:if(this._horizontal&&i){"rtl"===this._horizontal?this.setPreviousItemActive():this.setNextItemActive();break}return;case 37:if(this._horizontal&&i){"rtl"===this._horizontal?this.setNextItemActive():this.setPreviousItemActive();break}return;case 36:if(this._homeAndEnd&&i){this.setFirstItemActive();break}return;case 35:if(this._homeAndEnd&&i){this.setLastItemActive();break}return;default:return void((i||function Kz(n,...e){return e.length?e.some(t=>n[t]):n.altKey||n.shiftKey||n.ctrlKey||n.metaKey}(e,"shiftKey"))&&(e.key&&1===e.key.length?this._letterKeyStream.next(e.key.toLocaleUpperCase()):(t>=65&&t<=90||t>=48&&t<=57)&&this._letterKeyStream.next(String.fromCharCode(t))))}this._pressedLetters=[],e.preventDefault()}get activeItemIndex(){return this._activeItemIndex}get activeItem(){return this._activeItem}isTyping(){return this._pressedLetters.length>0}setFirstItemActive(){this._setActiveItemByIndex(0,1)}setLastItemActive(){this._setActiveItemByIndex(this._items.length-1,-1)}setNextItemActive(){this._activeItemIndex<0?this.setFirstItemActive():this._setActiveItemByDelta(1)}setPreviousItemActive(){this._activeItemIndex<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)}updateActiveItem(e){const t=this._getItemsArray(),r="number"==typeof e?e:t.indexOf(e),i=t[r];this._activeItem=null==i?null:i,this._activeItemIndex=r}_setActiveItemByDelta(e){this._wrap?this._setActiveInWrapMode(e):this._setActiveInDefaultMode(e)}_setActiveInWrapMode(e){const t=this._getItemsArray();for(let r=1;r<=t.length;r++){const i=(this._activeItemIndex+e*r+t.length)%t.length;if(!this._skipPredicateFn(t[i]))return void this.setActiveItem(i)}}_setActiveInDefaultMode(e){this._setActiveItemByIndex(this._activeItemIndex+e,e)}_setActiveItemByIndex(e,t){const r=this._getItemsArray();if(r[e]){for(;this._skipPredicateFn(r[e]);)if(!r[e+=t])return;this.setActiveItem(e)}}_getItemsArray(){return this._items instanceof rc?this._items.toArray():this._items}}{constructor(){super(...arguments),this._origin="program"}setFocusOrigin(e){return this._origin=e,this}setActiveItem(e){super.setActiveItem(e),this.activeItem&&this.activeItem.focus(this._origin)}}function Uv(n){return!hl(n)&&n-parseFloat(n)+1>=0}function v3(n){const{subscriber:e,counter:t,period:r}=n;e.next(t),this.schedule({subscriber:e,counter:t+1,period:r},r)}const vI=new class _3 extends Fr{flush(e){this.active=!0,this.scheduled=void 0;const{actions:t}=this;let r,i=-1,o=t.length;e=e||t.shift();do{if(r=e.execute(e.state,e.delay))break}while(++i0?super.requestAsyncId(e,t,r):(e.actions.push(this),e.scheduled||(e.scheduled=requestAnimationFrame(()=>e.flush(null))))}recycleAsyncId(e,t,r=0){if(null!==r&&r>0||null===r&&this.delay>0)return super.recycleAsyncId(e,t,r);0===e.actions.length&&(cancelAnimationFrame(t),e.scheduled=void 0)}});function yI(n){return e=>e.lift(new b3(n))}class b3{constructor(e){this.notifier=e}call(e,t){const r=new C3(e),i=vl(this.notifier,new gl(r));return i&&!r.seenValue?(r.add(i),t.subscribe(r)):r}}class C3 extends ml{constructor(e){super(e),this.seenValue=!1}notifyNext(){this.seenValue=!0,this.complete()}notifyComplete(){}}let D3=1;const E3=Promise.resolve(),yf={};function _I(n){return n in yf&&(delete yf[n],!0)}const bI={setImmediate(n){const e=D3++;return yf[e]=!0,E3.then(()=>_I(e)&&n()),e},clearImmediate(n){_I(n)}};new class S3 extends Fr{flush(e){this.active=!0,this.scheduled=void 0;const{actions:t}=this;let r,i=-1,o=t.length;e=e||t.shift();do{if(r=e.execute(e.state,e.delay))break}while(++i0?super.requestAsyncId(e,t,r):(e.actions.push(this),e.scheduled||(e.scheduled=bI.setImmediate(e.flush.bind(e,null))))}recycleAsyncId(e,t,r=0){if(null!==r&&r>0||null===r&&this.delay>0)return super.recycleAsyncId(e,t,r);0===e.actions.length&&(bI.clearImmediate(t),e.scheduled=void 0)}});class T3{constructor(e){this.durationSelector=e}call(e,t){return t.subscribe(new x3(e,this.durationSelector))}}class x3 extends ml{constructor(e,t){super(e),this.durationSelector=t,this.hasValue=!1}_next(e){if(this.value=e,this.hasValue=!0,!this.throttled){let t;try{const{durationSelector:i}=this;t=i(e)}catch(i){return this.destination.error(i)}const r=vl(t,new gl(this));!r||r.closed?this.clearThrottle():this.add(this.throttled=r)}}clearThrottle(){const{value:e,hasValue:t,throttled:r}=this;r&&(this.remove(r),this.throttled=void 0,r.unsubscribe()),t&&(this.value=void 0,this.hasValue=!1,this.destination.next(e))}notifyNext(){this.clearThrottle()}notifyComplete(){this.clearThrottle()}}function O3(n){const{index:e,period:t,subscriber:r}=n;if(r.next(e),!r.closed){if(-1===t)return r.complete();n.index=e+1,this.schedule(n,t)}}let R3=(()=>{class n{constructor(t,r,i){this._platform=t,this._change=new Me,this._changeListener=o=>{this._change.next(o)},this._document=i,r.runOutsideAngular(()=>{if(t.isBrowser){const o=this._getWindow();o.addEventListener("resize",this._changeListener),o.addEventListener("orientationchange",this._changeListener)}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){if(this._platform.isBrowser){const t=this._getWindow();t.removeEventListener("resize",this._changeListener),t.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();const t={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),t}getViewportRect(){const t=this.getViewportScrollPosition(),{width:r,height:i}=this.getViewportSize();return{top:t.top,left:t.left,bottom:t.top+i,right:t.left+r,height:i,width:r}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};const t=this._document,r=this._getWindow(),i=t.documentElement,o=i.getBoundingClientRect();return{top:-o.top||t.body.scrollTop||r.scrollY||i.scrollTop||0,left:-o.left||t.body.scrollLeft||r.scrollX||i.scrollLeft||0}}change(t=20){return t>0?this._change.pipe(function k3(n,e=bc){return function I3(n){return function(t){return t.lift(new T3(n))}}(()=>function A3(n=0,e,t){let r=-1;return Uv(e)?r=Number(e)<1?1:Number(e):Os(e)&&(t=e),Os(t)||(t=bc),new Ne(i=>{const o=Uv(n)?n:+n-t.now();return t.schedule(O3,o,{index:0,period:r,subscriber:i})})}(n,e))}(t)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){const t=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:t.innerWidth,height:t.innerHeight}:{width:0,height:0}}}return n.\u0275fac=function(t){return new(t||n)(R(Iz),R(ot),R(Vt,8))},n.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),P3=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=ut({type:n}),n.\u0275inj=at({}),n})();function zv(n,e,t){for(let r in e)if(e.hasOwnProperty(r)){const i=e[r];i?n.setProperty(r,i,(null==t?void 0:t.has(r))?"important":""):n.removeProperty(r)}return n}function xa(n,e){const t=e?"":"none";zv(n.style,{"touch-action":e?"":"none","-webkit-user-drag":e?"":"none","-webkit-tap-highlight-color":e?"":"transparent","user-select":t,"-ms-user-select":t,"-webkit-user-select":t,"-moz-user-select":t})}function CI(n,e,t){zv(n.style,{position:e?"":"fixed",top:e?"":"0",opacity:e?"":"0",left:e?"":"-999em"},t)}function _f(n,e){return e&&"none"!=e?n+" "+e:n}function DI(n){const e=n.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(n)*e}function Wv(n,e){return n.getPropertyValue(e).split(",").map(r=>r.trim())}function $v(n){const e=n.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height,x:e.x,y:e.y}}function Gv(n,e,t){const{top:r,bottom:i,left:o,right:s}=n;return t>=r&&t<=i&&e>=o&&e<=s}function Cc(n,e,t){n.top+=e,n.bottom=n.top+n.height,n.left+=t,n.right=n.left+n.width}function EI(n,e,t,r){const{top:i,right:o,bottom:s,left:a,width:l,height:c}=n,u=l*e,d=c*e;return r>i-d&&ra-u&&t{this.positions.set(t,{scrollPosition:{top:t.scrollTop,left:t.scrollLeft},clientRect:$v(t)})})}handleScroll(e){const t=mf(e),r=this.positions.get(t);if(!r)return null;const i=r.scrollPosition;let o,s;if(t===this._document){const c=this._viewportRuler.getViewportScrollPosition();o=c.top,s=c.left}else o=t.scrollTop,s=t.scrollLeft;const a=i.top-o,l=i.left-s;return this.positions.forEach((c,u)=>{c.clientRect&&t!==u&&t.contains(u)&&Cc(c.clientRect,a,l)}),i.top=o,i.left=s,{top:a,left:l}}}function SI(n){const e=n.cloneNode(!0),t=e.querySelectorAll("[id]"),r=n.nodeName.toLowerCase();e.removeAttribute("id");for(let i=0;i{if(this.beforeStarted.next(),this._handles.length){const l=this._handles.find(c=>a.target&&(a.target===c||c.contains(a.target)));l&&!this._disabledHandles.has(l)&&!this.disabled&&this._initializeDragSequence(l,a)}else this.disabled||this._initializeDragSequence(this._rootElement,a)},this._pointerMove=a=>{const l=this._getPointerPositionOnPage(a);if(!this._hasStartedDragging){if(Math.abs(l.x-this._pickupPositionOnPage.x)+Math.abs(l.y-this._pickupPositionOnPage.y)>=this._config.dragStartThreshold){const h=Date.now()>=this._dragStartTime+this._getDragStartDelay(a),p=this._dropContainer;if(!h)return void this._endDragSequence(a);(!p||!p.isDragging()&&!p.isReceiving())&&(a.preventDefault(),this._hasStartedDragging=!0,this._ngZone.run(()=>this._startDragSequence(a)))}return}this._boundaryElement&&(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=(this._preview||this._rootElement).getBoundingClientRect()),a.preventDefault();const c=this._getConstrainedPointerPosition(l);if(this._hasMoved=!0,this._lastKnownPointerPosition=l,this._updatePointerDirectionDelta(c),this._dropContainer)this._updateActiveDropContainer(c,l);else{const u=this._activeTransform;u.x=c.x-this._pickupPositionOnPage.x+this._passiveTransform.x,u.y=c.y-this._pickupPositionOnPage.y+this._passiveTransform.y,this._applyRootElementTransform(u.x,u.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:c,event:a,distance:this._getDragDistance(c),delta:this._pointerDirectionDelta})})},this._pointerUp=a=>{this._endDragSequence(a)},this.withRootElement(e).withParent(t.parentDragRef||null),this._parentPositions=new wI(r,o),s.registerDragItem(this)}get disabled(){return this._disabled||!(!this._dropContainer||!this._dropContainer.disabled)}set disabled(e){const t=function Az(n){return null!=n&&"false"!=`${n}`}(e);t!==this._disabled&&(this._disabled=t,this._toggleNativeDragInteractions(),this._handles.forEach(r=>xa(r,t)))}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(e){this._handles=e.map(r=>ur(r)),this._handles.forEach(r=>xa(r,this.disabled)),this._toggleNativeDragInteractions();const t=new Set;return this._disabledHandles.forEach(r=>{this._handles.indexOf(r)>-1&&t.add(r)}),this._disabledHandles=t,this}withPreviewTemplate(e){return this._previewTemplate=e,this}withPlaceholderTemplate(e){return this._placeholderTemplate=e,this}withRootElement(e){const t=ur(e);return t!==this._rootElement&&(this._rootElement&&this._removeRootElementListeners(this._rootElement),this._ngZone.runOutsideAngular(()=>{t.addEventListener("mousedown",this._pointerDown,AI),t.addEventListener("touchstart",this._pointerDown,xI)}),this._initialTransform=void 0,this._rootElement=t),"undefined"!=typeof SVGElement&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(e){return this._boundaryElement=e?ur(e):null,this._resizeSubscription.unsubscribe(),e&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(e){return this._parentDragRef=e,this}dispose(){var e,t;this._removeRootElementListeners(this._rootElement),this.isDragging()&&(null===(e=this._rootElement)||void 0===e||e.remove()),null===(t=this._anchor)||void 0===t||t.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeSubscriptions(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=this._parentDragRef=null}isDragging(){return this._hasStartedDragging&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}disableHandle(e){!this._disabledHandles.has(e)&&this._handles.indexOf(e)>-1&&(this._disabledHandles.add(e),xa(e,!0))}enableHandle(e){this._disabledHandles.has(e)&&(this._disabledHandles.delete(e),xa(e,this.disabled))}withDirection(e){return this._direction=e,this}_withDropContainer(e){this._dropContainer=e}getFreeDragPosition(){const e=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:e.x,y:e.y}}setFreeDragPosition(e){return this._activeTransform={x:0,y:0},this._passiveTransform.x=e.x,this._passiveTransform.y=e.y,this._dropContainer||this._applyRootElementTransform(e.x,e.y),this}withPreviewContainer(e){return this._previewContainer=e,this}_sortFromLastPointerPosition(){const e=this._lastKnownPointerPosition;e&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(e),e)}_removeSubscriptions(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe()}_destroyPreview(){var e,t;null===(e=this._preview)||void 0===e||e.remove(),null===(t=this._previewRef)||void 0===t||t.destroy(),this._preview=this._previewRef=null}_destroyPlaceholder(){var e,t;null===(e=this._placeholder)||void 0===e||e.remove(),null===(t=this._placeholderRef)||void 0===t||t.destroy(),this._placeholder=this._placeholderRef=null}_endDragSequence(e){if(this._dragDropRegistry.isDragging(this)&&(this._removeSubscriptions(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),this._hasStartedDragging))if(this.released.next({source:this}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(e),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;const t=this._getPointerPositionOnPage(e);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(t),dropPoint:t})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(e){Dc(e)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();const t=this._dropContainer;if(t){const r=this._rootElement,i=r.parentNode,o=this._placeholder=this._createPlaceholderElement(),s=this._anchor=this._anchor||this._document.createComment(""),a=this._getShadowRoot();i.insertBefore(s,r),this._initialTransform=r.style.transform||"",this._preview=this._createPreviewElement(),CI(r,!1,qv),this._document.body.appendChild(i.replaceChild(o,r)),this._getPreviewInsertionPoint(i,a).appendChild(this._preview),this.started.next({source:this}),t.start(),this._initialContainer=t,this._initialIndex=t.getItemIndex(this)}else this.started.next({source:this}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(t?t.getScrollableParents():[])}_initializeDragSequence(e,t){this._parentDragRef&&t.stopPropagation();const r=this.isDragging(),i=Dc(t),o=!i&&0!==t.button,s=this._rootElement,a=mf(t),l=!i&&this._lastTouchEventTime&&this._lastTouchEventTime+800>Date.now(),c=i?function p3(n){const e=n.touches&&n.touches[0]||n.changedTouches&&n.changedTouches[0];return!(!e||-1!==e.identifier||null!=e.radiusX&&1!==e.radiusX||null!=e.radiusY&&1!==e.radiusY)}(t):function h3(n){return 0===n.buttons||0===n.offsetX&&0===n.offsetY}(t);if(a&&a.draggable&&"mousedown"===t.type&&t.preventDefault(),r||o||l||c)return;if(this._handles.length){const f=s.style;this._rootElementTapHighlight=f.webkitTapHighlightColor||"",f.webkitTapHighlightColor="transparent"}this._hasStartedDragging=this._hasMoved=!1,this._removeSubscriptions(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(f=>this._updateOnScroll(f)),this._boundaryElement&&(this._boundaryRect=$v(this._boundaryElement));const u=this._previewTemplate;this._pickupPositionInElement=u&&u.template&&!u.matchSize?{x:0,y:0}:this._getPointerPositionInElement(e,t);const d=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(t);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:d.x,y:d.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,t)}_cleanupDragArtifacts(e){CI(this._rootElement,!0,qv),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{const t=this._dropContainer,r=t.getItemIndex(this),i=this._getPointerPositionOnPage(e),o=this._getDragDistance(i),s=t._isOverContainer(i.x,i.y);this.ended.next({source:this,distance:o,dropPoint:i}),this.dropped.next({item:this,currentIndex:r,previousIndex:this._initialIndex,container:t,previousContainer:this._initialContainer,isPointerOverContainer:s,distance:o,dropPoint:i}),t.drop(this,r,this._initialIndex,this._initialContainer,s,o,i),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:e,y:t},{x:r,y:i}){let o=this._initialContainer._getSiblingContainerFromPosition(this,e,t);!o&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(e,t)&&(o=this._initialContainer),o&&o!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=o,this._dropContainer.enter(this,e,t,o===this._initialContainer&&o.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:o,currentIndex:o.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(r,i),this._dropContainer._sortItem(this,e,t,this._pointerDirectionDelta),this._applyPreviewTransform(e-this._pickupPositionInElement.x,t-this._pickupPositionInElement.y))}_createPreviewElement(){const e=this._previewTemplate,t=this.previewClass,r=e?e.template:null;let i;if(r&&e){const o=e.matchSize?this._rootElement.getBoundingClientRect():null,s=e.viewContainer.createEmbeddedView(r,e.context);s.detectChanges(),i=kI(s,this._document),this._previewRef=s,e.matchSize?NI(i,o):i.style.transform=bf(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else{const o=this._rootElement;i=SI(o),NI(i,o.getBoundingClientRect()),this._initialTransform&&(i.style.transform=this._initialTransform)}return zv(i.style,{"pointer-events":"none",margin:"0",position:"fixed",top:"0",left:"0","z-index":`${this._config.zIndex||1e3}`},qv),xa(i,!1),i.classList.add("cdk-drag-preview"),i.setAttribute("dir",this._direction),t&&(Array.isArray(t)?t.forEach(o=>i.classList.add(o)):i.classList.add(t)),i}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();const e=this._placeholder.getBoundingClientRect();this._preview.classList.add("cdk-drag-animating"),this._applyPreviewTransform(e.left,e.top);const t=function F3(n){const e=getComputedStyle(n),t=Wv(e,"transition-property"),r=t.find(a=>"transform"===a||"all"===a);if(!r)return 0;const i=t.indexOf(r),o=Wv(e,"transition-duration"),s=Wv(e,"transition-delay");return DI(o[i])+DI(s[i])}(this._preview);return 0===t?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(r=>{const i=s=>{var a;(!s||mf(s)===this._preview&&"transform"===s.propertyName)&&(null===(a=this._preview)||void 0===a||a.removeEventListener("transitionend",i),r(),clearTimeout(o))},o=setTimeout(i,1.5*t);this._preview.addEventListener("transitionend",i)}))}_createPlaceholderElement(){const e=this._placeholderTemplate,t=e?e.template:null;let r;return t?(this._placeholderRef=e.viewContainer.createEmbeddedView(t,e.context),this._placeholderRef.detectChanges(),r=kI(this._placeholderRef,this._document)):r=SI(this._rootElement),r.classList.add("cdk-drag-placeholder"),r}_getPointerPositionInElement(e,t){const r=this._rootElement.getBoundingClientRect(),i=e===this._rootElement?null:e,o=i?i.getBoundingClientRect():r,s=Dc(t)?t.targetTouches[0]:t,a=this._getViewportScrollPosition();return{x:o.left-r.left+(s.pageX-o.left-a.left),y:o.top-r.top+(s.pageY-o.top-a.top)}}_getPointerPositionOnPage(e){const t=this._getViewportScrollPosition(),r=Dc(e)?e.touches[0]||e.changedTouches[0]||{pageX:0,pageY:0}:e,i=r.pageX-t.left,o=r.pageY-t.top;if(this._ownerSVGElement){const s=this._ownerSVGElement.getScreenCTM();if(s){const a=this._ownerSVGElement.createSVGPoint();return a.x=i,a.y=o,a.matrixTransform(s.inverse())}}return{x:i,y:o}}_getConstrainedPointerPosition(e){const t=this._dropContainer?this._dropContainer.lockAxis:null;let{x:r,y:i}=this.constrainPosition?this.constrainPosition(e,this):e;if("x"===this.lockAxis||"x"===t?i=this._pickupPositionOnPage.y:("y"===this.lockAxis||"y"===t)&&(r=this._pickupPositionOnPage.x),this._boundaryRect){const{x:o,y:s}=this._pickupPositionInElement,a=this._boundaryRect,l=this._previewRect,c=a.top+s,u=a.bottom-(l.height-s);r=OI(r,a.left+o,a.right-(l.width-o)),i=OI(i,c,u)}return{x:r,y:i}}_updatePointerDirectionDelta(e){const{x:t,y:r}=e,i=this._pointerDirectionDelta,o=this._pointerPositionAtLastDirectionChange,s=Math.abs(t-o.x),a=Math.abs(r-o.y);return s>this._config.pointerDirectionChangeThreshold&&(i.x=t>o.x?1:-1,o.x=t),a>this._config.pointerDirectionChangeThreshold&&(i.y=r>o.y?1:-1,o.y=r),i}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;const e=this._handles.length>0||!this.isDragging();e!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=e,xa(this._rootElement,e))}_removeRootElementListeners(e){e.removeEventListener("mousedown",this._pointerDown,AI),e.removeEventListener("touchstart",this._pointerDown,xI)}_applyRootElementTransform(e,t){const r=bf(e,t),i=this._rootElement.style;null==this._initialTransform&&(this._initialTransform=i.transform&&"none"!=i.transform?i.transform:""),i.transform=_f(r,this._initialTransform)}_applyPreviewTransform(e,t){var r;const i=(null===(r=this._previewTemplate)||void 0===r?void 0:r.template)?void 0:this._initialTransform,o=bf(e,t);this._preview.style.transform=_f(o,i)}_getDragDistance(e){const t=this._pickupPositionOnPage;return t?{x:e.x-t.x,y:e.y-t.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:e,y:t}=this._passiveTransform;if(0===e&&0===t||this.isDragging()||!this._boundaryElement)return;const r=this._boundaryElement.getBoundingClientRect(),i=this._rootElement.getBoundingClientRect();if(0===r.width&&0===r.height||0===i.width&&0===i.height)return;const o=r.left-i.left,s=i.right-r.right,a=r.top-i.top,l=i.bottom-r.bottom;r.width>i.width?(o>0&&(e+=o),s>0&&(e-=s)):e=0,r.height>i.height?(a>0&&(t+=a),l>0&&(t-=l)):t=0,(e!==this._passiveTransform.x||t!==this._passiveTransform.y)&&this.setFreeDragPosition({y:t,x:e})}_getDragStartDelay(e){const t=this.dragStartDelay;return"number"==typeof t?t:Dc(e)?t.touch:t?t.mouse:0}_updateOnScroll(e){const t=this._parentPositions.handleScroll(e);if(t){const r=mf(e);this._boundaryRect&&r!==this._boundaryElement&&r.contains(this._boundaryElement)&&Cc(this._boundaryRect,t.top,t.left),this._pickupPositionOnPage.x+=t.left,this._pickupPositionOnPage.y+=t.top,this._dropContainer||(this._activeTransform.x-=t.left,this._activeTransform.y-=t.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){const e=this._parentPositions.positions.get(this._document);return e?e.scrollPosition:this._viewportRuler.getViewportScrollPosition()}_getShadowRoot(){return void 0===this._cachedShadowRoot&&(this._cachedShadowRoot=dI(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(e,t){const r=this._previewContainer||"global";if("parent"===r)return e;if("global"===r){const i=this._document;return t||i.fullscreenElement||i.webkitFullscreenElement||i.mozFullScreenElement||i.msFullscreenElement||i.body}return ur(r)}}function bf(n,e){return`translate3d(${Math.round(n)}px, ${Math.round(e)}px, 0)`}function OI(n,e,t){return Math.max(e,Math.min(t,n))}function Dc(n){return"t"===n.type[0]}function kI(n,e){const t=n.rootNodes;if(1===t.length&&t[0].nodeType===e.ELEMENT_NODE)return t[0];const r=e.createElement("div");return t.forEach(i=>r.appendChild(i)),r}function NI(n,e){n.style.width=`${e.width}px`,n.style.height=`${e.height}px`,n.style.transform=bf(e.left,e.top)}function Ec(n,e){return Math.max(0,Math.min(e,n))}class H3{constructor(e,t,r,i,o){this._dragDropRegistry=t,this._ngZone=i,this._viewportRuler=o,this.disabled=!1,this.sortingDisabled=!1,this.autoScrollDisabled=!1,this.autoScrollStep=2,this.enterPredicate=()=>!0,this.sortPredicate=()=>!0,this.beforeStarted=new Me,this.entered=new Me,this.exited=new Me,this.dropped=new Me,this.sorted=new Me,this._isDragging=!1,this._itemPositions=[],this._previousSwap={drag:null,delta:0,overlaps:!1},this._draggables=[],this._siblings=[],this._orientation="vertical",this._activeSiblings=new Set,this._direction="ltr",this._viewportScrollSubscription=ke.EMPTY,this._verticalScrollDirection=0,this._horizontalScrollDirection=0,this._stopScrollTimers=new Me,this._cachedShadowRoot=null,this._startScrollInterval=()=>{this._stopScrolling(),function m3(n=0,e=bc){return(!Uv(n)||n<0)&&(n=0),(!e||"function"!=typeof e.schedule)&&(e=bc),new Ne(t=>(t.add(e.schedule(v3,n,{subscriber:t,counter:0,period:n})),t))}(0,vI).pipe(yI(this._stopScrollTimers)).subscribe(()=>{const s=this._scrollNode,a=this.autoScrollStep;1===this._verticalScrollDirection?s.scrollBy(0,-a):2===this._verticalScrollDirection&&s.scrollBy(0,a),1===this._horizontalScrollDirection?s.scrollBy(-a,0):2===this._horizontalScrollDirection&&s.scrollBy(a,0)})},this.element=ur(e),this._document=r,this.withScrollableParents([this.element]),t.registerDropContainer(this),this._parentPositions=new wI(r,o)}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(e,t,r,i){let o;this._draggingStarted(),null==i?(o=this.sortingDisabled?this._draggables.indexOf(e):-1,-1===o&&(o=this._getItemIndexFromPointerPosition(e,t,r))):o=i;const s=this._activeDraggables,a=s.indexOf(e),l=e.getPlaceholderElement();let c=s[o];if(c===e&&(c=s[o+1]),!c&&(null==o||-1===o||o-1&&s.splice(a,1),c&&!this._dragDropRegistry.isDragging(c)){const u=c.getRootElement();u.parentElement.insertBefore(l,u),s.splice(o,0,e)}else ur(this.element).appendChild(l),s.push(e);l.style.transform="",this._cacheItemPositions(),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:e,container:this,currentIndex:this.getItemIndex(e)})}exit(e){this._reset(),this.exited.next({item:e,container:this})}drop(e,t,r,i,o,s,a){this._reset(),this.dropped.next({item:e,currentIndex:t,previousIndex:r,container:this,previousContainer:i,isPointerOverContainer:o,distance:s,dropPoint:a})}withItems(e){const t=this._draggables;return this._draggables=e,e.forEach(r=>r._withDropContainer(this)),this.isDragging()&&(t.filter(i=>i.isDragging()).every(i=>-1===e.indexOf(i))?this._reset():this._cacheItems()),this}withDirection(e){return this._direction=e,this}connectedTo(e){return this._siblings=e.slice(),this}withOrientation(e){return this._orientation=e,this}withScrollableParents(e){const t=ur(this.element);return this._scrollableElements=-1===e.indexOf(t)?[t,...e]:e.slice(),this}getScrollableParents(){return this._scrollableElements}getItemIndex(e){return this._isDragging?("horizontal"===this._orientation&&"rtl"===this._direction?this._itemPositions.slice().reverse():this._itemPositions).findIndex(r=>r.drag===e):this._draggables.indexOf(e)}isReceiving(){return this._activeSiblings.size>0}_sortItem(e,t,r,i){if(this.sortingDisabled||!this._clientRect||!EI(this._clientRect,.05,t,r))return;const o=this._itemPositions,s=this._getItemIndexFromPointerPosition(e,t,r,i);if(-1===s&&o.length>0)return;const a="horizontal"===this._orientation,l=o.findIndex(m=>m.drag===e),c=o[s],d=c.clientRect,f=l>s?1:-1,h=this._getItemOffsetPx(o[l].clientRect,d,f),p=this._getSiblingOffsetPx(l,o,f),g=o.slice();(function V3(n,e,t){const r=Ec(e,n.length-1),i=Ec(t,n.length-1);if(r===i)return;const o=n[r],s=i{if(g[y]===m)return;const v=m.drag===e,b=v?h:p,_=v?e.getPlaceholderElement():m.drag.getRootElement();m.offset+=b,a?(_.style.transform=_f(`translate3d(${Math.round(m.offset)}px, 0, 0)`,m.initialTransform),Cc(m.clientRect,0,b)):(_.style.transform=_f(`translate3d(0, ${Math.round(m.offset)}px, 0)`,m.initialTransform),Cc(m.clientRect,b,0))}),this._previousSwap.overlaps=Gv(d,t,r),this._previousSwap.drag=c.drag,this._previousSwap.delta=a?i.x:i.y}_startScrollingIfNecessary(e,t){if(this.autoScrollDisabled)return;let r,i=0,o=0;if(this._parentPositions.positions.forEach((s,a)=>{a===this._document||!s.clientRect||r||EI(s.clientRect,.05,e,t)&&([i,o]=function U3(n,e,t,r){const i=FI(e,r),o=LI(e,t);let s=0,a=0;if(i){const l=n.scrollTop;1===i?l>0&&(s=1):n.scrollHeight-l>n.clientHeight&&(s=2)}if(o){const l=n.scrollLeft;1===o?l>0&&(a=1):n.scrollWidth-l>n.clientWidth&&(a=2)}return[s,a]}(a,s.clientRect,e,t),(i||o)&&(r=a))}),!i&&!o){const{width:s,height:a}=this._viewportRuler.getViewportSize(),l={width:s,height:a,top:0,right:s,bottom:a,left:0};i=FI(l,t),o=LI(l,e),r=window}r&&(i!==this._verticalScrollDirection||o!==this._horizontalScrollDirection||r!==this._scrollNode)&&(this._verticalScrollDirection=i,this._horizontalScrollDirection=o,this._scrollNode=r,(i||o)&&r?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){const e=ur(this.element).style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=e.msScrollSnapType||e.scrollSnapType||"",e.scrollSnapType=e.msScrollSnapType="none",this._cacheItems(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){const e=ur(this.element);this._parentPositions.cache(this._scrollableElements),this._clientRect=this._parentPositions.positions.get(e).clientRect}_cacheItemPositions(){const e="horizontal"===this._orientation;this._itemPositions=this._activeDraggables.map(t=>{const r=t.getVisibleElement();return{drag:t,offset:0,initialTransform:r.style.transform||"",clientRect:$v(r)}}).sort((t,r)=>e?t.clientRect.left-r.clientRect.left:t.clientRect.top-r.clientRect.top)}_reset(){this._isDragging=!1;const e=ur(this.element).style;e.scrollSnapType=e.msScrollSnapType=this._initialScrollSnap,this._activeDraggables.forEach(t=>{var r;const i=t.getRootElement();if(i){const o=null===(r=this._itemPositions.find(s=>s.drag===t))||void 0===r?void 0:r.initialTransform;i.style.transform=o||""}}),this._siblings.forEach(t=>t._stopReceiving(this)),this._activeDraggables=[],this._itemPositions=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1,this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_getSiblingOffsetPx(e,t,r){const i="horizontal"===this._orientation,o=t[e].clientRect,s=t[e+-1*r];let a=o[i?"width":"height"]*r;if(s){const l=i?"left":"top",c=i?"right":"bottom";-1===r?a-=s.clientRect[l]-o[c]:a+=o[l]-s.clientRect[c]}return a}_getItemOffsetPx(e,t,r){const i="horizontal"===this._orientation;let o=i?t.left-e.left:t.top-e.top;return-1===r&&(o+=i?t.width-e.width:t.height-e.height),o}_shouldEnterAsFirstChild(e,t){if(!this._activeDraggables.length)return!1;const r=this._itemPositions,i="horizontal"===this._orientation;if(r[0].drag!==this._activeDraggables[0]){const s=r[r.length-1].clientRect;return i?e>=s.right:t>=s.bottom}{const s=r[0].clientRect;return i?e<=s.left:t<=s.top}}_getItemIndexFromPointerPosition(e,t,r,i){const o="horizontal"===this._orientation,s=this._itemPositions.findIndex(({drag:a,clientRect:l})=>{if(a===e)return!1;if(i){const c=o?i.x:i.y;if(a===this._previousSwap.drag&&this._previousSwap.overlaps&&c===this._previousSwap.delta)return!1}return o?t>=Math.floor(l.left)&&t=Math.floor(l.top)&&ri._canReceive(e,t,r))}_canReceive(e,t,r){if(!this._clientRect||!Gv(this._clientRect,t,r)||!this.enterPredicate(e,this))return!1;const i=this._getShadowRoot().elementFromPoint(t,r);if(!i)return!1;const o=ur(this.element);return i===o||o.contains(i)}_startReceiving(e,t){const r=this._activeSiblings;!r.has(e)&&t.every(i=>this.enterPredicate(i,this)||this._draggables.indexOf(i)>-1)&&(r.add(e),this._cacheParentPositions(),this._listenToScrollEvents())}_stopReceiving(e){this._activeSiblings.delete(e),this._viewportScrollSubscription.unsubscribe()}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(e=>{if(this.isDragging()){const t=this._parentPositions.handleScroll(e);t&&(this._itemPositions.forEach(({clientRect:r})=>{Cc(r,t.top,t.left)}),this._itemPositions.forEach(({drag:r})=>{this._dragDropRegistry.isDragging(r)&&r._sortFromLastPointerPosition()}))}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){const e=dI(ur(this.element));this._cachedShadowRoot=e||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){const e=this._activeDraggables.filter(t=>t.isDragging());this._siblings.forEach(t=>t._startReceiving(this,e))}}function FI(n,e){const{top:t,bottom:r,height:i}=n,o=.05*i;return e>=t-o&&e<=t+o?1:e>=r-o&&e<=r+o?2:0}function LI(n,e){const{left:t,right:r,width:i}=n,o=.05*i;return e>=t-o&&e<=t+o?1:e>=r-o&&e<=r+o?2:0}const Cf=_c({passive:!1,capture:!0});let z3=(()=>{class n{constructor(t,r){this._ngZone=t,this._dropInstances=new Set,this._dragInstances=new Set,this._activeDragInstances=[],this._globalListeners=new Map,this._draggingPredicate=i=>i.isDragging(),this.pointerMove=new Me,this.pointerUp=new Me,this.scroll=new Me,this._preventDefaultWhileDragging=i=>{this._activeDragInstances.length>0&&i.preventDefault()},this._persistentTouchmoveListener=i=>{this._activeDragInstances.length>0&&(this._activeDragInstances.some(this._draggingPredicate)&&i.preventDefault(),this.pointerMove.next(i))},this._document=r}registerDropContainer(t){this._dropInstances.has(t)||this._dropInstances.add(t)}registerDragItem(t){this._dragInstances.add(t),1===this._dragInstances.size&&this._ngZone.runOutsideAngular(()=>{this._document.addEventListener("touchmove",this._persistentTouchmoveListener,Cf)})}removeDropContainer(t){this._dropInstances.delete(t)}removeDragItem(t){this._dragInstances.delete(t),this.stopDragging(t),0===this._dragInstances.size&&this._document.removeEventListener("touchmove",this._persistentTouchmoveListener,Cf)}startDragging(t,r){if(!(this._activeDragInstances.indexOf(t)>-1)&&(this._activeDragInstances.push(t),1===this._activeDragInstances.length)){const i=r.type.startsWith("touch");this._globalListeners.set(i?"touchend":"mouseup",{handler:o=>this.pointerUp.next(o),options:!0}).set("scroll",{handler:o=>this.scroll.next(o),options:!0}).set("selectstart",{handler:this._preventDefaultWhileDragging,options:Cf}),i||this._globalListeners.set("mousemove",{handler:o=>this.pointerMove.next(o),options:Cf}),this._ngZone.runOutsideAngular(()=>{this._globalListeners.forEach((o,s)=>{this._document.addEventListener(s,o.handler,o.options)})})}}stopDragging(t){const r=this._activeDragInstances.indexOf(t);r>-1&&(this._activeDragInstances.splice(r,1),0===this._activeDragInstances.length&&this._clearGlobalListeners())}isDragging(t){return this._activeDragInstances.indexOf(t)>-1}scrolled(t){const r=[this.scroll];return t&&t!==this._document&&r.push(new Ne(i=>this._ngZone.runOutsideAngular(()=>{const s=a=>{this._activeDragInstances.length&&i.next(a)};return t.addEventListener("scroll",s,!0),()=>{t.removeEventListener("scroll",s,!0)}}))),vp(...r)}ngOnDestroy(){this._dragInstances.forEach(t=>this.removeDragItem(t)),this._dropInstances.forEach(t=>this.removeDropContainer(t)),this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_clearGlobalListeners(){this._globalListeners.forEach((t,r)=>{this._document.removeEventListener(r,t.handler,t.options)}),this._globalListeners.clear()}}return n.\u0275fac=function(t){return new(t||n)(R(ot),R(Vt))},n.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const W3={dragStartThreshold:5,pointerDirectionChangeThreshold:5};let $3=(()=>{class n{constructor(t,r,i,o){this._document=t,this._ngZone=r,this._viewportRuler=i,this._dragDropRegistry=o}createDrag(t,r=W3){return new j3(t,r,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry)}createDropList(t){return new H3(t,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}}return n.\u0275fac=function(t){return new(t||n)(R(Vt),R(ot),R(R3),R(z3))},n.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),BI=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=ut({type:n}),n.\u0275inj=at({providers:[$3],imports:[P3]}),n})(),n4=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=ut({type:n}),n.\u0275inj=at({imports:[[Pr,Mz,vc,pf,BI],vc,BI]}),n})();const r4=["headerchkbox"];function o4(n,e){1&n&&bn(0)}function s4(n,e){if(1&n&&(H(0,"div",6),Ni(1),q(2,o4,1,0,"ng-container",7),W()),2&n){const t=U();N(2),k("ngTemplateOutlet",t.headerTemplate)}}const jI=function(n){return{"p-checkbox-disabled":n}},a4=function(n,e,t){return{"p-highlight":n,"p-focus":e,"p-disabled":t}},VI=function(n){return{"pi pi-check":n}};function l4(n,e){if(1&n){const t=ni();H(0,"div",10)(1,"div",11)(2,"input",12),Le("focus",function(){return Bt(t),U(2).onHeaderCheckboxFocus()})("blur",function(){return Bt(t),U(2).onHeaderCheckboxBlur()})("keydown.space",function(i){return Bt(t),U(2).toggleAll(i)}),W()(),H(3,"div",13,14),Le("click",function(i){return Bt(t),U(2).toggleAll(i)}),$t(5,"span",15),W()()}if(2&n){const t=U(2);k("ngClass",Or(5,jI,t.disabled||t.toggleAllDisabled)),N(2),k("checked",t.allChecked)("disabled",t.disabled||t.toggleAllDisabled),N(1),k("ngClass",function pw(n,e,t,r,i,o){return vw(T(),vn(),n,e,t,r,i,o)}(7,a4,t.allChecked,t.headerCheckboxFocus,t.disabled||t.toggleAllDisabled)),N(2),k("ngClass",Or(11,VI,t.allChecked))}}function c4(n,e){if(1&n){const t=ni();H(0,"div",16)(1,"input",17),Le("input",function(i){return Bt(t),U(2).onFilter(i)}),W(),$t(2,"span",18),W()}if(2&n){const t=U(2);N(1),k("value",t.filterValue||"")("disabled",t.disabled),Gn("placeholder",t.filterPlaceHolder)("aria-label",t.ariaFilterLabel)}}function u4(n,e){if(1&n&&(H(0,"div",6),q(1,l4,6,13,"div",8),q(2,c4,3,4,"div",9),W()),2&n){const t=U();N(1),k("ngIf",t.checkbox&&t.multiple&&t.showToggleAll),N(1),k("ngIf",t.filter)}}function d4(n,e){if(1&n&&(H(0,"span"),Ye(1),W()),2&n){const t=U().$implicit,r=U(2);N(1),An(r.getOptionGroupLabel(t)||"empty")}}function f4(n,e){1&n&&bn(0)}function h4(n,e){1&n&&bn(0)}const Kv=function(n){return{$implicit:n}};function p4(n,e){if(1&n&&(H(0,"li",20),q(1,d4,2,1,"span",3),q(2,f4,1,0,"ng-container",21),W(),q(3,h4,1,0,"ng-container",21)),2&n){const t=e.$implicit,r=U(2),i=co(8);N(1),k("ngIf",!r.groupTemplate),N(1),k("ngTemplateOutlet",r.groupTemplate)("ngTemplateOutletContext",Or(5,Kv,t)),N(1),k("ngTemplateOutlet",i)("ngTemplateOutletContext",Or(7,Kv,r.getOptionGroupChildren(t)))}}function g4(n,e){if(1&n&&(Oi(0),q(1,p4,4,9,"ng-template",19),ki()),2&n){const t=U();N(1),k("ngForOf",t.optionsToRender)}}function m4(n,e){1&n&&bn(0)}function v4(n,e){if(1&n&&(Oi(0),q(1,m4,1,0,"ng-container",21),ki()),2&n){const t=U(),r=co(8);N(1),k("ngTemplateOutlet",r)("ngTemplateOutletContext",Or(2,Kv,t.optionsToRender))}}const y4=function(n){return{"p-highlight":n}};function _4(n,e){if(1&n&&(H(0,"div",10)(1,"div",25),$t(2,"span",15),W()()),2&n){const t=U().$implicit,r=U(2);k("ngClass",Or(3,jI,r.disabled||r.isOptionDisabled(t))),N(1),k("ngClass",Or(5,y4,r.isSelected(t))),N(1),k("ngClass",Or(7,VI,r.isSelected(t)))}}function b4(n,e){if(1&n&&(H(0,"span"),Ye(1),W()),2&n){const t=U().$implicit,r=U(2);N(1),An(r.getOptionLabel(t))}}function C4(n,e){1&n&&bn(0)}const D4=function(n,e){return{"p-listbox-item":!0,"p-highlight":n,"p-disabled":e}},E4=function(n,e){return{$implicit:n,index:e}};function w4(n,e){if(1&n){const t=ni();H(0,"li",24),Le("click",function(i){const s=Bt(t).$implicit;return U(2).onOptionClick(i,s)})("dblclick",function(i){const s=Bt(t).$implicit;return U(2).onOptionDoubleClick(i,s)})("touchend",function(){const o=Bt(t).$implicit;return U(2).onOptionTouchEnd(o)})("keydown",function(i){const s=Bt(t).$implicit;return U(2).onOptionKeyDown(i,s)}),q(1,_4,3,9,"div",8),q(2,b4,2,1,"span",3),q(3,C4,1,0,"ng-container",21),W()}if(2&n){const t=e.$implicit,r=e.index,i=U(2);k("ngClass",Cm(8,D4,i.isSelected(t),i.isOptionDisabled(t))),Gn("tabindex",i.disabled||i.isOptionDisabled(t)?null:"0")("aria-label",i.getOptionLabel(t))("aria-selected",i.isSelected(t)),N(1),k("ngIf",i.checkbox&&i.multiple),N(1),k("ngIf",!i.itemTemplate),N(1),k("ngTemplateOutlet",i.itemTemplate)("ngTemplateOutletContext",Cm(11,E4,t,r))}}function S4(n,e){if(1&n&&(Oi(0),Ye(1),ki()),2&n){const t=U(3);N(1),uo(" ",t.emptyFilterMessageLabel," ")}}function M4(n,e){1&n&&bn(0,null,28)}function I4(n,e){if(1&n&&(H(0,"li",26),q(1,S4,2,1,"ng-container",27),q(2,M4,2,0,"ng-container",7),W()),2&n){const t=U(2);N(1),k("ngIf",!t.emptyFilterTemplate&&!t.emptyTemplate)("ngIfElse",t.emptyFilter),N(1),k("ngTemplateOutlet",t.emptyFilterTemplate||t.emptyTemplate)}}function T4(n,e){if(1&n&&(Oi(0),Ye(1),ki()),2&n){const t=U(3);N(1),uo(" ",t.emptyMessageLabel," ")}}function x4(n,e){1&n&&bn(0,null,29)}function A4(n,e){if(1&n&&(H(0,"li",26),q(1,T4,2,1,"ng-container",27),q(2,x4,2,0,"ng-container",7),W()),2&n){const t=U(2);N(1),k("ngIf",!t.emptyTemplate)("ngIfElse",t.empty),N(1),k("ngTemplateOutlet",t.emptyTemplate)}}function O4(n,e){if(1&n&&(q(0,w4,4,14,"li",22),q(1,I4,3,3,"li",23),q(2,A4,3,3,"li",23)),2&n){const t=e.$implicit,r=U();k("ngForOf",t),N(1),k("ngIf",r.hasFilter()&&r.isEmpty(t)),N(1),k("ngIf",!r.hasFilter()&&r.isEmpty(t))}}function k4(n,e){1&n&&bn(0)}function N4(n,e){if(1&n&&(H(0,"div",30),Ni(1,1),q(2,k4,1,0,"ng-container",7),W()),2&n){const t=U();N(2),k("ngTemplateOutlet",t.footerTemplate)}}const R4=[[["p-header"]],[["p-footer"]]],P4=function(n){return{"p-listbox p-component":!0,"p-disabled":n}},F4=["p-header","p-footer"],L4={provide:cr,useExisting:Ve(()=>B4),multi:!0};let B4=(()=>{class n{constructor(t,r,i,o){this.el=t,this.cd=r,this.filterService=i,this.config=o,this.checkbox=!1,this.filter=!1,this.filterMatchMode="contains",this.metaKeySelection=!0,this.showToggleAll=!0,this.optionGroupChildren="items",this.onChange=new Ae,this.onClick=new Ae,this.onDblClick=new Ae,this.onModelChange=()=>{},this.onModelTouched=()=>{}}get options(){return this._options}set options(t){this._options=t,this.hasFilter()&&this.activateFilter()}get filterValue(){return this._filterValue}set filterValue(t){this._filterValue=t,this.activateFilter()}ngOnInit(){this.translationSubscription=this.config.translationObserver.subscribe(()=>{this.cd.markForCheck()})}ngAfterContentInit(){this.templates.forEach(t=>{switch(t.getType()){case"item":default:this.itemTemplate=t.template;break;case"group":this.groupTemplate=t.template;break;case"header":this.headerTemplate=t.template;break;case"footer":this.footerTemplate=t.template;break;case"empty":this.emptyTemplate=t.template;break;case"emptyfilter":this.emptyFilterTemplate=t.template}})}getOptionLabel(t){return this.optionLabel?pt.resolveFieldData(t,this.optionLabel):null!=t.label?t.label:t}getOptionGroupChildren(t){return this.optionGroupChildren?pt.resolveFieldData(t,this.optionGroupChildren):t.items}getOptionGroupLabel(t){return this.optionGroupLabel?pt.resolveFieldData(t,this.optionGroupLabel):null!=t.label?t.label:t}getOptionValue(t){return this.optionValue?pt.resolveFieldData(t,this.optionValue):this.optionLabel||void 0===t.value?t:t.value}isOptionDisabled(t){return this.optionDisabled?pt.resolveFieldData(t,this.optionDisabled):void 0!==t.disabled&&t.disabled}writeValue(t){this.value=t,this.cd.markForCheck()}registerOnChange(t){this.onModelChange=t}registerOnTouched(t){this.onModelTouched=t}setDisabledState(t){this.disabled=t,this.cd.markForCheck()}onOptionClick(t,r){this.disabled||this.isOptionDisabled(r)||this.readonly||(this.multiple?this.checkbox?this.onOptionClickCheckbox(t,r):this.onOptionClickMultiple(t,r):this.onOptionClickSingle(t,r),this.onClick.emit({originalEvent:t,option:r,value:this.value}),this.optionTouched=!1)}onOptionTouchEnd(t){this.disabled||this.isOptionDisabled(t)||this.readonly||(this.optionTouched=!0)}onOptionDoubleClick(t,r){this.disabled||this.isOptionDisabled(r)||this.readonly||this.onDblClick.emit({originalEvent:t,option:r,value:this.value})}onOptionClickSingle(t,r){let i=this.isSelected(r),o=!1;if(!this.optionTouched&&this.metaKeySelection){let a=t.metaKey||t.ctrlKey;i?a&&(this.value=null,o=!0):(this.value=this.getOptionValue(r),o=!0)}else this.value=i?null:this.getOptionValue(r),o=!0;o&&(this.onModelChange(this.value),this.onChange.emit({originalEvent:t,value:this.value}))}onOptionClickMultiple(t,r){let i=this.isSelected(r),o=!1;if(!this.optionTouched&&this.metaKeySelection){let a=t.metaKey||t.ctrlKey;i?(a?this.removeOption(r):this.value=[this.getOptionValue(r)],o=!0):(this.value=a&&this.value||[],this.value=[...this.value,this.getOptionValue(r)],o=!0)}else i?this.removeOption(r):this.value=[...this.value||[],this.getOptionValue(r)],o=!0;o&&(this.onModelChange(this.value),this.onChange.emit({originalEvent:t,value:this.value}))}onOptionClickCheckbox(t,r){this.disabled||this.readonly||(this.isSelected(r)?this.removeOption(r):(this.value=this.value?this.value:[],this.value=[...this.value,this.getOptionValue(r)]),this.onModelChange(this.value),this.onChange.emit({originalEvent:t,value:this.value}))}removeOption(t){this.value=this.value.filter(r=>!pt.equals(r,this.getOptionValue(t),this.dataKey))}isSelected(t){let r=!1,i=this.getOptionValue(t);if(this.multiple){if(this.value)for(let o of this.value)if(pt.equals(o,i,this.dataKey)){r=!0;break}}else r=pt.equals(this.value,i,this.dataKey);return r}get allChecked(){let t=this.optionsToRender;if(!t||0===t.length)return!1;{let r=0,i=0,o=0,s=this.group?0:this.optionsToRender.length;for(let a of t)if(this.group)for(let l of this.getOptionGroupChildren(a)){let c=this.isOptionDisabled(l),u=this.isSelected(l);if(c)u?r++:i++;else{if(!u)return!1;o++}s++}else{let l=this.isOptionDisabled(a),c=this.isSelected(a);if(l)c?r++:i++;else{if(!c)return!1;o++}}return s===r||s===o||o&&s===o+i+r}}get optionsToRender(){return this._filteredOptions||this.options}get emptyMessageLabel(){return this.emptyMessage||this.config.getTranslation(aI.EMPTY_MESSAGE)}get emptyFilterMessageLabel(){return this.emptyFilterMessage||this.config.getTranslation(aI.EMPTY_FILTER_MESSAGE)}hasFilter(){return this._filterValue&&this._filterValue.trim().length>0}isEmpty(t){return!t||t&&0===t.length}onFilter(t){this._filterValue=t.target.value,this.activateFilter()}activateFilter(){if(this.hasFilter()&&this._options)if(this.group){let t=(this.optionLabel||"label").split(","),r=[];for(let i of this.options){let o=this.filterService.filter(this.getOptionGroupChildren(i),t,this.filterValue,this.filterMatchMode,this.filterLocale);o&&o.length&&r.push(Object.assign(Object.assign({},i),{[this.optionGroupChildren]:o}))}this._filteredOptions=r}else this._filteredOptions=this._options.filter(t=>this.filterService.filters[this.filterMatchMode](this.getOptionLabel(t),this._filterValue,this.filterLocale));else this._filteredOptions=null}get toggleAllDisabled(){let t=this.optionsToRender;if(!t||0===t.length)return!0;for(let r of t)if(!this.isOptionDisabled(r))return!1;return!0}toggleAll(t){this.disabled||this.toggleAllDisabled||this.readonly||(this.allChecked?this.uncheckAll():this.checkAll(),this.onModelChange(this.value),this.onChange.emit({originalEvent:t,value:this.value}),t.preventDefault())}checkAll(){let r=[];this.optionsToRender.forEach(i=>{if(this.group){let o=this.getOptionGroupChildren(i);o&&o.forEach(s=>{let a=this.isOptionDisabled(s);(!a||a&&this.isSelected(s))&&r.push(this.getOptionValue(s))})}else{let o=this.isOptionDisabled(i);(!o||o&&this.isSelected(i))&&r.push(this.getOptionValue(i))}}),this.value=r}uncheckAll(){let r=[];this.optionsToRender.forEach(i=>{this.group?i.items&&i.items.forEach(o=>{this.isOptionDisabled(o)&&this.isSelected(o)&&r.push(this.getOptionValue(o))}):this.isOptionDisabled(i)&&this.isSelected(i)&&r.push(this.getOptionValue(i))}),this.value=r}onOptionKeyDown(t,r){if(this.readonly)return;let i=t.currentTarget;switch(t.which){case 40:var o=this.findNextItem(i);o&&o.focus(),t.preventDefault();break;case 38:var s=this.findPrevItem(i);s&&s.focus(),t.preventDefault();break;case 13:this.onOptionClick(t,r),t.preventDefault()}}findNextItem(t){let r=t.nextElementSibling;return r?Pt.hasClass(r,"p-disabled")||Pt.isHidden(r)||Pt.hasClass(r,"p-listbox-item-group")?this.findNextItem(r):r:null}findPrevItem(t){let r=t.previousElementSibling;return r?Pt.hasClass(r,"p-disabled")||Pt.isHidden(r)||Pt.hasClass(r,"p-listbox-item-group")?this.findPrevItem(r):r:null}onHeaderCheckboxFocus(){this.headerCheckboxFocus=!0}onHeaderCheckboxBlur(){this.headerCheckboxFocus=!1}ngOnDestroy(){this.translationSubscription&&this.translationSubscription.unsubscribe()}}return n.\u0275fac=function(t){return new(t||n)(w(_t),w(es),w(Ez),w(sI))},n.\u0275cmp=Et({type:n,selectors:[["p-listbox"]],contentQueries:function(t,r,i){if(1&t&&(ai(i,lI,5),ai(i,cI,5),ai(i,jv,4)),2&t){let o;qn(o=Kn())&&(r.headerFacet=o.first),qn(o=Kn())&&(r.footerFacet=o.first),qn(o=Kn())&&(r.templates=o)}},viewQuery:function(t,r){if(1&t&&xd(r4,5),2&t){let i;qn(i=Kn())&&(r.headerCheckboxViewChild=i.first)}},hostAttrs:[1,"p-element"],inputs:{multiple:"multiple",style:"style",styleClass:"styleClass",listStyle:"listStyle",listStyleClass:"listStyleClass",readonly:"readonly",disabled:"disabled",checkbox:"checkbox",filter:"filter",filterMatchMode:"filterMatchMode",filterLocale:"filterLocale",metaKeySelection:"metaKeySelection",dataKey:"dataKey",showToggleAll:"showToggleAll",optionLabel:"optionLabel",optionValue:"optionValue",optionGroupChildren:"optionGroupChildren",optionGroupLabel:"optionGroupLabel",optionDisabled:"optionDisabled",ariaFilterLabel:"ariaFilterLabel",filterPlaceHolder:"filterPlaceHolder",emptyFilterMessage:"emptyFilterMessage",emptyMessage:"emptyMessage",group:"group",options:"options",filterValue:"filterValue"},outputs:{onChange:"onChange",onClick:"onClick",onDblClick:"onDblClick"},features:[Qe([L4])],ngContentSelectors:F4,decls:10,vars:15,consts:[[3,"ngClass","ngStyle"],["class","p-listbox-header",4,"ngIf"],["role","listbox","aria-multiselectable","multiple",1,"p-listbox-list"],[4,"ngIf"],["itemslist",""],["class","p-listbox-footer",4,"ngIf"],[1,"p-listbox-header"],[4,"ngTemplateOutlet"],["class","p-checkbox p-component",3,"ngClass",4,"ngIf"],["class","p-listbox-filter-container",4,"ngIf"],[1,"p-checkbox","p-component",3,"ngClass"],[1,"p-hidden-accessible"],["type","checkbox","readonly","readonly",3,"checked","disabled","focus","blur","keydown.space"],[1,"p-checkbox-box",3,"ngClass","click"],["headerchkbox",""],[1,"p-checkbox-icon",3,"ngClass"],[1,"p-listbox-filter-container"],["type","text",1,"p-listbox-filter","p-inputtext","p-component",3,"value","disabled","input"],[1,"p-listbox-filter-icon","pi","pi-search"],["ngFor","",3,"ngForOf"],[1,"p-listbox-item-group"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["pRipple","","role","option",3,"ngClass","click","dblclick","touchend","keydown",4,"ngFor","ngForOf"],["class","p-listbox-empty-message",4,"ngIf"],["pRipple","","role","option",3,"ngClass","click","dblclick","touchend","keydown"],[1,"p-checkbox-box",3,"ngClass"],[1,"p-listbox-empty-message"],[4,"ngIf","ngIfElse"],["emptyFilter",""],["empty",""],[1,"p-listbox-footer"]],template:function(t,r){1&t&&(ma(R4),H(0,"div",0),q(1,s4,3,1,"div",1),q(2,u4,3,2,"div",1),H(3,"div",0)(4,"ul",2),q(5,g4,2,1,"ng-container",3),q(6,v4,2,4,"ng-container",3),q(7,O4,3,3,"ng-template",null,4,Jo),W()(),q(9,N4,3,1,"div",5),W()),2&t&&(_d(r.styleClass),k("ngClass",Or(13,P4,r.disabled))("ngStyle",r.style),N(1),k("ngIf",r.headerFacet||r.headerTemplate),N(1),k("ngIf",r.checkbox&&r.multiple&&r.showToggleAll||r.filter),N(1),_d(r.listStyleClass),k("ngClass","p-listbox-list-wrapper")("ngStyle",r.listStyle),N(2),k("ngIf",r.group),N(1),k("ngIf",!r.group),N(3),k("ngIf",r.footerFacet||r.footerTemplate))},directives:[uc,ov,ho,sv,Kd,wz],styles:[".p-listbox-list-wrapper{overflow:auto}.p-listbox-list{list-style-type:none;margin:0;padding:0}.p-listbox-item{cursor:pointer;position:relative;overflow:hidden;display:flex;align-items:center;-webkit-user-select:none;user-select:none}.p-listbox-header{display:flex;align-items:center}.p-listbox-filter-container{position:relative;flex:1 1 auto}.p-listbox-filter-icon{position:absolute;top:50%;margin-top:-.5rem}.p-listbox-filter{width:100%}\n"],encapsulation:2,changeDetection:0}),n})(),j4=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=ut({type:n}),n.\u0275inj=at({imports:[[Pr,vc,pf],vc]}),n})();function an(n){this.content=n}an.prototype={constructor:an,find:function(n){for(var e=0;e>1}},an.from=function(n){if(n instanceof an)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new an(e)};const HI=an;function UI(n,e,t){for(var r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;var i=n.child(r),o=e.child(r);if(i!=o){if(!i.sameMarkup(o))return t;if(i.isText&&i.text!=o.text){for(var s=0;i.text[s]==o.text[s];s++)t++;return t}if(i.content.size||o.content.size){var a=UI(i.content,o.content,t+1);if(null!=a)return a}t+=i.nodeSize}else t+=i.nodeSize}}function zI(n,e,t,r){for(var i=n.childCount,o=e.childCount;;){if(0==i||0==o)return i==o?null:{a:t,b:r};var s=n.child(--i),a=e.child(--o),l=s.nodeSize;if(s!=a){if(!s.sameMarkup(a))return{a:t,b:r};if(s.isText&&s.text!=a.text){for(var c=0,u=Math.min(s.text.length,a.text.length);ce&&!1!==r(l,i+a,o,s)&&l.content.size){var u=a+1;l.nodesBetween(Math.max(0,e-u),Math.min(l.content.size,t-u),r,i+u)}a=c}},M.prototype.descendants=function(e){this.nodesBetween(0,this.size,e)},M.prototype.textBetween=function(e,t,r,i){var o="",s=!0;return this.nodesBetween(e,t,function(a,l){a.isText?(o+=a.text.slice(Math.max(e,l)-l,t-l),s=!r):a.isLeaf&&i?(o+="function"==typeof i?i(a):i,s=!r):!s&&a.isBlock&&(o+=r,s=!0)},0),o},M.prototype.append=function(e){if(!e.size)return this;if(!this.size)return e;var t=this.lastChild,r=e.firstChild,i=this.content.slice(),o=0;for(t.isText&&t.sameMarkup(r)&&(i[i.length-1]=t.withText(t.text+r.text),o=1);oe)for(var o=0,s=0;se&&((st)&&(a=a.isText?a.cut(Math.max(0,e-s),Math.min(a.text.length,t-s)):a.cut(Math.max(0,e-s-1),Math.min(a.content.size,t-s-1))),r.push(a),i+=a.nodeSize),s=l}return new M(r,i)},M.prototype.cutByIndex=function(e,t){return e==t?M.empty:0==e&&t==this.content.length?this:new M(this.content.slice(e,t))},M.prototype.replaceChild=function(e,t){var r=this.content[e];if(r==t)return this;var i=this.content.slice(),o=this.size+t.nodeSize-r.nodeSize;return i[e]=t,new M(i,o)},M.prototype.addToStart=function(e){return new M([e].concat(this.content),this.size+e.nodeSize)},M.prototype.addToEnd=function(e){return new M(this.content.concat(e),this.size+e.nodeSize)},M.prototype.eq=function(e){if(this.content.length!=e.content.length)return!1;for(var t=0;tthis.size||e<0)throw new RangeError("Position "+e+" outside of fragment ("+this+")");for(var r=0,i=0;;r++){var s=i+this.child(r).nodeSize;if(s>=e)return s==e||t>0?Ef(r+1,s):Ef(r,i);i=s}},M.prototype.toString=function(){return"<"+this.toStringInner()+">"},M.prototype.toStringInner=function(){return this.content.join(", ")},M.prototype.toJSON=function(){return this.content.length?this.content.map(function(e){return e.toJSON()}):null},M.fromJSON=function(e,t){if(!t)return M.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new M(t.map(e.nodeFromJSON))},M.fromArray=function(e){if(!e.length)return M.empty;for(var t,r=0,i=0;ithis.type.rank&&(t||(t=e.slice(0,i)),t.push(this),r=!0),t&&t.push(o)}}return t||(t=e.slice()),r||t.push(this),t},Ce.prototype.removeFromSet=function(e){for(var t=0;tn.depth)throw new ci("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new ci("Inconsistent open depths");return qI(n,e,t,0)}function qI(n,e,t,r){var i=n.index(r),o=n.node(r);if(i==e.index(r)&&r=0;o--)i=e.node(o).copy(M.from(i));return{start:i.resolveNoCache(n.openStart+t),end:i.resolveNoCache(i.content.size-n.openEnd-t)}}(t,n);return ls(o,ZI(n,c.start,c.end,e,r))}var a=n.parent,l=a.content;return ls(a,l.cut(0,n.parentOffset).append(t.content).append(l.cut(e.parentOffset)))}return ls(o,Sf(n,e,r))}function KI(n,e){if(!e.type.compatibleContent(n.type))throw new ci("Cannot join "+e.type.name+" onto "+n.type.name)}function Yv(n,e,t){var r=n.node(t);return KI(r,e.node(t)),r}function as(n,e){var t=e.length-1;t>=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function wc(n,e,t,r){var i=(e||n).node(t),o=0,s=e?e.index(t):i.childCount;n&&(o=n.index(t),n.depth>t?o++:n.textOffset&&(as(n.nodeAfter,r),o++));for(var a=o;ai&&Yv(n,e,i+1),s=r.depth>i&&Yv(t,r,i+1),a=[];return wc(null,n,i,a),o&&s&&e.index(i)==t.index(i)?(KI(o,s),as(ls(o,ZI(n,e,t,r,i+1)),a)):(o&&as(ls(o,Sf(n,e,i+1)),a),wc(e,t,i,a),s&&as(ls(s,Sf(t,r,i+1)),a)),wc(r,null,i,a),new M(a)}function Sf(n,e,t){var r=[];return wc(null,n,t,r),n.depth>t&&as(ls(Yv(n,e,t+1),Sf(n,e,t+1)),r),wc(e,null,t,r),new M(r)}WI.size.get=function(){return this.content.size-this.openStart-this.openEnd},F.prototype.insertAt=function(e,t){var r=GI(this.content,e+this.openStart,t,null);return r&&new F(r,this.openStart,this.openEnd)},F.prototype.removeBetween=function(e,t){return new F($I(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)},F.prototype.eq=function(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd},F.prototype.toString=function(){return this.content+"("+this.openStart+","+this.openEnd+")"},F.prototype.toJSON=function(){if(!this.content.size)return null;var e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e},F.fromJSON=function(e,t){if(!t)return F.empty;var r=t.openStart||0,i=t.openEnd||0;if("number"!=typeof r||"number"!=typeof i)throw new RangeError("Invalid input for Slice.fromJSON");return new F(M.fromJSON(e,t.content),r,i)},F.maxOpen=function(e,t){void 0===t&&(t=!0);for(var r=0,i=0,o=e.firstChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.firstChild)r++;for(var s=e.lastChild;s&&!s.isLeaf&&(t||!s.type.spec.isolating);s=s.lastChild)i++;return new F(e,r,i)},Object.defineProperties(F.prototype,WI),F.empty=new F(M.empty,0,0);var st=function(e,t,r){this.pos=e,this.path=t,this.depth=t.length/3-1,this.parentOffset=r},Aa={parent:{configurable:!0},doc:{configurable:!0},textOffset:{configurable:!0},nodeAfter:{configurable:!0},nodeBefore:{configurable:!0}};st.prototype.resolveDepth=function(e){return null==e?this.depth:e<0?this.depth+e:e},Aa.parent.get=function(){return this.node(this.depth)},Aa.doc.get=function(){return this.node(0)},st.prototype.node=function(e){return this.path[3*this.resolveDepth(e)]},st.prototype.index=function(e){return this.path[3*this.resolveDepth(e)+1]},st.prototype.indexAfter=function(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)},st.prototype.start=function(e){return 0==(e=this.resolveDepth(e))?0:this.path[3*e-1]+1},st.prototype.end=function(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size},st.prototype.before=function(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]},st.prototype.after=function(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize},Aa.textOffset.get=function(){return this.pos-this.path[this.path.length-1]},Aa.nodeAfter.get=function(){var n=this.parent,e=this.index(this.depth);if(e==n.childCount)return null;var t=this.pos-this.path[this.path.length-1],r=n.child(e);return t?n.child(e).cut(t):r},Aa.nodeBefore.get=function(){var n=this.index(this.depth),e=this.pos-this.path[this.path.length-1];return e?this.parent.child(n).cut(0,e):0==n?null:this.parent.child(n-1)},st.prototype.posAtIndex=function(e,t){t=this.resolveDepth(t);for(var r=this.path[3*t],i=0==t?0:this.path[3*t-1]+1,o=0;o0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0},st.prototype.blockRange=function(e,t){if(void 0===e&&(e=this),e.pos=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new Sc(this,e,r)},st.prototype.sameParent=function(e){return this.pos-this.parentOffset==e.pos-e.parentOffset},st.prototype.max=function(e){return e.pos>this.pos?e:this},st.prototype.min=function(e){return e.pos=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");for(var r=[],i=0,o=t,s=e;;){var a=s.content.findIndex(o),l=a.index,c=a.offset,u=o-c;if(r.push(s,l,i+c),!u||(s=s.child(l)).isText)break;o=u-1,i+=c+1}return new st(t,r,o)},st.resolveCached=function(e,t){for(var r=0;re&&this.nodesBetween(e,t,function(o){return r.isInSet(o.marks)&&(i=!0),!i}),i},Zn.isBlock.get=function(){return this.type.isBlock},Zn.isTextblock.get=function(){return this.type.isTextblock},Zn.inlineContent.get=function(){return this.type.inlineContent},Zn.isInline.get=function(){return this.type.isInline},Zn.isText.get=function(){return this.type.isText},Zn.isLeaf.get=function(){return this.type.isLeaf},Zn.isAtom.get=function(){return this.type.isAtom},Ee.prototype.toString=function(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);var e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),YI(this.marks,e)},Ee.prototype.contentMatchAt=function(e){var t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t},Ee.prototype.canReplace=function(e,t,r,i,o){void 0===r&&(r=M.empty),void 0===i&&(i=0),void 0===o&&(o=r.childCount);var s=this.contentMatchAt(e).matchFragment(r,i,o),a=s&&s.matchFragment(this.content,t);if(!a||!a.validEnd)return!1;for(var l=i;l=0;t--)e=n[t].type.name+"("+e+")";return e}var ln=function(e){this.validEnd=e,this.next=[],this.wrapCache=[]},Mf={inlineContent:{configurable:!0},defaultType:{configurable:!0},edgeCount:{configurable:!0}};ln.parse=function(e,t){var r=new If(e,t);if(null==r.next)return ln.empty;var i=JI(r);r.next&&r.err("Unexpected trailing text");var o=function Q4(n){var e=Object.create(null);return function t(r){var i=[];r.forEach(function(l){n[l].forEach(function(c){var u=c.term,d=c.to;if(u){var f=i.indexOf(u),h=f>-1&&i[f+1];tT(n,d).forEach(function(p){h||i.push(u,h=[]),-1==h.indexOf(p)&&h.push(p)})}})});for(var o=e[r.join(",")]=new ln(r.indexOf(n.length-1)>-1),s=0;s>1},ln.prototype.edge=function(e){var t=e<<1;if(t>=this.next.length)throw new RangeError("There's no "+e+"th edge in this content match");return{type:this.next[t],next:this.next[t+1]}},ln.prototype.toString=function(){var e=[];return function t(r){e.push(r);for(var i=1;i"+e.indexOf(r.next[s+1]);return o}).join("\n")},Object.defineProperties(ln.prototype,Mf),ln.empty=new ln(!0);var If=function(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()},QI={next:{configurable:!0}};function JI(n){var e=[];do{e.push($4(n))}while(n.eat("|"));return 1==e.length?e[0]:{type:"choice",exprs:e}}function $4(n){var e=[];do{e.push(G4(n))}while(n.next&&")"!=n.next&&"|"!=n.next);return 1==e.length?e[0]:{type:"seq",exprs:e}}function G4(n){for(var e=function Z4(n){if(n.eat("(")){var e=JI(n);return n.eat(")")||n.err("Missing closing paren"),e}if(!/\W/.test(n.next)){var t=function K4(n,e){var t=n.nodeTypes,r=t[e];if(r)return[r];var i=[];for(var o in t){var s=t[o];s.groups.indexOf(e)>-1&&i.push(s)}return 0==i.length&&n.err("No node type or group '"+e+"' found"),i}(n,n.next).map(function(r){return null==n.inline?n.inline=r.isInline:n.inline!=r.isInline&&n.err("Mixing inline and block content"),{type:"name",value:r}});return n.pos++,1==t.length?t[0]:{type:"choice",exprs:t}}n.err("Unexpected token '"+n.next+"'")}(n);;)if(n.eat("+"))e={type:"plus",expr:e};else if(n.eat("*"))e={type:"star",expr:e};else if(n.eat("?"))e={type:"opt",expr:e};else{if(!n.eat("{"))break;e=q4(n,e)}return e}function XI(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");var e=Number(n.next);return n.pos++,e}function q4(n,e){var t=XI(n),r=t;return n.eat(",")&&(r="}"!=n.next?XI(n):-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:t,max:r,expr:e}}function eT(n,e){return e-n}function tT(n,e){var t=[];return function r(i){var o=n[i];if(1==o.length&&!o[0].term)return r(o[0].to);t.push(i);for(var s=0;s-1},wn.prototype.allowsMarks=function(e){if(null==this.markSet)return!0;for(var t=0;t-1};var cs=function(e){for(var t in this.spec={},e)this.spec[t]=e[t];this.spec.nodes=HI.from(e.nodes),this.spec.marks=HI.from(e.marks),this.nodes=wn.compile(this.spec.nodes,this),this.marks=bo.compile(this.spec.marks,this);var r=Object.create(null);for(var i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");var o=this.nodes[i],s=o.spec.content||"",a=o.spec.marks;o.contentMatch=r[s]||(r[s]=ln.parse(s,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.markSet="_"==a?null:a?aT(this,a.split(" ")):""!=a&&o.inlineContent?null:[]}for(var l in this.marks){var c=this.marks[l],u=c.spec.excludes;c.excluded=null==u?[c]:""==u?[]:aT(this,u.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached=Object.create(null),this.cached.wrappings=Object.create(null)};function aT(n,e){for(var t=[],r=0;r-1)&&t.push(s=l)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return t}cs.prototype.node=function(e,t,r,i){if("string"==typeof e)e=this.nodeType(e);else{if(!(e instanceof wn))throw new RangeError("Invalid node type: "+e);if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}return e.createChecked(t,r,i)},cs.prototype.text=function(e,t){var r=this.nodes.text;return new W4(r,r.defaultAttrs,e,Ce.setFrom(t))},cs.prototype.mark=function(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)},cs.prototype.nodeFromJSON=function(e){return Ee.fromJSON(this,e)},cs.prototype.markFromJSON=function(e){return Ce.fromJSON(this,e)},cs.prototype.nodeType=function(e){var t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t};var Lr=function(e,t){var r=this;this.schema=e,this.rules=t,this.tags=[],this.styles=[],t.forEach(function(i){i.tag?r.tags.push(i):i.style&&r.styles.push(i)}),this.normalizeLists=!this.tags.some(function(i){if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;var o=e.nodes[i.node];return o.contentMatch.matchType(o)})};Lr.prototype.parse=function(e,t){void 0===t&&(t={});var r=new Xe(this,t,!1);return r.addAll(e,null,t.from,t.to),r.finish()},Lr.prototype.parseSlice=function(e,t){void 0===t&&(t={});var r=new Xe(this,t,!0);return r.addAll(e,null,t.from,t.to),F.maxOpen(r.finish())},Lr.prototype.matchTag=function(e,t,r){for(var i=r?this.tags.indexOf(r)+1:0;ie.length&&(61!=s.style.charCodeAt(e.length)||s.style.slice(e.length+1)!=t))){if(s.getAttrs){var a=s.getAttrs(t);if(!1===a)continue;s.attrs=a}return s}}},Lr.schemaRules=function(e){var t=[];function r(l){for(var c=null==l.priority?50:l.priority,u=0;u=0;t--)if(e.eq(this.stashMarks[t]))return this.stashMarks.splice(t,1)[0]},Bi.prototype.applyPending=function(e){for(var t=0,r=this.pendingMarks;t=0;i--){var o=this.nodes[i],s=o.findWrapping(e);if(s&&(!t||t.length>s.length)&&(t=s,r=o,!s.length)||o.solid)break}if(!t)return!1;this.sync(r);for(var a=0;athis.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}},Xe.prototype.finish=function(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)},Xe.prototype.sync=function(e){for(var t=this.open;t>=0;t--)if(this.nodes[t]==e)return void(this.open=t)},ey.currentPos.get=function(){this.closeExtra();for(var n=0,e=this.open;e>=0;e--){for(var t=this.nodes[e].content,r=t.length-1;r>=0;r--)n+=t[r].nodeSize;e&&n++}return n},Xe.prototype.findAtPoint=function(e,t){if(this.find)for(var r=0;r-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);var r=e.split("/"),i=this.options.context,o=!(this.isOpen||i&&i.parent.type!=this.nodes[0].type),s=(o?0:1)-(i?i.depth+1:0),a=function(l,c){for(;l>=0;l--){var u=r[l];if(""==u){if(l==r.length-1||0==l)continue;for(;c>=s;c--)if(a(l-1,c))return!0;return!1}var d=c>0||0==c&&o?t.nodes[c].type:i&&c>=s?i.node(c-s).type:null;if(!d||d.name!=u&&-1==d.groups.indexOf(u))return!1;c--}return!0};return a(r.length-1,this.open)},Xe.prototype.textblockFromContext=function(){var e=this.options.context;if(e)for(var t=e.depth;t>=0;t--){var r=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(var i in this.parser.schema.nodes){var o=this.parser.schema.nodes[i];if(o.isTextblock&&o.defaultAttrs)return o}},Xe.prototype.addPendingMark=function(e){var t=function i8(n,e){for(var t=0;t=0;r--){var i=this.nodes[r];if(i.pendingMarks.lastIndexOf(e)>-1)i.pendingMarks=e.removeFromSet(i.pendingMarks);else{i.activeMarks=e.removeFromSet(i.activeMarks);var s=i.popFromStashMark(e);s&&i.type&&i.type.allowsMarkType(s.type)&&(i.activeMarks=s.addToSet(i.activeMarks))}if(i==t)break}},Object.defineProperties(Xe.prototype,ey);var Gt=function(e,t){this.nodes=e||{},this.marks=t||{}};function dT(n){var e={};for(var t in n){var r=n[t].spec.toDOM;r&&(e[t]=r)}return e}function ty(n){return n.document||window.document}Gt.prototype.serializeFragment=function(e,t,r){var i=this;void 0===t&&(t={}),r||(r=ty(t).createDocumentFragment());var o=r,s=null;return e.forEach(function(a){if(s||a.marks.length){s||(s=[]);for(var l=0,c=0;l=0;i--){var o=this.serializeMark(e.marks[i],e.isInline,t);o&&((o.contentDOM||o.dom).appendChild(r),r=o.dom)}return r},Gt.prototype.serializeMark=function(e,t,r){void 0===r&&(r={});var i=this.marks[e.type.name];return i&&Gt.renderSpec(ty(r),i(e,t))},Gt.renderSpec=function(e,t,r){if(void 0===r&&(r=null),"string"==typeof t)return{dom:e.createTextNode(t)};if(null!=t.nodeType)return{dom:t};if(t.dom&&null!=t.dom.nodeType)return t;var i=t[0],o=i.indexOf(" ");o>0&&(r=i.slice(0,o),i=i.slice(o+1));var s=null,a=r?e.createElementNS(r,i):e.createElement(i),l=t[1],c=1;if(l&&"object"==typeof l&&null==l.nodeType&&!Array.isArray(l))for(var u in c=2,l)if(null!=l[u]){var d=u.indexOf(" ");d>0?a.setAttributeNS(u.slice(0,d),u.slice(d+1),l[u]):a.setAttribute(u,l[u])}for(var f=c;fc)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}var p=Gt.renderSpec(e,h,r),m=p.contentDOM;if(a.appendChild(p.dom),m){if(s)throw new RangeError("Multiple content holes");s=m}}return{dom:a,contentDOM:s}},Gt.fromSchema=function(e){return e.cached.domSerializer||(e.cached.domSerializer=new Gt(this.nodesFromSchema(e),this.marksFromSchema(e)))},Gt.nodesFromSchema=function(e){var t=dT(e.nodes);return t.text||(t.text=function(r){return r.text}),t},Gt.marksFromSchema=function(e){return dT(e.marks)};var hT=Math.pow(2,16);function o8(n,e){return n+e*hT}function pT(n){return 65535&n}var ny=function(e,t,r){void 0===t&&(t=!1),void 0===r&&(r=null),this.pos=e,this.deleted=t,this.recover=r},qt=function n(e,t){if(void 0===t&&(t=!1),!e.length&&n.empty)return n.empty;this.ranges=e,this.inverted=t};qt.prototype.recover=function(e){var t=0,r=pT(e);if(!this.inverted)for(var i=0;ie)break;var c=this.ranges[a+o],u=this.ranges[a+s],d=l+c;if(e<=d){var h=l+i+((c?e==l?-1:e==d?1:t:t)<0?0:u);if(r)return h;var p=e==(t<0?l:d)?null:o8(a/3,e-l);return new ny(h,t<0?e!=l:e!=d,p)}i+=u-c}return r?e+i:new ny(e+i)},qt.prototype.touches=function(e,t){for(var r=0,i=pT(t),o=this.inverted?2:1,s=this.inverted?1:2,a=0;ae)break;var c=this.ranges[a+o];if(e<=l+c&&a==3*i)return!0;r+=this.ranges[a+s]-c}return!1},qt.prototype.forEach=function(e){for(var t=this.inverted?2:1,r=this.inverted?1:2,i=0,o=0;i=0;t--){var i=e.getMirror(t);this.appendMap(e.maps[t].invert(),null!=i&&i>t?r-i-1:null)}},cn.prototype.invert=function(){var e=new cn;return e.appendMappingInverted(this),e},cn.prototype.map=function(e,t){if(void 0===t&&(t=1),this.mirror)return this._map(e,t,!0);for(var r=this.from;ro&&l0},gt.prototype.addStep=function(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t},Object.defineProperties(gt.prototype,ry);var iy=Object.create(null),un=function(){};un.prototype.apply=function(e){return Af()},un.prototype.getMap=function(){return qt.empty},un.prototype.invert=function(e){return Af()},un.prototype.map=function(e){return Af()},un.prototype.merge=function(e){return null},un.prototype.toJSON=function(){return Af()},un.fromJSON=function(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");var r=iy[t.stepType];if(!r)throw new RangeError("No step type "+t.stepType+" defined");return r.fromJSON(e,t)},un.jsonID=function(e,t){if(e in iy)throw new RangeError("Duplicate use of step JSON ID "+e);return iy[e]=t,t.prototype.jsonID=e,t};var Sn=function(e,t){this.doc=e,this.failed=t};Sn.ok=function(e){return new Sn(e,null)},Sn.fail=function(e){return new Sn(null,e)},Sn.fromReplace=function(e,t,r,i){try{return Sn.ok(e.replace(t,r,i))}catch(o){if(o instanceof ci)return Sn.fail(o.message);throw o}};var ji=function(n){function e(t,r,i,o){n.call(this),this.from=t,this.to=r,this.slice=i,this.structure=!!o}return n&&(e.__proto__=n),(e.prototype=Object.create(n&&n.prototype)).constructor=e,e.prototype.apply=function(r){return this.structure&&oy(r,this.from,this.to)?Sn.fail("Structure replace would overwrite content"):Sn.fromReplace(r,this.from,this.to,this.slice)},e.prototype.getMap=function(){return new qt([this.from,this.to-this.from,this.slice.size])},e.prototype.invert=function(r){return new e(this.from,this.from+this.slice.size,r.slice(this.from,this.to))},e.prototype.map=function(r){var i=r.mapResult(this.from,1),o=r.mapResult(this.to,-1);return i.deleted&&o.deleted?null:new e(i.pos,Math.max(i.pos,o.pos),this.slice)},e.prototype.merge=function(r){if(!(r instanceof e)||r.structure||this.structure)return null;if(this.from+this.slice.size!=r.from||this.slice.openEnd||r.slice.openStart){if(r.to!=this.from||this.slice.openStart||r.slice.openEnd)return null;var o=this.slice.size+r.slice.size==0?F.empty:new F(r.slice.content.append(this.slice.content),r.slice.openStart,this.slice.openEnd);return new e(r.from,this.to,o,this.structure)}var i=this.slice.size+r.slice.size==0?F.empty:new F(this.slice.content.append(r.slice.content),this.slice.openStart,r.slice.openEnd);return new e(this.from,this.to+(r.to-r.from),i,this.structure)},e.prototype.toJSON=function(){var r={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(r.slice=this.slice.toJSON()),this.structure&&(r.structure=!0),r},e.fromJSON=function(r,i){if("number"!=typeof i.from||"number"!=typeof i.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new e(i.from,i.to,F.fromJSON(r,i.slice),!!i.structure)},e}(un);un.jsonID("replace",ji);var Nn=function(n){function e(t,r,i,o,s,a,l){n.call(this),this.from=t,this.to=r,this.gapFrom=i,this.gapTo=o,this.slice=s,this.insert=a,this.structure=!!l}return n&&(e.__proto__=n),(e.prototype=Object.create(n&&n.prototype)).constructor=e,e.prototype.apply=function(r){if(this.structure&&(oy(r,this.from,this.gapFrom)||oy(r,this.gapTo,this.to)))return Sn.fail("Structure gap-replace would overwrite content");var i=r.slice(this.gapFrom,this.gapTo);if(i.openStart||i.openEnd)return Sn.fail("Gap is not a flat range");var o=this.slice.insertAt(this.insert,i.content);return o?Sn.fromReplace(r,this.from,this.to,o):Sn.fail("Content does not fit in gap")},e.prototype.getMap=function(){return new qt([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])},e.prototype.invert=function(r){var i=this.gapTo-this.gapFrom;return new e(this.from,this.from+this.slice.size+i,this.from+this.insert,this.from+this.insert+i,r.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)},e.prototype.map=function(r){var i=r.mapResult(this.from,1),o=r.mapResult(this.to,-1),s=r.map(this.gapFrom,-1),a=r.map(this.gapTo,1);return i.deleted&&o.deleted||so.pos?null:new e(i.pos,o.pos,s,a,this.slice,this.insert,this.structure)},e.prototype.toJSON=function(){var r={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(r.slice=this.slice.toJSON()),this.structure&&(r.structure=!0),r},e.fromJSON=function(r,i){if("number"!=typeof i.from||"number"!=typeof i.to||"number"!=typeof i.gapFrom||"number"!=typeof i.gapTo||"number"!=typeof i.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new e(i.from,i.to,i.gapFrom,i.gapTo,F.fromJSON(r,i.slice),i.insert,!!i.structure)},e}(un);function oy(n,e,t){for(var r=n.resolve(e),i=t-e,o=r.depth;i>0&&o>0&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0)for(var s=r.node(o).maybeChild(r.indexAfter(o));i>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,i--}return!1}function a8(n,e,t){return(0==e||n.canReplace(e,n.childCount))&&(t==n.childCount||n.canReplace(0,t))}function Ra(n){for(var t=n.parent.content.cutByIndex(n.startIndex,n.endIndex),r=n.depth;;--r){var i=n.$from.node(r),o=n.$from.index(r),s=n.$to.indexAfter(r);if(ro;a--,l--){var c=i.node(a),u=i.index(a);if(c.type.spec.isolating)return!1;var d=c.content.cutByIndex(u,c.childCount),f=r&&r[l]||c;if(f!=c&&(d=d.replaceChild(0,f.type.create(f.attrs))),!c.canReplace(u+1,c.childCount)||!f.type.validContent(d))return!1}var h=i.indexAfter(o),p=r&&r[0];return i.node(o).canReplaceWith(h,h,p?p.type:i.node(o+1).type)}function Ic(n,e){var t=n.resolve(e),r=t.index();return function mT(n,e){return n&&e&&!n.isLeaf&&n.canAppend(e)}(t.nodeBefore,t.nodeAfter)&&t.parent.canReplace(r,r+1)}function vT(n,e,t){var r=n.resolve(e);if(!t.content.size)return e;for(var i=t.content,o=0;o=0;a--){var l=a==r.depth?0:r.pos<=(r.start(a+1)+r.end(a+1))/2?-1:1,c=r.index(a)+(l>0?1:0),u=r.node(a),d=!1;if(1==s)d=u.canReplace(c,c,i);else{var f=u.contentMatchAt(c).findWrapping(i.firstChild.type);d=f&&u.canReplaceWith(c,c,f[0])}if(d)return 0==l?r.pos:l<0?r.before(a+1):r.after(a+1)}return null}function ay(n,e,t){for(var r=[],i=0;ie;d--)f||t.index(d)>0?(f=!0,c=M.from(t.node(d).copy(c)),u++):a--;for(var h=M.empty,p=0,g=i,m=!1;g>e;g--)m||r.after(g+1)=0;r--){if(t.size){var i=e[r].type.contentMatch.matchFragment(t);if(!i||!i.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}t=M.from(e[r].type.create(e[r].attrs,t))}var o=n.start,s=n.end;return this.step(new Nn(o,s,o,s,new F(t,0,0),e.length,!0))},gt.prototype.setBlockType=function(n,e,t,r){var i=this;if(void 0===e&&(e=n),!t.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var o=this.steps.length;return this.doc.nodesBetween(n,e,function(s,a){if(s.isTextblock&&!s.hasMarkup(t,r)&&function u8(n,e,t){var r=n.resolve(e),i=r.index();return r.parent.canReplaceWith(i,i+1,t)}(i.doc,i.mapping.slice(o).map(a),t)){i.clearIncompatible(i.mapping.slice(o).map(a,1),t);var l=i.mapping.slice(o),c=l.map(a,1),u=l.map(a+s.nodeSize,1);return i.step(new Nn(c,u,c+1,u-1,new F(M.from(t.create(r,null,s.marks)),0,0),1,!0)),!1}}),this},gt.prototype.setNodeMarkup=function(n,e,t,r){var i=this.doc.nodeAt(n);if(!i)throw new RangeError("No node at given position");e||(e=i.type);var o=e.create(t,null,r||i.marks);if(i.isLeaf)return this.replaceWith(n,n+i.nodeSize,o);if(!e.validContent(i.content))throw new RangeError("Invalid content for node type "+e.name);return this.step(new Nn(n,n+i.nodeSize,n+1,n+i.nodeSize-1,new F(M.from(o),0,0),1,!0))},gt.prototype.split=function(n,e,t){void 0===e&&(e=1);for(var r=this.doc.resolve(n),i=M.empty,o=M.empty,s=r.depth,a=r.depth-e,l=e-1;s>a;s--,l--){i=M.from(r.node(s).copy(i));var c=t&&t[l];o=M.from(c?c.type.create(c.attrs,o):r.node(s).copy(o))}return this.step(new ji(n,n,new F(i.append(o),e,e),!0))},gt.prototype.join=function(n,e){void 0===e&&(e=1);var t=new ji(n-e,n+e,F.empty,!0);return this.step(t)};var ly=function(n){function e(t,r,i){n.call(this),this.from=t,this.to=r,this.mark=i}return n&&(e.__proto__=n),(e.prototype=Object.create(n&&n.prototype)).constructor=e,e.prototype.apply=function(r){var i=this,o=r.slice(this.from,this.to),s=r.resolve(this.from),a=s.node(s.sharedDepth(this.to)),l=new F(ay(o.content,function(c,u){return c.isAtom&&u.type.allowsMarkType(i.mark.type)?c.mark(i.mark.addToSet(c.marks)):c},a),o.openStart,o.openEnd);return Sn.fromReplace(r,this.from,this.to,l)},e.prototype.invert=function(){return new Tc(this.from,this.to,this.mark)},e.prototype.map=function(r){var i=r.mapResult(this.from,1),o=r.mapResult(this.to,-1);return i.deleted&&o.deleted||i.pos>=o.pos?null:new e(i.pos,o.pos,this.mark)},e.prototype.merge=function(r){if(r instanceof e&&r.mark.eq(this.mark)&&this.from<=r.to&&this.to>=r.from)return new e(Math.min(this.from,r.from),Math.max(this.to,r.to),this.mark)},e.prototype.toJSON=function(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}},e.fromJSON=function(r,i){if("number"!=typeof i.from||"number"!=typeof i.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new e(i.from,i.to,r.markFromJSON(i.mark))},e}(un);un.jsonID("addMark",ly);var Tc=function(n){function e(t,r,i){n.call(this),this.from=t,this.to=r,this.mark=i}return n&&(e.__proto__=n),(e.prototype=Object.create(n&&n.prototype)).constructor=e,e.prototype.apply=function(r){var i=this,o=r.slice(this.from,this.to),s=new F(ay(o.content,function(a){return a.mark(i.mark.removeFromSet(a.marks))}),o.openStart,o.openEnd);return Sn.fromReplace(r,this.from,this.to,s)},e.prototype.invert=function(){return new ly(this.from,this.to,this.mark)},e.prototype.map=function(r){var i=r.mapResult(this.from,1),o=r.mapResult(this.to,-1);return i.deleted&&o.deleted||i.pos>=o.pos?null:new e(i.pos,o.pos,this.mark)},e.prototype.merge=function(r){if(r instanceof e&&r.mark.eq(this.mark)&&this.from<=r.to&&this.to>=r.from)return new e(Math.min(this.from,r.from),Math.max(this.to,r.to),this.mark)},e.prototype.toJSON=function(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}},e.fromJSON=function(r,i){if("number"!=typeof i.from||"number"!=typeof i.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new e(i.from,i.to,r.markFromJSON(i.mark))},e}(un);function cy(n,e,t,r){if(void 0===t&&(t=e),void 0===r&&(r=F.empty),e==t&&!r.size)return null;var i=n.resolve(e),o=n.resolve(t);return yT(i,o,r)?new ji(e,t,r):new dr(i,o,r).fit()}function yT(n,e,t){return!t.openStart&&!t.openEnd&&n.start()==e.start()&&n.parent.canReplace(n.index(),e.index(),t.content)}un.jsonID("removeMark",Tc),gt.prototype.addMark=function(n,e,t){var r=this,i=[],o=[],s=null,a=null;return this.doc.nodesBetween(n,e,function(l,c,u){if(l.isInline){var d=l.marks;if(!t.isInSet(d)&&u.type.allowsMarkType(t.type)){for(var f=Math.max(c,n),h=Math.min(c+l.nodeSize,e),p=t.addToSet(d),g=0;g=0;f--)this.step(i[f]);return this},gt.prototype.replace=function(n,e,t){void 0===e&&(e=n),void 0===t&&(t=F.empty);var r=cy(this.doc,n,e,t);return r&&this.step(r),this},gt.prototype.replaceWith=function(n,e,t){return this.replace(n,e,new F(M.from(t),0,0))},gt.prototype.delete=function(n,e){return this.replace(n,e,F.empty)},gt.prototype.insert=function(n,e){return this.replaceWith(n,n,e)};var dr=function(e,t,r){this.$to=t,this.$from=e,this.unplaced=r,this.frontier=[];for(var i=0;i<=e.depth;i++){var o=e.node(i);this.frontier.push({type:o.type,match:o.contentMatchAt(e.indexAfter(i))})}this.placed=M.empty;for(var s=e.depth;s>0;s--)this.placed=M.from(e.node(s).copy(this.placed))},_T={depth:{configurable:!0}};function xc(n,e,t){return 0==e?n.cutByIndex(t):n.replaceChild(0,n.firstChild.copy(xc(n.firstChild.content,e-1,t)))}function Ac(n,e,t){return 0==e?n.append(t):n.replaceChild(n.childCount-1,n.lastChild.copy(Ac(n.lastChild.content,e-1,t)))}function uy(n,e){for(var t=0;t1&&(r=r.replaceChild(0,bT(r.firstChild,e-1,1==r.childCount?t-1:0))),e>0&&(r=n.type.contentMatch.fillBefore(r).append(r),t<=0&&(r=r.append(n.type.contentMatch.matchFragment(r).fillBefore(M.empty,!0)))),n.copy(r)}function dy(n,e,t,r,i){var o=n.node(e),s=i?n.indexAfter(e):n.index(e);if(s==o.childCount&&!t.compatibleContent(o.type))return null;var a=r.fillBefore(o.content,!0,s);return a&&!function f8(n,e,t){for(var r=t;rr){var s=i.contentMatchAt(0),a=s.fillBefore(n).append(n);n=a.append(s.matchFragment(a).fillBefore(M.empty,!0))}return n}function DT(n,e){for(var t=[],i=Math.min(n.depth,e.depth);i>=0;i--){var o=n.start(i);if(oe.pos+(e.depth-i)||n.node(i).type.spec.isolating||e.node(i).type.spec.isolating)break;(o==e.start(i)||i==n.depth&&i==e.depth&&n.parent.inlineContent&&e.parent.inlineContent&&i&&e.start(i-1)==o-1)&&t.push(i)}return t}_T.depth.get=function(){return this.frontier.length-1},dr.prototype.fit=function(){for(;this.unplaced.size;){var e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}var t=this.mustMoveInline(),r=this.placed.size-this.depth-this.$from.depth,i=this.$from,o=this.close(t<0?this.$to:i.doc.resolve(t));if(!o)return null;for(var s=this.placed,a=i.depth,l=o.depth;a&&l&&1==s.childCount;)s=s.firstChild.content,a--,l--;var c=new F(s,a,l);return t>-1?new Nn(i.pos,t,this.$to.pos,this.$to.end(),c,r):c.size||i.pos!=this.$to.pos?new ji(i.pos,o.pos,c):void 0},dr.prototype.findFittable=function(){for(var e=1;e<=2;e++)for(var t=this.unplaced.openStart;t>=0;t--)for(var i=void 0,o=(t?(i=uy(this.unplaced.content,t-1).firstChild).content:this.unplaced.content).firstChild,s=this.depth;s>=0;s--){var a=this.frontier[s],l=a.type,c=a.match,u=void 0,d=void 0;if(1==e&&(o?c.matchType(o.type)||(d=c.fillBefore(M.from(o),!1)):l.compatibleContent(i.type)))return{sliceDepth:t,frontierDepth:s,parent:i,inject:d};if(2==e&&o&&(u=c.findWrapping(o.type)))return{sliceDepth:t,frontierDepth:s,parent:i,wrap:u};if(i&&c.matchType(i.type))break}},dr.prototype.openMore=function(){var e=this.unplaced,t=e.content,r=e.openStart,i=e.openEnd,o=uy(t,r);return!(!o.childCount||o.firstChild.isLeaf||(this.unplaced=new F(t,r+1,Math.max(i,o.size+r>=t.size-i?r+1:0)),0))},dr.prototype.dropNode=function(){var e=this.unplaced,t=e.content,r=e.openStart,i=e.openEnd,o=uy(t,r);if(o.childCount<=1&&r>0){var s=t.size-r<=r+o.size;this.unplaced=new F(xc(t,r-1,1),r-1,s?r-1:i)}else this.unplaced=new F(xc(t,r,1),r,i)},dr.prototype.placeNodes=function(e){for(var t=e.sliceDepth,r=e.frontierDepth,i=e.parent,o=e.inject,s=e.wrap;this.depth>r;)this.closeFrontierNode();if(s)for(var a=0;a1||0==u||v.content.size)&&(p=b,f.push(bT(v.mark(g.allowedMarks(v.marks)),1==d?u:0,d==c.childCount?y:-1)))}var _=d==c.childCount;_||(y=-1),this.placed=Ac(this.placed,r,M.from(f)),this.frontier[r].match=p,_&&y<0&&i&&i.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(var C=0,D=c;C1&&o==this.$to.end(--i);)++o;return o},dr.prototype.findCloseLevel=function(e){e:for(var t=Math.min(this.depth,e.depth);t>=0;t--){var r=this.frontier[t],i=r.match,o=r.type,s=t=0;l--){var c=this.frontier[l],f=dy(e,l,c.type,c.match,!0);if(!f||f.childCount)continue e}return{depth:t,fit:a,move:s?e.doc.resolve(e.after(t+1)):e}}}},dr.prototype.close=function(e){var t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=Ac(this.placed,t.depth,t.fit)),e=t.move;for(var r=t.depth+1;r<=e.depth;r++){var i=e.node(r),o=i.type.contentMatch.fillBefore(i.content,!0,e.index(r));this.openFrontierNode(i.type,i.attrs,o)}return e},dr.prototype.openFrontierNode=function(e,t,r){var i=this.frontier[this.depth];i.match=i.match.matchType(e),this.placed=Ac(this.placed,this.depth,M.from(e.create(t,r))),this.frontier.push({type:e,match:e.contentMatch})},dr.prototype.closeFrontierNode=function(){var t=this.frontier.pop().match.fillBefore(M.empty,!0);t.childCount&&(this.placed=Ac(this.placed,this.frontier.length,t))},Object.defineProperties(dr.prototype,_T),gt.prototype.replaceRange=function(n,e,t){if(!t.size)return this.deleteRange(n,e);var r=this.doc.resolve(n),i=this.doc.resolve(e);if(yT(r,i,t))return this.step(new ji(n,e,t));var o=DT(r,this.doc.resolve(e));0==o[o.length-1]&&o.pop();var s=-(r.depth+1);o.unshift(s);for(var a=r.depth,l=r.pos-1;a>0;a--,l--){var c=r.node(a).type.spec;if(c.defining||c.definingAsContext||c.isolating)break;o.indexOf(a)>-1?s=a:r.before(a)==l&&o.splice(1,0,-a)}for(var u=o.indexOf(s),d=[],f=t.openStart,h=t.content,p=0;;p++){var g=h.firstChild;if(d.push(g),p==t.openStart)break;h=g.content}for(var m=f-1;m>=0;m--){var y=d[m].type,v=h8(y);if(v&&r.node(u).type!=y)f=m;else if(v||!y.isTextblock)break}for(var b=t.openStart;b>=0;b--){var _=(b+f+1)%(t.openStart+1),C=d[_];if(C)for(var D=0;D=0&&(this.replace(n,e,t),!(this.steps.length>ee));re--){var K=o[re];K<0||(n=r.before(K),e=i.after(K))}return this},gt.prototype.replaceRangeWith=function(n,e,t){if(!t.isInline&&n==e&&this.doc.resolve(n).parent.content.size){var r=function d8(n,e,t){var r=n.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),t))return e;if(0==r.parentOffset)for(var i=r.depth-1;i>=0;i--){var o=r.index(i);if(r.node(i).canReplaceWith(o,o,t))return r.before(i+1);if(o>0)return null}if(r.parentOffset==r.parent.content.size)for(var s=r.depth-1;s>=0;s--){var a=r.indexAfter(s);if(r.node(s).canReplaceWith(a,a,t))return r.after(s+1);if(a0&&(a||t.node(s-1).canReplace(t.index(s-1),r.indexAfter(s-1))))return this.delete(t.before(s),r.after(s))}for(var l=1;l<=t.depth&&l<=r.depth;l++)if(n-t.start(l)==t.depth-l&&e>t.end(l)&&r.end(l)-e!=r.depth-l)return this.delete(t.before(l),e);return this.delete(n,e)};var fy=Object.create(null),ue=function(e,t,r){this.ranges=r||[new p8(e.min(t),e.max(t))],this.$anchor=e,this.$head=t},Co={anchor:{configurable:!0},head:{configurable:!0},from:{configurable:!0},to:{configurable:!0},$from:{configurable:!0},$to:{configurable:!0},empty:{configurable:!0}};Co.anchor.get=function(){return this.$anchor.pos},Co.head.get=function(){return this.$head.pos},Co.from.get=function(){return this.$from.pos},Co.to.get=function(){return this.$to.pos},Co.$from.get=function(){return this.ranges[0].$from},Co.$to.get=function(){return this.ranges[0].$to},Co.empty.get=function(){for(var n=this.ranges,e=0;e=0;o--){var s=t<0?Pa(e.node(0),e.node(o),e.before(o+1),e.index(o),t,r):Pa(e.node(0),e.node(o),e.after(o+1),e.index(o)+1,t,r);if(s)return s}},ue.near=function(e,t){return void 0===t&&(t=1),this.findFrom(e,t)||this.findFrom(e,-t)||new Hi(e.node(0))},ue.atStart=function(e){return Pa(e,e,0,0,1)||new Hi(e)},ue.atEnd=function(e){return Pa(e,e,e.content.size,e.childCount,-1)||new Hi(e)},ue.fromJSON=function(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");var r=fy[t.type];if(!r)throw new RangeError("No selection type "+t.type+" defined");return r.fromJSON(e,t)},ue.jsonID=function(e,t){if(e in fy)throw new RangeError("Duplicate use of selection JSON ID "+e);return fy[e]=t,t.prototype.jsonID=e,t},ue.prototype.getBookmark=function(){return ye.between(this.$anchor,this.$head).getBookmark()},Object.defineProperties(ue.prototype,Co),ue.prototype.visible=!0;var p8=function(e,t){this.$from=e,this.$to=t},ye=function(n){function e(r,i){void 0===i&&(i=r),n.call(this,r,i)}n&&(e.__proto__=n),(e.prototype=Object.create(n&&n.prototype)).constructor=e;var t={$cursor:{configurable:!0}};return t.$cursor.get=function(){return this.$anchor.pos==this.$head.pos?this.$head:null},e.prototype.map=function(i,o){var s=i.resolve(o.map(this.head));if(!s.parent.inlineContent)return n.near(s);var a=i.resolve(o.map(this.anchor));return new e(a.parent.inlineContent?a:s,s)},e.prototype.replace=function(i,o){if(void 0===o&&(o=F.empty),n.prototype.replace.call(this,i,o),o==F.empty){var s=this.$from.marksAcross(this.$to);s&&i.ensureMarks(s)}},e.prototype.eq=function(i){return i instanceof e&&i.anchor==this.anchor&&i.head==this.head},e.prototype.getBookmark=function(){return new Oc(this.anchor,this.head)},e.prototype.toJSON=function(){return{type:"text",anchor:this.anchor,head:this.head}},e.fromJSON=function(i,o){if("number"!=typeof o.anchor||"number"!=typeof o.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new e(i.resolve(o.anchor),i.resolve(o.head))},e.create=function(i,o,s){void 0===s&&(s=o);var a=i.resolve(o);return new this(a,s==o?a:i.resolve(s))},e.between=function(i,o,s){var a=i.pos-o.pos;if((!s||a)&&(s=a>=0?1:-1),!o.parent.inlineContent){var l=n.findFrom(o,s,!0)||n.findFrom(o,-s,!0);if(!l)return n.near(o,s);o=l.$head}return i.parent.inlineContent||(0==a||(i=(n.findFrom(i,-s,!0)||n.findFrom(i,s,!0)).$anchor).pos0?0:1);i>0?s=0;s+=i){var a=e.child(s);if(a.isAtom){if(!o&&ne.isSelectable(a))return ne.create(n,t-(i<0?a.nodeSize:0))}else{var l=Pa(n,a,t+i,i<0?a.childCount:0,i,o);if(l)return l}t+=a.nodeSize*i}}function ET(n,e,t){var r=n.steps.length-1;if(!(r0},e.prototype.setStoredMarks=function(i){return this.storedMarks=i,this.updated|=2,this},e.prototype.ensureMarks=function(i){return Ce.sameSet(this.storedMarks||this.selection.$from.marks(),i)||this.setStoredMarks(i),this},e.prototype.addStoredMark=function(i){return this.ensureMarks(i.addToSet(this.storedMarks||this.selection.$head.marks()))},e.prototype.removeStoredMark=function(i){return this.ensureMarks(i.removeFromSet(this.storedMarks||this.selection.$head.marks()))},t.storedMarksSet.get=function(){return(2&this.updated)>0},e.prototype.addStep=function(i,o){n.prototype.addStep.call(this,i,o),this.updated=-3&this.updated,this.storedMarks=null},e.prototype.setTime=function(i){return this.time=i,this},e.prototype.replaceSelection=function(i){return this.selection.replace(this,i),this},e.prototype.replaceSelectionWith=function(i,o){var s=this.selection;return!1!==o&&(i=i.mark(this.storedMarks||(s.empty?s.$from.marks():s.$from.marksAcross(s.$to)||Ce.none))),s.replaceWith(this,i),this},e.prototype.deleteSelection=function(){return this.selection.replace(this),this},e.prototype.insertText=function(i,o,s){void 0===s&&(s=o);var a=this.doc.type.schema;if(null==o)return i?this.replaceSelectionWith(a.text(i),!0):this.deleteSelection();if(!i)return this.deleteRange(o,s);var l=this.storedMarks;if(!l){var c=this.doc.resolve(o);l=s==o?c.marks():c.marksAcross(this.doc.resolve(s))}return this.replaceRangeWith(o,s,a.text(i,l)),this.selection.empty||this.setSelection(ue.near(this.selection.$to)),this},e.prototype.setMeta=function(i,o){return this.meta["string"==typeof i?i:i.key]=o,this},e.prototype.getMeta=function(i){return this.meta["string"==typeof i?i:i.key]},t.isGeneric.get=function(){for(var r in this.meta)return!1;return!0},e.prototype.scrollIntoView=function(){return this.updated|=4,this},t.scrolledIntoView.get=function(){return(4&this.updated)>0},Object.defineProperties(e.prototype,t),e}(gt);function MT(n,e){return e&&n?n.bind(e):n}var kc=function(e,t,r){this.name=e,this.init=MT(t.init,r),this.apply=MT(t.apply,r)},v8=[new kc("doc",{init:function(e){return e.doc||e.schema.topNodeType.createAndFill()},apply:function(e){return e.doc}}),new kc("selection",{init:function(e,t){return e.selection||ue.atStart(t.doc)},apply:function(e){return e.selection}}),new kc("storedMarks",{init:function(e){return e.storedMarks||null},apply:function(e,t,r,i){return i.selection.$cursor?e.storedMarks:null}}),new kc("scrollToSelection",{init:function(){return 0},apply:function(e,t){return e.scrolledIntoView?t+1:t}})],hy=function(e,t){var r=this;this.schema=e,this.fields=v8.concat(),this.plugins=[],this.pluginsByKey=Object.create(null),t&&t.forEach(function(i){if(r.pluginsByKey[i.key])throw new RangeError("Adding different instances of a keyed plugin ("+i.key+")");r.plugins.push(i),r.pluginsByKey[i.key]=i,i.spec.state&&r.fields.push(new kc(i.key,i.spec.state,i))})},dn=function(e){this.config=e},Nf={schema:{configurable:!0},plugins:{configurable:!0},tr:{configurable:!0}};Nf.schema.get=function(){return this.config.schema},Nf.plugins.get=function(){return this.config.plugins},dn.prototype.apply=function(e){return this.applyTransaction(e).state},dn.prototype.filterTransaction=function(e,t){void 0===t&&(t=-1);for(var r=0;r-1&&Nc.splice(t,1)},Object.defineProperties(dn.prototype,Nf);var Nc=[];function IT(n,e,t){for(var r in n){var i=n[r];i instanceof Function?i=i.bind(e):"handleDOMEvents"==r&&(i=IT(i,e,{})),t[r]=i}return t}var rt=function(e){this.props={},e.props&&IT(e.props,this,this.props),this.spec=e,this.key=e.key?e.key.key:TT("plugin")};rt.prototype.getState=function(e){return e[this.key]};var py=Object.create(null);function TT(n){return n in py?n+"$"+ ++py[n]:(py[n]=0,n+"$")}var Ct=function(e){void 0===e&&(e="key"),this.key=TT(e)};function gy(n,e){return!n.selection.empty&&(e&&e(n.tr.deleteSelection().scrollIntoView()),!0)}function xT(n,e,t){var i=n.selection.$cursor;if(!i||(t?!t.endOfTextblock("backward",n):i.parentOffset>0))return!1;var o=OT(i);if(!o){var s=i.blockRange(),a=s&&Ra(s);return null!=a&&(e&&e(n.tr.lift(s,a).scrollIntoView()),!0)}var l=o.nodeBefore;if(!l.type.spec.isolating&&VT(n,o,e))return!0;if(0==i.parent.content.size&&(Fa(l,"end")||ne.isSelectable(l))){var c=cy(n.doc,i.before(),i.after(),F.empty);if(c.slice.size0)return!1;s=OT(i)}var a=s&&s.nodeBefore;return!(!a||!ne.isSelectable(a)||(e&&e(n.tr.setSelection(ne.create(n.doc,s.pos-a.nodeSize)).scrollIntoView()),0))}function OT(n){if(!n.parent.type.spec.isolating)for(var e=n.depth-1;e>=0;e--){if(n.index(e)>0)return n.doc.resolve(n.before(e+1));if(n.node(e).type.spec.isolating)break}return null}function kT(n,e,t){var i=n.selection.$cursor;if(!i||(t?!t.endOfTextblock("forward",n):i.parentOffset=0;e--){var t=n.node(e);if(n.index(e)+11&&r.after()!=r.end(-1)){var i=r.before();if(Vi(n.doc,i))return e&&e(n.tr.split(i).scrollIntoView()),!0}var o=r.blockRange(),s=o&&Ra(o);return null!=s&&(e&&e(n.tr.lift(o,s).scrollIntoView()),!0)}function VT(n,e,t){var o,s,r=e.nodeBefore,i=e.nodeAfter;if(r.type.spec.isolating||i.type.spec.isolating)return!1;if(function C8(n,e,t){var r=e.nodeBefore,i=e.nodeAfter,o=e.index();return!(!(r&&i&&r.type.compatibleContent(i.type))||(!r.content.size&&e.parent.canReplace(o-1,o)?(t&&t(n.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),0):!e.parent.canReplace(o,o+1)||!i.isTextblock&&!Ic(n.doc,e.pos)||(t&&t(n.tr.clearIncompatible(e.pos,r.type,r.contentMatchAt(r.childCount)).join(e.pos).scrollIntoView()),0)))}(n,e,t))return!0;var a=e.parent.canReplace(e.index(),e.index()+1);if(a&&(o=(s=r.contentMatchAt(r.childCount)).findWrapping(i.type))&&s.matchType(o[0]||i.type).validEnd){if(t){for(var l=e.pos+i.nodeSize,c=M.empty,u=o.length-1;u>=0;u--)c=M.from(o[u].create(null,c));c=M.from(r.copy(c));var d=n.tr.step(new Nn(e.pos-1,l,e.pos,l,new F(c,1,0),o.length,!0)),f=l+2*o.length;Ic(d.doc,f)&&d.join(f),t(d.scrollIntoView())}return!0}var h=ue.findFrom(e,1),p=h&&h.$from.blockRange(h.$to),g=p&&Ra(p);if(null!=g&&g>=e.depth)return t&&t(n.tr.lift(p,g).scrollIntoView()),!0;if(a&&Fa(i,"start",!0)&&Fa(r,"end")){for(var m=r,y=[];y.push(m),!m.isTextblock;)m=m.lastChild;for(var v=i,b=1;!v.isTextblock;v=v.firstChild)b++;if(m.canReplace(m.childCount,m.childCount,v.content)){if(t){for(var _=M.empty,C=y.length-1;C>=0;C--)_=M.from(y[C].copy(_));t(n.tr.step(new Nn(e.pos-y.length,e.pos+i.nodeSize,e.pos+b,e.pos+i.nodeSize-b,new F(_,y.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function HT(n){return function(e,t){for(var r=e.selection,i=n<0?r.$from:r.$to,o=i.depth;i.node(o).isInline;){if(!o)return!1;o--}return!!i.node(o).isTextblock&&(t&&t(e.tr.setSelection(ye.create(e.doc,n<0?i.start(o):i.end(o)))),!0)}}Ct.prototype.get=function(e){return e.config.pluginsByKey[this.key]},Ct.prototype.getState=function(e){return e[this.key]};var UT=HT(-1),zT=HT(1);function WT(n,e){return function(t,r){var i=t.selection,o=i.from,s=i.to,a=!1;return t.doc.nodesBetween(o,s,function(l,c){if(a)return!1;if(l.isTextblock&&!l.hasMarkup(n,e))if(l.type==n)a=!0;else{var u=t.doc.resolve(c),d=u.index();a=u.parent.canReplaceWith(d,d+1,n)}}),!!a&&(r&&r(t.tr.setBlockType(o,s,n,e).scrollIntoView()),!0)}}function vy(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return function(t,r,i){for(var o=0;o2),x.mac=x.ios||/Mac/.test(navigator.platform),x.android=/Android \d/.test(navigator.userAgent),x.webkit="webkitFontSmoothing"in document.documentElement.style,x.webkit_version=x.webkit&&+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]}var Yn=function(n){for(var e=0;;e++)if(!(n=n.previousSibling))return e},wy=function(n){var e=n.assignedSlot||n.parentNode;return e&&11==e.nodeType?e.host:e},KT=null,Ui=function(n,e,t){var r=KT||(KT=document.createRange());return r.setEnd(n,null==t?n.nodeValue.length:t),r.setStart(n,e||0),r},Rc=function(n,e,t,r){return t&&(ZT(n,e,t,r,-1)||ZT(n,e,t,r,1))},B8=/^(img|br|input|textarea|hr)$/i;function ZT(n,e,t,r,i){for(;;){if(n==t&&e==r)return!0;if(e==(i<0?0:ui(n))){var o=n.parentNode;if(!o||1!=o.nodeType||V8(n)||B8.test(n.nodeName)||"false"==n.contentEditable)return!1;e=Yn(n)+(i<0?0:1),n=o}else{if(1!=n.nodeType)return!1;if("false"==(n=n.childNodes[e+(i<0?-1:0)]).contentEditable)return!1;e=i<0?ui(n):0}}}function ui(n){return 3==n.nodeType?n.nodeValue.length:n.childNodes.length}function V8(n){for(var e,t=n;t&&!(e=t.pmViewDesc);t=t.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==n||e.contentDOM==n)}var Sy=function(n){var e=n.isCollapsed;return e&&x.chrome&&n.rangeCount&&!n.getRangeAt(0).collapsed&&(e=!1),e};function La(n,e){var t=document.createEvent("Event");return t.initEvent("keydown",!0,!0),t.keyCode=n,t.key=t.code=e,t}function H8(n){return{left:0,right:n.documentElement.clientWidth,top:0,bottom:n.documentElement.clientHeight}}function Eo(n,e){return"number"==typeof n?n:n[e]}function U8(n){var e=n.getBoundingClientRect();return{left:e.left,right:e.left+n.clientWidth*(e.width/n.offsetWidth||1),top:e.top,bottom:e.top+n.clientHeight*(e.height/n.offsetHeight||1)}}function QT(n){for(var e=[],t=n.ownerDocument;n&&(e.push({dom:n,top:n.scrollTop,left:n.scrollLeft}),n!=t);n=wy(n));return e}function JT(n,e){for(var t=0;t=a){s=Math.max(f.bottom,s),a=Math.min(f.top,a);var h=f.left>e.left?f.left-e.left:f.right=(f.left+f.right)/2?1:0));continue}}!t&&(e.left>=f.right&&e.top>=f.top||e.left>=f.left&&e.top>=f.bottom)&&(o=c+1)}}return t&&3==t.nodeType?function G8(n,e){for(var t=n.nodeValue.length,r=document.createRange(),i=0;i=(o.left+o.right)/2?1:0)}}return{node:n,offset:0}}(t,i):!t||r&&1==t.nodeType?{node:n,offset:o}:XT(t,i)}function My(n,e){return n.left>=e.left-1&&n.left<=e.right+1&&n.top>=e.top-1&&n.top<=e.bottom+1}function ex(n,e,t){var r=n.childNodes.length;if(r&&t.tope.top&&s++}o==n.dom&&s==o.childNodes.length-1&&1==o.lastChild.nodeType&&e.top>o.lastChild.getBoundingClientRect().bottom?u=n.state.doc.content.size:(0==s||1!=o.nodeType||"BR"!=o.childNodes[s-1].nodeName)&&(u=function Z8(n,e,t,r){for(var i=-1,o=e;o!=n.dom;){var s=n.docView.nearestDesc(o,!0);if(!s)return null;if(s.node.isBlock&&s.parent){var a=s.dom.getBoundingClientRect();if(a.left>r.left||a.top>r.top)i=s.posBefore;else{if(!(a.right-1?i:n.docView.posFromDOM(e,t)}(n,o,s,e))}null==u&&(u=function K8(n,e,t){var r=XT(e,t),i=r.node,o=r.offset,s=-1;if(1==i.nodeType&&!i.firstChild){var a=i.getBoundingClientRect();s=a.left!=a.right&&t.left>(a.left+a.right)/2?1:-1}return n.docView.posFromDOM(i,o,s)}(n,c,e));var g=n.docView.nearestDesc(c,!0);return{pos:u,inside:g?g.posAtStart-g.border:-1}}function wo(n,e){var t=n.getClientRects();return t.length?t[e<0?0:t.length-1]:n.getBoundingClientRect()}var Q8=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function tx(n,e,t){var r=n.docView.domFromPos(e,t<0?-1:1),i=r.node,o=r.offset,s=x.webkit||x.gecko;if(3==i.nodeType){if(!s||!Q8.test(i.nodeValue)&&(t<0?o:o!=i.nodeValue.length)){var u=o,d=o,f=t<0?1:-1;return t<0&&!o?(d++,f=-1):t>=0&&o==i.nodeValue.length?(u--,f=1):t<0?u--:d++,Pc(wo(Ui(i,u,d),f),f<0)}var a=wo(Ui(i,o,o),t);if(x.gecko&&o&&/\s/.test(i.nodeValue[o-1])&&o=0)}if(o&&(t<0||o==ui(i))){var g=i.childNodes[o-1],m=3==g.nodeType?Ui(g,ui(g)-(s?0:1)):1!=g.nodeType||"BR"==g.nodeName&&g.nextSibling?null:g;if(m)return Pc(wo(m,1),!1)}if(o=0)}function Pc(n,e){if(0==n.width)return n;var t=e?n.left:n.right;return{top:n.top,bottom:n.bottom,left:t,right:t}}function Iy(n,e){if(0==n.height)return n;var t=e?n.top:n.bottom;return{top:t,bottom:t,left:n.left,right:n.right}}function nx(n,e,t){var r=n.state,i=n.root.activeElement;r!=e&&n.updateState(e),i!=n.dom&&n.focus();try{return t()}finally{r!=e&&n.updateState(r),i!=n.dom&&i&&i.focus()}}var X8=/[\u0590-\u08ac]/,rx=null,ix=null,ox=!1;var Ge=function(e,t,r,i){this.parent=e,this.children=t,this.dom=r,r.pmViewDesc=this,this.contentDOM=i,this.dirty=0},di={size:{configurable:!0},border:{configurable:!0},posBefore:{configurable:!0},posAtStart:{configurable:!0},posAfter:{configurable:!0},posAtEnd:{configurable:!0},contentLost:{configurable:!0},domAtom:{configurable:!0},ignoreForCoords:{configurable:!0}};Ge.prototype.matchesWidget=function(){return!1},Ge.prototype.matchesMark=function(){return!1},Ge.prototype.matchesNode=function(){return!1},Ge.prototype.matchesHack=function(e){return!1},Ge.prototype.parseRule=function(){return null},Ge.prototype.stopEvent=function(){return!1},di.size.get=function(){for(var n=0,e=0;eYn(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))l=2&e.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==t)for(var c=e;;c=c.parentNode){if(c==this.dom){l=!1;break}if(c.parentNode.firstChild!=c)break}if(null==l&&t==e.childNodes.length)for(var u=e;;u=u.parentNode){if(u==this.dom){l=!0;break}if(u.parentNode.lastChild!=u)break}}return(null==l?r>0:l)?this.posAtEnd:this.posAtStart},Ge.prototype.nearestDesc=function(e,t){for(var r=!0,i=e;i;i=i.parentNode){var o=this.getDesc(i);if(o&&(!t||o.node)){if(!r||!o.nodeDOM||(1==o.nodeDOM.nodeType?o.nodeDOM.contains(1==e.nodeType?e:e.parentNode):o.nodeDOM==e))return o;r=!1}}},Ge.prototype.getDesc=function(e){for(var t=e.pmViewDesc,r=t;r;r=r.parent)if(r==this)return t},Ge.prototype.posFromDOM=function(e,t,r){for(var i=e;i;i=i.parentNode){var o=this.getDesc(i);if(o)return o.localPosFromDOM(e,t,r)}return-1},Ge.prototype.descAt=function(e){for(var t=0,r=0;te||s instanceof ux){i=e-o;break}o=a}if(i)return this.children[r].domFromPos(i-this.children[r].border,t);for(var l=void 0;r&&!(l=this.children[r-1]).size&&l instanceof ax&&l.widget.type.side>=0;r--);if(t<=0){for(var c,u=!0;(c=r?this.children[r-1]:null)&&c.dom.parentNode!=this.contentDOM;r--,u=!1);return c&&t&&u&&!c.border&&!c.domAtom?c.domFromPos(c.size,t):{node:this.contentDOM,offset:c?Yn(c.dom)+1:0}}for(var d,f=!0;(d=r=u&&t<=c-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(e,t,u);e=s;for(var d=a;d>0;d--){var f=this.children[d-1];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(1)){i=Yn(f.dom)+1;break}e-=f.size}-1==i&&(i=0)}if(i>-1&&(c>t||a==this.children.length-1)){t=c;for(var h=a+1;hl&&st){var I=d;d=f,f=I}var A=document.createRange();A.setEnd(f.node,f.offset),A.setStart(d.node,d.offset),h.removeAllRanges(),h.addRange(A)}}},Ge.prototype.ignoreMutation=function(e){return!this.contentDOM&&"selection"!=e.type},di.contentLost.get=function(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)},Ge.prototype.markDirty=function(e,t){for(var r=0,i=0;i=r:er){var a=r+o.border,l=s-o.border;if(e>=a&&t<=l)return this.dirty=e==r||t==s?2:1,void(e!=a||t!=l||!o.contentLost&&o.dom.parentNode==this.contentDOM?o.markDirty(e-a,t-a):o.dirty=3);o.dirty=o.dom!=o.contentDOM||o.dom.parentNode!=this.contentDOM||o.children.length?3:2}r=s}this.dirty=2},Ge.prototype.markParentsDirty=function(){for(var e=1,t=this.parent;t;t=t.parent,e++){var r=1==e?2:1;t.dirty0&&(a=Ay(a,0,r,o));for(var c=0;c=0;s--){var a=this.children[s];if(this.dom.contains(a.dom.parentNode)){o.contentElement=a.dom.parentNode;break}}o.contentElement||(o.getContent=function(){return M.empty})}else o.contentElement=this.contentDOM;else o.getContent=function(){return i.node.content};return o},e.prototype.matchesNode=function(i,o,s){return 0==this.dirty&&i.eq(this.node)&&xy(o,this.outerDeco)&&s.eq(this.innerDeco)},t.size.get=function(){return this.node.nodeSize},t.border.get=function(){return this.node.isLeaf?0:1},e.prototype.updateChildren=function(i,o){var s=this,a=this.node.inlineContent,l=o,c=i.composing&&this.localCompositionInfo(i,o),u=c&&c.pos>-1?c:null,d=c&&c.pos<0,f=new fr(this,u&&u.node);(function aW(n,e,t,r){var i=e.locals(n),o=0;if(0!=i.length)for(var l=0,c=[],u=null,d=0;;){if(lo;)c.push(i[l++]);var v=o+g.nodeSize;if(g.isText){var b=v;l=0&&!g&&f.syncToMarks(p==s.node.childCount?Ce.none:s.node.child(p).marks,a,i),f.placeWidget(h,i,l)},function(h,p,g,m){var y;f.syncToMarks(h.marks,a,i),f.findNodeMatch(h,p,g,m)||d&&i.state.selection.from>l&&i.state.selection.to-1&&f.updateNodeAt(h,p,g,y,i)||f.updateNextNode(h,p,g,i,m)||f.addNode(h,p,g,i,l),l+=h.nodeSize}),f.syncToMarks(So,a,i),this.node.isTextblock&&f.addTextblockHacks(),f.destroyRest(),(f.changed||2==this.dirty)&&(u&&this.protectLocalComposition(i,u),dx(this.contentDOM,this.children,i),x.ios&&function lW(n){if("UL"==n.nodeName||"OL"==n.nodeName){var e=n.style.cssText;n.style.cssText=e+"; list-style: square !important",window.getComputedStyle(n),n.style.cssText=e}}(this.dom))},e.prototype.localCompositionInfo=function(i,o){var s=i.state.selection,a=s.from,l=s.to;if(!(!(i.state.selection instanceof ye)||ao+this.node.content.size)){var c=i.root.getSelection(),u=function cW(n,e){for(;;){if(3==n.nodeType)return n;if(1==n.nodeType&&e>0){if(n.childNodes.length>e&&3==n.childNodes[e].nodeType)return n.childNodes[e];e=ui(n=n.childNodes[e-1])}else{if(!(1==n.nodeType&&e=t){var u=a=0&&u+e.length+a>=t)return a+u;if(t==r&&l.length>=r+e.length-a&&l.slice(r-a,r-a+e.length)==e)return r}}}return-1}(this.node.content,d,a-o,l-o);return f<0?null:{node:u,pos:f,text:d}}return{node:u,pos:-1}}}},e.prototype.protectLocalComposition=function(i,o){var s=o.node,a=o.pos,l=o.text;if(!this.getDesc(s)){for(var c=s;c.parentNode!=this.contentDOM;c=c.parentNode){for(;c.previousSibling;)c.parentNode.removeChild(c.previousSibling);for(;c.nextSibling;)c.parentNode.removeChild(c.nextSibling);c.pmViewDesc&&(c.pmViewDesc=null)}var u=new nW(this,c,s,l);i.compositionNodes.push(u),this.children=Ay(this.children,a,a+l.length,i,u)}},e.prototype.update=function(i,o,s,a){return!(3==this.dirty||!i.sameMarkup(this.node)||(this.updateInner(i,o,s,a),0))},e.prototype.updateInner=function(i,o,s,a){this.updateOuterDeco(o),this.node=i,this.innerDeco=s,this.contentDOM&&this.updateChildren(a,this.posAtStart),this.dirty=0},e.prototype.updateOuterDeco=function(i){if(!xy(i,this.outerDeco)){var o=1!=this.nodeDOM.nodeType,s=this.dom;this.dom=fx(this.dom,this.nodeDOM,Ty(this.outerDeco,this.node,o),Ty(i,this.node,o)),this.dom!=s&&(s.pmViewDesc=null,this.dom.pmViewDesc=this),this.outerDeco=i}},e.prototype.selectNode=function(){this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)},e.prototype.deselectNode=function(){this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable")},t.domAtom.get=function(){return this.node.isAtom},Object.defineProperties(e.prototype,t),e}(Ge);function lx(n,e,t,r,i){return hx(r,e,n),new Lc(null,n,e,t,r,r,r,i,0)}var cx=function(n){function e(r,i,o,s,a,l,c){n.call(this,r,i,o,s,a,null,l,c)}n&&(e.__proto__=n),(e.prototype=Object.create(n&&n.prototype)).constructor=e;var t={domAtom:{configurable:!0}};return e.prototype.parseRule=function(){for(var i=this.nodeDOM.parentNode;i&&i!=this.dom&&!i.pmIsDeco;)i=i.parentNode;return{skip:i||!0}},e.prototype.update=function(i,o,s,a){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!i.sameMarkup(this.node)||(this.updateOuterDeco(o),(0!=this.dirty||i.text!=this.node.text)&&i.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=i.text,a.trackWrites==this.nodeDOM&&(a.trackWrites=null)),this.node=i,this.dirty=0,0))},e.prototype.inParent=function(){for(var i=this.parent.contentDOM,o=this.nodeDOM;o;o=o.parentNode)if(o==i)return!0;return!1},e.prototype.domFromPos=function(i){return{node:this.nodeDOM,offset:i}},e.prototype.localPosFromDOM=function(i,o,s){return i==this.nodeDOM?this.posAtStart+Math.min(o,this.node.text.length):n.prototype.localPosFromDOM.call(this,i,o,s)},e.prototype.ignoreMutation=function(i){return"characterData"!=i.type&&"selection"!=i.type},e.prototype.slice=function(i,o,s){var a=this.node.cut(i,o),l=document.createTextNode(a.text);return new e(this.parent,a,this.outerDeco,this.innerDeco,l,l,s)},e.prototype.markDirty=function(i,o){n.prototype.markDirty.call(this,i,o),this.dom!=this.nodeDOM&&(0==i||o==this.nodeDOM.nodeValue.length)&&(this.dirty=3)},t.domAtom.get=function(){return!1},Object.defineProperties(e.prototype,t),e}(Lc),ux=function(n){function e(){n.apply(this,arguments)}n&&(e.__proto__=n),(e.prototype=Object.create(n&&n.prototype)).constructor=e;var t={domAtom:{configurable:!0},ignoreForCoords:{configurable:!0}};return e.prototype.parseRule=function(){return{ignore:!0}},e.prototype.matchesHack=function(i){return 0==this.dirty&&this.dom.nodeName==i},t.domAtom.get=function(){return!0},t.ignoreForCoords.get=function(){return"IMG"==this.dom.nodeName},Object.defineProperties(e.prototype,t),e}(Ge),rW=function(n){function e(t,r,i,o,s,a,l,c,u,d){n.call(this,t,r,i,o,s,a,l,u,d),this.spec=c}return n&&(e.__proto__=n),(e.prototype=Object.create(n&&n.prototype)).constructor=e,e.prototype.update=function(r,i,o,s){if(3==this.dirty)return!1;if(this.spec.update){var a=this.spec.update(r,i,o);return a&&this.updateInner(r,i,o,s),a}return!(!this.contentDOM&&!r.isLeaf)&&n.prototype.update.call(this,r,i,o,s)},e.prototype.selectNode=function(){this.spec.selectNode?this.spec.selectNode():n.prototype.selectNode.call(this)},e.prototype.deselectNode=function(){this.spec.deselectNode?this.spec.deselectNode():n.prototype.deselectNode.call(this)},e.prototype.setSelection=function(r,i,o,s){this.spec.setSelection?this.spec.setSelection(r,i,o):n.prototype.setSelection.call(this,r,i,o,s)},e.prototype.destroy=function(){this.spec.destroy&&this.spec.destroy(),n.prototype.destroy.call(this)},e.prototype.stopEvent=function(r){return!!this.spec.stopEvent&&this.spec.stopEvent(r)},e.prototype.ignoreMutation=function(r){return this.spec.ignoreMutation?this.spec.ignoreMutation(r):n.prototype.ignoreMutation.call(this,r)},e}(Lc);function dx(n,e,t){for(var r=n.firstChild,i=!1,o=0;o0;){for(var a=void 0;;)if(r){var l=t.children[r-1];if(!(l instanceof Rf)){a=l,r--;break}t=l,r=l.children.length}else{if(t==e)break e;r=t.parent.children.indexOf(t),t=t.parent}var c=a.node;if(c){if(c!=n.child(i-1))break;--i,o.set(a,i),s.push(a)}}return{index:i,matched:o,matches:s.reverse()}}(e.node.content,e)};function sW(n,e){return n.type.side-e.type.side}function Ay(n,e,t,r,i){for(var o=[],s=0,a=0;s=t||u<=e?o.push(l):(ct&&o.push(l.slice(t-c,l.size,r)))}return o}function gx(n,e){var t=n.root.getSelection(),r=n.state.doc;if(!t.focusNode)return null;var i=n.docView.nearestDesc(t.focusNode),o=i&&0==i.size,s=n.docView.posFromDOM(t.focusNode,t.focusOffset);if(s<0)return null;var l,c,a=r.resolve(s);if(Sy(t)){for(l=a;i&&!i.node;)i=i.parent;if(i&&i.node.isAtom&&ne.isSelectable(i.node)&&i.parent&&(!i.node.isInline||!function j8(n,e,t){for(var r=0==e,i=e==ui(n);r||i;){if(n==t)return!0;var o=Yn(n);if(!(n=n.parentNode))return!1;r=r&&0==o,i=i&&o==ui(n)}}(t.focusNode,t.focusOffset,i.dom))){var u=i.posBefore;c=new ne(s==u?a:r.resolve(u))}}else{var d=n.docView.posFromDOM(t.anchorNode,t.anchorOffset);if(d<0)return null;l=r.resolve(d)}return c||(c=ky(n,l,a,"pointer"==e||n.state.selection.head>1,s=Math.min(o,e.length);i-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{var c=Rf.create(this.top,e[o],t,r);this.top.children.splice(this.index,0,c),this.top=c,this.changed=!0}this.index=0,o++}},fr.prototype.findNodeMatch=function(e,t,r,i){var s,o=-1;if(i>=this.preMatch.index&&(s=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&s.matchesNode(e,t,r))o=this.top.children.indexOf(s,this.index);else for(var a=this.index,l=Math.min(this.top.children.length,a+5);a0?r.max(i):r.min(i),s=o.parent.inlineContent?o.depth?n.doc.resolve(e>0?o.after():o.before()):null:o;return s&&ue.findFrom(s,e)}function ds(n,e){return n.dispatch(n.state.tr.setSelection(e).scrollIntoView()),!0}function wx(n,e,t){var r=n.state.selection;if(!(r instanceof ye)){if(r instanceof ne&&r.node.isInline)return ds(n,new ye(e>0?r.$to:r.$from));var c=Ny(n.state,e);return!!c&&ds(n,c)}if(!r.empty||t.indexOf("s")>-1)return!1;if(n.endOfTextblock(e>0?"right":"left")){var i=Ny(n.state,e);return!!(i&&i instanceof ne)&&ds(n,i)}if(!(x.mac&&t.indexOf("m")>-1)){var a,o=r.$head,s=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter;if(!s||s.isText)return!1;var l=e<0?o.pos-s.nodeSize:o.pos;return!!(s.isAtom||(a=n.docView.descAt(l))&&!a.contentDOM)&&(ne.isSelectable(s)?ds(n,new ne(e<0?n.state.doc.resolve(o.pos-s.nodeSize):o)):!!x.webkit&&ds(n,new ye(n.state.doc.resolve(e<0?l:l+s.nodeSize))))}}function Pf(n){return 3==n.nodeType?n.nodeValue.length:n.childNodes.length}function jc(n){var e=n.pmViewDesc;return e&&0==e.size&&(n.nextSibling||"BR"!=n.nodeName)}function Ry(n){var e=n.root.getSelection(),t=e.focusNode,r=e.focusOffset;if(t){var i,o,s=!1;for(x.gecko&&1==t.nodeType&&r0){if(1!=t.nodeType)break;var a=t.childNodes[r-1];if(jc(a))i=t,o=--r;else{if(3!=a.nodeType)break;r=(t=a).nodeValue.length}}else{if(Sx(t))break;for(var l=t.previousSibling;l&&jc(l);)i=t.parentNode,o=Yn(l),l=l.previousSibling;if(l)r=Pf(t=l);else{if((t=t.parentNode)==n.dom)break;r=0}}s?Fy(n,e,t,r):i&&Fy(n,e,i,o)}}function Py(n){var e=n.root.getSelection(),t=e.focusNode,r=e.focusOffset;if(t){for(var o,s,i=Pf(t);;)if(r-1||x.mac&&t.indexOf("m")>-1)return!1;var i=r.$from,o=r.$to;if(!i.parent.inlineContent||n.endOfTextblock(e<0?"up":"down")){var s=Ny(n.state,e);if(s&&s instanceof ne)return ds(n,s)}if(!i.parent.inlineContent){var a=e<0?i:o,l=r instanceof Hi?ue.near(a,e):ue.findFrom(a,e);return!!l&&ds(n,l)}return!1}function Ix(n,e){if(!(n.state.selection instanceof ye))return!0;var t=n.state.selection,r=t.$head,o=t.empty;if(!r.sameParent(t.$anchor))return!0;if(!o)return!1;if(n.endOfTextblock(e>0?"forward":"backward"))return!0;var s=!r.textOffset&&(e<0?r.nodeBefore:r.nodeAfter);if(s&&!s.isText){var a=n.state.tr;return e<0?a.delete(r.pos-s.nodeSize,r.pos):a.delete(r.pos,r.pos+s.nodeSize),n.dispatch(a),!0}return!1}function Tx(n,e,t){n.domObserver.stop(),e.contentEditable=t,n.domObserver.start()}function yW(n){var e=n.pmViewDesc;if(e)return e.parseRule();if("BR"==n.nodeName&&n.parentNode){if(x.safari&&/^(ul|ol)$/i.test(n.parentNode.nodeName)){var t=document.createElement("div");return t.appendChild(document.createElement("li")),{skip:t}}if(n.parentNode.lastChild==n||x.safari&&/^(tr|table)$/i.test(n.parentNode.nodeName))return{ignore:!0}}else if("IMG"==n.nodeName&&n.getAttribute("mark-placeholder"))return{ignore:!0}}function xx(n,e,t){return Math.max(t.anchor,t.head)>e.content.size?null:ky(n,e.resolve(t.anchor),e.resolve(t.head))}function Ly(n,e,t){for(var r=n.depth,i=e?n.end():n.pos;r>0&&(e||n.indexAfter(r)==n.node(r).childCount);)r--,i++,e=!1;if(t)for(var o=n.node(r).maybeChild(n.indexAfter(r));o&&!o.isLeaf;)o=o.firstChild,i++;return i}function Ax(n,e){for(var t=[],r=e.content,i=e.openStart,o=e.openEnd;i>1&&o>1&&1==r.childCount&&1==r.firstChild.childCount;){i--,o--;var s=r.firstChild;t.push(s.type.name,s.attrs!=s.type.defaultAttrs?s.attrs:null),r=s.content}var a=n.someProp("clipboardSerializer")||Gt.fromSchema(n.state.schema),l=Bx(),c=l.createElement("div");c.appendChild(a.serializeFragment(r,{document:l}));for(var d,u=c.firstChild;u&&1==u.nodeType&&(d=Fx[u.nodeName.toLowerCase()]);){for(var f=d.length-1;f>=0;f--){for(var h=l.createElement(d[f]);c.firstChild;)h.appendChild(c.firstChild);c.appendChild(h),"tbody"!=d[f]&&(i++,o++)}u=c.firstChild}return u&&1==u.nodeType&&u.setAttribute("data-pm-slice",i+" "+o+" "+JSON.stringify(t)),{dom:c,text:n.someProp("clipboardTextSerializer",function(g){return g(e)})||e.content.textBetween(0,e.content.size,"\n\n")}}function Ox(n,e,t,r,i){var o,a,s=i.parent.type.spec.code;if(!t&&!e)return null;var l=e&&(r||s||!t);if(l){if(n.someProp("transformPastedText",function(C){e=C(e,s||r)}),s)return e?new F(M.from(n.state.schema.text(e.replace(/\r\n?/g,"\n"))),0,0):F.empty;var c=n.someProp("clipboardTextParser",function(C){return C(e,i,r)});if(c)a=c;else{var u=i.marks(),f=n.state.schema,h=Gt.fromSchema(f);o=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(function(C){var D=o.appendChild(document.createElement("p"));C&&D.appendChild(h.serializeNode(f.text(C,u)))})}}else n.someProp("transformPastedHTML",function(C){t=C(t)}),o=function SW(n){var e=/^(\s*]*>)*/.exec(n);e&&(n=n.slice(e[0].length));var i,t=Bx().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(n);if((i=r&&Fx[r[1].toLowerCase()])&&(n=i.map(function(s){return"<"+s+">"}).join("")+n+i.map(function(s){return""}).reverse().join("")),t.innerHTML=n,i)for(var o=0;o=0;a-=2){var l=t.nodes[r[a]];if(!l||l.hasRequiredAttrs())break;i=M.from(l.create(r[a+1],i)),o++,s++}return new F(i,o,s)}(Px(a,+g[1],+g[2]),g[3]);else if(a=F.maxOpen(function wW(n,e){if(n.childCount<2)return n;for(var t=function(o){var a=e.node(o).contentMatchAt(e.index(o)),l=void 0,c=[];if(n.forEach(function(u){if(c){var f,d=a.findWrapping(u.type);if(!d)return c=null;if(f=c.length&&l.length&&Nx(d,l,u,c[c.length-1],0))c[c.length-1]=f;else{c.length&&(c[c.length-1]=Rx(c[c.length-1],l.length));var h=kx(u,d);c.push(h),a=a.matchType(h.type,h.attrs),l=d}}}),c)return{v:M.from(c)}},r=e.depth;r>=0;r--){var i=t(r);if(i)return i.v}return n}(a.content,i),!0),a.openStart||a.openEnd){for(var y=0,v=0,b=a.content.firstChild;y=t;r--)n=e[r].create(null,M.from(n));return n}function Nx(n,e,t,r,i){if(i=t&&(a=e<0?s.contentMatchAt(0).fillBefore(a,n.childCount>1||o<=i).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(M.empty,!0))),n.replaceChild(e<0?0:n.childCount-1,s.copy(a))}function Px(n,e,t){return es.target.nodeValue.length})?r.flushSoon():r.flush()}),this.currentSelection=new Vy,jy&&(this.onCharData=function(i){r.queue.push({target:i.target,type:"characterData",oldValue:i.prevValue}),r.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.suppressingSelectionUpdates=!1};Qn.prototype.flushSoon=function(){var e=this;this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(function(){e.flushingSoon=-1,e.flush()},20))},Qn.prototype.forceFlush=function(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())},Qn.prototype.start=function(){this.observer&&this.observer.observe(this.view.dom,TW),jy&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()},Qn.prototype.stop=function(){var e=this;if(this.observer){var t=this.observer.takeRecords();if(t.length){for(var r=0;r-1)){var e=this.observer?this.observer.takeRecords():[];this.queue.length&&(e=this.queue.concat(e),this.queue.length=0);var t=this.view.root.getSelection(),r=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(t)&&Dx(this.view)&&!this.ignoreSelectionChange(t),i=-1,o=-1,s=!1,a=[];if(this.view.editable)for(var l=0;l1){var u=a.filter(function(h){return"BR"==h.nodeName});if(2==u.length){var d=u[0],f=u[1];d.parentNode&&d.parentNode.parentNode==f.parentNode?f.remove():d.remove()}}(i>-1||r)&&(i>-1&&(this.view.docView.markDirty(i,o),function xW(n){jx||(jx=!0,"normal"==getComputedStyle(n.dom).whiteSpace&&console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."))}(this.view)),this.handleDOMChange(i,o,s,a),this.view.docView&&this.view.docView.dirty?this.view.updateState(this.view.state):this.currentSelection.eq(t)||Mo(this.view),this.currentSelection.set(t))}},Qn.prototype.registerMutation=function(e,t){if(t.indexOf(e.target)>-1)return null;var r=this.view.docView.nearestDesc(e.target);if("attributes"==e.type&&(r==this.view.docView||"contenteditable"==e.attributeName||"style"==e.attributeName&&!e.oldValue&&!e.target.getAttribute("style"))||!r||r.ignoreMutation(e))return null;if("childList"==e.type){for(var i=0;io.depth?u(n,t,o.nodeAfter,o.before(c),i,!0):u(n,t,o.node(c),o.before(c),i,!1)}))return{v:!0}},a=o.depth+1;a>0;a--){var l=s(a);if(l)return l.v}return!1}function ja(n,e,t){n.focused||n.focus();var r=n.state.tr.setSelection(e);"pointer"==t&&r.setMeta("pointer",!0),n.dispatch(r)}function BW(n,e,t,r){return zy(n,"handleDoubleClickOn",e,t,r)||n.someProp("handleDoubleClick",function(i){return i(n,e,r)})}function jW(n,e,t,r){return zy(n,"handleTripleClickOn",e,t,r)||n.someProp("handleTripleClick",function(i){return i(n,e,r)})||function VW(n,e,t){if(0!=t.button)return!1;var r=n.state.doc;if(-1==e)return!!r.inlineContent&&(ja(n,ye.create(r,0,r.content.size),"pointer"),!0);for(var i=r.resolve(e),o=i.depth+1;o>0;o--){var s=o>i.depth?i.nodeAfter:i.node(o),a=i.before(o);if(s.inlineContent)ja(n,ye.create(r,a+1,a+1+s.content.size),"pointer");else{if(!ne.isSelectable(s))continue;ja(n,ne.create(r,a),"pointer")}return!0}}(n,t,r)}function Wy(n){return Bf(n)}Mn.keydown=function(n,e){if(n.shiftKey=16==e.keyCode||e.shiftKey,!Hx(n,e)&&(n.lastKeyCode=e.keyCode,n.lastKeyCodeTime=Date.now(),!x.android||!x.chrome||13!=e.keyCode))if(229!=e.keyCode&&n.domObserver.forceFlush(),!x.ios||13!=e.keyCode||e.ctrlKey||e.altKey||e.metaKey)n.someProp("handleKeyDown",function(r){return r(n,e)})||function mW(n,e){var t=e.keyCode,r=function gW(n){var e="";return n.ctrlKey&&(e+="c"),n.metaKey&&(e+="m"),n.altKey&&(e+="a"),n.shiftKey&&(e+="s"),e}(e);return 8==t||x.mac&&72==t&&"c"==r?Ix(n,-1)||Ry(n):46==t||x.mac&&68==t&&"c"==r?Ix(n,1)||Py(n):13==t||27==t||(37==t?wx(n,-1,r)||Ry(n):39==t?wx(n,1,r)||Py(n):38==t?Mx(n,-1,r)||Ry(n):40==t?function pW(n){if(x.safari&&!(n.state.selection.$head.parentOffset>0)){var e=n.root.getSelection(),t=e.focusNode;if(t&&1==t.nodeType&&0==e.focusOffset&&t.firstChild&&"false"==t.firstChild.contentEditable){var i=t.firstChild;Tx(n,i,!0),setTimeout(function(){return Tx(n,i,!1)},20)}}}(n)||Mx(n,1,r)||Py(n):r==(x.mac?"m":"c")&&(66==t||73==t||89==t||90==t))}(n,e)?e.preventDefault():fs(n,"key");else{var t=Date.now();n.lastIOSEnter=t,n.lastIOSEnterFallbackTimeout=setTimeout(function(){n.lastIOSEnter==t&&(n.someProp("handleKeyDown",function(r){return r(n,La(13,"Enter"))}),n.lastIOSEnter=0)},200)}},Mn.keyup=function(n,e){16==e.keyCode&&(n.shiftKey=!1)},Mn.keypress=function(n,e){if(!(Hx(n,e)||!e.charCode||e.ctrlKey&&!e.altKey||x.mac&&e.metaKey)){if(n.someProp("handleKeyPress",function(i){return i(n,e)}))return void e.preventDefault();var t=n.state.selection;if(!(t instanceof ye&&t.$from.sameParent(t.$to))){var r=String.fromCharCode(e.charCode);n.someProp("handleTextInput",function(i){return i(n,t.$from.pos,t.$to.pos,r)})||n.dispatch(n.state.tr.insertText(r).scrollIntoView()),e.preventDefault()}}};var Vx=x.mac?"metaKey":"ctrlKey";Rn.mousedown=function(n,e){n.shiftKey=e.shiftKey;var t=Wy(n),r=Date.now(),i="singleClick";r-n.lastClick.time<500&&function RW(n,e){var t=e.x-n.clientX,r=e.y-n.clientY;return t*t+r*r<100}(e,n.lastClick)&&!e[Vx]&&("singleClick"==n.lastClick.type?i="doubleClick":"doubleClick"==n.lastClick.type&&(i="tripleClick")),n.lastClick={time:r,x:e.clientX,y:e.clientY,type:i};var o=n.posAtCoords(Ff(e));!o||("singleClick"==i?(n.mouseDown&&n.mouseDown.done(),n.mouseDown=new Lf(n,o,e,t)):("doubleClick"==i?BW:jW)(n,o.pos,o.inside,e)?e.preventDefault():fs(n,"pointer"))};var Lf=function(e,t,r,i){var s,a,o=this;if(this.view=e,this.startDoc=e.state.doc,this.pos=t,this.event=r,this.flushed=i,this.selectNode=r[Vx],this.allowDefault=r.shiftKey,this.delayedSelectionSync=!1,t.inside>-1)s=e.state.doc.nodeAt(t.inside),a=t.inside;else{var l=e.state.doc.resolve(t.pos);s=l.parent,a=l.depth?l.before():0}this.mightDrag=null;var c=i?null:r.target,u=c?e.docView.nearestDesc(c,!0):null;this.target=u?u.dom:null;var f=e.state.selection;(0==r.button&&s.type.spec.draggable&&!1!==s.type.spec.selectable||f instanceof ne&&f.from<=a&&f.to>a)&&(this.mightDrag={node:s,pos:a,addAttr:this.target&&!this.target.draggable,setUneditable:this.target&&x.gecko&&!this.target.hasAttribute("contentEditable")}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(function(){o.view.mouseDown==o&&o.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),fs(e,"pointer")};function Hx(n,e){return!!n.composing||!!(x.safari&&Math.abs(e.timeStamp-n.compositionEndedAt)<500)&&(n.compositionEndedAt=-2e8,!0)}Lf.prototype.done=function(){var e=this;this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(function(){return Mo(e.view)}),this.view.mouseDown=null},Lf.prototype.up=function(e){if(this.done(),this.view.dom.contains(3==e.target.nodeType?e.target.parentNode:e.target)){var t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(Ff(e))),this.allowDefault||!t?fs(this.view,"pointer"):function LW(n,e,t,r,i){return zy(n,"handleClickOn",e,t,r)||n.someProp("handleClick",function(o){return o(n,e,r)})||(i?function FW(n,e){if(-1==e)return!1;var r,i,t=n.state.selection;t instanceof ne&&(r=t.node);for(var o=n.state.doc.resolve(e),s=o.depth+1;s>0;s--){var a=s>o.depth?o.nodeAfter:o.node(s);if(ne.isSelectable(a)){i=r&&t.$from.depth>0&&s>=t.$from.depth&&o.before(t.$from.depth+1)==t.$from.pos?o.before(t.$from.depth):o.before(s);break}}return null!=i&&(ja(n,ne.create(n.state.doc,i),"pointer"),!0)}(n,t):function PW(n,e){if(-1==e)return!1;var t=n.state.doc.resolve(e),r=t.nodeAfter;return!!(r&&r.isAtom&&ne.isSelectable(r))&&(ja(n,new ne(t),"pointer"),!0)}(n,t))}(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():0==e.button&&(this.flushed||x.safari&&this.mightDrag&&!this.mightDrag.node.isAtom||x.chrome&&!(this.view.state.selection instanceof ye)&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(ja(this.view,ue.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):fs(this.view,"pointer")}},Lf.prototype.move=function(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0),fs(this.view,"pointer"),0==e.buttons&&this.done()},Rn.touchdown=function(n){Wy(n),fs(n,"pointer")},Rn.contextmenu=function(n){return Wy(n)};var HW=x.android?5e3:-1;function Ux(n,e){clearTimeout(n.composingTimeout),e>-1&&(n.composingTimeout=setTimeout(function(){return Bf(n)},e))}function zx(n){for(n.composing&&(n.composing=!1,n.compositionEndedAt=function UW(){var n=document.createEvent("Event");return n.initEvent("event",!0,!0),n.timeStamp}());n.compositionNodes.length>0;)n.compositionNodes.pop().markParentsDirty()}function Bf(n,e){if(!(x.android&&n.domObserver.flushingSoon>=0)){if(n.domObserver.forceFlush(),zx(n),e||n.docView&&n.docView.dirty){var t=gx(n);return t&&!t.eq(n.state.selection)?n.dispatch(n.state.tr.setSelection(t)):n.updateState(n.state),!0}return!1}}Mn.compositionstart=Mn.compositionupdate=function(n){if(!n.composing){n.domObserver.flush();var e=n.state,t=e.selection.$from;if(e.selection.empty&&(e.storedMarks||!t.textOffset&&t.parentOffset&&t.nodeBefore.marks.some(function(a){return!1===a.type.spec.inclusive})))n.markCursor=n.state.storedMarks||t.marks(),Bf(n,!0),n.markCursor=null;else if(Bf(n),x.gecko&&e.selection.empty&&t.parentOffset&&!t.textOffset&&t.nodeBefore.marks.length)for(var r=n.root.getSelection(),i=r.focusNode,o=r.focusOffset;i&&1==i.nodeType&&0!=o;){var s=o<0?i.lastChild:i.childNodes[o-1];if(!s)break;if(3==s.nodeType){r.collapse(s,s.nodeValue.length);break}i=s,o=-1}n.composing=!0}Ux(n,HW)},Mn.compositionend=function(n,e){n.composing&&(n.composing=!1,n.compositionEndedAt=e.timeStamp,Ux(n,20))};var Va=x.ie&&x.ie_version<15||x.ios&&x.webkit_version<604;function $y(n,e,t,r){var i=Ox(n,e,t,n.shiftKey,n.state.selection.$from);if(n.someProp("handlePaste",function(a){return a(n,r,i||F.empty)}))return!0;if(!i)return!1;var o=function WW(n){return 0==n.openStart&&0==n.openEnd&&1==n.content.childCount?n.content.firstChild:null}(i),s=o?n.state.tr.replaceSelectionWith(o,n.shiftKey):n.state.tr.replaceSelection(i);return n.dispatch(s.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}Rn.copy=Mn.cut=function(n,e){var t=n.state.selection,r="cut"==e.type;if(!t.empty){var i=Va?null:e.clipboardData,s=Ax(n,t.content()),a=s.dom,l=s.text;i?(e.preventDefault(),i.clearData(),i.setData("text/html",a.innerHTML),i.setData("text/plain",l)):function zW(n,e){if(n.dom.parentNode){var t=n.dom.parentNode.appendChild(document.createElement("div"));t.appendChild(e),t.style.cssText="position: fixed; left: -10000px; top: 10px";var r=getSelection(),i=document.createRange();i.selectNodeContents(e),n.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout(function(){t.parentNode&&t.parentNode.removeChild(t),n.focus()},50)}}(n,a),r&&n.dispatch(n.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))}},Mn.paste=function(n,e){if(!n.composing||x.android){var t=Va?null:e.clipboardData;t&&$y(n,t.getData("text/plain"),t.getData("text/html"),e)?e.preventDefault():function $W(n,e){if(n.dom.parentNode){var t=n.shiftKey||n.state.selection.$from.parent.type.spec.code,r=n.dom.parentNode.appendChild(document.createElement(t?"textarea":"div"));t||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus(),setTimeout(function(){n.focus(),r.parentNode&&r.parentNode.removeChild(r),t?$y(n,r.value,null,e):$y(n,r.textContent,r.innerHTML,e)},50)}}(n,e)}};var GW=function(e,t){this.slice=e,this.move=t},Wx=x.mac?"altKey":"ctrlKey";for(var $x in Rn.dragstart=function(n,e){var t=n.mouseDown;if(t&&t.done(),e.dataTransfer){var r=n.state.selection,i=r.empty?null:n.posAtCoords(Ff(e));if(!(i&&i.pos>=r.from&&i.pos<=(r instanceof ne?r.to-1:r.to)))if(t&&t.mightDrag)n.dispatch(n.state.tr.setSelection(ne.create(n.state.doc,t.mightDrag.pos)));else if(e.target&&1==e.target.nodeType){var o=n.docView.nearestDesc(e.target,!0);o&&o.node.type.spec.draggable&&o!=n.docView&&n.dispatch(n.state.tr.setSelection(ne.create(n.state.doc,o.posBefore)))}var s=n.state.selection.content(),a=Ax(n,s),l=a.dom,c=a.text;e.dataTransfer.clearData(),e.dataTransfer.setData(Va?"Text":"text/html",l.innerHTML),e.dataTransfer.effectAllowed="copyMove",Va||e.dataTransfer.setData("text/plain",c),n.dragging=new GW(s,!e[Wx])}},Rn.dragend=function(n){var e=n.dragging;window.setTimeout(function(){n.dragging==e&&(n.dragging=null)},50)},Mn.dragover=Mn.dragenter=function(n,e){return e.preventDefault()},Mn.drop=function(n,e){var t=n.dragging;if(n.dragging=null,e.dataTransfer){var r=n.posAtCoords(Ff(e));if(r){var i=n.state.doc.resolve(r.pos);if(i){var o=t&&t.slice;o?n.someProp("transformPasted",function(p){o=p(o)}):o=Ox(n,e.dataTransfer.getData(Va?"Text":"text/plain"),Va?null:e.dataTransfer.getData("text/html"),!1,i);var s=t&&!e[Wx];if(n.someProp("handleDrop",function(p){return p(n,e,o||F.empty,s)}))return void e.preventDefault();if(o){e.preventDefault();var a=o?vT(n.state.doc,i.pos,o):i.pos;null==a&&(a=i.pos);var l=n.state.tr;s&&l.deleteSelection();var c=l.mapping.map(a),u=0==o.openStart&&0==o.openEnd&&1==o.content.childCount,d=l.doc;if(u?l.replaceRangeWith(c,c,o.content.firstChild):l.replaceRange(c,c,o),!l.doc.eq(d)){var f=l.doc.resolve(c);if(u&&ne.isSelectable(o.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(o.content.firstChild))l.setSelection(new ne(f));else{var h=l.mapping.map(a);l.mapping.maps[l.mapping.maps.length-1].forEach(function(p,g,m,y){return h=y}),l.setSelection(ky(n,f,l.doc.resolve(h)))}n.focus(),n.dispatch(l.setMeta("uiEvent","drop"))}}}}}},Rn.focus=function(n){n.focused||(n.domObserver.stop(),n.dom.classList.add("ProseMirror-focused"),n.domObserver.start(),n.focused=!0,setTimeout(function(){n.docView&&n.hasFocus()&&!n.domObserver.currentSelection.eq(n.root.getSelection())&&Mo(n)},20))},Rn.blur=function(n,e){n.focused&&(n.domObserver.stop(),n.dom.classList.remove("ProseMirror-focused"),n.domObserver.start(),e.relatedTarget&&n.dom.contains(e.relatedTarget)&&n.domObserver.currentSelection.set({}),n.focused=!1)},Rn.beforeinput=function(n,e){if(x.chrome&&x.android&&"deleteContentBackward"==e.inputType){n.domObserver.flushSoon();var t=n.domChangeCount;setTimeout(function(){if(n.domChangeCount==t&&(n.dom.blur(),n.focus(),!n.someProp("handleKeyDown",function(o){return o(n,La(8,"Backspace"))}))){var i=n.state.selection.$cursor;i&&i.pos>0&&n.dispatch(n.state.tr.delete(i.pos-1,i.pos).scrollIntoView())}},50)}},Mn)Rn[$x]=Mn[$x];function Vc(n,e){if(n==e)return!0;for(var t in n)if(n[t]!==e[t])return!1;for(var r in e)if(!(r in n))return!1;return!0}var Ha=function(e,t){this.spec=t||hs,this.side=this.spec.side||0,this.toDOM=e};Ha.prototype.map=function(e,t,r,i){var o=e.mapResult(t.from+i,this.side<0?-1:1),s=o.pos;return o.deleted?null:new Dt(s-r,s-r,this)},Ha.prototype.valid=function(){return!0},Ha.prototype.eq=function(e){return this==e||e instanceof Ha&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Vc(this.spec,e.spec))},Ha.prototype.destroy=function(e){this.spec.destroy&&this.spec.destroy(e)};var jr=function(e,t){this.spec=t||hs,this.attrs=e};jr.prototype.map=function(e,t,r,i){var o=e.map(t.from+i,this.spec.inclusiveStart?-1:1)-r,s=e.map(t.to+i,this.spec.inclusiveEnd?1:-1)-r;return o>=s?null:new Dt(o,s,this)},jr.prototype.valid=function(e,t){return t.from=e&&(!o||o(a.spec))&&r.push(a.copy(a.from+i,a.to+i))}for(var l=0;le){var c=this.children[l]+1;this.children[l+2].findInner(e-c,t-c,r,i+c,o)}},Oe.prototype.map=function(e,t,r){return this==Kt||0==e.maps.length?this:this.mapInner(e,t,0,0,r||hs)},Oe.prototype.mapInner=function(e,t,r,i,o){for(var s,a=0;aZ+o)){var Be=a[ie]+o;re>=Be?a[ie+1]=ee<=Be?-2:-1:K>=i&&(qe=Re-K-(re-ee))&&(a[ie]+=qe,a[ie+1]+=qe)}}},c=0;c=r.content.size){u=!0;continue}var g=t.map(n[d+1]+o,-1)-i,m=r.content.findIndex(h),v=m.offset,b=r.maybeChild(m.index);if(b&&v==h&&v+b.nodeSize==g){var _=a[d+2].mapInner(t,b,f+1,n[d]+o+1,s);_!=Kt?(a[d]=h,a[d+1]=g,a[d+2]=_):(a[d+1]=-2,u=!0)}else u=!0}if(u){var C=function KW(n,e,t,r,i,o,s){function a(c,u){for(var d=0;da&&u.to=e){this.children[o]==e&&(r=this.children[o+2]);break}for(var s=e+1,a=s+t.content.size,l=0;ls&&c.type instanceof jr){var u=Math.max(s,c.from)-s,d=Math.min(a,c.to)-s;ut&&s.to0;)e++;n.splice(e,0,t)}function Ky(n){var e=[];return n.someProp("decorations",function(t){var r=t(n.state);r&&r!=Kt&&e.push(r)}),n.cursorWrapper&&e.push(Oe.create(n.state.doc,[n.cursorWrapper.deco])),hr.from(e)}hr.prototype.map=function(e,t){var r=this.members.map(function(i){return i.map(e,t,hs)});return hr.from(r)},hr.prototype.forChild=function(e,t){if(t.isLeaf)return Oe.empty;for(var r=[],i=0;iDate.now()-50?n.lastSelectionOrigin:null,s=gx(n,o);if(s&&!n.state.selection.eq(s)){var a=n.state.tr.setSelection(s);"pointer"==o?a.setMeta("pointer",!0):"key"==o&&a.scrollIntoView(),n.dispatch(a)}}else{var l=n.state.doc.resolve(e),c=l.sharedDepth(t);e=l.before(c+1),t=n.state.doc.resolve(t).after(c+1);var u=n.state.selection,d=function vW(n,e,t){var r=n.docView.parseRange(e,t),i=r.node,o=r.fromOffset,s=r.toOffset,a=r.from,l=r.to,c=n.root.getSelection(),u=null,d=c.anchorNode;if(d&&n.dom.contains(1==d.nodeType?d:d.parentNode)&&(u=[{node:d,offset:c.anchorOffset}],Sy(c)||u.push({node:c.focusNode,offset:c.focusOffset})),x.chrome&&8===n.lastKeyCode)for(var f=s;f>o;f--){var h=i.childNodes[f-1],p=h.pmViewDesc;if("BR"==h.nodeName&&!p){s=f;break}if(!p||p.size)break}var g=n.state.doc,m=n.someProp("domParser")||Lr.fromSchema(n.state.schema),y=g.resolve(a),v=null,b=m.parse(i,{topNode:y.parent,topMatch:y.parent.contentMatchAt(y.index()),topOpen:!0,from:o,to:s,preserveWhitespace:"pre"!=y.parent.type.whitespace||"full",editableContent:!0,findPositions:u,ruleFromNode:yW,context:y});if(u&&null!=u[0].pos){var _=u[0].pos,C=u[1]&&u[1].pos;null==C&&(C=_),v={anchor:_+a,head:C+a}}return{doc:b,sel:v,from:a,to:l}}(n,e,t);if(x.chrome&&n.cursorWrapper&&d.sel&&d.sel.anchor==n.cursorWrapper.deco.from){var f=n.cursorWrapper.deco.type.toDOM.nextSibling,h=f&&f.nodeValue?f.nodeValue.length:1;d.sel={anchor:d.sel.anchor+h,head:d.sel.anchor+h}}var m,y,p=n.state.doc,g=p.slice(d.from,d.to);8===n.lastKeyCode&&Date.now()-100=a?o-r:0)+(l-a),a=o):l=l?o-r:0)+(a-l),l=o),{start:o,endA:a,endB:l}}(g.content,d.doc.content,d.from,m,y);if((x.ios&&n.lastIOSEnter>Date.now()-225||x.android)&&i.some(function(Z){return"DIV"==Z.nodeName||"P"==Z.nodeName})&&(!v||v.endA>=v.endB)&&n.someProp("handleKeyDown",function(Z){return Z(n,La(13,"Enter"))}))n.lastIOSEnter=0;else{if(!v){if(!(r&&u instanceof ye&&!u.empty&&u.$head.sameParent(u.$anchor))||n.composing||d.sel&&d.sel.anchor!=d.sel.head){if(d.sel){var b=xx(n,n.state.doc,d.sel);b&&!b.eq(n.state.selection)&&n.dispatch(n.state.tr.setSelection(b))}return}v={start:u.from,endA:u.to,endB:u.to}}n.domChangeCount++,n.state.selection.fromn.state.selection.from&&v.start<=n.state.selection.from+2&&n.state.selection.from>=d.from?v.start=n.state.selection.from:v.endA=n.state.selection.to-2&&n.state.selection.to<=d.to&&(v.endB+=n.state.selection.to-v.endA,v.endA=n.state.selection.to)),x.ie&&x.ie_version<=11&&v.endB==v.start+1&&v.endA==v.start&&v.start>d.from&&" \xa0"==d.doc.textBetween(v.start-d.from-1,v.start-d.from+1)&&(v.start--,v.endA--,v.endB--);var I,_=d.doc.resolveNoCache(v.start-d.from),C=d.doc.resolveNoCache(v.endB-d.from),D=_.sameParent(C)&&_.parent.inlineContent;if((x.ios&&n.lastIOSEnter>Date.now()-225&&(!D||i.some(function(Z){return"DIV"==Z.nodeName||"P"==Z.nodeName}))||!D&&_.posv.start&&function CW(n,e,t,r,i){if(!r.parent.isTextblock||t-e<=i.pos-r.pos||Ly(r,!0,!1)t||Ly(s,!0,!1)i.scrollToSelection?"to selection":"preserve",d=o||!this.docView.matchesNode(e.doc,c,l);(d||!e.selection.eq(i.selection))&&(s=!0);var f="preserve"==u&&s&&null==this.dom.style.overflowAnchor&&function z8(n){for(var r,i,e=n.dom.getBoundingClientRect(),t=Math.max(0,e.top),o=(e.left+e.right)/2,s=t+1;s=t-20){r=a,i=l.top;break}}}return{refDOM:r,refTop:i,stack:QT(n.dom)}}(this);if(s){this.domObserver.stop();var h=d&&(x.ie||x.chrome)&&!this.composing&&!i.selection.empty&&!e.selection.empty&&function ZW(n,e){var t=Math.min(n.$anchor.sharedDepth(n.head),e.$anchor.sharedDepth(e.head));return n.$anchor.start(t)!=e.$anchor.start(t)}(i.selection,e.selection);if(d){var p=x.chrome?this.trackWrites=this.root.getSelection().focusNode:null;(o||!this.docView.update(e.doc,c,l,this))&&(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=lx(e.doc,c,l,this.dom,this)),p&&!this.trackWrites&&(h=!0)}h||!(this.mouseDown&&this.domObserver.currentSelection.eq(this.root.getSelection())&&function hW(n){var e=n.docView.domFromPos(n.state.selection.anchor,0),t=n.root.getSelection();return Rc(e.node,e.offset,t.anchorNode,t.anchorOffset)}(this))?Mo(this,h):(bx(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}if(this.updatePluginViews(i),"reset"==u)this.dom.scrollTop=0;else if("to selection"==u){var g=this.root.getSelection().focusNode;this.someProp("handleScrollToSelection",function(m){return m(r)})||function YT(n,e,t){for(var r=n.someProp("scrollThreshold")||0,i=n.someProp("scrollMargin")||5,o=n.dom.ownerDocument,s=t||n.dom;s;s=wy(s))if(1==s.nodeType){var a=s==o.body||1!=s.nodeType,l=a?H8(o):U8(s),c=0,u=0;if(e.topl.bottom-Eo(r,"bottom")&&(u=e.bottom-l.bottom+Eo(i,"bottom")),e.leftl.right-Eo(r,"right")&&(c=e.right-l.right+Eo(i,"right")),c||u)if(a)o.defaultView.scrollBy(c,u);else{var d=s.scrollLeft,f=s.scrollTop;u&&(s.scrollTop+=u),c&&(s.scrollLeft+=c);var h=s.scrollLeft-d,p=s.scrollTop-f;e={left:e.left-h,top:e.top-p,right:e.right-h,bottom:e.bottom-p}}if(a)break}}(this,e.selection instanceof ne?this.docView.domAfterPos(e.selection.from).getBoundingClientRect():this.coordsAtPos(e.selection.head,1),g)}else f&&function W8(n){var e=n.refDOM,t=n.refTop,r=n.stack,i=e?e.getBoundingClientRect().top:0;JT(r,0==i?0:i-t)}(f)},It.prototype.destroyPluginViews=function(){for(var e;e=this.pluginViews.pop();)e.destroy&&e.destroy()},It.prototype.updatePluginViews=function(e){if(e&&e.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(var s=0;sf.top+1&&("up"==t?l.top-f.top>2*(f.bottom-l.top):f.bottom-l.bottom>2*(l.bottom-f.top)))return!1}}return!0})}(n,e,t):function eW(n,e,t){var i=e.selection.$head;if(!i.parent.isTextblock)return!1;var o=i.parentOffset,s=!o,a=o==i.parent.content.size,l=n.root.getSelection();return X8.test(i.parent.textContent)&&l.modify?nx(n,e,function(){var c=l.getRangeAt(0),u=l.focusNode,d=l.focusOffset,f=l.caretBidiLevel;l.modify("move",t,"character");var p=!(i.depth?n.docView.domAfterPos(i.before()):n.dom).contains(1==l.focusNode.nodeType?l.focusNode:l.focusNode.parentNode)||u==l.focusNode&&d==l.focusOffset;return l.removeAllRanges(),l.addRange(c),null!=f&&(l.caretBidiLevel=f),p}):"left"==t||"backward"==t?s:a}(n,e,t))}(this,t||this.state,e)},It.prototype.destroy=function(){!this.docView||(function OW(n){for(var e in n.domObserver.stop(),n.eventHandlers)n.dom.removeEventListener(e,n.eventHandlers[e]);clearTimeout(n.composingTimeout),clearTimeout(n.lastIOSEnterFallbackTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Ky(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)},Hf.isDestroyed.get=function(){return null==this.docView},It.prototype.dispatchEvent=function(e){return function NW(n,e){!Uy(n,e)&&Rn[e.type]&&(n.editable||!(e.type in Mn))&&Rn[e.type](n,e)}(this,e)},It.prototype.dispatch=function(e){var t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))},Object.defineProperties(It.prototype,Hf);for(var Io={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",229:"q"},Uf={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"',229:"Q"},tA="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent),QW="undefined"!=typeof navigator&&/Apple Computer/.test(navigator.vendor),JW="undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent),nA="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),XW="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),e$=tA&&(nA||+tA[1]<57)||JW&&nA,Zt=0;Zt<10;Zt++)Io[48+Zt]=Io[96+Zt]=String(Zt);for(Zt=1;Zt<=24;Zt++)Io[Zt+111]="F"+Zt;for(Zt=65;Zt<=90;Zt++)Io[Zt]=String.fromCharCode(Zt+32),Uf[Zt]=String.fromCharCode(Zt);for(var Zy in Io)Uf.hasOwnProperty(Zy)||(Uf[Zy]=Io[Zy]);var n$="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function r$(n){var e=n.split(/-(?!$)/),t=e[e.length-1];"Space"==t&&(t=" ");for(var r,i,o,s,a=0;a127)&&(s=Io[r.keyCode])&&s!=i){var l=e[Yy(s,r,!0)];if(l&&l(t.state,t.dispatch,t))return!0}else if(o&&r.shiftKey){var c=e[Yy(i,r,!0)];if(c&&c(t.state,t.dispatch,t))return!0}return!1}}function Qy(n){return"Object"===function s$(n){return Object.prototype.toString.call(n).slice(8,-1)}(n)&&n.constructor===Object&&Object.getPrototypeOf(n)===Object.prototype}function zf(n,e){const t=S({},n);return Qy(n)&&Qy(e)&&Object.keys(e).forEach(r=>{Qy(e[r])?r in n?t[r]=zf(n[r],e[r]):Object.assign(t,{[r]:e[r]}):Object.assign(t,{[r]:e[r]})}),t}function iA(n){return"function"==typeof n}function pe(n,e,...t){return iA(n)?e?n.bind(e)(...t):n(...t):n}function j(n,e,t){return void 0===n.config[e]&&n.parent?j(n.parent,e,t):"function"==typeof n.config[e]?n.config[e].bind(pn(S({},t),{parent:n.parent?j(n.parent,e,t):null})):n.config[e]}class Tt{constructor(e={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config=S(S({},this.config),e),this.name=this.config.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=pe(j(this,"addOptions",{name:this.name}))),this.storage=pe(j(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Tt(e)}configure(e={}){const t=this.extend();return t.options=zf(this.options,e),t.storage=pe(j(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){const t=new Tt(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=pe(j(t,"addOptions",{name:t.name})),t.storage=pe(j(t,"addStorage",{name:t.name,options:t.options})),t}}function oA(n,e,t){const{from:r,to:i}=e,{blockSeparator:o="\n\n",textSerializers:s={}}=t||{};let a="",l=!0;return n.nodesBetween(r,i,(c,u,d,f)=>{var h;const p=null==s?void 0:s[c.type.name];p?(c.isBlock&&!l&&(a+=o,l=!0),a+=p({node:c,pos:u,parent:d,index:f,range:e})):c.isText?(a+=null===(h=null==c?void 0:c.text)||void 0===h?void 0:h.slice(Math.max(r,u)-u,i-u),l=!1):c.isBlock&&!l&&(a+=o,l=!0)}),a}function Jy(n){return Object.fromEntries(Object.entries(n.nodes).filter(([,e])=>e.spec.toText).map(([e,t])=>[e,t.spec.toText]))}const a$=Tt.create({name:"clipboardTextSerializer",addProseMirrorPlugins(){return[new rt({key:new Ct("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:n}=this,{state:e,schema:t}=n,{doc:r,selection:i}=e,{ranges:o}=i;return oA(r,{from:Math.min(...o.map(u=>u.$from.pos)),to:Math.max(...o.map(u=>u.$to.pos))},{textSerializers:Jy(t)})}}})]}});var l$=Object.freeze({__proto__:null,blur:()=>({editor:n,view:e})=>(requestAnimationFrame(()=>{var t;n.isDestroyed||(e.dom.blur(),null===(t=null==window?void 0:window.getSelection())||void 0===t||t.removeAllRanges())}),!0)}),c$=Object.freeze({__proto__:null,clearContent:(n=!1)=>({commands:e})=>e.setContent("",n)}),u$=Object.freeze({__proto__:null,clearNodes:()=>({state:n,tr:e,dispatch:t})=>{const{selection:r}=e,{ranges:i}=r;return t&&i.forEach(({$from:o,$to:s})=>{n.doc.nodesBetween(o.pos,s.pos,(a,l)=>{if(a.type.isText)return;const{doc:c,mapping:u}=e,d=c.resolve(u.map(l)),f=c.resolve(u.map(l+a.nodeSize)),h=d.blockRange(f);if(!h)return;const p=Ra(h);if(a.type.isTextblock){const{defaultType:g}=d.parent.contentMatchAt(d.index());e.setNodeMarkup(h.start,g)}(p||0===p)&&e.lift(h,p)})}),!0}}),d$=Object.freeze({__proto__:null,command:n=>e=>n(e)}),f$=Object.freeze({__proto__:null,createParagraphNear:()=>({state:n,dispatch:e})=>LT(n,e)});function Ht(n,e){if("string"==typeof n){if(!e.nodes[n])throw Error(`There is no node type named '${n}'. Maybe you forgot to add the extension?`);return e.nodes[n]}return n}var h$=Object.freeze({__proto__:null,deleteNode:n=>({tr:e,state:t,dispatch:r})=>{const i=Ht(n,t.schema),o=e.selection.$anchor;for(let s=o.depth;s>0;s-=1)if(o.node(s).type===i){if(r){const l=o.before(s),c=o.after(s);e.delete(l,c).scrollIntoView()}return!0}return!1}}),p$=Object.freeze({__proto__:null,deleteRange:n=>({tr:e,dispatch:t})=>{const{from:r,to:i}=n;return t&&e.delete(r,i),!0}}),g$=Object.freeze({__proto__:null,deleteSelection:()=>({state:n,dispatch:e})=>gy(n,e)}),m$=Object.freeze({__proto__:null,enter:()=>({commands:n})=>n.keyboardShortcut("Enter")}),v$=Object.freeze({__proto__:null,exitCode:()=>({state:n,dispatch:e})=>FT(n,e)});function To(n,e){if("string"==typeof n){if(!e.marks[n])throw Error(`There is no mark type named '${n}'. Maybe you forgot to add the extension?`);return e.marks[n]}return n}function Xy(n){return"[object RegExp]"===Object.prototype.toString.call(n)}function Wf(n,e,t={strict:!0}){const r=Object.keys(e);return!r.length||r.every(i=>t.strict?e[i]===n[i]:Xy(e[i])?e[i].test(n[i]):e[i]===n[i])}function e_(n,e,t={}){return n.find(r=>r.type===e&&Wf(r.attrs,t))}function y$(n,e,t={}){return!!e_(n,e,t)}function t_(n,e,t={}){if(!n||!e)return;let r=n.parent.childAfter(n.parentOffset);if(n.parentOffset===r.offset&&0!==r.offset&&(r=n.parent.childBefore(n.parentOffset)),!r.node)return;const i=e_(r.node.marks,e,t);if(!i)return;let o=r.index,s=n.start()+r.offset,a=o+1,l=s+r.node.nodeSize;for(e_(r.node.marks,e,t);o>0&&i.isInSet(n.parent.child(o-1).marks);)o-=1,s-=n.parent.child(o).nodeSize;for(;a({tr:t,state:r,dispatch:i})=>{const o=To(n,r.schema),{doc:s,selection:a}=t,{$from:l,from:c,to:u}=a;if(i){const d=t_(l,o,e);if(d&&d.from<=c&&d.to>=u){const f=ye.create(s,d.from,d.to);t.setSelection(f)}}return!0}}),b$=Object.freeze({__proto__:null,first:n=>e=>{const t="function"==typeof n?n(e):n;for(let r=0;r({editor:t,view:r,tr:i,dispatch:o})=>{e=S({scrollIntoView:!0},e);const s=()=>{$f()&&r.dom.focus(),requestAnimationFrame(()=>{t.isDestroyed||(r.focus(),(null==e?void 0:e.scrollIntoView)&&t.commands.scrollIntoView())})};if(r.hasFocus()&&null===n||!1===n)return!0;if(o&&null===n&&!n_(t.state.selection))return s(),!0;const a=aA(t.state.doc,n)||t.state.selection,l=t.state.selection.eq(a);return o&&(l||i.setSelection(a),l&&i.storedMarks&&i.setStoredMarks(i.storedMarks),s()),!0}}),E$=Object.freeze({__proto__:null,forEach:(n,e)=>t=>n.every((r,i)=>e(r,pn(S({},t),{index:i})))}),w$=Object.freeze({__proto__:null,insertContent:(n,e)=>({tr:t,commands:r})=>r.insertContentAt({from:t.selection.from,to:t.selection.to},n,e)});function r_(n){const e=`${n}`;return(new window.DOMParser).parseFromString(e,"text/html").body}function Gf(n,e,t){if(t=S({slice:!0,parseOptions:{}},t),"object"==typeof n&&null!==n)try{return Array.isArray(n)?M.fromArray(n.map(r=>e.nodeFromJSON(r))):e.nodeFromJSON(n)}catch(r){return console.warn("[tiptap warn]: Invalid content.","Passed value:",n,"Error:",r),Gf("",e,t)}if("string"==typeof n){const r=Lr.fromSchema(e);return t.slice?r.parseSlice(r_(n),t.parseOptions).content:r.parse(r_(n),t.parseOptions)}return Gf("",e,t)}var I$=Object.freeze({__proto__:null,insertContentAt:(n,e,t)=>({tr:r,dispatch:i,editor:o})=>{if(i){t=S({parseOptions:{},updateSelection:!0},t);const s=Gf(e,o.schema,{parseOptions:S({preserveWhitespace:"full"},t.parseOptions)});if("<>"===s.toString())return!0;let{from:a,to:l}="number"==typeof n?{from:n,to:n}:n,c=!0,u=!0;if(((n=>n.toString().startsWith("<"))(s)?s:[s]).forEach(f=>{f.check(),c=!!c&&f.isText&&0===f.marks.length,u=!!u&&f.isBlock}),a===l&&u){const{parent:f}=r.doc.resolve(a);f.isTextblock&&!f.type.spec.code&&!f.childCount&&(a-=1,l+=1)}c?r.insertText(e,a,l):r.replaceWith(a,l,s),t.updateSelection&&function S$(n,e,t){const r=n.steps.length-1;if(r{0===s&&(s=u)}),n.setSelection(ue.near(n.doc.resolve(s),t))}(r,r.steps.length-1,-1)}return!0}}),T$=Object.freeze({__proto__:null,joinBackward:()=>({state:n,dispatch:e})=>xT(n,e)}),x$=Object.freeze({__proto__:null,joinForward:()=>({state:n,dispatch:e})=>kT(n,e)});function lA(){return"undefined"!=typeof navigator&&/Mac/.test(navigator.platform)}var O$=Object.freeze({__proto__:null,keyboardShortcut:n=>({editor:e,view:t,tr:r,dispatch:i})=>{const o=function A$(n){const e=n.split(/-(?!$)/);let r,i,o,s,t=e[e.length-1];"Space"===t&&(t=" ");for(let a=0;a!["Alt","Ctrl","Meta","Shift"].includes(c)),a=new KeyboardEvent("keydown",{key:"Space"===s?" ":s,altKey:o.includes("Alt"),ctrlKey:o.includes("Ctrl"),metaKey:o.includes("Meta"),shiftKey:o.includes("Shift"),bubbles:!0,cancelable:!0}),l=e.captureTransaction(()=>{t.someProp("handleKeyDown",c=>c(t,a))});return null==l||l.steps.forEach(c=>{const u=c.map(r.mapping);u&&i&&r.maybeStep(u)}),!0}});function Uc(n,e,t={}){const{from:r,to:i,empty:o}=n.selection,s=e?Ht(e,n.schema):null,a=[];n.doc.nodesBetween(r,i,(d,f)=>{if(d.isText)return;const h=Math.max(r,f),p=Math.min(i,f+d.nodeSize);a.push({node:d,from:h,to:p})});const l=i-r,c=a.filter(d=>!s||s.name===d.node.type.name).filter(d=>Wf(d.node.attrs,t,{strict:!1}));return o?!!c.length:c.reduce((d,f)=>d+f.to-f.from,0)>=l}var k$=Object.freeze({__proto__:null,lift:(n,e={})=>({state:t,dispatch:r})=>!!Uc(t,Ht(n,t.schema),e)&&function y8(n,e){var t=n.selection,o=t.$from.blockRange(t.$to),s=o&&Ra(o);return null!=s&&(e&&e(n.tr.lift(o,s).scrollIntoView()),!0)}(t,r)}),N$=Object.freeze({__proto__:null,liftEmptyBlock:()=>({state:n,dispatch:e})=>BT(n,e)}),R$=Object.freeze({__proto__:null,liftListItem:n=>({state:e,dispatch:t})=>function R8(n){return function(e,t){var r=e.selection,i=r.$from,s=i.blockRange(r.$to,function(a){return a.childCount&&a.firstChild.type==n});return!!s&&(!t||(i.node(s.depth-1).type==n?function P8(n,e,t,r){var i=n.tr,o=r.end,s=r.$to.end(r.depth);return oa;s--)o-=i.child(s).nodeSize,r.delete(o-1,o+1);var l=r.doc.resolve(t.start),c=l.nodeAfter;if(r.mapping.map(t.end)!=t.start+l.nodeAfter.nodeSize)return!1;var u=0==t.startIndex,d=t.endIndex==i.childCount,f=l.node(-1),h=l.index(-1);if(!f.canReplace(h+(u?0:1),h+1,c.content.append(d?M.empty:M.from(i))))return!1;var p=l.pos,g=p+c.nodeSize;return r.step(new Nn(p-(u?1:0),g+(d?1:0),p+1,g-1,new F((u?M.empty:M.from(i.copy(M.empty))).append(d?M.empty:M.from(i.copy(M.empty))),u?0:1,d?0:1),u?0:1)),e(r.scrollIntoView()),!0}(e,t,s)))}}(Ht(n,e.schema))(e,t)}),P$=Object.freeze({__proto__:null,newlineInCode:()=>({state:n,dispatch:e})=>PT(n,e)});function qf(n,e){return e.nodes[n]?"node":e.marks[n]?"mark":null}function cA(n,e){const t="string"==typeof e?[e]:e;return Object.keys(n).reduce((r,i)=>(t.includes(i)||(r[i]=n[i]),r),{})}var F$=Object.freeze({__proto__:null,resetAttributes:(n,e)=>({tr:t,state:r,dispatch:i})=>{let o=null,s=null;const a=qf("string"==typeof n?n:n.name,r.schema);return!!a&&("node"===a&&(o=Ht(n,r.schema)),"mark"===a&&(s=To(n,r.schema)),i&&t.selection.ranges.forEach(l=>{r.doc.nodesBetween(l.$from.pos,l.$to.pos,(c,u)=>{o&&o===c.type&&t.setNodeMarkup(u,void 0,cA(c.attrs,e)),s&&c.marks.length&&c.marks.forEach(d=>{s===d.type&&t.addMark(u,u+c.nodeSize,s.create(cA(d.attrs,e)))})})}),!0)}}),L$=Object.freeze({__proto__:null,scrollIntoView:()=>({tr:n,dispatch:e})=>(e&&n.scrollIntoView(),!0)}),B$=Object.freeze({__proto__:null,selectAll:()=>({tr:n,commands:e})=>e.setTextSelection({from:0,to:n.doc.content.size})}),j$=Object.freeze({__proto__:null,selectNodeBackward:()=>({state:n,dispatch:e})=>AT(n,e)}),V$=Object.freeze({__proto__:null,selectNodeForward:()=>({state:n,dispatch:e})=>NT(n,e)}),H$=Object.freeze({__proto__:null,selectParentNode:()=>({state:n,dispatch:e})=>function _8(n,e){var o,t=n.selection,r=t.$from,s=r.sharedDepth(t.to);return 0!=s&&(o=r.before(s),e&&e(n.tr.setSelection(ne.create(n.doc,o))),!0)}(n,e)}),U$=Object.freeze({__proto__:null,selectTextblockEnd:()=>({state:n,dispatch:e})=>zT(n,e)}),z$=Object.freeze({__proto__:null,selectTextblockStart:()=>({state:n,dispatch:e})=>UT(n,e)});function uA(n,e,t={}){return Gf(n,e,{slice:!1,parseOptions:t})}var W$=Object.freeze({__proto__:null,setContent:(n,e=!1,t={})=>({tr:r,editor:i,dispatch:o})=>{const{doc:s}=r,a=uA(n,i.schema,t),l=ye.create(s,0,s.content.size);return o&&r.setSelection(l).replaceSelectionWith(a,!1).setMeta("preventUpdate",!e),!0}});function dA(n,e){const t=To(e,n.schema),{from:r,to:i,empty:o}=n.selection,s=[];o?(n.storedMarks&&s.push(...n.storedMarks),s.push(...n.selection.$head.marks())):n.doc.nodesBetween(r,i,l=>{s.push(...l.marks)});const a=s.find(l=>l.type.name===t.name);return a?S({},a.attrs):{}}var $$=Object.freeze({__proto__:null,setMark:(n,e={})=>({tr:t,state:r,dispatch:i})=>{const{selection:o}=t,{empty:s,ranges:a}=o,l=To(n,r.schema);if(i)if(s){const c=dA(r,l);t.addStoredMark(l.create(S(S({},c),e)))}else a.forEach(c=>{const u=c.$from.pos,d=c.$to.pos;r.doc.nodesBetween(u,d,(f,h)=>{const p=Math.max(h,u),g=Math.min(h+f.nodeSize,d);f.marks.find(y=>y.type===l)?f.marks.forEach(y=>{l===y.type&&t.addMark(p,g,l.create(S(S({},y.attrs),e)))}):t.addMark(p,g,l.create(e))})});return!0}}),G$=Object.freeze({__proto__:null,setMeta:(n,e)=>({tr:t})=>(t.setMeta(n,e),!0)}),q$=Object.freeze({__proto__:null,setNode:(n,e={})=>({state:t,dispatch:r,chain:i})=>{const o=Ht(n,t.schema);return o.isTextblock?i().command(({commands:s})=>!!WT(o,e)(t)||s.clearNodes()).command(({state:s})=>WT(o,e)(s,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)}}),K$=Object.freeze({__proto__:null,setNodeSelection:n=>({tr:e,dispatch:t})=>{if(t){const{doc:r}=e,i=ue.atStart(r).from,o=ue.atEnd(r).to,s=Wi(n,i,o),a=ne.create(r,s);e.setSelection(a)}return!0}}),Z$=Object.freeze({__proto__:null,setTextSelection:n=>({tr:e,dispatch:t})=>{if(t){const{doc:r}=e,{from:i,to:o}="number"==typeof n?{from:n,to:n}:n,s=ye.atStart(r).from,a=ye.atEnd(r).to,l=Wi(i,s,a),c=Wi(o,s,a),u=ye.create(r,l,c);e.setSelection(u)}return!0}}),Y$=Object.freeze({__proto__:null,sinkListItem:n=>({state:e,dispatch:t})=>function L8(n){return function(e,t){var r=e.selection,s=r.$from.blockRange(r.$to,function(g){return g.childCount&&g.firstChild.type==n});if(!s)return!1;var a=s.startIndex;if(0==a)return!1;var l=s.parent,c=l.child(a-1);if(c.type!=n)return!1;if(t){var u=c.lastChild&&c.lastChild.type==l.type,d=M.from(u?n.create():null),f=new F(M.from(n.create(null,M.from(l.type.create(null,d)))),u?3:1,0),h=s.start,p=s.end;t(e.tr.step(new Nn(h-(u?3:1),p,h,p,f,1,!0)).scrollIntoView())}return!0}}(Ht(n,e.schema))(e,t)});function Kf(n,e,t){return Object.fromEntries(Object.entries(t).filter(([r])=>{const i=n.find(o=>o.type===e&&o.name===r);return!!i&&i.attribute.keepOnSplit}))}function fA(n,e){const t=n.storedMarks||n.selection.$to.parentOffset&&n.selection.$from.marks();if(t){const r=t.filter(i=>null==e?void 0:e.includes(i.type.name));n.tr.ensureMarks(r)}}var J$=Object.freeze({__proto__:null,splitBlock:({keepMarks:n=!0}={})=>({tr:e,state:t,dispatch:r,editor:i})=>{const{selection:o,doc:s}=e,{$from:a,$to:l}=o,u=Kf(i.extensionManager.attributes,a.node().type.name,a.node().attrs);if(o instanceof ne&&o.node.isBlock)return!(!a.parentOffset||!Vi(s,a.pos)||(r&&(n&&fA(t,i.extensionManager.splittableMarks),e.split(a.pos).scrollIntoView()),0));if(!a.parent.isBlock)return!1;if(r){const d=l.parentOffset===l.parent.content.size;o instanceof ye&&e.deleteSelection();const f=0===a.depth?void 0:function Q$(n){for(let e=0;e({tr:e,state:t,dispatch:r,editor:i})=>{var o;const s=Ht(n,t.schema),{$from:a,$to:l}=t.selection,c=t.selection.node;if(c&&c.isBlock||a.depth<2||!a.sameParent(l))return!1;const u=a.node(-1);if(u.type!==s)return!1;const d=i.extensionManager.attributes;if(0===a.parent.content.size&&a.node(-1).childCount===a.indexAfter(-1)){if(2===a.depth||a.node(-3).type!==s||a.index(-2)!==a.node(-2).childCount-1)return!1;if(r){let m=M.empty;const y=a.index(-1)?1:a.index(-2)?2:3;for(let I=a.depth-y;I>=a.depth-3;I-=1)m=M.from(a.node(I).copy(m));const v=a.indexAfter(-1){if(D>-1)return!1;I.isTextblock&&0===I.content.size&&(D=A+1)}),D>-1&&e.setSelection(ye.near(e.doc.resolve(D))),e.scrollIntoView()}return!0}const f=l.pos===a.end()?u.contentMatchAt(0).defaultType:null,h=Kf(d,u.type.name,u.attrs),p=Kf(d,a.node().type.name,a.node().attrs);e.delete(a.pos,l.pos);const g=f?[{type:s,attrs:h},{type:f,attrs:p}]:[{type:s,attrs:h}];return!!Vi(e.doc,a.pos,2)&&(r&&e.split(a.pos,2,g).scrollIntoView(),!0)}});function i_(n){return e=>function e5(n,e){for(let t=n.depth;t>0;t-=1){const r=n.node(t);if(e(r))return{pos:t>0?n.before(t):0,start:n.start(t),depth:t,node:r}}}(e.$from,n)}function Zf(n){return{baseExtensions:n.filter(i=>"extension"===i.type),nodeExtensions:n.filter(i=>"node"===i.type),markExtensions:n.filter(i=>"mark"===i.type)}}function hA(n,e){const{nodeExtensions:t}=Zf(e),r=t.find(s=>s.name===n);if(!r)return!1;const o=pe(j(r,"group",{name:r.name,options:r.options,storage:r.storage}));return"string"==typeof o&&o.split(" ").includes("list")}const pA=(n,e)=>{const t=i_(s=>s.type===e)(n.selection);if(!t)return!0;const r=n.doc.resolve(Math.max(0,t.pos-1)).before(t.depth);if(void 0===r)return!0;const i=n.doc.nodeAt(r);return t.node.type===(null==i?void 0:i.type)&&Ic(n.doc,t.pos)&&n.join(t.pos),!0},gA=(n,e)=>{const t=i_(s=>s.type===e)(n.selection);if(!t)return!0;const r=n.doc.resolve(t.start).after(t.depth);if(void 0===r)return!0;const i=n.doc.nodeAt(r);return t.node.type===(null==i?void 0:i.type)&&Ic(n.doc,r)&&n.join(r),!0};var t5=Object.freeze({__proto__:null,toggleList:(n,e)=>({editor:t,tr:r,state:i,dispatch:o,chain:s,commands:a,can:l})=>{const{extensions:c}=t.extensionManager,u=Ht(n,i.schema),d=Ht(e,i.schema),{selection:f}=i,{$from:h,$to:p}=f,g=h.blockRange(p);if(!g)return!1;const m=i_(y=>hA(y.type.name,c))(f);if(g.depth>=1&&m&&g.depth-m.depth<=1){if(m.node.type===u)return a.liftListItem(d);if(hA(m.node.type.name,c)&&u.validContent(m.node.content)&&o)return s().command(()=>(r.setNodeMarkup(m.pos,u),!0)).command(()=>pA(r,u)).command(()=>gA(r,u)).run()}return s().command(()=>!!l().wrapInList(u)||a.clearNodes()).wrapInList(u).command(()=>pA(r,u)).command(()=>gA(r,u)).run()}});function o_(n,e,t={}){const{empty:r,ranges:i}=n.selection,o=e?To(e,n.schema):null;if(r)return!!(n.storedMarks||n.selection.$from.marks()).filter(d=>!o||o.name===d.type.name).find(d=>Wf(d.attrs,t,{strict:!1}));let s=0;const a=[];if(i.forEach(({$from:d,$to:f})=>{const h=d.pos,p=f.pos;n.doc.nodesBetween(h,p,(g,m)=>{if(!g.isText&&!g.marks.length)return;const y=Math.max(h,m),v=Math.min(p,m+g.nodeSize);s+=v-y,a.push(...g.marks.map(_=>({mark:_,from:y,to:v})))})}),0===s)return!1;const l=a.filter(d=>!o||o.name===d.mark.type.name).filter(d=>Wf(d.mark.attrs,t,{strict:!1})).reduce((d,f)=>d+f.to-f.from,0),c=a.filter(d=>!o||d.mark.type!==o&&d.mark.type.excludes(o)).reduce((d,f)=>d+f.to-f.from,0);return(l>0?l+c:l)>=s}var n5=Object.freeze({__proto__:null,toggleMark:(n,e={},t={})=>({state:r,commands:i})=>{const{extendEmptyMarkRange:o=!1}=t,s=To(n,r.schema);return o_(r,s,e)?i.unsetMark(s,{extendEmptyMarkRange:o}):i.setMark(s,e)}}),r5=Object.freeze({__proto__:null,toggleNode:(n,e,t={})=>({state:r,commands:i})=>{const o=Ht(n,r.schema),s=Ht(e,r.schema);return Uc(r,o,t)?i.setNode(s):i.setNode(o,t)}}),o5=Object.freeze({__proto__:null,toggleWrap:(n,e={})=>({state:t,commands:r})=>{const i=Ht(n,t.schema);return Uc(t,i,e)?r.lift(i):r.wrapIn(i,e)}}),s5=Object.freeze({__proto__:null,undoInputRule:()=>({state:n,dispatch:e})=>{const t=n.plugins;for(let r=0;r=0;l-=1)s.step(a.steps[l].invert(a.docs[l]));if(o.text){const l=s.doc.resolve(o.from).marks();s.replaceWith(o.from,o.to,n.schema.text(o.text,l))}else s.delete(o.from,o.to)}return!0}}return!1}}),a5=Object.freeze({__proto__:null,unsetAllMarks:()=>({tr:n,dispatch:e})=>{const{selection:t}=n,{empty:r,ranges:i}=t;return r||e&&i.forEach(o=>{n.removeMark(o.$from.pos,o.$to.pos)}),!0}}),l5=Object.freeze({__proto__:null,unsetMark:(n,e={})=>({tr:t,state:r,dispatch:i})=>{var o;const{extendEmptyMarkRange:s=!1}=e,{selection:a}=t,l=To(n,r.schema),{$from:c,empty:u,ranges:d}=a;if(!i)return!0;if(u&&s){let{from:f,to:h}=a;const p=null===(o=c.marks().find(m=>m.type===l))||void 0===o?void 0:o.attrs,g=t_(c,l,p);g&&(f=g.from,h=g.to),t.removeMark(f,h,l)}else d.forEach(f=>{t.removeMark(f.$from.pos,f.$to.pos,l)});return t.removeStoredMark(l),!0}}),c5=Object.freeze({__proto__:null,updateAttributes:(n,e={})=>({tr:t,state:r,dispatch:i})=>{let o=null,s=null;const a=qf("string"==typeof n?n:n.name,r.schema);return!!a&&("node"===a&&(o=Ht(n,r.schema)),"mark"===a&&(s=To(n,r.schema)),i&&t.selection.ranges.forEach(l=>{const c=l.$from.pos,u=l.$to.pos;r.doc.nodesBetween(c,u,(d,f)=>{o&&o===d.type&&t.setNodeMarkup(f,void 0,S(S({},d.attrs),e)),s&&d.marks.length&&d.marks.forEach(h=>{if(s===h.type){const p=Math.max(f,c),g=Math.min(f+d.nodeSize,u);t.addMark(p,g,s.create(S(S({},h.attrs),e)))}})})}),!0)}}),u5=Object.freeze({__proto__:null,wrapIn:(n,e={})=>({state:t,dispatch:r})=>function D8(n,e){return function(t,r){var i=t.selection,a=i.$from.blockRange(i.$to),l=a&&sy(a,n,e);return!!l&&(r&&r(t.tr.wrap(a,l).scrollIntoView()),!0)}}(Ht(n,t.schema),e)(t,r)}),d5=Object.freeze({__proto__:null,wrapInList:(n,e={})=>({state:t,dispatch:r})=>function k8(n,e){return function(t,r){var i=t.selection,o=i.$from,s=i.$to,a=o.blockRange(s),l=!1,c=a;if(!a)return!1;if(a.depth>=2&&o.node(a.depth-1).type.compatibleContent(n)&&0==a.startIndex){if(0==o.index(a.depth-1))return!1;var u=t.doc.resolve(a.start-2);c=new Sc(u,u,a.depth),a.endIndex=0;s--)o=M.from(t[s].type.create(t[s].attrs,o));n.step(new Nn(e.start-(r?2:0),e.end,e.start,e.end,new F(o,0,0),t.length,!0));for(var a=0,l=0;lS(S(S(S(S(S(S(S(S(S(S(S(S(S(S(S(S(S(S(S(S(S(S(S(S(S(S(S(S(S(S(S(S(S(S(S(S(S(S(S(S(S(S(S(S(S(S(S(S(S({},l$),c$),u$),d$),f$),h$),p$),g$),m$),v$),_$),b$),D$),E$),w$),I$),T$),x$),O$),k$),N$),R$),P$),F$),L$),B$),j$),V$),H$),U$),z$),W$),$$),G$),q$),K$),Z$),Y$),J$),X$),t5),n5),r5),o5),s5),a5),l5),c5),u5),d5)}),h5=Tt.create({name:"editable",addProseMirrorPlugins(){return[new rt({key:new Ct("editable"),props:{editable:()=>this.editor.options.editable}})]}}),p5=Tt.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:n}=this;return[new rt({key:new Ct("focusEvents"),props:{handleDOMEvents:{focus:(e,t)=>{n.isFocused=!0;const r=n.state.tr.setMeta("focus",{event:t}).setMeta("addToHistory",!1);return e.dispatch(r),!1},blur:(e,t)=>{n.isFocused=!1;const r=n.state.tr.setMeta("blur",{event:t}).setMeta("addToHistory",!1);return e.dispatch(r),!1}}}})]}});function Yf(n){const{state:e,transaction:t}=n;let{selection:r}=t,{doc:i}=t,{storedMarks:o}=t;return pn(S({},e),{schema:e.schema,plugins:e.plugins,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return o},get selection(){return r},get doc(){return i},get tr(){return r=t.selection,i=t.doc,o=t.storedMarks,t}})}class Qf{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:e,editor:t,state:r}=this,{view:i}=t,{tr:o}=r,s=this.buildProps(o);return Object.fromEntries(Object.entries(e).map(([a,l])=>[a,(...u)=>{const d=l(...u)(s);return!o.getMeta("preventDispatch")&&!this.hasCustomState&&i.dispatch(o),d}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){const{rawCommands:r,editor:i,state:o}=this,{view:s}=i,a=[],l=!!e,c=e||o.tr,d=pn(S({},Object.fromEntries(Object.entries(r).map(([f,h])=>[f,(...g)=>{const m=this.buildProps(c,t),y=h(...g)(m);return a.push(y),d}]))),{run:()=>(!l&&t&&!c.getMeta("preventDispatch")&&!this.hasCustomState&&s.dispatch(c),a.every(f=>!0===f))});return d}createCan(e){const{rawCommands:t,state:r}=this,i=void 0,o=e||r.tr,s=this.buildProps(o,i),a=Object.fromEntries(Object.entries(t).map(([l,c])=>[l,(...u)=>c(...u)(pn(S({},s),{dispatch:i}))]));return pn(S({},a),{chain:()=>this.createChain(o,i)})}buildProps(e,t=!0){const{rawCommands:r,editor:i,state:o}=this,{view:s}=i;o.storedMarks&&e.setStoredMarks(o.storedMarks);const a={tr:e,editor:i,view:s,state:Yf({state:o,transaction:e}),dispatch:t?()=>{}:void 0,chain:()=>this.createChain(e),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(r).map(([l,c])=>[l,(...u)=>c(...u)(a)]))}};return a}}const g5=Tt.create({name:"keymap",addKeyboardShortcuts(){const n=()=>this.editor.commands.first(({commands:s})=>[()=>s.undoInputRule(),()=>s.command(({tr:a})=>{const{selection:l,doc:c}=a,{empty:u,$anchor:d}=l,{pos:f,parent:h}=d,p=ue.atStart(c).from===f;return!(!(u&&p&&h.type.isTextblock)||h.textContent.length)&&s.clearNodes()}),()=>s.deleteSelection(),()=>s.joinBackward(),()=>s.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:s})=>[()=>s.deleteSelection(),()=>s.joinForward(),()=>s.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:s})=>[()=>s.newlineInCode(),()=>s.createParagraphNear(),()=>s.liftEmptyBlock(),()=>s.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:n,"Mod-Backspace":n,"Shift-Backspace":n,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},i=S({},r),o=pn(S({},r),{"Ctrl-h":n,"Alt-Backspace":n,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()});return $f()||lA()?o:i},addProseMirrorPlugins(){return[new rt({key:new Ct("clearDocument"),appendTransaction:(n,e,t)=>{if(!n.some(p=>p.docChanged)||e.doc.eq(t.doc))return;const{empty:i,from:o,to:s}=e.selection,a=ue.atStart(e.doc).from,l=ue.atEnd(e.doc).to,c=o===a&&s===l,u=0===t.doc.textBetween(0,t.doc.content.size," "," ").length;if(i||!c||!u)return;const d=t.tr,f=Yf({state:t,transaction:d}),{commands:h}=new Qf({editor:this.editor,state:f});return h.clearNodes(),d.steps.length?d:void 0}})]}}),m5=Tt.create({name:"tabindex",addProseMirrorPlugins(){return[new rt({key:new Ct("tabindex"),props:{attributes:()=>{if(this.editor.isEditable)return{tabindex:"0"}}}})]}});var v5=Object.freeze({__proto__:null,ClipboardTextSerializer:a$,Commands:f5,Editable:h5,FocusEvents:p5,Keymap:g5,Tabindex:m5});function mA(n,e){const t=qf("string"==typeof e?e:e.name,n.schema);return"node"===t?function y5(n,e){const t=Ht(e,n.schema),{from:r,to:i}=n.selection,o=[];n.doc.nodesBetween(r,i,a=>{o.push(a)});const s=o.reverse().find(a=>a.type.name===t.name);return s?S({},s.attrs):{}}(n,e):"mark"===t?dA(n,e):{}}class zc{constructor(e){this.find=e.find,this.handler=e.handler}}function s_(n){var e;const{editor:t,from:r,to:i,text:o,rules:s,plugin:a}=n,{view:l}=t;if(l.composing)return!1;const c=l.state.doc.resolve(r);if(c.parent.type.spec.code||(null===(e=c.nodeBefore||c.nodeAfter)||void 0===e?void 0:e.marks.find(h=>h.type.spec.code)))return!1;let u=!1;const f=c.parent.textBetween(Math.max(0,c.parentOffset-500),c.parentOffset,void 0," ")+o;return s.forEach(h=>{if(u)return;const p=((n,e)=>{if(Xy(e))return e.exec(n);const t=e(n);if(!t)return null;const r=[];return r.push(t.text),r.index=t.index,r.input=n,r.data=t.data,t.replaceWith&&(t.text.includes(t.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(t.replaceWith)),r})(f,h.find);if(!p)return;const g=l.state.tr,m=Yf({state:l.state,transaction:g}),y={from:r-(p[0].length-o.length),to:i},{commands:v,chain:b,can:_}=new Qf({editor:t,state:m});null===h.handler({state:m,range:y,match:p,commands:v,chain:b,can:_})||!g.steps.length||(g.setMeta(a,{transform:g,from:r,to:i,text:o}),l.dispatch(g),u=!0)}),u}function E5(n){const{editor:e,rules:t}=n,r=new rt({state:{init:()=>null,apply(i,o){return i.getMeta(this)||(i.selectionSet||i.docChanged?null:o)}},props:{handleTextInput:(i,o,s,a)=>s_({editor:e,from:o,to:s,text:a,rules:t,plugin:r}),handleDOMEvents:{compositionend:i=>(setTimeout(()=>{const{$cursor:o}=i.state.selection;o&&s_({editor:e,from:o.pos,to:o.pos,text:"",rules:t,plugin:r})}),!1)},handleKeyDown(i,o){if("Enter"!==o.key)return!1;const{$cursor:s}=i.state.selection;return!!s&&s_({editor:e,from:s.pos,to:s.pos,text:"\n",rules:t,plugin:r})}},isInputRules:!0});return r}class _A{constructor(e){this.find=e.find,this.handler=e.handler}}function I5(n){const{editor:e,rules:t}=n;let r=null,i=!1,o=!1;return t.map(a=>new rt({view(l){const c=u=>{var d;r=(null===(d=l.dom.parentElement)||void 0===d?void 0:d.contains(u.target))?l.dom.parentElement:null};return window.addEventListener("dragstart",c),{destroy(){window.removeEventListener("dragstart",c)}}},props:{handleDOMEvents:{drop:l=>(o=r===l.dom.parentElement,!1),paste:(l,c)=>{var u;const d=null===(u=c.clipboardData)||void 0===u?void 0:u.getData("text/html");return i=!!(null==d?void 0:d.includes("data-pm-slice")),!1}}},appendTransaction:(l,c,u)=>{const d=l[0],f="paste"===d.getMeta("uiEvent")&&!i,h="drop"===d.getMeta("uiEvent")&&!o;if(!f&&!h)return;const p=c.doc.content.findDiffStart(u.doc.content),g=c.doc.content.findDiffEnd(u.doc.content);if(!function w5(n){return"number"==typeof n}(p)||!g||p===g.b)return;const m=u.tr,y=Yf({state:u,transaction:m});return function M5(n){const{editor:e,state:t,from:r,to:i,rule:o}=n,{commands:s,chain:a,can:l}=new Qf({editor:e,state:t}),c=[];return t.doc.nodesBetween(r,i,(d,f)=>{if(!d.isTextblock||d.type.spec.code)return;const h=Math.max(r,f),p=Math.min(i,f+d.content.size);((n,e)=>{if(Xy(e))return[...n.matchAll(e)];const t=e(n);return t?t.map(r=>{const i=[];return i.push(r.text),i.index=r.index,i.input=n,i.data=r.data,r.replaceWith&&(r.text.includes(r.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),i.push(r.replaceWith)),i}):[]})(d.textBetween(h-f,p-f,void 0,"\ufffc"),o.find).forEach(y=>{if(void 0===y.index)return;const v=h+y.index+1,b=v+y[0].length,_={from:t.tr.mapping.map(v),to:t.tr.mapping.map(b)},C=o.handler({state:t,range:_,match:y,commands:s,chain:a,can:l});c.push(C)})}),c.every(d=>null!==d)}({editor:e,state:y,from:Math.max(p-1,0),to:g.b,rule:a})&&m.steps.length?m:void 0}}))}function bA(n){const e=[],{nodeExtensions:t,markExtensions:r}=Zf(n),i=[...t,...r],o={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0};return n.forEach(s=>{const l=j(s,"addGlobalAttributes",{name:s.name,options:s.options,storage:s.storage});l&&l().forEach(u=>{u.types.forEach(d=>{Object.entries(u.attributes).forEach(([f,h])=>{e.push({type:d,name:f,attribute:S(S({},o),h)})})})})}),i.forEach(s=>{const l=j(s,"addAttributes",{name:s.name,options:s.options,storage:s.storage});if(!l)return;const c=l();Object.entries(c).forEach(([u,d])=>{e.push({type:s.name,name:u,attribute:S(S({},o),d)})})}),e}function xt(...n){return n.filter(e=>!!e).reduce((e,t)=>{const r=S({},e);return Object.entries(t).forEach(([i,o])=>{r[i]=r[i]?"class"===i?[r[i],o].join(" "):"style"===i?[r[i],o].join("; "):o:o}),r},{})}function a_(n,e){return e.filter(t=>t.attribute.rendered).map(t=>t.attribute.renderHTML?t.attribute.renderHTML(n.attrs)||{}:{[t.name]:n.attrs[t.name]}).reduce((t,r)=>xt(t,r),{})}function CA(n,e){return n.style?n:pn(S({},n),{getAttrs:t=>{const r=n.getAttrs?n.getAttrs(t):n.attrs;if(!1===r)return!1;const i=e.reduce((o,s)=>{const a=s.attribute.parseHTML?s.attribute.parseHTML(t):function x5(n){return"string"!=typeof n?n:n.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(n):"true"===n||"false"!==n&&n}(t.getAttribute(s.name));return null==a?o:pn(S({},o),{[s.name]:a})},{});return S(S({},r),i)}})}function DA(n){return Object.fromEntries(Object.entries(n).filter(([e,t])=>("attrs"!==e||!function T5(n={}){return 0===Object.keys(n).length&&n.constructor===Object}(t))&&null!=t))}function l_(n,e){return e.nodes[n]||e.marks[n]||null}function wA(n,e){return Array.isArray(e)?e.some(t=>("string"==typeof t?t:t.name)===n.name):e}class gs{constructor(e,t){this.splittableMarks=[],this.editor=t,this.extensions=gs.resolve(e),this.schema=function EA(n){var e;const t=bA(n),{nodeExtensions:r,markExtensions:i}=Zf(n),o=null===(e=r.find(l=>j(l,"topNode")))||void 0===e?void 0:e.name,s=Object.fromEntries(r.map(l=>{const c=t.filter(m=>m.type===l.name),u={name:l.name,options:l.options,storage:l.storage},d=n.reduce((m,y)=>{const v=j(y,"extendNodeSchema",u);return S(S({},m),v?v(l):{})},{}),f=DA(pn(S({},d),{content:pe(j(l,"content",u)),marks:pe(j(l,"marks",u)),group:pe(j(l,"group",u)),inline:pe(j(l,"inline",u)),atom:pe(j(l,"atom",u)),selectable:pe(j(l,"selectable",u)),draggable:pe(j(l,"draggable",u)),code:pe(j(l,"code",u)),defining:pe(j(l,"defining",u)),isolating:pe(j(l,"isolating",u)),attrs:Object.fromEntries(c.map(m=>{var y;return[m.name,{default:null===(y=null==m?void 0:m.attribute)||void 0===y?void 0:y.default}]}))})),h=pe(j(l,"parseHTML",u));h&&(f.parseDOM=h.map(m=>CA(m,c)));const p=j(l,"renderHTML",u);p&&(f.toDOM=m=>p({node:m,HTMLAttributes:a_(m,c)}));const g=j(l,"renderText",u);return g&&(f.toText=g),[l.name,f]})),a=Object.fromEntries(i.map(l=>{const c=t.filter(g=>g.type===l.name),u={name:l.name,options:l.options,storage:l.storage},d=n.reduce((g,m)=>{const y=j(m,"extendMarkSchema",u);return S(S({},g),y?y(l):{})},{}),f=DA(pn(S({},d),{inclusive:pe(j(l,"inclusive",u)),excludes:pe(j(l,"excludes",u)),group:pe(j(l,"group",u)),spanning:pe(j(l,"spanning",u)),code:pe(j(l,"code",u)),attrs:Object.fromEntries(c.map(g=>{var m;return[g.name,{default:null===(m=null==g?void 0:g.attribute)||void 0===m?void 0:m.default}]}))})),h=pe(j(l,"parseHTML",u));h&&(f.parseDOM=h.map(g=>CA(g,c)));const p=j(l,"renderHTML",u);return p&&(f.toDOM=g=>p({mark:g,HTMLAttributes:a_(g,c)})),[l.name,f]}));return new cs({topNode:o,nodes:s,marks:a})}(this.extensions),this.extensions.forEach(r=>{var i;this.editor.extensionStorage[r.name]=r.storage;const o={name:r.name,options:r.options,storage:r.storage,editor:this.editor,type:l_(r.name,this.schema)};"mark"===r.type&&(null===(i=pe(j(r,"keepOnSplit",o)))||void 0===i||i)&&this.splittableMarks.push(r.name);const s=j(r,"onBeforeCreate",o);s&&this.editor.on("beforeCreate",s);const a=j(r,"onCreate",o);a&&this.editor.on("create",a);const l=j(r,"onUpdate",o);l&&this.editor.on("update",l);const c=j(r,"onSelectionUpdate",o);c&&this.editor.on("selectionUpdate",c);const u=j(r,"onTransaction",o);u&&this.editor.on("transaction",u);const d=j(r,"onFocus",o);d&&this.editor.on("focus",d);const f=j(r,"onBlur",o);f&&this.editor.on("blur",f);const h=j(r,"onDestroy",o);h&&this.editor.on("destroy",h)})}static resolve(e){const t=gs.sort(gs.flatten(e)),r=function A5(n){const e=n.filter((t,r)=>n.indexOf(t)!==r);return[...new Set(e)]}(t.map(i=>i.name));return r.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${r.map(i=>`'${i}'`).join(", ")}]. This can lead to issues.`),t}static flatten(e){return e.map(t=>{const i=j(t,"addExtensions",{name:t.name,options:t.options,storage:t.storage});return i?[t,...this.flatten(i())]:t}).flat(10)}static sort(e){return e.sort((r,i)=>{const o=j(r,"priority")||100,s=j(i,"priority")||100;return o>s?-1:o{const i=j(t,"addCommands",{name:t.name,options:t.options,storage:t.storage,editor:this.editor,type:l_(t.name,this.schema)});return i?S(S({},e),i()):e},{})}get plugins(){const{editor:e}=this,t=gs.sort([...this.extensions].reverse()),r=[],i=[],o=t.map(s=>{const a={name:s.name,options:s.options,storage:s.storage,editor:e,type:l_(s.name,this.schema)},l=[],c=j(s,"addKeyboardShortcuts",a);if(c){const p=function o$(n){return new rt({props:{handleKeyDown:rA(n)}})}(Object.fromEntries(Object.entries(c()).map(([g,m])=>[g,()=>m({editor:e})])));l.push(p)}const u=j(s,"addInputRules",a);wA(s,e.options.enableInputRules)&&u&&r.push(...u());const d=j(s,"addPasteRules",a);wA(s,e.options.enablePasteRules)&&d&&i.push(...d());const f=j(s,"addProseMirrorPlugins",a);if(f){const h=f();l.push(...h)}return l}).flat();return[E5({editor:e,rules:r}),...I5({editor:e,rules:i}),...o]}get attributes(){return bA(this.extensions)}get nodeViews(){const{editor:e}=this,{nodeExtensions:t}=Zf(this.extensions);return Object.fromEntries(t.filter(r=>!!j(r,"addNodeView")).map(r=>{const i=this.attributes.filter(l=>l.type===r.name),o={name:r.name,options:r.options,storage:r.storage,editor:e,type:Ht(r.name,this.schema)},s=j(r,"addNodeView",o);return s?[r.name,(l,c,u,d)=>{const f=a_(l,i);return s()({editor:e,node:l,getPos:u,decorations:d,HTMLAttributes:f,extension:r})}]:[]}))}}class N5 extends class O5{constructor(){this.callbacks={}}on(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}emit(e,...t){const r=this.callbacks[e];return r&&r.forEach(i=>i.apply(this,t)),this}off(e,t){const r=this.callbacks[e];return r&&(t?this.callbacks[e]=r.filter(i=>i!==t):delete this.callbacks[e]),this}removeAllListeners(){this.callbacks={}}}{constructor(e={}){super(),this.isFocused=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}))},0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=function C5(n,e){const t=document.querySelector("style[data-tiptap-style]");if(null!==t)return t;const r=document.createElement("style");return e&&r.setAttribute("nonce",e),r.setAttribute("data-tiptap-style",""),r.innerHTML=n,document.getElementsByTagName("head")[0].appendChild(r),r}('.ProseMirror {\n position: relative;\n}\n\n.ProseMirror {\n word-wrap: break-word;\n white-space: pre-wrap;\n white-space: break-spaces;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: "liga" 0; /* the above doesn\'t seem to work in Edge */\n}\n\n.ProseMirror [contenteditable="false"] {\n white-space: normal;\n}\n\n.ProseMirror [contenteditable="false"] [contenteditable="true"] {\n white-space: pre-wrap;\n}\n\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n\nimg.ProseMirror-separator {\n display: inline !important;\n border: none !important;\n margin: 0 !important;\n width: 1px !important;\n height: 1px !important;\n}\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n margin: 0;\n}\n\n.ProseMirror-gapcursor:after {\n content: "";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n\n.ProseMirror-hideselection *::selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection * {\n caret-color: transparent;\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n\n.tippy-box[data-animation=fade][data-state=hidden] {\n opacity: 0\n}',this.options.injectNonce))}setOptions(e={}){this.options=S(S({},this.options),e),this.view&&this.state&&!this.isDestroyed&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e){this.setOptions({editable:e})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(e,t){const r=iA(t)?t(e,this.state.plugins):[...this.state.plugins,e],i=this.state.reconfigure({plugins:r});this.view.updateState(i)}unregisterPlugin(e){if(this.isDestroyed)return;const t="string"==typeof e?`${e}$`:e.key,r=this.state.reconfigure({plugins:this.state.plugins.filter(i=>!i.key.startsWith(t))});this.view.updateState(r)}createExtensionManager(){const t=[...this.options.enableCoreExtensions?Object.values(v5):[],...this.options.extensions].filter(r=>["extension","node","mark"].includes(null==r?void 0:r.type));this.extensionManager=new gs(t,this)}createCommandManager(){this.commandManager=new Qf({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){const e=uA(this.options.content,this.schema,this.options.parseOptions),t=aA(e,this.options.autofocus);this.view=new It(this.options.element,pn(S({},this.options.editorProps),{dispatchTransaction:this.dispatchTransaction.bind(this),state:dn.create({doc:e,selection:t})}));const r=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(r),this.createNodeViews(),this.view.dom.editor=this}createNodeViews(){this.view.setProps({nodeViews:this.extensionManager.nodeViews})}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;const t=this.capturedTransaction;return this.capturedTransaction=null,t}dispatchTransaction(e){if(this.isCapturingTransaction)return this.capturedTransaction?void e.steps.forEach(s=>{var a;return null===(a=this.capturedTransaction)||void 0===a?void 0:a.step(s)}):void(this.capturedTransaction=e);const t=this.state.apply(e),r=!this.state.selection.eq(t.selection);this.view.updateState(t),this.emit("transaction",{editor:this,transaction:e}),r&&this.emit("selectionUpdate",{editor:this,transaction:e});const i=e.getMeta("focus"),o=e.getMeta("blur");i&&this.emit("focus",{editor:this,event:i.event,transaction:e}),o&&this.emit("blur",{editor:this,event:o.event,transaction:e}),e.docChanged&&!e.getMeta("preventUpdate")&&this.emit("update",{editor:this,transaction:e})}getAttributes(e){return mA(this.state,e)}isActive(e,t){return function _5(n,e,t={}){if(!e)return Uc(n,null,t)||o_(n,null,t);const r=qf(e,n.schema);return"node"===r?Uc(n,e,t):"mark"===r&&o_(n,e,t)}(this.state,"string"==typeof e?e:null,"string"==typeof e?t:e)}getJSON(){return this.state.doc.toJSON()}getHTML(){return function vA(n,e){const t=Gt.fromSchema(e).serializeFragment(n),i=document.implementation.createHTMLDocument().createElement("div");return i.appendChild(t),i.innerHTML}(this.state.doc.content,this.schema)}getText(e){const{blockSeparator:t="\n\n",textSerializers:r={}}=e||{};return function yA(n,e){return oA(n,{from:0,to:n.content.size},e)}(this.state.doc,{blockSeparator:t,textSerializers:S(S({},r),Jy(this.schema))})}get isEmpty(){return function b5(n){var e;const t=null===(e=n.type.createAndFill())||void 0===e?void 0:e.toJSON(),r=n.toJSON();return JSON.stringify(t)===JSON.stringify(r)}(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){this.emit("destroy"),this.view&&this.view.destroy(),this.removeAllListeners()}get isDestroyed(){var e;return!(null===(e=this.view)||void 0===e?void 0:e.docView)}}class fn{constructor(e={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config=S(S({},this.config),e),this.name=this.config.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=pe(j(this,"addOptions",{name:this.name}))),this.storage=pe(j(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new fn(e)}configure(e={}){const t=this.extend();return t.options=zf(this.options,e),t.storage=pe(j(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){const t=new fn(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=pe(j(t,"addOptions",{name:t.name})),t.storage=pe(j(t,"addStorage",{name:t.name,options:t.options})),t}}class fi{constructor(e={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config=S(S({},this.config),e),this.name=this.config.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=pe(j(this,"addOptions",{name:this.name}))),this.storage=pe(j(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new fi(e)}configure(e={}){const t=this.extend();return t.options=zf(this.options,e),t.storage=pe(j(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){const t=new fi(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=pe(j(t,"addOptions",{name:t.name})),t.storage=pe(j(t,"addStorage",{name:t.name,options:t.options})),t}}function P5(n){return new zc({find:n.find,handler:({state:e,range:t,match:r})=>{const i=pe(n.getAttributes,void 0,r)||{},{tr:o}=e,s=t.from;let a=t.to;if(r[1]){let c=s+r[0].lastIndexOf(r[1]);c>a?c=a:a=c+r[1].length,o.insertText(r[0][r[0].length-1],s+r[0].length-1),o.replaceWith(c,a,n.type.create(i))}else r[0]&&o.replaceWith(s,a,n.type.create(i))}})}function Jf(n,e,t){const r=[];return n===e?t.resolve(n).marks().forEach(i=>{const s=t_(t.resolve(n-1),i.type);!s||r.push(S({mark:i},s))}):t.nodesBetween(n,e,(i,o)=>{r.push(...i.marks.map(s=>({from:o,to:o+i.nodeSize,mark:s})))}),r}function ms(n){return new zc({find:n.find,handler:({state:e,range:t,match:r})=>{const i=pe(n.getAttributes,void 0,r);if(!1===i||null===i)return null;const{tr:o}=e,s=r[r.length-1],a=r[0];let l=t.to;if(s){const c=a.search(/\S/),u=t.from+a.indexOf(s),d=u+s.length;if(Jf(t.from,t.to,e.doc).filter(h=>h.mark.type.excluded.find(g=>g===n.type&&g!==h.mark.type)).filter(h=>h.to>u).length)return null;dt.from&&o.delete(t.from+c,u),l=t.from+c+s.length,o.addMark(t.from+c,l,n.type.create(i||{})),o.removeStoredMark(n.type)}}})}function c_(n){return new zc({find:n.find,handler:({state:e,range:t,match:r})=>{const i=e.doc.resolve(t.from),o=pe(n.getAttributes,void 0,r)||{};if(!i.node(-1).canReplaceWith(i.index(-1),i.indexAfter(-1),n.type))return null;e.tr.delete(t.from,t.to).setBlockType(t.from,t.from,n.type,o)}})}function u_(n){return new zc({find:n.find,handler:({state:e,range:t,match:r})=>{const i=pe(n.getAttributes,void 0,r)||{},o=e.tr.delete(t.from,t.to),a=o.doc.resolve(t.from).blockRange(),l=a&&sy(a,n.type,i);if(!l)return null;o.wrap(a,l);const c=o.doc.resolve(t.from-1).nodeBefore;c&&c.type===n.type&&Ic(o.doc,t.from-1)&&(!n.joinPredicate||n.joinPredicate(r,c))&&o.join(t.from-1)}})}function xo(n){return new _A({find:n.find,handler:({state:e,range:t,match:r})=>{const i=pe(n.getAttributes,void 0,r);if(!1===i||null===i)return null;const{tr:o}=e,s=r[r.length-1],a=r[0];let l=t.to;if(s){const c=a.search(/\S/),u=t.from+a.indexOf(s),d=u+s.length;if(Jf(t.from,t.to,e.doc).filter(h=>h.mark.type.excluded.find(g=>g===n.type&&g!==h.mark.type)).filter(h=>h.to>u).length)return null;dt.from&&o.delete(t.from+c,u),l=t.from+c+s.length,o.addMark(t.from+c,l,n.type.create(i||{})),o.removeStoredMark(n.type)}}})}function SA(n){return sA(n)&&n instanceof ne}function Wc(n,e,t){const i=n.state.doc.content.size,o=Wi(e,0,i),s=Wi(t,0,i),a=n.coordsAtPos(o),l=n.coordsAtPos(s,-1),c=Math.min(a.top,l.top),u=Math.max(a.bottom,l.bottom),d=Math.min(a.left,l.left),f=Math.max(a.right,l.right),y={top:c,bottom:u,left:d,right:f,width:f-d,height:u-c,x:d,y:c};return pn(S({},y),{toJSON:()=>y})}const z5=/^\s*>\s$/,W5=fn.create({name:"blockquote",addOptions:()=>({HTMLAttributes:{}}),content:"block+",group:"block",defining:!0,parseHTML:()=>[{tag:"blockquote"}],renderHTML({HTMLAttributes:n}){return["blockquote",xt(this.options.HTMLAttributes,n),0]},addCommands(){return{setBlockquote:()=>({commands:n})=>n.wrapIn(this.name),toggleBlockquote:()=>({commands:n})=>n.toggleWrap(this.name),unsetBlockquote:()=>({commands:n})=>n.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[u_({find:z5,type:this.type})]}}),$5=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))$/,G5=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))/g,q5=/(?:^|\s)((?:__)((?:[^__]+))(?:__))$/,K5=/(?:^|\s)((?:__)((?:[^__]+))(?:__))/g,Z5=fi.create({name:"bold",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"strong"},{tag:"b",getAttrs:n=>"normal"!==n.style.fontWeight&&null},{style:"font-weight",getAttrs:n=>/^(bold(er)?|[5-9]\d{2,})$/.test(n)&&null}],renderHTML({HTMLAttributes:n}){return["strong",xt(this.options.HTMLAttributes,n),0]},addCommands(){return{setBold:()=>({commands:n})=>n.setMark(this.name),toggleBold:()=>({commands:n})=>n.toggleMark(this.name),unsetBold:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[ms({find:$5,type:this.type}),ms({find:q5,type:this.type})]},addPasteRules(){return[xo({find:G5,type:this.type}),xo({find:K5,type:this.type})]}}),Y5=/^\s*([-+*])\s$/,Q5=fn.create({name:"bulletList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{}}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML:()=>[{tag:"ul"}],renderHTML({HTMLAttributes:n}){return["ul",xt(this.options.HTMLAttributes,n),0]},addCommands(){return{toggleBulletList:()=>({commands:n})=>n.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){return[u_({find:Y5,type:this.type})]}}),J5=/(?:^|\s)((?:`)((?:[^`]+))(?:`))$/,X5=/(?:^|\s)((?:`)((?:[^`]+))(?:`))/g,eG=fi.create({name:"code",addOptions:()=>({HTMLAttributes:{}}),excludes:"_",code:!0,parseHTML:()=>[{tag:"code"}],renderHTML({HTMLAttributes:n}){return["code",xt(this.options.HTMLAttributes,n),0]},addCommands(){return{setCode:()=>({commands:n})=>n.setMark(this.name),toggleCode:()=>({commands:n})=>n.toggleMark(this.name),unsetCode:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[ms({find:J5,type:this.type})]},addPasteRules(){return[xo({find:X5,type:this.type})]}}),tG=/^```([a-z]+)?[\s\n]$/,nG=/^~~~([a-z]+)?[\s\n]$/,rG=fn.create({name:"codeBlock",addOptions:()=>({languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,HTMLAttributes:{}}),content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:null,parseHTML:n=>{var e;const{languageClassPrefix:t}=this.options;return[...(null===(e=n.firstElementChild)||void 0===e?void 0:e.classList)||[]].filter(s=>s.startsWith(t)).map(s=>s.replace(t,""))[0]||null},rendered:!1}}},parseHTML:()=>[{tag:"pre",preserveWhitespace:"full"}],renderHTML({node:n,HTMLAttributes:e}){return["pre",xt(this.options.HTMLAttributes,e),["code",{class:n.attrs.language?this.options.languageClassPrefix+n.attrs.language:null},0]]},addCommands(){return{setCodeBlock:n=>({commands:e})=>e.setNode(this.name,n),toggleCodeBlock:n=>({commands:e})=>e.toggleNode(this.name,"paragraph",n)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:n,$anchor:e}=this.editor.state.selection;return!(!n||e.parent.type.name!==this.name)&&!(1!==e.pos&&e.parent.textContent.length)&&this.editor.commands.clearNodes()},Enter:({editor:n})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:e}=n,{selection:t}=e,{$from:r,empty:i}=t;if(!i||r.parent.type!==this.type)return!1;const o=r.parentOffset===r.parent.nodeSize-2,s=r.parent.textContent.endsWith("\n\n");return!(!o||!s)&&n.chain().command(({tr:a})=>(a.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:n})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=n,{selection:t,doc:r}=e,{$from:i,empty:o}=t;if(!o||i.parent.type!==this.type||i.parentOffset!==i.parent.nodeSize-2)return!1;const a=i.after();return void 0!==a&&!r.nodeAt(a)&&n.commands.exitCode()}}},addInputRules(){return[c_({find:tG,type:this.type,getAttributes:n=>({language:n[1]})}),c_({find:nG,type:this.type,getAttributes:n=>({language:n[1]})})]},addProseMirrorPlugins(){return[new rt({key:new Ct("codeBlockVSCodeHandler"),props:{handlePaste:(n,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;const t=e.clipboardData.getData("text/plain"),r=e.clipboardData.getData("vscode-editor-data"),i=r?JSON.parse(r):void 0,o=null==i?void 0:i.mode;if(!t||!o)return!1;const{tr:s}=n.state;return s.replaceSelectionWith(this.type.create({language:o})),s.setSelection(ye.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.insertText(t.replace(/\r\n?/g,"\n")),s.setMeta("paste",!0),n.dispatch(s),!0}}})]}}),iG=fn.create({name:"doc",topNode:!0,content:"block+"});function oG(n){return void 0===n&&(n={}),new rt({view:function(t){return new hi(t,n)}})}var hi=function(e,t){var r=this;this.editorView=e,this.width=t.width||1,this.color=t.color||"black",this.class=t.class,this.cursorPos=null,this.element=null,this.timeout=null,this.handlers=["dragover","dragend","drop","dragleave"].map(function(i){var o=function(s){return r[i](s)};return e.dom.addEventListener(i,o),{name:i,handler:o}})};hi.prototype.destroy=function(){var e=this;this.handlers.forEach(function(t){return e.editorView.dom.removeEventListener(t.name,t.handler)})},hi.prototype.update=function(e,t){null!=this.cursorPos&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())},hi.prototype.setCursor=function(e){e!=this.cursorPos&&(this.cursorPos=e,null==e?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())},hi.prototype.updateOverlay=function(){var t,e=this.editorView.state.doc.resolve(this.cursorPos);if(!e.parent.inlineContent){var r=e.nodeBefore,i=e.nodeAfter;if(r||i){var o=this.editorView.nodeDOM(this.cursorPos-(r?r.nodeSize:0)).getBoundingClientRect(),s=r?o.bottom:o.top;r&&i&&(s=(s+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),t={left:o.left,right:o.right,top:s-this.width/2,bottom:s+this.width/2}}}if(!t){var a=this.editorView.coordsAtPos(this.cursorPos);t={left:a.left-this.width/2,right:a.left+this.width/2,top:a.top,bottom:a.bottom}}var c,u,l=this.editorView.dom.offsetParent;if(this.element||(this.element=l.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none; background-color: "+this.color),!l||l==document.body&&"static"==getComputedStyle(l).position)c=-pageXOffset,u=-pageYOffset;else{var d=l.getBoundingClientRect();c=d.left-l.scrollLeft,u=d.top-l.scrollTop}this.element.style.left=t.left-c+"px",this.element.style.top=t.top-u+"px",this.element.style.width=t.right-t.left+"px",this.element.style.height=t.bottom-t.top+"px"},hi.prototype.scheduleRemoval=function(e){var t=this;clearTimeout(this.timeout),this.timeout=setTimeout(function(){return t.setCursor(null)},e)},hi.prototype.dragover=function(e){if(this.editorView.editable){var t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),r=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),i=r&&r.type.spec.disableDropCursor,o="function"==typeof i?i(this.editorView,t):i;if(t&&!o){var s=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice&&null==(s=vT(this.editorView.state.doc,s,this.editorView.dragging.slice)))return this.setCursor(null);this.setCursor(s),this.scheduleRemoval(5e3)}}},hi.prototype.dragend=function(){this.scheduleRemoval(20)},hi.prototype.drop=function(){this.scheduleRemoval(20)},hi.prototype.dragleave=function(e){(e.target==this.editorView.dom||!this.editorView.dom.contains(e.relatedTarget))&&this.setCursor(null)};const sG=Tt.create({name:"dropCursor",addOptions:()=>({color:"currentColor",width:1,class:null}),addProseMirrorPlugins(){return[oG(this.options)]}});var pr=function(n){function e(t){n.call(this,t,t)}return n&&(e.__proto__=n),(e.prototype=Object.create(n&&n.prototype)).constructor=e,e.prototype.map=function(r,i){var o=r.resolve(i.map(this.head));return e.valid(o)?new e(o):n.near(o)},e.prototype.content=function(){return F.empty},e.prototype.eq=function(r){return r instanceof e&&r.head==this.head},e.prototype.toJSON=function(){return{type:"gapcursor",pos:this.head}},e.fromJSON=function(r,i){if("number"!=typeof i.pos)throw new RangeError("Invalid input for GapCursor.fromJSON");return new e(r.resolve(i.pos))},e.prototype.getBookmark=function(){return new Xf(this.anchor)},e.valid=function(r){var i=r.parent;if(i.isTextblock||!function aG(n){for(var e=n.depth;e>=0;e--){var t=n.index(e),r=n.node(e);if(0!=t)for(var i=r.child(t-1);;i=i.lastChild){if(0==i.childCount&&!i.inlineContent||i.isAtom||i.type.spec.isolating)return!0;if(i.inlineContent)return!1}else if(r.type.spec.isolating)return!0}return!0}(r)||!function lG(n){for(var e=n.depth;e>=0;e--){var t=n.indexAfter(e),r=n.node(e);if(t!=r.childCount)for(var i=r.child(t);;i=i.firstChild){if(0==i.childCount&&!i.inlineContent||i.isAtom||i.type.spec.isolating)return!0;if(i.inlineContent)return!1}else if(r.type.spec.isolating)return!0}return!0}(r))return!1;var o=i.type.spec.allowGapCursor;if(null!=o)return o;var s=i.contentMatchAt(r.index()).defaultType;return s&&s.isTextblock},e.findFrom=function(r,i,o){e:for(;;){if(!o&&e.valid(r))return r;for(var s=r.pos,a=null,l=r.depth;;l--){var c=r.node(l);if(i>0?r.indexAfter(l)0){a=c.child(i>0?r.indexAfter(l):r.index(l)-1);break}if(0==l)return null;var u=r.doc.resolve(s+=i);if(e.valid(u))return u}for(;;){var d=i>0?a.firstChild:a.lastChild;if(!d){if(a.isAtom&&!a.isText&&!ne.isSelectable(a)){r=r.doc.resolve(s+a.nodeSize*i),o=!1;continue e}break}a=d;var f=r.doc.resolve(s+=i);if(e.valid(f))return f}return null}},e}(ue);pr.prototype.visible=!1,ue.jsonID("gapcursor",pr);var Xf=function(e){this.pos=e};Xf.prototype.map=function(e){return new Xf(e.map(this.pos))},Xf.prototype.resolve=function(e){var t=e.resolve(this.pos);return pr.valid(t)?new pr(t):ue.near(t)};var uG=rA({ArrowLeft:eh("horiz",-1),ArrowRight:eh("horiz",1),ArrowUp:eh("vert",-1),ArrowDown:eh("vert",1)});function eh(n,e){var t="vert"==n?e>0?"down":"up":e>0?"right":"left";return function(r,i,o){var s=r.selection,a=e>0?s.$to:s.$from,l=s.empty;if(s instanceof ye){if(!o.endOfTextblock(t)||0==a.depth)return!1;l=!1,a=r.doc.resolve(e>0?a.after():a.before())}var c=pr.findFrom(a,e,l);return!!c&&(i&&i(r.tr.setSelection(new pr(c))),!0)}}function dG(n,e,t){if(!n.editable)return!1;var r=n.state.doc.resolve(e);if(!pr.valid(r))return!1;var o=n.posAtCoords({left:t.clientX,top:t.clientY}).inside;return!(o>-1&&ne.isSelectable(n.state.doc.nodeAt(o))||(n.dispatch(n.state.tr.setSelection(new pr(r))),0))}function fG(n,e){if("insertCompositionText"!=e.inputType||!(n.state.selection instanceof pr))return!1;var r=n.state.selection.$from,i=r.parent.contentMatchAt(r.index()).findWrapping(n.state.schema.nodes.text);if(!i)return!1;for(var o=M.empty,s=i.length-1;s>=0;s--)o=M.from(i[s].createAndFill(null,o));var a=n.state.tr.replace(r.pos,r.pos,new F(o,0,0));return a.setSelection(ye.near(a.doc.resolve(r.pos+1))),n.dispatch(a),!1}function hG(n){if(!(n.selection instanceof pr))return null;var e=document.createElement("div");return e.className="ProseMirror-gapcursor",Oe.create(n.doc,[Dt.widget(n.selection.head,e,{key:"gapcursor"})])}const pG=Tt.create({name:"gapCursor",addProseMirrorPlugins:()=>[new rt({props:{decorations:hG,createSelectionBetween:function(e,t,r){if(t.pos==r.pos&&pr.valid(r))return new pr(r)},handleClick:dG,handleKeyDown:uG,handleDOMEvents:{beforeinput:fG}}})],extendNodeSchema(n){var e;return{allowGapCursor:null!==(e=pe(j(n,"allowGapCursor",{name:n.name,options:n.options,storage:n.storage})))&&void 0!==e?e:null}}}),gG=fn.create({name:"hardBreak",addOptions:()=>({keepMarks:!0,HTMLAttributes:{}}),inline:!0,group:"inline",selectable:!1,parseHTML:()=>[{tag:"br"}],renderHTML({HTMLAttributes:n}){return["br",xt(this.options.HTMLAttributes,n)]},renderText:()=>"\n",addCommands(){return{setHardBreak:()=>({commands:n,chain:e,state:t,editor:r})=>n.first([()=>n.exitCode(),()=>n.command(()=>{const{selection:i,storedMarks:o}=t;if(i.$from.parent.type.spec.isolating)return!1;const{keepMarks:s}=this.options,{splittableMarks:a}=r.extensionManager,l=o||i.$to.parentOffset&&i.$from.marks();return e().insertContent({type:this.name}).command(({tr:c,dispatch:u})=>{if(u&&l&&s){const d=l.filter(f=>a.includes(f.type.name));c.ensureMarks(d)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),mG=fn.create({name:"heading",addOptions:()=>({levels:[1,2,3,4,5,6],HTMLAttributes:{}}),content:"inline*",group:"block",defining:!0,addAttributes:()=>({level:{default:1,rendered:!1}}),parseHTML(){return this.options.levels.map(n=>({tag:`h${n}`,attrs:{level:n}}))},renderHTML({node:n,HTMLAttributes:e}){return[`h${this.options.levels.includes(n.attrs.level)?n.attrs.level:this.options.levels[0]}`,xt(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:n=>({commands:e})=>!!this.options.levels.includes(n.level)&&e.setNode(this.name,n),toggleHeading:n=>({commands:e})=>!!this.options.levels.includes(n.level)&&e.toggleNode(this.name,"paragraph",n)}},addKeyboardShortcuts(){return this.options.levels.reduce((n,e)=>pn(S({},n),{[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(n=>c_({find:new RegExp(`^(#{1,${n}})\\s$`),type:this.type,getAttributes:{level:n}}))}});var Yt=function(){};Yt.prototype.append=function(e){return e.length?(e=Yt.from(e),!this.length&&e||e.length<200&&this.leafAppend(e)||this.length<200&&e.leafPrepend(this)||this.appendInner(e)):this},Yt.prototype.prepend=function(e){return e.length?Yt.from(e).append(this):this},Yt.prototype.appendInner=function(e){return new vG(this,e)},Yt.prototype.slice=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.length),e>=t?Yt.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},Yt.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},Yt.prototype.forEach=function(e,t,r){void 0===t&&(t=0),void 0===r&&(r=this.length),t<=r?this.forEachInner(e,t,r,0):this.forEachInvertedInner(e,t,r,0)},Yt.prototype.map=function(e,t,r){void 0===t&&(t=0),void 0===r&&(r=this.length);var i=[];return this.forEach(function(o,s){return i.push(e(o,s))},t,r),i},Yt.from=function(e){return e instanceof Yt?e:e&&e.length?new MA(e):Yt.empty};var MA=function(n){function e(r){n.call(this),this.values=r}n&&(e.__proto__=n),(e.prototype=Object.create(n&&n.prototype)).constructor=e;var t={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(i,o){return 0==i&&o==this.length?this:new e(this.values.slice(i,o))},e.prototype.getInner=function(i){return this.values[i]},e.prototype.forEachInner=function(i,o,s,a){for(var l=o;l=s;l--)if(!1===i(this.values[l],a+l))return!1},e.prototype.leafAppend=function(i){if(this.length+i.length<=200)return new e(this.values.concat(i.flatten()))},e.prototype.leafPrepend=function(i){if(this.length+i.length<=200)return new e(i.flatten().concat(this.values))},t.length.get=function(){return this.values.length},t.depth.get=function(){return 0},Object.defineProperties(e.prototype,t),e}(Yt);Yt.empty=new MA([]);var vG=function(n){function e(t,r){n.call(this),this.left=t,this.right=r,this.length=t.length+r.length,this.depth=Math.max(t.depth,r.depth)+1}return n&&(e.__proto__=n),(e.prototype=Object.create(n&&n.prototype)).constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return ra&&!1===this.right.forEachInner(r,Math.max(i-a,0),Math.min(this.length,o)-a,s+a))return!1},e.prototype.forEachInvertedInner=function(r,i,o,s){var a=this.left.length;if(i>a&&!1===this.right.forEachInvertedInner(r,i-a,Math.max(o,a)-a,s+a)||o=o?this.right.slice(r-o,i-o):this.left.slice(r,o).append(this.right.slice(0,i-o))},e.prototype.leafAppend=function(r){var i=this.right.leafAppend(r);if(i)return new e(this.left,i)},e.prototype.leafPrepend=function(r){var i=this.left.leafPrepend(r);if(i)return new e(i,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e}(Yt);const IA=Yt;var Qt=function(e,t){this.items=e,this.eventCount=t};Qt.prototype.popEvent=function(e,t){var s,a,r=this;if(0==this.eventCount)return null;for(var i=this.items.length;;i--)if(this.items.get(i-1).selection){--i;break}t&&(s=this.remapping(i,this.items.length),a=s.maps.length);var c,u,l=e.tr,d=[],f=[];return this.items.forEach(function(h,p){if(!h.step)return s||(s=r.remapping(i,p+1),a=s.maps.length),a--,void f.push(h);if(s){f.push(new pi(h.map));var m,g=h.step.map(s.slice(a));g&&l.maybeStep(g).doc&&d.push(new pi(m=l.mapping.maps[l.mapping.maps.length-1],null,null,d.length+f.length)),a--,m&&s.appendMap(m,a)}else l.maybeStep(h.step);return h.selection?(c=s?h.selection.map(s.slice(a)):h.selection,u=new Qt(r.items.slice(0,i).append(f.reverse().concat(d)),r.eventCount-1),!1):void 0},this.items.length,0),{remaining:u,transform:l,selection:c}},Qt.prototype.addTransform=function(e,t,r,i){for(var o=[],s=this.eventCount,a=this.items,l=!i&&a.length?a.get(a.length-1):null,c=0;cCG&&(a=function bG(n,e){var t;return n.forEach(function(r,i){if(r.selection&&0==e--)return t=i,!1}),n.slice(t)}(a,h),s-=h),new Qt(a.append(o),s)},Qt.prototype.remapping=function(e,t){var r=new cn;return this.items.forEach(function(i,o){r.appendMap(i.map,null!=i.mirrorOffset&&o-i.mirrorOffset>=e?r.maps.length-i.mirrorOffset:null)},e,t),r},Qt.prototype.addMaps=function(e){return 0==this.eventCount?this:new Qt(this.items.append(e.map(function(t){return new pi(t)})),this.eventCount)},Qt.prototype.rebased=function(e,t){if(!this.eventCount)return this;var r=[],i=Math.max(0,this.items.length-t),o=e.mapping,s=e.steps.length,a=this.eventCount;this.items.forEach(function(h){h.selection&&a--},i);var l=t;this.items.forEach(function(h){var p=o.getMirror(--l);if(null!=p){s=Math.min(s,p);var g=o.maps[p];if(h.step){var m=e.steps[p].invert(e.docs[p]),y=h.selection&&h.selection.map(o.slice(l+1,p));y&&a++,r.push(new pi(g,m,y))}else r.push(new pi(g))}},i);for(var c=[],u=t;u500&&(f=f.compress(this.items.length-r.length)),f},Qt.prototype.emptyItemCount=function(){var e=0;return this.items.forEach(function(t){t.step||e++}),e},Qt.prototype.compress=function(e){void 0===e&&(e=this.items.length);var t=this.remapping(0,e),r=t.maps.length,i=[],o=0;return this.items.forEach(function(s,a){if(a>=e)i.push(s),s.selection&&o++;else if(s.step){var l=s.step.map(t.slice(r)),c=l&&l.getMap();if(r--,c&&t.appendMap(c,r),l){var u=s.selection&&s.selection.map(t.slice(r));u&&o++;var f,d=new pi(c.invert(),l,u),h=i.length-1;(f=i.length&&i[h].merge(d))?i[h]=f:i.push(d)}}else s.map&&r--},this.items.length,0),new Qt(IA.from(i.reverse()),o)},Qt.empty=new Qt(IA.empty,0);var pi=function(e,t,r,i){this.map=e,this.step=t,this.selection=r,this.mirrorOffset=i};pi.prototype.merge=function(e){if(this.step&&e.step&&!e.selection){var t=e.step.merge(this.step);if(t)return new pi(t.getMap().invert(),t,this.selection)}};var Ao=function(e,t,r,i){this.done=e,this.undone=t,this.prevRanges=r,this.prevTime=i},CG=20;function TA(n){var e=[];return n.forEach(function(t,r,i,o){return e.push(i,o)}),e}function f_(n,e){if(!n)return null;for(var t=[],r=0;r=e[o]&&(t=!0)}),t}(t,n.prevRanges)),l=s?f_(n.prevRanges,t.mapping):TA(t.mapping.maps[t.steps.length-1]);return new Ao(n.done.addTransform(t,a?e.selection.getBookmark():null,r,nh(e)),Qt.empty,l,t.time)}(r,i,t,n)}},config:n={depth:n&&n.depth||100,newGroupDelay:n&&n.newGroupDelay||500},props:{handleDOMEvents:{beforeinput:function(t,r){var i="historyUndo"==r.inputType?kA(t.state,t.dispatch):"historyRedo"==r.inputType&&NA(t.state,t.dispatch);return i&&r.preventDefault(),i}}}})}function kA(n,e){var t=gi.getState(n);return!(!t||0==t.done.eventCount||(e&&xA(t,n,e,!1),0))}function NA(n,e){var t=gi.getState(n);return!(!t||0==t.undone.eventCount||(e&&xA(t,n,e,!0),0))}const SG=Tt.create({name:"history",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>({state:n,dispatch:e})=>kA(n,e),redo:()=>({state:n,dispatch:e})=>NA(n,e)}),addProseMirrorPlugins(){return[wG(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Mod-y":()=>this.editor.commands.redo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-\u044f":()=>this.editor.commands.undo(),"Shift-Mod-\u044f":()=>this.editor.commands.redo()}}}),MG=fn.create({name:"horizontalRule",addOptions:()=>({HTMLAttributes:{}}),group:"block",parseHTML:()=>[{tag:"hr"}],renderHTML({HTMLAttributes:n}){return["hr",xt(this.options.HTMLAttributes,n)]},addCommands(){return{setHorizontalRule:()=>({chain:n})=>n().insertContent({type:this.name}).command(({tr:e,dispatch:t})=>{var r;if(t){const{$to:i}=e.selection,o=i.end();if(i.nodeAfter)e.setSelection(ye.create(e.doc,i.pos));else{const s=null===(r=i.parent.type.contentMatch.defaultType)||void 0===r?void 0:r.create();s&&(e.insert(o,s),e.setSelection(ye.create(e.doc,o)))}e.scrollIntoView()}return!0}).run()}},addInputRules(){return[P5({find:/^(?:---|\u2014-|___\s|\*\*\*\s)$/,type:this.type})]}}),IG=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))$/,TG=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))/g,xG=/(?:^|\s)((?:_)((?:[^_]+))(?:_))$/,AG=/(?:^|\s)((?:_)((?:[^_]+))(?:_))/g,OG=fi.create({name:"italic",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"em"},{tag:"i",getAttrs:n=>"normal"!==n.style.fontStyle&&null},{style:"font-style=italic"}],renderHTML({HTMLAttributes:n}){return["em",xt(this.options.HTMLAttributes,n),0]},addCommands(){return{setItalic:()=>({commands:n})=>n.setMark(this.name),toggleItalic:()=>({commands:n})=>n.toggleMark(this.name),unsetItalic:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[ms({find:IG,type:this.type}),ms({find:xG,type:this.type})]},addPasteRules(){return[xo({find:TG,type:this.type}),xo({find:AG,type:this.type})]}}),kG=fn.create({name:"listItem",addOptions:()=>({HTMLAttributes:{}}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:n}){return["li",xt(this.options.HTMLAttributes,n),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),NG=/^(\d+)\.\s$/,RG=fn.create({name:"orderedList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{}}),group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes:()=>({start:{default:1,parseHTML:n=>n.hasAttribute("start")?parseInt(n.getAttribute("start")||"",10):1}}),parseHTML:()=>[{tag:"ol"}],renderHTML({HTMLAttributes:n}){const r=n,{start:e}=r,t=M1(r,["start"]);return 1===e?["ol",xt(this.options.HTMLAttributes,t),0]:["ol",xt(this.options.HTMLAttributes,n),0]},addCommands(){return{toggleOrderedList:()=>({commands:n})=>n.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){return[u_({find:NG,type:this.type,getAttributes:n=>({start:+n[1]}),joinPredicate:(n,e)=>e.childCount+e.attrs.start===+n[1]})]}}),PG=fn.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:n}){return["p",xt(this.options.HTMLAttributes,n),0]},addCommands(){return{setParagraph:()=>({commands:n})=>n.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),FG=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))$/,LG=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))/g,BG=fi.create({name:"strike",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:n=>!!n.includes("line-through")&&{}}],renderHTML({HTMLAttributes:n}){return["s",xt(this.options.HTMLAttributes,n),0]},addCommands(){return{setStrike:()=>({commands:n})=>n.setMark(this.name),toggleStrike:()=>({commands:n})=>n.toggleMark(this.name),unsetStrike:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-x":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[ms({find:FG,type:this.type})]},addPasteRules(){return[xo({find:LG,type:this.type})]}}),jG=fn.create({name:"text",group:"inline"}),VG=Tt.create({name:"starterKit",addExtensions(){var n,e,t,r,i,o,s,a,l,c,u,d,f,h,p,g,m,y;const v=[];return!1!==this.options.blockquote&&v.push(W5.configure(null===(n=this.options)||void 0===n?void 0:n.blockquote)),!1!==this.options.bold&&v.push(Z5.configure(null===(e=this.options)||void 0===e?void 0:e.bold)),!1!==this.options.bulletList&&v.push(Q5.configure(null===(t=this.options)||void 0===t?void 0:t.bulletList)),!1!==this.options.code&&v.push(eG.configure(null===(r=this.options)||void 0===r?void 0:r.code)),!1!==this.options.codeBlock&&v.push(rG.configure(null===(i=this.options)||void 0===i?void 0:i.codeBlock)),!1!==this.options.document&&v.push(iG.configure(null===(o=this.options)||void 0===o?void 0:o.document)),!1!==this.options.dropcursor&&v.push(sG.configure(null===(s=this.options)||void 0===s?void 0:s.dropcursor)),!1!==this.options.gapcursor&&v.push(pG.configure(null===(a=this.options)||void 0===a?void 0:a.gapcursor)),!1!==this.options.hardBreak&&v.push(gG.configure(null===(l=this.options)||void 0===l?void 0:l.hardBreak)),!1!==this.options.heading&&v.push(mG.configure(null===(c=this.options)||void 0===c?void 0:c.heading)),!1!==this.options.history&&v.push(SG.configure(null===(u=this.options)||void 0===u?void 0:u.history)),!1!==this.options.horizontalRule&&v.push(MG.configure(null===(d=this.options)||void 0===d?void 0:d.horizontalRule)),!1!==this.options.italic&&v.push(OG.configure(null===(f=this.options)||void 0===f?void 0:f.italic)),!1!==this.options.listItem&&v.push(kG.configure(null===(h=this.options)||void 0===h?void 0:h.listItem)),!1!==this.options.orderedList&&v.push(RG.configure(null===(p=this.options)||void 0===p?void 0:p.orderedList)),!1!==this.options.paragraph&&v.push(PG.configure(null===(g=this.options)||void 0===g?void 0:g.paragraph)),!1!==this.options.strike&&v.push(BG.configure(null===(m=this.options)||void 0===m?void 0:m.strike)),!1!==this.options.text&&v.push(jG.configure(null===(y=this.options)||void 0===y?void 0:y.text)),v}}),HG=Tt.create({name:"placeholder",addOptions:()=>({emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something \u2026",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}),addProseMirrorPlugins(){return[new rt({props:{decorations:({doc:n,selection:e})=>{const t=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=e,i=[];if(t)return n.descendants((o,s)=>{const a=r>=s&&r<=s+o.nodeSize;if((a||!this.options.showOnlyCurrent)&&!o.isLeaf&&!o.childCount){const c=[this.options.emptyNodeClass];this.editor.isEmpty&&c.push(this.options.emptyEditorClass);const u=Dt.node(s,s+o.nodeSize,{class:c.join(" "),"data-placeholder":"function"==typeof this.options.placeholder?this.options.placeholder({editor:this.editor,node:o,pos:s,hasAnchor:a}):this.options.placeholder});i.push(u)}return this.options.includeChildren}),Oe.create(n,i)}}})]}});function se(...n){let e=n[n.length-1];return Os(e)?(n.pop(),gp(n,e)):mp(n)}class Vr extends Me{constructor(e){super(),this._value=e}get value(){return this.getValue()}_subscribe(e){const t=super._subscribe(e);return t&&!t.closed&&e.next(this._value),t}getValue(){if(this.hasError)throw this.thrownError;if(this.closed)throw new Uo;return this._value}next(e){super.next(this._value=e)}}class UG extends tt{notifyNext(e,t,r,i,o){this.destination.next(t)}notifyError(e,t){this.destination.error(e)}notifyComplete(e){this.destination.complete()}}class zG extends tt{constructor(e,t,r){super(),this.parent=e,this.outerValue=t,this.outerIndex=r,this.index=0}_next(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this.index++,this)}_error(e){this.parent.notifyError(e,this),this.unsubscribe()}_complete(){this.parent.notifyComplete(this),this.unsubscribe()}}function WG(n,e,t,r,i=new zG(n,t,r)){if(!i.closed)return e instanceof Ne?e.subscribe(i):pp(e)(i)}const RA={};class GG{constructor(e){this.resultSelector=e}call(e,t){return t.subscribe(new qG(e,this.resultSelector))}}class qG extends UG{constructor(e,t){super(e),this.resultSelector=t,this.active=0,this.values=[],this.observables=[]}_next(e){this.values.push(RA),this.observables.push(e)}_complete(){const e=this.observables,t=e.length;if(0===t)this.destination.complete();else{this.active=t,this.toRespond=t;for(let r=0;r{function n(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return n.prototype=Object.create(Error.prototype),n})();function p_(...n){return function KG(){return yl(1)}()(se(...n))}const Ua=new Ne(n=>n.complete());function ih(n){return n?function ZG(n){return new Ne(e=>n.schedule(()=>e.complete()))}(n):Ua}function PA(n){return new Ne(e=>{let t;try{t=n()}catch(i){return void e.error(i)}return(t?zt(t):ih()).subscribe(e)})}function mi(n,e){return"function"==typeof e?t=>t.pipe(mi((r,i)=>zt(n(r,i)).pipe(be((o,s)=>e(r,o,i,s))))):t=>t.lift(new YG(n))}class YG{constructor(e){this.project=e}call(e,t){return t.subscribe(new QG(e,this.project))}}class QG extends ml{constructor(e,t){super(e),this.project=t,this.index=0}_next(e){let t;const r=this.index++;try{t=this.project(e,r)}catch(i){return void this.destination.error(i)}this._innerSub(t)}_innerSub(e){const t=this.innerSubscription;t&&t.unsubscribe();const r=new gl(this),i=this.destination;i.add(r),this.innerSubscription=vl(e,r),this.innerSubscription!==r&&i.add(this.innerSubscription)}_complete(){const{innerSubscription:e}=this;(!e||e.closed)&&super._complete(),this.unsubscribe()}_unsubscribe(){this.innerSubscription=void 0}notifyComplete(){this.innerSubscription=void 0,this.isStopped&&super._complete()}notifyNext(e){this.destination.next(e)}}const FA=(()=>{function n(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return n.prototype=Object.create(Error.prototype),n})();function vs(n){return e=>0===n?ih():e.lift(new JG(n))}class JG{constructor(e){if(this.total=e,this.total<0)throw new FA}call(e,t){return t.subscribe(new XG(e,this.total))}}class XG extends tt{constructor(e,t){super(e),this.total=t,this.count=0}_next(e){const t=this.total,r=++this.count;r<=t&&(this.destination.next(e),r===t&&(this.destination.complete(),this.unsubscribe()))}}function LA(n,e){let t=!1;return arguments.length>=2&&(t=!0),function(i){return i.lift(new t6(n,e,t))}}class t6{constructor(e,t,r=!1){this.accumulator=e,this.seed=t,this.hasSeed=r}call(e,t){return t.subscribe(new n6(e,this.accumulator,this.seed,this.hasSeed))}}class n6 extends tt{constructor(e,t,r,i){super(e),this.accumulator=t,this._seed=r,this.hasSeed=i,this.index=0}get seed(){return this._seed}set seed(e){this.hasSeed=!0,this._seed=e}_next(e){if(this.hasSeed)return this._tryNext(e);this.seed=e,this.destination.next(e)}_tryNext(e){const t=this.index++;let r;try{r=this.accumulator(this.seed,e,t)}catch(i){this.destination.error(i)}this.seed=r,this.destination.next(r)}}function Oo(n){return function(t){const r=new r6(n),i=t.lift(r);return r.caught=i}}class r6{constructor(e){this.selector=e}call(e,t){return t.subscribe(new i6(e,this.selector,this.caught))}}class i6 extends ml{constructor(e,t,r){super(e),this.selector=t,this.caught=r}error(e){if(!this.isStopped){let t;try{t=this.selector(e,this.caught)}catch(o){return void super.error(o)}this._unsubscribeAndRecycle();const r=new gl(this);this.add(r);const i=vl(t,r);i!==r&&this.add(i)}}}function za(n,e){return Wt(n,e,1)}function g_(n){return function(t){return 0===n?ih():t.lift(new o6(n))}}class o6{constructor(e){if(this.total=e,this.total<0)throw new FA}call(e,t){return t.subscribe(new s6(e,this.total))}}class s6 extends tt{constructor(e,t){super(e),this.total=t,this.ring=new Array,this.count=0}_next(e){const t=this.ring,r=this.total,i=this.count++;t.length0){const r=this.count>=this.total?this.total:this.count,i=this.ring;for(let o=0;oe.lift(new a6(n))}class a6{constructor(e){this.errorFactory=e}call(e,t){return t.subscribe(new l6(e,this.errorFactory))}}class l6 extends tt{constructor(e,t){super(e),this.errorFactory=t,this.hasValue=!1}_next(e){this.hasValue=!0,this.destination.next(e)}_complete(){if(this.hasValue)return this.destination.complete();{let e;try{e=this.errorFactory()}catch(t){e=t}this.destination.error(e)}}}function c6(){return new rh}function jA(n=null){return e=>e.lift(new u6(n))}class u6{constructor(e){this.defaultValue=e}call(e,t){return t.subscribe(new d6(e,this.defaultValue))}}class d6 extends tt{constructor(e,t){super(e),this.defaultValue=t,this.isEmpty=!0}_next(e){this.isEmpty=!1,this.destination.next(e)}_complete(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()}}function Wa(n,e){const t=arguments.length>=2;return r=>r.pipe(n?_o((i,o)=>n(i,o,r)):Au,vs(1),t?jA(e):BA(()=>new rh))}class p6{constructor(e){this.callback=e}call(e,t){return t.subscribe(new g6(e,this.callback))}}class g6 extends tt{constructor(e,t){super(e),this.add(new ke(t))}}class $i{constructor(e,t){this.id=e,this.url=t}}class m_ extends $i{constructor(e,t,r="imperative",i=null){super(e,t),this.navigationTrigger=r,this.restoredState=i}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class $c extends $i{constructor(e,t,r){super(e,t),this.urlAfterRedirects=r}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}class VA extends $i{constructor(e,t,r){super(e,t),this.reason=r}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class m6 extends $i{constructor(e,t,r){super(e,t),this.error=r}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class v6 extends $i{constructor(e,t,r,i){super(e,t),this.urlAfterRedirects=r,this.state=i}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class y6 extends $i{constructor(e,t,r,i){super(e,t),this.urlAfterRedirects=r,this.state=i}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class _6 extends $i{constructor(e,t,r,i,o){super(e,t),this.urlAfterRedirects=r,this.state=i,this.shouldActivate=o}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class b6 extends $i{constructor(e,t,r,i){super(e,t),this.urlAfterRedirects=r,this.state=i}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class C6 extends $i{constructor(e,t,r,i){super(e,t),this.urlAfterRedirects=r,this.state=i}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class HA{constructor(e){this.route=e}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class UA{constructor(e){this.route=e}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class D6{constructor(e){this.snapshot=e}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class E6{constructor(e){this.snapshot=e}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class w6{constructor(e){this.snapshot=e}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class S6{constructor(e){this.snapshot=e}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class zA{constructor(e,t,r){this.routerEvent=e,this.position=t,this.anchor=r}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}const me="primary";class M6{constructor(e){this.params=e||{}}has(e){return Object.prototype.hasOwnProperty.call(this.params,e)}get(e){if(this.has(e)){const t=this.params[e];return Array.isArray(t)?t[0]:t}return null}getAll(e){if(this.has(e)){const t=this.params[e];return Array.isArray(t)?t:[t]}return[]}get keys(){return Object.keys(this.params)}}function $a(n){return new M6(n)}const WA="ngNavigationCancelingError";function v_(n){const e=Error("NavigationCancelingError: "+n);return e[WA]=!0,e}function T6(n,e,t){const r=t.path.split("/");if(r.length>n.length||"full"===t.pathMatch&&(e.hasChildren()||r.lengthr[o]===i)}return n===e}function GA(n){return Array.prototype.concat.apply([],n)}function qA(n){return n.length>0?n[n.length-1]:null}function Jt(n,e){for(const t in n)n.hasOwnProperty(t)&&e(n[t],t)}function yi(n){return lm(n)?n:ql(n)?zt(Promise.resolve(n)):se(n)}const O6={exact:function YA(n,e,t){if(!_s(n.segments,e.segments)||!oh(n.segments,e.segments,t)||n.numberOfChildren!==e.numberOfChildren)return!1;for(const r in e.children)if(!n.children[r]||!YA(n.children[r],e.children[r],t))return!1;return!0},subset:QA},KA={exact:function k6(n,e){return vi(n,e)},subset:function N6(n,e){return Object.keys(e).length<=Object.keys(n).length&&Object.keys(e).every(t=>$A(n[t],e[t]))},ignored:()=>!0};function ZA(n,e,t){return O6[t.paths](n.root,e.root,t.matrixParams)&&KA[t.queryParams](n.queryParams,e.queryParams)&&!("exact"===t.fragment&&n.fragment!==e.fragment)}function QA(n,e,t){return JA(n,e,e.segments,t)}function JA(n,e,t,r){if(n.segments.length>t.length){const i=n.segments.slice(0,t.length);return!(!_s(i,t)||e.hasChildren()||!oh(i,t,r))}if(n.segments.length===t.length){if(!_s(n.segments,t)||!oh(n.segments,t,r))return!1;for(const i in e.children)if(!n.children[i]||!QA(n.children[i],e.children[i],r))return!1;return!0}{const i=t.slice(0,n.segments.length),o=t.slice(n.segments.length);return!!(_s(n.segments,i)&&oh(n.segments,i,r)&&n.children[me])&&JA(n.children[me],e,o,r)}}function oh(n,e,t){return e.every((r,i)=>KA[t](n[i].parameters,r.parameters))}class ys{constructor(e,t,r){this.root=e,this.queryParams=t,this.fragment=r}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=$a(this.queryParams)),this._queryParamMap}toString(){return F6.serialize(this)}}class De{constructor(e,t){this.segments=e,this.children=t,this.parent=null,Jt(t,(r,i)=>r.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return sh(this)}}class Gc{constructor(e,t){this.path=e,this.parameters=t}get parameterMap(){return this._parameterMap||(this._parameterMap=$a(this.parameters)),this._parameterMap}toString(){return rO(this)}}function _s(n,e){return n.length===e.length&&n.every((t,r)=>t.path===e[r].path)}class XA{}class eO{parse(e){const t=new $6(e);return new ys(t.parseRootSegment(),t.parseQueryParams(),t.parseFragment())}serialize(e){const t=`/${qc(e.root,!0)}`,r=function j6(n){const e=Object.keys(n).map(t=>{const r=n[t];return Array.isArray(r)?r.map(i=>`${ah(t)}=${ah(i)}`).join("&"):`${ah(t)}=${ah(r)}`}).filter(t=>!!t);return e.length?`?${e.join("&")}`:""}(e.queryParams),i="string"==typeof e.fragment?`#${function L6(n){return encodeURI(n)}(e.fragment)}`:"";return`${t}${r}${i}`}}const F6=new eO;function sh(n){return n.segments.map(e=>rO(e)).join("/")}function qc(n,e){if(!n.hasChildren())return sh(n);if(e){const t=n.children[me]?qc(n.children[me],!1):"",r=[];return Jt(n.children,(i,o)=>{o!==me&&r.push(`${o}:${qc(i,!1)}`)}),r.length>0?`${t}(${r.join("//")})`:t}{const t=function P6(n,e){let t=[];return Jt(n.children,(r,i)=>{i===me&&(t=t.concat(e(r,i)))}),Jt(n.children,(r,i)=>{i!==me&&(t=t.concat(e(r,i)))}),t}(n,(r,i)=>i===me?[qc(n.children[me],!1)]:[`${i}:${qc(r,!1)}`]);return 1===Object.keys(n.children).length&&null!=n.children[me]?`${sh(n)}/${t[0]}`:`${sh(n)}/(${t.join("//")})`}}function tO(n){return encodeURIComponent(n).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function ah(n){return tO(n).replace(/%3B/gi,";")}function y_(n){return tO(n).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function lh(n){return decodeURIComponent(n)}function nO(n){return lh(n.replace(/\+/g,"%20"))}function rO(n){return`${y_(n.path)}${function B6(n){return Object.keys(n).map(e=>`;${y_(e)}=${y_(n[e])}`).join("")}(n.parameters)}`}const V6=/^[^\/()?;=#]+/;function ch(n){const e=n.match(V6);return e?e[0]:""}const H6=/^[^=?&#]+/,z6=/^[^&#]+/;class $6{constructor(e){this.url=e,this.remaining=e}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new De([],{}):new De([],this.parseChildren())}parseQueryParams(){const e={};if(this.consumeOptional("?"))do{this.parseQueryParam(e)}while(this.consumeOptional("&"));return e}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const e=[];for(this.peekStartsWith("(")||e.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),e.push(this.parseSegment());let t={};this.peekStartsWith("/(")&&(this.capture("/"),t=this.parseParens(!0));let r={};return this.peekStartsWith("(")&&(r=this.parseParens(!1)),(e.length>0||Object.keys(t).length>0)&&(r[me]=new De(e,t)),r}parseSegment(){const e=ch(this.remaining);if(""===e&&this.peekStartsWith(";"))throw new Error(`Empty path url segment cannot have parameters: '${this.remaining}'.`);return this.capture(e),new Gc(lh(e),this.parseMatrixParams())}parseMatrixParams(){const e={};for(;this.consumeOptional(";");)this.parseParam(e);return e}parseParam(e){const t=ch(this.remaining);if(!t)return;this.capture(t);let r="";if(this.consumeOptional("=")){const i=ch(this.remaining);i&&(r=i,this.capture(r))}e[lh(t)]=lh(r)}parseQueryParam(e){const t=function U6(n){const e=n.match(H6);return e?e[0]:""}(this.remaining);if(!t)return;this.capture(t);let r="";if(this.consumeOptional("=")){const s=function W6(n){const e=n.match(z6);return e?e[0]:""}(this.remaining);s&&(r=s,this.capture(r))}const i=nO(t),o=nO(r);if(e.hasOwnProperty(i)){let s=e[i];Array.isArray(s)||(s=[s],e[i]=s),s.push(o)}else e[i]=o}parseParens(e){const t={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const r=ch(this.remaining),i=this.remaining[r.length];if("/"!==i&&")"!==i&&";"!==i)throw new Error(`Cannot parse url '${this.url}'`);let o;r.indexOf(":")>-1?(o=r.substr(0,r.indexOf(":")),this.capture(o),this.capture(":")):e&&(o=me);const s=this.parseChildren();t[o]=1===Object.keys(s).length?s[me]:new De([],s),this.consumeOptional("//")}return t}peekStartsWith(e){return this.remaining.startsWith(e)}consumeOptional(e){return!!this.peekStartsWith(e)&&(this.remaining=this.remaining.substring(e.length),!0)}capture(e){if(!this.consumeOptional(e))throw new Error(`Expected "${e}".`)}}class iO{constructor(e){this._root=e}get root(){return this._root.value}parent(e){const t=this.pathFromRoot(e);return t.length>1?t[t.length-2]:null}children(e){const t=__(e,this._root);return t?t.children.map(r=>r.value):[]}firstChild(e){const t=__(e,this._root);return t&&t.children.length>0?t.children[0].value:null}siblings(e){const t=b_(e,this._root);return t.length<2?[]:t[t.length-2].children.map(i=>i.value).filter(i=>i!==e)}pathFromRoot(e){return b_(e,this._root).map(t=>t.value)}}function __(n,e){if(n===e.value)return e;for(const t of e.children){const r=__(n,t);if(r)return r}return null}function b_(n,e){if(n===e.value)return[e];for(const t of e.children){const r=b_(n,t);if(r.length)return r.unshift(e),r}return[]}class Gi{constructor(e,t){this.value=e,this.children=t}toString(){return`TreeNode(${this.value})`}}function Ga(n){const e={};return n&&n.children.forEach(t=>e[t.value.outlet]=t),e}class oO extends iO{constructor(e,t){super(e),this.snapshot=t,C_(this,e)}toString(){return this.snapshot.toString()}}function sO(n,e){const t=function G6(n,e){const s=new uh([],{},{},"",{},me,e,null,n.root,-1,{});return new lO("",new Gi(s,[]))}(n,e),r=new Vr([new Gc("",{})]),i=new Vr({}),o=new Vr({}),s=new Vr({}),a=new Vr(""),l=new qa(r,i,s,a,o,me,e,t.root);return l.snapshot=t.root,new oO(new Gi(l,[]),t)}class qa{constructor(e,t,r,i,o,s,a,l){this.url=e,this.params=t,this.queryParams=r,this.fragment=i,this.data=o,this.outlet=s,this.component=a,this._futureSnapshot=l}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=this.params.pipe(be(e=>$a(e)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(be(e=>$a(e)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function aO(n,e="emptyOnly"){const t=n.pathFromRoot;let r=0;if("always"!==e)for(r=t.length-1;r>=1;){const i=t[r],o=t[r-1];if(i.routeConfig&&""===i.routeConfig.path)r--;else{if(o.component)break;r--}}return function q6(n){return n.reduce((e,t)=>({params:Object.assign(Object.assign({},e.params),t.params),data:Object.assign(Object.assign({},e.data),t.data),resolve:Object.assign(Object.assign({},e.resolve),t._resolvedData)}),{params:{},data:{},resolve:{}})}(t.slice(r))}class uh{constructor(e,t,r,i,o,s,a,l,c,u,d){this.url=e,this.params=t,this.queryParams=r,this.fragment=i,this.data=o,this.outlet=s,this.component=a,this.routeConfig=l,this._urlSegment=c,this._lastPathIndex=u,this._resolve=d}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=$a(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=$a(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(r=>r.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class lO extends iO{constructor(e,t){super(t),this.url=e,C_(this,t)}toString(){return cO(this._root)}}function C_(n,e){e.value._routerState=n,e.children.forEach(t=>C_(n,t))}function cO(n){const e=n.children.length>0?` { ${n.children.map(cO).join(", ")} } `:"";return`${n.value}${e}`}function D_(n){if(n.snapshot){const e=n.snapshot,t=n._futureSnapshot;n.snapshot=t,vi(e.queryParams,t.queryParams)||n.queryParams.next(t.queryParams),e.fragment!==t.fragment&&n.fragment.next(t.fragment),vi(e.params,t.params)||n.params.next(t.params),function x6(n,e){if(n.length!==e.length)return!1;for(let t=0;tvi(t.parameters,e[r].parameters))}(n.url,e.url);return t&&!(!n.parent!=!e.parent)&&(!n.parent||E_(n.parent,e.parent))}function Kc(n,e,t){if(t&&n.shouldReuseRoute(e.value,t.value.snapshot)){const r=t.value;r._futureSnapshot=e.value;const i=function Z6(n,e,t){return e.children.map(r=>{for(const i of t.children)if(n.shouldReuseRoute(r.value,i.value.snapshot))return Kc(n,r,i);return Kc(n,r)})}(n,e,t);return new Gi(r,i)}{if(n.shouldAttach(e.value)){const o=n.retrieve(e.value);if(null!==o){const s=o.route;return s.value._futureSnapshot=e.value,s.children=e.children.map(a=>Kc(n,a)),s}}const r=function Y6(n){return new qa(new Vr(n.url),new Vr(n.params),new Vr(n.queryParams),new Vr(n.fragment),new Vr(n.data),n.outlet,n.component,n)}(e.value),i=e.children.map(o=>Kc(n,o));return new Gi(r,i)}}function dh(n){return"object"==typeof n&&null!=n&&!n.outlets&&!n.segmentPath}function Zc(n){return"object"==typeof n&&null!=n&&n.outlets}function w_(n,e,t,r,i){let o={};return r&&Jt(r,(s,a)=>{o[a]=Array.isArray(s)?s.map(l=>`${l}`):`${s}`}),new ys(t.root===n?e:uO(t.root,n,e),o,i)}function uO(n,e,t){const r={};return Jt(n.children,(i,o)=>{r[o]=i===e?t:uO(i,e,t)}),new De(n.segments,r)}class dO{constructor(e,t,r){if(this.isAbsolute=e,this.numberOfDoubleDots=t,this.commands=r,e&&r.length>0&&dh(r[0]))throw new Error("Root segment cannot have matrix parameters");const i=r.find(Zc);if(i&&i!==qA(r))throw new Error("{outlets:{}} has to be the last command")}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class S_{constructor(e,t,r){this.segmentGroup=e,this.processChildren=t,this.index=r}}function fO(n,e,t){if(n||(n=new De([],{})),0===n.segments.length&&n.hasChildren())return fh(n,e,t);const r=function nq(n,e,t){let r=0,i=e;const o={match:!1,pathIndex:0,commandIndex:0};for(;i=t.length)return o;const s=n.segments[i],a=t[r];if(Zc(a))break;const l=`${a}`,c=r0&&void 0===l)break;if(l&&c&&"object"==typeof c&&void 0===c.outlets){if(!pO(l,c,s))return o;r+=2}else{if(!pO(l,{},s))return o;r++}i++}return{match:!0,pathIndex:i,commandIndex:r}}(n,e,t),i=t.slice(r.commandIndex);if(r.match&&r.pathIndex{"string"==typeof o&&(o=[o]),null!==o&&(i[s]=fO(n.children[s],e,o))}),Jt(n.children,(o,s)=>{void 0===r[s]&&(i[s]=o)}),new De(n.segments,i)}}function M_(n,e,t){const r=n.segments.slice(0,e);let i=0;for(;i{"string"==typeof t&&(t=[t]),null!==t&&(e[r]=M_(new De([],{}),0,t))}),e}function hO(n){const e={};return Jt(n,(t,r)=>e[r]=`${t}`),e}function pO(n,e,t){return n==t.path&&vi(e,t.parameters)}class oq{constructor(e,t,r,i){this.routeReuseStrategy=e,this.futureState=t,this.currState=r,this.forwardEvent=i}activate(e){const t=this.futureState._root,r=this.currState?this.currState._root:null;this.deactivateChildRoutes(t,r,e),D_(this.futureState.root),this.activateChildRoutes(t,r,e)}deactivateChildRoutes(e,t,r){const i=Ga(t);e.children.forEach(o=>{const s=o.value.outlet;this.deactivateRoutes(o,i[s],r),delete i[s]}),Jt(i,(o,s)=>{this.deactivateRouteAndItsChildren(o,r)})}deactivateRoutes(e,t,r){const i=e.value,o=t?t.value:null;if(i===o)if(i.component){const s=r.getContext(i.outlet);s&&this.deactivateChildRoutes(e,t,s.children)}else this.deactivateChildRoutes(e,t,r);else o&&this.deactivateRouteAndItsChildren(t,r)}deactivateRouteAndItsChildren(e,t){e.value.component&&this.routeReuseStrategy.shouldDetach(e.value.snapshot)?this.detachAndStoreRouteSubtree(e,t):this.deactivateRouteAndOutlet(e,t)}detachAndStoreRouteSubtree(e,t){const r=t.getContext(e.value.outlet),i=r&&e.value.component?r.children:t,o=Ga(e);for(const s of Object.keys(o))this.deactivateRouteAndItsChildren(o[s],i);if(r&&r.outlet){const s=r.outlet.detach(),a=r.children.onOutletDeactivated();this.routeReuseStrategy.store(e.value.snapshot,{componentRef:s,route:e,contexts:a})}}deactivateRouteAndOutlet(e,t){const r=t.getContext(e.value.outlet),i=r&&e.value.component?r.children:t,o=Ga(e);for(const s of Object.keys(o))this.deactivateRouteAndItsChildren(o[s],i);r&&r.outlet&&(r.outlet.deactivate(),r.children.onOutletDeactivated(),r.attachRef=null,r.resolver=null,r.route=null)}activateChildRoutes(e,t,r){const i=Ga(t);e.children.forEach(o=>{this.activateRoutes(o,i[o.value.outlet],r),this.forwardEvent(new S6(o.value.snapshot))}),e.children.length&&this.forwardEvent(new E6(e.value.snapshot))}activateRoutes(e,t,r){const i=e.value,o=t?t.value:null;if(D_(i),i===o)if(i.component){const s=r.getOrCreateContext(i.outlet);this.activateChildRoutes(e,t,s.children)}else this.activateChildRoutes(e,t,r);else if(i.component){const s=r.getOrCreateContext(i.outlet);if(this.routeReuseStrategy.shouldAttach(i.snapshot)){const a=this.routeReuseStrategy.retrieve(i.snapshot);this.routeReuseStrategy.store(i.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),D_(a.route.value),this.activateChildRoutes(e,null,s.children)}else{const a=function sq(n){for(let e=n.parent;e;e=e.parent){const t=e.routeConfig;if(t&&t._loadedConfig)return t._loadedConfig;if(t&&t.component)return null}return null}(i.snapshot),l=a?a.module.componentFactoryResolver:null;s.attachRef=null,s.route=i,s.resolver=l,s.outlet&&s.outlet.activateWith(i,l),this.activateChildRoutes(e,null,s.children)}}else this.activateChildRoutes(e,null,r)}}class I_{constructor(e,t){this.routes=e,this.module=t}}function ko(n){return"function"==typeof n}function bs(n){return n instanceof ys}const Yc=Symbol("INITIAL_VALUE");function Qc(){return mi(n=>function $G(...n){let e,t;return Os(n[n.length-1])&&(t=n.pop()),"function"==typeof n[n.length-1]&&(e=n.pop()),1===n.length&&hl(n[0])&&(n=n[0]),mp(n,t).lift(new GG(e))}(n.map(e=>e.pipe(vs(1),function e6(...n){const e=n[n.length-1];return Os(e)?(n.pop(),t=>p_(n,t,e)):t=>p_(n,t)}(Yc)))).pipe(LA((e,t)=>{let r=!1;return t.reduce((i,o,s)=>i!==Yc?i:(o===Yc&&(r=!0),r||!1!==o&&s!==t.length-1&&!bs(o)?i:o),e)},Yc),_o(e=>e!==Yc),be(e=>bs(e)?e:!0===e),vs(1)))}class fq{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.children=new Jc,this.attachRef=null}}class Jc{constructor(){this.contexts=new Map}onChildOutletCreated(e,t){const r=this.getOrCreateContext(e);r.outlet=t,this.contexts.set(e,r)}onChildOutletDestroyed(e){const t=this.getContext(e);t&&(t.outlet=null,t.attachRef=null)}onOutletDeactivated(){const e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let t=this.getContext(e);return t||(t=new fq,this.contexts.set(e,t)),t}getContext(e){return this.contexts.get(e)||null}}let gO=(()=>{class n{constructor(t,r,i,o,s){this.parentContexts=t,this.location=r,this.resolver=i,this.changeDetector=s,this.activated=null,this._activatedRoute=null,this.activateEvents=new Ae,this.deactivateEvents=new Ae,this.attachEvents=new Ae,this.detachEvents=new Ae,this.name=o||me,t.onChildOutletCreated(this.name,this)}ngOnDestroy(){this.parentContexts.onChildOutletDestroyed(this.name)}ngOnInit(){if(!this.activated){const t=this.parentContexts.getContext(this.name);t&&t.route&&(t.attachRef?this.attach(t.attachRef,t.route):this.activateWith(t.route,t.resolver||null))}}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new Error("Outlet is not activated");return this.activated.instance}get activatedRoute(){if(!this.activated)throw new Error("Outlet is not activated");return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new Error("Outlet is not activated");this.location.detach();const t=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(t.instance),t}attach(t,r){this.activated=t,this._activatedRoute=r,this.location.insert(t.hostView),this.attachEvents.emit(t.instance)}deactivate(){if(this.activated){const t=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(t)}}activateWith(t,r){if(this.isActivated)throw new Error("Cannot activate an already activated outlet");this._activatedRoute=t;const s=(r=r||this.resolver).resolveComponentFactory(t._futureSnapshot.routeConfig.component),a=this.parentContexts.getOrCreateContext(this.name).children,l=new hq(t,a,this.location.injector);this.activated=this.location.createComponent(s,this.location.length,l),this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)}}return n.\u0275fac=function(t){return new(t||n)(w(Jc),w(sr),w(Ri),function Tl(n){return function rR(n,e){if("class"===e)return n.classes;if("style"===e)return n.styles;const t=n.attrs;if(t){const r=t.length;let i=0;for(;i{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=Et({type:n,selectors:[["ng-component"]],decls:1,vars:0,template:function(t,r){1&t&&$t(0,"router-outlet")},directives:[gO],encapsulation:2}),n})();function vO(n,e=""){for(let t=0;tgr(r)===e);return t.push(...n.filter(r=>gr(r)!==e)),t}const _O={matched:!1,consumedSegments:[],lastChild:0,parameters:{},positionalParamSegments:{}};function hh(n,e,t){var r;if(""===e.path)return"full"===e.pathMatch&&(n.hasChildren()||t.length>0)?Object.assign({},_O):{matched:!0,consumedSegments:[],lastChild:0,parameters:{},positionalParamSegments:{}};const o=(e.matcher||T6)(t,n,e);if(!o)return Object.assign({},_O);const s={};Jt(o.posParams,(l,c)=>{s[c]=l.path});const a=o.consumed.length>0?Object.assign(Object.assign({},s),o.consumed[o.consumed.length-1].parameters):s;return{matched:!0,consumedSegments:o.consumed,lastChild:o.consumed.length,parameters:a,positionalParamSegments:null!==(r=o.posParams)&&void 0!==r?r:{}}}function ph(n,e,t,r,i="corrected"){if(t.length>0&&function yq(n,e,t){return t.some(r=>gh(n,e,r)&&gr(r)!==me)}(n,t,r)){const s=new De(e,function vq(n,e,t,r){const i={};i[me]=r,r._sourceSegment=n,r._segmentIndexShift=e.length;for(const o of t)if(""===o.path&&gr(o)!==me){const s=new De([],{});s._sourceSegment=n,s._segmentIndexShift=e.length,i[gr(o)]=s}return i}(n,e,r,new De(t,n.children)));return s._sourceSegment=n,s._segmentIndexShift=e.length,{segmentGroup:s,slicedSegments:[]}}if(0===t.length&&function _q(n,e,t){return t.some(r=>gh(n,e,r))}(n,t,r)){const s=new De(n.segments,function mq(n,e,t,r,i,o){const s={};for(const a of r)if(gh(n,t,a)&&!i[gr(a)]){const l=new De([],{});l._sourceSegment=n,l._segmentIndexShift="legacy"===o?n.segments.length:e.length,s[gr(a)]=l}return Object.assign(Object.assign({},i),s)}(n,e,t,r,n.children,i));return s._sourceSegment=n,s._segmentIndexShift=e.length,{segmentGroup:s,slicedSegments:t}}const o=new De(n.segments,n.children);return o._sourceSegment=n,o._segmentIndexShift=e.length,{segmentGroup:o,slicedSegments:t}}function gh(n,e,t){return(!(n.hasChildren()||e.length>0)||"full"!==t.pathMatch)&&""===t.path}function bO(n,e,t,r){return!!(gr(n)===r||r!==me&&gh(e,t,n))&&("**"===n.path||hh(e,n,t).matched)}function CO(n,e,t){return 0===e.length&&!n.children[t]}class Xc{constructor(e){this.segmentGroup=e||null}}class DO{constructor(e){this.urlTree=e}}function mh(n){return new Ne(e=>e.error(new Xc(n)))}function EO(n){return new Ne(e=>e.error(new DO(n)))}function bq(n){return new Ne(e=>e.error(new Error(`Only absolute redirects can have named outlets. redirectTo: '${n}'`)))}class Eq{constructor(e,t,r,i,o){this.configLoader=t,this.urlSerializer=r,this.urlTree=i,this.config=o,this.allowRedirects=!0,this.ngModule=e.get(Pi)}apply(){const e=ph(this.urlTree.root,[],[],this.config).segmentGroup,t=new De(e.segments,e.children);return this.expandSegmentGroup(this.ngModule,this.config,t,me).pipe(be(o=>this.createUrlTree(x_(o),this.urlTree.queryParams,this.urlTree.fragment))).pipe(Oo(o=>{if(o instanceof DO)return this.allowRedirects=!1,this.match(o.urlTree);throw o instanceof Xc?this.noMatchError(o):o}))}match(e){return this.expandSegmentGroup(this.ngModule,this.config,e.root,me).pipe(be(i=>this.createUrlTree(x_(i),e.queryParams,e.fragment))).pipe(Oo(i=>{throw i instanceof Xc?this.noMatchError(i):i}))}noMatchError(e){return new Error(`Cannot match any routes. URL Segment: '${e.segmentGroup}'`)}createUrlTree(e,t,r){const i=e.segments.length>0?new De([],{[me]:e}):e;return new ys(i,t,r)}expandSegmentGroup(e,t,r,i){return 0===r.segments.length&&r.hasChildren()?this.expandChildren(e,t,r).pipe(be(o=>new De([],o))):this.expandSegment(e,r,t,r.segments,i,!0)}expandChildren(e,t,r){const i=[];for(const o of Object.keys(r.children))"primary"===o?i.unshift(o):i.push(o);return zt(i).pipe(za(o=>{const s=r.children[o],a=yO(t,o);return this.expandSegmentGroup(e,a,s,o).pipe(be(l=>({segment:l,outlet:o})))}),LA((o,s)=>(o[s.outlet]=s.segment,o),{}),function f6(n,e){const t=arguments.length>=2;return r=>r.pipe(n?_o((i,o)=>n(i,o,r)):Au,g_(1),t?jA(e):BA(()=>new rh))}())}expandSegment(e,t,r,i,o,s){return zt(r).pipe(za(a=>this.expandSegmentAgainstRoute(e,t,r,a,i,o,s).pipe(Oo(c=>{if(c instanceof Xc)return se(null);throw c}))),Wa(a=>!!a),Oo((a,l)=>{if(a instanceof rh||"EmptyError"===a.name){if(CO(t,i,o))return se(new De([],{}));throw new Xc(t)}throw a}))}expandSegmentAgainstRoute(e,t,r,i,o,s,a){return bO(i,t,o,s)?void 0===i.redirectTo?this.matchSegmentAgainstRoute(e,t,i,o,s):a&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(e,t,r,i,o,s):mh(t):mh(t)}expandSegmentAgainstRouteUsingRedirect(e,t,r,i,o,s){return"**"===i.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(e,r,i,s):this.expandRegularSegmentAgainstRouteUsingRedirect(e,t,r,i,o,s)}expandWildCardWithParamsAgainstRouteUsingRedirect(e,t,r,i){const o=this.applyRedirectCommands([],r.redirectTo,{});return r.redirectTo.startsWith("/")?EO(o):this.lineralizeSegments(r,o).pipe(Wt(s=>{const a=new De(s,{});return this.expandSegment(e,a,t,s,i,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(e,t,r,i,o,s){const{matched:a,consumedSegments:l,lastChild:c,positionalParamSegments:u}=hh(t,i,o);if(!a)return mh(t);const d=this.applyRedirectCommands(l,i.redirectTo,u);return i.redirectTo.startsWith("/")?EO(d):this.lineralizeSegments(i,d).pipe(Wt(f=>this.expandSegment(e,t,r,f.concat(o.slice(c)),s,!1)))}matchSegmentAgainstRoute(e,t,r,i,o){if("**"===r.path)return r.loadChildren?(r._loadedConfig?se(r._loadedConfig):this.configLoader.load(e.injector,r)).pipe(be(f=>(r._loadedConfig=f,new De(i,{})))):se(new De(i,{}));const{matched:s,consumedSegments:a,lastChild:l}=hh(t,r,i);if(!s)return mh(t);const c=i.slice(l);return this.getChildConfig(e,r,i).pipe(Wt(d=>{const f=d.module,h=d.routes,{segmentGroup:p,slicedSegments:g}=ph(t,a,c,h),m=new De(p.segments,p.children);if(0===g.length&&m.hasChildren())return this.expandChildren(f,h,m).pipe(be(_=>new De(a,_)));if(0===h.length&&0===g.length)return se(new De(a,{}));const y=gr(r)===o;return this.expandSegment(f,m,h,g,y?me:o,!0).pipe(be(b=>new De(a.concat(b.segments),b.children)))}))}getChildConfig(e,t,r){return t.children?se(new I_(t.children,e)):t.loadChildren?void 0!==t._loadedConfig?se(t._loadedConfig):this.runCanLoadGuards(e.injector,t,r).pipe(Wt(i=>i?this.configLoader.load(e.injector,t).pipe(be(o=>(t._loadedConfig=o,o))):function Cq(n){return new Ne(e=>e.error(v_(`Cannot load children because the guard of the route "path: '${n.path}'" returned false`)))}(t))):se(new I_([],e))}runCanLoadGuards(e,t,r){const i=t.canLoad;if(!i||0===i.length)return se(!0);const o=i.map(s=>{const a=e.get(s);let l;if(function lq(n){return n&&ko(n.canLoad)}(a))l=a.canLoad(t,r);else{if(!ko(a))throw new Error("Invalid CanLoad guard");l=a(t,r)}return yi(l)});return se(o).pipe(Qc(),kn(s=>{if(!bs(s))return;const a=v_(`Redirecting to "${this.urlSerializer.serialize(s)}"`);throw a.url=s,a}),be(s=>!0===s))}lineralizeSegments(e,t){let r=[],i=t.root;for(;;){if(r=r.concat(i.segments),0===i.numberOfChildren)return se(r);if(i.numberOfChildren>1||!i.children[me])return bq(e.redirectTo);i=i.children[me]}}applyRedirectCommands(e,t,r){return this.applyRedirectCreatreUrlTree(t,this.urlSerializer.parse(t),e,r)}applyRedirectCreatreUrlTree(e,t,r,i){const o=this.createSegmentGroup(e,t.root,r,i);return new ys(o,this.createQueryParams(t.queryParams,this.urlTree.queryParams),t.fragment)}createQueryParams(e,t){const r={};return Jt(e,(i,o)=>{if("string"==typeof i&&i.startsWith(":")){const a=i.substring(1);r[o]=t[a]}else r[o]=i}),r}createSegmentGroup(e,t,r,i){const o=this.createSegments(e,t.segments,r,i);let s={};return Jt(t.children,(a,l)=>{s[l]=this.createSegmentGroup(e,a,r,i)}),new De(o,s)}createSegments(e,t,r,i){return t.map(o=>o.path.startsWith(":")?this.findPosParam(e,o,i):this.findOrReturn(o,r))}findPosParam(e,t,r){const i=r[t.path.substring(1)];if(!i)throw new Error(`Cannot redirect to '${e}'. Cannot find '${t.path}'.`);return i}findOrReturn(e,t){let r=0;for(const i of t){if(i.path===e.path)return t.splice(r),i;r++}return e}}function x_(n){const e={};for(const r of Object.keys(n.children)){const o=x_(n.children[r]);(o.segments.length>0||o.hasChildren())&&(e[r]=o)}return function wq(n){if(1===n.numberOfChildren&&n.children[me]){const e=n.children[me];return new De(n.segments.concat(e.segments),e.children)}return n}(new De(n.segments,e))}class wO{constructor(e){this.path=e,this.route=this.path[this.path.length-1]}}class vh{constructor(e,t){this.component=e,this.route=t}}function Mq(n,e,t){const r=n._root;return eu(r,e?e._root:null,t,[r.value])}function yh(n,e,t){const r=function Tq(n){if(!n)return null;for(let e=n.parent;e;e=e.parent){const t=e.routeConfig;if(t&&t._loadedConfig)return t._loadedConfig}return null}(e);return(r?r.module.injector:t).get(n)}function eu(n,e,t,r,i={canDeactivateChecks:[],canActivateChecks:[]}){const o=Ga(e);return n.children.forEach(s=>{(function xq(n,e,t,r,i={canDeactivateChecks:[],canActivateChecks:[]}){const o=n.value,s=e?e.value:null,a=t?t.getContext(n.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){const l=function Aq(n,e,t){if("function"==typeof t)return t(n,e);switch(t){case"pathParamsChange":return!_s(n.url,e.url);case"pathParamsOrQueryParamsChange":return!_s(n.url,e.url)||!vi(n.queryParams,e.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!E_(n,e)||!vi(n.queryParams,e.queryParams);default:return!E_(n,e)}}(s,o,o.routeConfig.runGuardsAndResolvers);l?i.canActivateChecks.push(new wO(r)):(o.data=s.data,o._resolvedData=s._resolvedData),eu(n,e,o.component?a?a.children:null:t,r,i),l&&a&&a.outlet&&a.outlet.isActivated&&i.canDeactivateChecks.push(new vh(a.outlet.component,s))}else s&&tu(e,a,i),i.canActivateChecks.push(new wO(r)),eu(n,null,o.component?a?a.children:null:t,r,i)})(s,o[s.value.outlet],t,r.concat([s.value]),i),delete o[s.value.outlet]}),Jt(o,(s,a)=>tu(s,t.getContext(a),i)),i}function tu(n,e,t){const r=Ga(n),i=n.value;Jt(r,(o,s)=>{tu(o,i.component?e?e.children.getContext(s):null:e,t)}),t.canDeactivateChecks.push(new vh(i.component&&e&&e.outlet&&e.outlet.isActivated?e.outlet.component:null,i))}class jq{}function SO(n){return new Ne(e=>e.error(n))}class Hq{constructor(e,t,r,i,o,s){this.rootComponentType=e,this.config=t,this.urlTree=r,this.url=i,this.paramsInheritanceStrategy=o,this.relativeLinkResolution=s}recognize(){const e=ph(this.urlTree.root,[],[],this.config.filter(s=>void 0===s.redirectTo),this.relativeLinkResolution).segmentGroup,t=this.processSegmentGroup(this.config,e,me);if(null===t)return null;const r=new uh([],Object.freeze({}),Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,{},me,this.rootComponentType,null,this.urlTree.root,-1,{}),i=new Gi(r,t),o=new lO(this.url,i);return this.inheritParamsAndData(o._root),o}inheritParamsAndData(e){const t=e.value,r=aO(t,this.paramsInheritanceStrategy);t.params=Object.freeze(r.params),t.data=Object.freeze(r.data),e.children.forEach(i=>this.inheritParamsAndData(i))}processSegmentGroup(e,t,r){return 0===t.segments.length&&t.hasChildren()?this.processChildren(e,t):this.processSegment(e,t,t.segments,r)}processChildren(e,t){const r=[];for(const o of Object.keys(t.children)){const s=t.children[o],a=yO(e,o),l=this.processSegmentGroup(a,s,o);if(null===l)return null;r.push(...l)}const i=MO(r);return function Uq(n){n.sort((e,t)=>e.value.outlet===me?-1:t.value.outlet===me?1:e.value.outlet.localeCompare(t.value.outlet))}(i),i}processSegment(e,t,r,i){for(const o of e){const s=this.processSegmentAgainstRoute(o,t,r,i);if(null!==s)return s}return CO(t,r,i)?[]:null}processSegmentAgainstRoute(e,t,r,i){if(e.redirectTo||!bO(e,t,r,i))return null;let o,s=[],a=[];if("**"===e.path){const h=r.length>0?qA(r).parameters:{};o=new uh(r,h,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,xO(e),gr(e),e.component,e,IO(t),TO(t)+r.length,AO(e))}else{const h=hh(t,e,r);if(!h.matched)return null;s=h.consumedSegments,a=r.slice(h.lastChild),o=new uh(s,h.parameters,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,xO(e),gr(e),e.component,e,IO(t),TO(t)+s.length,AO(e))}const l=function zq(n){return n.children?n.children:n.loadChildren?n._loadedConfig.routes:[]}(e),{segmentGroup:c,slicedSegments:u}=ph(t,s,a,l.filter(h=>void 0===h.redirectTo),this.relativeLinkResolution);if(0===u.length&&c.hasChildren()){const h=this.processChildren(l,c);return null===h?null:[new Gi(o,h)]}if(0===l.length&&0===u.length)return[new Gi(o,[])];const d=gr(e)===i,f=this.processSegment(l,c,u,d?me:i);return null===f?null:[new Gi(o,f)]}}function Wq(n){const e=n.value.routeConfig;return e&&""===e.path&&void 0===e.redirectTo}function MO(n){const e=[],t=new Set;for(const r of n){if(!Wq(r)){e.push(r);continue}const i=e.find(o=>r.value.routeConfig===o.value.routeConfig);void 0!==i?(i.children.push(...r.children),t.add(i)):e.push(r)}for(const r of t){const i=MO(r.children);e.push(new Gi(r.value,i))}return e.filter(r=>!t.has(r))}function IO(n){let e=n;for(;e._sourceSegment;)e=e._sourceSegment;return e}function TO(n){let e=n,t=e._segmentIndexShift?e._segmentIndexShift:0;for(;e._sourceSegment;)e=e._sourceSegment,t+=e._segmentIndexShift?e._segmentIndexShift:0;return t-1}function xO(n){return n.data||{}}function AO(n){return n.resolve||{}}function OO(n){return[...Object.keys(n),...Object.getOwnPropertySymbols(n)]}function A_(n){return mi(e=>{const t=n(e);return t?zt(t).pipe(be(()=>e)):se(e)})}class Jq extends class Qq{shouldDetach(e){return!1}store(e,t){}shouldAttach(e){return!1}retrieve(e){return null}shouldReuseRoute(e,t){return e.routeConfig===t.routeConfig}}{}const O_=new G("ROUTES");class kO{constructor(e,t,r,i){this.injector=e,this.compiler=t,this.onLoadStartListener=r,this.onLoadEndListener=i}load(e,t){if(t._loader$)return t._loader$;this.onLoadStartListener&&this.onLoadStartListener(t);const i=this.loadModuleFactory(t.loadChildren).pipe(be(o=>{this.onLoadEndListener&&this.onLoadEndListener(t);const s=o.create(e);return new I_(GA(s.injector.get(O_,void 0,ce.Self|ce.Optional)).map(T_),s)}),Oo(o=>{throw t._loader$=void 0,o}));return t._loader$=new Nb(i,()=>new Me).pipe(yp()),t._loader$}loadModuleFactory(e){return yi(e()).pipe(Wt(t=>t instanceof uw?se(t):zt(this.compiler.compileModuleAsync(t))))}}class e9{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,t){return e}}function t9(n){throw n}function n9(n,e,t){return e.parse("/")}function NO(n,e){return se(null)}const r9={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},i9={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let Jn=(()=>{class n{constructor(t,r,i,o,s,a,l){this.rootComponentType=t,this.urlSerializer=r,this.rootContexts=i,this.location=o,this.config=l,this.lastSuccessfulNavigation=null,this.currentNavigation=null,this.disposed=!1,this.navigationId=0,this.currentPageId=0,this.isNgZoneEnabled=!1,this.events=new Me,this.errorHandler=t9,this.malformedUriErrorHandler=n9,this.navigated=!1,this.lastSuccessfulId=-1,this.hooks={beforePreactivation:NO,afterPreactivation:NO},this.urlHandlingStrategy=new e9,this.routeReuseStrategy=new Jq,this.onSameUrlNavigation="ignore",this.paramsInheritanceStrategy="emptyOnly",this.urlUpdateStrategy="deferred",this.relativeLinkResolution="corrected",this.canceledNavigationResolution="replace",this.ngModule=s.get(Pi),this.console=s.get(qw);const d=s.get(ot);this.isNgZoneEnabled=d instanceof ot&&ot.isInAngularZone(),this.resetConfig(l),this.currentUrlTree=function A6(){return new ys(new De([],{}),{},null)}(),this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.configLoader=new kO(s,a,f=>this.triggerEvent(new HA(f)),f=>this.triggerEvent(new UA(f))),this.routerState=sO(this.currentUrlTree,this.rootComponentType),this.transitions=new Vr({id:0,targetPageId:0,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,extractedUrl:this.urlHandlingStrategy.extract(this.currentUrlTree),urlAfterRedirects:this.urlHandlingStrategy.extract(this.currentUrlTree),rawUrl:this.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:"imperative",restoredState:null,currentSnapshot:this.routerState.snapshot,targetSnapshot:null,currentRouterState:this.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.navigations=this.setupNavigations(this.transitions),this.processNavigations()}get browserPageId(){var t;return null===(t=this.location.getState())||void 0===t?void 0:t.\u0275routerPageId}setupNavigations(t){const r=this.events;return t.pipe(_o(i=>0!==i.id),be(i=>Object.assign(Object.assign({},i),{extractedUrl:this.urlHandlingStrategy.extract(i.rawUrl)})),mi(i=>{let o=!1,s=!1;return se(i).pipe(kn(a=>{this.currentNavigation={id:a.id,initialUrl:a.currentRawUrl,extractedUrl:a.extractedUrl,trigger:a.source,extras:a.extras,previousNavigation:this.lastSuccessfulNavigation?Object.assign(Object.assign({},this.lastSuccessfulNavigation),{previousNavigation:null}):null}}),mi(a=>{const l=this.browserUrlTree.toString(),c=!this.navigated||a.extractedUrl.toString()!==l||l!==this.currentUrlTree.toString();if(("reload"===this.onSameUrlNavigation||c)&&this.urlHandlingStrategy.shouldProcessUrl(a.rawUrl))return _h(a.source)&&(this.browserUrlTree=a.extractedUrl),se(a).pipe(mi(d=>{const f=this.transitions.getValue();return r.next(new m_(d.id,this.serializeUrl(d.extractedUrl),d.source,d.restoredState)),f!==this.transitions.getValue()?Ua:Promise.resolve(d)}),function Sq(n,e,t,r){return mi(i=>function Dq(n,e,t,r,i){return new Eq(n,e,t,r,i).apply()}(n,e,t,i.extractedUrl,r).pipe(be(o=>Object.assign(Object.assign({},i),{urlAfterRedirects:o}))))}(this.ngModule.injector,this.configLoader,this.urlSerializer,this.config),kn(d=>{this.currentNavigation=Object.assign(Object.assign({},this.currentNavigation),{finalUrl:d.urlAfterRedirects})}),function $q(n,e,t,r,i){return Wt(o=>function Vq(n,e,t,r,i="emptyOnly",o="legacy"){try{const s=new Hq(n,e,t,r,i,o).recognize();return null===s?SO(new jq):se(s)}catch(s){return SO(s)}}(n,e,o.urlAfterRedirects,t(o.urlAfterRedirects),r,i).pipe(be(s=>Object.assign(Object.assign({},o),{targetSnapshot:s}))))}(this.rootComponentType,this.config,d=>this.serializeUrl(d),this.paramsInheritanceStrategy,this.relativeLinkResolution),kn(d=>{if("eager"===this.urlUpdateStrategy){if(!d.extras.skipLocationChange){const h=this.urlHandlingStrategy.merge(d.urlAfterRedirects,d.rawUrl);this.setBrowserUrl(h,d)}this.browserUrlTree=d.urlAfterRedirects}const f=new v6(d.id,this.serializeUrl(d.extractedUrl),this.serializeUrl(d.urlAfterRedirects),d.targetSnapshot);r.next(f)}));if(c&&this.rawUrlTree&&this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree)){const{id:f,extractedUrl:h,source:p,restoredState:g,extras:m}=a,y=new m_(f,this.serializeUrl(h),p,g);r.next(y);const v=sO(h,this.rootComponentType).snapshot;return se(Object.assign(Object.assign({},a),{targetSnapshot:v,urlAfterRedirects:h,extras:Object.assign(Object.assign({},m),{skipLocationChange:!1,replaceUrl:!1})}))}return this.rawUrlTree=a.rawUrl,a.resolve(null),Ua}),A_(a=>{const{targetSnapshot:l,id:c,extractedUrl:u,rawUrl:d,extras:{skipLocationChange:f,replaceUrl:h}}=a;return this.hooks.beforePreactivation(l,{navigationId:c,appliedUrlTree:u,rawUrlTree:d,skipLocationChange:!!f,replaceUrl:!!h})}),kn(a=>{const l=new y6(a.id,this.serializeUrl(a.extractedUrl),this.serializeUrl(a.urlAfterRedirects),a.targetSnapshot);this.triggerEvent(l)}),be(a=>Object.assign(Object.assign({},a),{guards:Mq(a.targetSnapshot,a.currentSnapshot,this.rootContexts)})),function Oq(n,e){return Wt(t=>{const{targetSnapshot:r,currentSnapshot:i,guards:{canActivateChecks:o,canDeactivateChecks:s}}=t;return 0===s.length&&0===o.length?se(Object.assign(Object.assign({},t),{guardsResult:!0})):function kq(n,e,t,r){return zt(n).pipe(Wt(i=>function Bq(n,e,t,r,i){const o=e&&e.routeConfig?e.routeConfig.canDeactivate:null;return o&&0!==o.length?se(o.map(a=>{const l=yh(a,e,i);let c;if(function dq(n){return n&&ko(n.canDeactivate)}(l))c=yi(l.canDeactivate(n,e,t,r));else{if(!ko(l))throw new Error("Invalid CanDeactivate guard");c=yi(l(n,e,t,r))}return c.pipe(Wa())})).pipe(Qc()):se(!0)}(i.component,i.route,t,e,r)),Wa(i=>!0!==i,!0))}(s,r,i,n).pipe(Wt(a=>a&&function aq(n){return"boolean"==typeof n}(a)?function Nq(n,e,t,r){return zt(e).pipe(za(i=>p_(function Pq(n,e){return null!==n&&e&&e(new D6(n)),se(!0)}(i.route.parent,r),function Rq(n,e){return null!==n&&e&&e(new w6(n)),se(!0)}(i.route,r),function Lq(n,e,t){const r=e[e.length-1],o=e.slice(0,e.length-1).reverse().map(s=>function Iq(n){const e=n.routeConfig?n.routeConfig.canActivateChild:null;return e&&0!==e.length?{node:n,guards:e}:null}(s)).filter(s=>null!==s).map(s=>PA(()=>se(s.guards.map(l=>{const c=yh(l,s.node,t);let u;if(function uq(n){return n&&ko(n.canActivateChild)}(c))u=yi(c.canActivateChild(r,n));else{if(!ko(c))throw new Error("Invalid CanActivateChild guard");u=yi(c(r,n))}return u.pipe(Wa())})).pipe(Qc())));return se(o).pipe(Qc())}(n,i.path,t),function Fq(n,e,t){const r=e.routeConfig?e.routeConfig.canActivate:null;if(!r||0===r.length)return se(!0);const i=r.map(o=>PA(()=>{const s=yh(o,e,t);let a;if(function cq(n){return n&&ko(n.canActivate)}(s))a=yi(s.canActivate(e,n));else{if(!ko(s))throw new Error("Invalid CanActivate guard");a=yi(s(e,n))}return a.pipe(Wa())}));return se(i).pipe(Qc())}(n,i.route,t))),Wa(i=>!0!==i,!0))}(r,o,n,e):se(a)),be(a=>Object.assign(Object.assign({},t),{guardsResult:a})))})}(this.ngModule.injector,a=>this.triggerEvent(a)),kn(a=>{if(bs(a.guardsResult)){const c=v_(`Redirecting to "${this.serializeUrl(a.guardsResult)}"`);throw c.url=a.guardsResult,c}const l=new _6(a.id,this.serializeUrl(a.extractedUrl),this.serializeUrl(a.urlAfterRedirects),a.targetSnapshot,!!a.guardsResult);this.triggerEvent(l)}),_o(a=>!!a.guardsResult||(this.restoreHistory(a),this.cancelNavigationTransition(a,""),!1)),A_(a=>{if(a.guards.canActivateChecks.length)return se(a).pipe(kn(l=>{const c=new b6(l.id,this.serializeUrl(l.extractedUrl),this.serializeUrl(l.urlAfterRedirects),l.targetSnapshot);this.triggerEvent(c)}),mi(l=>{let c=!1;return se(l).pipe(function Gq(n,e){return Wt(t=>{const{targetSnapshot:r,guards:{canActivateChecks:i}}=t;if(!i.length)return se(t);let o=0;return zt(i).pipe(za(s=>function qq(n,e,t,r){return function Kq(n,e,t,r){const i=OO(n);if(0===i.length)return se({});const o={};return zt(i).pipe(Wt(s=>function Zq(n,e,t,r){const i=yh(n,e,r);return yi(i.resolve?i.resolve(e,t):i(e,t))}(n[s],e,t,r).pipe(kn(a=>{o[s]=a}))),g_(1),Wt(()=>OO(o).length===i.length?se(o):Ua))}(n._resolve,n,e,r).pipe(be(o=>(n._resolvedData=o,n.data=Object.assign(Object.assign({},n.data),aO(n,t).resolve),null)))}(s.route,r,n,e)),kn(()=>o++),g_(1),Wt(s=>o===i.length?se(t):Ua))})}(this.paramsInheritanceStrategy,this.ngModule.injector),kn({next:()=>c=!0,complete:()=>{c||(this.restoreHistory(l),this.cancelNavigationTransition(l,"At least one route resolver didn't emit any value."))}}))}),kn(l=>{const c=new C6(l.id,this.serializeUrl(l.extractedUrl),this.serializeUrl(l.urlAfterRedirects),l.targetSnapshot);this.triggerEvent(c)}))}),A_(a=>{const{targetSnapshot:l,id:c,extractedUrl:u,rawUrl:d,extras:{skipLocationChange:f,replaceUrl:h}}=a;return this.hooks.afterPreactivation(l,{navigationId:c,appliedUrlTree:u,rawUrlTree:d,skipLocationChange:!!f,replaceUrl:!!h})}),be(a=>{const l=function K6(n,e,t){const r=Kc(n,e._root,t?t._root:void 0);return new oO(r,e)}(this.routeReuseStrategy,a.targetSnapshot,a.currentRouterState);return Object.assign(Object.assign({},a),{targetRouterState:l})}),kn(a=>{this.currentUrlTree=a.urlAfterRedirects,this.rawUrlTree=this.urlHandlingStrategy.merge(a.urlAfterRedirects,a.rawUrl),this.routerState=a.targetRouterState,"deferred"===this.urlUpdateStrategy&&(a.extras.skipLocationChange||this.setBrowserUrl(this.rawUrlTree,a),this.browserUrlTree=a.urlAfterRedirects)}),((n,e,t)=>be(r=>(new oq(e,r.targetRouterState,r.currentRouterState,t).activate(n),r)))(this.rootContexts,this.routeReuseStrategy,a=>this.triggerEvent(a)),kn({next(){o=!0},complete(){o=!0}}),function h6(n){return e=>e.lift(new p6(n))}(()=>{var a;o||s||this.cancelNavigationTransition(i,`Navigation ID ${i.id} is not equal to the current navigation id ${this.navigationId}`),(null===(a=this.currentNavigation)||void 0===a?void 0:a.id)===i.id&&(this.currentNavigation=null)}),Oo(a=>{if(s=!0,function I6(n){return n&&n[WA]}(a)){const l=bs(a.url);l||(this.navigated=!0,this.restoreHistory(i,!0));const c=new VA(i.id,this.serializeUrl(i.extractedUrl),a.message);r.next(c),l?setTimeout(()=>{const u=this.urlHandlingStrategy.merge(a.url,this.rawUrlTree),d={skipLocationChange:i.extras.skipLocationChange,replaceUrl:"eager"===this.urlUpdateStrategy||_h(i.source)};this.scheduleNavigation(u,"imperative",null,d,{resolve:i.resolve,reject:i.reject,promise:i.promise})},0):i.resolve(!1)}else{this.restoreHistory(i,!0);const l=new m6(i.id,this.serializeUrl(i.extractedUrl),a);r.next(l);try{i.resolve(this.errorHandler(a))}catch(c){i.reject(c)}}return Ua}))}))}resetRootComponentType(t){this.rootComponentType=t,this.routerState.root.component=this.rootComponentType}setTransition(t){this.transitions.next(Object.assign(Object.assign({},this.transitions.value),t))}initialNavigation(){this.setUpLocationChangeListener(),0===this.navigationId&&this.navigateByUrl(this.location.path(!0),{replaceUrl:!0})}setUpLocationChangeListener(){this.locationSubscription||(this.locationSubscription=this.location.subscribe(t=>{const r="popstate"===t.type?"popstate":"hashchange";"popstate"===r&&setTimeout(()=>{var i;const o={replaceUrl:!0},s=(null===(i=t.state)||void 0===i?void 0:i.navigationId)?t.state:null;if(s){const l=Object.assign({},s);delete l.navigationId,delete l.\u0275routerPageId,0!==Object.keys(l).length&&(o.state=l)}const a=this.parseUrl(t.url);this.scheduleNavigation(a,r,s,o)},0)}))}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.currentNavigation}triggerEvent(t){this.events.next(t)}resetConfig(t){vO(t),this.config=t.map(T_),this.navigated=!1,this.lastSuccessfulId=-1}ngOnDestroy(){this.dispose()}dispose(){this.transitions.complete(),this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0),this.disposed=!0}createUrlTree(t,r={}){const{relativeTo:i,queryParams:o,fragment:s,queryParamsHandling:a,preserveFragment:l}=r,c=i||this.routerState.root,u=l?this.currentUrlTree.fragment:s;let d=null;switch(a){case"merge":d=Object.assign(Object.assign({},this.currentUrlTree.queryParams),o);break;case"preserve":d=this.currentUrlTree.queryParams;break;default:d=o||null}return null!==d&&(d=this.removeEmptyProps(d)),function Q6(n,e,t,r,i){if(0===t.length)return w_(e.root,e.root,e,r,i);const o=function J6(n){if("string"==typeof n[0]&&1===n.length&&"/"===n[0])return new dO(!0,0,n);let e=0,t=!1;const r=n.reduce((i,o,s)=>{if("object"==typeof o&&null!=o){if(o.outlets){const a={};return Jt(o.outlets,(l,c)=>{a[c]="string"==typeof l?l.split("/"):l}),[...i,{outlets:a}]}if(o.segmentPath)return[...i,o.segmentPath]}return"string"!=typeof o?[...i,o]:0===s?(o.split("/").forEach((a,l)=>{0==l&&"."===a||(0==l&&""===a?t=!0:".."===a?e++:""!=a&&i.push(a))}),i):[...i,o]},[]);return new dO(t,e,r)}(t);if(o.toRoot())return w_(e.root,new De([],{}),e,r,i);const s=function X6(n,e,t){if(n.isAbsolute)return new S_(e.root,!0,0);if(-1===t.snapshot._lastPathIndex){const o=t.snapshot._urlSegment;return new S_(o,o===e.root,0)}const r=dh(n.commands[0])?0:1;return function eq(n,e,t){let r=n,i=e,o=t;for(;o>i;){if(o-=i,r=r.parent,!r)throw new Error("Invalid number of '../'");i=r.segments.length}return new S_(r,!1,i-o)}(t.snapshot._urlSegment,t.snapshot._lastPathIndex+r,n.numberOfDoubleDots)}(o,e,n),a=s.processChildren?fh(s.segmentGroup,s.index,o.commands):fO(s.segmentGroup,s.index,o.commands);return w_(s.segmentGroup,a,e,r,i)}(c,this.currentUrlTree,t,d,null!=u?u:null)}navigateByUrl(t,r={skipLocationChange:!1}){const i=bs(t)?t:this.parseUrl(t),o=this.urlHandlingStrategy.merge(i,this.rawUrlTree);return this.scheduleNavigation(o,"imperative",null,r)}navigate(t,r={skipLocationChange:!1}){return function o9(n){for(let e=0;e{const o=t[i];return null!=o&&(r[i]=o),r},{})}processNavigations(){this.navigations.subscribe(t=>{this.navigated=!0,this.lastSuccessfulId=t.id,this.currentPageId=t.targetPageId,this.events.next(new $c(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(this.currentUrlTree))),this.lastSuccessfulNavigation=this.currentNavigation,t.resolve(!0)},t=>{this.console.warn(`Unhandled Navigation Error: ${t}`)})}scheduleNavigation(t,r,i,o,s){var a,l,c;if(this.disposed)return Promise.resolve(!1);const u=this.transitions.value,d=_h(r)&&u&&!_h(u.source),f=u.rawUrl.toString()===t.toString(),h=u.id===(null===(a=this.currentNavigation)||void 0===a?void 0:a.id);if(d&&f&&h)return Promise.resolve(!0);let g,m,y;s?(g=s.resolve,m=s.reject,y=s.promise):y=new Promise((_,C)=>{g=_,m=C});const v=++this.navigationId;let b;return"computed"===this.canceledNavigationResolution?(0===this.currentPageId&&(i=this.location.getState()),b=i&&i.\u0275routerPageId?i.\u0275routerPageId:o.replaceUrl||o.skipLocationChange?null!==(l=this.browserPageId)&&void 0!==l?l:0:(null!==(c=this.browserPageId)&&void 0!==c?c:0)+1):b=0,this.setTransition({id:v,targetPageId:b,source:r,restoredState:i,currentUrlTree:this.currentUrlTree,currentRawUrl:this.rawUrlTree,rawUrl:t,extras:o,resolve:g,reject:m,promise:y,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),y.catch(_=>Promise.reject(_))}setBrowserUrl(t,r){const i=this.urlSerializer.serialize(t),o=Object.assign(Object.assign({},r.extras.state),this.generateNgRouterState(r.id,r.targetPageId));this.location.isCurrentPathEqualTo(i)||r.extras.replaceUrl?this.location.replaceState(i,"",o):this.location.go(i,"",o)}restoreHistory(t,r=!1){var i,o;if("computed"===this.canceledNavigationResolution){const s=this.currentPageId-t.targetPageId;"popstate"!==t.source&&"eager"!==this.urlUpdateStrategy&&this.currentUrlTree!==(null===(i=this.currentNavigation)||void 0===i?void 0:i.finalUrl)||0===s?this.currentUrlTree===(null===(o=this.currentNavigation)||void 0===o?void 0:o.finalUrl)&&0===s&&(this.resetState(t),this.browserUrlTree=t.currentUrlTree,this.resetUrlToCurrentUrlTree()):this.location.historyGo(s)}else"replace"===this.canceledNavigationResolution&&(r&&this.resetState(t),this.resetUrlToCurrentUrlTree())}resetState(t){this.routerState=t.currentRouterState,this.currentUrlTree=t.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,t.rawUrl)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}cancelNavigationTransition(t,r){const i=new VA(t.id,this.serializeUrl(t.extractedUrl),r);this.triggerEvent(i),t.resolve(!1)}generateNgRouterState(t,r){return"computed"===this.canceledNavigationResolution?{navigationId:t,\u0275routerPageId:r}:{navigationId:t}}}return n.\u0275fac=function(t){sm()},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})();function _h(n){return"imperative"!==n}class RO{}class PO{preload(e,t){return se(null)}}let FO=(()=>{class n{constructor(t,r,i,o){this.router=t,this.injector=i,this.preloadingStrategy=o,this.loader=new kO(i,r,l=>t.triggerEvent(new HA(l)),l=>t.triggerEvent(new UA(l)))}setUpPreloading(){this.subscription=this.router.events.pipe(_o(t=>t instanceof $c),za(()=>this.preload())).subscribe(()=>{})}preload(){const t=this.injector.get(Pi);return this.processRoutes(t,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(t,r){const i=[];for(const o of r)if(o.loadChildren&&!o.canLoad&&o._loadedConfig){const s=o._loadedConfig;i.push(this.processRoutes(s.module,s.routes))}else o.loadChildren&&!o.canLoad?i.push(this.preloadConfig(t,o)):o.children&&i.push(this.processRoutes(t,o.children));return zt(i).pipe(yl(),be(o=>{}))}preloadConfig(t,r){return this.preloadingStrategy.preload(r,()=>(r._loadedConfig?se(r._loadedConfig):this.loader.load(t.injector,r)).pipe(Wt(o=>(r._loadedConfig=o,this.processRoutes(o.module,o.routes)))))}}return n.\u0275fac=function(t){return new(t||n)(R(Jn),R(Rd),R(yt),R(RO))},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})(),R_=(()=>{class n{constructor(t,r,i={}){this.router=t,this.viewportScroller=r,this.options=i,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},i.scrollPositionRestoration=i.scrollPositionRestoration||"disabled",i.anchorScrolling=i.anchorScrolling||"disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.router.events.subscribe(t=>{t instanceof m_?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=t.navigationTrigger,this.restoredId=t.restoredState?t.restoredState.navigationId:0):t instanceof $c&&(this.lastId=t.id,this.scheduleScrollEvent(t,this.router.parseUrl(t.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.router.events.subscribe(t=>{t instanceof zA&&(t.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(t.position):t.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(t.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(t,r){this.router.triggerEvent(new zA(t,"popstate"===this.lastSource?this.store[this.restoredId]:null,r))}ngOnDestroy(){this.routerEventsSubscription&&this.routerEventsSubscription.unsubscribe(),this.scrollEventsSubscription&&this.scrollEventsSubscription.unsubscribe()}}return n.\u0275fac=function(t){sm()},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})();const Cs=new G("ROUTER_CONFIGURATION"),LO=new G("ROUTER_FORROOT_GUARD"),c9=[Km,{provide:XA,useClass:eO},{provide:Jn,useFactory:function p9(n,e,t,r,i,o,s={},a,l){const c=new Jn(null,n,e,t,r,i,GA(o));return a&&(c.urlHandlingStrategy=a),l&&(c.routeReuseStrategy=l),function g9(n,e){n.errorHandler&&(e.errorHandler=n.errorHandler),n.malformedUriErrorHandler&&(e.malformedUriErrorHandler=n.malformedUriErrorHandler),n.onSameUrlNavigation&&(e.onSameUrlNavigation=n.onSameUrlNavigation),n.paramsInheritanceStrategy&&(e.paramsInheritanceStrategy=n.paramsInheritanceStrategy),n.relativeLinkResolution&&(e.relativeLinkResolution=n.relativeLinkResolution),n.urlUpdateStrategy&&(e.urlUpdateStrategy=n.urlUpdateStrategy),n.canceledNavigationResolution&&(e.canceledNavigationResolution=n.canceledNavigationResolution)}(s,c),s.enableTracing&&c.events.subscribe(u=>{var d,f;null===(d=console.group)||void 0===d||d.call(console,`Router Event: ${u.constructor.name}`),console.log(u.toString()),console.log(u),null===(f=console.groupEnd)||void 0===f||f.call(console)}),c},deps:[XA,Jc,Km,yt,Rd,O_,Cs,[class Xq{},new Yr],[class Yq{},new Yr]]},Jc,{provide:qa,useFactory:function m9(n){return n.routerState.root},deps:[Jn]},FO,PO,class l9{preload(e,t){return t().pipe(Oo(()=>se(null)))}},{provide:Cs,useValue:{enableTracing:!1}}];function u9(){return new Xw("Router",Jn)}let BO=(()=>{class n{constructor(t,r){}static forRoot(t,r){return{ngModule:n,providers:[c9,jO(t),{provide:LO,useFactory:h9,deps:[[Jn,new Yr,new Ks]]},{provide:Cs,useValue:r||{}},{provide:Ma,useFactory:f9,deps:[ns,[new qs(qm),new Yr],Cs]},{provide:R_,useFactory:d9,deps:[Jn,VH,Cs]},{provide:RO,useExisting:r&&r.preloadingStrategy?r.preloadingStrategy:PO},{provide:Xw,multi:!0,useFactory:u9},[P_,{provide:Nd,multi:!0,useFactory:v9,deps:[P_]},{provide:VO,useFactory:y9,deps:[P_]},{provide:Gw,multi:!0,useExisting:VO}]]}}static forChild(t){return{ngModule:n,providers:[jO(t)]}}}return n.\u0275fac=function(t){return new(t||n)(R(LO,8),R(Jn,8))},n.\u0275mod=ut({type:n}),n.\u0275inj=at({}),n})();function d9(n,e,t){return t.scrollOffset&&e.setOffset(t.scrollOffset),new R_(n,e,t)}function f9(n,e,t={}){return t.useHash?new M2(n,e):new _S(n,e)}function h9(n){return"guarded"}function jO(n){return[{provide:lR,multi:!0,useValue:n},{provide:O_,multi:!0,useValue:n}]}let P_=(()=>{class n{constructor(t){this.injector=t,this.initNavigation=!1,this.destroyed=!1,this.resultOfPreactivationDone=new Me}appInitializer(){return this.injector.get(E2,Promise.resolve(null)).then(()=>{if(this.destroyed)return Promise.resolve(!0);let r=null;const i=new Promise(a=>r=a),o=this.injector.get(Jn),s=this.injector.get(Cs);return"disabled"===s.initialNavigation?(o.setUpLocationChangeListener(),r(!0)):"enabled"===s.initialNavigation||"enabledBlocking"===s.initialNavigation?(o.hooks.afterPreactivation=()=>this.initNavigation?se(null):(this.initNavigation=!0,r(!0),this.resultOfPreactivationDone),o.initialNavigation()):r(!0),i})}bootstrapListener(t){const r=this.injector.get(Cs),i=this.injector.get(FO),o=this.injector.get(R_),s=this.injector.get(Jn),a=this.injector.get(Xo);t===a.components[0]&&(("enabledNonBlocking"===r.initialNavigation||void 0===r.initialNavigation)&&s.initialNavigation(),i.setUpPreloading(),o.init(),s.resetRootComponentType(a.componentTypes[0]),this.resultOfPreactivationDone.next(null),this.resultOfPreactivationDone.complete())}ngOnDestroy(){this.destroyed=!0}}return n.\u0275fac=function(t){return new(t||n)(R(yt))},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})();function v9(n){return n.appInitializer.bind(n)}function y9(n){return n.bootstrapListener.bind(n)}const VO=new G("Router Initializer");let HO=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=ut({type:n}),n.\u0275inj=at({imports:[[Pr]]}),n})(),z9=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=ut({type:n}),n.\u0275inj=at({imports:[[Pr,BO,pf,HO],BO,HO]}),n})();function W9(n,e){1&n&&bn(0)}function $9(n,e){if(1&n&&(H(0,"div",8),Ni(1,1),q(2,W9,1,0,"ng-container",6),W()),2&n){const t=U();N(2),k("ngTemplateOutlet",t.headerTemplate)}}function G9(n,e){1&n&&bn(0)}function q9(n,e){if(1&n&&(H(0,"div",9),Ye(1),q(2,G9,1,0,"ng-container",6),W()),2&n){const t=U();N(1),uo(" ",t.header," "),N(1),k("ngTemplateOutlet",t.titleTemplate)}}function K9(n,e){1&n&&bn(0)}function Z9(n,e){if(1&n&&(H(0,"div",10),Ye(1),q(2,K9,1,0,"ng-container",6),W()),2&n){const t=U();N(1),uo(" ",t.subheader," "),N(1),k("ngTemplateOutlet",t.subtitleTemplate)}}function Y9(n,e){1&n&&bn(0)}function Q9(n,e){1&n&&bn(0)}function J9(n,e){if(1&n&&(H(0,"div",11),Ni(1,2),q(2,Q9,1,0,"ng-container",6),W()),2&n){const t=U();N(2),k("ngTemplateOutlet",t.footerTemplate)}}const X9=["*",[["p-header"]],[["p-footer"]]],e7=["*","p-header","p-footer"];let t7=(()=>{class n{constructor(t){this.el=t}ngAfterContentInit(){this.templates.forEach(t=>{switch(t.getType()){case"header":this.headerTemplate=t.template;break;case"title":this.titleTemplate=t.template;break;case"subtitle":this.subtitleTemplate=t.template;break;case"content":default:this.contentTemplate=t.template;break;case"footer":this.footerTemplate=t.template}})}getBlockableElement(){return this.el.nativeElement.children[0]}}return n.\u0275fac=function(t){return new(t||n)(w(_t))},n.\u0275cmp=Et({type:n,selectors:[["p-card"]],contentQueries:function(t,r,i){if(1&t&&(ai(i,lI,5),ai(i,cI,5),ai(i,jv,4)),2&t){let o;qn(o=Kn())&&(r.headerFacet=o.first),qn(o=Kn())&&(r.footerFacet=o.first),qn(o=Kn())&&(r.templates=o)}},hostAttrs:[1,"p-element"],inputs:{header:"header",subheader:"subheader",style:"style",styleClass:"styleClass"},ngContentSelectors:e7,decls:9,vars:9,consts:[[3,"ngClass","ngStyle"],["class","p-card-header",4,"ngIf"],[1,"p-card-body"],["class","p-card-title",4,"ngIf"],["class","p-card-subtitle",4,"ngIf"],[1,"p-card-content"],[4,"ngTemplateOutlet"],["class","p-card-footer",4,"ngIf"],[1,"p-card-header"],[1,"p-card-title"],[1,"p-card-subtitle"],[1,"p-card-footer"]],template:function(t,r){1&t&&(ma(X9),H(0,"div",0),q(1,$9,3,1,"div",1),H(2,"div",2),q(3,q9,3,2,"div",3),q(4,Z9,3,2,"div",4),H(5,"div",5),Ni(6),q(7,Y9,1,0,"ng-container",6),W(),q(8,J9,3,1,"div",7),W()()),2&t&&(_d(r.styleClass),k("ngClass","p-card p-component")("ngStyle",r.style),N(1),k("ngIf",r.headerFacet||r.headerTemplate),N(2),k("ngIf",r.header||r.titleTemplate),N(1),k("ngIf",r.subheader||r.subtitleTemplate),N(3),k("ngTemplateOutlet",r.contentTemplate),N(1),k("ngIf",r.footerFacet||r.footerTemplate))},directives:[uc,ov,ho,sv],styles:[".p-card-header img{width:100%}\n"],encapsulation:2,changeDetection:0}),n})(),n7=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=ut({type:n}),n.\u0275inj=at({imports:[[Pr],vc]}),n})();function bh(...n){const e=n.length;if(0===e)throw new Error("list of properties cannot be empty.");return t=>be(function r7(n,e){return r=>{let i=r;for(let o=0;o{this.headers=new Map,e.split("\n").forEach(t=>{const r=t.indexOf(":");if(r>0){const i=t.slice(0,r),o=i.toLowerCase(),s=t.slice(r+1).trim();this.maybeSetNormalizedName(i,o),this.headers.has(o)?this.headers.get(o).push(s):this.headers.set(o,[s])}})}:()=>{this.headers=new Map,Object.keys(e).forEach(t=>{let r=e[t];const i=t.toLowerCase();"string"==typeof r&&(r=[r]),r.length>0&&(this.headers.set(i,r),this.maybeSetNormalizedName(t,i))})}:this.headers=new Map}has(e){return this.init(),this.headers.has(e.toLowerCase())}get(e){this.init();const t=this.headers.get(e.toLowerCase());return t&&t.length>0?t[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(e){return this.init(),this.headers.get(e.toLowerCase())||null}append(e,t){return this.clone({name:e,value:t,op:"a"})}set(e,t){return this.clone({name:e,value:t,op:"s"})}delete(e,t){return this.clone({name:e,value:t,op:"d"})}maybeSetNormalizedName(e,t){this.normalizedNames.has(t)||this.normalizedNames.set(t,e)}init(){this.lazyInit&&(this.lazyInit instanceof Hr?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(e=>this.applyUpdate(e)),this.lazyUpdate=null))}copyFrom(e){e.init(),Array.from(e.headers.keys()).forEach(t=>{this.headers.set(t,e.headers.get(t)),this.normalizedNames.set(t,e.normalizedNames.get(t))})}clone(e){const t=new Hr;return t.lazyInit=this.lazyInit&&this.lazyInit instanceof Hr?this.lazyInit:this,t.lazyUpdate=(this.lazyUpdate||[]).concat([e]),t}applyUpdate(e){const t=e.name.toLowerCase();switch(e.op){case"a":case"s":let r=e.value;if("string"==typeof r&&(r=[r]),0===r.length)return;this.maybeSetNormalizedName(e.name,t);const i=("a"===e.op?this.headers.get(t):void 0)||[];i.push(...r),this.headers.set(t,i);break;case"d":const o=e.value;if(o){let s=this.headers.get(t);if(!s)return;s=s.filter(a=>-1===o.indexOf(a)),0===s.length?(this.headers.delete(t),this.normalizedNames.delete(t)):this.headers.set(t,s)}else this.headers.delete(t),this.normalizedNames.delete(t)}}forEach(e){this.init(),Array.from(this.normalizedNames.keys()).forEach(t=>e(this.normalizedNames.get(t),this.headers.get(t)))}}class i7{encodeKey(e){return $O(e)}encodeValue(e){return $O(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}}const s7=/%(\d[a-f0-9])/gi,a7={40:"@","3A":":",24:"$","2C":",","3B":";","2B":"+","3D":"=","3F":"?","2F":"/"};function $O(n){return encodeURIComponent(n).replace(s7,(e,t)=>{var r;return null!==(r=a7[t])&&void 0!==r?r:e})}function GO(n){return`${n}`}class No{constructor(e={}){if(this.updates=null,this.cloneFrom=null,this.encoder=e.encoder||new i7,e.fromString){if(e.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function o7(n,e){const t=new Map;return n.length>0&&n.replace(/^\?/,"").split("&").forEach(i=>{const o=i.indexOf("="),[s,a]=-1==o?[e.decodeKey(i),""]:[e.decodeKey(i.slice(0,o)),e.decodeValue(i.slice(o+1))],l=t.get(s)||[];l.push(a),t.set(s,l)}),t}(e.fromString,this.encoder)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach(t=>{const r=e.fromObject[t];this.map.set(t,Array.isArray(r)?r:[r])})):this.map=null}has(e){return this.init(),this.map.has(e)}get(e){this.init();const t=this.map.get(e);return t?t[0]:null}getAll(e){return this.init(),this.map.get(e)||null}keys(){return this.init(),Array.from(this.map.keys())}append(e,t){return this.clone({param:e,value:t,op:"a"})}appendAll(e){const t=[];return Object.keys(e).forEach(r=>{const i=e[r];Array.isArray(i)?i.forEach(o=>{t.push({param:r,value:o,op:"a"})}):t.push({param:r,value:i,op:"a"})}),this.clone(t)}set(e,t){return this.clone({param:e,value:t,op:"s"})}delete(e,t){return this.clone({param:e,value:t,op:"d"})}toString(){return this.init(),this.keys().map(e=>{const t=this.encoder.encodeKey(e);return this.map.get(e).map(r=>t+"="+this.encoder.encodeValue(r)).join("&")}).filter(e=>""!==e).join("&")}clone(e){const t=new No({encoder:this.encoder});return t.cloneFrom=this.cloneFrom||this,t.updates=(this.updates||[]).concat(e),t}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(e=>this.map.set(e,this.cloneFrom.map.get(e))),this.updates.forEach(e=>{switch(e.op){case"a":case"s":const t=("a"===e.op?this.map.get(e.param):void 0)||[];t.push(GO(e.value)),this.map.set(e.param,t);break;case"d":if(void 0===e.value){this.map.delete(e.param);break}{let r=this.map.get(e.param)||[];const i=r.indexOf(GO(e.value));-1!==i&&r.splice(i,1),r.length>0?this.map.set(e.param,r):this.map.delete(e.param)}}}),this.cloneFrom=this.updates=null)}}class l7{constructor(){this.map=new Map}set(e,t){return this.map.set(e,t),this}get(e){return this.map.has(e)||this.map.set(e,e.defaultValue()),this.map.get(e)}delete(e){return this.map.delete(e),this}has(e){return this.map.has(e)}keys(){return this.map.keys()}}function qO(n){return"undefined"!=typeof ArrayBuffer&&n instanceof ArrayBuffer}function KO(n){return"undefined"!=typeof Blob&&n instanceof Blob}function ZO(n){return"undefined"!=typeof FormData&&n instanceof FormData}class nu{constructor(e,t,r,i){let o;if(this.url=t,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=e.toUpperCase(),function c7(n){switch(n){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||i?(this.body=void 0!==r?r:null,o=i):o=r,o&&(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params)),this.headers||(this.headers=new Hr),this.context||(this.context=new l7),this.params){const s=this.params.toString();if(0===s.length)this.urlWithParams=t;else{const a=t.indexOf("?");this.urlWithParams=t+(-1===a?"?":af.set(h,e.setHeaders[h]),c)),e.setParams&&(u=Object.keys(e.setParams).reduce((f,h)=>f.set(h,e.setParams[h]),u)),new nu(r,i,s,{params:u,headers:c,context:d,reportProgress:l,responseType:o,withCredentials:a})}}var At=(()=>((At=At||{})[At.Sent=0]="Sent",At[At.UploadProgress=1]="UploadProgress",At[At.ResponseHeader=2]="ResponseHeader",At[At.DownloadProgress=3]="DownloadProgress",At[At.Response=4]="Response",At[At.User=5]="User",At))();class F_{constructor(e,t=200,r="OK"){this.headers=e.headers||new Hr,this.status=void 0!==e.status?e.status:t,this.statusText=e.statusText||r,this.url=e.url||null,this.ok=this.status>=200&&this.status<300}}class L_ extends F_{constructor(e={}){super(e),this.type=At.ResponseHeader}clone(e={}){return new L_({headers:e.headers||this.headers,status:void 0!==e.status?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}}class Ch extends F_{constructor(e={}){super(e),this.type=At.Response,this.body=void 0!==e.body?e.body:null}clone(e={}){return new Ch({body:void 0!==e.body?e.body:this.body,headers:e.headers||this.headers,status:void 0!==e.status?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}}class YO extends F_{constructor(e){super(e,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?`Http failure during parsing for ${e.url||"(unknown url)"}`:`Http failure response for ${e.url||"(unknown url)"}: ${e.status} ${e.statusText}`,this.error=e.error||null}}function B_(n,e){return{body:e,headers:n.headers,context:n.context,observe:n.observe,params:n.params,reportProgress:n.reportProgress,responseType:n.responseType,withCredentials:n.withCredentials}}let Dh=(()=>{class n{constructor(t){this.handler=t}request(t,r,i={}){let o;if(t instanceof nu)o=t;else{let l,c;l=i.headers instanceof Hr?i.headers:new Hr(i.headers),i.params&&(c=i.params instanceof No?i.params:new No({fromObject:i.params})),o=new nu(t,r,void 0!==i.body?i.body:null,{headers:l,context:i.context,params:c,reportProgress:i.reportProgress,responseType:i.responseType||"json",withCredentials:i.withCredentials})}const s=se(o).pipe(za(l=>this.handler.handle(l)));if(t instanceof nu||"events"===i.observe)return s;const a=s.pipe(_o(l=>l instanceof Ch));switch(i.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return a.pipe(be(l=>{if(null!==l.body&&!(l.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return l.body}));case"blob":return a.pipe(be(l=>{if(null!==l.body&&!(l.body instanceof Blob))throw new Error("Response is not a Blob.");return l.body}));case"text":return a.pipe(be(l=>{if(null!==l.body&&"string"!=typeof l.body)throw new Error("Response is not a string.");return l.body}));default:return a.pipe(be(l=>l.body))}case"response":return a;default:throw new Error(`Unreachable: unhandled observe type ${i.observe}}`)}}delete(t,r={}){return this.request("DELETE",t,r)}get(t,r={}){return this.request("GET",t,r)}head(t,r={}){return this.request("HEAD",t,r)}jsonp(t,r){return this.request("JSONP",t,{params:(new No).append(r,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,r={}){return this.request("OPTIONS",t,r)}patch(t,r,i={}){return this.request("PATCH",t,B_(i,r))}post(t,r,i={}){return this.request("POST",t,B_(i,r))}put(t,r,i={}){return this.request("PUT",t,B_(i,r))}}return n.\u0275fac=function(t){return new(t||n)(R(zO))},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})();class QO{constructor(e,t){this.next=e,this.interceptor=t}handle(e){return this.interceptor.intercept(e,this.next)}}const JO=new G("HTTP_INTERCEPTORS");let d7=(()=>{class n{intercept(t,r){return r.handle(t)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})();const f7=/^\)\]\}',?\n/;let XO=(()=>{class n{constructor(t){this.xhrFactory=t}handle(t){if("JSONP"===t.method)throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");return new Ne(r=>{const i=this.xhrFactory.build();if(i.open(t.method,t.urlWithParams),t.withCredentials&&(i.withCredentials=!0),t.headers.forEach((h,p)=>i.setRequestHeader(h,p.join(","))),t.headers.has("Accept")||i.setRequestHeader("Accept","application/json, text/plain, */*"),!t.headers.has("Content-Type")){const h=t.detectContentTypeHeader();null!==h&&i.setRequestHeader("Content-Type",h)}if(t.responseType){const h=t.responseType.toLowerCase();i.responseType="json"!==h?h:"text"}const o=t.serializeBody();let s=null;const a=()=>{if(null!==s)return s;const h=i.statusText||"OK",p=new Hr(i.getAllResponseHeaders()),g=function h7(n){return"responseURL"in n&&n.responseURL?n.responseURL:/^X-Request-URL:/m.test(n.getAllResponseHeaders())?n.getResponseHeader("X-Request-URL"):null}(i)||t.url;return s=new L_({headers:p,status:i.status,statusText:h,url:g}),s},l=()=>{let{headers:h,status:p,statusText:g,url:m}=a(),y=null;204!==p&&(y=void 0===i.response?i.responseText:i.response),0===p&&(p=y?200:0);let v=p>=200&&p<300;if("json"===t.responseType&&"string"==typeof y){const b=y;y=y.replace(f7,"");try{y=""!==y?JSON.parse(y):null}catch(_){y=b,v&&(v=!1,y={error:_,text:y})}}v?(r.next(new Ch({body:y,headers:h,status:p,statusText:g,url:m||void 0})),r.complete()):r.error(new YO({error:y,headers:h,status:p,statusText:g,url:m||void 0}))},c=h=>{const{url:p}=a(),g=new YO({error:h,status:i.status||0,statusText:i.statusText||"Unknown Error",url:p||void 0});r.error(g)};let u=!1;const d=h=>{u||(r.next(a()),u=!0);let p={type:At.DownloadProgress,loaded:h.loaded};h.lengthComputable&&(p.total=h.total),"text"===t.responseType&&!!i.responseText&&(p.partialText=i.responseText),r.next(p)},f=h=>{let p={type:At.UploadProgress,loaded:h.loaded};h.lengthComputable&&(p.total=h.total),r.next(p)};return i.addEventListener("load",l),i.addEventListener("error",c),i.addEventListener("timeout",c),i.addEventListener("abort",c),t.reportProgress&&(i.addEventListener("progress",d),null!==o&&i.upload&&i.upload.addEventListener("progress",f)),i.send(o),r.next({type:At.Sent}),()=>{i.removeEventListener("error",c),i.removeEventListener("abort",c),i.removeEventListener("load",l),i.removeEventListener("timeout",c),t.reportProgress&&(i.removeEventListener("progress",d),null!==o&&i.upload&&i.upload.removeEventListener("progress",f)),i.readyState!==i.DONE&&i.abort()}})}}return n.\u0275fac=function(t){return new(t||n)(R(BS))},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})();const j_=new G("XSRF_COOKIE_NAME"),V_=new G("XSRF_HEADER_NAME");class ek{}let p7=(()=>{class n{constructor(t,r,i){this.doc=t,this.platform=r,this.cookieName=i,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=xS(t,this.cookieName),this.lastCookieString=t),this.lastToken}}return n.\u0275fac=function(t){return new(t||n)(R(Vt),R(sc),R(j_))},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})(),H_=(()=>{class n{constructor(t,r){this.tokenService=t,this.headerName=r}intercept(t,r){const i=t.url.toLowerCase();if("GET"===t.method||"HEAD"===t.method||i.startsWith("http://")||i.startsWith("https://"))return r.handle(t);const o=this.tokenService.getToken();return null!==o&&!t.headers.has(this.headerName)&&(t=t.clone({headers:t.headers.set(this.headerName,o)})),r.handle(t)}}return n.\u0275fac=function(t){return new(t||n)(R(ek),R(V_))},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})(),g7=(()=>{class n{constructor(t,r){this.backend=t,this.injector=r,this.chain=null}handle(t){if(null===this.chain){const r=this.injector.get(JO,[]);this.chain=r.reduceRight((i,o)=>new QO(i,o),this.backend)}return this.chain.handle(t)}}return n.\u0275fac=function(t){return new(t||n)(R(WO),R(yt))},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})(),m7=(()=>{class n{static disable(){return{ngModule:n,providers:[{provide:H_,useClass:d7}]}}static withOptions(t={}){return{ngModule:n,providers:[t.cookieName?{provide:j_,useValue:t.cookieName}:[],t.headerName?{provide:V_,useValue:t.headerName}:[]]}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=ut({type:n}),n.\u0275inj=at({providers:[H_,{provide:JO,useExisting:H_,multi:!0},{provide:ek,useClass:p7},{provide:j_,useValue:"XSRF-TOKEN"},{provide:V_,useValue:"X-XSRF-TOKEN"}]}),n})(),v7=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=ut({type:n}),n.\u0275inj=at({providers:[Dh,{provide:zO,useClass:g7},XO,{provide:WO,useExisting:XO}],imports:[[m7.withOptions({cookieName:"XSRF-TOKEN",headerName:"X-XSRF-TOKEN"})]]}),n})(),tk=(()=>{class n{constructor(t){this.http=t}get defaultHeaders(){const t=new Hr;return t.set("Accept","*/*").set("Content-Type","application/json"),t}getContentTypes(t="",r=""){return this.http.post("/api/v1/contenttype/_filter",{filter:{types:r,query:t},orderBy:"name",direction:"ASC",perPage:40}).pipe(bh("entity"))}getContentlets({contentType:t,filter:r,currentLanguage:i}){return this.http.post("/api/content/_search",{query:`+contentType:${t} +languageId:${i} +deleted:false +working:true +catchall:${r}* title:'${r}'^15`,sort:"modDate desc",offset:0,limit:40}).pipe(bh("entity","jsonObjectView","contentlets"))}}return n.\u0275fac=function(t){return new(t||n)(R(Dh))},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})();class _7{getQueryParams(){const e=window.location.search.substring(1).split("&"),t=new Map;return e.forEach(r=>{const i=r.split("=");t.set(i[0],i[1])}),t}getQueryStringParam(e){let t=null;const i=new RegExp("[?&]"+e.replace(/[\[\]]/g,"\\$&")+"(=([^&#]*)|&|#|$)").exec(window.location.href);return i&&i[2]&&(t=decodeURIComponent(i[2].replace(/\+/g," "))),t}}let nk=(()=>{class n{getLine(t,r){let i=null;if(t){const o=t.split("\n");i=o&&o.length>r?o[r]:null}return i}camelize(t){return t.replace(/(?:^\w|[A-Z]|\b\w)/g,(r,i)=>0===i?r.toLowerCase():r.toUpperCase()).replace(/\s+/g,"")}titleCase(t){return`${t.charAt(0).toLocaleUpperCase()}${t.slice(1)}`}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})(),C7=(()=>{class n{constructor(t){this.stringUtils=t,this.showLogs=!0,this.httpRequestUtils=new _7,this.showLogs=this.shouldShowLogs(),this.showLogs&&console.info("Setting the logger --\x3e Developer mode logger on")}info(t,...r){r&&r.length>0?console.info(this.wrapMessage(t),r):console.info(this.wrapMessage(t))}error(t,...r){r&&r.length>0?console.error(this.wrapMessage(t),r):console.error(this.wrapMessage(t))}warn(t,...r){r&&r.length>0?console.warn(this.wrapMessage(t),r):console.warn(this.wrapMessage(t))}debug(t,...r){r&&r.length>0?console.debug(this.wrapMessage(t),r):console.debug(this.wrapMessage(t))}shouldShowLogs(){this.httpRequestUtils.getQueryStringParam("devMode");return!0}wrapMessage(t){return this.showLogs?t:this.getCaller()+">> "+t}getCaller(){let t="unknown";try{throw new Error}catch(r){t=this.cleanCaller(this.stringUtils.getLine(r.stack,4))}return t}cleanCaller(t){return t?t.trim().substr(3):"unknown"}}return n.\u0275fac=function(t){return new(t||n)(R(nk))},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})();let T7=(()=>{class n{constructor(){this.iconPath="./src/assets/images/icons",this.dotCMSURLKey="siteURLJWT"}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})(),ru=class{constructor(e){this.iconPath=e.iconPath}displayErrorMessage(e){this.displayMessage("Error",e,"error")}displaySuccessMessage(e){this.displayMessage("Success",e,"success")}displayInfoMessage(e){this.displayMessage("Info",e,"info")}displayMessage(e,t,r){let i;return i=new Notification(r,{body:t,icon:this.iconPath+"/"+r+".png"}),i}};ru.\u0275prov=$({token:ru,factory:ru.\u0275fac}),ru=function E7(n,e,t,r){var s,i=arguments.length,o=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,t):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(n,e,t,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(e,t,o):s(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o}([qs("config"),function w7(n,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(n,e)}("design:paramtypes",[T7])],ru);const sk={500:"500 Internal Server Error",400:"400 Bad Request",401:"401 Unauthorized Error"},ak="/api/v1/temp";function x7({file:n,progressCallBack:e,maxSize:t}){return"string"==typeof n?function A7(n){return fetch(`${ak}/byUrl`,{method:"POST",headers:{"Content-Type":"application/json",Origin:window.location.hostname},body:JSON.stringify({remoteUrl:n})}).then(t=>function S7(n,e,t,r){return new(t||(t=Promise))(function(o,s){function a(u){try{c(r.next(u))}catch(d){s(d)}}function l(u){try{c(r.throw(u))}catch(d){s(d)}}function c(u){u.done?o(u.value):function i(o){return o instanceof t?o:new t(function(s){s(o)})}(u.value).then(a,l)}c((r=r.apply(n,e||[])).next())})}(this,void 0,void 0,function*(){if(200===t.status)return(yield t.json()).tempFiles[0];throw lk(yield t.json(),t.status)}))}(n):function O7({file:n,progressCallBack:e,maxSize:t}){let r=ak;r+=t?`?maxFileLength=${t}`:"";const i=new FormData;return(Array.isArray(n)?n:[n]).forEach(s=>i.append("files",s)),function k7(n,e,t){return new Promise((r,i)=>{const o=new XMLHttpRequest;o.open(e.method||"get",n);for(const s in e.headers||{})o.setRequestHeader(s,e.headers[s]);o.onload=()=>r(o),o.onerror=i,o.upload&&t&&(o.upload.onprogress=s=>{t(s.loaded/s.total*100)}),o.send(e.body)})}(r,{method:"POST",headers:{},body:i},e).then(s=>{if(200===s.status){const a=JSON.parse(s.response).tempFiles;return a.length>1?a:a[0]}throw s}).catch(s=>{throw lk(JSON.parse(s.response),s.status)})}({file:n,progressCallBack:e,maxSize:t})}function lk(n,e){let t="";try{t=n.message||sk[e]}catch(r){t=sk[e||500]}return{message:t,status:500|e}}function ck(n,e){return new Ne(e?t=>e.schedule(R7,0,{error:n,subscriber:t}):t=>t.error(n))}function R7({error:n,subscriber:e}){e.error(n)}let uk=(()=>{class n{constructor(t){this.http=t}publishContent(t,r){return this.setTempResource(t,r).pipe(mi(i=>{const o=Array.isArray(i)?i:[i],s=[];return o.forEach(a=>{s.push({baseType:"dotAsset",asset:a.id,hostFolder:"",indexPolicy:"WAIT_FOR"})}),this.http.post("/api/v1/workflow/actions/default/fire/PUBLISH",JSON.stringify({contentlets:s}),{headers:{Origin:window.location.hostname,"Content-Type":"application/json;charset=UTF-8"}}).pipe(bh("entity","results"))}),Oo(i=>ck(i)))}setTempResource(t,r){return zt(x7({file:t,progressCallBack:()=>{},maxSize:r}))}}return n.\u0275fac=function(t){return new(t||n)(R(Dh))},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})(),P7=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=ut({type:n}),n.\u0275inj=at({providers:[tk,uk,C7,nk],imports:[[Pr,rI,n7,z9]]}),n})(),F7=(()=>{class n{constructor(t){this.http=t}get defaultHeaders(){const t=new Hr;return t.set("Accept","*/*").set("Content-Type","application/json"),t}getLanguages(){return this.languages?se(this.languages):this.http.get("/api/v2/languages",{headers:this.defaultHeaders}).pipe(bh("entity"),be(t=>{const r=this.getDotLanguageObject(t);return this.languages=r,r}))}getDotLanguageObject(t){return t.reduce((r,i)=>Object.assign(r,{[i.id]:i}),{})}}return n.\u0275fac=function(t){return new(t||n)(R(Dh))},n.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function L7(n,e){if(1&n&&(H(0,"i",6),Ye(1),W()),2&n){const t=U();N(1),An(t.url)}}function B7(n,e){1&n&&$t(0,"dot-contentlet-thumbnail",8),2&n&&k("contentlet",U(2).data.contentlet)("width",42)("height",42)("iconSize","42px")}function j7(n,e){if(1&n&&q(0,B7,1,4,"dot-contentlet-thumbnail",7),2&n){const t=U(),r=co(9);k("ngIf",null==t.data?null:t.data.contentlet)("ngIfElse",r)}}function V7(n,e){if(1&n&&(H(0,"div",9),$t(1,"dot-state-icon",10),H(2,"dot-badge",11),Ye(3),W()()),2&n){const t=U();N(1),k("state",t.data.contentlet),N(2),An(t.data.contentlet.language)}}function H7(n,e){1&n&&$t(0,"img",12),2&n&&k("src",U().url,so)}let dk=(()=>{class n{constructor(t){this.element=t,this.role="list-item",this.tabindex="-1",this.label="",this.url="",this.data=null,this.icon=!1}ngOnInit(){this.icon=this.icon="string"==typeof this.url&&!(this.url.split("/").length>1)}getLabel(){return this.element.nativeElement.innerText}focus(){this.element.nativeElement.style="background: #eee"}unfocus(){this.element.nativeElement.style=""}scrollIntoView(){this.isIntoView()||this.element.nativeElement.scrollIntoView(this.alignToTop())}isIntoView(){const{bottom:t,top:r}=this.element.nativeElement.getBoundingClientRect(),i=this.element.nativeElement.parentElement.getBoundingClientRect();return r>=i.top&&t<=i.bottom}alignToTop(){const{top:t}=this.element.nativeElement.getBoundingClientRect(),{top:r}=this.element.nativeElement.parentElement.getBoundingClientRect();return t span[_ngcontent-%COMP%]{overflow:hidden;display:block;white-space:nowrap;text-overflow:ellipsis}.data-wrapper[_ngcontent-%COMP%] .state[_ngcontent-%COMP%]{margin-top:.5rem;display:flex}.data-wrapper[_ngcontent-%COMP%] .state[_ngcontent-%COMP%] dot-state-icon[_ngcontent-%COMP%]{margin-right:.5rem}"]}),n})();const U7=["*"];let z7=(()=>{class n{ngAfterContentInit(){this.keyManager=new gI(this.items).withWrap()}updateSelection(t){this.keyManager.activeItem&&this.keyManager.activeItem.unfocus(),this.keyManager.onKeydown(t),this.keyManager.activeItem.scrollIntoView()}execCommand(){this.keyManager.activeItem.command()}setFirstItemActive(){var t,r;null===(t=this.keyManager.activeItem)||void 0===t||t.unfocus(),this.keyManager.setFirstItemActive(),null===(r=this.keyManager.activeItem)||void 0===r||r.focus()}resetKeyManager(){this.keyManager=new gI(this.items).withWrap(),setTimeout(()=>{this.setFirstItemActive()},0)}updateActiveItem(t){var r;null===(r=this.keyManager.activeItem)||void 0===r||r.unfocus(),this.keyManager.setActiveItem(t)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=Et({type:n,selectors:[["dotcms-suggestion-list"]],contentQueries:function(t,r,i){if(1&t&&ai(i,dk,4),2&t){let o;qn(o=Kn())&&(r.items=o)}},ngContentSelectors:U7,decls:1,vars:0,template:function(t,r){1&t&&(ma(),Ni(0))},styles:[""]}),n})();const W7=["list"];function $7(n,e){if(1&n){const t=ni();H(0,"dotcms-suggestions-list-item",7),Le("mousedown",function(i){const s=Bt(t).$implicit;return U(2).onMouseDown(i,s)})("mouseenter",function(i){return Bt(t),U(2).onMouseEnter(i)}),W()}if(2&n){const t=e.$implicit,r=e.index;k("command",t.command)("index",r)("label",t.label)("url",t.icon)("data",t.data)}}function G7(n,e){if(1&n){const t=ni();H(0,"div",3),Le("mousedown",function(i){return Bt(t),U().onMouseDownHandler(i)}),H(1,"h3"),Ye(2),W(),H(3,"dotcms-suggestion-list",4,5),q(5,$7,1,5,"dotcms-suggestions-list-item",6),W()()}if(2&n){const t=U();N(2),An(t.title),N(3),k("ngForOf",t.items)}}function q7(n,e){if(1&n){const t=ni();H(0,"div",8),$t(1,"p",9),H(2,"button",3),Le("mousedown",function(i){return Bt(t),U().handleBackButton(i)}),Ye(3,"Back"),W()()}if(2&n){const t=U();N(1),k("innerHTML",t.title,ug)}}function K7(n,e){if(1&n&&(H(0,"div",8),$t(1,"p",9),W()),2&n){const t=U();N(1),k("innerHTML",t.noResultsMessage,ug)}}var hn=(()=>(function(n){n.BLOCK="block",n.CONTENTTYPE="contentType",n.CONTENT="content"}(hn||(hn={})),hn))();let fk=(()=>{class n{constructor(t,r,i){this.suggestionsService=t,this.dotLanguageService=r,this.cd=i,this.items=[],this.title="Select a block",this.noResultsMessage="No Results",this.isOpen=!1,this.currentLanguage=f1,this.allowedContentTypes="",this.clearFilter=new Ae,this.mouseMove=!0,this.isFilterActive=!1}onMousemove(){this.mouseMove=!0}ngOnInit(){var t;0===(null===(t=this.items)||void 0===t?void 0:t.length)&&(this.items=s1,this.items.forEach(r=>{r.command=()=>{this.clearFilter.emit(hn.BLOCK),r.id.includes("heading")?this.onSelection({type:Object.assign({name:"heading"},r.attributes)}):this.onSelection({type:{name:r.id}})}}),this.items=[{label:"Contentlets",icon:"receipt",command:()=>{this.clearFilter.emit(hn.CONTENTTYPE),this.loadContentTypes()}},...this.items]),this.initialItems=this.items,this.itemsLoaded=hn.BLOCK,this.dotLanguageService.getLanguages().pipe(vs(1)).subscribe(r=>this.dotLangs=r)}ngAfterViewInit(){this.setFirstItemActive()}execCommand(){this.items.length?this.list.execCommand():this.handleBackButton(new MouseEvent("click"))}updateSelection(t){this.list.updateSelection(t),this.mouseMove=!1}setFirstItemActive(){var t;null===(t=this.list)||void 0===t||t.setFirstItemActive()}updateActiveItem(t){this.list.updateActiveItem(t)}resetKeyManager(){var t;null===(t=this.list)||void 0===t||t.resetKeyManager()}onMouseDownHandler(t){t.preventDefault()}onMouseEnter(t){if(!this.mouseMove)return;t.preventDefault();const r=Number(t.target.dataset.index);this.updateActiveItem(r)}onMouseDown(t,r){t.preventDefault(),r.command()}handleBackButton(t){t.preventDefault(),t.stopPropagation(),this.itemsLoaded=this.itemsLoaded===hn.CONTENT?hn.CONTENTTYPE:hn.BLOCK,this.filterItems()}filterItems(t=""){switch(this.itemsLoaded){case hn.BLOCK:this.items=this.initialItems.filter(r=>r.label.toLowerCase().includes(t.trim().toLowerCase()));break;case hn.CONTENTTYPE:this.loadContentTypes(t);break;case hn.CONTENT:this.loadContentlets(this.selectedContentType,t)}this.isFilterActive=!!t.length,this.setFirstItemActive()}loadContentTypes(t=""){this.suggestionsService.getContentTypes(t,this.allowedContentTypes).pipe(be(r=>r.map(i=>({label:i.name,icon:i.icon,command:()=>{this.selectedContentType=i,this.itemsLoaded=hn.CONTENT,this.loadContentlets(i),this.clearFilter.emit(hn.CONTENT)}}))),vs(1)).subscribe(r=>{this.items=r,this.itemsLoaded=hn.CONTENTTYPE,this.items.length?(this.title="Select a content type",this.cd.detectChanges(),this.resetKeyManager()):(this.title="No results",this.cd.detectChanges()),this.cd.detectChanges(),this.resetKeyManager()})}loadContentlets(t,r=""){this.suggestionsService.getContentlets({contentType:t.variable,filter:r,currentLanguage:this.currentLanguage}).pipe(vs(1)).subscribe(i=>{this.items=i.map(o=>{const{languageId:s}=o;return o.language=this.getContentletLanguage(s),{label:o.title,icon:"contentlet/image",data:{contentlet:o},command:()=>{this.onSelection({payload:o,type:{name:"dotContent"}})}}}),this.items.length?(this.title="Select a contentlet",this.cd.detectChanges(),this.resetKeyManager()):(this.title=`No results for ${t.name}`,this.cd.detectChanges())})}getContentletLanguage(t){const{languageCode:r,countryCode:i}=this.dotLangs[t];return r&&i?`${r}-${i}`:""}}return n.\u0275fac=function(t){return new(t||n)(w(tk),w(F7),w(es))},n.\u0275cmp=Et({type:n,selectors:[["dotcms-suggestions"]],viewQuery:function(t,r){if(1&t&&xd(W7,5),2&t){let i;qn(i=Kn())&&(r.list=i.first)}},hostBindings:function(t,r){1&t&&Le("mousemove",function(o){return r.onMousemove(o)})},inputs:{onSelection:"onSelection",items:"items",title:"title",noResultsMessage:"noResultsMessage",isOpen:"isOpen",currentLanguage:"currentLanguage",allowedContentTypes:"allowedContentTypes"},outputs:{clearFilter:"clearFilter"},decls:5,vars:2,consts:[[3,"mousedown",4,"ngIf","ngIfElse"],["emptyBlock",""],["noResults",""],[3,"mousedown"],[1,"suggestion-list-container"],["list",""],[3,"command","index","label","url","data","mousedown","mouseenter",4,"ngFor","ngForOf"],[3,"command","index","label","url","data","mousedown","mouseenter"],[1,"empty"],[3,"innerHTML"]],template:function(t,r){if(1&t&&(q(0,G7,6,2,"div",0),q(1,q7,4,1,"ng-template",null,1,Jo),q(3,K7,2,1,"ng-template",null,2,Jo)),2&t){const i=co(2),o=co(4);k("ngIf",r.items.length)("ngIfElse",r.isFilterActive?o:i)}},directives:[ho,z7,Kd,dk],styles:['[_nghost-%COMP%]{display:block;min-width:240px;box-shadow:0 4px 20px #0000001a;padding:.5rem 0;background:#ffffff;font-family:Roboto,Helvetica,sans-serif,Arial}h3[_ngcontent-%COMP%]{text-transform:uppercase;font-size:1rem;margin:.5rem 1rem;color:#999}.suggestion-list-container[_ngcontent-%COMP%]{width:100%;height:100%;max-height:400px;overflow:auto;display:block}.material-icons[_ngcontent-%COMP%]{font-family:Material Icons;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-feature-settings:"liga";-webkit-font-smoothing:antialiased}.empty[_ngcontent-%COMP%]{align-items:center;flex-direction:column;display:flex;justify-content:center;padding:1rem;height:15rem}button[_ngcontent-%COMP%]{background:none;border-radius:2px;border:0;border:1px solid var(--color-sec);color:var(--color-sec);cursor:pointer;font-size:1rem;font-weight:500;line-height:normal;padding:.75rem 2rem;text-transform:uppercase}.empty[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover, .empty[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:active, .empty[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:focus{border-color:var(--color-main);color:var(--color-main)}']}),n})();const Z7=function(n){return{"btn-bubble-menu":!0,"btn-active":n}};let Y7=(()=>{class n{constructor(){this.active=!1}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=Et({type:n,selectors:[["dotcms-bubble-menu-button"]],inputs:{item:"item",active:"active"},decls:3,vars:4,consts:[[3,"ngClass"],[1,"material-icons"]],template:function(t,r){1&t&&(H(0,"button",0)(1,"span",1),Ye(2),W()()),2&t&&(k("ngClass",Or(2,Z7,r.active)),N(2),An(r.item.icon))},directives:[uc],styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:center}.btn-bubble-menu[_ngcontent-%COMP%]{background:#ffffff;border:none;color:#0a0725;display:flex;justify-content:center;align-items:center;cursor:pointer;width:2.286rem;height:2.286rem;border-radius:2px}.btn-bubble-menu[_ngcontent-%COMP%]:hover{background:#f1f3f4}.btn-bubble-menu.btn-active[_ngcontent-%COMP%]{background:#f1f3f4;color:#0a0725;border:1px solid #b3b1b8}"]}),n})();function Q7(n,e){if(1&n){const t=ni();Oi(0),H(1,"button",3),Le("click",function(){return Bt(t),U().toggleChangeTo.emit()}),Ye(2),W(),$t(3,"div",4),ki()}if(2&n){const t=U();N(2),An(t.selected)}}function J7(n,e){1&n&&$t(0,"div",4)}function X7(n,e){if(1&n){const t=ni();Oi(0),H(1,"dotcms-bubble-menu-button",5),Le("click",function(){const o=Bt(t).$implicit;return U().command.emit(o)}),W(),q(2,J7,1,0,"div",6),ki()}if(2&n){const t=e.$implicit;N(1),k("active",t.active)("item",t),N(1),k("ngIf",t.divider)}}let eK=(()=>{class n{constructor(){this.items=[],this.command=new Ae,this.toggleChangeTo=new Ae}preventDeSelection(t){t.preventDefault()}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=Et({type:n,selectors:[["dotcms-bubble-menu"]],inputs:{items:"items",selected:"selected"},outputs:{command:"command",toggleChangeTo:"toggleChangeTo"},decls:3,vars:2,consts:[["id","bubble-menu",1,"bubble-menu",3,"mousedown"],[4,"ngIf"],[4,"ngFor","ngForOf"],[1,"btn-dropdown",3,"click"],[1,"divider"],[3,"active","item","click"],["class","divider",4,"ngIf"]],template:function(t,r){1&t&&(H(0,"div",0),Le("mousedown",function(o){return r.preventDeSelection(o)}),q(1,Q7,4,1,"ng-container",1),q(2,X7,3,3,"ng-container",2),W()),2&t&&(N(1),k("ngIf",r.selected),N(1),k("ngForOf",r.items))},directives:[ho,Kd,Y7],styles:['[_nghost-%COMP%]{height:100%;width:100%}.bubble-menu[_ngcontent-%COMP%]{box-sizing:border-box;align-items:center;background:#ffffff;border-radius:2px;box-shadow:0 10px 24px #0003;display:flex;justify-content:center;padding:.4rem;height:40px}.bubble-menu[_ngcontent-%COMP%] .btn-dropdown[_ngcontent-%COMP%]{background:none;border:none;outline:none;padding:.3rem;cursor:pointer}.bubble-menu[_ngcontent-%COMP%] .btn-dropdown[_ngcontent-%COMP%]:hover{background:#f1f3f4}.bubble-menu[_ngcontent-%COMP%] .btn-dropdown[_ngcontent-%COMP%]:after{content:"";border:solid #0a0725;border-width:0 .15rem .15rem 0;display:inline-block;padding:.25rem;transform:rotate(45deg);margin-left:.75rem}.bubble-menu[_ngcontent-%COMP%] .divider[_ngcontent-%COMP%]{border-left:1px solid #f1f3f4;height:100%;margin:0px .5rem}']}),n})();function hk(n,e,t,r,i,o,s){try{var a=n[o](s),l=a.value}catch(c){return void t(c)}a.done?e(l):Promise.resolve(l).then(r,i)}const rK=new Ct("suggestion");function iK({pluginKey:n=rK,editor:e,char:t="@",allowSpaces:r=!1,prefixSpace:i=!0,startOfLine:o=!1,decorationTag:s="span",decorationClass:a="suggestion",command:l=(()=>null),items:c=(()=>[]),render:u=(()=>({})),allow:d=(()=>!0)}){let f;const h=null==u?void 0:u();return new rt({key:n,view(){var g,p=this;return{update:(g=function tK(n){return function(){var e=this,t=arguments;return new Promise(function(r,i){var o=n.apply(e,t);function s(l){hk(o,r,i,s,a,"next",l)}function a(l){hk(o,r,i,s,a,"throw",l)}s(void 0)})}}(function*(m,y){var v,b,_,C,D,I,A;const B=null===(v=p.key)||void 0===v?void 0:v.getState(y),z=null===(b=p.key)||void 0===b?void 0:b.getState(m.state),ee=B.active&&z.active&&B.range.from!==z.range.from,re=!B.active&&z.active,K=B.active&&!z.active,ie=re||ee,Z=!re&&!K&&B.query!==z.query&&!ee,qe=K||ee;if(!ie&&!Z&&!qe)return;const Be=qe&&!ie?B:z,Pe=document.querySelector(`[data-decoration-id="${Be.decorationId}"]`);f={editor:e,range:Be.range,query:Be.query,text:Be.text,items:[],command:Ie=>{l({editor:e,range:Be.range,props:Ie})},decorationNode:Pe,clientRect:Pe?()=>{var Ie;const{decorationId:In}=null===(Ie=p.key)||void 0===Ie?void 0:Ie.getState(e.state);return document.querySelector(`[data-decoration-id="${In}"]`).getBoundingClientRect()}:null},ie&&(null===(_=null==h?void 0:h.onBeforeStart)||void 0===_||_.call(h,f)),Z&&(null===(C=null==h?void 0:h.onBeforeUpdate)||void 0===C||C.call(h,f)),(Z||ie)&&(f.items=yield c({editor:e,query:Be.query})),qe&&(null===(D=null==h?void 0:h.onExit)||void 0===D||D.call(h,f)),Z&&(null===(I=null==h?void 0:h.onUpdate)||void 0===I||I.call(h,f)),ie&&(null===(A=null==h?void 0:h.onStart)||void 0===A||A.call(h,f))}),function(y,v){return g.apply(this,arguments)}),destroy:()=>{var g;!f||null===(g=null==h?void 0:h.onExit)||void 0===g||g.call(h,f)}}},state:{init:()=>({active:!1,range:{},query:null,text:null,composing:!1}),apply(p,g,m,y){const{isEditable:v}=e,{composing:b}=e.view,{selection:_}=p,{empty:C,from:D}=_,I=S({},g);if(I.composing=b,v&&(C||e.view.composing)){(Dg.range.to)&&!b&&!g.composing&&(I.active=!1);const A=function nK(n){var e;const{char:t,allowSpaces:r,prefixSpace:i,startOfLine:o,$position:s}=n,a=function F5(n){return n.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}(t),l=new RegExp(`\\s${a}$`),c=o?"^":"",u=r?new RegExp(`${c}${a}.*?(?=\\s${a}|$)`,"gm"):new RegExp(`${c}(?:^)?${a}[^\\s${a}]*`,"gm"),d=(null===(e=s.nodeBefore)||void 0===e?void 0:e.isText)&&s.nodeBefore.text;if(!d)return null;const f=s.pos-d.length,h=Array.from(d.matchAll(u)).pop();if(!h||void 0===h.input||void 0===h.index)return null;const p=h.input.slice(Math.max(0,h.index-1),h.index),g=/^[\s\0]?$/.test(p);if(i&&!g)return null;const m=f+h.index;let y=m+h[0].length;return r&&l.test(d.slice(y-1,y+1))&&(h[0]+=" ",y+=1),m=s.pos?{range:{from:m,to:y},query:h[0].slice(t.length),text:h[0]}:null}({char:t,allowSpaces:r,prefixSpace:i,startOfLine:o,$position:_.$from}),B=`id_${Math.floor(4294967295*Math.random())}`;A&&d({editor:e,state:y,range:A.range})?(I.active=!0,I.decorationId=g.decorationId?g.decorationId:B,I.range=A.range,I.query=A.query,I.text=A.text):I.active=!1}else I.active=!1;return I.active||(I.decorationId=null,I.range={},I.query=null,I.text=null),I}},props:{handleKeyDown(p,g){var m;const{active:y,range:v}=this.getState(p.state);return y&&(null===(m=null==h?void 0:h.onKeyDown)||void 0===m?void 0:m.call(h,{view:p,event:g,range:v}))||!1},decorations(p){const{active:g,range:m,decorationId:y}=this.getState(p);return g?Oe.create(p.doc,[Dt.inline(m.from,m.to,{nodeName:s,class:a,"data-decoration-id":y})]):null}}})}function Ur(n){if(null==n)return window;if("[object Window]"!==n.toString()){var e=n.ownerDocument;return e&&e.defaultView||window}return n}function Ya(n){return n instanceof Ur(n).Element||n instanceof Element}function mr(n){return n instanceof Ur(n).HTMLElement||n instanceof HTMLElement}function z_(n){return"undefined"!=typeof ShadowRoot&&(n instanceof Ur(n).ShadowRoot||n instanceof ShadowRoot)}var Ds=Math.max,wh=Math.min,Qa=Math.round;function Ja(n,e){void 0===e&&(e=!1);var t=n.getBoundingClientRect(),r=1,i=1;if(mr(n)&&e){var o=n.offsetHeight,s=n.offsetWidth;s>0&&(r=Qa(t.width)/s||1),o>0&&(i=Qa(t.height)/o||1)}return{width:t.width/r,height:t.height/i,top:t.top/i,right:t.right/r,bottom:t.bottom/i,left:t.left/r,x:t.left/r,y:t.top/i}}function W_(n){var e=Ur(n);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function bi(n){return n?(n.nodeName||"").toLowerCase():null}function Ro(n){return((Ya(n)?n.ownerDocument:n.document)||window.document).documentElement}function $_(n){return Ja(Ro(n)).left+W_(n).scrollLeft}function qi(n){return Ur(n).getComputedStyle(n)}function G_(n){var e=qi(n);return/auto|scroll|overlay|hidden/.test(e.overflow+e.overflowY+e.overflowX)}function lK(n,e,t){void 0===t&&(t=!1);var r=mr(e),i=mr(e)&&function aK(n){var e=n.getBoundingClientRect(),t=Qa(e.width)/n.offsetWidth||1,r=Qa(e.height)/n.offsetHeight||1;return 1!==t||1!==r}(e),o=Ro(e),s=Ja(n,i),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!t)&&(("body"!==bi(e)||G_(o))&&(a=function sK(n){return n!==Ur(n)&&mr(n)?function oK(n){return{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}}(n):W_(n)}(e)),mr(e)?((l=Ja(e,!0)).x+=e.clientLeft,l.y+=e.clientTop):o&&(l.x=$_(o))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function q_(n){var e=Ja(n),t=n.offsetWidth,r=n.offsetHeight;return Math.abs(e.width-t)<=1&&(t=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:n.offsetLeft,y:n.offsetTop,width:t,height:r}}function Sh(n){return"html"===bi(n)?n:n.assignedSlot||n.parentNode||(z_(n)?n.host:null)||Ro(n)}function pk(n){return["html","body","#document"].indexOf(bi(n))>=0?n.ownerDocument.body:mr(n)&&G_(n)?n:pk(Sh(n))}function iu(n,e){var t;void 0===e&&(e=[]);var r=pk(n),i=r===(null==(t=n.ownerDocument)?void 0:t.body),o=Ur(r),s=i?[o].concat(o.visualViewport||[],G_(r)?r:[]):r,a=e.concat(s);return i?a:a.concat(iu(Sh(s)))}function cK(n){return["table","td","th"].indexOf(bi(n))>=0}function gk(n){return mr(n)&&"fixed"!==qi(n).position?n.offsetParent:null}function ou(n){for(var e=Ur(n),t=gk(n);t&&cK(t)&&"static"===qi(t).position;)t=gk(t);return t&&("html"===bi(t)||"body"===bi(t)&&"static"===qi(t).position)?e:t||function uK(n){var e=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&mr(n)&&"fixed"===qi(n).position)return null;var i=Sh(n);for(z_(i)&&(i=i.host);mr(i)&&["html","body"].indexOf(bi(i))<0;){var o=qi(i);if("none"!==o.transform||"none"!==o.perspective||"paint"===o.contain||-1!==["transform","perspective"].indexOf(o.willChange)||e&&"filter"===o.willChange||e&&o.filter&&"none"!==o.filter)return i;i=i.parentNode}return null}(n)||e}var Pn="top",vr="bottom",yr="right",Fn="left",K_="auto",su=[Pn,vr,yr,Fn],Xa="start",au="end",mk="viewport",lu="popper",vk=su.reduce(function(n,e){return n.concat([e+"-"+Xa,e+"-"+au])},[]),yk=[].concat(su,[K_]).reduce(function(n,e){return n.concat([e,e+"-"+Xa,e+"-"+au])},[]),DK=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function EK(n){var e=new Map,t=new Set,r=[];function i(o){t.add(o.name),[].concat(o.requires||[],o.requiresIfExists||[]).forEach(function(a){if(!t.has(a)){var l=e.get(a);l&&i(l)}}),r.push(o)}return n.forEach(function(o){e.set(o.name,o)}),n.forEach(function(o){t.has(o.name)||i(o)}),r}function SK(n){var e;return function(){return e||(e=new Promise(function(t){Promise.resolve().then(function(){e=void 0,t(n())})})),e}}var _k={placement:"bottom",modifiers:[],strategy:"absolute"};function bk(){for(var n=arguments.length,e=new Array(n),t=0;t=0?"x":"y"}function Ck(n){var l,e=n.reference,t=n.element,r=n.placement,i=r?Ci(r):null,o=r?el(r):null,s=e.x+e.width/2-t.width/2,a=e.y+e.height/2-t.height/2;switch(i){case Pn:l={x:s,y:e.y-t.height};break;case vr:l={x:s,y:e.y+e.height};break;case yr:l={x:e.x+e.width,y:a};break;case Fn:l={x:e.x-t.width,y:a};break;default:l={x:e.x,y:e.y}}var c=i?Z_(i):null;if(null!=c){var u="y"===c?"height":"width";switch(o){case Xa:l[c]=l[c]-(e[u]/2-t[u]/2);break;case au:l[c]=l[c]+(e[u]/2-t[u]/2)}}return l}const OK={name:"popperOffsets",enabled:!0,phase:"read",fn:function AK(n){var e=n.state;e.modifiersData[n.name]=Ck({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}};var kK={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Dk(n){var e,t=n.popper,r=n.popperRect,i=n.placement,o=n.variation,s=n.offsets,a=n.position,l=n.gpuAcceleration,c=n.adaptive,u=n.roundOffsets,d=n.isFixed,f=s.x,h=void 0===f?0:f,p=s.y,g=void 0===p?0:p,m="function"==typeof u?u({x:h,y:g}):{x:h,y:g};h=m.x,g=m.y;var y=s.hasOwnProperty("x"),v=s.hasOwnProperty("y"),b=Fn,_=Pn,C=window;if(c){var D=ou(t),I="clientHeight",A="clientWidth";D===Ur(t)&&"static"!==qi(D=Ro(t)).position&&"absolute"===a&&(I="scrollHeight",A="scrollWidth"),D=D,(i===Pn||(i===Fn||i===yr)&&o===au)&&(_=vr,g-=(d&&D===C&&C.visualViewport?C.visualViewport.height:D[I])-r.height,g*=l?1:-1),i!==Fn&&(i!==Pn&&i!==vr||o!==au)||(b=yr,h-=(d&&D===C&&C.visualViewport?C.visualViewport.width:D[A])-r.width,h*=l?1:-1)}var K,ee=Object.assign({position:a},c&&kK),re=!0===u?function NK(n){var t=n.y,i=window.devicePixelRatio||1;return{x:Qa(n.x*i)/i||0,y:Qa(t*i)/i||0}}({x:h,y:g}):{x:h,y:g};return h=re.x,g=re.y,Object.assign({},ee,l?((K={})[_]=v?"0":"",K[b]=y?"0":"",K.transform=(C.devicePixelRatio||1)<=1?"translate("+h+"px, "+g+"px)":"translate3d("+h+"px, "+g+"px, 0)",K):((e={})[_]=v?g+"px":"",e[b]=y?h+"px":"",e.transform="",e))}const PK={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function RK(n){var e=n.state,t=n.options,r=t.gpuAcceleration,i=void 0===r||r,o=t.adaptive,s=void 0===o||o,a=t.roundOffsets,l=void 0===a||a,u={placement:Ci(e.placement),variation:el(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,Dk(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,Dk(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},Ek={name:"applyStyles",enabled:!0,phase:"write",fn:function FK(n){var e=n.state;Object.keys(e.elements).forEach(function(t){var r=e.styles[t]||{},i=e.attributes[t]||{},o=e.elements[t];!mr(o)||!bi(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(s){var a=i[s];!1===a?o.removeAttribute(s):o.setAttribute(s,!0===a?"":a)}))})},effect:function LK(n){var e=n.state,t={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,t.popper),e.styles=t,e.elements.arrow&&Object.assign(e.elements.arrow.style,t.arrow),function(){Object.keys(e.elements).forEach(function(r){var i=e.elements[r],o=e.attributes[r]||{},a=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:t[r]).reduce(function(l,c){return l[c]="",l},{});!mr(i)||!bi(i)||(Object.assign(i.style,a),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}},requires:["computeStyles"]},VK={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function jK(n){var e=n.state,r=n.name,i=n.options.offset,o=void 0===i?[0,0]:i,s=yk.reduce(function(u,d){return u[d]=function BK(n,e,t){var r=Ci(n),i=[Fn,Pn].indexOf(r)>=0?-1:1,o="function"==typeof t?t(Object.assign({},e,{placement:n})):t,s=o[0],a=o[1];return s=s||0,a=(a||0)*i,[Fn,yr].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}(d,e.rects,o),u},{}),a=s[e.placement],c=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=a.x,e.modifiersData.popperOffsets.y+=c),e.modifiersData[r]=s}};var HK={left:"right",right:"left",bottom:"top",top:"bottom"};function Ih(n){return n.replace(/left|right|bottom|top/g,function(e){return HK[e]})}var UK={start:"end",end:"start"};function wk(n){return n.replace(/start|end/g,function(e){return UK[e]})}function Sk(n,e){var t=e.getRootNode&&e.getRootNode();if(n.contains(e))return!0;if(t&&z_(t)){var r=e;do{if(r&&n.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Y_(n){return Object.assign({},n,{left:n.x,top:n.y,right:n.x+n.width,bottom:n.y+n.height})}function Mk(n,e){return e===mk?Y_(function zK(n){var e=Ur(n),t=Ro(n),r=e.visualViewport,i=t.clientWidth,o=t.clientHeight,s=0,a=0;return r&&(i=r.width,o=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(s=r.offsetLeft,a=r.offsetTop)),{width:i,height:o,x:s+$_(n),y:a}}(n)):Ya(e)?function $K(n){var e=Ja(n);return e.top=e.top+n.clientTop,e.left=e.left+n.clientLeft,e.bottom=e.top+n.clientHeight,e.right=e.left+n.clientWidth,e.width=n.clientWidth,e.height=n.clientHeight,e.x=e.left,e.y=e.top,e}(e):Y_(function WK(n){var e,t=Ro(n),r=W_(n),i=null==(e=n.ownerDocument)?void 0:e.body,o=Ds(t.scrollWidth,t.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=Ds(t.scrollHeight,t.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+$_(n),l=-r.scrollTop;return"rtl"===qi(i||t).direction&&(a+=Ds(t.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}(Ro(n)))}function Tk(n){return Object.assign({},{top:0,right:0,bottom:0,left:0},n)}function xk(n,e){return e.reduce(function(t,r){return t[r]=n,t},{})}function cu(n,e){void 0===e&&(e={});var r=e.placement,i=void 0===r?n.placement:r,o=e.boundary,s=void 0===o?"clippingParents":o,a=e.rootBoundary,l=void 0===a?mk:a,c=e.elementContext,u=void 0===c?lu:c,d=e.altBoundary,f=void 0!==d&&d,h=e.padding,p=void 0===h?0:h,g=Tk("number"!=typeof p?p:xk(p,su)),y=n.rects.popper,v=n.elements[f?u===lu?"reference":lu:u],b=function qK(n,e,t){var r="clippingParents"===e?function GK(n){var e=iu(Sh(n)),r=["absolute","fixed"].indexOf(qi(n).position)>=0&&mr(n)?ou(n):n;return Ya(r)?e.filter(function(i){return Ya(i)&&Sk(i,r)&&"body"!==bi(i)}):[]}(n):[].concat(e),i=[].concat(r,[t]),s=i.reduce(function(a,l){var c=Mk(n,l);return a.top=Ds(c.top,a.top),a.right=wh(c.right,a.right),a.bottom=wh(c.bottom,a.bottom),a.left=Ds(c.left,a.left),a},Mk(n,i[0]));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}(Ya(v)?v:v.contextElement||Ro(n.elements.popper),s,l),_=Ja(n.elements.reference),C=Ck({reference:_,element:y,strategy:"absolute",placement:i}),D=Y_(Object.assign({},y,C)),I=u===lu?D:_,A={top:b.top-I.top+g.top,bottom:I.bottom-b.bottom+g.bottom,left:b.left-I.left+g.left,right:I.right-b.right+g.right},B=n.modifiersData.offset;if(u===lu&&B){var z=B[i];Object.keys(A).forEach(function(ee){var re=[yr,vr].indexOf(ee)>=0?1:-1,K=[Pn,vr].indexOf(ee)>=0?"y":"x";A[ee]+=z[K]*re})}return A}const QK={name:"flip",enabled:!0,phase:"main",fn:function YK(n){var e=n.state,t=n.options,r=n.name;if(!e.modifiersData[r]._skip){for(var i=t.mainAxis,o=void 0===i||i,s=t.altAxis,a=void 0===s||s,l=t.fallbackPlacements,c=t.padding,u=t.boundary,d=t.rootBoundary,f=t.altBoundary,h=t.flipVariations,p=void 0===h||h,g=t.allowedAutoPlacements,m=e.options.placement,y=Ci(m),b=l||(y!==m&&p?function ZK(n){if(Ci(n)===K_)return[];var e=Ih(n);return[wk(n),e,wk(e)]}(m):[Ih(m)]),_=[m].concat(b).reduce(function(Yi,$r){return Yi.concat(Ci($r)===K_?function KK(n,e){void 0===e&&(e={});var i=e.boundary,o=e.rootBoundary,s=e.padding,a=e.flipVariations,l=e.allowedAutoPlacements,c=void 0===l?yk:l,u=el(e.placement),d=u?a?vk:vk.filter(function(p){return el(p)===u}):su,f=d.filter(function(p){return c.indexOf(p)>=0});0===f.length&&(f=d);var h=f.reduce(function(p,g){return p[g]=cu(n,{placement:g,boundary:i,rootBoundary:o,padding:s})[Ci(g)],p},{});return Object.keys(h).sort(function(p,g){return h[p]-h[g]})}(e,{placement:$r,boundary:u,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:g}):$r)},[]),C=e.rects.reference,D=e.rects.popper,I=new Map,A=!0,B=_[0],z=0;z<_.length;z++){var ee=_[z],re=Ci(ee),K=el(ee)===Xa,Re=[Pn,vr].indexOf(re)>=0,ie=Re?"width":"height",Z=cu(e,{placement:ee,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),qe=Re?K?yr:Fn:K?vr:Pn;C[ie]>D[ie]&&(qe=Ih(qe));var Be=Ih(qe),Pe=[];if(o&&Pe.push(Z[re]<=0),a&&Pe.push(Z[qe]<=0,Z[Be]<=0),Pe.every(function(Yi){return Yi})){B=ee,A=!1;break}I.set(ee,Pe)}if(A)for(var In=function($r){var Qi=_.find(function(ll){var Ji=I.get(ll);if(Ji)return Ji.slice(0,$r).every(function(cl){return cl})});if(Qi)return B=Qi,"break"},Wr=p?3:1;Wr>0&&"break"!==In(Wr);Wr--);e.placement!==B&&(e.modifiersData[r]._skip=!0,e.placement=B,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function uu(n,e,t){return Ds(n,wh(e,t))}const tZ={name:"preventOverflow",enabled:!0,phase:"main",fn:function eZ(n){var e=n.state,t=n.options,r=n.name,i=t.mainAxis,o=void 0===i||i,s=t.altAxis,a=void 0!==s&&s,f=t.tether,h=void 0===f||f,p=t.tetherOffset,g=void 0===p?0:p,m=cu(e,{boundary:t.boundary,rootBoundary:t.rootBoundary,padding:t.padding,altBoundary:t.altBoundary}),y=Ci(e.placement),v=el(e.placement),b=!v,_=Z_(y),C=function JK(n){return"x"===n?"y":"x"}(_),D=e.modifiersData.popperOffsets,I=e.rects.reference,A=e.rects.popper,B="function"==typeof g?g(Object.assign({},e.rects,{placement:e.placement})):g,z="number"==typeof B?{mainAxis:B,altAxis:B}:Object.assign({mainAxis:0,altAxis:0},B),ee=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,re={x:0,y:0};if(D){if(o){var K,Re="y"===_?Pn:Fn,ie="y"===_?vr:yr,Z="y"===_?"height":"width",qe=D[_],Be=qe+m[Re],Pe=qe-m[ie],Ie=h?-A[Z]/2:0,In=v===Xa?I[Z]:A[Z],Wr=v===Xa?-A[Z]:-I[Z],Ts=e.elements.arrow,Yi=h&&Ts?q_(Ts):{width:0,height:0},$r=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Qi=$r[Re],ll=$r[ie],Ji=uu(0,I[Z],Yi[Z]),cl=b?I[Z]/2-Ie-Ji-Qi-z.mainAxis:In-Ji-Qi-z.mainAxis,Vo=b?-I[Z]/2+Ie+Ji+ll+z.mainAxis:Wr+Ji+ll+z.mainAxis,ul=e.elements.arrow&&ou(e.elements.arrow),Du=null!=(K=null==ee?void 0:ee[_])?K:0,rp=qe+Vo-Du,Eu=uu(h?wh(Be,qe+cl-Du-(ul?"y"===_?ul.clientTop||0:ul.clientLeft||0:0)):Be,qe,h?Ds(Pe,rp):Pe);D[_]=Eu,re[_]=Eu-qe}if(a){var wu,Xi=D[C],Ho="y"===C?"height":"width",Su=Xi+m["x"===_?Pn:Fn],xs=Xi-m["x"===_?vr:yr],Mu=-1!==[Pn,Fn].indexOf(y),sp=null!=(wu=null==ee?void 0:ee[C])?wu:0,ap=Mu?Su:Xi-I[Ho]-A[Ho]-sp+z.altAxis,lp=Mu?Xi+I[Ho]+A[Ho]-sp-z.altAxis:xs,cp=h&&Mu?function XK(n,e,t){var r=uu(n,e,t);return r>t?t:r}(ap,Xi,lp):uu(h?ap:Su,Xi,h?lp:xs);D[C]=cp,re[C]=cp-Xi}e.modifiersData[r]=re}},requiresIfExists:["offset"]},oZ={name:"arrow",enabled:!0,phase:"main",fn:function rZ(n){var e,t=n.state,r=n.name,i=n.options,o=t.elements.arrow,s=t.modifiersData.popperOffsets,a=Ci(t.placement),l=Z_(a),u=[Fn,yr].indexOf(a)>=0?"height":"width";if(o&&s){var d=function(e,t){return Tk("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:xk(e,su))}(i.padding,t),f=q_(o),h="y"===l?Pn:Fn,p="y"===l?vr:yr,g=t.rects.reference[u]+t.rects.reference[l]-s[l]-t.rects.popper[u],m=s[l]-t.rects.reference[l],y=ou(o),v=y?"y"===l?y.clientHeight||0:y.clientWidth||0:0,D=v/2-f[u]/2+(g/2-m/2),I=uu(d[h],D,v-f[u]-d[p]);t.modifiersData[r]=((e={})[l]=I,e.centerOffset=I-D,e)}},effect:function iZ(n){var e=n.state,r=n.options.element,i=void 0===r?"[data-popper-arrow]":r;null!=i&&("string"==typeof i&&!(i=e.elements.popper.querySelector(i))||!Sk(e.elements.popper,i)||(e.elements.arrow=i))},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ak(n,e,t){return void 0===t&&(t={x:0,y:0}),{top:n.top-e.height-t.y,right:n.right-e.width+t.x,bottom:n.bottom-e.height+t.y,left:n.left-e.width-t.x}}function Ok(n){return[Pn,yr,vr,Fn].some(function(e){return n[e]>=0})}var aZ=[xK,OK,PK,Ek,VK,QK,tZ,oZ,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function sZ(n){var e=n.state,t=n.name,r=e.rects.reference,i=e.rects.popper,o=e.modifiersData.preventOverflow,s=cu(e,{elementContext:"reference"}),a=cu(e,{altBoundary:!0}),l=Ak(s,r),c=Ak(a,i,o),u=Ok(l),d=Ok(c);e.modifiersData[t]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}}],lZ=IK({defaultModifiers:aZ}),kk="tippy-content",Rk="tippy-arrow",Pk="tippy-svg-arrow",Po={passive:!0,capture:!0},Fk=function(){return document.body};function Q_(n,e,t){if(Array.isArray(n)){var r=n[e];return null==r?Array.isArray(t)?t[e]:t:r}return n}function J_(n,e){var t={}.toString.call(n);return 0===t.indexOf("[object")&&t.indexOf(e+"]")>-1}function Lk(n,e){return"function"==typeof n?n.apply(void 0,e):n}function Bk(n,e){return 0===e?n:function(r){clearTimeout(t),t=setTimeout(function(){n(r)},e)};var t}function Fo(n){return[].concat(n)}function jk(n,e){-1===n.indexOf(e)&&n.push(e)}function tl(n){return[].slice.call(n)}function Hk(n){return Object.keys(n).reduce(function(e,t){return void 0!==n[t]&&(e[t]=n[t]),e},{})}function Es(){return document.createElement("div")}function Th(n){return["Element","Fragment"].some(function(e){return J_(n,e)})}function tb(n,e){n.forEach(function(t){t&&(t.style.transitionDuration=e+"ms")})}function du(n,e){n.forEach(function(t){t&&t.setAttribute("data-state",e)})}function nb(n,e,t){var r=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(i){n[r](i,t)})}function Wk(n,e){for(var t=e;t;){var r;if(n.contains(t))return!0;t=null==t.getRootNode||null==(r=t.getRootNode())?void 0:r.host}return!1}var Di={isTouch:!1},$k=0;function mZ(){Di.isTouch||(Di.isTouch=!0,window.performance&&document.addEventListener("mousemove",Gk))}function Gk(){var n=performance.now();n-$k<20&&(Di.isTouch=!1,document.removeEventListener("mousemove",Gk)),$k=n}function vZ(){var n=document.activeElement;(function Uk(n){return!(!n||!n._tippy||n._tippy.reference!==n)})(n)&&n.blur&&!n._tippy.state.isVisible&&n.blur()}var bZ=!("undefined"==typeof window||"undefined"==typeof document||!window.msCrypto),Ln=Object.assign({appendTo:Fk,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),wZ=Object.keys(Ln);function Qk(n){var t=(n.plugins||[]).reduce(function(r,i){var a,o=i.name;return o&&(r[o]=void 0!==n[o]?n[o]:null!=(a=Ln[o])?a:i.defaultValue),r},{});return Object.assign({},n,t)}function Jk(n,e){var t=Object.assign({},e,{content:Lk(e.content,[n])},e.ignoreAttributes?{}:function MZ(n,e){return(e?Object.keys(Qk(Object.assign({},Ln,{plugins:e}))):wZ).reduce(function(i,o){var s=(n.getAttribute("data-tippy-"+o)||"").trim();if(!s)return i;if("content"===o)i[o]=s;else try{i[o]=JSON.parse(s)}catch(a){i[o]=s}return i},{})}(n,e.plugins));return t.aria=Object.assign({},Ln.aria,t.aria),t.aria={expanded:"auto"===t.aria.expanded?e.interactive:t.aria.expanded,content:"auto"===t.aria.content?e.interactive?null:"describedby":t.aria.content},t}function rb(n,e){n.innerHTML=e}function Xk(n){var e=Es();return!0===n?e.className=Rk:(e.className=Pk,Th(n)?e.appendChild(n):rb(e,n)),e}function e1(n,e){Th(e.content)?(rb(n,""),n.appendChild(e.content)):"function"!=typeof e.content&&(e.allowHTML?rb(n,e.content):n.textContent=e.content)}function xh(n){var e=n.firstElementChild,t=tl(e.children);return{box:e,content:t.find(function(r){return r.classList.contains(kk)}),arrow:t.find(function(r){return r.classList.contains(Rk)||r.classList.contains(Pk)}),backdrop:t.find(function(r){return r.classList.contains("tippy-backdrop")})}}function t1(n){var e=Es(),t=Es();t.className="tippy-box",t.setAttribute("data-state","hidden"),t.setAttribute("tabindex","-1");var r=Es();function i(o,s){var a=xh(e),l=a.box,c=a.content,u=a.arrow;s.theme?l.setAttribute("data-theme",s.theme):l.removeAttribute("data-theme"),"string"==typeof s.animation?l.setAttribute("data-animation",s.animation):l.removeAttribute("data-animation"),s.inertia?l.setAttribute("data-inertia",""):l.removeAttribute("data-inertia"),l.style.maxWidth="number"==typeof s.maxWidth?s.maxWidth+"px":s.maxWidth,s.role?l.setAttribute("role",s.role):l.removeAttribute("role"),(o.content!==s.content||o.allowHTML!==s.allowHTML)&&e1(c,n.props),s.arrow?u?o.arrow!==s.arrow&&(l.removeChild(u),l.appendChild(Xk(s.arrow))):l.appendChild(Xk(s.arrow)):u&&l.removeChild(u)}return r.className=kk,r.setAttribute("data-state","hidden"),e1(r,n.props),e.appendChild(t),t.appendChild(r),i(n.props,n.props),{popper:e,onUpdate:i}}t1.$$tippy=!0;var TZ=1,Ah=[],Oh=[];function xZ(n,e){var r,i,o,u,d,f,g,t=Jk(n,Object.assign({},Ln,Qk(Hk(e)))),s=!1,a=!1,l=!1,c=!1,h=[],p=Bk(np,t.interactiveDebounce),m=TZ++,v=function fZ(n){return n.filter(function(e,t){return n.indexOf(e)===t})}(t.plugins),_={id:m,reference:n,popper:Es(),popperInstance:null,props:t,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:v,clearDelayTimeouts:function ap(){clearTimeout(r),clearTimeout(i),cancelAnimationFrame(o)},setProps:function lp(E){if(!_.state.isDestroyed){Be("onBeforeUpdate",[_,E]),tp();var V=_.props,oe=Jk(n,Object.assign({},V,Hk(E),{ignoreAttributes:!0}));_.props=oe,ul(),V.interactiveDebounce!==oe.interactiveDebounce&&(In(),p=Bk(np,oe.interactiveDebounce)),V.triggerTarget&&!oe.triggerTarget?Fo(V.triggerTarget).forEach(function(je){je.removeAttribute("aria-expanded")}):oe.triggerTarget&&n.removeAttribute("aria-expanded"),Ie(),qe(),I&&I(V,oe),_.popperInstance&&(ip(),Ho().forEach(function(je){requestAnimationFrame(je._tippy.popperInstance.forceUpdate)})),Be("onAfterUpdate",[_,E])}},setContent:function cp(E){_.setProps({content:E})},show:function TQ(){var E=_.state.isVisible,V=_.state.isDestroyed,oe=!_.state.isEnabled,je=Di.isTouch&&!_.props.touch,Te=Q_(_.props.duration,0,Ln.duration);if(!(E||V||oe||je||K().hasAttribute("disabled")||(Be("onShow",[_],!1),!1===_.props.onShow(_)))){if(_.state.isVisible=!0,re()&&(D.style.visibility="visible"),qe(),$r(),_.state.isMounted||(D.style.transition="none"),re()){var Tn=ie();tb([Tn.box,Tn.content],0)}f=function(){var As;if(_.state.isVisible&&!c){if(c=!0,D.style.transition=_.props.moveTransition,re()&&_.props.animation){var Cb=ie(),up=Cb.box,fl=Cb.content;tb([up,fl],Te),du([up,fl],"visible")}Pe(),Ie(),jk(Oh,_),null==(As=_.popperInstance)||As.forceUpdate(),Be("onMount",[_]),_.props.animation&&re()&&function Ji(E,V){cl(E,V)}(Te,function(){_.state.isShown=!0,Be("onShown",[_])})}},function Xi(){var V,E=_.props.appendTo,oe=K();(V=_.props.interactive&&E===Fk||"parent"===E?oe.parentNode:Lk(E,[oe])).contains(D)||V.appendChild(D),_.state.isMounted=!0,ip()}()}},hide:function xQ(){var E=!_.state.isVisible,V=_.state.isDestroyed,oe=!_.state.isEnabled,je=Q_(_.props.duration,1,Ln.duration);if(!(E||V||oe)&&(Be("onHide",[_],!1),!1!==_.props.onHide(_))){if(_.state.isVisible=!1,_.state.isShown=!1,c=!1,s=!1,re()&&(D.style.visibility="hidden"),In(),Qi(),qe(!0),re()){var Te=ie(),Tn=Te.box,Cr=Te.content;_.props.animation&&(tb([Tn,Cr],je),du([Tn,Cr],"hidden"))}Pe(),Ie(),_.props.animation?re()&&function ll(E,V){cl(E,function(){!_.state.isVisible&&D.parentNode&&D.parentNode.contains(D)&&V()})}(je,_.unmount):_.unmount()}},hideWithInteractivity:function AQ(E){Re().addEventListener("mousemove",p),jk(Ah,p),p(E)},enable:function Mu(){_.state.isEnabled=!0},disable:function sp(){_.hide(),_.state.isEnabled=!1},unmount:function OQ(){_.state.isVisible&&_.hide(),_.state.isMounted&&(op(),Ho().forEach(function(E){E._tippy.unmount()}),D.parentNode&&D.parentNode.removeChild(D),Oh=Oh.filter(function(E){return E!==_}),_.state.isMounted=!1,Be("onHidden",[_]))},destroy:function kQ(){_.state.isDestroyed||(_.clearDelayTimeouts(),_.unmount(),tp(),delete n._tippy,_.state.isDestroyed=!0,Be("onDestroy",[_]))}};if(!t.render)return _;var C=t.render(_),D=C.popper,I=C.onUpdate;D.setAttribute("data-tippy-root",""),D.id="tippy-"+_.id,_.popper=D,n._tippy=_,D._tippy=_;var A=v.map(function(E){return E.fn(_)}),B=n.hasAttribute("aria-expanded");return ul(),Ie(),qe(),Be("onCreate",[_]),t.showOnCreate&&Su(),D.addEventListener("mouseenter",function(){_.props.interactive&&_.state.isVisible&&_.clearDelayTimeouts()}),D.addEventListener("mouseleave",function(){_.props.interactive&&_.props.trigger.indexOf("mouseenter")>=0&&Re().addEventListener("mousemove",p)}),_;function z(){var E=_.props.touch;return Array.isArray(E)?E:[E,0]}function ee(){return"hold"===z()[0]}function re(){var E;return!(null==(E=_.props.render)||!E.$$tippy)}function K(){return g||n}function Re(){var E=K().parentNode;return E?function zk(n){var e,r=Fo(n)[0];return null!=r&&null!=(e=r.ownerDocument)&&e.body?r.ownerDocument:document}(E):document}function ie(){return xh(D)}function Z(E){return _.state.isMounted&&!_.state.isVisible||Di.isTouch||u&&"focus"===u.type?0:Q_(_.props.delay,E?0:1,Ln.delay)}function qe(E){void 0===E&&(E=!1),D.style.pointerEvents=_.props.interactive&&!E?"":"none",D.style.zIndex=""+_.props.zIndex}function Be(E,V,oe){var je;void 0===oe&&(oe=!0),A.forEach(function(Te){Te[E]&&Te[E].apply(Te,V)}),oe&&(je=_.props)[E].apply(je,V)}function Pe(){var E=_.props.aria;if(E.content){var V="aria-"+E.content,oe=D.id;Fo(_.props.triggerTarget||n).forEach(function(Te){var Tn=Te.getAttribute(V);if(_.state.isVisible)Te.setAttribute(V,Tn?Tn+" "+oe:oe);else{var Cr=Tn&&Tn.replace(oe,"").trim();Cr?Te.setAttribute(V,Cr):Te.removeAttribute(V)}})}}function Ie(){!B&&_.props.aria.expanded&&Fo(_.props.triggerTarget||n).forEach(function(V){_.props.interactive?V.setAttribute("aria-expanded",_.state.isVisible&&V===K()?"true":"false"):V.removeAttribute("aria-expanded")})}function In(){Re().removeEventListener("mousemove",p),Ah=Ah.filter(function(E){return E!==p})}function Wr(E){if(!Di.isTouch||!l&&"mousedown"!==E.type){var V=E.composedPath&&E.composedPath()[0]||E.target;if(!_.props.interactive||!Wk(D,V)){if(Fo(_.props.triggerTarget||n).some(function(oe){return Wk(oe,V)})){if(Di.isTouch||_.state.isVisible&&_.props.trigger.indexOf("click")>=0)return}else Be("onClickOutside",[_,E]);!0===_.props.hideOnClick&&(_.clearDelayTimeouts(),_.hide(),a=!0,setTimeout(function(){a=!1}),_.state.isMounted||Qi())}}}function Ts(){l=!0}function Yi(){l=!1}function $r(){var E=Re();E.addEventListener("mousedown",Wr,!0),E.addEventListener("touchend",Wr,Po),E.addEventListener("touchstart",Yi,Po),E.addEventListener("touchmove",Ts,Po)}function Qi(){var E=Re();E.removeEventListener("mousedown",Wr,!0),E.removeEventListener("touchend",Wr,Po),E.removeEventListener("touchstart",Yi,Po),E.removeEventListener("touchmove",Ts,Po)}function cl(E,V){var oe=ie().box;function je(Te){Te.target===oe&&(nb(oe,"remove",je),V())}if(0===E)return V();nb(oe,"remove",d),nb(oe,"add",je),d=je}function Vo(E,V,oe){void 0===oe&&(oe=!1),Fo(_.props.triggerTarget||n).forEach(function(Te){Te.addEventListener(E,V,oe),h.push({node:Te,eventType:E,handler:V,options:oe})})}function ul(){ee()&&(Vo("touchstart",Du,{passive:!0}),Vo("touchend",rp,{passive:!0})),function dZ(n){return n.split(/\s+/).filter(Boolean)}(_.props.trigger).forEach(function(E){if("manual"!==E)switch(Vo(E,Du),E){case"mouseenter":Vo("mouseleave",rp);break;case"focus":Vo(bZ?"focusout":"blur",Eu);break;case"focusin":Vo("focusout",Eu)}})}function tp(){h.forEach(function(E){E.node.removeEventListener(E.eventType,E.handler,E.options)}),h=[]}function Du(E){var V,oe=!1;if(_.state.isEnabled&&!wu(E)&&!a){var je="focus"===(null==(V=u)?void 0:V.type);u=E,g=E.currentTarget,Ie(),!_.state.isVisible&&function eb(n){return J_(n,"MouseEvent")}(E)&&Ah.forEach(function(Te){return Te(E)}),"click"===E.type&&(_.props.trigger.indexOf("mouseenter")<0||s)&&!1!==_.props.hideOnClick&&_.state.isVisible?oe=!0:Su(E),"click"===E.type&&(s=!oe),oe&&!je&&xs(E)}}function np(E){var V=E.target,oe=K().contains(V)||D.contains(V);"mousemove"===E.type&&oe||function gZ(n,e){var t=e.clientX,r=e.clientY;return n.every(function(i){var o=i.popperRect,s=i.popperState,l=i.props.interactiveBorder,c=function Vk(n){return n.split("-")[0]}(s.placement),u=s.modifiersData.offset;return!u||o.top-r+("bottom"===c?u.top.y:0)>l||r-o.bottom-("top"===c?u.bottom.y:0)>l||o.left-t+("right"===c?u.left.x:0)>l||t-o.right-("left"===c?u.right.x:0)>l})}(Ho().concat(D).map(function(Te){var Tn,dl=null==(Tn=Te._tippy.popperInstance)?void 0:Tn.state;return dl?{popperRect:Te.getBoundingClientRect(),popperState:dl,props:t}:null}).filter(Boolean),E)&&(In(),xs(E))}function rp(E){if(!(wu(E)||_.props.trigger.indexOf("click")>=0&&s)){if(_.props.interactive)return void _.hideWithInteractivity(E);xs(E)}}function Eu(E){_.props.trigger.indexOf("focusin")<0&&E.target!==K()||_.props.interactive&&E.relatedTarget&&D.contains(E.relatedTarget)||xs(E)}function wu(E){return!!Di.isTouch&&ee()!==E.type.indexOf("touch")>=0}function ip(){op();var E=_.props,V=E.popperOptions,oe=E.placement,je=E.offset,Te=E.getReferenceClientRect,Tn=E.moveTransition,Cr=re()?xh(D).arrow:null,dl=Te?{getBoundingClientRect:Te,contextElement:Te.contextElement||K()}:n,As=[{name:"offset",options:{offset:je}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!Tn}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(up){var fl=up.state;if(re()){var Db=ie().box;["placement","reference-hidden","escaped"].forEach(function(dp){"placement"===dp?Db.setAttribute("data-placement",fl.placement):fl.attributes.popper["data-popper-"+dp]?Db.setAttribute("data-"+dp,""):Db.removeAttribute("data-"+dp)}),fl.attributes.popper={}}}}];re()&&Cr&&As.push({name:"arrow",options:{element:Cr,padding:3}}),As.push.apply(As,(null==V?void 0:V.modifiers)||[]),_.popperInstance=lZ(dl,D,Object.assign({},V,{placement:oe,onFirstUpdate:f,modifiers:As}))}function op(){_.popperInstance&&(_.popperInstance.destroy(),_.popperInstance=null)}function Ho(){return tl(D.querySelectorAll("[data-tippy-root]"))}function Su(E){_.clearDelayTimeouts(),E&&Be("onTrigger",[_,E]),$r();var V=Z(!0),oe=z(),Te=oe[1];Di.isTouch&&"hold"===oe[0]&&Te&&(V=Te),V?r=setTimeout(function(){_.show()},V):_.show()}function xs(E){if(_.clearDelayTimeouts(),Be("onUntrigger",[_,E]),_.state.isVisible){if(!(_.props.trigger.indexOf("mouseenter")>=0&&_.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(E.type)>=0&&s)){var V=Z(!1);V?i=setTimeout(function(){_.state.isVisible&&_.hide()},V):o=requestAnimationFrame(function(){_.hide()})}}else Qi()}}function Lo(n,e){void 0===e&&(e={});var t=Ln.plugins.concat(e.plugins||[]);!function yZ(){document.addEventListener("touchstart",mZ,Po),window.addEventListener("blur",vZ)}();var r=Object.assign({},e,{plugins:t}),a=function pZ(n){return Th(n)?[n]:function hZ(n){return J_(n,"NodeList")}(n)?tl(n):Array.isArray(n)?n:tl(document.querySelectorAll(n))}(n).reduce(function(l,c){var u=c&&xZ(c,r);return u&&l.push(u),l},[]);return Th(n)?a[0]:a}Lo.defaultProps=Ln,Lo.setDefaultProps=function(e){Object.keys(e).forEach(function(r){Ln[r]=e[r]})},Lo.currentInput=Di,Object.assign({},Ek,{effect:function(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow)}}),Lo.setDefaultProps({render:t1});const hu=Lo,ob="menuFloating";class LZ{constructor({editor:e,element:t,view:r,tippyOptions:i,render:o,command:s,key:a}){this.invalidNodes=["codeBlock","blockquote"],this.mousedownHandler=l=>{l.preventDefault(),this.editor.chain().insertContent("/").run()},this.editor=e,this.element=t,this.view=r,this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",()=>{this.tippy.unmount(),this.update(this.editor.view)}),this.element.style.visibility="visible",this.render=o,this.command=s,this.key=a,this.createTooltip(i)}createTooltip(e={}){this.tippy=hu(this.view.dom,Object.assign({duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"left",hideOnClick:"toggle"},e))}update(e,t){var r,i;const{selection:o}=e.state,{$anchor:s,empty:a,from:l,to:c}=o,f=1===s.depth&&!o.$anchor.parent.isLeaf&&!o.$anchor.parent.textContent,h=s.parent.type.name,p=null===(r=this.key)||void 0===r?void 0:r.getState(e.state),g=t?null===(i=this.key)||void 0===i?void 0:i.getState(t):null;if((null==g?void 0:g.open)||a&&f)if((null==g?void 0:g.open)||!this.invalidNodes.includes(h))if(this.tippy.setProps({getReferenceClientRect:()=>Wc(e,l,c)}),this.show(),p.open){const{from:m,to:y}=this.editor.state.selection,v=Wc(this.view,m,y);this.render().onStart({clientRect:()=>v,range:{from:m,to:y},editor:this.editor,command:this.command})}else g&&g.open&&this.render().onExit(null);else this.hide();else this.hide()}show(){this.tippy.show()}hide(){this.tippy.hide()}destroy(){this.tippy.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler)}}const o1=new Ct(ob),BZ=n=>new rt({key:o1,view:e=>new LZ(Object.assign({key:o1,view:e},n)),state:{init:()=>({open:!1}),apply(e){const t=e.getMeta(ob);return(null==t?void 0:t.open)?{open:null==t?void 0:t.open}:{open:!1}}},props:{handleKeyDown(e,t){const{open:r,range:i}=this.getState(e.state);return!!r&&n.render().onKeyDown({event:t,range:i,view:e})}}});let jZ=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=Et({type:n,selectors:[["dotcms-action-button"]],decls:3,vars:0,consts:[[1,"material-icons"]],template:function(t,r){1&t&&(H(0,"button")(1,"i",0),Ye(2,"add"),W()())},styles:["[_nghost-%COMP%]{display:block}button[_ngcontent-%COMP%]{all:unset;cursor:pointer;border:solid 1px #eee;width:32px;height:32px;display:flex;align-items:center;justify-content:center;color:#666;background:#ffffff}"]}),n})();const VZ=["data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTYuNjMyODEgMjJWMjEuMDE1Nkw3LjkwNjI1IDIwLjc5NjlWMTEuODM1OUw2LjYzMjgxIDExLjYxNzJWMTAuNjI1SDEwLjcxODhWMTEuNjE3Mkw5LjQ0NTMxIDExLjgzNTlWMTUuNzY1NkgxNC44ODI4VjExLjgzNTlMMTMuNjA5NCAxMS42MTcyVjEwLjYyNUgxNy42OTUzVjExLjYxNzJMMTYuNDIxOSAxMS44MzU5VjIwLjc5NjlMMTcuNjk1MyAyMS4wMTU2VjIySDEzLjYwOTRWMjEuMDE1NkwxNC44ODI4IDIwLjc5NjlWMTYuOTc2Nkg5LjQ0NTMxVjIwLjc5NjlMMTAuNzE4OCAyMS4wMTU2VjIySDYuNjMyODFaTTE5LjI3MzQgMjJWMjEuMDE1NkwyMS4wMzEyIDIwLjc5NjlWMTIuMjczNEwxOS4yNDIyIDEyLjMwNDdWMTEuMzQzOEwyMi41NzAzIDEwLjYyNVYyMC43OTY5TDI0LjMyMDMgMjEuMDE1NlYyMkgxOS4yNzM0WiIgZmlsbD0iIzIyMjIyMiIvPgo8L3N2Zz4K","data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTUuNjMyODEgMjJWMjEuMDE1Nkw2LjkwNjI1IDIwLjc5NjlWMTEuODM1OUw1LjYzMjgxIDExLjYxNzJWMTAuNjI1SDkuNzE4NzVWMTEuNjE3Mkw4LjQ0NTMxIDExLjgzNTlWMTUuNzY1NkgxMy44ODI4VjExLjgzNTlMMTIuNjA5NCAxMS42MTcyVjEwLjYyNUgxNi42OTUzVjExLjYxNzJMMTUuNDIxOSAxMS44MzU5VjIwLjc5NjlMMTYuNjk1MyAyMS4wMTU2VjIySDEyLjYwOTRWMjEuMDE1NkwxMy44ODI4IDIwLjc5NjlWMTYuOTc2Nkg4LjQ0NTMxVjIwLjc5NjlMOS43MTg3NSAyMS4wMTU2VjIySDUuNjMyODFaTTE4LjA4NTkgMjJWMjAuOTQ1M0wyMS44MTI1IDE2LjgwNDdDMjIuMjU1MiAxNi4zMDk5IDIyLjYwMTYgMTUuODg4IDIyLjg1MTYgMTUuNTM5MUMyMy4xMDE2IDE1LjE4NDkgMjMuMjc2IDE0Ljg2NDYgMjMuMzc1IDE0LjU3ODFDMjMuNDc0IDE0LjI5MTcgMjMuNTIzNCAxMy45OTQ4IDIzLjUyMzQgMTMuNjg3NUMyMy41MjM0IDEzLjExOTggMjMuMzUxNiAxMi42NDMyIDIzLjAwNzggMTIuMjU3OEMyMi42NjQxIDExLjg2NzIgMjIuMTcxOSAxMS42NzE5IDIxLjUzMTIgMTEuNjcxOUMyMC44NjQ2IDExLjY3MTkgMjAuMzQzOCAxMS44NzI0IDE5Ljk2ODggMTIuMjczNEMxOS41OTkgMTIuNjc0NSAxOS40MTQxIDEzLjI0MjIgMTkuNDE0MSAxMy45NzY2SDE3LjkzNzVMMTcuOTIxOSAxMy45Mjk3QzE3LjkwNjIgMTMuMjczNCAxOC4wNDQzIDEyLjY4NDkgMTguMzM1OSAxMi4xNjQxQzE4LjYyNzYgMTEuNjM4IDE5LjA0OTUgMTEuMjI0IDE5LjYwMTYgMTAuOTIxOUMyMC4xNTg5IDEwLjYxNDYgMjAuODIwMyAxMC40NjA5IDIxLjU4NTkgMTAuNDYwOUMyMi4zMDQ3IDEwLjQ2MDkgMjIuOTIxOSAxMC41OTkgMjMuNDM3NSAxMC44NzVDMjMuOTU4MyAxMS4xNDU4IDI0LjM1OTQgMTEuNTE4MiAyNC42NDA2IDExLjk5MjJDMjQuOTIxOSAxMi40NjYxIDI1LjA2MjUgMTMuMDEwNCAyNS4wNjI1IDEzLjYyNUMyNS4wNjI1IDE0LjI1IDI0Ljg3NzYgMTQuODcyNCAyNC41MDc4IDE1LjQ5MjJDMjQuMTQzMiAxNi4xMTIgMjMuNjI3NiAxNi43ODEyIDIyLjk2MDkgMTcuNUwxOS45Njg4IDIwLjc1NzhMMTkuOTg0NCAyMC43OTY5SDI0LjAyMzRMMjQuMTQ4NCAxOS40OTIySDI1LjQ1MzFWMjJIMTguMDg1OVoiIGZpbGw9IiMyMjIyMjIiLz4KPC9zdmc+Cg==","data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTUuNjMyODEgMjJWMjEuMDE1Nkw2LjkwNjI1IDIwLjc5NjlWMTEuODM1OUw1LjYzMjgxIDExLjYxNzJWMTAuNjI1SDkuNzE4NzVWMTEuNjE3Mkw4LjQ0NTMxIDExLjgzNTlWMTUuNzY1NkgxMy44ODI4VjExLjgzNTlMMTIuNjA5NCAxMS42MTcyVjEwLjYyNUgxNi42OTUzVjExLjYxNzJMMTUuNDIxOSAxMS44MzU5VjIwLjc5NjlMMTYuNjk1MyAyMS4wMTU2VjIySDEyLjYwOTRWMjEuMDE1NkwxMy44ODI4IDIwLjc5NjlWMTYuOTc2Nkg4LjQ0NTMxVjIwLjc5NjlMOS43MTg3NSAyMS4wMTU2VjIySDUuNjMyODFaTTIxLjQ2ODggMjIuMTY0MUMyMC43NzYgMjIuMTY0MSAyMC4xNTg5IDIyLjAzOTEgMTkuNjE3MiAyMS43ODkxQzE5LjA3NTUgMjEuNTMzOSAxOC42NTEgMjEuMTc0NSAxOC4zNDM4IDIwLjcxMDlDMTguMDQxNyAyMC4yNDIyIDE3Ljg5ODQgMTkuNjg3NSAxNy45MTQxIDE5LjA0NjlMMTcuOTM3NSAxOUgxOS40MDYyQzE5LjQwNjIgMTkuNTk5IDE5LjU4ODUgMjAuMDc1NSAxOS45NTMxIDIwLjQyOTdDMjAuMzIyOSAyMC43ODM5IDIwLjgyODEgMjAuOTYwOSAyMS40Njg4IDIwLjk2MDlDMjIuMTE5OCAyMC45NjA5IDIyLjYzMDIgMjAuNzgzOSAyMyAyMC40Mjk3QzIzLjM2OTggMjAuMDc1NSAyMy41NTQ3IDE5LjU1MjEgMjMuNTU0NyAxOC44NTk0QzIzLjU1NDcgMTguMTU2MiAyMy4zOTA2IDE3LjYzOCAyMy4wNjI1IDE3LjMwNDdDMjIuNzM0NCAxNi45NzE0IDIyLjIxNjEgMTYuODA0NyAyMS41MDc4IDE2LjgwNDdIMjAuMTY0MVYxNS42MDE2SDIxLjUwNzhDMjIuMTkwMSAxNS42MDE2IDIyLjY3MTkgMTUuNDMyMyAyMi45NTMxIDE1LjA5MzhDMjMuMjM5NiAxNC43NSAyMy4zODI4IDE0LjI3MzQgMjMuMzgyOCAxMy42NjQxQzIzLjM4MjggMTIuMzM1OSAyMi43NDQ4IDExLjY3MTkgMjEuNDY4OCAxMS42NzE5QzIwLjg2OTggMTEuNjcxOSAyMC4zODggMTEuODQ5IDIwLjAyMzQgMTIuMjAzMUMxOS42NjQxIDEyLjU1MjEgMTkuNDg0NCAxMy4wMTgyIDE5LjQ4NDQgMTMuNjAxNkgxOC4wMDc4TDE3Ljk5MjIgMTMuNTU0N0MxNy45NzY2IDEyLjk4MTggMTguMTEyIDEyLjQ2MDkgMTguMzk4NCAxMS45OTIyQzE4LjY5MDEgMTEuNTIzNCAxOS4wOTkgMTEuMTUxIDE5LjYyNSAxMC44NzVDMjAuMTU2MiAxMC41OTkgMjAuNzcwOCAxMC40NjA5IDIxLjQ2ODggMTAuNDYwOUMyMi41MjA4IDEwLjQ2MDkgMjMuMzU5NCAxMC43NDIyIDIzLjk4NDQgMTEuMzA0N0MyNC42MDk0IDExLjg2MiAyNC45MjE5IDEyLjY1ODkgMjQuOTIxOSAxMy42OTUzQzI0LjkyMTkgMTQuMTY0MSAyNC43Nzg2IDE0LjYzMjggMjQuNDkyMiAxNS4xMDE2QzI0LjIxMDkgMTUuNTY1MSAyMy43ODY1IDE1LjkxOTMgMjMuMjE4OCAxNi4xNjQxQzIzLjkwMSAxNi4zODggMjQuMzgyOCAxNi43Mzk2IDI0LjY2NDEgMTcuMjE4OEMyNC45NTA1IDE3LjY5NzkgMjUuMDkzOCAxOC4yMzQ0IDI1LjA5MzggMTguODI4MUMyNS4wOTM4IDE5LjUyMDggMjQuOTM3NSAyMC4xMTcyIDI0LjYyNSAyMC42MTcyQzI0LjMxNzcgMjEuMTEyIDIzLjg5MDYgMjEuNDk0OCAyMy4zNDM4IDIxLjc2NTZDMjIuNzk2OSAyMi4wMzEyIDIyLjE3MTkgMjIuMTY0MSAyMS40Njg4IDIyLjE2NDFaIiBmaWxsPSIjMjIyMjIyIi8+Cjwvc3ZnPgo="],qZ=new mv(document),KZ=[...Array(3).keys()].map(n=>{const e=n+1;return{label:`Heading ${e}`,icon:ws(VZ[n]),id:`heading${e}`,attributes:{level:e}}});function ws(n){return qZ.bypassSecurityTrustUrl(n)}const s1=[...KZ,{label:"Paragraph",icon:ws("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTYuNDc0NjEgMTZWMTUuMjYxN0w3LjQyOTY5IDE1LjA5NzdWOC4zNzY5NUw2LjQ3NDYxIDguMjEyODlWNy40Njg3NUgxMC4zOTQ1QzExLjMwNDcgNy40Njg3NSAxMi4wMTE3IDcuNzAzMTIgMTIuNTE1NiA4LjE3MTg4QzEzLjAyMzQgOC42NDA2MiAxMy4yNzczIDkuMjU3ODEgMTMuMjc3MyAxMC4wMjM0QzEzLjI3NzMgMTAuNzk2OSAxMy4wMjM0IDExLjQxNiAxMi41MTU2IDExLjg4MDlDMTIuMDExNyAxMi4zNDU3IDExLjMwNDcgMTIuNTc4MSAxMC4zOTQ1IDEyLjU3ODFIOC41ODM5OFYxNS4wOTc3TDkuNTM5MDYgMTUuMjYxN1YxNkg2LjQ3NDYxWk04LjU4Mzk4IDExLjY3NThIMTAuMzk0NUMxMC45NzI3IDExLjY3NTggMTEuNDA0MyAxMS41MjE1IDExLjY4OTUgMTEuMjEyOUMxMS45Nzg1IDEwLjkwMDQgMTIuMTIzIDEwLjUwNzggMTIuMTIzIDEwLjAzNTJDMTIuMTIzIDkuNTYyNSAxMS45Nzg1IDkuMTY3OTcgMTEuNjg5NSA4Ljg1MTU2QzExLjQwNDMgOC41MzUxNiAxMC45NzI3IDguMzc2OTUgMTAuMzk0NSA4LjM3Njk1SDguNTgzOThWMTEuNjc1OFoiIGZpbGw9IiMyMjIyMjIiLz4KPHJlY3QgeD0iMTUiIHk9IjE0IiB3aWR0aD0iMTEiIGhlaWdodD0iMSIgZmlsbD0iIzIyMjIyMiIvPgo8cmVjdCB4PSI2IiB5PSIxOCIgd2lkdGg9IjIwIiBoZWlnaHQ9IjEiIGZpbGw9IiMyMjIyMjIiLz4KPHJlY3QgeD0iNiIgeT0iMjIiIHdpZHRoPSIyMCIgaGVpZ2h0PSIxIiBmaWxsPSIjMjIyMjIyIi8+Cjwvc3ZnPgo="),id:"paragraph"},{label:"List Ordered",icon:ws("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTYuNzA4OTggMjAuNTMxMlYxOS43OTNMOC4wMjczNCAxOS42Mjg5VjEzLjIzNjNMNi42ODU1NSAxMy4yNTk4VjEyLjUzOTFMOS4xODE2NCAxMlYxOS42Mjg5TDEwLjQ5NDEgMTkuNzkzVjIwLjUzMTJINi43MDg5OFoiIGZpbGw9IiMyMjIyMjIiLz4KPHBhdGggZD0iTTExLjc5NDkgMjAuNTMxMlYxOS4zNDc3SDEyLjk0OTJWMjAuNTMxMkgxMS43OTQ5WiIgZmlsbD0iIzIyMjIyMiIvPgo8cmVjdCB4PSIxNSIgeT0iMTMiIHdpZHRoPSIxMSIgaGVpZ2h0PSIxIiBmaWxsPSIjMjIyMjIyIi8+CjxyZWN0IHg9IjE1IiB5PSIxNiIgd2lkdGg9IjExIiBoZWlnaHQ9IjEiIGZpbGw9IiMyMjIyMjIiLz4KPHJlY3QgeD0iMTUiIHk9IjE5IiB3aWR0aD0iMTEiIGhlaWdodD0iMSIgZmlsbD0iIzIyMjIyMiIvPgo8L3N2Zz4K"),id:"orderedList"},{label:"List Unordered",icon:ws("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgeD0iMTQiIHk9IjEyIiB3aWR0aD0iMTIiIGhlaWdodD0iMSIgZmlsbD0iIzIyMjIyMiIvPgo8cmVjdCB4PSIxNCIgeT0iMTUiIHdpZHRoPSIxMiIgaGVpZ2h0PSIxIiBmaWxsPSIjMjIyMjIyIi8+CjxyZWN0IHg9IjE0IiB5PSIxOCIgd2lkdGg9IjEyIiBoZWlnaHQ9IjEiIGZpbGw9IiMyMjIyMjIiLz4KPGNpcmNsZSBjeD0iOC41IiBjeT0iMTUuNSIgcj0iMi41IiBmaWxsPSIjMjIyMjIyIi8+Cjwvc3ZnPgo="),id:"bulletList"},{label:"Blockquote",icon:ws("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTcuNjI1IDEzQzcuMTI1IDEzIDYuNzI1IDEyLjg1IDYuNDI1IDEyLjU1QzYuMTQxNjcgMTIuMjMzMyA2IDExLjggNiAxMS4yNUM2IDEwLjAzMzMgNi4zNzUgOC45NjY2NyA3LjEyNSA4LjA1QzcuNDU4MzMgNy42MTY2NyA3LjgzMzMzIDcuMjY2NjcgOC4yNSA3TDkgNy44NzVDOC43NjY2NyA4LjA0MTY3IDguNTMzMzMgOC4yNTgzMyA4LjMgOC41MjVDNy44NSA5LjAwODMzIDcuNjI1IDkuNSA3LjYyNSAxMEM4LjAwODMzIDEwIDguMzMzMzMgMTAuMTQxNyA4LjYgMTAuNDI1QzguODY2NjcgMTAuNzA4MyA5IDExLjA2NjcgOSAxMS41QzkgMTEuOTMzMyA4Ljg2NjY3IDEyLjI5MTcgOC42IDEyLjU3NUM4LjMzMzMzIDEyLjg1ODMgOC4wMDgzMyAxMyA3LjYyNSAxM1pNMTEuNjI1IDEzQzExLjEyNSAxMyAxMC43MjUgMTIuODUgMTAuNDI1IDEyLjU1QzEwLjE0MTcgMTIuMjMzMyAxMCAxMS44IDEwIDExLjI1QzEwIDEwLjAzMzMgMTAuMzc1IDguOTY2NjcgMTEuMTI1IDguMDVDMTEuNDU4MyA3LjYxNjY3IDExLjgzMzMgNy4yNjY2NyAxMi4yNSA3TDEzIDcuODc1QzEyLjc2NjcgOC4wNDE2NyAxMi41MzMzIDguMjU4MzMgMTIuMyA4LjUyNUMxMS44NSA5LjAwODMzIDExLjYyNSA5LjUgMTEuNjI1IDEwQzEyLjAwODMgMTAgMTIuMzMzMyAxMC4xNDE3IDEyLjYgMTAuNDI1QzEyLjg2NjcgMTAuNzA4MyAxMyAxMS4wNjY3IDEzIDExLjVDMTMgMTEuOTMzMyAxMi44NjY3IDEyLjI5MTcgMTIuNiAxMi41NzVDMTIuMzMzMyAxMi44NTgzIDEyLjAwODMgMTMgMTEuNjI1IDEzWiIgZmlsbD0iIzIyMjIyMiIvPgo8cmVjdCB4PSIxNSIgeT0iMTQiIHdpZHRoPSIxMSIgaGVpZ2h0PSIxIiBmaWxsPSIjMjIyMjIyIi8+CjxyZWN0IHg9IjYiIHk9IjE4IiB3aWR0aD0iMjAiIGhlaWdodD0iMSIgZmlsbD0iIzIyMjIyMiIvPgo8cmVjdCB4PSI2IiB5PSIyMiIgd2lkdGg9IjIwIiBoZWlnaHQ9IjEiIGZpbGw9IiMyMjIyMjIiLz4KPC9zdmc+Cg=="),id:"blockquote"},{label:"Code Block",icon:ws("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEzLjQgMjAuNkw4LjggMTZMMTMuNCAxMS40TDEyIDEwTDYgMTZMMTIgMjJMMTMuNCAyMC42Wk0xOC42IDIwLjZMMjMuMiAxNkwxOC42IDExLjRMMjAgMTBMMjYgMTZMMjAgMjJMMTguNiAyMC42WiIgZmlsbD0iYmxhY2siLz4KPC9zdmc+Cg=="),id:"codeBlock"},{label:"Horizontal Line",icon:ws("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgeD0iNiIgeT0iMTUiIHdpZHRoPSIyMCIgaGVpZ2h0PSIyIiBmaWxsPSJibGFjayIvPgo8L3N2Zz4K"),id:"horizontalLine"}],JZ=[{name:"flip",options:{fallbackPlacements:["top"]}},{name:"preventOverflow",options:{altAxis:!1,tether:!1}}];function a1({editor:n,range:e,props:t}){const r={dotContent:()=>{n.chain().addContentletBlock({range:e,payload:t.payload}).run()},heading:()=>{n.chain().addHeading({range:e,type:t.type}).run()},orderedList:()=>{n.chain().deleteRange(e).toggleOrderedList().focus().run()},bulletList:()=>{n.chain().deleteRange(e).toggleBulletList().focus().run()},blockquote:()=>{n.chain().deleteRange(e).setBlockquote().focus().run()},codeBlock:()=>{n.chain().deleteRange(e).setCodeBlock().focus().run()},horizontalLine:()=>{n.chain().deleteRange(e).setHorizontalRule().focus().run()}};r[t.type.name]?r[t.type.name]():n.chain().setTextSelection(e).focus().run()}const tY=n=>{let e,t;const r=new Ct("suggestionPlugin"),i=new Me;function o({editor:l,range:c,clientRect:u}){t=function XZ(n){const e=n.createComponent(fk);return e.changeDetectorRef.detectChanges(),e}(n),t.instance.currentLanguage=l.storage.dotConfig.lang,t.instance.allowedContentTypes=l.storage.dotConfig.allowedContentTypes,t.instance.onSelection=d=>{var f;const h=(null===(f=r.getState(l.view.state).query)||void 0===f?void 0:f.length)||0;c.to=c.to+h,a1({editor:l,range:c,props:d})},t.instance.clearFilter.pipe(yI(i)).subscribe(d=>{const f={to:c.to+r.getState(l.view.state).query.length,from:d===hn.BLOCK?c.from:c.from+1};l.chain().deleteRange(f).run()}),e=function eY({element:n,content:e,rect:t,onHide:r}){return hu(n,{appendTo:document.body,content:e,placement:"bottom",popperOptions:{modifiers:JZ},getReferenceClientRect:t,showOnCreate:!0,interactive:!0,offset:[120,10],trigger:"manual",maxWidth:"none",onHide:r})}({element:l.view.dom,content:t.location.nativeElement,rect:u,onHide:()=>{const d=l.state.tr.setMeta(ob,{open:!1});l.view.dispatch(d)}})}function s({event:l}){const{key:c}=l;return"Escape"===c?(e.hide(),!0):"Enter"===c?(t.instance.execCommand(),!0):("ArrowDown"===c||"ArrowUp"===c)&&(t.instance.updateSelection(l),!0)}function a(){null==e||e.destroy(),t.destroy(),i.next(!0),i.complete()}return Tt.create({name:"actionsMenu",defaultOptions:{pluginKey:"actionsMenu",element:null,suggestion:{char:"/",pluginKey:r,allowSpaces:!0,startOfLine:!0,render:()=>({onStart:o,onKeyDown:s,onExit:a}),items:({query:l})=>(t&&t.instance.filterItems(l),[])}},addCommands:()=>({addHeading:({range:l,type:c})=>({chain:u})=>u().focus().deleteRange(l).toggleHeading({level:c.level}).focus().run(),addContentletBlock:({range:l,payload:c})=>({chain:u})=>u().deleteRange(l).command(d=>{const f=d.editor.schema.nodes.dotContent.create({data:c});return d.tr.replaceSelectionWith(f),!0}).focus().run()}),addProseMirrorPlugins(){const l=n.createComponent(jZ);return[BZ({command:a1,editor:this.editor,element:l.location.nativeElement,render:()=>({onStart:o,onKeyDown:s,onExit:a})}),iK(Object.assign({editor:this.editor},this.options.suggestion))]}})};class nY{constructor(e,t,r){this.applicationRef=t.get(Xo);const o=t.get(Ri).resolveComponentFactory(e);this.componentRef=o.create(t,[]),this.updateProps(r),this.applicationRef.attachView(this.componentRef.hostView)}get instance(){return this.componentRef.instance}get elementRef(){return this.componentRef.injector.get(_t)}get dom(){return this.elementRef.nativeElement}updateProps(e){Object.entries(e).forEach(([t,r])=>{this.instance[t]=r})}detectChanges(){this.componentRef.changeDetectorRef.detectChanges()}destroy(){this.componentRef.destroy(),this.applicationRef.detachView(this.componentRef.hostView)}}let sb=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=Et({type:n,selectors:[["ng-component"]],inputs:{editor:"editor",node:"node",decorations:"decorations",selected:"selected",extension:"extension",getPos:"getPos",updateAttributes:"updateAttributes",deleteNode:"deleteNode"},decls:0,vars:0,template:function(t,r){},encapsulation:2}),n})();class rY extends class R5{constructor(e,t,r){this.isDragging=!1,this.component=e,this.editor=t.editor,this.options=S({stopEvent:null,ignoreMutation:null},r),this.extension=t.extension,this.node=t.node,this.decorations=t.decorations,this.getPos=t.getPos,this.mount()}mount(){}get dom(){return null}get contentDOM(){return null}onDragStart(e){var t,r,i,o,s,a,l;const{view:c}=this.editor,u=e.target,d=3===u.nodeType?null===(t=u.parentElement)||void 0===t?void 0:t.closest("[data-drag-handle]"):u.closest("[data-drag-handle]");if(!this.dom||(null===(r=this.contentDOM)||void 0===r?void 0:r.contains(u))||!d)return;let f=0,h=0;if(this.dom!==d){const m=this.dom.getBoundingClientRect(),y=d.getBoundingClientRect(),v=null!==(i=e.offsetX)&&void 0!==i?i:null===(o=e.nativeEvent)||void 0===o?void 0:o.offsetX,b=null!==(s=e.offsetY)&&void 0!==s?s:null===(a=e.nativeEvent)||void 0===a?void 0:a.offsetY;f=y.x-m.x+v,h=y.y-m.y+b}null===(l=e.dataTransfer)||void 0===l||l.setDragImage(this.dom,f,h);const p=ne.create(c.state.doc,this.getPos()),g=c.state.tr.setSelection(p);c.dispatch(g)}stopEvent(e){var t;if(!this.dom)return!1;if("function"==typeof this.options.stopEvent)return this.options.stopEvent({event:e});const r=e.target;if(!this.dom.contains(r)||(null===(t=this.contentDOM)||void 0===t?void 0:t.contains(r)))return!1;const o="drop"===e.type;if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(r.tagName)||r.isContentEditable)&&!o)return!0;const{isEditable:a}=this.editor,{isDragging:l}=this,c=!!this.node.type.spec.draggable,u=ne.isSelectable(this.node),d="copy"===e.type,f="paste"===e.type,h="cut"===e.type,p="mousedown"===e.type,g=e.type.startsWith("drag");if(!c&&u&&g&&e.preventDefault(),c&&g&&!l)return e.preventDefault(),!1;if(c&&a&&!l&&p){const m=r.closest("[data-drag-handle]");m&&(this.dom===m||this.dom.contains(m))&&(this.isDragging=!0,document.addEventListener("dragend",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("mouseup",()=>{this.isDragging=!1},{once:!0}))}return!(l||o||d||f||h||p&&u)}ignoreMutation(e){return!this.dom||!this.contentDOM||("function"==typeof this.options.ignoreMutation?this.options.ignoreMutation({mutation:e}):!(!this.node.isLeaf&&!this.node.isAtom&&("selection"===e.type||this.dom.contains(e.target)&&"childList"===e.type&&$f()&&this.editor.isFocused&&[...Array.from(e.addedNodes),...Array.from(e.removedNodes)].every(r=>r.isContentEditable)||(this.contentDOM!==e.target||"attributes"!==e.type)&&this.contentDOM.contains(e.target))))}updateAttributes(e){this.editor.commands.command(({tr:t})=>{const r=this.getPos();return t.setNodeMarkup(r,void 0,S(S({},this.node.attrs),e)),!0})}deleteNode(){const e=this.getPos();this.editor.commands.deleteRange({from:e,to:e+this.node.nodeSize})}}{mount(){this.renderer=new nY(this.component,this.options.injector,{editor:this.editor,node:this.node,decorations:this.decorations,selected:!1,extension:this.extension,getPos:()=>this.getPos(),updateAttributes:(r={})=>this.updateAttributes(r),deleteNode:()=>this.deleteNode()}),this.extension.config.draggable&&(this.renderer.elementRef.nativeElement.ondragstart=r=>{this.onDragStart(r)}),this.contentDOMElement=this.node.isLeaf?null:document.createElement(this.node.isInline?"span":"div"),this.contentDOMElement&&(this.contentDOMElement.style.whiteSpace="inherit",this.renderer.detectChanges())}get dom(){return this.renderer.dom}get contentDOM(){return this.node.isLeaf?null:(this.maybeMoveContentDOM(),this.contentDOMElement)}maybeMoveContentDOM(){const e=this.dom.querySelector("[data-node-view-content]");this.contentDOMElement&&e&&!e.contains(this.contentDOMElement)&&e.appendChild(this.contentDOMElement)}update(e,t){return this.options.update?this.options.update(e,t):e.type===this.node.type&&(e===this.node&&this.decorations===t||(this.node=e,this.decorations=t,this.renderer.updateProps({node:e,decorations:t}),this.maybeMoveContentDOM()),!0)}selectNode(){this.renderer.updateProps({selected:!0})}deselectNode(){this.renderer.updateProps({selected:!1})}destroy(){this.renderer.destroy()}}const l1=(n,e)=>t=>new rY(n,t,e);function iY(n,e){if(1&n&&(H(0,"a",2),$t(1,"img",3),W()),2&n){const t=U();k("href",t.href,so),N(1),k("src",t.data.asset,so)("alt",t.data.name)}}function oY(n,e){if(1&n&&$t(0,"img",4),2&n){const t=U();k("src",t.data.asset,so)("alt",t.data.name)}}let sY=(()=>{class n extends sb{constructor(t){super(),this._elementRef=t}ngOnInit(){this.data=this.node.attrs.data,this.editor.on("update",this.updateImageAttributes.bind(this)),this.updateImageAttributes()}ngOnDestroy(){this.editor.off("update",this.updateImageAttributes.bind(this))}updateImageAttributes(){this._elementRef.nativeElement.style.textAlign=this.node.attrs.textAlign,this.href=this.node.attrs.href}}return n.\u0275fac=function(t){return new(t||n)(w(_t))},n.\u0275cmp=Et({type:n,selectors:[["dotcms-image-block"]],features:[xe],decls:3,vars:2,consts:[["target","_blank","rel","noreferrer",3,"href",4,"ngIf","ngIfElse"],["noLink",""],["target","_blank","rel","noreferrer",3,"href"],[3,"src","alt"],["loading","lazy",3,"src","alt"]],template:function(t,r){if(1&t&&(q(0,iY,2,3,"a",0),q(1,oY,1,2,"ng-template",null,1,Jo)),2&t){const i=co(2);k("ngIf",r.href)("ngIfElse",i)}},directives:[ho],styles:["[_nghost-%COMP%]{display:block;margin-bottom:1rem}[_nghost-%COMP%] img[_ngcontent-%COMP%]{max-width:100%}"]}),n})();const aY=n=>fn.create({name:"dotImage",group:"block",inline:!1,draggable:!0,addAttributes:()=>({data:{default:null,parseHTML:e=>e.getAttribute("data"),renderHTML:e=>({data:e.data})},href:{default:null,parseHTML:e=>e.getAttribute("href"),renderHTML:e=>({href:e.href})}}),addCommands:()=>({setImageLink:e=>({commands:t})=>t.updateAttributes("dotImage",e),unsetImageLink:()=>({commands:e})=>e.updateAttributes("dotImage",{href:""})}),parseHTML:()=>[{tag:"dotcms-image-block"}],renderHTML:({HTMLAttributes:e})=>["dotcms-image-block",xt(e)],addNodeView:()=>l1(sY,{injector:n})});let lY=(()=>{class n extends sb{}return n.\u0275fac=function(){let e;return function(r){return(e||(e=jt(n)))(r||n)}}(),n.\u0275cmp=Et({type:n,selectors:[["dotcms-message"]],features:[xe],decls:2,vars:2,consts:[[3,"ngClass"]],template:function(t,r){1&t&&(H(0,"span",0),Ye(1),W()),2&t&&(k("ngClass",r.data.type),N(1),An(r.data.message))},directives:[uc],styles:["dotcms-message{background-color:#b3b1b8;display:block;padding:1rem}\n"],encapsulation:2}),n})();const ab=new rt({state:{init:()=>Oe.empty,apply(n,e){e=e.map(n.mapping,n.doc);const t=n.getMeta(this);if(t&&t.add){const r=Dt.widget(t.add.pos,t.add.element,{id:t.add.id});e=e.add(n.doc,[r])}else t&&t.remove&&(e=e.remove(e.find(null,null,r=>r.id==t.remove.id)));return e}},props:{decorations(n){return this.getState(n)}}}),cY=(n,e)=>Tt.create({name:"imageUpload",addProseMirrorPlugins(){const t=n.get(uk),r=this.editor;function i(c){let u;if(u="drop"===c.type?c.dataTransfer.files:c.clipboardData.files,u.length>0)for(let d=0;d{const g={attrs:{data:h[0][Object.keys(h[0])[0]]},type:"dotImage"};r.commands.insertContentAt(d,g)},h=>alert(h.message),()=>function a(c){const{view:u}=r,{state:d}=u;u.dispatch(d.tr.setMeta(ab,{remove:{id:c}}))}(f))}return[ab,new rt({key:new Ct("imageUpload"),props:{handleDOMEvents:{paste(c,u){if(i(u)){if(1!==u.clipboardData.files.length)return alert("Can paste just one image at a time"),!1;const{from:d}=function l(c){const{state:u}=c,{selection:d}=u,{ranges:f}=d;return{from:Math.min(...f.map(g=>g.$from.pos)),to:Math.max(...f.map(g=>g.$to.pos))}}(c);s(c,Array.from(u.clipboardData.files),d)}return!1},drop(c,u){if(i(u)){if(u.preventDefault(),1!==u.dataTransfer.files.length)return alert("Can drop just one image at a time"),!1;const{pos:d}=c.posAtCoords({left:u.clientX,top:u.clientY});s(c,Array.from(u.dataTransfer.files),d)}return!1}}}})]}});let uY=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=Et({type:n,selectors:[["dotcms-drag-handler"]],decls:2,vars:0,consts:[[1,"material-icons"]],template:function(t,r){1&t&&(H(0,"i",0),Ye(1,"drag_indicator"),W())},styles:["[_nghost-%COMP%]{position:absolute;cursor:grab;z-index:1;opacity:0;color:var(--color-background);transition:opacity .25s,top .15s}.visible[_nghost-%COMP%]{opacity:1}"]}),n})();const dY=n=>Tt.create({name:"dragHandler",addProseMirrorPlugins(){let e=null;const i=n.createComponent(uY).location.nativeElement;function c(p){for(var g,m;p&&p.parentNode&&!(null===(g=p.classList)||void 0===g?void 0:g.contains("ProseMirror"))&&!(null===(m=p.parentNode.classList)||void 0===m?void 0:m.contains("ProseMirror"));)p=p.parentNode;return p}function f(){i.classList.remove("visible")}return[new rt({key:new Ct("dragHandler"),view:p=>(requestAnimationFrame(()=>function d(p){i.setAttribute("draggable","true"),i.addEventListener("dragstart",g=>function l(p,g){if(!p.dataTransfer)return;const y=function a(p,g){const m=g.posAtCoords(p);if(m){const y=c(g.nodeDOM(m.inside));if(y&&1===y.nodeType){const v=g.docView.nearestDesc(y,!0);if(v&&v!==g.docView)return v.posBefore}}return null}({left:p.clientX+50,top:p.clientY},g);if(null!=y){g.dispatch(g.state.tr.setSelection(ne.create(g.state.doc,y)));const v=g.state.selection.content();p.dataTransfer.clearData(),p.dataTransfer.setDragImage(e,10,10),g.dragging={slice:v,move:!0}}}(g,p)),i.classList.remove("visible"),p.dom.parentElement.appendChild(i)}(p)),document.body.addEventListener("scroll",f,!0),{destroy(){(function s(p){p&&p.parentNode&&p.parentNode.removeChild(p)})(i),document.body.removeEventListener("scroll",f,!0)}}),props:{handleDOMEvents:{drop:()=>(setTimeout(()=>{const p=document.querySelector(".ProseMirror-hideselection");p&&p.classList.remove("ProseMirror-hideselection"),i.classList.remove("visible")}),!1),mousemove(p,g){const y=p.posAtCoords({left:g.clientX+50,top:g.clientY});if(y&&function u(p,g){const m=p.nodeDOM(g);return!(!(null==m?void 0:m.hasChildNodes())||1===m.childNodes.length&&"BR"==m.childNodes[0].nodeName)}(p,y.inside))if(e=c(p.nodeDOM(y.inside)),function h(p){var g;return p&&!(null===(g=p.classList)||void 0===g?void 0:g.contains("ProseMirror"))&&!p.innerText.startsWith("/")}(e)){const{top:v,left:b}=function o(p,g){return{top:g.getBoundingClientRect().top-p.getBoundingClientRect().top,left:g.getBoundingClientRect().left-p.getBoundingClientRect().left}}(p.dom.parentElement,e);i.style.left=b-25+"px",i.style.top=v<0?0:v+"px",i.classList.add("visible")}else i.classList.remove("visible");else e=null,i.classList.remove("visible");return!1}}}})]}}),fY=["input"];function hY(n,e){if(1&n){const t=ni();H(0,"div",6)(1,"div",7)(2,"span",8),Ye(3,"LINKED TO"),W(),H(4,"div",9)(5,"a",10)(6,"span",11),Ye(7,"language"),W(),Ye(8),Id(9,"slice"),W()()(),H(10,"div",12)(11,"button",13),Le("click",function(){return Bt(t),U().copyLink()}),Ye(12," COPY LINK "),W(),H(13,"button",14),Le("click",function(){return Bt(t),U().removeLink.emit(!0)}),Ye(14," REMOVE LINK "),W()()()}if(2&n){const t=U();N(5),k("href",t.nodeLink,so),N(3),uo(" ",t.nodeLink.length>50?function bw(n,e,t,r,i){const o=n+20,s=T(),a=Ls(s,o);return nc(s,o)?vw(s,vn(),e,a.transform,t,r,i,a):a.transform(t,r,i)}(9,2,t.nodeLink,0,50)+"...":t.nodeLink," ")}}let pY=(()=>{class n{constructor(){this.hideForm=new Ae(!1),this.removeLink=new Ae(!1),this.setLink=new Ae,this.nodeLink="",this.newLink=""}addLink(){this.setLink.emit(this.newLink)}copyLink(){navigator.clipboard.writeText(this.nodeLink).then(()=>this.hideForm.emit(!0)).catch(()=>alert("Could not copy link"))}focusInput(){this.input.nativeElement.focus()}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=Et({type:n,selectors:[["dotcms-bubble-menu-link-form"]],viewQuery:function(t,r){if(1&t&&xd(fY,5),2&t){let i;qn(i=Kn())&&(r.input=i.first)}},inputs:{nodeLink:"nodeLink",newLink:"newLink"},outputs:{hideForm:"hideForm",removeLink:"removeLink",setLink:"setLink"},decls:7,vars:2,consts:[[1,"form-container"],["autoComplete","off",3,"mousedown","submit"],["name","link","placeholder","Type or Paste Link","type","text",3,"ngModel","ngModelChange"],["input",""],["click","addLink()",1,"btn","btn-add"],["class","card-container",4,"ngIf"],[1,"card-container"],[1,"card-header"],[1,"linked-to"],[1,"link-container"],["target","_blank",1,"link",3,"href"],[1,"material-icons"],[1,"card-footer"],[1,"btn","btn-copy",3,"click"],[1,"btn","btn-remove",3,"click"]],template:function(t,r){1&t&&(H(0,"div",0)(1,"form",1),Le("mousedown",function(){return r.focusInput()})("submit",function(){return r.addLink()}),H(2,"input",2,3),Le("ngModelChange",function(o){return r.newLink=o}),W(),H(4,"button",4),Ye(5,"ADD"),W()(),q(6,hY,15,6,"div",5),W()),2&t&&(N(2),k("ngModel",r.newLink),N(4),k("ngIf",r.nodeLink))},directives:[LM,DM,ff,ef,bv,hf,ho],pipes:[PS],styles:[".form-container[_ngcontent-%COMP%]{background:#ffffff;border-radius:2px;box-shadow:0 4px 10px #0a07251a;display:flex;flex-direction:column;padding:.5rem;width:400px}form[_ngcontent-%COMP%]{align-items:center;display:flex;flex-direction:row;gap:.5rem;justify-content:space-between;width:100%}form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{background:#FFFFFF;border-radius:2px;border:1px solid #B3B1B8;box-sizing:border-box;padding:.85rem;width:calc(100% - 5.5rem)}form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus{outline:none}.card-container[_ngcontent-%COMP%]{padding:.5rem}.card-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding-bottom:.75rem;padding-top:1rem}.linked-to[_ngcontent-%COMP%]{color:#7e7a86;font-size:.85rem;font-weight:500}.link-container[_ngcontent-%COMP%]{cursor:pointer;white-space:nowrap;word-wrap:normal}.link-container[_ngcontent-%COMP%]:hover{background-color:#f1f3f4}.link[_ngcontent-%COMP%]{align-items:center;color:#0a0725;display:flex;font-size:1rem;gap:.5rem;height:100%;justify-content:flex-start;padding:.5rem 0;text-decoration:none;width:100%}.card-footer[_ngcontent-%COMP%]{align-items:center;display:flex;justify-content:space-between}.btn[_ngcontent-%COMP%]{align-items:center;background:#ffffff;border-radius:2px;cursor:pointer;display:flex;font-weight:700;justify-content:center;padding:.85rem 1rem;width:180px}.btn-add[_ngcontent-%COMP%]{width:5.5rem;background:#576BE8;border:1px solid #576BE8;color:#fff}.btn-copy[_ngcontent-%COMP%]{border:1px solid #576BE8;color:#576be8}.btn-remove[_ngcontent-%COMP%]{border:1px solid #EC4B41;color:#ec4b41}"]}),n})();class gY{constructor({editor:e,element:t,view:r,tippyOptions:i={},pluginKey:o,storage:s,component:a}){this.focusHandler=()=>{var l;(null===(l=this.tippy)||void 0===l?void 0:l.state.isVisible)&&this.hide()},this.editor=e,this.element=t,this.view=r,this.tippyOptions=i,this.element.remove(),this.element.style.visibility="visible",this.pluginKey=o,this.component=a,this.storage=s,this.editor.on("focus",this.focusHandler),this.setComponentEvents(),document.body.addEventListener("scroll",this.hanlderScroll.bind(this),!0)}update(e,t){var r;const i=this.pluginKey.getState(e.state),o=this.pluginKey.getState(t);i.toggle!==o.toggle?(this.createTooltip(),(null===(r=this.tippy)||void 0===r?void 0:r.state.isVisible)?this.hide():this.show(),this.detectLinkFormChanges()):this.detectLinkFormChanges()}createTooltip(){const{element:e}=this.editor.options;this.tippy||!e.parentElement||(this.tippy=hu(e,Object.assign({appendTo:document.body,duration:250,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"bottom-start",hideOnClick:"toggle"},this.tippyOptions)))}show(){var e,t;null===(e=this.tippy)||void 0===e||e.show(),this.setInputValues(),this.focusInput(),null===(t=this.tippy)||void 0===t||t.setProps({getReferenceClientRect:()=>this.setTippyPosition()})}hide(){var e;null===(e=this.tippy)||void 0===e||e.hide(),this.editor.view.focus(),this.editor.commands.unsetHighlight()}setTippyPosition(){const{view:e}=this.editor,{state:t}=e,{doc:r,selection:i}=t,{ranges:o}=i,s=Math.min(...o.map(g=>g.$from.pos)),l=Wc(e,s,Math.max(...o.map(g=>g.$to.pos))),{element:c}=this.editor.options,u=c.parentElement.getBoundingClientRect(),d=document.querySelector("#bubble-menu").getBoundingClientRect(),f=u.bottomthis.hide()),this.component.instance.removeLink.subscribe(()=>this.removeLink()),this.component.instance.setLink.subscribe(e=>this.addLink(e))}detectLinkFormChanges(){this.component.changeDetectorRef.detectChanges()}getNodeLink(){return this.editor.isActive("link")?this.editor.getAttributes("link").href:this.editor.getAttributes("dotImage").href||""}getLinkSelect(){const{state:e}=this.editor,{from:t,to:r}=e.selection,i=e.doc.textBetween(t,r," ");return this.isLink(i)?i:""}isLink(e){return!!new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i").test(e)}isDotImageNode(){const{type:e}=this.editor.state.doc.nodeAt(this.editor.state.selection.from);return"dotImage"===e.name}destroy(){var e;null===(e=this.tippy)||void 0===e||e.destroy(),this.editor.off("focus",this.focusHandler)}hanlderScroll(){var e,t;(null===(e=this.tippy)||void 0===e?void 0:e.state.isVisible)&&(null===(t=this.tippy)||void 0===t||t.hide())}}const mY=n=>new rt({key:n.pluginKey,view:e=>new gY(Object.assign({view:e},n)),state:{init:()=>({toggle:!0}),apply:e=>(e.getMeta(n.pluginKey),{toggle:n.storage.show})}}),vY=new Ct("addLink"),yY=(n,e)=>Tt.create({name:"bubbleLinkForm",defaultOptions:{element:null,tippyOptions:{},pluginKey:vY},addStorage:()=>({show:!0}),addCommands(){return{toogleLinkForm:()=>({commands:t})=>(this.storage.show=!this.storage.show,t.setHighlight())}},addProseMirrorPlugins(){const t=e.createComponent(pY);return t.changeDetectorRef.detectChanges(),[mY({pluginKey:this.options.pluginKey,editor:this.editor,element:t.location.nativeElement,tippyOptions:this.options.tippyOptions,storage:this.storage,component:t})]}});class c1{constructor({editor:e,element:t,view:r,tippyOptions:i={},shouldShow:o}){this.preventHide=!1,this.shouldShow=({view:s,state:a,from:l,to:c})=>{const{doc:u,selection:d}=a,{empty:f}=d,h=!u.textBetween(l,c).length&&n_(a.selection);return!(!s.hasFocus()||f||h)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:s})=>{var a;this.preventHide?this.preventHide=!1:(null==s?void 0:s.relatedTarget)&&(null===(a=this.element.parentNode)||void 0===a?void 0:a.contains(s.relatedTarget))||this.hide()},this.editor=e,this.element=t,this.view=r,o&&(this.shouldShow=o),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=i,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:e}=this.editor.options;this.tippy||!e.parentElement||(this.tippy=hu(e,S({duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"top",hideOnClick:"toggle"},this.tippyOptions)),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",r=>{this.blurHandler({event:r})}))}update(e,t){var r,i,o;const{state:s,composing:a}=e,{doc:l,selection:c}=s,u=t&&t.doc.eq(l)&&t.selection.eq(c);if(a||u)return;this.createTooltip();const{ranges:d}=c,f=Math.min(...d.map(g=>g.$from.pos)),h=Math.max(...d.map(g=>g.$to.pos));(null===(r=this.shouldShow)||void 0===r?void 0:r.call(this,{editor:this.editor,view:e,state:s,oldState:t,from:f,to:h}))?(null===(i=this.tippy)||void 0===i||i.setProps({getReferenceClientRect:(null===(o=this.tippyOptions)||void 0===o?void 0:o.getReferenceClientRect)||(()=>{if(SA(s.selection)){const g=e.nodeDOM(f);if(g)return g.getBoundingClientRect()}return Wc(e,f,h)})}),this.show()):this.hide()}show(){var e;null===(e=this.tippy)||void 0===e||e.show()}hide(){var e;null===(e=this.tippy)||void 0===e||e.hide()}destroy(){var e;null===(e=this.tippy)||void 0===e||e.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const _Y=n=>new rt({key:"string"==typeof n.pluginKey?new Ct(n.pluginKey):n.pluginKey,view:e=>new c1(S({view:e},n))}),bY=Tt.create({name:"bubbleMenu",addOptions:()=>({element:null,tippyOptions:{},pluginKey:"bubbleMenu",shouldShow:null}),addProseMirrorPlugins(){return this.options.element?[_Y({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow})]:[]}}),CY=({editor:n,state:e,from:t,to:r})=>{const{doc:i,selection:o}=e,{empty:s}=o,a=n.state.doc.nodeAt(n.state.selection.from),l=!i.textBetween(t,r).length&&n_(e.selection);return!(!n.isFocused||s||l||"dotContent"==(null==a?void 0:a.type.name))},u1=n=>n.isActive("bulletList")||n.isActive("orderedList"),EY=[{icon:"format_bold",markAction:"bold",active:!1},{icon:"format_underlined",markAction:"underline",active:!1},{icon:"format_italic",markAction:"italic",active:!1},{icon:"strikethrough_s",markAction:"strike",active:!1,divider:!0},{icon:"format_align_left",markAction:"left",active:!1},{icon:"format_align_center",markAction:"center",active:!1},{icon:"format_align_right",markAction:"right",active:!1,divider:!0},{icon:"format_list_bulleted",markAction:"bulletList",active:!1},{icon:"format_list_numbered",markAction:"orderedList",active:!1},{icon:"format_indent_decrease",markAction:"outdent",active:!1},{icon:"format_indent_increase",markAction:"indent",active:!1,divider:!0},{icon:"link",markAction:"link",active:!1,divider:!0},{icon:"format_clear",markAction:"clearAll",active:!1,divider:!0},{icon:"delete",markAction:"deleteNode",active:!1}],wY=[{icon:"format_align_left",markAction:"left",active:!1},{icon:"format_align_center",markAction:"center",active:!1},{icon:"format_align_right",markAction:"right",active:!1,divider:!0},{icon:"link",markAction:"link",active:!1,divider:!0},{icon:"delete",markAction:"deleteNode",active:!1,divider:!1}],SY=[{name:"offset",options:{offset:[0,5]}},{name:"flip",options:{fallbackPlacements:["bottom-start","top-start"]}},{name:"preventOverflow",options:{altAxis:!0,tether:!0}}],d1=(n,e)=>{let r,t=n.depth;do{if(r=n.node(t),r){if(Array.isArray(e)&&e.includes(r.type.name))break;t--}}while(t>0&&r);return r},MY=n=>{const e=n.component.instance,t=n.changeToComponent.instance;return new rt({key:"string"==typeof n.pluginKey?new Ct(n.pluginKey):n.pluginKey,view:r=>new IY(Object.assign({view:r},n)),props:{handleKeyDown(r,i){const{key:o}=i;if(t.isOpen){if("Escape"===o)return e.toggleChangeTo.emit(),!0;if("Enter"===o)return t.execCommand(),!0;if("ArrowDown"===o||"ArrowUp"===o)return t.updateSelection(i),!0}return!1}}})};class IY extends c1{constructor(e){super(e),this.shouldShowProp=!1,this.updateActiveItems=(i=[],o)=>i.map(s=>(s.active=o.includes(s.markAction),s)),this.enabledMarks=()=>[...Object.keys(this.editor.schema.marks),...Object.keys(this.editor.schema.nodes)],this.setActiveMarks=(i=[])=>[...this.enabledMarks().filter(o=>this.editor.isActive(o)),...i.filter(o=>this.editor.isActive({textAlign:o}))];const{component:t,changeToComponent:r}=e;this.component=t,this.changeTo=r,this.changeToElement=this.changeTo.location.nativeElement,this.component.instance.command.subscribe(this.exeCommand.bind(this)),this.component.instance.toggleChangeTo.subscribe(this.toggleChangeTo.bind(this)),this.changeTo.instance.items=this.setChangeToOptions(),this.changeTo.instance.title="Change To",this.changeToElement.remove(),this.changeTo.changeDetectorRef.detectChanges(),document.body.addEventListener("scroll",this.hanlderScroll.bind(this),!0),document.body.addEventListener("mouseup",this.showMenu.bind(this),!0),document.body.addEventListener("keyup",this.showMenu.bind(this),!0)}showMenu(){var e;this.shouldShowProp&&(null===(e=this.tippyChangeTo)||void 0===e||e.setProps({getReferenceClientRect:()=>{var t;return null===(t=this.tippy)||void 0===t?void 0:t.popper.getBoundingClientRect()}}),this.show())}update(e,t){var r,i,o;const{state:s,composing:a}=e,{doc:l,selection:c}=s,u=t&&t.doc.eq(l)&&t.selection.eq(c);if(a||u)return;this.createTooltip(),this.createChangeToTooltip();const{ranges:d}=c;this.selectionRange=d[0],this.selectionNodesCount=0,l.nodesBetween(this.selectionRange.$from.pos,this.selectionRange.$to.pos,(p,g)=>{p.isBlock&&this.selectionNodesCount++});const f=Math.min(...d.map(p=>p.$from.pos)),h=Math.max(...d.map(p=>p.$to.pos));if(this.shouldShowProp=null===(r=this.shouldShow)||void 0===r?void 0:r.call(this,{editor:this.editor,view:e,state:s,oldState:t,from:f,to:h}),!this.shouldShowProp)return this.hide(),void(null===(i=this.tippyChangeTo)||void 0===i||i.hide());null===(o=this.tippy)||void 0===o||o.setProps({getReferenceClientRect:()=>{if(SA(c)){const p=e.nodeDOM(f);if(p)return((n,e)=>{const t=n.getElementsByTagName("img")[0];return"dotImage"===e&&t?t.getBoundingClientRect():n.getBoundingClientRect()})(p,l.nodeAt(f).type.name)}return Wc(e,f,h)}}),this.updateComponent(),this.setMenuItems(l,f)}destroy(){var e,t;null===(e=this.tippy)||void 0===e||e.destroy(),null===(t=this.tippyChangeTo)||void 0===t||t.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.component.instance.command.unsubscribe(),this.component.instance.toggleChangeTo.unsubscribe(),this.component.destroy(),this.changeTo.destroy(),document.body.removeEventListener("scroll",this.hanlderScroll.bind(this),!0),document.body.removeEventListener("mouseup",this.showMenu.bind(this),!0),document.body.removeEventListener("keyup",this.showMenu.bind(this),!0)}updateComponent(){const{items:e}=this.component.instance,r=this.setActiveMarks(["left","center","right"]);this.setSelectedNodeItem(),this.component.instance.items=this.updateActiveItems(e,r),this.component.changeDetectorRef.detectChanges()}setMenuItems(e,t){const r=e.nodeAt(t),i="dotImage"==(null==r?void 0:r.type.name);this.selectionNode=r,this.component.instance.items=i?wY:EY}exeCommand(e){const{markAction:t,active:r}=e;switch(t){case"bold":this.editor.commands.toggleBold();break;case"italic":this.editor.commands.toggleItalic();break;case"strike":this.editor.commands.toggleStrike();break;case"underline":this.editor.commands.toggleUnderline();break;case"left":case"center":case"right":this.toggleTextAlign(t,r);break;case"bulletList":this.editor.commands.toggleBulletList();break;case"orderedList":this.editor.commands.toggleOrderedList();break;case"indent":u1(this.editor)&&this.editor.commands.sinkListItem("listItem");break;case"outdent":u1(this.editor)&&this.editor.commands.liftListItem("listItem");break;case"link":this.editor.commands.toogleLinkForm();break;case"deleteNode":this.selectionNodesCount>1?this.deleteByRange():this.deleteByNode();break;case"clearAll":this.editor.commands.unsetAllMarks(),this.editor.commands.clearNodes()}}toggleTextAlign(e,t){t?this.editor.commands.unsetTextAlign():this.editor.commands.setTextAlign(e)}setChangeToOptions(){const e=s1.filter(r=>"horizontalLine"!=r.id),t={heading1:()=>{this.editor.chain().focus().clearNodes().setHeading({level:1}).run()},heading2:()=>{this.editor.chain().focus().clearNodes().setHeading({level:2}).run()},heading3:()=>{this.editor.chain().focus().clearNodes().setHeading({level:3}).run()},paragraph:()=>{this.editor.chain().focus().clearNodes().setParagraph().run()},orderedList:()=>{this.editor.chain().focus().clearNodes().toggleOrderedList().run()},bulletList:()=>{this.editor.chain().focus().clearNodes().toggleBulletList().run()},blockquote:()=>{this.editor.chain().focus().clearNodes().toggleBlockquote().run()},codeBlock:()=>{this.editor.chain().focus().clearNodes().toggleCodeBlock().run()}};return e.forEach(r=>{r.isActive=()=>r.id.includes("heading")?this.editor.isActive("heading",r.attributes):this.editor.isActive(r.id),r.command=()=>{t[r.id](),this.tippyChangeTo.hide(),this.setSelectedNodeItem()}}),e}setSelectedNodeItem(){const e=this.changeTo.instance.items,t=e.filter(i=>null==i?void 0:i.isActive()),r=t.length>1?t[1]:t[0];this.changeTo.instance.updateActiveItem(e.findIndex(i=>i===r)),this.component.instance.selected=(null==r?void 0:r.label)||""}createChangeToTooltip(){const{element:e}=this.editor.options;this.tippyChangeTo||!e||(this.tippyChangeTo=hu(e,Object.assign(Object.assign({},this.tippyOptions),{appendTo:document.body,getReferenceClientRect:null,content:this.changeToElement,placement:"bottom-start",duration:0,hideOnClick:!1,popperOptions:{modifiers:SY},onHide:()=>{this.changeTo.instance.isOpen=!1},onShow:()=>{this.changeTo.instance.isOpen=!0,this.setSelectedNodeItem()}})))}toggleChangeTo(){var e,t;this.tippyChangeTo.state.isVisible?null===(e=this.tippyChangeTo)||void 0===e||e.hide():null===(t=this.tippyChangeTo)||void 0===t||t.show()}hanlderScroll(){var e,t;(null===(e=this.tippyChangeTo)||void 0===e?void 0:e.state.isVisible)&&(null===(t=this.tippyChangeTo)||void 0===t||t.hide())}deleteByNode(){LY.includes(this.selectionNode.type.name)?this.deleteSelectedCustomNodeType():this.deleteSelectionNode()}deleteByRange(){const e=this.selectionRange.$from.pos,t=this.selectionRange.$to.pos+1;this.editor.chain().deleteRange({from:e,to:t}).blur().run()}deleteSelectedCustomNodeType(){const e=this.selectionRange.$from.pos,t=e+1;this.editor.chain().deleteRange({from:e,to:t}).blur().run()}deleteSelectionNode(){const e=d1(this.selectionRange.$from);switch(e.type.name){case Ei.ORDERED_LIST:case Ei.BULLET_LIST:const r=d1(this.selectionRange.$from,[Ei.ORDERED_LIST,Ei.BULLET_LIST]),{childCount:i}=r;i>1?this.editor.chain().deleteNode(Ei.LIST_ITEM).blur().run():this.editor.chain().deleteNode(r.type).blur().run();break;default:this.editor.chain().deleteNode(e.type).blur().run()}}}const TY={duration:500,maxWidth:"none",placement:"top-start",trigger:"manual",interactive:!0};function xY(n){const e=n.createComponent(eK),t=e.location.nativeElement,r=n.createComponent(fk),i=r.location.nativeElement;return bY.extend({addOptions:()=>({element:null,tippyOptions:TY,pluginKey:"bubbleMenu",shouldShow:CY}),addProseMirrorPlugins(){return t?[MY({component:e,changeToComponent:r,pluginKey:this.options.pluginKey,editor:this.editor,element:t,changeToElement:i,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow})]:[]}})}let AY=(()=>{class n{transform({live:t,working:r,deleted:i,hasLiveVersion:o}){return{live:t,working:r,deleted:i,hasLiveVersion:o}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275pipe=mn({name:"contentletState",type:n,pure:!0}),n})();function OY(n,e){if(1&n&&$t(0,"dot-contentlet-thumbnail",3),2&n){const t=U();k("width",94)("height",94)("iconSize","72px")("contentlet",t.data)}}function kY(n,e){if(1&n&&(H(0,"h3"),Ye(1),W()),2&n){const t=U();N(1),An(t.data.title)}}function NY(n,e){if(1&n&&(H(0,"span"),Ye(1),W()),2&n){const t=U();N(1),An(t.data.contentType)}}function RY(n,e){if(1&n&&(H(0,"div",4),$t(1,"dot-state-icon",5),Id(2,"contentletState"),H(3,"dot-badge",6),Ye(4),Id(5,"lowercase"),W()()),2&n){const t=U();N(1),k("state",Dm(2,3,t.data)),N(2),k("bordered",!0),N(1),An(Dm(5,5,t.data.language))}}let PY=(()=>{class n extends sb{ngOnInit(){this.data=this.node.attrs.data}}return n.\u0275fac=function(){let e;return function(r){return(e||(e=jt(n)))(r||n)}}(),n.\u0275cmp=Et({type:n,selectors:[["dotcms-contentlet-block"]],features:[xe],decls:5,vars:2,consts:[["pTemplate","header"],[4,"pTemplate"],["pTemplate","footer"],[3,"width","height","iconSize","contentlet"],[1,"state"],["size","16px",3,"state"],[3,"bordered"]],template:function(t,r){1&t&&(H(0,"p-card"),q(1,OY,1,4,"ng-template",0),q(2,kY,2,1,"h3",1),q(3,NY,2,1,"span",1),q(4,RY,6,7,"ng-template",2),W()),2&t&&(N(2),k("pTemplate","title"),N(1),k("pTemplate","subtitle"))},directives:[t7,jv],pipes:[AY,NS],styles:["dotcms-contentlet-block{display:block;height:100%;width:100%;box-sizing:border-box;margin-bottom:1rem}.p-card{background:#ffffff;border:1px solid #b3b1b8;color:#0a0725;display:flex}.p-card .p-card-header{box-sizing:border-box;min-width:110px;padding:.5rem;width:110px}.p-card .p-card-body{box-sizing:border-box;min-width:100px;padding:1rem 1.5rem 1rem 1rem;flex:1}.p-card .p-card-body .p-card-content{padding:0}.p-card .p-card-content{padding:1rem 0}.p-card .p-card-title{overflow:hidden;width:100%}.p-card .p-card-title h3{font-size:1.5rem;overflow:hidden;font-weight:700;margin:0;margin-bottom:.5rem;text-overflow:ellipsis;white-space:nowrap}.p-card .p-card-subtitle{color:#7e7a86;font-size:.85rem;font-weight:regular;margin-bottom:1rem}.p-card dot-contentlet-thumbnail{align-items:center;display:block;position:relative;width:94px;height:94px}.p-card .state{align-items:center;display:flex}.p-card .state>*{margin-right:.5rem}.p-card .state>*:last-child{margin-right:0}\n"],encapsulation:2}),n})();const FY=n=>fn.create({name:"dotContent",group:"block",inline:!1,draggable:!0,addAttributes:()=>({data:{default:null,parseHTML:e=>({data:e.getAttribute("data")}),renderHTML:e=>({data:e.data})}}),parseHTML:()=>[{tag:"dotcms-contentlet-block"}],renderHTML:({HTMLAttributes:e})=>["dotcms-contentlet-block",xt(e)],addNodeView:()=>l1(PY,{injector:n})}),f1=1;var Ei=(()=>(function(n){n.DOT_IMAGE="dotImage",n.LIST_ITEM="listItem",n.BULLET_LIST="bulletList",n.ORDERED_LIST="orderedList",n.BLOCKQUOTE="blockquote",n.CODE_BLOCK="codeBlock",n.DOC="doc",n.DOT_CONTENT="dotContent",n.PARAGRAPH="paragraph",n.HARD_BREAK="hardBreak",n.HEADING="heading",n.HORIZONTAL_RULE="horizontalRule",n.TEXT="text"}(Ei||(Ei={})),Ei))();const LY=[Ei.DOT_IMAGE,Ei.DOT_CONTENT],BY=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))$/,jY=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))/g,VY=fi.create({name:"highlight",addOptions:()=>({multicolor:!1,HTMLAttributes:{}}),addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:n=>n.getAttribute("data-color")||n.style.backgroundColor,renderHTML:n=>n.color?{"data-color":n.color,style:`background-color: ${n.color}`}:{}}}:{}},parseHTML:()=>[{tag:"mark"}],renderHTML({HTMLAttributes:n}){return["mark",xt(this.options.HTMLAttributes,n),0]},addCommands(){return{setHighlight:n=>({commands:e})=>e.setMark(this.name,n),toggleHighlight:n=>({commands:e})=>e.toggleMark(this.name,n),unsetHighlight:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[ms({find:BY,type:this.type})]},addPasteRules(){return[xo({find:jY,type:this.type})]}});function lb(n){this.j={},this.jr=[],this.jd=null,this.t=n}lb.prototype={accepts:function(){return!!this.t},tt:function(e,t){if(t&&t.j)return this.j[e]=t,t;var r=t,i=this.j[e];if(i)return r&&(i.t=r),i;i=Ue();var o=Nh(this,e);return o?(Object.assign(i.j,o.j),i.jr.append(o.jr),i.jr=o.jd,i.t=r||o.t):i.t=r,this.j[e]=i,i}};var Ue=function(){return new lb},J=function(e){return new lb(e)},O=function(e,t,r){e.j[t]||(e.j[t]=r)},Ut=function(e,t,r){e.jr.push([t,r])},Nh=function(e,t){var r=e.j[t];if(r)return r;for(var i=0;i=s)return[];for(;o0&&void 0!==arguments[0]?arguments[0]:[],e=Ue(),t=J(_r),r=J(zr),i=Ue(),o=J("WS"),s=[[Cu,r],[yu,r],[_u,r],[bu,r]],a=function(){var _=J(zr);return _.j={"-":i},_.jr=[].concat(s),_},l=function(_){var C=a();return C.t=_,C};HY(e,[["'",J(Ph)],["{",J(rl)],["[",J(pu)],["<",J(gu)],["(",J(mu)],["}",J(Ms)],["]",J(il)],[">",J(ol)],[")",J(sl)],["&",J(Rh)],["*",J(Fh)],["@",J(al)],["`",J(Bh)],["^",J(jh)],[":",J(vu)],[",",J(db)],["$",J(Vh)],[".",J(Bo)],["=",J(Hh)],["!",J(fb)],["-",J(Uh)],["%",J(zh)],["|",J(Wh)],["+",J($h)],["#",J(Gh)],["?",J(qh)],['"',J(hb)],["/",J(Zi)],[";",J(pb)],["~",J(Kh)],["_",J(Zh)],["\\",J(Lh)]]),O(e,"\n",J("NL")),Ut(e,g1,o),O(o,"\n",Ue()),Ut(o,g1,o);for(var c=0;c2&&void 0!==arguments[2]?arguments[2]:{},r=Object.create(n.prototype);for(var i in t)r[i]=t[i];r.constructor=e,e.prototype=r}(Jh,t,e),t}Jh.prototype={t:"token",isLink:!1,toString:function(){return this.v},toHref:function(){return this.toString()},startIndex:function(){return this.tk[0].s},endIndex:function(){return this.tk[this.tk.length-1].e},toObject:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Xt.defaultProtocol;return{type:this.t,value:this.v,isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}}};var y1=Is("email",{isLink:!0}),gb=Is("email",{isLink:!0,toHref:function(){return"mailto:"+this.toString()}}),mb=Is("text"),_1=Is("nl"),jo=Is("url",{isLink:!0,toHref:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Xt.defaultProtocol,t=this.tk,r=!1,i=!1,o=[],s=0;t[s].t===nl;)r=!0,o.push(t[s].v),s++;for(;t[s].t===Zi;)i=!0,o.push(t[s].v),s++;for(;s=0&&f++,i++,u++;if(f<0)for(var h=i-u;h0&&(o.push(vb(mb,e,s)),s=[]);var p=d.t,g=t.slice((i-=f)-(u-=f),i);o.push(vb(p,e,g))}}return s.length>0&&o.push(vb(mb,e,s)),o}(ct.parser.start,n,function WY(n,e){for(var t=function $Y(n){for(var e=[],t=n.length,r=0;r56319||r+1===t||(o=n.charCodeAt(r+1))<56320||o>57343?n[r]:n.slice(r,r+2);e.push(s),r+=s.length}return e}(e.replace(/[A-Z]/g,function(h){return h.toLowerCase()})),r=t.length,i=[],o=0,s=0;s=0&&(d+=t[s].length,f++),c+=t[s].length,o+=t[s].length,s++;s-=f,i.push({t:u.t,v:e.substr((o-=d)-(c-=d),c),s:o-c,e:o})}return i}(ct.scanner.start,n))}function _b(n){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,t=b1(n),r=[],i=0;i1&&void 0!==arguments[1]?arguments[1]:null,t=b1(n);return 1===t.length&&t[0].isLink&&(!e||t[0].t===e)}function QY(n){return new rt({key:new Ct("autolink"),appendTransaction:(e,t,r)=>{const i=e.some(u=>u.docChanged)&&!t.doc.eq(r.doc),o=e.some(u=>u.getMeta("preventAutolink"));if(!i||o)return;const{tr:s}=r,a=function L5(n,e){const t=new gt(n);return e.forEach(r=>{r.steps.forEach(i=>{t.step(i)})}),t}(t.doc,e),{mapping:l}=a;return function H5(n){const{mapping:e,steps:t}=n,r=[];return e.maps.forEach((i,o)=>{const s=[];if(i.ranges.length)i.forEach((a,l)=>{s.push({from:a,to:l})});else{const{from:a,to:l}=t[o];if(void 0===a||void 0===l)return;s.push({from:a,to:l})}s.forEach(({from:a,to:l})=>{const c=e.slice(o).map(a,-1),u=e.slice(o).map(l),d=e.invert().map(c,-1),f=e.invert().map(u);r.push({oldRange:{from:d,to:f},newRange:{from:c,to:u}})})}),function V5(n){const e=function j5(n,e=JSON.stringify){const t={};return n.filter(r=>{const i=e(r);return!Object.prototype.hasOwnProperty.call(t,i)&&(t[i]=!0)})}(n);return 1===e.length?e:e.filter((t,r)=>!e.filter((o,s)=>s!==r).some(o=>t.oldRange.from>=o.oldRange.from&&t.oldRange.to<=o.oldRange.to&&t.newRange.from>=o.newRange.from&&t.newRange.to<=o.newRange.to))}(r)}(a).forEach(({oldRange:u,newRange:d})=>{Jf(u.from,u.to,t.doc).filter(f=>f.mark.type===n.type).forEach(f=>{const g=Jf(l.map(f.from),l.map(f.to),r.doc).filter(C=>C.mark.type===n.type);if(!g.length)return;const m=g[0],y=t.doc.textBetween(f.from,f.to,void 0," "),v=r.doc.textBetween(m.from,m.to,void 0," "),b=C1(y),_=C1(v);b&&!_&&s.removeMark(m.from,m.to,n.type)}),function B5(n,e,t){const r=[];return n.nodesBetween(e.from,e.to,(i,o)=>{t(i)&&r.push({node:i,pos:o})}),r}(r.doc,d,f=>f.isTextblock).forEach(f=>{_b(r.doc.textBetween(f.pos,f.pos+f.node.nodeSize,void 0," ")).filter(p=>p.isLink).filter(p=>!n.validate||n.validate(p.value)).map(p=>pn(S({},p),{from:f.pos+p.start+1,to:f.pos+p.end+1})).filter(p=>d.from>=p.from&&d.from<=p.to||d.to>=p.from&&d.to<=p.to).forEach(p=>{s.addMark(p.from,p.to,n.type.create({href:p.href}))})})}),s.steps.length?s:void 0}})}const eQ=fi.create({name:"link",priority:1e3,keepOnSplit:!1,inclusive(){return this.options.autolink},addOptions:()=>({openOnClick:!0,linkOnPaste:!0,autolink:!0,HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:void 0}),addAttributes(){return{href:{default:null},target:{default:this.options.HTMLAttributes.target},class:{default:this.options.HTMLAttributes.class}}},parseHTML:()=>[{tag:'a[href]:not([href *= "javascript:" i])'}],renderHTML({HTMLAttributes:n}){return["a",xt(this.options.HTMLAttributes,n),0]},addCommands(){return{setLink:n=>({chain:e})=>e().setMark(this.name,n).setMeta("preventAutolink",!0).run(),toggleLink:n=>({chain:e})=>e().toggleMark(this.name,n,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:n})=>n().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[xo({find:n=>_b(n).filter(e=>!this.options.validate||this.options.validate(e.value)).filter(e=>e.isLink).map(e=>({text:e.value,index:e.start,data:e})),type:this.type,getAttributes:n=>{var e;return{href:null===(e=n.data)||void 0===e?void 0:e.href}}})]},addProseMirrorPlugins(){const n=[];return this.options.autolink&&n.push(QY({type:this.type,validate:this.options.validate})),this.options.openOnClick&&n.push(function JY(n){return new rt({key:new Ct("handleClickLink"),props:{handleClick:(e,t,r)=>{var i;const o=mA(e.state,n.type.name);return!(!(null===(i=r.target)||void 0===i?void 0:i.closest("a"))||!o.href||(window.open(o.href,o.target),0))}}})}({type:this.type})),this.options.linkOnPaste&&n.push(function XY(n){return new rt({key:new Ct("handlePasteLink"),props:{handlePaste:(e,t,r)=>{const{state:i}=e,{selection:o}=i,{empty:s}=o;if(s)return!1;let a="";r.content.forEach(c=>{a+=c.textContent});const l=_b(a).find(c=>c.isLink&&c.value===a);return!(!a||!l||(n.editor.commands.setMark(n.type,{href:l.href}),0))}}})}({editor:this.editor,type:this.type})),n}}),tQ=Tt.create({name:"textAlign",addOptions:()=>({types:[],alignments:["left","center","right","justify"],defaultAlignment:"left"}),addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:n=>n.style.textAlign||this.options.defaultAlignment,renderHTML:n=>n.textAlign===this.options.defaultAlignment?{}:{style:`text-align: ${n.textAlign}`}}}}]},addCommands(){return{setTextAlign:n=>({commands:e})=>!!this.options.alignments.includes(n)&&this.options.types.every(t=>e.updateAttributes(t,{textAlign:n})),unsetTextAlign:()=>({commands:n})=>this.options.types.every(e=>n.resetAttributes(e,"textAlign"))}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}}),nQ=fi.create({name:"underline",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:n=>!!n.includes("underline")&&{}}],renderHTML({HTMLAttributes:n}){return["u",xt(this.options.HTMLAttributes,n),0]},addCommands(){return{setUnderline:()=>({commands:n})=>n.setMark(this.name),toggleUnderline:()=>({commands:n})=>n.toggleMark(this.name),unsetUnderline:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});let rQ=(()=>{class n{constructor(t,r){this.el=t,this._renderer=r,this.outputFormat="html",this.onChange=()=>{},this.onTouched=()=>{},this.handleChange=({transaction:i})=>{if(i.docChanged){if("html"===this.outputFormat)return void this.onChange(this.editor.getHTML());this.onChange(this.editor.getJSON())}}}writeValue(t){!t||(!this.outputFormat&&"string"==typeof t&&(this.outputFormat="html"),this.editor.chain().setContent(t,!1).run())}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.editor.setEditable(!t),this._renderer.setProperty(this.el.nativeElement,"disabled",t)}ngOnInit(){if(!this.editor)throw new Error("Required: Input `editor`");const t=this.el.nativeElement.innerHTML;this.el.nativeElement.innerHTML="",this.el.nativeElement.appendChild(this.editor.options.element.firstChild),this.editor.setOptions({element:this.el.nativeElement}),t&&this.editor.chain().setContent(t,!1).run(),this.editor.on("blur",()=>{this.onTouched()}),this.editor.on("transaction",this.handleChange)}ngOnDestroy(){this.editor.destroy()}}return n.\u0275fac=function(t){return new(t||n)(w(_t),w(oi))},n.\u0275dir=Y({type:n,selectors:[["tiptap","editor",""],["","tiptap","","editor",""],["tiptap-editor","editor",""],["","tiptapEditor","","editor",""]],inputs:{editor:"editor",outputFormat:"outputFormat"},features:[Qe([{provide:cr,useExisting:Ve(()=>n),multi:!0}])]}),n})(),oQ=(()=>{class n{constructor(t,r){this.injector=t,this.viewContainerRef=r,this.lang=f1,this.allowedContentTypes="",this.value=""}ngOnInit(){this.editor=new N5({extensions:[VG,FY(this.injector),aY(this.injector),tY(this.viewContainerRef),dY(this.viewContainerRef),cY(this.injector,this.viewContainerRef),yY(0,this.viewContainerRef),xY(this.viewContainerRef),nQ,tQ.configure({types:["heading","paragraph","listItem","dotImage"]}),VY.configure({HTMLAttributes:{style:"background: #accef7;"}}),eQ.configure({openOnClick:!0}),HG.configure({placeholder:({node:t})=>"heading"===t.type.name?`${function iQ(n){return n.replace(/\p{L}+('\p{L}+)?/gu,function(e){return e.charAt(0).toUpperCase()+e.slice(1)})}(t.type.name)} ${t.attrs.level}`:'Type "/" for commmands'})]}),this.setEditorStorageData()}setEditorStorageData(){this.editor.storage.dotConfig={lang:this.lang,allowedContentTypes:this.allowedContentTypes}}}return n.\u0275fac=function(t){return new(t||n)(w(yt),w(sr))},n.\u0275cmp=Et({type:n,selectors:[["dotcms-block-editor"]],inputs:{lang:"lang",allowedContentTypes:"allowedContentTypes"},decls:1,vars:2,consts:[[3,"editor","ngModel","ngModelChange"]],template:function(t,r){1&t&&(H(0,"tiptap-editor",0),Le("ngModelChange",function(o){return r.value=o}),W()),2&t&&k("editor",r.editor)("ngModel",r.value)},directives:[rQ,bv,hf],styles:['@import"https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400&display=swap";@import"https://fonts.googleapis.com/icon?family=Material+Icons";[_nghost-%COMP%]{border-radius:4px;display:block;height:500px;overflow-y:hidden;position:relative;outline:#b3b1b8 solid 1px;resize:vertical}[_nghost-%COMP%]:focus-within{outline-color:var(--color-main)}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] {display:block;height:100%;overflow-y:auto;width:100%}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror{box-sizing:border-box;display:block;min-height:100%;outline:none;padding:1rem 4rem;font:14px/1.3}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror ul, [_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror ol{margin:0;padding-inline-start:1rem;margin-left:1rem}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror ol li{list-style-type:decimal}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror ul li{list-style-type:disc}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror li{padding-top:.286em}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror li p{padding:0;margin:0}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror h1{font-size:2.43em;line-height:1.06em;padding-top:.176em;margin-bottom:.353em}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror h2{font-size:1.93em;line-height:1.33em;padding-top:.333em;margin-bottom:.333em}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror h3{font-size:1.57em;line-height:1.64em;padding-top:.5em;margin-bottom:.318em}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror h4{font-size:1.29em;line-height:2em;padding-top:.667em;margin-bottom:.333em}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror p{font-size:1em;line-height:1.29em;padding-top:.286em;margin-bottom:1em}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror blockquote{margin:1rem;border-left:3px solid rgba(10,7,37,.1);padding-left:1rem}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror pre{background:#0a0725;border-radius:.5rem;color:#fff;padding:.75rem 1rem}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror pre code{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;background:none;color:inherit;padding:0}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror .is-empty:before{color:#b3b1b8;content:attr(data-placeholder);float:left;height:0;pointer-events:none}']}),n})();const lQ=new class aQ extends Fr{}(class sQ extends vf{constructor(e,t){super(e,t),this.scheduler=e,this.work=t}schedule(e,t=0){return t>0?super.schedule(e,t):(this.delay=t,this.state=e,this.scheduler.flush(this),this)}execute(e,t){return t>0||this.closed?super.execute(e,t):this._execute(e,t)}requestAsyncId(e,t,r=0){return null!==r&&r>0||null===r&&this.delay>0?super.requestAsyncId(e,t,r):e.flush(this)}});class br{constructor(e,t,r){this.kind=e,this.value=t,this.error=r,this.hasValue="N"===e}observe(e){switch(this.kind){case"N":return e.next&&e.next(this.value);case"E":return e.error&&e.error(this.error);case"C":return e.complete&&e.complete()}}do(e,t,r){switch(this.kind){case"N":return e&&e(this.value);case"E":return t&&t(this.error);case"C":return r&&r()}}accept(e,t,r){return e&&"function"==typeof e.next?this.observe(e):this.do(e,t,r)}toObservable(){switch(this.kind){case"N":return se(this.value);case"E":return ck(this.error);case"C":return ih()}throw new Error("unexpected notification kind value")}static createNext(e){return void 0!==e?new br("N",e):br.undefinedValueNotification}static createError(e){return new br("E",void 0,e)}static createComplete(){return br.completeNotification}}br.completeNotification=new br("C"),br.undefinedValueNotification=new br("N",void 0);class Xh extends tt{constructor(e,t,r=0){super(e),this.scheduler=t,this.delay=r}static dispatch(e){const{notification:t,destination:r}=e;t.observe(r),this.unsubscribe()}scheduleMessage(e){this.destination.add(this.scheduler.schedule(Xh.dispatch,this.delay,new uQ(e,this.destination)))}_next(e){this.scheduleMessage(br.createNext(e))}_error(e){this.scheduleMessage(br.createError(e)),this.unsubscribe()}_complete(){this.scheduleMessage(br.createComplete()),this.unsubscribe()}}class uQ{constructor(e,t){this.notification=e,this.destination=t}}class dQ extends Me{constructor(e=Number.POSITIVE_INFINITY,t=Number.POSITIVE_INFINITY,r){super(),this.scheduler=r,this._events=[],this._infiniteTimeWindow=!1,this._bufferSize=e<1?1:e,this._windowTime=t<1?1:t,t===Number.POSITIVE_INFINITY?(this._infiniteTimeWindow=!0,this.next=this.nextInfiniteTimeWindow):this.next=this.nextTimeWindow}nextInfiniteTimeWindow(e){if(!this.isStopped){const t=this._events;t.push(e),t.length>this._bufferSize&&t.shift()}super.next(e)}nextTimeWindow(e){this.isStopped||(this._events.push(new fQ(this._getNow(),e)),this._trimBufferThenGetEvents()),super.next(e)}_subscribe(e){const t=this._infiniteTimeWindow,r=t?this._events:this._trimBufferThenGetEvents(),i=this.scheduler,o=r.length;let s;if(this.closed)throw new Uo;if(this.isStopped||this.hasError?s=ke.EMPTY:(this.observers.push(e),s=new Ib(this,e)),i&&e.add(e=new Xh(e,i)),t)for(let a=0;at&&(s=Math.max(s,o-t)),s>0&&i.splice(0,s),i}}class fQ{constructor(e,t){this.time=e,this.value=t}}const ep={schedule(n,e){const t=setTimeout(n,e);return()=>clearTimeout(t)},scheduleBeforeRender(n){if("undefined"==typeof window)return ep.schedule(n,0);if(void 0===window.requestAnimationFrame)return ep.schedule(n,16);const e=window.requestAnimationFrame(n);return()=>window.cancelAnimationFrame(e)}};let bb;function CQ(n,e,t){let r=t;return function pQ(n){return!!n&&n.nodeType===Node.ELEMENT_NODE}(n)&&e.some((i,o)=>!("*"===i||!function mQ(n,e){if(!bb){const t=Element.prototype;bb=t.matches||t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector}return n.nodeType===Node.ELEMENT_NODE&&bb.call(n,e)}(n,i)||(r=o,0))),r}class EQ{constructor(e,t){this.componentFactory=t.get(Ri).resolveComponentFactory(e)}create(e){return new wQ(this.componentFactory,e)}}class wQ{constructor(e,t){this.componentFactory=e,this.injector=t,this.eventEmitters=new dQ(1),this.events=this.eventEmitters.pipe(mi(r=>vp(...r))),this.componentRef=null,this.viewChangeDetectorRef=null,this.inputChanges=null,this.hasInputChanges=!1,this.implementsOnChanges=!1,this.scheduledChangeDetectionFn=null,this.scheduledDestroyFn=null,this.initialInputValues=new Map,this.unchangedInputs=new Set(this.componentFactory.inputs.map(({propName:r})=>r)),this.ngZone=this.injector.get(ot),this.elementZone="undefined"==typeof Zone?null:this.ngZone.run(()=>Zone.current)}connect(e){this.runInZone(()=>{if(null!==this.scheduledDestroyFn)return this.scheduledDestroyFn(),void(this.scheduledDestroyFn=null);null===this.componentRef&&this.initializeComponent(e)})}disconnect(){this.runInZone(()=>{null===this.componentRef||null!==this.scheduledDestroyFn||(this.scheduledDestroyFn=ep.schedule(()=>{null!==this.componentRef&&(this.componentRef.destroy(),this.componentRef=null,this.viewChangeDetectorRef=null)},10))})}getInputValue(e){return this.runInZone(()=>null===this.componentRef?this.initialInputValues.get(e):this.componentRef.instance[e])}setInputValue(e,t){this.runInZone(()=>{null!==this.componentRef?function vQ(n,e){return n===e||n!=n&&e!=e}(t,this.getInputValue(e))&&(void 0!==t||!this.unchangedInputs.has(e))||(this.recordInputChange(e,t),this.unchangedInputs.delete(e),this.hasInputChanges=!0,this.componentRef.instance[e]=t,this.scheduleDetectChanges()):this.initialInputValues.set(e,t)})}initializeComponent(e){const t=yt.create({providers:[],parent:this.injector}),r=function bQ(n,e){const t=n.childNodes,r=e.map(()=>[]);let i=-1;e.some((o,s)=>"*"===o&&(i=s,!0));for(let o=0,s=t.length;o{this.initialInputValues.has(e)&&this.setInputValue(e,this.initialInputValues.get(e))}),this.initialInputValues.clear()}initializeOutputs(e){const t=this.componentFactory.outputs.map(({propName:r,templateName:i})=>e.instance[r].pipe(be(s=>({name:i,value:s}))));this.eventEmitters.next(t)}callNgOnChanges(e){if(!this.implementsOnChanges||null===this.inputChanges)return;const t=this.inputChanges;this.inputChanges=null,e.instance.ngOnChanges(t)}markViewForCheck(e){this.hasInputChanges&&(this.hasInputChanges=!1,e.markForCheck())}scheduleDetectChanges(){this.scheduledChangeDetectionFn||(this.scheduledChangeDetectionFn=ep.scheduleBeforeRender(()=>{this.scheduledChangeDetectionFn=null,this.detectChanges()}))}recordInputChange(e,t){if(!this.implementsOnChanges)return;null===this.inputChanges&&(this.inputChanges={});const r=this.inputChanges[e];if(r)return void(r.currentValue=t);const i=this.unchangedInputs.has(e),o=i?void 0:this.getInputValue(e);this.inputChanges[e]=new $b(o,t,i)}detectChanges(){null!==this.componentRef&&(this.callNgOnChanges(this.componentRef),this.markViewForCheck(this.viewChangeDetectorRef),this.componentRef.changeDetectorRef.detectChanges())}runInZone(e){return this.elementZone&&Zone.current!==this.elementZone?this.ngZone.run(e):e()}}class SQ extends HTMLElement{constructor(){super(...arguments),this.ngElementEventsSubscription=null}}let IQ=(()=>{class n{constructor(t){this.injector=t}ngDoBootstrap(){const t=function MQ(n,e){const t=function _Q(n,e){return e.get(Ri).resolveComponentFactory(n).inputs}(n,e.injector),r=e.strategyFactory||new EQ(n,e.injector),i=function yQ(n){const e={};return n.forEach(({propName:t,templateName:r})=>{e[function hQ(n){return n.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}(r)]=t}),e}(t);class o extends SQ{constructor(a){super(),this.injector=a}get ngElementStrategy(){if(!this._ngElementStrategy){const a=this._ngElementStrategy=r.create(this.injector||e.injector);t.forEach(({propName:l})=>{if(!this.hasOwnProperty(l))return;const c=this[l];delete this[l],a.setInputValue(l,c)})}return this._ngElementStrategy}attributeChangedCallback(a,l,c,u){this.ngElementStrategy.setInputValue(i[a],c)}connectedCallback(){let a=!1;this.ngElementStrategy.events&&(this.subscribeToEvents(),a=!0),this.ngElementStrategy.connect(this),a||this.subscribeToEvents()}disconnectedCallback(){this._ngElementStrategy&&this._ngElementStrategy.disconnect(),this.ngElementEventsSubscription&&(this.ngElementEventsSubscription.unsubscribe(),this.ngElementEventsSubscription=null)}subscribeToEvents(){this.ngElementEventsSubscription=this.ngElementStrategy.events.subscribe(a=>{const l=new CustomEvent(a.name,{detail:a.value});this.dispatchEvent(l)})}}return o.observedAttributes=Object.keys(i),t.forEach(({propName:s})=>{Object.defineProperty(o.prototype,s,{get(){return this.ngElementStrategy.getInputValue(s)},set(a){this.ngElementStrategy.setInputValue(s,a)},configurable:!0,enumerable:!0})}),o}(oQ,{injector:this.injector});customElements.define("dotcms-block-editor",t)}}return n.\u0275fac=function(t){return new(t||n)(R(yt))},n.\u0275mod=ut({type:n}),n.\u0275inj=at({providers:[],imports:[[hU,Pr,rI,P7,n4,j4,v7]]}),n})();(function qV(){oS=!1})(),dU().bootstrapModule(IQ).catch(n=>console.error(n))}},et=>{et(et.s=712)}]); \ No newline at end of file diff --git a/dotCMS/src/main/webapp/html/portlet/ext/categories/view_categories.jsp b/dotCMS/src/main/webapp/html/portlet/ext/categories/view_categories.jsp index 923ad50b5483..b34289913370 100644 --- a/dotCMS/src/main/webapp/html/portlet/ext/categories/view_categories.jsp +++ b/dotCMS/src/main/webapp/html/portlet/ext/categories/view_categories.jsp @@ -217,6 +217,11 @@ initialWidth : '100%', autoHeight : true, escapeHTMLInData : false, + onClick: function(event) { + if (event.dispatch !== 'doclick') { + grid.selection.clear(); + } + }, structure : layout, plugins : { pagination : { diff --git a/dotCMS/src/main/webapp/html/portlet/ext/cmsmaintenance/tail_log.jsp b/dotCMS/src/main/webapp/html/portlet/ext/cmsmaintenance/tail_log.jsp index 01f9a2e3cbd1..3c5e0ecc79e4 100644 --- a/dotCMS/src/main/webapp/html/portlet/ext/cmsmaintenance/tail_log.jsp +++ b/dotCMS/src/main/webapp/html/portlet/ext/cmsmaintenance/tail_log.jsp @@ -194,7 +194,7 @@ function performMark(callback) { var keyword = keywordLogInput.value; - if (keyword && keyword.length > 1) { + if (keyword && keyword.length > 2) { new HR(".logViewerPrinted", { highlight: [keyword] }).hr(); diff --git a/dotCMS/src/main/webapp/html/portlet/ext/contentlet/field/edit_field.jsp b/dotCMS/src/main/webapp/html/portlet/ext/contentlet/field/edit_field.jsp index 1f0a5cde6236..42d2a1f8d39f 100644 --- a/dotCMS/src/main/webapp/html/portlet/ext/contentlet/field/edit_field.jsp +++ b/dotCMS/src/main/webapp/html/portlet/ext/contentlet/field/edit_field.jsp @@ -152,7 +152,7 @@ // STORY BLOCK else if (field.getFieldType().equals(Field.FieldType.STORY_BLOCK_FIELD.toString())) { - + // The extra single quotes indicate that it will return an empty string -> "''" String textValue = UtilMethods.isSet(value) ? value.toString() : (UtilMethods.isSet(defaultValue) ? defaultValue : "''"); String customStyles = ""; @@ -166,15 +166,16 @@ customClassName = "block-custom-styles"; } if("contentTypes".equalsIgnoreCase(fv.getKey())){ - allowedContentTypes = fv.getValue(); + //only allow alphanumeric character an comma + allowedContentTypes = fv.getValue().replaceAll("[^a-zA-Z0-9,]", ""); } } %> - @@ -195,7 +196,7 @@ /** * Do not use "<%=textValue%>" or '<%=textValue%>' * If we put it in quotes and the user adds a content that has quotes, - * it will throw a syntax error + * it will throw a syntax error */ const data = <%=textValue%>; @@ -354,7 +355,7 @@ contentlet, LegacyFieldTransformer.from(field), user); defaultPathFolderPathIds.add(0, "root"); - + boolean dragAndDrop = true; List fieldVariables=APILocator.getFieldAPI().getFieldVariablesForField(field.getInode(), user, true); @@ -453,7 +454,7 @@ year = cal.get(GregorianCalendar.YEAR) ; }%> - + " /> @@ -470,7 +471,7 @@ dojoType="dijit.form.DateTextBox" name="<%=field.getFieldContentlet()%>Date" id="<%=field.getVelocityVarName()%>Date"> - + <% } if (field.getFieldType().equals(Field.FieldType.TIME.toString()) || field.getFieldType().equals(Field.FieldType.DATE_TIME.toString())) { @@ -492,9 +493,9 @@ <%=field.isReadOnly()?"disabled=\"disabled\"":""%>/>
<%=APILocator.systemTimeZone().getDisplayName()%> -
+ - + <%if (field.getFieldType().equals(Field.FieldType.DATE_TIME.toString())) {%> @@ -574,8 +575,8 @@ //END FILE Field - - + + //BINARY kind of field rendering http://jira.dotmarketing.net/browse/DOTCMS-1073 } else if (field.getFieldType().equals(Field.FieldType.BINARY.toString())) { String fileName = ""; @@ -617,7 +618,7 @@
<% String src = String.format("/contentAsset/image/%s/%s/?filter=Thumbnail&thumbnail_w=%d&thumbnail_h=%d&language_id=%s&r=%d", contentlet.getIdentifier(), field.getVelocityVarName(), showDim, showDim, contentlet.getLanguageId(), System.currentTimeMillis()); - + %>
- +
" style="width:90%;height:80%;display:none;"">
@@ -679,7 +680,7 @@ <% String maxFileLength="-1"; - String accept="*/*"; + String accept="*/*"; List acceptTypes=APILocator.getFieldAPI().getFieldVariablesForField(field.getInode(), user, false); for(FieldVariable fv : acceptTypes){ if("accept".equalsIgnoreCase(fv.getKey())){ @@ -688,12 +689,12 @@ } if("maxFileLength".equalsIgnoreCase(fv.getKey())){ maxFileLength=fv.getValue(); - + } } - + %> - + <%-- File uploader --%> @@ -719,9 +720,9 @@ inodeShorty="<%=APILocator.getShortyAPI().shortify(contentlet.getInode())%>" idShorty="<%=APILocator.getShortyAPI().shortify(contentlet.getIdentifier())%>" onRemove="removeThumbnail('<%=field.getVelocityVarName()%>', '<%= binInode %>')" - dojoType="dotcms.dijit.form.FileAjaxUploader" - maxFileLength="<%= maxFileLength%>" - licenseLevel="<%=LicenseUtil.getLevel() %>" + dojoType="dotcms.dijit.form.FileAjaxUploader" + maxFileLength="<%= maxFileLength%>" + licenseLevel="<%=LicenseUtil.getLevel() %>" accept="<%=accept %>" >
`; + dotParseHtmlService.parse(code, target, false); + + const button = target.querySelectorAll('button'); + const script = target.querySelectorAll('script'); + + expect(button.length).toBe(1); + expect(script.length).toBe(1); + expect(script[0].getAttribute('type')).toBe('text/javascript'); + expect(script[0].innerHTML).toBe(`console.log('test')`); + }); + + it('should clear content and render html', () => { + const code = 'Name'; + dotParseHtmlService.parse(code, target, true); + expect(target.childNodes.length).toEqual(2); + }); + + it('should append content ', () => { + const code = 'last Content'; + dotParseHtmlService.parse(code, target, false); + expect(target.childNodes.length).toEqual(1); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/api/services/dot-parse-html/dot-parse-html.service.ts b/ui/apps/dotcms-ui/src/app/api/services/dot-parse-html/dot-parse-html.service.ts new file mode 100644 index 000000000000..1dc020ddd9cd --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/dot-parse-html/dot-parse-html.service.ts @@ -0,0 +1,57 @@ +import { Injectable, Renderer2, RendererFactory2 } from '@angular/core'; + +/** + * Parse html and execute scripts + * + * @export + * @class DotParseHtmlService + */ +@Injectable() +export class DotParseHtmlService { + private renderer: Renderer2; + + constructor(rendererFactory: RendererFactory2) { + this.renderer = rendererFactory.createRenderer(null, null); + } + + /** + * Insert in an element the given code including the execution of scripts. + * + * @param {string} code + * @param {HTMLElement} element + * @param {boolean} clear + * @memberof DotParseHtmlService + */ + parse(code: string, element: HTMLElement, clear: boolean): void { + if (clear) { + this.clearElement(element); + } + const placeholder = document.createElement('div'); + placeholder.innerHTML = code; + Array.from(placeholder.childNodes).forEach((el: HTMLElement) => { + const parsedEl = this.isScriptElement(el.tagName) + ? this.createScriptEl(el.innerHTML) + : el; + this.renderer.appendChild(element, parsedEl); + }); + } + + private isScriptElement(tag: string): boolean { + return tag === 'SCRIPT'; + } + + private createScriptEl(content: string): HTMLScriptElement { + const script = this.renderer.createElement('script'); + this.renderer.setAttribute(script, 'type', 'text/javascript'); + const text = this.renderer.createText(content); + this.renderer.appendChild(script, text); + + return script; + } + + private clearElement(element: HTMLElement): void { + Array.from(element.childNodes).forEach((child: HTMLElement) => { + this.renderer.removeChild(element, child); + }); + } +} diff --git a/ui/apps/dotcms-ui/src/app/api/services/dot-personalize/dot-personalize.service.spec.ts b/ui/apps/dotcms-ui/src/app/api/services/dot-personalize/dot-personalize.service.spec.ts new file mode 100644 index 000000000000..6ce451ac30a6 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/dot-personalize/dot-personalize.service.spec.ts @@ -0,0 +1,47 @@ +import { DotPersonalizeService } from './dot-personalize.service'; +import { TestBed, getTestBed } from '@angular/core/testing'; +import { HttpTestingController, HttpClientTestingModule } from '@angular/common/http/testing'; +import { CoreWebService } from '@dotcms/dotcms-js'; +import { CoreWebServiceMock } from '@tests/core-web.service.mock'; + +describe('DotPersonalizeService', () => { + let injector: TestBed; + let dotPersonalizeService: DotPersonalizeService; + let httpMock: HttpTestingController; + + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [HttpClientTestingModule], + providers: [ + { provide: CoreWebService, useClass: CoreWebServiceMock }, + DotPersonalizeService + ] + }); + injector = getTestBed(); + dotPersonalizeService = injector.get(DotPersonalizeService); + httpMock = injector.get(HttpTestingController); + }); + + it('should set Personalized', () => { + dotPersonalizeService.personalized('a', 'b').subscribe(); + + const req = httpMock.expectOne('/api/v1/personalization/pagepersonas'); + expect(req.request.method).toBe('POST'); + expect(req.request.body).toEqual({ pageId: 'a', personaTag: 'b' }); + }); + + it('should despersonalized', () => { + const pageId = 'a'; + const personaTag = 'b'; + dotPersonalizeService.despersonalized(pageId, personaTag).subscribe(); + + const req = httpMock.expectOne( + `/api/v1/personalization/pagepersonas/page/${pageId}/personalization/${personaTag}` + ); + expect(req.request.method).toBe('DELETE'); + }); + + afterEach(() => { + httpMock.verify(); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/api/services/dot-personalize/dot-personalize.service.ts b/ui/apps/dotcms-ui/src/app/api/services/dot-personalize/dot-personalize.service.ts new file mode 100644 index 000000000000..50ac5ef6b92c --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/dot-personalize/dot-personalize.service.ts @@ -0,0 +1,56 @@ +import { Injectable } from '@angular/core'; +import { CoreWebService } from '@dotcms/dotcms-js'; +import { Observable } from 'rxjs'; +import { pluck } from 'rxjs/operators'; + +export interface DotCMSPersonalizedItem { + relationType: string; + treeOrder: number; + personalization: string; + container: string; + contentlet: string; + htmlPage: string; +} + +@Injectable() +export class DotPersonalizeService { + constructor(private coreWebService: CoreWebService) {} + + /** + * Set a personalized page for the persona passed + * + * @param {string} pageId + * @param {string} personaTag + * @returns {Observable} + * @memberof DotPersonalizeService + */ + personalized(pageId: string, personaTag: string): Observable { + return this.coreWebService + .requestView({ + method: 'POST', + url: `/api/v1/personalization/pagepersonas`, + body: { + pageId, + personaTag + } + }) + .pipe(pluck('entity')); + } + + /** + * Remove the personalization of the page for the persona passed + * + * @param {string} pageId + * @param {string} personaTag + * @returns {Observable} + * @memberof DotPersonalizeService + */ + despersonalized(pageId: string, personaTag: string): Observable { + return this.coreWebService + .requestView({ + method: 'DELETE', + url: `/api/v1/personalization/pagepersonas/page/${pageId}/personalization/${personaTag}` + }) + .pipe(pluck('entity')); + } +} diff --git a/ui/apps/dotcms-ui/src/app/api/services/dot-personas/dot-personas.service.spec.ts b/ui/apps/dotcms-ui/src/app/api/services/dot-personas/dot-personas.service.spec.ts new file mode 100644 index 000000000000..1dc4117da070 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/dot-personas/dot-personas.service.spec.ts @@ -0,0 +1,46 @@ +import { DotPersonasService } from './dot-personas.service'; +import { mockDotPersona } from '../../../test/dot-persona.mock'; +import { TestBed, getTestBed } from '@angular/core/testing'; +import { HttpTestingController, HttpClientTestingModule } from '@angular/common/http/testing'; +import { CoreWebService } from '@dotcms/dotcms-js'; +import { CoreWebServiceMock } from '@tests/core-web.service.mock'; + +describe('DotPersonasService', () => { + let injector: TestBed; + let dotPersonasService: DotPersonasService; + let httpMock: HttpTestingController; + + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [HttpClientTestingModule], + providers: [ + { provide: CoreWebService, useClass: CoreWebServiceMock }, + DotPersonasService + ] + }); + injector = getTestBed(); + dotPersonasService = injector.get(DotPersonasService); + httpMock = injector.get(HttpTestingController); + }); + + it('should get Personas', () => { + const url = [ + `content/respectFrontendRoles/false/render/false/query/+contentType:persona `, + `+live:true `, + `+deleted:false `, + `+working:true` + ].join(''); + + dotPersonasService.get().subscribe((result) => { + expect(result).toEqual(Array.of(mockDotPersona)); + }); + + const req = httpMock.expectOne(url); + expect(req.request.method).toBe('GET'); + req.flush({ contentlets: [mockDotPersona] }); + }); + + afterEach(() => { + httpMock.verify(); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/api/services/dot-personas/dot-personas.service.ts b/ui/apps/dotcms-ui/src/app/api/services/dot-personas/dot-personas.service.ts new file mode 100644 index 000000000000..a1fd9148df39 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/dot-personas/dot-personas.service.ts @@ -0,0 +1,29 @@ +import { pluck } from 'rxjs/operators'; +import { Injectable } from '@angular/core'; +import { DotPersona } from '@models/dot-persona/dot-persona.model'; +import { Observable } from 'rxjs'; +import { CoreWebService } from '@dotcms/dotcms-js'; + +/** + * Provide util methods to get Personas. + * @export + * @class DotPersonasService + */ +@Injectable() +export class DotPersonasService { + constructor(private coreWebService: CoreWebService) {} + + /** + * Return Personas. + * @returns Observable + * @memberof DotPersonasService + */ + get(): Observable { + return this.coreWebService + .requestView({ + url: + 'content/respectFrontendRoles/false/render/false/query/+contentType:persona +live:true +deleted:false +working:true' + }) + .pipe(pluck('contentlets')); + } +} diff --git a/ui/apps/dotcms-ui/src/app/api/services/dot-properties/dot-properties.service.spec.ts b/ui/apps/dotcms-ui/src/app/api/services/dot-properties/dot-properties.service.spec.ts new file mode 100644 index 000000000000..85e49dcea980 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/dot-properties/dot-properties.service.spec.ts @@ -0,0 +1,57 @@ +import { TestBed } from '@angular/core/testing'; +import { DotPropertiesService } from './dot-properties.service'; +import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; +import { CoreWebService } from '@dotcms/dotcms-js'; +import { CoreWebServiceMock } from '@tests/core-web.service.mock'; + +const fakeResponse = { + entity: { + key1: 'data', + list: ['1', '2'] + } +}; + +describe('DotPropertiesService', () => { + let service: DotPropertiesService; + let httpMock: HttpTestingController; + + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [HttpClientTestingModule], + providers: [ + { provide: CoreWebService, useClass: CoreWebServiceMock }, + DotPropertiesService + ] + }); + service = TestBed.inject(DotPropertiesService); + httpMock = TestBed.inject(HttpTestingController); + }); + + it('should get key', () => { + const key = 'key1'; + expect(service).toBeTruthy(); + + service.getKey(key).subscribe((response) => { + expect(response).toEqual(fakeResponse.entity.key1); + }); + const req = httpMock.expectOne(`/api/v1/configuration/config?keys=${key}`); + expect(req.request.method).toBe('GET'); + req.flush(fakeResponse); + }); + + it('should get ky as a list', () => { + const key = 'list'; + expect(service).toBeTruthy(); + + service.getKeyAsList(key).subscribe((response) => { + expect(response).toEqual(fakeResponse.entity.list); + }); + const req = httpMock.expectOne(`/api/v1/configuration/config?keys=list:${key}`); + expect(req.request.method).toBe('GET'); + req.flush(fakeResponse); + }); + + afterEach(() => { + httpMock.verify(); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/api/services/dot-properties/dot-properties.service.ts b/ui/apps/dotcms-ui/src/app/api/services/dot-properties/dot-properties.service.ts new file mode 100644 index 000000000000..ff391f85380b --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/dot-properties/dot-properties.service.ts @@ -0,0 +1,44 @@ +import { Injectable } from '@angular/core'; +import { CoreWebService } from '@dotcms/dotcms-js'; +import { pluck, take } from 'rxjs/operators'; +import { Observable } from 'rxjs'; + +@Injectable({ + providedIn: 'root' +}) +export class DotPropertiesService { + constructor(private coreWebService: CoreWebService) {} + + /** + * Get the value of specific key + * from the dotmarketing-config.properties + * + * @param string key + * @returns {Observable} + * @memberof DotPropertiesService + */ + getKey(key: string): Observable { + return this.coreWebService + .requestView({ + url: `/api/v1/configuration/config?keys=${key}` + }) + .pipe(take(1), pluck('entity', key)); + } + + /** + * Get the value of specific key as a list + * from the dotmarketing-config.properties + * + * @param string key + * @returns {Observable} + * @memberof DotPropertiesService + */ + getKeyAsList(key: string): Observable { + const finalKey = `list:${key}`; + return this.coreWebService + .requestView<{ [key: string]: string[] }>({ + url: `/api/v1/configuration/config?keys=${finalKey}` + }) + .pipe(take(1), pluck('entity', key)); + } +} diff --git a/ui/apps/dotcms-ui/src/app/api/services/dot-push-publish-filters/dot-push-publish-filters.service.spec.ts b/ui/apps/dotcms-ui/src/app/api/services/dot-push-publish-filters/dot-push-publish-filters.service.spec.ts new file mode 100644 index 000000000000..b9c2603b0c44 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/dot-push-publish-filters/dot-push-publish-filters.service.spec.ts @@ -0,0 +1,62 @@ +import { + DotPushPublishFiltersService, + DotPushPublishFilter +} from './dot-push-publish-filters.service'; +import { TestBed, getTestBed } from '@angular/core/testing'; +import { HttpTestingController, HttpClientTestingModule } from '@angular/common/http/testing'; +import { CoreWebService } from '@dotcms/dotcms-js'; +import { CoreWebServiceMock } from '@tests/core-web.service.mock'; + +describe('DotPushPublishFiltersService', () => { + let injector: TestBed; + let dotPushPublishFiltersService: DotPushPublishFiltersService; + let httpMock: HttpTestingController; + + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [HttpClientTestingModule], + providers: [ + { provide: CoreWebService, useClass: CoreWebServiceMock }, + DotPushPublishFiltersService + ] + }); + injector = getTestBed(); + dotPushPublishFiltersService = injector.get(DotPushPublishFiltersService); + httpMock = injector.get(HttpTestingController); + }); + + it('should get hit pp filters url', () => { + dotPushPublishFiltersService.get().subscribe(); + + const req = httpMock.expectOne('/api/v1/pushpublish/filters/'); + expect(req.request.method).toBe('GET'); + }); + + it('should return entity', () => { + dotPushPublishFiltersService.get().subscribe((res: DotPushPublishFilter[]) => { + expect(res).toEqual([ + { + defaultFilter: true, + key: 'some.yml', + title: 'Hello World' + } + ]); + }); + + const req = httpMock.expectOne('/api/v1/pushpublish/filters/'); + expect(req.request.method).toBe('GET'); + req.flush({ + entity: [ + { + defaultFilter: true, + key: 'some.yml', + title: 'Hello World' + } + ] + }); + }); + + afterEach(() => { + httpMock.verify(); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/api/services/dot-push-publish-filters/dot-push-publish-filters.service.ts b/ui/apps/dotcms-ui/src/app/api/services/dot-push-publish-filters/dot-push-publish-filters.service.ts new file mode 100644 index 000000000000..6783309334d5 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/dot-push-publish-filters/dot-push-publish-filters.service.ts @@ -0,0 +1,23 @@ +import { Injectable } from '@angular/core'; +import { CoreWebService } from '@dotcms/dotcms-js'; +import { Observable } from 'rxjs'; +import { pluck } from 'rxjs/operators'; + +export interface DotPushPublishFilter { + defaultFilter: boolean; + key: string; + title: string; +} + +@Injectable() +export class DotPushPublishFiltersService { + constructor(private coreWebService: CoreWebService) {} + + get(): Observable { + return this.coreWebService + .requestView({ + url: '/api/v1/pushpublish/filters/' + }) + .pipe(pluck('entity')); + } +} diff --git a/ui/apps/dotcms-ui/src/app/api/services/dot-roles/dot-roles.service.spec.ts b/ui/apps/dotcms-ui/src/app/api/services/dot-roles/dot-roles.service.spec.ts new file mode 100644 index 000000000000..dba1b627ec95 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/dot-roles/dot-roles.service.spec.ts @@ -0,0 +1,69 @@ +import { DotRolesService } from './dot-roles.service'; +import { DotRole } from '@models/dot-role/dot-role.model'; +import { TestBed, getTestBed } from '@angular/core/testing'; +import { CoreWebService } from '@dotcms/dotcms-js'; +import { MockDotMessageService } from '@tests/dot-message-service.mock'; +import { DotMessageService } from '@services/dot-message/dot-messages.service'; +import { CoreWebServiceMock } from '@tests/core-web.service.mock'; +import { HttpTestingController, HttpClientTestingModule } from '@angular/common/http/testing'; + +const mockRoles: DotRole[] = [ + { + id: '1', + name: 'Anonymous User', + user: false, + roleKey: 'CMS Anonymous' + }, + { id: '2', name: 'Test Name', user: true, roleKey: 'anonymous' }, + { id: '2', name: 'Some Role', user: true, roleKey: 'roleKey1' } +]; + +export const mockProcessedRoles: DotRole[] = [ + { + id: '1', + name: 'Current User', + user: false, + roleKey: 'CMS Anonymous' + }, + { id: '2', name: 'Some Role (User)', user: true, roleKey: 'roleKey1' } +]; + +const messageServiceMock = new MockDotMessageService({ + 'current-user': 'Current User', + user: 'User' +}); + +describe('DotRolesService', () => { + let injector: TestBed; + let dotRolesService: DotRolesService; + let httpMock: HttpTestingController; + + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [HttpClientTestingModule], + providers: [ + DotRolesService, + { provide: CoreWebService, useClass: CoreWebServiceMock }, + { provide: DotMessageService, useValue: messageServiceMock } + ] + }); + injector = getTestBed(); + dotRolesService = injector.get(DotRolesService); + httpMock = injector.get(HttpTestingController); + }); + + it('should get Roles', () => { + const url = '/api/v1/roles/123/rolehierarchyanduserroles?roleHierarchyForAssign=false'; + dotRolesService.get('123', false).subscribe((res) => { + expect(res).toEqual(mockProcessedRoles); + }); + + const req = httpMock.expectOne(url); + expect(req.request.method).toBe('GET'); + req.flush({ entity: mockRoles }); + }); + + afterEach(() => { + httpMock.verify(); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/api/services/dot-roles/dot-roles.service.ts b/ui/apps/dotcms-ui/src/app/api/services/dot-roles/dot-roles.service.ts new file mode 100644 index 000000000000..c458bd7bc0ca --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/dot-roles/dot-roles.service.ts @@ -0,0 +1,44 @@ +import { Injectable } from '@angular/core'; +import { CoreWebService } from '@dotcms/dotcms-js'; +import { Observable } from 'rxjs'; +import { map, pluck } from 'rxjs/operators'; +import { DotRole } from '@models/dot-role/dot-role.model'; +import { DotMessageService } from '@services/dot-message/dot-messages.service'; + +const CURRENT_USER_KEY = 'CMS Anonymous'; + +@Injectable() +export class DotRolesService { + constructor( + private dotMessageService: DotMessageService, + private coreWebService: CoreWebService + ) {} + + /** + * Return list of roles associated to specific role . + * @param {string} roleId + * @returns Observable + * @memberof DotRolesService + */ + get(roleId: string, roleHierarchy: boolean): Observable { + return this.coreWebService + .requestView({ + url: `/api/v1/roles/${roleId}/rolehierarchyanduserroles?roleHierarchyForAssign=${roleHierarchy}` + }) + .pipe( + pluck('entity'), + map((roles: DotRole[]) => + roles + .filter((role: DotRole) => role.roleKey !== 'anonymous') + .map((role: DotRole) => { + if (role.roleKey === CURRENT_USER_KEY) { + role.name = this.dotMessageService.get('current-user'); + } else if (role.user) { + role.name = `${role.name} (${this.dotMessageService.get('user')})`; + } + return role; + }) + ) + ); + } +} diff --git a/ui/apps/dotcms-ui/src/app/api/services/dot-router/dot-router.service.spec.ts b/ui/apps/dotcms-ui/src/app/api/services/dot-router/dot-router.service.spec.ts new file mode 100644 index 000000000000..7dabcb8de14a --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/dot-router/dot-router.service.spec.ts @@ -0,0 +1,289 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ + +import { DotRouterService } from './dot-router.service'; +import { RouterTestingModule } from '@angular/router/testing'; +import { LoginService } from '@dotcms/dotcms-js'; +import { Router, ActivatedRoute, NavigationEnd } from '@angular/router'; +import { waitForAsync, TestBed } from '@angular/core/testing'; +import { Subject } from 'rxjs'; + +class RouterMock { + _events: Subject = new Subject(); + url = '/c/test'; + + routerState = { + snapshot: { + url: '/c/hello-world' + } + }; + + navigate = jasmine.createSpy('navigate').and.callFake(() => { + return new Promise((resolve) => { + resolve(true); + }); + }); + + get events() { + return this._events.asObservable(); + } + + getCurrentNavigation() { + return { + finalUrl: {} + }; + } + + triggerNavigationEnd(url: string): void { + this._events.next(new NavigationEnd(0, url || '/url/678', url || '/url/789')); + } +} + +class ActivatedRouteMock { + snapshot = { + queryParams: { + hello: 'world' + } + }; +} + +describe('DotRouterService', () => { + let service: DotRouterService; + let router; + + beforeEach( + waitForAsync(() => { + const testbed = TestBed.configureTestingModule({ + providers: [ + DotRouterService, + { + provide: LoginService, + useValue: {} + }, + { + provide: Router, + useClass: RouterMock + }, + { + provide: ActivatedRoute, + useClass: ActivatedRouteMock + } + ], + imports: [RouterTestingModule] + }); + + service = testbed.inject(DotRouterService); + router = testbed.inject(Router); + }) + ); + + it('should set current url value', () => { + expect(service.currentSavedURL).toEqual(router.url); + }); + + it('should set previous & current url value', () => { + router.triggerNavigationEnd('/newUrl'); + expect(service.routeHistory).toEqual({ url: '/newUrl', previousUrl: '/c/test' }); + expect(service.currentSavedURL).toEqual('/newUrl'); + }); + + it('should get queryParams from Router', () => { + spyOn(router, 'getCurrentNavigation').and.returnValue({ + finalUrl: { + queryParams: { + hola: 'mundo' + } + } + }); + expect(service.queryParams).toEqual({ + hola: 'mundo' + }); + }); + + it('should get queryParams from ActivatedRoute', () => { + spyOn(router, 'getCurrentNavigation').and.returnValue(null); + expect(service.queryParams).toEqual({ + hello: 'world' + }); + }); + + it('should go to main', () => { + service.goToMain(); + expect(router.navigate).toHaveBeenCalledWith(['/']); + }); + + it('should go to edit page', () => { + spyOn(service, 'goToEditPage'); + service.goToMain('/about/us'); + expect(service.goToEditPage).toHaveBeenCalledWith({ url: '/about/us' }); + }); + + it('should go to Starter page', () => { + service.goToStarter(); + expect(router.navigate).toHaveBeenCalledWith(['/starter']); + }); + + it('should go to Content page', () => { + service.goToContent(); + expect(router.navigate).toHaveBeenCalledWith(['/c/content']); + }); + + it('should go to edit page', () => { + service.goToEditTemplate('123'); + expect(router.navigate).toHaveBeenCalledWith(['/templates/edit/123']); + }); + + it('should go to edit page with inode', () => { + service.goToEditTemplate('123', '456'); + + expect(router.navigate).toHaveBeenCalledWith(['/templates/edit/123/inode/456']); + }); + + it('should go to edit content type page', () => { + service.goToEditContentType('123', 'Form'); + expect(router.navigate).toHaveBeenCalledWith(['/Form/edit/123']); + }); + + it('should go to storedRedirectUrl', () => { + service.storedRedirectUrl = 'test/fake'; + service.goToMain(); + expect(router.navigate).toHaveBeenCalledWith(['test/fake']); + }); + + it('should go to previous URL when goToMain() called', () => { + service.routeHistory = { previousUrl: 'test/fake', url: '/' }; + service.goToPreviousUrl(); + expect(router.navigate).toHaveBeenCalledWith(['test/fake']); + }); + + it('should go to edit page', () => { + service.goToEditPage({ url: 'abc/def' }); + expect(router.navigate).toHaveBeenCalledWith(['/edit-page/content'], { + queryParams: { url: 'abc/def' }, + state: { + menuId: 'edit-page' + } + }); + }); + + it('should go to edit page with language_id', () => { + service.goToEditPage({ url: 'abc/def', language_id: '1' }); + expect(router.navigate).toHaveBeenCalledWith(['/edit-page/content'], { + queryParams: { url: 'abc/def', language_id: '1' }, + state: { + menuId: 'edit-page' + } + }); + }); + + it('should go to edit contentlet', () => { + service.goToEditContentlet('123'); + expect(router.navigate).toHaveBeenCalledWith(['/c/hello-world/123']); + }); + + it('should go to edit workflow task', () => { + service.goToEditTask('123'); + expect(router.navigate).toHaveBeenCalledWith(['/c/workflow/123']); + }); + + it('should go to create content route with provided content type variable name', () => { + service.goToCreateContent('persona'); + expect(router.navigate).toHaveBeenCalledWith(['/c/content/new/persona']); + }); + + it('should go to create integration service', () => { + service.goToUpdateAppsConfiguration('123', { configured: false, name: 'test', id: '1' }); + expect(router.navigate).toHaveBeenCalledWith(['/apps/123/create/1']); + }); + + it('should go to edit integration service', () => { + service.goToUpdateAppsConfiguration('123', { configured: true, name: 'test', id: '1' }); + expect(router.navigate).toHaveBeenCalledWith(['/apps/123/edit/1']); + }); + + it('should return true if a portlet is jsp', () => { + expect(service.isJSPPortlet()).toBeTruthy(); + }); + + it('should return true if edit page url', () => { + router.routerState.snapshot.url = 'edit-page'; + expect(service.isEditPage()).toBe(true); + }); + + it('should return true if the portletid is a custom portlet', () => { + expect(service.isCustomPortlet('c_testing')).toBe(true); + }); + + it('should return false if the portletid is not a custom portlet', () => { + expect(service.isCustomPortlet('site-browser')).toBe(false); + }); + + it('should return false if the currentPortlet is not a custom portlet', () => { + expect(service.isCustomPortlet('site-browser')).toBe(false); + }); + + it('should return true if the currentPortlet is not a custom portlet', () => { + router.routerState.snapshot.url = '/c/c-testing'; + expect(service.isCustomPortlet('site-browser')).toBe(false); + }); + + it('should return the correct Portlet Id', () => { + expect(service.getPortletId('#/c/content?test=value')).toBe('content'); + expect(service.getPortletId('/c/add/content?fds=ds')).toBe('content'); + expect( + service.getPortletId( + 'c/content%3Ffilter%3DProducts/19d3aecc-5b68-4d98-ba1b-297d5859403c' + ) + ).toBe('content'); + }); + + it('should navigate replacing URL params', () => { + const params = { id: 'content' }; + service.replaceQueryParams(params); + expect(router.navigate).toHaveBeenCalledWith([], { + queryParams: params, + queryParamsHandling: 'merge' + }); + }); + + describe('go to login', () => { + beforeEach(() => { + const mockDate = new Date(1466424490000); + jasmine.clock().install(); + jasmine.clock().mockDate(mockDate); + }); + + it('should add the cache busting', () => { + service.goToLogin(); + expect(router.navigate).toHaveBeenCalledWith(['/public/login'], { + queryParams: { r: 1466424490000 } + }); + jasmine.clock().uninstall(); + }); + + it('should go to login with cache busting', () => { + service.goToLogin({ + queryParams: { test: 'test' } + }); + expect(router.navigate).toHaveBeenCalledWith(['/public/login'], { + queryParams: { test: 'test', r: 1466424490000 } + }); + jasmine.clock().uninstall(); + }); + }); + + describe('go to logout', () => { + beforeEach(() => { + const mockDate = new Date(1466424490000); + jasmine.clock().install(); + jasmine.clock().mockDate(mockDate); + }); + + it('should add the cache busting', () => { + service.doLogOut(); + expect(router.navigate).toHaveBeenCalledWith(['/dotAdmin/logout'], { + queryParams: { r: 1466424490000 } + }); + jasmine.clock().uninstall(); + }); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/api/services/dot-router/dot-router.service.ts b/ui/apps/dotcms-ui/src/app/api/services/dot-router/dot-router.service.ts new file mode 100644 index 000000000000..76e434c6ebc5 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/dot-router/dot-router.service.ts @@ -0,0 +1,352 @@ +import { Injectable } from '@angular/core'; +import { Router, ActivatedRoute, Params, Event, NavigationEnd } from '@angular/router'; + +import { PortletNav } from '@models/navigation'; +import { Subject } from 'rxjs'; +import { DotAppsSites } from '@shared/models/dot-apps/dot-apps.model'; +import { NavigationExtras } from '@angular/router'; +import { LOGOUT_URL } from '@dotcms/dotcms-js'; +import { filter } from 'rxjs/operators'; + +@Injectable() +export class DotRouterService { + portletReload$ = new Subject(); + private _storedRedirectUrl: string; + private _routeHistory: PortletNav = { url: '' }; + private CUSTOM_PORTLET_ID_PREFIX = 'c_'; + + constructor(private router: Router, private route: ActivatedRoute) { + this._routeHistory.url = this.router.url; + this.router.events + .pipe(filter((event: Event) => event instanceof NavigationEnd)) + .subscribe((event: NavigationEnd) => { + this.routeHistory = { + url: event.url, + previousUrl: this._routeHistory.url + }; + }); + } + + get currentSavedURL(): string { + return this._routeHistory.url; + } + + get previousUrl(): string { + return this._routeHistory.previousUrl; + } + + get currentPortlet(): PortletNav { + return { + url: this.router.routerState.snapshot.url, + id: this.getPortletId(this.router.routerState.snapshot.url) + }; + } + + set storedRedirectUrl(url: string) { + this._storedRedirectUrl = url; + } + + get storedRedirectUrl(): string { + return this._storedRedirectUrl; + } + + get routeHistory(): PortletNav { + return this._routeHistory; + } + + set routeHistory(value: PortletNav) { + this._routeHistory = value; + } + + get queryParams(): Params { + const nav = this.router.getCurrentNavigation(); + + return nav ? nav.finalUrl.queryParams : this.route.snapshot.queryParams; + } + + /** + * Redirect to previous url + * + * @memberof DotRouterService + */ + goToPreviousUrl(): void { + this.router.navigate([this.routeHistory.previousUrl]); + } + + /** + * Reload the current iframe portlet; + * + * @param string id + * @memberof DotRouterService + */ + reloadCurrentPortlet(id?: string): void { + this.portletReload$.next(id); + } + + /** + * Go to edit page + * + * @param string url + * @param string [languageId] + * @returns Promise + * @memberof DotRouterService + */ + goToEditPage(queryParams: Params): Promise { + const menuId = 'edit-page'; + + return this.router.navigate([`/${menuId}/content`], { + queryParams, + state: { + menuId + } + }); + } + + /** + * Go to edit contentlet + * + * @param string inode + * @returns Promise + * @memberof DotRouterService + */ + goToEditContentlet(inode: string): Promise { + return this.router.navigate([`${this.currentPortlet.url}/${inode}`]); + } + + /** + * Go to edit workflow task + * + * @param string inode + * @returns Promise + * @memberof DotRouterService + */ + goToEditTask(inode: string): Promise { + return this.router.navigate([`/c/workflow/${inode}`]); + } + + /** + * Go to first porlet unless userEditPageRedirect is passed or storedRedirectUrl is set + * + * @param string [userEditPageRedirect] + * @returns Promise + * @memberof DotRouterService + */ + goToMain(userEditPageRedirect?: string): Promise { + return userEditPageRedirect + ? this.goToEditPage({ + url: userEditPageRedirect + }) + : this.redirectMain(); + } + + /** + * Redirects to the login page adding a busting cache parameter. + * + * * @param NavigationExtras navExtras + * @memberof DotRouterService + */ + goToLogin(navExtras?: NavigationExtras): void { + this.router.navigate(['/public/login'], this.addCacheBusting(navExtras)); + } + + goToSiteBrowser(): void { + this.router.navigate(['/c/site-browser']); + } + + /** + * Redirect to Starter page + * + * @memberof DotRouterService + */ + goToStarter(): void { + this.router.navigate(['/starter']); + } + + /** + * Redirect to Content page + * + * @memberof DotRouterService + */ + goToContent(): void { + this.router.navigate(['/c/content']); + } + + /** + * Redirect to Content page + * + * @memberof DotRouterService + */ + goToCreateContent(variableName: string): void { + this.router.navigate([`/c/content/new/${variableName}`]); + } + + goToEditContentType(id: string, portlet: string): void { + this.router.navigate([`/${portlet}/edit/${id}`]); + } + + /** + * Redirect to edit the template. + * If the inode is paased, load a specific version of the template + * + * @param {string} id + * @memberof DotRouterService + */ + goToEditTemplate(id: string, inode?: string): void { + this.router.navigate([ + inode ? `/templates/edit/${id}/inode/${inode}` : `/templates/edit/${id}` + ]); + } + + goToURL(url: string): void { + this.router.navigate([url]); + } + + /** + * Redirects to backend to handle the logout. + * + * @memberof DotRouterService + */ + doLogOut(): void { + this.router.navigate([LOGOUT_URL], this.addCacheBusting()); + } + + /** + * Redirects to an App Configuration page + * + * @param string appKey + * @memberof DotRouterService + */ + goToAppsConfiguration(appKey: string) { + this.router.navigate([`/apps/${appKey}`]); + } + + /** + * Redirects to create/edit configuration site page + * + * @param string integrationKey + * @param DotAppsSites site + * @memberof DotRouterService + */ + goToUpdateAppsConfiguration(integrationKey: string, site: DotAppsSites) { + const route = + site && site.configured + ? `/apps/${integrationKey}/edit/${site.id}` + : `/apps/${integrationKey}/create/${site.id}`; + this.router.navigate([route]); + } + + isPublicUrl(url: string): boolean { + return url.startsWith('/public'); + } + + isFromCoreUrl(url: string): boolean { + return url.startsWith('/fromCore'); + } + + isRootUrl(url: string): boolean { + return url === '/'; + } + + /** + * Check if Portlet is based on a JSP/iframe page + * @returns boolean + * @memberof DotRouterService + */ + isJSPPortlet(): boolean { + return this.router.url.startsWith('/c/'); + } + + /** + * Check if the current route is an edit page + * + * @returns boolean + * @memberof DotRouterService + */ + isEditPage(): boolean { + return this.currentPortlet.id === 'edit-page'; + } + + gotoPortlet(link: string, replaceUrl?: boolean): Promise { + return this.router.navigateByUrl(link, { replaceUrl: replaceUrl }); + } + + goToForgotPassword(): void { + this.router.navigate(['/public/forgotPassword']); + } + + goToNotLicensed(): void { + this.router.navigate(['c/notLicensed']); + } + + getPortletId(url: string): string { + url = decodeURIComponent(url); + if (url.indexOf('?') > 0) { + url = url.substring(0, url.indexOf('?')); + } + + const urlSegments = url + .split('/') + .filter((item) => item !== '' && item !== '#' && item !== 'c'); + return urlSegments.indexOf('add') > -1 ? urlSegments.splice(-1)[0] : urlSegments[0]; + } + + isPublicPage(): boolean { + return this.currentPortlet.url.startsWith('/public'); + } + + /** + * Return true if the current portlet is a custom portlet + * + * @returns {boolean} + * @memberof DotRouterService + */ + isCurrentPortletCustom(): boolean { + return this.isCustomPortlet(this.currentPortlet.id); + } + + /** + * Return true if potlrtId represent a custom portlet + * + * @param {string} portletId + * @returns {boolean} + * @memberof DotRouterService + */ + isCustomPortlet(portletId: string): boolean { + return portletId.startsWith(this.CUSTOM_PORTLET_ID_PREFIX); + } + + /** + * Replace the query params received, in the URL + * + * @param {{ [key: string]: string | number }} params + * @returns {void} + * @memberof DotRouterService + */ + replaceQueryParams(params: { [key: string]: string | number }): void { + this.router.navigate([], { + queryParams: params, + queryParamsHandling: 'merge' + }); + } + + private redirectMain(): Promise { + if (this.storedRedirectUrl) { + return this.router.navigate([this.storedRedirectUrl]).then((ok: boolean) => { + this.storedRedirectUrl = null; + return ok; + }); + } else { + return this.router.navigate(['/']); + } + } + + private addCacheBusting(navExtras?: NavigationExtras): NavigationExtras { + if (navExtras) { + navExtras.queryParams['r'] = new Date().getTime(); + } else { + navExtras = { queryParams: { r: new Date().getTime() } }; + } + + return navExtras; + } +} diff --git a/ui/apps/dotcms-ui/src/app/api/services/dot-site-browser/dot-site-browser.service.spec.ts b/ui/apps/dotcms-ui/src/app/api/services/dot-site-browser/dot-site-browser.service.spec.ts new file mode 100644 index 000000000000..02fbe7e820b2 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/dot-site-browser/dot-site-browser.service.spec.ts @@ -0,0 +1,35 @@ +import { getTestBed, TestBed } from '@angular/core/testing'; +import { CoreWebService } from '@dotcms/dotcms-js'; +import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; +import { CoreWebServiceMock } from '@tests/core-web.service.mock'; + +import { DotSiteBrowserService } from '@services/dot-site-browser/dot-site-browser.service'; + +describe('DotSiteBrowserService', () => { + let injector: TestBed; + let httpMock: HttpTestingController; + let dotSiteBrowserService: DotSiteBrowserService; + + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [HttpClientTestingModule], + providers: [ + { provide: CoreWebService, useClass: CoreWebServiceMock }, + DotSiteBrowserService + ] + }); + injector = getTestBed(); + dotSiteBrowserService = injector.inject(DotSiteBrowserService); + httpMock = injector.inject(HttpTestingController); + }); + + it('should set Site Browser Selected folder', () => { + dotSiteBrowserService.setSelectedFolder('/test').subscribe(); + + const req = httpMock.expectOne('/api/v1/browser/selectedfolder'); + expect(req.request.method).toEqual('PUT'); + expect(req.request.body).toEqual({ path: '/test' }); + + req.flush({}); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/api/services/dot-site-browser/dot-site-browser.service.ts b/ui/apps/dotcms-ui/src/app/api/services/dot-site-browser/dot-site-browser.service.ts new file mode 100644 index 000000000000..7fb3a8427c2f --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/dot-site-browser/dot-site-browser.service.ts @@ -0,0 +1,31 @@ +import { Injectable } from '@angular/core'; +import { CoreWebService, ResponseView } from '@dotcms/dotcms-js'; +import { Observable } from 'rxjs'; +import { take } from 'rxjs/operators'; + +/** + * Provide util methods of backend Site Browser. + * @export + * @class DotSiteBrowserService + */ +@Injectable() +export class DotSiteBrowserService { + constructor(private coreWebService: CoreWebService) {} + + /** + * Set the selected folder in the Site Browser portlet. + * @returns Observable<{}> + * @memberof DotSiteBrowserService + */ + setSelectedFolder(path: string): Observable>> { + return this.coreWebService + .requestView>({ + body: { + path: path + }, + method: 'PUT', + url: '/api/v1/browser/selectedfolder' + }) + .pipe(take(1)); + } +} diff --git a/ui/apps/dotcms-ui/src/app/api/services/dot-tags/dot-tags.service.spec.ts b/ui/apps/dotcms-ui/src/app/api/services/dot-tags/dot-tags.service.spec.ts new file mode 100644 index 000000000000..e1233f3aa118 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/dot-tags/dot-tags.service.spec.ts @@ -0,0 +1,50 @@ +import { DotTagsService } from '@services/dot-tags/dot-tags.service'; +import { TestBed, getTestBed } from '@angular/core/testing'; +import { HttpTestingController, HttpClientTestingModule } from '@angular/common/http/testing'; +import { CoreWebService } from '@dotcms/dotcms-js'; +import { CoreWebServiceMock } from '@tests/core-web.service.mock'; + +describe('DotTagsService', () => { + let injector: TestBed; + let dotTagsService: DotTagsService; + let httpMock: HttpTestingController; + + const mockResponse = { + test: { label: 'test', siteId: '1', siteName: 'Site', persona: false }, + united: { label: 'united', siteId: '1', siteName: 'Site', persona: false } + }; + + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [HttpClientTestingModule], + providers: [{ provide: CoreWebService, useClass: CoreWebServiceMock }, DotTagsService] + }); + injector = getTestBed(); + dotTagsService = injector.get(DotTagsService); + httpMock = injector.get(HttpTestingController); + }); + + it('should get Tags', () => { + dotTagsService.getSuggestions().subscribe((res) => { + expect(res).toEqual([mockResponse.test, mockResponse.united]); + }); + + const req = httpMock.expectOne('v1/tags'); + expect(req.request.method).toBe('GET'); + req.flush(mockResponse); + }); + + it('should get Tags filtered by name ', () => { + dotTagsService.getSuggestions('test').subscribe((res) => { + expect(res).toEqual([mockResponse.test, mockResponse.united]); + }); + + const req = httpMock.expectOne('v1/tags?name=test'); + expect(req.request.method).toBe('GET'); + req.flush(mockResponse); + }); + + afterEach(() => { + httpMock.verify(); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/api/services/dot-tags/dot-tags.service.ts b/ui/apps/dotcms-ui/src/app/api/services/dot-tags/dot-tags.service.ts new file mode 100644 index 000000000000..2870d056f941 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/dot-tags/dot-tags.service.ts @@ -0,0 +1,33 @@ +import { Injectable } from '@angular/core'; +import { CoreWebService } from '@dotcms/dotcms-js'; +import { Observable } from 'rxjs'; +import { DotTag } from '@models/dot-tag'; +import { map, pluck } from 'rxjs/operators'; + +/** + * Provide util methods to get Tags available in the system. + * @export + * @class DotTagsService + */ +@Injectable() +export class DotTagsService { + constructor(private coreWebService: CoreWebService) {} + + /** + * Get tags suggestions + * @returns Observable + * @memberof DotTagDotTagsServicesService + */ + getSuggestions(name?: string): Observable { + return this.coreWebService + .requestView({ + url: `v1/tags${name ? `?name=${name}` : ''}` + }) + .pipe( + pluck('bodyJsonObject'), + map((tags: { [key: string]: DotTag }) => { + return Object.entries(tags).map(([_key, value]) => value); + }) + ); + } +} diff --git a/ui/apps/dotcms-ui/src/app/api/services/dot-temp-file-upload/dot-temp-file-upload.service.spec.ts b/ui/apps/dotcms-ui/src/app/api/services/dot-temp-file-upload/dot-temp-file-upload.service.spec.ts new file mode 100644 index 000000000000..737831690f8b --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/dot-temp-file-upload/dot-temp-file-upload.service.spec.ts @@ -0,0 +1,133 @@ +import { HttpErrorResponse } from '@angular/common/http'; +import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; +import { TestBed } from '@angular/core/testing'; + +import { of } from 'rxjs'; +import { CoreWebService } from '@dotcms/dotcms-js'; + +import { CoreWebServiceMock } from '@tests/core-web.service.mock'; + +import { DotHttpErrorManagerService } from '@services/dot-http-error-manager/dot-http-error-manager.service'; +import { DotTempFileUploadService } from './dot-temp-file-upload.service'; + +describe('DotTempFileUploadService', () => { + let service: DotTempFileUploadService; + let httpMock: HttpTestingController; + let dotHttpErrorManagerService: DotHttpErrorManagerService; + + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [HttpClientTestingModule], + providers: [ + DotTempFileUploadService, + { provide: CoreWebService, useClass: CoreWebServiceMock }, + { + provide: DotHttpErrorManagerService, + useValue: { + handle: jasmine.createSpy().and.returnValue( + of({ + status: { + toString: () => '' + } + }) + ) + } + } + ] + }); + service = TestBed.inject(DotTempFileUploadService); + dotHttpErrorManagerService = TestBed.inject(DotHttpErrorManagerService); + httpMock = TestBed.inject(HttpTestingController); + }); + + afterEach(() => { + httpMock.verify(); + }); + + it('should upload a file by url', (done) => { + service.upload('https://dotcms.com/image.jpg').subscribe((res) => { + expect(res).toEqual([ + { + fileName: 'fileName', + folder: 'folder', + id: 'id', + image: true, + length: 10, + mimeType: 'mimeType', + referenceUrl: 'referenceUrl', + thumbnailUrl: 'thumbnailUrl' + } + ]); + done(); + }); + + const req = httpMock.expectOne('/api/v1/temp/byUrl'); + expect(req.request.method).toBe('POST'); + expect(req.request.body).toEqual({ remoteUrl: 'https://dotcms.com/image.jpg' }); + + req.flush({ + tempFiles: [ + { + fileName: 'fileName', + folder: 'folder', + id: 'id', + image: true, + length: 10, + mimeType: 'mimeType', + referenceUrl: 'referenceUrl', + thumbnailUrl: 'thumbnailUrl' + } + ] + }); + }); + + it('should upload a file by file', (done) => { + const file = new File([''], 'filename', { type: 'text/html' }); + + service.upload(file).subscribe((res) => { + expect(res).toEqual([ + { + fileName: 'fileName', + folder: 'folder', + id: 'id', + image: true, + length: 10, + mimeType: 'mimeType', + referenceUrl: 'referenceUrl', + thumbnailUrl: 'thumbnailUrl' + } + ]); + done(); + }); + + const req = httpMock.expectOne('/api/v1/temp'); + expect(req.request.method).toBe('POST'); + expect(req.request.body).toEqual(jasmine.any(FormData)); + + req.flush({ + tempFiles: [ + { + fileName: 'fileName', + folder: 'folder', + id: 'id', + image: true, + length: 10, + mimeType: 'mimeType', + referenceUrl: 'referenceUrl', + thumbnailUrl: 'thumbnailUrl' + } + ] + }); + }); + + it('should handle error', () => { + service.upload('https://dotcms.com/image.jpg').subscribe(); + + const req = httpMock.expectOne('/api/v1/temp/byUrl'); + req.flush('deliberate 404 error', { status: 404, statusText: 'Not Found' }); + + expect(dotHttpErrorManagerService.handle).toHaveBeenCalledWith( + jasmine.any(HttpErrorResponse) + ); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/api/services/dot-temp-file-upload/dot-temp-file-upload.service.ts b/ui/apps/dotcms-ui/src/app/api/services/dot-temp-file-upload/dot-temp-file-upload.service.ts new file mode 100644 index 000000000000..9bd1f13a9b6e --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/dot-temp-file-upload/dot-temp-file-upload.service.ts @@ -0,0 +1,82 @@ +import { HttpErrorResponse } from '@angular/common/http'; +import { Injectable } from '@angular/core'; +import { DotHttpErrorManagerService } from '@services/dot-http-error-manager/dot-http-error-manager.service'; +import { CoreWebService } from '@dotcms/dotcms-js'; +import { Observable } from 'rxjs'; +import { pluck, catchError, take, map } from 'rxjs/operators'; + +export interface DotCMSTempFile { + fileName: string; + folder: string; + id: string; + image: boolean; + length: number; + mimeType: string; + referenceUrl: string; + thumbnailUrl: string; +} + +@Injectable() +export class DotTempFileUploadService { + constructor( + private coreWebService: CoreWebService, + private dotHttpErrorManagerService: DotHttpErrorManagerService + ) {} + + /** + * Upload file to the dotcms temp service + * + * @param {(File | string)} file + * @returns {(Observable)} + * @memberof DotTempFileUploadService + */ + upload(file: File | string): Observable { + if (typeof file === 'string') { + return this.uploadByUrl(file); + } + + return this.uploadByFile(file); + } + + private uploadByFile(file: File): Observable { + const formData = new FormData(); + formData.append('file', file); + + return this.coreWebService + .requestView({ + url: `/api/v1/temp`, + body: formData, + headers: { 'Content-Type': 'multipart/form-data' }, + method: 'POST' + }) + .pipe( + pluck('tempFiles'), + catchError((error: HttpErrorResponse) => this.handleError(error)) + ); + } + + private uploadByUrl(file: string): Observable { + return this.coreWebService + .requestView({ + url: `/api/v1/temp/byUrl`, + body: { + remoteUrl: file + }, + headers: { + 'Content-Type': 'application/json' + }, + method: 'POST' + }) + .pipe( + pluck('tempFiles'), + catchError((error: HttpErrorResponse) => this.handleError(error)) + ); + } + + private handleError(error: HttpErrorResponse) { + return this.dotHttpErrorManagerService.handle(error).pipe( + take(1), + map((err) => err.status.toString()) + ); + } +} diff --git a/ui/apps/dotcms-ui/src/app/api/services/dot-template-containers-cache/dot-template-containers-cache.service.ts b/ui/apps/dotcms-ui/src/app/api/services/dot-template-containers-cache/dot-template-containers-cache.service.ts new file mode 100644 index 000000000000..e3428aea20b5 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/dot-template-containers-cache/dot-template-containers-cache.service.ts @@ -0,0 +1,37 @@ +import { Injectable } from '@angular/core'; +import { + CONTAINER_SOURCE, + DotContainerMap, + DotContainer +} from '@models/container/dot-container.model'; + +/** + * Save into cache the containers used by the current template + */ +@Injectable({ + providedIn: 'root' +}) +export class DotTemplateContainersCacheService { + private containers: DotContainerMap; + + set(containers: DotContainerMap): void { + this.containers = containers; + } + + get(containerId: string): DotContainer { + return this.containers[containerId]; + } + + /** + * Based on the container source, it returns the identifier that should be used as reference. + * + * @param dotContainer + * @returns string + * @memberof DotTemplateContainersCacheService + */ + getContainerReference(dotContainer: DotContainer): string { + return dotContainer.source === CONTAINER_SOURCE.FILE + ? dotContainer.path + : dotContainer.identifier; + } +} diff --git a/ui/apps/dotcms-ui/src/app/api/services/dot-template-containers-cache/dot-template-containers-cache.spec.ts b/ui/apps/dotcms-ui/src/app/api/services/dot-template-containers-cache/dot-template-containers-cache.spec.ts new file mode 100644 index 000000000000..4b70c4daae0d --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/dot-template-containers-cache/dot-template-containers-cache.spec.ts @@ -0,0 +1,54 @@ +import { DotTemplateContainersCacheService } from './dot-template-containers-cache.service'; +import { TestBed } from '@angular/core/testing'; +import { CONTAINER_SOURCE, DotContainerMap } from '@models/container/dot-container.model'; + +describe('TemplateContainersCacheService', () => { + let service: DotTemplateContainersCacheService; + let containers: DotContainerMap = {}; + + beforeEach(() => { + TestBed.configureTestingModule({ + providers: [DotTemplateContainersCacheService], + imports: [] + }); + + service = TestBed.get(DotTemplateContainersCacheService); + containers = { + '/containers/path': { + identifier: '1', + name: 'container 1', + type: 'type', + source: CONTAINER_SOURCE.FILE, + path: '/containers/path', + parentPermissionable: { + hostname: 'demo.dotcms.com' + } + }, + '2': { + identifier: '2', + name: 'container 2', + type: 'type', + source: CONTAINER_SOURCE.DB, + parentPermissionable: { + hostname: 'demo.dotcms.com' + } + } + }; + }); + + it('should return the right container', () => { + service.set(containers); + + expect(service.get('/containers/path')).toEqual(containers['/containers/path']); + expect(service.get('2')).toEqual(containers[2]); + expect(service.get('3')).toBeUndefined(); + }); + + it('should return the right container identifier', () => { + const fileContainer = service.getContainerReference(containers['/containers/path']); + const dataBaseConstainer = service.getContainerReference(containers['2']); + + expect(fileContainer).toEqual(containers['/containers/path'].path); + expect(dataBaseConstainer).toEqual(containers['2'].identifier); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/api/services/dot-templates/dot-templates.service.spec.ts b/ui/apps/dotcms-ui/src/app/api/services/dot-templates/dot-templates.service.spec.ts new file mode 100644 index 000000000000..b326beef4ba8 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/dot-templates/dot-templates.service.spec.ts @@ -0,0 +1,261 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ + +import { TestBed } from '@angular/core/testing'; +import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; + +import { CoreWebService } from '@dotcms/dotcms-js'; + +import { DotHttpErrorManagerService } from '@services/dot-http-error-manager/dot-http-error-manager.service'; +import { DotTemplatesService, TEMPLATE_API_URL } from './dot-templates.service'; +import { CoreWebServiceMock } from '@tests/core-web.service.mock'; +import { DotTemplate } from '@models/dot-edit-layout-designer'; +import { DotActionBulkResult } from '@models/dot-action-bulk-result/dot-action-bulk-result.model'; +import { of } from 'rxjs'; + +const mockBulkResponseSuccess: DotActionBulkResult = { + skippedCount: 0, + successCount: 1, + fails: [] +}; + +const mockTemplate: DotTemplate = { + anonymous: false, + friendlyName: 'Copy template', + identifier: '123', + inode: '1AreSD', + name: 'Copy template', + type: 'type', + versionType: 'type', + deleted: false, + live: true, + layout: null, + canEdit: true, + canWrite: true, + canPublish: true, + hasLiveVersion: true, + working: true +}; + +describe('DotTemplatesService', () => { + let service: DotTemplatesService; + let httpMock: HttpTestingController; + + beforeEach(() => { + TestBed.configureTestingModule({ + providers: [ + DotTemplatesService, + { + provide: DotHttpErrorManagerService, + useValue: { + handle() { + return of({}); + } + } + }, + { + provide: CoreWebService, + useClass: CoreWebServiceMock + } + ], + imports: [HttpClientTestingModule] + }); + service = TestBed.inject(DotTemplatesService); + + httpMock = TestBed.inject(HttpTestingController); + }); + + it('should get a list of templates', () => { + service.get().subscribe((template) => { + expect(template as any).toEqual([ + { + identifier: '1234', + name: 'Theme name' + } + ]); + }); + + const req = httpMock.expectOne(TEMPLATE_API_URL); + + expect(req.request.method).toBe('GET'); + + req.flush({ + entity: [ + { + identifier: '1234', + name: 'Theme name' + } + ] + }); + }); + + it('should get a template by id', () => { + service.getById('123').subscribe((template) => { + expect(template as any).toEqual({ + identifier: '1234', + name: 'Theme name' + }); + }); + + const req = httpMock.expectOne(`${TEMPLATE_API_URL}123/working`); + + expect(req.request.method).toBe('GET'); + + req.flush({ + entity: { + identifier: '1234', + name: 'Theme name' + } + }); + }); + + it('should get a templates by filter', () => { + service.getFiltered('123').subscribe((template) => { + expect(template as any).toEqual([ + { + identifier: '123', + name: 'Theme name' + } + ]); + }); + + const req = httpMock.expectOne(`${TEMPLATE_API_URL}?filter=123`); + + expect(req.request.method).toBe('GET'); + + req.flush({ + entity: [ + { + identifier: '123', + name: 'Theme name' + } + ] + }); + }); + + it('should post to create a template', () => { + service + .create({ + name: '', + anonymous: true, + friendlyName: '' + } as DotTemplate) + .subscribe((template) => { + expect(template as any).toEqual({ + identifier: '1234', + name: 'Theme name' + }); + }); + + const req = httpMock.expectOne(TEMPLATE_API_URL); + + expect(req.request.method).toBe('POST'); + expect(req.request.body).toEqual({ name: '', anonymous: true, friendlyName: '' }); + + req.flush({ + entity: { + identifier: '1234', + name: 'Theme name' + } + }); + }); + + it('should put to update a template', () => { + service + .update({ + name: '', + anonymous: true, + friendlyName: '' + } as DotTemplate) + .subscribe((template) => { + expect(template as any).toEqual({ + identifier: '1234', + name: 'Theme name' + }); + }); + + const req = httpMock.expectOne(TEMPLATE_API_URL); + + expect(req.request.method).toBe('PUT'); + expect(req.request.body).toEqual({ name: '', anonymous: true, friendlyName: '' }); + + req.flush({ + entity: { + identifier: '1234', + name: 'Theme name' + } + }); + }); + it('should put to save and publish a template', () => { + service + .saveAndPublish({ + name: '', + anonymous: true, + friendlyName: '' + } as DotTemplate) + .subscribe((template) => { + expect(template as any).toEqual({ + identifier: '1234', + name: 'Theme name' + }); + }); + + const req = httpMock.expectOne(`${TEMPLATE_API_URL}_savepublish`); + + expect(req.request.method).toBe('PUT'); + expect(req.request.body).toEqual({ name: '', anonymous: true, friendlyName: '' }); + + req.flush({ + entity: { + identifier: '1234', + name: 'Theme name' + } + }); + }); + it('should delete a template', () => { + service.delete(['testId01']).subscribe(); + const req = httpMock.expectOne(TEMPLATE_API_URL); + + expect(req.request.method).toBe('DELETE'); + expect(req.request.body).toEqual(['testId01']); + req.flush(mockBulkResponseSuccess); + }); + it('should unArchive a template', () => { + service.unArchive(['testId01']).subscribe(); + const req = httpMock.expectOne(`${TEMPLATE_API_URL}_unarchive`); + + expect(req.request.method).toBe('PUT'); + expect(req.request.body).toEqual(['testId01']); + req.flush(mockBulkResponseSuccess); + }); + it('should archive a template', () => { + service.archive(['testId01']).subscribe(); + const req = httpMock.expectOne(`${TEMPLATE_API_URL}_archive`); + + expect(req.request.method).toBe('PUT'); + expect(req.request.body).toEqual(['testId01']); + req.flush(mockBulkResponseSuccess); + }); + it('should unPublish a template', () => { + service.unPublish(['testId01']).subscribe(); + const req = httpMock.expectOne(`${TEMPLATE_API_URL}_unpublish`); + + expect(req.request.method).toBe('PUT'); + expect(req.request.body).toEqual(['testId01']); + req.flush(mockBulkResponseSuccess); + }); + it('should publish a template', () => { + service.publish(['testId01']).subscribe(); + const req = httpMock.expectOne(`${TEMPLATE_API_URL}_publish`); + + expect(req.request.method).toBe('PUT'); + expect(req.request.body).toEqual(['testId01']); + req.flush(mockBulkResponseSuccess); + }); + it('should copy a template', () => { + service.copy('testId01').subscribe(); + const req = httpMock.expectOne(`${TEMPLATE_API_URL}testId01/_copy`); + + expect(req.request.method).toBe('PUT'); + req.flush(mockTemplate); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/api/services/dot-templates/dot-templates.service.ts b/ui/apps/dotcms-ui/src/app/api/services/dot-templates/dot-templates.service.ts new file mode 100644 index 000000000000..683b7a1a13b6 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/dot-templates/dot-templates.service.ts @@ -0,0 +1,179 @@ +import { catchError, map, pluck, take } from 'rxjs/operators'; +import { Injectable } from '@angular/core'; +import { HttpErrorResponse } from '@angular/common/http'; + +import { Observable } from 'rxjs'; +import { CoreWebService, DotRequestOptionsArgs } from '@dotcms/dotcms-js'; + +import { DotHttpErrorManagerService } from '@services/dot-http-error-manager/dot-http-error-manager.service'; +import { DotTemplate } from '@shared/models/dot-edit-layout-designer'; +import { DotActionBulkResult } from '@models/dot-action-bulk-result/dot-action-bulk-result.model'; + +export const TEMPLATE_API_URL = '/api/v1/templates/'; +/** + * Provide util methods to handle templates in the system. + * @export + * @class DotTemplatesService + */ +@Injectable() +export class DotTemplatesService { + constructor( + private coreWebService: CoreWebService, + private httpErrorManagerService: DotHttpErrorManagerService + ) {} + + /** + * Return a list of templates. + * @returns Observable + * @memberof DotTemplatesService + */ + get(): Observable { + return this.request({ url: TEMPLATE_API_URL }); + } + + /** + * Get the template, pass the version default working + * + * @param {string} id + * @param {string} [version='working'] + * @returns {Observable} + * @memberof DotTemplatesService + */ + getById(id: string, version = 'working'): Observable { + const url = `${TEMPLATE_API_URL}${id}/${version}`; + + return this.request({ + url + }); + } + + /** + * Get the template filtered by tittle or inode . + * + * @param {string} filter + * @returns {Observable} + * @memberof DotTemplatesService + */ + getFiltered(filter: string): Observable { + const url = `${TEMPLATE_API_URL}?filter=${filter}`; + return this.request({ + url + }); + } + + /** + * Creates a template + * + * @param {DotTemplate} values + * @return Observable + * @memberof DotTemplatesService + */ + create(values: DotTemplate): Observable { + return this.request({ method: 'POST', url: TEMPLATE_API_URL, body: values }); + } + + /** + * Updates a template + * @returns Observable + * @memberof DotTemplatesService + */ + update(values: DotTemplate): Observable { + return this.request({ method: 'PUT', url: TEMPLATE_API_URL, body: values }); + } + + /** + * Save and Publish a template + * @param {DotTemplate} values + * @returns Observable + * @memberof DotTemplatesService + */ + saveAndPublish(values: DotTemplate): Observable { + return this.request({ + method: 'PUT', + url: `${TEMPLATE_API_URL}_savepublish`, + body: values + }); + } + + /** + * Delete a template + * @param {string[]} identifiers + * @returns Observable + * @memberof DotTemplatesService + */ + delete(identifiers: string[]): Observable { + return this.request({ + method: 'DELETE', + url: TEMPLATE_API_URL, + body: identifiers + }); + } + + /** + * Unarchive a template + * @param {string[]} identifiers + * @returns Observable + * @memberof DotTemplatesService + */ + unArchive(identifiers: string[]): Observable { + const url = `${TEMPLATE_API_URL}_unarchive`; + return this.request({ method: 'PUT', url, body: identifiers }); + } + + /** + * Archive a template + * @param {string[]} identifiers + * @returns Observable + * @memberof DotTemplatesService + */ + archive(identifiers: string[]): Observable { + const url = `${TEMPLATE_API_URL}_archive`; + return this.request({ method: 'PUT', url, body: identifiers }); + } + + /** + * Unpublish a template00 + * @param {string[]} identifiers + * @returns Observable + * @memberof DotTemplatesService + */ + unPublish(identifiers: string[]): Observable { + const url = `${TEMPLATE_API_URL}_unpublish`; + return this.request({ method: 'PUT', url, body: identifiers }); + } + + /** + * Publish a template + * @param {string[]} identifiers + * @returns Observable + * @memberof DotTemplatesService + */ + publish(identifiers: string[]): Observable { + const url = `${TEMPLATE_API_URL}_publish`; + return this.request({ method: 'PUT', url, body: identifiers }); + } + + /** + * Copy a template + * @param {string} identifier + * @returns Observable + * @memberof DotTemplatesService + */ + copy(identifier: string): Observable { + const url = `${TEMPLATE_API_URL}${identifier}/_copy`; + return this.request({ method: 'PUT', url }); + } + + private request(options: DotRequestOptionsArgs): Observable { + const response$ = this.coreWebService.requestView(options); + return response$.pipe( + pluck('entity'), + catchError((error: HttpErrorResponse) => { + return this.httpErrorManagerService.handle(error).pipe( + take(1), + map(() => null) + ); + }) + ); + } +} diff --git a/ui/apps/dotcms-ui/src/app/api/services/dot-themes/dot-themes.service.spec.ts b/ui/apps/dotcms-ui/src/app/api/services/dot-themes/dot-themes.service.spec.ts new file mode 100644 index 000000000000..4d5d740d2d97 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/dot-themes/dot-themes.service.spec.ts @@ -0,0 +1,38 @@ +import { TestBed, getTestBed } from '@angular/core/testing'; +import { HttpTestingController, HttpClientTestingModule } from '@angular/common/http/testing'; +import { CoreWebService } from '@dotcms/dotcms-js'; + +import { DotThemesService } from './dot-themes.service'; +import { mockDotThemes } from '@tests/dot-themes.mock'; +import { CoreWebServiceMock } from '@tests/core-web.service.mock'; +import { DotTheme } from '@models/dot-edit-layout-designer'; + +describe('DotThemesService', () => { + let injector: TestBed; + let dotThemesService: DotThemesService; + let httpMock: HttpTestingController; + + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [HttpClientTestingModule], + providers: [{ provide: CoreWebService, useClass: CoreWebServiceMock }, DotThemesService] + }); + injector = getTestBed(); + dotThemesService = injector.get(DotThemesService); + httpMock = injector.get(HttpTestingController); + }); + + it('should get Themes', () => { + dotThemesService.get('inode').subscribe((themes: DotTheme) => { + expect(themes).toEqual(mockDotThemes[0]); + }); + + const req = httpMock.expectOne(`v1/themes/id/inode`); + expect(req.request.method).toBe('GET'); + req.flush({ entity: mockDotThemes[0] }); + }); + + afterEach(() => { + httpMock.verify(); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/api/services/dot-themes/dot-themes.service.ts b/ui/apps/dotcms-ui/src/app/api/services/dot-themes/dot-themes.service.ts new file mode 100644 index 000000000000..ad81407b0839 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/dot-themes/dot-themes.service.ts @@ -0,0 +1,31 @@ +import { pluck } from 'rxjs/operators'; +import { Injectable } from '@angular/core'; +import { CoreWebService } from '@dotcms/dotcms-js'; +import { Observable } from 'rxjs'; + +import { DotTheme } from '@shared/models/dot-edit-layout-designer'; + +/** + * Provide util methods to get themes information. + * @export + * @class DotThemesService + */ +@Injectable() +export class DotThemesService { + constructor(private coreWebService: CoreWebService) {} + + /** + * Get Theme information based on the inode. + * + * @param string inode + * @returns Observable + * @memberof DotThemesService + */ + get(inode: string): Observable { + return this.coreWebService + .requestView({ + url: 'v1/themes/id/' + inode + }) + .pipe(pluck('entity')); + } +} diff --git a/ui/apps/dotcms-ui/src/app/api/services/dot-ui-colors/dot-ui-colors.service.spec.ts b/ui/apps/dotcms-ui/src/app/api/services/dot-ui-colors/dot-ui-colors.service.spec.ts new file mode 100644 index 000000000000..b60ea8a5b039 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/dot-ui-colors/dot-ui-colors.service.spec.ts @@ -0,0 +1,103 @@ +import { DotUiColorsService } from './dot-ui-colors.service'; +import { TestBed } from '@angular/core/testing'; + +describe('DotUiColorsService', () => { + let service: DotUiColorsService; + let injector; + let setPropertySpy; + + beforeEach(() => { + injector = TestBed.configureTestingModule({ + providers: [DotUiColorsService] + }); + + service = injector.get(DotUiColorsService); + + setPropertySpy = jasmine.createSpy('setProperty'); + spyOn(document as Document, 'querySelector').and.returnValue({ + style: { + setProperty: setPropertySpy + } + } as HTMLElement); + + spyOn(window as Window, 'getComputedStyle').and.returnValue({ + getPropertyValue: (cssVar: string) => { + const map = { + '--color-main': '#C336E5', + '--color-sec': '#54428E', + '--color-background': '#3A3847' + }; + return map[cssVar]; + } + } as CSSStyleDeclaration); + }); + + it('should set all colors', () => { + service.setColors(document.querySelector('html'), { + primary: '#78E4FF', + secondary: '#98FF78', + background: '#CB8978' + }); + + const html = document.querySelector(''); + + expect(html.style.setProperty).toHaveBeenCalledWith('--color-main', '#78E4FF'); + expect(html.style.setProperty).toHaveBeenCalledWith('--color-main_mod', '#B5F0FF'); + expect(html.style.setProperty).toHaveBeenCalledWith('--color-main_rgb', '120, 228, 255'); + expect(html.style.setProperty).toHaveBeenCalledWith('--color-sec', '#98FF78'); + expect(html.style.setProperty).toHaveBeenCalledWith('--color-sec_rgb', '152, 255, 120'); + expect(html.style.setProperty).toHaveBeenCalledWith('--color-background', '#CB8978'); + expect(html.style.setProperty).toHaveBeenCalledTimes(6); + }); + + it('should not set invalid colors', () => { + service.setColors(document.querySelector('html'), { + primary: 'sdfadfg', + secondary: 'dfgsdfg', + background: 'dsfgsdfg' + }); + + const html = document.querySelector(''); + + expect(html.style.setProperty).not.toHaveBeenCalled(); + }); + + it('should only primary colors', () => { + service.setColors(document.querySelector('html'), { + primary: '#78E4FF', + secondary: '#54428E', + background: '#3A3847' + }); + + const html = document.querySelector(''); + expect(html.style.setProperty).toHaveBeenCalledWith('--color-main', '#78E4FF'); + expect(html.style.setProperty).toHaveBeenCalledWith('--color-main_mod', '#B5F0FF'); + expect(html.style.setProperty).toHaveBeenCalledWith('--color-main_rgb', '120, 228, 255'); + expect(html.style.setProperty).toHaveBeenCalledTimes(3); + }); + + it('should only secondary colors', () => { + service.setColors(document.querySelector('html'), { + primary: '#C336E5', + secondary: '#98FF78', + background: '#3A3847' + }); + + const html = document.querySelector(''); + expect(html.style.setProperty).toHaveBeenCalledWith('--color-sec', '#98FF78'); + expect(html.style.setProperty).toHaveBeenCalledWith('--color-sec_rgb', '152, 255, 120'); + expect(html.style.setProperty).toHaveBeenCalledTimes(2); + }); + + it('should only background colors', () => { + service.setColors(document.querySelector('html'), { + primary: '#C336E5', + secondary: '#54428E', + background: '#CB8978' + }); + + const html = document.querySelector(''); + expect(html.style.setProperty).toHaveBeenCalledWith('--color-background', '#CB8978'); + expect(html.style.setProperty).toHaveBeenCalledTimes(1); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/api/services/dot-ui-colors/dot-ui-colors.service.ts b/ui/apps/dotcms-ui/src/app/api/services/dot-ui-colors/dot-ui-colors.service.ts new file mode 100644 index 000000000000..ab3986b58127 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/dot-ui-colors/dot-ui-colors.service.ts @@ -0,0 +1,70 @@ +import { Injectable } from '@angular/core'; +import { TinyColor } from '@ctrl/tinycolor'; +import { DotUiColors } from '@dotcms/dotcms-js'; + +@Injectable() +export class DotUiColorsService { + private currentColors: DotUiColors; + private readonly COL_MAIN_LIGHTEN_VAL = 12; + + /** + * Set css variables colors + * + * @param DotUiColors colors + * @memberof DotUiColorsService + */ + setColors(el: HTMLElement, colors?: DotUiColors): void { + this.currentColors = colors || this.currentColors; + + this.setColorMain(el, this.currentColors.primary); + this.setColorSec(el, this.currentColors.secondary); + this.setColorBackground(el, this.currentColors.background); + } + + private getDefaultsColors(el: HTMLElement): DotUiColors { + const values = window.getComputedStyle(el); + + return { + primary: values.getPropertyValue('--color-main'), + secondary: values.getPropertyValue('--color-sec'), + background: values.getPropertyValue('--color-background') + }; + } + + private getRgbString(color: TinyColor): string { + const rgb = color.toRgb(); + return `${rgb.r}, ${rgb.g}, ${rgb.b}`; + } + + private setColorBackground(el: HTMLElement, color: string): void { + const colorBackground: TinyColor = new TinyColor(color); + + if (colorBackground.isValid && this.getDefaultsColors(el).background !== color) { + el.style.setProperty('--color-background', colorBackground.toHexString().toUpperCase()); + } + } + + private setColorMain(el: HTMLElement, color: string): void { + const colorMain = new TinyColor(color); + + if (colorMain.isValid && this.getDefaultsColors(el).primary !== color) { + const colorMainMod = `#${colorMain + .lighten(this.COL_MAIN_LIGHTEN_VAL) + .toHex() + .toUpperCase()}`; + + el.style.setProperty('--color-main', colorMain.toHexString().toUpperCase()); + el.style.setProperty('--color-main_mod', colorMainMod); + el.style.setProperty('--color-main_rgb', this.getRgbString(colorMain)); + } + } + + private setColorSec(el: HTMLElement, color: string): void { + const colorSec = new TinyColor(color); + + if (colorSec.isValid && this.getDefaultsColors(el).secondary !== color) { + el.style.setProperty('--color-sec', colorSec.toHexString().toUpperCase()); + el.style.setProperty('--color-sec_rgb', this.getRgbString(colorSec)); + } + } +} diff --git a/ui/apps/dotcms-ui/src/app/api/services/dot-verionable/dot-versionable.service.spec.ts b/ui/apps/dotcms-ui/src/app/api/services/dot-verionable/dot-versionable.service.spec.ts new file mode 100644 index 000000000000..38290b03320c --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/dot-verionable/dot-versionable.service.spec.ts @@ -0,0 +1,35 @@ +import { getTestBed, TestBed } from '@angular/core/testing'; +import { DotVersionableService } from './dot-versionable.service'; +import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; +import { CoreWebService } from '@dotcms/dotcms-js'; +import { CoreWebServiceMock } from '@tests/core-web.service.mock'; + +const mockResponse = { entity: { inode: '123' } }; + +describe('DotVersionableService', () => { + let service: DotVersionableService; + let httpMock: HttpTestingController; + + beforeEach(() => { + TestBed.configureTestingModule({}); + TestBed.configureTestingModule({ + imports: [HttpClientTestingModule], + providers: [ + { provide: CoreWebService, useClass: CoreWebServiceMock }, + DotVersionableService + ] + }); + service = TestBed.inject(DotVersionableService); + httpMock = getTestBed().get(HttpTestingController); + }); + + it('should bring back version', () => { + service.bringBack('123').subscribe((res) => { + expect(res).toEqual(mockResponse.entity); + }); + + const req = httpMock.expectOne('/api/v1/versionables/123/_bringback'); + expect(req.request.method).toBe('PUT'); + req.flush(mockResponse); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/api/services/dot-verionable/dot-versionable.service.ts b/ui/apps/dotcms-ui/src/app/api/services/dot-verionable/dot-versionable.service.ts new file mode 100644 index 000000000000..3dcea6a25e39 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/dot-verionable/dot-versionable.service.ts @@ -0,0 +1,29 @@ +import { Injectable } from '@angular/core'; +import { CoreWebService } from '@dotcms/dotcms-js'; +import { Observable } from 'rxjs'; +import { pluck } from 'rxjs/operators'; + +export interface DotVersionable { + inode: string; +} + +@Injectable() +export class DotVersionableService { + constructor(private coreWebService: CoreWebService) {} + + /** + * Bring back specific version of based on the inode. + * + * @param string inode + * @returns Observable + * @memberof DotVersionableService + */ + bringBack(inode: string): Observable { + return this.coreWebService + .requestView({ + method: 'PUT', + url: `/api/v1/versionables/${inode}/_bringback` + }) + .pipe(pluck('entity')); + } +} diff --git a/ui/apps/dotcms-ui/src/app/api/services/dot-wizard/dot-wizard.service.spec.ts b/ui/apps/dotcms-ui/src/app/api/services/dot-wizard/dot-wizard.service.spec.ts new file mode 100644 index 000000000000..0176d3c2d08f --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/dot-wizard/dot-wizard.service.spec.ts @@ -0,0 +1,38 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ + +import { TestBed } from '@angular/core/testing'; +import { DotWizardService } from './dot-wizard.service'; +import { DotWizardStep } from '@models/dot-wizard-step/dot-wizard-step.model'; +import { DotWizardInput } from '@models/dot-wizard-input/dot-wizard-input.model'; + +describe('DotWizardService', () => { + let service: DotWizardService; + const mockOutput = { id: '11', name: 'DotCMS' }; + const mockWizardSteps: DotWizardStep[] = [{ component: 'test', data: { id: '12' } }]; + const mockWizardInput: DotWizardInput = { + steps: mockWizardSteps, + title: 'Wizard' + }; + beforeEach(() => { + TestBed.configureTestingModule({ providers: [DotWizardService] }); + service = TestBed.get(DotWizardService); + }); + + it('should receive the steps', () => { + let data: DotWizardInput; + service.showDialog$.subscribe((result) => { + data = result; + }); + service.open(mockWizardInput); + expect(data).toEqual(mockWizardInput); + }); + + it('should receive output on open subscription', () => { + let outputData = null; + service.open(mockWizardInput).subscribe((data) => { + outputData = data; + }); + service.output$(mockOutput); + expect(outputData).toEqual(mockOutput); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/api/services/dot-wizard/dot-wizard.service.ts b/ui/apps/dotcms-ui/src/app/api/services/dot-wizard/dot-wizard.service.ts new file mode 100644 index 000000000000..280a4b2790f0 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/dot-wizard/dot-wizard.service.ts @@ -0,0 +1,33 @@ +import { Injectable } from '@angular/core'; +import { Observable, Subject } from 'rxjs'; +import { DotWizardInput } from '@models/dot-wizard-input/dot-wizard-input.model'; + +@Injectable() +export class DotWizardService { + private input: Subject = new Subject(); + private output: Subject> = new Subject<{ [key: string]: string }>(); + + get showDialog$(): Observable { + return this.input.asObservable(); + } + + /** + * Notify the data collected in wizard. + * @param {{ [key: string]: string | string[] }} form + * @memberof DotWizardService + */ + output$(form: { [key: string]: string | string[] }): void { + this.output.next(form); + } + + /** + * Send the wizard data to in input subscription and waits for the output + * @param {DotWizardInput} data + * @returns Observable<{ [key: string]: string }> + * @memberof DotWizardService + */ + open(data: DotWizardInput): Observable { + this.input.next(data); + return this.output.asObservable() as Observable; + } +} diff --git a/ui/apps/dotcms-ui/src/app/api/services/dot-workflow-actions-fire/dot-workflow-actions-fire.service.spec.ts b/ui/apps/dotcms-ui/src/app/api/services/dot-workflow-actions-fire/dot-workflow-actions-fire.service.spec.ts new file mode 100644 index 000000000000..948390acd1e3 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/dot-workflow-actions-fire/dot-workflow-actions-fire.service.spec.ts @@ -0,0 +1,209 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ + +import { DotWorkflowActionsFireService } from './dot-workflow-actions-fire.service'; +import { TestBed, getTestBed } from '@angular/core/testing'; +import { HttpTestingController, HttpClientTestingModule } from '@angular/common/http/testing'; +import { CoreWebService } from '@dotcms/dotcms-js'; +import { CoreWebServiceMock } from '@tests/core-web.service.mock'; +import { DotActionBulkRequestOptions } from '@shared/models/dot-action-bulk-request-options/dot-action-bulk-request-options.model'; +import { DotActionBulkResult } from '@shared/models/dot-action-bulk-result/dot-action-bulk-result.model'; + +const mockBulkOptions: DotActionBulkRequestOptions = { + workflowActionId: '1', + contentletIds: ['1'], + additionalParams: { + assignComment: { + comment: 'comment', + assign: '12345' + }, + pushPublish: { + whereToSend: 'w', + iWantTo: 'i', + expireDate: 'e', + expireTime: 'e', + publishDate: 'p', + publishTime: 'pp', + filterKey: 'f', + timezoneId: 'America/Costa_Rica' + }, + additionalParamsMap: { _path_to_move: '' } + } +}; + +describe('DotWorkflowActionsFireService', () => { + let injector: TestBed; + let dotWorkflowActionsFireService: DotWorkflowActionsFireService; + let httpMock: HttpTestingController; + + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [HttpClientTestingModule], + providers: [ + { provide: CoreWebService, useClass: CoreWebServiceMock }, + DotWorkflowActionsFireService + ] + }); + injector = getTestBed(); + dotWorkflowActionsFireService = injector.get(DotWorkflowActionsFireService); + httpMock = injector.inject(HttpTestingController); + }); + + it('should SAVE and return a new contentlet', () => { + dotWorkflowActionsFireService + .newContentlet('persona', { name: 'Test' }) + .subscribe((res) => { + expect(res).toEqual([ + { + name: 'test' + } + ]); + }); + + const req = httpMock.expectOne('v1/workflow/actions/default/fire/NEW'); + expect(req.request.method).toBe('PUT'); + expect(req.request.body).toEqual({ + contentlet: { + contentType: 'persona', + name: 'Test' + } + }); + req.flush({ + entity: [ + { + name: 'test' + } + ] + }); + }); + + it('should EDIT and return the updated contentlet', () => { + const fieldName = 'title'; + + dotWorkflowActionsFireService + .saveContentlet({ inode: '123', [fieldName]: 'hello world' }) + .subscribe((res) => { + expect(res).toEqual([ + { + inode: '123' + } + ]); + }); + + const req = httpMock.expectOne('v1/workflow/actions/default/fire/EDIT?inode=123'); + expect(req.request.method).toBe('PUT'); + // expect(req.request.body).toEqual({ + // contentlet: { + // inode: '123', + // [fieldName]: 'hello world' + // } + // }); + req.flush({ + entity: [ + { + inode: '123' + } + ] + }); + }); + + it('should PUBLISH and return a new contentlet', () => { + dotWorkflowActionsFireService + .publishContentlet('persona', { name: 'test' }) + .subscribe((res) => { + expect(res).toEqual([ + { + name: 'test' + } + ]); + }); + + const req = httpMock.expectOne('v1/workflow/actions/default/fire/PUBLISH'); + expect(req.request.method).toBe('PUT'); + expect(req.request.body).toEqual({ + contentlet: { + contentType: 'persona', + name: 'test' + } + }); + req.flush({ + entity: [ + { + name: 'test' + } + ] + }); + }); + + it('should PUBLISH, wait for index and return a new contentlet', () => { + dotWorkflowActionsFireService + .publishContentletAndWaitForIndex('persona', { name: 'test' }) + .subscribe((res) => { + expect(res).toEqual([ + { + name: 'test' + } + ]); + }); + + const req = httpMock.expectOne('v1/workflow/actions/default/fire/PUBLISH'); + expect(req.request.method).toBe('PUT'); + expect(req.request.body).toEqual({ + contentlet: { + contentType: 'persona', + name: 'test', + indexPolicy: 'WAIT_FOR' + } + }); + req.flush({ + entity: [ + { + name: 'test' + } + ] + }); + }); + + it('should create and return a new Content', () => { + const data = { id: '123' }; + dotWorkflowActionsFireService.fireTo('123', 'new', data).subscribe((res: any) => { + expect(res).toEqual([ + { + name: 'test' + } + ]); + }); + + const req = httpMock.expectOne( + 'v1/workflow/actions/new/fire?inode=123&indexPolicy=WAIT_FOR' + ); + expect(req.request.method).toBe('PUT'); + req.flush({ + entity: [ + { + name: 'test' + } + ] + }); + }); + + it('should fire bulk request', () => { + const mockResult: DotActionBulkResult = { + skippedCount: 1, + successCount: 2, + fails: [] + }; + dotWorkflowActionsFireService.bulkFire(mockBulkOptions).subscribe((res) => { + expect(res).toEqual(mockResult); + }); + + const req = httpMock.expectOne('/api/v1/workflow/contentlet/actions/bulk/fire'); + expect(req.request.method).toBe('PUT'); + req.flush({ + entity: mockResult + }); + }); + + afterEach(() => { + httpMock.verify(); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/api/services/dot-workflow-actions-fire/dot-workflow-actions-fire.service.ts b/ui/apps/dotcms-ui/src/app/api/services/dot-workflow-actions-fire/dot-workflow-actions-fire.service.ts new file mode 100644 index 000000000000..8125a255826d --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/dot-workflow-actions-fire/dot-workflow-actions-fire.service.ts @@ -0,0 +1,142 @@ +import { Injectable } from '@angular/core'; +import { Observable } from 'rxjs'; +import { pluck, take } from 'rxjs/operators'; +import { CoreWebService } from '@dotcms/dotcms-js'; +import { DotCMSContentlet } from '@dotcms/dotcms-models'; +import { DotActionBulkRequestOptions } from '@models/dot-action-bulk-request-options/dot-action-bulk-request-options.model'; +import { DotActionBulkResult } from '@models/dot-action-bulk-result/dot-action-bulk-result.model'; + +interface DotActionRequestOptions { + contentType?: string; + data: { [key: string]: string }; + action: ActionToFire; +} + +enum ActionToFire { + NEW = 'NEW', + PUBLISH = 'PUBLISH', + EDIT = 'EDIT' +} + +@Injectable() +export class DotWorkflowActionsFireService { + constructor(private coreWebService: CoreWebService) {} + + /** + * Fire a workflow action over a contentlet + * + * @param {string} inode + * @param {string} actionId + * @param {{ [key: string]: string }} data + * @returns Observable // contentlet + * @memberof DotWorkflowActionsFireService + */ + fireTo( + inode: string, + actionId: string, + data?: T + ): Observable { + return this.coreWebService + .requestView({ + body: data, + method: 'PUT', + url: `v1/workflow/actions/${actionId}/fire?inode=${inode}&indexPolicy=WAIT_FOR` + }) + .pipe(pluck('entity')); + } + + /** + * Fire a workflow action over a contentlet + * + * @param {DotActionBulkRequestOptions} data + * @returns Observable // contentlet + * @memberof DotWorkflowActionsFireService + */ + bulkFire(data: DotActionBulkRequestOptions): Observable { + return this.coreWebService + .requestView({ + body: data, + method: 'PUT', + url: `/api/v1/workflow/contentlet/actions/bulk/fire` + }) + .pipe(pluck('entity')); + } + + /** + * Fire a "NEW" action over the content type received with the specified data + * + * @param {contentType} string + * @param {[key: string]: string} data + * @returns Observable + * + * @memberof DotWorkflowActionsFireService + */ + newContentlet(contentType: string, data: { [key: string]: string }): Observable { + return this.request({ contentType, data, action: ActionToFire.NEW }); + } + + /** + * Fire a "PUBLISH" action over the content type received with the specified data + * + * @template T + * @param {string} contentType + * @param {{ [key: string]: string}} data + * @returns {Observable} + * @memberof DotWorkflowActionsFireService + */ + publishContentlet(contentType: string, data: { [key: string]: string }): Observable { + return this.request({ + contentType, + data, + action: ActionToFire.PUBLISH + }); + } + /** + * Fire an "EDIT" action over the content type received with the specified data + * + * @template T + * @param {string} contentType + * @param {{ [key: string]: unknown}} data + * @return {*} {Observable} + * @memberof DotWorkflowActionsFireService + */ + saveContentlet(data: { [key: string]: string }): Observable { + return this.request({ + data, + action: ActionToFire.EDIT + }); + } + + /** + * Fire a "PUBLISH" action over the content type received and append the wait for index attr + * + * @template T + * @param {string} contentType + * @param {{ [key: string]: unknown}} data + * @returns {Observable} + * @memberof DotWorkflowActionsFireService + */ + publishContentletAndWaitForIndex( + contentType: string, + data: { [key: string]: string } + ): Observable { + return this.publishContentlet(contentType, { + ...data, + ...{ indexPolicy: 'WAIT_FOR' } + }); + } + + private request({ contentType, data, action }: DotActionRequestOptions): Observable { + const contentlet = contentType ? { contentType: contentType, ...data } : data; + + return this.coreWebService + .requestView({ + method: 'PUT', + url: `v1/workflow/actions/default/fire/${action}${ + data.inode ? `?inode=${data.inode}` : '' + }`, + body: { contentlet } + }) + .pipe(take(1), pluck('entity')); + } +} diff --git a/ui/apps/dotcms-ui/src/app/api/services/dot-workflow-event-handler/dot-workflow-event-handler.service.spec.ts b/ui/apps/dotcms-ui/src/app/api/services/dot-workflow-event-handler/dot-workflow-event-handler.service.spec.ts new file mode 100644 index 000000000000..7f2c10a5e40e --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/dot-workflow-event-handler/dot-workflow-event-handler.service.spec.ts @@ -0,0 +1,338 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ + +import { TestBed } from '@angular/core/testing'; + +import { PushPublishService } from '@services/push-publish/push-publish.service'; +import { DotMessageDisplayService } from '@components/dot-message-display/services'; +import { DotMessageService } from '@services/dot-message/dot-messages.service'; +import { DotWizardService } from '@services/dot-wizard/dot-wizard.service'; +import { DotIframeService } from '@components/_common/iframe/service/dot-iframe/dot-iframe.service'; +import { DotHttpErrorManagerService } from '@services/dot-http-error-manager/dot-http-error-manager.service'; +import { DotWorkflowActionsFireService } from '@services/dot-workflow-actions-fire/dot-workflow-actions-fire.service'; +import { DotGlobalMessageService } from '@components/_common/dot-global-message/dot-global-message.service'; +import { mockWorkflowsActions } from '@tests/dot-workflows-actions.mock'; +import { MockPushPublishService } from '@portlets/shared/dot-content-types-listing/dot-content-types.component.spec'; +import { MockDotMessageService } from '@tests/dot-message-service.mock'; +import { DotWizardStep } from '@models/dot-wizard-step/dot-wizard-step.model'; +import { DotCommentAndAssignFormComponent } from '@components/_common/forms/dot-comment-and-assign-form/dot-comment-and-assign-form.component'; +import { DotPushPublishFormComponent } from '@components/_common/forms/dot-push-publish-form/dot-push-publish-form.component'; +import { DotWizardInput } from '@models/dot-wizard-input/dot-wizard-input.model'; +import { of } from 'rxjs'; +import { DotMessageSeverity, DotMessageType } from '@components/dot-message-display/model'; +import { DotWorkflowEventHandlerService } from '@services/dot-workflow-event-handler/dot-workflow-event-handler.service'; +import { + CoreWebService, + DotcmsConfigService, + DotcmsEventsService, + DotEventsSocket, + DotEventsSocketURL, + LoggerService, + LoginService, + StringUtils +} from '@dotcms/dotcms-js'; +import { dotEventSocketURLFactory } from '@tests/dot-test-bed'; +import { CoreWebServiceMock } from '@tests/core-web.service.mock'; +import { DotRouterService } from '@services/dot-router/dot-router.service'; +import { RouterTestingModule } from '@angular/router/testing'; +import { DotAlertConfirmService } from '@services/dot-alert-confirm'; +import { ConfirmationService } from 'primeng/api'; +import { LoginServiceMock } from '@tests/login-service.mock'; +import { DotEventsService } from '@services/dot-events/dot-events.service'; +import { DotCMSWorkflowAction, DotCMSWorkflowActionEvent } from '@dotcms/dotcms-models'; +import { DotActionBulkResult } from '@models/dot-action-bulk-result/dot-action-bulk-result.model'; +import { DotActionBulkRequestOptions } from '@models/dot-action-bulk-request-options/dot-action-bulk-request-options.model'; +import { HttpClientTestingModule } from '@angular/common/http/testing'; +import { DotFormatDateService } from '@services/dot-format-date-service'; +import { DotFormatDateServiceMock } from '@dotcms/app/test/format-date-service.mock'; +import { DotWorkflowPayload, DotProcessedWorkflowPayload } from '@dotcms/dotcms-models'; + +const mockWAEvent: DotCMSWorkflowActionEvent = { + workflow: mockWorkflowsActions[0], + callback: 'test', + inode: '123Inode', + selectedInodes: [] +}; + +const mockWizardSteps: DotWizardStep[] = [ + { + component: DotCommentAndAssignFormComponent, + data: { + assignable: true, + commentable: true, + moveable: true, + roleId: mockWorkflowsActions[0].nextAssign, + roleHierarchy: mockWorkflowsActions[0].roleHierarchyForAssign + } + }, + { + component: DotPushPublishFormComponent, + data: {} + } +]; + +const mockWizardInput: DotWizardInput = { + title: 'Workflow Action', + steps: mockWizardSteps +}; + +const mockWizardOutputData: DotWorkflowPayload = { + assign: '654b0931-1027-41f7-ad4d-173115ed8ec1', + comments: 'ds', + pathToMove: '/test/', + environment: ['37fe23d5-588d-4c61-a9ea-70d01e913344'], + expireDate: '2020-08-11 19:59', + filterKey: 'Intelligent.yml', + publishDate: '2020-08-05 17:59', + pushActionSelected: 'publishexpire', + timezoneId: 'America/Costa_Rica' +}; + +const mockWizardOutputTransformedData: DotProcessedWorkflowPayload = { + assign: '654b0931-1027-41f7-ad4d-173115ed8ec1', + comments: 'ds', + expireDate: '2020-08-11', + expireTime: '19-59', + filterKey: 'Intelligent.yml', + iWantTo: 'publishexpire', + publishDate: '2020-08-05', + publishTime: '17-59', + whereToSend: '37fe23d5-588d-4c61-a9ea-70d01e913344', + timezoneId: 'America/Costa_Rica', + pathToMove: '/test/', + contentlet: {} +}; + +describe('DotWorkflowEventHandlerService', () => { + let dotWorkflowEventHandlerService: DotWorkflowEventHandlerService; + let dotWizardService: DotWizardService; + let dotWorkflowActionsFireService: DotWorkflowActionsFireService; + let dotGlobalMessageService: DotGlobalMessageService; + let dotIframeService: DotIframeService; + let pushPublishService: PushPublishService; + let dotMessageDisplayService: DotMessageDisplayService; + + const messageServiceMock = new MockDotMessageService({ + 'editpage.actions.fire.confirmation': 'The action "{0}" was executed correctly', + 'editpage.actions.fire.error.add.environment': 'place holder text', + 'Workflow-Action': 'Workflow Action' + }); + + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [RouterTestingModule, HttpClientTestingModule], + providers: [ + DotWorkflowEventHandlerService, + DotMessageDisplayService, + DotWizardService, + DotIframeService, + DotHttpErrorManagerService, + DotWorkflowActionsFireService, + DotGlobalMessageService, + { + provide: DotMessageService, + useValue: messageServiceMock + }, + { + provide: PushPublishService, + useClass: MockPushPublishService + }, + { + provide: LoginService, + useClass: LoginServiceMock + }, + DotcmsEventsService, + DotEventsSocket, + { provide: DotEventsSocketURL, useFactory: dotEventSocketURLFactory }, + DotcmsConfigService, + { provide: CoreWebService, useClass: CoreWebServiceMock }, + LoggerService, + StringUtils, + { provide: DotFormatDateService, useClass: DotFormatDateServiceMock }, + DotRouterService, + DotAlertConfirmService, + ConfirmationService, + DotEventsService + ] + }); + + dotWorkflowEventHandlerService = TestBed.get(DotWorkflowEventHandlerService); + dotWizardService = TestBed.get(DotWizardService); + dotWorkflowActionsFireService = TestBed.get(DotWorkflowActionsFireService); + dotGlobalMessageService = TestBed.get(DotGlobalMessageService); + dotIframeService = TestBed.get(DotIframeService); + pushPublishService = TestBed.get(PushPublishService); + dotMessageDisplayService = TestBed.get(DotMessageDisplayService); + }); + + describe('wizard', () => { + it('should open with the correct data', () => { + spyOn(dotWizardService, 'open').and.callThrough(); + dotWorkflowEventHandlerService.open({ ...mockWAEvent }); + expect(dotWizardService.open).toHaveBeenCalledWith(mockWizardInput); + }); + it('should fire the workflow action with the correct data, execute the callback and send a message on output', () => { + spyOn(dotWorkflowActionsFireService, 'fireTo').and.returnValue(of({})); + + spyOn(dotGlobalMessageService, 'display'); + spyOn(dotIframeService, 'run'); + dotWorkflowEventHandlerService.open({ ...mockWAEvent }); + dotWizardService.output$({ ...mockWizardOutputData }); + + expect(dotWorkflowActionsFireService.fireTo).toHaveBeenCalledWith( + mockWAEvent.inode, + mockWAEvent.workflow.id, + mockWizardOutputTransformedData + ); + + expect(dotGlobalMessageService.display).toHaveBeenCalledWith( + `The action "${mockWorkflowsActions[0].name}" was executed correctly` + ); + + expect(dotIframeService.run).toHaveBeenCalledWith({ name: mockWAEvent.callback }); + }); + + it('should run iframe function for legacy call', () => { + spyOn(dotIframeService, 'run'); + dotWorkflowEventHandlerService.open({ + ...mockWAEvent, + callback: 'saveAssignCallBackAngular' + }); + dotWizardService.output$({ ...mockWizardOutputData }); + + expect(dotIframeService.run).toHaveBeenCalledWith({ + name: 'saveAssignCallBackAngular', + args: [mockWAEvent.workflow.id, mockWizardOutputTransformedData] + }); + }); + + it('should fire BULK action with the correct data, execute the callback and send a message on output', () => { + const mockBulkResponse: DotActionBulkResult = { + skippedCount: 1, + successCount: 2, + fails: null + }; + + const mockBulkRequest: DotActionBulkRequestOptions = { + workflowActionId: '44d4d4cd-c812-49db-adb1-1030be73e69a', + additionalParams: { + assignComment: { + comment: mockWizardOutputData.comments, + assign: mockWizardOutputData.assign + }, + pushPublish: { + whereToSend: '37fe23d5-588d-4c61-a9ea-70d01e913344', + iWantTo: 'publishexpire', + expireDate: '2020-08-11', + expireTime: '19-59', + publishDate: '2020-08-05', + publishTime: '17-59', + filterKey: 'Intelligent.yml', + timezoneId: 'America/Costa_Rica' + }, + additionalParamsMap: { _path_to_move: mockWizardOutputData.pathToMove } + }, + query: 'query' + }; + + spyOn(dotWorkflowActionsFireService, 'bulkFire').and.returnValue(of(mockBulkResponse)); + + spyOn(dotGlobalMessageService, 'display'); + spyOn(dotIframeService, 'run'); + dotWorkflowEventHandlerService.open({ ...mockWAEvent, selectedInodes: 'query' }); + dotWizardService.output$({ ...mockWizardOutputData }); + + expect(dotWorkflowActionsFireService.bulkFire).toHaveBeenCalledWith(mockBulkRequest); + + expect(dotGlobalMessageService.display).toHaveBeenCalledWith( + `The action "${mockWorkflowsActions[0].name}" was executed correctly` + ); + + expect(dotIframeService.run).toHaveBeenCalledWith({ + name: mockWAEvent.callback, + args: [mockBulkResponse] + }); + }); + }); + + describe('checkPublishEnvironments', () => { + it('should return true if there are environments', () => { + dotWorkflowEventHandlerService.checkPublishEnvironments().subscribe((flag: boolean) => { + expect(flag).toEqual(true); + }); + }); + it('should return false and display a notification is there are no environments ', () => { + spyOn(pushPublishService, 'getEnvironments').and.returnValue(of([])); + spyOn(dotMessageDisplayService, 'push'); + + dotWorkflowEventHandlerService.checkPublishEnvironments().subscribe((flag: boolean) => { + expect(flag).toEqual(false); + }); + + expect(dotMessageDisplayService.push).toHaveBeenCalledWith({ + life: 3000, + message: messageServiceMock.get('editpage.actions.fire.error.add.environment'), + severity: DotMessageSeverity.ERROR, + type: DotMessageType.SIMPLE_MESSAGE + }); + }); + }); + + describe('containsPushPublish', () => { + it('should return true if there are Push Publish inputs', () => { + expect( + dotWorkflowEventHandlerService.containsPushPublish( + mockWorkflowsActions[0].actionInputs + ) + ).toEqual(true); + }); + it('should return false if there are no Push Publish inputs', () => { + expect( + dotWorkflowEventHandlerService.containsPushPublish([ + { + body: {}, + id: 'assignable' + } + ]) + ).toEqual(false); + }); + }); + + it('should set wizard input', () => { + const input: DotWizardInput = dotWorkflowEventHandlerService.setWizardInput( + mockWorkflowsActions[0], + mockWizardInput.title + ); + + expect(input).toEqual(mockWizardInput); + }); + + it('should return only valid Components ', () => { + const mockWorkflowActions: DotCMSWorkflowAction = { + ...mockWorkflowsActions[0] + }; + mockWorkflowActions.actionInputs = [ + { + body: {}, + id: 'invalidID' + }, + { + body: {}, + id: 'invalidID2' + } + ]; + const wizardInput: DotWizardInput = dotWorkflowEventHandlerService.setWizardInput( + mockWorkflowActions, + 'Title Test' + ); + expect(wizardInput).toEqual(null); + }); + + it('should process workflow payload', () => { + const data = dotWorkflowEventHandlerService.processWorkflowPayload( + { ...mockWizardOutputData }, + mockWorkflowsActions[0].actionInputs + ); + + expect(data).toEqual(mockWizardOutputTransformedData); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/api/services/dot-workflow-event-handler/dot-workflow-event-handler.service.ts b/ui/apps/dotcms-ui/src/app/api/services/dot-workflow-event-handler/dot-workflow-event-handler.service.ts new file mode 100644 index 000000000000..8592d2e63108 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/dot-workflow-event-handler/dot-workflow-event-handler.service.ts @@ -0,0 +1,313 @@ +import { Injectable } from '@angular/core'; +import { catchError, map, take } from 'rxjs/operators'; +import { DotMessageSeverity, DotMessageType } from '@components/dot-message-display/model'; +import { + DotCMSWorkflowAction, + DotCMSWorkflowInput, + DotCMSWorkflowActionEvent +} from '@dotcms/dotcms-models'; +import { PushPublishService } from '@services/push-publish/push-publish.service'; +import { DotMessageDisplayService } from '@components/dot-message-display/services'; +import { DotMessageService } from '@services/dot-message/dot-messages.service'; +import { DotWizardService } from '@services/dot-wizard/dot-wizard.service'; +import { DotWizardInput } from '@models/dot-wizard-input/dot-wizard-input.model'; +import { DotWizardStep } from '@models/dot-wizard-step/dot-wizard-step.model'; +import { DotIframeService } from '@components/_common/iframe/service/dot-iframe/dot-iframe.service'; +import { DotCommentAndAssignFormComponent } from '@components/_common/forms/dot-comment-and-assign-form/dot-comment-and-assign-form.component'; +import { DotPushPublishFormComponent } from '@components/_common/forms/dot-push-publish-form/dot-push-publish-form.component'; +import { DotHttpErrorManagerService } from '@services/dot-http-error-manager/dot-http-error-manager.service'; +import { DotWorkflowActionsFireService } from '@services/dot-workflow-actions-fire/dot-workflow-actions-fire.service'; +import { DotGlobalMessageService } from '@components/_common/dot-global-message/dot-global-message.service'; +import { Observable } from 'rxjs'; +import { DotEnvironment } from '@models/dot-environment/dot-environment'; +import { DotActionBulkResult } from '@models/dot-action-bulk-result/dot-action-bulk-result.model'; +import { DotActionBulkRequestOptions } from '@models/dot-action-bulk-request-options/dot-action-bulk-request-options.model'; +import { DotFormatDateService } from '@services/dot-format-date-service'; +import { DotWorkflowPayload, DotProcessedWorkflowPayload } from '@dotcms/dotcms-models'; + +enum DotActionInputs { + ASSIGNABLE = 'assignable', + COMMENTABLE = 'commentable', + COMMENTANDASSIGN = 'commentAndAssign', + MOVEABLE = 'moveable' +} + +interface DotAssignableData { + roleId: string; + roleHierarchy: boolean; +} + +const EDIT_CONTENT_CALLBACK_FUNCTION = 'saveAssignCallBackAngular'; + +@Injectable() +export class DotWorkflowEventHandlerService { + private workflowStepMap = { + commentAndAssign: DotCommentAndAssignFormComponent, + pushPublish: DotPushPublishFormComponent + }; + + constructor( + private pushPublishService: PushPublishService, + private dotMessageDisplayService: DotMessageDisplayService, + private dotMessageService: DotMessageService, + private dotWizardService: DotWizardService, + private dotIframeService: DotIframeService, + private httpErrorManagerService: DotHttpErrorManagerService, + private dotWorkflowActionsFireService: DotWorkflowActionsFireService, + private dotGlobalMessageService: DotGlobalMessageService, + private dotFormatDateService: DotFormatDateService + ) {} + + /** + * Fire the event to open the wizard to collect data + * @param {DotCMSWorkflowActionEvent} event + * @memberof DotWorkflowEventHandlerService + */ + open(event: DotCMSWorkflowActionEvent): void { + if (this.containsPushPublish(event.workflow.actionInputs)) { + this.checkPublishEnvironments() + .pipe(take(1)) + .subscribe((hasEnviroments: boolean) => { + if (hasEnviroments) { + this.openWizard(event); + } + }); + } else { + this.openWizard(event); + } + } + + /** + * Check if there are environments present otherwise send a notification + * @returns Observable + * @memberof DotWorkflowEventHandlerService + */ + checkPublishEnvironments(): Observable { + return this.pushPublishService.getEnvironments().pipe( + take(1), + map((environments: DotEnvironment[]) => { + if (environments.length) { + return true; + } else { + this.dotMessageDisplayService.push({ + life: 3000, + message: this.dotMessageService.get( + 'editpage.actions.fire.error.add.environment' + ), + severity: DotMessageSeverity.ERROR, + type: DotMessageType.SIMPLE_MESSAGE + }); + } + return false; + }) + ); + } + + /** + * Check if Push Publish is par of th sub-actions of the workflow. + * @param {DotCMSWorkflowInput[]} inputs + * @returns boolean + * @memberof DotWorkflowEventHandlerService + */ + containsPushPublish(inputs: DotCMSWorkflowInput[]): boolean { + return inputs.some((input) => input.id === 'pushPublish'); + } + + /** + * Returns the input needed to collect information of the Workflow inputs. + * + * @param {DotCMSWorkflowAction} workflow + * @param {string} title + * @returns DotWizardInput + * @memberof DotWorkflowEventHandlerService + */ + setWizardInput(workflow: DotCMSWorkflowAction, title: string): DotWizardInput { + const steps: DotWizardStep< + DotCommentAndAssignFormComponent | DotPushPublishFormComponent + >[] = []; + this.mergeCommentAndAssign(workflow).forEach((input: DotCMSWorkflowInput) => { + if (this.workflowStepMap[input.id]) { + steps.push({ + component: this.workflowStepMap[input.id], + data: input.body + }); + } + }); + return steps.length + ? { + title: title, + steps: steps + } + : null; + } + + /** + * convert the data collected to what is expecting the endpoint. + * @param {{ [key: string]: any }} data + * @param {DotCMSWorkflowInput[]} inputs + * @returns { [key: string]: any } + * @memberof DotWorkflowEventHandlerService + */ + processWorkflowPayload( + data: DotWorkflowPayload, + inputs: DotCMSWorkflowInput[] + ): DotProcessedWorkflowPayload { + const processedData = { ...data }; + if (this.containsPushPublish(inputs)) { + processedData['whereToSend'] = data.environment.join(); + processedData['iWantTo'] = data.pushActionSelected; + processedData['publishTime'] = this.dotFormatDateService.format( + new Date(data.publishDate), + 'HH-mm' + ); + processedData['publishDate'] = this.dotFormatDateService.format( + new Date(data.publishDate), + 'yyyy-MM-dd' + ); + processedData['expireTime'] = this.dotFormatDateService.format( + data.expireDate ? new Date(data.expireDate) : new Date(), + 'HH-mm' + ); + processedData['expireDate'] = this.dotFormatDateService.format( + data.expireDate ? new Date(data.expireDate) : new Date(), + 'yyyy-MM-dd' + ); + delete processedData.environment; + delete processedData.pushActionSelected; + } + processedData['contentlet'] = {}; // needed for indexPolicy=WAIT_FOR + return processedData as DotProcessedWorkflowPayload; + } + + private mergeCommentAndAssign(workflow: DotCMSWorkflowAction): DotCMSWorkflowInput[] { + const body = {}; + let workflows: DotCMSWorkflowInput[]; + workflow.actionInputs.forEach((input) => { + if (this.isValidActionInput(input.id)) { + body[input.id] = true; + } + }); + if (Object.keys(body).length) { + workflows = workflow.actionInputs.filter((input) => !this.isValidActionInput(input.id)); + workflows.unshift({ + id: DotActionInputs.COMMENTANDASSIGN, + body: { ...body, ...this.getAssignableData(workflow) } + }); + } else { + return workflow.actionInputs; + } + return workflows; + } + + private openWizard(event: DotCMSWorkflowActionEvent): void { + this.dotWizardService + .open( + this.setWizardInput(event.workflow, this.dotMessageService.get('Workflow-Action')) + ) + .pipe(take(1)) + .subscribe((data: DotWorkflowPayload) => { + this.fireWorkflowAction(event, data); + }); + } + + private fireWorkflowAction(event: DotCMSWorkflowActionEvent, data?: DotWorkflowPayload): void { + if (this.isBulkAction(event)) { + this.dotIframeService.run({ name: 'fireActionLoadingIndicator' }); + this.dotWorkflowActionsFireService + .bulkFire(this.processBulkData(event, data)) + .pipe( + take(1), + catchError((error) => { + return this.httpErrorManagerService.handle(error); + }) + ) + .subscribe((response: DotActionBulkResult) => { + this.displayNotification(event.workflow.name); + this.dotIframeService.run({ name: event.callback, args: [response] }); + }); + } else { + if (event.callback === EDIT_CONTENT_CALLBACK_FUNCTION) { + // path for create or edit content since we don't have the iNode. + this.dotIframeService.run({ + name: event.callback, + args: [ + event.workflow.id, + this.processWorkflowPayload(data, event.workflow.actionInputs) + ] + }); + } else { + this.dotWorkflowActionsFireService + .fireTo( + event.inode, + event.workflow.id, + this.processWorkflowPayload(data, event.workflow.actionInputs) + ) + .pipe( + catchError((error) => { + return this.httpErrorManagerService.handle(error); + }), + take(1) + ) + .subscribe(() => { + this.displayNotification(event.workflow.name); + this.dotIframeService.run({ name: event.callback }); + }); + } + } + } + + private isBulkAction(event: DotCMSWorkflowActionEvent): boolean { + return !!(event.selectedInodes && event.selectedInodes.length); + } + + private displayNotification(name: string): void { + this.dotGlobalMessageService.display( + this.dotMessageService.get('editpage.actions.fire.confirmation', name) + ); + } + + private getAssignableData(workflow: DotCMSWorkflowAction): DotAssignableData { + return { roleId: workflow.nextAssign, roleHierarchy: workflow.roleHierarchyForAssign }; + } + + private isValidActionInput(id: string): boolean { + return ( + id === DotActionInputs.ASSIGNABLE || + id === DotActionInputs.COMMENTABLE || + id === DotActionInputs.MOVEABLE + ); + } + + private processBulkData( + event: DotCMSWorkflowActionEvent, + data?: DotWorkflowPayload + ): DotActionBulkRequestOptions { + const processedData = this.processWorkflowPayload(data, event.workflow.actionInputs); + const requestOptions: DotActionBulkRequestOptions = { + workflowActionId: event.workflow.id, + additionalParams: { + assignComment: { + comment: processedData.comments, + assign: processedData.assign + }, + pushPublish: { + whereToSend: processedData.whereToSend, + iWantTo: processedData.iWantTo, + expireDate: processedData.expireDate, + expireTime: processedData.expireTime, + publishDate: processedData.publishDate, + publishTime: processedData.publishTime, + filterKey: processedData.filterKey, + timezoneId: processedData.timezoneId + }, + additionalParamsMap: { _path_to_move: processedData.pathToMove } + } + }; + if (Array.isArray(event.selectedInodes)) { + requestOptions['contentletIds'] = event.selectedInodes; + } else { + requestOptions['query'] = event.selectedInodes; + } + return requestOptions; + } +} diff --git a/ui/apps/dotcms-ui/src/app/api/services/dot-workflow/dot-workflow.service.spec.ts b/ui/apps/dotcms-ui/src/app/api/services/dot-workflow/dot-workflow.service.spec.ts new file mode 100644 index 000000000000..132a1d3388e8 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/dot-workflow/dot-workflow.service.spec.ts @@ -0,0 +1,65 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ + +/* eslint-disable @typescript-eslint/no-explicit-any */ + +import { DotWorkflowService } from './dot-workflow.service'; +import { mockWorkflows } from '../../../test/dot-workflow-service.mock'; +import { TestBed, getTestBed } from '@angular/core/testing'; +import { HttpTestingController, HttpClientTestingModule } from '@angular/common/http/testing'; +import { CoreWebService } from '@dotcms/dotcms-js'; +import { CoreWebServiceMock } from '@tests/core-web.service.mock'; + +describe('DotWorkflowService', () => { + let injector: TestBed; + let dotWorkflowService: DotWorkflowService; + let httpMock: HttpTestingController; + + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [HttpClientTestingModule], + providers: [ + { provide: CoreWebService, useClass: CoreWebServiceMock }, + DotWorkflowService + ] + }); + injector = getTestBed(); + dotWorkflowService = injector.get(DotWorkflowService); + httpMock = injector.get(HttpTestingController); + }); + + it('should get workflows', () => { + dotWorkflowService.get().subscribe((res: any) => { + expect(res).toEqual([ + { + hello: 'world', + hola: 'mundo' + } + ]); + }); + + const req = httpMock.expectOne('v1/workflow/schemes'); + expect(req.request.method).toBe('GET'); + req.flush({ + entity: [ + { + hello: 'world', + hola: 'mundo' + } + ] + }); + }); + + it('should get default workflow', () => { + const defaultSystemWorkflow = mockWorkflows.filter((workflow) => workflow.system); + + dotWorkflowService.getSystem().subscribe((res: any) => { + expect(res).toEqual(defaultSystemWorkflow[0]); + }); + + httpMock.expectOne('v1/workflow/schemes'); + }); + + afterEach(() => { + httpMock.verify(); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/api/services/dot-workflow/dot-workflow.service.ts b/ui/apps/dotcms-ui/src/app/api/services/dot-workflow/dot-workflow.service.ts new file mode 100644 index 000000000000..1a72cce87433 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/dot-workflow/dot-workflow.service.ts @@ -0,0 +1,44 @@ +import { pluck, switchMap, take } from 'rxjs/operators'; +import { Injectable } from '@angular/core'; +import { CoreWebService } from '@dotcms/dotcms-js'; +import { Observable } from 'rxjs'; +import { DotCMSWorkflow } from '@dotcms/dotcms-models'; + +/** + * Provide util methods to get Workflows. + * @export + * @class DotWorkflowService + */ +@Injectable() +export class DotWorkflowService { + constructor(private coreWebService: CoreWebService) {} + + /** + * Method to get Workflows + * @param string id + * @returns Observable + * @memberof DotWorkflowService + */ + get(): Observable { + return this.coreWebService + .requestView({ + url: 'v1/workflow/schemes' + }) + .pipe(pluck('entity')); + } + + /** + * Get the System default workflow + * + * @returns Observable + * @memberof DotWorkflowService + */ + getSystem(): Observable { + return this.get().pipe( + switchMap((workflows: DotCMSWorkflow[]) => + workflows.filter((workflow: DotCMSWorkflow) => workflow.system) + ), + take(1) + ); + } +} diff --git a/ui/apps/dotcms-ui/src/app/api/services/dot-workflows-actions/dot-workflows-actions.service.spec.ts b/ui/apps/dotcms-ui/src/app/api/services/dot-workflows-actions/dot-workflows-actions.service.spec.ts new file mode 100644 index 000000000000..65a26fd3285a --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/dot-workflows-actions/dot-workflows-actions.service.spec.ts @@ -0,0 +1,95 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ + +import { DotWorkflowsActionsService } from './dot-workflows-actions.service'; +import { TestBed, getTestBed } from '@angular/core/testing'; +import { CoreWebService } from '@dotcms/dotcms-js'; +import { CoreWebServiceMock } from '@tests/core-web.service.mock'; +import { HttpTestingController, HttpClientTestingModule } from '@angular/common/http/testing'; +import { mockWorkflows } from '@tests/dot-workflow-service.mock'; +import { mockWorkflowsActions } from '@tests/dot-workflows-actions.mock'; +import { DotCMSWorkflowAction } from '@dotcms/dotcms-models'; + +describe('DotWorkflowsActionsService', () => { + let injector: TestBed; + let dotWorkflowsActionsService: DotWorkflowsActionsService; + let httpMock: HttpTestingController; + + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [HttpClientTestingModule], + providers: [ + { provide: CoreWebService, useClass: CoreWebServiceMock }, + DotWorkflowsActionsService + ] + }); + injector = getTestBed(); + dotWorkflowsActionsService = injector.get(DotWorkflowsActionsService); + httpMock = injector.get(HttpTestingController); + }); + + it('should get actions by workflows', () => { + dotWorkflowsActionsService + .getByWorkflows(mockWorkflows) + .subscribe((actions: DotCMSWorkflowAction[]) => { + expect(actions).toEqual([...mockWorkflowsActions]); + }); + + const req = httpMock.expectOne('/api/v1/workflow/schemes/actions/NEW'); + expect(req.request.method).toBe('POST'); + expect(req.request.body).toEqual({ + schemes: [ + '85c1515c-c4f3-463c-bac2-860b8fcacc34', + '77a9bf3f-a402-4c56-9b1f-1050b9d345dc', + 'd61a59e1-a49c-46f2-a929-db2b4bfa88b2' + ] + }); + req.flush({ entity: [...mockWorkflowsActions] }); + }); + + it('should get workflows by inode', () => { + const inode = 'cc2cdf9c-a20d-4862-9454-2a76c1132123'; + dotWorkflowsActionsService.getByInode(inode).subscribe((res: any) => { + expect(res).toEqual([ + { + assignable: true, + commentable: true, + condition: '', + icon: 'workflowIcon', + id: '44d4d4cd-c812-49db-adb1-1030be73e69a', + name: 'Assign Workflow', + nextAssign: 'db0d2bca-5da5-4c18-b5d7-87f02ba58eb6', + nextStep: '43e16aac-5799-46d0-945c-83753af39426', + nextStepCurrentStep: false, + order: 0, + owner: null, + roleHierarchyForAssign: true, + schemeId: '85c1515c-c4f3-463c-bac2-860b8fcacc34', + showOn: ['UNLOCKED', 'LOCKED'] + } + ]); + }); + + const req = httpMock.expectOne(`v1/workflow/contentlet/${inode}/actions`); + expect(req.request.method).toBe('GET'); + req.flush({ + entity: [ + { + assignable: true, + commentable: true, + condition: '', + icon: 'workflowIcon', + id: '44d4d4cd-c812-49db-adb1-1030be73e69a', + name: 'Assign Workflow', + nextAssign: 'db0d2bca-5da5-4c18-b5d7-87f02ba58eb6', + nextStep: '43e16aac-5799-46d0-945c-83753af39426', + nextStepCurrentStep: false, + order: 0, + owner: null, + roleHierarchyForAssign: true, + schemeId: '85c1515c-c4f3-463c-bac2-860b8fcacc34', + showOn: ['UNLOCKED', 'LOCKED'] + } + ] + }); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/api/services/dot-workflows-actions/dot-workflows-actions.service.ts b/ui/apps/dotcms-ui/src/app/api/services/dot-workflows-actions/dot-workflows-actions.service.ts new file mode 100644 index 000000000000..c222f255ffd3 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/dot-workflows-actions/dot-workflows-actions.service.ts @@ -0,0 +1,48 @@ +import { Injectable } from '@angular/core'; +import { CoreWebService } from '@dotcms/dotcms-js'; +import { pluck } from 'rxjs/operators'; +import { Observable } from 'rxjs'; +import { DotCMSWorkflowAction, DotCMSWorkflow } from '@dotcms/dotcms-models'; + +@Injectable() +export class DotWorkflowsActionsService { + constructor(private coreWebService: CoreWebService) {} + + /** + * Return a list of actions based on the workflows received + * + * @param {DotCMSWorkflow[]} [workflows=[]] + * @returns {Observable} + * @memberof DotWorkflowsActionsService + */ + getByWorkflows(workflows: DotCMSWorkflow[] = []): Observable { + return this.coreWebService + .requestView({ + method: 'POST', + url: '/api/v1/workflow/schemes/actions/NEW', + body: { + schemes: workflows.map(this.getWorkFlowId) + } + }) + .pipe(pluck('entity')); + } + + /** + * Returns the workflow actions of the passed inode + * + * @param {string} inode + * @returns {Observable} + * @memberof DotWorkflowsActionsService + */ + getByInode(inode: string): Observable { + return this.coreWebService + .requestView({ + url: `v1/workflow/contentlet/${inode}/actions` + }) + .pipe(pluck('entity')); + } + + private getWorkFlowId(workflow: DotCMSWorkflow): string { + return workflow && workflow.id; + } +} diff --git a/ui/apps/dotcms-ui/src/app/api/services/guards/auth-guard.service.spec.ts b/ui/apps/dotcms-ui/src/app/api/services/guards/auth-guard.service.spec.ts new file mode 100644 index 000000000000..f4ad587b9a2e --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/guards/auth-guard.service.spec.ts @@ -0,0 +1,60 @@ +import { DotRouterService } from '@services/dot-router/dot-router.service'; +import { of as observableOf, Observable } from 'rxjs'; +import { TestBed } from '@angular/core/testing'; +import { Injectable } from '@angular/core'; +import { AuthGuardService } from './auth-guard.service'; +import { LoginService } from '@dotcms/dotcms-js'; +import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router'; +import { DOTTestBed } from '@tests/dot-test-bed'; + +@Injectable() +class MockLoginService { + private _isLogin$: Observable; + get isLogin$() { + return this._isLogin$; + } +} + +describe('ValidAuthGuardService', () => { + let authGuardService: AuthGuardService; + let dotRouterService: DotRouterService; + let loginService: LoginService; + let mockRouterStateSnapshot: RouterStateSnapshot; + let mockActivatedRouteSnapshot: ActivatedRouteSnapshot; + + beforeEach(() => { + DOTTestBed.configureTestingModule({ + providers: [AuthGuardService, { provide: LoginService, useClass: MockLoginService }] + }); + + authGuardService = TestBed.get(AuthGuardService); + dotRouterService = TestBed.get(DotRouterService); + loginService = TestBed.get(LoginService); + mockRouterStateSnapshot = jasmine.createSpyObj('RouterStateSnapshot', [ + 'toString' + ]); + mockActivatedRouteSnapshot = jasmine.createSpyObj( + 'ActivatedRouteSnapshot', + ['toString'] + ); + }); + + it('should allow access to the requested route, User is logged in', () => { + let result: boolean; + spyOnProperty(loginService, 'isLogin$', 'get').and.returnValue(observableOf(true)); + authGuardService + .canActivate(mockActivatedRouteSnapshot, mockRouterStateSnapshot) + .subscribe((res) => (result = res)); + expect(result).toBe(true); + }); + + it('should denied access to the requested route, User is NOT logged in', () => { + let result: boolean; + spyOnProperty(loginService, 'isLogin$', 'get').and.returnValue(observableOf(false)); + authGuardService + .canActivate(mockActivatedRouteSnapshot, mockRouterStateSnapshot) + .subscribe((res) => (result = res)); + expect(dotRouterService.goToLogin).toHaveBeenCalled(); + expect(result).toBe(false); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/api/services/guards/auth-guard.service.ts b/ui/apps/dotcms-ui/src/app/api/services/guards/auth-guard.service.ts new file mode 100644 index 000000000000..024eff1dee76 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/guards/auth-guard.service.ts @@ -0,0 +1,26 @@ +import { map } from 'rxjs/operators'; +import { Injectable } from '@angular/core'; +import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router'; +import { Observable } from 'rxjs'; +import { LoginService } from '@dotcms/dotcms-js'; +import { DotRouterService } from '../dot-router/dot-router.service'; + +/** + * Route Guard that checks if a User is logged in. + */ +@Injectable() +export class AuthGuardService implements CanActivate { + constructor(private dotRouterService: DotRouterService, private loginService: LoginService) {} + + canActivate(_route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable { + return this.loginService.isLogin$.pipe( + map((isLogin) => { + if (!isLogin) { + this.dotRouterService.goToLogin(); + this.dotRouterService.storedRedirectUrl = state.url; + } + return isLogin; + }) + ); + } +} diff --git a/ui/apps/dotcms-ui/src/app/api/services/guards/contentlet-guard.service.spec.ts b/ui/apps/dotcms-ui/src/app/api/services/guards/contentlet-guard.service.spec.ts new file mode 100644 index 000000000000..ff17e2ec75a2 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/guards/contentlet-guard.service.spec.ts @@ -0,0 +1,77 @@ +import { of } from 'rxjs'; +import { TestBed } from '@angular/core/testing'; +import { Injectable } from '@angular/core'; +import { DotNavigationService } from '@components/dot-navigation/services/dot-navigation.service'; +import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router'; +import { ContentletGuardService } from './contentlet-guard.service'; +import { DotContentTypeService } from '@services/dot-content-type/dot-content-type.service'; + +@Injectable() +class MockDotContentTypeService { + isContentTypeInMenu() { + of(true); + } +} + +@Injectable() +class MockDotNavigationService { + goToFirstPortlet = jasmine.createSpy('goToFirstPortlet'); +} + +describe('ValidContentletGuardService', () => { + let contentletGuardService: ContentletGuardService; + let dotNavigationService: DotNavigationService; + let dotContentletService: DotContentTypeService; + let mockRouterStateSnapshot: RouterStateSnapshot; + let mockActivatedRouteSnapshot: ActivatedRouteSnapshot; + + beforeEach(() => { + TestBed.configureTestingModule({ + providers: [ + ContentletGuardService, + { + provide: DotContentTypeService, + useClass: MockDotContentTypeService + }, + { + provide: DotNavigationService, + useClass: MockDotNavigationService + } + ] + }); + + contentletGuardService = TestBed.inject(ContentletGuardService); + dotContentletService = TestBed.inject(DotContentTypeService); + dotNavigationService = TestBed.inject(DotNavigationService); + mockRouterStateSnapshot = jasmine.createSpyObj('RouterStateSnapshot', [ + 'toString' + ]); + mockActivatedRouteSnapshot = jasmine.createSpyObj( + 'ActivatedRouteSnapshot', + ['toString'] + ); + }); + + it('should allow children access to Content Types Portlets', () => { + let result: boolean; + mockActivatedRouteSnapshot.params = { id: 'banner' }; + spyOn(dotContentletService, 'isContentTypeInMenu').and.returnValue(of(true)); + contentletGuardService + .canActivateChild(mockActivatedRouteSnapshot, mockRouterStateSnapshot) + .subscribe((res) => (result = res)); + expect(dotContentletService.isContentTypeInMenu).toHaveBeenCalledWith('banner'); + expect(result).toBe(true); + }); + + it('should prevent children access to Content Types Portlets', () => { + let result: boolean; + mockActivatedRouteSnapshot.params = { id: 'banner' }; + spyOn(dotContentletService, 'isContentTypeInMenu').and.returnValue(of(false)); + contentletGuardService + .canActivateChild(mockActivatedRouteSnapshot, mockRouterStateSnapshot) + .subscribe((res) => (result = res)); + expect(dotContentletService.isContentTypeInMenu).toHaveBeenCalledWith('banner'); + expect(dotNavigationService.goToFirstPortlet).toHaveBeenCalled(); + expect(result).toBe(false); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/api/services/guards/contentlet-guard.service.ts b/ui/apps/dotcms-ui/src/app/api/services/guards/contentlet-guard.service.ts new file mode 100644 index 000000000000..c1d870d12346 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/guards/contentlet-guard.service.ts @@ -0,0 +1,41 @@ +import { map } from 'rxjs/operators'; +import { Injectable } from '@angular/core'; +import { CanActivateChild, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router'; +import { Observable } from 'rxjs'; +import { DotNavigationService } from '@components/dot-navigation/services/dot-navigation.service'; +import { DotContentTypeService } from '@services/dot-content-type/dot-content-type.service'; + +/** + * Route Guard that checks if a User have access to the specified Content Type. + */ +@Injectable() +export class ContentletGuardService implements CanActivateChild { + constructor( + private dotContentTypeService: DotContentTypeService, + private dotNavigationService: DotNavigationService + ) {} + + canActivateChild( + route: ActivatedRouteSnapshot, + _state: RouterStateSnapshot + ): Observable { + return this.canAccessContentType(route.params.id); + } + + /** + * Check if User has access to the requested route (url) based on the Content Type, otherwise return to the 'First Portlet'. + * + * @param string url + * @returns boolean + */ + canAccessContentType(url: string): Observable { + return this.dotContentTypeService.isContentTypeInMenu(url).pipe( + map((res) => { + if (!res) { + this.dotNavigationService.goToFirstPortlet(); + } + return res; + }) + ); + } +} diff --git a/ui/apps/dotcms-ui/src/app/api/services/guards/default-guard.service.spec.ts b/ui/apps/dotcms-ui/src/app/api/services/guards/default-guard.service.spec.ts new file mode 100644 index 000000000000..692a0c7b417f --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/guards/default-guard.service.spec.ts @@ -0,0 +1,24 @@ +import { DOTTestBed } from '@tests/dot-test-bed'; +import { DotRouterService } from '@services/dot-router/dot-router.service'; +import { TestBed } from '@angular/core/testing'; +import { DefaultGuardService } from './default-guard.service'; + +describe('ValidDefaultGuardService', () => { + let defaultGuardService: DefaultGuardService; + let dotRouterService: DotRouterService; + + beforeEach(() => { + DOTTestBed.configureTestingModule({ + providers: [DefaultGuardService] + }); + + defaultGuardService = TestBed.get(DefaultGuardService); + dotRouterService = TestBed.get(DotRouterService); + }); + + it('should redirect to to Main Portlet always', () => { + const result = defaultGuardService.canActivate(); + expect(dotRouterService.goToMain).toHaveBeenCalled(); + expect(result).toBe(true); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/api/services/guards/default-guard.service.ts b/ui/apps/dotcms-ui/src/app/api/services/guards/default-guard.service.ts new file mode 100644 index 000000000000..6d2fee2a2567 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/guards/default-guard.service.ts @@ -0,0 +1,16 @@ +import { Injectable } from '@angular/core'; +import { CanActivate } from '@angular/router'; +import { DotRouterService } from '../dot-router/dot-router.service'; + +/** + * Route Guard the only function is to redirect to the Main Portlet. + */ +@Injectable() +export class DefaultGuardService implements CanActivate { + constructor(private router: DotRouterService) {} + + canActivate(): boolean { + this.router.goToMain(); + return true; + } +} diff --git a/ui/apps/dotcms-ui/src/app/api/services/guards/layout-editor-can-deactivate-guard.service.spec.ts b/ui/apps/dotcms-ui/src/app/api/services/guards/layout-editor-can-deactivate-guard.service.spec.ts new file mode 100644 index 000000000000..c358dcb14773 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/guards/layout-editor-can-deactivate-guard.service.spec.ts @@ -0,0 +1,47 @@ +import { TestBed } from '@angular/core/testing'; + +import { LayoutEditorCanDeactivateGuardService } from './layout-editor-can-deactivate-guard.service'; +import { DotEditLayoutService } from '../dot-edit-layout/dot-edit-layout.service'; + +describe('LayoutEditorCanDeactivateGuardService', () => { + let service: LayoutEditorCanDeactivateGuardService; + let dotEditLayoutService: DotEditLayoutService; + + beforeEach(() => { + TestBed.configureTestingModule({ + providers: [LayoutEditorCanDeactivateGuardService, DotEditLayoutService], + }); + service = TestBed.inject(LayoutEditorCanDeactivateGuardService); + dotEditLayoutService = TestBed.inject(DotEditLayoutService); + }); + + it('should be created', () => { + expect(service).toBeTruthy(); + }); + + it('should le the user left the route when _canBeDesactivated is true', (done) => { + dotEditLayoutService.changeDesactivateState(true); + service.canDeactivate().subscribe((deactivate) => { + expect(deactivate).toBeTruthy(); + done(); + }); + }); + + it('canBeDesactivated should be false', () => { + dotEditLayoutService.changeDesactivateState(false); + service.canDeactivate().subscribe(() => { + fail('Should not be called if canBeDesactivated is false'); + }); + }); + + it('should set _closeEditLayout when canBeDesactivated is false', (done) => { + dotEditLayoutService.closeEditLayout$.subscribe((resp) => { + expect(resp).toBeTruthy(); + done(); + }); + dotEditLayoutService.changeDesactivateState(false); + service.canDeactivate().subscribe(() => { + fail('Should not be called if canBeDesactivated is false'); + }); + }); +}); \ No newline at end of file diff --git a/ui/apps/dotcms-ui/src/app/api/services/guards/layout-editor-can-deactivate-guard.service.ts b/ui/apps/dotcms-ui/src/app/api/services/guards/layout-editor-can-deactivate-guard.service.ts new file mode 100644 index 000000000000..fe6fe1bd45c7 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/guards/layout-editor-can-deactivate-guard.service.ts @@ -0,0 +1,44 @@ +import { Injectable } from '@angular/core'; +import { CanDeactivate } from '@angular/router'; +import { DotEditLayoutService } from '../dot-edit-layout/dot-edit-layout.service'; +import { filter } from 'rxjs/operators'; +import { Observable } from 'rxjs'; + +/** + * + * @export + * @interface CanDeactivateGuarded + */ +export interface CanDeactivateGuarded { + canDeactivate: () => Observable; +} + +/** + * + * Allows to set whether a route can be deactivated. + * @export + * @class LayoutEditorCanDeactivateGuardService + * @implements {CanDeactivate} + */ +@Injectable() +export class LayoutEditorCanDeactivateGuardService implements CanDeactivate { + + constructor(private dotEditLayoutService: DotEditLayoutService) {} + + /** + * + * Make sure the changes have been saved before leaving the route. + * @return {*} {Observable} + * @memberof LayoutEditorCanDeactivateGuardService + */ + canDeactivate(): Observable { + return this.dotEditLayoutService.canBeDesactivated$.pipe( + filter((res) => { + if(!res) { + this.dotEditLayoutService.changeCloseEditLayoutState(!res); + } + return res; + }) + ); + } +} diff --git a/ui/apps/dotcms-ui/src/app/api/services/guards/menu-guard.service.spec.ts b/ui/apps/dotcms-ui/src/app/api/services/guards/menu-guard.service.spec.ts new file mode 100644 index 000000000000..c12c6faaf241 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/guards/menu-guard.service.spec.ts @@ -0,0 +1,99 @@ +import { DOTTestBed } from './../../../test/dot-test-bed'; +import { of as observableOf } from 'rxjs'; +import { TestBed } from '@angular/core/testing'; +import { Injectable } from '@angular/core'; +import { DotMenuService } from '../dot-menu.service'; +import { DotNavigationService } from '@components/dot-navigation/services/dot-navigation.service'; +import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router'; + +import { MenuGuardService } from './menu-guard.service'; + +@Injectable() +class MockDotMenuService { + isPortletInMenu() { + // + } +} + +@Injectable() +class MockDotNavigationService { + goToFirstPortlet = jasmine.createSpy('goToFirstPortlet'); +} + +describe('ValidMenuGuardService', () => { + let menuGuardService: MenuGuardService; + let dotMenuService: DotMenuService; + let dotNavigationService: DotNavigationService; + let mockRouterStateSnapshot: RouterStateSnapshot; + let mockActivatedRouteSnapshot: ActivatedRouteSnapshot; + + beforeEach(() => { + DOTTestBed.configureTestingModule({ + providers: [ + MenuGuardService, + { provide: DotMenuService, useClass: MockDotMenuService }, + { + provide: DotNavigationService, + useClass: MockDotNavigationService + } + ] + }); + + menuGuardService = TestBed.get(MenuGuardService); + dotMenuService = TestBed.get(DotMenuService); + dotNavigationService = TestBed.get(DotNavigationService); + mockRouterStateSnapshot = jasmine.createSpyObj('RouterStateSnapshot', [ + 'toString' + ]); + mockActivatedRouteSnapshot = jasmine.createSpyObj( + 'ActivatedRouteSnapshot', + ['toString'] + ); + }); + + it('should allow access to Menu Portlets', () => { + let result: boolean; + mockRouterStateSnapshot.url = '/test'; + spyOn(dotMenuService, 'isPortletInMenu').and.returnValue(observableOf(true)); + menuGuardService + .canActivate(mockActivatedRouteSnapshot, mockRouterStateSnapshot) + .subscribe((res) => (result = res)); + expect(dotMenuService.isPortletInMenu).toHaveBeenCalledWith('test'); + expect(result).toBe(true); + }); + + it('should prevent access to Menu Portlets', () => { + let result: boolean; + mockRouterStateSnapshot.url = '/test'; + spyOn(dotMenuService, 'isPortletInMenu').and.returnValue(observableOf(false)); + menuGuardService + .canActivate(mockActivatedRouteSnapshot, mockRouterStateSnapshot) + .subscribe((res) => (result = res)); + expect(dotMenuService.isPortletInMenu).toHaveBeenCalledWith('test'); + expect(dotNavigationService.goToFirstPortlet).toHaveBeenCalled(); + expect(result).toBe(false); + }); + + it('should allow children access to Menu Portlets', () => { + let result: boolean; + mockRouterStateSnapshot.url = '/test'; + spyOn(dotMenuService, 'isPortletInMenu').and.returnValue(observableOf(true)); + menuGuardService + .canActivateChild(mockActivatedRouteSnapshot, mockRouterStateSnapshot) + .subscribe((res) => (result = res)); + expect(dotMenuService.isPortletInMenu).toHaveBeenCalledWith('test'); + expect(result).toBe(true); + }); + + it('should prevent children access to Menu Portlets', () => { + let result: boolean; + mockRouterStateSnapshot.url = '/test'; + spyOn(dotMenuService, 'isPortletInMenu').and.returnValue(observableOf(false)); + menuGuardService + .canActivateChild(mockActivatedRouteSnapshot, mockRouterStateSnapshot) + .subscribe((res) => (result = res)); + expect(dotMenuService.isPortletInMenu).toHaveBeenCalledWith('test'); + expect(dotNavigationService.goToFirstPortlet).toHaveBeenCalled(); + expect(result).toBe(false); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/api/services/guards/menu-guard.service.ts b/ui/apps/dotcms-ui/src/app/api/services/guards/menu-guard.service.ts new file mode 100644 index 000000000000..03f2fd28d93f --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/guards/menu-guard.service.ts @@ -0,0 +1,48 @@ +import { Observable } from 'rxjs'; + +import { map } from 'rxjs/operators'; +import { Injectable } from '@angular/core'; +import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router'; +import { DotMenuService } from '../dot-menu.service'; +import { DotRouterService } from '../dot-router/dot-router.service'; +import { DotNavigationService } from '@components/dot-navigation/services/dot-navigation.service'; + +/** + * Route Guard that checks if a User have access to the specified Menu portlet. + */ +@Injectable() +export class MenuGuardService implements CanActivate { + constructor( + private dotMenuService: DotMenuService, + private dotRouterService: DotRouterService, + private dotNavigationService: DotNavigationService + ) {} + + canActivate(_route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable { + return this.canAccessPortlet(this.dotRouterService.getPortletId(state.url)); + } + + canActivateChild( + _route: ActivatedRouteSnapshot, + state: RouterStateSnapshot + ): Observable { + return this.canAccessPortlet(this.dotRouterService.getPortletId(state.url)); + } + + /** + * Check if User has access to the requested route (url) based on the Menu, otherwise go to the 'First Portlet' and return false. + * + * @param string url + * @returns boolean + */ + private canAccessPortlet(url: string): Observable { + return this.dotMenuService.isPortletInMenu(url).pipe( + map((isValidPortlet) => { + if (!isValidPortlet) { + this.dotNavigationService.goToFirstPortlet(); + } + return isValidPortlet; + }) + ); + } +} diff --git a/ui/apps/dotcms-ui/src/app/api/services/guards/public-auth-guard.service.spec.ts b/ui/apps/dotcms-ui/src/app/api/services/guards/public-auth-guard.service.spec.ts new file mode 100644 index 000000000000..5a762e07898d --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/guards/public-auth-guard.service.spec.ts @@ -0,0 +1,63 @@ +import { DotRouterService } from '@services/dot-router/dot-router.service'; +import { DOTTestBed } from '@tests/dot-test-bed'; +import { of as observableOf, Observable } from 'rxjs'; +import { TestBed } from '@angular/core/testing'; +import { Injectable } from '@angular/core'; +import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router'; +import { PublicAuthGuardService } from './public-auth-guard.service'; +import { LoginService } from '@dotcms/dotcms-js'; + +@Injectable() +class MockLoginService { + private _isLogin$: Observable; + get isLogin$() { + return this._isLogin$; + } +} + +describe('ValidPublicAuthGuardService', () => { + let publicAuthGuardService: PublicAuthGuardService; + let dotRouterService: DotRouterService; + let loginService: LoginService; + let mockRouterStateSnapshot: RouterStateSnapshot; + let mockActivatedRouteSnapshot: ActivatedRouteSnapshot; + + beforeEach(() => { + DOTTestBed.configureTestingModule({ + providers: [ + PublicAuthGuardService, + { provide: LoginService, useClass: MockLoginService } + ] + }); + + publicAuthGuardService = TestBed.get(PublicAuthGuardService); + dotRouterService = TestBed.get(DotRouterService); + loginService = TestBed.get(LoginService); + mockRouterStateSnapshot = jasmine.createSpyObj('RouterStateSnapshot', [ + 'toString' + ]); + mockActivatedRouteSnapshot = jasmine.createSpyObj( + 'ActivatedRouteSnapshot', + ['toString'] + ); + }); + + it('should redirect to to Main Portlet if User is logged in', () => { + let result: boolean; + spyOnProperty(loginService, 'isLogin$', 'get').and.returnValue(observableOf(true)); + publicAuthGuardService + .canActivate(mockActivatedRouteSnapshot, mockRouterStateSnapshot) + .subscribe((res) => (result = res)); + expect(dotRouterService.goToMain).toHaveBeenCalled(); + expect(result).toBe(false); + }); + + it('should allow access to the requested route if User is NOT logged in', () => { + let result: boolean; + spyOnProperty(loginService, 'isLogin$', 'get').and.returnValue(observableOf(false)); + publicAuthGuardService + .canActivate(mockActivatedRouteSnapshot, mockRouterStateSnapshot) + .subscribe((res) => (result = res)); + expect(result).toBe(true); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/api/services/guards/public-auth-guard.service.ts b/ui/apps/dotcms-ui/src/app/api/services/guards/public-auth-guard.service.ts new file mode 100644 index 000000000000..3fcc739f87c9 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/guards/public-auth-guard.service.ts @@ -0,0 +1,31 @@ +import { map } from 'rxjs/operators'; +import { Injectable } from '@angular/core'; +import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router'; +import { Observable } from 'rxjs'; +import { LoginService } from '@dotcms/dotcms-js'; +import { DotRouterService } from '../dot-router/dot-router.service'; + +/** + * Route Guard that handle the public pages, where the User don't need to be logged in. + */ +@Injectable() +export class PublicAuthGuardService implements CanActivate { + constructor(private router: DotRouterService, private loginService: LoginService) {} + + /** + * Guard checks is the User is logged in to redirect to the First Portlet otherwise approve the route request. + * @param ActivatedRouteSnapshot route + * @param RouterStateSnapshot state + * @returns Observable + */ + canActivate(_route: ActivatedRouteSnapshot, _state: RouterStateSnapshot): Observable { + return this.loginService.isLogin$.pipe( + map((isLogin) => { + if (isLogin) { + this.router.goToMain(); + } + return !isLogin; + }) + ); + } +} diff --git a/ui/apps/dotcms-ui/src/app/api/services/notifications-service.ts b/ui/apps/dotcms-ui/src/app/api/services/notifications-service.ts new file mode 100644 index 000000000000..23e9ba3be301 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/notifications-service.ts @@ -0,0 +1,64 @@ +import { Injectable } from '@angular/core'; +import { CoreWebService } from '@dotcms/dotcms-js'; +import { Observable } from 'rxjs'; +import { pluck } from 'rxjs/operators'; +import { DotCMSResponse } from '@dotcms/dotcms-js'; +import { DotNotificationResponse } from '@models/notifications'; + +interface DotNotificationServiceUrls { + dismissNotificationsUrl: string; + getLastNotificationsUrl: string; + getNotificationsUrl: string; + markAsReadNotificationsUrl: string; +} + +@Injectable() +export class NotificationsService { + private urls: DotNotificationServiceUrls; + + constructor(private coreWebService: CoreWebService) { + this.urls = { + dismissNotificationsUrl: 'v1/notification/delete', + getLastNotificationsUrl: 'v1/notification/getNotifications/offset/0/limit/24', + getNotificationsUrl: 'v1/notification/getNotifications/', + markAsReadNotificationsUrl: 'v1/notification/markAsRead' + }; + } + + getLastNotifications(): Observable> { + return this.coreWebService + .requestView({ + url: this.urls.getLastNotificationsUrl + }) + .pipe(pluck('bodyJsonObject')); + } + + getAllNotifications(): Observable> { + return this.coreWebService + .requestView({ + url: this.urls.getNotificationsUrl + }) + .pipe(pluck('bodyJsonObject')); + } + + dismissNotifications( + items: Record + ): Observable> { + return this.coreWebService + .requestView({ + body: items, + method: 'PUT', + url: this.urls.dismissNotificationsUrl + }) + .pipe(pluck('bodyJsonObject')); + } + + markAllAsRead(): Observable> { + return this.coreWebService + .request({ + method: 'PUT', + url: this.urls.markAsReadNotificationsUrl + }) + .pipe(pluck('bodyJsonObject')); + } +} diff --git a/ui/apps/dotcms-ui/src/app/api/services/paginator/index.ts b/ui/apps/dotcms-ui/src/app/api/services/paginator/index.ts new file mode 100644 index 000000000000..054f9320709f --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/paginator/index.ts @@ -0,0 +1 @@ +export * from './paginator.service'; diff --git a/ui/apps/dotcms-ui/src/app/api/services/paginator/paginator.service.spec.ts b/ui/apps/dotcms-ui/src/app/api/services/paginator/paginator.service.spec.ts new file mode 100644 index 000000000000..f0f9486eb0fc --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/paginator/paginator.service.spec.ts @@ -0,0 +1,166 @@ +import { PaginatorService, OrderDirection } from './'; +import { TestBed, getTestBed } from '@angular/core/testing'; +import { HttpTestingController, HttpClientTestingModule } from '@angular/common/http/testing'; +import { CoreWebService } from '@dotcms/dotcms-js'; +import { CoreWebServiceMock } from '@tests/core-web.service.mock'; +import { HttpHeaders } from '@angular/common/http'; + +describe('PaginatorService', () => { + let injector: TestBed; + let paginatorService: PaginatorService; + let httpMock: HttpTestingController; + + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [HttpClientTestingModule], + providers: [{ provide: CoreWebService, useClass: CoreWebServiceMock }, PaginatorService] + }); + injector = getTestBed(); + paginatorService = injector.get(PaginatorService); + httpMock = injector.get(HttpTestingController); + paginatorService.url = 'v1/urldemo'; + }); + + it('should do a request with basic params', () => { + paginatorService.get().subscribe(); + const req = httpMock.expectOne(() => true); + expect(req.request.method).toBe('GET'); + expect(req.request.url).toBe('v1/urldemo'); + }); + + it('should do a request with basic pagination params', () => { + paginatorService.filter = 'test'; + paginatorService.sortField = 'name'; + paginatorService.sortOrder = OrderDirection.DESC; + paginatorService.get().subscribe(); + httpMock.expectOne('v1/urldemo?filter=test&orderby=name&direction=DESC&per_page=40'); + }); + + it('should do a request with extra params', () => { + paginatorService.setExtraParams('archive', 'false'); + paginatorService.setExtraParams('system', 'true'); + paginatorService.setExtraParams('live', null); + paginatorService.get().subscribe(); + httpMock.expectOne('v1/urldemo?per_page=40&archive=false&system=true'); + }); + + it('should remove extra parameters', () => { + paginatorService.setExtraParams('name', 'John'); + paginatorService.deleteExtraParams('name'); + + expect(paginatorService.extraParams.get('name')).toBeUndefined(); + }); + + afterEach(() => { + httpMock.verify(); + }); +}); + +describe('PaginatorService getting', () => { + let fakeEntity; + let headerLink; + let injector: TestBed; + let paginatorService: PaginatorService; + let httpMock: HttpTestingController; + let req; + let result; + + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [HttpClientTestingModule], + providers: [{ provide: CoreWebService, useClass: CoreWebServiceMock }, PaginatorService] + }); + injector = getTestBed(); + paginatorService = injector.get(PaginatorService); + httpMock = injector.get(HttpTestingController); + paginatorService.url = 'v1/urldemo'; + + headerLink = `/baseURL?filter=filter&page=1>;rel="first", + /baseURL?filter=filter&page=5>;rel="last", + /baseURL?filter=filter&page=pageValue>;rel="x-page", + /baseURL?filter=filter&page=4>;rel="next", + /baseURL?filter=filter&page=2>;rel="prev"`; + + fakeEntity = { + items: [ + { id: 0, name: 'Name 0' }, + { id: 1, name: 'Name 1' }, + { id: 2, name: 'Name 2' }, + { id: 3, name: 'Name 3' } + ], + totalRecords: 5 + }; + + let headers = new HttpHeaders(); + headers = headers.set('Link', headerLink); + headers = headers.set('X-Pagination-Current-Page', '3'); + headers = headers.set('X-Pagination-Link-Pages', '5'); + headers = headers.set('X-Pagination-Per-Page', '10'); + headers = headers.set('X-Pagination-Total-Entries', '38'); + + paginatorService.get().subscribe((items) => { + result = items; + }); + + req = httpMock.expectOne(() => true); + req.flush({ entity: fakeEntity }, { headers }); + }); + + it('should get entity results', () => { + expect(result).toEqual(fakeEntity); + }); + + it('links should has the right values', () => { + expect(paginatorService.links.first).toEqual('baseURL?filter=filter&page=1'); + expect(paginatorService.links.last).toEqual('/baseURL?filter=filter&page=5'); + expect(paginatorService.links.next).toEqual('/baseURL?filter=filter&page=4'); + expect(paginatorService.links.prev).toEqual('/baseURL?filter=filter&page=2'); + expect(paginatorService.links['x-page']).toEqual('/baseURL?filter=filter&page=pageValue'); + }); + + it('clean links after set any extra params', () => { + paginatorService.setExtraParams('any_param', 'any_value'); + expect({}).toEqual(paginatorService.links); + }); + + it('should set basic pagination information', () => { + expect(paginatorService.currentPage).toEqual(3); + expect(paginatorService.maxLinksPage).toEqual(5); + expect(paginatorService.totalRecords).toEqual(38); + expect(paginatorService.paginationPerPage).toEqual(10); + }); + + it('should get first page', () => { + paginatorService.getFirstPage().subscribe(); + req = httpMock.expectOne(() => true); + expect(req.request.url).toBe('baseURL?filter=filter&page=1'); + }); + + it('should get last page', () => { + paginatorService.getLastPage().subscribe(); + req = httpMock.expectOne(() => true); + expect(req.request.url).toBe('/baseURL?filter=filter&page=5'); + }); + + it('should get next page', () => { + paginatorService.getNextPage().subscribe(); + req = httpMock.expectOne(() => true); + expect(req.request.url).toBe('/baseURL?filter=filter&page=4'); + }); + + it('should get prev page', () => { + paginatorService.getPrevPage().subscribe(); + req = httpMock.expectOne(() => true); + expect(req.request.url).toBe('/baseURL?filter=filter&page=2'); + }); + + it('should get page 6', () => { + paginatorService.getPage(6).subscribe(); + req = httpMock.expectOne(() => true); + expect(req.request.url).toBe('/baseURL?filter=filter&page=6'); + }); + + afterEach(() => { + httpMock.verify(); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/api/services/paginator/paginator.service.ts b/ui/apps/dotcms-ui/src/app/api/services/paginator/paginator.service.ts new file mode 100644 index 000000000000..eb0b18ea0659 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/paginator/paginator.service.ts @@ -0,0 +1,304 @@ +import { take, map } from 'rxjs/operators'; +import { CoreWebService, ResponseView } from '@dotcms/dotcms-js'; +import { Injectable } from '@angular/core'; +import { Observable } from 'rxjs'; + +export enum OrderDirection { + ASC = 1, + DESC = -1 +} + +interface Links { + first?: string; + last?: string; + next?: string; + 'x-page'?: string; + prev?: string; +} + +interface PaginatiorServiceParams { + filter?: string; + searchParam?: string; + orderby?: string; + direction?: OrderDirection; + per_page?: string; +} + +/** + * Provides util listing methods + * @export + * @class PaginatorService + */ +@Injectable() +export class PaginatorService { + public static readonly LINK_HEADER_NAME = 'Link'; + public static readonly PAGINATION_PER_PAGE_HEADER_NAME = 'X-Pagination-Per-Page'; + public static readonly PAGINATION_CURRENT_PAGE_HEADER_NAME = 'X-Pagination-Current-Page'; + public static readonly PAGINATION_MAX_LINK_PAGES_HEADER_NAME = 'X-Pagination-Link-Pages'; + public static readonly PAGINATION_TOTAL_ENTRIES_HEADER_NAME = 'X-Pagination-Total-Entries'; + + public links: Links = {}; + + public paginationPerPage = 40; + public currentPage: number; + public maxLinksPage: number; + public totalRecords: number; + + private _url: string; + private _filter: string; + private _searchParam: string; + private _sortField: string; + private _sortOrder: OrderDirection; + private _extraParams: Map = new Map(); + + constructor(private coreWebService: CoreWebService) {} + + get url(): string { + return this._url; + } + + set url(url: string) { + if (this._url !== url) { + this.links = {}; + this._url = url; + } + } + + get filter(): string { + return this._filter; + } + + set filter(filter: string) { + if (this._filter !== filter) { + this.links = {}; + this._filter = filter; + } + } + + set searchParam(searchParam: string) { + if (this._searchParam !== searchParam) { + this.links = searchParam.length > 0 ? {} : this.links; + this._searchParam = searchParam; + } + } + + get searchParam(): string { + return this._searchParam; + } + + /** + * Set value of extra parameters of the eventual request. + * @param string name + * @param value + * + * @memberof DotThemeSelectorComponent + */ + setExtraParams>(name: string, value?: T): void { + if (value !== null && value !== undefined) { + this.extraParams.set(name, value.toString()); + this.links = {}; + } + } + + /** + * Delete extra parameters of the eventual request. + * @param string name + * + * @memberof DotThemeSelectorComponent + */ + deleteExtraParams(name: string): void { + this.extraParams.delete(name); + } + + get extraParams(): Map { + return this._extraParams; + } + + get sortField(): string { + return this._sortField; + } + + set sortField(sortField: string) { + if (this._sortField !== sortField) { + this.links = {}; + this._sortField = sortField; + } + } + + get sortOrder(): OrderDirection { + return this._sortOrder; + } + + set sortOrder(sortOrder: OrderDirection) { + if (this._sortOrder !== sortOrder) { + this.links = {}; + this._sortOrder = sortOrder; + } + } + + /** + * Send a pagination request with url as base URL, if url is null or undefined then + * it use the url property value instead. + * Also it use the values of sortField, sortOrder and filter properties like query parameters, + * so the finally url will be: + * /orderby=[sortField-value]&direction=[sortOrder-value]&filter=[filter-value] + * @param url base url + */ + // tslint:disable-next-line:cyclomatic-complexity + public get(url?: string): Observable { + const params = { + ...this.getParams(), + ...this.getObjectFromMap(this.extraParams) + }; + + return this.coreWebService + .requestView({ + params, + url: url || this.url + }) + .pipe( + map((response: ResponseView) => { + this.setLinks(response.header(PaginatorService.LINK_HEADER_NAME)); + this.paginationPerPage = parseInt( + response.header(PaginatorService.PAGINATION_PER_PAGE_HEADER_NAME), + 10 + ); + this.currentPage = parseInt( + response.header(PaginatorService.PAGINATION_CURRENT_PAGE_HEADER_NAME), + 10 + ); + this.maxLinksPage = parseInt( + response.header(PaginatorService.PAGINATION_MAX_LINK_PAGES_HEADER_NAME), + 10 + ); + this.totalRecords = parseInt( + response.header(PaginatorService.PAGINATION_TOTAL_ENTRIES_HEADER_NAME), + 10 + ); + return response.entity; + }), + take(1) + ); + } + + /** + * Request the last page + * @returns Observable + * @memberof PaginatorService + */ + public getLastPage(): Observable { + return this.get(this.links.last); + } + + /** + * Request the first page + * @returns Observable + * @memberof PaginatorService + */ + public getFirstPage(): Observable { + return this.get(this.links.first); + } + + /** + * request the pageParam page + * @param number [pageParam=1] Page to request + * @returns Observable + * @memberof PaginatorServic + */ + public getPage(pageParam = 1): Observable { + const urlPage = this.links['x-page'] + ? this.links['x-page'].replace('pageValue', String(pageParam)) + : undefined; + return this.get(urlPage); + } + + /** + * Request the current page + * @returns Observable + * @memberof PaginatorService + */ + public getCurrentPage(): Observable { + return this.getPage(this.currentPage); + } + + /** + * Request the next page + * @returns Observable + * @memberof PaginatorService + */ + public getNextPage(): Observable { + return this.get(this.links.next); + } + + /** + * Request the previous page + * @returns Observable + * @memberof PaginatorService + */ + public getPrevPage(): Observable { + return this.get(this.links.prev); + } + + /** + * Use the offset to request a page. + * @param number offset Offset to be request + * @returns Observable + * @memberof PaginatorService + */ + public getWithOffset(offset: number): Observable { + const page = this.getPageFromOffset(offset); + return this.getPage(page); + } + + private getPageFromOffset(offset: number): number { + return parseInt(String(offset / this.paginationPerPage), 10) + 1; + } + + private setLinks(linksString: string): void { + const linkSplit = linksString.split(','); + + linkSplit.forEach((linkRel) => { + const linkrealSplit = linkRel.split(';'); + const url = linkrealSplit[0].substring(1, linkrealSplit[0].length - 1); + const relSplit = linkrealSplit[1].split('='); + const rel = relSplit[1].substring(1, relSplit[1].length - 1); + this.links[rel] = url.trim(); + }); + } + + private getParams(): PaginatiorServiceParams { + const params = new Map(); + + if (this.filter) { + params.set('filter', this.filter); + } + + if (this.searchParam) { + params.set('searchParam', this.searchParam); + } + + if (this.sortField) { + params.set('orderby', this.sortField); + } + + if (this.sortOrder) { + params.set('direction', OrderDirection[this.sortOrder]); + } + + if (this.paginationPerPage) { + params.set('per_page', String(this.paginationPerPage)); + } + return this.getObjectFromMap(params); + } + + private getObjectFromMap }>( + map: Map + ): T { + const result = Array.from(map).reduce( + (obj, [key, value]) => Object.assign(obj, { [key]: value }), + {} + ); + + return result as T; + } +} diff --git a/ui/apps/dotcms-ui/src/app/api/services/push-publish/push-publish.service.spec.ts b/ui/apps/dotcms-ui/src/app/api/services/push-publish/push-publish.service.spec.ts new file mode 100644 index 000000000000..f26e08abcf31 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/push-publish/push-publish.service.spec.ts @@ -0,0 +1,168 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ + +import { of } from 'rxjs'; +import { PushPublishService } from './push-publish.service'; +import { TestBed } from '@angular/core/testing'; +import { DotCurrentUserService } from '../dot-current-user/dot-current-user.service'; +import { DotPushPublishData } from '@models/dot-push-publish-data/dot-push-publish-data'; +import { ApiRoot, CoreWebService, LoggerService, StringUtils, UserModel } from '@dotcms/dotcms-js'; +import { format } from 'date-fns'; +import { CoreWebServiceMock } from '@tests/core-web.service.mock'; +import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; +import { DotFormatDateService } from '@services/dot-format-date-service'; +import { DotFormatDateServiceMock } from '@dotcms/app/test/format-date-service.mock'; + +const mockResponse = { + errorMessages: [], + total: 1, + bundleId: '1234-id-7890-entifier', + errors: 0 +}; + +const mockFormValue: DotPushPublishData = { + pushActionSelected: 'publish', + publishDate: 'Wed Jul 08 2020 10:10:50', + expireDate: undefined, + environment: ['env1'], + filterKey: 'hol', + timezoneId: 'Costa Rica' +}; + +describe('PushPublishService', () => { + let dotCurrentUserService: DotCurrentUserService; + + let pushPublishService: PushPublishService; + let httpMock: HttpTestingController; + + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [HttpClientTestingModule], + providers: [ + { provide: CoreWebService, useClass: CoreWebServiceMock }, + PushPublishService, + DotCurrentUserService, + { provide: DotFormatDateService, useClass: DotFormatDateServiceMock }, + ApiRoot, + LoggerService, + UserModel, + StringUtils + ] + }); + pushPublishService = TestBed.inject(PushPublishService); + dotCurrentUserService = TestBed.inject(DotCurrentUserService); + httpMock = TestBed.inject(HttpTestingController); + }); + + it('should get push publish environments', () => { + spyOn(dotCurrentUserService, 'getCurrentUser').and.returnValue( + of({ + roleId: '1234' + }) + ); + + const response = [ + { + name: '', + id: '0' + }, + { + name: 'environment1', + id: '1sdf5-23fs-dsf2-sf3oj23p4p42d' + }, + { + name: 'environment2', + id: '1s24z-23fs-d232-sf334fdf4p42d' + } + ]; + + pushPublishService.getEnvironments().subscribe((items: any) => { + expect(items).toEqual(response.splice(1)); + }); + + const req = httpMock.expectOne('/api/environment/loadenvironments/roleId/1234/name=0'); + expect(req.request.method).toBe('GET'); + req.flush(response); + }); + + it('should do a post request and push publish an asset', () => { + const assetIdentifier = '1234567890 +0'; + const assetIdentifierEncoded = encodeURIComponent(assetIdentifier); + pushPublishService + .pushPublishContent(assetIdentifier, mockFormValue, false) + .subscribe((items: any) => { + expect(items).toEqual(mockResponse); + }); + + const req = httpMock.expectOne(() => true); + const currentDateStr = new Date().toISOString().split('T')[0]; + const currentTimeStr = format(new Date(), "HH-mm"); + + expect( + req.request.url.indexOf( + '/DotAjaxDirector/com.dotcms.publisher.ajax.RemotePublishAjaxAction/cmd/publish' + ) + ).toBeGreaterThan(-1); + expect(req.request.method).toBe('POST'); + expect(req.request.body).toBe( + `assetIdentifier=${assetIdentifierEncoded}&remotePublishDate=2020-07-08&remotePublishTime=10-10&remotePublishExpireDate=${currentDateStr}&remotePublishExpireTime=${currentTimeStr}&timezoneId=Costa Rica&iWantTo=publish&whoToSend=env1&bundleName=&bundleSelect=&filterKey=hol` + ); + req.flush(mockResponse); + }); + + it('should do a post request and push publish Remove an asset', () => { + const formValue: DotPushPublishData = { ...mockFormValue, publishDate: undefined }; + const currentDateStr = new Date().toISOString().split('T')[0]; + const currentTimeStr = format(new Date(), "HH-mm"); + + pushPublishService + .pushPublishContent('1234567890', formValue, false) + .subscribe((items: any) => { + expect(items).toEqual(mockResponse); + }); + + const req = httpMock.expectOne(() => true); + expect(req.request.body).toBe( + `assetIdentifier=1234567890&remotePublishDate=${currentDateStr}&remotePublishTime=${currentTimeStr}&remotePublishExpireDate=${currentDateStr}&remotePublishExpireTime=${currentTimeStr}&timezoneId=Costa Rica&iWantTo=publish&whoToSend=env1&bundleName=&bundleSelect=&filterKey=hol` + ); + req.flush(mockResponse); + }); + + it('should do a post request and push publish an asset with no filter', () => { + const formValue: DotPushPublishData = { ...mockFormValue, filterKey: null }; + const currentDateStr = new Date().toISOString().split('T')[0]; + const currentTimeStr = format(new Date(), "HH-mm"); + + pushPublishService + .pushPublishContent('1234567890', formValue, false) + .subscribe((items: any) => { + expect(items).toEqual(mockResponse); + }); + + const req = httpMock.expectOne(() => true); + expect(req.request.body).toBe( + `assetIdentifier=1234567890&remotePublishDate=2020-07-08&remotePublishTime=10-10&remotePublishExpireDate=${currentDateStr}&remotePublishExpireTime=${currentTimeStr}&timezoneId=Costa Rica&iWantTo=publish&whoToSend=env1&bundleName=&bundleSelect=` + ); + req.flush(mockResponse); + }); + + it('should do a post with the correct URL when is a bundle', () => { + const currentDateStr = new Date().toISOString().split('T')[0]; + const currentTimeStr = format(new Date(), "HH-mm"); + + pushPublishService + .pushPublishContent('1234567890', mockFormValue, true) + .subscribe((items: any) => { + expect(items).toEqual(mockResponse); + }); + + const req = httpMock.expectOne(() => true); + expect(req.request.body).toBe( + `assetIdentifier=1234567890&remotePublishDate=2020-07-08&remotePublishTime=10-10&remotePublishExpireDate=${currentDateStr}&remotePublishExpireTime=${currentTimeStr}&timezoneId=Costa Rica&iWantTo=publish&whoToSend=env1&bundleName=&bundleSelect=&filterKey=hol` + ); + req.flush(mockResponse); + }); + + afterEach(() => { + httpMock.verify(); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/api/services/push-publish/push-publish.service.ts b/ui/apps/dotcms-ui/src/app/api/services/push-publish/push-publish.service.ts new file mode 100644 index 000000000000..f1eb5f74f93e --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/services/push-publish/push-publish.service.ts @@ -0,0 +1,107 @@ +import { toArray, filter, pluck, mergeMap, map } from 'rxjs/operators'; +import { CoreWebService, ApiRoot } from '@dotcms/dotcms-js'; +import { Injectable } from '@angular/core'; +import { Observable } from 'rxjs'; +import { DotEnvironment } from '@models/dot-environment/dot-environment'; +import { DotAjaxActionResponseView } from '@models/ajax-action-response/dot-ajax-action-response'; +import { DotCurrentUserService } from '../dot-current-user/dot-current-user.service'; +import { DotCurrentUser } from '@models/dot-current-user/dot-current-user'; +import { DotPushPublishData } from '@models/dot-push-publish-data/dot-push-publish-data'; +import { DotFormatDateService } from '@services/dot-format-date-service'; + +/** + * Provide method to push publish to content types + * @export + * @class PushPublishService + */ +@Injectable() +export class PushPublishService { + private pushEnvironementsUrl = '/api/environment/loadenvironments/roleId'; + private _lastEnvironmentPushed: string[]; + /* + TODO: I had to do this because this line concat'api/' into the URL + https://github.com/dotCMS/dotcms-js/blob/master/src/core/core-web.service.ts#L169 + */ + private publishUrl = `/DotAjaxDirector/com.dotcms.publisher.ajax.RemotePublishAjaxAction/cmd/publish`; + private publishBundleURL = `/DotAjaxDirector/com.dotcms.publisher.ajax.RemotePublishAjaxAction/cmd/pushBundle`; + + constructor( + public _apiRoot: ApiRoot, + private coreWebService: CoreWebService, + private currentUser: DotCurrentUserService, + private dotFormatDateService: DotFormatDateService, + ) {} + + /** + * Get push publish environments. + * @returns Observable + * @memberof PushPublishService + */ + getEnvironments(): Observable { + return this.currentUser.getCurrentUser().pipe( + mergeMap((user: DotCurrentUser) => { + return this.coreWebService.requestView({ + url: `${this.pushEnvironementsUrl}/${user.roleId}/name=0` + }); + }), + pluck('bodyJsonObject'), + mergeMap((environments: DotEnvironment[]) => environments), + filter((environment: DotEnvironment) => environment.name !== ''), + toArray() + ); + } + + /** + * Push publish asset to specified environment. + * @param string contentTypeId + * @param * formValue + * @returns Observable + * @memberof PushPublishService + */ + pushPublishContent( + assetIdentifier: string, + pushPublishData: DotPushPublishData, + isBundle: boolean + ): Observable { + this._lastEnvironmentPushed = pushPublishData.environment; + + return this.coreWebService + .request({ + body: this.getPublishEnvironmentData(assetIdentifier, pushPublishData), + headers: { + 'Content-Type': 'application/x-www-form-urlencoded' + }, + method: 'POST', + url: isBundle ? this.publishBundleURL : this.publishUrl + }) + .pipe(map((res: DotAjaxActionResponseView) => res)); + } + + private getPublishEnvironmentData( + assetIdentifier: string, + { publishDate, expireDate, pushActionSelected, environment, filterKey, timezoneId }: DotPushPublishData + ): string { + + let result = ''; + result += `assetIdentifier=${encodeURIComponent(assetIdentifier)}`; + result += `&remotePublishDate=${this.dotFormatDateService.format(publishDate ? new Date(publishDate) : new Date(), 'yyyy-MM-dd')}`; + result += `&remotePublishTime=${this.dotFormatDateService.format(publishDate ? new Date(publishDate) : new Date(), 'HH-mm')}`; + result += `&remotePublishExpireDate=${this.dotFormatDateService.format(expireDate ? new Date(expireDate) : new Date(), 'yyyy-MM-dd')}`; + result += `&remotePublishExpireTime=${this.dotFormatDateService.format(expireDate ? new Date(expireDate) : new Date(), 'HH-mm')}`; + result += `&timezoneId=${timezoneId}`; + result += `&iWantTo=${pushActionSelected}`; + result += `&whoToSend=${environment}`; + result += '&bundleName='; + result += '&bundleSelect='; + + if (filterKey) { + result += `&filterKey=${filterKey}`; + } + + return result; + } + + get lastEnvironmentPushed(): string[] { + return this._lastEnvironmentPushed; + } +} diff --git a/ui/apps/dotcms-ui/src/app/api/util/ColorUtil.ts b/ui/apps/dotcms-ui/src/app/api/util/ColorUtil.ts new file mode 100644 index 000000000000..f17413d1d371 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/util/ColorUtil.ts @@ -0,0 +1,57 @@ +import { Injectable } from '@angular/core'; + +/** + * Miscellaneous Color utility methods. + */ +@Injectable() +export class ColorUtil { + /** + * Check color brightness. + * + * @param color color to check, it could be in hex or rgb format + * @return brightness value from 0 to 255, where 255 is brigthest. + * @see http://www.webmasterworld.com/forum88/9769.htm + */ + public getBrightness(color): number { + const isHexCode = color.indexOf('#') !== -1; + + if (isHexCode) { + // strip off any leading # + color = color.replace('#', ''); + } else { + color = this.rgb2hex(color); + } + + const c_r = parseInt(color.substr(0, 2), 16); + const c_g = parseInt(color.substr(2, 2), 16); + const c_b = parseInt(color.substr(4, 2), 16); + + return (c_r * 299 + c_g * 587 + c_b * 114) / 1000; + } + + /** + * Return true if hexCode is a bright color + * @param color color to check, it could be in hex or rgb format + */ + + public isBrightness(color): boolean { + return this.getBrightness(color) > 138; + } + + /** + * Convert RGB color format to hex color format, for example, if you have rgb(0,0,0) return #000 + * @see http://stackoverflow.com/questions/1740700/get-hex-value-rather-than-rgb-value-using-jquery + */ + public rgb2hex(rgb): string { + if (rgb.search('rgb') === -1) { + return rgb; + } else { + rgb = rgb.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(\.\d+)?))?\)$/); + return '#' + this.hex(rgb[1]) + this.hex(rgb[2]) + this.hex(rgb[3]); + } + } + + private hex(x: string): string { + return ('0' + parseInt(x, 10).toString(16)).slice(-2); + } +} diff --git a/ui/apps/dotcms-ui/src/app/api/util/clipboard/ClipboardUtil.spec.ts b/ui/apps/dotcms-ui/src/app/api/util/clipboard/ClipboardUtil.spec.ts new file mode 100644 index 000000000000..4b0899028f61 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/util/clipboard/ClipboardUtil.spec.ts @@ -0,0 +1,35 @@ +import { DotClipboardUtil } from './ClipboardUtil'; +import { TestBed } from '@angular/core/testing'; + +describe('DotClipboardUtil', () => { + let service: DotClipboardUtil; + let injector; + + beforeEach(() => { + injector = TestBed.configureTestingModule({ + providers: [DotClipboardUtil] + }); + + service = injector.get(DotClipboardUtil); + }); + + it('should copy', () => { + spyOn(document, 'execCommand').and.returnValue(true); + + service.copy('hello-world').then((res: boolean) => { + expect(res).toBe(true); + }); + expect(document.execCommand).toHaveBeenCalledWith('copy'); + }); + + it('should not copy and habdle error', () => { + spyOn(document, 'execCommand').and.throwError('failed'); + + service + .copy('hello-world') + .then() + .catch((res) => { + expect(res).toBe(undefined); + }); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/api/util/clipboard/ClipboardUtil.ts b/ui/apps/dotcms-ui/src/app/api/util/clipboard/ClipboardUtil.ts new file mode 100644 index 000000000000..b3d7b894384a --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/util/clipboard/ClipboardUtil.ts @@ -0,0 +1,45 @@ +import { Injectable } from '@angular/core'; + +/** + * Clipboard utils + * + * @export + * @class DotClipboardUtil + */ +@Injectable() +export class DotClipboardUtil { + /** + * Copy the passed string to the clipboard + * + * @param string text + * @returns Promise + * @memberof DotClipboardUtil + */ + copy(text: string): Promise { + /* + Aparently this is the only crossbrowser solution so far. If we do this in another place we might have + to include an npm module. + */ + const txtArea = document.createElement('textarea'); + + txtArea.style.position = 'fixed'; + txtArea.style.top = '0'; + txtArea.style.left = '0'; + txtArea.style.opacity = '0'; + txtArea.value = text; + document.body.appendChild(txtArea); + txtArea.select(); + + let result; + + return new Promise((resolve, reject) => { + try { + result = document.execCommand('copy'); + resolve(result); + } catch (err) { + reject(result); + } + document.body.removeChild(txtArea); + }); + } +} diff --git a/ui/apps/dotcms-ui/src/app/api/util/string-pixels-util.spec.ts b/ui/apps/dotcms-ui/src/app/api/util/string-pixels-util.spec.ts new file mode 100644 index 000000000000..142c19fc22e3 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/util/string-pixels-util.spec.ts @@ -0,0 +1,22 @@ +import { StringPixels } from './string-pixels-util'; +import { TestBed } from '@angular/core/testing'; + +describe('StringPixelsUtil', () => { + beforeEach(() => { + TestBed.configureTestingModule({ + providers: [StringPixels] + }); + }); + + it('should return max width --> 140px', () => { + const textValues = ['demo text', 'demo longer test', 'the longest text of all times']; + const textWidth = StringPixels.getDropdownWidth(textValues); + expect(textWidth).toBe('140px'); + }); + + it('should return max widht --> 67 (taking 7 as the size of each character)', () => { + const textValues = ['text', 'demo', 'hello']; + const textWidth = StringPixels.getDropdownWidth(textValues); + expect(textWidth).toBe('67px'); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/api/util/string-pixels-util.ts b/ui/apps/dotcms-ui/src/app/api/util/string-pixels-util.ts new file mode 100644 index 000000000000..12f48805bd0b --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/util/string-pixels-util.ts @@ -0,0 +1,20 @@ +import * as _ from 'lodash'; +import { Injectable } from '@angular/core'; +@Injectable() +export class StringPixels { + private static readonly characterSize = 7; + private static readonly arrowDropdownComponentSize = 32; + + /** + * Returns an estimate of the width in pixels that may have the longer + * text from a collection, based on a character constant + * @param Array textValues The text to be measure. + * + */ + public static getDropdownWidth(textValues: Array): string { + const maxText = _.maxBy(textValues, (text: string) => text.length).length; + const maxWidth = + StringPixels.characterSize * maxText > 108 ? 108 : StringPixels.characterSize * maxText; + return `${maxWidth + StringPixels.arrowDropdownComponentSize}px`; + } +} diff --git a/ui/apps/dotcms-ui/src/app/api/util/stringFormat.ts b/ui/apps/dotcms-ui/src/app/api/util/stringFormat.ts new file mode 100644 index 000000000000..91666aa2a449 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/api/util/stringFormat.ts @@ -0,0 +1,13 @@ +import { Injectable } from '@angular/core'; +@Injectable() +export class StringFormat { + public formatMessage(s: string, ...args: string[]): string { + if (s) { + for (let i = 0; i < args.length - 1; i++) { + const reg = new RegExp('\\{' + i + '\\}', 'gm'); + s = s.replace(reg, args[i]); + } + return s; + } + } +} diff --git a/ui/apps/dotcms-ui/src/app/app-routing.module.ts b/ui/apps/dotcms-ui/src/app/app-routing.module.ts new file mode 100644 index 000000000000..a3179275ea55 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/app-routing.module.ts @@ -0,0 +1,191 @@ +import { Routes, RouterModule, RouteReuseStrategy } from '@angular/router'; +import { NgModule } from '@angular/core'; +import { MainCoreLegacyComponent } from '@components/main-core-legacy/main-core-legacy-component'; +import { MainComponentLegacyComponent } from '@components/main-legacy/main-legacy.component'; + +import { DotLogOutContainerComponent } from '@components/login/dot-logout-container-component/dot-log-out-container'; +import { IframePortletLegacyComponent } from '@components/_common/iframe/iframe-porlet-legacy/index'; +import { AuthGuardService } from '@services/guards/auth-guard.service'; +import { ContentletGuardService } from '@services/guards/contentlet-guard.service'; +import { DefaultGuardService } from '@services/guards/default-guard.service'; +import { MenuGuardService } from '@services/guards/menu-guard.service'; +import { PublicAuthGuardService } from '@services/guards/public-auth-guard.service'; +import { DotLoginPageComponent } from '@components/login/main/dot-login-page.component'; +import { DotLoginPageResolver } from '@components/login/dot-login-page-resolver.service'; +import { DotIframePortletLegacyResolver } from '@components/_common/iframe/service/dot-iframe-porlet-legacy-resolver.service'; +import { DotCustomReuseStrategyService } from '@shared/dot-custom-reuse-strategy/dot-custom-reuse-strategy.service'; + +const PORTLETS_ANGULAR = [ + { + canActivate: [MenuGuardService], + canActivateChild: [MenuGuardService], + path: 'templates', + loadChildren: () => + import('@portlets/dot-templates/dot-templates.module').then((m) => m.DotTemplatesModule) + }, + { + canActivate: [MenuGuardService], + canActivateChild: [MenuGuardService], + path: 'content-types-angular', + data: { + reuseRoute: false + }, + loadChildren: () => + import('@portlets/dot-content-types/dot-content-types.module').then( + (m) => m.DotContentTypesModule + ) + }, + { + canActivate: [MenuGuardService], + canActivateChild: [MenuGuardService], + path: 'forms', + loadChildren: () => + import('@portlets/dot-form-builder/dot-form-builder.module').then( + (m) => m.DotFormBuilderModule + ), + data: { + filterBy: 'FORM' + } + }, + { + canActivate: [MenuGuardService], + canActivateChild: [MenuGuardService], + path: 'rules', + loadChildren: () => + import('@portlets/dot-rules/dot-rules.module').then((m) => m.DotRulesModule) + }, + { + // canActivate: [MenuGuardService], + // canActivateChild: [MenuGuardService], + path: 'starter', + loadChildren: () => + import('@portlets/dot-starter/dot-starter.module').then((m) => m.DotStarterModule) + }, + { + canActivate: [MenuGuardService], + canActivateChild: [MenuGuardService], + path: 'apps', + loadChildren: () => + import('@portlets/dot-apps/dot-apps.module').then((m) => m.DotAppsModule) + }, + { + path: 'notLicensed', + loadChildren: () => + import('@components/not-licensed/not-licensed.module').then((m) => m.NotLicensedModule) + }, + { + path: 'edit-page', + loadChildren: () => + import('@portlets/dot-edit-page/dot-edit-page.module').then((m) => m.DotEditPageModule) + }, + { + canActivate: [MenuGuardService], + path: '', + children: [] + } +]; +const PORTLETS_IFRAME = [ + { + canActivateChild: [MenuGuardService], + path: 'c', + children: [ + { + component: IframePortletLegacyComponent, + path: ':id', + children: [ + { + loadChildren: () => + import( + '@components/dot-contentlet-editor/dot-contentlet-editor.routing.module' + ).then((m) => m.DotContentletEditorRoutingModule), + path: 'new' + }, + { + loadChildren: () => + import('@portlets/dot-porlet-detail/dot-portlet-detail.module').then( + (m) => m.DotPortletDetailModule + ), + path: ':asset', + data: { + reuseRoute: false + } + } + ], + resolve: { + canAccessPortlet: DotIframePortletLegacyResolver + } + }, + { + path: '', + children: [] + } + ] + }, + { + canActivateChild: [ContentletGuardService], + path: 'add', + children: [ + { + component: IframePortletLegacyComponent, + path: ':id' + }, + { + path: '', + children: [] + } + ] + } +]; + +const appRoutes: Routes = [ + { + canActivate: [PublicAuthGuardService], + path: 'public', + component: DotLoginPageComponent, + resolve: { + loginFormInfo: DotLoginPageResolver + }, + loadChildren: () => + import('@components/login/dot-login-page.module').then((m) => m.DotLoginPageModule) + }, + { + canActivate: [AuthGuardService], + children: [ + { + path: 'rules', + loadChildren: () => + import('@portlets/dot-rules/dot-rules.module').then((m) => m.DotRulesModule), + canActivate: [AuthGuardService] + } + ], + component: MainCoreLegacyComponent, + path: 'fromCore' + }, + { + component: DotLogOutContainerComponent, + path: 'logout' + }, + { + canActivate: [AuthGuardService], + component: MainComponentLegacyComponent, + children: [...PORTLETS_IFRAME, ...PORTLETS_ANGULAR], + path: '' + }, + { + canActivate: [DefaultGuardService], + path: '**', + children: [] + } +]; + +@NgModule({ + exports: [RouterModule], + imports: [ + RouterModule.forRoot(appRoutes, { + useHash: true, + onSameUrlNavigation: 'reload' + }) + ], + providers: [{ provide: RouteReuseStrategy, useClass: DotCustomReuseStrategyService }] +}) +export class AppRoutingModule {} diff --git a/ui/apps/dotcms-ui/src/app/app.component.html b/ui/apps/dotcms-ui/src/app/app.component.html new file mode 100644 index 000000000000..0680b43f9c6a --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/app.component.html @@ -0,0 +1 @@ + diff --git a/ui/apps/dotcms-ui/src/app/app.component.scss b/ui/apps/dotcms-ui/src/app/app.component.scss new file mode 100644 index 000000000000..45b3e205074d --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/app.component.scss @@ -0,0 +1,3 @@ +.confirm-dialog__button--hidden { + visibility: hidden; +} diff --git a/ui/apps/dotcms-ui/src/app/app.component.spec.ts b/ui/apps/dotcms-ui/src/app/app.component.spec.ts new file mode 100644 index 000000000000..9b1266187b1e --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/app.component.spec.ts @@ -0,0 +1,84 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ + +import { By } from '@angular/platform-browser'; +import { DebugElement } from '@angular/core'; +import { RouterTestingModule } from '@angular/router/testing'; +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { AppComponent } from './app.component'; +import { DotUiColorsService } from '@services/dot-ui-colors/dot-ui-colors.service'; +import { + CoreWebService, + CoreWebServiceMock, + DotcmsConfigService, + LoggerService, + StringUtils +} from '@dotcms/dotcms-js'; +import { of } from 'rxjs'; +import { DotMessageService } from '@services/dot-message/dot-messages.service'; +import { DotNavLogoService } from '@services/dot-nav-logo/dot-nav-logo.service'; +import { HttpClientTestingModule } from '@angular/common/http/testing'; + +describe('AppComponent', () => { + let fixture: ComponentFixture; + let de: DebugElement; + let dotCmsConfigService: DotcmsConfigService; + let dotUiColorsService: DotUiColorsService; + let dotMessageService: DotMessageService; + + beforeEach(() => { + TestBed.configureTestingModule({ + declarations: [AppComponent], + imports: [RouterTestingModule, HttpClientTestingModule], + providers: [ + { provide: CoreWebService, useClass: CoreWebServiceMock }, + DotUiColorsService, + DotNavLogoService, + DotcmsConfigService, + LoggerService, + StringUtils + ] + }); + + fixture = TestBed.createComponent(AppComponent); + de = fixture.debugElement; + + dotCmsConfigService = de.injector.get(DotcmsConfigService); + dotUiColorsService = de.injector.get(DotUiColorsService); + dotMessageService = de.injector.get(DotMessageService); + + spyOn(dotCmsConfigService, 'getConfig').and.returnValue( + of({ + colors: { + primary: '#123', + secondary: '#456', + background: '#789' + }, + releaseInfo: { + buildDate: 'Jan 1, 2022' + } + }) + ); + spyOn(dotUiColorsService, 'setColors'); + spyOn(dotMessageService, 'init'); + }); + + it('should init message service', () => { + fixture.detectChanges(); + expect(dotMessageService.init).toHaveBeenCalledWith({ buildDate: 'Jan 1, 2022' }); + }); + + it('should have router-outlet', () => { + fixture.detectChanges(); + expect(de.query(By.css('router-outlet')) !== null).toBe(true); + }); + + it('should set ui colors', () => { + fixture.detectChanges(); + expect(dotUiColorsService.setColors).toHaveBeenCalledWith(jasmine.any(HTMLElement), { + primary: '#123', + secondary: '#456', + background: '#789' + }); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/app.component.ts b/ui/apps/dotcms-ui/src/app/app.component.ts new file mode 100644 index 000000000000..07fdea35f2c7 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/app.component.ts @@ -0,0 +1,49 @@ +import { Component, OnInit } from '@angular/core'; +import { ConfigParams, DotcmsConfigService, DotUiColors } from '@dotcms/dotcms-js'; +import { DotUiColorsService } from '@services/dot-ui-colors/dot-ui-colors.service'; +import { take, map } from 'rxjs/operators'; +import { DotMessageService } from '@services/dot-message/dot-messages.service'; +import { DotNavLogoService } from '@services/dot-nav-logo/dot-nav-logo.service'; +@Component({ + selector: 'dot-root', + templateUrl: './app.component.html', + styleUrls: ['./app.component.scss'] +}) +export class AppComponent implements OnInit { + constructor( + private dotCmsConfigService: DotcmsConfigService, + private dotUiColors: DotUiColorsService, + private dotMessageService: DotMessageService, + private dotNavLogoService: DotNavLogoService + ) {} + + ngOnInit() { + this.dotCmsConfigService + .getConfig() + .pipe( + take(1), + map((config: ConfigParams) => { + return { + buildDate: config.releaseInfo?.buildDate, + colors: config.colors, + navBar: config.logos?.navBar + }; + }) + ) + .subscribe( + ({ + buildDate, + colors, + navBar + }: { + buildDate: string; + colors: DotUiColors; + navBar: string; + }) => { + this.dotMessageService.init({ buildDate }); + this.dotNavLogoService.setLogo(navBar); + this.dotUiColors.setColors(document.querySelector('html'), colors); + } + ); + } +} diff --git a/ui/apps/dotcms-ui/src/app/app.module.ts b/ui/apps/dotcms-ui/src/app/app.module.ts new file mode 100644 index 000000000000..8d1be229e661 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/app.module.ts @@ -0,0 +1,46 @@ +import { CommonModule } from '@angular/common'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; +import { BrowserModule } from '@angular/platform-browser'; +import { FormsModule, ReactiveFormsModule } from '@angular/forms'; +import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { HttpClientModule } from '@angular/common/http'; + +// App is our top level component +import { AppComponent } from './app.component'; +import { AppRoutingModule } from './app-routing.module'; + +// Custom Components +import { COMPONENTS } from './components'; +import { ENV_PROVIDERS } from './providers'; +import { CUSTOM_MODULES, NGFACES_MODULES } from './modules'; +import { SharedModule } from './shared/shared.module'; + +import { DotDirectivesModule } from './shared/dot-directives.module'; +import { DotPipesModule } from '@pipes/dot-pipes.module'; +import { MonacoEditorModule } from '@materia-ui/ngx-monaco-editor'; +import { MarkdownModule } from 'ngx-markdown'; + +// `AppModule` is the main entry point into Angular2's bootstraping process +@NgModule({ + bootstrap: [AppComponent], + declarations: [AppComponent, ...COMPONENTS], + imports: [ + ...CUSTOM_MODULES, + ...NGFACES_MODULES, + CommonModule, + BrowserAnimationsModule, + BrowserModule, + FormsModule, + HttpClientModule, + ReactiveFormsModule, + AppRoutingModule, + DotDirectivesModule, + DotPipesModule, + SharedModule.forRoot(), + MonacoEditorModule, + MarkdownModule.forRoot() + ], + providers: [ENV_PROVIDERS], + schemas: [CUSTOM_ELEMENTS_SCHEMA] +}) +export class AppModule {} diff --git a/ui/apps/dotcms-ui/src/app/components.ts b/ui/apps/dotcms-ui/src/app/components.ts new file mode 100644 index 000000000000..f90db5b9ba5d --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/components.ts @@ -0,0 +1,16 @@ +import { DotAlertConfirmComponent } from '@components/_common/dot-alert-confirm/dot-alert-confirm'; +import { GlobalSearchComponent } from '@components/global-search/global-search'; +import { DotLogOutContainerComponent } from '@components/login/dot-logout-container-component/dot-log-out-container'; +import { MainCoreLegacyComponent } from '@components/main-core-legacy/main-core-legacy-component'; +import { MainComponentLegacyComponent } from '@components/main-legacy/main-legacy.component'; + +import { DotLoginPageComponent } from '@components/login/main/dot-login-page.component'; + +export const COMPONENTS = [ + MainCoreLegacyComponent, + MainComponentLegacyComponent, + DotLoginPageComponent, + DotLogOutContainerComponent, + GlobalSearchComponent, + DotAlertConfirmComponent +]; diff --git a/ui/apps/dotcms-ui/src/app/modules.ts b/ui/apps/dotcms-ui/src/app/modules.ts new file mode 100644 index 000000000000..ea12cb664069 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/modules.ts @@ -0,0 +1,90 @@ +import { DotLargeMessageDisplayModule } from './view/components/dot-large-message-display/dot-large-message-display.module'; +// CUSTOM MDOULES +import { DotActionButtonModule } from './view/components/_common/dot-action-button/dot-action-button.module'; +import { DotFieldValidationMessageModule } from './view/components/_common/dot-field-validation-message/dot-file-validation-message.module'; +import { DotListingDataTableModule } from './view/components/dot-listing-data-table/dot-listing-data-table.module'; +import { DotSiteSelectorModule } from './view/components/_common/dot-site-selector/dot-site-selector.module'; +import { SearchableDropDownModule } from './view/components/_common/searchable-dropdown'; +import { IFrameModule } from './view/components/_common/iframe'; + +import { TableModule } from 'primeng/table'; + +import { DotIconModule } from '@dotcms/ui'; +import { UiDotIconButtonModule } from './view/components/_common/dot-icon-button/dot-icon-button.module'; +import { DotTextareaContentModule } from './view/components/_common/dot-textarea-content/dot-textarea-content.module'; +import { DotContentletEditorModule } from './view/components/dot-contentlet-editor/dot-contentlet-editor.module'; +import { DotWorkflowTaskDetailModule } from './view/components/dot-workflow-task-detail/dot-workflow-task-detail.module'; +import { DotDialogModule } from '@components/dot-dialog/dot-dialog.module'; +import { DotMessageDisplayModule } from '@components/dot-message-display/dot-message-display.module'; +import { DotToolbarModule } from '@components/dot-toolbar/dot-toolbar.module'; +import { DotPushPublishDialogModule } from '@components/_common/dot-push-publish-dialog'; +import { DotDownloadBundleDialogModule } from '@components/_common/dot-download-bundle-dialog/dot-download-bundle-dialog.module'; +import { DotWizardModule } from '@components/_common/dot-wizard/dot-wizard.module'; + +import { AutoCompleteModule } from 'primeng/autocomplete'; +import { BreadcrumbModule } from 'primeng/breadcrumb'; +import { ButtonModule } from 'primeng/button'; +import { CalendarModule } from 'primeng/calendar'; +import { CheckboxModule } from 'primeng/checkbox'; +import { ConfirmDialogModule } from 'primeng/confirmdialog'; +import { DialogModule } from 'primeng/dialog'; +import { DropdownModule } from 'primeng/dropdown'; +import { InputTextModule } from 'primeng/inputtext'; +import { InputTextareaModule } from 'primeng/inputtextarea'; +import { MultiSelectModule } from 'primeng/multiselect'; +import { PasswordModule } from 'primeng/password'; +import { RadioButtonModule } from 'primeng/radiobutton'; +import { SelectButtonModule } from 'primeng/selectbutton'; +import { SharedModule } from 'primeng/api'; +import { SplitButtonModule } from 'primeng/splitbutton'; +import { TabViewModule } from 'primeng/tabview'; +import { ToolbarModule } from 'primeng/toolbar'; +import { TreeTableModule } from 'primeng/treetable'; +import { DotGenerateSecurePasswordModule } from './view/components/_common/dot-generate-secure-password/dot-generate-secure-password.module'; +import { DotContentCompareModule } from '@components/dot-content-compare/dot-content-compare.module'; + +export const CUSTOM_MODULES = [ + DotToolbarModule, + DotActionButtonModule, + DotContentletEditorModule, + DotDialogModule, + UiDotIconButtonModule, + DotIconModule, + DotTextareaContentModule, + DotWorkflowTaskDetailModule, + DotMessageDisplayModule, + DotFieldValidationMessageModule, + IFrameModule, + DotListingDataTableModule, + SearchableDropDownModule, + DotSiteSelectorModule, + DotLargeMessageDisplayModule, + DotPushPublishDialogModule, + DotContentCompareModule, + DotDownloadBundleDialogModule, + DotWizardModule, + DotGenerateSecurePasswordModule +]; + +export const NGFACES_MODULES = [ + AutoCompleteModule, + BreadcrumbModule, + ButtonModule, + CalendarModule, + CheckboxModule, + ConfirmDialogModule, + TableModule, + DialogModule, + DropdownModule, + InputTextModule, + InputTextareaModule, + MultiSelectModule, + PasswordModule, + RadioButtonModule, + SelectButtonModule, + SharedModule, + SplitButtonModule, + TabViewModule, + ToolbarModule, + TreeTableModule +]; diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration-detail/dot-apps-configuration-detail-form/dot-apps-configuration-detail-form.component.html b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration-detail/dot-apps-configuration-detail-form/dot-apps-configuration-detail-form.component.html new file mode 100644 index 000000000000..4094508215b8 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration-detail/dot-apps-configuration-detail-form/dot-apps-configuration-detail-form.component.html @@ -0,0 +1,106 @@ + + + + + + + + +
+
+
+ + + + + {{ field.hint }} + + + + + + {{ field.hint }} + + + + + {{ field.hint }} + + + + + + {{ field.hint }} + +
+
+
diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration-detail/dot-apps-configuration-detail-form/dot-apps-configuration-detail-form.component.scss b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration-detail/dot-apps-configuration-detail-form/dot-apps-configuration-detail-form.component.scss new file mode 100644 index 000000000000..6780a1364d46 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration-detail/dot-apps-configuration-detail-form/dot-apps-configuration-detail-form.component.scss @@ -0,0 +1,54 @@ +@use "variables" as *; + +:host { + form { + max-width: 64.25rem; + } + + textarea { + font-family: $code-text; + max-height: 21.5rem; + overflow: auto !important; + } +} + +.p-field { + margin-bottom: $spacing-4; + + label { + display: block; + } + + input, + textarea { + font-size: $font-size-large; + width: 100%; + } + + dot-icon { + color: $brand-primary; + margin-left: $spacing-1; + vertical-align: middle; + } + + ::ng-deep { + p-dropdown .p-dropdown { + min-width: 14.28rem; + margin-bottom: $spacing-1; + } + + p-checkbox label { + font-size: $font-size-large; + } + + p-checkbox.required label:before, + label.required:before { + color: $red; + content: "* "; + } + + markdown p { + margin: 0; + } + } +} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration-detail/dot-apps-configuration-detail-form/dot-apps-configuration-detail-form.component.spec.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration-detail/dot-apps-configuration-detail-form/dot-apps-configuration-detail-form.component.spec.ts new file mode 100644 index 000000000000..6075bfbabc7c --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration-detail/dot-apps-configuration-detail-form/dot-apps-configuration-detail-form.component.spec.ts @@ -0,0 +1,300 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; +import { CommonModule } from '@angular/common'; +import { DotAppsConfigurationDetailFormComponent } from './dot-apps-configuration-detail-form.component'; + +import { ReactiveFormsModule } from '@angular/forms'; +import { By } from '@angular/platform-browser'; +import { DotIconModule } from '@dotcms/ui'; +import { HttpClientTestingModule } from '@angular/common/http/testing'; +import { CheckboxModule } from 'primeng/checkbox'; +import { DropdownModule } from 'primeng/dropdown'; +import { InputTextareaModule } from 'primeng/inputtextarea'; +import { InputTextModule } from 'primeng/inputtext'; +import { TooltipModule } from 'primeng/tooltip'; +import { MarkdownModule, MarkdownService } from 'ngx-markdown'; +import { DebugElement } from '@angular/core'; +import { ButtonModule } from 'primeng/button'; + +const secrets = [ + { + dynamic: false, + name: 'name', + hidden: false, + hint: 'This is a Name', + label: 'Name:', + required: true, + type: 'STRING', + value: 'test' + }, + { + dynamic: false, + name: 'password', + hidden: true, + hint: 'This is a password', + label: 'Password:', + required: true, + type: 'STRING', + value: '****' + }, + { + dynamic: false, + name: 'enabled', + hidden: false, + hint: 'This is Enabled!', + label: 'Enabled:', + required: false, + type: 'BOOL', + value: 'true' + }, + { + dynamic: false, + name: 'select', + hidden: false, + hint: 'This is Select!', + label: 'Select label:', + options: [ + { + label: 'uno', + value: '1' + }, + { + label: 'dos', + value: '2' + } + ], + required: true, + type: 'SELECT', + value: '1' + }, + { + dynamic: false, + name: 'integration', + hidden: false, + hint: 'This is Integration!', + label: 'Integration:', + required: false, + type: 'BUTTON', + value: 'urlLink' + } +]; + +const formState = { + name: secrets[0].value, + password: secrets[1].value, + enabled: JSON.parse(secrets[2].value), + select: secrets[3].options[0].value, + integration: secrets[4].value +}; + +describe('DotAppsConfigurationDetailFormComponent', () => { + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [ + HttpClientTestingModule, + ButtonModule, + CommonModule, + CheckboxModule, + DropdownModule, + DotIconModule, + InputTextareaModule, + InputTextModule, + MarkdownModule, + ReactiveFormsModule, + TooltipModule + ], + declarations: [DotAppsConfigurationDetailFormComponent], + providers: [ + { + provide: MarkdownService, + useValue: { + compile(text) { + return text; + }, + + highlight() { + // + } + } + } + ] + }); + }); + + describe('Without warnings', () => { + let component: DotAppsConfigurationDetailFormComponent; + let fixture: ComponentFixture; + let de: DebugElement; + + beforeEach(() => { + fixture = TestBed.createComponent(DotAppsConfigurationDetailFormComponent); + de = fixture.debugElement; + component = de.componentInstance; + component.formFields = secrets; + spyOn(component.data, 'emit'); + spyOn(component.valid, 'emit'); + fixture.detectChanges(); + }); + + it('should load form components', () => { + expect(de.queryAll(By.css('.field')).length).toBe(secrets.length); + }); + + it('should not have warning icon', () => { + expect(de.query(By.css('dot-icon'))).toBeFalsy(); + }); + + it('should focus on first input when loaded', async () => { + const focusField = component.formContainer.nativeElement.querySelector('#name'); + spyOn(focusField, 'focus'); + fixture.detectChanges(); + await fixture.whenStable(); + expect(focusField.focus).toHaveBeenCalledTimes(1); + }); + + it('should load Label, Textarea & Hint with right attributes', () => { + const row = de.query(By.css('[data-testid="name"]')); + expect(row.query(By.css('markdown'))).toBeTruthy(); + expect(row.query(By.css('label')).nativeElement.textContent).toBe(secrets[0].label); + expect( + row.query(By.css('label')).nativeElement.classList.contains('form__label') + ).toBeTruthy(); + expect( + row.query(By.css('label')).nativeElement.classList.contains('required') + ).toBeTruthy(); + expect(row.query(By.css('textarea')).nativeElement.attributes.id.value).toBe( + secrets[0].name + ); + expect(row.query(By.css('textarea')).nativeElement.attributes.autoResize.value).toBe( + 'autoResize' + ); + expect(row.query(By.css('textarea')).nativeElement.value).toBe(secrets[0].value); + expect(row.query(By.css('.p-field-hint')).nativeElement.textContent).toBe( + secrets[0].hint + ); + }); + + it('should load Checkbox & Hint with right attributes', () => { + const row = de.query(By.css('[data-testid="enabled"]')); + expect(row.query(By.css('markdown'))).toBeTruthy(); + expect(row.query(By.css('p-checkbox')).nativeElement.attributes.id.value).toBe( + secrets[2].name + ); + expect(row.query(By.css('p-checkbox')).componentInstance.label).toBe(secrets[2].label); + expect(row.query(By.css('input')).nativeElement.value).toBe(secrets[2].value); + expect(row.query(By.css('.p-field-hint')).nativeElement.textContent).toBe( + secrets[2].hint + ); + }); + + it('should load Label, Select & Hint with right attributes', () => { + const row = de.query(By.css('[data-testid="select"]')); + expect(row.query(By.css('markdown'))).toBeTruthy(); + expect(row.query(By.css('label')).nativeElement.textContent).toBe(secrets[3].label); + expect( + row.query(By.css('label')).nativeElement.classList.contains('form__label') + ).toBeTruthy(); + expect( + row.query(By.css('label')).nativeElement.classList.contains('required') + ).toBeTruthy(); + expect(row.query(By.css('p-dropdown')).nativeElement.id).toBe(secrets[3].name); + expect(row.query(By.css('p-dropdown')).componentInstance.options).toBe( + secrets[3].options + ); + expect(row.query(By.css('p-dropdown')).componentInstance.value).toBe( + secrets[3].options[0].value + ); + expect(row.query(By.css('.p-field-hint')).nativeElement.textContent).toBe( + secrets[3].hint + ); + }); + + it('should load Label, Button & Hint with right attributes', () => { + const row = de.query(By.css('[data-testid="integration"]')); + expect(row.query(By.css('label')).nativeElement.textContent).toBe(secrets[4].label); + expect( + row.query(By.css('label')).nativeElement.classList.contains('form__label') + ).toBeTruthy(); + expect(row.query(By.css('button')).nativeElement.id).toBe(secrets[4].name); + expect(row.query(By.css('.form__group-hint')).nativeElement.textContent).toBe( + secrets[4].hint + ); + }); + + it('should Button be disabled when no configured app', () => { + const row = de.query(By.css('[data-testid="integration"]')); + const button = row.query(By.css('button')).nativeElement; + expect(button.disabled).toBe(true); + }); + + it('should Button open link on new tab when clicked on a configured app', () => { + component.appConfigured = true; + fixture.detectChanges(); + const openMock = jasmine.createSpy(); + window.open = openMock; + const row = de.query(By.css('[data-testid="integration"]')); + const button = row.query(By.css('button')).nativeElement; + + button.click(); + expect(openMock).toHaveBeenCalledWith(secrets[4].value, '_blank'); + }); + + it('should emit form state when loaded', () => { + expect(component.data.emit).toHaveBeenCalledWith(formState); + expect(component.valid.emit).toHaveBeenCalledWith(true); + }); + + it('should emit form state when value changed', () => { + component.myFormGroup.get('name').setValue('Test2'); + component.myFormGroup.get('password').setValue('Password2'); + component.myFormGroup.get('enabled').setValue('false'); + expect(component.data.emit).toHaveBeenCalledTimes(4); + expect(component.valid.emit).toHaveBeenCalledTimes(4); + }); + + it('should emit form state disabled when required field empty', () => { + component.myFormGroup.get('name').setValue(''); + expect(component.valid.emit).toHaveBeenCalledWith(false); + }); + }); + + describe('With warnings', () => { + let component: DotAppsConfigurationDetailFormComponent; + let fixture: ComponentFixture; + let de: DebugElement; + + beforeEach(() => { + fixture = TestBed.createComponent(DotAppsConfigurationDetailFormComponent); + de = fixture.debugElement; + component = de.componentInstance; + component.formFields = secrets.map((item, i) => { + if (i < 3) { + return { + ...item, + warnings: [`error ${i}`] + }; + } + return item; + }); + fixture.detectChanges(); + }); + + it('should have warning icons', () => { + const warningIcons = de.queryAll(By.css('dot-icon')); + expect(warningIcons[0].attributes['name']).toBe('warning'); + expect(warningIcons[0].attributes['size']).toBe('18'); + expect(warningIcons[0].attributes['ng-reflect-text']).toBe( + component.formFields[0].warnings[0] + ); + expect(warningIcons[1].attributes['name']).toBe('warning'); + expect(warningIcons[1].attributes['size']).toBe('18'); + expect(warningIcons[1].attributes['ng-reflect-text']).toBe( + component.formFields[1].warnings[0] + ); + expect(warningIcons[2].attributes['name']).toBe('warning'); + expect(warningIcons[2].attributes['size']).toBe('18'); + expect(warningIcons[2].attributes['ng-reflect-text']).toBe( + component.formFields[2].warnings[0] + ); + }); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration-detail/dot-apps-configuration-detail-form/dot-apps-configuration-detail-form.component.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration-detail/dot-apps-configuration-detail-form/dot-apps-configuration-detail-form.component.ts new file mode 100644 index 000000000000..630a4b4cc3a7 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration-detail/dot-apps-configuration-detail-form/dot-apps-configuration-detail-form.component.ts @@ -0,0 +1,75 @@ +import { + Component, + OnInit, + Input, + Output, + EventEmitter, + ViewChild, + ElementRef +} from '@angular/core'; +import { FormControl, FormGroup, Validators, NgForm } from '@angular/forms'; +import { DotAppsSecrets } from '@shared/models/dot-apps/dot-apps.model'; + +const getFieldValueFn = { + BOOL: (field: DotAppsSecrets) => { + return field.value ? JSON.parse(field.value) : field.value; + }, + SELECT: (field: DotAppsSecrets) => { + return field.value === '' ? field.options[0].value : field.value; + } +}; + +@Component({ + selector: 'dot-apps-configuration-detail-form', + templateUrl: './dot-apps-configuration-detail-form.component.html', + styleUrls: ['./dot-apps-configuration-detail-form.component.scss'] +}) +export class DotAppsConfigurationDetailFormComponent implements OnInit { + @ViewChild('form', { static: true }) public form: NgForm; + @ViewChild('formContainer', { static: true }) public formContainer: ElementRef; + + @Input() formFields: DotAppsSecrets[]; + @Input() appConfigured = false; + @Output() data = new EventEmitter<{ [key: string]: string }>(); + @Output() valid = new EventEmitter(); + myFormGroup: FormGroup; + + ngOnInit() { + const group = {}; + this.formFields.forEach((field: DotAppsSecrets) => { + group[field.name] = new FormControl( + this.getFieldValue(field), + field.required ? Validators.required : null + ); + }); + this.myFormGroup = new FormGroup(group); + + this.myFormGroup.valueChanges.subscribe(() => { + this.emitValues(); + }); + + this.emitValues(); + + setTimeout(() => { + this.formContainer.nativeElement.querySelector(`#${this.formFields[0].name}`).focus(); + }, 0); + } + + /** + * Handle integration action of third parties in a new window + * @param {string} url + * @memberof DotAppsConfigurationDetailFormComponent + */ + onIntegrate(url: string): void { + window.open(url, '_blank'); + } + + private getFieldValue(field: DotAppsSecrets): string | boolean { + return getFieldValueFn[field.type] ? getFieldValueFn[field.type](field) : field.value; + } + + private emitValues(): void { + this.data.emit(this.myFormGroup.value); + this.valid.emit(this.myFormGroup.status === 'VALID'); + } +} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration-detail/dot-apps-configuration-detail-form/dot-apps-configuration-detail-form.module.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration-detail/dot-apps-configuration-detail-form/dot-apps-configuration-detail-form.module.ts new file mode 100644 index 000000000000..78aa44cecf14 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration-detail/dot-apps-configuration-detail-form/dot-apps-configuration-detail-form.module.ts @@ -0,0 +1,33 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; + +import { DotAppsConfigurationDetailFormComponent } from './dot-apps-configuration-detail-form.component'; +import { ReactiveFormsModule } from '@angular/forms'; +import { DotIconModule } from '@dotcms/ui'; + +import { CheckboxModule } from 'primeng/checkbox'; +import { DropdownModule } from 'primeng/dropdown'; +import { InputTextareaModule } from 'primeng/inputtextarea'; +import { InputTextModule } from 'primeng/inputtext'; +import { TooltipModule } from 'primeng/tooltip'; +import { MarkdownModule } from 'ngx-markdown'; +import { ButtonModule } from 'primeng/button'; + +@NgModule({ + imports: [ + ButtonModule, + CheckboxModule, + CommonModule, + DotIconModule, + DropdownModule, + InputTextareaModule, + InputTextModule, + ReactiveFormsModule, + TooltipModule, + MarkdownModule.forChild() + ], + declarations: [DotAppsConfigurationDetailFormComponent], + exports: [DotAppsConfigurationDetailFormComponent], + providers: [] +}) +export class DotAppsConfigurationDetailFormModule {} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration-detail/dot-apps-configuration-detail-resolver.service.spec.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration-detail/dot-apps-configuration-detail-resolver.service.spec.ts new file mode 100644 index 000000000000..ba663ae00019 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration-detail/dot-apps-configuration-detail-resolver.service.spec.ts @@ -0,0 +1,78 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ + +import { of } from 'rxjs'; +import { waitForAsync, TestBed } from '@angular/core/testing'; +import { ActivatedRouteSnapshot } from '@angular/router'; +import { DotAppsService } from '@services/dot-apps/dot-apps.service'; +import { DotAppsConfigurationDetailResolver } from './dot-apps-configuration-detail-resolver.service'; +class AppsServicesMock { + getConfiguration(_appKey: string, _id: string) { + return of({}); + } +} + +const activatedRouteSnapshotMock: any = jasmine.createSpyObj( + 'ActivatedRouteSnapshot', + ['toString'] +); +activatedRouteSnapshotMock.paramMap = {}; + +describe('DotAppsConfigurationDetailResolver', () => { + let dotAppsServices: DotAppsService; + let dotAppsConfigurationDetailResolver: DotAppsConfigurationDetailResolver; + + beforeEach( + waitForAsync(() => { + const testbed = TestBed.configureTestingModule({ + providers: [ + DotAppsConfigurationDetailResolver, + { provide: DotAppsService, useClass: AppsServicesMock }, + { + provide: ActivatedRouteSnapshot, + useValue: activatedRouteSnapshotMock + } + ] + }); + dotAppsServices = testbed.get(DotAppsService); + dotAppsConfigurationDetailResolver = testbed.get(DotAppsConfigurationDetailResolver); + }) + ); + + it('should get and return app with configurations', () => { + const response = { + integrationsCount: 2, + appKey: 'google-calendar', + name: 'Google Calendar', + description: "It's a tool to keep track of your life's events", + iconUrl: '/dA/d948d85c-3bc8-4d85-b0aa-0e989b9ae235/photo/surfer-profile.jpg', + hosts: [ + { + configured: true, + hostId: '123', + hostName: 'demo.dotcms.com' + } + ] + }; + + const queryParams = { + appKey: 'sampleDescriptor1', + id: '48190c8c-42c4-46af-8d1a-0cd5db894797' + }; + + activatedRouteSnapshotMock.paramMap.get = (param: string) => { + return param === 'appKey' ? queryParams.appKey : queryParams.id; + }; + spyOn(dotAppsServices, 'getConfiguration').and.returnValue(of(response)); + + dotAppsConfigurationDetailResolver + .resolve(activatedRouteSnapshotMock) + .subscribe((fakeContentType: any) => { + expect(fakeContentType).toEqual(response); + }); + + expect(dotAppsServices.getConfiguration).toHaveBeenCalledWith( + queryParams.appKey, + queryParams.id + ); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration-detail/dot-apps-configuration-detail-resolver.service.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration-detail/dot-apps-configuration-detail-resolver.service.ts new file mode 100644 index 000000000000..c6141f2afd45 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration-detail/dot-apps-configuration-detail-resolver.service.ts @@ -0,0 +1,24 @@ +import { Observable } from 'rxjs'; +import { Injectable } from '@angular/core'; +import { Resolve, ActivatedRouteSnapshot } from '@angular/router'; +import { take } from 'rxjs/operators'; +import { DotAppsService } from '@services/dot-apps/dot-apps.service'; +import { DotApps } from '@models/dot-apps/dot-apps.model'; + +/** + * Returns app configuration detail from the api + * + * @export + * @class DotAppsConfigurationDetailResolver + * @implements {Resolve} + */ +@Injectable() +export class DotAppsConfigurationDetailResolver implements Resolve { + constructor(private dotAppsService: DotAppsService) {} + + resolve(route: ActivatedRouteSnapshot): Observable { + const appKey = route.paramMap.get('appKey'); + const id = route.paramMap.get('id'); + return this.dotAppsService.getConfiguration(appKey, id).pipe(take(1)); + } +} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration-detail/dot-apps-configuration-detail.component.html b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration-detail/dot-apps-configuration-detail.component.html new file mode 100644 index 000000000000..ee498353c667 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration-detail/dot-apps-configuration-detail.component.html @@ -0,0 +1,46 @@ +
+
+ +
+ {{ apps.sites[0].name }} +
+ + +
+
+
+
+
+ +
+
{{ 'apps.custom.properties' | dm }}
+ +
+
+
+
diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration-detail/dot-apps-configuration-detail.component.scss b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration-detail/dot-apps-configuration-detail.component.scss new file mode 100644 index 000000000000..29737eb881d7 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration-detail/dot-apps-configuration-detail.component.scss @@ -0,0 +1,52 @@ +@use "variables" as *; + +:host { + background: $gray-bg; + box-shadow: $md-shadow-4; + display: flex; + height: 100%; + padding: $spacing-4; +} + +.dot-apps-configuration-detail__header { + background-color: $white; + position: sticky; + top: 0; + z-index: 1; +} + +.dot-apps-configuration-detail-actions button:last-child { + margin-left: $spacing-1; +} + +.dot-apps-configuration-detail__body { + flex-grow: 1; +} + +.dot-apps-configuration-detail__host-name { + border-bottom: 1px solid $gray-lighter; + color: $black; + display: flex; + justify-content: space-between; + font-size: $font-size-large; + font-weight: $font-weight-semi-bold; + padding: $spacing-3; + + span { + align-items: center; + display: inline-flex; + } +} + +.dot-apps-configuration-detail__form-content { + margin: $spacing-4; +} + +.dot-apps-configuration-detail__container { + background-color: $white; + box-shadow: $md-shadow-4; + display: flex; + flex-direction: column; + overflow-y: auto; + width: 100%; +} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration-detail/dot-apps-configuration-detail.component.spec.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration-detail/dot-apps-configuration-detail.component.spec.ts new file mode 100644 index 000000000000..95015d13787b --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration-detail/dot-apps-configuration-detail.component.spec.ts @@ -0,0 +1,395 @@ +import { of, Observable } from 'rxjs'; +import * as _ from 'lodash'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; +import { RouterTestingModule } from '@angular/router/testing'; +import { MockDotMessageService } from '@tests/dot-message-service.mock'; +import { DotMessageService } from '@services/dot-message/dot-messages.service'; +import { ActivatedRoute } from '@angular/router'; +import { DotCopyButtonModule } from '@components/dot-copy-button/dot-copy-button.module'; +import { DotAppsService } from '@services/dot-apps/dot-apps.service'; +import { Injectable, Component, Input, Output, EventEmitter } from '@angular/core'; +import { DotRouterService } from '@services/dot-router/dot-router.service'; +import { MockDotRouterService } from '@tests/dot-router-service.mock'; +import { CommonModule } from '@angular/common'; +import { DotAppsConfigurationDetailResolver } from './dot-apps-configuration-detail-resolver.service'; +import { ButtonModule } from 'primeng/button'; +import { DotAppsConfigurationDetailComponent } from './dot-apps-configuration-detail.component'; +import { By } from '@angular/platform-browser'; +import { DotAppsSaveData, DotAppsSecrets } from '@shared/models/dot-apps/dot-apps.model'; +import { DotKeyValue } from '@shared/models/dot-key-value-ng/dot-key-value-ng.model'; +import { DotAppsConfigurationHeaderModule } from '../dot-apps-configuration-header/dot-apps-configuration-header.module'; +import { MarkdownService } from 'ngx-markdown'; +import { DotPipesModule } from '@pipes/dot-pipes.module'; + +const messages = { + 'apps.key': 'Key', + Cancel: 'CANCEL', + Save: 'SAVE', + 'apps.custom.properties': 'Custom Properties', + 'apps.form.dialog.success.header': 'Header', + 'apps.form.dialog.success.message': 'Message', + ok: 'OK' +}; + +const sites = [ + { + configured: false, + id: '456', + name: 'host.example.com', + secrets: [ + { + dynamic: false, + name: 'name', + hidden: false, + hint: 'Hint for Name', + label: 'Name:', + required: true, + type: 'STRING', + value: 'John' + }, + { + dynamic: false, + name: 'password', + hidden: true, + hint: 'Hint for Password', + label: 'Password:', + required: true, + type: 'STRING', + value: '****' + }, + { + dynamic: false, + name: 'enabled', + hidden: false, + hint: 'Hint for checkbox', + label: 'Enabled:', + required: false, + type: 'BOOL', + value: 'true' + } + ] + } +]; + +const appData = { + allowExtraParams: false, + configurationsCount: 1, + key: 'google-calendar', + name: 'Google Calendar', + description: `It is a tool to keep track of your life's events`, + iconUrl: '/dA/d948d85c-3bc8-4d85-b0aa-0e989b9ae235/photo/surfer-profile.jpg', + sites +}; + +const routeDatamock = { + data: appData +}; +class ActivatedRouteMock { + get data() { + return {}; + } +} + +@Injectable() +class MockDotAppsService { + saveSiteConfiguration( + _appKey: string, + _id: string, + _params: DotAppsSaveData + ): Observable { + return of(''); + } +} + +@Component({ + selector: 'dot-key-value-ng', + template: '' +}) +class MockDotKeyValueComponent { + @Input() autoFocus: boolean; + @Input() showHiddenField: string; + @Input() variables: DotKeyValue[]; + @Output() delete = new EventEmitter(); + @Output() save = new EventEmitter(); +} + +@Component({ + selector: 'dot-apps-configuration-detail-form', + template: '' +}) +class MockDotAppsConfigurationDetailFormComponent { + @Input() appConfigured: boolean; + @Input() formFields: DotAppsSecrets[]; + @Output() data = new EventEmitter<{ [key: string]: string }>(); + @Output() valid = new EventEmitter(); +} + +describe('DotAppsConfigurationDetailComponent', () => { + let component: DotAppsConfigurationDetailComponent; + let fixture: ComponentFixture; + let appsServices: DotAppsService; + let activatedRoute: ActivatedRoute; + let routerService: DotRouterService; + + const messageServiceMock = new MockDotMessageService(messages); + + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + imports: [ + RouterTestingModule.withRoutes([ + { + component: DotAppsConfigurationDetailComponent, + path: '' + } + ]), + ButtonModule, + CommonModule, + DotCopyButtonModule, + DotAppsConfigurationHeaderModule, + DotPipesModule + ], + declarations: [ + DotAppsConfigurationDetailComponent, + MockDotKeyValueComponent, + MockDotAppsConfigurationDetailFormComponent + ], + providers: [ + { provide: DotMessageService, useValue: messageServiceMock }, + { + provide: ActivatedRoute, + useClass: ActivatedRouteMock + }, + { + provide: DotAppsService, + useClass: MockDotAppsService + }, + { + provide: DotRouterService, + useClass: MockDotRouterService + }, + { + provide: MarkdownService, + useValue: { + compile(text) { + return text; + }, + + highlight() { + // + } + } + }, + DotAppsConfigurationDetailResolver + ] + }); + + fixture = TestBed.createComponent(DotAppsConfigurationDetailComponent); + component = fixture.debugElement.componentInstance; + appsServices = TestBed.inject(DotAppsService); + routerService = TestBed.inject(DotRouterService); + activatedRoute = TestBed.inject(ActivatedRoute); + spyOn(appsServices, 'saveSiteConfiguration').and.callThrough(); + }) + ); + + describe('Without dynamic params', () => { + beforeEach(() => { + spyOnProperty(activatedRoute, 'data').and.returnValue(of(routeDatamock)); + fixture.detectChanges(); + }); + + it('should set App from resolver', () => { + expect(component.apps).toBe(appData); + }); + + it('should set labels and buttons with right values', () => { + expect( + fixture.debugElement.query(By.css('[data-testid="cancelBtn"]')).nativeElement + .innerText + ).toContain(messageServiceMock.get('Cancel')); + expect( + fixture.debugElement.query(By.css('[data-testid="saveBtn"]')).nativeElement + .innerText + ).toContain(messageServiceMock.get('Save')); + expect( + fixture.debugElement.query(By.css('.dot-apps-configuration-detail__host-name')) + .nativeElement.textContent + ).toContain(component.apps.sites[0].name); + expect(fixture.debugElement.query(By.css('dot-key-value-ng'))).toBeFalsy(); + }); + + it('should set Save button disabled to false with valid form', () => { + const formComponent = fixture.debugElement.query( + By.css('dot-apps-configuration-detail-form') + ).componentInstance; + formComponent.valid.emit(true); + fixture.detectChanges(); + expect( + fixture.debugElement.query(By.css('[data-testid="saveBtn"]')).nativeElement.disabled + ).toBe(false); + }); + + it('should set form component with fields & app configured data', () => { + const formComponent = fixture.debugElement.query( + By.css('dot-apps-configuration-detail-form') + ).componentInstance; + expect(formComponent.formFields).toEqual(sites[0].secrets); + expect(formComponent.appConfigured).toEqual(sites[0].configured); + }); + + it('should update formData and formValid fields when dot-apps-configuration-detail-form changed', () => { + const emittedData = { + name: 'Test', + password: 'Changed', + enabled: 'true' + }; + const formComponent = fixture.debugElement.query( + By.css('dot-apps-configuration-detail-form') + ).componentInstance; + formComponent.data.emit(emittedData); + formComponent.valid.emit(false); + expect(component.formData).toBe(emittedData); + expect(component.formValid).toBe(false); + }); + + it('should redirect to Apps page when Cancel button clicked', () => { + const cancelBtn = fixture.debugElement.query(By.css('[data-testid="cancelBtn"]')); + cancelBtn.triggerEventHandler('click', {}); + expect(routerService.goToAppsConfiguration).toHaveBeenCalledWith(component.apps.key); + }); + + it('should have dot-copy-link with appKey value', () => { + const copyBtn = fixture.debugElement.query(By.css('dot-copy-link')).componentInstance; + expect(copyBtn.copy).toBe(component.apps.key); + expect(copyBtn.label).toBe(component.apps.key); + }); + + it('should save configuration when Save button clicked', async () => { + const transformedData: DotAppsSaveData = { + name: { + hidden: false, + value: 'John' + }, + password: { + hidden: true, + value: '****' + }, + enabled: { + hidden: false, + value: 'true' + } + }; + const emittedData = { + name: 'John', + password: '****', + enabled: 'true' + }; + const formComponent = fixture.debugElement.query( + By.css('dot-apps-configuration-detail-form') + ).componentInstance; + formComponent.data.emit(emittedData); + + fixture.detectChanges(); + + const saveBtn = fixture.debugElement.query(By.css('[data-testid="saveBtn"]')); + saveBtn.triggerEventHandler('click', {}); + + expect<(appKey: string, id: string, params: DotAppsSaveData) => Observable>( + appsServices.saveSiteConfiguration + ).toHaveBeenCalledWith(component.apps.key, component.apps.sites[0].id, transformedData); + }); + }); + + describe('With dynamic variables', () => { + beforeEach(() => { + const sitesDynamic = _.cloneDeep(sites); + sitesDynamic[0].secrets = [ + ...sites[0].secrets, + { + dynamic: true, + name: 'custom', + hidden: false, + hint: 'dynamic variable', + label: '', + required: false, + type: 'STRING', + value: 'test' + } + ]; + const mockRoute = { data: {} }; + mockRoute.data = { + ...appData, + allowExtraParams: true, + sites: sitesDynamic + }; + spyOnProperty(activatedRoute, 'data').and.returnValue(of(mockRoute)); + + fixture.detectChanges(); + }); + + it('should show DotKeyValue component with right values', () => { + const keyValue = fixture.debugElement.query(By.css('dot-key-value-ng')); + expect(keyValue).toBeTruthy(); + expect(keyValue.componentInstance.autoFocus).toBe(false); + expect(keyValue.componentInstance.showHiddenField).toBe(true); + expect(keyValue.componentInstance.variables).toEqual([ + { key: 'custom', hidden: false, value: 'test' } + ]); + }); + + it('should update local collection with saved value', () => { + const variableEmitted = { key: 'custom', hidden: false, value: 'changed' }; + const keyValue = fixture.debugElement.query(By.css('dot-key-value-ng')); + keyValue.componentInstance.save.emit(variableEmitted); + expect(component.dynamicVariables[0]).toEqual(variableEmitted); + expect(component.dynamicVariables.length).toEqual(1); + }); + + it('should delete from local collection', () => { + const variableEmitted = { key: 'custom', hidden: false, value: 'test' }; + const keyValue = fixture.debugElement.query(By.css('dot-key-value-ng')); + keyValue.componentInstance.delete.emit(variableEmitted); + expect(component.dynamicVariables.length).toEqual(0); + }); + + it('should save configuration when Save button clicked', () => { + const transformedData: DotAppsSaveData = { + name: { + hidden: false, + value: 'John' + }, + password: { + hidden: true, + value: '****' + }, + enabled: { + hidden: false, + value: 'true' + }, + custom: { + hidden: false, + value: 'test' + } + }; + const emittedData = { + name: 'John', + password: '****', + enabled: 'true' + }; + const formComponent = fixture.debugElement.query( + By.css('dot-apps-configuration-detail-form') + ).componentInstance; + formComponent.data.emit(emittedData); + + const saveBtn = fixture.debugElement.query(By.css('[data-testid="saveBtn"]')); + + saveBtn.triggerEventHandler('click', {}); + expect(appsServices.saveSiteConfiguration).toHaveBeenCalledWith( + component.apps.key, + component.apps.sites[0].id, + transformedData + ); + }); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration-detail/dot-apps-configuration-detail.component.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration-detail/dot-apps-configuration-detail.component.ts new file mode 100644 index 000000000000..6fa857df4f5b --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration-detail/dot-apps-configuration-detail.component.ts @@ -0,0 +1,128 @@ +import { Component, OnInit } from '@angular/core'; +import { DotApps, DotAppsSaveData, DotAppsSecrets } from '@shared/models/dot-apps/dot-apps.model'; +import { ActivatedRoute } from '@angular/router'; +import { pluck, take } from 'rxjs/operators'; +import * as _ from 'lodash'; +import { DotRouterService } from '@services/dot-router/dot-router.service'; +import { DotAppsService } from '@services/dot-apps/dot-apps.service'; +import { DotKeyValue } from '@shared/models/dot-key-value-ng/dot-key-value-ng.model'; +import { DotKeyValueUtil } from '@components/dot-key-value-ng/util/dot-key-value-util'; + +@Component({ + selector: 'dot-apps-configuration-detail', + templateUrl: './dot-apps-configuration-detail.component.html', + styleUrls: ['./dot-apps-configuration-detail.component.scss'] +}) +export class DotAppsConfigurationDetailComponent implements OnInit { + apps: DotApps; + + dynamicVariables: DotKeyValue[]; + formData: { [key: string]: string }; + formFields: DotAppsSecrets[]; + formValid = false; + + constructor( + private route: ActivatedRoute, + private dotRouterService: DotRouterService, + private dotAppsService: DotAppsService + ) {} + + ngOnInit() { + this.route.data.pipe(pluck('data'), take(1)).subscribe((app: DotApps) => { + this.apps = app; + this.formFields = this.getSecrets(app.sites[0].secrets); + this.dynamicVariables = this.transformSecretsToKeyValue( + this.getSecrets(app.sites[0].secrets, true) + ); + }); + } + + /** + * Saves the secrets configuration data of the app + * + * @memberof DotAppsConfigurationDetailComponent + */ + onSubmit(): void { + this.dotAppsService + .saveSiteConfiguration( + this.apps.key, + this.apps.sites[0].id, + this.getTransformedFormData() + ) + .pipe(take(1)) + .subscribe(() => { + this.goToApps(this.apps.key); + }); + } + + /** + * Redirects to app configuration listing page + * + * @param string key + * @memberof DotAppsConfigurationDetailComponent + */ + goToApps(key: string): void { + this.dotRouterService.goToAppsConfiguration(key); + } + + /** + * Handle Save event doing if new a prepend, otherwise a replace + * to the local collection + * @param {DotKeyValue} variable + * @memberof DotAppsConfigurationDetailComponent + */ + saveDynamicVariable(variable: DotKeyValue): void { + const indexChanged = DotKeyValueUtil.getVariableIndexChanged( + variable, + this.dynamicVariables + ); + if (indexChanged !== null) { + this.dynamicVariables[indexChanged] = _.cloneDeep(variable); + } else { + this.dynamicVariables = [variable, ...this.dynamicVariables]; + } + } + + /** + * Handle Delete event doing a removing the variable from the local collection + * @param {DotKeyValue} variable + * @memberof DotAppsConfigurationDetailComponent + */ + deleteDynamicVariable(variable: DotKeyValue): void { + this.dynamicVariables = this.dynamicVariables.filter( + (item: DotKeyValue) => item.key !== variable.key + ); + } + + private getTransformedFormData(): DotAppsSaveData { + const params = {}; + for (const key of Object.keys(this.formData)) { + params[key] = { + hidden: this.formFields.filter((item) => item.name === key)[0].hidden, + value: this.formData[key].toString() + }; + } + + this.dynamicVariables.forEach((item: DotKeyValue) => { + params[item.key] = { + hidden: item.hidden || false, + value: item.value.toString() + }; + }); + + return params; + } + + private getSecrets( + secrets: DotAppsSecrets[], + includeDinamicFields: boolean = false + ): DotAppsSecrets[] { + return secrets.filter((secret: DotAppsSecrets) => secret.dynamic === includeDinamicFields); + } + + private transformSecretsToKeyValue(secrets: DotAppsSecrets[]): DotKeyValue[] { + return secrets.map(({ name, hidden, value }: DotAppsSecrets) => { + return { key: name, hidden: hidden, value: value }; + }); + } +} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration-detail/dot-apps-configuration-detail.module.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration-detail/dot-apps-configuration-detail.module.ts new file mode 100644 index 000000000000..98d7b96b2a82 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration-detail/dot-apps-configuration-detail.module.ts @@ -0,0 +1,28 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { ButtonModule } from 'primeng/button'; + +import { DotAppsConfigurationDetailComponent } from './dot-apps-configuration-detail.component'; +import { DotAppsService } from '@services/dot-apps/dot-apps.service'; +import { DotAppsConfigurationDetailResolver } from './dot-apps-configuration-detail-resolver.service'; +import { DotCopyButtonModule } from '@components/dot-copy-button/dot-copy-button.module'; +import { DotAppsConfigurationDetailFormModule } from './dot-apps-configuration-detail-form/dot-apps-configuration-detail-form.module'; +import { DotKeyValueModule } from '@components/dot-key-value-ng/dot-key-value-ng.module'; +import { DotAppsConfigurationHeaderModule } from '../dot-apps-configuration-header/dot-apps-configuration-header.module'; +import { DotPipesModule } from '@pipes/dot-pipes.module'; + +@NgModule({ + imports: [ + ButtonModule, + CommonModule, + DotKeyValueModule, + DotCopyButtonModule, + DotAppsConfigurationHeaderModule, + DotAppsConfigurationDetailFormModule, + DotPipesModule + ], + declarations: [DotAppsConfigurationDetailComponent], + exports: [DotAppsConfigurationDetailComponent], + providers: [DotAppsService, DotAppsConfigurationDetailResolver] +}) +export class DotAppsConfigurationDetailModule {} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration-header/dot-apps-configuration-header.component.html b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration-header/dot-apps-configuration-header.component.html new file mode 100644 index 000000000000..147f65cc51f3 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration-header/dot-apps-configuration-header.component.html @@ -0,0 +1,42 @@ + +
+
+

+ {{ app.name }} +

+
+ {{ 'apps.key' | dm }} + +
+
+ {{ + app.configurationsCount + ? app.configurationsCount + ' ' + ('apps.configurations' | dm) + : ('apps.no.configurations' | dm) + }} + + +
diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration-header/dot-apps-configuration-header.component.scss b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration-header/dot-apps-configuration-header.component.scss new file mode 100644 index 000000000000..7d5bc509c255 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration-header/dot-apps-configuration-header.component.scss @@ -0,0 +1,91 @@ +@use "variables" as *; + +:host { + background-color: $white; + border-bottom: 1px solid $gray-lighter; + display: flex; + padding: $spacing-4 $spacing-4 $spacing-4 0; + position: sticky; + top: 0; + z-index: 1; + + dot-avatar { + align-self: baseline; + border-radius: 50%; + box-shadow: $md-shadow-2; + cursor: pointer; + margin: 0 $spacing-4 0 $spacing-4; + } +} + +.dot-apps-configuration__data { + width: 100%; + + header { + display: flex; + align-items: center; + } +} + +.dot-apps-configuration__service-name { + color: $black; + cursor: pointer; + display: inline-block; + font-size: $font-size-xx-large; + font-weight: bold; + margin: 0; +} + +.dot-apps-configuration__service-key { + color: $gray; + display: inline-block; + font-size: $font-size-large; + margin-left: $spacing-3; + display: flex; + align-items: center; + + dot-copy-link { + margin-left: $spacing-1; + } +} + +.dot-apps-configuration__configurations { + color: $gray; + display: block; + margin-bottom: $spacing-3; + margin-top: $spacing-1; +} + +::ng-deep { + .dot-apps-configuration__description { + max-width: 64.25rem; + position: relative; + } + + .dot-apps-configuration__description p { + margin: 0; + overflow: hidden; + line-height: 1.5; + } + + .dot-apps-configuration__description__link_show-more { + background-color: $white; + cursor: pointer; + font-size: $font-size-large; + padding-left: $spacing-1; + position: absolute; + bottom: 0; + right: 0; + z-index: 1; + } + + .dot-apps-configuration__description__show-more p { + height: auto; + overflow: visible; + + .dot-apps-configuration__description__link_show-more { + position: relative; + top: 0; + } + } +} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration-header/dot-apps-configuration-header.component.spec.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration-header/dot-apps-configuration-header.component.spec.ts new file mode 100644 index 000000000000..f1e9d56640f4 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration-header/dot-apps-configuration-header.component.spec.ts @@ -0,0 +1,139 @@ +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { MockDotMessageService } from '@tests/dot-message-service.mock'; +import { DotMessageService } from '@services/dot-message/dot-messages.service'; +import { CommonModule } from '@angular/common'; +import { By } from '@angular/platform-browser'; +import { DotAppsConfigurationHeaderComponent } from './dot-apps-configuration-header.component'; +import { DotAvatarModule } from '@components/_common/dot-avatar/dot-avatar.module'; +import { DotCopyLinkModule } from '@components/dot-copy-link/dot-copy-link.module'; +import { MockDotRouterService } from '@tests/dot-router-service.mock'; +import { DotRouterService } from '@services/dot-router/dot-router.service'; +import { DebugElement } from '@angular/core'; +import { DotPipesModule } from '@pipes/dot-pipes.module'; +import { MarkdownModule, MarkdownService } from 'ngx-markdown'; + +const messages = { + 'apps.configurations': 'Configurations', + 'apps.no.configurations': 'No Configurations', + 'apps.key': 'Key', + 'apps.confirmation.description.show.less': 'Show Less', + 'apps.confirmation.description.show.more': 'Show More' +}; + +const appData = { + allowExtraParams: true, + configurationsCount: 2, + key: 'google-calendar', + name: 'Google Calendar', + description: `It is a tool to keep track of your life's events, also this descriptions is long and long and long and long and long and long and long and long and long and long and long and long and long and long and long and long and long and long and long and long and long and long and long and long and long and long and long and long and long and long and long`, + iconUrl: '/dA/d948d85c-3bc8-4d85-b0aa-0e989b9ae235/photo/surfer-profile.jpg', + sites: [] +}; + +describe('DotAppsConfigurationHeaderComponent', () => { + let component: DotAppsConfigurationHeaderComponent; + let fixture: ComponentFixture; + let routerService: DotRouterService; + let de: DebugElement; + + const messageServiceMock = new MockDotMessageService(messages); + + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + imports: [ + CommonModule, + DotAvatarModule, + DotCopyLinkModule, + MarkdownModule, + DotPipesModule + ], + declarations: [DotAppsConfigurationHeaderComponent], + providers: [ + { provide: DotMessageService, useValue: messageServiceMock }, + { + provide: DotRouterService, + useClass: MockDotRouterService + }, + { + provide: MarkdownService, + useValue: { + compile(text) { + return text; + }, + + highlight() { + // + } + } + } + ] + }).compileComponents(); + }) + ); + + beforeEach(() => { + fixture = TestBed.createComponent(DotAppsConfigurationHeaderComponent); + de = fixture.debugElement; + component = fixture.debugElement.componentInstance; + routerService = fixture.debugElement.injector.get(DotRouterService); + component.app = appData; + fixture.detectChanges(); + }); + + xit('should set messages/values in DOM correctly', async () => { + await fixture.whenStable(); + expect( + de.query(By.css('.dot-apps-configuration__service-name')).nativeElement.outerText + ).toBe(component.app.name); + expect( + de.query(By.css('.dot-apps-configuration__service-key')).nativeElement.outerText + ).toContain(messages['apps.key']); + expect( + de.query(By.css('.dot-apps-configuration__configurations')).nativeElement.outerText + ).toContain(`${appData.configurationsCount} ${messages['apps.configurations']}`); + const description = component.app.description + .replace(/\n/gi, '') + .replace(/\r/gi, '') + .replace(/ {3}/gi, ''); + expect( + de.query(By.css('.dot-apps-configuration__description')).nativeElement.outerText + ).toBe(description); + expect( + de.query(By.css('.dot-apps-configuration__description__link_show-more')).nativeElement + .outerText + ).toBe(messageServiceMock.get('apps.confirmation.description.show.more')); + }); + + it('should DotCopy & DotAvatar with right properties', () => { + const dotAvatar = de.query(By.css('dot-avatar')).componentInstance; + const dotCopy = de.query(By.css('dot-copy-link')).componentInstance; + expect(dotAvatar.label).toBe(component.app.name); + expect(dotAvatar.size).toBe(112); + expect(dotAvatar.url).toBe(component.app.iconUrl); + expect(dotCopy.label).toBe(component.app.key); + expect(dotCopy.copy).toBe(component.app.key); + }); + + it('should redirect to detail configuration list page when app Card clicked', () => { + const dotAvatar = de.query(By.css('dot-avatar')); + dotAvatar.triggerEventHandler('click', { key: appData.key }); + expect(routerService.goToAppsConfiguration).toHaveBeenCalledWith(component.app.key); + const title = de.query(By.css('.dot-apps-configuration__service-name')); + title.triggerEventHandler('click', { key: appData.key }); + expect(routerService.goToAppsConfiguration).toHaveBeenCalledWith(component.app.key); + }); + + it('should show right message and no "Show More" link when no configurations and description short', async () => { + component.app.description = 'test'; + component.app.configurationsCount = 0; + fixture.detectChanges(); + await fixture.whenStable(); + expect( + de.query(By.css('.dot-apps-configuration__configurations')).nativeElement.outerText + ).toContain(messages['apps.no.configurations']); + expect( + de.query(By.css('.dot-apps-configuration__description__link_show-more')) + ).toBeFalsy(); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration-header/dot-apps-configuration-header.component.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration-header/dot-apps-configuration-header.component.ts new file mode 100644 index 000000000000..3b3b7d958f38 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration-header/dot-apps-configuration-header.component.ts @@ -0,0 +1,27 @@ +import { Component, Input } from '@angular/core'; +import { DotApps } from '@shared/models/dot-apps/dot-apps.model'; +import { DotRouterService } from '@services/dot-router/dot-router.service'; + +@Component({ + selector: 'dot-apps-configuration-header', + templateUrl: './dot-apps-configuration-header.component.html', + styleUrls: ['./dot-apps-configuration-header.component.scss'] +}) +export class DotAppsConfigurationHeaderComponent { + showMore: boolean; + + @Input() app: DotApps; + + constructor(private dotRouterService: DotRouterService) {} + + /** + * Redirects to app configuration listing page + * + * @param string key + * @memberof DotAppsConfigurationDetailComponent + */ + goToApps(key: string): void { + this.dotRouterService.gotoPortlet(`/apps/${key}`); + this.dotRouterService.goToAppsConfiguration(key); + } +} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration-header/dot-apps-configuration-header.module.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration-header/dot-apps-configuration-header.module.ts new file mode 100644 index 000000000000..d95e9383b183 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration-header/dot-apps-configuration-header.module.ts @@ -0,0 +1,21 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; + +import { DotAppsConfigurationHeaderComponent } from './dot-apps-configuration-header.component'; +import { DotCopyLinkModule } from '@components/dot-copy-link/dot-copy-link.module'; +import { DotAvatarModule } from '@components/_common/dot-avatar/dot-avatar.module'; +import { DotPipesModule } from '@pipes/dot-pipes.module'; +import { MarkdownModule } from 'ngx-markdown'; + +@NgModule({ + imports: [ + CommonModule, + DotAvatarModule, + DotCopyLinkModule, + DotPipesModule, + MarkdownModule.forChild() + ], + declarations: [DotAppsConfigurationHeaderComponent], + exports: [DotAppsConfigurationHeaderComponent] +}) +export class DotAppsConfigurationHeaderModule {} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration/dot-apps-configuration-list/dot-apps-configuration-item/dot-apps-configuration-item.component.html b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration/dot-apps-configuration-list/dot-apps-configuration-item/dot-apps-configuration-item.component.html new file mode 100644 index 000000000000..3aff2e18fc10 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration/dot-apps-configuration-list/dot-apps-configuration-item/dot-apps-configuration-item.component.html @@ -0,0 +1,43 @@ +
+ {{ site.name }} +
+ +
+ {{ 'apps.key' | dm }} + +
+ + +
+ + + + +
+
+ + + + diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration/dot-apps-configuration-list/dot-apps-configuration-item/dot-apps-configuration-item.component.scss b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration/dot-apps-configuration-list/dot-apps-configuration-item/dot-apps-configuration-item.component.scss new file mode 100644 index 000000000000..c82129b4cae9 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration/dot-apps-configuration-list/dot-apps-configuration-item/dot-apps-configuration-item.component.scss @@ -0,0 +1,45 @@ +@use "variables" as *; + +:host { + border: 1px solid $gray-lighter; + cursor: pointer; + display: flex; + margin-right: $spacing-3; + margin-top: $spacing-3; + padding: $spacing-1 0; + transition: box-shadow $basic-speed ease-in; + width: 100%; + + &:hover { + box-shadow: $md-shadow-5; + } + + dot-icon { + align-self: center; + margin-right: $spacing-3; + text-align: end; + width: 100%; + color: $brand-primary; + } + + dot-icon { + } +} + +.dot-apps-configuration-list__host-configured { + display: flex; +} + +.dot-apps-configuration-list__name { + align-self: center; + margin-left: $spacing-3; + white-space: nowrap; +} + +.dot-apps-configuration-list__host-key { + color: $gray; + display: flex; + flex-grow: 1; + align-items: center; + margin-left: $spacing-2; +} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration/dot-apps-configuration-list/dot-apps-configuration-item/dot-apps-configuration-item.component.spec.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration/dot-apps-configuration-list/dot-apps-configuration-item/dot-apps-configuration-item.component.spec.ts new file mode 100644 index 000000000000..5408b2ea2c79 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration/dot-apps-configuration-list/dot-apps-configuration-item/dot-apps-configuration-item.component.spec.ts @@ -0,0 +1,217 @@ +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { MockDotMessageService } from '@tests/dot-message-service.mock'; +import { DotMessageService } from '@services/dot-message/dot-messages.service'; +import { DotAlertConfirmService } from '@services/dot-alert-confirm/dot-alert-confirm.service'; +import { CommonModule } from '@angular/common'; +import { DotAppsConfigurationItemComponent } from './dot-apps-configuration-item.component'; +import { UiDotIconButtonModule } from '@components/_common/dot-icon-button/dot-icon-button.module'; +import { By } from '@angular/platform-browser'; +import { DotIconModule } from '@dotcms/ui'; +import { TooltipModule } from 'primeng/tooltip'; +import { HttpClientTestingModule } from '@angular/common/http/testing'; +import { ConfirmationService } from 'primeng/api'; +import { DotPipesModule } from '@pipes/dot-pipes.module'; +import { DotCopyLinkModule } from '@dotcms/app/view/components/dot-copy-link/dot-copy-link.module'; + +const messages = { + 'apps.key': 'Key', + 'apps.configurations': 'Configurations', + 'apps.no.configurations': 'No Configurations', + 'apps.confirmation.delete.all.button': 'Delete All', + 'apps.confirmation.title': 'Are you sure?', + 'apps.confirmation.description.show.more': 'Show More', + 'apps.confirmation.description.show.less': 'Show Less', + 'apps.confirmation.delete.all.message': 'Delete all?', + 'apps.confirmation.accept': 'Ok', + 'apps.search.placeholder': 'Search by name', + 'apps.invalid.secrets': 'Invalid Secrets' +}; + +const sites = [ + { + configured: true, + id: '123', + name: 'demo.dotcms.com', + secretsWithWarnings: 2 + }, + { + configured: false, + id: '456', + name: 'host.example.com' + } +]; + +describe('DotAppsConfigurationItemComponent', () => { + let component: DotAppsConfigurationItemComponent; + let fixture: ComponentFixture; + let dialogService: DotAlertConfirmService; + + const messageServiceMock = new MockDotMessageService(messages); + + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + imports: [ + CommonModule, + DotCopyLinkModule, + UiDotIconButtonModule, + DotIconModule, + TooltipModule, + HttpClientTestingModule, + DotPipesModule + ], + declarations: [DotAppsConfigurationItemComponent], + providers: [ + { provide: DotMessageService, useValue: messageServiceMock }, + DotAlertConfirmService, + ConfirmationService + ] + }); + + fixture = TestBed.createComponent(DotAppsConfigurationItemComponent); + component = fixture.debugElement.componentInstance; + dialogService = TestBed.inject(DotAlertConfirmService); + }) + ); + + describe('With configuration', () => { + beforeEach(() => { + component.site = sites[0]; + fixture.detectChanges(); + }); + + it('should set messages/values in DOM correctly', () => { + expect( + fixture.debugElement.query(By.css('.dot-apps-configuration-list__name')) + .nativeElement.innerText + ).toBe(sites[0].name); + + expect( + fixture.debugElement.query(By.css('.dot-apps-configuration-list__host-key')) + .nativeElement.textContent + ).toContain(`${messageServiceMock.get('apps.key')} ${sites[0].id}`); + }); + + it('should have 3 icon buttons for export, delete and edit', () => { + const buttons = fixture.debugElement.queryAll(By.css('dot-icon-button')); + expect(buttons.length).toBe(3); + expect(buttons[0].componentInstance.icon).toBe('vertical_align_bottom'); + expect(buttons[1].componentInstance.icon).toBe('delete_outline'); + expect(buttons[2].componentInstance.icon).toBe('edit'); + }); + + it('should DotCopy with right properties', () => { + const dotCopy = fixture.debugElement.query(By.css('dot-copy-link')).componentInstance; + expect(dotCopy.label).toBe(component.site.id); + expect(dotCopy.copy).toBe(component.site.id); + }); + + it('should have warning icon', () => { + const warningIcon = fixture.debugElement.query(By.css('[data-testId="warning"]')); + expect(warningIcon).toBeTruthy(); + expect(warningIcon.attributes['name']).toBe('warning'); + expect(warningIcon.attributes['size']).toBe('18'); + expect(warningIcon.attributes['ng-reflect-text']).toBe( + `${component.site.secretsWithWarnings} ${messageServiceMock.get( + 'apps.invalid.secrets' + )}` + ); + }); + + it('should emit export action with a site', () => { + const stopPropagationSpy = jasmine.createSpy('spy'); + const exportBtn = fixture.debugElement.queryAll(By.css('dot-icon-button'))[0]; + + spyOn(component.export, 'emit'); + + exportBtn.triggerEventHandler('click', { + stopPropagation: stopPropagationSpy, + site: sites[0] + }); + expect(stopPropagationSpy).toHaveBeenCalledTimes(1); + expect(component.export.emit).toHaveBeenCalledWith(sites[0]); + }); + + it('should emit delete action', () => { + const stopPropagationSpy = jasmine.createSpy('spy'); + const deleteBtn = fixture.debugElement.queryAll(By.css('dot-icon-button'))[1]; + + spyOn(dialogService, 'confirm').and.callFake((conf) => { + conf.accept(); + }); + + spyOn(component.delete, 'emit'); + + deleteBtn.triggerEventHandler('click', { + stopPropagation: stopPropagationSpy, + site: sites[0] + }); + expect(dialogService.confirm).toHaveBeenCalledTimes(1); + expect(stopPropagationSpy).toHaveBeenCalledTimes(1); + expect(component.delete.emit).toHaveBeenCalledWith(sites[0]); + }); + + it('should emit edit action with a site', () => { + const stopPropagationSpy = jasmine.createSpy('spy'); + const editBtn = fixture.debugElement.queryAll(By.css('dot-icon-button'))[2]; + + spyOn(component.edit, 'emit'); + + editBtn.triggerEventHandler('click', { + stopPropagation: stopPropagationSpy, + site: sites[0] + }); + expect(stopPropagationSpy).toHaveBeenCalledTimes(1); + expect(component.edit.emit).toHaveBeenCalledWith(sites[0]); + }); + + it('should emit edit action when host component clicked', () => { + spyOn(component.edit, 'emit'); + fixture.debugElement.triggerEventHandler('click', { + stopPropagation: () => { + // + } + }); + expect(component.edit.emit).toHaveBeenCalledWith(sites[0]); + }); + + it('should not emit edit action when host label clicked', () => { + spyOn(component.edit, 'emit'); + fixture.debugElement.query(By.css('dot-copy-link')).nativeElement.click(); + expect(component.edit.emit).toHaveBeenCalledTimes(0); + }); + }); + + describe('With No configuration', () => { + beforeEach(() => { + component.site = sites[1]; + fixture.detectChanges(); + }); + + it('should have 1 icon button for create', () => { + const buttons = fixture.debugElement.queryAll(By.css('dot-icon-button')); + expect(buttons.length).toBe(1); + expect(buttons[0].componentInstance.icon).toBe('add_circle'); + }); + + it('should not have warning icon', () => { + expect(fixture.debugElement.query(By.css('dot-icon')).attributes['name']).not.toBe( + 'warning' + ); + }); + + it('should emit edit action with No site', () => { + const stopPropagationSpy = jasmine.createSpy('spy'); + const createBtn = fixture.debugElement.queryAll(By.css('dot-icon-button'))[0]; + + spyOn(component.edit, 'emit'); + + createBtn.triggerEventHandler('click', { + stopPropagation: stopPropagationSpy, + site: sites[1] + }); + expect(stopPropagationSpy).toHaveBeenCalledTimes(1); + expect(component.edit.emit).toHaveBeenCalledWith(sites[1]); + }); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration/dot-apps-configuration-list/dot-apps-configuration-item/dot-apps-configuration-item.component.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration/dot-apps-configuration-list/dot-apps-configuration-item/dot-apps-configuration-item.component.ts new file mode 100644 index 000000000000..5cf73c29b38d --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration/dot-apps-configuration-list/dot-apps-configuration-item/dot-apps-configuration-item.component.ts @@ -0,0 +1,79 @@ +import { Component, Input, Output, EventEmitter, HostListener } from '@angular/core'; +import { DotAppsSites } from '@shared/models/dot-apps/dot-apps.model'; +import { DotAlertConfirmService } from '@services/dot-alert-confirm'; + +import { DotMessageService } from '@services/dot-message/dot-messages.service'; + +@Component({ + selector: 'dot-apps-configuration-item', + templateUrl: './dot-apps-configuration-item.component.html', + styleUrls: ['./dot-apps-configuration-item.component.scss'] +}) +export class DotAppsConfigurationItemComponent { + @Input() site: DotAppsSites; + + @Output() edit = new EventEmitter(); + @Output() export = new EventEmitter(); + @Output() delete = new EventEmitter(); + + constructor( + private dotMessageService: DotMessageService, + private dotAlertConfirmService: DotAlertConfirmService + ) {} + + @HostListener('click', ['$event']) + public onClick(event: MouseEvent): void { + event.stopPropagation(); + this.edit.emit(this.site); + } + + /** + * Emits action to edit configuration page + * + * @param MouseEvent $event + * @param DotAppsSites site + * @memberof DotAppsConfigurationItemComponent + */ + editConfigurationSite($event: MouseEvent, site?: DotAppsSites): void { + $event.stopPropagation(); + this.edit.emit(site); + } + + /** + * Emits action to export configuration + * + * @param MouseEvent $event + * @param DotAppsSites site + * @memberof DotAppsConfigurationItemComponent + */ + exportConfiguration($event: MouseEvent, site: DotAppsSites): void { + $event.stopPropagation(); + this.export.emit(site); + } + + /** + * Display confirmation dialog to delete a specific configuration + * + * @param MouseEvent $event + * @param DotAppsSites site + * @memberof DotAppsConfigurationItemComponent + */ + confirmDelete($event: MouseEvent, site: DotAppsSites): void { + $event.stopPropagation(); + this.dotAlertConfirmService.confirm({ + accept: () => { + this.delete.emit(site); + }, + reject: () => { + // + }, + header: this.dotMessageService.get('apps.confirmation.title'), + message: `${this.dotMessageService.get('apps.confirmation.delete.message')} ${ + site.name + } ?`, + footerLabel: { + accept: this.dotMessageService.get('apps.confirmation.accept') + } + }); + } +} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration/dot-apps-configuration-list/dot-apps-configuration-item/dot-apps-configuration-item.module.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration/dot-apps-configuration-list/dot-apps-configuration-item/dot-apps-configuration-item.module.ts new file mode 100644 index 000000000000..f6d5e2b90c36 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration/dot-apps-configuration-list/dot-apps-configuration-item/dot-apps-configuration-item.module.ts @@ -0,0 +1,23 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; + +import { DotAppsConfigurationItemComponent } from './dot-apps-configuration-item.component'; +import { UiDotIconButtonModule } from '@components/_common/dot-icon-button/dot-icon-button.module'; +import { DotIconModule } from '@dotcms/ui'; +import { TooltipModule } from 'primeng/tooltip'; +import { DotPipesModule } from '@pipes/dot-pipes.module'; +import { DotCopyLinkModule } from '@dotcms/app/view/components/dot-copy-link/dot-copy-link.module'; + +@NgModule({ + imports: [ + CommonModule, + UiDotIconButtonModule, + DotCopyLinkModule, + DotIconModule, + TooltipModule, + DotPipesModule + ], + declarations: [DotAppsConfigurationItemComponent], + exports: [DotAppsConfigurationItemComponent] +}) +export class DotAppsConfigurationItemModule {} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration/dot-apps-configuration-list/dot-apps-configuration-list.component.html b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration/dot-apps-configuration-list/dot-apps-configuration-list.component.html new file mode 100644 index 000000000000..f2bd831e87de --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration/dot-apps-configuration-list/dot-apps-configuration-list.component.html @@ -0,0 +1,20 @@ +
+ +
+ + diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration/dot-apps-configuration-list/dot-apps-configuration-list.component.scss b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration/dot-apps-configuration-list/dot-apps-configuration-list.component.scss new file mode 100644 index 000000000000..0659a212895f --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration/dot-apps-configuration-list/dot-apps-configuration-list.component.scss @@ -0,0 +1,21 @@ +@use "variables" as *; + +:host { + display: flex; + flex-direction: column; +} + +dot-apps-configuration-item { + margin: $spacing-3 0 $spacing-4; + overflow: auto; + + &.dot-apps-configuration-item__not-configured { + background-color: $gray-bg; + color: $gray; + + &:hover { + background-color: transparent; + color: $black; + } + } +} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration/dot-apps-configuration-list/dot-apps-configuration-list.component.spec.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration/dot-apps-configuration-list/dot-apps-configuration-list.component.spec.ts new file mode 100644 index 000000000000..7c30d56ee9c8 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration/dot-apps-configuration-list/dot-apps-configuration-list.component.spec.ts @@ -0,0 +1,139 @@ +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; +import { MockDotMessageService } from '@tests/dot-message-service.mock'; +import { DotMessageService } from '@services/dot-message/dot-messages.service'; +import { CommonModule } from '@angular/common'; +import { By } from '@angular/platform-browser'; +import { ButtonModule } from 'primeng/button'; +import { DotAppsConfigurationItemModule } from './dot-apps-configuration-item/dot-apps-configuration-item.module'; +import { DotAppsConfigurationListComponent } from './dot-apps-configuration-list.component'; +import { HttpClientTestingModule } from '@angular/common/http/testing'; +import { DotPipesModule } from '@pipes/dot-pipes.module'; +import { DotAlertConfirmService } from '@services/dot-alert-confirm'; +import { ConfirmationService } from 'primeng/api'; + +const messages = { + 'apps.configurations.show.more': 'SHOW MORE' +}; + +const sites = [ + { + configured: true, + id: '123', + name: 'demo.dotcms.com' + }, + { + configured: false, + id: '456', + name: 'host.example.com' + } +]; + +describe('DotAppsConfigurationListComponent', () => { + let component: DotAppsConfigurationListComponent; + let fixture: ComponentFixture; + + const messageServiceMock = new MockDotMessageService(messages); + + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + imports: [ + CommonModule, + ButtonModule, + DotAppsConfigurationItemModule, + HttpClientTestingModule, + DotPipesModule + ], + declarations: [DotAppsConfigurationListComponent], + providers: [ + { provide: DotMessageService, useValue: messageServiceMock }, + DotAlertConfirmService, + ConfirmationService + ] + }); + + fixture = TestBed.createComponent(DotAppsConfigurationListComponent); + component = fixture.debugElement.componentInstance; + component.itemsPerPage = 40; + component.siteConfigurations = sites; + }) + ); + + describe('With more data to load', () => { + beforeEach(() => { + component.hideLoadDataButton = false; + fixture.detectChanges(); + }); + + it('should set messages/values in DOM correctly', () => { + expect( + fixture.debugElement.queryAll(By.css('dot-apps-configuration-item'))[0] + .componentInstance.site + ).toBe(component.siteConfigurations[0]); + expect( + fixture.debugElement.query(By.css('.dot-apps-configuration-list__show-more')) + .nativeElement.outerText + ).toBe(messageServiceMock.get('apps.configurations.show.more')); + }); + + it('should emit action for edit --> Site Item', () => { + spyOn(component.edit, 'emit'); + const siteItem = fixture.debugElement.queryAll(By.css('dot-apps-configuration-item'))[0] + .componentInstance; + + siteItem.edit.emit(sites[0]); + expect(component.edit.emit).toHaveBeenCalledWith(sites[0]); + }); + + it('should emit action for export --> Site Item', () => { + spyOn(component.export, 'emit'); + const siteItem = fixture.debugElement.queryAll(By.css('dot-apps-configuration-item'))[0] + .componentInstance; + + siteItem.export.emit(sites[0]); + expect(component.export.emit).toHaveBeenCalledWith(sites[0]); + }); + + it('should emit action for delete --> Site Item', () => { + spyOn(component.delete, 'emit'); + const siteItem = fixture.debugElement.queryAll(By.css('dot-apps-configuration-item'))[0] + .componentInstance; + + siteItem.delete.emit(sites[0]); + expect(component.delete.emit).toHaveBeenCalledWith(sites[0]); + }); + + it('should Load More button be enabled', () => { + expect( + fixture.debugElement.query(By.css('.dot-apps-configuration-list__show-more')) + .nativeElement.disabled + ).toBe(false); + }); + + it('should Load More button emit action', () => { + spyOn(component.loadData, 'emit'); + const loadMore = fixture.debugElement.query( + By.css('.dot-apps-configuration-list__show-more') + ); + + loadMore.triggerEventHandler('click', {}); + expect(component.loadData.emit).toHaveBeenCalledWith({ + first: component.siteConfigurations.length, + rows: component.itemsPerPage + }); + }); + }); + + describe('With no more data to load', () => { + beforeEach(() => { + component.hideLoadDataButton = true; + fixture.detectChanges(); + }); + + it('should Load More button be enabled', () => { + expect( + fixture.debugElement.query(By.css('.dot-apps-configuration-list__show-more')) + ).toBeFalsy(); + }); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration/dot-apps-configuration-list/dot-apps-configuration-list.component.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration/dot-apps-configuration-list/dot-apps-configuration-list.component.ts new file mode 100644 index 000000000000..14b9fcce7a7b --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration/dot-apps-configuration-list/dot-apps-configuration-list.component.ts @@ -0,0 +1,31 @@ +import { Component, ViewChild, ElementRef, Input, Output, EventEmitter } from '@angular/core'; +import { DotAppsSites } from '@shared/models/dot-apps/dot-apps.model'; + +import { LazyLoadEvent } from 'primeng/api'; + +@Component({ + selector: 'dot-apps-configuration-list', + templateUrl: './dot-apps-configuration-list.component.html', + styleUrls: ['./dot-apps-configuration-list.component.scss'] +}) +export class DotAppsConfigurationListComponent { + @ViewChild('searchInput') searchInput: ElementRef; + + @Input() hideLoadDataButton: boolean; + @Input() itemsPerPage: number; + @Input() siteConfigurations: DotAppsSites[]; + + @Output() loadData = new EventEmitter(); + @Output() edit = new EventEmitter(); + @Output() export = new EventEmitter(); + @Output() delete = new EventEmitter(); + + /** + * Emits action to load next configuration page + * + * @memberof DotAppsConfigurationListComponent + */ + loadNext() { + this.loadData.emit({ first: this.siteConfigurations.length, rows: this.itemsPerPage }); + } +} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration/dot-apps-configuration-list/dot-apps-configuration-list.module.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration/dot-apps-configuration-list/dot-apps-configuration-list.module.ts new file mode 100644 index 000000000000..f8e69d93c99d --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration/dot-apps-configuration-list/dot-apps-configuration-list.module.ts @@ -0,0 +1,14 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { ButtonModule } from 'primeng/button'; + +import { DotAppsConfigurationListComponent } from './dot-apps-configuration-list.component'; +import { DotAppsConfigurationItemModule } from './dot-apps-configuration-item/dot-apps-configuration-item.module'; +import { DotPipesModule } from '@pipes/dot-pipes.module'; + +@NgModule({ + imports: [ButtonModule, CommonModule, DotAppsConfigurationItemModule, DotPipesModule], + declarations: [DotAppsConfigurationListComponent], + exports: [DotAppsConfigurationListComponent] +}) +export class DotAppsConfigurationListModule {} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration/dot-apps-configuration-resolver.service.spec.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration/dot-apps-configuration-resolver.service.spec.ts new file mode 100644 index 000000000000..c163e9ca5343 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration/dot-apps-configuration-resolver.service.spec.ts @@ -0,0 +1,73 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ + +import { of } from 'rxjs'; +import { waitForAsync, TestBed } from '@angular/core/testing'; +import { ActivatedRouteSnapshot } from '@angular/router'; +import { DotAppsService } from '@services/dot-apps/dot-apps.service'; +import { DotAppsConfigurationResolver } from './dot-apps-configuration-resolver.service'; + +class AppsServicesMock { + getConfigurationList(_serviceKey: string) { + of({}); + } +} + +const activatedRouteSnapshotMock: any = jasmine.createSpyObj( + 'ActivatedRouteSnapshot', + ['toString'] +); +activatedRouteSnapshotMock.paramMap = {}; + +describe('DotAppsConfigurationListResolver', () => { + let dotAppsServices: DotAppsService; + let dotAppsConfigurationListResolver: DotAppsConfigurationResolver; + + beforeEach( + waitForAsync(() => { + const testbed = TestBed.configureTestingModule({ + providers: [ + DotAppsConfigurationResolver, + { provide: DotAppsService, useClass: AppsServicesMock }, + { + provide: ActivatedRouteSnapshot, + useValue: activatedRouteSnapshotMock + } + ] + }); + dotAppsServices = testbed.get(DotAppsService); + dotAppsConfigurationListResolver = testbed.get(DotAppsConfigurationResolver); + }) + ); + + it('should get and return apps with configurations', () => { + const response = { + integrationsCount: 2, + serviceKey: 'google-calendar', + name: 'Google Calendar', + description: "It's a tool to keep track of your life's events", + iconUrl: '/dA/d948d85c-3bc8-4d85-b0aa-0e989b9ae235/photo/surfer-profile.jpg', + hosts: [ + { + configured: true, + hostId: '123', + hostName: 'demo.dotcms.com' + }, + { + configured: false, + hostId: '456', + hostName: 'host.example.com' + } + ] + }; + + activatedRouteSnapshotMock.paramMap.get = () => '123'; + spyOn(dotAppsServices, 'getConfigurationList').and.returnValue(of(response)); + + dotAppsConfigurationListResolver + .resolve(activatedRouteSnapshotMock) + .subscribe((fakeContentType: any) => { + expect(fakeContentType).toEqual(response); + }); + expect(dotAppsServices.getConfigurationList).toHaveBeenCalledWith('123'); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration/dot-apps-configuration-resolver.service.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration/dot-apps-configuration-resolver.service.ts new file mode 100644 index 000000000000..5f87a940ad84 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration/dot-apps-configuration-resolver.service.ts @@ -0,0 +1,23 @@ +import { Observable } from 'rxjs'; +import { Injectable } from '@angular/core'; +import { Resolve, ActivatedRouteSnapshot } from '@angular/router'; +import { take } from 'rxjs/operators'; +import { DotApps } from '@shared/models/dot-apps/dot-apps.model'; +import { DotAppsService } from '@services/dot-apps/dot-apps.service'; + +/** + * Returns apps list from the system + * + * @export + * @class DotAppsPageResolver + * @implements {Resolve>} + */ +@Injectable() +export class DotAppsConfigurationResolver implements Resolve> { + constructor(private dotAppsService: DotAppsService) {} + + resolve(route: ActivatedRouteSnapshot): Observable { + const appsKey = route.paramMap.get('appKey'); + return this.dotAppsService.getConfigurationList(appsKey).pipe(take(1)); + } +} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration/dot-apps-configuration.component.html b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration/dot-apps-configuration.component.html new file mode 100644 index 000000000000..ce0ad57416a9 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration/dot-apps-configuration.component.html @@ -0,0 +1,52 @@ +
+ +
+
+
+ +
+ + +
+
+ +
+
+
+ + diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration/dot-apps-configuration.component.scss b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration/dot-apps-configuration.component.scss new file mode 100644 index 000000000000..138f2f0591a5 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration/dot-apps-configuration.component.scss @@ -0,0 +1,56 @@ +@use "variables" as *; + +:host { + background: $gray-bg; + box-shadow: $md-shadow-4; + display: flex; + height: 100%; + min-width: 75.25rem; + padding: $spacing-4; +} + +.dot-apps-configuration__body { + align-content: flex-start; + flex-wrap: wrap; + padding: $spacing-3; +} + +.dot-apps-configuration__action_header { + display: flex; + justify-content: space-between; + width: 100%; + + input { + width: 31.5rem; + } + + button { + &:first-child { + margin-right: $spacing-1; + } + } +} + +.dot-apps-configuration__add-configurations { + margin-top: 10rem; + text-align: center; + width: 100%; +} + +.dot-apps-configuration__add-configurations-title { + font-size: $font-size-xx-large; + font-weight: bold; +} + +.dot-apps-configuration__add-configurations-description { + font-size: $font-size-large; + margin-bottom: $spacing-9; + margin-top: $spacing-4; +} + +.dot-apps-configuration__container { + background-color: $white; + box-shadow: $md-shadow-4; + overflow-y: auto; + width: 100%; +} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration/dot-apps-configuration.component.spec.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration/dot-apps-configuration.component.spec.ts new file mode 100644 index 000000000000..d1b4defdec6d --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration/dot-apps-configuration.component.spec.ts @@ -0,0 +1,304 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ + +import { of, Observable } from 'rxjs'; +import { waitForAsync, ComponentFixture, fakeAsync, tick, TestBed } from '@angular/core/testing'; +import { RouterTestingModule } from '@angular/router/testing'; +import { MockDotMessageService } from '@tests/dot-message-service.mock'; +import { DotMessageService } from '@services/dot-message/dot-messages.service'; +import { ActivatedRoute } from '@angular/router'; +import { DotAppsConfigurationComponent } from './dot-apps-configuration.component'; +import { DotActionButtonModule } from '@components/_common/dot-action-button/dot-action-button.module'; +import { InputTextModule } from 'primeng/inputtext'; +import { ButtonModule } from 'primeng/button'; +import { DotAppsService } from '@services/dot-apps/dot-apps.service'; +import { DotAppsConfigurationResolver } from './dot-apps-configuration-resolver.service'; +import { By } from '@angular/platform-browser'; +import { Injectable } from '@angular/core'; +import { DotAlertConfirmService } from '@services/dot-alert-confirm/dot-alert-confirm.service'; +import { DotRouterService } from '@services/dot-router/dot-router.service'; +import { MockDotRouterService } from '@tests/dot-router-service.mock'; +import { CommonModule } from '@angular/common'; +import { DotAppsConfigurationListModule } from './dot-apps-configuration-list/dot-apps-configuration-list.module'; +import { PaginatorService } from '@services/paginator'; +import { DotAppsConfigurationHeaderModule } from '../dot-apps-configuration-header/dot-apps-configuration-header.module'; +import { MarkdownService } from 'ngx-markdown'; +import { DotAppsImportExportDialogModule } from '../dot-apps-import-export-dialog/dot-apps-import-export-dialog.module'; +import { HttpClientTestingModule } from '@angular/common/http/testing'; +import { DotPipesModule } from '@pipes/dot-pipes.module'; +import { ConfirmationService } from 'primeng/api'; +import { CoreWebService } from '@dotcms/dotcms-js'; +import { CoreWebServiceMock } from '@tests/core-web.service.mock'; + +const messages = { + 'apps.key': 'Key', + 'apps.configurations': 'Configurations', + 'apps.no.configurations': 'No Configurations', + 'apps.confirmation.delete.all.button': 'Delete All', + 'apps.confirmation.title': 'Are you sure?', + 'apps.confirmation.description.show.more': 'Show More', + 'apps.confirmation.description.show.less': 'Show Less', + 'apps.confirmation.delete.all.message': 'Delete all?', + 'apps.confirmation.accept': 'Ok', + 'apps.search.placeholder': 'Search by name', + 'apps.confirmation.export.all.button': 'Export All' +}; + +const sites = [ + { + configured: true, + id: '123', + name: 'demo.dotcms.com' + }, + { + configured: false, + id: '456', + name: 'host.example.com' + } +]; + +const appData = { + allowExtraParams: true, + configurationsCount: 2, + key: 'google-calendar', + name: 'Google Calendar', + description: `It is a tool to keep track of your life's events`, + iconUrl: '/dA/d948d85c-3bc8-4d85-b0aa-0e989b9ae235/photo/surfer-profile.jpg', + sites +}; + +const routeDatamock = { + data: appData +}; +class ActivatedRouteMock { + get data() { + return of(routeDatamock); + } +} + +@Injectable() +class MockDotAppsService { + deleteConfiguration(_configurationId: string): Observable { + return of(''); + } + deleteAllConfigurations(): Observable { + return of(''); + } +} + +describe('DotAppsConfigurationComponent', () => { + let component: DotAppsConfigurationComponent; + let fixture: ComponentFixture; + let dialogService: DotAlertConfirmService; + let paginationService: PaginatorService; + let appsServices: DotAppsService; + let routerService: DotRouterService; + + const messageServiceMock = new MockDotMessageService(messages); + + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + imports: [ + RouterTestingModule.withRoutes([ + { + component: DotAppsConfigurationComponent, + path: '' + } + ]), + InputTextModule, + ButtonModule, + CommonModule, + DotActionButtonModule, + DotAppsConfigurationHeaderModule, + DotAppsImportExportDialogModule, + DotAppsConfigurationListModule, + HttpClientTestingModule, + DotPipesModule + ], + declarations: [DotAppsConfigurationComponent], + providers: [ + { provide: DotMessageService, useValue: messageServiceMock }, + { + provide: ActivatedRoute, + useClass: ActivatedRouteMock + }, + { + provide: DotAppsService, + useClass: MockDotAppsService + }, + { + provide: DotRouterService, + useClass: MockDotRouterService + }, + { + provide: MarkdownService, + useValue: { + compile(text) { + return text; + }, + + highlight() { + // + } + } + }, + { provide: CoreWebService, useClass: CoreWebServiceMock }, + DotAppsConfigurationResolver, + PaginatorService, + DotAlertConfirmService, + ConfirmationService + ] + }); + + fixture = TestBed.createComponent(DotAppsConfigurationComponent); + component = fixture.debugElement.componentInstance; + dialogService = TestBed.inject(DotAlertConfirmService); + paginationService = TestBed.inject(PaginatorService); + appsServices = TestBed.inject(DotAppsService); + routerService = TestBed.inject(DotRouterService); + }) + ); + + describe('With integrations count', () => { + beforeEach(() => { + spyOn(paginationService, 'setExtraParams'); + spyOn(paginationService, 'getWithOffset').and.returnValue(of(appData)); + spyOn(component.searchInput.nativeElement, 'focus'); + fixture.detectChanges(); + }); + + it('should set App from resolver', () => { + expect(component.apps).toBe(appData); + }); + + it('should set params in export dialog attribute', () => { + const importExportDialog = fixture.debugElement.query( + By.css('dot-apps-import-export-dialog') + ); + expect(importExportDialog.componentInstance.app).toEqual(appData); + expect(importExportDialog.componentInstance.action).toEqual('Export'); + }); + + it('should set onInit Pagination Service with right values', () => { + expect(paginationService.url).toBe(`v1/apps/${component.apps.key}`); + expect(paginationService.paginationPerPage).toBe(component.paginationPerPage); + expect(paginationService.sortField).toBe('name'); + expect(paginationService.sortOrder).toBe(1); + expect(paginationService.setExtraParams).toHaveBeenCalledWith('filter', ''); + }); + + it('should call first pagination call onInit', () => { + expect(paginationService.getWithOffset).toHaveBeenCalledWith(0); + }); + + it('should input search be focused on init', () => { + expect(component.searchInput.nativeElement.focus).toHaveBeenCalledTimes(1); + }); + + it('should set messages/values in DOM correctly', () => { + expect( + fixture.debugElement.query(By.css('.dot-apps-configuration__action_header input')) + .nativeElement.placeholder + ).toContain(messageServiceMock.get('apps.search.placeholder')); + + expect( + fixture.debugElement.queryAll( + By.css('.dot-apps-configuration__action_header button') + )[0].nativeElement.innerText + ).toContain( + messageServiceMock.get('apps.confirmation.export.all.button').toUpperCase() + ); + + expect( + fixture.debugElement.queryAll( + By.css('.dot-apps-configuration__action_header button') + )[1].nativeElement.innerText + ).toContain( + messageServiceMock.get('apps.confirmation.delete.all.button').toUpperCase() + ); + }); + + it('should have dot-apps-configuration-list with correct values', () => { + const listComp = fixture.debugElement.query( + By.css('dot-apps-configuration-list') + ).componentInstance; + expect(listComp.siteConfigurations).toBe(component.apps.sites); + expect(listComp.hideLoadDataButton).toBe(true); + expect(listComp.itemsPerPage).toBe(component.paginationPerPage); + }); + + it('should dot-apps-configuration-list emit action to load more data', () => { + const listComp = fixture.debugElement.query( + By.css('dot-apps-configuration-list') + ).componentInstance; + listComp.loadData.emit({ first: 10 }); + expect(paginationService.getWithOffset).toHaveBeenCalledWith(10); + }); + + it('should redirect to goto configuration page action', () => { + const listComp = fixture.debugElement.query( + By.css('dot-apps-configuration-list') + ).componentInstance; + listComp.edit.emit(sites[0]); + expect(routerService.goToUpdateAppsConfiguration).toHaveBeenCalledWith( + component.apps.key, + sites[0] + ); + }); + + it('should open confirm dialog and export All configurations', () => { + const exportAllBtn = fixture.debugElement.query( + By.css('.dot-apps-configuration__action_export_button') + ); + exportAllBtn.triggerEventHandler('click', null); + expect(component.importExportDialog.show).toBe(true); + expect(component.importExportDialog.site).toBeUndefined(); + }); + + it('should open confirm dialog and delete All configurations', () => { + const deleteAllBtn = fixture.debugElement.queryAll( + By.css('.dot-apps-configuration__action_header button') + )[1]; + + spyOn(dialogService, 'confirm').and.callFake((conf) => { + conf.accept(); + }); + + spyOn(appsServices, 'deleteAllConfigurations').and.returnValue(of(null)); + + deleteAllBtn.triggerEventHandler('click', null); + expect(dialogService.confirm).toHaveBeenCalledTimes(1); + expect(appsServices.deleteAllConfigurations).toHaveBeenCalledWith(component.apps.key); + }); + + it('should export a specific configuration', () => { + const listComp = fixture.debugElement.query( + By.css('dot-apps-configuration-list') + ).componentInstance; + listComp.export.emit(sites[0]); + expect(component.importExportDialog.show).toBe(true); + expect(component.siteSelected).toBe(sites[0]); + }); + + it('should delete a specific configuration', () => { + spyOn(appsServices, 'deleteConfiguration').and.returnValue(of(null)); + const listComp = fixture.debugElement.query( + By.css('dot-apps-configuration-list') + ).componentInstance; + listComp.delete.emit(sites[0]); + + expect(appsServices.deleteConfiguration).toHaveBeenCalledWith( + component.apps.key, + sites[0].id + ); + }); + + it('should call App filter on search', fakeAsync(() => { + component.searchInput.nativeElement.value = 'test'; + component.searchInput.nativeElement.dispatchEvent(new Event('keyup')); + tick(550); + expect(paginationService.setExtraParams).toHaveBeenCalledWith('filter', 'test'); + expect(paginationService.getWithOffset).toHaveBeenCalled(); + })); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration/dot-apps-configuration.component.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration/dot-apps-configuration.component.ts new file mode 100644 index 000000000000..e8059c61314f --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration/dot-apps-configuration.component.ts @@ -0,0 +1,180 @@ +import { Component, OnInit, ViewChild, ElementRef, OnDestroy } from '@angular/core'; +import { dialogAction, DotApps, DotAppsSites } from '@shared/models/dot-apps/dot-apps.model'; +import { ActivatedRoute } from '@angular/router'; +import { pluck, take, debounceTime, takeUntil } from 'rxjs/operators'; +import { DotAlertConfirmService } from '@services/dot-alert-confirm'; +import { DotAppsService } from '@services/dot-apps/dot-apps.service'; +import { fromEvent as observableFromEvent, Subject } from 'rxjs'; +import { DotRouterService } from '@services/dot-router/dot-router.service'; + +import { LazyLoadEvent } from 'primeng/api'; +import { PaginatorService } from '@services/paginator'; +import { DotMessageService } from '@services/dot-message/dot-messages.service'; +import { DotAppsImportExportDialogComponent } from '../dot-apps-import-export-dialog/dot-apps-import-export-dialog.component'; + +@Component({ + selector: 'dot-apps-configuration', + templateUrl: './dot-apps-configuration.component.html', + styleUrls: ['./dot-apps-configuration.component.scss'] +}) +export class DotAppsConfigurationComponent implements OnInit, OnDestroy { + @ViewChild('searchInput', { static: true }) searchInput: ElementRef; + @ViewChild('importExportDialog') importExportDialog: DotAppsImportExportDialogComponent; + apps: DotApps; + siteSelected: DotAppsSites; + importExportDialogAction = dialogAction.EXPORT; + showDialog = false; + + hideLoadDataButton: boolean; + paginationPerPage = 40; + totalRecords: number; + + private destroy$: Subject = new Subject(); + + constructor( + private dotAlertConfirmService: DotAlertConfirmService, + private dotAppsService: DotAppsService, + private dotMessageService: DotMessageService, + private dotRouterService: DotRouterService, + private route: ActivatedRoute, + public paginationService: PaginatorService + ) {} + + ngOnInit() { + this.route.data.pipe(pluck('data'), take(1)).subscribe((app: DotApps) => { + this.apps = app; + this.apps.sites = []; + }); + + observableFromEvent(this.searchInput.nativeElement, 'keyup') + .pipe(debounceTime(500), takeUntil(this.destroy$)) + .subscribe((keyboardEvent: Event) => { + this.filterConfigurations(keyboardEvent.target['value']); + }); + + this.paginationService.url = `v1/apps/${this.apps.key}`; + this.paginationService.paginationPerPage = this.paginationPerPage; + this.paginationService.sortField = 'name'; + this.paginationService.setExtraParams('filter', ''); + this.paginationService.sortOrder = 1; + this.loadData(); + + this.searchInput.nativeElement.focus(); + } + + ngOnDestroy(): void { + this.destroy$.next(true); + this.destroy$.complete(); + } + + /** + * Loads data through pagination service + * + * @param LazyLoadEvent event + * @memberof DotAppsConfigurationComponent + */ + loadData(event?: LazyLoadEvent): void { + this.paginationService + .getWithOffset((event && event.first) || 0) + .pipe(take(1)) + .subscribe((apps: DotApps[]) => { + const app = [].concat(apps)[0]; + this.apps.sites = event ? this.apps.sites.concat(app.sites) : app.sites; + this.apps.configurationsCount = app.configurationsCount; + this.totalRecords = this.paginationService.totalRecords; + this.hideLoadDataButton = !this.isThereMoreData(this.apps.sites.length); + }); + } + + /** + * Redirects to create/edit configuration site page + * + * @param DotAppsSites site + * @memberof DotAppsConfigurationComponent + */ + gotoConfiguration(site: DotAppsSites): void { + this.dotRouterService.goToUpdateAppsConfiguration(this.apps.key, site); + } + + /** + * Updates dialog show/hide state + * + * @memberof DotAppsConfigurationComponent + */ + onClosedDialog(): void { + this.showDialog = false; + } + + /** + * Redirects to app configuration listing page + * + * @param string key + * @memberof DotAppsConfigurationComponent + */ + goToApps(key: string): void { + this.dotRouterService.gotoPortlet(`/apps/${key}`); + } + + /** + * Opens the dialog and set Export actions based on a single/all sites + * + * @param DotAppsSites [site] + * @memberof DotAppsConfigurationComponent + */ + confirmExport(site?: DotAppsSites): void { + this.importExportDialog.show = true; + this.siteSelected = site; + } + + /** + * Display confirmation dialog to delete a specific configuration + * + * @param DotAppsSites site + * @memberof DotAppsConfigurationComponent + */ + deleteConfiguration(site: DotAppsSites): void { + this.dotAppsService + .deleteConfiguration(this.apps.key, site.id) + .pipe(take(1)) + .subscribe(() => { + this.apps.sites = []; + this.loadData(); + }); + } + + /** + * Display confirmation dialog to delete all configurations + * + * @memberof DotAppsConfigurationComponent + */ + deleteAllConfigurations(): void { + this.dotAlertConfirmService.confirm({ + accept: () => { + this.dotAppsService + .deleteAllConfigurations(this.apps.key) + .pipe(take(1)) + .subscribe(() => { + this.apps.sites = []; + this.loadData(); + }); + }, + reject: () => { + // + }, + header: this.dotMessageService.get('apps.confirmation.title'), + message: this.dotMessageService.get('apps.confirmation.delete.all.message'), + footerLabel: { + accept: this.dotMessageService.get('apps.confirmation.accept') + } + }); + } + + private isThereMoreData(index: number): boolean { + return this.totalRecords / index > 1; + } + + private filterConfigurations(searchCriteria?: string): void { + this.paginationService.setExtraParams('filter', searchCriteria); + this.loadData(); + } +} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration/dot-apps-configuration.module.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration/dot-apps-configuration.module.ts new file mode 100644 index 000000000000..31115ba35432 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration/dot-apps-configuration.module.ts @@ -0,0 +1,39 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; + +import { DotAppsConfigurationComponent } from './dot-apps-configuration.component'; +import { DotAppsService } from '@services/dot-apps/dot-apps.service'; +import { DotAppsConfigurationResolver } from './dot-apps-configuration-resolver.service'; +import { DotAvatarModule } from '@components/_common/dot-avatar/dot-avatar.module'; +import { DotActionButtonModule } from '@components/_common/dot-action-button/dot-action-button.module'; +import { DotCopyButtonModule } from '@components/dot-copy-button/dot-copy-button.module'; +import { DotAppsConfigurationListModule } from './dot-apps-configuration-list/dot-apps-configuration-list.module'; +import { DotAppsConfigurationHeaderModule } from '../dot-apps-configuration-header/dot-apps-configuration-header.module'; +import { DotPipesModule } from '@pipes/dot-pipes.module'; + +import { InputTextModule } from 'primeng/inputtext'; +import { ButtonModule } from 'primeng/button'; +import { MarkdownModule } from 'ngx-markdown'; +import { DotDialogModule } from '@components/dot-dialog/dot-dialog.module'; +import { DotAppsImportExportDialogModule } from '../dot-apps-import-export-dialog/dot-apps-import-export-dialog.module'; + +@NgModule({ + imports: [ + InputTextModule, + ButtonModule, + CommonModule, + DotAvatarModule, + DotActionButtonModule, + DotCopyButtonModule, + DotAppsConfigurationHeaderModule, + DotAppsConfigurationListModule, + DotAppsImportExportDialogModule, + DotDialogModule, + DotPipesModule, + MarkdownModule.forChild() + ], + declarations: [DotAppsConfigurationComponent], + exports: [DotAppsConfigurationComponent], + providers: [DotAppsService, DotAppsConfigurationResolver] +}) +export class DotAppsConfigurationModule {} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-import-export-dialog/dot-apps-import-export-dialog.component.html b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-import-export-dialog/dot-apps-import-export-dialog.component.html new file mode 100644 index 000000000000..d39cb9932939 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-import-export-dialog/dot-apps-import-export-dialog.component.html @@ -0,0 +1,57 @@ + +
+ +
+ + +
+
+ +
+ + +
+
+ + +
+ + +
+ {{ errorMessage }} +
+
diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-import-export-dialog/dot-apps-import-export-dialog.component.scss b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-import-export-dialog/dot-apps-import-export-dialog.component.scss new file mode 100644 index 000000000000..1321998dd9c2 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-import-export-dialog/dot-apps-import-export-dialog.component.scss @@ -0,0 +1,6 @@ +@use "variables" as *; + +.dot-apps-export-dialog__password, +#import-file { + margin-bottom: $spacing-3; +} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-import-export-dialog/dot-apps-import-export-dialog.component.spec.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-import-export-dialog/dot-apps-import-export-dialog.component.spec.ts new file mode 100644 index 000000000000..2d6818744ef0 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-import-export-dialog/dot-apps-import-export-dialog.component.spec.ts @@ -0,0 +1,338 @@ +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; +import { MockDotMessageService } from '@dotcms/app/test/dot-message-service.mock'; +import { DotDialogModule } from '@components/dot-dialog/dot-dialog.module'; +import { ReactiveFormsModule } from '@angular/forms'; +import { CommonModule } from '@angular/common'; +import { Component, DebugElement, Input } from '@angular/core'; +import { DotMessageService } from '@services/dot-message/dot-messages.service'; +import { InputTextModule } from 'primeng/inputtext'; +import { DotPipesModule } from '@pipes/dot-pipes.module'; +import { HttpClientTestingModule } from '@angular/common/http/testing'; +import { DotAppsImportExportDialogComponent } from './dot-apps-import-export-dialog.component'; +import { DotAutofocusModule } from '@directives/dot-autofocus/dot-autofocus.module'; +import { DotAppsService } from '@services/dot-apps/dot-apps.service'; +import { + DotApps, + DotAppsExportConfiguration, + DotAppsImportConfiguration, + DotAppsSites +} from '@shared/models/dot-apps/dot-apps.model'; +import { By } from '@angular/platform-browser'; +import { Observable, of } from 'rxjs'; + +export class DotAppsServiceMock { + exportConfiguration(_configuration: DotAppsExportConfiguration): Promise { + return Promise.resolve(''); + } + importConfiguration(_configuration: DotAppsImportConfiguration): Observable { + return of(''); + } +} + +@Component({ + selector: 'dot-host-component', + template: ` + + ` +}) +class HostTestComponent { + @Input() action?: string; + @Input() app?: DotApps; + @Input() site?: DotAppsSites; + resolveHandler(_$event) {return;} +} + +describe('DotAppsImportExportDialogComponent', () => { + let hostFixture: ComponentFixture; + let hostComponent: HostTestComponent; + let comp: DotAppsImportExportDialogComponent; + let de: DebugElement; + let dotAppsService: DotAppsService; + + const messageServiceMock = new MockDotMessageService({ + 'apps.confirmation.export.error': 'Error', + 'dot.common.dialog.accept': 'Acept', + 'dot.common.dialog.reject': 'Cancel', + 'apps.confirmation.export.header': 'Export', + 'apps.confirmation.export.password.label': 'Enter Password', + 'apps.confirmation.import.password.label': 'Enter Password to decrypt', + 'apps.confirmation.import.header': 'Import Configuration' + }); + + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [DotAppsImportExportDialogComponent, HostTestComponent], + imports: [ + InputTextModule, + DotAutofocusModule, + DotDialogModule, + CommonModule, + ReactiveFormsModule, + DotPipesModule, + HttpClientTestingModule + ], + providers: [ + { provide: DotAppsService, useClass: DotAppsServiceMock }, + { provide: DotMessageService, useValue: messageServiceMock } + ] + }).compileComponents(); + + hostFixture = TestBed.createComponent(HostTestComponent); + hostComponent = hostFixture.componentInstance; + de = hostFixture.debugElement; + comp = hostFixture.debugElement.query(By.css('dot-apps-import-export-dialog')) + .componentInstance; + dotAppsService = TestBed.inject(DotAppsService); + comp.show = true; + }) + ); + + afterEach(() => { + comp.show = false; + hostFixture.detectChanges(); + }); + + describe('Import dialog', () => { + beforeEach(() => { + hostComponent.action = 'Import'; + }); + + it(`should have right labels and accept be disabled`, async () => { + hostFixture.detectChanges(); + comp.form.setValue({ + password: '', + importFile: null + }); + await hostFixture.whenStable(); + const dialog = de.query(By.css('dot-dialog')); + const inputPassword = de.query(By.css('input.dot-apps-import-dialog__password')); + const inputFile = de.query(By.css('input[type="file"]')); + expect(inputFile.attributes.dotAutofocus).toBeDefined(); + expect(dialog.componentInstance.header).toBe( + messageServiceMock.get('apps.confirmation.import.header') + ); + expect(dialog.componentInstance.appendToBody).toBe(true); + expect(inputPassword.nativeElement.placeholder).toBe( + messageServiceMock.get('apps.confirmation.import.password.label') + ); + expect(dialog.componentInstance.actions.accept.label).toBe( + messageServiceMock.get('dot.common.dialog.accept') + ); + expect(dialog.componentInstance.actions.cancel.label).toBe( + messageServiceMock.get('dot.common.dialog.reject') + ); + expect(dialog.componentInstance.actions.accept.disabled).toBe(true); + }); + + it(`should send configuration to import apps and close dialog`, async () => { + hostFixture.detectChanges(); + spyOn(dotAppsService, 'importConfiguration').and.returnValue(of('')); + spyOn(comp, 'closeExportDialog').and.callThrough(); + spyOn(comp.resolved, 'emit').and.callThrough(); + const expectedConfiguration: DotAppsImportConfiguration = { + file: undefined, + json: { password: 'test' } + }; + + await hostFixture.whenStable(); + comp.form.setValue({ + password: 'test', + importFile: 'test' + }); + + hostFixture.detectChanges(); + const acceptBtn = de.queryAll(By.css('footer button'))[1]; + acceptBtn.nativeElement.click(); + await hostFixture.whenStable(); + expect(dotAppsService.importConfiguration).toHaveBeenCalledWith(expectedConfiguration); + expect(comp.closeExportDialog).toHaveBeenCalledTimes(1); + expect(comp.resolved.emit).toHaveBeenCalledTimes(1); + }); + }); + + describe('Export dialog', () => { + beforeEach(() => { + hostComponent.action = 'Export'; + }); + + it(`should have right params and accept be disabled`, async () => { + hostFixture.detectChanges(); + comp.form.setValue({ + password: '' + }); + await hostFixture.whenStable(); + const dialog = de.query(By.css('dot-dialog')); + const inputPassword = de.query(By.css('input')); + expect(dialog.componentInstance.header).toBe( + messageServiceMock.get('apps.confirmation.export.header') + ); + expect(dialog.componentInstance.appendToBody).toBe(true); + expect(inputPassword.attributes['pPassword']).not.toBeUndefined(); + expect(inputPassword.nativeElement.placeholder).toBe( + messageServiceMock.get('apps.confirmation.export.password.label') + ); + expect(dialog.componentInstance.actions.accept.label).toBe( + messageServiceMock.get('dot.common.dialog.accept') + ); + expect(dialog.componentInstance.actions.cancel.label).toBe( + messageServiceMock.get('dot.common.dialog.reject') + ); + expect(dialog.componentInstance.actions.accept.disabled).toBe(true); + }); + + it(`should clear values when dialog closed`, async () => { + hostFixture.detectChanges(); + spyOn(comp.form, 'reset'); + await hostFixture.whenStable(); + comp.form.setValue({ + password: 'test' + }); + + hostFixture.detectChanges(); + const cancelBtn = de.queryAll(By.css('button'))[0]; + cancelBtn.nativeElement.click(); + + expect(comp.errorMessage).toBe(''); + expect(comp.site).toBe(null); + expect(comp.show).toBe(false); + expect(comp.form.reset).toHaveBeenCalledTimes(1); + }); + + it(`should send configuration to export all apps and close dialog`, async () => { + hostFixture.detectChanges(); + spyOn(dotAppsService, 'exportConfiguration').and.returnValue(Promise.resolve('')); + spyOn(comp, 'closeExportDialog').and.callThrough(); + const expectedConfiguration: DotAppsExportConfiguration = { + password: 'test', + exportAll: true, + appKeysBySite: {} + }; + + await hostFixture.whenStable(); + comp.form.setValue({ + password: 'test' + }); + + hostFixture.detectChanges(); + const acceptBtn = de.queryAll(By.css('footer button'))[1]; + acceptBtn.nativeElement.click(); + await hostFixture.whenStable(); + expect(dotAppsService.exportConfiguration).toHaveBeenCalledWith(expectedConfiguration); + expect(comp.closeExportDialog).toHaveBeenCalledTimes(1); + }); + + it(`should send configuration to export all apps and not close dialog on Error`, async () => { + hostFixture.detectChanges(); + spyOn(dotAppsService, 'exportConfiguration').and.returnValue(Promise.resolve('error')); + spyOn(comp, 'closeExportDialog').and.callThrough(); + + await hostFixture.whenStable(); + comp.form.setValue({ + password: 'test' + }); + + hostFixture.detectChanges(); + const acceptBtn = de.queryAll(By.css('footer button'))[1]; + acceptBtn.nativeElement.click(); + await hostFixture.whenStable(); + expect(comp.closeExportDialog).not.toHaveBeenCalled(); + }); + + it(`should send configuration to export all sites from a single app and close dialog`, async () => { + hostComponent.app = { + allowExtraParams: false, + key: 'test-key', + name: 'test', + sites: [ + { + id: 'Site1', + name: 'Site 1', + configured: true + }, + { + id: 'Site2', + name: 'Site 2', + configured: true + } + ] + }; + hostFixture.detectChanges(); + spyOn(dotAppsService, 'exportConfiguration').and.returnValue(Promise.resolve('')); + spyOn(comp, 'closeExportDialog').and.callThrough(); + const expectedConfiguration: DotAppsExportConfiguration = { + password: 'test', + exportAll: false, + appKeysBySite: { + Site1: ['test-key'], + Site2: ['test-key'] + } + }; + + await hostFixture.whenStable(); + comp.form.setValue({ + password: 'test' + }); + + hostFixture.detectChanges(); + const acceptBtn = de.queryAll(By.css('footer button'))[1]; + acceptBtn.nativeElement.click(); + await hostFixture.whenStable(); + expect(dotAppsService.exportConfiguration).toHaveBeenCalledWith(expectedConfiguration); + expect(comp.closeExportDialog).toHaveBeenCalledTimes(1); + }); + + it(`should send configuration to export a single site from a single app and close dialog`, async () => { + hostComponent.app = { + allowExtraParams: false, + key: 'test-key', + name: 'test', + sites: [ + { + id: 'Site1', + name: 'Site 1', + configured: true + }, + { + id: 'Site2', + name: 'Site 2', + configured: true + } + ] + }; + hostComponent.site = { + id: 'Site1', + name: 'Site 1', + configured: true + }; + hostFixture.detectChanges(); + spyOn(dotAppsService, 'exportConfiguration').and.returnValue(Promise.resolve('')); + spyOn(comp, 'closeExportDialog').and.callThrough(); + const expectedConfiguration: DotAppsExportConfiguration = { + password: 'test', + exportAll: false, + appKeysBySite: { + Site1: ['test-key'] + } + }; + + await hostFixture.whenStable(); + comp.form.setValue({ + password: 'test' + }); + + hostFixture.detectChanges(); + const acceptBtn = de.queryAll(By.css('footer button'))[1]; + acceptBtn.nativeElement.click(); + await hostFixture.whenStable(); + expect(dotAppsService.exportConfiguration).toHaveBeenCalledWith(expectedConfiguration); + expect(comp.closeExportDialog).toHaveBeenCalledTimes(1); + }); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-import-export-dialog/dot-apps-import-export-dialog.component.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-import-export-dialog/dot-apps-import-export-dialog.component.ts new file mode 100644 index 000000000000..7225d3b5710a --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-import-export-dialog/dot-apps-import-export-dialog.component.ts @@ -0,0 +1,198 @@ +import { + Component, + OnDestroy, + Input, + OnChanges, + SimpleChanges, + ViewChild, + ElementRef, + Output, + EventEmitter +} from '@angular/core'; +import { FormGroup, FormBuilder, FormControl, Validators } from '@angular/forms'; +import { DotDialogActions } from '@components/dot-dialog/dot-dialog.component'; +import { DotAppsService } from '@services/dot-apps/dot-apps.service'; +import { DotMessageService } from '@services/dot-message/dot-messages.service'; +import { + dialogAction, + DotApps, + DotAppsExportConfiguration, + DotAppsImportConfiguration, + DotAppsSites +} from '@shared/models/dot-apps/dot-apps.model'; +import { Subject } from 'rxjs'; +import { take, takeUntil } from 'rxjs/operators'; + +@Component({ + selector: 'dot-apps-import-export-dialog', + templateUrl: './dot-apps-import-export-dialog.component.html', + styleUrls: ['./dot-apps-import-export-dialog.component.scss'] +}) +export class DotAppsImportExportDialogComponent implements OnChanges, OnDestroy { + @ViewChild('importFile') importFile: ElementRef; + @Input() action?: string; + @Input() app?: DotApps; + @Input() site?: DotAppsSites; + @Input() show? = false; + @Output() resolved: EventEmitter = new EventEmitter(); + @Output() shutdown: EventEmitter = new EventEmitter(); + + form: FormGroup; + dialogActions: DotDialogActions; + errorMessage: string; + dialogHeaderKey = ''; + + private destroy$: Subject = new Subject(); + + constructor( + private dotAppsService: DotAppsService, + private dotMessageService: DotMessageService, + private fb: FormBuilder + ) {} + + ngOnChanges(changes: SimpleChanges): void { + if (changes?.action?.currentValue) { + this.setDialogForm(changes.action.currentValue); + } + } + + ngOnDestroy(): void { + this.destroy$.next(true); + this.destroy$.complete(); + } + + /** + * Close the dialog and clear the form + * + * @memberof DotAppsConfigurationComponent + */ + closeExportDialog(): void { + this.errorMessage = ''; + this.form.reset(); + this.site = null; + this.show = false; + this.shutdown.emit(); + } + + /** + * Updates form control value for inputFile field + * + * @param { File[] } files + * @memberof DotAppsConfigurationComponent + */ + onFileChange(files: File[]) { + this.form.controls['importFile'].setValue(files[0] ? files[0].name : ''); + } + + /** + * Sets dialog form based on action Import/Export + * + * @param { dialogAction } action + * @memberof DotAppsConfigurationComponent + */ + setDialogForm(action: dialogAction): void { + if (action === dialogAction.EXPORT) { + this.dialogHeaderKey = 'apps.confirmation.export.header'; + this.form = this.fb.group({ + password: new FormControl('', Validators.required) + }); + this.setExportDialogActions(); + } else if (action === dialogAction.IMPORT) { + this.dialogHeaderKey = 'apps.confirmation.import.header'; + this.form = this.fb.group({ + password: new FormControl('', Validators.required), + importFile: new FormControl('', Validators.required) + }); + this.setImportDialogActions(); + } + + this.form.valueChanges.pipe(takeUntil(this.destroy$)).subscribe(() => { + this.dialogActions = { + ...this.dialogActions, + accept: { + ...this.dialogActions.accept, + disabled: !this.form.valid + } + }; + }); + } + + private setExportDialogActions(): void { + this.dialogActions = { + accept: { + action: () => { + const requestConfiguration: DotAppsExportConfiguration = { + password: this.form.value.password, + exportAll: this.app ? false : true, + appKeysBySite: this.site + ? { [this.site.id]: [this.app.key] } + : this.getAllKeySitesConfig() + }; + + this.dotAppsService + .exportConfiguration(requestConfiguration) + .then((errorMsg: string) => { + if (errorMsg) { + this.errorMessage = this.dotMessageService.get( + 'apps.confirmation.export.error' + ); + } else { + this.closeExportDialog(); + } + }); + }, + label: this.dotMessageService.get('dot.common.dialog.accept'), + disabled: true + }, + cancel: { + label: this.dotMessageService.get('dot.common.dialog.reject'), + action: () => { + this.closeExportDialog(); + } + } + }; + } + + private setImportDialogActions(): void { + this.dialogActions = { + accept: { + action: () => { + const requestConfiguration: DotAppsImportConfiguration = { + file: this.importFile.nativeElement.files[0], + json: { password: this.form.value.password } + }; + + this.dotAppsService + .importConfiguration(requestConfiguration) + .pipe(take(1)) + .subscribe((status: string) => { + if (status !== '400') { + this.resolved.emit(true); + this.closeExportDialog(); + } + }); + }, + label: this.dotMessageService.get('dot.common.dialog.accept'), + disabled: true + }, + cancel: { + label: this.dotMessageService.get('dot.common.dialog.reject'), + action: () => { + this.closeExportDialog(); + } + } + }; + } + + private getAllKeySitesConfig(): { [key: string]: string[] } { + const keySitesConf = {}; + if (this.app) { + this.app.sites.forEach((site: DotAppsSites) => { + if (site.configured) { + keySitesConf[site.id] = [this.app.key]; + } + }); + } + return keySitesConf; + } +} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-import-export-dialog/dot-apps-import-export-dialog.module.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-import-export-dialog/dot-apps-import-export-dialog.module.ts new file mode 100644 index 000000000000..1ec8fec6461a --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-import-export-dialog/dot-apps-import-export-dialog.module.ts @@ -0,0 +1,28 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; + +import { DotAppsService } from '@services/dot-apps/dot-apps.service'; +import { DotPipesModule } from '@pipes/dot-pipes.module'; + +import { InputTextModule } from 'primeng/inputtext'; +import { DotDialogModule } from '@components/dot-dialog/dot-dialog.module'; +import { DotAutofocusModule } from '@directives/dot-autofocus/dot-autofocus.module'; +import { ReactiveFormsModule } from '@angular/forms'; +import { DotAppsImportExportDialogComponent } from './dot-apps-import-export-dialog.component'; +import { PasswordModule } from 'primeng/password'; + +@NgModule({ + imports: [ + InputTextModule, + CommonModule, + PasswordModule, + DotDialogModule, + DotAutofocusModule, + ReactiveFormsModule, + DotPipesModule + ], + declarations: [DotAppsImportExportDialogComponent], + exports: [DotAppsImportExportDialogComponent], + providers: [DotAppsService] +}) +export class DotAppsImportExportDialogModule {} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-list/dot-apps-card/dot-apps-card.component.html b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-list/dot-apps-card/dot-apps-card.component.html new file mode 100644 index 000000000000..d75853bffb01 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-list/dot-apps-card/dot-apps-card.component.html @@ -0,0 +1,36 @@ + + + +
+ + {{ app.name }} + + {{ + app.configurationsCount + ? app.configurationsCount + ' ' + ('apps.configurations' | dm) + : ('apps.no.configurations' | dm) + }} + + +
+
+

+ {{ app.description }} +

+
diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-list/dot-apps-card/dot-apps-card.component.scss b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-list/dot-apps-card/dot-apps-card.component.scss new file mode 100644 index 000000000000..d689371e58e8 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-list/dot-apps-card/dot-apps-card.component.scss @@ -0,0 +1,103 @@ +@use "variables" as *; +@import "mixins"; + +:host { + box-shadow: $md-shadow-2; + display: block; + transition: box-shadow $basic-speed ease-in; + + &:hover { + box-shadow: $md-shadow-3; + cursor: pointer; + } +} + +.dot-apps-card__disabled { + background-color: $gray-bg; + display: block; + height: 100%; + + &:hover { + background-color: $white; + + ::ng-deep { + .p-widget-content { + background-color: $white; + } + .avatar__img { + filter: unset; + } + } + .dot-apps-card__name { + color: $black; + } + } + + ::ng-deep { + .avatar__img { + filter: grayscale(1); + } + .p-widget-content { + background-color: $gray-bg; + } + .dot-apps-card__name { + color: $gray; + } + } +} + +p-header { + display: flex; + padding-top: $spacing-4; +} + +dot-avatar { + border-radius: 50%; + box-shadow: $md-shadow-2; + margin: 0 $spacing-3 0; +} + +.dot-apps-card__name { + color: $black; + display: block; + flex: 1; + font-size: $font-size-large; + font-weight: bold; + height: $spacing-3; + line-height: $spacing-3; + overflow: hidden; + text-overflow: ellipsis; + transition: color $basic-speed ease; +} + +.dot-apps-card__label-container { + position: relative; + + dot-icon { + bottom: 0; + color: $brand-primary; + position: absolute; + right: 0; + } +} + +.dot-apps-card__configurations { + color: $gray; + display: block; + font-size: $font-size-medium; + line-height: $spacing-3; + margin-top: $spacing-1; + margin-right: $spacing-4; +} + +::ng-deep .p-card-body { + color: $gray; + padding: 0; + + .p-card-content > p { + line-height: 1.5rem; + overflow: hidden; + text-overflow: ellipsis; + margin: 0 $spacing-3; + } +} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-list/dot-apps-card/dot-apps-card.component.spec.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-list/dot-apps-card/dot-apps-card.component.spec.ts new file mode 100644 index 000000000000..153f5723a433 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-list/dot-apps-card/dot-apps-card.component.spec.ts @@ -0,0 +1,151 @@ +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; +import { MockDotMessageService } from '@tests/dot-message-service.mock'; +import { DotMessageService } from '@services/dot-message/dot-messages.service'; +import { By } from '@angular/platform-browser'; +import { DotAppsCardComponent } from './dot-apps-card.component'; +import { DotAvatarModule } from '@components/_common/dot-avatar/dot-avatar.module'; +import { DotIconModule } from '@dotcms/ui'; +import { DotPipesModule } from '@pipes/dot-pipes.module'; +import { CardModule } from 'primeng/card'; +import { TooltipModule } from 'primeng/tooltip'; +import { Component } from '@angular/core'; + +@Component({ + // eslint-disable-next-line @angular-eslint/component-selector + selector: 'markdown', + template: `` +}) +class MockMarkdownComponent {} + +describe('DotAppsCardComponent', () => { + let component: DotAppsCardComponent; + let fixture: ComponentFixture; + + const messageServiceMock = new MockDotMessageService({ + 'apps.configurations': 'Configurations', + 'apps.no.configurations': 'No Configurations', + 'apps.invalid.configurations': 'Invalid Configurations' + }); + + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + imports: [ + CardModule, + DotAvatarModule, + DotIconModule, + TooltipModule, + DotPipesModule + ], + declarations: [DotAppsCardComponent, MockMarkdownComponent], + providers: [{ provide: DotMessageService, useValue: messageServiceMock }] + }).compileComponents(); + }) + ); + + beforeEach(() => { + fixture = TestBed.createComponent(DotAppsCardComponent); + component = fixture.debugElement.componentInstance; + }); + + describe('With configuration', () => { + beforeEach(() => { + component.app = { + allowExtraParams: true, + configurationsCount: 1, + key: 'asana', + name: 'Asana', + description: "It's asana to keep track of your asana events", + iconUrl: '/dA/792c7c9f-6b6f-427b-80ff-1643376c9999/photo/mountain-persona.jpg' + }; + fixture.detectChanges(); + }); + + it('should not have warning icon', () => { + expect(fixture.debugElement.query(By.css('dot-icon'))).toBeFalsy(); + }); + + it('should not have disabled css class', () => { + expect( + fixture.debugElement + .query(By.css('p-card')) + .nativeElement.classList.contains('dot-apps-card__disabled') + ).toBeFalsy(); + }); + + it('should have avatar with right values', () => { + const avatar = fixture.debugElement.query(By.css('dot-avatar')).componentInstance; + expect(avatar.size).toBe(40); + expect(avatar.showDot).toBe(true); + expect(avatar.url).toBe(component.app.iconUrl); + expect(avatar.label).toBe(component.app.name); + }); + + it('should set messages/values in DOM correctly', () => { + expect( + fixture.debugElement.query(By.css('.dot-apps-card__name')).nativeElement.innerText + ).toBe(component.app.name); + + expect( + fixture.debugElement.query(By.css('.dot-apps-card__configurations')).nativeElement + .textContent + ).toContain( + `${component.app.configurationsCount} ${messageServiceMock.get( + 'apps.configurations' + )}` + ); + + expect( + fixture.debugElement.query(By.css('.p-card-content')).nativeElement.textContent + ).toContain(component.app.description); + }); + }); + + describe('With No configuration & warnings', () => { + beforeEach(() => { + component.app = { + allowExtraParams: false, + configurationsCount: 0, + key: 'asana', + name: 'Asana', + description: "It's asana to keep track of your asana events", + iconUrl: '/dA/792c7c9f-6b6f-427b-80ff-1643376c9999/photo/mountain-persona.jpg', + sitesWithWarnings: 2 + }; + fixture.detectChanges(); + }); + + it('should have warning icon', () => { + const warningIcon = fixture.debugElement.query(By.css('dot-icon')); + expect(warningIcon).toBeTruthy(); + expect(warningIcon.attributes['name']).toBe('warning'); + expect(warningIcon.attributes['size']).toBe('18'); + expect(warningIcon.attributes['ng-reflect-text']).toBe( + `${component.app.sitesWithWarnings} ${messageServiceMock.get( + 'apps.invalid.configurations' + )}` + ); + }); + + it('should have disabled css class', () => { + expect( + fixture.debugElement + .query(By.css('p-card')) + .nativeElement.classList.contains('dot-apps-card__disabled') + ).toBeTruthy(); + }); + + it('should have avatar with right values', () => { + expect(fixture.debugElement.query(By.css('dot-avatar')).componentInstance.showDot).toBe( + false + ); + }); + + it('should set messages/values in DOM correctly', () => { + expect( + fixture.debugElement.query(By.css('.dot-apps-card__configurations')).nativeElement + .textContent + ).toContain(messageServiceMock.get('apps.no.configurations')); + }); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-list/dot-apps-card/dot-apps-card.component.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-list/dot-apps-card/dot-apps-card.component.ts new file mode 100644 index 000000000000..a27dfbf976ff --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-list/dot-apps-card/dot-apps-card.component.ts @@ -0,0 +1,13 @@ +import { Component, Input, Output, EventEmitter } from '@angular/core'; + +import { DotApps } from '@shared/models/dot-apps/dot-apps.model'; + +@Component({ + selector: 'dot-apps-card', + templateUrl: './dot-apps-card.component.html', + styleUrls: ['./dot-apps-card.component.scss'] +}) +export class DotAppsCardComponent { + @Input() app: DotApps; + @Output() actionFired = new EventEmitter(); +} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-list/dot-apps-card/dot-apps-card.module.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-list/dot-apps-card/dot-apps-card.module.ts new file mode 100644 index 000000000000..410a03f58dcf --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-list/dot-apps-card/dot-apps-card.module.ts @@ -0,0 +1,26 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; + +import { DotAppsCardComponent } from './dot-apps-card.component'; +import { DotAvatarModule } from '@components/_common/dot-avatar/dot-avatar.module'; +import { DotIconModule } from '@dotcms/ui'; +import { DotPipesModule } from '@pipes/dot-pipes.module'; + +import { CardModule } from 'primeng/card'; +import { TooltipModule } from 'primeng/tooltip'; +import { MarkdownModule } from 'ngx-markdown'; + +@NgModule({ + imports: [ + CommonModule, + CardModule, + DotAvatarModule, + DotIconModule, + MarkdownModule.forChild(), + TooltipModule, + DotPipesModule + ], + declarations: [DotAppsCardComponent], + exports: [DotAppsCardComponent] +}) +export class DotAppsCardModule {} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-list/dot-apps-list-resolver.service.spec.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-list/dot-apps-list-resolver.service.spec.ts new file mode 100644 index 000000000000..ed1fe09c0785 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-list/dot-apps-list-resolver.service.spec.ts @@ -0,0 +1,63 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ + +import { of as observableOf, of } from 'rxjs'; +import { TestBed } from '@angular/core/testing'; +import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router'; +import { DotAppsListResolver } from './dot-apps-list-resolver.service'; +import { DotLicenseService } from '@services/dot-license/dot-license.service'; +import { DotAppsService } from '@services/dot-apps/dot-apps.service'; +import { appsResponse, AppsServicesMock } from './dot-apps-list.component.spec'; + +class DotLicenseServicesMock { + canAccessEnterprisePortlet(_url: string) { + of(true); + } +} + +const activatedRouteSnapshotMock: any = jasmine.createSpyObj( + 'ActivatedRouteSnapshot', + ['toString'] +); + +const routerStateSnapshotMock = jasmine.createSpyObj('RouterStateSnapshot', [ + 'toString' +]); +routerStateSnapshotMock.url = '/apps'; + +describe('DotAppsListResolver', () => { + let dotLicenseServices: DotLicenseService; + let dotAppsService: DotAppsService; + let dotAppsListResolver: DotAppsListResolver; + + beforeEach(() => { + const testbed = TestBed.configureTestingModule({ + providers: [ + DotAppsListResolver, + { provide: DotLicenseService, useClass: DotLicenseServicesMock }, + { provide: DotAppsService, useClass: AppsServicesMock }, + { + provide: ActivatedRouteSnapshot, + useValue: activatedRouteSnapshotMock + } + ] + }); + dotAppsService = testbed.get(DotAppsService); + dotLicenseServices = testbed.get(DotLicenseService); + dotAppsListResolver = testbed.get(DotAppsListResolver); + }); + + it('should get if portlet can be accessed', () => { + spyOn(dotLicenseServices, 'canAccessEnterprisePortlet').and.returnValue(observableOf(true)); + spyOn(dotAppsService, 'get').and.returnValue(of(appsResponse)); + + dotAppsListResolver + .resolve(activatedRouteSnapshotMock, routerStateSnapshotMock) + .subscribe((resolverData: any) => { + expect(resolverData).toEqual({ + apps: appsResponse, + isEnterpriseLicense: true + }); + }); + expect(dotLicenseServices.canAccessEnterprisePortlet).toHaveBeenCalledWith('/apps'); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-list/dot-apps-list-resolver.service.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-list/dot-apps-list-resolver.service.ts new file mode 100644 index 000000000000..cf3aa2d28470 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-list/dot-apps-list-resolver.service.ts @@ -0,0 +1,49 @@ +import { Observable, of } from 'rxjs'; +import { Injectable } from '@angular/core'; +import { Resolve, RouterStateSnapshot, ActivatedRouteSnapshot } from '@angular/router'; +import { DotLicenseService } from '@services/dot-license/dot-license.service'; +import { map, mergeMap, take } from 'rxjs/operators'; +import { DotApps, DotAppsListResolverData } from '@shared/models/dot-apps/dot-apps.model'; +import { DotAppsService } from '@services/dot-apps/dot-apps.service'; + +/** + * Returns apps list from the system + * + * @export + * @class DotAppsListResolver + * @implements {Resolve} + */ +@Injectable() +export class DotAppsListResolver implements Resolve { + constructor( + private dotLicenseService: DotLicenseService, + private dotAppsService: DotAppsService + ) {} + + resolve( + _route: ActivatedRouteSnapshot, + state: RouterStateSnapshot + ): Observable { + return this.dotLicenseService.canAccessEnterprisePortlet(state.url).pipe( + take(1), + mergeMap((enterpriseLicense: boolean) => { + if (enterpriseLicense) { + return this.dotAppsService.get().pipe( + take(1), + map((apps: DotApps[]) => { + return { + isEnterpriseLicense: enterpriseLicense, + apps: apps + }; + }) + ); + } + + return of({ + isEnterpriseLicense: false, + apps: [] + }); + }) + ); + } +} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-list/dot-apps-list.component.html b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-list/dot-apps-list.component.html new file mode 100644 index 000000000000..babf18cf63f1 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-list/dot-apps-list.component.html @@ -0,0 +1,53 @@ + +
+
+ + +
+
+ +
+
+
+ + diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-list/dot-apps-list.component.scss b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-list/dot-apps-list.component.scss new file mode 100644 index 000000000000..b53f4559a847 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-list/dot-apps-list.component.scss @@ -0,0 +1,58 @@ +@use "variables" as *; + +:host { + background: $gray-bg; + box-shadow: $md-shadow-4; + display: flex; + height: 100%; + padding: $spacing-4; +} + +.dot-apps__header { + border-bottom: 1px solid $gray-light; + display: flex; + justify-content: space-between; + padding: 0 $spacing-4 $spacing-4; + width: 100%; + + input { + width: 31.42rem; + } + + button:first-child { + margin-right: $spacing-1; + } +} + +.dot-apps__header-actions { + display: flex; +} + +.dot-apps__header-info { + align-self: center; + display: flex; + margin-right: $spacing-4; + + dot-icon { + margin-right: $spacing-1; + } +} + +.dot-apps-configuration__action_import_button { + margin-right: $spacing-1; +} + +.dot-apps__body { + display: grid; + grid-gap: $spacing-4; + grid-template-columns: repeat(auto-fill, minmax(23.42rem, 1fr)); + padding: $spacing-4; +} + +.dot-apps__container { + background-color: $white; + box-shadow: $md-shadow-4; + overflow-y: auto; + padding-top: $spacing-4; + width: 100%; +} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-list/dot-apps-list.component.spec.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-list/dot-apps-list.component.spec.ts new file mode 100644 index 000000000000..768360645534 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-list/dot-apps-list.component.spec.ts @@ -0,0 +1,232 @@ +import { ActivatedRoute } from '@angular/router'; +import { By } from '@angular/platform-browser'; +import { ComponentFixture, TestBed } from '@angular/core/testing'; +import { CoreWebService } from '@dotcms/dotcms-js'; +import { of } from 'rxjs'; + +import { CoreWebServiceMock } from '@tests/core-web.service.mock'; +import { DotAppsListComponent } from './dot-apps-list.component'; +import { DotAppsService } from '@services/dot-apps/dot-apps.service'; +import { DotMessagePipe } from '@pipes/dot-message/dot-message.pipe'; +import { DotMessageService } from '@services/dot-message/dot-messages.service'; +import { DotRouterService } from '@services/dot-router/dot-router.service'; + +import { MockDotMessageService } from '@tests/dot-message-service.mock'; +import { MockDotRouterService } from '@tests/dot-router-service.mock'; +import { MockDotNotLicensedComponent } from '@tests/dot-not-licensed.component.mock'; +import { Component, EventEmitter, Input, Output } from '@angular/core'; +import { DotApps } from '@shared/models/dot-apps/dot-apps.model'; +import { ButtonModule } from 'primeng/button'; + +export class AppsServicesMock { + get() { + return of({}); + } +} + +export const appsResponse = [ + { + allowExtraParams: true, + configurationsCount: 0, + key: 'google-calendar', + name: 'Google Calendar', + description: "It's a tool to keep track of your life's events", + iconUrl: '/dA/d948d85c-3bc8-4d85-b0aa-0e989b9ae235/photo/surfer-profile.jpg' + }, + { + allowExtraParams: true, + configurationsCount: 1, + key: 'asana', + name: 'Asana', + description: "It's asana to keep track of your asana events", + iconUrl: '/dA/792c7c9f-6b6f-427b-80ff-1643376c9999/photo/mountain-persona.jpg' + } +]; + +@Component({ + selector: 'dot-apps-card', + template: '' +}) +class MockDotAppsCardComponent { + @Input() app: DotApps; + @Output() actionFired = new EventEmitter(); +} + +@Component({ + selector: 'dot-icon', + template: '' +}) +class MockDotIconComponent { + @Input() name: string; +} + +@Component({ + selector: 'dot-apps-import-export-dialog', + template: '' +}) +class MockDotAppsImportExportDialogComponent { + @Input() action: string; + @Input() show: boolean; + @Output() resolved = new EventEmitter(); +} + +let canAccessPortletResponse = { + dotAppsListResolverData: { + apps: appsResponse, + isEnterpriseLicense: true + } +}; + +class ActivatedRouteMock { + get data() { + return of(canAccessPortletResponse); + } +} + +describe('DotAppsListComponent', () => { + let component: DotAppsListComponent; + let fixture: ComponentFixture; + let routerService: DotRouterService; + let route: ActivatedRoute; + let dotAppsService: DotAppsService; + + const messageServiceMock = new MockDotMessageService({ + 'apps.search.placeholder': 'Search', + 'apps.confirmation.import.button': 'Import', + 'apps.confirmation.export.all.button': 'Export' + }); + + beforeEach(() => { + TestBed.configureTestingModule({ + declarations: [ + DotAppsListComponent, + MockDotAppsCardComponent, + MockDotNotLicensedComponent, + DotMessagePipe, + MockDotAppsImportExportDialogComponent, + MockDotIconComponent + ], + imports: [ButtonModule], + providers: [ + { provide: CoreWebService, useClass: CoreWebServiceMock }, + { + provide: ActivatedRoute, + useClass: ActivatedRouteMock + }, + { + provide: DotRouterService, + useClass: MockDotRouterService + }, + { provide: DotAppsService, useClass: AppsServicesMock }, + { + provide: DotMessageService, + useValue: messageServiceMock + } + ] + }).compileComponents(); + + fixture = TestBed.createComponent(DotAppsListComponent); + component = fixture.debugElement.componentInstance; + routerService = TestBed.inject(DotRouterService); + route = TestBed.inject(ActivatedRoute); + dotAppsService = TestBed.inject(DotAppsService); + }); + + describe('With access to portlet', () => { + beforeEach(() => { + spyOnProperty(route, 'data').and.returnValue( + of({ dotAppsListResolverData: { apps: appsResponse, isEnterpriseLicense: true } }) + ); + fixture.detectChanges(); + }); + + it('should set App from resolver', () => { + expect(component.apps).toBe(appsResponse); + expect(component.appsCopy).toEqual(appsResponse); + }); + + it('should contain 2 app configurations', () => { + expect(fixture.debugElement.queryAll(By.css('dot-apps-card')).length).toBe(2); + }); + + it('should contain a dot-icon and a link with info on how to create apps', () => { + const link = fixture.debugElement.query(By.css('.dot-apps__header-info a')); + const icon = fixture.debugElement.query(By.css('.dot-apps__header-info dot-icon')); + expect(link.nativeElement.href).toBe( + 'https://dotcms.com/docs/latest/apps-integrations' + ); + expect(link.nativeElement.target).toBe('_blank'); + expect(icon.componentInstance.name).toBe('help'); + }); + + it('should set messages to Search Input', () => { + expect(fixture.debugElement.query(By.css('input')).nativeElement.placeholder).toBe( + messageServiceMock.get('apps.search.placeholder') + ); + }); + + it('should set app data to service Card', () => { + expect( + fixture.debugElement.queryAll(By.css('dot-apps-card'))[0].componentInstance.app + ).toEqual(appsResponse[0]); + }); + + it('should export All button be enabled', () => { + const exportAllBtn = fixture.debugElement.query( + By.css('.dot-apps-configuration__action_export_button') + ); + expect(exportAllBtn.nativeElement.disabled).toBe(false); + }); + + it('should open confirm dialog and export All configurations', () => { + const exportAllBtn = fixture.debugElement.query( + By.css('.dot-apps-configuration__action_export_button') + ); + exportAllBtn.triggerEventHandler('click', 'Export'); + expect(component.showDialog).toBe(true); + expect(component.importExportDialogAction).toBe('Export'); + }); + + it('should open confirm dialog and import configurations', () => { + const importBtn = fixture.debugElement.query( + By.css('.dot-apps-configuration__action_import_button') + ); + importBtn.triggerEventHandler('click', 'Import'); + expect(component.showDialog).toBe(true); + expect(component.importExportDialogAction).toBe('Import'); + }); + + it('should reload apps data when resolve action from Import/Export dialog', () => { + spyOn(dotAppsService, 'get').and.returnValue(of(appsResponse)); + const importExportDialog = fixture.debugElement.query( + By.css('dot-apps-import-export-dialog') + ); + importExportDialog.componentInstance.resolved.emit(true); + expect(dotAppsService.get).toHaveBeenCalledTimes(1); + }); + + it('should redirect to detail configuration list page when app Card clicked', () => { + const card: MockDotAppsCardComponent = fixture.debugElement.queryAll( + By.css('dot-apps-card') + )[0].componentInstance; + card.actionFired.emit(component.apps[0].key); + expect(routerService.goToAppsConfiguration).toHaveBeenCalledWith(component.apps[0].key); + }); + }); + + describe('Without access to portlet', () => { + beforeEach(() => { + canAccessPortletResponse = { + dotAppsListResolverData: { + apps: null, + isEnterpriseLicense: false + } + }; + fixture.detectChanges(); + }); + + it('should display not licensed component', () => { + expect(fixture.debugElement.query(By.css('dot-not-licensed-component'))).toBeTruthy(); + }); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-list/dot-apps-list.component.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-list/dot-apps-list.component.ts new file mode 100644 index 000000000000..e87ea9f3e98c --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-list/dot-apps-list.component.ts @@ -0,0 +1,125 @@ +import { Component, OnInit, ViewChild, ElementRef, OnDestroy } from '@angular/core'; +import { debounceTime, pluck, take, takeUntil } from 'rxjs/operators'; +import { fromEvent as observableFromEvent, Subject } from 'rxjs'; +import { DotApps, DotAppsListResolverData } from '@shared/models/dot-apps/dot-apps.model'; +import * as _ from 'lodash'; +import { DotRouterService } from '@services/dot-router/dot-router.service'; +import { ActivatedRoute } from '@angular/router'; +import { DotAppsService } from '@services/dot-apps/dot-apps.service'; +import { DotAppsImportExportDialogComponent } from '../dot-apps-import-export-dialog/dot-apps-import-export-dialog.component'; + +@Component({ + selector: 'dot-apps-list', + templateUrl: './dot-apps-list.component.html', + styleUrls: ['./dot-apps-list.component.scss'] +}) +export class DotAppsListComponent implements OnInit, OnDestroy { + @ViewChild('searchInput') searchInput: ElementRef; + @ViewChild('importExportDialog') importExportDialog: DotAppsImportExportDialogComponent; + apps: DotApps[]; + appsCopy: DotApps[]; + canAccessPortlet: boolean; + importExportDialogAction: string; + showDialog = false; + + private destroy$: Subject = new Subject(); + + constructor( + private route: ActivatedRoute, + private dotRouterService: DotRouterService, + private dotAppsService: DotAppsService + ) {} + + ngOnInit() { + this.route.data + .pipe(pluck('dotAppsListResolverData'), takeUntil(this.destroy$)) + .subscribe((resolverData: DotAppsListResolverData) => { + if (resolverData.isEnterpriseLicense) { + this.getApps(resolverData.apps); + } + this.canAccessPortlet = resolverData.isEnterpriseLicense; + }); + } + + ngOnDestroy(): void { + this.destroy$.next(true); + this.destroy$.complete(); + } + + /** + * Redirects to apps configuration listing page + * + * @param string key + * @memberof DotAppsListComponent + */ + goToApp(key: string): void { + this.dotRouterService.goToAppsConfiguration(key); + } + + /** + * Opens the Import/Export dialog for all configurations + * + * @memberof DotAppsConfigurationComponent + */ + confirmImportExport(action: string): void { + this.showDialog = true; + this.importExportDialogAction = action; + } + + /** + * Updates dialog show/hide state + * + * @memberof DotAppsConfigurationComponent + */ + onClosedDialog(): void { + this.showDialog = false; + } + + /** + * Checks if export button is disabled based on existing configurations + * + * @returns {boolean} + * @memberof DotAppsListComponent + */ + isExportButtonDisabled(): boolean { + return this.apps.filter((app: DotApps) => app.configurationsCount).length > 0; + } + + /** + * Reloads data of all apps configuration listing to update the UI + * + * @memberof DotAppsListComponent + */ + reloadAppsData(): void { + this.dotAppsService + .get() + .pipe(take(1)) + .subscribe((apps: DotApps[]) => { + this.getApps(apps); + }); + } + + private getApps(apps: DotApps[]): void { + this.apps = apps; + this.appsCopy = _.cloneDeep(apps); + setTimeout(() => { + this.attachFilterEvents(); + }, 0); + } + + private attachFilterEvents(): void { + observableFromEvent(this.searchInput.nativeElement, 'keyup') + .pipe(debounceTime(500), takeUntil(this.destroy$)) + .subscribe((keyboardEvent: Event) => { + this.filterApps(keyboardEvent.target['value']); + }); + + this.searchInput.nativeElement.focus(); + } + + private filterApps(searchCriteria?: string): void { + this.dotAppsService.get(searchCriteria).subscribe((apps: DotApps[]) => { + this.appsCopy = apps; + }); + } +} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-list/dot-apps-list.module.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-list/dot-apps-list.module.ts new file mode 100644 index 000000000000..bc426c1f8a92 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-list/dot-apps-list.module.ts @@ -0,0 +1,30 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { InputTextModule } from 'primeng/inputtext'; + +import { DotAppsListComponent } from './dot-apps-list.component'; +import { DotAppsCardModule } from './dot-apps-card/dot-apps-card.module'; +import { DotAppsService } from '@services/dot-apps/dot-apps.service'; +import { DotAppsListResolver } from './dot-apps-list-resolver.service'; +import { DotPipesModule } from '@pipes/dot-pipes.module'; +import { NotLicensedModule } from '@components/not-licensed/not-licensed.module'; +import { ButtonModule } from 'primeng/button'; +import { DotAppsImportExportDialogModule } from '../dot-apps-import-export-dialog/dot-apps-import-export-dialog.module'; +import { DotIconModule } from '@dotcms/ui'; + +@NgModule({ + imports: [ + InputTextModule, + CommonModule, + ButtonModule, + DotAppsCardModule, + DotPipesModule, + DotAppsImportExportDialogModule, + NotLicensedModule, + DotIconModule + ], + declarations: [DotAppsListComponent], + exports: [DotAppsListComponent], + providers: [DotAppsService, DotAppsListResolver] +}) +export class DotAppsListModule {} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-routing.module.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-routing.module.ts new file mode 100644 index 000000000000..3cc86bf127e1 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-routing.module.ts @@ -0,0 +1,45 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; +import { DotAppsListComponent } from './dot-apps-list/dot-apps-list.component'; +import { DotAppsListResolver } from './dot-apps-list/dot-apps-list-resolver.service'; +import { DotAppsConfigurationComponent } from './dot-apps-configuration/dot-apps-configuration.component'; +import { DotAppsConfigurationResolver } from './dot-apps-configuration/dot-apps-configuration-resolver.service'; +import { DotAppsConfigurationDetailComponent } from '@portlets/dot-apps/dot-apps-configuration-detail/dot-apps-configuration-detail.component'; +import { DotAppsConfigurationDetailResolver } from '@portlets/dot-apps/dot-apps-configuration-detail/dot-apps-configuration-detail-resolver.service'; + +const routes: Routes = [ + { + component: DotAppsConfigurationDetailComponent, + path: ':appKey/create/:id', + resolve: { + data: DotAppsConfigurationDetailResolver + } + }, + { + component: DotAppsConfigurationDetailComponent, + path: ':appKey/edit/:id', + resolve: { + data: DotAppsConfigurationDetailResolver + } + }, + { + component: DotAppsConfigurationComponent, + path: ':appKey', + resolve: { + data: DotAppsConfigurationResolver + } + }, + { + path: '', + component: DotAppsListComponent, + resolve: { + dotAppsListResolverData: DotAppsListResolver + } + } +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] +}) +export class DotAppsRoutingModule {} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps.module.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps.module.ts new file mode 100644 index 000000000000..2177a027cc49 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps.module.ts @@ -0,0 +1,16 @@ +import { NgModule } from '@angular/core'; + +import { DotAppsRoutingModule } from './dot-apps-routing.module'; +import { DotAppsListModule } from './dot-apps-list/dot-apps-list.module'; +import { DotAppsConfigurationModule } from './dot-apps-configuration/dot-apps-configuration.module'; +import { DotAppsConfigurationDetailModule } from '@portlets/dot-apps/dot-apps-configuration-detail/dot-apps-configuration-detail.module'; + +@NgModule({ + imports: [ + DotAppsListModule, + DotAppsConfigurationModule, + DotAppsConfigurationDetailModule, + DotAppsRoutingModule + ] +}) +export class DotAppsModule {} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-content-types/dot-content-types-routing.module.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-content-types/dot-content-types-routing.module.ts new file mode 100644 index 000000000000..b013ba72c0d3 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-content-types/dot-content-types-routing.module.ts @@ -0,0 +1,49 @@ +import { NgModule } from '@angular/core'; +import { RouterModule, Routes } from '@angular/router'; +import { DotContentTypeEditResolver } from '../shared/dot-content-types-edit/dot-content-types-edit-resolver.service'; +import { + DotContentTypesPortletComponent, + DotContentTypesListingModule +} from '@portlets/shared/dot-content-types-listing'; + +const contentTypesRoutes: Routes = [ + { + component: DotContentTypesPortletComponent, + path: '' + }, + { + path: 'create', + redirectTo: '' + }, + { + loadChildren: () => + import('@portlets/shared/dot-content-types-edit/dot-content-types-edit.module').then( + (m) => m.DotContentTypesEditModule + ), + path: 'create/:type', + resolve: { + contentType: DotContentTypeEditResolver + } + }, + { + path: 'edit', + redirectTo: '' + }, + { + loadChildren: () => + import('@portlets/shared/dot-content-types-edit/dot-content-types-edit.module').then( + (m) => m.DotContentTypesEditModule + ), + path: 'edit/:id', + resolve: { + contentType: DotContentTypeEditResolver + } + } +]; + +@NgModule({ + exports: [RouterModule], + imports: [DotContentTypesListingModule, RouterModule.forChild(contentTypesRoutes)], + providers: [DotContentTypeEditResolver] +}) +export class DotContentTypesRoutingModule {} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-content-types/dot-content-types.module.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-content-types/dot-content-types.module.ts new file mode 100644 index 000000000000..60a680c394cf --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-content-types/dot-content-types.module.ts @@ -0,0 +1,8 @@ +import { CommonModule } from '@angular/common'; +import { NgModule } from '@angular/core'; +import { DotContentTypesRoutingModule } from './dot-content-types-routing.module'; + +@NgModule({ + imports: [CommonModule, DotContentTypesRoutingModule] +}) +export class DotContentTypesModule {} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-edit-page-info/dot-edit-page-info.component.html b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-edit-page-info/dot-edit-page-info.component.html new file mode 100644 index 000000000000..69496ac89cf7 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-edit-page-info/dot-edit-page-info.component.html @@ -0,0 +1,7 @@ +

{{ title }}

+ + diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-edit-page-info/dot-edit-page-info.component.scss b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-edit-page-info/dot-edit-page-info.component.scss new file mode 100644 index 000000000000..aa490274ccdf --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-edit-page-info/dot-edit-page-info.component.scss @@ -0,0 +1,19 @@ +@use "variables" as *; +@import "mixins"; + +dot-api-link { + margin-left: $spacing-1; +} + +:host { + align-items: center; + display: flex; +} + +h2 { + margin: 0 $spacing-1 0 0; + align-self: center; + color: $body-font-color; + font-size: $font-size-xx-large; + font-weight: normal; +} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-edit-page-info/dot-edit-page-info.component.spec.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-edit-page-info/dot-edit-page-info.component.spec.ts new file mode 100644 index 000000000000..fd51beecf58e --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-edit-page-info/dot-edit-page-info.component.spec.ts @@ -0,0 +1,88 @@ +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { By } from '@angular/platform-browser'; +import { DebugElement } from '@angular/core'; + +import { DotApiLinkModule } from '@components/dot-api-link/dot-api-link.module'; +import { DotCopyButtonModule } from '@components/dot-copy-button/dot-copy-button.module'; +import { DotEditPageInfoComponent } from './dot-edit-page-info.component'; + +import { DotMessagePipe } from '@pipes/dot-message/dot-message.pipe'; +import { DotMessageService } from '@services/dot-message/dot-messages.service'; + +describe('DotEditPageInfoComponent', () => { + let component: DotEditPageInfoComponent; + let fixture: ComponentFixture; + let de: DebugElement; + + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [DotEditPageInfoComponent, DotMessagePipe], + imports: [DotApiLinkModule, DotCopyButtonModule], + providers: [ + { + provide: DotMessageService, + useValue: { + get() { + return 'Copy url page'; + } + } + } + ] + }).compileComponents(); + }) + ); + + beforeEach(() => { + fixture = TestBed.createComponent(DotEditPageInfoComponent); + component = fixture.componentInstance; + de = fixture.debugElement; + }); + + describe('default', () => { + beforeEach(() => { + component.apiLink = '/api/v1/page/render/an/url/test?language_id=1'; + component.title = 'A title'; + component.url = 'http://demo.dotcms.com:9876/an/url/test'; + fixture.detectChanges(); + }); + + it('should set page title', () => { + const pageTitleEl: HTMLElement = de.query(By.css('h2')).nativeElement; + expect(pageTitleEl.textContent).toContain('A title'); + }); + + it('should have api link', () => { + const apiLink: DebugElement = de.query(By.css('dot-api-link')); + expect(apiLink.componentInstance.link).toBe( + '/api/v1/page/render/an/url/test?language_id=1' + ); + }); + + it('should have copy button', () => { + const button: DebugElement = de.query(By.css('dot-copy-button ')); + expect(button.componentInstance.copy).toBe('http://demo.dotcms.com:9876/an/url/test'); + expect(button.componentInstance.tooltipText).toBe('Copy url page'); + }); + }); + + describe('hidden', () => { + beforeEach(() => { + component.title = 'A title'; + component.apiLink = ''; + component.url = ''; + + fixture.detectChanges(); + }); + + it('should not have api link', () => { + const apiLink: DebugElement = de.query(By.css('dot-api-link')); + expect(apiLink).toBeNull(); + }); + + it('should not have copy button', () => { + const button: DebugElement = de.query(By.css('dot-copy-button ')); + expect(button).toBeNull(); + }); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-edit-page-info/dot-edit-page-info.component.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-edit-page-info/dot-edit-page-info.component.ts new file mode 100644 index 000000000000..f996ee449d7d --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-edit-page-info/dot-edit-page-info.component.ts @@ -0,0 +1,19 @@ +import { Component, Input } from '@angular/core'; + +/** + * Basic page information for edit mode + * + * @export + * @class DotEditPageInfoComponent + * @implements {OnInit} + */ +@Component({ + selector: 'dot-edit-page-info', + templateUrl: './dot-edit-page-info.component.html', + styleUrls: ['./dot-edit-page-info.component.scss'] +}) +export class DotEditPageInfoComponent { + @Input() title: string; + @Input() url: string; + @Input() apiLink: string; +} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-edit-page-info/dot-edit-page-info.module.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-edit-page-info/dot-edit-page-info.module.ts new file mode 100644 index 000000000000..8bda8a02dc1b --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-edit-page-info/dot-edit-page-info.module.ts @@ -0,0 +1,16 @@ +import { CommonModule } from '@angular/common'; +import { NgModule } from '@angular/core'; +import { DotEditPageInfoComponent } from './dot-edit-page-info.component'; +import { ButtonModule } from 'primeng/button'; +import { DotCopyButtonModule } from '@components/dot-copy-button/dot-copy-button.module'; +import { DotApiLinkModule } from '@components/dot-api-link/dot-api-link.module'; +import { LOCATION_TOKEN } from '@dotcms/app/providers'; +import { DotPipesModule } from '@pipes/dot-pipes.module'; + +@NgModule({ + imports: [CommonModule, ButtonModule, DotCopyButtonModule, DotApiLinkModule, DotPipesModule], + exports: [DotEditPageInfoComponent], + declarations: [DotEditPageInfoComponent], + providers: [{ provide: LOCATION_TOKEN, useValue: window.location }] +}) +export class DotEditPageInfoModule {} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette-content-type/dot-palette-content-type.component.html b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette-content-type/dot-palette-content-type.component.html new file mode 100644 index 000000000000..98fdb633d1a9 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette-content-type/dot-palette-content-type.component.html @@ -0,0 +1,24 @@ + +
+
+ +

{{ item.name }}

+ +
+
+ + + {{ 'No-Results' | dm }} + diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette-content-type/dot-palette-content-type.component.scss b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette-content-type/dot-palette-content-type.component.scss new file mode 100644 index 000000000000..229de5e2de7d --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette-content-type/dot-palette-content-type.component.scss @@ -0,0 +1,69 @@ +@use "libs/dot-primeng-theme-styles/src/scss/variables" as *; + +:host { + width: $content-palette-width; + min-width: $content-palette-width; + display: flex; + flex-direction: column; + padding: $spacing-1; + border-left: 1px solid $gray-lighter; + background: $white; + transition: all $basic-speed ease-in-out; + height: 100%; +} + +.dot-content-palette__items { + display: grid; + grid-template-columns: 1fr 1fr; + grid-gap: $spacing-1; + grid-auto-rows: 6rem; + overflow: hidden auto; + + div { + border: 1px solid $gray-lighter; + color: $black; + cursor: grab; + overflow: hidden; + padding: 1rem $spacing-1; + position: relative; + text-align: center; + + &:hover { + background: $gray-bg; + } + + p { + font-size: $font-size-small; + margin: $spacing-1 0 0; + overflow: hidden; + text-align: center; + text-overflow: ellipsis; + white-space: nowrap; + width: 100%; + } + + .arrow { + background-color: transparent; + border: none; + color: $gray; + cursor: pointer; + padding: 0; + position: absolute; + right: 0; + top: 0; + width: 32px; + height: 32px; + display: flex; + align-items: flex-start; + justify-content: flex-end; + } + } +} + +.dot-content-palette__empty { + text-align: center; + padding: $spacing-1 0; + margin: $spacing-4; +} + + diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette-content-type/dot-palette-content-type.component.spec.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette-content-type/dot-palette-content-type.component.spec.ts new file mode 100644 index 000000000000..b82157699c75 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette-content-type/dot-palette-content-type.component.spec.ts @@ -0,0 +1,146 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ + +import { ComponentFixture, TestBed } from '@angular/core/testing'; +import { DotPipesModule } from '@pipes/dot-pipes.module'; +import { DotIconModule } from '@dotcms/ui'; +import { DotCMSContentType } from '@dotcms/dotcms-models'; +import { By } from '@angular/platform-browser'; +import { Component, DebugElement, EventEmitter, Injectable, Input, Output } from '@angular/core'; +import { DotContentletEditorService } from '@components/dot-contentlet-editor/services/dot-contentlet-editor.service'; +import { DotFilterPipeModule } from '@pipes/dot-filter/dot-filter-pipe.module'; +import { FormsModule } from '@angular/forms'; +import { DotPaletteContentTypeComponent } from './dot-palette-content-type.component'; +import { DotPaletteInputFilterModule } from '../dot-palette-input-filter/dot-palette-input-filter.module'; +import { HttpClientTestingModule } from '@angular/common/http/testing'; +import { CoreWebService, CoreWebServiceMock } from '@dotcms/dotcms-js'; + +export const contentTypeDataMock = [ + { + baseType: 'Product', + clazz: '', + defaultType: false, + icon: 'cloud', + id: 'a1661fbc-9e84-4c00-bd62-76d633170da3', + name: 'Product', + variable: 'Product' + }, + { + baseType: 'Blog', + clazz: '', + defaultType: false, + icon: 'alt_route', + id: '799f176a-d32e-4844-a07c-1b5fcd107578', + name: 'Blog', + variable: 'Blog' + }, + { + baseType: 'Form', + clazz: '', + defaultType: false, + icon: 'cloud', + id: '897cf4a9-171a-4204-accb-c1b498c813fe', + name: 'Contact', + variable: 'Form' + }, + { + baseType: 'Text', + clazz: '', + defaultType: false, + icon: 'person', + id: '6044a806-f462-4977-a353-57539eac2a2c', + name: 'Long name Blog Comment', + variable: 'Text' + } +]; + +@Component({ + selector: 'dot-test-host-component', + template: ` ` +}) +class TestHostComponent { + @Input() items: any[]; + @Output() filter = new EventEmitter(); +} + +@Injectable() +class MockDotContentletEditorService { + setDraggedContentType = jasmine.createSpy('setDraggedContentType'); +} + +describe('DotPaletteContentTypeComponent', () => { + let fixtureHost: ComponentFixture; + let componentHost: TestHostComponent; + let dotContentletEditorService: DotContentletEditorService; + let de: DebugElement; + + beforeEach(() => { + TestBed.configureTestingModule({ + declarations: [TestHostComponent, DotPaletteContentTypeComponent], + imports: [ + DotPipesModule, + DotIconModule, + DotFilterPipeModule, + FormsModule, + DotPaletteInputFilterModule, + HttpClientTestingModule + ], + providers: [ + { provide: DotContentletEditorService, useClass: MockDotContentletEditorService }, + { provide: CoreWebService, useClass: CoreWebServiceMock } + ] + }); + + fixtureHost = TestBed.createComponent(TestHostComponent); + componentHost = fixtureHost.componentInstance; + + de = fixtureHost.debugElement.query(By.css('dot-palette-content-type')); + dotContentletEditorService = de.injector.get(DotContentletEditorService); + + fixtureHost.detectChanges(); + }); + + it('should list items correctly', () => { + componentHost.items = contentTypeDataMock; + fixtureHost.detectChanges(); + const contents = fixtureHost.debugElement.queryAll(By.css('[data-testId="paletteItem"]')); + expect(contents.length).toEqual(4); + expect(contents[0].nativeElement.draggable).toEqual(true); + }); + + it('should show empty state', () => { + componentHost.items = []; + fixtureHost.detectChanges(); + const emptyState = fixtureHost.debugElement.query(By.css('[data-testId="emptyState"]')); + expect(emptyState).not.toBeNull(); + }); + + it('should filter items on search', () => { + componentHost.items = contentTypeDataMock; + fixtureHost.detectChanges(); + const input = fixtureHost.debugElement.query(By.css('dot-palette-input-filter')); + input.componentInstance.filter.emit('Product'); + fixtureHost.detectChanges(); + const contents = fixtureHost.debugElement.queryAll(By.css('[data-testId="paletteItem"]')); + expect(contents.length).toEqual(1); + }); + + it('should set Dragged ContentType on dragStart', () => { + componentHost.items = contentTypeDataMock; + fixtureHost.detectChanges(); + const content = fixtureHost.debugElement.query(By.css('[data-testId="paletteItem"]')); + content.triggerEventHandler('dragstart', contentTypeDataMock[0]); + expect(dotContentletEditorService.setDraggedContentType).toHaveBeenCalledOnceWith( + contentTypeDataMock[0] as DotCMSContentType + ); + }); + + it('should emit event to show a specific contentlet', () => { + componentHost.items = contentTypeDataMock; + spyOn(de.componentInstance.selected, 'emit').and.callThrough(); + fixtureHost.detectChanges(); + const buttons = fixtureHost.debugElement.queryAll(By.css('[data-testId="paletteItem"]')); + buttons[3].nativeElement.click(); + expect(de.componentInstance.itemsFiltered).toEqual(contentTypeDataMock); + expect(de.componentInstance.selected.emit).toHaveBeenCalledWith('Text'); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette-content-type/dot-palette-content-type.component.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette-content-type/dot-palette-content-type.component.ts new file mode 100644 index 000000000000..7c20771f86b7 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette-content-type/dot-palette-content-type.component.ts @@ -0,0 +1,79 @@ +import { + Component, + EventEmitter, + Input, + OnChanges, + Output, + SimpleChanges, + ViewChild +} from '@angular/core'; +import { DotCMSContentType } from '@dotcms/dotcms-models'; +import { DotContentletEditorService } from '@components/dot-contentlet-editor/services/dot-contentlet-editor.service'; +import { DotPaletteInputFilterComponent } from '../dot-palette-input-filter/dot-palette-input-filter.component'; + +@Component({ + selector: 'dot-palette-content-type', + templateUrl: './dot-palette-content-type.component.html', + styleUrls: ['./dot-palette-content-type.component.scss'] +}) +export class DotPaletteContentTypeComponent implements OnChanges { + @ViewChild('filterInput', { static: true }) filterInput: DotPaletteInputFilterComponent; + + @Input() items: DotCMSContentType[] = []; + + @Output() selected = new EventEmitter(); + + itemsFiltered: DotCMSContentType[]; + + constructor(private dotContentletEditorService: DotContentletEditorService) {} + + ngOnChanges(changes: SimpleChanges) { + if (!changes?.items?.firstChange && changes?.items?.currentValue) { + this.itemsFiltered = [...this.items]; + } + } + + /** + * Set the content Type being dragged from the Content palette to dotContentletEditorService + * + * @param DotCMSContentType contentType + * @memberof DotPaletteContentTypeComponent + */ + dragStart(contentType: DotCMSContentType): void { + this.dotContentletEditorService.setDraggedContentType(contentType); + } + + /** + * Emits the Content Type variable name to show contentlets and clears + * component's local variables + * + * @param string contentTypeVariable + * @memberof DotPaletteContentTypeComponent + */ + showContentTypesList(contentTypeVariable: string): void { + this.filterInput.searchInput.nativeElement.value = ''; + this.itemsFiltered = [...this.items]; + this.selected.emit(contentTypeVariable); + } + + /** + * Does a filtering of the Content Types based on value from the filter component + * + * @param string value + * @memberof DotPaletteContentTypeComponent + */ + filterContentTypes(value: string): void { + this.itemsFiltered = this.items.filter((item) => + item.name?.toLowerCase().includes(value.toLowerCase()) + ); + } + + /** + * Focus the filter input + * + * @memberof DotPaletteContentTypeComponent + */ + focusInputFilter() { + this.filterInput.focus(); + } +} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette-content-type/dot-palette-content-type.module.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette-content-type/dot-palette-content-type.module.ts new file mode 100644 index 000000000000..55a681e437c1 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette-content-type/dot-palette-content-type.module.ts @@ -0,0 +1,18 @@ +import { NgModule } from '@angular/core'; +import { DotPaletteContentTypeComponent } from '@dotcms/app/portlets/dot-edit-page/components/dot-palette/dot-palette-content-type/dot-palette-content-type.component'; +import { CommonModule } from '@angular/common'; +import { DotPipesModule } from '@pipes/dot-pipes.module'; +import { DotIconModule } from '@dotcms/ui'; +import { DotPaletteInputFilterModule } from '../dot-palette-input-filter/dot-palette-input-filter.module'; + +@NgModule({ + imports: [ + CommonModule, + DotPipesModule, + DotIconModule, + DotPaletteInputFilterModule, + ], + declarations: [DotPaletteContentTypeComponent], + exports: [DotPaletteContentTypeComponent] +}) +export class DotPaletteContentTypeModule {} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette-contentlets/dot-palette-contentlets.component.html b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette-contentlets/dot-palette-contentlets.component.html new file mode 100644 index 000000000000..2bec512e69f6 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette-contentlets/dot-palette-contentlets.component.html @@ -0,0 +1,49 @@ + + +
+
+ + + + +

{{ item.title || item.name }}

+
+ +
+ + + + + +{{ 'No-Results' | dm }} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette-contentlets/dot-palette-contentlets.component.scss b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette-contentlets/dot-palette-contentlets.component.scss new file mode 100644 index 000000000000..f481cc7b958c --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette-contentlets/dot-palette-contentlets.component.scss @@ -0,0 +1,66 @@ +@use "libs/dot-primeng-theme-styles/src/scss/variables" as *; + +:host { + background: $white; + border-left: 1px solid $gray-lighter; + display: flex; + flex-direction: column; + height: 100%; + min-width: $content-palette-width; + padding: $spacing-1; + position: relative; + text-align: center; + transition: all $basic-speed ease-in-out; + width: $content-palette-width; +} + +.dot-content-palette__items { + margin-bottom: 50px; + overflow: hidden auto; + + div { + color: $black; + cursor: grab; + display: flex; + overflow: hidden; + padding: 0.25rem $spacing-1; + position: relative; + text-align: center; + + &:hover { + background: $gray-bg; + } + + img { + height: 48px; + object-fit: contain; + width: 48px; + } + + p { + align-self: center; + display: -webkit-box; + font-size: $font-size-small; + margin: 0 0 0 $spacing-1; + overflow: hidden; + text-align: left; + text-overflow: ellipsis; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + } + + } + + p-paginator { + bottom: 0; + left: 1px; + position: absolute; + width: 100%; + } +} + +.dot-content-palette__empty { + text-align: center; + padding: $spacing-1 0; + margin: $spacing-4; +} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette-contentlets/dot-palette-contentlets.component.spec.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette-contentlets/dot-palette-contentlets.component.spec.ts new file mode 100644 index 000000000000..3d980bfefd17 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette-contentlets/dot-palette-contentlets.component.spec.ts @@ -0,0 +1,234 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ + +import { ComponentFixture, TestBed } from '@angular/core/testing'; +import { DotPipesModule } from '@pipes/dot-pipes.module'; +import { DotIconModule, DotSpinnerModule } from '@dotcms/ui'; +import { By } from '@angular/platform-browser'; +import { Component, DebugElement, EventEmitter, Injectable, Input, Output } from '@angular/core'; +import { DotContentletEditorService } from '@components/dot-contentlet-editor/services/dot-contentlet-editor.service'; +import { DotFilterPipeModule } from '@pipes/dot-filter/dot-filter-pipe.module'; +import { FormsModule } from '@angular/forms'; +import { DotPaletteInputFilterModule } from '../dot-palette-input-filter/dot-palette-input-filter.module'; +import { HttpClientTestingModule } from '@angular/common/http/testing'; +import { CoreWebService, CoreWebServiceMock } from '@dotcms/dotcms-js'; +import { DotPaletteContentletsComponent } from './dot-palette-contentlets.component'; +import { PaginatorModule } from 'primeng/paginator'; +import { DotCMSContentlet } from '@dotcms/dotcms-models'; +import { LazyLoadEvent } from 'primeng/api'; + +export const contentletFormDataMock = { + baseType: 'FORM', + clazz: 'com.dotcms.contenttype.model.type.ImmutableFormContentType', + defaultType: false, + description: 'General Contact Form', + fixed: false, + folder: 'SYSTEM_FOLDER', + host: '48190c8c-42c4-46af-8d1a-0cd5db894797', + iDate: 1563384216000, + icon: 'person_add', + id: '897cf4a9-171a-4204-accb-c1b498c813fe', + layout: [], + modDate: 1637624574000, + multilingualable: false, + nEntries: 0, + name: 'Contact', + sortOrder: 0, + system: false, + variable: 'Contact', + versionable: true, + workflows: [] +}; + +export const contentletProductDataMock = { + baseType: 'CONTENT', + contentType: 'Product', + contentTypeIcon: 'inventory', + description: "

The Patagonia Women's Retro Pile...", + hasTitleImage: true, + identifier: 'c4ce9da8-f97b-4d43-b52d-99893f57e68a', + image: '/dA/c4ce9da8-f97b-4d43-b52d-99893f57e68a/image/women-vest.jpg', + inode: 'e95c60b6-138c-4f6b-b317-0af53f0b0fd4', + modDate: '2020-09-02 16:45:15.569', + stInode: 'a1661fbc-9e84-4c00-bd62-76d633170da3', + title: "Patagonia Women's Retro Pile Fleece Vest", + url: '/content.25b24d5b-1eb3-4cf0-9fe5-7739e442ff58', + __icon__: 'contentIcon' +}; + +@Component({ + selector: 'dot-test-host-component', + template: ` + + ` +}) +class TestHostComponent { + @Input() items: DotCMSContentlet[]; + @Input() loading: boolean; + @Input() totalRecords: number; + + @Output() back = new EventEmitter(); + @Output() filter = new EventEmitter(); + @Output() paginate = new EventEmitter(); +} + +@Injectable() +class MockDotContentletEditorService { + setDraggedContentType = jasmine.createSpy('setDraggedContentType'); +} + +@Component({ + selector: 'dot-contentlet-icon', + template: '' +}) +export class DotContentletIconMockComponent { + @Input() icon: string; + @Input() size: string; +} + +describe('DotPaletteContentletsComponent', () => { + let fixtureHost: ComponentFixture; + let componentHost: TestHostComponent; + let component: DotPaletteContentletsComponent; + let dotContentletEditorService: DotContentletEditorService; + let de: DebugElement; + + beforeEach(() => { + TestBed.configureTestingModule({ + declarations: [ + TestHostComponent, + DotPaletteContentletsComponent, + DotContentletIconMockComponent + ], + imports: [ + DotPipesModule, + DotSpinnerModule, + DotIconModule, + DotFilterPipeModule, + FormsModule, + DotPaletteInputFilterModule, + HttpClientTestingModule, + PaginatorModule + ], + providers: [ + { provide: DotContentletEditorService, useClass: MockDotContentletEditorService }, + { provide: CoreWebService, useClass: CoreWebServiceMock } + ] + }); + + fixtureHost = TestBed.createComponent(TestHostComponent); + componentHost = fixtureHost.componentInstance; + + de = fixtureHost.debugElement.query(By.css('dot-palette-contentlets')); + dotContentletEditorService = de.injector.get(DotContentletEditorService); + component = de.componentInstance; + + fixtureHost.detectChanges(); + }); + + it('should load initial params correctly with contentlets', async () => { + componentHost.items = [contentletProductDataMock] as unknown as DotCMSContentlet[]; + componentHost.loading = false; + componentHost.totalRecords = 10; + + fixtureHost.detectChanges(); + await fixtureHost.whenStable(); + + const contentletImg = fixtureHost.debugElement.query( + By.css('[data-testId="paletteItem"] img') + ); + expect(de.componentInstance.items.length).toBe(1); + expect(contentletImg.nativeElement.src).toContain( + `/dA/${contentletProductDataMock.inode}/titleImage/48w` + ); + }); + + it('should load with No Results data', async () => { + componentHost.items = [] as unknown as DotCMSContentlet[]; + componentHost.loading = false; + componentHost.totalRecords = 0; + + fixtureHost.detectChanges(); + await fixtureHost.whenStable(); + + const noResultsContainer = fixtureHost.debugElement.query( + By.css('[data-testId="emptyState"]') + ); + expect(noResultsContainer).toBeTruthy(); + }); + + it('should emit paginate event', async () => { + spyOn(component.paginate, 'emit').and.callThrough(); + const productsArray = []; + for (let index = 0; index < 30; index++) { + productsArray.push(contentletProductDataMock); + } + componentHost.items = [productsArray] as unknown as DotCMSContentlet[]; + componentHost.loading = false; + componentHost.totalRecords = 30; + + fixtureHost.detectChanges(); + await fixtureHost.whenStable(); + + const paginatorContainer = fixtureHost.debugElement.query(By.css('p-paginator')); + + expect(paginatorContainer).toBeTruthy(); + expect(paginatorContainer.componentInstance.rows).toBe(25); + expect(paginatorContainer.componentInstance.totalRecords).toBe(30); + expect(paginatorContainer.componentInstance.showFirstLastIcon).toBe(false); + expect(paginatorContainer.componentInstance.pageLinkSize).toBe('2'); + + paginatorContainer.componentInstance.onPageChange.emit({ first: 25 }); + + fixtureHost.detectChanges(); + await fixtureHost.whenStable(); + + expect(component.paginate.emit).toHaveBeenCalledWith({ + first: 25 + }); + }); + + it('should emit go back', async () => { + spyOn(component.back, 'emit').and.callThrough(); + + fixtureHost.detectChanges(); + await fixtureHost.whenStable(); + + const filterComp = fixtureHost.debugElement.query(By.css('dot-palette-input-filter')); + filterComp.componentInstance.goBack.emit(); + + expect(filterComp.componentInstance.goBackBtn).toBe(true); + expect(component.back.emit).toHaveBeenCalled(); + }); + + it('should set Dragged ContentType on dragStart', async () => { + componentHost.items = [contentletProductDataMock] as unknown as DotCMSContentlet[]; + componentHost.loading = false; + componentHost.totalRecords = 10; + fixtureHost.detectChanges(); + await fixtureHost.whenStable(); + + const content = fixtureHost.debugElement.query(By.css('[data-testId="paletteItem"]')); + content.triggerEventHandler('dragstart', contentletProductDataMock); + + expect(dotContentletEditorService.setDraggedContentType).toHaveBeenCalledOnceWith( + (contentletProductDataMock) as DotCMSContentlet + ); + }); + + it('should filter Product item', async () => { + spyOn(component.filter, 'emit').and.callThrough(); + fixtureHost.detectChanges(); + await fixtureHost.whenStable(); + + const filterComp = fixtureHost.debugElement.query(By.css('dot-palette-input-filter')); + filterComp.componentInstance.filter.emit('test'); + + fixtureHost.detectChanges(); + + expect(component.filter.emit).toHaveBeenCalledWith('test'); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette-contentlets/dot-palette-contentlets.component.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette-contentlets/dot-palette-contentlets.component.ts new file mode 100644 index 000000000000..52df7009a96e --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette-contentlets/dot-palette-contentlets.component.ts @@ -0,0 +1,77 @@ +import { Component, EventEmitter, Input, Output, ViewChild } from '@angular/core'; +import { DotContentletEditorService } from '@dotcms/app/view/components/dot-contentlet-editor/services/dot-contentlet-editor.service'; +import { DotCMSContentlet } from '@dotcms/dotcms-models'; +import { LazyLoadEvent } from 'primeng/api'; +import { DotPaletteInputFilterComponent } from '../dot-palette-input-filter/dot-palette-input-filter.component'; + +@Component({ + selector: 'dot-palette-contentlets', + templateUrl: './dot-palette-contentlets.component.html', + styleUrls: ['./dot-palette-contentlets.component.scss'] +}) +export class DotPaletteContentletsComponent { + @Input() items: DotCMSContentlet[]; + @Input() loading: boolean; + @Input() totalRecords: number; + + @Output() back = new EventEmitter(); + @Output() filter = new EventEmitter(); + @Output() paginate = new EventEmitter(); + + itemsPerPage = 25; + + @ViewChild('inputFilter') inputFilter: DotPaletteInputFilterComponent; + + constructor(private dotContentletEditorService: DotContentletEditorService) {} + + /** + * Loads data with a specific page + * + * @param LazyLoadEvent event + * @memberof DotPaletteContentletsComponent + */ + onPaginate(event: LazyLoadEvent): void { + this.paginate.emit(event); + } + + /** + * Clear component and emit back + * + * @memberof DotPaletteContentletsComponent + */ + backHandler(): void { + this.back.emit(); + } + + /** + * Set the contentlet being dragged from the Content palette to dotContentletEditorService + * + * @param DotCMSContentType contentType + * @memberof DotPaletteContentletsComponent + */ + dragStart(contentType: DotCMSContentlet): void { + this.dotContentletEditorService.setDraggedContentType(contentType); + } + + /** + * Does the string formatting in order to do a filtering of the Contentlets, + * finally call the loadData() to request the data + * + * @param string value + * @memberof DotPaletteContentletsComponent + */ + filterContentlets(value: string): void { + value = value.trim(); + this.filter.emit(value); + } + + /** + * Focus the input filter + * + * @memberof DotPaletteContentletsComponent + */ + focusInputFilter(): void { + this.inputFilter.value = ''; + this.inputFilter.focus(); + } +} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette-contentlets/dot-palette-contentlets.module.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette-contentlets/dot-palette-contentlets.module.ts new file mode 100644 index 000000000000..354c2c92f746 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette-contentlets/dot-palette-contentlets.module.ts @@ -0,0 +1,20 @@ +import { NgModule } from '@angular/core'; +import { DotPaletteContentletsComponent } from '@dotcms/app/portlets/dot-edit-page/components/dot-palette/dot-palette-contentlets/dot-palette-contentlets.component'; +import { CommonModule } from '@angular/common'; +import { DotPipesModule } from '@pipes/dot-pipes.module'; +import { PaginatorModule } from 'primeng/paginator'; +import { DotSpinnerModule } from '@dotcms/ui'; +import { DotPaletteInputFilterModule } from '../dot-palette-input-filter/dot-palette-input-filter.module'; + +@NgModule({ + imports: [ + CommonModule, + DotPipesModule, + DotPaletteInputFilterModule, + PaginatorModule, + DotSpinnerModule + ], + declarations: [DotPaletteContentletsComponent], + exports: [DotPaletteContentletsComponent] +}) +export class DotPaletteContentletsModule {} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette-input-filter/dot-palette-input-filter.component.html b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette-input-filter/dot-palette-input-filter.component.html new file mode 100644 index 000000000000..7b1599e1071d --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette-input-filter/dot-palette-input-filter.component.html @@ -0,0 +1,25 @@ + + + + + diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette-input-filter/dot-palette-input-filter.component.scss b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette-input-filter/dot-palette-input-filter.component.scss new file mode 100644 index 000000000000..81bcd45c2ff9 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette-input-filter/dot-palette-input-filter.component.scss @@ -0,0 +1,32 @@ +@use "libs/dot-primeng-theme-styles/src/scss/variables" as *; + +:host { + display: flex; + color: $gray; + position: sticky; + align-self: flex-start; + margin-bottom: $spacing-3; + margin-top: $spacing-3; + top: 0; + width: 100%; +} + +.p-inputtext { + flex: 1; + padding-right: $spacing-5; +} + +.dot-palette-input-filter__back-btn { + background-color: transparent; + border: 0; + cursor: pointer; + margin: 0 $spacing-1 0 0; + padding: 0; +} + +.dot-palette-input-filter__search-icon { + position: absolute; + top: 50%; + transform: translateY(-50%); + right: $spacing-1; +} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette-input-filter/dot-palette-input-filter.component.spec.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette-input-filter/dot-palette-input-filter.component.spec.ts new file mode 100644 index 000000000000..debecee0a1f5 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette-input-filter/dot-palette-input-filter.component.spec.ts @@ -0,0 +1,52 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; +import { Component, DebugElement, Input } from '@angular/core'; +import { By } from '@angular/platform-browser'; +import { DotPaletteInputFilterComponent } from './dot-palette-input-filter.component'; +import { DotPipesModule } from '@pipes/dot-pipes.module'; +import { CoreWebService, CoreWebServiceMock } from '@dotcms/dotcms-js'; +import { HttpClientTestingModule } from '@angular/common/http/testing'; +import { FormsModule } from '@angular/forms'; + +@Component({ + selector: 'dot-icon', + template: '' +}) +class MockDotIconComponent { + @Input() name: string; + @Input() size: string; +} + +describe('DotPaletteInputFilterComponent', () => { + let comp: DotPaletteInputFilterComponent; + let fixture: ComponentFixture; + let de: DebugElement; + + beforeEach(() => { + TestBed.configureTestingModule({ + declarations: [DotPaletteInputFilterComponent, MockDotIconComponent], + imports: [DotPipesModule, HttpClientTestingModule, FormsModule], + providers: [{ provide: CoreWebService, useClass: CoreWebServiceMock }] + }); + + fixture = TestBed.createComponent(DotPaletteInputFilterComponent); + de = fixture.debugElement; + comp = fixture.componentInstance; + comp.goBackBtn = true; + fixture.detectChanges(); + }); + + it('should show Go Back button', () => { + const goBackBtn = fixture.debugElement.query(By.css('[data-testid="goBack"]')); + expect(goBackBtn.componentInstance).toBeTruthy(); + }); + + it('should go Back when Go Back button clicked', async () => { + spyOn(comp.filter, 'emit').and.callThrough(); + const input = de.query(By.css('[data-testId="searchInput"]')).nativeElement; + comp.value = 'hello'; + const event = new KeyboardEvent('keyup'); + input.dispatchEvent(event); + await fixture.whenStable(); + expect(comp.filter.emit).toHaveBeenCalledWith('hello'); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette-input-filter/dot-palette-input-filter.component.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette-input-filter/dot-palette-input-filter.component.ts new file mode 100644 index 000000000000..ce3730acf82d --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette-input-filter/dot-palette-input-filter.component.ts @@ -0,0 +1,51 @@ +import { + Component, + ElementRef, + EventEmitter, + Input, + OnDestroy, + OnInit, + Output, + ViewChild +} from '@angular/core'; +import { debounceTime, takeUntil } from 'rxjs/operators'; +import { fromEvent as observableFromEvent, Subject } from 'rxjs'; + +@Component({ + selector: 'dot-palette-input-filter', + templateUrl: './dot-palette-input-filter.component.html', + styleUrls: ['./dot-palette-input-filter.component.scss'] +}) +export class DotPaletteInputFilterComponent implements OnInit, OnDestroy { + @Input() goBackBtn: boolean; + @Input() value: string; + @Output() goBack: EventEmitter = new EventEmitter(); + @Output() filter: EventEmitter = new EventEmitter(); + + @ViewChild('searchInput', { static: true }) + searchInput: ElementRef; + + private destroy$: Subject = new Subject(); + + ngOnInit() { + observableFromEvent(this.searchInput.nativeElement, 'keyup') + .pipe(debounceTime(500), takeUntil(this.destroy$)) + .subscribe(() => { + this.filter.emit(this.value); + }); + } + + ngOnDestroy(): void { + this.destroy$.next(true); + this.destroy$.complete(); + } + + /** + * Focus on the search input + * + * @memberof DotPaletteInputFilterComponent + */ + focus() { + this.searchInput.nativeElement.focus(); + } +} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette-input-filter/dot-palette-input-filter.module.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette-input-filter/dot-palette-input-filter.module.ts new file mode 100644 index 000000000000..298dbbd9c3e7 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette-input-filter/dot-palette-input-filter.module.ts @@ -0,0 +1,15 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { FormsModule } from '@angular/forms'; +import { InputTextModule } from 'primeng/inputtext'; + +import { DotPipesModule } from '@pipes/dot-pipes.module'; +import { DotIconModule } from '@dotcms/ui'; +import { DotPaletteInputFilterComponent } from './dot-palette-input-filter.component'; + +@NgModule({ + imports: [CommonModule, DotPipesModule, DotIconModule, FormsModule, InputTextModule], + declarations: [DotPaletteInputFilterComponent], + exports: [DotPaletteInputFilterComponent] +}) +export class DotPaletteInputFilterModule {} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette.component.html b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette.component.html new file mode 100644 index 000000000000..6935da583745 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette.component.html @@ -0,0 +1,18 @@ + +

+ + +
+ diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette.component.scss b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette.component.scss new file mode 100644 index 000000000000..1b4b31cd12b0 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette.component.scss @@ -0,0 +1,10 @@ +:host { + background-color: white; + display: block; + height: 100%; +} + +div { + display: flex; + height: 100%; +} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette.component.spec.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette.component.spec.ts new file mode 100644 index 000000000000..7bc02cc55491 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette.component.spec.ts @@ -0,0 +1,201 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ + +import { ComponentFixture, TestBed } from '@angular/core/testing'; +import { DotPaletteComponent } from './dot-palette.component'; +import { Component, EventEmitter, Injectable, Input, Output } from '@angular/core'; +import { By } from '@angular/platform-browser'; +import { dotcmsContentTypeBasicMock } from '@dotcms/app/test/dot-content-types.mock'; +import { HttpClientTestingModule } from '@angular/common/http/testing'; +import { CoreWebService, CoreWebServiceMock } from '@dotcms/dotcms-js'; +import { NoopAnimationsModule } from '@angular/platform-browser/animations'; +import { Observable, of } from 'rxjs'; +import { DotESContentService } from '@dotcms/app/api/services/dot-es-content/dot-es-content.service'; +import { PaginatorService } from '@dotcms/app/api/services/paginator'; +import { DotPaletteStore, LoadingState } from './store/dot-palette.store'; +import { contentletProductDataMock } from './dot-palette-contentlets/dot-palette-contentlets.component.spec'; + +@Component({ + selector: 'dot-palette-content-type', + template: '' +}) +export class DotPaletteContentTypeMockComponent { + @Input() items: any[]; + @Output() selected = new EventEmitter(); + + focusInputFilter() { + // + } +} + +@Component({ + selector: 'dot-palette-contentlets', + template: '' +}) +export class DotPaletteContentletsMockComponent { + @Input() items: string; + @Input() loading: boolean; + @Input() totalRecords: number; + @Output() back = new EventEmitter(); + @Output() filter = new EventEmitter(); + @Output() paginate = new EventEmitter(); + + focusInputFilter() { + // + } +} + +const itemMock = { + ...dotcmsContentTypeBasicMock, + clazz: 'com.dotcms.contenttype.model.type.ImmutableSimpleContentType', + id: '1234567890', + name: 'Nuevo', + variable: 'Nuevo', + defaultType: false, + fixed: false, + folder: 'SYSTEM_FOLDER', + host: null, + owner: '123', + system: false +}; + +@Injectable() +class MockESPaginatorService { + paginationPerPage = 15; + totalRecords = 20; + + public get(): Observable { + return null; + } +} + +@Injectable() +class MockPaginatorService { + url: string; + paginationPerPage = 10; + maxLinksPage = 5; + sortField: string; + sortOrder: string; + totalRecords = 40; + + setExtraParams(): void { + /* */ + } + + public getWithOffset(): Observable { + return null; + } +} + +const storeMock = jasmine.createSpyObj( + 'DotPaletteStore', + [ + 'getContentletsData', + 'setFilter', + 'setLanguageId', + 'setViewContentlet', + 'setLoading', + 'setLoaded', + 'loadContentTypes', + 'filterContentlets', + 'loadContentlets', + 'switchView' + ], + { + vm$: of({ + contentlets: [contentletProductDataMock], + contentTypes: [itemMock], + filter: '', + languageId: '1', + totalRecords: 20, + viewContentlet: 'contentlet:out', + callState: LoadingState.LOADED + }) + } +); + +describe('DotPaletteComponent', () => { + let comp: DotPaletteComponent; + let fixture: ComponentFixture; + let store: DotPaletteStore; + + beforeEach(() => { + TestBed.configureTestingModule({ + declarations: [ + DotPaletteComponent, + DotPaletteContentletsMockComponent, + DotPaletteContentTypeMockComponent + ], + imports: [HttpClientTestingModule, NoopAnimationsModule], + providers: [ + { provide: CoreWebService, useClass: CoreWebServiceMock }, + { provide: PaginatorService, useClass: MockPaginatorService }, + { provide: DotESContentService, useClass: MockESPaginatorService } + ] + }); + TestBed.overrideProvider(DotPaletteStore, { useValue: storeMock }); + store = TestBed.inject(DotPaletteStore); + + fixture = TestBed.createComponent(DotPaletteComponent); + comp = fixture.componentInstance; + comp.items = [itemMock]; + fixture.detectChanges(); + }); + + it('should dot-palette-content-type have items assigned', () => { + const contentTypeComp = fixture.debugElement.query(By.css('dot-palette-content-type')); + expect(contentTypeComp.componentInstance.items).toEqual([itemMock]); + }); + + it('should change view to contentlets and set viewContentlet Variable on contentlets palette view', async () => { + const contentContentletsComp = fixture.debugElement.query( + By.css('dot-palette-contentlets') + ); + const contentTypeComp = fixture.debugElement.query(By.css('dot-palette-content-type')); + contentTypeComp.triggerEventHandler('selected', 'Blog'); + + fixture.detectChanges(); + await fixture.whenStable(); + + const wrapper = fixture.debugElement.query(By.css('[data-testid="wrapper"]')); + expect(wrapper.nativeElement.style.transform).toEqual('translateX(0%)'); + expect(store.switchView).toHaveBeenCalledWith('Blog'); + expect(contentContentletsComp.componentInstance.totalRecords).toBe(20); + expect(contentContentletsComp.componentInstance.items).toEqual([contentletProductDataMock]); + }); + + it('should change view to content type and unset viewContentlet Variable on contentlets palette view', async () => { + const contentContentletsComp = fixture.debugElement.query( + By.css('dot-palette-contentlets') + ); + contentContentletsComp.triggerEventHandler('back', ''); + + fixture.detectChanges(); + await fixture.whenStable(); + + expect(store.switchView).toHaveBeenCalledWith(undefined); + }); + + it('should set value on store on filtering event', async () => { + const contentContentletsComp = fixture.debugElement.query( + By.css('dot-palette-contentlets') + ); + contentContentletsComp.triggerEventHandler('filter', 'test'); + + fixture.detectChanges(); + await fixture.whenStable(); + + expect(store.filterContentlets).toHaveBeenCalledWith('test'); + }); + + it('should set value on store on paginate event', async () => { + const contentContentletsComp = fixture.debugElement.query( + By.css('dot-palette-contentlets') + ); + contentContentletsComp.triggerEventHandler('paginate', { first: 20 }); + + fixture.detectChanges(); + await fixture.whenStable(); + + expect(store.getContentletsData).toHaveBeenCalledWith({ first: 20 }); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette.component.stories.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette.component.stories.ts new file mode 100644 index 000000000000..ba63fe57d270 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette.component.stories.ts @@ -0,0 +1,157 @@ +import { DotPaletteComponent } from '@dotcms/app/portlets/dot-edit-page/components/dot-palette/dot-palette.component'; +import { moduleMetadata } from '@storybook/angular'; +import { CommonModule } from '@angular/common'; +import { Meta, Story } from '@storybook/angular/types-6-0'; +import { DotIconModule } from '@dotcms/ui'; +import { DotContentletEditorService } from '@components/dot-contentlet-editor/services/dot-contentlet-editor.service'; +import { Injectable } from '@angular/core'; +import { DotMessagePipe } from '@dotcms/app/view/pipes'; +import { DotMessageService } from '@services/dot-message/dot-messages.service'; +import { MockDotMessageService } from '@tests/dot-message-service.mock'; +import { DotFilterPipeModule } from '@pipes/dot-filter/dot-filter-pipe.module'; + +const data = [ + { + baseType: 'CONTENT', + clazz: 'com.dotcms.contenttype.model.type.ImmutableSimpleContentType', + defaultType: false, + detailPage: '1ef9be0e-7610-4c69-afdb-d304c8aabfac', + fixed: false, + folder: 'SYSTEM_FOLDER', + host: '48190c8c-42c4-46af-8d1a-0cd5db894797', + iDate: 1562940705000, + icon: 'cloud', + id: 'a1661fbc-9e84-4c00-bd62-76d633170da3', + layout: [], + modDate: 1626819743000, + multilingualable: false, + nEntries: 69, + name: 'Product', + sortOrder: 0, + system: false, + systemActionMappings: [], + urlMapPattern: '/store/products/{urlTitle}', + variable: 'Product', + versionable: true, + workflows: [] + }, + { + baseType: 'CONTENT', + clazz: 'com.dotcms.contenttype.model.type.ImmutableSimpleContentType', + defaultType: false, + description: 'Travel Blog', + detailPage: '8a14180a-4144-4807-80c4-b7cad20ac57b', + fixed: false, + folder: 'SYSTEM_FOLDER', + host: '48190c8c-42c4-46af-8d1a-0cd5db894797', + iDate: 1543419364000, + icon: 'alt_route', + id: '799f176a-d32e-4844-a07c-1b5fcd107578', + layout: [], + modDate: 1626819718000, + multilingualable: false, + nEntries: 6, + name: 'Blog', + publishDateVar: 'postingDate', + sortOrder: 0, + system: false, + urlMapPattern: '/blog/post/{urlTitle}', + variable: 'Blog', + versionable: true, + workflows: [] + }, + { + baseType: 'FORM', + clazz: 'com.dotcms.contenttype.model.type.ImmutableFormContentType', + defaultType: false, + description: 'General Contact Form', + fixed: false, + folder: 'SYSTEM_FOLDER', + host: '48190c8c-42c4-46af-8d1a-0cd5db894797', + iDate: 1563384216000, + icon: 'cloud', + id: '897cf4a9-171a-4204-accb-c1b498c813fe', + layout: [], + modDate: 1626818557000, + multilingualable: false, + nEntries: 0, + name: 'Contact', + sortOrder: 0, + system: false, + variable: 'Contact', + versionable: true, + workflows: [] + }, + { + baseType: 'CONTENT', + clazz: 'com.dotcms.contenttype.model.type.ImmutableSimpleContentType', + defaultType: false, + fixed: false, + folder: 'SYSTEM_FOLDER', + host: '48190c8c-42c4-46af-8d1a-0cd5db894797', + iDate: 1555017311000, + icon: 'person', + id: '6044a806-f462-4977-a353-57539eac2a2c', + layout: [], + modDate: 1626818557000, + multilingualable: false, + nEntries: 6, + name: 'Long name Blog Comment', + sortOrder: 0, + system: false, + variable: 'BlogComment', + versionable: true, + workflows: [] + } +]; + +@Injectable() +class MockDotContentletEditorService { + setDraggedContentType = () => { + // + }; +} + +const messageServiceMock = new MockDotMessageService({ + structure: 'Content Type' +}); + +export default { + title: 'DotCMS/ Content Palette', + component: DotPaletteComponent, + decorators: [ + moduleMetadata({ + declarations: [DotPaletteComponent, DotMessagePipe], + imports: [CommonModule, DotIconModule, DotFilterPipeModule], + providers: [ + { provide: DotContentletEditorService, useClass: MockDotContentletEditorService }, + { provide: DotMessageService, useValue: messageServiceMock } + ] + }) + ], + args: { + items: data + } +} as Meta; + +export const Default: Story = (props) => { + return { + moduleMetadata: { + declarations: [DotPaletteComponent] + }, + component: DotPaletteComponent, + props, + template: `` + }; +}; + +export const Empty: Story = (props) => { + return { + moduleMetadata: { + declarations: [DotPaletteComponent] + }, + component: DotPaletteComponent, + props, + template: `` + }; +}; diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette.component.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette.component.ts new file mode 100644 index 000000000000..0f03ddb18b10 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette.component.ts @@ -0,0 +1,96 @@ +import { animate, state, style, transition, trigger, AnimationEvent } from '@angular/animations'; +import { Component, Input, OnInit, ViewChild } from '@angular/core'; +import { DotCMSContentType } from '@dotcms/dotcms-models'; +import { LazyLoadEvent } from 'primeng/api'; +import { Observable } from 'rxjs'; +import { DotPaletteContentTypeComponent } from './dot-palette-content-type/dot-palette-content-type.component'; +import { DotPaletteContentletsComponent } from './dot-palette-contentlets/dot-palette-contentlets.component'; +import { DotPaletteStore, DotPaletteState } from './store/dot-palette.store'; + +@Component({ + selector: 'dot-palette', + templateUrl: './dot-palette.component.html', + styleUrls: ['./dot-palette.component.scss'], + providers: [DotPaletteStore], + animations: [ + trigger('inOut', [ + state( + 'contentlet:in', + style({ + transform: 'translateX(-100%)' + }) + ), + state( + 'contentlet:out', + style({ + transform: 'translateX(0%)' + }) + ), + transition('* => *', animate('200ms ease-in')) + ]) + ] +}) +export class DotPaletteComponent implements OnInit { + @Input() set items(items: DotCMSContentType[]) { + if (items != null && items.length) { + this.store.loadContentTypes(items); + } + } + @Input() languageId: string; + vm$: Observable = this.store.vm$; + + @ViewChild('contentlets') contentlets: DotPaletteContentletsComponent; + @ViewChild('contentTypes') contentTypes: DotPaletteContentTypeComponent; + + constructor(private store: DotPaletteStore) {} + + ngOnInit(): void { + this.store.setLanguageId(this.languageId); + } + + /** + * Sets value on store to show/hide components on the UI + * + * @param string [variableName] + * @memberof DotPaletteContentletsComponent + */ + switchView(variableName?: string): void { + this.store.switchView(variableName); + } + + /** + * Event to filter contentlets data on the store + * + * @param {string} value + * @memberof DotPaletteComponent + */ + filterContentlets(value: string): void { + this.store.filterContentlets(value); + } + + /** + * Event to paginate contentlets data on the store + * + * @param {LazyLoadEvent} event + * @memberof DotPaletteComponent + */ + paginateContentlets(event: LazyLoadEvent): void { + this.store.getContentletsData(event); + } + + /** + * Focus on the contentlet component search field + * + * @param {AnimationEvent} event + * @memberof DotPaletteComponent + */ + onAnimationDone(event: AnimationEvent): void { + if (event.toState === 'contentlet:in') { + this.contentlets.focusInputFilter(); + } + + if (event.toState === 'contentlet:out') { + this.contentTypes.focusInputFilter(); + } + } +} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette.module.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette.module.ts new file mode 100644 index 000000000000..4a82dea0afb5 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette.module.ts @@ -0,0 +1,12 @@ +import { CommonModule } from '@angular/common'; +import { NgModule } from '@angular/core'; +import { DotPaletteComponent } from '@dotcms/app/portlets/dot-edit-page/components/dot-palette/dot-palette.component'; +import { DotPaletteContentTypeModule } from './dot-palette-content-type/dot-palette-content-type.module'; +import { DotPaletteContentletsModule } from './dot-palette-contentlets/dot-palette-contentlets.module'; + +@NgModule({ + imports: [CommonModule, DotPaletteContentTypeModule, DotPaletteContentletsModule], + declarations: [DotPaletteComponent], + exports: [DotPaletteComponent] +}) +export class DotPaletteModule {} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/store/dot-palette.store.spec.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/store/dot-palette.store.spec.ts new file mode 100644 index 000000000000..f28e8375b493 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/store/dot-palette.store.spec.ts @@ -0,0 +1,172 @@ +import { TestBed } from '@angular/core/testing'; +import { Observable, of } from 'rxjs'; +import { DotPaletteStore } from './dot-palette.store'; +import { Injectable } from '@angular/core'; +import { DotESContentService } from '@dotcms/app/api/services/dot-es-content/dot-es-content.service'; +import { PaginatorService } from '@dotcms/app/api/services/paginator'; +import { contentTypeDataMock } from '../dot-palette-content-type/dot-palette-content-type.component.spec'; +import { DotCMSContentlet, DotCMSContentType } from '@dotcms/dotcms-models'; +import { ESContent } from '../../../../../shared/models/dot-es-content/dot-es-content.model'; +import { + contentletFormDataMock, + contentletProductDataMock +} from '../dot-palette-contentlets/dot-palette-contentlets.component.spec'; + +@Injectable() +class MockPaginatorService { + url: string; + paginationPerPage = 10; + maxLinksPage = 5; + sortField: string; + sortOrder: string; + totalRecords = 40; + + setExtraParams(): void { + /** */ + } + + public getWithOffset(): Observable { + return null; + } +} + +@Injectable() +class MockESPaginatorService { + paginationPerPage = 15; + totalRecords = 20; + + public get(): Observable { + return null; + } +} + +describe('DotPaletteStore', () => { + let dotPaletteStore: DotPaletteStore; + let paginatorService: PaginatorService; + let dotESContentService: DotESContentService; + + beforeEach(() => { + TestBed.configureTestingModule({ + providers: [ + DotPaletteStore, + { provide: PaginatorService, useClass: MockPaginatorService }, + { provide: DotESContentService, useClass: MockESPaginatorService } + ] + }); + dotPaletteStore = TestBed.inject(DotPaletteStore); + paginatorService = TestBed.inject(PaginatorService); + dotESContentService = TestBed.inject(DotESContentService); + }); + + it('should update filter', () => { + dotPaletteStore.setFilter('test'); + dotPaletteStore.state$.subscribe((data) => { + expect(data.filter).toEqual('test'); + }); + }); + + it('should update languageId', () => { + dotPaletteStore.setLanguageId('1'); + dotPaletteStore.state$.subscribe((data) => { + expect(data.languageId).toEqual('1'); + }); + }); + + it('should update viewContentlet', () => { + dotPaletteStore.setViewContentlet('in'); + dotPaletteStore.state$.subscribe((data) => { + expect(data.viewContentlet).toEqual('in'); + }); + }); + + it('should update setLoading', () => { + dotPaletteStore.setLoading(); + dotPaletteStore.state$.subscribe((data) => { + expect(data.loading).toEqual(true); + }); + }); + + it('should update setLoaded', () => { + dotPaletteStore.setLoaded(); + dotPaletteStore.state$.subscribe((data) => { + expect(data.loading).toEqual(false); + }); + }); + + it('should load contentTypes to store', (done) => { + dotPaletteStore.loadContentTypes(contentTypeDataMock as DotCMSContentType[]); + dotPaletteStore.vm$.subscribe((data) => { + expect(data.contentTypes).toEqual(contentTypeDataMock as DotCMSContentType[]); + done(); + }); + }); + + it('should load Forms contentlets to store', (done) => { + spyOn(paginatorService, 'getWithOffset').and.returnValue(of([contentletFormDataMock])); + dotPaletteStore.loadContentlets('forms'); + + expect(paginatorService.url).toBe('v1/contenttype'); + expect(paginatorService.paginationPerPage).toBe(25); + expect(paginatorService.sortField).toBe('modDate'); + expect(paginatorService.sortOrder).toBe(1); + + dotPaletteStore.vm$.subscribe((data) => { + expect(data.contentlets).toEqual([ + contentletFormDataMock + ] as unknown as DotCMSContentType[]); + expect(data.filter).toEqual(''); + expect(data.loading).toEqual(false); + expect(data.totalRecords).toEqual(paginatorService.totalRecords); + done(); + }); + }); + + it('should load Product contentlets to store', (done) => { + spyOn(dotESContentService, 'get').and.returnValue( + of({ + contentTook: 0, + jsonObjectView: { + contentlets: [contentletProductDataMock] as unknown as DotCMSContentlet[] + }, + queryTook: 1, + resultsSize: 20 + }) + ); + dotPaletteStore.loadContentlets('product'); + + dotPaletteStore.vm$.subscribe((data) => { + expect(dotESContentService.get).toHaveBeenCalledWith({ + itemsPerPage: 25, + lang: '1', + filter: '', + offset: '0', + query: '+contentType: product' + }); + expect(data.contentlets).toEqual([ + contentletProductDataMock + ] as unknown as DotCMSContentlet[]); + expect(data.filter).toEqual(''); + expect(data.loading).toEqual(false); + expect(data.totalRecords).toEqual(20); + done(); + }); + }); + + it('should set filter value in store', (done) => { + spyOn(dotESContentService, 'get').and.returnValue( + of({ + contentTook: 0, + jsonObjectView: { + contentlets: [contentletProductDataMock] as unknown as DotCMSContentlet[] + }, + queryTook: 1, + resultsSize: 20 + }) + ); + dotPaletteStore.filterContentlets('Prod'); + dotPaletteStore.vm$.subscribe((data) => { + expect(data.filter).toEqual('Prod'); + done(); + }); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/store/dot-palette.store.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/store/dot-palette.store.ts new file mode 100644 index 000000000000..7d19d5b5b67f --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/store/dot-palette.store.ts @@ -0,0 +1,187 @@ +import { Injectable } from '@angular/core'; +import { DotESContentService } from '@dotcms/app/api/services/dot-es-content/dot-es-content.service'; +import { PaginatorService } from '@dotcms/app/api/services/paginator'; +import { ESContent } from '@dotcms/app/shared/models/dot-es-content/dot-es-content.model'; +import { DotCMSContentlet, DotCMSContentType } from '@dotcms/dotcms-models'; +import { ComponentStore } from '@ngrx/component-store'; +import { LazyLoadEvent } from 'primeng/api'; +import { Observable } from 'rxjs'; +import { map, take } from 'rxjs/operators'; + +export interface DotPaletteState { + contentlets: DotCMSContentlet[] | DotCMSContentType[]; + contentTypes: DotCMSContentType[]; + filter: string; + languageId: string; + totalRecords: number; + viewContentlet: string; + loading: boolean; +} + +export const enum LoadingState { + INIT = 'INIT', + LOADING = 'LOADING', + LOADED = 'LOADED' +} + +@Injectable() +export class DotPaletteStore extends ComponentStore { + private isFormContentType: boolean; + private itemsPerPage = 25; + private contentTypeVarName: string; + + readonly vm$ = this.state$; + + // UPDATERS + private readonly setContentlets = this.updater( + (state: DotPaletteState, data: DotCMSContentlet[] | DotCMSContentType[]) => { + return { ...state, contentlets: data }; + } + ); + + private readonly setContentTypes = this.updater( + (state: DotPaletteState, data: DotCMSContentType[]) => { + return { ...state, contentTypes: data }; + } + ); + + private readonly setTotalRecords = this.updater((state: DotPaletteState, data: number) => { + return { ...state, totalRecords: data }; + }); + + readonly setFilter = this.updater((state: DotPaletteState, data: string) => { + return { ...state, filter: data }; + }); + + readonly setLanguageId = this.updater((state: DotPaletteState, data: string) => { + return { ...state, languageId: data }; + }); + + readonly setViewContentlet = this.updater((state: DotPaletteState, data: string) => { + return { ...state, viewContentlet: data }; + }); + + readonly setLoading = this.updater((state: DotPaletteState) => { + return { + ...state, + loading: LoadingState.LOADING === LoadingState.LOADING + }; + }); + + readonly setLoaded = this.updater((state: DotPaletteState) => { + return { + ...state, + loading: !(LoadingState.LOADED === LoadingState.LOADED) + }; + }); + + // EFFECTS + readonly loadContentTypes = this.effect((data$: Observable) => { + return data$.pipe( + map((data) => { + this.setContentTypes(data); + }) + ); + }); + + readonly filterContentlets = this.effect((filterValue$: Observable) => { + return filterValue$.pipe( + map((value: string) => { + this.setFilter(value); + + if (this.isFormContentType) { + this.paginationService.searchParam = 'variable'; + this.paginationService.filter = value; + } + this.getContentletsData({ first: 0 }); + }) + ); + }); + + readonly loadContentlets = this.effect((contentTypeVariable$: Observable) => { + return contentTypeVariable$.pipe( + map((contentTypeVariable: string) => { + this.contentTypeVarName = contentTypeVariable; + this.isFormContentType = contentTypeVariable === 'forms'; + if (this.isFormContentType) { + this.paginationService.url = `v1/contenttype`; + this.paginationService.paginationPerPage = this.itemsPerPage; + this.paginationService.sortField = 'modDate'; + this.paginationService.setExtraParams('type', 'Form'); + this.paginationService.sortOrder = 1; + } + + this.getContentletsData(); + }) + ); + }); + + constructor( + public paginatorESService: DotESContentService, + public paginationService: PaginatorService + ) { + super({ + contentlets: null, + contentTypes: null, + filter: '', + languageId: '1', + totalRecords: 0, + viewContentlet: 'contentlet:out', + loading: false + }); + } + + /** + * Request contentlets data with filter and pagination params. + * + * @param LazyLoadEvent [event] + * @memberof DotPaletteStore + */ + getContentletsData(event?: LazyLoadEvent): void { + this.setLoading(); + + this.state$.pipe(take(1)).subscribe(({ filter, languageId }) => { + if (this.isFormContentType) { + this.paginationService.setExtraParams('filter', filter); + + this.paginationService + .getWithOffset((event && event.first) || 0) + .pipe(take(1)) + .subscribe((data: DotCMSContentlet[] | DotCMSContentType[]) => { + data.forEach((item) => (item.contentType = item.variable = 'FORM')); + this.setLoaded(); + this.setContentlets(data); + this.setTotalRecords(this.paginationService.totalRecords); + }); + } else { + this.paginatorESService + .get({ + itemsPerPage: this.itemsPerPage, + lang: languageId || '1', + filter: filter || '', + offset: (event && event.first.toString()) || '0', + query: `+contentType: ${this.contentTypeVarName}` + }) + .pipe(take(1)) + .subscribe((response: ESContent) => { + this.setLoaded(); + this.setTotalRecords(response.resultsSize); + this.setContentlets(response.jsonObjectView.contentlets); + }); + } + }); + } + + /** + * Sets value to show/hide components, clears filter value and starts loding data + * + * @param string [variableName] + * @memberof DotPaletteContentletsComponent + */ + switchView(variableName?: string): void { + const viewContentlet = variableName ? 'contentlet:in' : 'contentlet:out'; + this.setViewContentlet(viewContentlet); + this.setFilter(''); + this.loadContentlets(variableName); + } +} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-state-controller/components/dot-edit-page-lock-info/dot-edit-page-lock-info.component.html b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-state-controller/components/dot-edit-page-lock-info/dot-edit-page-lock-info.component.html new file mode 100644 index 000000000000..aca13f06a006 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-state-controller/components/dot-edit-page-lock-info/dot-edit-page-lock-info.component.html @@ -0,0 +1,7 @@ + + {{ 'editpage.toolbar.page.locked.by.user' | dm: [pageState.page.lockedByName] }} + + + + {{ 'editpage.toolbar.page.cant.edit' | dm }} + diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-state-controller/components/dot-edit-page-lock-info/dot-edit-page-lock-info.component.scss b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-state-controller/components/dot-edit-page-lock-info/dot-edit-page-lock-info.component.scss new file mode 100644 index 000000000000..5dad5778590f --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-state-controller/components/dot-edit-page-lock-info/dot-edit-page-lock-info.component.scss @@ -0,0 +1,39 @@ +@use "variables" as *; +@import "mixins"; + +:host { + font-size: $font-size-small; + color: $gray; +} + +.page-info { + &__locked-by-message { + color: $red; + } + + &__locked-by-message--blink { + animation: blinker 500ms linear 1; + } +} + +@keyframes blinker { + 0% { + opacity: 0.25; + } + + 25% { + opacity: 0; + } + + 50% { + opacity: 0.5; + } + + 75% { + opacity: 0; + } + + 100% { + opacity: 1; + } +} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-state-controller/components/dot-edit-page-lock-info/dot-edit-page-lock-info.component.spec.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-state-controller/components/dot-edit-page-lock-info/dot-edit-page-lock-info.component.spec.ts new file mode 100644 index 000000000000..adaac1e9d8e4 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-state-controller/components/dot-edit-page-lock-info/dot-edit-page-lock-info.component.spec.ts @@ -0,0 +1,124 @@ +import { waitForAsync, ComponentFixture, fakeAsync, tick, TestBed } from '@angular/core/testing'; +import { By } from '@angular/platform-browser'; +import { DebugElement } from '@angular/core'; + +import { mockDotRenderedPage } from '@tests/dot-page-render.mock'; +import { mockUser } from '@tests/login-service.mock'; + +import { DotEditPageLockInfoComponent } from './dot-edit-page-lock-info.component'; +import { DotMessageService } from '@services/dot-message/dot-messages.service'; +import { DotPageRenderState } from '@portlets/dot-edit-page/shared/models/dot-rendered-page-state.model'; +import { MockDotMessageService } from '@tests/dot-message-service.mock'; +import { DotPipesModule } from '@pipes/dot-pipes.module'; + +const messageServiceMock = new MockDotMessageService({ + 'editpage.toolbar.page.cant.edit': 'No permissions...', + 'editpage.toolbar.page.locked.by.user': 'Page is locked by...' +}); + +describe('DotEditPageLockInfoComponent', () => { + let component: DotEditPageLockInfoComponent; + let fixture: ComponentFixture; + let de: DebugElement; + + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + imports: [DotPipesModule], + declarations: [DotEditPageLockInfoComponent], + providers: [ + { + provide: DotMessageService, + useValue: messageServiceMock + } + ] + }).compileComponents(); + }) + ); + + beforeEach(() => { + fixture = TestBed.createComponent(DotEditPageLockInfoComponent); + component = fixture.componentInstance; + de = fixture.debugElement; + }); + + describe('default', () => { + beforeEach(() => { + component.pageState = new DotPageRenderState(mockUser(), { + ...mockDotRenderedPage(), + page: { + ...mockDotRenderedPage().page, + canEdit: true, + lockedBy: '123' + } + }); + fixture.detectChanges(); + }); + + it('should not have error messages', () => { + const lockedByMessage: DebugElement = de.query(By.css('.page-info__locked-by-message')); + const cantEditMessage: DebugElement = de.query(By.css('.page-info__cant-edit-message')); + + expect(lockedByMessage === null && cantEditMessage === null).toBe(true); + }); + }); + + describe('locked messages', () => { + describe('locked by another user', () => { + let lockedMessage: DebugElement; + + beforeEach(() => { + component.pageState = new DotPageRenderState(mockUser(), { + ...mockDotRenderedPage(), + page: { + ...mockDotRenderedPage().page, + canEdit: true, + lockedBy: 'another-user' + } + }); + fixture.detectChanges(); + lockedMessage = de.query(By.css('.page-info__locked-by-message')); + }); + + it('should have message', () => { + expect(lockedMessage.nativeElement.textContent.trim()).toEqual( + messageServiceMock.get('editpage.toolbar.page.locked.by.user') + ); + }); + + it('should blink', fakeAsync(() => { + spyOn(lockedMessage.nativeElement.classList, 'add'); + spyOn(lockedMessage.nativeElement.classList, 'remove'); + component.blinkLockMessage(); + + expect(lockedMessage.nativeElement.classList.add).toHaveBeenCalledWith( + 'page-info__locked-by-message--blink' + ); + tick(500); + expect(lockedMessage.nativeElement.classList.remove).toHaveBeenCalledWith( + 'page-info__locked-by-message--blink' + ); + })); + }); + + describe('permissions', () => { + beforeEach(() => { + component.pageState = new DotPageRenderState(mockUser(), { + ...mockDotRenderedPage(), + page: { + ...mockDotRenderedPage().page, + canEdit: false + } + }); + fixture.detectChanges(); + }); + + it("should have don't have permissions messages", () => { + const lockedMessage: DebugElement = de.query( + By.css('.page-info__cant-edit-message') + ); + expect(lockedMessage.nativeElement.textContent.trim()).toEqual('No permissions...'); + }); + }); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-state-controller/components/dot-edit-page-lock-info/dot-edit-page-lock-info.component.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-state-controller/components/dot-edit-page-lock-info/dot-edit-page-lock-info.component.ts new file mode 100644 index 000000000000..0d8a95345d9f --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-state-controller/components/dot-edit-page-lock-info/dot-edit-page-lock-info.component.ts @@ -0,0 +1,46 @@ +import { Component, Input, ElementRef, ViewChild } from '@angular/core'; +import { DotPageRenderState } from '@portlets/dot-edit-page/shared/models'; + +/** + * Basic page information for edit mode + * + * @export + * @class DotEditPageInfoComponent + * @implements {OnInit} + */ +@Component({ + selector: 'dot-edit-page-lock-info', + templateUrl: './dot-edit-page-lock-info.component.html', + styleUrls: ['./dot-edit-page-lock-info.component.scss'] +}) +export class DotEditPageLockInfoComponent { + @ViewChild('lockedPageMessage') lockedPageMessage: ElementRef; + + show = false; + + private _state: DotPageRenderState; + + @Input() + set pageState(value: DotPageRenderState) { + this._state = value; + this.show = value.state.lockedByAnotherUser && value.page.canEdit; + } + + get pageState(): DotPageRenderState { + return this._state; + } + + /** + * Make the lock message blink with css + * + * @memberof DotEditPageInfoComponent + */ + blinkLockMessage(): void { + const blinkClass = 'page-info__locked-by-message--blink'; + + this.lockedPageMessage.nativeElement.classList.add(blinkClass); + setTimeout(() => { + this.lockedPageMessage.nativeElement.classList.remove(blinkClass); + }, 500); + } +} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-state-controller/dot-edit-page-state-controller.component.html b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-state-controller/dot-edit-page-state-controller.component.html new file mode 100644 index 000000000000..8a13ff9aba89 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-state-controller/dot-edit-page-state-controller.component.html @@ -0,0 +1,22 @@ + + + diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-state-controller/dot-edit-page-state-controller.component.scss b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-state-controller/dot-edit-page-state-controller.component.scss new file mode 100644 index 000000000000..6316c9dc8475 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-state-controller/dot-edit-page-state-controller.component.scss @@ -0,0 +1,69 @@ +@use "variables" as *; +@import "mixins"; + +:host { + display: flex; + align-items: center; + height: 100%; + + ::ng-deep { + .p-button-tabbed { + box-shadow: none; + height: 100%; + margin-right: $spacing-4; + } + + .p-selectbutton { + height: 100%; + display: flex; + } + } +} + +dot-edit-page-lock-info { + margin-left: $spacing-1; +} + +p-inputSwitch { + ::ng-deep { + .p-inputswitch-slider:after { + @include md-icon; + color: $brand-primary; + content: "lock_open"; + font-size: 13px; + left: 3px; + position: absolute; + text-rendering: auto; + top: 0; + transition: transform $basic-speed ease-in, color $basic-speed ease-in; + } + + .p-inputswitch-checked .p-inputswitch-slider:after { + color: $white; + content: "lock"; + transform: translateX(1.65em); + } + + .p-state-disabled .p-inputswitch-slider:after { + color: $white; + } + + .p-tooltip { + display: none !important; + } + } + + &.warn ::ng-deep .p-inputswitch-slider:after { + color: $orange; + } +} + +@media only screen and (max-width: $screen-device-container-max) { + p-inputSwitch ::ng-deep .p-tooltip { + display: inline-block !important; + } + + dot-edit-page-lock-info { + display: none; + } +} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-state-controller/dot-edit-page-state-controller.component.spec.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-state-controller/dot-edit-page-state-controller.component.spec.ts new file mode 100644 index 000000000000..4e6c1b845abc --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-state-controller/dot-edit-page-state-controller.component.spec.ts @@ -0,0 +1,321 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ + +import { By } from '@angular/platform-browser'; +import { Component, DebugElement } from '@angular/core'; +import { waitForAsync, ComponentFixture } from '@angular/core/testing'; + +import { DOTTestBed } from '@tests/dot-test-bed'; +import { MockDotMessageService } from '@tests/dot-message-service.mock'; +import { DotPageStateServiceMock } from '@tests/dot-page-state.service.mock'; +import { DotPersonalizeServiceMock } from '@tests/dot-personalize-service.mock'; + +import { DotAlertConfirmService } from '@services/dot-alert-confirm'; +import { DotEditPageLockInfoComponent } from './components/dot-edit-page-lock-info/dot-edit-page-lock-info.component'; +import { DotEditPageStateControllerComponent } from './dot-edit-page-state-controller.component'; +import { DotMessageService } from '@services/dot-message/dot-messages.service'; +import { DotPageStateService } from '../../services/dot-page-state/dot-page-state.service'; +import { DotPersonalizeService } from '@services/dot-personalize/dot-personalize.service'; +import { DotPageRenderState } from '@portlets/dot-edit-page/shared/models'; +import * as _ from 'lodash'; +import { mockUser } from '@tests/login-service.mock'; +import { mockDotRenderedPage } from '@tests/dot-page-render.mock'; +import { dotcmsContentletMock } from '@tests/dotcms-contentlet.mock'; +import { of } from 'rxjs'; +import { DotPipesModule } from '@pipes/dot-pipes.module'; +import { InputSwitchModule } from 'primeng/inputswitch'; +import { SelectButtonModule } from 'primeng/selectbutton'; +import { TooltipModule } from 'primeng/tooltip'; +import { DotPageRender } from '@models/dot-page/dot-rendered-page.model'; +import { DotPageMode } from '@models/dot-page/dot-page-mode.enum'; + +const mockDotMessageService = new MockDotMessageService({ + 'editpage.toolbar.edit.page': 'Edit', + 'editpage.toolbar.live.page': 'Live', + 'editpage.toolbar.preview.page': 'Preview', + 'editpage.content.steal.lock.confirmation.message.header': 'Lock', + 'editpage.content.steal.lock.confirmation.message': 'Steal lock', + 'editpage.personalization.confirm.message': 'Are you sure?', + 'editpage.personalization.confirm.header': 'Personalization', + 'editpage.personalization.confirm.with.lock': 'Also steal lock', + 'editpage.toolbar.page.locked.by.user': 'Page locked by {0}' +}); + +const pageRenderStateMock: DotPageRenderState = new DotPageRenderState( + mockUser(), + new DotPageRender(mockDotRenderedPage()) +); + +@Component({ + selector: 'dot-test-host-component', + template: ` + + ` +}) +class TestHostComponent { + pageState: DotPageRenderState = _.cloneDeep(pageRenderStateMock); +} + +describe('DotEditPageStateControllerComponent', () => { + let fixtureHost: ComponentFixture; + let componentHost: TestHostComponent; + let component: DotEditPageStateControllerComponent; + let de: DebugElement; + let deHost: DebugElement; + let dotPageStateService: DotPageStateService; + let dialogService: DotAlertConfirmService; + let personalizeService: DotPersonalizeService; + + beforeEach( + waitForAsync(() => { + DOTTestBed.configureTestingModule({ + declarations: [ + TestHostComponent, + DotEditPageStateControllerComponent, + DotEditPageLockInfoComponent + ], + providers: [ + { + provide: DotMessageService, + useValue: mockDotMessageService + }, + { + provide: DotPageStateService, + useClass: DotPageStateServiceMock + }, + { + provide: DotPersonalizeService, + useClass: DotPersonalizeServiceMock + }, + DotAlertConfirmService + ], + imports: [InputSwitchModule, SelectButtonModule, TooltipModule, DotPipesModule] + }); + }) + ); + + beforeEach(() => { + fixtureHost = DOTTestBed.createComponent(TestHostComponent); + deHost = fixtureHost.debugElement; + componentHost = fixtureHost.componentInstance; + de = deHost.query(By.css('dot-edit-page-state-controller')); + component = de.componentInstance; + dotPageStateService = de.injector.get(DotPageStateService); + dialogService = de.injector.get(DotAlertConfirmService); + personalizeService = de.injector.get(DotPersonalizeService); + + spyOn(component.modeChange, 'emit'); + spyOn(dotPageStateService, 'setLock'); + spyOn(personalizeService, 'personalized').and.returnValue(of(null)); + }); + + describe('elements', () => { + describe('default', () => { + it('should have mode selector', async () => { + fixtureHost.detectChanges(); + const selectButton = de.query(By.css('p-selectButton')).componentInstance; + await fixtureHost.whenRenderingDone(); + + expect(selectButton).toBeDefined(); + expect(selectButton.options).toEqual([ + { label: 'Edit', value: 'EDIT_MODE', disabled: false }, + { label: 'Preview', value: 'PREVIEW_MODE', disabled: false }, + { label: 'Live', value: 'ADMIN_MODE', disabled: false } + ]); + expect(selectButton.value).toBe(DotPageMode.PREVIEW); + }); + + it('should have locker with right attributes', async () => { + const pageRenderStateMocked: DotPageRenderState = new DotPageRenderState( + { ...mockUser(), userId: '456' }, + new DotPageRender(mockDotRenderedPage()) + ); + fixtureHost.componentInstance.pageState = _.cloneDeep(pageRenderStateMocked); + fixtureHost.detectChanges(); + const lockerDe = de.query(By.css('p-inputSwitch')); + const locker = lockerDe.componentInstance; + + await fixtureHost.whenRenderingDone(); + + expect(lockerDe.classes.warn).toBe(true, 'warn class'); + expect(lockerDe.attributes.appendTo).toBe('target'); + expect(lockerDe.attributes['ng-reflect-text']).toBe('Page locked by Some One'); + expect(lockerDe.attributes['ng-reflect-tooltip-position']).toBe('top'); + expect(locker.modelValue).toBe(false, 'checked'); + expect(locker.disabled).toBe(false, 'disabled'); + }); + + it('should have lock info', () => { + fixtureHost.detectChanges(); + const message = de.query(By.css('dot-edit-page-lock-info')).componentInstance; + expect(message.pageState).toEqual(pageRenderStateMock); + }); + }); + + describe('disable mode selector option', () => { + it('should disable preview', async () => { + componentHost.pageState.page.canRead = false; + fixtureHost.detectChanges(); + const selectButton = de.query(By.css('p-selectButton')).componentInstance; + + fixtureHost.whenRenderingDone(); + + await expect(selectButton).toBeDefined(); + expect(selectButton.options[1]).toEqual({ + label: 'Preview', + value: 'PREVIEW_MODE', + disabled: true + }); + expect(selectButton.value).toBe(DotPageMode.PREVIEW); + }); + + it('should disable edit', async () => { + componentHost.pageState.page.canEdit = false; + componentHost.pageState.page.canLock = false; + fixtureHost.detectChanges(); + const selectButton = de.query(By.css('p-selectButton')).componentInstance; + + await fixtureHost.whenRenderingDone(); + + expect(selectButton).toBeDefined(); + expect(selectButton.options[0]).toEqual({ + label: 'Edit', + value: 'EDIT_MODE', + disabled: true + }); + expect(selectButton.value).toBe(DotPageMode.PREVIEW); + }); + + it('should disable live', async () => { + componentHost.pageState.page.liveInode = null; + fixtureHost.detectChanges(); + const selectButton = de.query(By.css('p-selectButton')).componentInstance; + + await fixtureHost.whenRenderingDone(); + + expect(selectButton).toBeDefined(); + expect(selectButton.options[2]).toEqual({ + label: 'Live', + value: 'ADMIN_MODE', + disabled: true + }); + expect(selectButton.value).toBe(DotPageMode.PREVIEW); + }); + }); + }); + + describe('events', () => { + it('should without confirmation dialog emit modeChange and update pageState service', async () => { + fixtureHost.detectChanges(); + + const selectButton = de.query(By.css('p-selectButton')); + selectButton.triggerEventHandler('onChange', { + value: DotPageMode.EDIT + }); + + await fixtureHost.whenStable(); + expect(component.modeChange.emit).toHaveBeenCalledWith(DotPageMode.EDIT); + expect(dotPageStateService.setLock).toHaveBeenCalledWith( + { mode: DotPageMode.EDIT }, + true + ); + }); + }); + + describe('should emit modeChange when ask to LOCK confirmation', () => { + beforeEach(() => { + const pageRenderStateMocked: DotPageRenderState = new DotPageRenderState( + { ...mockUser(), userId: '456' }, + new DotPageRender(mockDotRenderedPage()) + ); + + fixtureHost.componentInstance.pageState = _.cloneDeep(pageRenderStateMocked); + }); + + it('should update pageState service when confirmation dialog Success', async () => { + spyOn(dialogService, 'confirm').and.callFake((conf) => { + conf.accept(); + }); + + fixtureHost.detectChanges(); + + const selectButton = de.query(By.css('p-selectButton')); + selectButton.triggerEventHandler('onChange', { + value: DotPageMode.EDIT + }); + + await fixtureHost.whenStable(); + + expect(component.modeChange.emit).toHaveBeenCalledWith(DotPageMode.EDIT); + expect(dialogService.confirm).toHaveBeenCalledTimes(1); + expect(personalizeService.personalized).not.toHaveBeenCalled(); + expect(dotPageStateService.setLock).toHaveBeenCalledWith( + { mode: DotPageMode.EDIT }, + true + ); + }); + + it('should update LOCK and MODE when confirmation dialog Canceled', async () => { + spyOn(dialogService, 'confirm').and.callFake((conf) => { + conf.cancel(); + }); + + fixtureHost.detectChanges(); + + const selectButton = de.query(By.css('p-selectButton')); + selectButton.triggerEventHandler('onChange', { + value: DotPageMode.EDIT + }); + + await fixtureHost.whenStable(); + + expect(component.modeChange.emit).toHaveBeenCalledWith(DotPageMode.EDIT); + expect(dialogService.confirm).toHaveBeenCalledTimes(1); + expect(component.lock).toBe(true); + expect(component.mode).toBe(DotPageMode.PREVIEW); + }); + }); + + describe('should emit modeChange when ask to PERSONALIZE confirmation', () => { + it('should update pageState service when confirmation dialog Success', async () => { + const pageRenderStateMocked: DotPageRenderState = new DotPageRenderState( + mockUser(), + new DotPageRender({ + ...mockDotRenderedPage(), + viewAs: { + ...mockDotRenderedPage().viewAs, + persona: { + ...dotcmsContentletMock, + name: 'John', + personalized: false, + keyTag: 'Other' + } + } + }) + ); + + fixtureHost.componentInstance.pageState = _.cloneDeep(pageRenderStateMocked); + spyOn(dialogService, 'confirm').and.callFake((conf) => { + conf.accept(); + }); + + fixtureHost.detectChanges(); + + const selectButton = de.query(By.css('p-selectButton')); + selectButton.triggerEventHandler('onChange', { + value: DotPageMode.EDIT + }); + + await fixtureHost.whenStable(); + expect(component.modeChange.emit).toHaveBeenCalledWith(DotPageMode.EDIT); + expect(dialogService.confirm).toHaveBeenCalledTimes(1); + expect(personalizeService.personalized).toHaveBeenCalledWith( + mockDotRenderedPage().page.identifier, + pageRenderStateMocked.viewAs.persona.keyTag + ); + expect(dotPageStateService.setLock).toHaveBeenCalledWith( + { mode: DotPageMode.EDIT }, + true + ); + }); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-state-controller/dot-edit-page-state-controller.component.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-state-controller/dot-edit-page-state-controller.component.ts new file mode 100644 index 000000000000..8fc9bbedc300 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-state-controller/dot-edit-page-state-controller.component.ts @@ -0,0 +1,270 @@ +import { + Component, + Input, + ViewChild, + OnChanges, + SimpleChanges, + Output, + EventEmitter +} from '@angular/core'; + +import { take, switchMap } from 'rxjs/operators'; +import { Observable, of, from } from 'rxjs'; + +import { SelectItem } from 'primeng/api'; + +import { DotAlertConfirmService } from '@services/dot-alert-confirm'; +import { DotEditPageLockInfoComponent } from './components/dot-edit-page-lock-info/dot-edit-page-lock-info.component'; +import { DotMessageService } from '@services/dot-message/dot-messages.service'; +import { DotPageStateService } from '../../services/dot-page-state/dot-page-state.service'; +import { DotPageRenderState } from '@portlets/dot-edit-page/shared/models'; +import { DotPersonalizeService } from '@services/dot-personalize/dot-personalize.service'; +import { DotPageRenderOptions } from '@services/dot-page-render/dot-page-render.service'; +import { DotPageMode } from '@models/dot-page/dot-page-mode.enum'; + +enum DotConfirmationType { + LOCK, + PERSONALIZATION +} + +@Component({ + selector: 'dot-edit-page-state-controller', + templateUrl: './dot-edit-page-state-controller.component.html', + styleUrls: ['./dot-edit-page-state-controller.component.scss'] +}) +export class DotEditPageStateControllerComponent implements OnChanges { + @ViewChild('pageLockInfo', { static: true }) pageLockInfo: DotEditPageLockInfoComponent; + + @Input() pageState: DotPageRenderState; + @Output() modeChange = new EventEmitter(); + + lock: boolean; + lockWarn = false; + mode: DotPageMode; + options: SelectItem[] = []; + constructor( + private dotAlertConfirmService: DotAlertConfirmService, + private dotMessageService: DotMessageService, + private dotPageStateService: DotPageStateService, + private dotPersonalizeService: DotPersonalizeService + ) {} + + ngOnChanges(changes: SimpleChanges) { + const pageState = changes.pageState.currentValue; + this.options = this.getStateModeOptions(pageState); + /* + When the page is lock but the page is being load from an user that can lock the page + we want to show the lock off so the new user can steal the lock + */ + this.lock = this.isLocked(pageState); + this.lockWarn = this.shouldWarnLock(pageState); + this.mode = pageState.state.mode; + } + + /** + * Handler locker change event + * + * @memberof DotEditPageToolbarComponent + */ + lockPageHandler(): void { + if (this.shouldAskToLock()) { + this.showLockConfirmDialog().then(() => { + this.setLockerState(); + }); + } else { + this.setLockerState(); + } + } + + /** + * Handle the click to the locker switch + * + * @memberof DotEditPageStateControllerComponent + */ + onLockerClick(): void { + if (!this.pageState.page.canLock) { + this.pageLockInfo.blinkLockMessage(); + } + } + + /** + * Handle state selector change event + * + * @param {DotPageMode} mode + * @memberof DotEditPageStateControllerComponent + */ + stateSelectorHandler(mode: DotPageMode): void { + this.modeChange.emit(mode); + + if (this.shouldShowConfirmation(mode)) { + this.lock = mode === DotPageMode.EDIT; + + this.showConfirmation() + .pipe( + take(1), + switchMap((type: DotConfirmationType) => { + return type === DotConfirmationType.PERSONALIZATION + ? this.dotPersonalizeService.personalized( + this.pageState.page.identifier, + this.pageState.viewAs.persona.keyTag + ) + : of(null); + }) + ) + .subscribe( + () => { + this.updatePageState( + { + mode + }, + this.lock + ); + }, + () => { + this.lock = this.pageState.state.lockedByAnotherUser + ? false + : this.pageState.state.locked; + this.mode = this.pageState.state.mode; + } + ); + } else { + const lock = mode === DotPageMode.EDIT || null; + this.updatePageState( + { + mode + }, + lock + ); + } + } + + private canTakeLock(pageState: DotPageRenderState): boolean { + return pageState.page.canLock && pageState.state.lockedByAnotherUser; + } + + private getModeOption(mode: string, pageState: DotPageRenderState): SelectItem { + const disabled = { + edit: !pageState.page.canEdit || !pageState.page.canLock, + preview: !pageState.page.canRead, + live: !pageState.page.liveInode + }; + + return { + label: this.dotMessageService.get(`editpage.toolbar.${mode}.page`), + value: DotPageMode[mode.toLocaleUpperCase()], + disabled: disabled[mode] + }; + } + + private getStateModeOptions(pageState: DotPageRenderState): SelectItem[] { + return ['edit', 'preview', 'live'].map((mode: string) => + this.getModeOption(mode, pageState) + ); + } + + private isLocked(pageState: DotPageRenderState): boolean { + return pageState.state.locked && !this.canTakeLock(pageState); + } + + private isPersonalized(): boolean { + return this.pageState.viewAs.persona && this.pageState.viewAs.persona.personalized; + } + + private setLockerState() { + if (!this.lock && this.mode === DotPageMode.EDIT) { + this.mode = DotPageMode.PREVIEW; + } + + this.updatePageState( + { + mode: this.mode + }, + this.lock + ); + } + + private shouldAskToLock(): boolean { + return this.pageState.page.canLock && this.pageState.state.lockedByAnotherUser; + } + + private shouldAskPersonalization(): boolean { + return this.pageState.viewAs.persona && !this.isPersonalized(); + } + + private shouldShowConfirmation(mode: DotPageMode): boolean { + return ( + mode === DotPageMode.EDIT && (this.shouldAskToLock() || this.shouldAskPersonalization()) + ); + } + + private shouldWarnLock(pageState: DotPageRenderState): boolean { + return pageState.page.canLock && pageState.state.lockedByAnotherUser; + } + + private showConfirmation(): Observable { + return from( + new Promise((resolve, reject) => { + if (this.shouldAskToLock()) { + this.showLockConfirmDialog() + .then(() => { + resolve(DotConfirmationType.LOCK); + }) + .catch(() => reject()); + } + + if (this.shouldAskPersonalization()) { + this.showPersonalizationConfirmDialog() + .then(() => { + resolve(DotConfirmationType.PERSONALIZATION); + }) + .catch(() => reject()); + } + }) + ); + } + + private showLockConfirmDialog(): Promise { + return new Promise((resolve, reject) => { + this.dotAlertConfirmService.confirm({ + accept: resolve, + reject: reject, + header: this.dotMessageService.get( + 'editpage.content.steal.lock.confirmation.message.header' + ), + message: this.dotMessageService.get( + 'editpage.content.steal.lock.confirmation.message' + ) + }); + }); + } + + private showPersonalizationConfirmDialog(): Promise { + return new Promise((resolve, reject) => { + this.dotAlertConfirmService.confirm({ + accept: resolve, + reject: reject, + header: 'Personalization', + message: this.getPersonalizationConfirmMessage() + }); + }); + } + + private getPersonalizationConfirmMessage(): string { + let message = this.dotMessageService.get( + 'editpage.personalization.confirm.message', + this.pageState.viewAs.persona.name + ); + + if (this.shouldAskToLock()) { + message += this.dotMessageService.get( + 'editpage.personalization.confirm.with.lock', + this.pageState.page.lockedByName + ); + } + return message; + } + + private updatePageState(options: DotPageRenderOptions, lock: boolean = null) { + this.dotPageStateService.setLock(options, lock); + } +} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-state-controller/dot-edit-page-state-controller.module.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-state-controller/dot-edit-page-state-controller.module.ts new file mode 100644 index 000000000000..2bf569a20f53 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-state-controller/dot-edit-page-state-controller.module.ts @@ -0,0 +1,25 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { FormsModule } from '@angular/forms'; + +import { InputSwitchModule } from 'primeng/inputswitch'; +import { SelectButtonModule } from 'primeng/selectbutton'; +import { TooltipModule } from 'primeng/tooltip'; + +import { DotEditPageStateControllerComponent } from './dot-edit-page-state-controller.component'; +import { DotEditPageLockInfoComponent } from './components/dot-edit-page-lock-info/dot-edit-page-lock-info.component'; +import { DotPipesModule } from '@pipes/dot-pipes.module'; + +@NgModule({ + declarations: [DotEditPageStateControllerComponent, DotEditPageLockInfoComponent], + exports: [DotEditPageStateControllerComponent], + imports: [ + CommonModule, + FormsModule, + InputSwitchModule, + SelectButtonModule, + DotPipesModule, + TooltipModule + ] +}) +export class DotEditPageStateControllerModule {} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-toolbar/dot-edit-page-toolbar.component.html b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-toolbar/dot-edit-page-toolbar.component.html new file mode 100644 index 000000000000..15d3875c8084 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-toolbar/dot-edit-page-toolbar.component.html @@ -0,0 +1,36 @@ + +
+ +
+ +
+ + +
+ +
+ + + +
+ +
+ + +
+
diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-toolbar/dot-edit-page-toolbar.component.scss b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-toolbar/dot-edit-page-toolbar.component.scss new file mode 100644 index 000000000000..e6267844c77f --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-toolbar/dot-edit-page-toolbar.component.scss @@ -0,0 +1,14 @@ +@use "variables" as *; + +.edit-page-toolbar__cancel { + margin-right: $spacing-1; +} + +.dot-edit__what-changed-button { + margin-left: $spacing-3; +} + +.main-toolbar-right { + align-items: center; + display: flex; +} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-toolbar/dot-edit-page-toolbar.component.spec.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-toolbar/dot-edit-page-toolbar.component.spec.ts new file mode 100644 index 000000000000..98146131893d --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-toolbar/dot-edit-page-toolbar.component.spec.ts @@ -0,0 +1,332 @@ +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { DebugElement, Component, Input, Injectable } from '@angular/core'; +import { By } from '@angular/platform-browser'; +import { MockDotMessageService } from '@tests/dot-message-service.mock'; +import { mockDotRenderedPageState } from '@tests/dot-rendered-page-state.mock'; +import { DotPageStateService } from '../../services/dot-page-state/dot-page-state.service'; +import { DotEditPageToolbarComponent } from './dot-edit-page-toolbar.component'; +import { DotLicenseService } from '@services/dot-license/dot-license.service'; +import { DotMessageService } from '@services/dot-message/dot-messages.service'; + +import { DotPageRenderState } from '@portlets/dot-edit-page/shared/models/dot-rendered-page-state.model'; +import { CommonModule } from '@angular/common'; +import { FormsModule } from '@angular/forms'; +import { Observable, of } from 'rxjs'; +import { DotEditPageViewAsControllerModule } from '../dot-edit-page-view-as-controller/dot-edit-page-view-as-controller.module'; +import { DotEditPageStateControllerModule } from '../dot-edit-page-state-controller/dot-edit-page-state-controller.module'; +import { DotEditPageInfoModule } from '@portlets/dot-edit-page/components/dot-edit-page-info/dot-edit-page-info.module'; +import { + SiteService, + LoginService, + DotEventsSocket, + DotEventsSocketURL, + DotcmsEventsService, + DotcmsConfigService, + CoreWebService, + LoggerService, + StringUtils, + ApiRoot, + UserModel +} from '@dotcms/dotcms-js'; +import { SiteServiceMock } from '@tests/site-service.mock'; +import { DotEditPageWorkflowsActionsModule } from '../dot-edit-page-workflows-actions/dot-edit-page-workflows-actions.module'; +import { LoginServiceMock } from '@tests/login-service.mock'; +import { DotSecondaryToolbarModule } from '@components/dot-secondary-toolbar'; +import { mockDotPersona } from '@tests/dot-persona.mock'; +import { DotMessageDisplayService } from '@components/dot-message-display/services'; +import { DotEventsService } from '@services/dot-events/dot-events.service'; +import { DotPipesModule } from '@pipes/dot-pipes.module'; +import { dotEventSocketURLFactory } from '@tests/dot-test-bed'; +import { CoreWebServiceMock } from '@tests/core-web.service.mock'; +import { DotRouterService } from '@services/dot-router/dot-router.service'; +import { MockDotRouterService } from '@tests/dot-router-service.mock'; +import { DotHttpErrorManagerService } from '@services/dot-http-error-manager/dot-http-error-manager.service'; +import { DotAlertConfirmService } from '@services/dot-alert-confirm'; +import { DotGlobalMessageService } from '@components/_common/dot-global-message/dot-global-message.service'; +import { DotWizardModule } from '@components/_common/dot-wizard/dot-wizard.module'; +import { HttpClientTestingModule } from '@angular/common/http/testing'; +import { DotIframeService } from '@components/_common/iframe/service/dot-iframe/dot-iframe.service'; +import { ButtonModule } from 'primeng/button'; +import { CheckboxModule } from 'primeng/checkbox'; +import { ToolbarModule } from 'primeng/toolbar'; +import { ConfirmationService } from 'primeng/api'; +import { DotPageMode } from '@models/dot-page/dot-page-mode.enum'; +import { DotFormatDateService } from '@services/dot-format-date-service'; +import { DotFormatDateServiceMock } from '@dotcms/app/test/format-date-service.mock'; + +@Component({ + selector: 'dot-test-host-component', + template: ` ` +}) +class TestHostComponent { + @Input() pageState: DotPageRenderState = mockDotRenderedPageState; +} + +@Injectable() +class MockDotLicenseService { + isEnterprise(): Observable { + return of(true); + } +} + +describe('DotEditPageToolbarComponent', () => { + let fixtureHost: ComponentFixture; + let componentHost: TestHostComponent; + let component: DotEditPageToolbarComponent; + let de: DebugElement; + let deHost: DebugElement; + let dotLicenseService: DotLicenseService; + let dotMessageDisplayService: DotMessageDisplayService; + + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [TestHostComponent, DotEditPageToolbarComponent], + imports: [ + HttpClientTestingModule, + ButtonModule, + CommonModule, + CheckboxModule, + DotSecondaryToolbarModule, + FormsModule, + ToolbarModule, + DotEditPageViewAsControllerModule, + DotEditPageStateControllerModule, + DotEditPageInfoModule, + DotEditPageWorkflowsActionsModule, + DotPipesModule, + DotWizardModule + ], + providers: [ + { provide: DotLicenseService, useClass: MockDotLicenseService }, + { + provide: DotMessageService, + useValue: new MockDotMessageService({ + 'dot.common.whats.changed': 'Whats', + 'dot.common.cancel': 'Cancel' + }) + }, + { + provide: DotPageStateService, + useValue: {} + }, + { + provide: SiteService, + useClass: SiteServiceMock + }, + { + provide: LoginService, + useClass: LoginServiceMock + }, + DotMessageDisplayService, + DotEventsService, + DotcmsEventsService, + DotEventsSocket, + { provide: DotEventsSocketURL, useFactory: dotEventSocketURLFactory }, + DotcmsConfigService, + { provide: CoreWebService, useClass: CoreWebServiceMock }, + LoggerService, + StringUtils, + { provide: DotRouterService, useClass: MockDotRouterService }, + DotHttpErrorManagerService, + DotAlertConfirmService, + ConfirmationService, + { provide: DotFormatDateService, useClass: DotFormatDateServiceMock }, + DotGlobalMessageService, + ApiRoot, + UserModel, + DotIframeService + ] + }); + }) + ); + + beforeEach(() => { + fixtureHost = TestBed.createComponent(TestHostComponent); + deHost = fixtureHost.debugElement; + componentHost = fixtureHost.componentInstance; + + de = deHost.query(By.css('dot-edit-page-toolbar')); + component = de.componentInstance; + + dotLicenseService = de.injector.get(DotLicenseService); + dotMessageDisplayService = de.injector.get(DotMessageDisplayService); + }); + + describe('elements', () => { + beforeEach(() => { + fixtureHost.detectChanges(); + }); + + it('should have elements placed correctly', () => { + const editToolbar = de.query(By.css('dot-secondary-toolbar')); + const editPageInfo = de.query( + By.css('dot-secondary-toolbar .main-toolbar-left dot-edit-page-info') + ); + const editCancelBtn = de.query( + By.css('dot-secondary-toolbar .main-toolbar-right .edit-page-toolbar__cancel') + ); + const editWorkflowActions = de.query( + By.css('dot-secondary-toolbar .main-toolbar-right dot-edit-page-workflows-actions') + ); + const editStateController = de.query( + By.css('dot-secondary-toolbar .lower-toolbar-left dot-edit-page-state-controller') + ); + const whatsChangedCheck = de.query( + By.css('dot-secondary-toolbar .lower-toolbar-left .dot-edit__what-changed-button') + ); + const editPageViewAs = de.query( + By.css( + 'dot-secondary-toolbar .lower-toolbar-right dot-edit-page-view-as-controller' + ) + ); + expect(editToolbar).toBeDefined(); + expect(editPageInfo).toBeDefined(); + expect(editCancelBtn).toBeDefined(); + expect(editWorkflowActions).toBeDefined(); + expect(editStateController).toBeDefined(); + expect(whatsChangedCheck).toBeDefined(); + expect(editPageViewAs).toBeDefined(); + }); + }); + + describe('dot-edit-page-info', () => { + it('should have the right attr', () => { + fixtureHost.detectChanges(); + const dotEditPageInfo = de.query(By.css('dot-edit-page-info')).componentInstance; + expect(dotEditPageInfo.title).toBe('A title'); + expect(dotEditPageInfo.url).toBe('/an/url/test'); + expect(dotEditPageInfo.apiLink).toBe('api/v1/page/render/an/url/test?language_id=1'); + }); + }); + + describe('dot-global-message', () => { + it('should have show', () => { + fixtureHost.detectChanges(); + const dotGlobalMessage = de.query(By.css('[data-testId="globalMessage"]')); + expect(dotGlobalMessage).not.toBeNull(); + }); + }); + + describe('dot-edit-page-workflows-actions', () => { + it('should have pageState attr', () => { + fixtureHost.detectChanges(); + const dotEditWorkflowActions = de.query(By.css('dot-edit-page-workflows-actions')); + expect(dotEditWorkflowActions.componentInstance.page).toBe( + mockDotRenderedPageState.page + ); + }); + + it('should emit on click', () => { + spyOn(component.actionFired, 'emit'); + fixtureHost.detectChanges(); + const dotEditWorkflowActions = de.query(By.css('dot-edit-page-workflows-actions')); + dotEditWorkflowActions.triggerEventHandler('fired', {}); + expect(component.actionFired.emit).toHaveBeenCalled(); + }); + }); + + describe('dot-edit-page-state-controller', () => { + it('should have pageState attr', () => { + fixtureHost.detectChanges(); + const dotEditPageState = de.query(By.css('dot-edit-page-state-controller')); + expect(dotEditPageState.componentInstance.pageState).toBe(mockDotRenderedPageState); + }); + }); + + describe('dot-edit-page-view-as-controller', () => { + it('should have pageState attr', () => { + fixtureHost.detectChanges(); + const dotEditPageViewAs = de.query(By.css('dot-edit-page-view-as-controller')); + expect(dotEditPageViewAs.componentInstance.pageState).toBe(mockDotRenderedPageState); + }); + }); + + describe("what's change", () => { + describe('no license', () => { + beforeEach(() => { + spyOn(dotLicenseService, 'isEnterprise').and.returnValue(of(false)); + fixtureHost.detectChanges(); + }); + + it('should not show', () => { + const whatsChangedElem = de.query(By.css('.dot-edit__what-changed-button')); + expect(whatsChangedElem).toBeNull(); + }); + }); + + describe('with license', () => { + xit("should have what's change selector", async () => { + componentHost.pageState.state.mode = DotPageMode.PREVIEW; + fixtureHost.detectChanges(); + await fixtureHost.whenStable(); + + const whatsChangedElem = de.query(By.css('.dot-edit__what-changed-button')); + expect(whatsChangedElem).toBeDefined(); + expect(whatsChangedElem.componentInstance.label).toBe('Whats'); + }); + + it("should hide what's change selector", () => { + componentHost.pageState.state.mode = DotPageMode.EDIT; + fixtureHost.detectChanges(); + + const whatsChangedElem = de.query(By.css('.dot-edit__what-changed-button')); + expect(whatsChangedElem).toBeNull(); + }); + + it("should hide what's change selector when is not default user", () => { + componentHost.pageState.state.mode = DotPageMode.PREVIEW; + componentHost.pageState.viewAs.persona = mockDotPersona; + fixtureHost.detectChanges(); + + const whatsChangedElem = de.query(By.css('.dot-edit__what-changed-button')); + expect(whatsChangedElem).toBeNull(); + }); + }); + }); + + describe('events', () => { + let whatsChangedElem: DebugElement; + beforeEach(() => { + spyOn(component.whatschange, 'emit'); + spyOn(dotMessageDisplayService, 'push'); + + componentHost.pageState.state.mode = DotPageMode.PREVIEW; + delete componentHost.pageState.viewAs.persona; + fixtureHost.detectChanges(); + whatsChangedElem = de.query(By.css('.dot-edit__what-changed-button')); + }); + + it("should emit what's change in true", () => { + whatsChangedElem.triggerEventHandler('onChange', { checked: true }); + expect(component.whatschange.emit).toHaveBeenCalledTimes(1); + expect(component.whatschange.emit).toHaveBeenCalledWith(true); + }); + + it("should emit what's change in false", () => { + whatsChangedElem.triggerEventHandler('onChange', { checked: false }); + expect(component.whatschange.emit).toHaveBeenCalledTimes(1); + expect(component.whatschange.emit).toHaveBeenCalledWith(false); + }); + + describe('whats change on state change', () => { + it('should emit when showWhatsChanged is true', () => { + component.showWhatsChanged = true; + fixtureHost.detectChanges(); + const dotEditPageState = de.query(By.css('dot-edit-page-state-controller')); + dotEditPageState.triggerEventHandler('modeChange', DotPageMode.EDIT); + + expect(component.whatschange.emit).toHaveBeenCalledWith(false); + }); + + it('should not emit when showWhatsChanged is false', () => { + component.showWhatsChanged = false; + fixtureHost.detectChanges(); + const dotEditPageState = de.query(By.css('dot-edit-page-state-controller')); + dotEditPageState.triggerEventHandler('modeChange', DotPageMode.EDIT); + + expect(component.whatschange.emit).not.toHaveBeenCalled(); + }); + }); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-toolbar/dot-edit-page-toolbar.component.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-toolbar/dot-edit-page-toolbar.component.ts new file mode 100644 index 000000000000..526d0ecb3012 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-toolbar/dot-edit-page-toolbar.component.ts @@ -0,0 +1,66 @@ +import { + Component, + OnInit, + Input, + EventEmitter, + Output, + OnChanges, + OnDestroy +} from '@angular/core'; +import { Observable, Subject } from 'rxjs'; +import { DotLicenseService } from '@services/dot-license/dot-license.service'; +import { DotPageRenderState } from '@portlets/dot-edit-page/shared/models'; +import { DotPageMode } from '@models/dot-page/dot-page-mode.enum'; +import { DotCMSContentlet } from '@dotcms/dotcms-models'; + +@Component({ + selector: 'dot-edit-page-toolbar', + templateUrl: './dot-edit-page-toolbar.component.html', + styleUrls: ['./dot-edit-page-toolbar.component.scss'] +}) +export class DotEditPageToolbarComponent implements OnInit, OnChanges, OnDestroy { + @Input() pageState: DotPageRenderState; + + @Output() cancel = new EventEmitter(); + + @Output() actionFired = new EventEmitter(); + + @Output() whatschange = new EventEmitter(); + + isEnterpriseLicense$: Observable; + showWhatsChanged: boolean; + apiLink: string; + + private destroy$: Subject = new Subject(); + + constructor(private dotLicenseService: DotLicenseService) {} + + ngOnInit() { + this.isEnterpriseLicense$ = this.dotLicenseService.isEnterprise(); + + this.apiLink = `api/v1/page/render${this.pageState.page.pageURI}?language_id=${this.pageState.page.languageId}`; + } + + ngOnChanges(): void { + this.showWhatsChanged = + this.pageState.state.mode === DotPageMode.PREVIEW && + !('persona' in this.pageState.viewAs); + } + + ngOnDestroy(): void { + this.destroy$.next(true); + this.destroy$.complete(); + } + + /** + * Hide what's change when state change + * + * @memberof DotEditPageToolbarComponent + */ + stateChange(): void { + if (this.showWhatsChanged) { + this.showWhatsChanged = false; + this.whatschange.emit(this.showWhatsChanged); + } + } +} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-toolbar/dot-edit-page-toolbar.module.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-toolbar/dot-edit-page-toolbar.module.ts new file mode 100644 index 000000000000..e826350afe04 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-toolbar/dot-edit-page-toolbar.module.ts @@ -0,0 +1,34 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { DotEditPageToolbarComponent } from './dot-edit-page-toolbar.component'; +import { FormsModule } from '@angular/forms'; +import { DotEditPageViewAsControllerModule } from '../dot-edit-page-view-as-controller/dot-edit-page-view-as-controller.module'; +import { DotEditPageStateControllerModule } from '../dot-edit-page-state-controller/dot-edit-page-state-controller.module'; +import { DotEditPageInfoModule } from '@portlets/dot-edit-page/components/dot-edit-page-info/dot-edit-page-info.module'; +import { DotEditPageWorkflowsActionsModule } from '../dot-edit-page-workflows-actions/dot-edit-page-workflows-actions.module'; +import { DotSecondaryToolbarModule } from '@components/dot-secondary-toolbar'; +import { DotPipesModule } from '@pipes/dot-pipes.module'; +import { ButtonModule } from 'primeng/button'; +import { CheckboxModule } from 'primeng/checkbox'; +import { ToolbarModule } from 'primeng/toolbar'; +import { DotGlobalMessageModule } from '@dotcms/app/view/components/_common/dot-global-message/dot-global-message.module'; + +@NgModule({ + imports: [ + ButtonModule, + CommonModule, + CheckboxModule, + DotEditPageWorkflowsActionsModule, + DotEditPageInfoModule, + DotEditPageViewAsControllerModule, + DotEditPageStateControllerModule, + DotSecondaryToolbarModule, + FormsModule, + ToolbarModule, + DotPipesModule, + DotGlobalMessageModule + ], + exports: [DotEditPageToolbarComponent], + declarations: [DotEditPageToolbarComponent] +}) +export class DotEditPageToolbarModule {} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-view-as-controller/dot-edit-page-view-as-controller.component.html b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-view-as-controller/dot-edit-page-view-as-controller.component.html new file mode 100644 index 000000000000..03850adef931 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-view-as-controller/dot-edit-page-view-as-controller.component.html @@ -0,0 +1,34 @@ + + + + + + + + + + + + diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-view-as-controller/dot-edit-page-view-as-controller.component.scss b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-view-as-controller/dot-edit-page-view-as-controller.component.scss new file mode 100644 index 000000000000..ce6620a89993 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-view-as-controller/dot-edit-page-view-as-controller.component.scss @@ -0,0 +1,56 @@ +@use "variables" as *; + +::ng-deep { + .dot-language-selector__dialog, + .dot-device-selector__dialog { + display: none !important; + } + + @media only screen and (max-width: $screen-device-container-max) { + .dot-language-selector__dialog, + .dot-device-selector__dialog { + display: inline-block !important; + } + } +} + +:host { + display: flex; + + & > * { + margin-left: 3.5rem; + + &:first-child { + margin-left: 0; + } + } + + @media only screen and (max-width: $screen-device-container-max) { + dot-language-selector, + dot-device-selector, + dot-persona-selector { + margin-left: $spacing-3; + } + } + + ::ng-deep { + .p-dropdown { + &:not(.p-state-disabled) { + .p-dropdown-label, + .p-dropdown-trigger { + color: $gray; + } + } + } + + .p-chkbox:not(.p-state-disabled) { + .p-chkbox-box.p-state-default { + border-color: $gray; + } + } + + .p-chkbox-label { + color: $gray; + } + } +} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-view-as-controller/dot-edit-page-view-as-controller.component.spec.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-view-as-controller/dot-edit-page-view-as-controller.component.spec.ts new file mode 100644 index 000000000000..9f7854fd8163 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-view-as-controller/dot-edit-page-view-as-controller.component.spec.ts @@ -0,0 +1,292 @@ +import { ComponentFixture, waitForAsync } from '@angular/core/testing'; +import { DotDevicesService } from '@services/dot-devices/dot-devices.service'; +import { DotLanguagesService } from '@services/dot-languages/dot-languages.service'; +import { DotPersonasService } from '@services/dot-personas/dot-personas.service'; +import { DOTTestBed } from '../../../../../test/dot-test-bed'; +import { Component, DebugElement, EventEmitter, Input, Output } from '@angular/core'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; +import { By } from '@angular/platform-browser'; +import { DotDevicesServiceMock } from '../../../../../test/dot-device-service.mock'; +import { DotLanguagesServiceMock } from '../../../../../test/dot-languages-service.mock'; +import { DotPersonasServiceMock } from '../../../../../test/dot-personas-service.mock'; +import { mockDotDevices } from '../../../../../test/dot-device.mock'; +import { DotPersona } from '@models/dot-persona/dot-persona.model'; +import { DotDevice } from '@models/dot-device/dot-device.model'; +import { DotLanguage } from '@models/dot-language/dot-language.model'; +import { mockDotEditPageViewAs } from '../../../../../test/dot-edit-page-view-as.mock'; +import { mockDotPersona } from '../../../../../test/dot-persona.mock'; +import { mockUser, LoginServiceMock } from '../../../../../test/login-service.mock'; +import { mockDotRenderedPage } from '../../../../../test/dot-page-render.mock'; +import { DotDeviceSelectorComponent } from '@components/dot-device-selector/dot-device-selector.component'; +import { DotPersonaSelectorComponent } from '@components/dot-persona-selector/dot-persona-selector.component'; +import { DotLanguageSelectorComponent } from '@components/dot-language-selector/dot-language-selector.component'; +import { LoginService } from '@dotcms/dotcms-js'; +import { DotLicenseService } from '@services/dot-license/dot-license.service'; +import { of } from 'rxjs'; +import { MockDotMessageService } from '../../../../../test/dot-message-service.mock'; +import { DotMessageService } from '@services/dot-message/dot-messages.service'; +import { DotPageRenderState } from '@portlets/dot-edit-page/shared/models/dot-rendered-page-state.model'; +import { DotEditPageViewAsControllerComponent } from './dot-edit-page-view-as-controller.component'; +import { DotPageRender } from '@models/dot-page/dot-rendered-page.model'; +import { DotPageStateService } from '../../services/dot-page-state/dot-page-state.service'; +import { DotPageStateServiceMock } from '@tests/dot-page-state.service.mock'; +import { DotPersonalizeService } from '@services/dot-personalize/dot-personalize.service'; +import { DotPersonalizeServiceMock } from '@tests/dot-personalize-service.mock'; +import { TooltipModule } from 'primeng/tooltip'; +import { DotPipesModule } from '@pipes/dot-pipes.module'; + +@Component({ + selector: 'dot-test-host', + template: `` +}) +class DotTestHostComponent { + @Input() + pageState: DotPageRenderState; +} + +@Component({ + selector: 'dot-persona-selector', + template: '' +}) +class MockDotPersonaSelectorComponent { + @Input() + pageId: string; + @Input() + value: DotPersona; + @Input() disabled: boolean; + @Input() + pageState: DotPageRenderState; + + @Output() + selected = new EventEmitter(); +} + +@Component({ + selector: 'dot-device-selector', + template: '' +}) +class MockDotDeviceSelectorComponent { + @Input() + value: DotDevice; + @Output() + selected = new EventEmitter(); +} + +@Component({ + selector: 'dot-language-selector', + template: '' +}) +class MockDotLanguageSelectorComponent { + @Input() + value: DotLanguage; + @Input() + contentInode: string; + + @Output() + selected = new EventEmitter(); +} + +const messageServiceMock = new MockDotMessageService({ + 'editpage.viewas.previewing': 'Previewing', + 'editpage.viewas.default.device': 'Default Device' +}); + +describe('DotEditPageViewAsControllerComponent', () => { + let componentHost: DotTestHostComponent; + let fixtureHost: ComponentFixture; + + let component: DotEditPageViewAsControllerComponent; + let de: DebugElement; + let languageSelector: DotLanguageSelectorComponent; + let deviceSelector: DotDeviceSelectorComponent; + let personaSelector: DotPersonaSelectorComponent; + let dotLicenseService: DotLicenseService; + + beforeEach( + waitForAsync(() => { + DOTTestBed.configureTestingModule({ + declarations: [ + DotTestHostComponent, + DotEditPageViewAsControllerComponent, + MockDotPersonaSelectorComponent, + MockDotDeviceSelectorComponent, + MockDotLanguageSelectorComponent + ], + imports: [BrowserAnimationsModule, TooltipModule, DotPipesModule], + providers: [ + DotLicenseService, + { + provide: DotMessageService, + useValue: messageServiceMock + }, + { + provide: DotDevicesService, + useClass: DotDevicesServiceMock + }, + { + provide: DotPersonasService, + useClass: DotPersonasServiceMock + }, + { + provide: DotLanguagesService, + useClass: DotLanguagesServiceMock + }, + { + provide: LoginService, + useClass: LoginServiceMock + }, + { + provide: DotPageStateService, + useClass: DotPageStateServiceMock + }, + { + provide: DotPersonalizeService, + useClass: DotPersonalizeServiceMock + } + ] + }); + }) + ); + + beforeEach(() => { + fixtureHost = DOTTestBed.createComponent(DotTestHostComponent); + componentHost = fixtureHost.componentInstance; + de = fixtureHost.debugElement.query(By.css('dot-edit-page-view-as-controller')); + component = de.componentInstance; + dotLicenseService = de.injector.get(DotLicenseService); + }); + + describe('community license', () => { + beforeEach(() => { + spyOn(dotLicenseService, 'isEnterprise').and.returnValue(of(false)); + // spyOn(component.changeViewAs, 'emit'); + + componentHost.pageState = new DotPageRenderState(mockUser(), mockDotRenderedPage()); + + fixtureHost.detectChanges(); + }); + + it('should have only language', () => { + expect(de.query(By.css('dot-language-selector'))).not.toBeNull(); + expect(de.query(By.css('dot-device-selector'))).toBeFalsy(); + expect(de.query(By.css('dot-persona-selector'))).toBeFalsy(); + expect(de.query(By.css('p-checkbox'))).toBeFalsy(); + }); + }); + + describe('enterprise license', () => { + beforeEach(() => { + spyOn(dotLicenseService, 'isEnterprise').and.returnValue(of(true)); + spyOn(component, 'changePersonaHandler').and.callThrough(); + spyOn(component, 'changeDeviceHandler').and.callThrough(); + spyOn(component, 'changeLanguageHandler').and.callThrough(); + + componentHost.pageState = new DotPageRenderState(mockUser(), mockDotRenderedPage()); + + fixtureHost.detectChanges(); + + languageSelector = de.query(By.css('dot-language-selector')).componentInstance; + deviceSelector = de.query(By.css('dot-device-selector')).componentInstance; + personaSelector = de.query(By.css('dot-persona-selector')).componentInstance; + }); + + it('should have persona selector', () => { + expect(personaSelector).not.toBeNull(); + }); + + xit('should persona selector be enabled', () => { + expect(personaSelector.disabled).toBe(false); + }); + + it('should persona selector be disabled after haveContent is set to false', () => { + const dotPageStateService: DotPageStateService = de.injector.get(DotPageStateService); + dotPageStateService.haveContent$.next(false); + + fixtureHost.detectChanges(); + expect(personaSelector.disabled).toBe(true); + }); + + it('should persona selector be enabled after haveContent is set to true', () => { + const dotPageStateService: DotPageStateService = de.injector.get(DotPageStateService); + dotPageStateService.haveContent$.next(true); + + fixtureHost.detectChanges(); + expect(personaSelector.disabled).toBe(false); + }); + + it('should emit changes in personas', () => { + personaSelector.selected.emit(mockDotPersona); + + expect(component.changePersonaHandler).toHaveBeenCalledWith(mockDotPersona); + // expect(component.changeViewAs.emit).toHaveBeenCalledWith({ + // language: mockDotLanguage, + // persona: mockDotPersona, + // mode: 'PREVIEW' + // }); + }); + + it('should have Device selector with tooltip', () => { + const deviceSelectorDe = de.query(By.css('dot-device-selector')); + expect(deviceSelector).not.toBeNull(); + expect(deviceSelectorDe.attributes.appendTo).toBe('body'); + expect(deviceSelectorDe.attributes['ng-reflect-text']).toBe('Default Device'); + expect(deviceSelectorDe.attributes['ng-reflect-tooltip-position']).toBe('bottom'); + }); + + it('should emit changes in Device', () => { + fixtureHost.detectChanges(); + deviceSelector.selected.emit(mockDotDevices[0]); + + expect(component.changeDeviceHandler).toHaveBeenCalledWith(mockDotDevices[0]); + // expect(component.changeViewAs.emit).toHaveBeenCalledWith({ + // language: mockDotLanguage, + // device: mockDotDevices[0], + // mode: 'PREVIEW' + // }); + }); + + it('should have Language selector', () => { + const languageSelectorDe = de.query(By.css('dot-language-selector')); + expect(languageSelector).not.toBeNull(); + expect(languageSelectorDe.attributes.appendTo).toBe('body'); + expect(languageSelectorDe.attributes['ng-reflect-tooltip-position']).toBe('bottom'); + }); + + it('should emit changes in Language', () => { + const testlanguage: DotLanguage = { + id: 2, + languageCode: 'es', + countryCode: 'es', + language: 'test', + country: 'test' + }; + fixtureHost.detectChanges(); + languageSelector.selected.emit(testlanguage); + + expect(component.changeLanguageHandler).toHaveBeenCalledWith(testlanguage); + // expect(component.changeViewAs.emit).toHaveBeenCalledWith({ + // language: testlanguage, + // mode: 'PREVIEW' + // }); + }); + + it('should propagate the values to the selector components on init', () => { + componentHost.pageState = new DotPageRenderState( + mockUser(), + new DotPageRender({ + ...mockDotRenderedPage(), + viewAs: mockDotEditPageViewAs + }) + ); + fixtureHost.detectChanges(); + + // expect(languageSelector.value).toEqual(mockDotPersona); + expect(deviceSelector.value).toEqual(mockDotEditPageViewAs.device); + + // expect(personaSelector.value).toEqual(mockDotEditPageViewAs.persona); + // expect(personaSelector.pageId).toEqual(mockDotRenderedPage.page.identifier); + }); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-view-as-controller/dot-edit-page-view-as-controller.component.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-view-as-controller/dot-edit-page-view-as-controller.component.ts new file mode 100644 index 000000000000..b959603f57af --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-view-as-controller/dot-edit-page-view-as-controller.component.ts @@ -0,0 +1,95 @@ +import { Component, Input, OnInit } from '@angular/core'; +import { Observable } from 'rxjs'; +import { take } from 'rxjs/operators'; + +import { DotPersona } from '@models/dot-persona/dot-persona.model'; +import { DotLanguage } from '@models/dot-language/dot-language.model'; +import { DotDevice } from '@models/dot-device/dot-device.model'; +import { DotMessageService } from '@services/dot-message/dot-messages.service'; +import { DotLicenseService } from '@services/dot-license/dot-license.service'; +import { DotPersonalizeService } from '@services/dot-personalize/dot-personalize.service'; +import { DotAlertConfirmService } from '@services/dot-alert-confirm'; +import { DotPageRenderState } from '@portlets/dot-edit-page/shared/models'; +import { DotPageMode } from '@models/dot-page/dot-page-mode.enum'; +import { DotPageStateService } from '../../services/dot-page-state/dot-page-state.service'; + +@Component({ + selector: 'dot-edit-page-view-as-controller', + templateUrl: './dot-edit-page-view-as-controller.component.html', + styleUrls: ['./dot-edit-page-view-as-controller.component.scss'] +}) +export class DotEditPageViewAsControllerComponent implements OnInit { + isEnterpriseLicense$: Observable; + @Input() pageState: DotPageRenderState; + + constructor( + private dotAlertConfirmService: DotAlertConfirmService, + private dotMessageService: DotMessageService, + private dotLicenseService: DotLicenseService, + public dotPageStateService: DotPageStateService, + private dotPersonalizeService: DotPersonalizeService + ) {} + + ngOnInit(): void { + this.isEnterpriseLicense$ = this.dotLicenseService.isEnterprise(); + } + + /** + * Handle the changes in Persona Selector. + * + * @param DotPersona persona + * @memberof DotEditPageViewAsControllerComponent + */ + changePersonaHandler(persona: DotPersona): void { + this.dotPageStateService.setPersona(persona); + } + + /** + * Handle changes in Language Selector. + * + * @param DotLanguage language + * @memberof DotEditPageViewAsControllerComponent + */ + changeLanguageHandler({ id }: DotLanguage): void { + this.dotPageStateService.setLanguage(id); + } + + /** + * Handle changes in Device Selector. + * + * @param DotDevice device + * @memberof DotEditPageViewAsControllerComponent + */ + changeDeviceHandler(device: DotDevice): void { + this.dotPageStateService.setDevice(device); + } + + /** + * Remove personalization for the current page and set the new state to the page + * + * @param {DotPersona} persona + * @memberof DotEditPageViewAsControllerComponent + */ + deletePersonalization(persona: DotPersona): void { + this.dotAlertConfirmService.confirm({ + header: this.dotMessageService.get('editpage.personalization.delete.confirm.header'), + message: this.dotMessageService.get( + 'editpage.personalization.delete.confirm.message', + persona.name + ), + accept: () => { + this.dotPersonalizeService + .despersonalized(this.pageState.page.identifier, persona.keyTag) + .pipe(take(1)) + .subscribe(() => { + this.dotPageStateService.setLock( + { + mode: DotPageMode.PREVIEW + }, + false + ); + }); + } + }); + } +} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-view-as-controller/dot-edit-page-view-as-controller.module.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-view-as-controller/dot-edit-page-view-as-controller.module.ts new file mode 100644 index 000000000000..4d6fb18dac94 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-view-as-controller/dot-edit-page-view-as-controller.module.ts @@ -0,0 +1,26 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { DotEditPageViewAsControllerComponent } from './dot-edit-page-view-as-controller.component'; +import { FormsModule } from '@angular/forms'; +import { DotLanguageSelectorModule } from '@components/dot-language-selector/dot-language-selector.module'; +import { DotDeviceSelectorModule } from '@components/dot-device-selector/dot-device-selector.module'; +import { DotPersonaSelectorModule } from '@components/dot-persona-selector/dot-persona.selector.module'; +import { DotPipesModule } from '@pipes/dot-pipes.module'; +import { DropdownModule } from 'primeng/dropdown'; +import { TooltipModule } from 'primeng/tooltip'; + +@NgModule({ + imports: [ + CommonModule, + DropdownModule, + FormsModule, + TooltipModule, + DotPersonaSelectorModule, + DotLanguageSelectorModule, + DotDeviceSelectorModule, + DotPipesModule + ], + declarations: [DotEditPageViewAsControllerComponent], + exports: [DotEditPageViewAsControllerComponent] +}) +export class DotEditPageViewAsControllerModule {} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-workflows-actions/dot-edit-page-workflows-actions.component.html b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-workflows-actions/dot-edit-page-workflows-actions.component.html new file mode 100644 index 000000000000..a39c0ba17afb --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-workflows-actions/dot-edit-page-workflows-actions.component.html @@ -0,0 +1,9 @@ + + + + diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-workflows-actions/dot-edit-page-workflows-actions.component.scss b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-workflows-actions/dot-edit-page-workflows-actions.component.scss new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-workflows-actions/dot-edit-page-workflows-actions.component.spec.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-workflows-actions/dot-edit-page-workflows-actions.component.spec.ts new file mode 100644 index 000000000000..a762b2933144 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-workflows-actions/dot-edit-page-workflows-actions.component.spec.ts @@ -0,0 +1,348 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ + +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; +import { By } from '@angular/platform-browser'; +import { DebugElement, Component, Input } from '@angular/core'; +import { RouterTestingModule } from '@angular/router/testing'; +import { ComponentFixture, TestBed } from '@angular/core/testing'; +import { of } from 'rxjs'; +import { + CoreWebService, + DotcmsConfigService, + DotcmsEventsService, + DotEventsSocket, + DotEventsSocketURL, + LoggerService, + LoginService, + StringUtils +} from '@dotcms/dotcms-js'; +import { DotWorkflowServiceMock } from '@tests/dot-workflow-service.mock'; +import { LoginServiceMock } from '@tests/login-service.mock'; +import { MockDotMessageService } from '@tests/dot-message-service.mock'; +import { mockDotPage } from '@tests/dot-page-render.mock'; +import { mockWorkflowsActions } from '@tests/dot-workflows-actions.mock'; +import { DotEditPageWorkflowsActionsComponent } from './dot-edit-page-workflows-actions.component'; +import { DotGlobalMessageService } from '@components/_common/dot-global-message/dot-global-message.service'; +import { DotHttpErrorManagerService } from '@services/dot-http-error-manager/dot-http-error-manager.service'; +import { DotMessageService } from '@services/dot-message/dot-messages.service'; +import { DotPage } from '@shared/models/dot-page/dot-page.model'; +import { DotRouterService } from '@services/dot-router/dot-router.service'; +import { DotWorkflowService } from '@services/dot-workflow/dot-workflow.service'; +import { DotWorkflowsActionsService } from '@services/dot-workflows-actions/dot-workflows-actions.service'; +import { DotWorkflowActionsFireService } from '@services/dot-workflow-actions-fire/dot-workflow-actions-fire.service'; +import { dotcmsContentletMock } from '@tests/dotcms-contentlet.mock'; +import { DotWizardService } from '@services/dot-wizard/dot-wizard.service'; +import { PushPublishService } from '@services/push-publish/push-publish.service'; +import { MockPushPublishService } from '@portlets/shared/dot-content-types-listing/dot-content-types.component.spec'; +import { DotMessageDisplayService } from '@components/dot-message-display/services'; +import { DotMessageSeverity, DotMessageType } from '@components/dot-message-display/model'; +import { CoreWebServiceMock } from '@tests/core-web.service.mock'; +import { DotAlertConfirmService } from '@services/dot-alert-confirm'; +import { DotEventsService } from '@services/dot-events/dot-events.service'; +import { dotEventSocketURLFactory } from '@tests/dot-test-bed'; +import { HttpClientTestingModule } from '@angular/common/http/testing'; +import { DotWorkflowEventHandlerService } from '@services/dot-workflow-event-handler/dot-workflow-event-handler.service'; +import { DotIframeService } from '@components/_common/iframe/service/dot-iframe/dot-iframe.service'; +import { Menu, MenuModule } from 'primeng/menu'; +import { ConfirmationService } from 'primeng/api'; +import { UiDotIconButtonModule } from '@components/_common/dot-icon-button/dot-icon-button.module'; +import { DotFormatDateService } from '@services/dot-format-date-service'; + +@Component({ + selector: 'dot-test-host-component', + template: ` ` +}) +class TestHostComponent { + @Input() page: DotPage; +} + +describe('DotEditPageWorkflowsActionsComponent', () => { + let component: TestHostComponent; + let fixture: ComponentFixture; + let de: DebugElement; + let testbed; + let button: DebugElement; + let dotWorkflowActionsFireService: DotWorkflowActionsFireService; + let workflowActionDebugEl: DebugElement; + let workflowActionComponent: DotEditPageWorkflowsActionsComponent; + let dotGlobalMessageService: DotGlobalMessageService; + let dotWorkflowsActionsService: DotWorkflowsActionsService; + let dotWorkflowEventHandlerService: DotWorkflowEventHandlerService; + const messageServiceMock = new MockDotMessageService({ + 'editpage.actions.fire.confirmation': 'The action "{0}" was executed correctly', + 'editpage.actions.fire.error.add.environment': 'place holder text', + 'Workflow-Action': 'Workflow Action' + }); + + beforeEach(() => { + testbed = TestBed.configureTestingModule({ + imports: [ + RouterTestingModule, + BrowserAnimationsModule, + MenuModule, + HttpClientTestingModule, + UiDotIconButtonModule + ], + declarations: [DotEditPageWorkflowsActionsComponent, TestHostComponent], + providers: [ + { + provide: DotWorkflowService, + useClass: DotWorkflowServiceMock + }, + { + provide: DotMessageService, + useValue: messageServiceMock + }, + { + provide: LoginService, + useClass: LoginServiceMock + }, + { + provide: PushPublishService, + useClass: MockPushPublishService + }, + { provide: CoreWebService, useClass: CoreWebServiceMock }, + DotWorkflowsActionsService, + DotHttpErrorManagerService, + DotRouterService, + DotWorkflowActionsFireService, + DotWizardService, + DotMessageDisplayService, + DotAlertConfirmService, + ConfirmationService, + DotGlobalMessageService, + DotEventsService, + DotcmsEventsService, + DotEventsSocket, + DotFormatDateService, + { provide: DotEventsSocketURL, useFactory: dotEventSocketURLFactory }, + DotcmsConfigService, + LoggerService, + StringUtils, + DotWorkflowEventHandlerService, + DotIframeService + ] + }); + }); + + beforeEach(() => { + fixture = testbed.createComponent(TestHostComponent); + de = fixture.debugElement; + + component = fixture.componentInstance; + component.page = { + ...mockDotPage(), + ...{ workingInode: 'cc2cdf9c-a20d-4862-9454-2a76c1132123' } + }; + + workflowActionDebugEl = de.query(By.css('dot-edit-page-workflows-actions')); + workflowActionComponent = workflowActionDebugEl.componentInstance; + dotGlobalMessageService = de.injector.get(DotGlobalMessageService); + button = workflowActionDebugEl.query(By.css('dot-icon-button')); + + dotWorkflowActionsFireService = workflowActionDebugEl.injector.get( + DotWorkflowActionsFireService + ); + dotWorkflowsActionsService = workflowActionDebugEl.injector.get(DotWorkflowsActionsService); + spyOn(dotWorkflowActionsFireService, 'fireTo').and.returnValue(of(dotcmsContentletMock)); + }); + + describe('dot-icon-button', () => { + describe('enabled', () => { + beforeEach(() => { + spyOn(dotWorkflowsActionsService, 'getByInode').and.returnValue( + of(mockWorkflowsActions) + ); + component.page = { + ...mockDotPage(), + ...{ + workingInode: 'cc2cdf9c-a20d-4862-9454-2a76c1132123', + lockedOn: new Date(1517330117295) + } + }; + fixture.detectChanges(); + }); + + it('should have button', () => { + expect(button).toBeTruthy(); + }); + + it('should have right attr in button', () => { + const attr = button.attributes; + expect(attr.icon).toEqual('more_vert'); + expect(attr.float).toBeDefined(); + }); + + it('should get workflow actions when page changes"', () => { + expect(dotWorkflowsActionsService.getByInode).toHaveBeenCalledWith( + 'cc2cdf9c-a20d-4862-9454-2a76c1132123' + ); + expect(dotWorkflowsActionsService.getByInode).toHaveBeenCalledTimes(1); + }); + + describe('fire actions', () => { + let splitButtons: DebugElement[]; + let firstButton; + let secondButton; + let thirdButton; + + beforeEach(() => { + const mainButton: DebugElement = de.query(By.css('dot-icon-button')); + mainButton.triggerEventHandler('click', { + currentTarget: mainButton.nativeElement + }); + fixture.detectChanges(); + + splitButtons = de.queryAll(By.css('.p-menuitem-link')); + firstButton = splitButtons[0].nativeElement; + secondButton = splitButtons[1].nativeElement; + thirdButton = splitButtons[2].nativeElement; + }); + + describe('with sub actions / action Inputs', () => { + const mockData = { + assign: '654b0931-1027-41f7-ad4d-173115ed8ec1', + comments: 'ds', + pathToMove: '/test/', + environment: ['37fe23d5-588d-4c61-a9ea-70d01e913344'], + expireDate: '2020-08-11 19:59', + filterKey: 'Intelligent.yml', + publishDate: '2020-08-05 17:59', + pushActionSelected: 'publishexpire' + }; + + const mappedData: { [key: string]: any } = { + assign: '654b0931-1027-41f7-ad4d-173115ed8ec1', + comments: 'ds', + expireDate: '2020-08-11', + expireTime: '19-59', + filterKey: 'Intelligent.yml', + iWantTo: 'publishexpire', + publishDate: '2020-08-05', + publishTime: '17-59', + whereToSend: '37fe23d5-588d-4c61-a9ea-70d01e913344', + pathToMove: '/test/', + contentlet: {} + }; + + let dotWizardService: DotWizardService; + let pushPublishService: PushPublishService; + let dotMessageDisplayService: DotMessageDisplayService; + beforeEach(() => { + dotWizardService = de.injector.get(DotWizardService); + pushPublishService = de.injector.get(PushPublishService); + dotMessageDisplayService = de.injector.get(DotMessageDisplayService); + dotWorkflowEventHandlerService = de.injector.get( + DotWorkflowEventHandlerService + ); + }); + + it('should fire actions after wizard data was collected', () => { + spyOn(dotWorkflowEventHandlerService, 'setWizardInput'); + firstButton.click(); + dotWizardService.output$(mockData); + + expect(dotWorkflowEventHandlerService.setWizardInput).toHaveBeenCalledWith( + mockWorkflowsActions[0], + 'Workflow Action' + ); + + expect(dotWorkflowActionsFireService.fireTo).toHaveBeenCalledWith( + component.page.workingInode, + mockWorkflowsActions[0].id, + mappedData + ); + }); + + it('should show and alert when there is no environments and push publish action', () => { + spyOn(pushPublishService, 'getEnvironments').and.returnValue(of([])); + spyOn(dotMessageDisplayService, 'push'); + + firstButton.click(); + expect(dotWorkflowActionsFireService.fireTo).not.toHaveBeenCalled(); + expect(dotMessageDisplayService.push).toHaveBeenCalledWith({ + life: 3000, + message: messageServiceMock.get( + 'editpage.actions.fire.error.add.environment' + ), + severity: DotMessageSeverity.ERROR, + type: DotMessageType.SIMPLE_MESSAGE + }); + }); + }); + + it('should fire actions on click in the menu items', () => { + secondButton.click(); + expect(dotWorkflowActionsFireService.fireTo).toHaveBeenCalledWith( + component.page.workingInode, + mockWorkflowsActions[1].id, + undefined + ); + + thirdButton.click(); + expect(dotWorkflowActionsFireService.fireTo).toHaveBeenCalledWith( + component.page.workingInode, + mockWorkflowsActions[2].id, + undefined + ); + }); + + it('should show success message after fired action in the menu items', () => { + spyOn(dotGlobalMessageService, 'display'); + secondButton.click(); + fixture.detectChanges(); + expect(dotGlobalMessageService.display).toHaveBeenCalledWith( + `The action "${mockWorkflowsActions[1].name}" was executed correctly` + ); + }); + + it('should refresh the action list after fire action', () => { + secondButton.click(); + expect(dotWorkflowsActionsService.getByInode).toHaveBeenCalledTimes(2); // initial ngOnChanges & action. + }); + + it('should emit event after action was fired', () => { + spyOn(workflowActionComponent.fired, 'emit'); + secondButton.click(); + fixture.detectChanges(); + expect( + workflowActionDebugEl.componentInstance.fired.emit + ).toHaveBeenCalledTimes(1); + }); + }); + }); + + describe('disabled', () => { + beforeEach(() => { + spyOn(dotWorkflowsActionsService, 'getByInode').and.returnValue(of([])); + fixture.detectChanges(); + }); + + it('should be disabled', () => { + expect(button.attributes.disabled).toBe('true'); + }); + }); + }); + + describe('menu', () => { + let menu: Menu; + + beforeEach(() => { + spyOn(dotWorkflowsActionsService, 'getByInode').and.returnValue( + of(mockWorkflowsActions) + ); + fixture.detectChanges(); + menu = de.query(By.css('p-menu')).componentInstance; + }); + + it('should have menu', () => { + expect(menu).not.toBe(null); + }); + + it('should set actions', () => { + expect(menu.model[0].label).toEqual('Assign Workflow'); + expect(menu.model[1].label).toEqual('Save'); + expect(menu.model[2].label).toEqual('Save / Publish'); + }); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-workflows-actions/dot-edit-page-workflows-actions.component.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-workflows-actions/dot-edit-page-workflows-actions.component.ts new file mode 100644 index 000000000000..520146c3aee9 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-workflows-actions/dot-edit-page-workflows-actions.component.ts @@ -0,0 +1,141 @@ +import { Observable } from 'rxjs'; +import { + Component, + Input, + OnChanges, + SimpleChanges, + Output, + EventEmitter, + ChangeDetectionStrategy +} from '@angular/core'; +import { tap, map, catchError, take } from 'rxjs/operators'; +import { MenuItem } from 'primeng/api'; + +import { DotCMSContentlet, DotCMSWorkflowAction } from '@dotcms/dotcms-models'; + +import { DotWorkflowActionsFireService } from '@services/dot-workflow-actions-fire/dot-workflow-actions-fire.service'; +import { DotHttpErrorManagerService } from '@services/dot-http-error-manager/dot-http-error-manager.service'; +import { DotGlobalMessageService } from '@components/_common/dot-global-message/dot-global-message.service'; +import { DotMessageService } from '@services/dot-message/dot-messages.service'; + +import { DotWorkflowsActionsService } from '@services/dot-workflows-actions/dot-workflows-actions.service'; +import { DotWizardService } from '@services/dot-wizard/dot-wizard.service'; +import { DotWorkflowEventHandlerService } from '@services/dot-workflow-event-handler/dot-workflow-event-handler.service'; +import { DotPage } from '@models/dot-page/dot-page.model'; +import { DotWorkflowPayload } from '@dotcms/dotcms-models'; + +@Component({ + selector: 'dot-edit-page-workflows-actions', + templateUrl: './dot-edit-page-workflows-actions.component.html', + styleUrls: ['./dot-edit-page-workflows-actions.component.scss'], + changeDetection: ChangeDetectionStrategy.OnPush +}) +export class DotEditPageWorkflowsActionsComponent implements OnChanges { + @Input() page: DotPage; + + @Output() fired: EventEmitter = new EventEmitter(); + + actionsAvailable: boolean; + actions: Observable; + + constructor( + private dotWorkflowActionsFireService: DotWorkflowActionsFireService, + private dotWorkflowsActionsService: DotWorkflowsActionsService, + private dotMessageService: DotMessageService, + private httpErrorManagerService: DotHttpErrorManagerService, + private dotGlobalMessageService: DotGlobalMessageService, + private dotWizardService: DotWizardService, + private dotWorkflowEventHandlerService: DotWorkflowEventHandlerService + ) {} + + ngOnChanges(changes: SimpleChanges) { + if (changes.page) { + this.actions = this.getWorkflowActions(this.page.workingInode); + } + } + + private getWorkflowActions(inode: string): Observable { + return this.dotWorkflowsActionsService.getByInode(inode).pipe( + tap((workflows: DotCMSWorkflowAction[]) => { + this.actionsAvailable = !!workflows.length; + }), + map((newWorkflows: DotCMSWorkflowAction[]) => { + return newWorkflows.length !== 0 ? this.getWorkflowOptions(newWorkflows) : []; + }) + ); + } + + private getWorkflowOptions(workflows: DotCMSWorkflowAction[]): MenuItem[] { + return workflows.map((workflow: DotCMSWorkflowAction) => { + return { + label: workflow.name, + command: () => { + if (workflow.actionInputs.length) { + if ( + this.dotWorkflowEventHandlerService.containsPushPublish( + workflow.actionInputs + ) + ) { + this.dotWorkflowEventHandlerService + .checkPublishEnvironments() + .pipe(take(1)) + .subscribe((hasEnviroments: boolean) => { + if (hasEnviroments) { + this.openWizard(workflow); + } + }); + } else { + this.openWizard(workflow); + } + } else { + this.fireWorkflowAction(workflow); + } + } + }; + }); + } + + private openWizard(workflow: DotCMSWorkflowAction): void { + this.dotWizardService + .open( + this.dotWorkflowEventHandlerService.setWizardInput( + workflow, + this.dotMessageService.get('Workflow-Action') + ) + ) + .pipe(take(1)) + .subscribe((data: DotWorkflowPayload) => { + this.fireWorkflowAction( + workflow, + this.dotWorkflowEventHandlerService.processWorkflowPayload( + data, + workflow.actionInputs + ) + ); + }); + } + + private fireWorkflowAction( + workflow: DotCMSWorkflowAction, + data?: T + ): void { + const currentMenuActions = this.actions; + this.dotWorkflowActionsFireService + .fireTo(this.page.workingInode, workflow.id, data) + .pipe( + take(1), + catchError((error) => { + this.httpErrorManagerService.handle(error); + return currentMenuActions; + }) + ) + .subscribe((contentlet: DotCMSContentlet) => { + this.dotGlobalMessageService.display( + this.dotMessageService.get('editpage.actions.fire.confirmation', workflow.name) + ); + const newInode = contentlet.inode || this.page.workingInode; + this.fired.emit(contentlet); + this.actions = this.getWorkflowActions(newInode); + }); + } +} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-workflows-actions/dot-edit-page-workflows-actions.module.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-workflows-actions/dot-edit-page-workflows-actions.module.ts new file mode 100644 index 000000000000..eafcd103a779 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-workflows-actions/dot-edit-page-workflows-actions.module.ts @@ -0,0 +1,16 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { DotEditPageWorkflowsActionsComponent } from './dot-edit-page-workflows-actions.component'; +import { DotWorkflowsActionsService } from '@services/dot-workflows-actions/dot-workflows-actions.service'; +import { DotWorkflowService } from '@services/dot-workflow/dot-workflow.service'; +import { DotWorkflowEventHandlerService } from '@services/dot-workflow-event-handler/dot-workflow-event-handler.service'; +import { MenuModule } from 'primeng/menu'; +import { UiDotIconButtonModule } from '@components/_common/dot-icon-button/dot-icon-button.module'; + +@NgModule({ + imports: [CommonModule, UiDotIconButtonModule, MenuModule], + exports: [DotEditPageWorkflowsActionsComponent], + declarations: [DotEditPageWorkflowsActionsComponent], + providers: [DotWorkflowsActionsService, DotWorkflowService, DotWorkflowEventHandlerService] +}) +export class DotEditPageWorkflowsActionsModule {} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-form-selector/dot-form-selector.component.html b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-form-selector/dot-form-selector.component.html new file mode 100644 index 000000000000..867755312c15 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-form-selector/dot-form-selector.component.html @@ -0,0 +1,44 @@ + + + + + {{ 'contenttypes.form.name' | dm }} + + + + + +
+ {{ item.name }} + +
+ + +
+
+
diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-form-selector/dot-form-selector.component.scss b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-form-selector/dot-form-selector.component.scss new file mode 100644 index 000000000000..6912d51768a2 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-form-selector/dot-form-selector.component.scss @@ -0,0 +1,32 @@ +@use "variables" as *; +@import "mixins"; + +:host { + dot-dialog ::ng-deep { + th { + text-align: left; + } + + .dialog .p-dialog { + width: 800px; + + .p-dialog-content { + height: 665px !important; + } + } + + .dot-form-selector-list-row { + align-items: baseline; + display: flex; + justify-content: space-between; + + button { + margin-left: $spacing-5; + } + } + + .p-paginator-bottom { + @include paginator-bottom-absolute; + } + } +} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-form-selector/dot-form-selector.component.spec.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-form-selector/dot-form-selector.component.spec.ts new file mode 100644 index 000000000000..bb8a30384ad7 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-form-selector/dot-form-selector.component.spec.ts @@ -0,0 +1,153 @@ +import { of as observableOf, Observable } from 'rxjs'; +import { DebugElement, Component } from '@angular/core'; +import { DotFormSelectorComponent } from './dot-form-selector.component'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; +import { DOTTestBed } from '../../../../../test/dot-test-bed'; +import { By } from '@angular/platform-browser'; +import { PaginatorService } from '@services/paginator'; +import { MockDotMessageService } from '../../../../../test/dot-message-service.mock'; +import { DotMessageService } from '@services/dot-message/dot-messages.service'; +import { DotDialogModule } from '@components/dot-dialog/dot-dialog.module'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; +import { dotcmsContentTypeBasicMock } from '@tests/dot-content-types.mock'; +import { DotCMSContentType } from '@dotcms/dotcms-models'; +import { delay } from 'rxjs/operators'; + +const mockContentType: DotCMSContentType = { + ...dotcmsContentTypeBasicMock, + clazz: 'com.dotcms.contenttype.model.type.ImmutableWidgetContentType', + defaultType: false, + fixed: false, + folder: 'SYSTEM_FOLDER', + host: null, + name: 'Hello World', + owner: '123', + system: false +}; + +@Component({ + template: ` ` +}) +class TestHostComponent { + show = false; +} + +function getWithOffsetMock(): Observable { + return observableOf([mockContentType]).pipe(delay(10)) as Observable; +} + +const messageServiceMock = new MockDotMessageService({ + 'contenttypes.form.name': 'Name', + Select: 'Select', + 'modes.Add-Form': 'Add Form' +}); + +describe('DotFormSelectorComponent', () => { + let component: DotFormSelectorComponent; + let fixture: ComponentFixture; + let de: DebugElement; + let paginatorService: PaginatorService; + + beforeEach( + waitForAsync(() => { + DOTTestBed.configureTestingModule({ + declarations: [DotFormSelectorComponent, TestHostComponent], + providers: [ + PaginatorService, + { + provide: DotMessageService, + useValue: messageServiceMock + } + ], + imports: [DotDialogModule, BrowserAnimationsModule] + }); + }) + ); + + beforeEach(() => { + fixture = TestBed.createComponent(TestHostComponent); + component = fixture.debugElement.query(By.css('dot-form-selector')).componentInstance; + de = fixture.debugElement; + paginatorService = component.paginatorService; + }); + + describe('hidden dialog', () => { + beforeEach(() => { + fixture.detectChanges(); + }); + + it('should have dot-dialog hidden', () => { + const dialog: DebugElement = de.query(By.css('dot-dialog')); + expect(dialog.componentInstance.visible).toBe(false); + expect(dialog.componentInstance.header).toBe('Add Form'); + }); + }); + + describe('show dialog', () => { + beforeEach(() => { + spyOn(paginatorService, 'getWithOffset').and.callFake(getWithOffsetMock); + + fixture.componentInstance.show = true; + fixture.detectChanges(); + }); + + describe('p-dataTable component', () => { + let pTableComponent: DebugElement; + + beforeEach(() => { + pTableComponent = de.query(By.css('p-table')); + }); + + it('should have one', () => { + expect(pTableComponent).toBeTruthy(); + }); + }); + + describe('data', () => { + describe('pagination', () => { + it('should set the url', () => { + expect(paginatorService.url).toBe('v1/contenttype?type=FORM'); + }); + + it('should load first page and add paginator CSS class', async () => { + await fixture.whenStable(); + paginatorService.totalRecords = 12; + paginatorService.paginationPerPage = 5; + fixture.detectChanges(); + expect(paginatorService.getWithOffset).toHaveBeenCalledWith(0); + expect(component.items).toEqual([mockContentType]); + expect(component.dotDialog.dialog.nativeElement.classList).toContain( + 'paginator' + ); + }); + }); + + describe('events', () => { + beforeEach(() => { + spyOn(component.pick, 'emit'); + spyOn(component.shutdown, 'emit'); + + fixture.componentInstance.show = true; + fixture.detectChanges(); + }); + + it('should emit close', () => { + const dialog: DebugElement = de.query(By.css('dot-dialog')); + dialog.triggerEventHandler('hide', true); + + expect(component.shutdown.emit).toHaveBeenCalledWith(true); + }); + + xit('trigger event when click select button', async () => { + fixture.detectChanges(); + await fixture.whenStable(); + + const button = de.query(By.css('.form-selector__button')); + button.triggerEventHandler('click', null); + + expect(component.pick.emit).toHaveBeenCalledWith(mockContentType); + }); + }); + }); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-form-selector/dot-form-selector.component.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-form-selector/dot-form-selector.component.ts new file mode 100644 index 000000000000..d03db181938f --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-form-selector/dot-form-selector.component.ts @@ -0,0 +1,73 @@ +import { + Component, + OnInit, + Input, + Output, + EventEmitter, + ViewChild, + OnChanges, + SimpleChanges +} from '@angular/core'; +import { DotCMSContentType } from '@dotcms/dotcms-models'; +import { LazyLoadEvent } from 'primeng/api'; +import { Table } from 'primeng/table'; +import { take } from 'rxjs/operators'; +import { DotDialogComponent } from '@components/dot-dialog/dot-dialog.component'; +import { PaginatorService } from '@services/paginator'; + +@Component({ + selector: 'dot-form-selector', + templateUrl: './dot-form-selector.component.html', + styleUrls: ['./dot-form-selector.component.scss'], + providers: [PaginatorService] +}) +export class DotFormSelectorComponent implements OnInit, OnChanges { + @Input() show = false; + + @Output() pick = new EventEmitter(); + + @Output() shutdown = new EventEmitter(); + + @ViewChild('datatable', { static: true }) datatable: Table; + + @ViewChild('dialog', { static: true }) dotDialog: DotDialogComponent; + + items: DotCMSContentType[]; + contentMinHeight: string; + + constructor(public paginatorService: PaginatorService) {} + + ngOnInit() { + this.paginatorService.paginationPerPage = 5; + this.paginatorService.url = 'v1/contenttype?type=FORM'; + } + ngOnChanges(changes: SimpleChanges) { + setTimeout(() => { + if (changes.show.currentValue) { + this.contentMinHeight = + this.paginatorService.totalRecords > this.paginatorService.paginationPerPage + ? `${ + this.dotDialog.dialog.nativeElement + .querySelector('.p-datatable') + .getBoundingClientRect().height + }px` + : ''; + } + }, 0); + } + + /** + * Call when click on any pagination link + * + * @param LazyLoadEvent event + * @memberof DotFormSelectorComponent + */ + loadData(event: LazyLoadEvent): void { + this.paginatorService + .getWithOffset(event.first) + .pipe(take(1)) + .subscribe((items: DotCMSContentType[]) => { + this.items = items; + }); + } +} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-form-selector/dot-form-selector.module.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-form-selector/dot-form-selector.module.ts new file mode 100644 index 000000000000..e9a40b094f0b --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-form-selector/dot-form-selector.module.ts @@ -0,0 +1,16 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; + +import { ButtonModule } from 'primeng/button'; +import { TableModule } from 'primeng/table'; + +import { DotFormSelectorComponent } from './dot-form-selector.component'; +import { DotDialogModule } from '@components/dot-dialog/dot-dialog.module'; +import { DotPipesModule } from '@pipes/dot-pipes.module'; + +@NgModule({ + imports: [CommonModule, TableModule, DotDialogModule, ButtonModule, DotPipesModule], + declarations: [DotFormSelectorComponent], + exports: [DotFormSelectorComponent] +}) +export class DotFormSelectorModule {} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-whats-changed/dot-whats-changed.component.html b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-whats-changed/dot-whats-changed.component.html new file mode 100644 index 000000000000..1e360fb0e6e1 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-whats-changed/dot-whats-changed.component.html @@ -0,0 +1,10 @@ + + + + {{'nothing-changed' | dm}} + + + + + + diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-whats-changed/dot-whats-changed.component.scss b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-whats-changed/dot-whats-changed.component.scss new file mode 100644 index 000000000000..0ac220cd1e35 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-whats-changed/dot-whats-changed.component.scss @@ -0,0 +1,22 @@ +@use "variables" as *; + +:host { + display: flex; + flex-direction: column; + + dot-iframe { + flex-grow: 1; + display: flex; + flex-direction: column; + + ::ng-deep iframe { + flex-grow: 1; + } + } + + .whats-changed__empty-state { + text-align: center; + margin-top: $spacing-9; + font-size: $font-size-xx-large; + } +} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-whats-changed/dot-whats-changed.component.spec.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-whats-changed/dot-whats-changed.component.spec.ts new file mode 100644 index 000000000000..de1447c271b2 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-whats-changed/dot-whats-changed.component.spec.ts @@ -0,0 +1,102 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; +import { By } from '@angular/platform-browser'; +import { DebugElement, Component, ViewChild, ElementRef } from '@angular/core'; +import { DotWhatsChangedComponent, SHOW_DIFF_STYLES } from './dot-whats-changed.component'; +import { IframeComponent } from '@components/_common/iframe/iframe-component'; +import { DotEditPageService } from '@services/dot-edit-page/dot-edit-page.service'; +import { of } from 'rxjs'; +import { DotDOMHtmlUtilService } from '@portlets/dot-edit-page/content/services/html/dot-dom-html-util.service'; +import { DotMessagePipeModule } from '@pipes/dot-message/dot-message-pipe.module'; +import { DotHttpErrorManagerService } from '@services/dot-http-error-manager/dot-http-error-manager.service'; + +@Component({ + selector: 'dot-test', + template: '' +}) +class TestHostComponent { + languageId: string; + pageId: string; +} + +@Component({ + selector: 'dot-iframe', + template: '' +}) +class TestDotIframeComponent { + @ViewChild('iframeElement') iframeElement: ElementRef; +} + +describe('DotWhatsChangedComponent', () => { + let fixture: ComponentFixture; + let de: DebugElement; + let dotIframe: IframeComponent; + let dotEditPageService: DotEditPageService; + let dotDOMHtmlUtilService: DotDOMHtmlUtilService; + + beforeEach(() => { + TestBed.configureTestingModule({ + declarations: [DotWhatsChangedComponent, TestDotIframeComponent, TestHostComponent], + providers: [ + { + provide: DotEditPageService, + useValue: { + whatChange: jasmine + .createSpy() + .and.returnValue( + of({ diff: true, renderLive: 'ABC', renderWorking: 'ABC DEF' }) + ) + } + }, + { + provide: DotDOMHtmlUtilService, + useValue: { + createStyleElement: jasmine + .createSpy() + .and.returnValue(document.createElement('style')) + } + }, + { + provide: DotHttpErrorManagerService, + useValue: { + handle: jasmine.createSpy() + } + } + ], + imports: [DotMessagePipeModule] + }); + + fixture = TestBed.createComponent(TestHostComponent); + + de = fixture.debugElement.query(By.css('dot-whats-changed')); + dotEditPageService = TestBed.inject(DotEditPageService); + dotDOMHtmlUtilService = TestBed.inject(DotDOMHtmlUtilService); + fixture.detectChanges(); + dotIframe = de.query(By.css('dot-iframe')).componentInstance; + + fixture.componentInstance.pageId = '123'; + fixture.componentInstance.languageId = '1'; + fixture.detectChanges(); + }); + + it('should load content based on the pageId and URL', () => { + expect(dotDOMHtmlUtilService.createStyleElement).toHaveBeenCalledOnceWith(SHOW_DIFF_STYLES); + expect(dotEditPageService.whatChange).toHaveBeenCalledWith('123', '1'); + expect(dotIframe.iframeElement.nativeElement.contentDocument.body.innerHTML).toContain( + 'ABC DEF' + ); + }); + + it('should load content when languageId is change', () => { + fixture.componentInstance.languageId = '2'; + fixture.detectChanges(); + + expect(dotEditPageService.whatChange).toHaveBeenCalledWith('123', '2'); + }); + + it('should load content when pageId is change', () => { + fixture.componentInstance.pageId = 'abc-123'; + fixture.detectChanges(); + + expect(dotEditPageService.whatChange).toHaveBeenCalledWith('abc-123', '1'); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-whats-changed/dot-whats-changed.component.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-whats-changed/dot-whats-changed.component.ts new file mode 100644 index 000000000000..09f077cc1028 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-whats-changed/dot-whats-changed.component.ts @@ -0,0 +1,82 @@ +import { Component, Input, OnChanges, OnInit, ViewChild } from '@angular/core'; +import { DotDiffPipe } from '@dotcms/app/view/pipes'; +import { IframeComponent } from '@components/_common/iframe/iframe-component'; +import { DotEditPageService } from '@services/dot-edit-page/dot-edit-page.service'; +import { catchError, take } from 'rxjs/operators'; +import { DotWhatChanged } from '@models/dot-what-changed/dot-what-changed.model'; +import { DotDOMHtmlUtilService } from '@portlets/dot-edit-page/content/services/html/dot-dom-html-util.service'; +import { DotHttpErrorManagerService } from '@services/dot-http-error-manager/dot-http-error-manager.service'; + +export const SHOW_DIFF_STYLES = + 'del{text-decoration: line-through; background-color:#fdb8c0 } ins{ text-decoration: underline; background-color: #ddffdd}'; + +@Component({ + selector: 'dot-whats-changed', + templateUrl: './dot-whats-changed.component.html', + styleUrls: ['./dot-whats-changed.component.scss'] +}) +export class DotWhatsChangedComponent implements OnInit, OnChanges { + @Input() + languageId: string; + @Input() + pageId: string; + styles: HTMLStyleElement; + + @ViewChild('dotIframe', { static: false }) dotIframe: IframeComponent; + + private dotDiffPipe = new DotDiffPipe(); + whatsChanged: DotWhatChanged = { diff: true, renderLive: '', renderWorking: '' }; + + constructor( + private dotEditPageService: DotEditPageService, + private dotDOMHtmlUtilService: DotDOMHtmlUtilService, + private httpErrorManagerService: DotHttpErrorManagerService + ) {} + + ngOnInit(): void { + this.styles = this.dotDOMHtmlUtilService.createStyleElement(SHOW_DIFF_STYLES); + } + + ngOnChanges(): void { + if (this.pageId && this.languageId) { + this.dotEditPageService + .whatChange(this.pageId, this.languageId) + .pipe( + take(1), + catchError((error) => { + return this.httpErrorManagerService.handle(error); + }) + ) + .subscribe((data: DotWhatChanged) => { + this.whatsChanged = data; + if (this.whatsChanged.diff) { + const doc = this.getEditPageDocument(); + doc.open(); + doc.write( + this.updateHtml( + this.dotDiffPipe.transform( + this.whatsChanged.renderLive, + this.whatsChanged.renderWorking + ) + ) + ); + doc.head.appendChild(this.styles); + doc.close(); + } + }); + } + } + + private getEditPageDocument(): Document { + return ( + this.dotIframe.iframeElement.nativeElement.contentDocument || + this.dotIframe.iframeElement.nativeElement.contentWindow.document + ); + } + + private updateHtml(content: string): string { + const fakeHtml = document.createElement('html'); + fakeHtml.innerHTML = content; + return fakeHtml.innerHTML; + } +} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-whats-changed/dot-whats-changed.module.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-whats-changed/dot-whats-changed.module.ts new file mode 100644 index 000000000000..01f0e16c64aa --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-whats-changed/dot-whats-changed.module.ts @@ -0,0 +1,13 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { DotWhatsChangedComponent } from './dot-whats-changed.component'; +import { IFrameModule } from '@components/_common/iframe'; +import { DotDiffPipeModule } from '@pipes/dot-diff/dot-diff.pipe.module'; +import { DotMessagePipeModule } from '@pipes/dot-message/dot-message-pipe.module'; + +@NgModule({ + imports: [CommonModule, IFrameModule, DotDiffPipeModule, DotMessagePipeModule], + declarations: [DotWhatsChangedComponent], + exports: [DotWhatsChangedComponent] +}) +export class DotWhatsChangedModule {} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/dot-edit-content.component.html b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/dot-edit-content.component.html new file mode 100644 index 000000000000..cdd1f7c61ef2 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/dot-edit-content.component.html @@ -0,0 +1,82 @@ + + + + + +
+ + + + +
+
+
+ + + +
+
+
+
+
+
+ + +
+ +
+
diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/dot-edit-content.component.scss b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/dot-edit-content.component.scss new file mode 100644 index 000000000000..dd600e212318 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/dot-edit-content.component.scss @@ -0,0 +1,153 @@ +@use "variables" as *; +@import "mixins"; + +:host { + background-color: $gray-bg; + display: flex; + flex-direction: row; + width: 100%; + padding-right: 0; +} + +dot-whats-changed, +.dot-edit__iframe { + background: $white; + border-radius: $border-radius; + box-shadow: $md-shadow-4; + flex-grow: 1; + overflow: hidden; +} + +.dot-edit__page-wrapper { + background-color: $gray-bg; + height: 100%; + max-width: 100%; + min-width: 100%; + padding: $spacing-5; + width: 100%; + + &.dot-edit__page-wrapper--deviced { + padding: $spacing-9; + } +} + +.device-info { + align-self: center; + padding: $spacing-1 0; +} + +.dot-edit-content__wrapper { + position: relative; + height: 100%; + overflow: hidden; + display: flex; + flex-direction: column; + flex-grow: 1; + z-index: 1; +} + +.dot-edit__page-wrapper:after { + content: ""; + display: block; + height: 1px; + width: 66.5rem; +} + +.dot-edit__device-wrapper { + flex-grow: 1; + display: flex; + flex-direction: column; + border: solid 1px $gray-lighter; + + .dot-edit__page-wrapper--deviced & { + flex-grow: 0; + border-radius: 10px; + border: 2px solid #ddd; + box-shadow: 4px 4px 15px rgba(0, 0, 0, 0.1); + background: rgba($white_rgb, 1); + background: linear-gradient(135deg, rgba($white_rgb, 1) 0%, rgba(240, 240, 240, 1) 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f0f0f0', GradientType=1); + margin: 0 auto; + padding: 0 10px; + + &:before { + content: ""; + display: block; + height: 5px; + width: 70px; + border: 1px solid #ddd; + background-color: #e6e6e6; + border-radius: 3px; + margin: 35px auto; + } + + &:after { + content: ""; + display: block; + height: 45px; + width: 45px; + border: 1px solid #ddd; + background-color: #e6e6e6; + border-radius: 45px; + margin: 15px auto 20px auto; + background: rgba(242, 239, 242, 1); + background: linear-gradient( + 135deg, + rgba(242, 239, 242, 1) 0%, + rgba(242, 239, 242, 1) 9%, + rgba($white_rgb, 1) 76%, + rgba($white_rgb, 1) 100% + ); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f2eff2', endColorstr='#ffffff', GradientType=1); + } + } + + .dot-edit__iframe-wrapper { + display: flex; + flex-grow: 1; + flex-direction: column; + position: relative; + } +} + +/* + When the primeng dialog components resize it adds .p-unselectable-text to the , we need to disable + pointer events in the iframe during the resize of the dialog otherwise resize breaks. +*/ +::ng-deep .p-unselectable-text .dot-edit__contentlet-iframe { + pointer-events: none; +} + +.dot-edit-content__palette { + position: relative; + transition: width $basic-speed ease-in-out; + width: 0px; + + &.editMode { + width: $content-palette-width; + + .dot-edit-content__palette-visibility { + display: flex; + } + } + + &.collapsed { + width: 0px; + } + + .dot-edit-content__palette-visibility { + display: none; + align-items: center; + justify-content: center; + width: 29px; + height: 35px; + left: -28px; + position: absolute; + background: $white; + top: 134px; + border: 1px solid $gray-lighter; + border-radius: 6px 0 0 6px; + cursor: pointer; + z-index: 2; + } +} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/dot-edit-content.component.spec.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/dot-edit-content.component.spec.ts new file mode 100644 index 000000000000..79e9328f4e2e --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/dot-edit-content.component.spec.ts @@ -0,0 +1,1481 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ + +import { HttpClientTestingModule } from '@angular/common/http/testing'; +import { of as observableOf, of, throwError } from 'rxjs'; +import { ActivatedRoute } from '@angular/router'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; +import { By } from '@angular/platform-browser'; +import { ComponentFixture, tick, fakeAsync, TestBed, flush } from '@angular/core/testing'; +import { + Component, + DebugElement, + EventEmitter, + Input, + Output, + ElementRef, + Injectable +} from '@angular/core'; +import { RouterTestingModule } from '@angular/router/testing'; +import { + ApiRoot, + CoreWebService, + DotcmsConfigService, + DotcmsEventsService, + DotEventsSocket, + DotEventsSocketURL, + LoggerService, + LoginService, + SiteService, + StringUtils, + UserModel +} from '@dotcms/dotcms-js'; + +import { ButtonModule } from 'primeng/button'; +import { DialogModule } from 'primeng/dialog'; +import { ConfirmationService } from 'primeng/api'; +import { DotCMSContentlet, DotCMSContentType } from '@dotcms/dotcms-models'; + +import { DotAlertConfirmService } from '@services/dot-alert-confirm/index'; +import { DotEditContentHtmlService } from './services/dot-edit-content-html/dot-edit-content-html.service'; +import { DotEditPageService } from '@services/dot-edit-page/dot-edit-page.service'; +import { DotEditPageToolbarModule } from './components/dot-edit-page-toolbar/dot-edit-page-toolbar.module'; +import { DotGlobalMessageService } from '@components/_common/dot-global-message/dot-global-message.service'; +import { DotLoadingIndicatorModule } from '@components/_common/iframe/dot-loading-indicator/dot-loading-indicator.module'; +import { DotMessageService } from '@services/dot-message/dot-messages.service'; +import { DotPageRenderState } from '@portlets/dot-edit-page/shared/models/dot-rendered-page-state.model'; +import { DotPageStateService } from './services/dot-page-state/dot-page-state.service'; +import { DotWorkflowService } from '@services/dot-workflow/dot-workflow.service'; +import { DotRouterService } from '@services/dot-router/dot-router.service'; +import { DotPageRender } from '@models/dot-page/dot-rendered-page.model'; +import { DotEditContentComponent } from './dot-edit-content.component'; +import { DotContentletEditorModule } from '@components/dot-contentlet-editor/dot-contentlet-editor.module'; +import { DotEditPageInfoModule } from '../components/dot-edit-page-info/dot-edit-page-info.module'; +import { DotUiColorsService } from '@services/dot-ui-colors/dot-ui-colors.service'; +import { DotEditPageWorkflowsActionsModule } from './components/dot-edit-page-workflows-actions/dot-edit-page-workflows-actions.module'; +import { DotOverlayMaskModule } from '@components/_common/dot-overlay-mask/dot-overlay-mask.module'; +import { DotContentletLockerService } from '@services/dot-contentlet-locker/dot-contentlet-locker.service'; +import { DotPageRenderService } from '@services/dot-page-render/dot-page-render.service'; +import { DotContainerContentletService } from './services/dot-container-contentlet.service'; +import { DotDragDropAPIHtmlService } from './services/html/dot-drag-drop-api-html.service'; +import { DotDOMHtmlUtilService } from './services/html/dot-dom-html-util.service'; +import { DotEditContentToolbarHtmlService } from './services/html/dot-edit-content-toolbar-html.service'; +import { SiteServiceMock } from '@tests/site-service.mock'; +import { LoginServiceMock, mockUser } from '@tests/login-service.mock'; +import { MockDotMessageService } from '@tests/dot-message-service.mock'; +import { DotWorkflowServiceMock } from '@tests/dot-workflow-service.mock'; +import { mockDotRenderedPage, processedContainers } from '@tests/dot-page-render.mock'; +import { IframeOverlayService } from '@components/_common/iframe/service/iframe-overlay.service'; +import { DotLoadingIndicatorService } from '@components/_common/iframe/dot-loading-indicator/dot-loading-indicator.service'; +import { DotPageContent } from '../shared/models'; +import { DotContentletEditorService } from '@components/dot-contentlet-editor/services/dot-contentlet-editor.service'; +import { dotcmsContentletMock } from '@tests/dotcms-contentlet.mock'; +import { DotCustomEventHandlerService } from '@services/dot-custom-event-handler/dot-custom-event-handler.service'; +import { DotMessageDisplayService } from '@components/dot-message-display/services'; +import { DotWizardModule } from '@components/_common/dot-wizard/dot-wizard.module'; +import { CoreWebServiceMock } from '@tests/core-web.service.mock'; +import { DotEventsService } from '@services/dot-events/dot-events.service'; +import { DotHttpErrorManagerService } from '@services/dot-http-error-manager/dot-http-error-manager.service'; +import { MockDotRouterService } from '@tests/dot-router-service.mock'; +import { dotEventSocketURLFactory, MockDotUiColorsService } from '@tests/dot-test-bed'; +import { DotIframeService } from '@components/_common/iframe/service/dot-iframe/dot-iframe.service'; +import { DotDownloadBundleDialogService } from '@services/dot-download-bundle-dialog/dot-download-bundle-dialog.service'; +import { DotLicenseService } from '@services/dot-license/dot-license.service'; +import { DotPageContainer } from '@models/dot-page-container/dot-page-container.model'; +import { DotPageMode } from '@models/dot-page/dot-page-mode.enum'; +import { DotContentTypeService } from '@services/dot-content-type'; +import { DotPaletteComponent } from '@dotcms/app/portlets/dot-edit-page/components/dot-palette/dot-palette.component'; +import { HttpErrorResponse } from '@angular/common/http'; +import { DotGenerateSecurePasswordService } from '@services/dot-generate-secure-password/dot-generate-secure-password.service'; +import { DotPropertiesService } from '@services/dot-properties/dot-properties.service'; +import { PageModelChangeEventType } from './services/dot-edit-content-html/models'; +import { DotESContentService } from '@dotcms/app/api/services/dot-es-content/dot-es-content.service'; + +const responseData: DotCMSContentType[] = [ + { + icon: 'cloud', + id: 'a1661fbc-9e84-4c00-bd62-76d633170da3', + name: 'Widget X', + variable: 'WidgetX', + baseType: 'WIDGET' + }, + { + icon: 'alt_route', + id: '799f176a-d32e-4844-a07c-1b5fcd107578', + name: 'Banner', + variable: 'Banner' + }, + { + icon: 'cloud', + id: '897cf4a9-171a-4204-accb-c1b498c813fe', + name: 'Contact', + variable: 'Contact' + }, + { + icon: 'cloud', + id: 'now-show', + name: 'now-show', + variable: 'persona' + }, + { + icon: 'cloud', + id: 'now-show', + name: 'now-show', + variable: 'host' + }, + { + icon: 'cloud', + id: 'now-show', + name: 'now-show', + variable: 'vanityurl' + }, + { + icon: 'cloud', + id: 'now-show', + name: 'now-show', + variable: 'languagevariable' + } +] as DotCMSContentType[]; + +@Component({ + selector: 'dot-global-message', + template: '' +}) +class MockGlobalMessageComponent {} + +@Component({ + selector: 'dot-test', + template: '' +}) +class HostTestComponent {} + +@Component({ + selector: 'dot-icon', + template: '' +}) +class MockDotIconComponent { + @Input() name: string; +} + +@Component({ + selector: 'dot-whats-changed', + template: '' +}) +class MockDotWhatsChangedComponent { + @Input() pageId: string; + @Input() languageId: string; +} + +@Component({ + selector: 'dot-form-selector', + template: '' +}) +export class MockDotFormSelectorComponent { + @Input() show = false; + @Output() pick = new EventEmitter(); + @Output() shutdown = new EventEmitter(); +} + +@Component({ + selector: 'dot-palette', + template: '' +}) +export class MockDotPaletteComponent { + @Input() languageId = '1'; + @Input() items: any[]; +} + +@Injectable() +class MockDotContentTypeService { + getContentTypes = jasmine + .createSpy('getContentTypes') + .and.returnValue(observableOf(responseData)); +} +const mockRenderedPageState = new DotPageRenderState( + mockUser(), + new DotPageRender(mockDotRenderedPage()) +); + +describe('DotEditContentComponent', () => { + const siteServiceMock = new SiteServiceMock(); + let component: DotEditContentComponent; + let de: DebugElement; + let dotEditContentHtmlService: DotEditContentHtmlService; + let dotGlobalMessageService: DotGlobalMessageService; + let dotPageStateService: DotPageStateService; + let dotRouterService: DotRouterService; + let fixture: ComponentFixture; + let route: ActivatedRoute; + let dotUiColorsService: DotUiColorsService; + let dotEditPageService: DotEditPageService; + let iframeOverlayService: IframeOverlayService; + let dotLoadingIndicatorService: DotLoadingIndicatorService; + let dotContentletEditorService: DotContentletEditorService; + let dotDialogService: DotAlertConfirmService; + let dotCustomEventHandlerService: DotCustomEventHandlerService; + let dotConfigurationService: DotPropertiesService; + let dotLicenseService: DotLicenseService; + + function detectChangesForIframeRender(fix) { + fix.detectChanges(); + tick(1); + fix.detectChanges(); + tick(10); + } + + beforeEach(() => { + const messageServiceMock = new MockDotMessageService({ + 'dot.common.cancel': 'CANCEL', + 'dot.common.message.saving': 'Saving...', + 'dot.common.message.saved': 'Saved', + 'editpage.content.steal.lock.confirmation_message.header': 'Are you sure?', + 'editpage.content.steal.lock.confirmation_message.message': + 'This page is locked by bla bla', + 'editpage.content.steal.lock.confirmation_message.reject': 'Lock', + 'editpage.content.steal.lock.confirmation_message.accept': 'Cancel', + 'editpage.content.save.changes.confirmation.header': 'Save header', + 'editpage.content.save.changes.confirmation.message': 'Save message', + 'dot.common.content.search': 'Content Search', + 'an-unexpected-system-error-occurred': 'Error msg', + 'editpage.content.contentlet.remove.confirmation_message.header': 'header', + 'editpage.content.contentlet.remove.confirmation_message.message': 'message' + }); + + TestBed.configureTestingModule({ + declarations: [ + DotEditContentComponent, + MockDotWhatsChangedComponent, + MockDotFormSelectorComponent, + MockDotIconComponent, + MockDotPaletteComponent, + HostTestComponent, + MockGlobalMessageComponent + ], + imports: [ + HttpClientTestingModule, + BrowserAnimationsModule, + ButtonModule, + DialogModule, + DotContentletEditorModule, + DotEditPageToolbarModule, + DotEditPageInfoModule, + DotLoadingIndicatorModule, + DotEditPageWorkflowsActionsModule, + DotOverlayMaskModule, + DotWizardModule, + RouterTestingModule.withRoutes([ + { + component: DotEditContentComponent, + path: 'test' + } + ]) + ], + providers: [ + DotContentletLockerService, + DotPageRenderService, + DotContainerContentletService, + DotDragDropAPIHtmlService, + DotEditContentToolbarHtmlService, + DotDOMHtmlUtilService, + DotAlertConfirmService, + DotEditContentHtmlService, + DotEditPageService, + DotGlobalMessageService, + DotPageStateService, + DotGenerateSecurePasswordService, + DotCustomEventHandlerService, + DotPropertiesService, + DotESContentService, + { provide: DotContentTypeService, useClass: MockDotContentTypeService }, + { + provide: LoginService, + useClass: LoginServiceMock + }, + { + provide: DotMessageService, + useValue: messageServiceMock + }, + { + provide: DotWorkflowService, + useClass: DotWorkflowServiceMock + }, + { + provide: SiteService, + useValue: siteServiceMock + }, + { + provide: ActivatedRoute, + useValue: { + parent: { + parent: { + data: of({ + content: mockRenderedPageState + }) + } + }, + snapshot: { + queryParams: { + url: '/an/url/test' + } + }, + data: of({}) + } + }, + DotMessageDisplayService, + ConfirmationService, + { provide: CoreWebService, useClass: CoreWebServiceMock }, + DotEventsService, + DotHttpErrorManagerService, + { provide: DotRouterService, useClass: MockDotRouterService }, + { provide: DotUiColorsService, useClass: MockDotUiColorsService }, + DotIframeService, + DotDownloadBundleDialogService, + DotLicenseService, + DotcmsEventsService, + DotEventsSocket, + { provide: DotEventsSocketURL, useFactory: dotEventSocketURLFactory }, + DotcmsConfigService, + LoggerService, + StringUtils, + ApiRoot, + UserModel + ] + }); + + fixture = TestBed.createComponent(DotEditContentComponent); + + component = fixture.componentInstance; + de = fixture.debugElement; + + dotEditContentHtmlService = de.injector.get(DotEditContentHtmlService); + dotGlobalMessageService = de.injector.get(DotGlobalMessageService); + dotUiColorsService = de.injector.get(DotUiColorsService); + dotPageStateService = de.injector.get(DotPageStateService); + dotRouterService = de.injector.get(DotRouterService); + route = de.injector.get(ActivatedRoute); + dotEditPageService = de.injector.get(DotEditPageService); + iframeOverlayService = de.injector.get(IframeOverlayService); + dotLoadingIndicatorService = de.injector.get(DotLoadingIndicatorService); + dotContentletEditorService = de.injector.get(DotContentletEditorService); + dotDialogService = de.injector.get(DotAlertConfirmService); + dotCustomEventHandlerService = de.injector.get(DotCustomEventHandlerService); + dotConfigurationService = de.injector.get(DotPropertiesService); + dotLicenseService = de.injector.get(DotLicenseService); + spyOn(dotPageStateService, 'reload'); + + spyOn(dotEditContentHtmlService, 'renderAddedForm').and.returnValue( + of([{ identifier: '123', uuid: 'uui-1' }]) + ); + }); + + describe('elements', () => { + beforeEach(() => { + spyOn(dotEditPageService, 'save').and.returnValue(of({})); + spyOn(dotConfigurationService, 'getKeyAsList').and.returnValue( + of(['host', 'vanityurl', 'persona', 'languagevariable']) + ); + }); + + describe('dot-form-selector', () => { + let dotFormSelector: DebugElement; + + beforeEach(() => { + spyOn(dotGlobalMessageService, 'success'); + + fixture.detectChanges(); + dotFormSelector = de.query(By.css('dot-form-selector')); + }); + + it('should have', () => { + expect(dotFormSelector).not.toBeNull(); + expect(dotFormSelector.componentInstance.show).toBe(false); + }); + + describe('events', () => { + it('select > should add form', () => { + dotFormSelector.triggerEventHandler('pick', { + baseType: 'string', + clazz: 'string', + id: '123' + }); + fixture.detectChanges(); + + expect(dotEditContentHtmlService.renderAddedForm).toHaveBeenCalledWith( + '123' + ); + expect(dotEditPageService.save).toHaveBeenCalledWith('123', [ + { identifier: '123', uuid: 'uui-1' } + ]); + + expect(dotGlobalMessageService.success).toHaveBeenCalledTimes(1); + expect(dotPageStateService.reload).toHaveBeenCalledTimes(1); + expect(dotFormSelector.componentInstance.show).toBe(false); + }); + + it('close > should close form', () => { + component.editForm = true; + dotFormSelector.triggerEventHandler('shutdown', {}); + expect(component.editForm).toBe(false); + }); + }); + }); + + describe('dot-edit-page-toolbar', () => { + let toolbarElement: DebugElement; + + beforeEach(() => { + fixture.detectChanges(); + toolbarElement = de.query(By.css('dot-edit-page-toolbar')); + }); + + it('should have', () => { + expect(toolbarElement).not.toBeNull(); + }); + + it('should pass pageState', () => { + expect(toolbarElement.componentInstance.pageState).toEqual(mockRenderedPageState); + }); + + describe('events', () => { + it('cancel > should go to site browser', () => { + toolbarElement.triggerEventHandler('cancel', {}); + expect(dotRouterService.goToSiteBrowser).toHaveBeenCalledTimes(1); + }); + + it('actionFired > should reload', () => { + toolbarElement.triggerEventHandler('actionFired', null); + expect(dotPageStateService.reload).toHaveBeenCalledTimes(1); + }); + + it('actionFired > should reload', () => { + const contentlet: DotCMSContentlet = { + url: '/test', + host: '123', + languageId: 1 + } as DotCMSContentlet; + + toolbarElement.triggerEventHandler('actionFired', contentlet); + expect(dotRouterService.goToEditPage).toHaveBeenCalledOnceWith({ + url: contentlet.url, + host_id: contentlet.host, + language_id: contentlet.languageId + }); + }); + + it('whatschange > should show dot-whats-changed', () => { + let whatschange = de.query(By.css('dot-whats-changed')); + expect(whatschange).toBeNull(); + toolbarElement.triggerEventHandler('whatschange', true); + fixture.detectChanges(); + whatschange = de.query(By.css('dot-whats-changed')); + expect(whatschange).not.toBeNull(); + }); + }); + }); + + describe('dot-add-contentlet', () => { + let dotAddContentlet; + + beforeEach(() => { + fixture.detectChanges(); + dotAddContentlet = de.query(By.css('dot-add-contentlet')); + }); + + it('should have', () => { + expect(dotAddContentlet).not.toBeNull(); + }); + }); + + describe('dot-edit-contentlet', () => { + let dotEditContentlet; + + beforeEach(() => { + fixture.detectChanges(); + dotEditContentlet = de.query(By.css('dot-edit-contentlet')); + }); + + it('should have', () => { + expect(dotEditContentlet).not.toBeNull(); + }); + + it('should call dotCustomEventHandlerService on customEvent', () => { + spyOn(dotCustomEventHandlerService, 'handle'); + dotEditContentlet.triggerEventHandler('custom', { data: 'test' }); + + expect(dotCustomEventHandlerService.handle).toHaveBeenCalledWith({ + data: 'test' + }); + }); + }); + + describe('dot-create-contentlet', () => { + let dotCreateContentlet; + + beforeEach(() => { + fixture.detectChanges(); + dotCreateContentlet = de.query(By.css('dot-create-contentlet')); + }); + + it('should call dotCustomEventHandlerService on customEvent', () => { + spyOn(dotCustomEventHandlerService, 'handle'); + dotCreateContentlet.triggerEventHandler('custom', { data: 'test' }); + + expect(dotCustomEventHandlerService.handle).toHaveBeenCalledWith({ + data: 'test' + }); + }); + + it('should remove Contentlet Placeholder on close', () => { + spyOn(dotEditContentHtmlService, 'removeContentletPlaceholder'); + dotCreateContentlet.triggerEventHandler('shutdown', {}); + + expect(dotEditContentHtmlService.removeContentletPlaceholder).toHaveBeenCalledTimes( + 1 + ); + }); + }); + + describe('dot-reorder-menu', () => { + let dotReorderMenu; + + beforeEach(() => { + fixture.detectChanges(); + dotReorderMenu = de.query(By.css('dot-reorder-menu')); + }); + + it('should have', () => { + expect(dotReorderMenu).not.toBeNull(); + }); + }); + + describe('dot-loading-indicator', () => { + let dotLoadingIndicator; + + beforeEach(() => { + fixture.detectChanges(); + dotLoadingIndicator = de.query(By.css('dot-loading-indicator')); + }); + + it('should have', () => { + expect(dotLoadingIndicator).not.toBeNull(); + expect(dotLoadingIndicator.attributes.fullscreen).toBe('true'); + }); + }); + + describe('iframe wrappers', () => { + it('should show all elements nested correctly', () => { + fixture.detectChanges(); + const wrapper = de.query(By.css('.dot-edit__page-wrapper')); + const deviceWrapper = wrapper.query(By.css('.dot-edit__device-wrapper')); + const iframeWrapper = deviceWrapper.query(By.css('.dot-edit__iframe-wrapper')); + + expect(wrapper).not.toBeNull(); + expect(wrapper.classes['dot-edit__page-wrapper--deviced']).toBeUndefined(); + + expect(deviceWrapper).not.toBeNull(); + expect(iframeWrapper).not.toBeNull(); + }); + + describe('with device selected', () => { + beforeEach(() => { + route.parent.parent.data = of({ + content: new DotPageRenderState( + mockUser(), + new DotPageRender({ + ...mockDotRenderedPage(), + viewAs: { + ...mockDotRenderedPage().viewAs, + device: { + cssHeight: '100', + cssWidth: '100', + name: 'Watch', + inode: '1234' + } + } + }) + ) + }); + fixture.detectChanges(); + }); + + it('should add "deviced" class to main wrapper', () => { + const wrapper = de.query(By.css('.dot-edit__page-wrapper')); + expect(wrapper.classes['dot-edit__page-wrapper--deviced']).toBe(true); + }); + + xit('should add inline styles to iframe', (done) => { + setTimeout(() => { + const iframeEl = de.query(By.css('.dot-edit__iframe')); + expect(iframeEl.styles).toEqual({ + position: '', + visibility: '' + }); + done(); + }, 1000); + }); + + it('should add inline styles to device wrapper', (done) => { + setTimeout(() => { + const deviceWraper = de.query(By.css('.dot-edit__device-wrapper')); + expect(deviceWraper.styles.cssText).toEqual('width: 100px; height: 100px;'); + done(); + }, 100); + }); + }); + }); + + describe('iframe', () => { + function getIframe() { + return de.query( + By.css( + '.dot-edit__page-wrapper .dot-edit__device-wrapper .dot-edit__iframe-wrapper iframe.dot-edit__iframe' + ) + ); + } + + function triggerIframeCustomEvent(detail) { + const event = new CustomEvent('ng-event', { + detail + }); + window.document.dispatchEvent(event); + } + + it('should show', fakeAsync(() => { + detectChangesForIframeRender(fixture); + const iframeEl = getIframe(); + expect(iframeEl).not.toBeNull(); + })); + + it('should have attr setted', fakeAsync(() => { + detectChangesForIframeRender(fixture); + const iframeEl = getIframe(); + expect(iframeEl.attributes.class).toContain('dot-edit__iframe'); + expect(iframeEl.attributes.frameborder).toBe('0'); + expect(iframeEl.attributes.height).toBe('100%'); + expect(iframeEl.attributes.width).toBe('100%'); + })); + + describe('render html ', () => { + beforeEach(() => { + spyOn(dotEditContentHtmlService, 'renderPage'); + spyOn(dotEditContentHtmlService, 'initEditMode'); + spyOn(dotEditContentHtmlService, 'setCurrentPage'); + }); + + it('should render in preview mode', fakeAsync(() => { + detectChangesForIframeRender(fixture); + + expect(dotEditContentHtmlService.renderPage).toHaveBeenCalledWith( + mockRenderedPageState, + jasmine.any(ElementRef) + ); + expect(dotEditContentHtmlService.initEditMode).not.toHaveBeenCalled(); + expect(dotEditContentHtmlService.setCurrentPage).toHaveBeenCalledWith( + mockRenderedPageState.page + ); + })); + + it('should render in edit mode', fakeAsync(() => { + const state = new DotPageRenderState( + mockUser(), + new DotPageRender({ + ...mockDotRenderedPage(), + page: { + ...mockDotRenderedPage().page, + lockedBy: null + }, + viewAs: { + mode: DotPageMode.EDIT + } + }) + ); + route.parent.parent.data = of({ + content: state + }); + detectChangesForIframeRender(fixture); + + expect(dotEditContentHtmlService.initEditMode).toHaveBeenCalledWith( + state, + jasmine.any(ElementRef) + ); + expect(dotEditContentHtmlService.renderPage).not.toHaveBeenCalled(); + expect(dotEditContentHtmlService.setCurrentPage).toHaveBeenCalledWith( + state.page + ); + })); + + it('should show/hide content palette in edit mode with correct content', fakeAsync(() => { + spyOn(dotLicenseService, 'isEnterprise').and.returnValue(of(true)); + const state = new DotPageRenderState( + mockUser(), + new DotPageRender({ + ...mockDotRenderedPage(), + page: { + ...mockDotRenderedPage().page, + lockedBy: null + }, + viewAs: { + mode: DotPageMode.EDIT, + language: 1 + } + }) + ); + route.parent.parent.data = of({ + content: state + }); + detectChangesForIframeRender(fixture); + fixture.detectChanges(); + const contentPaletteWrapper = de.query(By.css('.dot-edit-content__palette')); + const contentPalette: DotPaletteComponent = de.query( + By.css('dot-palette') + ).componentInstance; + const paletteController = de.query( + By.css('.dot-edit-content__palette-visibility') + ); + const classList = contentPaletteWrapper.nativeElement.classList; + expect(contentPalette.items).toEqual(responseData.slice(0, 3)); + expect(parseInt(contentPalette.languageId)).toEqual( + mockDotRenderedPage().page.languageId + ); + expect(classList.contains('editMode')).toEqual(true); + paletteController.triggerEventHandler('click', ''); + fixture.detectChanges(); + expect(classList.contains('collapsed')).toEqual(true); + + expect(dotEditContentHtmlService.setCurrentPage).toHaveBeenCalledWith( + state.page + ); + })); + + it('should not display palette when is not enterprise', fakeAsync(() => { + spyOn(dotLicenseService, 'isEnterprise').and.returnValue(of(false)); + const state = new DotPageRenderState( + mockUser(), + new DotPageRender({ + ...mockDotRenderedPage(), + page: { + ...mockDotRenderedPage().page, + lockedBy: null + }, + viewAs: { + mode: DotPageMode.EDIT, + language: 1 + } + }) + ); + route.parent.parent.data = of({ + content: state + }); + detectChangesForIframeRender(fixture); + fixture.detectChanges(); + const contentPaletteWrapper = de.query(By.css('.dot-edit-content__palette')); + expect(contentPaletteWrapper).toBeNull(); + expect(dotEditContentHtmlService.setCurrentPage).toHaveBeenCalledWith( + state.page + ); + })); + + it('should reload the page because of EMA', fakeAsync(() => { + spyOn(dotLicenseService, 'isEnterprise').and.returnValue(of(false)); + const state = new DotPageRenderState( + mockUser(), + new DotPageRender({ + ...mockDotRenderedPage(), + page: { + ...mockDotRenderedPage().page, + lockedBy: null, + remoteRendered: true + }, + viewAs: { + mode: DotPageMode.EDIT, + language: 1 + } + }) + ); + route.parent.parent.data = of({ + content: state + }); + detectChangesForIframeRender(fixture); + fixture.detectChanges(); + + dotEditContentHtmlService.pageModel$.next({ + model: [{ identifier: 'test', uuid: '111' }], + type: PageModelChangeEventType.MOVE_CONTENT + }); + + expect(dotPageStateService.reload).toHaveBeenCalledTimes(1); + + flush(); + })); + + it('should NOT reload the page', fakeAsync(() => { + spyOn(dotLicenseService, 'isEnterprise').and.returnValue(of(false)); + + const state = new DotPageRenderState( + mockUser(), + new DotPageRender({ + ...mockDotRenderedPage(), + page: { + ...mockDotRenderedPage().page, + lockedBy: null + }, + viewAs: { + mode: DotPageMode.EDIT, + language: 1 + } + }) + ); + + route.parent.parent.data = of({ + content: state + }); + + detectChangesForIframeRender(fixture); + + fixture.detectChanges(); + + dotEditContentHtmlService.pageModel$.next({ + model: [{ identifier: 'test', uuid: '111' }], + type: PageModelChangeEventType.MOVE_CONTENT + }); + + expect(dotPageStateService.reload).toHaveBeenCalledTimes(0); + + flush(); + })); + }); + + describe('events', () => { + beforeEach(() => { + route.parent.parent.data = of({ + content: new DotPageRenderState( + mockUser(), + new DotPageRender({ + ...mockDotRenderedPage(), + viewAs: { + mode: DotPageMode.EDIT + } + }) + ) + }); + }); + + it('should handle load', fakeAsync(() => { + spyOn(dotLoadingIndicatorService, 'hide'); + spyOn(dotUiColorsService, 'setColors'); + detectChangesForIframeRender(fixture); + + expect(dotLoadingIndicatorService.hide).toHaveBeenCalled(); + expect(dotUiColorsService.setColors).toHaveBeenCalled(); + })); + + describe('custom', () => { + it('should handle remote-render-edit', fakeAsync(() => { + detectChangesForIframeRender(fixture); + + triggerIframeCustomEvent({ + name: 'remote-render-edit', + data: { + pathname: '/url/from/event' + } + }); + + expect(dotRouterService.goToEditPage).toHaveBeenCalledWith({ + url: 'url/from/event' + }); + })); + + it('should handle in-iframe', fakeAsync(() => { + detectChangesForIframeRender(fixture); + + triggerIframeCustomEvent({ + name: 'in-iframe' + }); + + expect(dotPageStateService.reload).toHaveBeenCalled(); + })); + + it('should handle reorder-menu', fakeAsync(() => { + detectChangesForIframeRender(fixture); + + triggerIframeCustomEvent({ + name: 'reorder-menu', + data: 'some/url/to/reorder/menu' + }); + + fixture.detectChanges(); + + const menu = de.query(By.css('dot-reorder-menu')); + expect(menu.componentInstance.url).toBe('some/url/to/reorder/menu'); + })); + + it('should handle load-edit-mode-page to internal navigation', fakeAsync(() => { + spyOn(dotPageStateService, 'setLocalState').and.callFake(() => { + // + }); + detectChangesForIframeRender(fixture); + + triggerIframeCustomEvent({ + name: 'load-edit-mode-page', + data: mockDotRenderedPage() + }); + + fixture.detectChanges(); + const dotRenderedPageStateExpected = new DotPageRenderState( + mockUser(), + mockDotRenderedPage() + ); + expect(dotPageStateService.setLocalState).toHaveBeenCalledWith( + dotRenderedPageStateExpected + ); + })); + + it('should handle load-edit-mode-page to internal navigation', fakeAsync(() => { + spyOn(dotPageStateService, 'setInternalNavigationState').and.callFake( + () => { + // + } + ); + + detectChangesForIframeRender(fixture); + + const mockDotRenderedPageCopy = mockDotRenderedPage(); + mockDotRenderedPageCopy.page.pageURI = '/another/url/test'; + + triggerIframeCustomEvent({ + name: 'load-edit-mode-page', + data: mockDotRenderedPageCopy + }); + + fixture.detectChanges(); + + const dotRenderedPageStateExpected = new DotPageRenderState( + mockUser(), + mockDotRenderedPageCopy + ); + + expect(dotPageStateService.setInternalNavigationState).toHaveBeenCalledWith( + dotRenderedPageStateExpected + ); + expect(dotRouterService.goToEditPage).toHaveBeenCalledWith({ + url: mockDotRenderedPageCopy.page.pageURI + }); + })); + + it('should handle save-menu-order', fakeAsync(() => { + detectChangesForIframeRender(fixture); + + triggerIframeCustomEvent({ + name: 'save-menu-order' + }); + + fixture.detectChanges(); + + expect(dotPageStateService.reload).toHaveBeenCalled(); + + const menu = de.query(By.css('dot-reorder-menu')); + expect(menu.componentInstance.url).toBe(''); + })); + + it('should handle error-saving-menu-order', fakeAsync(() => { + spyOn(dotGlobalMessageService, 'error').and.callFake(() => { + // + }); + + detectChangesForIframeRender(fixture); + + triggerIframeCustomEvent({ + name: 'error-saving-menu-order' + }); + + fixture.detectChanges(); + dotGlobalMessageService.error('Error msg'); + + const menu = de.query(By.css('dot-reorder-menu')); + expect(menu.componentInstance.url).toBe(''); + })); + + it('should handle cancel-save-menu-order', fakeAsync(() => { + spyOn(dotGlobalMessageService, 'error').and.callFake(() => { + // + }); + + detectChangesForIframeRender(fixture); + + triggerIframeCustomEvent({ + name: 'cancel-save-menu-order' + }); + + fixture.detectChanges(); + + const menu = de.query(By.css('dot-reorder-menu')); + expect(menu.componentInstance.url).toBe(''); + expect(dotPageStateService.reload).toHaveBeenCalledTimes(1); + })); + }); + + describe('iframe events', () => { + it('should handle edit event', (done) => { + spyOn(dotContentletEditorService, 'edit').and.callFake((param) => { + expect(param.data.inode).toBe('test_inode'); + + const event: any = { + target: { + contentWindow: {} + } + }; + param.events.load(event); + expect(event.target.contentWindow.ngEditContentletEvents).toBe( + dotEditContentHtmlService.contentletEvents$ + ); + done(); + }); + + fixture.detectChanges(); + + dotEditContentHtmlService.iframeActions$.next({ + name: 'edit', + dataset: { + dotInode: 'test_inode' + }, + target: { + contentWindow: { + ngEditContentletEvents: null + } + } + }); + }); + + it('should handle code event', (done) => { + spyOn(dotContentletEditorService, 'edit').and.callFake((param) => { + expect(param.data.inode).toBe('test_inode'); + + const event: any = { + target: { + contentWindow: {} + } + }; + param.events.load(event); + expect(event.target.contentWindow.ngEditContentletEvents).toBe( + dotEditContentHtmlService.contentletEvents$ + ); + done(); + }); + + fixture.detectChanges(); + + dotEditContentHtmlService.iframeActions$.next({ + name: 'code', + dataset: { + dotInode: 'test_inode' + }, + target: { + contentWindow: { + ngEditContentletEvents: null + } + } + }); + }); + + it('should handle add form event', () => { + component.editForm = false; + spyOn( + dotEditContentHtmlService, + 'setContainterToAppendContentlet' + ).and.callFake(() => { + // + }); + + fixture.detectChanges(); + + dotEditContentHtmlService.iframeActions$.next({ + name: 'add', + dataset: { + dotAdd: 'form', + dotIdentifier: 'identifier', + dotUuid: 'uuid' + } + }); + + const container: DotPageContainer = { + identifier: 'identifier', + uuid: 'uuid' + }; + + expect( + dotEditContentHtmlService.setContainterToAppendContentlet + ).toHaveBeenCalledWith(container); + expect(component.editForm).toBe(true); + }); + + it('should handle add content event', (done) => { + spyOn( + dotEditContentHtmlService, + 'setContainterToAppendContentlet' + ).and.callFake(() => { + // + }); + spyOn(dotContentletEditorService, 'add').and.callFake((param) => { + expect(param.data).toEqual({ + container: 'identifier', + baseTypes: 'content' + }); + + expect(param.header).toEqual('Content Search'); + + const event: any = { + target: { + contentWindow: {} + } + }; + param.events.load(event); + expect(event.target.contentWindow.ngEditContentletEvents).toBe( + dotEditContentHtmlService.contentletEvents$ + ); + done(); + }); + + fixture.detectChanges(); + + dotEditContentHtmlService.iframeActions$.next({ + name: 'add', + dataset: { + dotAdd: 'content', + dotIdentifier: 'identifier', + dotUuid: 'uuid' + }, + target: { + contentWindow: { + ngEditContentletEvents: null + } + } + }); + + const container: DotPageContainer = { + identifier: 'identifier', + uuid: 'uuid' + }; + + expect( + dotEditContentHtmlService.setContainterToAppendContentlet + ).toHaveBeenCalledWith(container); + }); + + it('should handle create new content event', (done) => { + const data = { + container: { + dotIdentifier: 'identifier', + dotUuid: 'uuid' + }, + contentType: { variable: 'blog' } + }; + spyOn( + dotEditContentHtmlService, + 'setContainterToAppendContentlet' + ).and.callFake(() => { + // + }); + + spyOn(dotContentletEditorService, 'getActionUrl').and.returnValue( + of('/url/') + ); + spyOn(dotContentletEditorService, 'create').and.callFake((param) => { + expect(param.data).toEqual({ + url: '/url/' + }); + + const event: any = { + target: { + contentWindow: {} + } + }; + param.events.load(event); + expect(event.target.contentWindow.ngEditContentletEvents).toBe( + dotEditContentHtmlService.contentletEvents$ + ); + done(); + }); + + fixture.detectChanges(); + + dotEditContentHtmlService.iframeActions$.next({ + name: 'add-content', + data: data + }); + + expect(dotContentletEditorService.getActionUrl).toHaveBeenCalledOnceWith( + 'blog' + ); + + const container: DotPageContainer = { + identifier: 'identifier', + uuid: 'uuid' + }; + + expect( + dotEditContentHtmlService.setContainterToAppendContentlet + ).toHaveBeenCalledWith(container); + }); + + it('should display Form Selector when handle add content event of form Type', () => { + spyOn( + dotEditContentHtmlService, + 'setContainterToAppendContentlet' + ).and.callFake(() => { + /**/ + }); + spyOn( + dotEditContentHtmlService, + 'removeContentletPlaceholder' + ).and.callFake(() => { + /**/ + }); + spyOn(component, 'addFormContentType').and.callThrough(); + + fixture.detectChanges(); + + const data = { + container: { + dotIdentifier: 'identifier', + dotUuid: 'uuid' + }, + contentType: { variable: 'forms' } + }; + + dotEditContentHtmlService.iframeActions$.next({ + name: 'add-content', + data: data + }); + + const container: DotPageContainer = { + identifier: data.container.dotIdentifier, + uuid: data.container.dotUuid + }; + + expect( + dotEditContentHtmlService.setContainterToAppendContentlet + ).toHaveBeenCalledWith(container); + expect( + dotEditContentHtmlService.removeContentletPlaceholder + ).toHaveBeenCalled(); + expect(component.addFormContentType).toHaveBeenCalled(); + expect(component.editForm).toBeTruthy(); + }); + + it('should handle remove event', (done) => { + spyOn(dotEditContentHtmlService, 'removeContentlet').and.callFake(() => { + // + }); + spyOn(dotDialogService, 'confirm').and.callFake((param) => { + expect(param.header).toEqual('header'); + expect(param.message).toEqual('message'); + + param.accept(); + + const pageContainer: DotPageContainer = { + identifier: 'container_identifier', + uuid: 'container_uuid' + }; + + const pageContent: DotPageContent = { + inode: 'test_inode', + identifier: 'test_identifier' + }; + expect(dotEditContentHtmlService.removeContentlet).toHaveBeenCalledWith( + pageContainer, + pageContent + ); + done(); + }); + + fixture.detectChanges(); + + dotEditContentHtmlService.iframeActions$.next({ + name: 'remove', + dataset: { + dotInode: 'test_inode', + dotIdentifier: 'test_identifier' + }, + container: { + dotIdentifier: 'container_identifier', + dotUuid: 'container_uuid' + } + }); + }); + + it('should handle select event', () => { + spyOn(dotContentletEditorService, 'clear').and.callFake(() => { + // + }); + + fixture.detectChanges(); + + dotEditContentHtmlService.iframeActions$.next({ + name: 'select' + }); + + expect(dotContentletEditorService.clear).toHaveBeenCalled(); + }); + + it('should handle save event', () => { + fixture.detectChanges(); + + dotEditContentHtmlService.iframeActions$.next({ + name: 'save' + }); + + expect(dotPageStateService.reload).toHaveBeenCalled(); + }); + }); + }); + }); + + describe('dot-overlay-mask', () => { + it('should be hidden', () => { + const dotOverlayMask = de.query(By.css('dot-overlay-mask')); + expect(dotOverlayMask).toBeNull(); + }); + + it('should show', () => { + iframeOverlayService.show(); + fixture.detectChanges(); + const dotOverlayMask = de.query( + By.css('.dot-edit__iframe-wrapper dot-overlay-mask') + ); + expect(dotOverlayMask).not.toBeNull(); + }); + }); + + describe('dot-whats-changed', () => { + it('should be hidden', () => { + const dotWhatsChange = de.query(By.css('dot-whats-changed')); + expect(dotWhatsChange).toBeNull(); + }); + + it('should show', () => { + fixture.detectChanges(); + const toolbarElement = de.query(By.css('dot-edit-page-toolbar')); + toolbarElement.triggerEventHandler('whatschange', true); + fixture.detectChanges(); + const dotWhatsChange = de.query( + By.css('.dot-edit__iframe-wrapper dot-whats-changed') + ); + expect(dotWhatsChange).not.toBeNull(); + }); + }); + + describe('personalized', () => { + let dotFormSelector: DebugElement; + + beforeEach(() => { + route.parent.parent.data = of({ + content: new DotPageRenderState( + mockUser(), + new DotPageRender({ + ...mockDotRenderedPage(), + viewAs: { + ...mockDotRenderedPage().viewAs, + persona: { + ...dotcmsContentletMock, + name: 'Super Persona', + keyTag: 'SuperPersona', + personalized: true + } + } + }) + ) + }); + fixture.detectChanges(); + dotFormSelector = de.query(By.css('dot-form-selector')); + }); + + it('should save form', () => { + dotFormSelector.triggerEventHandler('pick', { + baseType: 'string', + clazz: 'string', + id: '123' + }); + fixture.detectChanges(); + + expect(dotEditContentHtmlService.renderAddedForm).toHaveBeenCalledWith('123'); + + expect(dotEditPageService.save).toHaveBeenCalledWith('123', [ + { identifier: '123', uuid: 'uui-1', personaTag: 'SuperPersona' } + ]); + }); + }); + }); + + describe('errors', () => { + let httpErrorManagerService: DotHttpErrorManagerService; + beforeEach(() => { + httpErrorManagerService = de.injector.get(DotHttpErrorManagerService); + spyOn(dotConfigurationService, 'getKeyAsList').and.returnValue( + of(['host', 'vanityurl', 'persona', 'languagevariable']) + ); + }); + + describe('iframe events', () => { + it('should handle error message add reload content', () => { + const errorResponse = { error: { message: 'error' } } as HttpErrorResponse; + spyOn(dotEditPageService, 'save').and.returnValue(throwError(errorResponse)); + spyOn(dotPageStateService, 'updatePageStateHaveContent'); + spyOn(httpErrorManagerService, 'handle'); + + fixture.detectChanges(); + + dotEditContentHtmlService.pageModel$.next({ + model: [{ identifier: 'test', uuid: '111' }], + type: PageModelChangeEventType.ADD_CONTENT + }); + + expect(httpErrorManagerService.handle).toHaveBeenCalledOnceWith(errorResponse); + expect(dotPageStateService.reload).toHaveBeenCalledTimes(1); + }); + }); + }); + + describe('empty scenarios', () => { + beforeEach(() => { + spyOn(dotConfigurationService, 'getKeyAsList').and.returnValue(of(undefined)); + }); + + it('should show content palette correctly when blacklist list is empty', fakeAsync(() => { + spyOn(dotLicenseService, 'isEnterprise').and.returnValue(of(true)); + const state = new DotPageRenderState( + mockUser(), + new DotPageRender({ + ...mockDotRenderedPage(), + page: { + ...mockDotRenderedPage().page, + lockedBy: null + }, + viewAs: { + mode: DotPageMode.EDIT, + language: 1 + }, + containers: { + ...mockDotRenderedPage().containers, + '/persona/': { + container: processedContainers[0].container, + containerStructures: [{ contentTypeVar: 'persona' }] + }, + '/host/': { + container: processedContainers[0].container, + containerStructures: [{ contentTypeVar: 'host' }] + } + } + }) + ); + + route.parent.parent.data = of({ + content: state + }); + detectChangesForIframeRender(fixture); + fixture.detectChanges(); + const contentPalette: DotPaletteComponent = de.query( + By.css('dot-palette') + ).componentInstance; + expect(contentPalette.items).toEqual(responseData.slice(0, 5)); + })); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/dot-edit-content.component.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/dot-edit-content.component.ts new file mode 100644 index 000000000000..66caf3819f10 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/dot-edit-content.component.ts @@ -0,0 +1,568 @@ +import { Observable, Subject, fromEvent, merge, of, forkJoin } from 'rxjs'; + +import { filter, takeUntil, pluck, take, tap, skip, catchError } from 'rxjs/operators'; +import { ActivatedRoute } from '@angular/router'; +import { Component, OnInit, ViewChild, ElementRef, NgZone, OnDestroy } from '@angular/core'; +import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser'; + +import { SiteService } from '@dotcms/dotcms-js'; +import { DotCMSContentlet, DotCMSContentType } from '@dotcms/dotcms-models'; + +import { DotAlertConfirmService } from '@services/dot-alert-confirm'; +import { DotEditContentHtmlService } from './services/dot-edit-content-html/dot-edit-content-html.service'; +import { DotEditPageService } from '@services/dot-edit-page/dot-edit-page.service'; +import { DotGlobalMessageService } from '@components/_common/dot-global-message/dot-global-message.service'; +import { DotLoadingIndicatorService } from '@components/_common/iframe/dot-loading-indicator/dot-loading-indicator.service'; +import { DotMessageService } from '@services/dot-message/dot-messages.service'; +import { + DotPageContainer, + DotPageContainerPersonalized +} from '@models/dot-page-container/dot-page-container.model'; +import { DotPageContent } from '../shared/models/dot-page-content.model'; +import { DotPageRenderState } from '../shared/models/dot-rendered-page-state.model'; +import { DotPageStateService } from './services/dot-page-state/dot-page-state.service'; +import { DotRouterService } from '@services/dot-router/dot-router.service'; + +import { DotPageMode } from '@models/dot-page/dot-page-mode.enum'; +import { DotPageRender } from '@models/dot-page/dot-rendered-page.model'; +import { DotContentletEditorService } from '@components/dot-contentlet-editor/services/dot-contentlet-editor.service'; +import { DotUiColorsService } from '@services/dot-ui-colors/dot-ui-colors.service'; +import { + PageModelChangeEvent, + PageModelChangeEventType +} from './services/dot-edit-content-html/models'; +import { IframeOverlayService } from '@components/_common/iframe/service/iframe-overlay.service'; +import { DotCustomEventHandlerService } from '@services/dot-custom-event-handler/dot-custom-event-handler.service'; +import { DotContentTypeService } from '@services/dot-content-type'; +import { DotContainerStructure } from '@models/container/dot-container.model'; +import { DotHttpErrorManagerService } from '@services/dot-http-error-manager/dot-http-error-manager.service'; +import { HttpErrorResponse } from '@angular/common/http'; +import { DotPropertiesService } from '@services/dot-properties/dot-properties.service'; +import { DotLicenseService } from '@services/dot-license/dot-license.service'; +import { DotContentletEventAddContentType } from './services/dot-edit-content-html/models/dot-contentlets-events.model'; +import { DotIframeEditEvent } from '@dotcms/dotcms-models'; + +/** + * Edit content page component, render the html of a page and bind all events to make it ediable. + * + * @export + * @class DotEditContentComponent + * @implements {OnInit} + * @implements {OnDestroy} + */ +@Component({ + selector: 'dot-edit-content', + templateUrl: './dot-edit-content.component.html', + styleUrls: ['./dot-edit-content.component.scss'] +}) +export class DotEditContentComponent implements OnInit, OnDestroy { + @ViewChild('iframe') iframe: ElementRef; + + contentletActionsUrl: SafeResourceUrl; + pageState$: Observable; + showWhatsChanged = false; + editForm = false; + showIframe = true; + reorderMenuUrl = ''; + showOverlay = false; + dotPageMode = DotPageMode; + contentPalletItems: DotCMSContentType[] = []; + isEditMode = false; + paletteCollapsed = false; + isEnterpriseLicense = false; + + private readonly customEventsHandler; + private destroy$: Subject = new Subject(); + private pageStateInternal: DotPageRenderState; + + constructor( + private dotContentletEditorService: DotContentletEditorService, + private dotDialogService: DotAlertConfirmService, + private dotEditPageService: DotEditPageService, + private dotGlobalMessageService: DotGlobalMessageService, + private dotMessageService: DotMessageService, + private dotPageStateService: DotPageStateService, + private dotRouterService: DotRouterService, + private dotUiColorsService: DotUiColorsService, + private ngZone: NgZone, + private route: ActivatedRoute, + private siteService: SiteService, + private dotCustomEventHandlerService: DotCustomEventHandlerService, + private dotContentTypeService: DotContentTypeService, + public dotEditContentHtmlService: DotEditContentHtmlService, + public dotLoadingIndicatorService: DotLoadingIndicatorService, + public sanitizer: DomSanitizer, + public iframeOverlayService: IframeOverlayService, + private httpErrorManagerService: DotHttpErrorManagerService, + private dotConfigurationService: DotPropertiesService, + private dotLicenseService: DotLicenseService + ) { + if (!this.customEventsHandler) { + this.customEventsHandler = { + 'remote-render-edit': ({ pathname }) => { + this.dotRouterService.goToEditPage({ url: pathname.slice(1) }); + }, + 'load-edit-mode-page': (pageRendered: DotPageRender) => { + /* + This is the events that gets emitted from the backend when the user + browse from the page internal links + */ + + const dotRenderedPageState = new DotPageRenderState( + this.pageStateInternal.user, + pageRendered + ); + + if (this.isInternallyNavigatingToSamePage(pageRendered.page.pageURI)) { + this.dotPageStateService.setLocalState(dotRenderedPageState); + } else { + this.dotPageStateService.setInternalNavigationState(dotRenderedPageState); + this.dotRouterService.goToEditPage({ url: pageRendered.page.pageURI }); + } + }, + 'in-iframe': () => { + this.reload(null); + }, + 'reorder-menu': (reorderMenuUrl: string) => { + this.reorderMenuUrl = reorderMenuUrl; + }, + 'save-menu-order': () => { + this.reorderMenuUrl = ''; + this.reload(null); + }, + 'error-saving-menu-order': () => { + this.reorderMenuUrl = ''; + this.dotGlobalMessageService.error( + this.dotMessageService.get('an-unexpected-system-error-occurred') + ); + }, + 'cancel-save-menu-order': () => { + this.reorderMenuUrl = ''; + this.reload(null); + } + }; + } + } + + ngOnInit() { + this.dotLicenseService + .isEnterprise() + .pipe(take(1)) + .subscribe((isEnterprise) => { + this.isEnterpriseLicense = isEnterprise; + }); + this.dotLoadingIndicatorService.show(); + this.setInitalData(); + this.subscribeSwitchSite(); + this.subscribeIframeCustomEvents(); + this.subscribeIframeActions(); + this.subscribePageModelChange(); + this.subscribeOverlayService(); + this.subscribeDraggedContentType(); + } + + ngOnDestroy(): void { + this.destroy$.next(true); + this.destroy$.complete(); + } + + /** + * Close Reorder Menu Dialog + * @memberof DotEditContentComponent + */ + onCloseReorderDialog(): void { + this.reorderMenuUrl = ''; + } + + /** + * Handle the iframe page load + * @param any $event + * @memberof DotEditContentComponent + */ + onLoad($event): void { + this.dotLoadingIndicatorService.hide(); + const doc = $event.target.contentWindow.document; + this.dotUiColorsService.setColors(doc.querySelector('html')); + } + + /** + * Reload the edit page. If content comes reload with the provided contentlet. + ** @param DotCMSContentlet contentlet + * @memberof DotEditContentComponent + */ + reload(contentlet: DotCMSContentlet): void { + contentlet + ? this.dotRouterService.goToEditPage({ + url: contentlet.url, + host_id: contentlet.host, + language_id: contentlet.languageId + }) + : this.dotPageStateService.reload(); + } + + /** + * Handle form selected + * + * @param ContentType item + * @memberof DotEditContentComponent + */ + onFormSelected(item: DotCMSContentType): void { + this.dotEditContentHtmlService + .renderAddedForm(item.id) + .subscribe((model: DotPageContainer[]) => { + if (model) { + this.saveToPage(model) + .pipe(take(1)) + .subscribe(() => { + this.reload(null); + }); + } + }); + + this.editForm = false; + } + + /** + * Handle cancel button click in the toolbar + * + * @memberof DotEditContentComponent + */ + onCancelToolbar() { + this.dotRouterService.goToSiteBrowser(); + } + + /** + * Handle the custom events emmited by the Edit Contentlet + * + * @param CustomEvent $event + * @memberof DotEditContentComponent + */ + onCustomEvent($event: CustomEvent): void { + this.dotCustomEventHandlerService.handle($event); + } + + /** + * Execute actions needed when closing the create dialog. + * + * @memberof DotEditContentComponent + */ + handleCloseAction(): void { + this.dotEditContentHtmlService.removeContentletPlaceholder(); + } + + /** + * Handle add Form ContentType from Content Palette. + * + * @memberof DotEditContentComponent + */ + addFormContentType(): void { + this.editForm = true; + this.dotEditContentHtmlService.removeContentletPlaceholder(); + } + + private loadContentPallet(pageState: DotPageRenderState): void { + const CONTENT_HIDDEN_KEY = 'CONTENT_PALETTE_HIDDEN_CONTENT_TYPES'; + forkJoin([ + this.dotContentTypeService.getContentTypes(), + this.dotConfigurationService.getKeyAsList(CONTENT_HIDDEN_KEY) + ]) + .pipe(take(1)) + .subscribe((results) => { + this.contentPalletItems = this.getAllowedContentTypes( + results[0], + results[1], + pageState + ); + }); + } + + private isInternallyNavigatingToSamePage(url: string): boolean { + return this.route.snapshot.queryParams.url === url; + } + + private saveContent(event: PageModelChangeEvent): void { + this.saveToPage(event.model) + .pipe( + filter((message: string) => { + return this.shouldReload(event.type) || message === 'error'; + }), + take(1) + ) + .subscribe(() => { + this.reload(null); + }); + } + + private shouldReload(type: PageModelChangeEventType): boolean { + return ( + type !== PageModelChangeEventType.REMOVE_CONTENT && + this.pageStateInternal.page.remoteRendered + ); + } + + private saveToPage(model: DotPageContainer[]): Observable { + this.dotGlobalMessageService.loading( + this.dotMessageService.get('dot.common.message.saving') + ); + return this.dotEditPageService + .save(this.pageStateInternal.page.identifier, this.getPersonalizedModel(model) || model) + .pipe( + take(1), + tap(() => { + this.dotGlobalMessageService.success(); + }), + catchError((error: HttpErrorResponse) => { + this.httpErrorManagerService.handle(error); + return of('error'); + }) + ); + } + + private getPersonalizedModel(model: DotPageContainer[]): DotPageContainerPersonalized[] { + const persona = this.pageStateInternal.viewAs.persona; + + if (persona && persona.personalized) { + return model.map((container: DotPageContainer) => { + return { + ...container, + personaTag: persona.keyTag + }; + }); + } + return null; + } + + private addContentType($event: DotContentletEventAddContentType): void { + const container: DotPageContainer = { + identifier: $event.data.container.dotIdentifier, + uuid: $event.data.container.dotUuid + }; + this.dotEditContentHtmlService.setContainterToAppendContentlet(container); + + if ($event.data.contentType.variable !== 'forms') { + this.dotContentletEditorService + .getActionUrl($event.data.contentType.variable) + .pipe(take(1)) + .subscribe((url) => { + this.dotContentletEditorService.create({ + data: { url }, + events: { + load: (event) => { + (event.target as HTMLIFrameElement).contentWindow[ + 'ngEditContentletEvents' + ] = this.dotEditContentHtmlService.contentletEvents$; + } + } + }); + }); + } else { + this.addFormContentType(); + } + } + + private searchContentlet($event: DotIframeEditEvent): void { + const container: DotPageContainer = { + identifier: $event.dataset.dotIdentifier, + uuid: $event.dataset.dotUuid + }; + this.dotEditContentHtmlService.setContainterToAppendContentlet(container); + + if ($event.dataset.dotAdd === 'form') { + this.editForm = true; + } else { + this.dotContentletEditorService.add({ + header: this.dotMessageService.get('dot.common.content.search'), + data: { + container: $event.dataset.dotIdentifier, + baseTypes: $event.dataset.dotAdd + }, + events: { + load: (event) => { + (event.target as HTMLIFrameElement).contentWindow[ + 'ngEditContentletEvents' + ] = this.dotEditContentHtmlService.contentletEvents$; + } + } + }); + } + } + + private editContentlet($event: DotIframeEditEvent): void { + this.dotContentletEditorService.edit({ + data: { + inode: $event.dataset.dotInode + }, + events: { + load: (event) => { + (event.target as HTMLIFrameElement).contentWindow['ngEditContentletEvents'] = + this.dotEditContentHtmlService.contentletEvents$; + } + } + }); + } + + private iframeActionsHandler(event: string): (contentlet: DotIframeEditEvent) => void { + const eventsHandlerMap = { + edit: this.editContentlet.bind(this), + code: this.editContentlet.bind(this), + add: this.searchContentlet.bind(this), + remove: this.removeContentlet.bind(this), + 'add-content': this.addContentType.bind(this), + select: () => { + this.dotContentletEditorService.clear(); + }, + save: () => { + this.reload(null); + } + }; + return eventsHandlerMap[event]; + } + + private subscribeIframeCustomEvents(): void { + fromEvent(window.document, 'ng-event') + .pipe(pluck('detail'), takeUntil(this.destroy$)) + .subscribe((customEvent: { name: string; data: unknown }) => { + if (this.customEventsHandler[customEvent.name]) { + this.customEventsHandler[customEvent.name](customEvent.data); + } + }); + } + + private removeContentlet($event: DotIframeEditEvent): void { + this.dotDialogService.confirm({ + accept: () => { + const pageContainer: DotPageContainer = { + identifier: $event.container.dotIdentifier, + uuid: $event.container.dotUuid + }; + + const pageContent: DotPageContent = { + inode: $event.dataset.dotInode, + identifier: $event.dataset.dotIdentifier + }; + + this.dotEditContentHtmlService.removeContentlet(pageContainer, pageContent); + }, + header: this.dotMessageService.get( + 'editpage.content.contentlet.remove.confirmation_message.header' + ), + message: this.dotMessageService.get( + 'editpage.content.contentlet.remove.confirmation_message.message' + ) + }); + } + + private renderPage(pageState: DotPageRenderState): void { + this.dotEditContentHtmlService.setCurrentPage(pageState.page); + + if (this.shouldEditMode(pageState)) { + if (this.isEnterpriseLicense) { + this.loadContentPallet(pageState); + } + this.dotEditContentHtmlService.initEditMode(pageState, this.iframe); + this.isEditMode = true; + } else { + this.dotEditContentHtmlService.renderPage(pageState, this.iframe); + this.isEditMode = false; + } + } + + private subscribeIframeActions(): void { + this.dotEditContentHtmlService.iframeActions$ + .pipe(takeUntil(this.destroy$)) + .subscribe((contentletEvent: DotIframeEditEvent) => { + this.ngZone.run(() => { + this.iframeActionsHandler(contentletEvent.name)(contentletEvent); + }); + }); + } + + private setInitalData(): void { + const content$ = merge( + this.route.parent.parent.data.pipe(pluck('content')), + this.dotPageStateService.state$ + ).pipe(takeUntil(this.destroy$)); + + this.pageState$ = content$.pipe( + takeUntil(this.destroy$), + tap((pageState: DotPageRenderState) => { + this.pageStateInternal = pageState; + this.showIframe = false; + // In order to get the iframe clean up we need to remove it and then re-add it to the DOM + setTimeout(() => { + this.showIframe = true; + const intervalId = setInterval(() => { + if (this.iframe) { + this.renderPage(pageState); + clearInterval(intervalId); + } + }, 1); + }, 0); + }) + ); + } + + private shouldEditMode(pageState: DotPageRenderState): boolean { + return pageState.state.mode === DotPageMode.EDIT && !pageState.state.lockedByAnotherUser; + } + + private subscribePageModelChange(): void { + this.dotEditContentHtmlService.pageModel$ + .pipe( + filter((event: PageModelChangeEvent) => { + return !!event.model.length; + }), + takeUntil(this.destroy$) + ) + .subscribe((event: PageModelChangeEvent) => { + this.ngZone.run(() => { + this.dotPageStateService.updatePageStateHaveContent(event); + this.saveContent(event); + }); + }); + } + + private subscribeSwitchSite(): void { + this.siteService.switchSite$.pipe(skip(1), takeUntil(this.destroy$)).subscribe(() => { + this.reload(null); + }); + } + + private subscribeOverlayService(): void { + this.iframeOverlayService.overlay + .pipe(takeUntil(this.destroy$)) + .subscribe((val: boolean) => (this.showOverlay = val)); + } + + private subscribeDraggedContentType(): void { + this.dotContentletEditorService.draggedContentType$ + .pipe(takeUntil(this.destroy$)) + .subscribe((contentType: DotCMSContentType | DotCMSContentlet) => { + const iframeWindow: WindowProxy = (this.iframe.nativeElement as HTMLIFrameElement) + .contentWindow; + iframeWindow['draggedContent'] = contentType; + }); + } + + private getAllowedContentTypes( + contentTypeList: DotCMSContentType[] = [], + blackList: string[] = [], + pageState: DotPageRenderState + ): DotCMSContentType[] { + const allowedContent = new Set(); + Object.values(pageState.containers).forEach((container) => { + Object.values(container.containerStructures).forEach( + (containerStructure: DotContainerStructure) => { + allowedContent.add(containerStructure.contentTypeVar.toLocaleLowerCase()); + } + ); + }); + blackList.forEach((content) => allowedContent.delete(content.toLocaleLowerCase())); + + return contentTypeList.filter( + (contentType) => + allowedContent.has(contentType.variable.toLocaleLowerCase()) || + contentType.baseType === 'WIDGET' + ); + } +} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/dot-edit-content.module.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/dot-edit-content.module.ts new file mode 100644 index 000000000000..87211d0dce6d --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/dot-edit-content.module.ts @@ -0,0 +1,84 @@ +import { CommonModule } from '@angular/common'; +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; + +import { DotContainerContentletService } from './services/dot-container-contentlet.service'; +import { DotDOMHtmlUtilService } from './services/html/dot-dom-html-util.service'; +import { DotDirectivesModule } from '@shared/dot-directives.module'; +import { DotDragDropAPIHtmlService } from './services/html/dot-drag-drop-api-html.service'; +import { DotEditContentComponent } from './dot-edit-content.component'; +import { DotEditContentHtmlService } from './services/dot-edit-content-html/dot-edit-content-html.service'; +import { DotEditContentToolbarHtmlService } from './services/html/dot-edit-content-toolbar-html.service'; +import { DotLoadingIndicatorModule } from '@components/_common/iframe/dot-loading-indicator/dot-loading-indicator.module'; +import { DotPageRenderService } from '@services/dot-page-render/dot-page-render.service'; +import { DotWorkflowService } from '@services/dot-workflow/dot-workflow.service'; +import { DotEditPageService } from '@services/dot-edit-page/dot-edit-page.service'; +import { DotWhatsChangedModule } from './components/dot-whats-changed/dot-whats-changed.module'; + +import { DotFormSelectorModule } from './components/dot-form-selector/dot-form-selector.module'; +import { DotContentletEditorModule } from '@components/dot-contentlet-editor/dot-contentlet-editor.module'; +import { DotEditPageViewAsControllerModule } from './components/dot-edit-page-view-as-controller/dot-edit-page-view-as-controller.module'; +import { DotEditPageStateControllerModule } from './components/dot-edit-page-state-controller/dot-edit-page-state-controller.module'; +import { DotEditPageToolbarModule } from './components/dot-edit-page-toolbar/dot-edit-page-toolbar.module'; +import { IframeOverlayService } from '@components/_common/iframe/service/iframe-overlay.service'; +import { DotOverlayMaskModule } from '@components/_common/dot-overlay-mask/dot-overlay-mask.module'; +import { DotCustomEventHandlerService } from '@services/dot-custom-event-handler/dot-custom-event-handler.service'; +import { DotPipesModule } from '@pipes/dot-pipes.module'; +import { ButtonModule } from 'primeng/button'; +import { DialogModule } from 'primeng/dialog'; +import { CheckboxModule } from 'primeng/checkbox'; +import { TooltipModule } from 'primeng/tooltip'; +import { DotWorkflowActionsFireService } from '@services/dot-workflow-actions-fire/dot-workflow-actions-fire.service'; +import { DotLicenseService } from '@services/dot-license/dot-license.service'; +import { DotPaletteModule } from '@dotcms/app/portlets/dot-edit-page/components/dot-palette/dot-palette.module'; +import { DotIconModule } from '@dotcms/ui'; +import { DotESContentService } from '@dotcms/app/api/services/dot-es-content/dot-es-content.service'; + +const routes: Routes = [ + { + component: DotEditContentComponent, + path: '' + } +]; + +@NgModule({ + declarations: [DotEditContentComponent], + imports: [ + CommonModule, + ButtonModule, + DialogModule, + CheckboxModule, + RouterModule.forChild(routes), + DotContentletEditorModule, + DotDirectivesModule, + DotPipesModule, + DotWhatsChangedModule, + DotFormSelectorModule, + TooltipModule, + DotContentletEditorModule, + DotLoadingIndicatorModule, + DotEditPageToolbarModule, + DotEditPageViewAsControllerModule, + DotEditPageStateControllerModule, + DotOverlayMaskModule, + DotPaletteModule, + DotIconModule + ], + exports: [DotEditContentComponent], + providers: [ + DotContainerContentletService, + DotDOMHtmlUtilService, + DotDragDropAPIHtmlService, + DotEditContentHtmlService, + DotEditContentToolbarHtmlService, + DotEditPageService, + DotESContentService, + DotPageRenderService, + DotWorkflowService, + IframeOverlayService, + DotCustomEventHandlerService, + DotWorkflowActionsFireService, + DotLicenseService + ] +}) +export class DotEditContentModule {} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/dot-container-contentlet.service.spec.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/dot-container-contentlet.service.spec.ts new file mode 100644 index 000000000000..3a7c4a5f8bf1 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/dot-container-contentlet.service.spec.ts @@ -0,0 +1,97 @@ +import { DotContainerContentletService } from './dot-container-contentlet.service'; +import { DotPageContainer } from '../../../../shared/models/dot-page-container/dot-page-container.model'; +import { DotPageContent } from '../../../dot-edit-page/shared/models/dot-page-content.model'; +import { DotCMSContentType } from '@dotcms/dotcms-models'; +import { dotcmsContentTypeBasicMock } from '@tests/dot-content-types.mock'; +import { TestBed, getTestBed } from '@angular/core/testing'; +import { HttpTestingController, HttpClientTestingModule } from '@angular/common/http/testing'; +import { CoreWebService } from '@dotcms/dotcms-js'; +import { CoreWebServiceMock } from '@tests/core-web.service.mock'; +import { DotPage } from '@dotcms/app/shared/models/dot-page/dot-page.model'; + +describe('DotContainerContentletService', () => { + let injector: TestBed; + let dotContainerContentletService: DotContainerContentletService; + let httpMock: HttpTestingController; + + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [HttpClientTestingModule], + providers: [ + { provide: CoreWebService, useClass: CoreWebServiceMock }, + DotContainerContentletService + ] + }); + injector = getTestBed(); + dotContainerContentletService = injector.get(DotContainerContentletService); + httpMock = injector.get(HttpTestingController); + }); + + it('should do a request for get the contentlet html code', () => { + const pageContainer: DotPageContainer = { + identifier: '1', + uuid: '3' + }; + + const pageContent: DotPageContent = { + identifier: '2', + inode: '4', + type: 'content_type' + }; + + const dotPage: DotPage = { + canEdit: true, + canRead: true, + canLock: true, + identifier: '1', + pageURI: '/page_test', + shortyLive: 'shortyLive', + shortyWorking: 'shortyWorking', + workingInode: '2', + contentType: undefined, + fileAsset: false, + friendlyName: '', + host: '', + inode: '2', + name: '', + systemHost: false, + type: '', + uri: '', + versionType: '' + }; + + dotContainerContentletService + .getContentletToContainer(pageContainer, pageContent, dotPage) + .subscribe(); + httpMock.expectOne(`v1/containers/content/2?containerId=1&pageInode=2`); + }); + + it('should do a request for get the form html code', () => { + const formId = '2'; + const pageContainer: DotPageContainer = { + identifier: '1', + uuid: '3' + }; + + const form: DotCMSContentType = { + ...dotcmsContentTypeBasicMock, + clazz: 'clazz', + defaultType: true, + fixed: true, + folder: 'folder', + host: 'host', + name: 'name', + owner: 'owner', + system: false, + baseType: 'form', + id: formId + }; + + dotContainerContentletService.getFormToContainer(pageContainer, form.id).subscribe(); + httpMock.expectOne(`v1/containers/form/2?containerId=1`); + }); + + afterEach(() => { + httpMock.verify(); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/dot-container-contentlet.service.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/dot-container-contentlet.service.ts new file mode 100644 index 000000000000..bfcff7feb178 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/dot-container-contentlet.service.ts @@ -0,0 +1,52 @@ +import { pluck } from 'rxjs/operators'; +import { Injectable } from '@angular/core'; +import { Observable } from 'rxjs'; +import { DotPageContainer } from '../../../../shared/models/dot-page-container/dot-page-container.model'; +import { DotPageContent } from '../../shared/models/dot-page-content.model'; +import { CoreWebService } from '@dotcms/dotcms-js'; +import { DotPage } from '@dotcms/app/shared/models/dot-page/dot-page.model'; + +@Injectable() +export class DotContainerContentletService { + constructor(private coreWebService: CoreWebService) {} + + /** + * Get the HTML of a contentlet inside a container + * + * @param DotPageContainer container + * @param DotPageContent content + * @param DotPage page + * @returns Observable + * @memberof DotContainerContentletService + */ + getContentletToContainer( + container: DotPageContainer, + content: DotPageContent, + page: DotPage + ): Observable { + return this.coreWebService + .requestView({ + url: `v1/containers/content/${content.identifier}?containerId=${container.identifier}&pageInode=${page.inode}` + }) + .pipe(pluck('entity', 'render')); + } + + /** + * Get the HTML of a form inside a container + * + * @param DotPageContainer container + * @param string formId + * @returns Observable + * @memberof DotContainerContentletService + */ + getFormToContainer( + container: DotPageContainer, + formId: string + ): Observable<{ render: string; content: { [key: string]: string } }> { + return this.coreWebService + .requestView({ + url: `v1/containers/form/${formId}?containerId=${container.identifier}` + }) + .pipe(pluck('entity')); + } +} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/dot-edit-content-html/dot-edit-content-html.service.spec.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/dot-edit-content-html/dot-edit-content-html.service.spec.ts new file mode 100644 index 000000000000..4aa19bca94d3 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/dot-edit-content-html/dot-edit-content-html.service.spec.ts @@ -0,0 +1,1288 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ + +import { Injectable } from '@angular/core'; + +import { HttpClientTestingModule } from '@angular/common/http/testing'; +import { TestBed, waitForAsync } from '@angular/core/testing'; + +import { of, Observable, throwError } from 'rxjs'; +import { ConfirmationService } from 'primeng/api'; + +import { + CONTENTLET_PLACEHOLDER_SELECTOR, + DotEditContentHtmlService +} from './dot-edit-content-html.service'; +import { DotEditContentToolbarHtmlService } from '../html/dot-edit-content-toolbar-html.service'; +import { DotContainerContentletService } from '../dot-container-contentlet.service'; +import { DotDragDropAPIHtmlService } from '../html/dot-drag-drop-api-html.service'; +import { DotDOMHtmlUtilService } from '../html/dot-dom-html-util.service'; +import { DotMessageService } from '@services/dot-message/dot-messages.service'; +import { MockDotMessageService } from '@tests/dot-message-service.mock'; +import { LoggerService, StringUtils, CoreWebService, HttpCode } from '@dotcms/dotcms-js'; +import { DotAlertConfirmService } from '@services/dot-alert-confirm/dot-alert-confirm.service'; +import { mockDotLayout, mockDotRenderedPage, mockDotPage } from '@tests/dot-page-render.mock'; +import { DotCMSContentType } from '@dotcms/dotcms-models'; +import { DotLicenseService } from '@services/dot-license/dot-license.service'; +import { DotPageRenderState } from '@portlets/dot-edit-page/shared/models/dot-rendered-page-state.model'; +import { mockUser } from '@tests/login-service.mock'; +import { PageModelChangeEventType } from './models'; +import { dotcmsContentTypeBasicMock } from '@tests/dot-content-types.mock'; +import { DotPageContent } from '@portlets/dot-edit-page/shared/models'; +import { CoreWebServiceMock } from '@tests/core-web.service.mock'; +import { DotPageContainer } from '@models/dot-page-container/dot-page-container.model'; +import { DotPageRender } from '@models/dot-page/dot-rendered-page.model'; +import { DotGlobalMessageService } from '@dotcms/app/view/components/_common/dot-global-message/dot-global-message.service'; +import { DotEventsService } from '@services/dot-events/dot-events.service'; +import { DotWorkflowActionsFireService } from '@services/dot-workflow-actions-fire/dot-workflow-actions-fire.service'; +import { mockResponseView } from '@dotcms/app/test/response-view.mock'; +import { HttpErrorResponse, HttpResponse } from '@angular/common/http'; +import { DotHttpErrorManagerService } from '@services/dot-http-error-manager/dot-http-error-manager.service'; + +@Injectable() +class MockDotLicenseService { + isEnterprise(): Observable { + return of(false); + } +} + +const mouseoverEvent = new MouseEvent('mouseover', { + view: window, + bubbles: true, + cancelable: true +}); + +xdescribe('DotEditContentHtmlService', () => { + let dotLicenseService: DotLicenseService; + let fakeDocument: Document; + + const fakeHTML = ` + + + + + + +
+ +
+
+
+
+
+

This is a title

+

this is a paragraph

+
+
+
+
+
+
+ + +
+
+
+
+

Hello World

+

Hello Subtitle

+
+
+
+
+ + +
+
+
+

This is a title

+

this is a paragraph

+

this is other paragraph

+

this is another paragraph

+
+
+
+
+
+
+
+
+

This is a title

+

this is a paragraph

+

this is other paragraph

+

this is another paragraph

+
+
+
+
+ + + `; + let fakeIframeEl; + + const messageServiceMock = new MockDotMessageService({ + 'editpage.content.contentlet.menu.drag': 'Drag', + 'editpage.content.contentlet.menu.edit': 'Edit', + 'editpage.content.contentlet.menu.remove': 'Remove', + 'editpage.content.container.action.add': 'Add', + 'editpage.content.container.menu.content': 'Content', + 'editpage.content.container.menu.widget': 'Widget', + 'editpage.content.container.menu.form': 'Form', + 'editpage.inline.error': 'An error ocurred', + 'dot.common.message.saved': 'All changes Saved' + }); + + let service: DotEditContentHtmlService; + let dotEditContentToolbarHtmlService; + let dotHttpErrorManagerService: DotHttpErrorManagerService; + let mouseOverContentlet; + let dotContainerContentletService: DotContainerContentletService; + + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + imports: [HttpClientTestingModule], + providers: [ + { provide: CoreWebService, useClass: CoreWebServiceMock }, + DotEditContentHtmlService, + DotContainerContentletService, + DotEditContentToolbarHtmlService, + DotDragDropAPIHtmlService, + DotDOMHtmlUtilService, + LoggerService, + StringUtils, + DotAlertConfirmService, + ConfirmationService, + DotGlobalMessageService, + DotEventsService, + { + provide: DotHttpErrorManagerService, + useValue: { + handle: jasmine.createSpy().and.returnValue(of({})) + } + }, + DotWorkflowActionsFireService, + { provide: DotMessageService, useValue: messageServiceMock }, + { provide: DotLicenseService, useClass: MockDotLicenseService } + ] + }); + service = TestBed.inject(DotEditContentHtmlService); + dotEditContentToolbarHtmlService = TestBed.inject(DotEditContentToolbarHtmlService); + dotLicenseService = TestBed.inject(DotLicenseService); + dotContainerContentletService = TestBed.inject(DotContainerContentletService); + dotHttpErrorManagerService = TestBed.inject(DotHttpErrorManagerService); + + fakeIframeEl = document.createElement('iframe'); + document.body.appendChild(fakeIframeEl); + + /* + TODO: in the refactor we need to make this service just to generate and return stuff, pass the iframe + is not a good architecture. + */ + + const pageState: DotPageRenderState = new DotPageRenderState( + mockUser(), + new DotPageRender({ + ...mockDotRenderedPage(), + page: { + ...mockDotPage(), + rendered: fakeHTML + } + }) + ); + + service.initEditMode(pageState, { nativeElement: fakeIframeEl }); + fakeDocument = fakeIframeEl.contentWindow.document; + + mouseOverContentlet = () => { + const doc = service.iframe.nativeElement.contentDocument; + doc.querySelector('[data-dot-object="contentlet"] h3').dispatchEvent( + mouseoverEvent + ); + }; + }) + ); + + describe('same height containers', () => { + let mockLayout; + + beforeEach(() => { + mockLayout = mockDotLayout(); + mockLayout.body.rows = [ + { + columns: [ + { + containers: [ + { + identifier: '123', + uuid: '456' + } + ], + leftOffset: 1, + width: 8 + }, + { + containers: [ + { + identifier: '321', + uuid: '654' + } + ], + leftOffset: 1, + width: 8 + } + ] + }, + { + columns: [ + { + containers: [ + { + identifier: '976', + uuid: '156' + } + ], + leftOffset: 1, + width: 8 + } + ] + } + ]; + }); + + xit('should redraw the body', () => { + // TODO need to test the change of the body.style.style but right now not sure how. + }); + }); + + it('should add base tag', () => { + const base = fakeDocument.querySelector('base'); + expect(base.outerHTML).toEqual(''); + }); + + it('should add contentlet', () => { + spyOn(service, 'renderAddedContentlet'); + service.setContainterToAppendContentlet({ + identifier: '123', + uuid: '456' + }); + + service.contentletEvents$.next({ + name: 'save', + data: { + identifier: '123', + inode: '' + } + }); + + expect(service.renderAddedContentlet).toHaveBeenCalledWith({ + identifier: '123', + inode: '' + }); + }); + + it('should add uploaded DotAsset', () => { + spyOn(service, 'renderAddedContentlet'); + service.setContainterToAppendContentlet({ + identifier: '123', + uuid: '456' + }); + + const dataObj = { + contentlet: { + identifier: '456', + inode: '456' + }, + placeholderId: 'id1' + }; + + service.contentletEvents$.next({ + name: 'add-uploaded-dotAsset', + data: dataObj + }); + + expect(service.renderAddedContentlet).toHaveBeenCalledWith( + { + identifier: '456', + inode: '456' + }, + true + ); + }); + + it('should remove placeholder', () => { + service.removeContentletPlaceholder(); + expect(fakeDocument.querySelector(CONTENTLET_PLACEHOLDER_SELECTOR)).toBeNull(); + }); + + it('should handle http error', () => { + const errorResponse = new HttpErrorResponse( + new HttpResponse({ + body: null, + status: HttpCode.FORBIDDEN, + headers: null, + url: '' + }) + ); + + service.contentletEvents$.next({ + name: 'handle-http-error', + data: errorResponse + }); + + expect(dotHttpErrorManagerService.handle).toHaveBeenCalledWith(errorResponse); + }); + + it('should render relocated contentlet', () => { + spyOn(dotContainerContentletService, 'getContentletToContainer').and.returnValue( + of('

new container

') + ); + const insertAdjacentElement = jasmine.createSpy('insertAdjacentElement'); + const replaceChild = jasmine.createSpy('replaceChild'); + + const pageState: DotPageRenderState = new DotPageRenderState( + mockUser(), + new DotPageRender({ + ...mockDotRenderedPage(), + page: { + ...mockDotPage(), + rendered: fakeHTML, + remoteRendered: false + } + }) + ); + + service.setCurrentPage(pageState.page); + + service.initEditMode(pageState, { + nativeElement: { + ...fakeIframeEl, + addEventListener: () => { + // + }, + contentDocument: { + createElement: () => { + const el = document.createElement('div'); + el.innerHTML = '

new container

'; + return el; + }, + open: () => { + // + }, + close: () => { + // + }, + write: () => { + // + }, + querySelector: () => { + return { + tagName: 'DIV', + dataset: { + dotIdentifier: '888', + dotUuid: '999' + }, + insertAdjacentElement, + parentNode: { + replaceChild, + dataset: { + dotIdentifier: '123', + dotUuid: '456' + } + } + }; + } + } + } + }); + + const dataObj = { + container: { + identifier: '123', + uuid: '456' + }, + contentlet: { + identifier: '456', + inode: '456' + } + }; + + service.contentletEvents$.next({ + name: 'relocate', + data: dataObj + }); + + expect(insertAdjacentElement).toHaveBeenCalledWith( + 'afterbegin', + jasmine.objectContaining({ + tagName: 'DIV', + className: 'loader__overlay' + }) + ); + + expect(dotContainerContentletService.getContentletToContainer).toHaveBeenCalledWith( + { identifier: '123', uuid: '456' }, + { identifier: '456', inode: '456' }, + pageState.page + ); + + expect(replaceChild).toHaveBeenCalledWith( + jasmine.objectContaining({ + tagName: 'H1', + innerHTML: 'new container' + }), + jasmine.objectContaining({ + tagName: 'DIV', + dataset: { + dotIdentifier: '888', + dotUuid: '999' + } + }) + ); + }); + + it('should show loading indicator on relocate contentlet', () => { + spyOn(dotContainerContentletService, 'getContentletToContainer').and.returnValue( + of('
') + ); + + const contentlet = service.iframe.nativeElement.contentDocument.querySelector( + 'div[data-dot-object="contentlet"][data-dot-inode="456"]' + ); + + service.contentletEvents$.next({ + name: 'relocate', + data: { + container: { + identifier: '123', + uuid: '456' + }, + contentlet: { + identifier: '456', + inode: '456' + } + } + }); + + expect(contentlet.querySelector('.loader__overlay').innerHTML.trim()).toBe( + '
' + ); + }); + + it('should not render relocated contentlet', () => { + spyOn(dotContainerContentletService, 'getContentletToContainer').and.returnValue( + of('

new container

') + ); + + const pageState: DotPageRenderState = new DotPageRenderState( + mockUser(), + new DotPageRender({ + ...mockDotRenderedPage(), + page: { + ...mockDotPage(), + rendered: fakeHTML, + remoteRendered: true + } + }) + ); + service.initEditMode(pageState, { + nativeElement: fakeIframeEl + }); + + const dataObj = { + container: { + identifier: '123', + uuid: '456' + }, + contentlet: { + identifier: '456', + inode: '456' + } + }; + + service.contentletEvents$.next({ + name: 'relocate', + data: dataObj + }); + + expect(dotContainerContentletService.getContentletToContainer).not.toHaveBeenCalled(); + }); + + it('should emit save when edit a piece of content outside a contentlet div', (done) => { + service.iframeActions$.subscribe((res) => { + expect(res).toEqual({ + name: 'save' + }); + done(); + }); + + service.renderEditedContentlet(null); + }); + + it('should render added contentlet', () => { + let currentModel; + + const currentContainer = { + identifier: '123', + uuid: '456' + }; + + service.currentContainer = currentContainer; + + spyOn(dotContainerContentletService, 'getContentletToContainer').and.returnValue( + of('testing') + ); + + const contentlet: DotPageContent = { + identifier: '67', + inode: '89', + type: 'type', + baseType: 'CONTENT' + }; + + service.pageModel$.subscribe((model) => (currentModel = model)); + + service.renderAddedContentlet(contentlet); + + expect(dotContainerContentletService.getContentletToContainer).toHaveBeenCalledWith( + currentContainer, + contentlet, + null + ); + + expect(service.currentContainer).toEqual( + { + identifier: '123', + uuid: '456' + }, + 'currentContainer must be the same after add content' + ); + expect(currentModel).toEqual( + { + model: [ + { identifier: '123', uuid: '456', contentletsId: ['456'] }, + { identifier: '321', uuid: '654', contentletsId: ['456'] }, + { identifier: '976', uuid: '156', contentletsId: ['367'] } + ], + type: PageModelChangeEventType.ADD_CONTENT + }, + 'should tigger model change event' + ); + }); + + it('should render added Dot Asset', () => { + let currentModel; + + const currentContainer = { + identifier: '123', + uuid: '456' + }; + + spyOn(dotContainerContentletService, 'getContentletToContainer').and.returnValue( + of( + '
replaced contentlet
' + ) + ); + + const contentlet: DotPageContent = { + identifier: '67', + inode: '89', + type: 'type', + baseType: 'CONTENT' + }; + + service.pageModel$.subscribe((model) => (currentModel = model)); + + service.renderAddedContentlet(contentlet, true); + + expect(dotContainerContentletService.getContentletToContainer).toHaveBeenCalledWith( + currentContainer, + contentlet, + null + ); + + expect(service.currentContainer).toEqual( + { + identifier: '123', + uuid: '456' + }, + 'currentContainer must be the same after add content' + ); + + expect(currentModel).toEqual( + { + model: [ + { identifier: '123', uuid: '456', contentletsId: ['456', 'zxc'] }, + { identifier: '321', uuid: '654', contentletsId: ['456'] }, + { identifier: '976', uuid: '156', contentletsId: ['367'] } + ], + type: PageModelChangeEventType.ADD_CONTENT + }, + 'should tigger model change event' + ); + }); + + it('should remove contentlet and update container toolbar', () => { + spyOn(dotEditContentToolbarHtmlService, 'updateContainerToolbar'); + + let currentModel; + + const contentlet: DotPageContent = { + identifier: '367', + inode: '908', + type: 'NewsWidgets', + baseType: 'CONTENT' + }; + + const container: DotPageContainer = { + identifier: '976', + uuid: '156' + }; + + service.pageModel$.subscribe((model) => (currentModel = model)); + + service.removeContentlet(container, contentlet); + + expect(currentModel).toEqual( + { + model: [ + { identifier: '123', uuid: '456', contentletsId: ['456', 'tmpPlaceholder'] }, + { identifier: '321', uuid: '654', contentletsId: ['456'] }, + { identifier: '976', uuid: '156', contentletsId: [] } + ], + type: PageModelChangeEventType.REMOVE_CONTENT + }, + 'should tigger model change event' + ); + + expect(dotEditContentToolbarHtmlService.updateContainerToolbar).toHaveBeenCalledTimes(1); + }); + + it('should remove contentlet', () => { + const remove = jasmine.createSpy('deleted'); + + spyOn(fakeDocument, 'querySelectorAll').and.returnValue([ + { + remove: remove + }, + { + remove: remove + } + ]); + + service.currentContentlet = { + identifier: '', + inode: '123' + }; + + service.contentletEvents$.next({ + name: 'deleted-contenlet', + data: null + }); + + expect(remove).toHaveBeenCalledTimes(2); + }); + + it('should show error message when the content already exists', () => { + let currentModel = null; + const currentContainer = { + identifier: '123', + uuid: '456' + }; + + service.currentContainer = currentContainer; + + spyOn(dotContainerContentletService, 'getContentletToContainer').and.returnValue( + of('testing') + ); + + const dotDialogService = TestBed.inject(DotAlertConfirmService); + spyOn(dotDialogService, 'alert'); + + const contentlet: DotPageContent = { + identifier: '456', + inode: '456', + type: 'type', + baseType: 'CONTENT' + }; + + service.pageModel$.subscribe((model) => (currentModel = model)); + + service.renderAddedContentlet(contentlet); + + const doc = service.iframe.nativeElement.contentDocument; + + expect(doc.querySelector('.loader__overlay')).toBeNull(); + + expect(dotContainerContentletService.getContentletToContainer).not.toHaveBeenCalled(); + expect(service.currentContainer).toBeNull('The current container must be null'); + expect(currentModel).toBeNull('should not tigger model change event'); + expect(dotDialogService.alert).toHaveBeenCalled(); + }); + + it('should render edit contentlet', () => { + window.top['changed'] = false; + + const currentContainer = { + identifier: '123', + uuid: '456' + }; + + const anotherContainer = { + identifier: '321', + uuid: '654' + }; + + service.currentContainer = currentContainer; + const contentlet: DotPageContent = { + identifier: '456', + inode: '456', + type: 'type', + baseType: 'CONTENT' + }; + + spyOn(dotContainerContentletService, 'getContentletToContainer').and.returnValue( + of(` +
+ +
+
+

+

+
    +
  • +

    + Text test + +

    +
  • +
+
+

+
+
+
`) + ); + + service.renderEditedContentlet(contentlet); + + expect(dotContainerContentletService.getContentletToContainer).toHaveBeenCalledWith( + currentContainer, + contentlet, + null + ); + expect(dotContainerContentletService.getContentletToContainer).toHaveBeenCalledWith( + anotherContainer, + contentlet, + null + ); + expect(window.top['changed']).toEqual(true); + }); + + // TODO needs to move this to a new describe to pass pageState.page.remoteRendered as true + xit('should emit "save" event when remote rendered edit contentlet', (done) => { + // service.remoteRendered = true; + + const contentlet: DotPageContent = { + identifier: '456', + inode: '456', + type: 'type', + baseType: 'CONTENT' + }; + + service.iframeActions$.subscribe((res) => { + expect(res).toEqual({ + name: 'save' + }); + done(); + }); + + service.renderEditedContentlet(contentlet); + }); + + describe('document click', () => { + beforeEach(() => { + spyOn(dotLicenseService, 'isEnterprise').and.returnValue(of(true)); + }); + + it('should open sub menu', () => { + const button: HTMLButtonElement = ( + fakeDocument.querySelector('[data-dot-object="popup-button"]') + ); + button.click(); + expect(button.nextElementSibling.classList.contains('active')).toBe(true); + }); + + it('should emit iframe action to add content', () => { + service.iframeActions$.subscribe((res) => { + expect(res).toEqual({ + name: 'add', + container: null, + dataset: button.dataset + }); + }); + + const button: HTMLButtonElement = ( + fakeDocument.querySelector('[data-dot-object="popup-menu-item"]') + ); + button.click(); + }); + + it('should emit iframe action to edit content', () => { + mouseOverContentlet(); + + service.iframeActions$.subscribe((res) => { + expect(res).toEqual({ + name: 'edit', + container: container.dataset, + dataset: button.dataset + }); + }); + + const button: HTMLButtonElement = ( + fakeDocument.querySelector('.dotedit-contentlet__edit') + ); + const container = button.closest('div[data-dot-object="container"]'); + button.click(); + }); + + it('should emit iframe action to remove content', () => { + mouseOverContentlet(); + + service.iframeActions$.subscribe((res) => { + expect(res).toEqual({ + name: 'remove', + container: container.dataset, + dataset: button.dataset + }); + }); + const button: HTMLButtonElement = ( + fakeDocument.querySelector('.dotedit-contentlet__remove') + ); + const container = button.closest('div[data-dot-object="container"]'); + button.click(); + }); + + it('should emit iframe action to edit vtl', () => { + mouseOverContentlet(); + + service.iframeActions$.subscribe((res) => { + expect(res).toEqual({ + name: 'code', + container: container.dataset, + dataset: button.dataset + }); + }); + const button: HTMLButtonElement = ( + fakeDocument.querySelector( + '.dotedit-contentlet__toolbar [data-dot-object="popup-menu-item"]' + ) + ); + const container = button.closest('div[data-dot-object="container"]'); + button.click(); + + expect(service.currentContentlet).toEqual({ + identifier: '456', + inode: '456', + type: 'NewsWidgets', + baseType: 'CONTENT' + }); + }); + }); + + describe('inline editing', () => { + let dotWorkflowActionsFireService: DotWorkflowActionsFireService; + let dotGlobalMessageService: DotGlobalMessageService; + + beforeEach(() => { + dotWorkflowActionsFireService = TestBed.inject(DotWorkflowActionsFireService); + dotGlobalMessageService = TestBed.inject(DotGlobalMessageService); + }); + + it('should return the content if an error occurs', () => { + const fakeElem: HTMLElement = fakeDocument.querySelector( + '[data-test-id="inline-edit-element-title"]' + ); + + const error404 = mockResponseView(404); + spyOn(dotWorkflowActionsFireService, 'saveContentlet').and.returnValue( + throwError(error404) + ); + + const events = ['focus', 'blur']; + events.forEach((event) => { + service.contentletEvents$.next({ + name: 'inlineEdit', + data: { + eventType: event, + innerHTML: event === 'focus' ? fakeElem.innerHTML : '
hello
', + isNotDirty: false, + dataset: { + fieldName: 'title', + inode: '999', + language: '1', + mode: 'full' + }, + element: fakeElem + } + }); + }); + + expect(fakeElem.innerHTML).toBe('Hello World'); + }); + + it('should call saveContentlet and save the content', () => { + spyOn(dotWorkflowActionsFireService, 'saveContentlet').and.returnValue(of({})); + spyOn(dotGlobalMessageService, 'success'); + const fakeElem: HTMLElement = fakeDocument.querySelector( + '[data-test-id="inline-edit-element-title"]' + ); + + service.contentletEvents$.next({ + name: 'inlineEdit', + data: { + eventType: 'blur', + innerHTML: '
hello
', + isNotDirty: false, + dataset: { + fieldName: 'title', + inode: '999', + language: '1', + mode: 'full' + }, + element: fakeElem + } + }); + + expect(dotWorkflowActionsFireService.saveContentlet).toHaveBeenCalledWith({ + title: '
hello
', + inode: '999' + }); + + expect(dotGlobalMessageService.success).toHaveBeenCalledOnceWith('All changes Saved'); + }); + + it('should not call saveContentlet if isNotDirty is true', () => { + spyOn(dotWorkflowActionsFireService, 'saveContentlet').and.returnValue(of({})); + const fakeElem: HTMLElement = fakeDocument.querySelector( + '[data-test-id="inline-edit-element-title"]' + ); + + service.contentletEvents$.next({ + name: 'inlineEdit', + data: { + eventType: 'blur', + innerHTML: '
hello
', + isNotDirty: true, + dataset: { + fieldName: 'title', + inode: '999', + language: '1', + mode: 'full' + }, + element: fakeElem + } + }); + + expect(dotWorkflowActionsFireService.saveContentlet).not.toHaveBeenCalled(); + }); + + it('should display a toast on error', () => { + const error404 = mockResponseView(404, '', null, { + errors: [{ message: 'An error ocurred' }] + }); + spyOn(dotWorkflowActionsFireService, 'saveContentlet').and.returnValue( + throwError(error404) + ); + spyOn(dotGlobalMessageService, 'error').and.callThrough(); + + const fakeElem: HTMLElement = fakeDocument.querySelector( + '[data-test-id="inline-edit-element-title"]' + ); + + service.contentletEvents$.next({ + name: 'inlineEdit', + data: { + eventType: 'blur', + innerHTML: '
hello
', + isNotDirty: false, + dataset: { + fieldName: 'title', + inode: '999', + language: '1', + mode: 'full' + }, + element: fakeElem + } + }); + + expect(dotGlobalMessageService.error).toHaveBeenCalledWith('An error ocurred'); + }); + }); + + describe('edit contentlets', () => { + beforeEach(() => { + spyOn(service, 'renderEditedContentlet'); + }); + + it('should render main contentlet edit', () => { + mouseOverContentlet(); + + service.iframeActions$.subscribe((res) => { + expect(JSON.parse(JSON.stringify(res))).toEqual({ + name: 'edit', + dataset: { + dotIdentifier: '456', + dotInode: '456', + dotObject: 'edit-content' + }, + container: { + dotObject: 'container', + dotIdentifier: '123', + dotUuid: '456', + dotCanAdd: 'CONTENT' + } + }); + }); + + const button: HTMLButtonElement = ( + fakeDocument.querySelector('.dotedit-contentlet__edit') + ); + button.click(); + + service.contentletEvents$.next({ + name: 'save', + data: { + identifier: '456', + inode: '999' + } + }); + + const doc: HTMLElement = fakeDocument.querySelector('html'); + expect(doc.id).toContain('iframeId'); + expect(service.renderEditedContentlet).toHaveBeenCalledWith({ + identifier: '456', + inode: '999', + type: 'NewsWidgets', + baseType: 'CONTENT' + }); + }); + + it('should render edit vtl', () => { + mouseOverContentlet(); + + service.iframeActions$.subscribe((res) => { + expect(JSON.parse(JSON.stringify(res))).toEqual({ + name: 'code', + dataset: { + dotObject: 'popup-menu-item', + dotAction: 'code', + dotInode: '345274e0-3bbb-41f1-912c-b398d5745b9a' + }, + container: { + dotObject: 'container', + dotIdentifier: '123', + dotUuid: '456', + dotCanAdd: 'CONTENT' + } + }); + }); + + const button = fakeIframeEl.contentWindow.document.querySelector( + '[data-dot-action="code"][data-dot-object="popup-menu-item"]' + ); + button.click(); + + service.contentletEvents$.next({ + name: 'save', + data: { + identifier: '456', + inode: '888' + } + }); + + expect(service.renderEditedContentlet).toHaveBeenCalledWith({ + identifier: '456', + inode: '456', + type: 'NewsWidgets', + baseType: 'CONTENT' + }); + }); + + it('should render internal contentlet edit', () => { + mouseOverContentlet(); + service.iframeActions$.subscribe((res) => { + expect(JSON.stringify(res)).toEqual( + JSON.stringify({ + name: 'edit', + dataset: { + dotIdentifier: '456', + dotInode: '456', + dotObject: 'edit-content' + }, + container: { + dotObject: 'container', + dotIdentifier: '123', + dotUuid: '456', + dotCanAdd: 'CONTENT' + } + }) + ); + }); + + const button = fakeIframeEl.contentWindow.document.querySelector( + '[data-dot-object="edit-content"]' + ); + + button.click(); + + service.contentletEvents$.next({ + name: 'save', + data: { + identifier: '34345', + inode: '67789' + } + }); + + expect(service.renderEditedContentlet).toHaveBeenCalledWith({ + identifier: '456', + inode: '67789', + type: 'NewsWidgets', + baseType: 'CONTENT' + }); + }); + }); + + describe('render Form', () => { + const form: DotCMSContentType = { + ...dotcmsContentTypeBasicMock, + clazz: 'clazz', + defaultType: true, + fixed: true, + folder: 'folder', + host: 'host', + name: 'name', + owner: 'owner', + system: false, + baseType: 'form', + id: '2', + variable: 'test123' + }; + + const currentContainer = { + identifier: '123', + uuid: '456' + }; + + beforeEach(() => { + spyOn(service, 'renderEditedContentlet'); + + service.currentContainer = currentContainer; + }); + + it('should render added form', () => { + spyOn(dotContainerContentletService, 'getFormToContainer').and.returnValue( + of({ + render: 'testing', + content: { + identifier: '2', + inode: '123' + } + }) + ); + + service.renderAddedForm('4').subscribe((model) => { + expect(model).toEqual( + [ + { + identifier: '123', + uuid: '456', + contentletsId: ['456', 'tmpPlaceholder', '2'] + }, + { identifier: '321', uuid: '654', contentletsId: ['456'] }, + { identifier: '976', uuid: '156', contentletsId: ['367'] } + ], + 'should tigger model change event' + ); + }); + + expect(dotContainerContentletService.getFormToContainer).toHaveBeenCalledWith( + currentContainer, + { + ...form, + id: '4' + } + ); + + expect(service.currentContainer).toEqual( + { + identifier: '123', + uuid: '456' + }, + 'currentContainer must be the same after add form' + ); + }); + + it('should show content added message', () => { + spyOn(dotContainerContentletService, 'getFormToContainer').and.returnValue( + of({ + render: 'testing', + content: { + identifier: '4', + inode: '123' + } + }) + ); + + service.renderAddedForm(form.id).subscribe((model) => { + expect(model).toBeNull(); + }); + + const doc = service.iframe.nativeElement.contentDocument; + expect(doc.querySelector('.loader__overlay')).toBeNull(); + }); + }); + afterEach(() => { + document.body.removeChild(fakeIframeEl); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/dot-edit-content-html/dot-edit-content-html.service.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/dot-edit-content-html/dot-edit-content-html.service.ts new file mode 100644 index 000000000000..aa57652a7129 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/dot-edit-content-html/dot-edit-content-html.service.ts @@ -0,0 +1,834 @@ +import { fromEvent, of, Observable, Subject, Subscription } from 'rxjs'; + +import { filter, map, take } from 'rxjs/operators'; +import { Injectable, ElementRef, NgZone } from '@angular/core'; + +import { DotContainerContentletService } from '../dot-container-contentlet.service'; +import { DotDOMHtmlUtilService } from '../html/dot-dom-html-util.service'; +import { DotAlertConfirmService } from '@services/dot-alert-confirm/dot-alert-confirm.service'; +import { DotDragDropAPIHtmlService } from '../html/dot-drag-drop-api-html.service'; +import { DotEditContentToolbarHtmlService } from '../html/dot-edit-content-toolbar-html.service'; +import { DotMessageService } from '@services/dot-message/dot-messages.service'; +import { DotPageContent, DotPageRenderState } from '@portlets/dot-edit-page/shared/models'; +import { DotGlobalMessageService } from '@components/_common/dot-global-message/dot-global-message.service'; +import { DotWorkflowActionsFireService } from '@services/dot-workflow-actions-fire/dot-workflow-actions-fire.service'; +import { getEditPageCss } from '../html/libraries/iframe-edit-mode.css'; +import { MODEL_VAR_NAME } from '@dotcms/app/portlets/dot-edit-page/content/services/html/libraries/iframe-edit-mode.js'; +import { PageModelChangeEvent, PageModelChangeEventType } from './models'; +import { + DotAssetPayload, + DotContentletEvent, + DotContentletEventDragAndDropDotAsset, + DotContentletEventRelocate, + DotContentletEventSave, + DotContentletEventSelect, + DotInlineEditContent, + DotRelocatePayload +} from './models/dot-contentlets-events.model'; +import { DotPageContainer } from '@models/dot-page-container/dot-page-container.model'; +import { DotLicenseService } from '@services/dot-license/dot-license.service'; +import { INLINE_TINYMCE_SCRIPTS } from '@dotcms/app/portlets/dot-edit-page/content/services/html/libraries/inline-edit-mode.js'; +import { HttpErrorResponse } from '@angular/common/http'; +import { DotHttpErrorManagerService } from '@services/dot-http-error-manager/dot-http-error-manager.service'; +import { DotPage } from '@dotcms/app/shared/models/dot-page/dot-page.model'; +import { DotAddContentTypePayload } from './models/dot-contentlets-events.model'; +import { DotIframeEditEvent } from '@dotcms/dotcms-models'; + +export enum DotContentletAction { + EDIT, + ADD +} + +export const CONTENTLET_PLACEHOLDER_SELECTOR = '#contentletPlaceholder'; + +@Injectable() +export class DotEditContentHtmlService { + contentletEvents$: Subject< + | DotContentletEventDragAndDropDotAsset + | DotContentletEventRelocate + | DotContentletEventSelect + | DotContentletEventSave + | DotContentletEvent + > = new Subject(); + currentContainer: DotPageContainer; + currentContentlet: DotPageContent; + iframe: ElementRef; + iframeActions$: Subject< + DotIframeEditEvent | DotAddContentTypePayload> + > = new Subject(); + pageModel$: Subject = new Subject(); + mutationConfig = { attributes: false, childList: true, characterData: false }; + datasetMissing: string[]; + private currentPage: DotPage; + + private inlineCurrentContent: { [key: string]: string } = {}; + private currentAction: DotContentletAction; + private docClickSubscription: Subscription; + private updateContentletInode = false; + private remoteRendered: boolean; + + private readonly docClickHandlers; + + constructor( + private dotContainerContentletService: DotContainerContentletService, + private dotDragDropAPIHtmlService: DotDragDropAPIHtmlService, + private dotEditContentToolbarHtmlService: DotEditContentToolbarHtmlService, + private dotDOMHtmlUtilService: DotDOMHtmlUtilService, + private dotDialogService: DotAlertConfirmService, + private dotHttpErrorManagerService: DotHttpErrorManagerService, + private dotMessageService: DotMessageService, + private dotGlobalMessageService: DotGlobalMessageService, + private dotWorkflowActionsFireService: DotWorkflowActionsFireService, + private ngZone: NgZone, + private dotLicenseService: DotLicenseService + ) { + this.contentletEvents$.subscribe( + ( + contentletEvent: + | DotContentletEventRelocate + | DotContentletEventSelect + | DotContentletEventSave + ) => { + this.ngZone.run(() => { + this.handlerContentletEvents(contentletEvent.name)(contentletEvent.data); + }); + } + ); + + if (!this.docClickHandlers) { + this.docClickHandlers = {}; + this.setGlobalClickHandlers(); + } + } + + /** + * Set the current page + * + * @param DotPage page + */ + setCurrentPage(page: DotPage) { + this.currentPage = page; + } + + /** + * Load code into iframe + * + * @param string editPageHTML + * @param ElementRef iframeEl + * @returns Promise + * @memberof DotEditContentHtmlService + */ + renderPage(pageState: DotPageRenderState, iframeEl: ElementRef): Promise { + this.remoteRendered = pageState.page.remoteRendered; + + return new Promise((resolve, _reject) => { + this.iframe = iframeEl; + const iframeElement = this.getEditPageIframe(); + + iframeElement.addEventListener('load', () => { + iframeElement.contentWindow[MODEL_VAR_NAME] = this.pageModel$; + iframeElement.contentWindow['contentletEvents'] = this.contentletEvents$; + + this.bindGlobalEvents(); + + resolve(true); + }); + + // Load content after bind 'load' event. + this.loadCodeIntoIframe(pageState); + }); + } + + /** + * Initalize edit content mode + * + * @param string editPageHTML + * @param ElementRef iframeEl + * @memberof DotEditContentHtmlService + */ + initEditMode(pageState: DotPageRenderState, iframeEl: ElementRef): void { + this.renderPage(pageState, iframeEl).then(() => { + this.setEditMode(); + }); + } + + /** + * Remove a contentlet from the DOM by inode and update the page model + * + * @param string inode + * @memberof DotEditContentHtmlService + */ + removeContentlet(container: DotPageContainer, content: DotPageContent): void { + const doc = this.getEditPageDocument(); + + const selector = [ + `[data-dot-object="container"][data-dot-identifier="${container.identifier}"][data-dot-uuid="${container.uuid}"] `, + `[data-dot-object="contentlet"][data-dot-inode="${content.inode}"]` + ].join(''); + + const contenletEl = doc.querySelector(selector); + + contenletEl.remove(); + + this.pageModel$.next({ + model: this.getContentModel(), + type: PageModelChangeEventType.REMOVE_CONTENT + }); + this.updateContainerToolbar(container.identifier); + } + + /** + * Render contentlet in the DOM after edition. + * + * @param * contentlet + * @memberof DotEditContentHtmlService + */ + renderEditedContentlet(contentlet: DotPageContent): void { + if (this.remoteRendered || !contentlet) { + this.iframeActions$.next({ + name: 'save' + }); + } else { + const doc = this.getEditPageDocument(); + const currentContentlets: HTMLElement[] = Array.from( + doc.querySelectorAll( + `[data-dot-object="contentlet"][data-dot-identifier="${contentlet.identifier}"]` + ) + ); + currentContentlets.forEach((currentContentlet: HTMLElement) => { + contentlet.type = currentContentlet.dataset.dotType; + const containerEl = currentContentlet.parentNode; + + const container: DotPageContainer = { + identifier: containerEl.dataset.dotIdentifier, + uuid: containerEl.dataset.dotUuid + }; + + this.dotContainerContentletService + .getContentletToContainer(container, contentlet, this.currentPage) + .pipe(take(1)) + .subscribe((contentletHtml: string) => { + const contentletEl: HTMLElement = + this.generateNewContentlet(contentletHtml); + containerEl.replaceChild(contentletEl, currentContentlet); + }); + }); + } + } + + /** + * Removes placeholder when closing the dialog. + * + * @memberof DotEditContentHtmlService + */ + removeContentletPlaceholder(): void { + const doc = this.getEditPageDocument(); + const placeholder = doc.querySelector(CONTENTLET_PLACEHOLDER_SELECTOR); + if (placeholder) { + placeholder.remove(); + } + } + + /** + * Render a contentlet in the DOM after add it + * + * @param DotPageContent contentlet + * @param boolean isDroppedAsset + * @memberof DotEditContentHtmlService + */ + renderAddedContentlet(contentlet: DotPageContent, isDroppedContentlet = false): void { + const doc = this.getEditPageDocument(); + if (isDroppedContentlet) { + this.setCurrentContainerOnContentDrop(doc); + } + const containerEl: HTMLElement = doc.querySelector( + `[data-dot-object="container"][data-dot-identifier="${this.currentContainer.identifier}"][data-dot-uuid="${this.currentContainer.uuid}"]` + ); + + if (this.isContentExistInContainer(contentlet, containerEl)) { + this.showContentAlreadyAddedError(); + this.removeContentletPlaceholder(); + } else { + let contentletPlaceholder = doc.querySelector(CONTENTLET_PLACEHOLDER_SELECTOR); + if (!contentletPlaceholder) { + contentletPlaceholder = this.getContentletPlaceholder(); + containerEl.appendChild(contentletPlaceholder); + } + + this.dotContainerContentletService + .getContentletToContainer(this.currentContainer, contentlet, this.currentPage) + .pipe(take(1)) + .subscribe((contentletHtml: string) => { + const contentletEl: HTMLElement = this.generateNewContentlet(contentletHtml); + containerEl.replaceChild(contentletEl, contentletPlaceholder); + // Update the model with the recently added contentlet + this.pageModel$.next({ + model: this.getContentModel(), + type: PageModelChangeEventType.ADD_CONTENT + }); + this.currentAction = DotContentletAction.EDIT; + this.updateContainerToolbar(containerEl.dataset.dotIdentifier); + }); + } + } + + /** + * Render a form in the DOM after add it + * + * @param string formId + * @param booblean isDroppedAsset + * @memberof DotEditContentHtmlService + */ + renderAddedForm(formId: string, isDroppedForm = false): Observable { + const doc = this.getEditPageDocument(); + if (isDroppedForm) { + this.setCurrentContainerOnContentDrop(doc); + } + const containerEl: HTMLElement = doc.querySelector( + [ + '[data-dot-object="container"]', + `[data-dot-identifier="${this.currentContainer.identifier}"]`, + `[data-dot-uuid="${this.currentContainer.uuid}"]` + ].join('') + ); + + if (this.isFormExistInContainer(formId, containerEl)) { + this.showContentAlreadyAddedError(); + this.removeContentletPlaceholder(); + return of(null); + } else { + let contentletPlaceholder = doc.querySelector(CONTENTLET_PLACEHOLDER_SELECTOR); + + if (!contentletPlaceholder) { + contentletPlaceholder = this.getContentletPlaceholder(); + containerEl.appendChild(contentletPlaceholder); + } + + return this.dotContainerContentletService + .getFormToContainer(this.currentContainer, formId) + .pipe( + map(({ content }: { content: { [key: string]: string } }) => { + const { identifier, inode } = content; + containerEl.replaceChild( + this.renderFormContentlet(identifier, inode), + contentletPlaceholder + ); + return this.getContentModel(); + }) + ); + } + } + + /** + * Set the container id where a contentlet will be added + * + * @param string identifier + * @memberof DotEditContentHtmlService + */ + setContainterToAppendContentlet(pageContainer: DotPageContainer): void { + this.currentContainer = pageContainer; + this.currentAction = DotContentletAction.ADD; + } + + /** + * Return the page model + * + * @returns * + * @memberof DotEditContentHtmlService + */ + getContentModel(): DotPageContainer[] { + return this.getEditPageIframe().contentWindow['getDotNgModel'](); + } + + private setCurrentContainerOnContentDrop(doc: Document): void { + const container: HTMLElement = doc + .querySelector(CONTENTLET_PLACEHOLDER_SELECTOR) + .closest('[data-dot-object="container"]'); + this.setContainterToAppendContentlet({ + identifier: container.dataset['dotIdentifier'], + uuid: container.dataset['dotUuid'] + }); + } + + private updateContainerToolbar(dotIdentifier: string) { + const doc = this.getEditPageDocument(); + const target = ( + doc.querySelector( + `[data-dot-object="container"][data-dot-identifier="${dotIdentifier}"]` + ) + ); + this.dotEditContentToolbarHtmlService.updateContainerToolbar(target); + } + + private getContentletPlaceholder(): HTMLDivElement { + const doc = this.getEditPageDocument(); + const placeholder = doc.createElement('div'); + placeholder.setAttribute('data-dot-object', 'contentlet'); + placeholder.appendChild(this.getLoadingIndicator()); + return placeholder; + } + + private renderFormContentlet(identifier: string, inode: string): HTMLElement { + return this.createEmptyContentletElement({ + identifier, + inode, + baseType: 'FORM', + type: 'forms' + }); + } + + private bindGlobalEvents(): void { + const doc = this.getEditPageDocument(); + + if (this.docClickSubscription) { + this.docClickSubscription.unsubscribe(); + } + + this.docClickSubscription = fromEvent(doc, 'click').subscribe(($event: MouseEvent) => { + const target = $event.target; + const method = this.docClickHandlers[target.dataset.dotObject]; + if (method) { + method(target); + } + + if (!target.classList.contains('dotedit-menu__button')) { + this.closeContainersToolBarMenu(); + } + }); + } + + private getCurrentContentlet(target: HTMLElement): DotPageContent { + try { + const contentlet = target.closest('[data-dot-object="contentlet"]'); + return { + identifier: contentlet.dataset.dotIdentifier, + inode: contentlet.dataset.dotInode, + type: contentlet.dataset.dotType, + baseType: contentlet.dataset.dotBasetype + }; + } catch { + return null; + } + } + + private setGlobalClickHandlers(): void { + this.docClickHandlers['edit-content'] = (target: HTMLElement) => { + this.currentContentlet = this.getCurrentContentlet(target); + this.buttonClickHandler(target, 'edit'); + }; + + this.docClickHandlers['remove-content'] = (target: HTMLElement) => { + this.buttonClickHandler(target, 'remove'); + }; + + this.docClickHandlers['popup-button'] = (target: HTMLElement) => { + target.nextElementSibling.classList.toggle('active'); + }; + + this.docClickHandlers['popup-menu-item'] = (target: HTMLElement) => { + if (target.dataset.dotAction === 'code') { + this.currentContentlet = this.getCurrentContentlet(target); + } + + this.buttonClickHandler(target, target.dataset.dotAction); + }; + } + + private showContentAlreadyAddedError(): void { + this.currentContainer = null; + this.dotDialogService.alert({ + header: this.dotMessageService.get('editpage.content.add.already.title'), + message: this.dotMessageService.get('editpage.content.add.already.message'), + footerLabel: { + accept: 'Ok' + } + }); + } + + private isContentExistInContainer( + contentlet: DotPageContent, + containerEL: HTMLElement + ): boolean { + const contentsSelector = `[data-dot-object="contentlet"]`; + const currentContentlets: HTMLElement[] = ( + Array.from(containerEL.querySelectorAll(contentsSelector).values()) + ); + return currentContentlets.some( + (contentElement) => contentElement.dataset.dotIdentifier === contentlet.identifier + ); + } + + private isFormExistInContainer(formId: string, containerEL: HTMLElement): boolean { + const contentsSelector = `[data-dot-object="contentlet"]`; + const currentContentlets: HTMLElement[] = ( + Array.from(containerEL.querySelectorAll(contentsSelector).values()) + ); + + return currentContentlets.some( + (contentElement) => contentElement.dataset.dotContentTypeId === formId + ); + } + + private addContentToolBars(): void { + const doc = this.getEditPageDocument(); + this.dotEditContentToolbarHtmlService.bindContentletEvents(doc); + this.dotEditContentToolbarHtmlService.addContainerToolbar(doc); + } + + private injectInlineEditingScripts(): void { + const doc = this.getEditPageDocument(); + const editModeNodes = doc.querySelectorAll('[data-mode]'); + + if (editModeNodes.length) { + const TINYMCE = `/html/js/tinymce/js/tinymce/tinymce.min.js`; + const tinyMceScript = this.dotDOMHtmlUtilService.creatExternalScriptElement(TINYMCE); + const tinyMceInitScript: HTMLScriptElement = + this.dotDOMHtmlUtilService.createInlineScriptElement(INLINE_TINYMCE_SCRIPTS); + + this.dotLicenseService + .isEnterprise() + .pipe( + take(1), + filter((isEnterprise: boolean) => isEnterprise === true) + ) + .subscribe(() => { + // We have elements in the DOM and we're on enterprise plan + + doc.body.append(tinyMceInitScript); + doc.body.append(tinyMceScript); + + editModeNodes.forEach((node) => { + node.classList.add('dotcms__inline-edit-field'); + }); + }); + } + } + + private createScriptTag(node: HTMLScriptElement): HTMLScriptElement { + const doc = this.getEditPageDocument(); + const script = doc.createElement('script'); + script.type = 'text/javascript'; + + if (node.src) { + script.src = node.src; + } else { + script.text = node.textContent; + } + return script; + } + + private getScriptTags( + scriptTags: HTMLScriptElement[], + contentlet: HTMLElement + ): HTMLScriptElement[] { + Array.from(contentlet.children).forEach((node: HTMLElement) => { + if (node.tagName === 'SCRIPT') { + const script = this.createScriptTag(node); + scriptTags.push(script); + node.parentElement.removeChild(node); + } else if (node.children.length) { + this.getScriptTags(scriptTags, node); + } + }); + + return scriptTags; + } + + private getContentletElementFromHtml(html: string): HTMLElement { + const doc = this.getEditPageDocument(); + // Add innerHTML to a plain so we can get the HTML nodes later + const div = doc.createElement('div'); + div.innerHTML = html; + + return div.children[0]; + } + + private generateNewContentlet(html: string): HTMLElement { + const newContentlet = this.getContentletElementFromHtml(html); + + let scriptTags: HTMLScriptElement[] = []; + scriptTags = this.getScriptTags(scriptTags, newContentlet); + + scriptTags.forEach((script: HTMLScriptElement) => { + newContentlet.appendChild(script); + }); + + return newContentlet; + } + + private buttonClickHandler(target: HTMLElement, type: string) { + this.updateContentletInode = this.shouldUpdateContentletInode(target); + + const container = target.closest('[data-dot-object="container"]'); + this.iframeActions$.next({ + name: type, + dataset: target.dataset, + container: container ? container.dataset : null + }); + } + + private closeContainersToolBarMenu(activeElement?: Node): void { + const doc = this.getEditPageDocument(); + const activeToolBarMenus = Array.from(doc.querySelectorAll('.dotedit-menu__list.active')); + activeToolBarMenus.forEach((toolbar: HTMLElement) => { + if (activeElement !== toolbar) { + toolbar.classList.remove('active'); + } + }); + } + + private createEmptyContentletElement(dotPageContent: DotPageContent): HTMLElement { + const doc = this.getEditPageDocument(); + + const dotEditContentletEl: HTMLElement = doc.createElement('div'); + dotEditContentletEl.setAttribute('data-dot-object', 'contentlet'); + + for (const attr in dotPageContent) { + // eslint-disable-next-line no-prototype-builtins + if (dotPageContent.hasOwnProperty(attr)) { + dotEditContentletEl.setAttribute(`data-dot-${attr}`, dotPageContent[attr]); + } + } + + return dotEditContentletEl; + } + + private getEditPageIframe(): HTMLIFrameElement { + return this.iframe.nativeElement; + } + + private getEditPageDocument(): Document { + return ( + this.getEditPageIframe().contentDocument || + this.getEditPageIframe().contentWindow.document + ); + } + + private handleTinyMCEOnFocusEvent(contentlet: DotInlineEditContent) { + this.inlineCurrentContent = { + ...this.inlineCurrentContent, + [contentlet.element.id]: contentlet.innerHTML + }; + } + + private handleTinyMCEOnBlurEvent(content: DotInlineEditContent) { + // If editor is dirty then we continue making the request + if (!content.isNotDirty) { + // Add the loading indicator to the field + content.element.classList.add('inline-editing--saving'); + + // All good, initiate the request + this.dotWorkflowActionsFireService + .saveContentlet({ + [content.dataset.fieldName]: content.innerHTML, + inode: content.dataset.inode + }) + .pipe(take(1)) + .subscribe( + () => { + // onSuccess + content.element.classList.remove('inline-editing--saving'); + delete this.inlineCurrentContent[content.element.id]; + this.dotGlobalMessageService.success( + this.dotMessageService.get('dot.common.message.saved') + ); + }, + (e: HttpErrorResponse) => { + // onError + content.element.innerHTML = this.inlineCurrentContent[content.element.id]; + const message = + e.error.errors[0].message || + this.dotMessageService.get('editpage.inline.error'); + this.dotGlobalMessageService.error(message); + content.element.classList.remove('inline-editing--saving'); + delete this.inlineCurrentContent[content.element.id]; + } + ); + } else { + delete this.inlineCurrentContent[content.element.id]; + } + } + + private handlerContentletEvents( + event: string + ): (contentletEvent: DotPageContent | DotRelocatePayload) => void { + const contentletEventsMap = { + // When an user create or edit a contentlet from the jsp + save: (contentlet: DotPageContent) => { + if (this.currentAction === DotContentletAction.ADD) { + this.renderAddedContentlet(contentlet); + } else { + if (this.updateContentletInode) { + this.currentContentlet.inode = contentlet.inode; + } + // because: https://github.com/dotCMS/core/issues/21818 + setTimeout(() => { + this.renderEditedContentlet(this.currentContentlet); + }, 1800); + } + }, + inlineEdit: (contentlet: DotInlineEditContent) => { + if (contentlet.eventType === 'focus') { + this.handleTinyMCEOnFocusEvent(contentlet); + } + + if (contentlet.eventType === 'blur') { + this.handleTinyMCEOnBlurEvent(contentlet); + } + }, + // When a user select a content from the search jsp + select: (contentlet: DotPageContent) => { + this.renderAddedContentlet(contentlet); + this.iframeActions$.next({ + name: 'select' + }); + }, + // When a user drag and drop a contentlet in the iframe + relocate: (relocateInfo: DotRelocatePayload) => { + if (!this.remoteRendered) { + this.renderRelocatedContentlet(relocateInfo); + } + }, + 'deleted-contenlet': () => { + this.removeCurrentContentlet(); + }, + 'add-uploaded-dotAsset': (dotAssetData: DotAssetPayload) => { + this.renderAddedContentlet(dotAssetData.contentlet, true); + }, + 'add-content': (data: DotAddContentTypePayload) => { + this.iframeActions$.next({ + name: 'add-content', + data: data + }); + }, + 'add-contentlet': (dotAssetData: DotAssetPayload) => { + this.renderAddedContentlet(dotAssetData.contentlet, true); + }, + 'add-form': (formId: string) => { + this.renderAddedForm(formId, true) + .pipe(take(1)) + .subscribe((model: DotPageContainer[]) => { + if (model) { + this.pageModel$.next({ + model: model, + type: PageModelChangeEventType.ADD_CONTENT + }); + this.iframeActions$.next({ + name: 'save' + }); + } + }); + }, + 'handle-http-error': (err: HttpErrorResponse) => { + this.dotHttpErrorManagerService.handle(err).pipe(take(1)).subscribe(); + } + }; + + return contentletEventsMap[event]; + } + + private shouldUpdateContentletInode(target: HTMLElement) { + return target.dataset.dotObject === 'edit-content' && target.tagName === 'BUTTON'; + } + + private updateHtml(pageState: DotPageRenderState): string { + const fakeHtml = document.createElement('html'); + fakeHtml.innerHTML = pageState.html; + + const head = fakeHtml.querySelector('head'); + + if (fakeHtml.querySelector('base')) { + return pageState.html; + } else { + const base = this.getBaseTag(pageState.page.pageURI); + head.appendChild(base); + } + + return fakeHtml.innerHTML; + } + + private getBaseTag(url: string): HTMLBaseElement { + const base = document.createElement('base'); + const href = url.split('/'); + href.pop(); + + base.href = href.join('/') + '/'; + + return base; + } + + private loadCodeIntoIframe(pageState: DotPageRenderState): void { + const doc = this.getEditPageDocument(); + const html = this.updateHtml(pageState); + + doc.open(); + doc.write(html); + doc.close(); + } + + private setEditContentletStyles(): void { + const timeStampId = `iframeId_${Math.floor(Date.now() / 100).toString()}`; + const style = this.dotDOMHtmlUtilService.createStyleElement( + getEditPageCss(`#${timeStampId}`) + ); + + const doc = this.getEditPageDocument(); + doc.documentElement.id = timeStampId; + doc.head.appendChild(style); + } + + private setEditMode(): void { + this.setEditContentletStyles(); + this.addContentToolBars(); + this.injectInlineEditingScripts(); + this.dotDragDropAPIHtmlService.initDragAndDropContext(this.getEditPageIframe()); + } + + private removeCurrentContentlet(): void { + const doc = this.getEditPageDocument(); + const contentlets = doc.querySelectorAll( + `[data-dot-object="contentlet"][data-dot-inode="${this.currentContentlet.inode}"]` + ); + + contentlets.forEach((contentlet) => { + contentlet.remove(); + }); + } + + private renderRelocatedContentlet(relocateInfo: DotRelocatePayload): void { + const doc = this.getEditPageDocument(); + const contenletEl: HTMLElement = doc.querySelector( + `[data-dot-object="contentlet"][data-dot-inode="${relocateInfo.contentlet.inode}"]` + ); + contenletEl.insertAdjacentElement('afterbegin', this.getLoadingIndicator()); + + const container: HTMLElement = contenletEl.parentNode; + + relocateInfo.container = relocateInfo.container || { + identifier: container.dataset.dotIdentifier, + uuid: container.dataset.dotUuid + }; + + this.dotContainerContentletService + .getContentletToContainer( + relocateInfo.container, + relocateInfo.contentlet, + this.currentPage + ) + .subscribe((contentletHtml: string) => { + const newContentletEl: HTMLElement = this.generateNewContentlet(contentletHtml); + container.replaceChild(newContentletEl, contenletEl); + }); + } + + private getLoadingIndicator(): HTMLElement { + const div = document.createElement('div'); + div.innerHTML = ` +
+
+
+ `; + + return div.children[0]; + } +} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/dot-edit-content-html/models/dot-contentlets-events.model.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/dot-edit-content-html/models/dot-contentlets-events.model.ts new file mode 100644 index 000000000000..691c7081c00a --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/dot-edit-content-html/models/dot-contentlets-events.model.ts @@ -0,0 +1,69 @@ +import { DotPageContent } from '@portlets/dot-edit-page/shared/models/dot-page-content.model'; +import { DotPageContainer } from '@models/dot-page-container/dot-page-container.model'; +import { DotCMSContentType } from '@dotcms/dotcms-models'; + +export interface DotContentletEvent> { + name: string; + data?: T; +} + +export type DotContentletEventDragAndDropDotAsset = DotContentletEvent; +export type DotContentletEventAddContentType = DotContentletEvent; +export type DotContentletEventRelocate = DotContentletEvent; +export type DotContentletEventSelect = DotContentletEvent; +export type DotContentletEventSave = DotContentletEvent; +export type DotContentletEventContent = DotContentletEvent; + +export interface DotAssetPayload { + contentlet: DotPageContent; + placeholderId: string; +} + +export interface DotRelocatePayload { + container: DotPageContainer; + contentlet: DotPageContent; +} + +export interface DotInlineDataset { + mode: string; + inode: string; + fieldName: string; + language: string; +} + +export interface DotInlineEditContent { + innerHTML: string; + dataset: DotInlineDataset; + element: HTMLElement; + isNotDirty: boolean; + eventType: string; +} + +export interface DotContentletContainer { + dotObject: string; + dotInode: string; + dotIdentifier: string; + dotUuid: string; + maxContentlets: string; + dotAcceptTypes: string; + dotCanAdd: string; +} + +export interface DotContentletDataset { + dotObject: string; + dotAction?: string; + dotAdd?: string; + dotIdentifier: string; + dotUuid?: string; + dotInode?: string; +} + +export interface DotAddContentTypePayload { + container: DotContentletContainer | null; + contentType: DotCMSContentType; +} + +export interface DotContentletPayload { + container: DotContentletContainer; + dataset: DotContentletDataset; +} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/dot-edit-content-html/models/index.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/dot-edit-content-html/models/index.ts new file mode 100644 index 000000000000..64e0866fc8bd --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/dot-edit-content-html/models/index.ts @@ -0,0 +1,2 @@ +export * from './page-model-change-event'; +export * from './page-model-change-event.type'; diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/dot-edit-content-html/models/page-model-change-event.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/dot-edit-content-html/models/page-model-change-event.ts new file mode 100644 index 000000000000..3f47186e001d --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/dot-edit-content-html/models/page-model-change-event.ts @@ -0,0 +1,7 @@ +import { DotPageContainer } from '@models/dot-page-container/dot-page-container.model'; +import { PageModelChangeEventType } from './page-model-change-event.type'; + +export interface PageModelChangeEvent { + model: DotPageContainer[]; + type: PageModelChangeEventType; +} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/dot-edit-content-html/models/page-model-change-event.type.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/dot-edit-content-html/models/page-model-change-event.type.ts new file mode 100644 index 000000000000..d5bf95cf5746 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/dot-edit-content-html/models/page-model-change-event.type.ts @@ -0,0 +1,6 @@ +export enum PageModelChangeEventType { + REMOVE_CONTENT = 'REMOVE_CONTENT', + ADD_CONTENT = 'ADD_CONTENT', + EDIT_CONTENT = 'EDIT_CONTENT', + MOVE_CONTENT = 'MOVE_CONTENT' +} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/dot-page-state/dot-page-state.service.spec.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/dot-page-state/dot-page-state.service.spec.ts new file mode 100644 index 000000000000..a92eded4596a --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/dot-page-state/dot-page-state.service.spec.ts @@ -0,0 +1,466 @@ +import { of, throwError } from 'rxjs'; +import { LoginService, CoreWebService, HttpCode } from '@dotcms/dotcms-js'; +import { DotContentletLockerService } from '@services/dot-contentlet-locker/dot-contentlet-locker.service'; +import { DotPageStateService } from './dot-page-state.service'; +import { DotPageRenderService } from '@services/dot-page-render/dot-page-render.service'; +import { DotPageMode } from '@models/dot-page/dot-page-mode.enum'; +import { DotPageRenderState } from '@portlets/dot-edit-page/shared/models/dot-rendered-page-state.model'; +import { LoginServiceMock } from '@tests/login-service.mock'; +import { mockDotRenderedPage } from '@tests/dot-page-render.mock'; +import { dotcmsContentletMock } from '@tests/dotcms-contentlet.mock'; +import { mockUser } from '@tests/login-service.mock'; +import { DotPersona } from '@shared/models/dot-persona/dot-persona.model'; +import { DotHttpErrorManagerService } from '@services/dot-http-error-manager/dot-http-error-manager.service'; +import { getTestBed, TestBed } from '@angular/core/testing'; +import { DotRouterService } from '@services/dot-router/dot-router.service'; +import { HttpClientTestingModule } from '@angular/common/http/testing'; +import { CoreWebServiceMock } from '@tests/core-web.service.mock'; +import { DotAlertConfirmService } from '@services/dot-alert-confirm'; +import { ConfirmationService } from 'primeng/api'; +import { DotFormatDateService } from '@services/dot-format-date-service'; +import { MockDotRouterService } from '@tests/dot-router-service.mock'; +import { DotDevice } from '@shared/models/dot-device/dot-device.model'; +import { mockResponseView } from '@tests/response-view.mock'; +import { PageModelChangeEventType } from '../dot-edit-content-html/models'; +import { mockDotPersona } from '@tests/dot-persona.mock'; + +const getDotPageRenderStateMock = () => { + return new DotPageRenderState(mockUser(), mockDotRenderedPage()); +}; + +describe('DotPageStateService', () => { + let dotContentletLockerService: DotContentletLockerService; + let dotHttpErrorManagerService: DotHttpErrorManagerService; + let dotHttpErrorManagerServiceHandle: jasmine.Spy; + let dotPageRenderService: DotPageRenderService; + let dotPageRenderServiceGetSpy: jasmine.Spy; + let dotRouterService: DotRouterService; + let loginService: LoginService; + let injector: TestBed; + let service: DotPageStateService; + + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [HttpClientTestingModule], + providers: [ + DotContentletLockerService, + DotHttpErrorManagerService, + DotPageRenderService, + DotPageStateService, + DotAlertConfirmService, + ConfirmationService, + DotFormatDateService, + { provide: CoreWebService, useClass: CoreWebServiceMock }, + { provide: DotRouterService, useClass: MockDotRouterService }, + { + provide: LoginService, + useClass: LoginServiceMock + } + ] + }); + + injector = getTestBed(); + service = injector.get(DotPageStateService); + dotContentletLockerService = injector.get(DotContentletLockerService); + dotHttpErrorManagerService = injector.get(DotHttpErrorManagerService); + dotPageRenderService = injector.get(DotPageRenderService); + dotRouterService = injector.get(DotRouterService); + loginService = injector.get(LoginService); + + dotPageRenderServiceGetSpy = spyOn(dotPageRenderService, 'get').and.returnValue( + of(mockDotRenderedPage()) + ); + + dotHttpErrorManagerServiceHandle = spyOn( + dotHttpErrorManagerService, + 'handle' + ).and.callThrough(); + + service = injector.get(DotPageStateService); + + spyOnProperty(dotRouterService, 'queryParams', 'get').and.returnValue({ + url: '/an/url/test/form/query/params' + }); + }); + + describe('Method: get', () => { + it('should get with url', () => { + service.get({ + url: 'some/url/test' + }); + + expect(dotPageRenderServiceGetSpy.calls.mostRecent().args).toEqual([ + { + url: 'some/url/test' + }, + {} + ]); + }); + + it('should get with url from queryParams', () => { + service.get(); + + expect(dotPageRenderServiceGetSpy.calls.mostRecent().args).toEqual([ + { + url: '/an/url/test/form/query/params' + }, + {} + ]); + }); + }); + + describe('$state', () => { + it('should get state', () => { + const mock = getDotPageRenderStateMock(); + service.state$.subscribe((state: DotPageRenderState) => { + expect(state).toEqual(mock); + }); + service.get({ + url: 'some/url/test' + }); + }); + + it('should reload', () => { + service.get({ + url: '/an/url/test/form/query/params' + }); + service.reload(); + expect(dotPageRenderServiceGetSpy.calls.mostRecent().args).toEqual([ + { + mode: 'PREVIEW_MODE', + url: '/an/url/test/form/query/params' + }, + {} + ]); + }); + }); + + describe('setters', () => { + beforeEach(() => { + service.get({ + url: 'some/url/test' + }); + }); + + describe('setLock', () => { + it('should lock', () => { + spyOn(dotContentletLockerService, 'lock').and.returnValue( + of({ + id: '', + inode: '', + message: 'locked' + }) + ); + service.setLock( + { + mode: DotPageMode.LIVE + }, + true + ); + + expect(dotContentletLockerService.lock).toHaveBeenCalledWith('2'); + expect(dotPageRenderServiceGetSpy.calls.mostRecent().args).toEqual([ + { + mode: 'ADMIN_MODE', + url: '/an/url/test/form/query/params' + }, + {} + ]); + }); + + it('should unlock', () => { + spyOn(dotContentletLockerService, 'unlock').and.returnValue( + of({ + id: '', + inode: '', + message: 'unlocked' + }) + ); + service.setLock( + { + mode: DotPageMode.PREVIEW + }, + false + ); + + expect(dotContentletLockerService.unlock).toHaveBeenCalledWith('2'); + expect(dotPageRenderServiceGetSpy.calls.mostRecent().args).toEqual([ + { + mode: 'PREVIEW_MODE', + url: '/an/url/test/form/query/params' + }, + {} + ]); + }); + }); + + describe('setDevice', () => { + it('should set iPad', () => { + const device: DotDevice = { + inode: '', + name: 'iPad', + cssHeight: '', + cssWidth: '' + }; + service.setDevice(device); + + expect(dotPageRenderServiceGetSpy.calls.mostRecent().args).toEqual( + [ + { + viewAs: { + device: device + }, + url: '/an/url/test/form/query/params' + }, + {} + ], + {} + ); + }); + }); + + describe('setLanguage', () => { + it('should set laguage 1', () => { + service.setLanguage(1); + expect(dotRouterService.replaceQueryParams).toHaveBeenCalledWith({ + language_id: 1 + }); + }); + }); + + describe('setPersona', () => { + it('should set persona', () => { + const persona: DotPersona = { + ...dotcmsContentletMock, + keyTag: 'persona', + name: 'persona', + personalized: false + }; + service.setPersona(persona); + + expect(dotPageRenderServiceGetSpy.calls.mostRecent().args).toEqual([ + { + viewAs: { + persona: persona + }, + url: '/an/url/test/form/query/params' + }, + {} + ]); + }); + }); + }); + + describe('errors', () => { + it('should show error 300 message and redirect to site browser', () => { + const error300 = mockResponseView(300); + dotPageRenderServiceGetSpy.and.returnValue(throwError(error300)); + dotHttpErrorManagerServiceHandle.and.returnValue( + of({ + redirected: false, + status: HttpCode.FORBIDDEN + }) + ); + + service + .requestPage({ + url: 'hello/world' + }) + .subscribe(); + + expect(dotHttpErrorManagerService.handle).toHaveBeenCalledWith(error300); + expect(dotRouterService.goToSiteBrowser).toHaveBeenCalledTimes(1); + }); + + it('should show error 404 message and redirect to site browser', () => { + const error404 = mockResponseView(400); + dotPageRenderServiceGetSpy.and.returnValue(throwError(error404)); + dotHttpErrorManagerServiceHandle.and.returnValue( + of({ + redirected: false, + status: HttpCode.NOT_FOUND + }) + ); + + service + .requestPage({ + url: 'hello/world' + }) + .subscribe(); + + expect(dotHttpErrorManagerService.handle).toHaveBeenCalledWith(error404); + expect(dotRouterService.goToSiteBrowser).toHaveBeenCalledTimes(1); + }); + + it('should show error 500 and reload', () => { + spyOn(service, 'reload'); + const error500 = mockResponseView(500); + dotPageRenderServiceGetSpy.and.returnValue(throwError(error500)); + dotHttpErrorManagerServiceHandle.and.returnValue( + of({ + redirected: false, + status: HttpCode.SERVER_ERROR + }) + ); + + service + .requestPage({ + url: 'hello/world' + }) + .subscribe(); + + expect(service.reload).toHaveBeenCalledTimes(1); + expect(dotRouterService.goToSiteBrowser).not.toHaveBeenCalled(); + }); + }); + + describe('internal navigation state', () => { + it('should return content from setted internal state', () => { + const renderedPage = getDotPageRenderStateMock(); + service.setInternalNavigationState(renderedPage); + + expect(service.getInternalNavigationState()).toEqual(renderedPage); + expect(dotPageRenderServiceGetSpy).not.toHaveBeenCalled(); + }); + + it('should return null when internal state is not set', () => { + expect(service.getInternalNavigationState()).toEqual(null); + expect(dotPageRenderServiceGetSpy).not.toHaveBeenCalled(); + }); + }); + + describe('setting local state', () => { + it('should set local state and emit', () => { + const renderedPage = getDotPageRenderStateMock(); + + service.state$.subscribe((state: DotPageRenderState) => { + expect(state).toEqual(renderedPage); + }); + + service.setLocalState(renderedPage); + }); + }); + + describe('login as user', () => { + beforeEach(() => { + spyOnProperty(loginService, 'auth', 'get').and.returnValue({ + loginAsUser: { + userId: 'login-as-user' + }, + user: { + userId: '123' + } + }); + }); + + it('should set lockedByAnotherUser', () => { + service.state$.subscribe(({ state }: DotPageRenderState) => { + expect(state.lockedByAnotherUser).toBe(true); + expect(state.locked).toBe(true); + }); + + service.get({ + url: '/test/123' + }); + }); + }); + + describe('content added/removed', () => { + describe('selected persona is not default', () => { + it('should trigger haceContent as true', () => { + const renderedPage = getDotPageRenderStateMock(); + service.setLocalState(renderedPage); + + const subscribeCallback = jasmine.createSpy('spy'); + service.haveContent$.subscribe(subscribeCallback); + + expect(subscribeCallback).toHaveBeenCalledWith(true); + + service.updatePageStateHaveContent({ + type: PageModelChangeEventType.REMOVE_CONTENT, + model: [] + }); + + expect(subscribeCallback).toHaveBeenCalledWith(false); + expect(subscribeCallback).toHaveBeenCalledTimes(2); + }); + + it('should trigger haceContent as false', () => { + const renderedPage = new DotPageRenderState(mockUser(), { + ...mockDotRenderedPage(), + ...{ + numberContents: 0 + } + }); + service.setLocalState(renderedPage); + + const subscribeCallback = jasmine.createSpy('spy'); + service.haveContent$.subscribe(subscribeCallback); + + expect(subscribeCallback).toHaveBeenCalledWith(false); + + service.updatePageStateHaveContent({ + type: PageModelChangeEventType.ADD_CONTENT, + model: [] + }); + + expect(subscribeCallback).toHaveBeenCalledWith(true); + expect(subscribeCallback).toHaveBeenCalledTimes(2); + }); + }); + + describe('selected persona is not default', () => { + it('should trigger haveContent as false', () => { + const renderedPage = new DotPageRenderState(mockUser(), { + ...mockDotRenderedPage(), + ...{ + viewAs: { + ...mockDotRenderedPage().viewAs, + persona: mockDotPersona + } + } + }); + service.setLocalState(renderedPage); + + const subscribeCallback = jasmine.createSpy('spy'); + service.haveContent$.subscribe(subscribeCallback); + + expect(subscribeCallback).toHaveBeenCalledWith(false); + + service.updatePageStateHaveContent({ + type: PageModelChangeEventType.REMOVE_CONTENT, + model: [] + }); + + expect(subscribeCallback).toHaveBeenCalledTimes(1); + }); + + it('should trigger haceContent as true', () => { + const renderedPage = new DotPageRenderState(mockUser(), { + ...mockDotRenderedPage(), + ...{ + viewAs: { + ...mockDotRenderedPage().viewAs, + persona: mockDotPersona + } + }, + ...{ + numberContents: 0 + } + }); + service.setLocalState(renderedPage); + + const subscribeCallback = jasmine.createSpy('spy'); + service.haveContent$.subscribe(subscribeCallback); + + expect(subscribeCallback).toHaveBeenCalledWith(false); + + service.updatePageStateHaveContent({ + type: PageModelChangeEventType.ADD_CONTENT, + model: [] + }); + expect(subscribeCallback).toHaveBeenCalledTimes(1); + }); + }); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/dot-page-state/dot-page-state.service.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/dot-page-state/dot-page-state.service.ts new file mode 100644 index 000000000000..a7e3fc240ecc --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/dot-page-state/dot-page-state.service.ts @@ -0,0 +1,258 @@ +import { of, Observable, Subject, BehaviorSubject } from 'rxjs'; + +import { pluck, take, map, catchError, tap } from 'rxjs/operators'; +import { LoginService, User, HttpCode } from '@dotcms/dotcms-js'; +import { DotPageRenderState } from '../../../shared/models/dot-rendered-page-state.model'; +import { + DotPageRenderService, + DotPageRenderOptions +} from '@services/dot-page-render/dot-page-render.service'; +import { Injectable } from '@angular/core'; +import { DotContentletLockerService } from '@services/dot-contentlet-locker/dot-contentlet-locker.service'; +import { DotPersona } from '@shared/models/dot-persona/dot-persona.model'; +import { DotDevice } from '@shared/models/dot-device/dot-device.model'; +import { + DotHttpErrorManagerService, + DotHttpErrorHandled +} from '@services/dot-http-error-manager/dot-http-error-manager.service'; +import { DotRouterService } from '@services/dot-router/dot-router.service'; +import { PageModelChangeEvent, PageModelChangeEventType } from '../dot-edit-content-html/models'; +import { HttpErrorResponse } from '@angular/common/http'; +import { DotPageRenderParameters } from '@models/dot-page/dot-rendered-page.model'; + +@Injectable() +export class DotPageStateService { + state$: Subject = new Subject(); + haveContent$ = new BehaviorSubject(false); + private currentState: DotPageRenderState; + + private isInternalNavigation = false; + + constructor( + private dotContentletLockerService: DotContentletLockerService, + private dotHttpErrorManagerService: DotHttpErrorManagerService, + private dotPageRenderService: DotPageRenderService, + private dotRouterService: DotRouterService, + private loginService: LoginService + ) {} + + /** + * Get the page state with the options passed + * + * @param {DotPageRenderOptions} [options={}] + * @memberof DotPageStateService + */ + get(options: DotPageRenderOptions = {}): void { + if (!options.url) { + options.url = this.dotRouterService.queryParams.url; + } + + this.requestPage(options).subscribe((pageState: DotPageRenderState) => { + this.setState(pageState); + }); + } + + /** + * Get the current state if it was set from internal navigation + * + * @returns {DotPageRenderState} + * @memberof DotPageStateService + */ + getInternalNavigationState(): DotPageRenderState { + if (this.isInternalNavigation) { + this.isInternalNavigation = false; + return this.currentState; + } + + return null; + } + + /** + * Reload the current page state + * + * @memberof DotPageStateService + */ + reload(): void { + this.get({ + mode: this.currentState.state.mode + }); + } + + /** + * Set the page state of view as to received device + * + * @param {DotDevice} device + * @memberof DotPageStateService + */ + setDevice(device: DotDevice): void { + this.get({ + viewAs: { + device + } + }); + } + + /** + * Set the page state from internal navigation + * + * @param {DotPageRenderState} state + * @memberof DotPageStateService + */ + setInternalNavigationState(state: DotPageRenderState): void { + this.setCurrentState(state); + this.isInternalNavigation = true; + } + + /** + * Lock or unlock the page and set a new state + * + * @param {DotPageRenderOptions} options + * @param {boolean} [lock=null] + * @memberof DotPageStateService + */ + setLock(options: DotPageRenderOptions, lock: boolean = null): void { + this.getLockMode(this.currentState.page.inode, lock) + .pipe( + take(1), + catchError(() => of(null)) + ) + .subscribe(() => { + this.get(options); + }); + } + + /** + * Set the page state of view as to received language + * + * @param {number} language + * @memberof DotPageStateService + */ + setLanguage(language: number): void { + this.dotRouterService.replaceQueryParams({ language_id: language }); + } + + /** + * Overwrite the local state and emit it + * + * @param {DotPageRenderState} state + * @memberof DotPageStateService + */ + setLocalState(state: DotPageRenderState): void { + this.setCurrentState(state); + this.state$.next(state); + } + + /** + * Set the page state of view as to received persona and update the mode and lock state if + * persona is not personalized. + * + * @param {DotPersona} persona + * @memberof DotPageStateService + */ + setPersona(persona: DotPersona): void { + this.get({ + viewAs: { + persona + } + }); + } + + /** + * Update page content status + * + * @param {PageModelChangeEvent} event + * @memberof DotPageStateService + */ + updatePageStateHaveContent(event: PageModelChangeEvent) { + if (event.type === PageModelChangeEventType.ADD_CONTENT) { + this.contentAdded(); + } else if (event.type === PageModelChangeEventType.REMOVE_CONTENT) { + this.contentRemoved(); + } + } + + /** + * Get the page from API, set local state and return DotPageRenderState + * + * @param {DotPageRenderOptions} options + * @returns {Observable} + * @memberof DotPageStateService + */ + requestPage(options: DotPageRenderOptions): Observable { + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const { url, ...extraParams } = this.dotRouterService.queryParams; + return this.dotPageRenderService.get(options, extraParams).pipe( + catchError((err) => this.handleSetPageStateFailed(err)), + take(1), + map((page: DotPageRenderParameters) => { + if (page) { + const pageState = new DotPageRenderState(this.getCurrentUser(), page); + this.setCurrentState(pageState); + return pageState; + } + + return this.currentState; + }) + ); + } + + private contentAdded(): void { + this.currentState.numberContents++; + + if (this.currentState.numberContents === 1 && !this.selectedIsDefaultPersona()) { + this.haveContent$.next(true); + } + } + + private contentRemoved(): void { + this.currentState.numberContents--; + + if (this.currentState.numberContents === 0 && !this.selectedIsDefaultPersona()) { + this.haveContent$.next(false); + } + } + + private setCurrentState(newState: DotPageRenderState): void { + this.currentState = newState; + + if (!this.selectedIsDefaultPersona()) { + this.haveContent$.next(this.currentState.numberContents > 0); + } + } + + private selectedIsDefaultPersona(): boolean { + return !!this.currentState.viewAs.persona; + } + + private getCurrentUser(): User { + return this.loginService.auth.loginAsUser || this.loginService.auth.user; + } + + private getLockMode(workingInode: string, lock: boolean): Observable { + if (lock === true) { + return this.dotContentletLockerService.lock(workingInode).pipe(pluck('message')); + } else if (lock === false) { + return this.dotContentletLockerService.unlock(workingInode).pipe(pluck('message')); + } + + return of(null); + } + + private handleSetPageStateFailed(err: HttpErrorResponse): Observable { + return this.dotHttpErrorManagerService.handle(err).pipe( + take(1), + tap(({ status }: DotHttpErrorHandled) => { + if (status === HttpCode.FORBIDDEN || status === HttpCode.NOT_FOUND) { + this.dotRouterService.goToSiteBrowser(); + } else { + this.reload(); + } + }), + map(() => null) + ); + } + + private setState(state: DotPageRenderState): void { + this.state$.next(state); + } +} diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/html/dot-dom-html-util.service.spec.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/html/dot-dom-html-util.service.spec.ts new file mode 100644 index 000000000000..2805d5481ca9 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/html/dot-dom-html-util.service.spec.ts @@ -0,0 +1,78 @@ +import { DotDOMHtmlUtilService } from './dot-dom-html-util.service'; +import { TestBed, waitForAsync } from '@angular/core/testing'; + +describe('DotDOMHtmlUtilService', () => { + let service: DotDOMHtmlUtilService; + + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + providers: [DotDOMHtmlUtilService] + }); + + service = TestBed.get(DotDOMHtmlUtilService); + }) + ); + + it('should create a link element', () => { + const href = 'https://testing/test.css'; + + const cssElementCreated = service.createLinkElement(href); + + expect(cssElementCreated.rel).toEqual('stylesheet'); + expect(cssElementCreated.type).toEqual('text/css'); + expect(cssElementCreated.media).toEqual('all'); + expect(cssElementCreated.href).toEqual(href); + }); + + it('should create an style element', () => { + const styleElementCreated = service.createStyleElement('h1 {color: red}'); + expect(styleElementCreated.innerHTML).toEqual('h1 {color: red}'); + }); + + it('should create a external script', () => { + const src = 'https://testing/test.js'; + const onloadCallbackFunc = () => { + // + }; + + const scriptElementCreated = service.creatExternalScriptElement(src, onloadCallbackFunc); + + expect(scriptElementCreated.src).toEqual(src); + expect(scriptElementCreated.onload).toEqual(onloadCallbackFunc); + }); + + it('should create a inline script', () => { + const text = 'var a = 2;'; + + const scriptElementCreated = service.createInlineScriptElement(text); + + expect(scriptElementCreated.text).toEqual(text); + }); + + it('should get a button html code', () => { + const label = 'ButtonLabel'; + const className = 'ButtonClass'; + const dataset = { + a: 'a value', + b: 'b value' + }; + const buttonHTML = service.getButtomHTML(label, className, dataset); + + const divElement = document.createElement('div'); + divElement.innerHTML = buttonHTML; + const button = divElement.querySelector('button'); + + expect(button.getAttribute('class')).toEqual('ButtonClass', 'button class is wrong'); + expect(button.getAttribute('type')).toEqual('button', 'button type is wrong'); + expect(button.getAttribute('role')).toEqual('button', 'button role is wrong'); + expect(button.getAttribute('aria-label')).toEqual( + 'ButtonLabel', + 'button aria-label is wrong' + ); + expect(button.dataset['a']).toEqual('a value', 'button datset[a] is wrong'); + expect(button.dataset['b']).toEqual('b value', 'button datset[a] is wrong'); + + expect(button.disabled).toBeFalsy(); + }); +}); diff --git a/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/html/dot-dom-html-util.service.ts b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/html/dot-dom-html-util.service.ts new file mode 100644 index 000000000000..979d6d6f69a4 --- /dev/null +++ b/ui/apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/html/dot-dom-html-util.service.ts @@ -0,0 +1,99 @@ +import { Injectable } from '@angular/core'; + +const JS_MIME_TYPE = 'text/javascript'; +const CSS_MIME_TYPE = 'text/css'; + +/** + * Util service to create html elements to inject into our edit mode + * + * @export + * @class DotDOMHtmlUtilService + */ +@Injectable() +export class DotDOMHtmlUtilService { + createLinkElement(href: string): HTMLLinkElement { + const cssElement = document.createElement('link'); + cssElement.rel = 'stylesheet'; + cssElement.type = CSS_MIME_TYPE; + cssElement.media = 'all'; + cssElement.href = href; + + return cssElement; + } + + /** + * Create a + + + + + + + +
+ +
+
+ + diff --git a/ui/apps/dotcms-ui/src/main.ts b/ui/apps/dotcms-ui/src/main.ts new file mode 100644 index 000000000000..16f600c217fe --- /dev/null +++ b/ui/apps/dotcms-ui/src/main.ts @@ -0,0 +1,13 @@ +import { enableProdMode } from '@angular/core'; +import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; + +import { AppModule } from '@dotcms/app/app.module'; +import { environment } from './environments/environment'; +import { defineCustomElements } from '@dotcms/dotcms-webcomponents/loader'; + +if (environment.production) { + enableProdMode(); +} + +platformBrowserDynamic().bootstrapModule(AppModule); +defineCustomElements(); diff --git a/ui/apps/dotcms-ui/src/polyfills.ts b/ui/apps/dotcms-ui/src/polyfills.ts new file mode 100644 index 000000000000..c0a6da2441cb --- /dev/null +++ b/ui/apps/dotcms-ui/src/polyfills.ts @@ -0,0 +1,54 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +/** + * This file includes polyfills needed by Angular and is loaded before the app. + * You can add your own extra polyfills to this file. + * + * This file is divided into 2 sections: + * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. + * 2. Application imports. Files imported after ZoneJS that should be loaded before your main + * file. + * + * The current setup is for so-called "evergreen" browsers; the last versions of browsers that + * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), + * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. + * + * Learn more in https://angular.io/guide/browser-support + */ + +/*************************************************************************************************** + * BROWSER POLYFILLS + */ + +/** + * By default, zone.js will patch all possible macroTask and DomEvents + * user can disable parts of macroTask/DomEvents patch by setting following flags + * because those flags need to be set before `zone.js` being loaded, and webpack + * will put import in the top of bundle, so user need to create a separate file + * in this directory (for example: zone-flags.ts), and put the following flags + * into that file, and then add the following code before importing zone.js. + * import './zone-flags'; + * + * The flags allowed in zone-flags.ts are listed here. + * + * The following flags will work for all browsers. + * + * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame + * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick + * (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames + * + * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js + * with the following flag, it will bypass `zone.js` patch for IE/Edge + * + * (window as any).__Zone_enable_cross_context_check = true; + * + */ + +/*************************************************************************************************** + * Zone JS is required by default for Angular itself. + */ +import 'zone.js'; // Included with Angular CLI. + +/*************************************************************************************************** + * APPLICATION IMPORTS + */ +(window as any).global = window; diff --git a/ui/apps/dotcms-ui/src/stories/DesignTokens.stories.mdx b/ui/apps/dotcms-ui/src/stories/DesignTokens.stories.mdx new file mode 100644 index 000000000000..efe3c4cae881 --- /dev/null +++ b/ui/apps/dotcms-ui/src/stories/DesignTokens.stories.mdx @@ -0,0 +1,13 @@ +import { Meta } from '@storybook/addon-docs/blocks'; + + + +# Design Tokens + +We have defined a series of css variables for the very basic elements. + +## Colors + +## Typography + +## Spacing diff --git a/ui/apps/dotcms-ui/src/stories/Introduction.stories.mdx b/ui/apps/dotcms-ui/src/stories/Introduction.stories.mdx new file mode 100644 index 000000000000..d6239271eba5 --- /dev/null +++ b/ui/apps/dotcms-ui/src/stories/Introduction.stories.mdx @@ -0,0 +1,19 @@ +import { Meta } from '@storybook/addon-docs/blocks'; + + + +# DotCMS Components Library + +dotCMS have multiple libraries of components, we use a combination of Angular and Web Components. + +This is the main project and it contains the following libraries: + +- **dotcms-ui**: This storybook +- **dotcms-webcomponents**: [Link](https://dotcms.github.io/core-web/sb/dotcms-webcomponents) +- **dotcms-block-editor**: [Link](https://dotcms.github.io/core-web/sb/dotcms-block-editor) + + +## Documentation + +- **dotcms**: JavaScript Library to interact with dotCMS REST API. [Link](https://dotcms.github.io/core-web/docs/dotcms) +- **dotcms-models**: Types for dotCMS models. [Link](https://dotcms.github.io/core-web/docs/dotcms-models) diff --git a/ui/apps/dotcms-ui/src/stories/dotcms/form/DotCMSForms.stories.ts b/ui/apps/dotcms-ui/src/stories/dotcms/form/DotCMSForms.stories.ts new file mode 100644 index 000000000000..6f293781da84 --- /dev/null +++ b/ui/apps/dotcms-ui/src/stories/dotcms/form/DotCMSForms.stories.ts @@ -0,0 +1,344 @@ +import { Story, Meta } from '@storybook/angular/types-6-0'; +import { FormsModule } from '@angular/forms'; +import { InputTextModule } from 'primeng/inputtext'; +import { InputTextareaModule } from 'primeng/inputtextarea'; +import { ButtonModule } from 'primeng/button'; +import { CheckboxModule } from 'primeng/checkbox'; +import { DropdownModule } from 'primeng/dropdown'; +import { ChipsModule } from 'primeng/chips'; +import { RadioButtonModule } from 'primeng/radiobutton'; +import { RippleModule } from 'primeng/ripple'; +import { AutoCompleteModule } from 'primeng/autocomplete'; +import { moduleMetadata } from '@storybook/angular'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; +import { CalendarModule } from 'primeng/calendar'; +import { MultiSelectModule } from 'primeng/multiselect'; +import { SelectButtonModule } from 'primeng/selectbutton'; + +export default { + title: 'DotCMS/Forms ', + + parameters: { + docs: { + description: { + component: + 'Text, icon, buttons and other content can be grouped next to an input.: https://primefaces.org/primeng/showcase/#/inputgroup' + } + } + }, + decorators: [ + moduleMetadata({ + imports: [ + FormsModule, + InputTextModule, + ButtonModule, + CheckboxModule, + RadioButtonModule, + RippleModule, + BrowserAnimationsModule, + InputTextareaModule, + DropdownModule, + ChipsModule, + AutoCompleteModule, + CalendarModule, + MultiSelectModule, + SelectButtonModule + ] + }) + ], + args: { + options: [ + { label: 'Select Host', value: null }, + { label: 'demo.dotcms.com', value: { id: 1, name: 'demo.dotcms.com' } }, + { label: 'System Host', value: { id: 2, name: 'System Host' } } + ], + actions: [ + { label: 'System Workflow', value: null }, + { label: 'Save', value: { id: 1, name: 'Save' } }, + { label: 'Publish', value: { id: 2, name: 'Publish' } }, + { label: 'Delete', value: { id: 3, name: 'Delete' } } + ], + values: ['hiking'], + results: [ + { name: 'Blogs', id: 1 }, + { name: 'System Workflow', id: 2 } + ], + cities: [ + { name: 'New York', code: 'NY' }, + { name: 'Rome', code: 'RM' }, + { name: 'London', code: 'LDN' }, + { name: 'Istanbul', code: 'IST' }, + { name: 'Paris', code: 'PRS' } + ], + selectedCities: [{ name: 'Paris', code: 'PRS' }], + paymentOptions: [ + { name: 'Option 1', value: 1 }, + { name: 'Option 2', value: 2 }, + { name: 'Option 3', value: 3 } + ], + search() { + this.results = [ + { name: 'Blogs', id: 1 }, + { name: 'System Workflow', id: 2 } + ]; + }, + width: '200' + } +} as Meta; + +const TextInputDefault = ` +
+ + + Enter the widget name. +
+
+ + + Slug must be unique. +
+`; + +const TextInputFloatingLabel = ` +
+ + + + +
+`; + +const InputTemplate = (input) => { + return ` +
+ ${input} +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ +
+ +
+ + +
+
+ + +
+
+ + +
+
+ +
+ + +
+
+ `; +}; + +export const Vertical: Story = (props) => { + return { + template: InputTemplate(TextInputDefault), + props + }; +}; + +Vertical.parameters = { + docs: { + source: { + code: InputTemplate(TextInputDefault) + } + } +}; + +const HorizontalTemplate = ` +

Inline

+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ +
+ + +

Grid

+
+
+ + +
+
+ + +
+
+ +

Small

+
+
+ + +
+
+ + +
+ +
+`; + +export const Horizontal: Story = (props) => { + return { + template: HorizontalTemplate, + props + }; +}; + +Horizontal.parameters = { + layout: 'centered', + docs: { + source: { + code: HorizontalTemplate + } + } +}; + +export const FloatingLabel: Story = (props) => { + return { + template: InputTemplate(TextInputFloatingLabel), + props + }; +}; + +FloatingLabel.parameters = { + template: {}, + docs: { + source: { + code: InputTemplate(TextInputFloatingLabel) + } + } +}; diff --git a/ui/apps/dotcms-ui/src/stories/primeng/button/Button.stories.ts b/ui/apps/dotcms-ui/src/stories/primeng/button/Button.stories.ts new file mode 100644 index 000000000000..d68e3464ba1f --- /dev/null +++ b/ui/apps/dotcms-ui/src/stories/primeng/button/Button.stories.ts @@ -0,0 +1,110 @@ +import { Meta, Story } from '@storybook/angular/types-6-0'; +import { moduleMetadata } from '@storybook/angular'; +import { ButtonModule } from 'primeng/button'; + +export default { + title: 'PrimeNG/Button/Button', + decorators: [ + moduleMetadata({ + imports: [ButtonModule] + }) + ], + parameters: { + layout: 'centered', + docs: { + description: { + component: + 'All the buttons, more information: https://primefaces.org/primeng/showcase/#/button' + } + } + } +} as Meta; + +const PrimaryTemplate = ` +

+

+

+

+
+

+

+`; + +const SecondaryTemplate = ` +

+

+

+

+
+

+

+`; + +const TextTemplate = ` +

+

+

+

+
+

+

+`; + +export const Primary: Story = () => { + return { + template: PrimaryTemplate + }; +}; + +Primary.parameters = { + docs: { + source: { + code: PrimaryTemplate + } + } +}; + +export const Secondary: Story = () => { + return { + template: SecondaryTemplate + }; +}; +Secondary.parameters = { + docs: { + source: { + code: SecondaryTemplate + } + } +}; + +const IconsTemplate = ` +

+

+

+`; +export const Icons: Story = () => { + return { + template: IconsTemplate + }; +}; +Icons.parameters = { + docs: { + source: { + code: IconsTemplate + } + } +}; + +export const Text: Story = () => { + return { + template: TextTemplate + }; +}; + +Text.parameters = { + docs: { + source: { + code: TextTemplate + } + } +}; diff --git a/ui/apps/dotcms-ui/src/stories/primeng/button/SplitButton.stories.ts b/ui/apps/dotcms-ui/src/stories/primeng/button/SplitButton.stories.ts new file mode 100644 index 000000000000..7f87d8d3d46b --- /dev/null +++ b/ui/apps/dotcms-ui/src/stories/primeng/button/SplitButton.stories.ts @@ -0,0 +1,102 @@ +// also exported from '@storybook/angular' if you can deal with breaking changes in 6.1 +import { Meta, Story } from '@storybook/angular/types-6-0'; +import { moduleMetadata } from '@storybook/angular'; +import { SplitButtonModule } from 'primeng/splitbutton'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; + +export default { + title: 'PrimeNG/Button/SplitButton', + decorators: [ + moduleMetadata({ + imports: [SplitButtonModule, BrowserAnimationsModule] + }) + ], + parameters: { + layout: 'centered', + docs: { + description: { + component: + 'SplitButton groups a set of commands in an overlay with a default command: https://primefaces.org/primeng/showcase/#/splitbutton' + } + } + }, + props: {} +} as Meta; + +const items = [ + { + label: 'Update', + icon: 'pi pi-refresh', + command: () => { + // + } + }, + { + label: 'Delete', + icon: 'pi pi-times', + command: () => { + // + } + }, + { + label: 'Angular.io', + icon: 'pi pi-info', + command: () => { + // + } + }, + { separator: true }, + { + label: 'Setup', + icon: 'pi pi-cog', + command: () => { + // + } + } +]; + +const PrimaryTemplate = ` +

+

+

+

+`; +export const Primary: Story = () => { + return { + template: PrimaryTemplate, + props: { + items + } + }; +}; + +Primary.parameters = { + docs: { + source: { + code: PrimaryTemplate + } + } +}; + +const SecondaryTemplate = ` +

+

+

+

+`; +export const Secondary: Story = () => { + return { + template: SecondaryTemplate, + props: { + items + } + }; +}; + +Secondary.parameters = { + docs: { + source: { + code: SecondaryTemplate + } + } +}; diff --git a/ui/apps/dotcms-ui/src/stories/primeng/data/Paginator.stories.ts b/ui/apps/dotcms-ui/src/stories/primeng/data/Paginator.stories.ts new file mode 100644 index 000000000000..942ba4bc161e --- /dev/null +++ b/ui/apps/dotcms-ui/src/stories/primeng/data/Paginator.stories.ts @@ -0,0 +1,37 @@ +// also exported from '@storybook/angular' if you can deal with breaking changes in 6.1 +import { Meta, Story } from '@storybook/angular/types-6-0'; +import { moduleMetadata } from '@storybook/angular'; +import { PaginatorModule } from 'primeng/paginator'; + +export default { + title: 'PrimeNG/Data/Paginator', + decorators: [ + moduleMetadata({ + imports: [PaginatorModule] + }) + ], + parameters: { + layout: 'centered', + docs: { + description: { + component: + 'Paginator is a generic component to display content in paged format.: https://primefaces.org/primeng/showcase/#/paginator' + } + } + } +} as Meta; + +const BasicTemplate = ``; +export const Basic: Story = () => { + return { + template: BasicTemplate + }; +}; + +Basic.parameters = { + docs: { + source: { + code: BasicTemplate + } + } +}; diff --git a/ui/apps/dotcms-ui/src/stories/primeng/data/Table.stories.ts b/ui/apps/dotcms-ui/src/stories/primeng/data/Table.stories.ts new file mode 100644 index 000000000000..7aed0ccc4456 --- /dev/null +++ b/ui/apps/dotcms-ui/src/stories/primeng/data/Table.stories.ts @@ -0,0 +1,213 @@ +// also exported from '@storybook/angular' if you can deal with breaking changes in 6.1 +import { Meta } from '@storybook/angular/types-6-0'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; +import { TableModule, Table } from 'primeng/table'; +import { InputTextModule } from 'primeng/inputtext'; +import { ButtonModule } from 'primeng/button'; +import { MenuModule } from 'primeng/menu'; +export default { + title: 'PrimeNG/Data/Table', + component: Table, + parameters: { + docs: { + description: { + component: 'A listing data table: https://primefaces.org/primeng/showcase/#/table' + } + } + } +} as Meta; + +const cars = [ + { + vin: '123', + year: '2020', + brand: 'Hyundai', + color: 'Red' + }, + { + vin: '456', + year: '2010', + brand: 'Kia', + color: 'Blue' + }, + { + vin: '789', + year: '2008', + brand: 'Ford', + color: 'Gray' + }, + { + vin: '987', + year: '2018', + brand: 'Fiat', + color: 'Green' + }, + { + vin: '213', + year: '2020', + brand: 'Hyundai', + color: 'Red' + }, + { + vin: '343', + year: '2010', + brand: 'Kia', + color: 'Blue' + }, + { + vin: '454', + year: '2008', + brand: 'Ford', + color: 'Gray' + }, + { + vin: '897', + year: '2018', + brand: 'Fiat', + color: 'Green' + }, + { + vin: '234', + year: '2020', + brand: 'Hyundai', + color: 'Red' + }, + { + vin: '892', + year: '2010', + brand: 'Kia', + color: 'Blue' + }, + { + vin: '092', + year: '2008', + brand: 'Ford', + color: 'Gray' + }, + { + vin: '567', + year: '2018', + brand: 'Fiat', + color: 'Green' + } +]; + +const PrimaryTemplate = ` + + +
+ List of Cars + + + + +
+
+ + + + + + Vin + Year + Brand + Color + Action + + + + + + {{car.vin}} + {{car.year}} + {{car.brand}} + {{car.color}} + + + + + + +
+`; +export const Primary = (_args: Table) => { + return { + props: { + cars, + selectedCars: [], + car: {}, + handleClick: (e) => { + console.log(e); + }, + items: [ + { + label: 'Update', + icon: 'pi pi-refresh', + command: () => { + console.log('update'); + } + }, + { + label: 'Delete', + icon: 'pi pi-times', + command: () => { + console.log('delete'); + } + }, + { + label: 'Angular.io', + icon: 'pi pi-info', + command: () => { + console.log('angular'); + } + }, + { separator: true }, + { + label: 'Setup', + icon: 'pi pi-cog', + command: () => { + console.log('setup'); + } + } + ] + }, + moduleMetadata: { + imports: [ + TableModule, + BrowserAnimationsModule, + ButtonModule, + MenuModule, + InputTextModule + ] + }, + template: PrimaryTemplate + }; +}; + +Primary.parameters = { + docs: { + source: { + code: PrimaryTemplate + }, + iframeHeight: 500 + } +}; diff --git a/ui/apps/dotcms-ui/src/stories/primeng/data/Tree.stories.ts b/ui/apps/dotcms-ui/src/stories/primeng/data/Tree.stories.ts new file mode 100644 index 000000000000..5f8f1f4bafc5 --- /dev/null +++ b/ui/apps/dotcms-ui/src/stories/primeng/data/Tree.stories.ts @@ -0,0 +1,122 @@ +// also exported from '@storybook/angular' if you can deal with breaking changes in 6.1 +import { Meta, Story } from '@storybook/angular/types-6-0'; +import { moduleMetadata } from '@storybook/angular'; +import { TreeModule } from 'primeng/tree'; + +export default { + title: 'PrimeNG/Data/Tree', + decorators: [ + moduleMetadata({ + imports: [TreeModule] + }) + ], + parameters: { + layout: 'centered', + docs: { + description: { + component: + 'Paginator is a generic component to display content in paged format.: https://primefaces.org/primeng/showcase/#/paginator' + } + } + } +} as Meta; + +const files = [ + { + label: 'Documents', + data: 'Documents Folder', + expandedIcon: 'pi pi-folder-open', + collapsedIcon: 'pi pi-folder', + children: [ + { + label: 'Work', + data: 'Work Folder', + expandedIcon: 'pi pi-folder-open', + collapsedIcon: 'pi pi-folder', + children: [ + { + label: 'Expenses.doc', + icon: 'pi pi-file', + data: 'Expenses Document' + }, + { label: 'Resume.doc', icon: 'pi pi-file', data: 'Resume Document' } + ] + }, + { + label: 'Home', + data: 'Home Folder', + expandedIcon: 'pi pi-folder-open', + collapsedIcon: 'pi pi-folder', + children: [ + { + label: 'Invoices.txt', + icon: 'pi pi-file', + data: 'Invoices for this month' + } + ] + } + ] + }, + { + label: 'Pictures', + data: 'Pictures Folder', + expandedIcon: 'pi pi-folder-open', + collapsedIcon: 'pi pi-folder', + children: [ + { label: 'barcelona.jpg', icon: 'pi pi-image', data: 'Barcelona Photo' }, + { label: 'logo.jpg', icon: 'pi pi-image', data: 'PrimeFaces Logo' }, + { label: 'primeui.png', icon: 'pi pi-image', data: 'PrimeUI Logo' } + ] + }, + { + label: 'Movies', + data: 'Movies Folder', + expandedIcon: 'pi pi-folder-open', + collapsedIcon: 'pi pi-folder', + children: [ + { + label: 'Al Pacino', + data: 'Pacino Movies', + children: [ + { label: 'Scarface', icon: 'pi pi-video', data: 'Scarface Movie' }, + { label: 'Serpico', icon: 'pi pi-video', data: 'Serpico Movie' } + ] + }, + { + label: 'Robert De Niro', + data: 'De Niro Movies', + children: [ + { + label: 'Goodfellas', + icon: 'pi pi-video', + data: 'Goodfellas Movie' + }, + { + label: 'Untouchables', + icon: 'pi pi-video', + data: 'Untouchables Movie' + } + ] + } + ] + } +]; + +const BasicTemplate = ``; + +export const Basic: Story = () => { + return { + template: BasicTemplate, + props: { + files + } + }; +}; + +Basic.parameters = { + docs: { + source: { + code: BasicTemplate + } + } +}; diff --git a/ui/apps/dotcms-ui/src/stories/primeng/form/AutoComplete.stories.ts b/ui/apps/dotcms-ui/src/stories/primeng/form/AutoComplete.stories.ts new file mode 100644 index 000000000000..02627ba6e6d9 --- /dev/null +++ b/ui/apps/dotcms-ui/src/stories/primeng/form/AutoComplete.stories.ts @@ -0,0 +1,64 @@ +// also exported from '@storybook/angular' if you can deal with breaking changes in 6.1 +import { Story, Meta } from '@storybook/angular/types-6-0'; +import { AutoCompleteModule, AutoComplete } from 'primeng/autocomplete'; +import { moduleMetadata } from '@storybook/angular'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; + +export default { + title: 'PrimeNG/Form/AutoComplete', + component: AutoComplete, + parameters: { + docs: { + description: { + component: + 'AutoComplete is an input component that provides real-time suggestions when being typed: https://primefaces.org/primeng/showcase/#/autocomplete' + } + } + }, + decorators: [ + moduleMetadata({ + imports: [AutoCompleteModule, BrowserAnimationsModule] + }) + ], + args: { + results: [ + { name: 'Afghanistan', code: 'AF' }, + { name: 'Albania', code: 'AL' }, + { name: 'Venezuela', code: 'VE' } + ], + // tslint:disable-next-line: typedef + search() { + this.results = [ + { name: 'Afghanistan', code: 'AF' }, + { name: 'Albania', code: 'AL' }, + { name: 'Venezuela', code: 'VE' } + ]; + } + } +} as Meta; + +const AutocompleteTemplate = ` + +`; +const Template: Story = (props: AutoComplete) => { + const template = AutocompleteTemplate; + return { + props, + template + }; +}; + +export const Primary: Story = Template.bind({}); +Primary.parameters = { + docs: { + source: { + code: AutocompleteTemplate + } + } +}; diff --git a/ui/apps/dotcms-ui/src/stories/primeng/form/Calendar.stories.ts b/ui/apps/dotcms-ui/src/stories/primeng/form/Calendar.stories.ts new file mode 100644 index 000000000000..d790d6246104 --- /dev/null +++ b/ui/apps/dotcms-ui/src/stories/primeng/form/Calendar.stories.ts @@ -0,0 +1,42 @@ +// also exported from '@storybook/angular' if you can deal with breaking changes in 6.1 +import { Story, Meta } from '@storybook/angular/types-6-0'; +import { CalendarModule, Calendar } from 'primeng/calendar'; +import { moduleMetadata } from '@storybook/angular'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; + +export default { + title: 'PrimeNG/Form/Calendar', + component: Calendar, + decorators: [ + moduleMetadata({ + imports: [CalendarModule, BrowserAnimationsModule] + }) + ], + parameters: { + docs: { + description: { + component: + 'Calendar is an input component to select a date: https://primefaces.org/primeng/showcase/#/calendar' + } + } + } +} as Meta; + +const CalendarTemplate = ``; +const Template: Story = (props: Calendar) => { + const template = CalendarTemplate; + return { + props, + template + }; +}; + +export const Primary: Story = Template.bind({}); +Primary.parameters = { + docs: { + source: { + code: CalendarTemplate + }, + iframeHeight: 700 + } +}; diff --git a/ui/apps/dotcms-ui/src/stories/primeng/form/Checkbox.stories.ts b/ui/apps/dotcms-ui/src/stories/primeng/form/Checkbox.stories.ts new file mode 100644 index 000000000000..4690ff917b23 --- /dev/null +++ b/ui/apps/dotcms-ui/src/stories/primeng/form/Checkbox.stories.ts @@ -0,0 +1,59 @@ +// also exported from '@storybook/angular' if you can deal with breaking changes in 6.1 +import { Story, Meta } from '@storybook/angular/types-6-0'; +import { CheckboxModule, Checkbox } from 'primeng/checkbox'; +import { moduleMetadata } from '@storybook/angular'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; + +export default { + title: 'PrimeNG/Form/Checkbox', + parameters: { + docs: { + description: { + component: + 'Basic checkbox with label, more information: https://primefaces.org/primeng/showcase/#/checkbox' + } + } + }, + component: Checkbox, + decorators: [ + moduleMetadata({ + imports: [CheckboxModule, BrowserAnimationsModule] + }) + ], + args: {} +} as Meta; + +const CheckboxTemplate = ` +
+ + +
+
+ + +
+
+ + +
+
+ + +
+`; +const Template: Story = (props: Checkbox) => { + const template = CheckboxTemplate; + return { + props, + template + }; +}; + +export const Primary: Story = Template.bind({}); +Primary.parameters = { + docs: { + source: { + code: CheckboxTemplate + } + } +}; diff --git a/ui/apps/dotcms-ui/src/stories/primeng/form/Chips.stories.ts b/ui/apps/dotcms-ui/src/stories/primeng/form/Chips.stories.ts new file mode 100644 index 000000000000..19956a902bb3 --- /dev/null +++ b/ui/apps/dotcms-ui/src/stories/primeng/form/Chips.stories.ts @@ -0,0 +1,52 @@ +import { Story, Meta } from '@storybook/angular/types-6-0'; +import { ChipsModule, Chips } from 'primeng/chips'; +import { moduleMetadata } from '@storybook/angular'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; + +export default { + title: 'PrimeNG/Form/Chips', + component: Chips, + parameters: { + docs: { + description: { + component: + 'Chips is used to enter multiple values on an input field: https://primefaces.org/primeng/showcase/#/chips' + } + } + }, + decorators: [ + moduleMetadata({ + imports: [ChipsModule, BrowserAnimationsModule] + }) + ], + args: { + values: ['first'] + } +} as Meta; + +const ChipsTemplate = ``; + +const Template: Story = (props: Chips) => { + const template = ChipsTemplate; + return { + props, + template + }; +}; + +export const Basic: Story = Template.bind({}); + +Basic.argTypes = { + values: { + name: 'values', + description: 'Array of strings, each representing a chip.' + } +}; + +Basic.parameters = { + docs: { + source: { + code: ChipsTemplate + } + } +}; diff --git a/ui/apps/dotcms-ui/src/stories/primeng/form/Dropdown.stories.ts b/ui/apps/dotcms-ui/src/stories/primeng/form/Dropdown.stories.ts new file mode 100644 index 000000000000..2ccca6f29e44 --- /dev/null +++ b/ui/apps/dotcms-ui/src/stories/primeng/form/Dropdown.stories.ts @@ -0,0 +1,67 @@ +// also exported from '@storybook/angular' if you can deal with breaking changes in 6.1 +import { Story, Meta } from '@storybook/angular/types-6-0'; +import { DropdownModule, Dropdown } from 'primeng/dropdown'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; + +export default { + title: 'PrimeNG/Form/Dropdown', + component: Dropdown, + parameters: { + layout: 'centered', + docs: { + description: { + component: + 'Dropdown is used to select an item from a list of options: https://primefaces.org/primeng/showcase/#/dropdown' + } + } + }, + argTypes: { + width: { + name: 'width', + type: { name: 'string', required: true }, + defaultValue: '300', + description: + "Setting a width prevents the dropdown from jumping when an option is larger than the dropdown's width", + control: { + type: 'text' + } + } + }, + args: { + options: [ + { label: 'Select City', value: null }, + { label: 'New York', value: { id: 1, name: 'New York', code: 'NY' } }, + { label: 'Rome', value: { id: 2, name: 'Rome', code: 'RM' } }, + { label: 'London', value: { id: 3, name: 'London', code: 'LDN' } }, + { label: 'Istanbul', value: { id: 4, name: 'Istanbul', code: 'IST' } }, + { label: 'Paris', value: { id: 5, name: 'Paris', code: 'PRS' } } + ], + width: '300' + } +} as Meta; + +const DropdownTemplate = ` +

+

+
+

+`; +const Template: Story = (args: Dropdown) => { + return { + props: args, + moduleMetadata: { + imports: [DropdownModule, BrowserAnimationsModule] + }, + template: DropdownTemplate + }; +}; + +export const Primary: Story = Template.bind({}); +Primary.parameters = { + docs: { + source: { + code: DropdownTemplate + }, + iframeHeight: 300 + } +}; diff --git a/ui/apps/dotcms-ui/src/stories/primeng/form/FloatLabel.stories.ts b/ui/apps/dotcms-ui/src/stories/primeng/form/FloatLabel.stories.ts new file mode 100644 index 000000000000..9abc58c5c361 --- /dev/null +++ b/ui/apps/dotcms-ui/src/stories/primeng/form/FloatLabel.stories.ts @@ -0,0 +1,50 @@ +import { Story, Meta } from '@storybook/angular/types-6-0'; +import { moduleMetadata } from '@storybook/angular'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; +import { InputTextModule } from 'primeng/inputtext'; + +export default { + title: 'PrimeNG/Form/FloatLabel', + parameters: { + docs: { + description: { + component: + 'All input text components support floating labels: https://primefaces.org/primeng/showcase/#/floatlabel' + } + } + }, + decorators: [ + moduleMetadata({ + imports: [BrowserAnimationsModule, InputTextModule] + }) + ], + args: { + checked: false + } +} as Meta; + +const FloatLabelTemplate = ` + + + + +`; + +const Template: Story<{ checked: boolean }> = (props: { checked: boolean }) => { + console.log(props); + const template = FloatLabelTemplate; + return { + props, + template + }; +}; + +export const Basic: Story = Template.bind({}); + +Basic.parameters = { + docs: { + source: { + code: FloatLabelTemplate + } + } +}; diff --git a/ui/apps/dotcms-ui/src/stories/primeng/form/InputGroup.stories.ts b/ui/apps/dotcms-ui/src/stories/primeng/form/InputGroup.stories.ts new file mode 100644 index 000000000000..8a52d41e292a --- /dev/null +++ b/ui/apps/dotcms-ui/src/stories/primeng/form/InputGroup.stories.ts @@ -0,0 +1,140 @@ +import { Story, Meta } from '@storybook/angular/types-6-0'; +import { FormsModule } from '@angular/forms'; +import { InputTextModule } from 'primeng/inputtext'; +import { ButtonModule } from 'primeng/button'; +import { CheckboxModule } from 'primeng/checkbox'; +import { RadioButtonModule } from 'primeng/radiobutton'; +import { RippleModule } from 'primeng/ripple'; + +import { moduleMetadata } from '@storybook/angular'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; + +export default { + title: 'PrimeNG/Form/InputText/InputGroup', + parameters: { + docs: { + description: { + component: + 'Text, icon, buttons and other content can be grouped next to an input.: https://primefaces.org/primeng/showcase/#/inputgroup' + } + } + }, + decorators: [ + moduleMetadata({ + imports: [ + FormsModule, + InputTextModule, + ButtonModule, + CheckboxModule, + RadioButtonModule, + RippleModule, + BrowserAnimationsModule + ] + }) + ], + args: { + text: 'Placeholder text' + } +} as Meta; + +const InputGroupTemplate = ` +
+
+
+ + +
+
+ +
+
+ $ + + .00 +
+
+ +
+
+ www + +
+
+
+
+
+
+ + + + $ + .00 +
+
+
+
+
+
+ + +
+
+ +
+
+ + +
+
+ +
+
+ + + +
+
+
+
+
+
+ + +
+
+ +
+
+ + +
+
+ +
+
+ + + +
+
+
+`; + +const Template: Story<{ + text: string; +}> = (props: { text: string }) => { + const template = InputGroupTemplate; + return { + props, + template + }; +}; + +export const Primary: Story = Template.bind({}); +Primary.parameters = { + docs: { + source: { + code: InputGroupTemplate + } + } +}; diff --git a/ui/apps/dotcms-ui/src/stories/primeng/form/InputMask.stories.ts b/ui/apps/dotcms-ui/src/stories/primeng/form/InputMask.stories.ts new file mode 100644 index 000000000000..8a416a953a0a --- /dev/null +++ b/ui/apps/dotcms-ui/src/stories/primeng/form/InputMask.stories.ts @@ -0,0 +1,52 @@ +import { Story, Meta } from '@storybook/angular/types-6-0'; +import { InputMaskModule, InputMask } from 'primeng/inputmask'; +import { moduleMetadata } from '@storybook/angular'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; + +export default { + title: 'PrimeNG/Form/InputText/InputMask', + component: InputMask, + parameters: { + docs: { + description: { + component: + 'InputMask component is used to enter input in a certain format such as numeric, date, currency, email and phone.: https://primefaces.org/primeng/showcase/#/inputmask' + } + } + }, + decorators: [ + moduleMetadata({ + imports: [InputMaskModule, BrowserAnimationsModule] + }) + ], + args: { + val: '' + } +} as Meta; + +const InputMaskTemplate = ``; + +const Template: Story = (props: InputMask) => { + const template = InputMaskTemplate; + return { + props, + template + }; +}; + +export const Basic: Story = Template.bind({}); + +Basic.argTypes = { + val: { + name: 'val', + description: 'Input text' + } +}; + +Basic.parameters = { + docs: { + source: { + code: InputMaskTemplate + } + } +}; diff --git a/ui/apps/dotcms-ui/src/stories/primeng/form/InputNumber.stories.ts b/ui/apps/dotcms-ui/src/stories/primeng/form/InputNumber.stories.ts new file mode 100644 index 000000000000..be2b9d7b8d29 --- /dev/null +++ b/ui/apps/dotcms-ui/src/stories/primeng/form/InputNumber.stories.ts @@ -0,0 +1,49 @@ +import { Story, Meta } from '@storybook/angular/types-6-0'; +import { InputNumberModule } from 'primeng/inputnumber'; +import { moduleMetadata } from '@storybook/angular'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; + +export default { + title: 'PrimeNG/Form/InputText/InputNumber', + component: InputNumberModule, + parameters: { + docs: { + description: { + component: + 'InputNumber is an input component to provide numerical input: https://primefaces.org/primeng/showcase/#/inputnumber' + } + } + }, + decorators: [ + moduleMetadata({ + imports: [InputNumberModule, BrowserAnimationsModule] + }) + ], + args: { + checked: false + } +} as Meta; + +const InputNumberTemplate = ` + +`; + +const Template: Story<{ + checked: boolean; +}> = (props: { checked: boolean }) => { + const template = InputNumberTemplate; + return { + props, + template + }; +}; + +export const Basic: Story = Template.bind({}); + +Basic.parameters = { + docs: { + source: { + code: InputNumberTemplate + } + } +}; diff --git a/ui/apps/dotcms-ui/src/stories/primeng/form/InputSwitch.stories.ts b/ui/apps/dotcms-ui/src/stories/primeng/form/InputSwitch.stories.ts new file mode 100644 index 000000000000..ad8b993fc293 --- /dev/null +++ b/ui/apps/dotcms-ui/src/stories/primeng/form/InputSwitch.stories.ts @@ -0,0 +1,52 @@ +import { Story, Meta } from '@storybook/angular/types-6-0'; +import { InputSwitchModule, InputSwitch } from 'primeng/inputswitch'; +import { moduleMetadata } from '@storybook/angular'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; + +export default { + title: 'PrimeNG/Form/InputSwitch', + component: InputSwitch, + parameters: { + docs: { + description: { + component: + 'InputSwitch is used to select a boolean value.: https://primefaces.org/primeng/showcase/#/inputswitch' + } + } + }, + decorators: [ + moduleMetadata({ + imports: [InputSwitchModule, BrowserAnimationsModule] + }) + ], + args: { + checked: false + } +} as Meta; + +const InputSwitchTemplate = ``; + +const Template: Story = (props: InputSwitch) => { + const template = InputSwitchTemplate; + return { + props, + template + }; +}; + +export const Basic: Story = Template.bind({}); + +Basic.argTypes = { + checked: { + name: 'checked', + description: 'Boolean' + } +}; + +Basic.parameters = { + docs: { + source: { + code: InputSwitchTemplate + } + } +}; diff --git a/ui/apps/dotcms-ui/src/stories/primeng/form/InputText.stories.ts b/ui/apps/dotcms-ui/src/stories/primeng/form/InputText.stories.ts new file mode 100644 index 000000000000..8f2e4ff3211b --- /dev/null +++ b/ui/apps/dotcms-ui/src/stories/primeng/form/InputText.stories.ts @@ -0,0 +1,53 @@ +import { Story, Meta } from '@storybook/angular/types-6-0'; +import { InputTextModule, InputText } from 'primeng/inputtext'; +import { moduleMetadata } from '@storybook/angular'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; +import { PasswordModule } from 'primeng/password'; + +export default { + title: 'PrimeNG/Form/InputText/Default', + component: InputText, + parameters: { + docs: { + description: { + component: + 'InputText renders a text field to enter data.: https://primefaces.org/primeng/showcase/#/inputtext' + } + } + }, + decorators: [ + moduleMetadata({ + imports: [InputTextModule, BrowserAnimationsModule, PasswordModule] + }) + ], + args: { + checked: false + } +} as Meta; + +const InputTextTemplate = ` +
+


+


+

+

+
+`; + +const Template: Story = (props: InputText) => { + const template = InputTextTemplate; + return { + props, + template + }; +}; + +export const Basic: Story = Template.bind({}); + +Basic.parameters = { + docs: { + source: { + code: InputTextTemplate + } + } +}; diff --git a/ui/apps/dotcms-ui/src/stories/primeng/form/InputTextArea.stories.ts b/ui/apps/dotcms-ui/src/stories/primeng/form/InputTextArea.stories.ts new file mode 100644 index 000000000000..5ebd743a1192 --- /dev/null +++ b/ui/apps/dotcms-ui/src/stories/primeng/form/InputTextArea.stories.ts @@ -0,0 +1,59 @@ +import { Story, Meta } from '@storybook/angular/types-6-0'; +import { BrowserModule } from '@angular/platform-browser'; +import { InputTextareaModule } from 'primeng/inputtextarea'; +import { FormsModule } from '@angular/forms'; +import { moduleMetadata } from '@storybook/angular'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; + +export default { + title: 'PrimeNG/Form/InputTextArea', + component: InputTextareaModule, + parameters: { + docs: { + description: { + component: + 'Textarea is a multi-line text input element.: https://primefaces.org/primeng/showcase/#/inputtextarea' + } + } + }, + decorators: [ + moduleMetadata({ + imports: [BrowserModule, BrowserAnimationsModule, InputTextareaModule, FormsModule] + }) + ] +} as Meta; + +const InputTextAreaTemplate = ` + +`; + +const InputTextAreaTemplateAutoRezise = ` + +`; + +const Template: Story = (props: never) => { + const template = InputTextAreaTemplate; + return { + props, + template + }; +}; + +export const Basic: Story = Template.bind({}); +export const AutoRezise: Story = Template.bind({}); + +Basic.parameters = { + docs: { + source: { + code: InputTextAreaTemplate + } + } +}; + +AutoRezise.parameters = { + docs: { + source: { + code: InputTextAreaTemplateAutoRezise + } + } +}; diff --git a/ui/apps/dotcms-ui/src/stories/primeng/form/KeyFilter.stories.ts b/ui/apps/dotcms-ui/src/stories/primeng/form/KeyFilter.stories.ts new file mode 100644 index 000000000000..ca7dd3d0eb6e --- /dev/null +++ b/ui/apps/dotcms-ui/src/stories/primeng/form/KeyFilter.stories.ts @@ -0,0 +1,76 @@ +import { Story, Meta } from '@storybook/angular/types-6-0'; +import { moduleMetadata } from '@storybook/angular'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; +import { InputTextModule } from 'primeng/inputtext'; +import { MessageModule } from 'primeng/message'; +import { KeyFilterModule } from 'primeng/keyfilter'; +import { BrowserModule } from '@angular/platform-browser'; +import { FormsModule } from '@angular/forms'; + +export default { + title: 'PrimeNG/Form/KeyFilter', + parameters: { + docs: { + description: { + component: + 'KeyFilter directive restricts user input based on a regular expression.: https://primefaces.org/primeng/showcase/#/keyfilter' + } + } + }, + decorators: [ + moduleMetadata({ + imports: [ + BrowserModule, + BrowserAnimationsModule, + KeyFilterModule, + InputTextModule, + MessageModule, + FormsModule + ] + }) + ], + args: { + ccRegex: /^[^<>*!]+$/, + inputValue: '' + } +} as Meta; + +const KeyFilterTemplate = ` +
+ + +
+`; + +const Template: Story<{ + ccRegex: RegExp; + inputValue: string; +}> = (props: { ccRegex: RegExp; inputValue: string }) => { + const template = KeyFilterTemplate; + return { + props, + template + }; +}; + +export const Basic: Story = Template.bind({}); + +Basic.parameters = { + docs: { + source: { + code: KeyFilterTemplate + } + } +}; diff --git a/ui/apps/dotcms-ui/src/stories/primeng/form/ListBox.stories.ts b/ui/apps/dotcms-ui/src/stories/primeng/form/ListBox.stories.ts new file mode 100644 index 000000000000..4f7b072feb32 --- /dev/null +++ b/ui/apps/dotcms-ui/src/stories/primeng/form/ListBox.stories.ts @@ -0,0 +1,62 @@ +import { Story, Meta } from '@storybook/angular/types-6-0'; +import { moduleMetadata } from '@storybook/angular'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; +import { ListboxModule } from 'primeng/listbox'; + +export default { + title: 'PrimeNG/Form/ListBox', + parameters: { + docs: { + description: { + component: + 'Listbox is used to select one or more values from a list of items: https://primefaces.org/primeng/showcase/#/listbox' + } + } + }, + decorators: [ + moduleMetadata({ + imports: [ListboxModule, BrowserAnimationsModule] + }) + ], + args: { + cities: [ + { label: 'Select City', value: null }, + { label: 'New York', value: { id: 1, name: 'New York', code: 'NY' } }, + { label: 'Rome', value: { id: 2, name: 'Rome', code: 'RM' } }, + { label: 'London', value: { id: 3, name: 'London', code: 'LDN' } }, + { label: 'Istanbul', value: { id: 4, name: 'Istanbul', code: 'IST' } }, + { label: 'Paris', value: { id: 5, name: 'Paris', code: 'PRS' } } + ], + selectedCity: [] + } +} as Meta; + +type City = { + label: string; + value: { + id: number; + name: string; + code: string; + }; +}; + +const ListBoxTemplate = ``; + +const Template: Story = (props: City[]) => { + const template = ListBoxTemplate; + return { + props, + template + }; +}; + +export const Basic: Story = Template.bind({}); + +Basic.parameters = { + docs: { + source: { + code: ListBoxTemplate + } + }, + iframeHeight: 800 +}; diff --git a/ui/apps/dotcms-ui/src/stories/primeng/form/MultiSelect.stories.ts b/ui/apps/dotcms-ui/src/stories/primeng/form/MultiSelect.stories.ts new file mode 100644 index 000000000000..0d969989ddf7 --- /dev/null +++ b/ui/apps/dotcms-ui/src/stories/primeng/form/MultiSelect.stories.ts @@ -0,0 +1,53 @@ +// also exported from '@storybook/angular' if you can deal with breaking changes in 6.1 +import { Story, Meta } from '@storybook/angular/types-6-0'; +import { MultiSelectModule, MultiSelect } from 'primeng/multiselect'; +import { moduleMetadata } from '@storybook/angular'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; + +export default { + title: 'PrimeNG/Form/MultiSelect', + component: MultiSelect, + decorators: [ + moduleMetadata({ + imports: [MultiSelectModule, BrowserAnimationsModule] + }) + ], + parameters: { + docs: { + description: { + component: + 'MultiSelect is used to multiple values from a list of options: https://primefaces.org/primeng/showcase/#/multiselect' + } + } + }, + args: { + cities: [ + { name: 'New York', code: 'NY' }, + { name: 'Rome', code: 'RM' }, + { name: 'London', code: 'LDN' }, + { name: 'Istanbul', code: 'IST' }, + { name: 'Paris', code: 'PRS' } + ], + selectedCities: [{ name: 'Paris', code: 'PRS' }] + } +} as Meta; + +const MultiSelectTemplate = ` +`; +const Template: Story = (props: MultiSelect) => { + const template = MultiSelectTemplate; + return { + props, + template + }; +}; + +export const Primary: Story = Template.bind({}); +Primary.parameters = { + docs: { + source: { + code: MultiSelectTemplate + }, + iframeHeight: 300 + } +}; diff --git a/ui/apps/dotcms-ui/src/stories/primeng/form/Password.stories.ts b/ui/apps/dotcms-ui/src/stories/primeng/form/Password.stories.ts new file mode 100644 index 000000000000..58eee1f5a07d --- /dev/null +++ b/ui/apps/dotcms-ui/src/stories/primeng/form/Password.stories.ts @@ -0,0 +1,41 @@ +import { Story, Meta } from '@storybook/angular/types-6-0'; +import { moduleMetadata } from '@storybook/angular'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; +import { PasswordModule } from 'primeng/password'; + +export default { + title: 'PrimeNG/Form/Password', + parameters: { + docs: { + description: { + component: + 'Password displays strength indicator for password fields: https://primefaces.org/primeng/showcase/#/password' + } + } + }, + decorators: [ + moduleMetadata({ + imports: [PasswordModule, BrowserAnimationsModule] + }) + ] +} as Meta; + +const PasswordTemplate = ``; + +const Template: Story = (props: never) => { + const template = PasswordTemplate; + return { + props, + template + }; +}; + +export const Basic: Story = Template.bind({}); + +Basic.parameters = { + docs: { + source: { + code: PasswordTemplate + } + } +}; diff --git a/ui/apps/dotcms-ui/src/stories/primeng/form/RadioButton.stories.ts b/ui/apps/dotcms-ui/src/stories/primeng/form/RadioButton.stories.ts new file mode 100644 index 000000000000..f7202294c96d --- /dev/null +++ b/ui/apps/dotcms-ui/src/stories/primeng/form/RadioButton.stories.ts @@ -0,0 +1,61 @@ +import { Story, Meta } from '@storybook/angular/types-6-0'; +import { moduleMetadata } from '@storybook/angular'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; +import { RadioButtonModule } from 'primeng/radiobutton'; + +export default { + title: 'PrimeNG/Form/RadioButton', + parameters: { + docs: { + description: { + component: + 'RadioButton is an extension to standard radio button element with theming: https://primefaces.org/primeng/showcase/#/radiobutton' + } + } + }, + decorators: [ + moduleMetadata({ + imports: [RadioButtonModule, BrowserAnimationsModule] + }) + ], + args: { + selectedValue: '' + } +} as Meta; + +const RadioButtonTemplate = ` +
+ + +
+
+ + +
+
+ + +
+
+ + +
+`; + +const Template: Story<{ selectedValue: string }> = (props: { selectedValue: string }) => { + const template = RadioButtonTemplate; + return { + props, + template + }; +}; + +export const Basic: Story = Template.bind({}); + +Basic.parameters = { + docs: { + source: { + code: RadioButtonTemplate + } + } +}; diff --git a/ui/apps/dotcms-ui/src/stories/primeng/form/SelectButton.stories.ts b/ui/apps/dotcms-ui/src/stories/primeng/form/SelectButton.stories.ts new file mode 100644 index 000000000000..0705d0a4f4c2 --- /dev/null +++ b/ui/apps/dotcms-ui/src/stories/primeng/form/SelectButton.stories.ts @@ -0,0 +1,106 @@ +import { moduleMetadata } from '@storybook/angular'; +// also exported from '@storybook/angular' if you can deal with breaking changes in 6.1 +import { Story, Meta } from '@storybook/angular/types-6-0'; +import { SelectButtonModule, SelectButton } from 'primeng/selectbutton'; + +export default { + title: 'PrimeNG/Form/SelectButton', + decorators: [ + moduleMetadata({ + imports: [SelectButtonModule] + }) + ], + args: { + options: [ + { label: 'Push', value: 'push' }, + { label: 'Remove', value: 'remove' }, + { label: 'Push Publish', value: 'push-publish' } + ] + }, + parameters: { + layout: 'centered', + docs: { + description: { + component: + 'SelectButton is a form component to choose a value from a list of options using button elements: https://primefaces.org/primeng/showcase/#/selectbutton' + } + } + } +} as Meta; + +const TabbedTemplate = ` +

+ + + {{item.label}} + + +

+

+ + + {{item.label}} + + +

+`; + +const PrimaryTemplate = ` +

+ + + {{item.label}} + + +

+

+ + + {{item.label}} + + +

+`; + +export const Primary: Story = () => { + return { + template: PrimaryTemplate, + props: { + options: [ + { label: 'Push', value: 'push' }, + { label: 'Remove', value: 'remove' }, + { label: 'Push Publish', value: 'push-publish' } + ] + } + }; +}; + +Primary.parameters = { + docs: { + source: { + code: PrimaryTemplate + } + } +}; + +export const Tabbed: Story = () => { + return { + template: TabbedTemplate, + props: { + options: [ + { label: 'Push', value: 'push' }, + { label: 'Remove', value: 'remove' }, + { label: 'Push Publish', value: 'push-publish' } + ], + selectedOption: 'push' + } + }; +}; + +Tabbed.parameters = { + docs: { + source: { + code: TabbedTemplate + } + } +}; diff --git a/ui/apps/dotcms-ui/src/stories/primeng/menu/Breadcrumb.stories.ts b/ui/apps/dotcms-ui/src/stories/primeng/menu/Breadcrumb.stories.ts new file mode 100644 index 000000000000..8ed6afc6c63a --- /dev/null +++ b/ui/apps/dotcms-ui/src/stories/primeng/menu/Breadcrumb.stories.ts @@ -0,0 +1,48 @@ +import { Story, Meta } from '@storybook/angular/types-6-0'; +import { moduleMetadata } from '@storybook/angular'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; +import { BreadcrumbModule } from 'primeng/breadcrumb'; + +export default { + title: 'PrimeNG/Menu/Breadcrumbs', + parameters: { + docs: { + description: { + component: + 'Breadcrumb provides contextual information about page hierarchy.: https://primefaces.org/primeng/showcase/#/breadcrumb' + } + } + }, + decorators: [ + moduleMetadata({ + imports: [BreadcrumbModule, BrowserAnimationsModule] + }) + ], + args: { + items: [ + { label: 'Content Model', url: '#' }, + { label: 'Content Types' }, + { label: 'Store Product List', url: '#' } + ] + } +} as Meta; + +const BreadcrumbTemplate = ``; + +const Template: Story<{ label: string; url: string }> = (props: { label: string; url: string }) => { + const template = BreadcrumbTemplate; + return { + props, + template + }; +}; + +export const Basic: Story = Template.bind({}); + +Basic.parameters = { + docs: { + source: { + code: BreadcrumbTemplate + } + } +}; diff --git a/ui/apps/dotcms-ui/src/stories/primeng/menu/ContextMenu.stories.ts b/ui/apps/dotcms-ui/src/stories/primeng/menu/ContextMenu.stories.ts new file mode 100644 index 000000000000..6eb022510e0d --- /dev/null +++ b/ui/apps/dotcms-ui/src/stories/primeng/menu/ContextMenu.stories.ts @@ -0,0 +1,172 @@ +import { Story, Meta } from '@storybook/angular/types-6-0'; +import { moduleMetadata } from '@storybook/angular'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; +import { ContextMenuModule } from 'primeng/contextmenu'; + +export default { + title: 'PrimeNG/Menu/ContextMenu', + parameters: { + docs: { + description: { + component: + 'ContextMenu displays an overlay menu on right click of its target. Note that components like DataTable has special integration with ContextMenu. Refer to documentation of the individual documentation of the with context menu support..: https://primefaces.org/primeng/showcase/#/contextmenu' + } + } + }, + decorators: [ + moduleMetadata({ + imports: [ContextMenuModule, BrowserAnimationsModule] + }) + ] +} as Meta; + +const ContextMenuTemplate = ` + Logo + +`; + +const Template: Story = () => { + const template = ContextMenuTemplate; + return { + props: { + items: [ + { + label: 'File', + icon: 'pi pi-fw pi-file', + items: [ + { + label: 'New', + icon: 'pi pi-fw pi-plus', + items: [ + { + label: 'Bookmark', + icon: 'pi pi-fw pi-bookmark' + }, + { + label: 'Video', + icon: 'pi pi-fw pi-video' + } + ] + }, + { + label: 'Delete', + icon: 'pi pi-fw pi-trash' + }, + { + separator: true + }, + { + label: 'Export', + icon: 'pi pi-fw pi-external-link' + } + ] + }, + { + label: 'Edit', + icon: 'pi pi-fw pi-pencil', + items: [ + { + label: 'Left', + icon: 'pi pi-fw pi-align-left' + }, + { + label: 'Right', + icon: 'pi pi-fw pi-align-right' + }, + { + label: 'Center', + icon: 'pi pi-fw pi-align-center' + }, + { + label: 'Justify', + icon: 'pi pi-fw pi-align-justify' + } + ] + }, + { + label: 'Users', + icon: 'pi pi-fw pi-user', + items: [ + { + label: 'New', + icon: 'pi pi-fw pi-user-plus' + }, + { + label: 'Delete', + icon: 'pi pi-fw pi-user-minus' + }, + { + label: 'Search', + icon: 'pi pi-fw pi-users', + items: [ + { + label: 'Filter', + icon: 'pi pi-fw pi-filter', + items: [ + { + label: 'Print', + icon: 'pi pi-fw pi-print' + } + ] + }, + { + icon: 'pi pi-fw pi-bars', + label: 'List' + } + ] + } + ] + }, + { + label: 'Events', + icon: 'pi pi-fw pi-calendar', + items: [ + { + label: 'Edit', + icon: 'pi pi-fw pi-pencil', + items: [ + { + label: 'Save', + icon: 'pi pi-fw pi-calendar-plus' + }, + { + label: 'Delete', + icon: 'pi pi-fw pi-calendar-minus' + } + ] + }, + { + label: 'Archieve', + icon: 'pi pi-fw pi-calendar-times', + items: [ + { + label: 'Remove', + icon: 'pi pi-fw pi-calendar-minus' + } + ] + } + ] + }, + { + separator: true + }, + { + label: 'Quit', + icon: 'pi pi-fw pi-power-off' + } + ] + }, + template + }; +}; + +export const Basic: Story = Template.bind({}); + +Basic.parameters = { + docs: { + source: { + code: ContextMenuTemplate + }, + iframeHeight: 500 + } +}; diff --git a/ui/apps/dotcms-ui/src/stories/primeng/menu/Menu.stories.ts b/ui/apps/dotcms-ui/src/stories/primeng/menu/Menu.stories.ts new file mode 100644 index 000000000000..6ea9f8b8dbac --- /dev/null +++ b/ui/apps/dotcms-ui/src/stories/primeng/menu/Menu.stories.ts @@ -0,0 +1,65 @@ +// also exported from '@storybook/angular' if you can deal with breaking changes in 6.1 +import { Meta } from '@storybook/angular/types-6-0'; +import { MenuModule, Menu } from 'primeng/menu'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; +import { ButtonModule } from 'primeng/button'; + +export default { + title: 'PrimeNG/Menu/Menu', + component: Menu, + parameters: { + docs: { + description: { + component: + 'Menu is a navigation / command component that supports dynamic and static positioning: https://primefaces.org/primeng/showcase/#/menu' + } + } + } +} as Meta; + +const items = [ + { + label: 'Options', + items: [ + { + label: 'Update', + icon: 'pi pi-refresh', + command: () => { + console.log('update'); + } + }, + { + label: 'Delete', + icon: 'pi pi-times', + command: () => { + console.log('delete'); + } + } + ] + } +]; + +export const Basic = (_args: Menu) => { + return { + props: { + items + }, + moduleMetadata: { + imports: [MenuModule, BrowserAnimationsModule] + }, + template: `` + }; +}; + +export const Overlay = (_args: Menu) => { + return { + props: { + items + }, + moduleMetadata: { + imports: [MenuModule, BrowserAnimationsModule, ButtonModule] + }, + template: ` + ` + }; +}; diff --git a/ui/apps/dotcms-ui/src/stories/primeng/messages/Messages.stories.ts b/ui/apps/dotcms-ui/src/stories/primeng/messages/Messages.stories.ts new file mode 100644 index 000000000000..3b2398585f9f --- /dev/null +++ b/ui/apps/dotcms-ui/src/stories/primeng/messages/Messages.stories.ts @@ -0,0 +1,63 @@ +import { Story, Meta } from '@storybook/angular/types-6-0'; +import { moduleMetadata } from '@storybook/angular'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; +import { MessagesModule } from 'primeng/messages'; +import { MessageModule } from 'primeng/message'; + +export default { + title: 'PrimeNG/Messages/Message', + parameters: { + docs: { + description: { + component: + 'Messages is used to display alerts inline.: https://primefaces.org/primeng/showcase/#/messages' + } + } + }, + decorators: [ + moduleMetadata({ + imports: [MessagesModule, MessageModule, BrowserAnimationsModule] + }) + ], + args: { + messages: [ + { severity: 'success', summary: 'Success', detail: 'Message Content' }, + { severity: 'info', summary: 'Info', detail: 'Message Content' }, + { severity: 'warn', summary: 'Warning', detail: 'Message Content' }, + { severity: 'error', summary: 'Error', detail: 'Message Content' } + ] + } +} as Meta; + +type Message = { + severity: string; + summary: string; + detail: string; +}; + +const MessageTemplate = ``; + +const Template: Story<{ messages: Message[] }> = () => { + const template = MessageTemplate; + return { + props: { + messages: [ + { severity: 'success', summary: 'Success', detail: 'Message Content' }, + { severity: 'info', summary: 'Info', detail: 'Message Content' }, + { severity: 'warn', summary: 'Warning', detail: 'Message Content' }, + { severity: 'error', summary: 'Error', detail: 'Message Content' } + ] + }, + template + }; +}; + +export const Basic: Story = Template.bind({}); + +Basic.parameters = { + docs: { + source: { + code: MessageTemplate + } + } +}; diff --git a/ui/apps/dotcms-ui/src/stories/primeng/messages/Toast.component.ts b/ui/apps/dotcms-ui/src/stories/primeng/messages/Toast.component.ts new file mode 100644 index 000000000000..55e05ce9ce40 --- /dev/null +++ b/ui/apps/dotcms-ui/src/stories/primeng/messages/Toast.component.ts @@ -0,0 +1,123 @@ +import { Component, OnInit } from '@angular/core'; +import { MessageService } from 'primeng/api'; + +@Component({ + selector: 'dot-p-toast', + template: ` + + + + +

+ +

+

+ +

+

+ +

+

+ +

+ ` +}) +export class ToastComponent implements OnInit { + constructor(private messageService: MessageService) {} + + ngOnInit() { + console.log('object'); + } + + showSuccess() { + this.messageService.add({ + severity: 'success', + detail: 'The action "Publish" was executed succesfully' + }); + } + + showInfo() { + this.messageService.add({ + severity: 'info', + detail: 'Make sure you add the width of the element' + }); + } + + showWarn() { + this.messageService.add({ + severity: 'warn', + detail: 'Make sure you add the width of the element' + }); + } + + showError() { + this.messageService.add({ + severity: 'error', + detail: 'Something went wrong, please try again.' + }); + } + + showTopLeft() { + this.messageService.add({ + key: 'tl', + severity: 'info', + detail: 'Message Content' + }); + } + + showTopCenter() { + this.messageService.add({ + key: 'tc', + severity: 'info', + detail: 'Message Content' + }); + } + + showBottomCenter() { + this.messageService.add({ + key: 'bc', + severity: 'info', + detail: 'Message Content' + }); + } + + showConfirm() { + this.messageService.clear(); + this.messageService.add({ + key: 'c', + sticky: true, + severity: 'warn', + summary: 'Are you sure?', + detail: 'Confirm to proceed' + }); + } + + showMultiple() { + this.messageService.addAll([ + { severity: 'info', summary: 'Message 1', detail: 'Message Content' }, + { severity: 'info', summary: 'Message 2', detail: 'Message Content' }, + { severity: 'info', summary: 'Message 3', detail: 'Message Content' } + ]); + } + + showSticky() { + this.messageService.add({ + severity: 'info', + summary: 'Sticky', + detail: 'Message Content', + sticky: true + }); + } + + onConfirm() { + this.messageService.clear('c'); + } + + onReject() { + this.messageService.clear('c'); + } + + clear() { + this.messageService.clear(); + } +} diff --git a/ui/apps/dotcms-ui/src/stories/primeng/messages/Toast.stories.ts b/ui/apps/dotcms-ui/src/stories/primeng/messages/Toast.stories.ts new file mode 100644 index 000000000000..cb7d6f4b578a --- /dev/null +++ b/ui/apps/dotcms-ui/src/stories/primeng/messages/Toast.stories.ts @@ -0,0 +1,30 @@ +import { Meta } from '@storybook/angular/types-6-0'; +import { moduleMetadata } from '@storybook/angular'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; +import { ToastModule } from 'primeng/toast'; +import { ButtonModule } from 'primeng/button'; +import { MessageService } from 'primeng/api'; +import { ToastComponent } from './Toast.component'; + +export default { + title: 'PrimeNG/Messages/Toast', + parameters: { + docs: { + description: { + component: + 'Tooltip directive provides advisory information for a component.: https://primefaces.org/primeng/showcase/#/tooltip' + } + } + }, + decorators: [ + moduleMetadata({ + imports: [ToastModule, ButtonModule, BrowserAnimationsModule], + providers: [MessageService] + }) + ] +} as Meta; + +// inbox screen default state +export const Default = () => ({ + component: ToastComponent +}); diff --git a/ui/apps/dotcms-ui/src/stories/primeng/misc/Badge.stories.ts b/ui/apps/dotcms-ui/src/stories/primeng/misc/Badge.stories.ts new file mode 100644 index 000000000000..f3caffa84df2 --- /dev/null +++ b/ui/apps/dotcms-ui/src/stories/primeng/misc/Badge.stories.ts @@ -0,0 +1,62 @@ +import { Story, Meta } from '@storybook/angular/types-6-0'; +import { moduleMetadata } from '@storybook/angular'; +import { ButtonModule } from 'primeng/button'; + +export default { + title: 'PrimeNG/Misc/Badge', + parameters: { + docs: { + description: { + component: + 'Badge is a small status indicator for another element.: https://primefaces.org/primeng/showcase/#/badge' + } + } + }, + decorators: [ + moduleMetadata({ + imports: [ButtonModule] + }) + ] +} as Meta; + +const TooltipPrimaryTemplate = ` +

2

+

4

+

6

+`; + +const TooltipSecondaryTemplate = ` +

2

+

4

+

6

+`; + +export const Primary: Story = (props: never) => { + return { + props, + template: TooltipPrimaryTemplate + }; +}; + +Primary.parameters = { + docs: { + source: { + code: TooltipPrimaryTemplate + } + } +}; + +export const Secondary: Story = (props: never) => { + return { + props, + template: TooltipSecondaryTemplate + }; +}; + +Secondary.parameters = { + docs: { + source: { + code: TooltipSecondaryTemplate + } + } +}; diff --git a/ui/apps/dotcms-ui/src/stories/primeng/misc/Defer.component.ts b/ui/apps/dotcms-ui/src/stories/primeng/misc/Defer.component.ts new file mode 100644 index 000000000000..1bc32e2e786e --- /dev/null +++ b/ui/apps/dotcms-ui/src/stories/primeng/misc/Defer.component.ts @@ -0,0 +1,60 @@ +import { Component, OnInit } from '@angular/core'; +import { MessageService } from 'primeng/api'; + +export interface Car { + vin?; + year?; + brand?; + color?; + price?; + saleDate?; +} + +@Component({ + selector: 'dot-p-defer', + template: ` +
Table is not loaded yet, scroll down to initialize it.
+ + + +
+ + + + + Vin + Year + Brand + Color + + + + + {{ car.vin }} + {{ car.year }} + {{ car.brand }} + {{ car.color }} + + + + +
+ ` +}) +export class DeferComponent implements OnInit { + cars: []; + + constructor(private messageService: MessageService) {} + + ngOnInit() { + console.log('object'); + } + + initData() { + this.messageService.add({ + severity: 'success', + summary: 'Data Initialized', + detail: 'Render Completed' + }); + } +} diff --git a/ui/apps/dotcms-ui/src/stories/primeng/misc/Defer.stories.ts b/ui/apps/dotcms-ui/src/stories/primeng/misc/Defer.stories.ts new file mode 100644 index 000000000000..6187b02f1002 --- /dev/null +++ b/ui/apps/dotcms-ui/src/stories/primeng/misc/Defer.stories.ts @@ -0,0 +1,59 @@ +import { Meta } from '@storybook/angular/types-6-0'; +import { moduleMetadata } from '@storybook/angular'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; +import { ToastModule } from 'primeng/toast'; +import { MessageService } from 'primeng/api'; +import { DeferComponent } from './Defer.component'; +import { BrowserModule } from '@angular/platform-browser'; +import { DeferModule } from 'primeng/defer'; +import { TableModule } from 'primeng/table'; +import { HttpClientModule } from '@angular/common/http'; + +export default { + title: 'PrimeNG/Misc/Defer', + parameters: { + docs: { + description: { + component: + 'Defer postpones the loading the content that is initially not in the viewport until it becomes visible on scroll.: https://primefaces.org/primeng/showcase/#/defer' + } + } + }, + decorators: [ + moduleMetadata({ + imports: [ + BrowserModule, + BrowserAnimationsModule, + DeferModule, + ToastModule, + TableModule, + HttpClientModule + ], + providers: [MessageService] + }) + ] +} as Meta; + +// inbox screen default state +export const Default = () => ({ + component: DeferComponent, + props: { + cars: [ + { brand: 'VW', year: 2012, color: 'Orange', vin: 'dsad231ff' }, + { brand: 'Audi', year: 2011, color: 'Black', vin: 'gwregre345' }, + { brand: 'Renault', year: 2005, color: 'Gray', vin: 'h354htr' }, + { brand: 'BMW', year: 2003, color: 'Blue', vin: 'j6w54qgh' }, + { + brand: 'Mercedes', + year: 1995, + color: 'Orange', + vin: 'hrtwy34' + }, + { brand: 'Volvo', year: 2005, color: 'Black', vin: 'jejtyj' }, + { brand: 'Honda', year: 2012, color: 'Yellow', vin: 'g43gr' }, + { brand: 'Jaguar', year: 2013, color: 'Orange', vin: 'greg34' }, + { brand: 'Ford', year: 2000, color: 'Black', vin: 'h54hw5' }, + { brand: 'Fiat', year: 2013, color: 'Red', vin: '245t2s' } + ] + } +}); diff --git a/ui/apps/dotcms-ui/src/stories/primeng/misc/FocusTrap.stories.ts b/ui/apps/dotcms-ui/src/stories/primeng/misc/FocusTrap.stories.ts new file mode 100644 index 000000000000..ddf7fb17e9a7 --- /dev/null +++ b/ui/apps/dotcms-ui/src/stories/primeng/misc/FocusTrap.stories.ts @@ -0,0 +1,110 @@ +import { Story, Meta } from '@storybook/angular/types-6-0'; +import { BrowserModule } from '@angular/platform-browser'; +import { HttpClientModule } from '@angular/common/http'; +import { FormsModule } from '@angular/forms'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; +import { DialogModule } from 'primeng/dialog'; +import { ButtonModule } from 'primeng/button'; +import { AccordionModule } from 'primeng/accordion'; +import { InputTextModule } from 'primeng/inputtext'; +import { CodeHighlighterModule } from 'primeng/codehighlighter'; +import { FocusTrapModule } from 'primeng/focustrap'; +import { AutoCompleteModule } from 'primeng/autocomplete'; +import { CalendarModule } from 'primeng/calendar'; +import { MultiSelectModule } from 'primeng/multiselect'; +import { DropdownModule } from 'primeng/dropdown'; +import { moduleMetadata } from '@storybook/angular'; + +export default { + title: 'PrimeNG/Misc/FocusTrap', + parameters: { + docs: { + description: { + component: + 'Focus Trap keeps focus within a certain DOM element while tabbing: https://primefaces.org/primeng/showcase/#/focustrap' + } + } + }, + decorators: [ + moduleMetadata({ + imports: [ + BrowserModule, + BrowserAnimationsModule, + FormsModule, + DialogModule, + ButtonModule, + InputTextModule, + AccordionModule, + CodeHighlighterModule, + FocusTrapModule, + AutoCompleteModule, + CalendarModule, + MultiSelectModule, + DropdownModule, + HttpClientModule + ] + }) + ], + args: { + cities: [ + { name: 'New York', code: 'NY' }, + { name: 'Rome', code: 'RM' }, + { name: 'London', code: 'LDN' }, + { name: 'Istanbul', code: 'IST' }, + { name: 'Paris', code: 'PRS' } + ] + } +} as Meta; + +const FocusTrapTemplate = ` +
+
Input
+ + +
Float Label
+ + + + + +
Disabled Input
+ + +
Input with tabindex -1
+ + +
Button
+ + +
Disabled Button
+ + +
Button with tabindex -1
+ + +
Dropdown
+ +
+`; + +type City = { + name: string; + code: string; +}; + +const Template: Story = (props: City[]) => { + const template = FocusTrapTemplate; + return { + props, + template + }; +}; + +export const Primary: Story = Template.bind({}); +Primary.parameters = { + docs: { + source: { + code: FocusTrapTemplate + } + } +}; diff --git a/ui/apps/dotcms-ui/src/stories/primeng/misc/InPlace.stories.ts b/ui/apps/dotcms-ui/src/stories/primeng/misc/InPlace.stories.ts new file mode 100644 index 000000000000..4c94540101b0 --- /dev/null +++ b/ui/apps/dotcms-ui/src/stories/primeng/misc/InPlace.stories.ts @@ -0,0 +1,100 @@ +import { Story, Meta } from '@storybook/angular/types-6-0'; +import { BrowserModule } from '@angular/platform-browser'; +import { HttpClientModule } from '@angular/common/http'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; +import { InputTextModule } from 'primeng/inputtext'; +import { moduleMetadata } from '@storybook/angular'; +import { InplaceModule } from 'primeng/inplace'; +import { TableModule } from 'primeng/table'; + +export default { + title: 'PrimeNG/Misc/InPlace', + parameters: { + docs: { + description: { + component: + 'Inplace provides an easy to do editing and display at the same time where clicking the output displays the actual content.: https://primefaces.org/primeng/showcase/#/inplace' + } + } + }, + decorators: [ + moduleMetadata({ + imports: [ + BrowserModule, + BrowserAnimationsModule, + InplaceModule, + InputTextModule, + TableModule, + HttpClientModule + ] + }) + ], + args: { + records: [ + { brand: 'VW', year: 2012, color: 'Orange', vin: 'dsad231ff' }, + { brand: 'Audi', year: 2011, color: 'Black', vin: 'gwregre345' }, + { brand: 'Renault', year: 2005, color: 'Gray', vin: 'h354htr' }, + { brand: 'BMW', year: 2003, color: 'Blue', vin: 'j6w54qgh' }, + { brand: 'Mercedes', year: 1995, color: 'Orange', vin: 'hrtwy34' }, + { brand: 'Volvo', year: 2005, color: 'Black', vin: 'jejtyj' }, + { brand: 'Honda', year: 2012, color: 'Yellow', vin: 'g43gr' }, + { brand: 'Jaguar', year: 2013, color: 'Orange', vin: 'greg34' }, + { brand: 'Ford', year: 2000, color: 'Black', vin: 'h54hw5' }, + { brand: 'Fiat', year: 2013, color: 'Red', vin: '245t2s' } + ] + } +} as Meta; + +const InPlaceTemplate = ` + + +
+ + View Data +
+
+ + + + + Vin + Year + Brand + Color + + + + + {{car.vin}} + {{car.year}} + {{car.brand}} + {{car.color}} + + + + +
+`; + +type Car = { + brand: string; + color: string; + vin: string; +}; + +const Template: Story<{ records: Car[] }> = (props: { records: Car[] }) => { + const template = InPlaceTemplate; + return { + props, + template + }; +}; + +export const Primary: Story = Template.bind({}); +Primary.parameters = { + docs: { + source: { + code: InPlaceTemplate + } + } +}; diff --git a/ui/apps/dotcms-ui/src/stories/primeng/misc/ProgressBar.stories.ts b/ui/apps/dotcms-ui/src/stories/primeng/misc/ProgressBar.stories.ts new file mode 100644 index 000000000000..735184e556cb --- /dev/null +++ b/ui/apps/dotcms-ui/src/stories/primeng/misc/ProgressBar.stories.ts @@ -0,0 +1,76 @@ +import { Story, Meta } from '@storybook/angular/types-6-0'; +import { BrowserModule } from '@angular/platform-browser'; +import { FormsModule } from '@angular/forms'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; +import { moduleMetadata } from '@storybook/angular'; +import { ProgressBarModule } from 'primeng/progressbar'; +import { ToastModule } from 'primeng/toast'; + +export default { + title: 'PrimeNG/Misc/ProgressBar', + parameters: { + docs: { + description: { + component: + 'ProgressBar is a process status indicator.: https://primefaces.org/primeng/showcase/#/progressbar' + } + } + }, + decorators: [ + moduleMetadata({ + imports: [ + BrowserModule, + BrowserAnimationsModule, + ProgressBarModule, + ToastModule, + FormsModule + ] + }) + ], + args: { + value: 10, + showValue: false + } +} as Meta; + +const IndeterminateTemplate = ` +

Indeterminate

+ +`; + +const StaticTemplate = ` +

Static

+ +`; + +export const Indeterminate: Story = () => { + return { + template: IndeterminateTemplate + }; +}; + +Indeterminate.parameters = { + docs: { + source: { + code: IndeterminateTemplate + } + } +}; + +export const Static: Story = () => { + return { + template: StaticTemplate, + props: { + value: 10, + showValue: false + } + }; +}; + +Static.parameters = { + docs: { + source: { + code: StaticTemplate + } + } +}; diff --git a/ui/apps/dotcms-ui/src/stories/primeng/misc/ProgressSpinner.stories.ts b/ui/apps/dotcms-ui/src/stories/primeng/misc/ProgressSpinner.stories.ts new file mode 100644 index 000000000000..466719ff43d1 --- /dev/null +++ b/ui/apps/dotcms-ui/src/stories/primeng/misc/ProgressSpinner.stories.ts @@ -0,0 +1,49 @@ +import { Story, Meta } from '@storybook/angular/types-6-0'; +import { BrowserModule } from '@angular/platform-browser'; +import { FormsModule } from '@angular/forms'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; +import { moduleMetadata } from '@storybook/angular'; +import { ProgressSpinnerModule } from 'primeng/progressspinner'; + +export default { + title: 'PrimeNG/Misc/ProgressSpinner', + parameters: { + docs: { + description: { + component: + 'ProgressSpinner is a process status indicator.: https://primefaces.org/primeng/showcase/#/progressspinner' + } + } + }, + decorators: [ + moduleMetadata({ + imports: [BrowserModule, BrowserAnimationsModule, ProgressSpinnerModule, FormsModule] + }) + ], + args: { + value: 10, + showValue: false + } +} as Meta; + +const CustomTemplate = ` + +`; + +export const Custom: Story = () => { + return { + template: CustomTemplate, + props: { + value: 10, + showValue: false + } + }; +}; + +Custom.parameters = { + docs: { + source: { + code: CustomTemplate + } + } +}; diff --git a/ui/apps/dotcms-ui/src/stories/primeng/misc/Ripple.component.ts b/ui/apps/dotcms-ui/src/stories/primeng/misc/Ripple.component.ts new file mode 100644 index 000000000000..1c7bb637bc49 --- /dev/null +++ b/ui/apps/dotcms-ui/src/stories/primeng/misc/Ripple.component.ts @@ -0,0 +1,20 @@ +import { Component, OnInit } from '@angular/core'; +import { PrimeNGConfig } from 'primeng/api'; + +@Component({ + selector: 'dot-p-button-ripple', + template: `` +}) +export class RippleComponent implements OnInit { + constructor(private primengConfig: PrimeNGConfig) {} + + ngOnInit() { + this.primengConfig.ripple = true; + } +} diff --git a/ui/apps/dotcms-ui/src/stories/primeng/misc/Ripple.stories.ts b/ui/apps/dotcms-ui/src/stories/primeng/misc/Ripple.stories.ts new file mode 100644 index 000000000000..c843774202c4 --- /dev/null +++ b/ui/apps/dotcms-ui/src/stories/primeng/misc/Ripple.stories.ts @@ -0,0 +1,29 @@ +import { Meta } from '@storybook/angular/types-6-0'; +import { moduleMetadata } from '@storybook/angular'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; +import { RippleComponent } from './Ripple.component'; +import { BrowserModule } from '@angular/platform-browser'; + +import { RippleModule } from 'primeng/ripple'; +import { ButtonModule } from 'primeng/button'; +export default { + title: 'PrimeNG/Misc/Ripple', + parameters: { + docs: { + description: { + component: + 'Ripple directive adds ripple effect to the host element.: https://primefaces.org/primeng/showcase/#/ripple' + } + } + }, + decorators: [ + moduleMetadata({ + imports: [RippleModule, ButtonModule, BrowserModule, BrowserAnimationsModule] + }) + ] +} as Meta; + +export const Default = () => ({ + component: RippleComponent, + props: {} +}); diff --git a/ui/apps/dotcms-ui/src/stories/primeng/overlay/ConfirmDialog.component.ts b/ui/apps/dotcms-ui/src/stories/primeng/overlay/ConfirmDialog.component.ts new file mode 100644 index 000000000000..53c2c12545b8 --- /dev/null +++ b/ui/apps/dotcms-ui/src/stories/primeng/overlay/ConfirmDialog.component.ts @@ -0,0 +1,40 @@ +import { Component } from '@angular/core'; +import { ConfirmationService } from 'primeng/api'; + +export const ConfirmDialogTemplate = ` + + + + + + + +`; + +@Component({ + selector: 'dot-p-confirm-dialog', + template: ConfirmDialogTemplate +}) +export class ConfirmDialogComponent { + constructor(private confirmationService: ConfirmationService) {} + + confirm(): void { + this.confirmationService.confirm({ + message: + 'Are you sure you want to delete the Content Type Contact and all the content associated with it? (This operation can not be undone)', + header: 'Delete Content Type', + acceptLabel: 'Close', + rejectLabel: 'Cancel', + rejectButtonStyleClass: 'p-button-secondary' + }); + } +} diff --git a/ui/apps/dotcms-ui/src/stories/primeng/overlay/ConfirmDialog.stories.ts b/ui/apps/dotcms-ui/src/stories/primeng/overlay/ConfirmDialog.stories.ts new file mode 100644 index 000000000000..b0e16edc8a28 --- /dev/null +++ b/ui/apps/dotcms-ui/src/stories/primeng/overlay/ConfirmDialog.stories.ts @@ -0,0 +1,54 @@ +// also exported from '@storybook/angular' if you can deal with breaking changes in 6.1 +import { Meta } from '@storybook/angular/types-6-0'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; +import { ConfirmDialogModule } from 'primeng/confirmdialog'; +import { ButtonModule } from 'primeng/button'; +import { MessagesModule } from 'primeng/messages'; +import { ToastModule } from 'primeng/toast'; +import { ConfirmationService } from 'primeng/api'; +import { ConfirmDialogComponent, ConfirmDialogTemplate } from './ConfirmDialog.component'; +import { ToastComponent } from '../messages/Toast.component'; + +export default { + title: 'PrimeNG/Overlay/ConfirmDialog', + component: ConfirmDialogComponent, + parameters: { + docs: { + description: { + component: + 'ConfirmDialog is backed by a service utilizing Observables to display confirmation windows easily that can be shared by multiple actions on the same component: https://primefaces.org/primeng/showcase/#/confirmdialog' + } + } + } +} as Meta; + +export const Basic = () => ({ + component: ConfirmDialogComponent, + moduleMetadata: { + imports: [ + ConfirmDialogModule, + ButtonModule, + MessagesModule, + BrowserAnimationsModule, + ToastModule + ], + providers: [ConfirmationService], + declarations: [ToastComponent], + entryComponents: [ToastComponent] + } +}); + +Basic.parameters = { + docs: { + source: { + code: ConfirmDialogTemplate + }, + iframeHeight: 300 + } +}; + +Basic.args = { + confirm: () => { + // + } +}; diff --git a/ui/apps/dotcms-ui/src/stories/primeng/overlay/Dialog.stories.ts b/ui/apps/dotcms-ui/src/stories/primeng/overlay/Dialog.stories.ts new file mode 100644 index 000000000000..259a4110c384 --- /dev/null +++ b/ui/apps/dotcms-ui/src/stories/primeng/overlay/Dialog.stories.ts @@ -0,0 +1,73 @@ +import { Story, Meta } from '@storybook/angular/types-6-0'; +import { DialogModule } from 'primeng/dialog'; +import { moduleMetadata } from '@storybook/angular'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; +import { ButtonModule } from 'primeng/button'; + +export default { + title: 'PrimeNG/Overlay/Dialog', + parameters: { + docs: { + description: { + component: + 'Dialog is a container to display content in an overlay window: https://primefaces.org/primeng/showcase/#/dialog' + } + } + }, + decorators: [ + moduleMetadata({ + imports: [DialogModule, ButtonModule, BrowserAnimationsModule] + }) + ], + args: { + displayBasic: false, + showBasicDialog(): void { + this.displayBasic = true; + } + } +} as Meta; + +const DialogTemplate = ` + + +

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. + Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. + Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat + cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ + + + +
+`; + +type Args = { + displayBasic: boolean; + showBasicDialog: () => void; +}; + +const Template: Story = (props: Args) => { + const template = DialogTemplate; + return { + props, + template + }; +}; + +export const Basic: Story = Template.bind({}); + +Basic.argTypes = { + displayBasic: { + name: 'displayBasic', + description: 'display the modal' + } +}; + +Basic.parameters = { + docs: { + source: { + code: DialogTemplate + }, + iframeHeight: 300 + } +}; diff --git a/ui/apps/dotcms-ui/src/stories/primeng/overlay/DynamicDialog.stories.ts b/ui/apps/dotcms-ui/src/stories/primeng/overlay/DynamicDialog.stories.ts new file mode 100644 index 000000000000..dd000a79e06d --- /dev/null +++ b/ui/apps/dotcms-ui/src/stories/primeng/overlay/DynamicDialog.stories.ts @@ -0,0 +1,53 @@ +// also exported from '@storybook/angular' if you can deal with breaking changes in 6.1 +import { Meta } from '@storybook/angular/types-6-0'; +import { BrowserModule } from '@angular/platform-browser'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; +import { DynamicDialogModule } from 'primeng/dynamicdialog'; +import { ButtonModule } from 'primeng/button'; +import { ToastModule } from 'primeng/toast'; +import { TableModule } from 'primeng/table'; +import { HttpClientModule } from '@angular/common/http'; +import { ProductService } from './SharedProducts.service'; +import { DynamicDialogRef, DynamicDialogConfig } from 'primeng/dynamicdialog'; +import { DynamicDialogButtonComponent } from './DynamicDialogButton.component'; +import { DynamicDialogProductsComponent } from './DynamicDialogProducts.component'; + +export default { + title: 'PrimeNG/Overlay/DynamicDialog', + component: DynamicDialogButtonComponent, + parameters: { + docs: { + description: { + component: + 'Dialogs can be created dynamically with any component as the content using a DialogService: https://primefaces.org/primeng/showcase/#/dynamicdialog' + } + } + } +} as Meta; + +export const Basic = () => ({ + component: DynamicDialogButtonComponent, + moduleMetadata: { + imports: [ + BrowserModule, + BrowserAnimationsModule, + DynamicDialogModule, + ToastModule, + TableModule, + ButtonModule, + HttpClientModule + ], + providers: [ProductService, DynamicDialogRef, DynamicDialogConfig], + declarations: [DynamicDialogProductsComponent], + entryComponents: [DynamicDialogProductsComponent] + } +}); + +Basic.parameters = { + docs: { + source: { + code: `` + }, + iframeHeight: 300 + } +}; diff --git a/ui/apps/dotcms-ui/src/stories/primeng/overlay/DynamicDialogButton.component.ts b/ui/apps/dotcms-ui/src/stories/primeng/overlay/DynamicDialogButton.component.ts new file mode 100644 index 000000000000..43a6c7566665 --- /dev/null +++ b/ui/apps/dotcms-ui/src/stories/primeng/overlay/DynamicDialogButton.component.ts @@ -0,0 +1,48 @@ +import { Component, OnDestroy } from '@angular/core'; +import { MessageService } from 'primeng/api'; +import { DynamicDialogProductsComponent } from './DynamicDialogProducts.component'; +import { Product } from './Product.interface'; +import { DialogService } from 'primeng/dynamicdialog'; +import { DynamicDialogRef } from 'primeng/dynamicdialog'; + +@Component({ + selector: 'dot-p-dialog-button', + providers: [DialogService, MessageService], + template: `` +}) +export class DynamicDialogButtonComponent implements OnDestroy { + constructor(public dialogService: DialogService, public messageService: MessageService) {} + + ref: DynamicDialogRef; + + show() { + this.ref = this.dialogService.open(DynamicDialogProductsComponent, { + header: 'Choose a Product', + width: '70%', + contentStyle: { 'max-height': '500px', overflow: 'auto' }, + baseZIndex: 10000 + }); + + this.ref.onClose.subscribe((product: Product) => { + if (product) { + this.messageService.add({ + severity: 'info', + summary: 'Product Selected', + detail: product.name + }); + } + }); + } + + ngOnDestroy() { + if (this.ref) { + this.ref.close(); + } + } +} diff --git a/ui/apps/dotcms-ui/src/stories/primeng/overlay/DynamicDialogProducts.component.ts b/ui/apps/dotcms-ui/src/stories/primeng/overlay/DynamicDialogProducts.component.ts new file mode 100644 index 000000000000..c0fb5fa7888f --- /dev/null +++ b/ui/apps/dotcms-ui/src/stories/primeng/overlay/DynamicDialogProducts.component.ts @@ -0,0 +1,49 @@ +import { Component, OnInit } from '@angular/core'; +import { ProductService } from './SharedProducts.service'; +import { Product } from './Product.interface'; +import { DynamicDialogRef, DynamicDialogConfig } from 'primeng/dynamicdialog'; + +export const ProductsTableTemplate = ` + + + + Name + Brand + Status + + + + + + {{product.name}} + {{product.price}} + {{product.inventoryStatus}} + + + + + + +`; + +@Component({ + selector: 'dot-p-dynamic-dialog', + template: ProductsTableTemplate +}) +export class DynamicDialogProductsComponent implements OnInit { + products: Product[]; + + constructor( + private productService: ProductService, + public ref: DynamicDialogRef, + public config: DynamicDialogConfig + ) {} + + ngOnInit() { + this.productService.getProductsSmall().then((products) => (this.products = products)); + } + + selectProduct(product: Product) { + this.ref.close(product); + } +} diff --git a/ui/apps/dotcms-ui/src/stories/primeng/overlay/OverlayPanel.stories.ts b/ui/apps/dotcms-ui/src/stories/primeng/overlay/OverlayPanel.stories.ts new file mode 100644 index 000000000000..a399445e9cb6 --- /dev/null +++ b/ui/apps/dotcms-ui/src/stories/primeng/overlay/OverlayPanel.stories.ts @@ -0,0 +1,203 @@ +// also exported from '@storybook/angular' if you can deal with breaking changes in 6.1 +import { Story, Meta } from '@storybook/angular/types-6-0'; +import { BrowserModule } from '@angular/platform-browser'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; +import { ButtonModule } from 'primeng/button'; +import { ToastModule } from 'primeng/toast'; +import { TableModule } from 'primeng/table'; +import { HttpClientModule } from '@angular/common/http'; +import { ProductService } from './SharedProducts.service'; +import { OverlayPanelModule } from 'primeng/overlaypanel'; +import { moduleMetadata } from '@storybook/angular'; + +const OverlayPanelTemplate = ` + + + + + + + + Name + Price + + + + + {{product.name}} + {{product.price}} + + + + + +`; + +export default { + title: 'PrimeNG/Overlay/OverlayPanel', + + decorators: [ + moduleMetadata({ + imports: [ + BrowserModule, + BrowserAnimationsModule, + OverlayPanelModule, + TableModule, + ButtonModule, + ToastModule, + HttpClientModule + ], + providers: [ProductService] + }) + ], + parameters: { + docs: { + description: { + component: + 'OverlayPanel is a container component positioned as connected to its target.: https://primefaces.org/primeng/showcase/#/overlaypanel' + } + } + } +} as Meta; + +export const Basic: Story = () => { + return { + template: OverlayPanelTemplate, + props: { + on: () => { + console.log('asas'); + }, + products: [ + { + id: '1000', + code: 'f230fh0g3', + name: 'Bamboo Watch', + description: 'Product Description', + image: 'bamboo-watch.jpg', + price: 65, + category: 'Accessories', + quantity: 24, + inventoryStatus: 'INSTOCK', + rating: 5 + }, + { + id: '1001', + code: 'nvklal433', + name: 'Black Watch', + description: 'Product Description', + image: 'black-watch.jpg', + price: 72, + category: 'Accessories', + quantity: 61, + inventoryStatus: 'INSTOCK', + rating: 4 + }, + { + id: '1002', + code: 'zz21cz3c1', + name: 'Blue Band', + description: 'Product Description', + image: 'blue-band.jpg', + price: 79, + category: 'Fitness', + quantity: 2, + inventoryStatus: 'LOWSTOCK', + rating: 3 + }, + { + id: '1003', + code: '244wgerg2', + name: 'Blue T-Shirt', + description: 'Product Description', + image: 'blue-t-shirt.jpg', + price: 29, + category: 'Clothing', + quantity: 25, + inventoryStatus: 'INSTOCK', + rating: 5 + }, + { + id: '1004', + code: 'h456wer53', + name: 'Bracelet', + description: 'Product Description', + image: 'bracelet.jpg', + price: 15, + category: 'Accessories', + quantity: 73, + inventoryStatus: 'INSTOCK', + rating: 4 + }, + { + id: '1005', + code: 'av2231fwg', + name: 'Brown Purse', + description: 'Product Description', + image: 'brown-purse.jpg', + price: 120, + category: 'Accessories', + quantity: 0, + inventoryStatus: 'OUTOFSTOCK', + rating: 4 + }, + { + id: '1006', + code: 'bib36pfvm', + name: 'Chakra Bracelet', + description: 'Product Description', + image: 'chakra-bracelet.jpg', + price: 32, + category: 'Accessories', + quantity: 5, + inventoryStatus: 'LOWSTOCK', + rating: 3 + }, + { + id: '1007', + code: 'mbvjkgip5', + name: 'Galaxy Earrings', + description: 'Product Description', + image: 'galaxy-earrings.jpg', + price: 34, + category: 'Accessories', + quantity: 23, + inventoryStatus: 'INSTOCK', + rating: 5 + }, + { + id: '1008', + code: 'vbb124btr', + name: 'Game Controller', + description: 'Product Description', + image: 'game-controller.jpg', + price: 99, + category: 'Electronics', + quantity: 2, + inventoryStatus: 'LOWSTOCK', + rating: 4 + }, + { + id: '1009', + code: 'cm230f032', + name: 'Gaming Set', + description: 'Product Description', + image: 'gaming-set.jpg', + price: 299, + category: 'Electronics', + quantity: 63, + inventoryStatus: 'INSTOCK', + rating: 3 + } + ] + } + }; +}; + +Basic.parameters = { + docs: { + source: { + code: OverlayPanelTemplate + }, + iframeHeight: 500 + } +}; diff --git a/ui/apps/dotcms-ui/src/stories/primeng/overlay/Product.interface.ts b/ui/apps/dotcms-ui/src/stories/primeng/overlay/Product.interface.ts new file mode 100644 index 000000000000..13929d93fa41 --- /dev/null +++ b/ui/apps/dotcms-ui/src/stories/primeng/overlay/Product.interface.ts @@ -0,0 +1,12 @@ +export interface Product { + id?: string; + code?: string; + name?: string; + description?: string; + price?: number; + quantity?: number; + inventoryStatus?: string; + category?: string; + image?: string; + rating?: number; +} diff --git a/ui/apps/dotcms-ui/src/stories/primeng/overlay/SharedProducts.service.ts b/ui/apps/dotcms-ui/src/stories/primeng/overlay/SharedProducts.service.ts new file mode 100644 index 000000000000..6706825d11db --- /dev/null +++ b/ui/apps/dotcms-ui/src/stories/primeng/overlay/SharedProducts.service.ts @@ -0,0 +1,120 @@ +import { HttpClient } from '@angular/common/http'; +import { Injectable } from '@angular/core'; +import { Product } from './Product.interface'; + +@Injectable() +export class ProductService { + status: string[] = ['OUTOFSTOCK', 'INSTOCK', 'LOWSTOCK']; + + productNames: string[] = [ + 'Bamboo Watch', + 'Black Watch', + 'Blue Band', + 'Blue T-Shirt', + 'Bracelet', + 'Brown Purse', + 'Chakra Bracelet', + 'Galaxy Earrings', + 'Game Controller', + 'Gaming Set', + 'Gold Phone Case', + 'Green Earbuds', + 'Green T-Shirt', + 'Grey T-Shirt', + 'Headphones', + 'Light Green T-Shirt', + 'Lime Band', + 'Mini Speakers', + 'Painted Phone Case', + 'Pink Band', + 'Pink Purse', + 'Purple Band', + 'Purple Gemstone Necklace', + 'Purple T-Shirt', + 'Shoes', + 'Sneakers', + 'Teal T-Shirt', + 'Yellow Earbuds', + 'Yoga Mat', + 'Yoga Set' + ]; + + constructor(private http: HttpClient) {} + + getProductsSmall() { + return this.http + .get<{ data: Product[] }>('../../assets/products-small.json') + .toPromise() + .then((res) => res.data) + .then((data) => { + return data; + }); + } + + getProducts() { + return this.http + .get<{ data: Product[] }>('../../assets/products-small.json') + .toPromise() + .then((res) => res.data) + .then((data) => { + return data; + }); + } + + getProductsWithOrdersSmall() { + return this.http + .get<{ data: Product[] }>('../../assets/products-small.json') + .toPromise() + .then((res) => res.data) + .then((data) => { + return data; + }); + } + + generatePrduct(): Product { + const product: Product = { + id: this.generateId(), + name: this.generateName(), + description: 'Product Description', + price: this.generatePrice(), + quantity: this.generateQuantity(), + category: 'Product Category', + inventoryStatus: this.generateStatus(), + rating: this.generateRating() + }; + + product.image = product.name.toLocaleLowerCase().split(/[ ,]+/).join('-') + '.jpg'; + return product; + } + + generateId() { + let text = ''; + const possible = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; + + for (let i = 0; i < 5; i++) { + text += possible.charAt(Math.floor(Math.random() * possible.length)); + } + + return text; + } + + generateName() { + return this.productNames[Math.floor(Math.random() * Math.floor(30))]; + } + + generatePrice() { + return Math.floor(Math.random() * Math.floor(299) + 1); + } + + generateQuantity() { + return Math.floor(Math.random() * Math.floor(75) + 1); + } + + generateStatus() { + return this.status[Math.floor(Math.random() * Math.floor(3))]; + } + + generateRating() { + return Math.floor(Math.random() * Math.floor(5) + 1); + } +} diff --git a/ui/apps/dotcms-ui/src/stories/primeng/overlay/Tooltip.stories.ts b/ui/apps/dotcms-ui/src/stories/primeng/overlay/Tooltip.stories.ts new file mode 100644 index 000000000000..3f07d0370ca8 --- /dev/null +++ b/ui/apps/dotcms-ui/src/stories/primeng/overlay/Tooltip.stories.ts @@ -0,0 +1,42 @@ +import { Story, Meta } from '@storybook/angular/types-6-0'; +import { moduleMetadata } from '@storybook/angular'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; +import { TooltipModule } from 'primeng/tooltip'; +import { ButtonModule } from 'primeng/button'; + +export default { + title: 'PrimeNG/Overlay/Tooltip', + parameters: { + docs: { + description: { + component: + 'Tooltip directive provides advisory information for a component.: https://primefaces.org/primeng/showcase/#/tooltip' + } + } + }, + decorators: [ + moduleMetadata({ + imports: [TooltipModule, ButtonModule, BrowserAnimationsModule] + }) + ] +} as Meta; + +const TooltipTemplate = ``; + +const Template: Story = (props: never) => { + const template = TooltipTemplate; + return { + props, + template + }; +}; + +export const Basic: Story = Template.bind({}); + +Basic.parameters = { + docs: { + source: { + code: TooltipTemplate + } + } +}; diff --git a/ui/apps/dotcms-ui/src/stories/primeng/panel/TabView.stories.ts b/ui/apps/dotcms-ui/src/stories/primeng/panel/TabView.stories.ts new file mode 100644 index 000000000000..a65c9f28a80c --- /dev/null +++ b/ui/apps/dotcms-ui/src/stories/primeng/panel/TabView.stories.ts @@ -0,0 +1,52 @@ +// also exported from '@storybook/angular' if you can deal with breaking changes in 6.1 +import { Meta } from '@storybook/angular/types-6-0'; +import { Menu } from 'primeng/menu'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; +import { TabViewModule, TabView } from 'primeng/tabview'; +import { ButtonModule } from 'primeng/button'; + +export default { + title: 'PrimeNG/Tabs/TabView', + component: TabView, + parameters: { + docs: { + description: { + component: + 'TabView is a container component to group content with tabs.: https://primefaces.org/primeng/showcase/#/tabview' + } + } + } +} as Meta; + +const BasicTemplate = ` + + +

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation + ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. + Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+
+ +

Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi + architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione + voluptatem sequi nesciunt. Consectetur, adipisci velit, sed quia non numquam eius modi.

+
+ +

At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati + cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. + Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus.

+
+
+`; + +// tslint:disable-next-line: variable-name +export const Basic = (_args: Menu) => { + return { + props: { + activeIndex: 0 + }, + moduleMetadata: { + imports: [TabViewModule, ButtonModule, BrowserAnimationsModule] + }, + template: BasicTemplate + }; +}; diff --git a/ui/apps/dotcms-ui/src/test.ts b/ui/apps/dotcms-ui/src/test.ts new file mode 100644 index 000000000000..0c1c645aaed3 --- /dev/null +++ b/ui/apps/dotcms-ui/src/test.ts @@ -0,0 +1,28 @@ +// This file is required by karma.conf.js and loads recursively all the .spec and framework files + +import 'zone.js/testing'; +import { getTestBed } from '@angular/core/testing'; +import { + BrowserDynamicTestingModule, + platformBrowserDynamicTesting +} from '@angular/platform-browser-dynamic/testing'; + +declare const require: { + context( + path: string, + deep?: boolean, + filter?: RegExp + ): { + keys(): string[]; + (id: string): T; + }; +}; + +// First, initialize the Angular testing environment. +getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), { + teardown: { destroyAfterEach: false } +}); +// Then we find all the tests. +const context = require.context('./', true, /\.spec\.ts$/); +// And load the modules. +context.keys().map(context); diff --git a/ui/apps/dotcms-ui/src/tomcat/index.jsp b/ui/apps/dotcms-ui/src/tomcat/index.jsp new file mode 100644 index 000000000000..7863f9a1c806 --- /dev/null +++ b/ui/apps/dotcms-ui/src/tomcat/index.jsp @@ -0,0 +1,5 @@ +<% +response.setHeader("Cache-Control", "no-cache, no-store, must-revalidate"); +response.setHeader("Pragma", "no-cache"); +response.setDateHeader("Expires", 0); +%><%@ include file = "index.html" %> diff --git a/ui/apps/dotcms-ui/src/tsconfig.app.json b/ui/apps/dotcms-ui/src/tsconfig.app.json new file mode 100644 index 000000000000..a786e019f475 --- /dev/null +++ b/ui/apps/dotcms-ui/src/tsconfig.app.json @@ -0,0 +1,10 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "outDir": "../out-tsc/app", + "types": [] + }, + "files": ["main.ts", "polyfills.ts"], + "include": ["src/**/*.d.ts"], + "exclude": ["**/*.stories.*"] +} diff --git a/ui/apps/dotcms-ui/src/tsconfig.spec.json b/ui/apps/dotcms-ui/src/tsconfig.spec.json new file mode 100644 index 000000000000..1e95880956cd --- /dev/null +++ b/ui/apps/dotcms-ui/src/tsconfig.spec.json @@ -0,0 +1,10 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "module": "commonjs", + "outDir": "../out-tsc/spec", + "types": ["jasmine", "node"] + }, + "files": ["test.ts", "polyfills.ts"], + "include": ["**/*.spec.ts", "**/*.d.ts"] +} diff --git a/ui/apps/dotcms-ui/tsconfig.app.json b/ui/apps/dotcms-ui/tsconfig.app.json new file mode 100644 index 000000000000..a211185bb31d --- /dev/null +++ b/ui/apps/dotcms-ui/tsconfig.app.json @@ -0,0 +1,9 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../dist/out-tsc", + "types": [] + }, + "files": ["src/main.ts", "src/polyfills.ts"], + "exclude": ["**/*.stories.ts", "**/*.stories.js"] +} diff --git a/ui/apps/dotcms-ui/tsconfig.editor.json b/ui/apps/dotcms-ui/tsconfig.editor.json new file mode 100644 index 000000000000..32f9200dc83f --- /dev/null +++ b/ui/apps/dotcms-ui/tsconfig.editor.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.json", + "include": ["**/*.ts"], + "compilerOptions": { + "types": ["jest", "node"] + } +} diff --git a/ui/apps/dotcms-ui/tsconfig.json b/ui/apps/dotcms-ui/tsconfig.json new file mode 100644 index 000000000000..e3851bd76990 --- /dev/null +++ b/ui/apps/dotcms-ui/tsconfig.json @@ -0,0 +1,19 @@ +{ + "extends": "../../tsconfig.base.json", + "files": [], + "include": [], + "references": [ + { + "path": "./tsconfig.app.json" + }, + { + "path": "./tsconfig.spec.json" + }, + { + "path": "./tsconfig.editor.json" + }, + { + "path": "./.storybook/tsconfig.json" + } + ] +} diff --git a/ui/apps/dotcms-ui/tsconfig.spec.json b/ui/apps/dotcms-ui/tsconfig.spec.json new file mode 100644 index 000000000000..8dc3ef8f6f01 --- /dev/null +++ b/ui/apps/dotcms-ui/tsconfig.spec.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "module": "commonjs", + "outDir": "../out-tsc/spec", + "types": ["jasmine", "node"] + }, + "files": ["src/test.ts", "src/polyfills.ts"], + "include": ["**/*.spec.ts", "**/*.d.ts"] +} diff --git a/ui/decorate-angular-cli.js b/ui/decorate-angular-cli.js new file mode 100644 index 000000000000..bc81a8378896 --- /dev/null +++ b/ui/decorate-angular-cli.js @@ -0,0 +1,69 @@ +/** + * This file decorates the Angular CLI with the Nx CLI to enable features such as computation caching + * and faster execution of tasks. + * + * It does this by: + * + * - Patching the Angular CLI to warn you in case you accidentally use the undecorated ng command. + * - Symlinking the ng to nx command, so all commands run through the Nx CLI + * - Updating the package.json postinstall script to give you control over this script + * + * The Nx CLI decorates the Angular CLI, so the Nx CLI is fully compatible with it. + * Every command you run should work the same when using the Nx CLI, except faster. + * + * Because of symlinking you can still type `ng build/test/lint` in the terminal. The ng command, in this case, + * will point to nx, which will perform optimizations before invoking ng. So the Angular CLI is always invoked. + * The Nx CLI simply does some optimizations before invoking the Angular CLI. + * + * To opt out of this patch: + * - Replace occurrences of nx with ng in your package.json + * - Remove the script from your postinstall script in your package.json + * - Delete and reinstall your node_modules + */ + +const fs = require('fs'); +const os = require('os'); +const cp = require('child_process'); +const isWindows = os.platform() === 'win32'; +let output; +try { + output = require('@nrwl/workspace').output; +} catch (e) { + console.warn('Angular CLI could not be decorated to enable computation caching. Please ensure @nrwl/workspace is installed.'); + process.exit(0); +} + +/** + * Symlink of ng to nx, so you can keep using `ng build/test/lint` and still + * invoke the Nx CLI and get the benefits of computation caching. + */ +function symlinkNgCLItoNxCLI() { + try { + const ngPath = './node_modules/.bin/ng'; + const nxPath = './node_modules/.bin/nx'; + if (isWindows) { + /** + * This is the most reliable way to create symlink-like behavior on Windows. + * Such that it works in all shells and works with npx. + */ + ['', '.cmd', '.ps1'].forEach(ext => { + if (fs.existsSync(nxPath + ext)) fs.writeFileSync(ngPath + ext, fs.readFileSync(nxPath + ext)); + }); + } else { + // If unix-based, symlink + cp.execSync(`ln -sf ./nx ${ngPath}`); + } + } + catch(e) { + output.error({ title: 'Unable to create a symlink from the Angular CLI to the Nx CLI:' + e.message }); + throw e; + } +} + +try { + symlinkNgCLItoNxCLI(); + require('@nrwl/cli/lib/decorate-cli').decorateCli(); + output.log({ title: 'Angular CLI has been decorated to enable computation caching.' }); +} catch(e) { + output.error({ title: 'Decoration of the Angular CLI did not complete successfully' }); +} diff --git a/ui/documentation.json b/ui/documentation.json new file mode 100644 index 000000000000..1d054e6be1a4 --- /dev/null +++ b/ui/documentation.json @@ -0,0 +1,207789 @@ +{ + "pipes": [ + { + "name": "DotFilterPipe", + "id": "pipe-DotFilterPipe-0d15d13369c153320c7c8ea983d868955789082befffcfda8949460472c44fdce5686b21c733998085a14512f37e053a77122a2d416dbadb218118f187810bce", + "file": "apps/dotcms-ui/src/app/view/pipes/dot-filter/dot-filter.pipe.ts", + "type": "pipe", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "rawdescription": "\n", + "properties": [], + "methods": [ + { + "name": "transform", + "args": [ + { + "name": "value", + "type": "T[]", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "keys", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "term", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "T[]", + "typeParameters": ["T"], + "line": 7, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "value", + "type": "T[]", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "keys", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "term", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "ngname": "dotFilter", + "sourceCode": "import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'dotFilter'\n})\nexport class DotFilterPipe implements PipeTransform {\n transform(value: T[], keys: string, term: string): T[] {\n if (!term) return value;\n return (value || []).filter((item: any) =>\n keys.split(',').some((key) => {\n return item.hasOwnProperty(key) && new RegExp(term, 'gi').test(item[key]);\n })\n );\n }\n}\n" + }, + { + "name": "DotMessagePipe", + "id": "pipe-DotMessagePipe-216b74b875123d78272f9d2b204573f382de5ce3bba7211e638e5b1183b84d9163dee06df3382ca0502b07a14775577fd27cacdf9be16806dae9eb4944cdf2fd", + "file": "apps/dotcms-ui/src/app/view/pipes/dot-message/dot-message.pipe.ts", + "type": "pipe", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "rawdescription": "\n", + "properties": [], + "methods": [ + { + "name": "transform", + "args": [ + { + "name": "value", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "args", + "type": "string[]", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "[]" + } + ], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 10, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "value", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "args", + "type": "string[]", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "[]", + "tagName": { + "text": "param" + } + } + ] + } + ], + "ngname": "dm", + "sourceCode": "import { Pipe, PipeTransform } from '@angular/core';\nimport { DotMessageService } from '@services/dot-message/dot-messages.service';\n\n@Pipe({\n name: 'dm'\n})\nexport class DotMessagePipe implements PipeTransform {\n constructor(private dotMessageService: DotMessageService) {}\n\n transform(value: string, args: string[] = []): string {\n return value ? this.dotMessageService.get(value, ...args) : '';\n }\n}\n" + }, + { + "name": "DotMessagePipe", + "id": "pipe-DotMessagePipe-4240403e7e43259bd4e5267119e63ba00fb46f8f28c6d6572132c0b2301af7d58571a2d561c7d9bae152ccc0b772d8807b2cb1fe4e2e4145d5e0afb21e6fdc6f-1", + "file": "apps/dotcms-ui/src/app/view/components/_common/searchable-dropdown/component/searchable-dropdown.component.stories.ts", + "type": "pipe", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "rawdescription": "\n", + "properties": [], + "methods": [ + { + "name": "transform", + "args": [ + { + "name": "value", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 19, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "value", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "ngname": "dm", + "sourceCode": "import { CommonModule } from '@angular/common';\nimport { Pipe, PipeTransform } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { BrowserAnimationsModule } from '@angular/platform-browser/animations';\nimport { UiDotIconButtonModule } from '@components/_common/dot-icon-button/dot-icon-button.module';\nimport { DotIconModule } from '@dotcms/ui';\nimport { moduleMetadata } from '@storybook/angular';\nimport { Story, Meta } from '@storybook/angular/types-6-0';\nimport { ButtonModule } from 'primeng/button';\nimport { DataViewModule } from 'primeng/dataview';\nimport { InputTextModule } from 'primeng/inputtext';\nimport { OverlayPanelModule } from 'primeng/overlaypanel';\nimport { SearchableDropdownComponent } from '.';\n\n@Pipe({\n name: 'dm'\n})\nclass DotMessagePipe implements PipeTransform {\n transform(value: string): string {\n return value;\n }\n}\n\nexport default {\n title: 'DotCMS/Searchable Dropdown',\n component: SearchableDropdownComponent,\n parameters: {\n docs: {\n description: {\n component:\n 'Dropdown with pagination and global search. Please be mindful that the width property is required.'\n }\n }\n },\n decorators: [\n moduleMetadata({\n declarations: [DotMessagePipe, SearchableDropdownComponent],\n imports: [\n BrowserAnimationsModule,\n ButtonModule,\n CommonModule,\n DataViewModule,\n UiDotIconButtonModule,\n DotIconModule,\n FormsModule,\n InputTextModule,\n OverlayPanelModule\n ]\n })\n ],\n argTypes: {\n width: {\n name: 'width',\n type: { name: 'string', required: true },\n defaultValue: '300',\n description:\n \"Setting a width prevents the dropdown from jumping when an option is larger than the dropdown's width\",\n control: {\n type: 'text'\n }\n }\n },\n args: {\n rows: 4,\n pageLinkSize: 2,\n optionsWidth: '300',\n paginate: () => {},\n showOverlayHandler: () => {},\n hideOverlayHandler: () => {},\n handleClick: () => {},\n data: [\n {\n label: 'This is an option',\n value: 'option1'\n },\n {\n label: 'Hola Mundo',\n value: 'option2'\n },\n {\n label: 'Freddy',\n value: 'option3'\n },\n {\n label: 'DotCMS',\n value: 'option4'\n },\n {\n label: 'Hybrid CMS',\n value: 'option5'\n },\n {\n label: 'Trying a really long long long option to see what happen',\n value: 'option6'\n },\n {\n label: 'Option',\n value: 'option'\n },\n {\n label: 'Be here now',\n value: 'beherenow'\n },\n {\n label: 'And now what?',\n value: 'nowwhat'\n },\n {\n label: 'More and more',\n value: 'more'\n },\n {\n label: 'And the last one',\n value: 'lastone'\n }\n ],\n placeholder: 'Select something',\n labelPropertyName: 'label',\n width: '300px'\n }\n} as Meta;\n\nconst getTemplate = (extraAttr = '') => {\n const template = `\n \n \n `;\n return template;\n};\n\nexport const Primary: Story = (props: SearchableDropdownComponent) => {\n return {\n moduleMetadata: {\n declarations: [SearchableDropdownComponent]\n },\n component: SearchableDropdownComponent,\n props,\n template: getTemplate()\n };\n};\n\nexport const Secondary = (props: SearchableDropdownComponent) => ({\n component: SearchableDropdownComponent,\n props,\n template: getTemplate(`class=\"d-secondary\"`)\n});\n", + "isDuplicate": true, + "duplicateId": 1, + "duplicateName": "DotMessagePipe-1" + }, + { + "name": "DotSafeUrlPipe", + "id": "pipe-DotSafeUrlPipe-77ad17e303a088f66e375b9c1617cf8d02594942f6d4911b475361a9e4ed7cf0734bee8c2a5eaeb0f34097794c09d1bdfd71e6a09c6a05b72d997b4644b1b374", + "file": "apps/dotcms-ui/src/app/view/pipes/dot-safe-url/dot-safe-url.pipe.ts", + "type": "pipe", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "rawdescription": "\n", + "properties": [], + "methods": [ + { + "name": "addQueryParams", + "args": [], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 36, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "addURLWithParameters", + "args": [ + { + "name": "url", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 23, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "url", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "transform", + "args": [ + { + "name": "url", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "any", + "typeParameters": [], + "line": 14, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "url", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "ngname": "dotSafeUrl", + "sourceCode": "import { Pipe, PipeTransform } from '@angular/core';\nimport { DomSanitizer } from '@angular/platform-browser';\nimport { DotRouterService } from '@services/dot-router/dot-router.service';\nimport { ActivatedRoute } from '@angular/router';\n\n@Pipe({ name: 'dotSafeUrl' })\nexport class DotSafeUrlPipe implements PipeTransform {\n constructor(\n private sanitizer: DomSanitizer,\n private dotRouterService: DotRouterService,\n private activatedRoute: ActivatedRoute\n ) {}\n\n transform(url) {\n if (url) {\n const urlWithParameters = this.addURLWithParameters(url);\n return this.sanitizer.bypassSecurityTrustResourceUrl(urlWithParameters);\n } else {\n return this.sanitizer.bypassSecurityTrustResourceUrl('');\n }\n }\n\n private addURLWithParameters(url: string): string {\n let urlWithParameters = url;\n urlWithParameters += url.indexOf('?') === -1 ? '?' : '&';\n urlWithParameters +=\n urlWithParameters.indexOf('in_frame') === -1\n ? `in_frame=true&frame=detailFrame&container=true&angularCurrentPortlet=${\n this.dotRouterService.currentPortlet.id\n }${this.addQueryParams()}`\n : '';\n\n return urlWithParameters;\n }\n\n private addQueryParams(): string {\n let params = '';\n Object.keys(this.activatedRoute.snapshot.queryParams).map((attr) => {\n params += `&${attr}=${this.activatedRoute.snapshot.queryParams[attr]}`;\n });\n return params;\n }\n}\n" + }, + { + "name": "DotStringFormatPipe", + "id": "pipe-DotStringFormatPipe-de6d5fd62acc339df38b7c1a97a0c4aaca5b74f44110fca5b424d77da0004aa802fa7994dbf3b12af3b5a5dd884720b2935f60e72ca7351953f2f585c82e647b", + "file": "apps/dotcms-ui/src/app/view/pipes/dot-string-format/dot-string-format.pipe.ts", + "type": "pipe", + "deprecated": false, + "deprecationMessage": "", + "description": "

Given an string interpolate the text based on tokens '{$index}'

\n", + "rawdescription": "\n\nGiven an string interpolate the text based on tokens '{$index}'\n\n\n", + "properties": [], + "methods": [ + { + "name": "transform", + "args": [ + { + "name": "value", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "args", + "type": "string[]", + "deprecated": false, + "deprecationMessage": "", + "optional": true + } + ], + "optional": false, + "returnType": "any", + "typeParameters": [], + "line": 22, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nGiven a string, interpolate the text on the given args parameter.\n\n", + "description": "

Given a string, interpolate the text on the given args parameter.

\n", + "jsdoctags": [ + { + "name": { + "pos": 415, + "end": 420, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "value" + }, + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 400, + "end": 405, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 406, + "end": 414, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 407, + "end": 413, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 149 + } + } + }, + { + "name": "args", + "type": "string[]", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "tagName": { + "text": "param" + } + }, + { + "tagName": { + "pos": 429, + "end": 436, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "returns" + }, + "comment": "

args

\n", + "returnType": "[]" + } + ] + } + ], + "ngname": "dotStringFormat", + "sourceCode": "import { Pipe, PipeTransform } from '@angular/core';\n\n/**\n * Given an string interpolate the text based on tokens '{$index}'\n\n *\n * @export\n * @class DotStringFormatPipe\n * @implements {PipeTransform}\n */\n@Pipe({\n name: 'dotStringFormat'\n})\nexport class DotStringFormatPipe implements PipeTransform {\n /**\n * Given a string, interpolate the text on the given args parameter.\n *\n * @param {string} value\n * @returns {string[]} args\n * @memberof DotStringFormatPipe\n */\n transform(value: string, args?: string[]): any {\n args.forEach((token: string, index) => {\n value = value.replace(`{${index}}`, token);\n });\n return value;\n }\n}\n" + } + ], + "interfaces": [ + { + "name": "AccountUserForm", + "id": "interface-AccountUserForm-9abe64832147e87c4732cdef9839bf91c8bb55710623c6cacf0d111ccde161b20913f7eedd8a30286c1fe0cfd604f8d3c0d4d068fe08a87d1e514abfcd339720", + "file": "apps/dotcms-ui/src/app/view/components/dot-toolbar/components/dot-my-account/dot-my-account.component.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import {\n Component,\n EventEmitter,\n Output,\n Input,\n OnInit,\n ViewChild,\n OnDestroy\n} from '@angular/core';\nimport { NgForm } from '@angular/forms';\nimport { take, takeUntil } from 'rxjs/operators';\nimport { Subject } from 'rxjs';\n\nimport { DotDialogActions } from '@components/dot-dialog/dot-dialog.component';\nimport { DotMessageService } from '@services/dot-message/dot-messages.service';\nimport { DotcmsConfigService, LoginService, User, Auth } from '@dotcms/dotcms-js';\nimport { DotRouterService } from '@services/dot-router/dot-router.service';\nimport { DotMenuService } from '@services/dot-menu.service';\nimport { DotAccountUser, DotAccountService } from '@services/dot-account-service';\n\ninterface AccountUserForm extends DotAccountUser {\n confirmPassword?: string;\n}\n@Component({\n selector: 'dot-my-account',\n styleUrls: ['./dot-my-account.component.scss'],\n templateUrl: 'dot-my-account.component.html'\n})\nexport class DotMyAccountComponent implements OnInit, OnDestroy {\n @ViewChild('myAccountForm', { static: true }) form: NgForm;\n\n @Output() close = new EventEmitter();\n\n @Input() visible: boolean;\n\n emailRegex: string;\n passwordMatch: boolean;\n\n dotAccountUser: DotAccountUser = {\n currentPassword: '',\n email: '',\n givenName: '',\n surname: '',\n userId: ''\n };\n\n passwordConfirm: string;\n message = null;\n changePasswordOption = false;\n dialogActions: DotDialogActions;\n showStarter: boolean;\n\n private destroy$: Subject = new Subject();\n\n constructor(\n private dotMessageService: DotMessageService,\n private dotAccountService: DotAccountService,\n private dotcmsConfigService: DotcmsConfigService,\n private loginService: LoginService,\n private dotRouterService: DotRouterService,\n private dotMenuService: DotMenuService\n ) {\n this.passwordMatch = false;\n this.changePasswordOption = false;\n this.loginService.watchUser(this.loadUser.bind(this));\n this.dotcmsConfigService.getConfig().subscribe((res) => {\n this.emailRegex = res.emailRegex;\n });\n }\n\n ngOnInit() {\n this.dialogActions = {\n accept: {\n label: this.dotMessageService.get('save'),\n action: () => {\n this.save();\n },\n disabled: true\n },\n cancel: {\n label: this.dotMessageService.get('modes.Close')\n }\n };\n\n this.dotMenuService\n .isPortletInMenu('starter')\n .pipe(take(1))\n .subscribe((showStarter: boolean) => {\n this.showStarter = showStarter;\n });\n\n this.form.valueChanges\n .pipe(takeUntil(this.destroy$))\n .subscribe((valueChange: AccountUserForm) => {\n this.dialogActions = {\n ...this.dialogActions,\n accept: {\n ...this.dialogActions.accept,\n disabled:\n (this.changePasswordOption &&\n valueChange.newPassword !== valueChange.confirmPassword) ||\n !this.form.valid\n }\n };\n });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.complete();\n }\n\n checkPasswords(): void {\n if (this.message) {\n this.message = null;\n }\n this.passwordMatch =\n this.dotAccountUser.newPassword !== '' &&\n this.passwordConfirm !== '' &&\n this.dotAccountUser.newPassword === this.passwordConfirm;\n }\n\n toggleChangePasswordOption(): void {\n this.changePasswordOption = !this.changePasswordOption;\n }\n\n /**\n * Calls Api based on checked input to add/remove starter portlet from menu\n *\n * @memberof DotMyAccountComponent\n */\n setShowStarter(): void {\n if (this.showStarter) {\n this.dotAccountService.addStarterPage().subscribe();\n } else {\n this.dotAccountService.removeStarterPage().subscribe();\n }\n }\n\n getRequiredMessage(...args: string[]): string {\n return this.dotMessageService.get('error.form.mandatory', ...args);\n }\n\n save(): void {\n this.dotAccountService.updateUser(this.dotAccountUser).subscribe(\n (response) => {\n // TODO: replace the alert with a Angular components\n alert(this.dotMessageService.get('message.createaccount.success'));\n this.setShowStarter();\n this.close.emit();\n\n if (response.entity.reauthenticate) {\n this.dotRouterService.doLogOut();\n } else {\n this.loginService.setAuth({\n loginAsUser: null,\n user: response.entity.user\n });\n }\n },\n (response) => {\n // TODO: We have to define how must be the user feedback in case of error\n this.message = response.errorsMessages;\n }\n );\n }\n\n private loadUser(auth: Auth): void {\n const user: User = auth.user;\n this.dotAccountUser.email = user.emailAddress;\n this.dotAccountUser.givenName = user.firstName;\n this.dotAccountUser.surname = user.lastName;\n this.dotAccountUser.userId = user.userId;\n this.dotAccountUser.newPassword = null;\n this.passwordConfirm = null;\n }\n}\n", + "properties": [ + { + "name": "confirmPassword", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 22 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [], + "extends": "DotAccountUser" + }, + { + "name": "ActionHeaderDeleteOptions", + "id": "interface-ActionHeaderDeleteOptions-3bb879ffec8e820082765ac26d909c5b0bc23b7c0338f5939876fa905f53350cf82ef6ce05540e2326297230a37def4092695a63ee4212c006dcdda19a8a31d2", + "file": "apps/dotcms-ui/src/app/shared/models/action-header/action-header-delete-options.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface ActionHeaderDeleteOptions {\n confirmHeader?: string;\n confirmMessage?: string;\n}\n", + "properties": [ + { + "name": "confirmHeader", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 2 + }, + { + "name": "confirmMessage", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 3 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "ActionHeaderOptions", + "id": "interface-ActionHeaderOptions-a9c1ef7bb0b68beb8f9c7e0dafa1fc241fb761b2062fd4397c0bb660c28459d91f785a6192ac6c3fd30b49d07aeb71bc8b8efb640cfb504d9166dd1e190d2b16", + "file": "apps/dotcms-ui/src/app/shared/models/action-header/action-header-options.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { ActionHeaderOptionsPrimary } from './action-header-options-primary.model';\nimport { ButtonAction } from './button-action.model';\n\nexport interface ActionHeaderOptions {\n primary?: ActionHeaderOptionsPrimary;\n secondary?: ButtonAction[];\n}\n", + "properties": [ + { + "name": "primary", + "deprecated": false, + "deprecationMessage": "", + "type": "ActionHeaderOptionsPrimary", + "optional": true, + "description": "", + "line": 5 + }, + { + "name": "secondary", + "deprecated": false, + "deprecationMessage": "", + "type": "ButtonAction[]", + "optional": true, + "description": "", + "line": 6 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "ActionHeaderOptionsPrimary", + "id": "interface-ActionHeaderOptionsPrimary-9c959f0df3acfc6e0b7c78a0f0dcf91a670e912b00eacaed904cc7b4b87a053c1b59f2be0076101dbb2f2030911df5734144d4c4032873aed129b1c4087bcb6b", + "file": "apps/dotcms-ui/src/app/shared/models/action-header/action-header-options-primary.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { ButtonModel } from './button.model';\n\nexport interface ActionHeaderOptionsPrimary {\n command?: (event?: any) => void;\n model?: ButtonModel[];\n}\n", + "properties": [ + { + "name": "command", + "deprecated": false, + "deprecationMessage": "", + "type": "function", + "optional": true, + "description": "", + "line": 4 + }, + { + "name": "model", + "deprecated": false, + "deprecationMessage": "", + "type": "ButtonModel[]", + "optional": true, + "description": "", + "line": 5 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "AngularNodeViewRendererOptions", + "id": "interface-AngularNodeViewRendererOptions-82a01d97ff2709936894580ac0dce391e85d858d29b739986be130517e966244ad5b31af24f0a94e0b501a43354b2febc44471706d38baff60cacd51ad53ac0d", + "file": "libs/block-editor/src/lib/NodeViewRenderer.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Component, Injector, Input, Type } from '@angular/core';\nimport {\n Editor,\n NodeView,\n NodeViewProps,\n NodeViewRenderer,\n NodeViewRendererProps,\n NodeViewRendererOptions\n} from '@tiptap/core';\nimport type { Decoration } from 'prosemirror-view';\nimport type { Node as ProseMirrorNode } from 'prosemirror-model';\n\nimport { AngularRenderer } from './AngularRenderer';\n\n@Component({ template: '' })\nexport class AngularNodeViewComponent implements NodeViewProps {\n @Input() editor!: NodeViewProps['editor'];\n @Input() node!: NodeViewProps['node'];\n @Input() decorations!: NodeViewProps['decorations'];\n @Input() selected!: NodeViewProps['selected'];\n @Input() extension!: NodeViewProps['extension'];\n @Input() getPos!: NodeViewProps['getPos'];\n @Input() updateAttributes!: NodeViewProps['updateAttributes'];\n @Input() deleteNode!: NodeViewProps['deleteNode'];\n}\n\ninterface AngularNodeViewRendererOptions extends NodeViewRendererOptions {\n update?: ((node: ProseMirrorNode, decorations: Decoration[]) => boolean) | null;\n injector: Injector;\n}\n\nclass AngularNodeView extends NodeView<\n Type,\n Editor,\n AngularNodeViewRendererOptions\n> {\n renderer!: AngularRenderer;\n contentDOMElement!: HTMLElement | null;\n\n mount() {\n const injector = this.options.injector as Injector;\n\n const props: NodeViewProps = {\n editor: this.editor,\n node: this.node,\n decorations: this.decorations,\n selected: false,\n extension: this.extension,\n getPos: () => this.getPos(),\n updateAttributes: (attributes = {}) => this.updateAttributes(attributes),\n deleteNode: () => this.deleteNode()\n };\n\n // create renderer\n this.renderer = new AngularRenderer(this.component, injector, props);\n\n // Register drag handler\n if (this.extension.config.draggable) {\n this.renderer.elementRef.nativeElement.ondragstart = (e: DragEvent) => {\n this.onDragStart(e);\n };\n }\n\n this.contentDOMElement = this.node.isLeaf\n ? null\n : document.createElement(this.node.isInline ? 'span' : 'div');\n\n if (this.contentDOMElement) {\n // For some reason the whiteSpace prop is not inherited properly in Chrome and Safari\n // With this fix it seems to work fine\n // See: https://github.com/ueberdosis/tiptap/issues/1197\n this.contentDOMElement.style.whiteSpace = 'inherit';\n this.renderer.detectChanges();\n }\n }\n\n get dom() {\n return this.renderer.dom;\n }\n\n get contentDOM() {\n if (this.node.isLeaf) {\n return null;\n }\n\n this.maybeMoveContentDOM();\n return this.contentDOMElement;\n }\n\n private maybeMoveContentDOM(): void {\n const contentElement = this.dom.querySelector('[data-node-view-content]');\n\n if (\n this.contentDOMElement &&\n contentElement &&\n !contentElement.contains(this.contentDOMElement)\n ) {\n contentElement.appendChild(this.contentDOMElement);\n }\n }\n\n update(node: ProseMirrorNode, decorations: Decoration[]): boolean {\n if (this.options.update) {\n return this.options.update(node, decorations);\n }\n\n if (node.type !== this.node.type) {\n return false;\n }\n\n if (node === this.node && this.decorations === decorations) {\n return true;\n }\n\n this.node = node;\n this.decorations = decorations;\n this.renderer.updateProps({ node, decorations });\n this.maybeMoveContentDOM();\n\n return true;\n }\n\n selectNode() {\n this.renderer.updateProps({ selected: true });\n }\n\n deselectNode() {\n this.renderer.updateProps({ selected: false });\n }\n\n destroy() {\n this.renderer.destroy();\n }\n}\n\nexport const AngularNodeViewRenderer = (\n component: Type,\n options: Partial\n): NodeViewRenderer => {\n return (props: NodeViewRendererProps) => {\n return new AngularNodeView(component, props, options);\n };\n};\n", + "properties": [ + { + "name": "injector", + "deprecated": false, + "deprecationMessage": "", + "type": "Injector", + "optional": false, + "description": "", + "line": 29 + }, + { + "name": "update", + "deprecated": false, + "deprecationMessage": "", + "type": " | null", + "optional": true, + "description": "", + "line": 28 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [], + "extends": "NodeViewRendererOptions" + }, + { + "name": "Auth", + "id": "interface-Auth-5d0703d3d5d12558b1bbde9262016b10ec9cf6c418c9741070b97284d1a8fbc28be4f7b612438e8347bcf836241aa6a4a312b0f55c3c34f695902c625eee1712", + "file": "libs/dotcms-js/src/lib/core/login.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { CoreWebService } from './core-web.service';\nimport { Injectable } from '@angular/core';\nimport { Observable, Subject, of } from 'rxjs';\nimport { HttpCode } from './util/http-code';\nimport { pluck, tap, map } from 'rxjs/operators';\nimport { DotcmsEventsService } from './dotcms-events.service';\nimport { HttpResponse } from '@angular/common/http';\n\nexport interface DotLoginParams {\n login: string;\n password: string;\n rememberMe: boolean;\n language: string;\n backEndLogin: boolean;\n}\n\nexport const LOGOUT_URL = '/dotAdmin/logout';\n\n/**\n * This Service get the server configuration to display in the login component\n * and execute the login and forgot password routines\n */\n@Injectable()\nexport class LoginService {\n private _auth$: Subject = new Subject();\n private _logout$: Subject = new Subject();\n private _auth: Auth;\n private _loginAsUsersList$: Subject;\n private country = '';\n private lang = '';\n private urls: any;\n\n constructor(\n private coreWebService: CoreWebService,\n private dotcmsEventsService: DotcmsEventsService\n ) {\n this._loginAsUsersList$ = >new Subject();\n this.urls = {\n changePassword: 'v1/changePassword',\n getAuth: 'v1/authentication/logInUser',\n loginAs: 'v1/users/loginas',\n logout: 'v1/logout',\n logoutAs: 'v1/users/logoutas',\n recoverPassword: 'v1/forgotpassword',\n serverInfo: 'v1/loginform',\n userAuth: 'v1/authentication',\n current: '/api/v1/users/current/'\n };\n\n // when the session is expired/destroyed\n dotcmsEventsService.subscribeTo('SESSION_DESTROYED').subscribe(() => this.logOutUser());\n }\n\n /**\n * Get current logged in user\n *\n * @return {*} {Observable}\n * @memberof LoginService\n */\n getCurrentUser(): Observable {\n return this.coreWebService\n .request({\n url: this.urls.current\n })\n .pipe(map((res: HttpResponse) => res)) as unknown as Observable\n }\n\n get loginAsUsersList$(): Observable {\n return this._loginAsUsersList$.asObservable();\n }\n\n get auth$(): Observable {\n return this._auth$.asObservable();\n }\n\n get logout$(): Observable {\n return this._logout$.asObservable();\n }\n\n get auth(): Auth {\n return this._auth;\n }\n\n get isLogin$(): Observable {\n if (!!this.auth && !!this.auth.user) {\n return of(true);\n }\n\n return this.loadAuth().pipe(map((auth) => !!auth && !!auth.user));\n }\n\n /**\n * Load _auth information.\n * @returns Observable\n */\n public loadAuth(): Observable {\n return this.coreWebService\n .requestView({\n url: this.urls.getAuth\n })\n .pipe(\n pluck('entity'),\n tap((auth: Auth) => {\n if (auth.user) {\n this.setAuth(auth);\n }\n }),\n map((auth: Auth) => auth)\n );\n }\n\n /**\n * Change password\n * @param password\n * @param token\n * @returns Observable\n */\n public changePassword(password: string, token: string): Observable {\n const body = JSON.stringify({ password: password, token: token });\n\n return this.coreWebService.requestView({\n body: body,\n method: 'POST',\n url: this.urls.changePassword\n });\n }\n\n /**\n * Get the server information to configure the login component\n * @param language language and country to get the internationalized messages\n * @param i18nKeys array of message key to internationalize\n * @returns Observable Observable with an array of internationalized messages and server configuration info\n */\n public getLoginFormInfo(language: string, i18nKeys: Array): Observable {\n this.setLanguage(language);\n\n return this.coreWebService.requestView({\n body: { messagesKey: i18nKeys, language: this.lang, country: this.country },\n method: 'POST',\n url: this.urls.serverInfo\n });\n }\n\n /**\n * Do the login as request and return an Observable.\n * @param user user to loginas\n * @param password loginin user's password\n * @returns Observable\n */\n // TODO: password in the url is a no-no, fix asap. Sanchez and Jose have an idea.\n public loginAs(userData: { user: User; password: string }): Observable {\n return this.coreWebService\n .requestView({\n body: {\n password: userData.password,\n userId: userData.user.userId\n },\n method: 'POST',\n url: this.urls.loginAs\n })\n .pipe(\n map((res) => {\n if (!res.entity.loginAs) {\n throw res.errorsMessages;\n }\n\n this.setAuth({\n loginAsUser: userData.user,\n user: this._auth.user,\n isLoginAs: true\n });\n return res;\n }),\n pluck('entity', 'loginAs')\n );\n }\n\n /**\n * Executes the call to the login rest api\n * @param login User email or user id\n * @param password User password\n * @param rememberMe boolean indicating if the _auth want to use or not the remenber me option\n * @param language string with the language and country code, ex: en_US\n * @returns an array with the user if the user logged in successfully or the error message\n */\n public loginUser({\n login,\n password,\n rememberMe,\n language,\n backEndLogin\n }: DotLoginParams): Observable {\n this.setLanguage(language);\n\n return this.coreWebService\n .requestView({\n body: {\n userId: login,\n password: password,\n rememberMe: rememberMe,\n language: this.lang,\n country: this.country,\n backEndLogin: backEndLogin\n },\n method: 'POST',\n url: this.urls.userAuth\n })\n .pipe(\n map((response) => {\n const auth = {\n loginAsUser: null,\n user: response.entity,\n isLoginAs: false\n };\n\n this.setAuth(auth);\n this.coreWebService\n .subscribeToHttpError(HttpCode.UNAUTHORIZED)\n .subscribe(() => {\n this.logOutUser();\n });\n return response.entity;\n })\n );\n }\n\n /**\n * Logout \"login as\" user\n * @returns Observable\n */\n public logoutAs(): Observable {\n return this.coreWebService\n .requestView({\n method: 'PUT',\n url: `${this.urls.logoutAs}`\n })\n .pipe(\n map((res) => {\n this.setAuth({\n loginAsUser: null,\n user: this._auth.user,\n isLoginAs: true\n });\n return res;\n })\n );\n }\n\n /**\n * Executes the call to the recover passwrod rest api\n * @param email User email address\n * @returns an array with message indicating if the recover password was successfull\n * or if there is an error\n */\n public recoverPassword(login: string): Observable {\n return this.coreWebService.requestView({\n body: { userId: login },\n method: 'POST',\n url: this.urls.recoverPassword\n });\n }\n\n /**\n * Subscribe to ser change and call received function on change.\n * @param func function will call when user change\n */\n public watchUser(func: Function): void {\n if (this.auth) {\n func(this.auth);\n }\n\n this.auth$.subscribe((auth) => {\n if (auth.user) {\n func(auth);\n }\n });\n }\n\n /**\n * Set logged_auth and update auth Observable\n * @param _auth\n */\n public setAuth(auth: Auth): void {\n this._auth = auth;\n this._auth$.next(auth);\n\n // When not logged user we need to fire the observable chain\n if (!auth.user) {\n this._logout$.next();\n } else {\n this.dotcmsEventsService.start();\n }\n }\n\n /**\n * update the language and country variables from the string\n * @param language string containing the language and country\n */\n private setLanguage(language: string): void {\n if (language !== undefined && language !== '') {\n const languageDesc = language.split('_');\n this.lang = languageDesc[0];\n this.country = languageDesc[1];\n } else {\n this.lang = '';\n this.country = '';\n }\n }\n\n /**\n * Call the logout rest api\n * @returns Observable\n */\n private logOutUser(): void {\n window.location.href = `${LOGOUT_URL}?r=${new Date().getTime()}`;\n }\n}\n\nexport interface CurrentUser {\n email: string;\n givenName: string;\n loginAs: boolean\n roleId: string;\n surname: string;\n userId: string;\n}\n\nexport interface User {\n active?: boolean;\n actualCompanyId?: string;\n birthday?: number; // Timestamp\n comments?: string;\n companyId?: string;\n createDate?: number; // Timestamp\n deleteDate?: number; // Timestamp\n deleteInProgress?: boolean;\n emailAddress: string;\n failedLoginAttempts?: number;\n female?: boolean;\n firstName: string;\n fullName?: string;\n id?: string;\n languageId?: string;\n lastLoginDate?: number; // Timestamp\n lastLoginIP?: string;\n lastName: string;\n male?: boolean;\n middleName?: string;\n modificationDate?: number; // Timestamp\n name?: string;\n nickname?: string;\n requestPassword?: boolean;\n timeZoneId?: string;\n type?: string;\n userId: string;\n password?: string;\n}\n\nexport interface Auth {\n user: User;\n loginAsUser: User;\n isLoginAs?: boolean;\n}\n", + "properties": [ + { + "name": "isLoginAs", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 365 + }, + { + "name": "loginAsUser", + "deprecated": false, + "deprecationMessage": "", + "type": "User", + "optional": false, + "description": "", + "line": 364 + }, + { + "name": "user", + "deprecated": false, + "deprecationMessage": "", + "type": "User", + "optional": false, + "description": "", + "line": 363 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "BubbleLinkFormOptions", + "id": "interface-BubbleLinkFormOptions-b38b86d1e54e712264c72fae660a36e7ba7bda09d34042fa8991939f3d2ee15e1d66721e76ac86146df90b54216188b47ce2a78dfaa1182e144d0804e2e8e76a", + "file": "libs/block-editor/src/lib/extensions/bubble-link-form.extension.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Extension } from '@tiptap/core';\nimport { PluginKey } from 'prosemirror-state';\nimport { BubbleMenuLinkFormComponent } from './components/bubble-menu-link-form/bubble-menu-link-form.component';\nimport { Injector, ComponentFactoryResolver } from '@angular/core';\nimport { bubbleLinkFormPlugin } from '../plugins/bubble-link-form.plugin';\nimport { Props } from 'tippy.js';\n\nexport interface BubbleLinkFormOptions {\n pluginKey: PluginKey;\n tippyOptions?: Partial;\n element: HTMLElement | null;\n}\nexport interface PluginStorage {\n show: boolean;\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n bubbleLinkForm: {\n toogleLinkForm: () => ReturnType;\n };\n }\n\n interface Storage {\n bubbleLinkForm: PluginStorage;\n }\n}\nexport const LINK_FORM_PLUGIN_KEY = new PluginKey('addLink');\n\nexport const BubbleLinkFormExtension = (injector: Injector, resolver: ComponentFactoryResolver) => {\n\n return Extension.create({\n name: 'bubbleLinkForm',\n defaultOptions: {\n element: null,\n tippyOptions: {},\n pluginKey: LINK_FORM_PLUGIN_KEY,\n },\n\n addStorage() {\n return {\n show: true\n }\n },\n\n addCommands() {\n return {\n toogleLinkForm: () => ({ commands }) => {\n this.storage.show = !this.storage.show;\n return commands.setHighlight();\n }\n }\n },\n\n addProseMirrorPlugins() {\n const factory = resolver.resolveComponentFactory(BubbleMenuLinkFormComponent);\n const component = factory.create(injector);\n component.changeDetectorRef.detectChanges();\n \n return [\n bubbleLinkFormPlugin({\n pluginKey: this.options.pluginKey,\n editor: this.editor,\n element: component.location.nativeElement,\n tippyOptions: this.options.tippyOptions,\n storage: this.storage,\n component: component\n }) \n ]\n },\n })\n}\n", + "properties": [ + { + "name": "element", + "deprecated": false, + "deprecationMessage": "", + "type": "HTMLElement | null", + "optional": false, + "description": "", + "line": 11 + }, + { + "name": "pluginKey", + "deprecated": false, + "deprecationMessage": "", + "type": "PluginKey", + "optional": false, + "description": "", + "line": 9 + }, + { + "name": "tippyOptions", + "deprecated": false, + "deprecationMessage": "", + "type": "Partial", + "optional": true, + "description": "", + "line": 10 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "BubbleLinkFormProps", + "id": "interface-BubbleLinkFormProps-fe365a70a36237c43ca41aa3a5e6097f87a6f382f0c232ae2fb7f346fc4eae18349c3c6cca0ffd4df9032e24f345affa7c232db4daeaf450b62296f6debfac06", + "file": "libs/block-editor/src/lib/plugins/bubble-link-form.plugin.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Editor, posToDOMRect, isNodeSelection } from '@tiptap/core';\nimport { EditorState, Plugin, PluginKey, Transaction } from 'prosemirror-state';\nimport { EditorView } from 'prosemirror-view';\nimport tippy, { Instance, Props } from 'tippy.js';\n\nimport { ComponentRef } from '@angular/core';\nimport { BubbleMenuLinkFormComponent } from '../extensions/components/bubble-menu-link-form/bubble-menu-link-form.component';\n\n// Interface\nimport { PluginStorage } from '../extensions/bubble-link-form.extension';\n\ninterface PluginState {\n toggle: boolean;\n}\n\nexport interface BubbleLinkFormProps {\n pluginKey: PluginKey;\n editor: Editor;\n element: HTMLElement;\n tippyOptions?: Partial;\n storage: PluginStorage;\n component?: ComponentRef;\n}\n\nexport type BubbleLinkFormViewProps = BubbleLinkFormProps & {\n view: EditorView;\n};\n\nexport class BubbleLinkFormView {\n public editor: Editor;\n\n public element: HTMLElement;\n\n public view: EditorView;\n\n public tippy: Instance | undefined;\n\n public tippyOptions?: Partial;\n\n public pluginKey: PluginKey;\n\n public component?: ComponentRef;\n\n public storage: PluginStorage;\n\n constructor({\n editor,\n element,\n view,\n tippyOptions = {},\n pluginKey,\n storage,\n component\n }: BubbleLinkFormViewProps) {\n this.editor = editor;\n this.element = element;\n this.view = view;\n\n this.tippyOptions = tippyOptions;\n\n // Detaches menu content from its current parent\n this.element.remove();\n this.element.style.visibility = 'visible';\n this.pluginKey = pluginKey;\n this.component = component;\n this.storage = storage;\n\n this.editor.on('focus', this.focusHandler);\n this.setComponentEvents();\n }\n\n update(view: EditorView, prevState?: EditorState): void {\n const next = this.pluginKey.getState(view.state);\n const prev = this.pluginKey.getState(prevState);\n\n // Check that the current plugin state is different to previous plugin state.\n if (next.toggle === prev.toggle) {\n this.detectLinkFormChanges();\n return;\n }\n\n this.createTooltip();\n \n this.tippy?.state.isVisible ? this.hide() : this.show();\n this.detectLinkFormChanges();\n }\n\n focusHandler = () => {\n if (this.tippy?.state.isVisible) {\n this.hide();\n }\n };\n\n createTooltip() {\n const { element: editorElement } = this.editor.options\n const editorIsAttached = !!editorElement.parentElement\n\n if (this.tippy || !editorIsAttached) {\n return\n }\n\n this.tippy = tippy(editorElement, {\n duration: 250,\n getReferenceClientRect: null,\n content: this.element,\n interactive: true,\n trigger: 'manual',\n placement: 'bottom',\n hideOnClick: 'toggle',\n ...this.tippyOptions\n });\n }\n\n show() {\n this.tippy?.show();\n // Afther show the component set values\n this.setInputValues();\n this.focusInput();\n this.setTippyPosition();\n }\n\n hide() {\n this.tippy?.hide();\n // Afther show the component focus editor\n this.editor.view.focus();\n this.editor.commands.unsetHighlight();\n }\n\n setTippyPosition() {\n const { view } = this.editor;\n const { state } = view;\n const { selection } = state;\n const { ranges } = selection;\n const from = Math.min(...ranges.map((range) => range.$from.pos));\n const to = Math.max(...ranges.map((range) => range.$to.pos));\n this.tippy.setProps({\n getReferenceClientRect: () => {\n if (isNodeSelection(state.selection)) {\n const node = view.nodeDOM(from) as HTMLElement;\n if (node) {\n return node.getBoundingClientRect();\n }\n }\n return posToDOMRect(view, from, to);\n }\n });\n }\n\n addLink(link: string) {\n if (link) {\n this.editor.commands.setLink({ href: link });\n }\n this.hide();\n }\n\n removeLink() {\n this.editor.commands.unsetLink();\n this.hide();\n }\n\n setInputValues() {\n this.component.instance.nodeLink = this.getNodeLink();\n this.component.instance.newLink = this.getNodeLink() || this.getLinkSelect();\n }\n\n focusInput() {\n this.component.instance.focusInput();\n }\n\n setComponentEvents() {\n this.component.instance.hideForm.subscribe(() => this.hide());\n this.component.instance.removeLink.subscribe(() => this.removeLink());\n this.component.instance.setLink.subscribe((event) => this.addLink(event));\n }\n\n detectLinkFormChanges() {\n this.component.changeDetectorRef.detectChanges();\n }\n\n getNodeLink(): string {\n return this.editor.isActive('link') ? this.editor.getAttributes('link').href : '';\n }\n\n getLinkSelect() {\n const { state } = this.editor;\n const { from, to } = state.selection;\n const text = state.doc.textBetween(from, to, ' ');\n\n return this.isLink(text) ? text : '';\n }\n\n isLink(nodeText: string) {\n const pattern = new RegExp(\n '^(https?:\\\\/\\\\/)?' + // protocol\n '((([a-z\\\\d]([a-z\\\\d-]*[a-z\\\\d])*)\\\\.)+[a-z]{2,}|' + // domain name\n '((\\\\d{1,3}\\\\.){3}\\\\d{1,3}))' + // OR ip (v4) address\n '(\\\\:\\\\d+)?(\\\\/[-a-z\\\\d%_.~+]*)*' + // port and path\n '(\\\\?[;&a-z\\\\d%_.~+=-]*)?' + // query string\n '(\\\\#[-a-z\\\\d_]*)?$',\n 'i'\n ); // fragment locator\n return !!pattern.test(nodeText);\n }\n\n destroy() {\n this.tippy?.destroy();\n this.editor.off('focus', this.focusHandler);\n }\n}\n\nexport const bubbleLinkFormPlugin = (options: BubbleLinkFormProps) => {\n return new Plugin({\n key: options.pluginKey as PluginKey,\n view: (view) => new BubbleLinkFormView({ view, ...options }),\n state: {\n init(): PluginState {\n return {\n toggle: true\n };\n },\n\n apply(transaction: Transaction): PluginState {\n const transactionMeta = transaction.getMeta(options.pluginKey);\n if (transactionMeta) {\n return {\n toggle: options.storage.show\n };\n }\n\n return {\n toggle: options.storage.show\n };\n }\n }\n });\n};\n", + "properties": [ + { + "name": "component", + "deprecated": false, + "deprecationMessage": "", + "type": "ComponentRef", + "optional": true, + "description": "", + "line": 22 + }, + { + "name": "editor", + "deprecated": false, + "deprecationMessage": "", + "type": "Editor", + "optional": false, + "description": "", + "line": 18 + }, + { + "name": "element", + "deprecated": false, + "deprecationMessage": "", + "type": "HTMLElement", + "optional": false, + "description": "", + "line": 19 + }, + { + "name": "pluginKey", + "deprecated": false, + "deprecationMessage": "", + "type": "PluginKey", + "optional": false, + "description": "", + "line": 17 + }, + { + "name": "storage", + "deprecated": false, + "deprecationMessage": "", + "type": "PluginStorage", + "optional": false, + "description": "", + "line": 21 + }, + { + "name": "tippyOptions", + "deprecated": false, + "deprecationMessage": "", + "type": "Partial", + "optional": true, + "description": "", + "line": 20 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "BubbleMenuItem", + "id": "interface-BubbleMenuItem-e1e3032abc373ecbae0c3369a8d5cac2db0f45046ad81fcfc4b6f4ab49d7607c97e658eb47c7ef17033c95674e69997a42a9b0ff59e6fc9f36f82abf59bc9ef6", + "file": "libs/block-editor/src/lib/extensions/components/bubble-menu/bubble-menu.component.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Component, Input, OnInit } from '@angular/core';\nimport { Editor } from '@tiptap/core';\n\nexport interface BubbleMenuItem {\n icon: string;\n markAction: string;\n active: boolean;\n divider?: boolean;\n}\n\n@Component({\n selector: 'dotcms-bubble-menu',\n templateUrl: './bubble-menu.component.html',\n styleUrls: ['./bubble-menu.component.scss']\n})\nexport class BubbleMenuComponent implements OnInit {\n @Input() editor: Editor;\n\n public enabledMarks: string[] = [];\n public textAlings: string[] = ['left', 'center', 'right'];\n public activeMarks: string[] = [];\n\n public items: BubbleMenuItem[] = [\n {\n icon: 'format_bold',\n markAction: 'bold',\n active: false\n },\n {\n icon: 'format_underlined',\n markAction: 'underline',\n active: false\n },\n {\n icon: 'format_italic',\n markAction: 'italic',\n active: false\n },\n {\n icon: 'strikethrough_s',\n markAction: 'strike',\n active: false,\n divider: true\n },\n {\n icon: 'format_align_left',\n markAction: 'left',\n active: false\n },\n {\n icon: 'format_align_center',\n markAction: 'center',\n active: false\n },\n {\n icon: 'format_align_right',\n markAction: 'right',\n active: false,\n divider: true\n },\n {\n icon: 'format_list_bulleted',\n markAction: 'bulletList',\n active: false\n },\n {\n icon: 'format_list_numbered',\n markAction: 'orderedList',\n active: false\n },\n {\n icon: 'format_indent_decrease',\n markAction: 'outdent',\n active: false\n },\n {\n icon: 'format_indent_increase',\n markAction: 'indent',\n active: false,\n divider: true\n },\n {\n icon: 'link',\n markAction: 'link',\n active: false,\n divider: true\n },\n {\n icon: 'format_clear',\n markAction: 'clearAll',\n active: false\n }\n ];\n\n ngOnInit() {\n this.setEnabledMarks();\n\n /**\n * Every time the selection is updated, the active state of the buttons must be updated.\n */\n this.editor.on('transaction', () => {\n this.setActiveMarks();\n this.updateActiveItems();\n });\n }\n\n command(item: BubbleMenuItem): void {\n this.menuActions(item);\n this.setActiveMarks();\n this.updateActiveItems();\n }\n\n preventDeSelection(event: MouseEvent): void {\n event.preventDefault();\n }\n\n private menuActions(item: BubbleMenuItem): void {\n const markActions = {\n bold: () => {\n this.editor.commands.toggleBold();\n },\n italic: () => {\n this.editor.commands.toggleItalic();\n },\n strike: () => {\n this.editor.commands.toggleStrike();\n },\n underline: () => {\n this.editor.commands.toggleUnderline();\n },\n left: () => {\n this.toggleTextAlign('left', item.active);\n },\n center: () => {\n this.toggleTextAlign('center', item.active);\n },\n right: () => {\n this.toggleTextAlign('right', item.active);\n },\n bulletList: () => {\n this.editor.commands.toggleBulletList();\n },\n orderedList: () => {\n this.editor.commands.toggleOrderedList();\n },\n indent: () => {\n if (this.isListNode()) {\n this.editor.commands.sinkListItem('listItem');\n }\n },\n outdent: () => {\n if (this.isListNode()) {\n this.editor.commands.liftListItem('listItem');\n }\n },\n link: () => {\n this.editor.commands.toogleLinkForm();\n },\n clearAll: () => {\n this.editor.commands.unsetAllMarks();\n this.editor.commands.clearNodes();\n }\n };\n\n markActions[item.markAction] ? markActions[item.markAction]() : null;\n }\n\n private updateActiveItems(): void {\n this.items.forEach((item) => {\n if (this.activeMarks.includes(item.markAction)) {\n item.active = true;\n } else {\n item.active = false;\n }\n });\n }\n\n private toggleTextAlign(aligment: string, active: boolean): void {\n if (active) {\n this.editor.commands.unsetTextAlign();\n } else {\n this.editor.commands.setTextAlign(aligment);\n }\n }\n\n private isListNode(): boolean {\n return this.editor.isActive('bulletList') || this.editor.isActive('orderedList');\n }\n\n private setEnabledMarks(): void {\n this.enabledMarks = [...Object.keys(this.editor.schema.marks), ...Object.keys(this.editor.schema.nodes)];\n }\n\n private setActiveMarks(): void {\n this.activeMarks = [\n ...this.enabledMarks.filter((mark) => this.editor.isActive(mark)),\n ...this.textAlings.filter((alignment) => this.editor.isActive({ textAlign: alignment }))\n ];\n }\n}", + "properties": [ + { + "name": "active", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 7 + }, + { + "name": "divider", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 8 + }, + { + "name": "icon", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 5 + }, + { + "name": "markAction", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 6 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "ButtonAction", + "id": "interface-ButtonAction-0b05f0c947018f7e3534d7839b895f8696329d8d7250b894a277cf27eac177c874d4367724e47e850cd21c55b4f5135cad33e5f80a8dfef3490a6b891298846b", + "file": "apps/dotcms-ui/src/app/shared/models/action-header/button-action.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { ButtonModel } from './button.model';\n\nexport interface ButtonAction {\n label: string;\n model: ButtonModel[];\n}\n", + "properties": [ + { + "name": "label", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 4 + }, + { + "name": "model", + "deprecated": false, + "deprecationMessage": "", + "type": "ButtonModel[]", + "optional": false, + "description": "", + "line": 5 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "ButtonModel", + "id": "interface-ButtonModel-5069502f6f0e88ad7f022bbb6e82aa7baa99d03a20fb0a2df27245daa0e9d40409b457ce3adb9113a6c58a8457b7a95fc215902e9f80064e8709636d45f90046", + "file": "apps/dotcms-ui/src/app/shared/models/action-header/button.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { ActionHeaderDeleteOptions } from './action-header-delete-options.model';\n\nexport interface ButtonModel {\n command: any;\n deleteOptions?: ActionHeaderDeleteOptions;\n icon?: string;\n isDelete?: boolean;\n label: string;\n}\n", + "properties": [ + { + "name": "command", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": false, + "description": "", + "line": 4 + }, + { + "name": "deleteOptions", + "deprecated": false, + "deprecationMessage": "", + "type": "ActionHeaderDeleteOptions", + "optional": true, + "description": "", + "line": 5 + }, + { + "name": "icon", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 6 + }, + { + "name": "isDelete", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 7 + }, + { + "name": "label", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 8 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "CanDeactivateGuarded", + "id": "interface-CanDeactivateGuarded-cdb7919e3bdb8665cb36c3e57239cefaa89d2e575339bf7f81d63f5db5c5f42aedd0e58711767561f434885b2ffdc7d9b8e25cbd953e7dd26ac2e85f6e8f2258", + "file": "apps/dotcms-ui/src/app/api/services/guards/layout-editor-can-deactivate-guard.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Injectable } from '@angular/core';\nimport { CanDeactivate } from '@angular/router';\nimport { DotEditLayoutService } from '../dot-edit-layout/dot-edit-layout.service';\nimport { filter } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\n\n/**\n *\n * @export\n * @interface CanDeactivateGuarded\n */\nexport interface CanDeactivateGuarded {\n canDeactivate: () => Observable;\n}\n\n/**\n *\n * Allows to set whether a route can be deactivated.\n * @export\n * @class LayoutEditorCanDeactivateGuardService\n * @implements {CanDeactivate}\n */\n@Injectable()\nexport class LayoutEditorCanDeactivateGuardService implements CanDeactivate {\n\n constructor(private dotEditLayoutService: DotEditLayoutService) {}\n\n /**\n *\n * Make sure the changes have been saved before leaving the route.\n * @return {*} {Observable}\n * @memberof LayoutEditorCanDeactivateGuardService\n */\n canDeactivate(): Observable {\n return this.dotEditLayoutService.canBeDesactivated$.pipe(\n filter((res) => {\n if(!res) {\n this.dotEditLayoutService.changeMessageState(!res);\n }\n return res;\n })\n );\n }\n}\n", + "properties": [ + { + "name": "canDeactivate", + "deprecated": false, + "deprecationMessage": "", + "type": "function", + "optional": false, + "description": "", + "line": 13 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "Car", + "id": "interface-Car-479989afa6baa45b545b67a005c8c20cc9dad8aaa3baecafb141e80397437ee13f0a62c0e2de5aa2b2ebb8b7af3a42db1becebc0ae6eb079ffa17a98f9c2527d", + "file": "apps/dotcms-ui/src/stories/primeng/misc/Defer.component.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Component } from '@angular/core';\nimport { MessageService } from 'primeng/api';\n\nexport interface Car {\n vin?;\n year?;\n brand?;\n color?;\n price?;\n saleDate?;\n}\n\n@Component({\n selector: 'app-p-defer',\n template: `\n
Table is not loaded yet, scroll down to initialize it.
\n\n \n\n
\n \n \n \n \n Vin\n Year\n Brand\n Color\n \n \n \n \n {{ car.vin }}\n {{ car.year }}\n {{ car.brand }}\n {{ car.color }}\n \n \n \n \n
\n `\n})\nexport class DeferComponent {\n cars: [];\n\n constructor(private messageService: MessageService) {}\n\n ngOnInit() {\n console.log('object');\n }\n\n initData() {\n this.messageService.add({\n severity: 'success',\n summary: 'Data Initialized',\n detail: 'Render Completed'\n });\n }\n}\n", + "properties": [ + { + "name": "brand", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": true, + "description": "", + "line": 7 + }, + { + "name": "color", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": true, + "description": "", + "line": 8 + }, + { + "name": "price", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": true, + "description": "", + "line": 9 + }, + { + "name": "saleDate", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": true, + "description": "", + "line": 10 + }, + { + "name": "vin", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": true, + "description": "", + "line": 5 + }, + { + "name": "year", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": true, + "description": "", + "line": 6 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "CardinalitySorted", + "id": "interface-CardinalitySorted-e501d1c7aee0ba7109845799402da990655995a43830497c4be67e1d13ef508b34e70cac24497a5f85fee26d2e321a87fe7b37940801999177caca96610d5fa6", + "file": "apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/components/fields/content-type-fields-properties-form/field-properties/dot-relationships-property/dot-edit-relationship/dot-edit-relationships.component.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Component, OnInit, EventEmitter, Output } from '@angular/core';\nimport { PaginatorService } from '@services/paginator';\nimport { of as observableOf, Observable } from 'rxjs';\nimport { map, flatMap, toArray, switchMap } from 'rxjs/operators';\nimport { DotRelationshipsPropertyValue } from '../model/dot-relationships-property-value.model';\nimport { DotRelationship } from '../model/dot-relationship.model';\nimport { DotEditContentTypeCacheService } from '../services/dot-edit-content-type-cache.service';\nimport { DotRelationshipService } from '../services/dot-relationship.service';\nimport { DotRelationshipCardinality } from '../model/dot-relationship-cardinality.model';\n\n/**\n *Cardinalities sorted by id\n *\n * @interface CardinalitySorted\n */\ninterface CardinalitySorted {\n [id: number]: DotRelationshipCardinality;\n}\n\n/**\n *List the orphans relationships for a content type. The content type to filter the relationships\n *is take from {@see DotEditContentTypeCacheService}\n *\n * @export\n * @class DotEditRelationshipsComponent\n * @implements {OnInit}\n */\n@Component({\n providers: [PaginatorService],\n selector: 'dot-edit-relationships',\n templateUrl: './dot-edit-relationships.component.html'\n})\nexport class DotEditRelationshipsComponent implements OnInit {\n @Output()\n change: EventEmitter = new EventEmitter();\n\n currentPage: Observable<{ label: string; relationship: DotRelationship }[]>;\n\n private cardinalities: CardinalitySorted;\n\n constructor(\n public dotPaginatorService: PaginatorService,\n private dotEditContentTypeCacheService: DotEditContentTypeCacheService,\n private dotRelationshipService: DotRelationshipService\n ) {}\n\n ngOnInit() {\n this.dotPaginatorService.url = 'v1/relationships';\n }\n\n /**\n *Filter relationchips by name\n *\n * @param {string} filter\n * @memberof DotEditRelationshipsComponent\n */\n handleFilterChange(filter: string): void {\n this.getRelationshipList(filter);\n }\n\n /**\n *Change relationships current page\n *\n * @param {{filter: string, first: number}} event\n * @memberof DotEditRelationshipsComponent\n */\n handlePageChange(event: { filter: string; first: number }): void {\n this.getRelationshipList(event.filter, event.first);\n }\n\n /**\n *Trigger a change event, it send a object with the current content type's variable and\n *\n * @param {DotRelationship} relationship relationship selected\n * @memberof DotEditRelationshipsComponent\n */\n triggerChanged(relationship: DotRelationship): void {\n this.change.next({\n velocityVar: relationship.relationTypeValue,\n cardinality: relationship.cardinality\n });\n }\n\n private getCardinalities(): Observable {\n if (!this.cardinalities) {\n return this.dotRelationshipService.loadCardinalities().pipe(\n map((relationshipCardinalities: DotRelationshipCardinality[]) => {\n this.cardinalities = {};\n\n relationshipCardinalities.forEach((cardinality: DotRelationshipCardinality) => {\n this.cardinalities[cardinality.id] = cardinality;\n });\n\n return this.cardinalities;\n })\n );\n } else {\n return observableOf(this.cardinalities);\n }\n }\n\n private getRelationshipList(filter = '', offset = 0): void {\n this.dotPaginatorService.setExtraParams(\n 'contentTypeId',\n this.dotEditContentTypeCacheService.get().id\n );\n this.dotPaginatorService.filter = filter;\n\n this.currentPage = this.getCardinalities().pipe(\n switchMap((cardinalities: CardinalitySorted) => {\n return this.dotPaginatorService.getWithOffset(offset).pipe(\n flatMap((relationships: DotRelationship[]) => relationships),\n map((relationship: DotRelationship) => {\n return {\n label: `${relationship.relationTypeValue}.${\n cardinalities[relationship.cardinality].label\n }`,\n relationship: relationship\n };\n }),\n toArray()\n );\n })\n );\n }\n}\n", + "properties": [], + "indexSignatures": [ + { + "id": "index-declaration-e501d1c7aee0ba7109845799402da990655995a43830497c4be67e1d13ef508b34e70cac24497a5f85fee26d2e321a87fe7b37940801999177caca96610d5fa6", + "args": [ + { + "name": "id", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + } + ], + "returnType": "DotRelationshipCardinality", + "line": 16, + "deprecated": false, + "deprecationMessage": "" + } + ], + "kind": 175, + "description": "

Cardinalities sorted by id

\n", + "rawdescription": "\n\nCardinalities sorted by id\n\n", + "methods": [] + }, + { + "name": "Chainable", + "id": "interface-Chainable-a13858f4debc4b70fa60bb668a414d55d98fcd5059fa7d7345548f64f7f409f162fd0c644f6d8697975aba16f9c18679b54a18b7c574505f42d2a50f87ecc928", + "file": "apps/dotcdn-e2e/src/support/commands.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "declare namespace Cypress {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface Chainable {\n login(email: string, password: string): void;\n }\n}\n//\n// -- This is a parent command --\nCypress.Commands.add('login', (email, password) => {\n console.log('Custom command example: Login', email, password);\n});\n//\n// -- This is a child command --\n// Cypress.Commands.add(\"drag\", { prevSubject: 'element'}, (subject, options) => { ... })\n//\n//\n// -- This is a dual command --\n// Cypress.Commands.add(\"dismiss\", { prevSubject: 'optional'}, (subject, options) => { ... })\n//\n//\n// -- This will overwrite an existing command --\n// Cypress.Commands.overwrite(\"visit\", (originalFn, url, options) => { ... })\n", + "properties": [], + "indexSignatures": [], + "kind": 167, + "methods": [ + { + "name": "login", + "args": [ + { + "name": "email", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "password", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 15, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "email", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "password", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ] + }, + { + "name": "Chainable", + "id": "interface-Chainable-a13858f4debc4b70fa60bb668a414d55d98fcd5059fa7d7345548f64f7f409f162fd0c644f6d8697975aba16f9c18679b54a18b7c574505f42d2a50f87ecc928-1", + "file": "apps/dotcms-block-editor-e2e/src/support/commands.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "declare namespace Cypress {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface Chainable {\n login(email: string, password: string): void;\n }\n}\n//\n// -- This is a parent command --\nCypress.Commands.add('login', (email, password) => {\n console.log('Custom command example: Login', email, password);\n});\n//\n// -- This is a child command --\n// Cypress.Commands.add(\"drag\", { prevSubject: 'element'}, (subject, options) => { ... })\n//\n//\n// -- This is a dual command --\n// Cypress.Commands.add(\"dismiss\", { prevSubject: 'optional'}, (subject, options) => { ... })\n//\n//\n// -- This will overwrite an existing command --\n// Cypress.Commands.overwrite(\"visit\", (originalFn, url, options) => { ... })\n", + "properties": [], + "indexSignatures": [], + "kind": 167, + "methods": [ + { + "name": "login", + "args": [ + { + "name": "email", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "password", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 15, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "email", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "password", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "isDuplicate": true, + "duplicateId": 1, + "duplicateName": "Chainable-1" + }, + { + "name": "ChartData", + "id": "interface-ChartData-0a774022a631c21706aa978c03179244f9ecd6e131c62b325a4b90052d58b078f50a3575b289568cca943ecac054aa18a52b874a9d679d05e5b02232a848db8b", + "file": "apps/dotcdn/src/app/app.models.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { ChartOptions } from 'chart.js';\nexport interface ChartDataSet {\n label: string;\n data: string[];\n borderColor?: string;\n fill?: boolean;\n}\n\nexport interface DotCDNStats {\n stats: {\n bandwidthPretty: string;\n bandwidthUsedChart: { [key: string]: number };\n requestsServedChart: { [key: string]: number };\n cacheHitRate: number;\n dateFrom: string;\n dateTo: string;\n geographicDistribution: unknown;\n totalBandwidthUsed: number;\n totalRequestsServed: number;\n cdnDomain: string;\n };\n}\n\nexport interface ChartData {\n labels: string[];\n datasets: ChartDataSet[];\n}\nexport interface DotChartStats {\n label: string;\n value: string;\n icon: string;\n}\n\nexport interface PurgeUrlOptions {\n hostId: string;\n invalidateAll: boolean;\n urls?: string[];\n}\nexport interface DotCDNState {\n chartBandwidthData: ChartData;\n chartRequestsData: ChartData;\n statsData: DotChartStats[];\n isChartLoading: boolean;\n cdnDomain: string;\n isPurgeUrlsLoading: boolean;\n isPurgeZoneLoading: boolean;\n}\n\nexport type CdnChartOptions = {\n bandwidthUsedChart: ChartOptions;\n requestsServedChart: ChartOptions;\n};\n\nexport interface PurgeReturnData {\n entity: { [key: string]: string | boolean };\n errors: string[];\n messages: string[];\n permissions: string[];\n i18nMessagesMap: { [key: string]: string };\n}\n\nexport const enum ChartPeriod {\n Last15Days = '15',\n Last30Days = '30',\n Last60Days = '60'\n}\n\nexport const enum LoadingState {\n IDLE = 'IDLE',\n LOADING = 'LOADING',\n LOADED = 'LOADED'\n}\n\nexport const enum Loader {\n CHART = 'CHART',\n PURGE_URLS = 'PURGE_URLS',\n PURGE_PULL_ZONE = 'PURGE_PULL_ZONE'\n}\n", + "properties": [ + { + "name": "datasets", + "deprecated": false, + "deprecationMessage": "", + "type": "ChartDataSet[]", + "optional": false, + "description": "", + "line": 26 + }, + { + "name": "labels", + "deprecated": false, + "deprecationMessage": "", + "type": "string[]", + "optional": false, + "description": "", + "line": 25 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "ChartDataSet", + "id": "interface-ChartDataSet-0a774022a631c21706aa978c03179244f9ecd6e131c62b325a4b90052d58b078f50a3575b289568cca943ecac054aa18a52b874a9d679d05e5b02232a848db8b", + "file": "apps/dotcdn/src/app/app.models.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { ChartOptions } from 'chart.js';\nexport interface ChartDataSet {\n label: string;\n data: string[];\n borderColor?: string;\n fill?: boolean;\n}\n\nexport interface DotCDNStats {\n stats: {\n bandwidthPretty: string;\n bandwidthUsedChart: { [key: string]: number };\n requestsServedChart: { [key: string]: number };\n cacheHitRate: number;\n dateFrom: string;\n dateTo: string;\n geographicDistribution: unknown;\n totalBandwidthUsed: number;\n totalRequestsServed: number;\n cdnDomain: string;\n };\n}\n\nexport interface ChartData {\n labels: string[];\n datasets: ChartDataSet[];\n}\nexport interface DotChartStats {\n label: string;\n value: string;\n icon: string;\n}\n\nexport interface PurgeUrlOptions {\n hostId: string;\n invalidateAll: boolean;\n urls?: string[];\n}\nexport interface DotCDNState {\n chartBandwidthData: ChartData;\n chartRequestsData: ChartData;\n statsData: DotChartStats[];\n isChartLoading: boolean;\n cdnDomain: string;\n isPurgeUrlsLoading: boolean;\n isPurgeZoneLoading: boolean;\n}\n\nexport type CdnChartOptions = {\n bandwidthUsedChart: ChartOptions;\n requestsServedChart: ChartOptions;\n};\n\nexport interface PurgeReturnData {\n entity: { [key: string]: string | boolean };\n errors: string[];\n messages: string[];\n permissions: string[];\n i18nMessagesMap: { [key: string]: string };\n}\n\nexport const enum ChartPeriod {\n Last15Days = '15',\n Last30Days = '30',\n Last60Days = '60'\n}\n\nexport const enum LoadingState {\n IDLE = 'IDLE',\n LOADING = 'LOADING',\n LOADED = 'LOADED'\n}\n\nexport const enum Loader {\n CHART = 'CHART',\n PURGE_URLS = 'PURGE_URLS',\n PURGE_PULL_ZONE = 'PURGE_PULL_ZONE'\n}\n", + "properties": [ + { + "name": "borderColor", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 5 + }, + { + "name": "data", + "deprecated": false, + "deprecationMessage": "", + "type": "string[]", + "optional": false, + "description": "", + "line": 4 + }, + { + "name": "fill", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 6 + }, + { + "name": "label", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 3 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "Commands", + "id": "interface-Commands-20977d308a6465d256c2cabf41b753e70019a7801710dad626f08f439bae6a139969bdc82e5c01cbe2a420b2dd2beb57e7b0b848c5064f08e333190ef322bd5e", + "file": "libs/block-editor/src/lib/extensions/actions-menu.extension.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { ComponentFactoryResolver, ComponentRef, Injector } from '@angular/core';\n\nimport { Editor, Extension, Range } from '@tiptap/core';\nimport { FloatingMenuPluginProps } from '@tiptap/extension-floating-menu';\nimport Suggestion, { SuggestionOptions, SuggestionProps } from '@tiptap/suggestion';\n\nimport tippy, { GetReferenceClientRect } from 'tippy.js';\n\nimport {\n FloatingActionsKeydownProps,\n FloatingActionsPlugin,\n FloatingActionsProps,\n FLOATING_ACTIONS_MENU_KEYBOARD\n} from '../plugins/floating.plugin';\nimport {\n SuggestionsCommandProps,\n SuggestionsComponent\n} from './components/suggestions/suggestions.component';\nimport { ActionButtonComponent } from './components/action-button/action-button.component';\n\ndeclare module '@tiptap/core' {\n interface Commands {\n actionsMenu: {\n /**\n * Add Heading\n */\n addHeading: (attr: any) => ReturnType;\n addContentletBlock: (attr: any) => ReturnType;\n };\n }\n}\n\nexport type FloatingMenuOptions = Omit & {\n element: HTMLElement | null;\n suggestion: Omit;\n};\n\nfunction getSuggestionComponent(injector: Injector, resolver: ComponentFactoryResolver) {\n const factory = resolver.resolveComponentFactory(SuggestionsComponent);\n const component = factory.create(injector);\n component.changeDetectorRef.detectChanges();\n return component;\n}\n\nfunction getTippyInstance({\n element,\n content,\n rect,\n onHide\n}: {\n element: Element;\n content: Element;\n rect: GetReferenceClientRect;\n onHide?: () => void;\n}) {\n return tippy(element, {\n appendTo: document.body,\n content: content,\n placement: 'auto-start',\n getReferenceClientRect: rect,\n showOnCreate: true,\n interactive: true,\n trigger: 'manual',\n offset: [30, 0],\n onHide\n });\n}\n\nfunction execCommand({\n editor,\n range,\n props\n}: {\n editor: Editor;\n range: Range;\n props: SuggestionsCommandProps;\n}) {\n const whatToDo = {\n dotContent: () => {\n editor.chain().addContentletBlock({ range, payload: props.payload }).run();\n },\n heading: () => {\n editor.chain().addHeading({ range, type: props.type }).run();\n },\n listOrdered: () => {\n editor.chain().deleteRange(range).toggleOrderedList().focus().run();\n },\n listUnordered: () => {\n editor.chain().deleteRange(range).toggleBulletList().focus().run();\n },\n blockQuote: () => {\n editor.chain().deleteRange(range).setBlockquote().focus().run();\n },\n codeBlock: () => {\n editor.chain().deleteRange(range).setCodeBlock().focus().run();\n },\n horizontalLine: () => {\n editor.chain().deleteRange(range).setHorizontalRule().focus().run();\n }\n };\n\n whatToDo[props.type.name]\n ? whatToDo[props.type.name]()\n : editor.chain().setTextSelection(range).focus().run();\n}\n\nexport const ActionsMenu = (injector: Injector, resolver: ComponentFactoryResolver) => {\n let myTippy;\n let suggestionsComponent: ComponentRef;\n\n /**\n * Get's called on button click or suggestion char\n *\n * @param {(SuggestionProps | FloatingActionsProps)} { editor, range, clientRect }\n */\n function onStart({ editor, range, clientRect }: SuggestionProps | FloatingActionsProps): void {\n suggestionsComponent = getSuggestionComponent(injector, resolver);\n suggestionsComponent.instance.onSelection = (item) => {\n execCommand({ editor: editor, range: range, props: item });\n };\n suggestionsComponent.instance.setFirstItemActive();\n\n myTippy = getTippyInstance({\n element: editor.view.dom,\n content: suggestionsComponent.location.nativeElement,\n rect: clientRect,\n onHide: () => {\n const transaction = editor.state.tr.setMeta(FLOATING_ACTIONS_MENU_KEYBOARD, {\n open: false\n });\n editor.view.dispatch(transaction);\n }\n });\n }\n\n /**\n * Handle the keyboard events when the suggestion are opened\n *\n * @param {FloatingActionsKeydownProps} { event }\n * @return {*} {boolean}\n */\n function onKeyDown({ event }: FloatingActionsKeydownProps): boolean {\n const { key } = event;\n\n if (key === 'Escape') {\n myTippy.hide();\n return true;\n }\n\n if (key === 'Enter') {\n suggestionsComponent.instance.execCommand();\n return true;\n }\n\n if (key === 'ArrowDown' || key === 'ArrowUp') {\n suggestionsComponent.instance.updateSelection(event);\n return true;\n }\n\n return false;\n }\n\n function onExit() {\n myTippy?.destroy();\n }\n\n return Extension.create({\n name: 'actionsMenu',\n defaultOptions: {\n pluginKey: 'actionsMenu',\n element: null,\n suggestion: {\n char: '/',\n allowSpaces: false,\n startOfLine: true,\n render: () => {\n return {\n onStart,\n onKeyDown,\n onExit\n };\n }\n }\n },\n\n addCommands() {\n return {\n addHeading: ({ range, type }) => ({ chain }) => {\n return chain()\n .focus()\n .deleteRange(range)\n .toggleHeading({ level: type.level })\n .focus()\n .run();\n },\n addContentletBlock: ({ range, payload }) => ({ chain }) => {\n return chain()\n .deleteRange(range)\n .command((data) => {\n const node = data.editor.schema.nodes.dotContent.create({\n data: payload\n });\n data.tr.replaceSelectionWith(node);\n return true;\n })\n .focus()\n .run();\n }\n };\n },\n\n addProseMirrorPlugins() {\n const factoryButton = resolver.resolveComponentFactory(ActionButtonComponent);\n const button = factoryButton.create(injector);\n\n return [\n FloatingActionsPlugin({\n command: execCommand,\n editor: this.editor,\n element: button.location.nativeElement,\n render: () => {\n return {\n onStart,\n onKeyDown,\n onExit\n };\n }\n }),\n Suggestion({\n editor: this.editor,\n ...this.options.suggestion\n })\n ];\n }\n });\n};\n", + "properties": [ + { + "name": "actionsMenu", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": false, + "description": "", + "line": 23 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "Commands", + "id": "interface-Commands-b38b86d1e54e712264c72fae660a36e7ba7bda09d34042fa8991939f3d2ee15e1d66721e76ac86146df90b54216188b47ce2a78dfaa1182e144d0804e2e8e76a-1", + "file": "libs/block-editor/src/lib/extensions/bubble-link-form.extension.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Extension } from '@tiptap/core';\nimport { PluginKey } from 'prosemirror-state';\nimport { BubbleMenuLinkFormComponent } from './components/bubble-menu-link-form/bubble-menu-link-form.component';\nimport { Injector, ComponentFactoryResolver } from '@angular/core';\nimport { bubbleLinkFormPlugin } from '../plugins/bubble-link-form.plugin';\nimport { Props } from 'tippy.js';\n\nexport interface BubbleLinkFormOptions {\n pluginKey: PluginKey;\n tippyOptions?: Partial;\n element: HTMLElement | null;\n}\nexport interface PluginStorage {\n show: boolean;\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n bubbleLinkForm: {\n toogleLinkForm: () => ReturnType;\n };\n }\n\n interface Storage {\n bubbleLinkForm: PluginStorage;\n }\n}\nexport const LINK_FORM_PLUGIN_KEY = new PluginKey('addLink');\n\nexport const BubbleLinkFormExtension = (injector: Injector, resolver: ComponentFactoryResolver) => {\n\n return Extension.create({\n name: 'bubbleLinkForm',\n defaultOptions: {\n element: null,\n tippyOptions: {},\n pluginKey: LINK_FORM_PLUGIN_KEY,\n },\n\n addStorage() {\n return {\n show: true\n }\n },\n\n addCommands() {\n return {\n toogleLinkForm: () => ({ commands }) => {\n this.storage.show = !this.storage.show;\n return commands.setHighlight();\n }\n }\n },\n\n addProseMirrorPlugins() {\n const factory = resolver.resolveComponentFactory(BubbleMenuLinkFormComponent);\n const component = factory.create(injector);\n component.changeDetectorRef.detectChanges();\n \n return [\n bubbleLinkFormPlugin({\n pluginKey: this.options.pluginKey,\n editor: this.editor,\n element: component.location.nativeElement,\n tippyOptions: this.options.tippyOptions,\n storage: this.storage,\n component: component\n }) \n ]\n },\n })\n}\n", + "properties": [ + { + "name": "bubbleLinkForm", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": false, + "description": "", + "line": 19 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [], + "isDuplicate": true, + "duplicateId": 1, + "duplicateName": "Commands-1" + }, + { + "name": "CompleteEvent", + "id": "interface-CompleteEvent-335689f1d35817f7a670d4029bf57acc594dcb4b8d2e57c4bf89db5f70caaff2abb9c0cab09f48090f9be8570b65167d33b2c36ef3e60e54ef777fc382f74a69", + "file": "apps/dotcms-ui/src/app/view/components/_common/dot-page-selector/models/dot-page-selector.models.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotPageAsset } from '../service/dot-page-selector.service';\nimport { Site } from '@dotcms/dotcms-js';\n\nexport interface DotPageSelectorItem {\n label: string;\n payload: DotPageAsset | Site | DotFolder;\n}\n\nexport interface DotSimpleURL {\n host: string;\n pathname: string;\n}\n\nexport interface DotFolder {\n hostName: string;\n path: string;\n addChildrenAllowed: boolean;\n}\n\nexport interface CompleteEvent {\n originalEvent: InputEvent;\n query: string;\n}\n", + "properties": [ + { + "name": "originalEvent", + "deprecated": false, + "deprecationMessage": "", + "type": "InputEvent", + "optional": false, + "description": "", + "line": 21 + }, + { + "name": "query", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 22 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "ConditionActionEvent", + "id": "interface-ConditionActionEvent-0b1711c16d9f15e40a82a786230a6640be390785b85223d758ab5ed0bf1c9a9e698359f37bf80cea0ea3fb29b356bb2d1e4036a1bcd9ab8d0859a2634da11f8f", + "file": "libs/dot-rules/src/lib/rule-engine.container.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { from as observableFrom, Observable, merge, Subject } from 'rxjs';\nimport { reduce, mergeMap, take, map, filter, takeUntil } from 'rxjs/operators';\n// tslint:disable-next-line:max-file-line-count\nimport { Component, EventEmitter, ViewEncapsulation, OnDestroy } from '@angular/core';\nimport {\n RuleModel,\n RuleService,\n ConditionGroupModel,\n ConditionModel,\n ActionModel,\n RuleEngineState\n} from './services/Rule';\nimport { CwChangeEvent } from './services/util/CwEvent';\nimport { ServerSideFieldModel, ServerSideTypeModel } from './services/ServerSideFieldModel';\nimport { ConditionService } from './services/Condition';\nimport { ActionService } from './services/Action';\nimport { ConditionGroupService } from './services/ConditionGroup';\nimport { CwError } from '@dotcms/dotcms-js';\nimport { BundleService, IPublishEnvironment } from './services/bundle-service';\nimport { ActivatedRoute, Params } from '@angular/router';\nimport { HttpCode } from '@dotcms/dotcms-js';\nimport { LoggerService } from '@dotcms/dotcms-js';\nimport { RuleViewService } from './services/dot-view-rule-service';\n\nexport interface ParameterChangeEvent extends CwChangeEvent {\n rule?: RuleModel;\n source?: ServerSideFieldModel;\n name: string;\n value: string;\n}\n\nexport interface TypeChangeEvent extends CwChangeEvent {\n rule?: RuleModel;\n source: ServerSideFieldModel;\n value: any;\n index: number;\n}\n\nexport interface RuleActionEvent {\n type: string;\n payload: {\n rule?: RuleModel;\n value?: string | boolean;\n };\n}\nexport interface RuleActionActionEvent extends RuleActionEvent {\n payload: {\n rule?: RuleModel;\n value?: string | boolean;\n ruleAction?: ActionModel;\n index?: number;\n name?: string;\n };\n}\nexport interface ConditionGroupActionEvent extends RuleActionEvent {\n payload: {\n rule?: RuleModel;\n value?: string | boolean;\n conditionGroup?: ConditionGroupModel;\n index?: number;\n priority?: number;\n };\n}\nexport interface ConditionActionEvent extends RuleActionEvent {\n payload: {\n rule?: RuleModel;\n value?: string | boolean;\n condition?: ConditionModel;\n conditionGroup?: ConditionGroupModel;\n index?: number;\n name?: string;\n type?: string;\n };\n}\n\n/**\n *\n */\n@Component({\n encapsulation: ViewEncapsulation.None,\n selector: 'cw-rule-engine-container',\n styleUrls: ['./styles/rule-engine.scss', './styles/angular-material.layouts.scss'],\n template: `\n \n `\n})\nexport class RuleEngineContainer implements OnDestroy {\n rules: RuleModel[];\n state: RuleEngineState = new RuleEngineState();\n\n environments: IPublishEnvironment[] = [];\n\n rules$: EventEmitter = new EventEmitter();\n ruleActions$: EventEmitter = new EventEmitter();\n conditionGroups$: EventEmitter = new EventEmitter();\n globalError: string;\n pageId: string;\n isContentletHost: boolean;\n\n private destroy$: Subject = new Subject();\n\n constructor(\n public _ruleService: RuleService,\n private _ruleActionService: ActionService,\n private _conditionGroupService: ConditionGroupService,\n private _conditionService: ConditionService,\n public bundleService: BundleService,\n private route: ActivatedRoute,\n private loggerService: LoggerService,\n private ruleViewService: RuleViewService\n ) {\n this.rules$.subscribe((rules) => {\n this.rules = rules;\n });\n\n this.bundleService\n .loadPublishEnvironments()\n .pipe(take(1))\n .subscribe((environments) => (this.environments = environments));\n this.initRules();\n\n this._ruleService._errors$.subscribe((res) => {\n this.ruleViewService.showErrorMessage(\n res.message,\n false,\n res.response.headers.get('error-key')\n );\n this.state.loading = false;\n this.state.showRules = false;\n });\n\n merge(\n this._ruleActionService.error,\n this._conditionGroupService.error,\n this._conditionService.error\n )\n .pipe(takeUntil(this.destroy$))\n .subscribe((message: string) => {\n this.ruleViewService.showErrorMessage(message);\n\n this.initRules();\n });\n }\n\n alphaSort(key): (a, b) => number {\n return (a, b) => {\n let x;\n if (a[key] > b[key]) {\n x = 1;\n } else if (a[key] < b[key]) {\n x = -1;\n } else {\n x = 0;\n }\n return x;\n };\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.complete();\n }\n\n /**\n *\n * @param event\n */\n onCreateRule(event): void {\n this.loggerService.info('RuleEngineContainer', 'onCreateRule', event);\n const priority = this.rules.length ? this.rules[0].priority + 1 : 1;\n const rule = new RuleModel({ priority });\n const group = new ConditionGroupModel({ operator: 'AND', priority: 1 });\n group._conditions.push(new ConditionModel({ _type: new ServerSideTypeModel() }));\n rule._conditionGroups.push(group);\n const action = new ActionModel(null, new ServerSideTypeModel());\n action._owningRule = rule;\n rule._ruleActions.push(action);\n rule._saved = false;\n rule._expanded = false;\n this.rules$.emit([rule].concat(this.rules));\n }\n\n onDeleteRule(event: RuleActionEvent): void {\n const rule = event.payload.rule;\n rule._deleting = true;\n this.state.deleting = true;\n if (rule.isPersisted()) {\n this._ruleService.deleteRule(rule.key).subscribe(\n (_result) => {\n this.state.deleting = false;\n const rules = this.rules.filter((arrayRule) => arrayRule.key !== rule.key);\n this.rules$.emit(rules);\n },\n (e: CwError) => {\n this._handle403Error(e) ? null : { invalid: e.message };\n }\n );\n }\n }\n\n onUpdateEnabledState(event: RuleActionEvent): void {\n event.payload.rule.enabled = event.payload.value;\n this.patchRule(event.payload.rule, false);\n }\n\n onUpdateRuleName(event: RuleActionEvent): void {\n event.payload.rule.name = event.payload.value;\n this.patchRule(event.payload.rule, false);\n }\n\n onUpdateFireOn(event: RuleActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onUpdateFireOn', event);\n event.payload.rule.fireOn = event.payload.value;\n this.patchRule(event.payload.rule, false);\n }\n\n onUpdateExpandedState(event: RuleActionEvent): void {\n const rule = event.payload.rule;\n rule._expanded = event.payload.value;\n if (rule._expanded) {\n let obs2: Observable;\n if (rule._conditionGroups.length === 0) {\n const obs: Observable<\n ConditionGroupModel[]\n > = this._conditionGroupService.allAsArray(\n rule.key,\n Object.keys(rule.conditionGroups)\n );\n obs2 = obs.pipe(\n mergeMap((groups: ConditionGroupModel[]) => observableFrom(groups))\n );\n } else {\n obs2 = observableFrom(rule._conditionGroups);\n }\n\n const obs3: Observable = obs2.pipe(\n mergeMap(\n (group: ConditionGroupModel) =>\n this._conditionService.listForGroup(\n group,\n this._ruleService._conditionTypes\n ),\n (group: ConditionGroupModel, conditions: ConditionModel[]) => {\n if (conditions) {\n conditions.forEach((condition: ConditionModel) => {\n condition.type = this._ruleService._conditionTypes[\n condition.conditionlet\n ];\n });\n }\n group._conditions = conditions;\n return group;\n }\n )\n );\n\n const obs4: Observable = obs3.pipe(\n reduce((acc: ConditionGroupModel[], group: ConditionGroupModel) => {\n acc.push(group);\n return acc;\n }, [])\n );\n\n obs4.subscribe(\n (groups: ConditionGroupModel[]) => {\n rule._conditionGroups = groups;\n if (rule._conditionGroups.length === 0) {\n this.loggerService.info(\n 'RuleEngineContainer',\n 'conditionGroups',\n 'Add stub group'\n );\n const group = new ConditionGroupModel({ operator: 'AND', priority: 1 });\n group._conditions.push(\n new ConditionModel({\n _type: new ServerSideTypeModel(),\n operator: 'AND',\n priority: 1\n })\n );\n rule._conditionGroups.push(group);\n } else {\n rule._conditionGroups.sort(this.prioritySortFn);\n rule._conditionGroups.forEach((group: ConditionGroupModel) => {\n group._conditions.sort(this.prioritySortFn);\n if (group._conditions.length === 0) {\n group._conditions.push(\n new ConditionModel({\n _type: new ServerSideTypeModel(),\n operator: 'AND',\n priority: 1\n })\n );\n }\n });\n }\n },\n (e) => {\n this.loggerService.error('RuleEngineContainer', e);\n }\n );\n\n if (rule._ruleActions.length === 0) {\n this._ruleActionService\n .allAsArray(\n rule.key,\n Object.keys(rule.ruleActions),\n this._ruleService._ruleActionTypes\n )\n .subscribe((actions) => {\n rule._ruleActions = actions;\n if (rule._ruleActions.length === 0) {\n const action = new ActionModel(null, new ServerSideTypeModel(), 1);\n rule._ruleActions.push(action);\n rule._ruleActions.sort(this.prioritySortFn);\n } else {\n rule._ruleActions.sort(this.prioritySortFn);\n }\n });\n }\n }\n }\n\n onCreateRuleAction(event: RuleActionActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onCreateRuleAction', event);\n const rule = event.payload.rule;\n const priority = rule._ruleActions.length\n ? rule._ruleActions[rule._ruleActions.length - 1].priority + 1\n : 1;\n const entity = new ActionModel(null, new ServerSideTypeModel(), priority);\n\n this.patchRule(rule, true);\n rule._ruleActions.push(entity);\n rule._saved = false;\n }\n\n onDeleteRuleAction(event: RuleActionActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onDeleteRuleAction', event);\n const rule = event.payload.rule;\n const ruleAction = event.payload.ruleAction;\n if (ruleAction.isPersisted()) {\n this._ruleActionService.remove(rule.key, ruleAction).subscribe((_result) => {\n rule._ruleActions = rule._ruleActions.filter((aryAction) => {\n return aryAction.key !== ruleAction.key;\n });\n if (rule._ruleActions.length === 0) {\n rule._ruleActions.push(new ActionModel(null, new ServerSideTypeModel(), 1));\n }\n });\n }\n }\n\n onUpdateRuleActionType(event: RuleActionActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onUpdateRuleActionType');\n try {\n const ruleAction = event.payload.ruleAction;\n const rule = event.payload.rule;\n const idx = event.payload.index;\n const type: ServerSideTypeModel = this._ruleService._ruleActionTypes[\n event.payload.value\n ];\n rule._ruleActions[idx] = new ActionModel(ruleAction.key, type, ruleAction.priority);\n this.patchAction(rule, ruleAction);\n } catch (e) {\n this.loggerService.error('RuleComponent', 'onActionTypeChange', e);\n }\n }\n\n onUpdateRuleActionParameter(event: RuleActionActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onUpdateRuleActionParameter');\n const ruleAction = event.payload.ruleAction;\n ruleAction.setParameter(event.payload.name, event.payload.value);\n this.patchAction(event.payload.rule, ruleAction);\n }\n\n onCreateConditionGroup(event: ConditionGroupActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onCreateConditionGroup');\n const rule = event.payload.rule;\n const priority = rule._conditionGroups.length\n ? rule._conditionGroups[rule._conditionGroups.length - 1].priority + 1\n : 1;\n const group = new ConditionGroupModel({ operator: 'AND', priority: priority });\n group._conditions.push(\n new ConditionModel({ _type: new ServerSideTypeModel(), operator: 'AND', priority: 1 })\n );\n rule._conditionGroups.push(group);\n rule._conditionGroups.sort(this.prioritySortFn);\n }\n\n onUpdateConditionGroupOperator(event: ConditionGroupActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onUpdateConditionGroupOperator');\n const group = event.payload.conditionGroup;\n group.operator = event.payload.value;\n if (group.key != null) {\n this.patchConditionGroup(event.payload.rule, group);\n this.patchRule(event.payload.rule);\n }\n }\n\n onDeleteConditionGroup(event: ConditionGroupActionEvent): void {\n const rule = event.payload.rule;\n const group = event.payload.conditionGroup;\n this._conditionGroupService.remove(rule.key, group).subscribe();\n rule._conditionGroups = rule._conditionGroups.filter(\n (aryGroup) => aryGroup.key !== group.key\n );\n }\n\n onCreateCondition(event: ConditionActionEvent): void {\n const rule = event.payload.rule;\n this.ruleUpdating(rule, true);\n try {\n const group = event.payload.conditionGroup;\n const priority = group._conditions.length\n ? group._conditions[group._conditions.length - 1].priority + 1\n : 1;\n const entity = new ConditionModel({\n _type: new ServerSideTypeModel(),\n operator: 'AND',\n priority: priority\n });\n group._conditions.push(entity);\n this.ruleUpdated(rule);\n } catch (e) {\n this.loggerService.error('RuleEngineContainer', 'onCreateCondition', e);\n this.ruleUpdated(rule, [{ unhandledError: e }]);\n }\n }\n\n onUpdateConditionType(event: ConditionActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onUpdateConditionType');\n try {\n let condition = event.payload.condition;\n const group = event.payload.conditionGroup;\n const rule = event.payload.rule;\n const idx = event.payload.index;\n const type: ServerSideTypeModel = this._ruleService._conditionTypes[\n event.payload.value\n ];\n // replace the condition rather than mutate it to force event for 'onPush' NG2 components.\n condition = new ConditionModel({\n _type: type,\n id: condition.key,\n operator: condition.operator,\n priority: condition.priority\n });\n group._conditions[idx] = condition;\n this.patchCondition(rule, group, condition);\n } catch (e) {\n this.loggerService.error('RuleComponent', 'onActionTypeChange', e);\n }\n }\n\n onUpdateConditionParameter(event: ConditionActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onUpdateConditionParameter');\n const condition = event.payload.condition;\n condition.setParameter(event.payload.name, event.payload.value);\n this.patchCondition(event.payload.rule, event.payload.conditionGroup, condition);\n }\n\n onUpdateConditionOperator(event: ConditionActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onUpdateConditionOperator');\n const condition = event.payload.condition;\n condition.operator = event.payload.value;\n this.patchCondition(event.payload.rule, event.payload.conditionGroup, condition);\n }\n\n onDeleteCondition(event: ConditionActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onDeleteCondition', event);\n const rule = event.payload.rule;\n const group = event.payload.conditionGroup;\n const condition = event.payload.condition;\n if (condition.isPersisted()) {\n this._conditionService.remove(condition).subscribe((_result) => {\n group._conditions = group._conditions.filter((aryCondition) => {\n return aryCondition.key !== condition.key;\n });\n if (group._conditions.length === 0) {\n this.loggerService.info(\n 'RuleEngineContainer',\n 'condition',\n 'Remove Condition and remove Groups is empty'\n );\n this._conditionGroupService.remove(rule.key, group).subscribe();\n rule._conditionGroups = rule._conditionGroups.filter(\n (aryGroup) => aryGroup.key !== group.key\n );\n }\n if (rule._conditionGroups.length === 0) {\n this.loggerService.info(\n 'RuleEngineContainer',\n 'conditionGroups',\n 'Add stub group if Groups are empty'\n );\n const conditionGroup = new ConditionGroupModel({\n operator: 'AND',\n priority: 1\n });\n conditionGroup._conditions.push(\n new ConditionModel({\n _type: new ServerSideTypeModel(),\n operator: 'AND',\n priority: 1\n })\n );\n rule._conditionGroups.push(conditionGroup);\n }\n });\n }\n }\n\n ruleUpdating(rule, disable = true): void {\n if (disable && rule.enabled && rule.key) {\n this.loggerService.info(\n 'RuleEngineContainer',\n 'ruleUpdating',\n 'disabling rule due for edit.'\n );\n this.patchRule(rule, disable);\n }\n rule._saved = false;\n rule._saving = true;\n rule._errors = null;\n }\n\n ruleUpdated(rule: RuleModel, errors?: { [key: string]: any }): void {\n rule._saving = false;\n if (!errors) {\n rule._saved = true;\n } else {\n this.loggerService.error(errors);\n rule._errors = errors;\n }\n }\n\n patchConditionGroup(rule: RuleModel, group: ConditionGroupModel, disable = true): void {\n this.ruleUpdating(rule, false);\n if (disable && rule.enabled) {\n rule.enabled = false;\n }\n this._conditionGroupService\n .updateConditionGroup(rule.key, group)\n .subscribe((_result) => {});\n }\n\n patchRule(rule: RuleModel, disable = true): void {\n this.ruleUpdating(rule, false);\n if (disable && rule.enabled) {\n rule.enabled = false;\n }\n if (rule.isValid()) {\n if (rule.isPersisted()) {\n this._ruleService.updateRule(rule.key, rule).subscribe(\n () => {\n this.ruleUpdated(rule);\n },\n (e: CwError) => {\n const ruleError = this._handle403Error(e) ? null : { invalid: e.message };\n this.ruleUpdated(rule, ruleError);\n this.initRules();\n }\n );\n } else {\n this._ruleService.createRule(rule).subscribe(\n () => {\n this.ruleUpdated(rule);\n },\n (e: CwError) => {\n const ruleError = this._handle403Error(e) ? null : { invalid: e.message };\n this.ruleUpdated(rule, ruleError);\n this.initRules();\n }\n );\n }\n } else {\n this.ruleUpdated(rule, {\n invalid: 'Cannot save, rule is not valid.'\n });\n }\n }\n\n patchAction(rule: RuleModel, ruleAction: ActionModel): void {\n if (ruleAction.isValid()) {\n this.ruleUpdating(rule, false);\n if (!ruleAction.isPersisted()) {\n this._ruleActionService.createRuleAction(rule.key, ruleAction).subscribe(\n (_) => {\n this.ruleUpdated(rule);\n },\n (e: CwError) => {\n const ruleError = this._handle403Error(e) ? null : { invalid: e.message };\n this.ruleUpdated(rule, ruleError);\n }\n );\n } else {\n this._ruleActionService.updateRuleAction(rule.key, ruleAction).subscribe(\n (_result) => {\n this.ruleUpdated(rule);\n },\n (e: any) => {\n const ruleError = this._handle403Error(e) ? null : { invalid: e.message };\n this.ruleUpdated(rule, ruleError);\n }\n );\n }\n } else {\n this.ruleUpdating(rule);\n this.ruleUpdated(rule, {\n invalid: 'Cannot save, action is not valid.'\n });\n }\n }\n\n patchCondition(rule: RuleModel, group: ConditionGroupModel, condition: ConditionModel): void {\n try {\n if (condition.isValid()) {\n this.ruleUpdating(rule, false);\n if (condition.isPersisted()) {\n this._conditionService.save(group.key, condition).subscribe(\n (_result) => {\n this.ruleUpdated(rule);\n },\n (e: any) => {\n const ruleError = this._handle403Error(e)\n ? null\n : { invalid: e.message };\n this.ruleUpdated(rule, ruleError);\n }\n );\n } else {\n if (!group.isPersisted()) {\n this._conditionGroupService\n .createConditionGroup(rule.key, group)\n .subscribe((_foo) => {\n this._conditionService.add(group.key, condition).subscribe(\n () => {\n group.conditions[condition.key] = true;\n this.ruleUpdated(rule);\n },\n (e: CwError) => {\n const ruleError = this._handle403Error(e)\n ? null\n : { invalid: e.message };\n this.ruleUpdated(rule, ruleError);\n }\n );\n });\n } else {\n this._conditionService.add(group.key, condition).subscribe(\n () => {\n group.conditions[condition.key] = true;\n this.ruleUpdated(rule);\n },\n (e: CwError) => {\n const ruleError = this._handle403Error(e)\n ? null\n : { invalid: e.message };\n this.ruleUpdated(rule, ruleError);\n }\n );\n }\n }\n } else {\n this.ruleUpdating(rule);\n this.loggerService.info('RuleEngineContainer', 'patchCondition', 'Not valid');\n rule._saving = false;\n rule._errors = { invalid: 'Condition not valid.' };\n }\n } catch (e) {\n this.loggerService.error(e);\n this.ruleUpdated(rule, { invalid: e.message });\n }\n }\n\n prioritySortFn(a: any, b: any): number {\n return a.priority - b.priority;\n }\n\n private initRules(): void {\n this.state.loading = true;\n\n this.pageId = '';\n\n const pageIdParams = this.route.params.pipe(map((params: Params) => params.pageId));\n const queryParams = this.route.queryParams.pipe(map((params: Params) => params.realmId));\n\n merge(pageIdParams, queryParams)\n .pipe(\n filter((res) => !!res),\n take(1)\n )\n .subscribe((id: string) => {\n this.pageId = id;\n });\n\n this._ruleService.requestRules(this.pageId);\n this._ruleService\n .loadRules()\n .pipe(takeUntil(this.destroy$))\n .subscribe((rules: RuleModel[]) => {\n this.loadRules(rules);\n });\n this.route.queryParams\n .pipe(take(1))\n .subscribe(\n (params: Params) => (this.isContentletHost = params.isContentletHost === 'true')\n );\n }\n\n private loadRules(rules: RuleModel[]): void {\n rules.sort((a, b) => {\n return b.priority - a.priority;\n });\n this.rules$.emit(rules);\n this.state.loading = false;\n }\n\n private _handle403Error(e: CwError): boolean {\n let handled = false;\n try {\n if (e && e.response.status === HttpCode.FORBIDDEN) {\n const errorJson = e.response;\n if (errorJson && errorJson.error) {\n this.ruleViewService.showErrorMessage(\n errorJson.error.message.replace('dotcms.api.error.forbidden: ', '')\n );\n handled = true;\n }\n }\n } catch (e) {\n this.loggerService.error('Error while processing invalid response: ', e);\n }\n\n this.initRules();\n\n return handled;\n }\n}\n", + "properties": [ + { + "name": "payload", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": false, + "description": "", + "line": 65 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [], + "extends": "RuleActionEvent" + }, + { + "name": "ConditionGroupActionEvent", + "id": "interface-ConditionGroupActionEvent-0b1711c16d9f15e40a82a786230a6640be390785b85223d758ab5ed0bf1c9a9e698359f37bf80cea0ea3fb29b356bb2d1e4036a1bcd9ab8d0859a2634da11f8f", + "file": "libs/dot-rules/src/lib/rule-engine.container.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { from as observableFrom, Observable, merge, Subject } from 'rxjs';\nimport { reduce, mergeMap, take, map, filter, takeUntil } from 'rxjs/operators';\n// tslint:disable-next-line:max-file-line-count\nimport { Component, EventEmitter, ViewEncapsulation, OnDestroy } from '@angular/core';\nimport {\n RuleModel,\n RuleService,\n ConditionGroupModel,\n ConditionModel,\n ActionModel,\n RuleEngineState\n} from './services/Rule';\nimport { CwChangeEvent } from './services/util/CwEvent';\nimport { ServerSideFieldModel, ServerSideTypeModel } from './services/ServerSideFieldModel';\nimport { ConditionService } from './services/Condition';\nimport { ActionService } from './services/Action';\nimport { ConditionGroupService } from './services/ConditionGroup';\nimport { CwError } from '@dotcms/dotcms-js';\nimport { BundleService, IPublishEnvironment } from './services/bundle-service';\nimport { ActivatedRoute, Params } from '@angular/router';\nimport { HttpCode } from '@dotcms/dotcms-js';\nimport { LoggerService } from '@dotcms/dotcms-js';\nimport { RuleViewService } from './services/dot-view-rule-service';\n\nexport interface ParameterChangeEvent extends CwChangeEvent {\n rule?: RuleModel;\n source?: ServerSideFieldModel;\n name: string;\n value: string;\n}\n\nexport interface TypeChangeEvent extends CwChangeEvent {\n rule?: RuleModel;\n source: ServerSideFieldModel;\n value: any;\n index: number;\n}\n\nexport interface RuleActionEvent {\n type: string;\n payload: {\n rule?: RuleModel;\n value?: string | boolean;\n };\n}\nexport interface RuleActionActionEvent extends RuleActionEvent {\n payload: {\n rule?: RuleModel;\n value?: string | boolean;\n ruleAction?: ActionModel;\n index?: number;\n name?: string;\n };\n}\nexport interface ConditionGroupActionEvent extends RuleActionEvent {\n payload: {\n rule?: RuleModel;\n value?: string | boolean;\n conditionGroup?: ConditionGroupModel;\n index?: number;\n priority?: number;\n };\n}\nexport interface ConditionActionEvent extends RuleActionEvent {\n payload: {\n rule?: RuleModel;\n value?: string | boolean;\n condition?: ConditionModel;\n conditionGroup?: ConditionGroupModel;\n index?: number;\n name?: string;\n type?: string;\n };\n}\n\n/**\n *\n */\n@Component({\n encapsulation: ViewEncapsulation.None,\n selector: 'cw-rule-engine-container',\n styleUrls: ['./styles/rule-engine.scss', './styles/angular-material.layouts.scss'],\n template: `\n \n `\n})\nexport class RuleEngineContainer implements OnDestroy {\n rules: RuleModel[];\n state: RuleEngineState = new RuleEngineState();\n\n environments: IPublishEnvironment[] = [];\n\n rules$: EventEmitter = new EventEmitter();\n ruleActions$: EventEmitter = new EventEmitter();\n conditionGroups$: EventEmitter = new EventEmitter();\n globalError: string;\n pageId: string;\n isContentletHost: boolean;\n\n private destroy$: Subject = new Subject();\n\n constructor(\n public _ruleService: RuleService,\n private _ruleActionService: ActionService,\n private _conditionGroupService: ConditionGroupService,\n private _conditionService: ConditionService,\n public bundleService: BundleService,\n private route: ActivatedRoute,\n private loggerService: LoggerService,\n private ruleViewService: RuleViewService\n ) {\n this.rules$.subscribe((rules) => {\n this.rules = rules;\n });\n\n this.bundleService\n .loadPublishEnvironments()\n .pipe(take(1))\n .subscribe((environments) => (this.environments = environments));\n this.initRules();\n\n this._ruleService._errors$.subscribe((res) => {\n this.ruleViewService.showErrorMessage(\n res.message,\n false,\n res.response.headers.get('error-key')\n );\n this.state.loading = false;\n this.state.showRules = false;\n });\n\n merge(\n this._ruleActionService.error,\n this._conditionGroupService.error,\n this._conditionService.error\n )\n .pipe(takeUntil(this.destroy$))\n .subscribe((message: string) => {\n this.ruleViewService.showErrorMessage(message);\n\n this.initRules();\n });\n }\n\n alphaSort(key): (a, b) => number {\n return (a, b) => {\n let x;\n if (a[key] > b[key]) {\n x = 1;\n } else if (a[key] < b[key]) {\n x = -1;\n } else {\n x = 0;\n }\n return x;\n };\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.complete();\n }\n\n /**\n *\n * @param event\n */\n onCreateRule(event): void {\n this.loggerService.info('RuleEngineContainer', 'onCreateRule', event);\n const priority = this.rules.length ? this.rules[0].priority + 1 : 1;\n const rule = new RuleModel({ priority });\n const group = new ConditionGroupModel({ operator: 'AND', priority: 1 });\n group._conditions.push(new ConditionModel({ _type: new ServerSideTypeModel() }));\n rule._conditionGroups.push(group);\n const action = new ActionModel(null, new ServerSideTypeModel());\n action._owningRule = rule;\n rule._ruleActions.push(action);\n rule._saved = false;\n rule._expanded = false;\n this.rules$.emit([rule].concat(this.rules));\n }\n\n onDeleteRule(event: RuleActionEvent): void {\n const rule = event.payload.rule;\n rule._deleting = true;\n this.state.deleting = true;\n if (rule.isPersisted()) {\n this._ruleService.deleteRule(rule.key).subscribe(\n (_result) => {\n this.state.deleting = false;\n const rules = this.rules.filter((arrayRule) => arrayRule.key !== rule.key);\n this.rules$.emit(rules);\n },\n (e: CwError) => {\n this._handle403Error(e) ? null : { invalid: e.message };\n }\n );\n }\n }\n\n onUpdateEnabledState(event: RuleActionEvent): void {\n event.payload.rule.enabled = event.payload.value;\n this.patchRule(event.payload.rule, false);\n }\n\n onUpdateRuleName(event: RuleActionEvent): void {\n event.payload.rule.name = event.payload.value;\n this.patchRule(event.payload.rule, false);\n }\n\n onUpdateFireOn(event: RuleActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onUpdateFireOn', event);\n event.payload.rule.fireOn = event.payload.value;\n this.patchRule(event.payload.rule, false);\n }\n\n onUpdateExpandedState(event: RuleActionEvent): void {\n const rule = event.payload.rule;\n rule._expanded = event.payload.value;\n if (rule._expanded) {\n let obs2: Observable;\n if (rule._conditionGroups.length === 0) {\n const obs: Observable<\n ConditionGroupModel[]\n > = this._conditionGroupService.allAsArray(\n rule.key,\n Object.keys(rule.conditionGroups)\n );\n obs2 = obs.pipe(\n mergeMap((groups: ConditionGroupModel[]) => observableFrom(groups))\n );\n } else {\n obs2 = observableFrom(rule._conditionGroups);\n }\n\n const obs3: Observable = obs2.pipe(\n mergeMap(\n (group: ConditionGroupModel) =>\n this._conditionService.listForGroup(\n group,\n this._ruleService._conditionTypes\n ),\n (group: ConditionGroupModel, conditions: ConditionModel[]) => {\n if (conditions) {\n conditions.forEach((condition: ConditionModel) => {\n condition.type = this._ruleService._conditionTypes[\n condition.conditionlet\n ];\n });\n }\n group._conditions = conditions;\n return group;\n }\n )\n );\n\n const obs4: Observable = obs3.pipe(\n reduce((acc: ConditionGroupModel[], group: ConditionGroupModel) => {\n acc.push(group);\n return acc;\n }, [])\n );\n\n obs4.subscribe(\n (groups: ConditionGroupModel[]) => {\n rule._conditionGroups = groups;\n if (rule._conditionGroups.length === 0) {\n this.loggerService.info(\n 'RuleEngineContainer',\n 'conditionGroups',\n 'Add stub group'\n );\n const group = new ConditionGroupModel({ operator: 'AND', priority: 1 });\n group._conditions.push(\n new ConditionModel({\n _type: new ServerSideTypeModel(),\n operator: 'AND',\n priority: 1\n })\n );\n rule._conditionGroups.push(group);\n } else {\n rule._conditionGroups.sort(this.prioritySortFn);\n rule._conditionGroups.forEach((group: ConditionGroupModel) => {\n group._conditions.sort(this.prioritySortFn);\n if (group._conditions.length === 0) {\n group._conditions.push(\n new ConditionModel({\n _type: new ServerSideTypeModel(),\n operator: 'AND',\n priority: 1\n })\n );\n }\n });\n }\n },\n (e) => {\n this.loggerService.error('RuleEngineContainer', e);\n }\n );\n\n if (rule._ruleActions.length === 0) {\n this._ruleActionService\n .allAsArray(\n rule.key,\n Object.keys(rule.ruleActions),\n this._ruleService._ruleActionTypes\n )\n .subscribe((actions) => {\n rule._ruleActions = actions;\n if (rule._ruleActions.length === 0) {\n const action = new ActionModel(null, new ServerSideTypeModel(), 1);\n rule._ruleActions.push(action);\n rule._ruleActions.sort(this.prioritySortFn);\n } else {\n rule._ruleActions.sort(this.prioritySortFn);\n }\n });\n }\n }\n }\n\n onCreateRuleAction(event: RuleActionActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onCreateRuleAction', event);\n const rule = event.payload.rule;\n const priority = rule._ruleActions.length\n ? rule._ruleActions[rule._ruleActions.length - 1].priority + 1\n : 1;\n const entity = new ActionModel(null, new ServerSideTypeModel(), priority);\n\n this.patchRule(rule, true);\n rule._ruleActions.push(entity);\n rule._saved = false;\n }\n\n onDeleteRuleAction(event: RuleActionActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onDeleteRuleAction', event);\n const rule = event.payload.rule;\n const ruleAction = event.payload.ruleAction;\n if (ruleAction.isPersisted()) {\n this._ruleActionService.remove(rule.key, ruleAction).subscribe((_result) => {\n rule._ruleActions = rule._ruleActions.filter((aryAction) => {\n return aryAction.key !== ruleAction.key;\n });\n if (rule._ruleActions.length === 0) {\n rule._ruleActions.push(new ActionModel(null, new ServerSideTypeModel(), 1));\n }\n });\n }\n }\n\n onUpdateRuleActionType(event: RuleActionActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onUpdateRuleActionType');\n try {\n const ruleAction = event.payload.ruleAction;\n const rule = event.payload.rule;\n const idx = event.payload.index;\n const type: ServerSideTypeModel = this._ruleService._ruleActionTypes[\n event.payload.value\n ];\n rule._ruleActions[idx] = new ActionModel(ruleAction.key, type, ruleAction.priority);\n this.patchAction(rule, ruleAction);\n } catch (e) {\n this.loggerService.error('RuleComponent', 'onActionTypeChange', e);\n }\n }\n\n onUpdateRuleActionParameter(event: RuleActionActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onUpdateRuleActionParameter');\n const ruleAction = event.payload.ruleAction;\n ruleAction.setParameter(event.payload.name, event.payload.value);\n this.patchAction(event.payload.rule, ruleAction);\n }\n\n onCreateConditionGroup(event: ConditionGroupActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onCreateConditionGroup');\n const rule = event.payload.rule;\n const priority = rule._conditionGroups.length\n ? rule._conditionGroups[rule._conditionGroups.length - 1].priority + 1\n : 1;\n const group = new ConditionGroupModel({ operator: 'AND', priority: priority });\n group._conditions.push(\n new ConditionModel({ _type: new ServerSideTypeModel(), operator: 'AND', priority: 1 })\n );\n rule._conditionGroups.push(group);\n rule._conditionGroups.sort(this.prioritySortFn);\n }\n\n onUpdateConditionGroupOperator(event: ConditionGroupActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onUpdateConditionGroupOperator');\n const group = event.payload.conditionGroup;\n group.operator = event.payload.value;\n if (group.key != null) {\n this.patchConditionGroup(event.payload.rule, group);\n this.patchRule(event.payload.rule);\n }\n }\n\n onDeleteConditionGroup(event: ConditionGroupActionEvent): void {\n const rule = event.payload.rule;\n const group = event.payload.conditionGroup;\n this._conditionGroupService.remove(rule.key, group).subscribe();\n rule._conditionGroups = rule._conditionGroups.filter(\n (aryGroup) => aryGroup.key !== group.key\n );\n }\n\n onCreateCondition(event: ConditionActionEvent): void {\n const rule = event.payload.rule;\n this.ruleUpdating(rule, true);\n try {\n const group = event.payload.conditionGroup;\n const priority = group._conditions.length\n ? group._conditions[group._conditions.length - 1].priority + 1\n : 1;\n const entity = new ConditionModel({\n _type: new ServerSideTypeModel(),\n operator: 'AND',\n priority: priority\n });\n group._conditions.push(entity);\n this.ruleUpdated(rule);\n } catch (e) {\n this.loggerService.error('RuleEngineContainer', 'onCreateCondition', e);\n this.ruleUpdated(rule, [{ unhandledError: e }]);\n }\n }\n\n onUpdateConditionType(event: ConditionActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onUpdateConditionType');\n try {\n let condition = event.payload.condition;\n const group = event.payload.conditionGroup;\n const rule = event.payload.rule;\n const idx = event.payload.index;\n const type: ServerSideTypeModel = this._ruleService._conditionTypes[\n event.payload.value\n ];\n // replace the condition rather than mutate it to force event for 'onPush' NG2 components.\n condition = new ConditionModel({\n _type: type,\n id: condition.key,\n operator: condition.operator,\n priority: condition.priority\n });\n group._conditions[idx] = condition;\n this.patchCondition(rule, group, condition);\n } catch (e) {\n this.loggerService.error('RuleComponent', 'onActionTypeChange', e);\n }\n }\n\n onUpdateConditionParameter(event: ConditionActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onUpdateConditionParameter');\n const condition = event.payload.condition;\n condition.setParameter(event.payload.name, event.payload.value);\n this.patchCondition(event.payload.rule, event.payload.conditionGroup, condition);\n }\n\n onUpdateConditionOperator(event: ConditionActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onUpdateConditionOperator');\n const condition = event.payload.condition;\n condition.operator = event.payload.value;\n this.patchCondition(event.payload.rule, event.payload.conditionGroup, condition);\n }\n\n onDeleteCondition(event: ConditionActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onDeleteCondition', event);\n const rule = event.payload.rule;\n const group = event.payload.conditionGroup;\n const condition = event.payload.condition;\n if (condition.isPersisted()) {\n this._conditionService.remove(condition).subscribe((_result) => {\n group._conditions = group._conditions.filter((aryCondition) => {\n return aryCondition.key !== condition.key;\n });\n if (group._conditions.length === 0) {\n this.loggerService.info(\n 'RuleEngineContainer',\n 'condition',\n 'Remove Condition and remove Groups is empty'\n );\n this._conditionGroupService.remove(rule.key, group).subscribe();\n rule._conditionGroups = rule._conditionGroups.filter(\n (aryGroup) => aryGroup.key !== group.key\n );\n }\n if (rule._conditionGroups.length === 0) {\n this.loggerService.info(\n 'RuleEngineContainer',\n 'conditionGroups',\n 'Add stub group if Groups are empty'\n );\n const conditionGroup = new ConditionGroupModel({\n operator: 'AND',\n priority: 1\n });\n conditionGroup._conditions.push(\n new ConditionModel({\n _type: new ServerSideTypeModel(),\n operator: 'AND',\n priority: 1\n })\n );\n rule._conditionGroups.push(conditionGroup);\n }\n });\n }\n }\n\n ruleUpdating(rule, disable = true): void {\n if (disable && rule.enabled && rule.key) {\n this.loggerService.info(\n 'RuleEngineContainer',\n 'ruleUpdating',\n 'disabling rule due for edit.'\n );\n this.patchRule(rule, disable);\n }\n rule._saved = false;\n rule._saving = true;\n rule._errors = null;\n }\n\n ruleUpdated(rule: RuleModel, errors?: { [key: string]: any }): void {\n rule._saving = false;\n if (!errors) {\n rule._saved = true;\n } else {\n this.loggerService.error(errors);\n rule._errors = errors;\n }\n }\n\n patchConditionGroup(rule: RuleModel, group: ConditionGroupModel, disable = true): void {\n this.ruleUpdating(rule, false);\n if (disable && rule.enabled) {\n rule.enabled = false;\n }\n this._conditionGroupService\n .updateConditionGroup(rule.key, group)\n .subscribe((_result) => {});\n }\n\n patchRule(rule: RuleModel, disable = true): void {\n this.ruleUpdating(rule, false);\n if (disable && rule.enabled) {\n rule.enabled = false;\n }\n if (rule.isValid()) {\n if (rule.isPersisted()) {\n this._ruleService.updateRule(rule.key, rule).subscribe(\n () => {\n this.ruleUpdated(rule);\n },\n (e: CwError) => {\n const ruleError = this._handle403Error(e) ? null : { invalid: e.message };\n this.ruleUpdated(rule, ruleError);\n this.initRules();\n }\n );\n } else {\n this._ruleService.createRule(rule).subscribe(\n () => {\n this.ruleUpdated(rule);\n },\n (e: CwError) => {\n const ruleError = this._handle403Error(e) ? null : { invalid: e.message };\n this.ruleUpdated(rule, ruleError);\n this.initRules();\n }\n );\n }\n } else {\n this.ruleUpdated(rule, {\n invalid: 'Cannot save, rule is not valid.'\n });\n }\n }\n\n patchAction(rule: RuleModel, ruleAction: ActionModel): void {\n if (ruleAction.isValid()) {\n this.ruleUpdating(rule, false);\n if (!ruleAction.isPersisted()) {\n this._ruleActionService.createRuleAction(rule.key, ruleAction).subscribe(\n (_) => {\n this.ruleUpdated(rule);\n },\n (e: CwError) => {\n const ruleError = this._handle403Error(e) ? null : { invalid: e.message };\n this.ruleUpdated(rule, ruleError);\n }\n );\n } else {\n this._ruleActionService.updateRuleAction(rule.key, ruleAction).subscribe(\n (_result) => {\n this.ruleUpdated(rule);\n },\n (e: any) => {\n const ruleError = this._handle403Error(e) ? null : { invalid: e.message };\n this.ruleUpdated(rule, ruleError);\n }\n );\n }\n } else {\n this.ruleUpdating(rule);\n this.ruleUpdated(rule, {\n invalid: 'Cannot save, action is not valid.'\n });\n }\n }\n\n patchCondition(rule: RuleModel, group: ConditionGroupModel, condition: ConditionModel): void {\n try {\n if (condition.isValid()) {\n this.ruleUpdating(rule, false);\n if (condition.isPersisted()) {\n this._conditionService.save(group.key, condition).subscribe(\n (_result) => {\n this.ruleUpdated(rule);\n },\n (e: any) => {\n const ruleError = this._handle403Error(e)\n ? null\n : { invalid: e.message };\n this.ruleUpdated(rule, ruleError);\n }\n );\n } else {\n if (!group.isPersisted()) {\n this._conditionGroupService\n .createConditionGroup(rule.key, group)\n .subscribe((_foo) => {\n this._conditionService.add(group.key, condition).subscribe(\n () => {\n group.conditions[condition.key] = true;\n this.ruleUpdated(rule);\n },\n (e: CwError) => {\n const ruleError = this._handle403Error(e)\n ? null\n : { invalid: e.message };\n this.ruleUpdated(rule, ruleError);\n }\n );\n });\n } else {\n this._conditionService.add(group.key, condition).subscribe(\n () => {\n group.conditions[condition.key] = true;\n this.ruleUpdated(rule);\n },\n (e: CwError) => {\n const ruleError = this._handle403Error(e)\n ? null\n : { invalid: e.message };\n this.ruleUpdated(rule, ruleError);\n }\n );\n }\n }\n } else {\n this.ruleUpdating(rule);\n this.loggerService.info('RuleEngineContainer', 'patchCondition', 'Not valid');\n rule._saving = false;\n rule._errors = { invalid: 'Condition not valid.' };\n }\n } catch (e) {\n this.loggerService.error(e);\n this.ruleUpdated(rule, { invalid: e.message });\n }\n }\n\n prioritySortFn(a: any, b: any): number {\n return a.priority - b.priority;\n }\n\n private initRules(): void {\n this.state.loading = true;\n\n this.pageId = '';\n\n const pageIdParams = this.route.params.pipe(map((params: Params) => params.pageId));\n const queryParams = this.route.queryParams.pipe(map((params: Params) => params.realmId));\n\n merge(pageIdParams, queryParams)\n .pipe(\n filter((res) => !!res),\n take(1)\n )\n .subscribe((id: string) => {\n this.pageId = id;\n });\n\n this._ruleService.requestRules(this.pageId);\n this._ruleService\n .loadRules()\n .pipe(takeUntil(this.destroy$))\n .subscribe((rules: RuleModel[]) => {\n this.loadRules(rules);\n });\n this.route.queryParams\n .pipe(take(1))\n .subscribe(\n (params: Params) => (this.isContentletHost = params.isContentletHost === 'true')\n );\n }\n\n private loadRules(rules: RuleModel[]): void {\n rules.sort((a, b) => {\n return b.priority - a.priority;\n });\n this.rules$.emit(rules);\n this.state.loading = false;\n }\n\n private _handle403Error(e: CwError): boolean {\n let handled = false;\n try {\n if (e && e.response.status === HttpCode.FORBIDDEN) {\n const errorJson = e.response;\n if (errorJson && errorJson.error) {\n this.ruleViewService.showErrorMessage(\n errorJson.error.message.replace('dotcms.api.error.forbidden: ', '')\n );\n handled = true;\n }\n }\n } catch (e) {\n this.loggerService.error('Error while processing invalid response: ', e);\n }\n\n this.initRules();\n\n return handled;\n }\n}\n", + "properties": [ + { + "name": "payload", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": false, + "description": "", + "line": 56 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [], + "extends": "RuleActionEvent" + }, + { + "name": "ConfigParams", + "id": "interface-ConfigParams-45a6b4d7f75c0e497b68c4ac4596588b677d9631192f713ba3cd7da60bf6bc59ab4e9b374847046d5fed2f236ff6fca756c097baee0006b631f1b38081b0506a", + "file": "libs/dotcms-js/src/lib/core/dotcms-config.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { CoreWebService } from './core-web.service';\nimport { Injectable } from '@angular/core';\nimport { Observable, BehaviorSubject } from 'rxjs';\nimport { pluck, filter, map } from 'rxjs/operators';\nimport { LoggerService } from './logger.service';\nimport { Menu } from './routing.service';\n\n/**\n * Created by josecastro on 7/29/16.\n *\n * Wraps the configuration properties for dotCMS in order to provide an\n * easier way to access the information.\n *\n */\nconst DOTCMS_WEBSOCKET_RECONNECT_TIME = 'dotcms.websocket.reconnect.time';\nconst DOTCMS_DISABLE_WEBSOCKET_PROTOCOL = 'dotcms.websocket.disable';\nconst DOTCMS_PAGINATOR_ROWS = 'dotcms.paginator.rows';\nconst DOTCMS_PAGINATOR_LINKS = 'dotcms.paginator.links';\nconst EMAIL_REGEX = 'emailRegex';\n\nexport interface DotUiColors {\n primary: string;\n secondary: string;\n background: string;\n}\n\nexport interface ConfigParams {\n colors: DotUiColors;\n emailRegex: string;\n license: {\n displayServerId: string;\n isCommunity: boolean;\n level: number;\n levelName: string;\n };\n logos: {\n loginScreen: string;\n navBar: string;\n };\n menu: Menu[];\n paginatorLinks: number;\n paginatorRows: number;\n websocket: WebSocketConfigParams;\n}\n\nexport interface WebSocketConfigParams {\n disabledWebsockets: boolean;\n websocketReconnectTime: number;\n}\n\nexport interface DotTimeZone {\n id: string;\n label: string;\n offset: string;\n}\n\n@Injectable()\nexport class DotcmsConfigService {\n private configParamsSubject: BehaviorSubject = new BehaviorSubject(null);\n private configUrl: string;\n\n /**\n * Initializes this class with the dotCMS core configuration parameters.\n *\n * @param configParams - The configuration properties for the current instance.\n */\n constructor(private coreWebService: CoreWebService, private loggerService: LoggerService) {\n this.configUrl = 'v1/appconfiguration';\n this.loadConfig();\n }\n\n getConfig(): Observable {\n return this.configParamsSubject\n .asObservable()\n .pipe(filter((config: ConfigParams) => !!config));\n }\n\n loadConfig(): void {\n this.loggerService.debug('Loading configuration on: ', this.configUrl);\n\n this.coreWebService\n .requestView({\n url: this.configUrl\n })\n .pipe(pluck('entity'))\n .subscribe((res: any) => {\n this.loggerService.debug('Configuration Loaded!', res);\n\n const configParams: ConfigParams = {\n colors: res.config.colors,\n emailRegex: res.config[EMAIL_REGEX],\n license: res.config.license,\n logos: res.config.logos,\n menu: res.menu,\n paginatorLinks: res.config[DOTCMS_PAGINATOR_LINKS],\n paginatorRows: res.config[DOTCMS_PAGINATOR_ROWS],\n websocket: {\n websocketReconnectTime:\n res.config.websocket[DOTCMS_WEBSOCKET_RECONNECT_TIME],\n disabledWebsockets: res.config.websocket[DOTCMS_DISABLE_WEBSOCKET_PROTOCOL]\n }\n };\n\n this.configParamsSubject.next(configParams);\n\n this.loggerService.debug('this.configParams', configParams);\n\n return res;\n });\n }\n\n /**\n * Return a list of timezones.\n * @returns Observable\n * @memberof DotcmsConfigService\n */\n getTimeZone(): Observable {\n return this.coreWebService\n .requestView({\n url: this.configUrl\n })\n .pipe(\n pluck('entity', 'config', 'timezones'),\n map((timezones: DotTimeZone[]) => {\n return timezones.sort((a: DotTimeZone, b: DotTimeZone) => {\n if (a.label > b.label) {\n return 1;\n }\n if (a.label < b.label) {\n return -1;\n }\n // a must be equal to b\n return 0;\n });\n })\n );\n }\n}\n", + "properties": [ + { + "name": "colors", + "deprecated": false, + "deprecationMessage": "", + "type": "DotUiColors", + "optional": false, + "description": "", + "line": 28 + }, + { + "name": "emailRegex", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 29 + }, + { + "name": "license", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": false, + "description": "", + "line": 30 + }, + { + "name": "logos", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": false, + "description": "", + "line": 36 + }, + { + "name": "menu", + "deprecated": false, + "deprecationMessage": "", + "type": "Menu[]", + "optional": false, + "description": "", + "line": 40 + }, + { + "name": "paginatorLinks", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 41 + }, + { + "name": "paginatorRows", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 42 + }, + { + "name": "websocket", + "deprecated": false, + "deprecationMessage": "", + "type": "WebSocketConfigParams", + "optional": false, + "description": "", + "line": 43 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "ContentTypeView", + "id": "interface-ContentTypeView-cb557c4701bbe5932d20ba1aa7fc015f0207c1cdbf7c74dea909699c59929f1c1630b8237e03356a100698a7ad869d84e2529290bf87a0cd12902879feafdfe6", + "file": "apps/dotcms-ui/src/app/shared/models/contentlet/content-type-view.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { StructureType } from './structure-type.model';\n\nexport interface ContentTypeView {\n type: StructureType;\n name: string;\n inode: string;\n action: string;\n variable: string;\n}\n", + "properties": [ + { + "name": "action", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 7 + }, + { + "name": "inode", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 6 + }, + { + "name": "name", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 5 + }, + { + "name": "type", + "deprecated": false, + "deprecationMessage": "", + "type": "StructureType", + "optional": false, + "description": "", + "line": 4 + }, + { + "name": "variable", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 8 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "CurrentUser", + "id": "interface-CurrentUser-5d0703d3d5d12558b1bbde9262016b10ec9cf6c418c9741070b97284d1a8fbc28be4f7b612438e8347bcf836241aa6a4a312b0f55c3c34f695902c625eee1712", + "file": "libs/dotcms-js/src/lib/core/login.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { CoreWebService } from './core-web.service';\nimport { Injectable } from '@angular/core';\nimport { Observable, Subject, of } from 'rxjs';\nimport { HttpCode } from './util/http-code';\nimport { pluck, tap, map } from 'rxjs/operators';\nimport { DotcmsEventsService } from './dotcms-events.service';\nimport { HttpResponse } from '@angular/common/http';\n\nexport interface DotLoginParams {\n login: string;\n password: string;\n rememberMe: boolean;\n language: string;\n backEndLogin: boolean;\n}\n\nexport const LOGOUT_URL = '/dotAdmin/logout';\n\n/**\n * This Service get the server configuration to display in the login component\n * and execute the login and forgot password routines\n */\n@Injectable()\nexport class LoginService {\n private _auth$: Subject = new Subject();\n private _logout$: Subject = new Subject();\n private _auth: Auth;\n private _loginAsUsersList$: Subject;\n private country = '';\n private lang = '';\n private urls: any;\n\n constructor(\n private coreWebService: CoreWebService,\n private dotcmsEventsService: DotcmsEventsService\n ) {\n this._loginAsUsersList$ = >new Subject();\n this.urls = {\n changePassword: 'v1/changePassword',\n getAuth: 'v1/authentication/logInUser',\n loginAs: 'v1/users/loginas',\n logout: 'v1/logout',\n logoutAs: 'v1/users/logoutas',\n recoverPassword: 'v1/forgotpassword',\n serverInfo: 'v1/loginform',\n userAuth: 'v1/authentication',\n current: '/api/v1/users/current/'\n };\n\n // when the session is expired/destroyed\n dotcmsEventsService.subscribeTo('SESSION_DESTROYED').subscribe(() => this.logOutUser());\n }\n\n /**\n * Get current logged in user\n *\n * @return {*} {Observable}\n * @memberof LoginService\n */\n getCurrentUser(): Observable {\n return this.coreWebService\n .request({\n url: this.urls.current\n })\n .pipe(map((res: HttpResponse) => res)) as unknown as Observable\n }\n\n get loginAsUsersList$(): Observable {\n return this._loginAsUsersList$.asObservable();\n }\n\n get auth$(): Observable {\n return this._auth$.asObservable();\n }\n\n get logout$(): Observable {\n return this._logout$.asObservable();\n }\n\n get auth(): Auth {\n return this._auth;\n }\n\n get isLogin$(): Observable {\n if (!!this.auth && !!this.auth.user) {\n return of(true);\n }\n\n return this.loadAuth().pipe(map((auth) => !!auth && !!auth.user));\n }\n\n /**\n * Load _auth information.\n * @returns Observable\n */\n public loadAuth(): Observable {\n return this.coreWebService\n .requestView({\n url: this.urls.getAuth\n })\n .pipe(\n pluck('entity'),\n tap((auth: Auth) => {\n if (auth.user) {\n this.setAuth(auth);\n }\n }),\n map((auth: Auth) => auth)\n );\n }\n\n /**\n * Change password\n * @param password\n * @param token\n * @returns Observable\n */\n public changePassword(password: string, token: string): Observable {\n const body = JSON.stringify({ password: password, token: token });\n\n return this.coreWebService.requestView({\n body: body,\n method: 'POST',\n url: this.urls.changePassword\n });\n }\n\n /**\n * Get the server information to configure the login component\n * @param language language and country to get the internationalized messages\n * @param i18nKeys array of message key to internationalize\n * @returns Observable Observable with an array of internationalized messages and server configuration info\n */\n public getLoginFormInfo(language: string, i18nKeys: Array): Observable {\n this.setLanguage(language);\n\n return this.coreWebService.requestView({\n body: { messagesKey: i18nKeys, language: this.lang, country: this.country },\n method: 'POST',\n url: this.urls.serverInfo\n });\n }\n\n /**\n * Do the login as request and return an Observable.\n * @param user user to loginas\n * @param password loginin user's password\n * @returns Observable\n */\n // TODO: password in the url is a no-no, fix asap. Sanchez and Jose have an idea.\n public loginAs(userData: { user: User; password: string }): Observable {\n return this.coreWebService\n .requestView({\n body: {\n password: userData.password,\n userId: userData.user.userId\n },\n method: 'POST',\n url: this.urls.loginAs\n })\n .pipe(\n map((res) => {\n if (!res.entity.loginAs) {\n throw res.errorsMessages;\n }\n\n this.setAuth({\n loginAsUser: userData.user,\n user: this._auth.user,\n isLoginAs: true\n });\n return res;\n }),\n pluck('entity', 'loginAs')\n );\n }\n\n /**\n * Executes the call to the login rest api\n * @param login User email or user id\n * @param password User password\n * @param rememberMe boolean indicating if the _auth want to use or not the remenber me option\n * @param language string with the language and country code, ex: en_US\n * @returns an array with the user if the user logged in successfully or the error message\n */\n public loginUser({\n login,\n password,\n rememberMe,\n language,\n backEndLogin\n }: DotLoginParams): Observable {\n this.setLanguage(language);\n\n return this.coreWebService\n .requestView({\n body: {\n userId: login,\n password: password,\n rememberMe: rememberMe,\n language: this.lang,\n country: this.country,\n backEndLogin: backEndLogin\n },\n method: 'POST',\n url: this.urls.userAuth\n })\n .pipe(\n map((response) => {\n const auth = {\n loginAsUser: null,\n user: response.entity,\n isLoginAs: false\n };\n\n this.setAuth(auth);\n this.coreWebService\n .subscribeToHttpError(HttpCode.UNAUTHORIZED)\n .subscribe(() => {\n this.logOutUser();\n });\n return response.entity;\n })\n );\n }\n\n /**\n * Logout \"login as\" user\n * @returns Observable\n */\n public logoutAs(): Observable {\n return this.coreWebService\n .requestView({\n method: 'PUT',\n url: `${this.urls.logoutAs}`\n })\n .pipe(\n map((res) => {\n this.setAuth({\n loginAsUser: null,\n user: this._auth.user,\n isLoginAs: true\n });\n return res;\n })\n );\n }\n\n /**\n * Executes the call to the recover passwrod rest api\n * @param email User email address\n * @returns an array with message indicating if the recover password was successfull\n * or if there is an error\n */\n public recoverPassword(login: string): Observable {\n return this.coreWebService.requestView({\n body: { userId: login },\n method: 'POST',\n url: this.urls.recoverPassword\n });\n }\n\n /**\n * Subscribe to ser change and call received function on change.\n * @param func function will call when user change\n */\n public watchUser(func: Function): void {\n if (this.auth) {\n func(this.auth);\n }\n\n this.auth$.subscribe((auth) => {\n if (auth.user) {\n func(auth);\n }\n });\n }\n\n /**\n * Set logged_auth and update auth Observable\n * @param _auth\n */\n public setAuth(auth: Auth): void {\n this._auth = auth;\n this._auth$.next(auth);\n\n // When not logged user we need to fire the observable chain\n if (!auth.user) {\n this._logout$.next();\n } else {\n this.dotcmsEventsService.start();\n }\n }\n\n /**\n * update the language and country variables from the string\n * @param language string containing the language and country\n */\n private setLanguage(language: string): void {\n if (language !== undefined && language !== '') {\n const languageDesc = language.split('_');\n this.lang = languageDesc[0];\n this.country = languageDesc[1];\n } else {\n this.lang = '';\n this.country = '';\n }\n }\n\n /**\n * Call the logout rest api\n * @returns Observable\n */\n private logOutUser(): void {\n window.location.href = `${LOGOUT_URL}?r=${new Date().getTime()}`;\n }\n}\n\nexport interface CurrentUser {\n email: string;\n givenName: string;\n loginAs: boolean\n roleId: string;\n surname: string;\n userId: string;\n}\n\nexport interface User {\n active?: boolean;\n actualCompanyId?: string;\n birthday?: number; // Timestamp\n comments?: string;\n companyId?: string;\n createDate?: number; // Timestamp\n deleteDate?: number; // Timestamp\n deleteInProgress?: boolean;\n emailAddress: string;\n failedLoginAttempts?: number;\n female?: boolean;\n firstName: string;\n fullName?: string;\n id?: string;\n languageId?: string;\n lastLoginDate?: number; // Timestamp\n lastLoginIP?: string;\n lastName: string;\n male?: boolean;\n middleName?: string;\n modificationDate?: number; // Timestamp\n name?: string;\n nickname?: string;\n requestPassword?: boolean;\n timeZoneId?: string;\n type?: string;\n userId: string;\n password?: string;\n}\n\nexport interface Auth {\n user: User;\n loginAsUser: User;\n isLoginAs?: boolean;\n}\n", + "properties": [ + { + "name": "email", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 323 + }, + { + "name": "givenName", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 324 + }, + { + "name": "loginAs", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 325 + }, + { + "name": "roleId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 326 + }, + { + "name": "surname", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 327 + }, + { + "name": "userId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 328 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "CwChangeEvent", + "id": "interface-CwChangeEvent-23731e981689b9b819fc309595f623fed77977d166325c8dcb062bf7f4f49b0226c89f7a8bcd98039ca31ea1bac5089d81b12b46c07d8541ac3e1eb53516e950", + "file": "libs/dot-rules/src/lib/services/util/CwEvent.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface CwChangeEvent {\n valid: boolean;\n isBlur: boolean;\n}\n", + "properties": [ + { + "name": "isBlur", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 3 + }, + { + "name": "valid", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 2 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DataTableColumn", + "id": "interface-DataTableColumn-a61b16ce839fe5065fe3f8540552315923c437480547c8231bdb05d4a54224dfdf38b5ac45b88a696f2ef89caa94415993b9edb20eea2e20a554b539f6ec9ca1", + "file": "apps/dotcms-ui/src/app/shared/models/data-table/data-table-column.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DataTableColumn {\n fieldName: string;\n format?: string;\n header: string;\n icon?: (any) => string;\n sortable?: boolean;\n textAlign?: string;\n textContent?: string;\n width?: string;\n}\n", + "properties": [ + { + "name": "fieldName", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 2 + }, + { + "name": "format", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 3 + }, + { + "name": "header", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 4 + }, + { + "name": "icon", + "deprecated": false, + "deprecationMessage": "", + "type": "function", + "optional": true, + "description": "", + "line": 5 + }, + { + "name": "sortable", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 6 + }, + { + "name": "textAlign", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 7 + }, + { + "name": "textContent", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 8 + }, + { + "name": "width", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 9 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DialogButton", + "id": "interface-DialogButton-caef8504346e88ab3c1bc23cf1666d4180baa8f93da266196a54cd3168baaf8443d6fa1841294b775b09bbfa21c5255062e3a28a650eb37ac845057ad0433143", + "file": "apps/dotcms-ui/src/app/view/components/dot-dialog/dot-dialog.component.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import {\n Component,\n Input,\n EventEmitter,\n Output,\n HostBinding,\n ViewChild,\n ElementRef,\n OnChanges,\n SimpleChanges\n} from '@angular/core';\nimport { fromEvent, Subscription } from 'rxjs';\nimport { filter } from 'rxjs/operators';\n\n@Component({\n selector: 'dot-dialog',\n templateUrl: './dot-dialog.component.html',\n styleUrls: ['./dot-dialog.component.scss']\n})\nexport class DotDialogComponent implements OnChanges {\n @ViewChild('dialog') dialog: ElementRef;\n\n @Input()\n @HostBinding('class.active')\n visible: boolean;\n\n @Input() header = '';\n\n @Input() actions: DotDialogActions;\n\n @Input() closeable = true;\n\n @Input() cssClass: string;\n\n @Input()\n contentStyle: {\n [key: string]: string;\n };\n\n @Input()\n headerStyle: {\n [key: string]: string;\n };\n\n @Input() width: string;\n\n @Input() height: string;\n\n @Input() hideButtons: boolean;\n\n @Input() appendToBody = false;\n\n @Input() bindEvents = true;\n\n @Output() hide: EventEmitter = new EventEmitter();\n\n @Output()\n beforeClose: EventEmitter<{\n close: () => void;\n }> = new EventEmitter();\n\n @Output() visibleChange: EventEmitter = new EventEmitter();\n\n isContentScrolled: boolean;\n\n private subscription: Subscription[] = [];\n\n constructor(private el: ElementRef) {}\n\n ngOnChanges(changes: SimpleChanges) {\n if (this.isVisible(changes)) {\n if (this.bindEvents) {\n this.bindKeydown();\n }\n this.appendContainer();\n }\n }\n\n /**\n * Accept button handler\n *\n * @memberof DotDialogComponent\n */\n acceptAction(): void {\n if (this.actions && this.canTriggerAction(this.actions.accept)) {\n this.actions.accept.action(this);\n this.unBindEvents();\n }\n }\n\n /**\n * Cancel button handler\n *\n * @memberof DotDialogComponent\n */\n cancelAction(): void {\n if (this.actions && this.canTriggerAction(this.actions.cancel)) {\n this.actions.cancel.action(this);\n } else {\n this.close();\n }\n }\n\n /**\n * Close dialog\n *\n * @memberof DotDialogComponent\n */\n close($event?: MouseEvent): void {\n if (this.beforeClose.observers.length) {\n this.beforeClose.emit({\n close: () => {\n this.handleClose();\n }\n });\n } else {\n this.handleClose();\n }\n\n if ($event) {\n $event.preventDefault();\n }\n }\n\n /**\n * Handle scroll event in the content\n *\n * @param {{ target: HTMLInputElement }} event\n * @memberof DotDialogComponent\n */\n onContentScroll(event: { target: HTMLInputElement }) {\n /*\n Absolute positioned overlays panels (in dropdowns, menus, etc...) inside the\n dialog content needs to be append to the body, this click is to hide them on\n scroll because they mantain their position relative to the body.\n */\n event.target.click();\n\n this.isContentScrolled = event.target.scrollTop > 0;\n }\n\n private bindKeydown(): void {\n this.subscription.push(\n fromEvent(document, 'keydown').subscribe(this.handleKeyboardEvents.bind(this))\n );\n\n this.subscription.push(\n fromEvent(this.el.nativeElement, 'click')\n .pipe(\n filter((event: MouseEvent) => {\n const el = event.target;\n return el.localName !== 'dot-dialog' && el.classList.contains('active');\n })\n )\n .subscribe(this.close.bind(this))\n );\n }\n\n private canTriggerAction(item: DialogButton): boolean {\n return item && !item.disabled && !!item.action;\n }\n\n private handleClose(): void {\n this.visibleChange.emit(false);\n this.hide.emit();\n this.unBindEvents();\n }\n\n private handleKeyboardEvents(event: KeyboardEvent): void {\n switch (event.code) {\n case 'Escape':\n this.cancelAction();\n break;\n case 'Enter':\n this.acceptAction();\n break;\n default:\n break;\n }\n }\n\n private unBindEvents(): void {\n this.subscription.forEach((sub: Subscription) => {\n sub.unsubscribe();\n });\n }\n\n private appendContainer() {\n if (this.appendToBody) {\n document.body.appendChild(this.el.nativeElement);\n }\n }\n\n private isVisible(changes: SimpleChanges): boolean {\n return changes.visible && changes.visible.currentValue;\n }\n}\n\nexport interface DialogButton {\n action?: (dialog?: any) => void;\n disabled?: boolean;\n label: string;\n}\n\nexport interface DotDialogActions {\n accept?: DialogButton;\n cancel?: DialogButton;\n}\n", + "properties": [ + { + "name": "action", + "deprecated": false, + "deprecationMessage": "", + "type": "function", + "optional": true, + "description": "", + "line": 200 + }, + { + "name": "disabled", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 201 + }, + { + "name": "label", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 202 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotAccountUser", + "id": "interface-DotAccountUser-ce5c15b22403bca491bf14ea6d07148bce9d4a1f670301d490ab5c9a8ce8f04ae8b0c021e4fc555ad447217fff12282b409e970caf79de9af85d84c1bd8b6327", + "file": "apps/dotcms-ui/src/app/api/services/dot-account-service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Observable } from 'rxjs';\nimport { Injectable } from '@angular/core';\nimport { CoreWebService, ResponseView } from '@dotcms/dotcms-js';\nimport { take, pluck, catchError, map } from 'rxjs/operators';\nimport { HttpErrorResponse } from '@angular/common/http';\nimport { DotHttpErrorManagerService } from './dot-http-error-manager/dot-http-error-manager.service';\n\n@Injectable()\nexport class DotAccountService {\n constructor(\n private coreWebService: CoreWebService,\n private httpErrorManagerService: DotHttpErrorManagerService\n ) {}\n\n /**\n * Updates user data\n *\n * @param {DotAccountUser} user\n * @returns {Observable}\n * @memberof DotAccountService\n */\n updateUser(user: DotAccountUser): Observable {\n return this.coreWebService.requestView({\n body: user,\n method: 'PUT',\n url: 'v1/users/current'\n });\n }\n\n /**\n * Put request to add the getting starter portlet to menu\n *\n * @returns {Observable}\n * @memberof DotAccountService\n */\n addStarterPage(): Observable {\n return this.coreWebService\n .requestView({\n method: 'PUT',\n url: '/api/v1/toolgroups/gettingstarted/_addtouser'\n })\n .pipe(\n take(1),\n pluck('entity'),\n catchError((error: HttpErrorResponse) => {\n return this.httpErrorManagerService.handle(error).pipe(\n take(1),\n map(() => null)\n );\n })\n );\n }\n\n /**\n * put request to remove the getting starter portlet to menu\n *\n * @returns {Observable}\n * @memberof DotAccountService\n */\n removeStarterPage(): Observable {\n return this.coreWebService\n .requestView({\n method: 'PUT',\n url: '/api/v1/toolgroups/gettingstarted/_removefromuser'\n })\n .pipe(\n take(1),\n pluck('entity'),\n catchError((error: HttpErrorResponse) => {\n return this.httpErrorManagerService.handle(error).pipe(\n take(1),\n map(() => null)\n );\n })\n );\n }\n}\n\nexport interface DotAccountUser {\n userId: string;\n givenName: string;\n surname: string;\n newPassword?: string;\n currentPassword: string;\n email: string;\n}\n", + "properties": [ + { + "name": "currentPassword", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 84 + }, + { + "name": "email", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 85 + }, + { + "name": "givenName", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 81 + }, + { + "name": "newPassword", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 83 + }, + { + "name": "surname", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 82 + }, + { + "name": "userId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 80 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotActionBulkRequestOptions", + "id": "interface-DotActionBulkRequestOptions-9758d09c4bfacb208b9ef902ad590059831c2b7269fd31a427ecb66bd1c453436dad133245fa355eb082bc89a70af2759efd3889188c37f7555349ad2264bfbb", + "file": "apps/dotcms-ui/src/app/shared/models/dot-action-bulk-request-options/dot-action-bulk-request-options.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotActionBulkRequestOptions {\n workflowActionId: string;\n contentletIds?: string[];\n query?: string;\n additionalParams: {\n assignComment: {\n comment: string;\n assign: string;\n };\n pushPublish: {\n whereToSend: string;\n iWantTo: string;\n expireDate: string;\n expireTime: string;\n publishDate: string;\n publishTime: string;\n filterKey: string;\n };\n additionalParamsMap: { _path_to_move: string };\n };\n}\n", + "properties": [ + { + "name": "additionalParams", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": false, + "description": "", + "line": 10 + }, + { + "name": "contentletIds", + "deprecated": false, + "deprecationMessage": "", + "type": "string[]", + "optional": true, + "description": "", + "line": 8 + }, + { + "name": "query", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 9 + }, + { + "name": "workflowActionId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 7 + } + ], + "indexSignatures": [], + "kind": 165, + "description": "

Expected object to send when hit the endpoint: /api/v1/workflow/contentlet/actions/bulk/fire

\n", + "rawdescription": "\n\nExpected object to send when hit the endpoint: /api/v1/workflow/contentlet/actions/bulk/fire\n\n", + "methods": [] + }, + { + "name": "DotActionBulkResult", + "id": "interface-DotActionBulkResult-d45607716f60a7b2fba42dd46c51cd785d1278c43e6b9fa44f981d00949ee75437c144048fe3f79d0665dfae0e99df6eb45c92f5504433e2d89f3bb5a2daab52", + "file": "apps/dotcms-ui/src/app/shared/models/dot-action-bulk-result/dot-action-bulk-result.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotActionBulkResult {\n skippedCount: number;\n successCount: number;\n fails: DotBulkFailItem[];\n action?: string;\n}\n\n// optional attrs because api is not consistent\nexport interface DotBulkFailItem {\n errorMessage: string;\n element?: string;\n inode?: string;\n description?: string;\n}\n", + "properties": [ + { + "name": "action", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 11 + }, + { + "name": "fails", + "deprecated": false, + "deprecationMessage": "", + "type": "DotBulkFailItem[]", + "optional": false, + "description": "", + "line": 10 + }, + { + "name": "skippedCount", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 8 + }, + { + "name": "successCount", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 9 + } + ], + "indexSignatures": [], + "kind": 165, + "description": "

Expected response when hit the endpoint: /api/v1/workflow/contentlet/actions/bulk/fire\nAnd bulk endpoints in templates

\n", + "rawdescription": "\n\nExpected response when hit the endpoint: /api/v1/workflow/contentlet/actions/bulk/fire\nAnd bulk endpoints in templates\n\n", + "methods": [] + }, + { + "name": "DotActionMenuItem", + "id": "interface-DotActionMenuItem-18ade70df84d0af517afd1ab14cc240b4d52edaf537d5ddd0e97ddb72d5585af7a15b40871d36e8078e746f3b55d4ee4cf475679f11f23a69eb73ad8bc4fe12f", + "file": "apps/dotcms-ui/src/app/shared/models/dot-action-menu/dot-action-menu-item.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { MenuItem } from 'primeng/api';\n\nexport interface DotActionMenuItem {\n shouldShow?: (x?: any) => boolean;\n menuItem: MenuItem;\n}\n", + "properties": [ + { + "name": "menuItem", + "deprecated": false, + "deprecationMessage": "", + "type": "MenuItem", + "optional": false, + "description": "", + "line": 5 + }, + { + "name": "shouldShow", + "deprecated": false, + "deprecationMessage": "", + "type": "function", + "optional": true, + "description": "", + "line": 4 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotActionRequestOptions", + "id": "interface-DotActionRequestOptions-8f61c85a5e5f12cd1490b6a2872f547af73edfaf43e3e67cdf779339b7c5ec4667873e9b463fd2ef7116cb08413b06c525d19d84704b613be17e874f20e71a01", + "file": "apps/dotcms-ui/src/app/api/services/dot-workflow-actions-fire/dot-workflow-actions-fire.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { pluck, take } from 'rxjs/operators';\nimport { CoreWebService } from '@dotcms/dotcms-js';\nimport { DotCMSContentlet } from '@dotcms/dotcms-models';\nimport { DotActionBulkRequestOptions } from '@models/dot-action-bulk-request-options/dot-action-bulk-request-options.model';\nimport { DotActionBulkResult } from '@models/dot-action-bulk-result/dot-action-bulk-result.model';\n\ninterface DotActionRequestOptions {\n contentType?: string;\n data: { [key: string]: any };\n action: ActionToFire;\n}\n\nenum ActionToFire {\n NEW = 'NEW',\n PUBLISH = 'PUBLISH',\n EDIT = 'EDIT'\n}\n\n@Injectable()\nexport class DotWorkflowActionsFireService {\n constructor(private coreWebService: CoreWebService) {}\n\n /**\n * Fire a workflow action over a contentlet\n *\n * @param {string} inode\n * @param {string} actionId\n * @param {{ [key: string]: string }} data\n * @returns Observable // contentlet\n * @memberof DotWorkflowActionsFireService\n */\n fireTo(\n inode: string,\n actionId: string,\n data?: { [key: string]: string }\n ): Observable {\n return this.coreWebService\n .requestView({\n body: data,\n method: 'PUT',\n url: `v1/workflow/actions/${actionId}/fire?inode=${inode}&indexPolicy=WAIT_FOR`\n })\n .pipe(pluck('entity'));\n }\n\n /**\n * Fire a workflow action over a contentlet\n *\n * @param {DotActionBulkRequestOptions} data\n * @returns Observable // contentlet\n * @memberof DotWorkflowActionsFireService\n */\n bulkFire(data: DotActionBulkRequestOptions): Observable {\n return this.coreWebService\n .requestView({\n body: data,\n method: 'PUT',\n url: `/api/v1/workflow/contentlet/actions/bulk/fire`\n })\n .pipe(pluck('entity'));\n }\n\n /**\n * Fire a \"NEW\" action over the content type received with the specified data\n *\n * @param {contentType} string\n * @param {[key: string]: any} data\n * @returns Observable\n *\n * @memberof DotWorkflowActionsFireService\n */\n newContentlet(contentType: string, data: { [key: string]: any }): Observable {\n return this.request({ contentType, data, action: ActionToFire.NEW });\n }\n\n /**\n * Fire a \"PUBLISH\" action over the content type received with the specified data\n *\n * @template T\n * @param {string} contentType\n * @param {{ [key: string]: any }} data\n * @returns {Observable}\n * @memberof DotWorkflowActionsFireService\n */\n publishContentlet(contentType: string, data: { [key: string]: any }): Observable {\n return this.request({\n contentType,\n data,\n action: ActionToFire.PUBLISH\n });\n }\n /**\n * Fire an \"EDIT\" action over the content type received with the specified data\n *\n * @template T\n * @param {string} contentType\n * @param {{ [key: string]: any }} data\n * @return {*} {Observable}\n * @memberof DotWorkflowActionsFireService\n */\n saveContentlet(data: { [key: string]: any }): Observable {\n return this.request({\n data,\n action: ActionToFire.EDIT\n });\n }\n\n /**\n * Fire a \"PUBLISH\" action over the content type received and append the wait for index attr\n *\n * @template T\n * @param {string} contentType\n * @param {{ [key: string]: any }} data\n * @returns {Observable}\n * @memberof DotWorkflowActionsFireService\n */\n publishContentletAndWaitForIndex(\n contentType: string,\n data: { [key: string]: any }\n ): Observable {\n return this.publishContentlet(contentType, {\n ...data,\n ...{ indexPolicy: 'WAIT_FOR' }\n });\n }\n\n private request({ contentType, data, action }: DotActionRequestOptions): Observable {\n const contentlet = contentType ? { contentType: contentType, ...data } : data;\n\n return this.coreWebService\n .requestView({\n method: 'PUT',\n url: `v1/workflow/actions/default/fire/${action}${\n data.inode ? `?inode=${data.inode}` : ''\n }`,\n body: { contentlet }\n })\n .pipe(take(1), pluck('entity'));\n }\n}\n", + "properties": [ + { + "name": "action", + "deprecated": false, + "deprecationMessage": "", + "type": "ActionToFire", + "optional": false, + "description": "", + "line": 12 + }, + { + "name": "contentType", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 10 + }, + { + "name": "data", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": false, + "description": "", + "line": 11 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotActiveItemsFromParentProps", + "id": "interface-DotActiveItemsFromParentProps-8881c69c52750dce9c2cb6976ea6c9d7b709032deb2cfbe80ae8f62da5eea1889c1c727a909c01f166ce61d76325a1357b057d7163be23b342f8b77e82b7b303", + "file": "apps/dotcms-ui/src/app/view/components/dot-navigation/services/dot-navigation.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Injectable } from '@angular/core';\nimport { Router, NavigationEnd, Event } from '@angular/router';\n\nimport { Observable, BehaviorSubject } from 'rxjs';\nimport { filter, switchMap, map, tap, take } from 'rxjs/operators';\n\nimport { Auth } from '@dotcms/dotcms-js';\nimport { DotcmsEventsService, LoginService } from '@dotcms/dotcms-js';\n\nimport { DotMenu, DotMenuItem } from '@models/navigation';\nimport { DotMenuService } from '@services/dot-menu.service';\nimport { DotRouterService } from '@services/dot-router/dot-router.service';\nimport { DotIframeService } from '../../_common/iframe/service/dot-iframe/dot-iframe.service';\nimport { DotEventsService } from '@services/dot-events/dot-events.service';\nimport { DotLocalstorageService } from '@services/dot-localstorage/dot-localstorage.service';\n\nexport const replaceSectionsMap = {\n 'edit-page': 'site-browser'\n};\n\nconst replaceIdForNonMenuSection = (id) => {\n return replaceSectionsMap[id];\n};\n\ninterface DotActiveItemsProps {\n url: string;\n collapsed: boolean;\n menuId?: string;\n previousUrl: string;\n}\n\ninterface DotActiveItemsFromParentProps extends DotActiveItemsProps {\n menus: DotMenu[];\n}\n\nfunction getActiveMenuFromMenuId({ menus, menuId, collapsed, url }: DotActiveItemsFromParentProps) {\n return menus.map((menu) => {\n menu.active = false;\n\n menu.menuItems = menu.menuItems.map((item) => ({\n ...item,\n active: false\n }));\n\n if (menu.id === menuId) {\n menu.active = true;\n menu.isOpen = !collapsed && menu.active; // TODO: this menu.active what?\n menu.menuItems = menu.menuItems.map((item) => ({\n ...item,\n active: item.id === url\n }));\n }\n\n return menu;\n });\n}\n\nfunction isDetailPage(id: string, url: string): boolean {\n return url.split('/').includes('edit') && url.includes(id);\n}\n\nfunction isMenuActive(menus: DotMenu[]): boolean {\n return !!menus.find((item) => item.active);\n}\n\nfunction isEditPageFromSiteBrowser(menuId: string, previousUrl: string): boolean {\n return menuId === 'edit-page' && previousUrl === '/c/site-browser'\n}\n\nconst setActiveItems = ({ url, collapsed, menuId, previousUrl }: DotActiveItemsProps) => (\n source: Observable\n) => {\n let urlId = getTheUrlId(url);\n\n return source.pipe(\n map((m: DotMenu[]) => {\n const menus: DotMenu[] = [...m];\n let isActive = false;\n\n if (isEditPageFromSiteBrowser(menuId, previousUrl) || isDetailPage(urlId, url) && isMenuActive(menus)) {\n return null;\n }\n\n // When user browse using the navigation (Angular Routing)\n if (menuId && menuId !== 'edit-page') {\n return getActiveMenuFromMenuId({\n menus,\n menuId,\n collapsed,\n url: urlId,\n previousUrl\n });\n }\n\n // When user browse using the browser url bar, direct links or reload page\n urlId = replaceIdForNonMenuSection(urlId) || urlId;\n\n for (let i = 0; i < menus.length; i++) {\n menus[i].active = false;\n menus[i].isOpen = false;\n\n for (let k = 0; k < menus[i].menuItems.length; k++) {\n // Once we activate the first one all the others are close\n if (isActive) {\n menus[i].menuItems[k].active = false;\n }\n\n if (!isActive && menus[i].menuItems[k].id === urlId) {\n isActive = true;\n menus[i].active = true;\n menus[i].isOpen = true;\n menus[i].menuItems[k].active = true;\n }\n }\n }\n\n return menus;\n })\n );\n};\n\nconst DOTCMS_MENU_STATUS = 'dotcms.menu.status';\n\nfunction getTheUrlId(url: string): string {\n const urlSegments: string[] = url.split('/').filter(Boolean);\n return urlSegments[0] === 'c' ? urlSegments.pop() : urlSegments[0];\n}\n\n@Injectable()\nexport class DotNavigationService {\n private _collapsed$: BehaviorSubject = new BehaviorSubject(true);\n private _items$: BehaviorSubject = new BehaviorSubject([]);\n\n constructor(\n private dotEventsService: DotEventsService,\n private dotIframeService: DotIframeService,\n private dotMenuService: DotMenuService,\n private dotRouterService: DotRouterService,\n private dotcmsEventsService: DotcmsEventsService,\n private loginService: LoginService,\n private router: Router,\n private dotLocalstorageService: DotLocalstorageService\n ) {\n const savedMenuStatus = this.dotLocalstorageService.getItem(DOTCMS_MENU_STATUS);\n this._collapsed$.next(savedMenuStatus === false ? false : true);\n\n this.dotMenuService.loadMenu().subscribe((menus: DotMenu[]) => {\n this.setMenu(menus);\n });\n\n this.onNavigationEnd()\n .pipe(\n switchMap((event: NavigationEnd) =>\n this.dotMenuService.loadMenu().pipe(\n setActiveItems({\n url: event.url,\n collapsed: this._collapsed$.getValue(),\n menuId: this.router.getCurrentNavigation().extras.state?.menuId,\n previousUrl: this.dotRouterService.previousUrl\n })\n )\n ),\n filter((menu) => !!menu)\n )\n .subscribe((menus: DotMenu[]) => {\n this.setMenu(menus);\n });\n\n this.dotcmsEventsService.subscribeTo('UPDATE_PORTLET_LAYOUTS').subscribe(() => {\n this.reloadNavigation()\n .pipe(take(1))\n .subscribe((menus: DotMenu[]) => {\n this.setMenu(menus);\n });\n });\n\n this.loginService.auth$\n .pipe(\n filter((auth: Auth) => !!(auth.loginAsUser || auth.user)),\n switchMap(() => this.dotMenuService.reloadMenu())\n )\n .subscribe((menus: DotMenu[]) => {\n this.setMenu(menus);\n this.goToFirstPortlet();\n });\n\n this.dotLocalstorageService\n .listen(DOTCMS_MENU_STATUS)\n .subscribe((collapsed: boolean) => {\n collapsed ? this.collapseMenu() : this.expandMenu();\n });\n }\n\n get collapsed$(): BehaviorSubject {\n return this._collapsed$;\n }\n\n get items$(): Observable {\n return this._items$.asObservable();\n }\n\n /**\n * Close all the sections in the menu\n *\n * @memberof DotNavigationService\n */\n closeAllSections(): void {\n const closedMenu: DotMenu[] = this._items$.getValue().map((menu: DotMenu) => {\n menu.isOpen = false;\n return menu;\n });\n this.setMenu(closedMenu);\n }\n\n /**\n * Collapse the menu and close all the sections in the menu\n *\n * @memberof DotNavigationService\n */\n collapseMenu(): void {\n this._collapsed$.next(true);\n this.closeAllSections();\n }\n\n /**\n * Open menu section that have menulink active\n *\n * @memberof DotNavigationService\n */\n expandMenu(): void {\n this._collapsed$.next(false);\n\n const expandedMenu: DotMenu[] = this._items$.getValue().map((menu: DotMenu) => {\n let isActive = false;\n\n menu.menuItems.forEach((item: DotMenuItem) => {\n if (item.active) {\n isActive = true;\n }\n });\n menu.isOpen = isActive;\n return menu;\n });\n this.setMenu(expandedMenu);\n }\n\n /**\n * Navigate to portlet by id\n *\n * @param string url\n * @memberof DotNavigationService\n */\n goTo(url: string): void {\n this.dotRouterService.gotoPortlet(url);\n }\n\n /**\n * Navigates to the first portlet\n *\n * @memberof DotNavigationService\n */\n goToFirstPortlet(): Promise {\n return this.getFirstMenuLink()\n .pipe(\n map((link: string) => {\n return this.dotRouterService.gotoPortlet(link);\n })\n )\n .toPromise()\n .then((isRouted: Promise) => {\n if (!isRouted) {\n this.reloadIframePage();\n }\n return isRouted;\n });\n }\n\n /**\n * Reload current portlet\n *\n * @param string id\n * @memberof DotNavigationService\n */\n reloadCurrentPortlet(id: string): void {\n if (this.dotRouterService.currentPortlet.id === id) {\n this.dotRouterService.reloadCurrentPortlet(id);\n }\n }\n\n /**\n * Toogle expanded/collapsed state of the nav\n *\n * @memberof DotNavigationService\n */\n toggle(): void {\n this.dotEventsService.notify('dot-side-nav-toggle');\n const isCollapsed = this._collapsed$.getValue();\n isCollapsed ? this.expandMenu() : this.collapseMenu();\n this.dotLocalstorageService.setItem(\n DOTCMS_MENU_STATUS,\n this._collapsed$.getValue()\n );\n }\n\n /**\n * Set menu open base on the id of the menulink\n *\n * @param string id\n * @memberof DotNavigationService\n */\n setOpen(id: string): void {\n const updatedMenu: DotMenu[] = this._items$.getValue().map((menu: DotMenu) => {\n menu.isOpen = menu.isOpen ? false : id === menu.id;\n return menu;\n });\n this.setMenu(updatedMenu);\n }\n\n onNavigationEnd(): Observable {\n return this.router.events.pipe(filter((event: Event) => event instanceof NavigationEnd));\n }\n\n private addMenuLinks(menu: DotMenu[]): DotMenu[] {\n return menu.map((menuGroup: DotMenu) => {\n menuGroup.menuItems.forEach((menuItem: DotMenuItem) => {\n menuItem.menuLink = menuItem.angular\n ? menuItem.url\n : this.getLegacyPortletUrl(menuItem.id);\n });\n return menuGroup;\n });\n }\n\n private extractFirtsMenuLink(menus: DotMenu[]): string {\n const firstMenuItem: DotMenuItem = menus[0].menuItems[0];\n return firstMenuItem.angular\n ? firstMenuItem.url\n : this.getLegacyPortletUrl(firstMenuItem.id);\n }\n\n private getFirstMenuLink(): Observable {\n return this.dotMenuService\n .loadMenu()\n .pipe(map((menus: DotMenu[]) => this.extractFirtsMenuLink(menus)));\n }\n\n private getLegacyPortletUrl(menuItemId: string): string {\n return `/c/${menuItemId}`;\n }\n\n private reloadIframePage(): void {\n if (this.router.url.indexOf('c/') > -1) {\n this.dotIframeService.reload();\n }\n }\n\n private reloadNavigation(): Observable {\n return this.dotMenuService.reloadMenu().pipe(\n setActiveItems({\n url: this.dotRouterService.currentPortlet.id,\n collapsed: this._collapsed$.getValue(),\n previousUrl: this.dotRouterService.previousUrl\n }),\n tap((menus: DotMenu[]) => {\n this.setMenu(menus);\n })\n );\n }\n\n private setMenu(menu: DotMenu[]) {\n this._items$.next(this.addMenuLinks(menu));\n }\n}\n", + "properties": [ + { + "name": "menus", + "deprecated": false, + "deprecationMessage": "", + "type": "DotMenu[]", + "optional": false, + "description": "", + "line": 33 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [], + "extends": "DotActiveItemsProps" + }, + { + "name": "DotActiveItemsProps", + "id": "interface-DotActiveItemsProps-8881c69c52750dce9c2cb6976ea6c9d7b709032deb2cfbe80ae8f62da5eea1889c1c727a909c01f166ce61d76325a1357b057d7163be23b342f8b77e82b7b303", + "file": "apps/dotcms-ui/src/app/view/components/dot-navigation/services/dot-navigation.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Injectable } from '@angular/core';\nimport { Router, NavigationEnd, Event } from '@angular/router';\n\nimport { Observable, BehaviorSubject } from 'rxjs';\nimport { filter, switchMap, map, tap, take } from 'rxjs/operators';\n\nimport { Auth } from '@dotcms/dotcms-js';\nimport { DotcmsEventsService, LoginService } from '@dotcms/dotcms-js';\n\nimport { DotMenu, DotMenuItem } from '@models/navigation';\nimport { DotMenuService } from '@services/dot-menu.service';\nimport { DotRouterService } from '@services/dot-router/dot-router.service';\nimport { DotIframeService } from '../../_common/iframe/service/dot-iframe/dot-iframe.service';\nimport { DotEventsService } from '@services/dot-events/dot-events.service';\nimport { DotLocalstorageService } from '@services/dot-localstorage/dot-localstorage.service';\n\nexport const replaceSectionsMap = {\n 'edit-page': 'site-browser'\n};\n\nconst replaceIdForNonMenuSection = (id) => {\n return replaceSectionsMap[id];\n};\n\ninterface DotActiveItemsProps {\n url: string;\n collapsed: boolean;\n menuId?: string;\n previousUrl: string;\n}\n\ninterface DotActiveItemsFromParentProps extends DotActiveItemsProps {\n menus: DotMenu[];\n}\n\nfunction getActiveMenuFromMenuId({ menus, menuId, collapsed, url }: DotActiveItemsFromParentProps) {\n return menus.map((menu) => {\n menu.active = false;\n\n menu.menuItems = menu.menuItems.map((item) => ({\n ...item,\n active: false\n }));\n\n if (menu.id === menuId) {\n menu.active = true;\n menu.isOpen = !collapsed && menu.active; // TODO: this menu.active what?\n menu.menuItems = menu.menuItems.map((item) => ({\n ...item,\n active: item.id === url\n }));\n }\n\n return menu;\n });\n}\n\nfunction isDetailPage(id: string, url: string): boolean {\n return url.split('/').includes('edit') && url.includes(id);\n}\n\nfunction isMenuActive(menus: DotMenu[]): boolean {\n return !!menus.find((item) => item.active);\n}\n\nfunction isEditPageFromSiteBrowser(menuId: string, previousUrl: string): boolean {\n return menuId === 'edit-page' && previousUrl === '/c/site-browser'\n}\n\nconst setActiveItems = ({ url, collapsed, menuId, previousUrl }: DotActiveItemsProps) => (\n source: Observable\n) => {\n let urlId = getTheUrlId(url);\n\n return source.pipe(\n map((m: DotMenu[]) => {\n const menus: DotMenu[] = [...m];\n let isActive = false;\n\n if (isEditPageFromSiteBrowser(menuId, previousUrl) || isDetailPage(urlId, url) && isMenuActive(menus)) {\n return null;\n }\n\n // When user browse using the navigation (Angular Routing)\n if (menuId && menuId !== 'edit-page') {\n return getActiveMenuFromMenuId({\n menus,\n menuId,\n collapsed,\n url: urlId,\n previousUrl\n });\n }\n\n // When user browse using the browser url bar, direct links or reload page\n urlId = replaceIdForNonMenuSection(urlId) || urlId;\n\n for (let i = 0; i < menus.length; i++) {\n menus[i].active = false;\n menus[i].isOpen = false;\n\n for (let k = 0; k < menus[i].menuItems.length; k++) {\n // Once we activate the first one all the others are close\n if (isActive) {\n menus[i].menuItems[k].active = false;\n }\n\n if (!isActive && menus[i].menuItems[k].id === urlId) {\n isActive = true;\n menus[i].active = true;\n menus[i].isOpen = true;\n menus[i].menuItems[k].active = true;\n }\n }\n }\n\n return menus;\n })\n );\n};\n\nconst DOTCMS_MENU_STATUS = 'dotcms.menu.status';\n\nfunction getTheUrlId(url: string): string {\n const urlSegments: string[] = url.split('/').filter(Boolean);\n return urlSegments[0] === 'c' ? urlSegments.pop() : urlSegments[0];\n}\n\n@Injectable()\nexport class DotNavigationService {\n private _collapsed$: BehaviorSubject = new BehaviorSubject(true);\n private _items$: BehaviorSubject = new BehaviorSubject([]);\n\n constructor(\n private dotEventsService: DotEventsService,\n private dotIframeService: DotIframeService,\n private dotMenuService: DotMenuService,\n private dotRouterService: DotRouterService,\n private dotcmsEventsService: DotcmsEventsService,\n private loginService: LoginService,\n private router: Router,\n private dotLocalstorageService: DotLocalstorageService\n ) {\n const savedMenuStatus = this.dotLocalstorageService.getItem(DOTCMS_MENU_STATUS);\n this._collapsed$.next(savedMenuStatus === false ? false : true);\n\n this.dotMenuService.loadMenu().subscribe((menus: DotMenu[]) => {\n this.setMenu(menus);\n });\n\n this.onNavigationEnd()\n .pipe(\n switchMap((event: NavigationEnd) =>\n this.dotMenuService.loadMenu().pipe(\n setActiveItems({\n url: event.url,\n collapsed: this._collapsed$.getValue(),\n menuId: this.router.getCurrentNavigation().extras.state?.menuId,\n previousUrl: this.dotRouterService.previousUrl\n })\n )\n ),\n filter((menu) => !!menu)\n )\n .subscribe((menus: DotMenu[]) => {\n this.setMenu(menus);\n });\n\n this.dotcmsEventsService.subscribeTo('UPDATE_PORTLET_LAYOUTS').subscribe(() => {\n this.reloadNavigation()\n .pipe(take(1))\n .subscribe((menus: DotMenu[]) => {\n this.setMenu(menus);\n });\n });\n\n this.loginService.auth$\n .pipe(\n filter((auth: Auth) => !!(auth.loginAsUser || auth.user)),\n switchMap(() => this.dotMenuService.reloadMenu())\n )\n .subscribe((menus: DotMenu[]) => {\n this.setMenu(menus);\n this.goToFirstPortlet();\n });\n\n this.dotLocalstorageService\n .listen(DOTCMS_MENU_STATUS)\n .subscribe((collapsed: boolean) => {\n collapsed ? this.collapseMenu() : this.expandMenu();\n });\n }\n\n get collapsed$(): BehaviorSubject {\n return this._collapsed$;\n }\n\n get items$(): Observable {\n return this._items$.asObservable();\n }\n\n /**\n * Close all the sections in the menu\n *\n * @memberof DotNavigationService\n */\n closeAllSections(): void {\n const closedMenu: DotMenu[] = this._items$.getValue().map((menu: DotMenu) => {\n menu.isOpen = false;\n return menu;\n });\n this.setMenu(closedMenu);\n }\n\n /**\n * Collapse the menu and close all the sections in the menu\n *\n * @memberof DotNavigationService\n */\n collapseMenu(): void {\n this._collapsed$.next(true);\n this.closeAllSections();\n }\n\n /**\n * Open menu section that have menulink active\n *\n * @memberof DotNavigationService\n */\n expandMenu(): void {\n this._collapsed$.next(false);\n\n const expandedMenu: DotMenu[] = this._items$.getValue().map((menu: DotMenu) => {\n let isActive = false;\n\n menu.menuItems.forEach((item: DotMenuItem) => {\n if (item.active) {\n isActive = true;\n }\n });\n menu.isOpen = isActive;\n return menu;\n });\n this.setMenu(expandedMenu);\n }\n\n /**\n * Navigate to portlet by id\n *\n * @param string url\n * @memberof DotNavigationService\n */\n goTo(url: string): void {\n this.dotRouterService.gotoPortlet(url);\n }\n\n /**\n * Navigates to the first portlet\n *\n * @memberof DotNavigationService\n */\n goToFirstPortlet(): Promise {\n return this.getFirstMenuLink()\n .pipe(\n map((link: string) => {\n return this.dotRouterService.gotoPortlet(link);\n })\n )\n .toPromise()\n .then((isRouted: Promise) => {\n if (!isRouted) {\n this.reloadIframePage();\n }\n return isRouted;\n });\n }\n\n /**\n * Reload current portlet\n *\n * @param string id\n * @memberof DotNavigationService\n */\n reloadCurrentPortlet(id: string): void {\n if (this.dotRouterService.currentPortlet.id === id) {\n this.dotRouterService.reloadCurrentPortlet(id);\n }\n }\n\n /**\n * Toogle expanded/collapsed state of the nav\n *\n * @memberof DotNavigationService\n */\n toggle(): void {\n this.dotEventsService.notify('dot-side-nav-toggle');\n const isCollapsed = this._collapsed$.getValue();\n isCollapsed ? this.expandMenu() : this.collapseMenu();\n this.dotLocalstorageService.setItem(\n DOTCMS_MENU_STATUS,\n this._collapsed$.getValue()\n );\n }\n\n /**\n * Set menu open base on the id of the menulink\n *\n * @param string id\n * @memberof DotNavigationService\n */\n setOpen(id: string): void {\n const updatedMenu: DotMenu[] = this._items$.getValue().map((menu: DotMenu) => {\n menu.isOpen = menu.isOpen ? false : id === menu.id;\n return menu;\n });\n this.setMenu(updatedMenu);\n }\n\n onNavigationEnd(): Observable {\n return this.router.events.pipe(filter((event: Event) => event instanceof NavigationEnd));\n }\n\n private addMenuLinks(menu: DotMenu[]): DotMenu[] {\n return menu.map((menuGroup: DotMenu) => {\n menuGroup.menuItems.forEach((menuItem: DotMenuItem) => {\n menuItem.menuLink = menuItem.angular\n ? menuItem.url\n : this.getLegacyPortletUrl(menuItem.id);\n });\n return menuGroup;\n });\n }\n\n private extractFirtsMenuLink(menus: DotMenu[]): string {\n const firstMenuItem: DotMenuItem = menus[0].menuItems[0];\n return firstMenuItem.angular\n ? firstMenuItem.url\n : this.getLegacyPortletUrl(firstMenuItem.id);\n }\n\n private getFirstMenuLink(): Observable {\n return this.dotMenuService\n .loadMenu()\n .pipe(map((menus: DotMenu[]) => this.extractFirtsMenuLink(menus)));\n }\n\n private getLegacyPortletUrl(menuItemId: string): string {\n return `/c/${menuItemId}`;\n }\n\n private reloadIframePage(): void {\n if (this.router.url.indexOf('c/') > -1) {\n this.dotIframeService.reload();\n }\n }\n\n private reloadNavigation(): Observable {\n return this.dotMenuService.reloadMenu().pipe(\n setActiveItems({\n url: this.dotRouterService.currentPortlet.id,\n collapsed: this._collapsed$.getValue(),\n previousUrl: this.dotRouterService.previousUrl\n }),\n tap((menus: DotMenu[]) => {\n this.setMenu(menus);\n })\n );\n }\n\n private setMenu(menu: DotMenu[]) {\n this._items$.next(this.addMenuLinks(menu));\n }\n}\n", + "properties": [ + { + "name": "collapsed", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 27 + }, + { + "name": "menuId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 28 + }, + { + "name": "previousUrl", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 29 + }, + { + "name": "url", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 26 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotAddClass", + "id": "interface-DotAddClass-c4618de2268e59400f7f16d179fbd17a246b5d535b2e49b7f1b11f0fe7515f52bf5ef5fc591d3ec90a2cd8ba87c1bfe367c035385fbab3fc6e1a7b70842d5c2c", + "file": "apps/dotcms-ui/src/app/view/components/dot-edit-layout-designer/components/dot-edit-layout-grid/dot-edit-layout-grid.component.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Component, OnInit, forwardRef, ViewChild, OnDestroy } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR, FormGroup, FormBuilder } from '@angular/forms';\n\nimport * as _ from 'lodash';\nimport { Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { NgGrid, NgGridConfig } from '@dotcms/dot-layout-grid';\n\nimport { DotDialogActions } from '@components/dot-dialog/dot-dialog.component';\n\nimport { DotAlertConfirmService } from '@services/dot-alert-confirm/dot-alert-confirm.service';\nimport { DotEventsService } from '@services/dot-events/dot-events.service';\nimport { DotMessageService } from '@services/dot-message/dot-messages.service';\n\nimport { DotEditLayoutService } from '@services/dot-edit-layout/dot-edit-layout.service';\n\nimport {\n DotLayoutBody,\n DotLayoutGrid,\n DOT_LAYOUT_GRID_MAX_COLUMNS\n} from '@models/dot-edit-layout-designer';\n\ninterface DotAddClass {\n setter: (string) => void;\n getter: () => void;\n title: string;\n}\n\n/**\n * Component in charge of update the model that will be used be the NgGrid to display containers\n *\n * @implements {OnInit}\n */\n@Component({\n selector: 'dot-edit-layout-grid',\n templateUrl: './dot-edit-layout-grid.component.html',\n styleUrls: ['./dot-edit-layout-grid.component.scss'],\n providers: [\n {\n multi: true,\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DotEditLayoutGridComponent)\n }\n ]\n})\nexport class DotEditLayoutGridComponent implements OnInit, OnDestroy, ControlValueAccessor {\n @ViewChild(NgGrid, { static: true }) ngGrid: NgGrid;\n\n form: FormGroup;\n value: DotLayoutBody;\n grid: DotLayoutGrid;\n\n addClassDialogShow = false;\n addClassDialogActions: DotDialogActions;\n addClassDialogHeader: string;\n\n gridConfig: NgGridConfig = {\n margins: [0, 8, 8, 0],\n draggable: true,\n resizable: true,\n max_cols: DOT_LAYOUT_GRID_MAX_COLUMNS,\n max_rows: 0,\n visible_cols: DOT_LAYOUT_GRID_MAX_COLUMNS,\n min_cols: 1,\n min_rows: 1,\n col_width: 90,\n row_height: 206,\n cascade: 'up',\n min_width: 40,\n min_height: 206,\n fix_to_grid: true,\n auto_style: true,\n auto_resize: true,\n maintain_ratio: false,\n prefer_new: false,\n zoom_on_drag: false,\n limit_to_screen: true\n };\n\n rowClass: string[] = [];\n private destroy$: Subject = new Subject();\n\n constructor(\n private dotDialogService: DotAlertConfirmService,\n private dotEditLayoutService: DotEditLayoutService,\n private dotMessageService: DotMessageService,\n private dotEventsService: DotEventsService,\n public fb: FormBuilder\n ) {}\n\n ngOnInit() {\n this.dotEventsService\n .listen('dot-side-nav-toggle')\n .pipe(takeUntil(this.destroy$))\n .subscribe(() => {\n this.resizeGrid(200);\n });\n\n this.dotEventsService\n .listen('layout-sidebar-change')\n .pipe(takeUntil(this.destroy$))\n .subscribe(() => {\n this.resizeGrid();\n });\n\n // needed it because the transition between content & layout.\n this.resizeGrid();\n\n this.form = this.fb.group({\n classToAdd: ''\n });\n\n this.form.valueChanges.pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.addClassDialogActions = {\n cancel: {\n ...this.addClassDialogActions.cancel\n },\n accept: {\n ...this.addClassDialogActions.accept,\n disabled: !this.form.valid\n }\n };\n });\n\n this.dotEditLayoutService\n .getBoxes()\n .pipe(takeUntil(this.destroy$))\n .subscribe(() => {\n this.addBox();\n });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.complete();\n }\n\n /**\n * Add new Box to the gridBoxes Arrray.\n *\n * @memberof DotEditLayoutGridComponent\n */\n addBox(): void {\n this.grid.addBox();\n this.propagateGridLayoutChange();\n }\n\n /**\n * Return ng-grid model.\n *\n * @returns DotLayoutBody\n * @memberof DotEditLayoutGridComponent\n */\n getModel(): DotLayoutBody {\n return this.dotEditLayoutService.getDotLayoutBody(this.grid);\n }\n\n /**\n * Event fired when the drag or resize of a container ends, remove empty rows if any.\n *\n * @memberof DotEditLayoutGridComponent\n */\n updateModel(): void {\n this.deleteEmptyRows();\n this.propagateGridLayoutChange();\n }\n\n /**\n * Removes the given index to the gridBoxes Array after the user confirms.\n *\n * @param number index\n * @memberof DotEditLayoutGridComponent\n */\n onRemoveContainer(index: number): void {\n if (this.grid.boxes[index].containers.length) {\n this.dotDialogService.confirm({\n accept: () => {\n this.removeContainer(index);\n },\n header: this.dotMessageService.get('editpage.confirm.header'),\n message: `${this.dotMessageService.get(\n 'editpage.confirm.message.delete'\n )} ${this.dotMessageService.get(\n 'editpage.confirm.message.delete.warning'\n )}`,\n footerLabel: {\n accept: this.dotMessageService.get('editpage.action.delete'),\n reject: this.dotMessageService.get('editpage.action.cancel')\n }\n });\n } else {\n this.removeContainer(index);\n }\n }\n\n // tslint:disable-next-line:no-shadowed-variable\n propagateChange = (_: any) => {};\n\n /**\n * Set the function to be called when the control receives a change event.\n *\n * @param * fn\n * @memberof DotEditLayoutGridComponent\n */\n registerOnChange(fn: any): void {\n this.propagateChange = fn;\n }\n\n registerOnTouched(): void {}\n\n /**\n * Update the model when the grid is changed\n *\n * @memberof DotEditLayoutGridComponent\n */\n propagateGridLayoutChange(): void {\n this.propagateChange(this.getModel());\n this.rowClass = this.grid.getAllRowClass();\n }\n\n /**\n * Write a new value to the element\n *\n * @param DotLayoutBody value\n * @memberof DotEditLayoutGridComponent\n */\n writeValue(value: DotLayoutBody): void {\n if (value) {\n this.value = value || null;\n this.setGridValue();\n }\n }\n\n /**\n * Add style class to a column\n *\n * @param {number} index\n * @param {string} title\n * @memberof DotEditLayoutGridComponent\n */\n addColumnClass(index: number): void {\n this.addClass({\n getter: () => {\n return this.grid.boxes[index].config.payload\n ? this.grid.boxes[index].config.payload.styleClass || null\n : null;\n },\n setter: (value: string) => {\n if (!this.grid.boxes[index].config.payload) {\n this.grid.boxes[index].config.payload = {\n styleClass: value\n };\n } else {\n this.grid.boxes[index].config.payload.styleClass = value;\n }\n },\n title: this.dotMessageService.get('editpage.layout.css.class.add.to.box')\n });\n }\n\n /**\n * Add style class to a row\n *\n * @param {number} index\n * @param {string} title\n * @memberof DotEditLayoutGridComponent\n */\n addRowClass(index: number): void {\n this.addClass({\n getter: () => this.grid.getRowClass(index) || '',\n setter: (value) => this.grid.setRowClass(value, index),\n title: this.dotMessageService.get('editpage.layout.css.class.add.to.row')\n });\n }\n\n /**\n * Handle hide event from add class dialog\n *\n * @memberof DotEditLayoutGridComponent\n */\n onAddClassDialogHide(): void {\n this.addClassDialogActions = null;\n this.addClassDialogShow = false;\n this.addClassDialogHeader = '';\n }\n\n private addClass(params: DotAddClass): void {\n this.form.setValue(\n {\n classToAdd: params.getter.bind(this)()\n },\n {\n emitEvent: false\n }\n );\n\n this.addClassDialogActions = {\n accept: {\n action: (dialog?: any) => {\n params.setter.bind(this)(this.form.get('classToAdd').value);\n this.propagateGridLayoutChange();\n dialog.close();\n },\n label: 'Ok',\n disabled: true\n },\n cancel: {\n label: 'Cancel'\n }\n };\n\n this.addClassDialogShow = true;\n this.addClassDialogHeader = params.title;\n }\n\n private setGridValue(): void {\n this.grid = this.isHaveRows()\n ? this.dotEditLayoutService.getDotLayoutGridBox(this.value)\n : DotLayoutGrid.getDefaultGrid();\n\n this.rowClass = this.grid.getAllRowClass();\n }\n\n private removeContainer(index: number): void {\n if (this.grid.boxes[index]) {\n this.grid.removeContainer(index);\n this.propagateGridLayoutChange();\n }\n }\n\n private deleteEmptyRows(): void {\n // TODO: Find a solution to remove setTimeout\n setTimeout(() => {\n this.grid.deleteEmptyRows();\n }, 0);\n }\n\n private isHaveRows(): boolean {\n return !!(this.value && this.value.rows && this.value.rows.length);\n }\n\n private resizeGrid(timeOut?): void {\n setTimeout(\n () => {\n this.ngGrid.triggerResize();\n },\n timeOut ? timeOut : 0\n );\n }\n}\n", + "properties": [ + { + "name": "getter", + "deprecated": false, + "deprecationMessage": "", + "type": "function", + "optional": false, + "description": "", + "line": 26 + }, + { + "name": "setter", + "deprecated": false, + "deprecationMessage": "", + "type": "function", + "optional": false, + "description": "", + "line": 25 + }, + { + "name": "title", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 27 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotAddEditEvents", + "id": "interface-DotAddEditEvents-ad64300f7ece5e08c38b9fb3bec577b9ece873dc704a29691d6952b03f937daa45976e558d82414f8e87507a7b460cb8f689d6ec5c2e21914e26fa1de24c488d", + "file": "apps/dotcms-ui/src/app/view/components/dot-contentlet-editor/services/dot-contentlet-editor.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { HttpErrorResponse } from '@angular/common/http';\nimport { CoreWebService } from '@dotcms/dotcms-js';\nimport { DotHttpErrorManagerService } from '@services/dot-http-error-manager/dot-http-error-manager.service';\nimport { Injectable } from '@angular/core';\nimport { Subject, Observable, of } from 'rxjs';\nimport { mergeMap, map, filter, catchError, pluck, take } from 'rxjs/operators';\nimport { DotCMSContentlet, DotCMSContentType } from '@dotcms/dotcms-models';\n\ninterface DotAddEditEvents {\n load?: ($event: any) => void;\n keyDown?: ($event: any) => void;\n}\n\nexport interface DotEditorAction {\n header?: string;\n data: {\n [key: string]: string;\n };\n events?: DotAddEditEvents;\n}\n\n/**\n * Handle the url and events for add and edit contentlet components\n *\n * @export\n * @class DotContentletEditorService\n */\n@Injectable()\nexport class DotContentletEditorService {\n close$: Subject = new Subject();\n draggedContentType$: Subject = new Subject();\n\n private data: Subject = new Subject();\n private _header: Subject = new Subject();\n private _load: ($event: any) => void;\n private _keyDown: ($event: KeyboardEvent) => void;\n\n constructor(\n private coreWebService: CoreWebService,\n private httpErrorManagerService: DotHttpErrorManagerService\n ) {}\n\n get addUrl$(): Observable {\n return this.data.pipe(\n filter((action: DotEditorAction) => this.isAddUrl(action)),\n map((action: DotEditorAction) => this.geAddtUrl(action))\n );\n }\n\n get editUrl$(): Observable {\n return this.data.pipe(\n filter((action: DotEditorAction) => this.isEditUrl(action)),\n mergeMap((action: DotEditorAction) => of(this.getEditUrl(action)))\n );\n }\n\n get createUrl$(): Observable {\n return this.data.pipe(\n filter((action: DotEditorAction) => this.isCreateUrl(action)),\n map((action: DotEditorAction) => this.getCreateUrl(action))\n );\n }\n\n get header$(): Observable {\n return this._header;\n }\n\n get loadHandler(): ($event: any) => void {\n return this._load;\n }\n\n get keyDownHandler(): ($event: any) => void {\n return this._keyDown;\n }\n\n /**\n * Set url to create a contentlet\n *\n * @param DotEditorAction action\n * @memberof DotContentletEditorService\n */\n create(action: DotEditorAction): void {\n this.setData(action);\n }\n\n /**\n * Set data to add a contentlet\n *\n * @param DotEditorAction action\n * @memberof DotAddContentletServicex\n */\n add(action: DotEditorAction): void {\n this.setData(action);\n }\n\n /**\n * Set data to edit a contentlet\n *\n * @param DotEditorAction action\n * @memberof DotContentletEditorService\n */\n edit(action: DotEditorAction): void {\n this.setData(action);\n }\n\n /**\n * Clear data to add a contentlet\n *\n * @memberof DotAddContentletService\n */\n clear() {\n this.data.next(null);\n this._load = null;\n this._keyDown = null;\n this.close$.next(true);\n }\n\n /**\n * Call keydown handler\n *\n * @param KeyboardEvent $event\n * @memberof DotContentletEditorService\n */\n keyDown($event: KeyboardEvent): void {\n if (this._keyDown) {\n this._keyDown($event);\n }\n }\n\n /**\n * Call load handler\n *\n * @param * $event\n * @memberof DotContentletEditorService\n */\n load($event: any): void {\n if (this._load) {\n this._load($event);\n }\n }\n\n /**\n * Returns action url to display create contentlet dialog\n * @param {string} contentTypeVariable\n * @returns Observable\n * @memberof DotContentletEditorService\n */\n getActionUrl(contentTypeVariable: string): Observable {\n return this.coreWebService\n .requestView({\n url: `v1/portlet/_actionurl/${contentTypeVariable}`\n })\n .pipe(\n pluck('entity'),\n catchError((error: HttpErrorResponse) => {\n return this.httpErrorManagerService.handle(error).pipe(\n take(1),\n map(() => null)\n );\n })\n );\n }\n\n /**\n * Set the content Type being dragged from the Content palette\n * @param {DotCMSContentType} contentType\n * @memberof DotContentletEditorService\n */\n setDraggedContentType(contentType: DotCMSContentType | DotCMSContentlet): void {\n this.draggedContentType$.next(contentType);\n }\n\n private bindEvents(events: DotAddEditEvents): void {\n if (events.load) {\n this._load = events.load;\n }\n if (events.keyDown) {\n this._keyDown = events.keyDown;\n }\n }\n\n private geAddtUrl(action: DotEditorAction): string {\n return action === null\n ? ''\n : `/html/ng-contentlet-selector.jsp?ng=true&container_id=${action.data.container}&add=${action.data.baseTypes}`;\n }\n\n private getCreateUrl(action: DotEditorAction): string {\n return action === null ? '' : action.data.url;\n }\n\n private getEditUrl(action: DotEditorAction): string {\n return action === null\n ? ''\n : [\n `/c/portal/layout`,\n `?p_p_id=content`,\n `&p_p_action=1`,\n `&p_p_state=maximized`,\n `&p_p_mode=view`,\n `&_content_struts_action=%2Fext%2Fcontentlet%2Fedit_contentlet`,\n `&_content_cmd=edit&inode=${action.data.inode}`\n ].join('');\n }\n\n private isAddUrl(action: DotEditorAction): boolean {\n return action === null || !!action.data.container;\n }\n\n private isCreateUrl(action: DotEditorAction): boolean {\n return action === null || !!action.data.url;\n }\n\n private isEditUrl(action: DotEditorAction): boolean {\n return action === null || !!action.data.inode;\n }\n\n private setData(action: DotEditorAction): void {\n if (action.events) {\n this.bindEvents(action.events);\n }\n\n if (action.header) {\n this._header.next(action.header);\n }\n\n this.data.next({\n data: action.data\n });\n }\n}\n", + "properties": [ + { + "name": "keyDown", + "deprecated": false, + "deprecationMessage": "", + "type": "function", + "optional": true, + "description": "", + "line": 11 + }, + { + "name": "load", + "deprecated": false, + "deprecationMessage": "", + "type": "function", + "optional": true, + "description": "", + "line": 10 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotAjaxActionResponseView", + "id": "interface-DotAjaxActionResponseView-f6e9ca55f293fba2a563f3bf0e17fd63172bc6ace85682da834af31e2e550bc4c7c2b41213bbf5bdd2d519f0d2cb066fd35a66c1269d2e2d4e2ff0976ef49f2c", + "file": "apps/dotcms-ui/src/app/shared/models/ajax-action-response/dot-ajax-action-response.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotAjaxActionResponseView {\n _body: any;\n errorMessages: string[];\n total: number;\n bundleId: string;\n errors: number;\n}\n", + "properties": [ + { + "name": "_body", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": false, + "description": "", + "line": 7 + }, + { + "name": "bundleId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 10 + }, + { + "name": "errorMessages", + "deprecated": false, + "deprecationMessage": "", + "type": "string[]", + "optional": false, + "description": "", + "line": 8 + }, + { + "name": "errors", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 11 + }, + { + "name": "total", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 9 + } + ], + "indexSignatures": [], + "kind": 165, + "description": "

Interface for Push Publish Post response.

\n", + "rawdescription": "\n\nInterface for Push Publish Post response.\n\n", + "methods": [] + }, + { + "name": "DotAlertConfirm", + "id": "interface-DotAlertConfirm-1d125d1a6cdc622a2fe9e5bce09ac25e4bd4101ff7172b1c0389f4a07254c69f67f86fe68b87338ad6f6f4831405a4f291aeaea30b41176066fa0074bcaad578", + "file": "apps/dotcms-ui/src/app/shared/models/dot-alert-confirm/dot-alert-confirm.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { EventEmitter } from '@angular/core';\nimport { FooterLabels } from './footer-labels.model';\n\nexport interface DotAlertConfirm {\n message: string;\n key?: string;\n icon?: string;\n header: string;\n footerLabel?: FooterLabels;\n accept?: Function;\n reject?: Function;\n acceptVisible?: boolean;\n rejectVisible?: boolean;\n acceptEvent?: EventEmitter;\n rejectEvent?: EventEmitter;\n}\n", + "properties": [ + { + "name": "accept", + "deprecated": false, + "deprecationMessage": "", + "type": "Function", + "optional": true, + "description": "", + "line": 10 + }, + { + "name": "acceptEvent", + "deprecated": false, + "deprecationMessage": "", + "type": "EventEmitter", + "optional": true, + "description": "", + "line": 14 + }, + { + "name": "acceptVisible", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 12 + }, + { + "name": "footerLabel", + "deprecated": false, + "deprecationMessage": "", + "type": "FooterLabels", + "optional": true, + "description": "", + "line": 9 + }, + { + "name": "header", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 8 + }, + { + "name": "icon", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 7 + }, + { + "name": "key", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 6 + }, + { + "name": "message", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 5 + }, + { + "name": "reject", + "deprecated": false, + "deprecationMessage": "", + "type": "Function", + "optional": true, + "description": "", + "line": 11 + }, + { + "name": "rejectEvent", + "deprecated": false, + "deprecationMessage": "", + "type": "EventEmitter", + "optional": true, + "description": "", + "line": 15 + }, + { + "name": "rejectVisible", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 13 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotAppHttpRequestParams", + "id": "interface-DotAppHttpRequestParams-71a8dc3d4e29ca84b2f8941e272ef83faaad6bc10eb0b6b3b4c4329ba80643b977c971f54f23fbdb51a3d9d7ddae5f60a11f6276972e8ffe062e7bc70908dd7c", + "file": "libs/dotcms/src/lib/models/DotCMSHttpClient.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotAppHttpRequestParams {\n url: string;\n method?: string;\n body?: { [key: string]: any } | string;\n params?: { [key: string]: string };\n}\n", + "properties": [ + { + "name": "body", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type | string", + "optional": true, + "description": "", + "line": 4 + }, + { + "name": "method", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 3 + }, + { + "name": "params", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": true, + "description": "", + "line": 5 + }, + { + "name": "url", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 2 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotApps", + "id": "interface-DotApps-6c8c92ab02cfde2a90667557a64467e3122154504cf8ce30b5d808b92506f94eb4b8de34f2e0a2e13c078579b001beb0396da6a799394791ebfddf98b98a4e7d", + "file": "apps/dotcms-ui/src/app/shared/models/dot-apps/dot-apps.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { SelectItem } from 'primeng/api';\n\nexport enum dialogAction {\n IMPORT = 'Import',\n EXPORT = 'Export'\n}\n\nexport interface DotApps {\n allowExtraParams: boolean;\n configurationsCount?: number;\n description?: string;\n iconUrl?: string;\n key: string;\n name: string;\n sites?: DotAppsSites[];\n sitesWithWarnings?: number;\n}\n\nexport interface DotAppsSites {\n configured?: boolean;\n id: string;\n name: string;\n secrets?: DotAppsSecrets[];\n secretsWithWarnings?: number;\n}\n\nexport interface DotAppsSecrets {\n dynamic: boolean;\n hidden: boolean;\n hint: string;\n label: string;\n name: string;\n options?: SelectItem[];\n required: boolean;\n type: string;\n value: string;\n warnings?: string[];\n}\n\nexport interface DotAppsSaveData {\n [key: string]: {\n hidden: string;\n value: string;\n };\n}\n\nexport interface DotAppsListResolverData {\n apps: DotApps[];\n isEnterpriseLicense: boolean;\n}\n\nexport interface DotAppsExportConfiguration {\n appKeysBySite?: { [key: string]: string[] };\n exportAll: boolean;\n password: string;\n}\n\nexport interface DotAppsImportConfiguration {\n file: File;\n json: { password: string };\n}\n", + "properties": [ + { + "name": "allowExtraParams", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 9 + }, + { + "name": "configurationsCount", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 10 + }, + { + "name": "description", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 11 + }, + { + "name": "iconUrl", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 12 + }, + { + "name": "key", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 13 + }, + { + "name": "name", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 14 + }, + { + "name": "sites", + "deprecated": false, + "deprecationMessage": "", + "type": "DotAppsSites[]", + "optional": true, + "description": "", + "line": 15 + }, + { + "name": "sitesWithWarnings", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 16 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotAppsExportConfiguration", + "id": "interface-DotAppsExportConfiguration-6c8c92ab02cfde2a90667557a64467e3122154504cf8ce30b5d808b92506f94eb4b8de34f2e0a2e13c078579b001beb0396da6a799394791ebfddf98b98a4e7d", + "file": "apps/dotcms-ui/src/app/shared/models/dot-apps/dot-apps.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { SelectItem } from 'primeng/api';\n\nexport enum dialogAction {\n IMPORT = 'Import',\n EXPORT = 'Export'\n}\n\nexport interface DotApps {\n allowExtraParams: boolean;\n configurationsCount?: number;\n description?: string;\n iconUrl?: string;\n key: string;\n name: string;\n sites?: DotAppsSites[];\n sitesWithWarnings?: number;\n}\n\nexport interface DotAppsSites {\n configured?: boolean;\n id: string;\n name: string;\n secrets?: DotAppsSecrets[];\n secretsWithWarnings?: number;\n}\n\nexport interface DotAppsSecrets {\n dynamic: boolean;\n hidden: boolean;\n hint: string;\n label: string;\n name: string;\n options?: SelectItem[];\n required: boolean;\n type: string;\n value: string;\n warnings?: string[];\n}\n\nexport interface DotAppsSaveData {\n [key: string]: {\n hidden: string;\n value: string;\n };\n}\n\nexport interface DotAppsListResolverData {\n apps: DotApps[];\n isEnterpriseLicense: boolean;\n}\n\nexport interface DotAppsExportConfiguration {\n appKeysBySite?: { [key: string]: string[] };\n exportAll: boolean;\n password: string;\n}\n\nexport interface DotAppsImportConfiguration {\n file: File;\n json: { password: string };\n}\n", + "properties": [ + { + "name": "appKeysBySite", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": true, + "description": "", + "line": 53 + }, + { + "name": "exportAll", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 54 + }, + { + "name": "password", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 55 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotAppsImportConfiguration", + "id": "interface-DotAppsImportConfiguration-6c8c92ab02cfde2a90667557a64467e3122154504cf8ce30b5d808b92506f94eb4b8de34f2e0a2e13c078579b001beb0396da6a799394791ebfddf98b98a4e7d", + "file": "apps/dotcms-ui/src/app/shared/models/dot-apps/dot-apps.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { SelectItem } from 'primeng/api';\n\nexport enum dialogAction {\n IMPORT = 'Import',\n EXPORT = 'Export'\n}\n\nexport interface DotApps {\n allowExtraParams: boolean;\n configurationsCount?: number;\n description?: string;\n iconUrl?: string;\n key: string;\n name: string;\n sites?: DotAppsSites[];\n sitesWithWarnings?: number;\n}\n\nexport interface DotAppsSites {\n configured?: boolean;\n id: string;\n name: string;\n secrets?: DotAppsSecrets[];\n secretsWithWarnings?: number;\n}\n\nexport interface DotAppsSecrets {\n dynamic: boolean;\n hidden: boolean;\n hint: string;\n label: string;\n name: string;\n options?: SelectItem[];\n required: boolean;\n type: string;\n value: string;\n warnings?: string[];\n}\n\nexport interface DotAppsSaveData {\n [key: string]: {\n hidden: string;\n value: string;\n };\n}\n\nexport interface DotAppsListResolverData {\n apps: DotApps[];\n isEnterpriseLicense: boolean;\n}\n\nexport interface DotAppsExportConfiguration {\n appKeysBySite?: { [key: string]: string[] };\n exportAll: boolean;\n password: string;\n}\n\nexport interface DotAppsImportConfiguration {\n file: File;\n json: { password: string };\n}\n", + "properties": [ + { + "name": "file", + "deprecated": false, + "deprecationMessage": "", + "type": "File", + "optional": false, + "description": "", + "line": 59 + }, + { + "name": "json", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": false, + "description": "", + "line": 60 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotAppsListResolverData", + "id": "interface-DotAppsListResolverData-6c8c92ab02cfde2a90667557a64467e3122154504cf8ce30b5d808b92506f94eb4b8de34f2e0a2e13c078579b001beb0396da6a799394791ebfddf98b98a4e7d", + "file": "apps/dotcms-ui/src/app/shared/models/dot-apps/dot-apps.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { SelectItem } from 'primeng/api';\n\nexport enum dialogAction {\n IMPORT = 'Import',\n EXPORT = 'Export'\n}\n\nexport interface DotApps {\n allowExtraParams: boolean;\n configurationsCount?: number;\n description?: string;\n iconUrl?: string;\n key: string;\n name: string;\n sites?: DotAppsSites[];\n sitesWithWarnings?: number;\n}\n\nexport interface DotAppsSites {\n configured?: boolean;\n id: string;\n name: string;\n secrets?: DotAppsSecrets[];\n secretsWithWarnings?: number;\n}\n\nexport interface DotAppsSecrets {\n dynamic: boolean;\n hidden: boolean;\n hint: string;\n label: string;\n name: string;\n options?: SelectItem[];\n required: boolean;\n type: string;\n value: string;\n warnings?: string[];\n}\n\nexport interface DotAppsSaveData {\n [key: string]: {\n hidden: string;\n value: string;\n };\n}\n\nexport interface DotAppsListResolverData {\n apps: DotApps[];\n isEnterpriseLicense: boolean;\n}\n\nexport interface DotAppsExportConfiguration {\n appKeysBySite?: { [key: string]: string[] };\n exportAll: boolean;\n password: string;\n}\n\nexport interface DotAppsImportConfiguration {\n file: File;\n json: { password: string };\n}\n", + "properties": [ + { + "name": "apps", + "deprecated": false, + "deprecationMessage": "", + "type": "DotApps[]", + "optional": false, + "description": "", + "line": 48 + }, + { + "name": "isEnterpriseLicense", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 49 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotAppsSaveData", + "id": "interface-DotAppsSaveData-6c8c92ab02cfde2a90667557a64467e3122154504cf8ce30b5d808b92506f94eb4b8de34f2e0a2e13c078579b001beb0396da6a799394791ebfddf98b98a4e7d", + "file": "apps/dotcms-ui/src/app/shared/models/dot-apps/dot-apps.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { SelectItem } from 'primeng/api';\n\nexport enum dialogAction {\n IMPORT = 'Import',\n EXPORT = 'Export'\n}\n\nexport interface DotApps {\n allowExtraParams: boolean;\n configurationsCount?: number;\n description?: string;\n iconUrl?: string;\n key: string;\n name: string;\n sites?: DotAppsSites[];\n sitesWithWarnings?: number;\n}\n\nexport interface DotAppsSites {\n configured?: boolean;\n id: string;\n name: string;\n secrets?: DotAppsSecrets[];\n secretsWithWarnings?: number;\n}\n\nexport interface DotAppsSecrets {\n dynamic: boolean;\n hidden: boolean;\n hint: string;\n label: string;\n name: string;\n options?: SelectItem[];\n required: boolean;\n type: string;\n value: string;\n warnings?: string[];\n}\n\nexport interface DotAppsSaveData {\n [key: string]: {\n hidden: string;\n value: string;\n };\n}\n\nexport interface DotAppsListResolverData {\n apps: DotApps[];\n isEnterpriseLicense: boolean;\n}\n\nexport interface DotAppsExportConfiguration {\n appKeysBySite?: { [key: string]: string[] };\n exportAll: boolean;\n password: string;\n}\n\nexport interface DotAppsImportConfiguration {\n file: File;\n json: { password: string };\n}\n", + "properties": [], + "indexSignatures": [ + { + "id": "index-declaration-6c8c92ab02cfde2a90667557a64467e3122154504cf8ce30b5d808b92506f94eb4b8de34f2e0a2e13c078579b001beb0396da6a799394791ebfddf98b98a4e7d", + "args": [ + { + "name": "key", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "returnType": "literal type", + "line": 40, + "deprecated": false, + "deprecationMessage": "" + } + ], + "kind": 175, + "methods": [] + }, + { + "name": "DotAppsSecrets", + "id": "interface-DotAppsSecrets-6c8c92ab02cfde2a90667557a64467e3122154504cf8ce30b5d808b92506f94eb4b8de34f2e0a2e13c078579b001beb0396da6a799394791ebfddf98b98a4e7d", + "file": "apps/dotcms-ui/src/app/shared/models/dot-apps/dot-apps.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { SelectItem } from 'primeng/api';\n\nexport enum dialogAction {\n IMPORT = 'Import',\n EXPORT = 'Export'\n}\n\nexport interface DotApps {\n allowExtraParams: boolean;\n configurationsCount?: number;\n description?: string;\n iconUrl?: string;\n key: string;\n name: string;\n sites?: DotAppsSites[];\n sitesWithWarnings?: number;\n}\n\nexport interface DotAppsSites {\n configured?: boolean;\n id: string;\n name: string;\n secrets?: DotAppsSecrets[];\n secretsWithWarnings?: number;\n}\n\nexport interface DotAppsSecrets {\n dynamic: boolean;\n hidden: boolean;\n hint: string;\n label: string;\n name: string;\n options?: SelectItem[];\n required: boolean;\n type: string;\n value: string;\n warnings?: string[];\n}\n\nexport interface DotAppsSaveData {\n [key: string]: {\n hidden: string;\n value: string;\n };\n}\n\nexport interface DotAppsListResolverData {\n apps: DotApps[];\n isEnterpriseLicense: boolean;\n}\n\nexport interface DotAppsExportConfiguration {\n appKeysBySite?: { [key: string]: string[] };\n exportAll: boolean;\n password: string;\n}\n\nexport interface DotAppsImportConfiguration {\n file: File;\n json: { password: string };\n}\n", + "properties": [ + { + "name": "dynamic", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 28 + }, + { + "name": "hidden", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 29 + }, + { + "name": "hint", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 30 + }, + { + "name": "label", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 31 + }, + { + "name": "name", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 32 + }, + { + "name": "options", + "deprecated": false, + "deprecationMessage": "", + "type": "SelectItem[]", + "optional": true, + "description": "", + "line": 33 + }, + { + "name": "required", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 34 + }, + { + "name": "type", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 35 + }, + { + "name": "value", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 36 + }, + { + "name": "warnings", + "deprecated": false, + "deprecationMessage": "", + "type": "string[]", + "optional": true, + "description": "", + "line": 37 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotAppsSites", + "id": "interface-DotAppsSites-6c8c92ab02cfde2a90667557a64467e3122154504cf8ce30b5d808b92506f94eb4b8de34f2e0a2e13c078579b001beb0396da6a799394791ebfddf98b98a4e7d", + "file": "apps/dotcms-ui/src/app/shared/models/dot-apps/dot-apps.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { SelectItem } from 'primeng/api';\n\nexport enum dialogAction {\n IMPORT = 'Import',\n EXPORT = 'Export'\n}\n\nexport interface DotApps {\n allowExtraParams: boolean;\n configurationsCount?: number;\n description?: string;\n iconUrl?: string;\n key: string;\n name: string;\n sites?: DotAppsSites[];\n sitesWithWarnings?: number;\n}\n\nexport interface DotAppsSites {\n configured?: boolean;\n id: string;\n name: string;\n secrets?: DotAppsSecrets[];\n secretsWithWarnings?: number;\n}\n\nexport interface DotAppsSecrets {\n dynamic: boolean;\n hidden: boolean;\n hint: string;\n label: string;\n name: string;\n options?: SelectItem[];\n required: boolean;\n type: string;\n value: string;\n warnings?: string[];\n}\n\nexport interface DotAppsSaveData {\n [key: string]: {\n hidden: string;\n value: string;\n };\n}\n\nexport interface DotAppsListResolverData {\n apps: DotApps[];\n isEnterpriseLicense: boolean;\n}\n\nexport interface DotAppsExportConfiguration {\n appKeysBySite?: { [key: string]: string[] };\n exportAll: boolean;\n password: string;\n}\n\nexport interface DotAppsImportConfiguration {\n file: File;\n json: { password: string };\n}\n", + "properties": [ + { + "name": "configured", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 20 + }, + { + "name": "id", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 21 + }, + { + "name": "name", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 22 + }, + { + "name": "secrets", + "deprecated": false, + "deprecationMessage": "", + "type": "DotAppsSecrets[]", + "optional": true, + "description": "", + "line": 23 + }, + { + "name": "secretsWithWarnings", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 24 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotAssetCreateOptions", + "id": "interface-DotAssetCreateOptions-e3d7f22458236fc17c628490fcd4ed7387ec412b41c97315d8e955442de3e14aced5aa443977b6e2d872cdd101471829419f73960c6525a1a76063d06c94019f", + "file": "libs/dotcms-models/src/lib/dot-asset-create-options.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotCMSTempFile } from '@dotcms/dotcms-models';\n\nexport interface DotAssetCreateOptions {\n files: DotCMSTempFile[];\n updateCallback: (processed: number) => void;\n url: string;\n folder: string;\n}\n", + "properties": [ + { + "name": "files", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSTempFile[]", + "optional": false, + "description": "", + "line": 4 + }, + { + "name": "folder", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 7 + }, + { + "name": "updateCallback", + "deprecated": false, + "deprecationMessage": "", + "type": "function", + "optional": false, + "description": "", + "line": 5 + }, + { + "name": "url", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 6 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotAssetPayload", + "id": "interface-DotAssetPayload-548bff6c62c66666033e5858c740593d9da0e58c682b7338e62ed468d90162ab7c9f2a766f6cc365c405ec52b71752b143e28ae8b6643581879119257e9faab8", + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/dot-edit-content-html/models/dot-contentlets-events.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotPageContent } from '@portlets/dot-edit-page/shared/models/dot-page-content.model';\nimport { DotPageContainer } from '@models/dot-page-container/dot-page-container.model';\n\nexport interface DotContentletEvent {\n name: string;\n data: T;\n}\n\nexport interface DotContentletEventDragAndDropDotAsset extends DotContentletEvent {}\nexport interface DotContentletEventRelocate extends DotContentletEvent {}\nexport interface DotContentletEventSelect extends DotContentletEvent {}\nexport interface DotContentletEventSave extends DotContentletEvent {}\n\nexport interface DotAssetPayload {\n contentlet: DotPageContent;\n placeholderId: string;\n}\n\nexport interface DotRelocatePayload {\n container: DotPageContainer;\n contentlet: DotPageContent;\n}\n\nexport interface DotInlineDataset {\n mode: string;\n inode: string;\n fieldName: string;\n language: string;\n}\n\nexport interface DotInlineEditContent {\n innerHTML: string;\n dataset: DotInlineDataset;\n element: HTMLElement;\n isNotDirty: boolean;\n eventType: string;\n}\n", + "properties": [ + { + "name": "contentlet", + "deprecated": false, + "deprecationMessage": "", + "type": "DotPageContent", + "optional": false, + "description": "", + "line": 15 + }, + { + "name": "placeholderId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 16 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotBinaryFileEvent", + "id": "interface-DotBinaryFileEvent-da20896564a7050553af6b4e6ebf19e6011caf66860c43041c923265478603f35ce000e760f0c9d12bb542790530072418fcfa15fcc6ea423a626f1f6a1ca6a4", + "file": "libs/dotcms-field-elements/src/models/dot-field-event.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotFieldStatus } from './dot-field-status.model';\nimport { DotBinaryMessageError } from './dot-binary-message-error.model';\n\nexport interface DotFieldEvent {\n name: string;\n}\n\nexport interface DotFieldStatusEvent extends DotFieldEvent {\n status: DotFieldStatus;\n}\n\nexport interface DotInputCalendarStatusEvent extends DotFieldStatusEvent {\n isValidRange: boolean;\n}\n\nexport interface DotFieldValueEvent extends DotFieldEvent {\n fieldType?: string;\n value: string | File;\n}\n\nexport interface DotBinaryFileEvent {\n file: string | File;\n errorType: DotBinaryMessageError;\n}\n", + "properties": [ + { + "name": "errorType", + "deprecated": false, + "deprecationMessage": "", + "type": "DotBinaryMessageError", + "optional": false, + "description": "", + "line": 23 + }, + { + "name": "file", + "deprecated": false, + "deprecationMessage": "", + "type": "string | File", + "optional": false, + "description": "", + "line": 22 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotBinaryFileEvent", + "id": "interface-DotBinaryFileEvent-da20896564a7050553af6b4e6ebf19e6011caf66860c43041c923265478603f35ce000e760f0c9d12bb542790530072418fcfa15fcc6ea423a626f1f6a1ca6a4-1", + "file": "libs/dotcms-webcomponents/src/models/dot-field-event.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotFieldStatus } from './dot-field-status.model';\nimport { DotBinaryMessageError } from './dot-binary-message-error.model';\n\nexport interface DotFieldEvent {\n name: string;\n}\n\nexport interface DotFieldStatusEvent extends DotFieldEvent {\n status: DotFieldStatus;\n}\n\nexport interface DotInputCalendarStatusEvent extends DotFieldStatusEvent {\n isValidRange: boolean;\n}\n\nexport interface DotFieldValueEvent extends DotFieldEvent {\n fieldType?: string;\n value: string | File;\n}\n\nexport interface DotBinaryFileEvent {\n file: string | File;\n errorType: DotBinaryMessageError;\n}\n", + "properties": [ + { + "name": "errorType", + "deprecated": false, + "deprecationMessage": "", + "type": "DotBinaryMessageError", + "optional": false, + "description": "", + "line": 23 + }, + { + "name": "file", + "deprecated": false, + "deprecationMessage": "", + "type": "string | File", + "optional": false, + "description": "", + "line": 22 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [], + "isDuplicate": true, + "duplicateId": 1, + "duplicateName": "DotBinaryFileEvent-1" + }, + { + "name": "DotBulkFailItem", + "id": "interface-DotBulkFailItem-d45607716f60a7b2fba42dd46c51cd785d1278c43e6b9fa44f981d00949ee75437c144048fe3f79d0665dfae0e99df6eb45c92f5504433e2d89f3bb5a2daab52", + "file": "apps/dotcms-ui/src/app/shared/models/dot-action-bulk-result/dot-action-bulk-result.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotActionBulkResult {\n skippedCount: number;\n successCount: number;\n fails: DotBulkFailItem[];\n action?: string;\n}\n\n// optional attrs because api is not consistent\nexport interface DotBulkFailItem {\n errorMessage: string;\n element?: string;\n inode?: string;\n description?: string;\n}\n", + "properties": [ + { + "name": "description", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 19 + }, + { + "name": "element", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 17 + }, + { + "name": "errorMessage", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 16 + }, + { + "name": "inode", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 18 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotBundle", + "id": "interface-DotBundle-b1cbc0caf9349819214d116683d6eec30866e572034640117e313fb6c58cb73fd39c495546c3011b88c19d39171b56b8bfdcb893870ab93d9a4ed137f9d13220", + "file": "apps/dotcms-ui/src/app/shared/models/dot-bundle/dot-bundle.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotBundle {\n name: string;\n id: string;\n}\n", + "properties": [ + { + "name": "id", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 8 + }, + { + "name": "name", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 7 + } + ], + "indexSignatures": [], + "kind": 165, + "description": "

Interface for bundle.

\n", + "rawdescription": "\n\nInterface for bundle.\n\n", + "methods": [] + }, + { + "name": "DotCardContentletEvent", + "id": "interface-DotCardContentletEvent-9a88c3c05d414b5976ae5d62343a81904d89756dd0d9d5e6904bf47c0b298243590d169dc56745d3202f44398473dc7c707419324b5ca299bbb02c8addafd9fe", + "file": "libs/dotcms-webcomponents/src/models/dot-card-contentlet.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotContentletItem } from './dot-contentlet-item.model';\nimport { DotContextMenuOption } from './dot-context-menu.model';\n\nexport interface DotCardContentletItem {\n data: DotContentletItem;\n actions: DotContextMenuOption<{ index: number }>[];\n}\n\nexport interface DotCardContentletEvent {\n originalTarget: HTMLDotCardContentletElement;\n shiftKey: boolean;\n}\n", + "properties": [ + { + "name": "originalTarget", + "deprecated": false, + "deprecationMessage": "", + "type": "HTMLDotCardContentletElement", + "optional": false, + "description": "", + "line": 10 + }, + { + "name": "shiftKey", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 11 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotCardContentletItem", + "id": "interface-DotCardContentletItem-9a88c3c05d414b5976ae5d62343a81904d89756dd0d9d5e6904bf47c0b298243590d169dc56745d3202f44398473dc7c707419324b5ca299bbb02c8addafd9fe", + "file": "libs/dotcms-webcomponents/src/models/dot-card-contentlet.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotContentletItem } from './dot-contentlet-item.model';\nimport { DotContextMenuOption } from './dot-context-menu.model';\n\nexport interface DotCardContentletItem {\n data: DotContentletItem;\n actions: DotContextMenuOption<{ index: number }>[];\n}\n\nexport interface DotCardContentletEvent {\n originalTarget: HTMLDotCardContentletElement;\n shiftKey: boolean;\n}\n", + "properties": [ + { + "name": "actions", + "deprecated": false, + "deprecationMessage": "", + "type": "DotContextMenuOption[]", + "optional": false, + "description": "", + "line": 6 + }, + { + "name": "data", + "deprecated": false, + "deprecationMessage": "", + "type": "DotContentletItem", + "optional": false, + "description": "", + "line": 5 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotCDNState", + "id": "interface-DotCDNState-0a774022a631c21706aa978c03179244f9ecd6e131c62b325a4b90052d58b078f50a3575b289568cca943ecac054aa18a52b874a9d679d05e5b02232a848db8b", + "file": "apps/dotcdn/src/app/app.models.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { ChartOptions } from 'chart.js';\nexport interface ChartDataSet {\n label: string;\n data: string[];\n borderColor?: string;\n fill?: boolean;\n}\n\nexport interface DotCDNStats {\n stats: {\n bandwidthPretty: string;\n bandwidthUsedChart: { [key: string]: number };\n requestsServedChart: { [key: string]: number };\n cacheHitRate: number;\n dateFrom: string;\n dateTo: string;\n geographicDistribution: unknown;\n totalBandwidthUsed: number;\n totalRequestsServed: number;\n cdnDomain: string;\n };\n}\n\nexport interface ChartData {\n labels: string[];\n datasets: ChartDataSet[];\n}\nexport interface DotChartStats {\n label: string;\n value: string;\n icon: string;\n}\n\nexport interface PurgeUrlOptions {\n hostId: string;\n invalidateAll: boolean;\n urls?: string[];\n}\nexport interface DotCDNState {\n chartBandwidthData: ChartData;\n chartRequestsData: ChartData;\n statsData: DotChartStats[];\n isChartLoading: boolean;\n cdnDomain: string;\n isPurgeUrlsLoading: boolean;\n isPurgeZoneLoading: boolean;\n}\n\nexport type CdnChartOptions = {\n bandwidthUsedChart: ChartOptions;\n requestsServedChart: ChartOptions;\n};\n\nexport interface PurgeReturnData {\n entity: { [key: string]: string | boolean };\n errors: string[];\n messages: string[];\n permissions: string[];\n i18nMessagesMap: { [key: string]: string };\n}\n\nexport const enum ChartPeriod {\n Last15Days = '15',\n Last30Days = '30',\n Last60Days = '60'\n}\n\nexport const enum LoadingState {\n IDLE = 'IDLE',\n LOADING = 'LOADING',\n LOADED = 'LOADED'\n}\n\nexport const enum Loader {\n CHART = 'CHART',\n PURGE_URLS = 'PURGE_URLS',\n PURGE_PULL_ZONE = 'PURGE_PULL_ZONE'\n}\n", + "properties": [ + { + "name": "cdnDomain", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 44 + }, + { + "name": "chartBandwidthData", + "deprecated": false, + "deprecationMessage": "", + "type": "ChartData", + "optional": false, + "description": "", + "line": 40 + }, + { + "name": "chartRequestsData", + "deprecated": false, + "deprecationMessage": "", + "type": "ChartData", + "optional": false, + "description": "", + "line": 41 + }, + { + "name": "isChartLoading", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 43 + }, + { + "name": "isPurgeUrlsLoading", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 45 + }, + { + "name": "isPurgeZoneLoading", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 46 + }, + { + "name": "statsData", + "deprecated": false, + "deprecationMessage": "", + "type": "DotChartStats[]", + "optional": false, + "description": "", + "line": 42 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotCDNStats", + "id": "interface-DotCDNStats-0a774022a631c21706aa978c03179244f9ecd6e131c62b325a4b90052d58b078f50a3575b289568cca943ecac054aa18a52b874a9d679d05e5b02232a848db8b", + "file": "apps/dotcdn/src/app/app.models.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { ChartOptions } from 'chart.js';\nexport interface ChartDataSet {\n label: string;\n data: string[];\n borderColor?: string;\n fill?: boolean;\n}\n\nexport interface DotCDNStats {\n stats: {\n bandwidthPretty: string;\n bandwidthUsedChart: { [key: string]: number };\n requestsServedChart: { [key: string]: number };\n cacheHitRate: number;\n dateFrom: string;\n dateTo: string;\n geographicDistribution: unknown;\n totalBandwidthUsed: number;\n totalRequestsServed: number;\n cdnDomain: string;\n };\n}\n\nexport interface ChartData {\n labels: string[];\n datasets: ChartDataSet[];\n}\nexport interface DotChartStats {\n label: string;\n value: string;\n icon: string;\n}\n\nexport interface PurgeUrlOptions {\n hostId: string;\n invalidateAll: boolean;\n urls?: string[];\n}\nexport interface DotCDNState {\n chartBandwidthData: ChartData;\n chartRequestsData: ChartData;\n statsData: DotChartStats[];\n isChartLoading: boolean;\n cdnDomain: string;\n isPurgeUrlsLoading: boolean;\n isPurgeZoneLoading: boolean;\n}\n\nexport type CdnChartOptions = {\n bandwidthUsedChart: ChartOptions;\n requestsServedChart: ChartOptions;\n};\n\nexport interface PurgeReturnData {\n entity: { [key: string]: string | boolean };\n errors: string[];\n messages: string[];\n permissions: string[];\n i18nMessagesMap: { [key: string]: string };\n}\n\nexport const enum ChartPeriod {\n Last15Days = '15',\n Last30Days = '30',\n Last60Days = '60'\n}\n\nexport const enum LoadingState {\n IDLE = 'IDLE',\n LOADING = 'LOADING',\n LOADED = 'LOADED'\n}\n\nexport const enum Loader {\n CHART = 'CHART',\n PURGE_URLS = 'PURGE_URLS',\n PURGE_PULL_ZONE = 'PURGE_PULL_ZONE'\n}\n", + "properties": [ + { + "name": "stats", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": false, + "description": "", + "line": 10 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotChartStats", + "id": "interface-DotChartStats-0a774022a631c21706aa978c03179244f9ecd6e131c62b325a4b90052d58b078f50a3575b289568cca943ecac054aa18a52b874a9d679d05e5b02232a848db8b", + "file": "apps/dotcdn/src/app/app.models.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { ChartOptions } from 'chart.js';\nexport interface ChartDataSet {\n label: string;\n data: string[];\n borderColor?: string;\n fill?: boolean;\n}\n\nexport interface DotCDNStats {\n stats: {\n bandwidthPretty: string;\n bandwidthUsedChart: { [key: string]: number };\n requestsServedChart: { [key: string]: number };\n cacheHitRate: number;\n dateFrom: string;\n dateTo: string;\n geographicDistribution: unknown;\n totalBandwidthUsed: number;\n totalRequestsServed: number;\n cdnDomain: string;\n };\n}\n\nexport interface ChartData {\n labels: string[];\n datasets: ChartDataSet[];\n}\nexport interface DotChartStats {\n label: string;\n value: string;\n icon: string;\n}\n\nexport interface PurgeUrlOptions {\n hostId: string;\n invalidateAll: boolean;\n urls?: string[];\n}\nexport interface DotCDNState {\n chartBandwidthData: ChartData;\n chartRequestsData: ChartData;\n statsData: DotChartStats[];\n isChartLoading: boolean;\n cdnDomain: string;\n isPurgeUrlsLoading: boolean;\n isPurgeZoneLoading: boolean;\n}\n\nexport type CdnChartOptions = {\n bandwidthUsedChart: ChartOptions;\n requestsServedChart: ChartOptions;\n};\n\nexport interface PurgeReturnData {\n entity: { [key: string]: string | boolean };\n errors: string[];\n messages: string[];\n permissions: string[];\n i18nMessagesMap: { [key: string]: string };\n}\n\nexport const enum ChartPeriod {\n Last15Days = '15',\n Last30Days = '30',\n Last60Days = '60'\n}\n\nexport const enum LoadingState {\n IDLE = 'IDLE',\n LOADING = 'LOADING',\n LOADED = 'LOADED'\n}\n\nexport const enum Loader {\n CHART = 'CHART',\n PURGE_URLS = 'PURGE_URLS',\n PURGE_PULL_ZONE = 'PURGE_PULL_ZONE'\n}\n", + "properties": [ + { + "name": "icon", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 31 + }, + { + "name": "label", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 29 + }, + { + "name": "value", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 30 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotCMSApp", + "id": "interface-DotCMSApp-7268f5b7759320d2cd0aab9fe86a940bc5519faf1937ba4b12413c7e76712d170f6decc77730feeac0af05d33ceb231c3e6154414d9003ad8d01a033d9a78032", + "file": "libs/dotcms/src/index.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotApiAuthorization } from './lib/api/DotApiAuthorization';\nimport { DotApiConfiguration } from './lib/api/DotApiConfiguration';\nimport { DotApiElasticSearch } from './lib/api/DotApiElasticSearch';\nimport { DotApiEvent } from './lib/api/DotApiEvent';\nimport { DotApiLanguage } from './lib/api/DotApiLanguage';\nimport { DotApiNavigation } from './lib/api/DotApiNavigation';\nimport { DotApiPage } from './lib/api/DotApiPage';\nimport { DotApiSite } from './lib/api/DotApiSite';\nimport { DotApiWidget } from './lib/api/DotApiWidget';\nimport { DotCMSHttpClient } from './lib/utils/DotCMSHttpClient';\nimport { DotCMSConfigurationParams, DotCMSFormConfig } from './lib/models';\nimport { DotApiContent } from './lib/api/DotApiContent';\nimport { DotApiContentType } from './lib/api/DotApiContentType';\nimport { DotApiForm } from './lib/api/DotApiForm';\n\nexport interface DotCMSApp {\n auth: DotApiAuthorization;\n content: DotApiContent;\n contentType: DotApiContentType;\n esSearch: DotApiElasticSearch;\n event: DotApiEvent;\n nav: DotApiNavigation;\n page: DotApiPage;\n site: DotApiSite;\n form: (formConfig: DotCMSFormConfig, win?: Window) => DotApiForm;\n widget: DotApiWidget;\n config: DotApiConfiguration;\n language: DotApiLanguage;\n httpClient: DotCMSHttpClient;\n}\n\nexport const initDotCMS = (config: DotCMSConfigurationParams): DotCMSApp => {\n const httpClient = new DotCMSHttpClient(config);\n const apiConfig = new DotApiConfiguration(httpClient);\n const apiLanguage = new DotApiLanguage(apiConfig);\n const content = new DotApiContent(httpClient);\n const dotApiContentType = new DotApiContentType(httpClient);\n\n return {\n auth: new DotApiAuthorization(),\n config: apiConfig,\n content: content,\n contentType: new DotApiContentType(httpClient),\n esSearch: new DotApiElasticSearch(httpClient),\n event: new DotApiEvent(),\n form: (formConfig: DotCMSFormConfig) => new DotApiForm(dotApiContentType, formConfig),\n language: apiLanguage,\n nav: new DotApiNavigation(httpClient),\n page: new DotApiPage(httpClient, apiLanguage),\n site: new DotApiSite(httpClient),\n widget: new DotApiWidget(httpClient),\n httpClient\n };\n};\n", + "properties": [ + { + "name": "auth", + "deprecated": false, + "deprecationMessage": "", + "type": "DotApiAuthorization", + "optional": false, + "description": "", + "line": 17 + }, + { + "name": "config", + "deprecated": false, + "deprecationMessage": "", + "type": "DotApiConfiguration", + "optional": false, + "description": "", + "line": 27 + }, + { + "name": "content", + "deprecated": false, + "deprecationMessage": "", + "type": "DotApiContent", + "optional": false, + "description": "", + "line": 18 + }, + { + "name": "contentType", + "deprecated": false, + "deprecationMessage": "", + "type": "DotApiContentType", + "optional": false, + "description": "", + "line": 19 + }, + { + "name": "esSearch", + "deprecated": false, + "deprecationMessage": "", + "type": "DotApiElasticSearch", + "optional": false, + "description": "", + "line": 20 + }, + { + "name": "event", + "deprecated": false, + "deprecationMessage": "", + "type": "DotApiEvent", + "optional": false, + "description": "", + "line": 21 + }, + { + "name": "form", + "deprecated": false, + "deprecationMessage": "", + "type": "function", + "optional": false, + "description": "", + "line": 25 + }, + { + "name": "httpClient", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSHttpClient", + "optional": false, + "description": "", + "line": 29 + }, + { + "name": "language", + "deprecated": false, + "deprecationMessage": "", + "type": "DotApiLanguage", + "optional": false, + "description": "", + "line": 28 + }, + { + "name": "nav", + "deprecated": false, + "deprecationMessage": "", + "type": "DotApiNavigation", + "optional": false, + "description": "", + "line": 22 + }, + { + "name": "page", + "deprecated": false, + "deprecationMessage": "", + "type": "DotApiPage", + "optional": false, + "description": "", + "line": 23 + }, + { + "name": "site", + "deprecated": false, + "deprecationMessage": "", + "type": "DotApiSite", + "optional": false, + "description": "", + "line": 24 + }, + { + "name": "widget", + "deprecated": false, + "deprecationMessage": "", + "type": "DotApiWidget", + "optional": false, + "description": "", + "line": 26 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotCMSAuthorizationLoginParams", + "id": "interface-DotCMSAuthorizationLoginParams-fdf7c0b090396159cfea0383c12153fd60f79ba10ee11767ffc510774a16fea7d687f46f0a6a889f8a6a63af815be808f7efd79a3366c414e049c1bcf68d5629", + "file": "libs/dotcms/src/lib/models/DotCMSAuthorization.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotCMSAuthorizationLoginParams {\n user: string;\n password: string;\n expirationDays: string;\n host: string;\n}\n", + "properties": [ + { + "name": "expirationDays", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 4 + }, + { + "name": "host", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 5 + }, + { + "name": "password", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 3 + }, + { + "name": "user", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 2 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotCMSConfigurationItem", + "id": "interface-DotCMSConfigurationItem-f3db4d7eb0c86d6decf7a9f7ccd4e0e1c0a3d28d2cefce57bedc2b078555992446a38c752e66e0aea545b72cccff561408a23dc264dd9f767040b3ae339f3cad", + "file": "libs/dotcms/src/lib/models/DotCMSConfiguration.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotCMSLanguageItem } from './';\n\nexport interface DotCMSConfigurationParams {\n token: string;\n host?: string;\n hostId?: string;\n}\n\nexport interface DotCMSConfigurationItem {\n license: {\n level: number;\n displayServerId: string;\n levelName: string;\n isCommunity: boolean;\n };\n releaseInfo: {\n buildDate: string;\n version: string;\n };\n colors: {\n secondary: string;\n background: string;\n primary: string;\n };\n i18nMessagesMap: {\n relativeTime: {\n mm: string;\n hh: string;\n dd: string;\n MM: string;\n yy: string;\n d: string;\n past: string;\n h: string;\n m: string;\n M: string;\n s: string;\n future: string;\n y: string;\n };\n notifications_dismissall: string;\n notifications_dismiss: string;\n notifications_title: string;\n };\n emailRegex: string;\n languages: DotCMSLanguageItem[];\n EDIT_CONTENT_STRUCTURES_PER_COLUMN: number;\n 'dotcms.websocket.disable': boolean;\n 'dotcms.websocket.reconnect.time': number;\n 'dotcms.websocket.baseurl': string;\n 'dotcms.websocket.protocol': string;\n 'dotcms.websocket.endpoints': {\n 'websocket.systemevents.endpoint': string;\n };\n}\n", + "properties": [ + { + "name": "colors", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": false, + "description": "", + "line": 20 + }, + { + "name": "dotcms.websocket.baseurl", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 50 + }, + { + "name": "dotcms.websocket.disable", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 48 + }, + { + "name": "dotcms.websocket.endpoints", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": false, + "description": "", + "line": 52 + }, + { + "name": "dotcms.websocket.protocol", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 51 + }, + { + "name": "dotcms.websocket.reconnect.time", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 49 + }, + { + "name": "EDIT_CONTENT_STRUCTURES_PER_COLUMN", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 47 + }, + { + "name": "emailRegex", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 45 + }, + { + "name": "i18nMessagesMap", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": false, + "description": "", + "line": 25 + }, + { + "name": "languages", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSLanguageItem[]", + "optional": false, + "description": "", + "line": 46 + }, + { + "name": "license", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": false, + "description": "", + "line": 10 + }, + { + "name": "releaseInfo", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": false, + "description": "", + "line": 16 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotCMSConfigurationParams", + "id": "interface-DotCMSConfigurationParams-f3db4d7eb0c86d6decf7a9f7ccd4e0e1c0a3d28d2cefce57bedc2b078555992446a38c752e66e0aea545b72cccff561408a23dc264dd9f767040b3ae339f3cad", + "file": "libs/dotcms/src/lib/models/DotCMSConfiguration.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotCMSLanguageItem } from './';\n\nexport interface DotCMSConfigurationParams {\n token: string;\n host?: string;\n hostId?: string;\n}\n\nexport interface DotCMSConfigurationItem {\n license: {\n level: number;\n displayServerId: string;\n levelName: string;\n isCommunity: boolean;\n };\n releaseInfo: {\n buildDate: string;\n version: string;\n };\n colors: {\n secondary: string;\n background: string;\n primary: string;\n };\n i18nMessagesMap: {\n relativeTime: {\n mm: string;\n hh: string;\n dd: string;\n MM: string;\n yy: string;\n d: string;\n past: string;\n h: string;\n m: string;\n M: string;\n s: string;\n future: string;\n y: string;\n };\n notifications_dismissall: string;\n notifications_dismiss: string;\n notifications_title: string;\n };\n emailRegex: string;\n languages: DotCMSLanguageItem[];\n EDIT_CONTENT_STRUCTURES_PER_COLUMN: number;\n 'dotcms.websocket.disable': boolean;\n 'dotcms.websocket.reconnect.time': number;\n 'dotcms.websocket.baseurl': string;\n 'dotcms.websocket.protocol': string;\n 'dotcms.websocket.endpoints': {\n 'websocket.systemevents.endpoint': string;\n };\n}\n", + "properties": [ + { + "name": "host", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 5 + }, + { + "name": "hostId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 6 + }, + { + "name": "token", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 4 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotCMSContainer", + "id": "interface-DotCMSContainer-8e6a73749c34df0c00155e704df0c63721d0a5c138303ac5f092daa3257a542b81453ec50309883343d0a7dc27171935ef7cb2752699b9e25471a4fe22715ee8", + "file": "libs/dotcms/src/lib/models/DotCMSPage.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotCMSSite } from './DotCMSSite.model';\n\nexport interface DotCMSPageParams {\n url: string;\n language?: string;\n}\n\nexport interface DotCMSPageAsset {\n canCreateTemplate: boolean;\n containers: DotCMSPageAssetContainer;\n layout: DotCMSLayout;\n page: DotCMSPage;\n site: DotCMSSite;\n template: DotCMSTemplate;\n viewAs: DotCMSViewAs;\n}\n\nexport interface DotCMSViewAs {\n language: {\n id: number;\n languageCode: string;\n countryCode: string;\n language: string;\n country: string;\n };\n mode: string;\n}\n\nexport interface DotCMSPageAssetContainer {\n [key: string]: {\n container: DotCMSContainer;\n containerStructures: DotCMSContainerStructure[];\n contentlets: {\n [key: string]: DotCMSContentlet[];\n };\n };\n}\n\nexport interface DotCMSContainerStructure {\n id: string;\n structureId: string;\n containerInode: string;\n containerId: string;\n code: string;\n contentTypeVar: string;\n}\n\nexport interface DotCMSLayout {\n pageWidth: string;\n width: string;\n layout: string;\n title: string;\n header: boolean;\n footer: boolean;\n body: DotPageAssetLayoutBody;\n sidebar: DotPageAssetLayoutSidebar;\n}\n\nexport interface DotPageAssetLayoutSidebar {\n preview: boolean;\n containers: DotCMSContainer[];\n location: string;\n widthPercent: number;\n width: string;\n}\n\nexport interface DotPageAssetLayoutBody {\n rows: DotPageAssetLayoutRow[];\n}\n\nexport interface DotPageAssetLayoutRow {\n identifier: number;\n value?: string;\n id?: string;\n columns: DotPageAssetLayoutColumn[];\n styleClass?: string;\n}\n\nexport interface DotPageAssetLayoutColumn {\n preview: boolean;\n containers: DotCMSContainer[];\n widthPercent: number;\n width: number;\n leftOffset: number;\n left: number;\n styleClass?: string;\n}\n\nexport interface DotCMSPage {\n template: string;\n modDate: number;\n metadata: string;\n cachettl: string;\n pageURI: string;\n title: string;\n type: string;\n showOnMenu: string;\n httpsRequired: boolean;\n inode: string;\n disabledWYSIWYG: any[];\n seokeywords: string;\n host: string;\n lastReview: number;\n working: boolean;\n locked: boolean;\n stInode: string;\n friendlyName: string;\n live: boolean;\n owner: string;\n identifier: string;\n nullProperties: any[];\n friendlyname: string;\n pagemetadata: string;\n languageId: number;\n url: string;\n seodescription: string;\n modUserName: string;\n folder: string;\n deleted: boolean;\n sortOrder: number;\n modUser: string;\n pageUrl: string;\n workingInode: string;\n shortyWorking: string;\n canEdit: boolean;\n canRead: boolean;\n canLock: boolean;\n lockedOn: number;\n lockedBy: string;\n lockedByName: string;\n liveInode: string;\n shortyLive: string;\n}\n\nexport interface DotCMSContainer {\n identifier: string;\n uuid: string;\n iDate: number;\n type: string;\n owner?: string;\n inode: string;\n source: string;\n title: string;\n friendlyName: string;\n modDate: number;\n modUser: string;\n sortOrder: number;\n showOnMenu: boolean;\n code?: string;\n maxContentlets: number;\n useDiv: boolean;\n sortContentletsBy?: string;\n preLoop: string;\n postLoop: string;\n staticify: boolean;\n luceneQuery?: string;\n notes: string;\n languageId?: number;\n path?: string;\n live: boolean;\n locked: boolean;\n working: boolean;\n deleted: boolean;\n name: string;\n archived: boolean;\n permissionId: string;\n versionId: string;\n versionType: string;\n permissionType: string;\n categoryId: string;\n idate: number;\n new: boolean;\n acceptTypes: string;\n contentlets: DotCMSContentlet[];\n}\n\nexport interface DotCMSContentlet {\n owner: string;\n identifier: string;\n hostName: string;\n modDate: number;\n languageId: number;\n body?: string;\n title: string;\n url: string;\n baseType: string;\n inode: string;\n titleImage: string;\n modUserName: string;\n archived: boolean;\n folder: string;\n hasTitleImage: boolean;\n sortOrder: number;\n modUser: string;\n host: string;\n working: boolean;\n locked: boolean;\n stInode: string;\n contentType: string;\n live: boolean;\n code?: string;\n widgetTitle?: string;\n endDate?: number;\n description?: string;\n recurrenceOccurs?: string;\n recurrenceDayOfWeek?: number;\n recurrenceDayOfMonth?: number;\n recurrenceStart?: number;\n recurrenceWeekOfMonth?: number;\n recurs?: boolean;\n noRecurrenceEnd?: boolean;\n urlTitle?: string;\n URL_MAP_FOR_CONTENT?: string;\n recurrenceDaysOfWeek?: string;\n recurrenceInterval?: number;\n urlMap?: string;\n recurrenceDatesToIgnore?: string;\n recurrenceMonthOfYear?: number;\n startDate?: number;\n recurrenceEnd?: number;\n categories?: string;\n image?: string;\n tags?: string;\n}\n\nexport interface DotCMSTemplate {\n iDate: number;\n type: string;\n owner: string;\n inode: string;\n identifier: string;\n source: string;\n title: string;\n friendlyName: string;\n modDate: number;\n modUser: string;\n sortOrder: number;\n showOnMenu: boolean;\n image: string;\n drawed: boolean;\n drawedBody: string;\n theme: string;\n anonymous: boolean;\n template: boolean;\n name: string;\n live: boolean;\n archived: boolean;\n locked: boolean;\n working: boolean;\n permissionId: string;\n versionId: string;\n versionType: string;\n deleted: boolean;\n permissionType: string;\n categoryId: string;\n idate: number;\n new: boolean;\n canEdit: boolean;\n}\n", + "properties": [ + { + "name": "acceptTypes", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 173 + }, + { + "name": "archived", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 165 + }, + { + "name": "categoryId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 170 + }, + { + "name": "code", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 149 + }, + { + "name": "contentlets", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSContentlet[]", + "optional": false, + "description": "", + "line": 174 + }, + { + "name": "deleted", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 163 + }, + { + "name": "friendlyName", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 144 + }, + { + "name": "idate", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 171 + }, + { + "name": "iDate", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 138 + }, + { + "name": "identifier", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 136 + }, + { + "name": "inode", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 141 + }, + { + "name": "languageId", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 158 + }, + { + "name": "live", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 160 + }, + { + "name": "locked", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 161 + }, + { + "name": "luceneQuery", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 156 + }, + { + "name": "maxContentlets", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 150 + }, + { + "name": "modDate", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 145 + }, + { + "name": "modUser", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 146 + }, + { + "name": "name", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 164 + }, + { + "name": "new", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 172 + }, + { + "name": "notes", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 157 + }, + { + "name": "owner", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 140 + }, + { + "name": "path", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 159 + }, + { + "name": "permissionId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 166 + }, + { + "name": "permissionType", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 169 + }, + { + "name": "postLoop", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 154 + }, + { + "name": "preLoop", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 153 + }, + { + "name": "showOnMenu", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 148 + }, + { + "name": "sortContentletsBy", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 152 + }, + { + "name": "sortOrder", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 147 + }, + { + "name": "source", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 142 + }, + { + "name": "staticify", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 155 + }, + { + "name": "title", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 143 + }, + { + "name": "type", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 139 + }, + { + "name": "useDiv", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 151 + }, + { + "name": "uuid", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 137 + }, + { + "name": "versionId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 167 + }, + { + "name": "versionType", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 168 + }, + { + "name": "working", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 162 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotCMSContainerStructure", + "id": "interface-DotCMSContainerStructure-8e6a73749c34df0c00155e704df0c63721d0a5c138303ac5f092daa3257a542b81453ec50309883343d0a7dc27171935ef7cb2752699b9e25471a4fe22715ee8", + "file": "libs/dotcms/src/lib/models/DotCMSPage.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotCMSSite } from './DotCMSSite.model';\n\nexport interface DotCMSPageParams {\n url: string;\n language?: string;\n}\n\nexport interface DotCMSPageAsset {\n canCreateTemplate: boolean;\n containers: DotCMSPageAssetContainer;\n layout: DotCMSLayout;\n page: DotCMSPage;\n site: DotCMSSite;\n template: DotCMSTemplate;\n viewAs: DotCMSViewAs;\n}\n\nexport interface DotCMSViewAs {\n language: {\n id: number;\n languageCode: string;\n countryCode: string;\n language: string;\n country: string;\n };\n mode: string;\n}\n\nexport interface DotCMSPageAssetContainer {\n [key: string]: {\n container: DotCMSContainer;\n containerStructures: DotCMSContainerStructure[];\n contentlets: {\n [key: string]: DotCMSContentlet[];\n };\n };\n}\n\nexport interface DotCMSContainerStructure {\n id: string;\n structureId: string;\n containerInode: string;\n containerId: string;\n code: string;\n contentTypeVar: string;\n}\n\nexport interface DotCMSLayout {\n pageWidth: string;\n width: string;\n layout: string;\n title: string;\n header: boolean;\n footer: boolean;\n body: DotPageAssetLayoutBody;\n sidebar: DotPageAssetLayoutSidebar;\n}\n\nexport interface DotPageAssetLayoutSidebar {\n preview: boolean;\n containers: DotCMSContainer[];\n location: string;\n widthPercent: number;\n width: string;\n}\n\nexport interface DotPageAssetLayoutBody {\n rows: DotPageAssetLayoutRow[];\n}\n\nexport interface DotPageAssetLayoutRow {\n identifier: number;\n value?: string;\n id?: string;\n columns: DotPageAssetLayoutColumn[];\n styleClass?: string;\n}\n\nexport interface DotPageAssetLayoutColumn {\n preview: boolean;\n containers: DotCMSContainer[];\n widthPercent: number;\n width: number;\n leftOffset: number;\n left: number;\n styleClass?: string;\n}\n\nexport interface DotCMSPage {\n template: string;\n modDate: number;\n metadata: string;\n cachettl: string;\n pageURI: string;\n title: string;\n type: string;\n showOnMenu: string;\n httpsRequired: boolean;\n inode: string;\n disabledWYSIWYG: any[];\n seokeywords: string;\n host: string;\n lastReview: number;\n working: boolean;\n locked: boolean;\n stInode: string;\n friendlyName: string;\n live: boolean;\n owner: string;\n identifier: string;\n nullProperties: any[];\n friendlyname: string;\n pagemetadata: string;\n languageId: number;\n url: string;\n seodescription: string;\n modUserName: string;\n folder: string;\n deleted: boolean;\n sortOrder: number;\n modUser: string;\n pageUrl: string;\n workingInode: string;\n shortyWorking: string;\n canEdit: boolean;\n canRead: boolean;\n canLock: boolean;\n lockedOn: number;\n lockedBy: string;\n lockedByName: string;\n liveInode: string;\n shortyLive: string;\n}\n\nexport interface DotCMSContainer {\n identifier: string;\n uuid: string;\n iDate: number;\n type: string;\n owner?: string;\n inode: string;\n source: string;\n title: string;\n friendlyName: string;\n modDate: number;\n modUser: string;\n sortOrder: number;\n showOnMenu: boolean;\n code?: string;\n maxContentlets: number;\n useDiv: boolean;\n sortContentletsBy?: string;\n preLoop: string;\n postLoop: string;\n staticify: boolean;\n luceneQuery?: string;\n notes: string;\n languageId?: number;\n path?: string;\n live: boolean;\n locked: boolean;\n working: boolean;\n deleted: boolean;\n name: string;\n archived: boolean;\n permissionId: string;\n versionId: string;\n versionType: string;\n permissionType: string;\n categoryId: string;\n idate: number;\n new: boolean;\n acceptTypes: string;\n contentlets: DotCMSContentlet[];\n}\n\nexport interface DotCMSContentlet {\n owner: string;\n identifier: string;\n hostName: string;\n modDate: number;\n languageId: number;\n body?: string;\n title: string;\n url: string;\n baseType: string;\n inode: string;\n titleImage: string;\n modUserName: string;\n archived: boolean;\n folder: string;\n hasTitleImage: boolean;\n sortOrder: number;\n modUser: string;\n host: string;\n working: boolean;\n locked: boolean;\n stInode: string;\n contentType: string;\n live: boolean;\n code?: string;\n widgetTitle?: string;\n endDate?: number;\n description?: string;\n recurrenceOccurs?: string;\n recurrenceDayOfWeek?: number;\n recurrenceDayOfMonth?: number;\n recurrenceStart?: number;\n recurrenceWeekOfMonth?: number;\n recurs?: boolean;\n noRecurrenceEnd?: boolean;\n urlTitle?: string;\n URL_MAP_FOR_CONTENT?: string;\n recurrenceDaysOfWeek?: string;\n recurrenceInterval?: number;\n urlMap?: string;\n recurrenceDatesToIgnore?: string;\n recurrenceMonthOfYear?: number;\n startDate?: number;\n recurrenceEnd?: number;\n categories?: string;\n image?: string;\n tags?: string;\n}\n\nexport interface DotCMSTemplate {\n iDate: number;\n type: string;\n owner: string;\n inode: string;\n identifier: string;\n source: string;\n title: string;\n friendlyName: string;\n modDate: number;\n modUser: string;\n sortOrder: number;\n showOnMenu: boolean;\n image: string;\n drawed: boolean;\n drawedBody: string;\n theme: string;\n anonymous: boolean;\n template: boolean;\n name: string;\n live: boolean;\n archived: boolean;\n locked: boolean;\n working: boolean;\n permissionId: string;\n versionId: string;\n versionType: string;\n deleted: boolean;\n permissionType: string;\n categoryId: string;\n idate: number;\n new: boolean;\n canEdit: boolean;\n}\n", + "properties": [ + { + "name": "code", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 44 + }, + { + "name": "containerId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 43 + }, + { + "name": "containerInode", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 42 + }, + { + "name": "contentTypeVar", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 45 + }, + { + "name": "id", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 40 + }, + { + "name": "structureId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 41 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotCMSContent", + "id": "interface-DotCMSContent-399b8b20f23f363a6ff21f2a2e81cd12c3c277ff0bb025125eb317da1a9889102579837f7828c48bdc4712758c0988cc47f6846bd58248214b92c3fbdda8bd05", + "file": "libs/dotcms/src/lib/models/DotCMSContent.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotCMSContent {\n stName: string;\n}\n\nexport interface DotCMSContentQuery {\n contentType: string;\n queryParams?: object;\n options: {\n depth?: string;\n limit?: string;\n offset?: string;\n orderBy?: string;\n };\n}\n", + "properties": [ + { + "name": "stName", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 2 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotCMSContentlet", + "id": "interface-DotCMSContentlet-b51e99c7912d6ff2598997ec1a9d5e2bb14b9e9b1138beb2a8eab34322420737ec3daadd8040ed6fb4c131e87d9a719854d28c6e8e2e3a88ec8f3fd273e96b10", + "file": "libs/dotcms-models/src/lib/dot-contentlet.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotCMSContentlet {\n archived: boolean;\n baseType: string;\n contentType: string;\n folder: string;\n hasTitleImage: boolean;\n host: string;\n hostName: string;\n identifier: string;\n inode: string;\n languageId: number;\n live: boolean;\n locked: boolean;\n modDate: string;\n modUser: string;\n modUserName: string;\n owner: string;\n sortOrder: number;\n stInode: string;\n title: string;\n titleImage: string;\n url: string;\n working: boolean;\n}\n", + "properties": [ + { + "name": "archived", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 2 + }, + { + "name": "baseType", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 3 + }, + { + "name": "contentType", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 4 + }, + { + "name": "folder", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 5 + }, + { + "name": "hasTitleImage", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 6 + }, + { + "name": "host", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 7 + }, + { + "name": "hostName", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 8 + }, + { + "name": "identifier", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 9 + }, + { + "name": "inode", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 10 + }, + { + "name": "languageId", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 11 + }, + { + "name": "live", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 12 + }, + { + "name": "locked", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 13 + }, + { + "name": "modDate", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 14 + }, + { + "name": "modUser", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 15 + }, + { + "name": "modUserName", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 16 + }, + { + "name": "owner", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 17 + }, + { + "name": "sortOrder", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 18 + }, + { + "name": "stInode", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 19 + }, + { + "name": "title", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 20 + }, + { + "name": "titleImage", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 21 + }, + { + "name": "url", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 22 + }, + { + "name": "working", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 23 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotCMSContentlet", + "id": "interface-DotCMSContentlet-8e6a73749c34df0c00155e704df0c63721d0a5c138303ac5f092daa3257a542b81453ec50309883343d0a7dc27171935ef7cb2752699b9e25471a4fe22715ee8-1", + "file": "libs/dotcms/src/lib/models/DotCMSPage.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotCMSSite } from './DotCMSSite.model';\n\nexport interface DotCMSPageParams {\n url: string;\n language?: string;\n}\n\nexport interface DotCMSPageAsset {\n canCreateTemplate: boolean;\n containers: DotCMSPageAssetContainer;\n layout: DotCMSLayout;\n page: DotCMSPage;\n site: DotCMSSite;\n template: DotCMSTemplate;\n viewAs: DotCMSViewAs;\n}\n\nexport interface DotCMSViewAs {\n language: {\n id: number;\n languageCode: string;\n countryCode: string;\n language: string;\n country: string;\n };\n mode: string;\n}\n\nexport interface DotCMSPageAssetContainer {\n [key: string]: {\n container: DotCMSContainer;\n containerStructures: DotCMSContainerStructure[];\n contentlets: {\n [key: string]: DotCMSContentlet[];\n };\n };\n}\n\nexport interface DotCMSContainerStructure {\n id: string;\n structureId: string;\n containerInode: string;\n containerId: string;\n code: string;\n contentTypeVar: string;\n}\n\nexport interface DotCMSLayout {\n pageWidth: string;\n width: string;\n layout: string;\n title: string;\n header: boolean;\n footer: boolean;\n body: DotPageAssetLayoutBody;\n sidebar: DotPageAssetLayoutSidebar;\n}\n\nexport interface DotPageAssetLayoutSidebar {\n preview: boolean;\n containers: DotCMSContainer[];\n location: string;\n widthPercent: number;\n width: string;\n}\n\nexport interface DotPageAssetLayoutBody {\n rows: DotPageAssetLayoutRow[];\n}\n\nexport interface DotPageAssetLayoutRow {\n identifier: number;\n value?: string;\n id?: string;\n columns: DotPageAssetLayoutColumn[];\n styleClass?: string;\n}\n\nexport interface DotPageAssetLayoutColumn {\n preview: boolean;\n containers: DotCMSContainer[];\n widthPercent: number;\n width: number;\n leftOffset: number;\n left: number;\n styleClass?: string;\n}\n\nexport interface DotCMSPage {\n template: string;\n modDate: number;\n metadata: string;\n cachettl: string;\n pageURI: string;\n title: string;\n type: string;\n showOnMenu: string;\n httpsRequired: boolean;\n inode: string;\n disabledWYSIWYG: any[];\n seokeywords: string;\n host: string;\n lastReview: number;\n working: boolean;\n locked: boolean;\n stInode: string;\n friendlyName: string;\n live: boolean;\n owner: string;\n identifier: string;\n nullProperties: any[];\n friendlyname: string;\n pagemetadata: string;\n languageId: number;\n url: string;\n seodescription: string;\n modUserName: string;\n folder: string;\n deleted: boolean;\n sortOrder: number;\n modUser: string;\n pageUrl: string;\n workingInode: string;\n shortyWorking: string;\n canEdit: boolean;\n canRead: boolean;\n canLock: boolean;\n lockedOn: number;\n lockedBy: string;\n lockedByName: string;\n liveInode: string;\n shortyLive: string;\n}\n\nexport interface DotCMSContainer {\n identifier: string;\n uuid: string;\n iDate: number;\n type: string;\n owner?: string;\n inode: string;\n source: string;\n title: string;\n friendlyName: string;\n modDate: number;\n modUser: string;\n sortOrder: number;\n showOnMenu: boolean;\n code?: string;\n maxContentlets: number;\n useDiv: boolean;\n sortContentletsBy?: string;\n preLoop: string;\n postLoop: string;\n staticify: boolean;\n luceneQuery?: string;\n notes: string;\n languageId?: number;\n path?: string;\n live: boolean;\n locked: boolean;\n working: boolean;\n deleted: boolean;\n name: string;\n archived: boolean;\n permissionId: string;\n versionId: string;\n versionType: string;\n permissionType: string;\n categoryId: string;\n idate: number;\n new: boolean;\n acceptTypes: string;\n contentlets: DotCMSContentlet[];\n}\n\nexport interface DotCMSContentlet {\n owner: string;\n identifier: string;\n hostName: string;\n modDate: number;\n languageId: number;\n body?: string;\n title: string;\n url: string;\n baseType: string;\n inode: string;\n titleImage: string;\n modUserName: string;\n archived: boolean;\n folder: string;\n hasTitleImage: boolean;\n sortOrder: number;\n modUser: string;\n host: string;\n working: boolean;\n locked: boolean;\n stInode: string;\n contentType: string;\n live: boolean;\n code?: string;\n widgetTitle?: string;\n endDate?: number;\n description?: string;\n recurrenceOccurs?: string;\n recurrenceDayOfWeek?: number;\n recurrenceDayOfMonth?: number;\n recurrenceStart?: number;\n recurrenceWeekOfMonth?: number;\n recurs?: boolean;\n noRecurrenceEnd?: boolean;\n urlTitle?: string;\n URL_MAP_FOR_CONTENT?: string;\n recurrenceDaysOfWeek?: string;\n recurrenceInterval?: number;\n urlMap?: string;\n recurrenceDatesToIgnore?: string;\n recurrenceMonthOfYear?: number;\n startDate?: number;\n recurrenceEnd?: number;\n categories?: string;\n image?: string;\n tags?: string;\n}\n\nexport interface DotCMSTemplate {\n iDate: number;\n type: string;\n owner: string;\n inode: string;\n identifier: string;\n source: string;\n title: string;\n friendlyName: string;\n modDate: number;\n modUser: string;\n sortOrder: number;\n showOnMenu: boolean;\n image: string;\n drawed: boolean;\n drawedBody: string;\n theme: string;\n anonymous: boolean;\n template: boolean;\n name: string;\n live: boolean;\n archived: boolean;\n locked: boolean;\n working: boolean;\n permissionId: string;\n versionId: string;\n versionType: string;\n deleted: boolean;\n permissionType: string;\n categoryId: string;\n idate: number;\n new: boolean;\n canEdit: boolean;\n}\n", + "properties": [ + { + "name": "archived", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 190 + }, + { + "name": "baseType", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 186 + }, + { + "name": "body", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 183 + }, + { + "name": "categories", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 221 + }, + { + "name": "code", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 201 + }, + { + "name": "contentType", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 199 + }, + { + "name": "description", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 204 + }, + { + "name": "endDate", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 203 + }, + { + "name": "folder", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 191 + }, + { + "name": "hasTitleImage", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 192 + }, + { + "name": "host", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 195 + }, + { + "name": "hostName", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 180 + }, + { + "name": "identifier", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 179 + }, + { + "name": "image", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 222 + }, + { + "name": "inode", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 187 + }, + { + "name": "languageId", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 182 + }, + { + "name": "live", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 200 + }, + { + "name": "locked", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 197 + }, + { + "name": "modDate", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 181 + }, + { + "name": "modUser", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 194 + }, + { + "name": "modUserName", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 189 + }, + { + "name": "noRecurrenceEnd", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 211 + }, + { + "name": "owner", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 178 + }, + { + "name": "recurrenceDatesToIgnore", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 217 + }, + { + "name": "recurrenceDayOfMonth", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 207 + }, + { + "name": "recurrenceDayOfWeek", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 206 + }, + { + "name": "recurrenceDaysOfWeek", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 214 + }, + { + "name": "recurrenceEnd", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 220 + }, + { + "name": "recurrenceInterval", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 215 + }, + { + "name": "recurrenceMonthOfYear", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 218 + }, + { + "name": "recurrenceOccurs", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 205 + }, + { + "name": "recurrenceStart", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 208 + }, + { + "name": "recurrenceWeekOfMonth", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 209 + }, + { + "name": "recurs", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 210 + }, + { + "name": "sortOrder", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 193 + }, + { + "name": "startDate", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 219 + }, + { + "name": "stInode", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 198 + }, + { + "name": "tags", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 223 + }, + { + "name": "title", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 184 + }, + { + "name": "titleImage", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 188 + }, + { + "name": "url", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 185 + }, + { + "name": "URL_MAP_FOR_CONTENT", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 213 + }, + { + "name": "urlMap", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 216 + }, + { + "name": "urlTitle", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 212 + }, + { + "name": "widgetTitle", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 202 + }, + { + "name": "working", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 196 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [], + "isDuplicate": true, + "duplicateId": 1, + "duplicateName": "DotCMSContentlet-1" + }, + { + "name": "DotCMSContentQuery", + "id": "interface-DotCMSContentQuery-399b8b20f23f363a6ff21f2a2e81cd12c3c277ff0bb025125eb317da1a9889102579837f7828c48bdc4712758c0988cc47f6846bd58248214b92c3fbdda8bd05", + "file": "libs/dotcms/src/lib/models/DotCMSContent.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotCMSContent {\n stName: string;\n}\n\nexport interface DotCMSContentQuery {\n contentType: string;\n queryParams?: object;\n options: {\n depth?: string;\n limit?: string;\n offset?: string;\n orderBy?: string;\n };\n}\n", + "properties": [ + { + "name": "contentType", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 6 + }, + { + "name": "options", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": false, + "description": "", + "line": 8 + }, + { + "name": "queryParams", + "deprecated": false, + "deprecationMessage": "", + "type": "object", + "optional": true, + "description": "", + "line": 7 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotCMSContentType", + "id": "interface-DotCMSContentType-c411403c9accaae031ba7992a8f495e6dfd1b23ab931867be818f4a46e794421dd0c6f6084293f65257d8ad53004de6a345bcc0634b385da941bda97edeee0ec", + "file": "libs/dotcms-models/src/lib/dot-content-types.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotCMSSystemActionMappings, DotCMSWorkflow } from '../index';\n\nexport interface DotCMSContentType {\n baseType: string;\n icon?: string;\n clazz: string;\n defaultType: boolean;\n description?: string;\n detailPage?: string;\n expireDateVar?: string;\n fields: DotCMSContentTypeField[];\n fixed: boolean;\n folder: string;\n host: string;\n iDate: number;\n id: string;\n layout: DotCMSContentTypeLayoutRow[];\n modDate: number;\n multilingualable: boolean;\n nEntries: number;\n name: string;\n owner?: string;\n publishDateVar?: string;\n system: boolean;\n urlMapPattern?: string;\n variable: string;\n versionable: boolean;\n workflows: DotCMSWorkflow[];\n systemActionMappings?: DotCMSSystemActionMappings;\n}\n\nexport interface DotCMSContentTypeField {\n categories?: DotCMSContentTypeFieldCategories;\n clazz: string;\n contentTypeId: string;\n dataType: string;\n defaultValue?: string;\n fieldType: string;\n fieldTypeLabel: string;\n fieldVariables: DotCMSContentTypeFieldVariable[];\n fixed: boolean;\n hint?: string;\n iDate: number;\n id: string;\n indexed: boolean;\n listed: boolean;\n modDate: number;\n name: string;\n readOnly: boolean;\n regexCheck?: string;\n relationships?: Relationships;\n required: boolean;\n searchable: boolean;\n sortOrder: number;\n unique: boolean;\n values?: string;\n variable: string;\n}\n\nexport interface DotCMSContentTypeLayoutRow {\n columns?: DotCMSContentTypeLayoutColumn[];\n divider: DotCMSContentTypeField;\n}\n\nexport interface DotCMSContentTypeLayoutColumn {\n columnDivider: DotCMSContentTypeField;\n fields: DotCMSContentTypeField[];\n}\n\nexport interface DotCMSContentTypeFieldCategories {\n categoryName: string;\n description?: string;\n inode: string;\n key: string;\n keywords?: string;\n sortOrder: number;\n}\n\nexport interface DotCMSContentTypeFieldVariable {\n clazz: string;\n fieldId: string;\n id: string;\n key: string;\n value: string;\n}\n\n/** @private */\ninterface Relationships {\n cardinality: number;\n velocityVar: string;\n}\n", + "properties": [ + { + "name": "baseType", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 4 + }, + { + "name": "clazz", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 6 + }, + { + "name": "defaultType", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 7 + }, + { + "name": "description", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 8 + }, + { + "name": "detailPage", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 9 + }, + { + "name": "expireDateVar", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 10 + }, + { + "name": "fields", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSContentTypeField[]", + "optional": false, + "description": "", + "line": 11 + }, + { + "name": "fixed", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 12 + }, + { + "name": "folder", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 13 + }, + { + "name": "host", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 14 + }, + { + "name": "icon", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 5 + }, + { + "name": "id", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 16 + }, + { + "name": "iDate", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 15 + }, + { + "name": "layout", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSContentTypeLayoutRow[]", + "optional": false, + "description": "", + "line": 17 + }, + { + "name": "modDate", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 18 + }, + { + "name": "multilingualable", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 19 + }, + { + "name": "name", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 21 + }, + { + "name": "nEntries", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 20 + }, + { + "name": "owner", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 22 + }, + { + "name": "publishDateVar", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 23 + }, + { + "name": "system", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 24 + }, + { + "name": "systemActionMappings", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSSystemActionMappings", + "optional": true, + "description": "", + "line": 29 + }, + { + "name": "urlMapPattern", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 25 + }, + { + "name": "variable", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 26 + }, + { + "name": "versionable", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 27 + }, + { + "name": "workflows", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSWorkflow[]", + "optional": false, + "description": "", + "line": 28 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotCMSContentTypeField", + "id": "interface-DotCMSContentTypeField-c411403c9accaae031ba7992a8f495e6dfd1b23ab931867be818f4a46e794421dd0c6f6084293f65257d8ad53004de6a345bcc0634b385da941bda97edeee0ec", + "file": "libs/dotcms-models/src/lib/dot-content-types.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotCMSSystemActionMappings, DotCMSWorkflow } from '../index';\n\nexport interface DotCMSContentType {\n baseType: string;\n icon?: string;\n clazz: string;\n defaultType: boolean;\n description?: string;\n detailPage?: string;\n expireDateVar?: string;\n fields: DotCMSContentTypeField[];\n fixed: boolean;\n folder: string;\n host: string;\n iDate: number;\n id: string;\n layout: DotCMSContentTypeLayoutRow[];\n modDate: number;\n multilingualable: boolean;\n nEntries: number;\n name: string;\n owner?: string;\n publishDateVar?: string;\n system: boolean;\n urlMapPattern?: string;\n variable: string;\n versionable: boolean;\n workflows: DotCMSWorkflow[];\n systemActionMappings?: DotCMSSystemActionMappings;\n}\n\nexport interface DotCMSContentTypeField {\n categories?: DotCMSContentTypeFieldCategories;\n clazz: string;\n contentTypeId: string;\n dataType: string;\n defaultValue?: string;\n fieldType: string;\n fieldTypeLabel: string;\n fieldVariables: DotCMSContentTypeFieldVariable[];\n fixed: boolean;\n hint?: string;\n iDate: number;\n id: string;\n indexed: boolean;\n listed: boolean;\n modDate: number;\n name: string;\n readOnly: boolean;\n regexCheck?: string;\n relationships?: Relationships;\n required: boolean;\n searchable: boolean;\n sortOrder: number;\n unique: boolean;\n values?: string;\n variable: string;\n}\n\nexport interface DotCMSContentTypeLayoutRow {\n columns?: DotCMSContentTypeLayoutColumn[];\n divider: DotCMSContentTypeField;\n}\n\nexport interface DotCMSContentTypeLayoutColumn {\n columnDivider: DotCMSContentTypeField;\n fields: DotCMSContentTypeField[];\n}\n\nexport interface DotCMSContentTypeFieldCategories {\n categoryName: string;\n description?: string;\n inode: string;\n key: string;\n keywords?: string;\n sortOrder: number;\n}\n\nexport interface DotCMSContentTypeFieldVariable {\n clazz: string;\n fieldId: string;\n id: string;\n key: string;\n value: string;\n}\n\n/** @private */\ninterface Relationships {\n cardinality: number;\n velocityVar: string;\n}\n", + "properties": [ + { + "name": "categories", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSContentTypeFieldCategories", + "optional": true, + "description": "", + "line": 33 + }, + { + "name": "clazz", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 34 + }, + { + "name": "contentTypeId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 35 + }, + { + "name": "dataType", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 36 + }, + { + "name": "defaultValue", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 37 + }, + { + "name": "fieldType", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 38 + }, + { + "name": "fieldTypeLabel", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 39 + }, + { + "name": "fieldVariables", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSContentTypeFieldVariable[]", + "optional": false, + "description": "", + "line": 40 + }, + { + "name": "fixed", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 41 + }, + { + "name": "hint", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 42 + }, + { + "name": "id", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 44 + }, + { + "name": "iDate", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 43 + }, + { + "name": "indexed", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 45 + }, + { + "name": "listed", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 46 + }, + { + "name": "modDate", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 47 + }, + { + "name": "name", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 48 + }, + { + "name": "readOnly", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 49 + }, + { + "name": "regexCheck", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 50 + }, + { + "name": "relationships", + "deprecated": false, + "deprecationMessage": "", + "type": "Relationships", + "optional": true, + "description": "", + "line": 51 + }, + { + "name": "required", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 52 + }, + { + "name": "searchable", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 53 + }, + { + "name": "sortOrder", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 54 + }, + { + "name": "unique", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 55 + }, + { + "name": "values", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 56 + }, + { + "name": "variable", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 57 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotCMSContentTypeFieldCategories", + "id": "interface-DotCMSContentTypeFieldCategories-c411403c9accaae031ba7992a8f495e6dfd1b23ab931867be818f4a46e794421dd0c6f6084293f65257d8ad53004de6a345bcc0634b385da941bda97edeee0ec", + "file": "libs/dotcms-models/src/lib/dot-content-types.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotCMSSystemActionMappings, DotCMSWorkflow } from '../index';\n\nexport interface DotCMSContentType {\n baseType: string;\n icon?: string;\n clazz: string;\n defaultType: boolean;\n description?: string;\n detailPage?: string;\n expireDateVar?: string;\n fields: DotCMSContentTypeField[];\n fixed: boolean;\n folder: string;\n host: string;\n iDate: number;\n id: string;\n layout: DotCMSContentTypeLayoutRow[];\n modDate: number;\n multilingualable: boolean;\n nEntries: number;\n name: string;\n owner?: string;\n publishDateVar?: string;\n system: boolean;\n urlMapPattern?: string;\n variable: string;\n versionable: boolean;\n workflows: DotCMSWorkflow[];\n systemActionMappings?: DotCMSSystemActionMappings;\n}\n\nexport interface DotCMSContentTypeField {\n categories?: DotCMSContentTypeFieldCategories;\n clazz: string;\n contentTypeId: string;\n dataType: string;\n defaultValue?: string;\n fieldType: string;\n fieldTypeLabel: string;\n fieldVariables: DotCMSContentTypeFieldVariable[];\n fixed: boolean;\n hint?: string;\n iDate: number;\n id: string;\n indexed: boolean;\n listed: boolean;\n modDate: number;\n name: string;\n readOnly: boolean;\n regexCheck?: string;\n relationships?: Relationships;\n required: boolean;\n searchable: boolean;\n sortOrder: number;\n unique: boolean;\n values?: string;\n variable: string;\n}\n\nexport interface DotCMSContentTypeLayoutRow {\n columns?: DotCMSContentTypeLayoutColumn[];\n divider: DotCMSContentTypeField;\n}\n\nexport interface DotCMSContentTypeLayoutColumn {\n columnDivider: DotCMSContentTypeField;\n fields: DotCMSContentTypeField[];\n}\n\nexport interface DotCMSContentTypeFieldCategories {\n categoryName: string;\n description?: string;\n inode: string;\n key: string;\n keywords?: string;\n sortOrder: number;\n}\n\nexport interface DotCMSContentTypeFieldVariable {\n clazz: string;\n fieldId: string;\n id: string;\n key: string;\n value: string;\n}\n\n/** @private */\ninterface Relationships {\n cardinality: number;\n velocityVar: string;\n}\n", + "properties": [ + { + "name": "categoryName", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 71 + }, + { + "name": "description", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 72 + }, + { + "name": "inode", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 73 + }, + { + "name": "key", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 74 + }, + { + "name": "keywords", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 75 + }, + { + "name": "sortOrder", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 76 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotCMSContentTypeFieldVariable", + "id": "interface-DotCMSContentTypeFieldVariable-c411403c9accaae031ba7992a8f495e6dfd1b23ab931867be818f4a46e794421dd0c6f6084293f65257d8ad53004de6a345bcc0634b385da941bda97edeee0ec", + "file": "libs/dotcms-models/src/lib/dot-content-types.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotCMSSystemActionMappings, DotCMSWorkflow } from '../index';\n\nexport interface DotCMSContentType {\n baseType: string;\n icon?: string;\n clazz: string;\n defaultType: boolean;\n description?: string;\n detailPage?: string;\n expireDateVar?: string;\n fields: DotCMSContentTypeField[];\n fixed: boolean;\n folder: string;\n host: string;\n iDate: number;\n id: string;\n layout: DotCMSContentTypeLayoutRow[];\n modDate: number;\n multilingualable: boolean;\n nEntries: number;\n name: string;\n owner?: string;\n publishDateVar?: string;\n system: boolean;\n urlMapPattern?: string;\n variable: string;\n versionable: boolean;\n workflows: DotCMSWorkflow[];\n systemActionMappings?: DotCMSSystemActionMappings;\n}\n\nexport interface DotCMSContentTypeField {\n categories?: DotCMSContentTypeFieldCategories;\n clazz: string;\n contentTypeId: string;\n dataType: string;\n defaultValue?: string;\n fieldType: string;\n fieldTypeLabel: string;\n fieldVariables: DotCMSContentTypeFieldVariable[];\n fixed: boolean;\n hint?: string;\n iDate: number;\n id: string;\n indexed: boolean;\n listed: boolean;\n modDate: number;\n name: string;\n readOnly: boolean;\n regexCheck?: string;\n relationships?: Relationships;\n required: boolean;\n searchable: boolean;\n sortOrder: number;\n unique: boolean;\n values?: string;\n variable: string;\n}\n\nexport interface DotCMSContentTypeLayoutRow {\n columns?: DotCMSContentTypeLayoutColumn[];\n divider: DotCMSContentTypeField;\n}\n\nexport interface DotCMSContentTypeLayoutColumn {\n columnDivider: DotCMSContentTypeField;\n fields: DotCMSContentTypeField[];\n}\n\nexport interface DotCMSContentTypeFieldCategories {\n categoryName: string;\n description?: string;\n inode: string;\n key: string;\n keywords?: string;\n sortOrder: number;\n}\n\nexport interface DotCMSContentTypeFieldVariable {\n clazz: string;\n fieldId: string;\n id: string;\n key: string;\n value: string;\n}\n\n/** @private */\ninterface Relationships {\n cardinality: number;\n velocityVar: string;\n}\n", + "properties": [ + { + "name": "clazz", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 80 + }, + { + "name": "fieldId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 81 + }, + { + "name": "id", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 82 + }, + { + "name": "key", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 83 + }, + { + "name": "value", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 84 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotCMSContentTypeLayoutColumn", + "id": "interface-DotCMSContentTypeLayoutColumn-c411403c9accaae031ba7992a8f495e6dfd1b23ab931867be818f4a46e794421dd0c6f6084293f65257d8ad53004de6a345bcc0634b385da941bda97edeee0ec", + "file": "libs/dotcms-models/src/lib/dot-content-types.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotCMSSystemActionMappings, DotCMSWorkflow } from '../index';\n\nexport interface DotCMSContentType {\n baseType: string;\n icon?: string;\n clazz: string;\n defaultType: boolean;\n description?: string;\n detailPage?: string;\n expireDateVar?: string;\n fields: DotCMSContentTypeField[];\n fixed: boolean;\n folder: string;\n host: string;\n iDate: number;\n id: string;\n layout: DotCMSContentTypeLayoutRow[];\n modDate: number;\n multilingualable: boolean;\n nEntries: number;\n name: string;\n owner?: string;\n publishDateVar?: string;\n system: boolean;\n urlMapPattern?: string;\n variable: string;\n versionable: boolean;\n workflows: DotCMSWorkflow[];\n systemActionMappings?: DotCMSSystemActionMappings;\n}\n\nexport interface DotCMSContentTypeField {\n categories?: DotCMSContentTypeFieldCategories;\n clazz: string;\n contentTypeId: string;\n dataType: string;\n defaultValue?: string;\n fieldType: string;\n fieldTypeLabel: string;\n fieldVariables: DotCMSContentTypeFieldVariable[];\n fixed: boolean;\n hint?: string;\n iDate: number;\n id: string;\n indexed: boolean;\n listed: boolean;\n modDate: number;\n name: string;\n readOnly: boolean;\n regexCheck?: string;\n relationships?: Relationships;\n required: boolean;\n searchable: boolean;\n sortOrder: number;\n unique: boolean;\n values?: string;\n variable: string;\n}\n\nexport interface DotCMSContentTypeLayoutRow {\n columns?: DotCMSContentTypeLayoutColumn[];\n divider: DotCMSContentTypeField;\n}\n\nexport interface DotCMSContentTypeLayoutColumn {\n columnDivider: DotCMSContentTypeField;\n fields: DotCMSContentTypeField[];\n}\n\nexport interface DotCMSContentTypeFieldCategories {\n categoryName: string;\n description?: string;\n inode: string;\n key: string;\n keywords?: string;\n sortOrder: number;\n}\n\nexport interface DotCMSContentTypeFieldVariable {\n clazz: string;\n fieldId: string;\n id: string;\n key: string;\n value: string;\n}\n\n/** @private */\ninterface Relationships {\n cardinality: number;\n velocityVar: string;\n}\n", + "properties": [ + { + "name": "columnDivider", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSContentTypeField", + "optional": false, + "description": "", + "line": 66 + }, + { + "name": "fields", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSContentTypeField[]", + "optional": false, + "description": "", + "line": 67 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotCMSContentTypeLayoutRow", + "id": "interface-DotCMSContentTypeLayoutRow-c411403c9accaae031ba7992a8f495e6dfd1b23ab931867be818f4a46e794421dd0c6f6084293f65257d8ad53004de6a345bcc0634b385da941bda97edeee0ec", + "file": "libs/dotcms-models/src/lib/dot-content-types.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotCMSSystemActionMappings, DotCMSWorkflow } from '../index';\n\nexport interface DotCMSContentType {\n baseType: string;\n icon?: string;\n clazz: string;\n defaultType: boolean;\n description?: string;\n detailPage?: string;\n expireDateVar?: string;\n fields: DotCMSContentTypeField[];\n fixed: boolean;\n folder: string;\n host: string;\n iDate: number;\n id: string;\n layout: DotCMSContentTypeLayoutRow[];\n modDate: number;\n multilingualable: boolean;\n nEntries: number;\n name: string;\n owner?: string;\n publishDateVar?: string;\n system: boolean;\n urlMapPattern?: string;\n variable: string;\n versionable: boolean;\n workflows: DotCMSWorkflow[];\n systemActionMappings?: DotCMSSystemActionMappings;\n}\n\nexport interface DotCMSContentTypeField {\n categories?: DotCMSContentTypeFieldCategories;\n clazz: string;\n contentTypeId: string;\n dataType: string;\n defaultValue?: string;\n fieldType: string;\n fieldTypeLabel: string;\n fieldVariables: DotCMSContentTypeFieldVariable[];\n fixed: boolean;\n hint?: string;\n iDate: number;\n id: string;\n indexed: boolean;\n listed: boolean;\n modDate: number;\n name: string;\n readOnly: boolean;\n regexCheck?: string;\n relationships?: Relationships;\n required: boolean;\n searchable: boolean;\n sortOrder: number;\n unique: boolean;\n values?: string;\n variable: string;\n}\n\nexport interface DotCMSContentTypeLayoutRow {\n columns?: DotCMSContentTypeLayoutColumn[];\n divider: DotCMSContentTypeField;\n}\n\nexport interface DotCMSContentTypeLayoutColumn {\n columnDivider: DotCMSContentTypeField;\n fields: DotCMSContentTypeField[];\n}\n\nexport interface DotCMSContentTypeFieldCategories {\n categoryName: string;\n description?: string;\n inode: string;\n key: string;\n keywords?: string;\n sortOrder: number;\n}\n\nexport interface DotCMSContentTypeFieldVariable {\n clazz: string;\n fieldId: string;\n id: string;\n key: string;\n value: string;\n}\n\n/** @private */\ninterface Relationships {\n cardinality: number;\n velocityVar: string;\n}\n", + "properties": [ + { + "name": "columns", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSContentTypeLayoutColumn[]", + "optional": true, + "description": "", + "line": 61 + }, + { + "name": "divider", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSContentTypeField", + "optional": false, + "description": "", + "line": 62 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotCMSEditPageEvent", + "id": "interface-DotCMSEditPageEvent-d4009cb3063c60ea33929185524cd141cc8f0228033ef809eff87d1af33810bde768689f8b3bf792e648c9e715ac1358a3bc0e30101d4a6ac4b788d095302c2b", + "file": "apps/dotcms-ui/src/app/view/components/dot-contentlet-editor/components/dot-contentlet-wrapper/dot-contentlet-wrapper.component.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Component, Input, EventEmitter, Output } from '@angular/core';\nimport { DotContentletEditorService } from '../../services/dot-contentlet-editor.service';\nimport { DotMessageService } from '@services/dot-message/dot-messages.service';\nimport { DotAlertConfirmService } from '@services/dot-alert-confirm';\nimport { DotRouterService } from '@services/dot-router/dot-router.service';\nimport { DotIframeService } from '@components/_common/iframe/service/dot-iframe/dot-iframe.service';\n\nexport interface DotCMSEditPageEvent {\n name: string;\n data: {\n url: string;\n languageId: string;\n hostId: string;\n };\n}\n\n@Component({\n selector: 'dot-contentlet-wrapper',\n templateUrl: './dot-contentlet-wrapper.component.html',\n styleUrls: ['./dot-contentlet-wrapper.component.scss']\n})\nexport class DotContentletWrapperComponent {\n @Input()\n header = '';\n\n @Input()\n url: string;\n\n @Output()\n close: EventEmitter = new EventEmitter();\n\n @Output()\n custom: EventEmitter = new EventEmitter();\n\n private isContentletModified = false;\n private readonly customEventsHandler;\n\n constructor(\n private dotContentletEditorService: DotContentletEditorService,\n private dotAlertConfirmService: DotAlertConfirmService,\n private dotMessageService: DotMessageService,\n private dotRouterService: DotRouterService,\n private dotIframeService: DotIframeService\n ) {\n if (!this.customEventsHandler) {\n this.customEventsHandler = {\n close: ({ detail: { data } }: CustomEvent) => {\n this.onClose();\n if (data?.redirectUrl) {\n this.dotRouterService.goToEditPage({\n url: data.redirectUrl,\n language_id: data.languageId\n });\n }\n },\n 'edit-page': ({ detail: { data } }: CustomEvent) => {\n this.dotRouterService.goToEditPage({\n url: data.url,\n language_id: data.languageId,\n host_id: data.hostId\n });\n },\n 'deleted-page': () => {\n this.onClose();\n },\n 'edit-contentlet-data-updated': (e: CustomEvent) => {\n this.isContentletModified = e.detail.payload;\n },\n 'save-page': (data: any) => {\n if (this.shouldRefresh(data)) {\n this.dotIframeService.reload();\n }\n this.isContentletModified = false;\n },\n 'edit-contentlet-loaded': (e: CustomEvent) => {\n this.header = e.detail.data.contentType;\n }\n };\n }\n }\n\n /**\n * Habdle the before close dialog event\n *\n * @param * $event\n * @memberof DotContentletWrapperComponent\n */\n onBeforeClose($event?: { close: () => void }): void {\n if (this.isContentletModified) {\n this.dotAlertConfirmService.confirm({\n accept: () => {\n $event.close();\n },\n reject: () => {},\n header: this.dotMessageService.get('editcontentlet.lose.dialog.header'),\n message: this.dotMessageService.get('editcontentlet.lose.dialog.message'),\n footerLabel: {\n accept: this.dotMessageService.get('editcontentlet.lose.dialog.accept')\n }\n });\n } else {\n $event.close();\n }\n }\n\n /**\n * Handle close event form the iframe\n *\n * @memberof DotContentletWrapperComponent\n */\n onClose(): void {\n this.dotContentletEditorService.clear();\n this.isContentletModified = false;\n this.header = '';\n this.close.emit();\n }\n\n /**\n * Handle the custome events from the DotDialogIframe component\n *\n * @param CustomEvent $event\n * @memberof DotContentletWrapperComponent\n */\n onCustomEvent($event: CustomEvent): void {\n if (this.customEventsHandler[$event.detail.name]) {\n this.customEventsHandler[$event.detail.name]($event);\n }\n\n this.custom.emit($event);\n }\n\n /**\n * Call the keyDown method from the service if exist\n *\n * @param any $event\n * @memberof DotContentletWrapperComponent\n */\n onKeyDown($event): void {\n if (this.dotContentletEditorService.keyDown) {\n this.dotContentletEditorService.keyDown($event);\n }\n }\n\n /**\n * Call the load method from the service if exist\n *\n * @param any $event\n * @memberof DotContentletWrapperComponent\n */\n onLoad($event): void {\n if (this.dotContentletEditorService.load) {\n this.dotContentletEditorService.load($event);\n }\n }\n\n private shouldRefresh(data: any): boolean {\n // is not new content\n return this.dotRouterService.currentPortlet.url.includes(\n data?.detail?.payload?.contentletInode\n );\n }\n}\n", + "properties": [ + { + "name": "data", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": false, + "description": "", + "line": 10 + }, + { + "name": "name", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 9 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotCMSElasticSearchParams", + "id": "interface-DotCMSElasticSearchParams-2e1fdff52a275c33b933dedf526dd20122f22390d299e1891626b900ca8b342c91c45c143afde0915ab363e07ced8b84dbffdd6b0dfe3e129a0870e0fa150cdd", + "file": "libs/dotcms/src/lib/models/DotCMSElasticSearch.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotCMSContentlet } from './DotCMSPage.model';\n\nexport interface DotCMSElasticSearchParams {\n contentType: string;\n queryParams: {\n languageId: string;\n sortResultsBy: string;\n sortOrder1: string;\n offset: string;\n pagination: string;\n itemsPerPage: string;\n numberOfResults: string;\n detailedSearchQuery: string;\n };\n}\n\nexport interface DotCMSElasticSearchResult {\n contentlets: DotCMSContentlet[];\n esresponse: DotCMSElasticSearchresponse[];\n}\n\ninterface DotCMSElasticSearchresponse {\n took: number;\n timed_out: boolean;\n _shards: DotCMSElasticSearchResponseShards;\n hits: DotCMSElasticSearchResponseHits;\n}\n\ninterface DotCMSElasticSearchResponseHits {\n total: number;\n max_score?: any;\n hits: DotCMSElasticSearchResponseHit[];\n}\n\ninterface DotCMSElasticSearchResponseHit {\n _index: string;\n _type: string;\n _id: string;\n _score?: any;\n _source: DotCMSElasticSearchResponseSource;\n sort: number[];\n}\n\ninterface DotCMSElasticSearchResponseSource {\n inode: string;\n identifier: string;\n}\n\ninterface DotCMSElasticSearchResponseShards {\n total: number;\n successful: number;\n skipped: number;\n failed: number;\n}\n", + "properties": [ + { + "name": "contentType", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 4 + }, + { + "name": "queryParams", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": false, + "description": "", + "line": 5 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotCMSElasticSearchresponse", + "id": "interface-DotCMSElasticSearchresponse-2e1fdff52a275c33b933dedf526dd20122f22390d299e1891626b900ca8b342c91c45c143afde0915ab363e07ced8b84dbffdd6b0dfe3e129a0870e0fa150cdd", + "file": "libs/dotcms/src/lib/models/DotCMSElasticSearch.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotCMSContentlet } from './DotCMSPage.model';\n\nexport interface DotCMSElasticSearchParams {\n contentType: string;\n queryParams: {\n languageId: string;\n sortResultsBy: string;\n sortOrder1: string;\n offset: string;\n pagination: string;\n itemsPerPage: string;\n numberOfResults: string;\n detailedSearchQuery: string;\n };\n}\n\nexport interface DotCMSElasticSearchResult {\n contentlets: DotCMSContentlet[];\n esresponse: DotCMSElasticSearchresponse[];\n}\n\ninterface DotCMSElasticSearchresponse {\n took: number;\n timed_out: boolean;\n _shards: DotCMSElasticSearchResponseShards;\n hits: DotCMSElasticSearchResponseHits;\n}\n\ninterface DotCMSElasticSearchResponseHits {\n total: number;\n max_score?: any;\n hits: DotCMSElasticSearchResponseHit[];\n}\n\ninterface DotCMSElasticSearchResponseHit {\n _index: string;\n _type: string;\n _id: string;\n _score?: any;\n _source: DotCMSElasticSearchResponseSource;\n sort: number[];\n}\n\ninterface DotCMSElasticSearchResponseSource {\n inode: string;\n identifier: string;\n}\n\ninterface DotCMSElasticSearchResponseShards {\n total: number;\n successful: number;\n skipped: number;\n failed: number;\n}\n", + "properties": [ + { + "name": "_shards", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSElasticSearchResponseShards", + "optional": false, + "description": "", + "line": 25 + }, + { + "name": "hits", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSElasticSearchResponseHits", + "optional": false, + "description": "", + "line": 26 + }, + { + "name": "timed_out", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 24 + }, + { + "name": "took", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 23 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotCMSElasticSearchResponseHit", + "id": "interface-DotCMSElasticSearchResponseHit-2e1fdff52a275c33b933dedf526dd20122f22390d299e1891626b900ca8b342c91c45c143afde0915ab363e07ced8b84dbffdd6b0dfe3e129a0870e0fa150cdd", + "file": "libs/dotcms/src/lib/models/DotCMSElasticSearch.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotCMSContentlet } from './DotCMSPage.model';\n\nexport interface DotCMSElasticSearchParams {\n contentType: string;\n queryParams: {\n languageId: string;\n sortResultsBy: string;\n sortOrder1: string;\n offset: string;\n pagination: string;\n itemsPerPage: string;\n numberOfResults: string;\n detailedSearchQuery: string;\n };\n}\n\nexport interface DotCMSElasticSearchResult {\n contentlets: DotCMSContentlet[];\n esresponse: DotCMSElasticSearchresponse[];\n}\n\ninterface DotCMSElasticSearchresponse {\n took: number;\n timed_out: boolean;\n _shards: DotCMSElasticSearchResponseShards;\n hits: DotCMSElasticSearchResponseHits;\n}\n\ninterface DotCMSElasticSearchResponseHits {\n total: number;\n max_score?: any;\n hits: DotCMSElasticSearchResponseHit[];\n}\n\ninterface DotCMSElasticSearchResponseHit {\n _index: string;\n _type: string;\n _id: string;\n _score?: any;\n _source: DotCMSElasticSearchResponseSource;\n sort: number[];\n}\n\ninterface DotCMSElasticSearchResponseSource {\n inode: string;\n identifier: string;\n}\n\ninterface DotCMSElasticSearchResponseShards {\n total: number;\n successful: number;\n skipped: number;\n failed: number;\n}\n", + "properties": [ + { + "name": "_id", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 38 + }, + { + "name": "_index", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 36 + }, + { + "name": "_score", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": true, + "description": "", + "line": 39 + }, + { + "name": "_source", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSElasticSearchResponseSource", + "optional": false, + "description": "", + "line": 40 + }, + { + "name": "_type", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 37 + }, + { + "name": "sort", + "deprecated": false, + "deprecationMessage": "", + "type": "number[]", + "optional": false, + "description": "", + "line": 41 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotCMSElasticSearchResponseHits", + "id": "interface-DotCMSElasticSearchResponseHits-2e1fdff52a275c33b933dedf526dd20122f22390d299e1891626b900ca8b342c91c45c143afde0915ab363e07ced8b84dbffdd6b0dfe3e129a0870e0fa150cdd", + "file": "libs/dotcms/src/lib/models/DotCMSElasticSearch.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotCMSContentlet } from './DotCMSPage.model';\n\nexport interface DotCMSElasticSearchParams {\n contentType: string;\n queryParams: {\n languageId: string;\n sortResultsBy: string;\n sortOrder1: string;\n offset: string;\n pagination: string;\n itemsPerPage: string;\n numberOfResults: string;\n detailedSearchQuery: string;\n };\n}\n\nexport interface DotCMSElasticSearchResult {\n contentlets: DotCMSContentlet[];\n esresponse: DotCMSElasticSearchresponse[];\n}\n\ninterface DotCMSElasticSearchresponse {\n took: number;\n timed_out: boolean;\n _shards: DotCMSElasticSearchResponseShards;\n hits: DotCMSElasticSearchResponseHits;\n}\n\ninterface DotCMSElasticSearchResponseHits {\n total: number;\n max_score?: any;\n hits: DotCMSElasticSearchResponseHit[];\n}\n\ninterface DotCMSElasticSearchResponseHit {\n _index: string;\n _type: string;\n _id: string;\n _score?: any;\n _source: DotCMSElasticSearchResponseSource;\n sort: number[];\n}\n\ninterface DotCMSElasticSearchResponseSource {\n inode: string;\n identifier: string;\n}\n\ninterface DotCMSElasticSearchResponseShards {\n total: number;\n successful: number;\n skipped: number;\n failed: number;\n}\n", + "properties": [ + { + "name": "hits", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSElasticSearchResponseHit[]", + "optional": false, + "description": "", + "line": 32 + }, + { + "name": "max_score", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": true, + "description": "", + "line": 31 + }, + { + "name": "total", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 30 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotCMSElasticSearchResponseShards", + "id": "interface-DotCMSElasticSearchResponseShards-2e1fdff52a275c33b933dedf526dd20122f22390d299e1891626b900ca8b342c91c45c143afde0915ab363e07ced8b84dbffdd6b0dfe3e129a0870e0fa150cdd", + "file": "libs/dotcms/src/lib/models/DotCMSElasticSearch.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotCMSContentlet } from './DotCMSPage.model';\n\nexport interface DotCMSElasticSearchParams {\n contentType: string;\n queryParams: {\n languageId: string;\n sortResultsBy: string;\n sortOrder1: string;\n offset: string;\n pagination: string;\n itemsPerPage: string;\n numberOfResults: string;\n detailedSearchQuery: string;\n };\n}\n\nexport interface DotCMSElasticSearchResult {\n contentlets: DotCMSContentlet[];\n esresponse: DotCMSElasticSearchresponse[];\n}\n\ninterface DotCMSElasticSearchresponse {\n took: number;\n timed_out: boolean;\n _shards: DotCMSElasticSearchResponseShards;\n hits: DotCMSElasticSearchResponseHits;\n}\n\ninterface DotCMSElasticSearchResponseHits {\n total: number;\n max_score?: any;\n hits: DotCMSElasticSearchResponseHit[];\n}\n\ninterface DotCMSElasticSearchResponseHit {\n _index: string;\n _type: string;\n _id: string;\n _score?: any;\n _source: DotCMSElasticSearchResponseSource;\n sort: number[];\n}\n\ninterface DotCMSElasticSearchResponseSource {\n inode: string;\n identifier: string;\n}\n\ninterface DotCMSElasticSearchResponseShards {\n total: number;\n successful: number;\n skipped: number;\n failed: number;\n}\n", + "properties": [ + { + "name": "failed", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 53 + }, + { + "name": "skipped", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 52 + }, + { + "name": "successful", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 51 + }, + { + "name": "total", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 50 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotCMSElasticSearchResponseSource", + "id": "interface-DotCMSElasticSearchResponseSource-2e1fdff52a275c33b933dedf526dd20122f22390d299e1891626b900ca8b342c91c45c143afde0915ab363e07ced8b84dbffdd6b0dfe3e129a0870e0fa150cdd", + "file": "libs/dotcms/src/lib/models/DotCMSElasticSearch.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotCMSContentlet } from './DotCMSPage.model';\n\nexport interface DotCMSElasticSearchParams {\n contentType: string;\n queryParams: {\n languageId: string;\n sortResultsBy: string;\n sortOrder1: string;\n offset: string;\n pagination: string;\n itemsPerPage: string;\n numberOfResults: string;\n detailedSearchQuery: string;\n };\n}\n\nexport interface DotCMSElasticSearchResult {\n contentlets: DotCMSContentlet[];\n esresponse: DotCMSElasticSearchresponse[];\n}\n\ninterface DotCMSElasticSearchresponse {\n took: number;\n timed_out: boolean;\n _shards: DotCMSElasticSearchResponseShards;\n hits: DotCMSElasticSearchResponseHits;\n}\n\ninterface DotCMSElasticSearchResponseHits {\n total: number;\n max_score?: any;\n hits: DotCMSElasticSearchResponseHit[];\n}\n\ninterface DotCMSElasticSearchResponseHit {\n _index: string;\n _type: string;\n _id: string;\n _score?: any;\n _source: DotCMSElasticSearchResponseSource;\n sort: number[];\n}\n\ninterface DotCMSElasticSearchResponseSource {\n inode: string;\n identifier: string;\n}\n\ninterface DotCMSElasticSearchResponseShards {\n total: number;\n successful: number;\n skipped: number;\n failed: number;\n}\n", + "properties": [ + { + "name": "identifier", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 46 + }, + { + "name": "inode", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 45 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotCMSElasticSearchResult", + "id": "interface-DotCMSElasticSearchResult-2e1fdff52a275c33b933dedf526dd20122f22390d299e1891626b900ca8b342c91c45c143afde0915ab363e07ced8b84dbffdd6b0dfe3e129a0870e0fa150cdd", + "file": "libs/dotcms/src/lib/models/DotCMSElasticSearch.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotCMSContentlet } from './DotCMSPage.model';\n\nexport interface DotCMSElasticSearchParams {\n contentType: string;\n queryParams: {\n languageId: string;\n sortResultsBy: string;\n sortOrder1: string;\n offset: string;\n pagination: string;\n itemsPerPage: string;\n numberOfResults: string;\n detailedSearchQuery: string;\n };\n}\n\nexport interface DotCMSElasticSearchResult {\n contentlets: DotCMSContentlet[];\n esresponse: DotCMSElasticSearchresponse[];\n}\n\ninterface DotCMSElasticSearchresponse {\n took: number;\n timed_out: boolean;\n _shards: DotCMSElasticSearchResponseShards;\n hits: DotCMSElasticSearchResponseHits;\n}\n\ninterface DotCMSElasticSearchResponseHits {\n total: number;\n max_score?: any;\n hits: DotCMSElasticSearchResponseHit[];\n}\n\ninterface DotCMSElasticSearchResponseHit {\n _index: string;\n _type: string;\n _id: string;\n _score?: any;\n _source: DotCMSElasticSearchResponseSource;\n sort: number[];\n}\n\ninterface DotCMSElasticSearchResponseSource {\n inode: string;\n identifier: string;\n}\n\ninterface DotCMSElasticSearchResponseShards {\n total: number;\n successful: number;\n skipped: number;\n failed: number;\n}\n", + "properties": [ + { + "name": "contentlets", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSContentlet[]", + "optional": false, + "description": "", + "line": 18 + }, + { + "name": "esresponse", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSElasticSearchresponse[]", + "optional": false, + "description": "", + "line": 19 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotCMSError", + "id": "interface-DotCMSError-9c561c5f2bd1747a0fb1fda82b95eccfa4f15c5bbd1c4125866a7e1babf54409c69194f59834d8f10594e7522acc52f708edab5d3ec9023191b8bb7cee0a842b", + "file": "libs/dotcms/src/lib/models/DotCMSError.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotCMSError {\n statusCode: number;\n message: string;\n}\n", + "properties": [ + { + "name": "message", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 3 + }, + { + "name": "statusCode", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 2 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotCMSEventsParams", + "id": "interface-DotCMSEventsParams-1b9fb1044e5df5d09db308e616c7d3d2074b299a017334e79b84a1bd36a2518640084671cf73d1586039626ea2c9ed6449bae09921614bb682e0e6ed78fe59e2", + "file": "libs/dotcms/src/lib/models/DotCMSEvent.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotCMSEventsParams {\n name: string;\n data: any;\n}\n", + "properties": [ + { + "name": "data", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": false, + "description": "", + "line": 3 + }, + { + "name": "name", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 2 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotCMSFormConfig", + "id": "interface-DotCMSFormConfig-36a123408fb88c10a2b06e79606385c7d82c78e48f8485ee40d3f960b678824bbcfe6b442baf6c817afcbd0a009acbcb59f7d8466f6e587ecca43ff11f599069", + "file": "libs/dotcms/src/lib/models/DotCMSForm.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotCMSFormConfig {\n contentHost?: string;\n contentType?: string;\n identifier: string;\n workflowtoSubmit?: string;\n fieldsToShow?: string;\n labels?: {\n submit?: string;\n reset?: string;\n };\n win?: Window;\n onSuccess?(data: any): any;\n onError?(error: any): any;\n}\n", + "properties": [ + { + "name": "contentHost", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 2 + }, + { + "name": "contentType", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 3 + }, + { + "name": "fieldsToShow", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 6 + }, + { + "name": "identifier", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 4 + }, + { + "name": "labels", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": true, + "description": "", + "line": 7 + }, + { + "name": "win", + "deprecated": false, + "deprecationMessage": "", + "type": "Window", + "optional": true, + "description": "", + "line": 11 + }, + { + "name": "workflowtoSubmit", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 5 + } + ], + "indexSignatures": [], + "kind": 167, + "methods": [ + { + "name": "onError", + "args": [ + { + "name": "error", + "type": "any", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": true, + "returnType": "any", + "typeParameters": [], + "line": 13, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "error", + "type": "any", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "onSuccess", + "args": [ + { + "name": "data", + "type": "any", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": true, + "returnType": "any", + "typeParameters": [], + "line": 12, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "data", + "type": "any", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ] + }, + { + "name": "DotCMSLanguageItem", + "id": "interface-DotCMSLanguageItem-cfd1d13a6344d9498e90b4ac214f871a69f7ede211f91251ff1f17293fa14ddcdb1f82c3b165a80394a7aa07734fec0de217ac08eb1372989e244bc80873f8bf", + "file": "libs/dotcms/src/lib/models/DotCMSLanguage.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotCMSLanguageItem {\n id: number;\n languageCode: string;\n countryCode: string;\n language: string;\n country: string;\n}\n", + "properties": [ + { + "name": "country", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 6 + }, + { + "name": "countryCode", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 4 + }, + { + "name": "id", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 2 + }, + { + "name": "language", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 5 + }, + { + "name": "languageCode", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 3 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotCMSLayout", + "id": "interface-DotCMSLayout-8e6a73749c34df0c00155e704df0c63721d0a5c138303ac5f092daa3257a542b81453ec50309883343d0a7dc27171935ef7cb2752699b9e25471a4fe22715ee8", + "file": "libs/dotcms/src/lib/models/DotCMSPage.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotCMSSite } from './DotCMSSite.model';\n\nexport interface DotCMSPageParams {\n url: string;\n language?: string;\n}\n\nexport interface DotCMSPageAsset {\n canCreateTemplate: boolean;\n containers: DotCMSPageAssetContainer;\n layout: DotCMSLayout;\n page: DotCMSPage;\n site: DotCMSSite;\n template: DotCMSTemplate;\n viewAs: DotCMSViewAs;\n}\n\nexport interface DotCMSViewAs {\n language: {\n id: number;\n languageCode: string;\n countryCode: string;\n language: string;\n country: string;\n };\n mode: string;\n}\n\nexport interface DotCMSPageAssetContainer {\n [key: string]: {\n container: DotCMSContainer;\n containerStructures: DotCMSContainerStructure[];\n contentlets: {\n [key: string]: DotCMSContentlet[];\n };\n };\n}\n\nexport interface DotCMSContainerStructure {\n id: string;\n structureId: string;\n containerInode: string;\n containerId: string;\n code: string;\n contentTypeVar: string;\n}\n\nexport interface DotCMSLayout {\n pageWidth: string;\n width: string;\n layout: string;\n title: string;\n header: boolean;\n footer: boolean;\n body: DotPageAssetLayoutBody;\n sidebar: DotPageAssetLayoutSidebar;\n}\n\nexport interface DotPageAssetLayoutSidebar {\n preview: boolean;\n containers: DotCMSContainer[];\n location: string;\n widthPercent: number;\n width: string;\n}\n\nexport interface DotPageAssetLayoutBody {\n rows: DotPageAssetLayoutRow[];\n}\n\nexport interface DotPageAssetLayoutRow {\n identifier: number;\n value?: string;\n id?: string;\n columns: DotPageAssetLayoutColumn[];\n styleClass?: string;\n}\n\nexport interface DotPageAssetLayoutColumn {\n preview: boolean;\n containers: DotCMSContainer[];\n widthPercent: number;\n width: number;\n leftOffset: number;\n left: number;\n styleClass?: string;\n}\n\nexport interface DotCMSPage {\n template: string;\n modDate: number;\n metadata: string;\n cachettl: string;\n pageURI: string;\n title: string;\n type: string;\n showOnMenu: string;\n httpsRequired: boolean;\n inode: string;\n disabledWYSIWYG: any[];\n seokeywords: string;\n host: string;\n lastReview: number;\n working: boolean;\n locked: boolean;\n stInode: string;\n friendlyName: string;\n live: boolean;\n owner: string;\n identifier: string;\n nullProperties: any[];\n friendlyname: string;\n pagemetadata: string;\n languageId: number;\n url: string;\n seodescription: string;\n modUserName: string;\n folder: string;\n deleted: boolean;\n sortOrder: number;\n modUser: string;\n pageUrl: string;\n workingInode: string;\n shortyWorking: string;\n canEdit: boolean;\n canRead: boolean;\n canLock: boolean;\n lockedOn: number;\n lockedBy: string;\n lockedByName: string;\n liveInode: string;\n shortyLive: string;\n}\n\nexport interface DotCMSContainer {\n identifier: string;\n uuid: string;\n iDate: number;\n type: string;\n owner?: string;\n inode: string;\n source: string;\n title: string;\n friendlyName: string;\n modDate: number;\n modUser: string;\n sortOrder: number;\n showOnMenu: boolean;\n code?: string;\n maxContentlets: number;\n useDiv: boolean;\n sortContentletsBy?: string;\n preLoop: string;\n postLoop: string;\n staticify: boolean;\n luceneQuery?: string;\n notes: string;\n languageId?: number;\n path?: string;\n live: boolean;\n locked: boolean;\n working: boolean;\n deleted: boolean;\n name: string;\n archived: boolean;\n permissionId: string;\n versionId: string;\n versionType: string;\n permissionType: string;\n categoryId: string;\n idate: number;\n new: boolean;\n acceptTypes: string;\n contentlets: DotCMSContentlet[];\n}\n\nexport interface DotCMSContentlet {\n owner: string;\n identifier: string;\n hostName: string;\n modDate: number;\n languageId: number;\n body?: string;\n title: string;\n url: string;\n baseType: string;\n inode: string;\n titleImage: string;\n modUserName: string;\n archived: boolean;\n folder: string;\n hasTitleImage: boolean;\n sortOrder: number;\n modUser: string;\n host: string;\n working: boolean;\n locked: boolean;\n stInode: string;\n contentType: string;\n live: boolean;\n code?: string;\n widgetTitle?: string;\n endDate?: number;\n description?: string;\n recurrenceOccurs?: string;\n recurrenceDayOfWeek?: number;\n recurrenceDayOfMonth?: number;\n recurrenceStart?: number;\n recurrenceWeekOfMonth?: number;\n recurs?: boolean;\n noRecurrenceEnd?: boolean;\n urlTitle?: string;\n URL_MAP_FOR_CONTENT?: string;\n recurrenceDaysOfWeek?: string;\n recurrenceInterval?: number;\n urlMap?: string;\n recurrenceDatesToIgnore?: string;\n recurrenceMonthOfYear?: number;\n startDate?: number;\n recurrenceEnd?: number;\n categories?: string;\n image?: string;\n tags?: string;\n}\n\nexport interface DotCMSTemplate {\n iDate: number;\n type: string;\n owner: string;\n inode: string;\n identifier: string;\n source: string;\n title: string;\n friendlyName: string;\n modDate: number;\n modUser: string;\n sortOrder: number;\n showOnMenu: boolean;\n image: string;\n drawed: boolean;\n drawedBody: string;\n theme: string;\n anonymous: boolean;\n template: boolean;\n name: string;\n live: boolean;\n archived: boolean;\n locked: boolean;\n working: boolean;\n permissionId: string;\n versionId: string;\n versionType: string;\n deleted: boolean;\n permissionType: string;\n categoryId: string;\n idate: number;\n new: boolean;\n canEdit: boolean;\n}\n", + "properties": [ + { + "name": "body", + "deprecated": false, + "deprecationMessage": "", + "type": "DotPageAssetLayoutBody", + "optional": false, + "description": "", + "line": 55 + }, + { + "name": "footer", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 54 + }, + { + "name": "header", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 53 + }, + { + "name": "layout", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 51 + }, + { + "name": "pageWidth", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 49 + }, + { + "name": "sidebar", + "deprecated": false, + "deprecationMessage": "", + "type": "DotPageAssetLayoutSidebar", + "optional": false, + "description": "", + "line": 56 + }, + { + "name": "title", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 52 + }, + { + "name": "width", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 50 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotCMSNavigationItem", + "id": "interface-DotCMSNavigationItem-e654f707b877432709c0a9ba0eb09b9f91056f48d1b023d1d684bfbc62da131f3587bc9869a1dc8f7dfb91c9019fadb92a1dd8c1d5d1ad7feda0130e79253415", + "file": "libs/dotcms/src/lib/models/DotCMSNavigation.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotCMSNavigationItem {\n code?: any;\n folder: string;\n children?: DotCMSNavigationItem[];\n host: string;\n languageId: number;\n href: string;\n title: string;\n type: string;\n hash: number;\n target: string;\n order: number;\n}\n", + "properties": [ + { + "name": "children", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSNavigationItem[]", + "optional": true, + "description": "", + "line": 4 + }, + { + "name": "code", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": true, + "description": "", + "line": 2 + }, + { + "name": "folder", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 3 + }, + { + "name": "hash", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 10 + }, + { + "name": "host", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 5 + }, + { + "name": "href", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 7 + }, + { + "name": "languageId", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 6 + }, + { + "name": "order", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 12 + }, + { + "name": "target", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 11 + }, + { + "name": "title", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 8 + }, + { + "name": "type", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 9 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotCMSPage", + "id": "interface-DotCMSPage-8e6a73749c34df0c00155e704df0c63721d0a5c138303ac5f092daa3257a542b81453ec50309883343d0a7dc27171935ef7cb2752699b9e25471a4fe22715ee8", + "file": "libs/dotcms/src/lib/models/DotCMSPage.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotCMSSite } from './DotCMSSite.model';\n\nexport interface DotCMSPageParams {\n url: string;\n language?: string;\n}\n\nexport interface DotCMSPageAsset {\n canCreateTemplate: boolean;\n containers: DotCMSPageAssetContainer;\n layout: DotCMSLayout;\n page: DotCMSPage;\n site: DotCMSSite;\n template: DotCMSTemplate;\n viewAs: DotCMSViewAs;\n}\n\nexport interface DotCMSViewAs {\n language: {\n id: number;\n languageCode: string;\n countryCode: string;\n language: string;\n country: string;\n };\n mode: string;\n}\n\nexport interface DotCMSPageAssetContainer {\n [key: string]: {\n container: DotCMSContainer;\n containerStructures: DotCMSContainerStructure[];\n contentlets: {\n [key: string]: DotCMSContentlet[];\n };\n };\n}\n\nexport interface DotCMSContainerStructure {\n id: string;\n structureId: string;\n containerInode: string;\n containerId: string;\n code: string;\n contentTypeVar: string;\n}\n\nexport interface DotCMSLayout {\n pageWidth: string;\n width: string;\n layout: string;\n title: string;\n header: boolean;\n footer: boolean;\n body: DotPageAssetLayoutBody;\n sidebar: DotPageAssetLayoutSidebar;\n}\n\nexport interface DotPageAssetLayoutSidebar {\n preview: boolean;\n containers: DotCMSContainer[];\n location: string;\n widthPercent: number;\n width: string;\n}\n\nexport interface DotPageAssetLayoutBody {\n rows: DotPageAssetLayoutRow[];\n}\n\nexport interface DotPageAssetLayoutRow {\n identifier: number;\n value?: string;\n id?: string;\n columns: DotPageAssetLayoutColumn[];\n styleClass?: string;\n}\n\nexport interface DotPageAssetLayoutColumn {\n preview: boolean;\n containers: DotCMSContainer[];\n widthPercent: number;\n width: number;\n leftOffset: number;\n left: number;\n styleClass?: string;\n}\n\nexport interface DotCMSPage {\n template: string;\n modDate: number;\n metadata: string;\n cachettl: string;\n pageURI: string;\n title: string;\n type: string;\n showOnMenu: string;\n httpsRequired: boolean;\n inode: string;\n disabledWYSIWYG: any[];\n seokeywords: string;\n host: string;\n lastReview: number;\n working: boolean;\n locked: boolean;\n stInode: string;\n friendlyName: string;\n live: boolean;\n owner: string;\n identifier: string;\n nullProperties: any[];\n friendlyname: string;\n pagemetadata: string;\n languageId: number;\n url: string;\n seodescription: string;\n modUserName: string;\n folder: string;\n deleted: boolean;\n sortOrder: number;\n modUser: string;\n pageUrl: string;\n workingInode: string;\n shortyWorking: string;\n canEdit: boolean;\n canRead: boolean;\n canLock: boolean;\n lockedOn: number;\n lockedBy: string;\n lockedByName: string;\n liveInode: string;\n shortyLive: string;\n}\n\nexport interface DotCMSContainer {\n identifier: string;\n uuid: string;\n iDate: number;\n type: string;\n owner?: string;\n inode: string;\n source: string;\n title: string;\n friendlyName: string;\n modDate: number;\n modUser: string;\n sortOrder: number;\n showOnMenu: boolean;\n code?: string;\n maxContentlets: number;\n useDiv: boolean;\n sortContentletsBy?: string;\n preLoop: string;\n postLoop: string;\n staticify: boolean;\n luceneQuery?: string;\n notes: string;\n languageId?: number;\n path?: string;\n live: boolean;\n locked: boolean;\n working: boolean;\n deleted: boolean;\n name: string;\n archived: boolean;\n permissionId: string;\n versionId: string;\n versionType: string;\n permissionType: string;\n categoryId: string;\n idate: number;\n new: boolean;\n acceptTypes: string;\n contentlets: DotCMSContentlet[];\n}\n\nexport interface DotCMSContentlet {\n owner: string;\n identifier: string;\n hostName: string;\n modDate: number;\n languageId: number;\n body?: string;\n title: string;\n url: string;\n baseType: string;\n inode: string;\n titleImage: string;\n modUserName: string;\n archived: boolean;\n folder: string;\n hasTitleImage: boolean;\n sortOrder: number;\n modUser: string;\n host: string;\n working: boolean;\n locked: boolean;\n stInode: string;\n contentType: string;\n live: boolean;\n code?: string;\n widgetTitle?: string;\n endDate?: number;\n description?: string;\n recurrenceOccurs?: string;\n recurrenceDayOfWeek?: number;\n recurrenceDayOfMonth?: number;\n recurrenceStart?: number;\n recurrenceWeekOfMonth?: number;\n recurs?: boolean;\n noRecurrenceEnd?: boolean;\n urlTitle?: string;\n URL_MAP_FOR_CONTENT?: string;\n recurrenceDaysOfWeek?: string;\n recurrenceInterval?: number;\n urlMap?: string;\n recurrenceDatesToIgnore?: string;\n recurrenceMonthOfYear?: number;\n startDate?: number;\n recurrenceEnd?: number;\n categories?: string;\n image?: string;\n tags?: string;\n}\n\nexport interface DotCMSTemplate {\n iDate: number;\n type: string;\n owner: string;\n inode: string;\n identifier: string;\n source: string;\n title: string;\n friendlyName: string;\n modDate: number;\n modUser: string;\n sortOrder: number;\n showOnMenu: boolean;\n image: string;\n drawed: boolean;\n drawedBody: string;\n theme: string;\n anonymous: boolean;\n template: boolean;\n name: string;\n live: boolean;\n archived: boolean;\n locked: boolean;\n working: boolean;\n permissionId: string;\n versionId: string;\n versionType: string;\n deleted: boolean;\n permissionType: string;\n categoryId: string;\n idate: number;\n new: boolean;\n canEdit: boolean;\n}\n", + "properties": [ + { + "name": "cachettl", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 93 + }, + { + "name": "canEdit", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 125 + }, + { + "name": "canLock", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 127 + }, + { + "name": "canRead", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 126 + }, + { + "name": "deleted", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 119 + }, + { + "name": "disabledWYSIWYG", + "deprecated": false, + "deprecationMessage": "", + "type": "any[]", + "optional": false, + "description": "", + "line": 100 + }, + { + "name": "folder", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 118 + }, + { + "name": "friendlyname", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 112 + }, + { + "name": "friendlyName", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 107 + }, + { + "name": "host", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 102 + }, + { + "name": "httpsRequired", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 98 + }, + { + "name": "identifier", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 110 + }, + { + "name": "inode", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 99 + }, + { + "name": "languageId", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 114 + }, + { + "name": "lastReview", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 103 + }, + { + "name": "live", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 108 + }, + { + "name": "liveInode", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 131 + }, + { + "name": "locked", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 105 + }, + { + "name": "lockedBy", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 129 + }, + { + "name": "lockedByName", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 130 + }, + { + "name": "lockedOn", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 128 + }, + { + "name": "metadata", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 92 + }, + { + "name": "modDate", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 91 + }, + { + "name": "modUser", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 121 + }, + { + "name": "modUserName", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 117 + }, + { + "name": "nullProperties", + "deprecated": false, + "deprecationMessage": "", + "type": "any[]", + "optional": false, + "description": "", + "line": 111 + }, + { + "name": "owner", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 109 + }, + { + "name": "pagemetadata", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 113 + }, + { + "name": "pageURI", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 94 + }, + { + "name": "pageUrl", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 122 + }, + { + "name": "seodescription", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 116 + }, + { + "name": "seokeywords", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 101 + }, + { + "name": "shortyLive", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 132 + }, + { + "name": "shortyWorking", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 124 + }, + { + "name": "showOnMenu", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 97 + }, + { + "name": "sortOrder", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 120 + }, + { + "name": "stInode", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 106 + }, + { + "name": "template", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 90 + }, + { + "name": "title", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 95 + }, + { + "name": "type", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 96 + }, + { + "name": "url", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 115 + }, + { + "name": "working", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 104 + }, + { + "name": "workingInode", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 123 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotCMSPageAsset", + "id": "interface-DotCMSPageAsset-8e6a73749c34df0c00155e704df0c63721d0a5c138303ac5f092daa3257a542b81453ec50309883343d0a7dc27171935ef7cb2752699b9e25471a4fe22715ee8", + "file": "libs/dotcms/src/lib/models/DotCMSPage.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotCMSSite } from './DotCMSSite.model';\n\nexport interface DotCMSPageParams {\n url: string;\n language?: string;\n}\n\nexport interface DotCMSPageAsset {\n canCreateTemplate: boolean;\n containers: DotCMSPageAssetContainer;\n layout: DotCMSLayout;\n page: DotCMSPage;\n site: DotCMSSite;\n template: DotCMSTemplate;\n viewAs: DotCMSViewAs;\n}\n\nexport interface DotCMSViewAs {\n language: {\n id: number;\n languageCode: string;\n countryCode: string;\n language: string;\n country: string;\n };\n mode: string;\n}\n\nexport interface DotCMSPageAssetContainer {\n [key: string]: {\n container: DotCMSContainer;\n containerStructures: DotCMSContainerStructure[];\n contentlets: {\n [key: string]: DotCMSContentlet[];\n };\n };\n}\n\nexport interface DotCMSContainerStructure {\n id: string;\n structureId: string;\n containerInode: string;\n containerId: string;\n code: string;\n contentTypeVar: string;\n}\n\nexport interface DotCMSLayout {\n pageWidth: string;\n width: string;\n layout: string;\n title: string;\n header: boolean;\n footer: boolean;\n body: DotPageAssetLayoutBody;\n sidebar: DotPageAssetLayoutSidebar;\n}\n\nexport interface DotPageAssetLayoutSidebar {\n preview: boolean;\n containers: DotCMSContainer[];\n location: string;\n widthPercent: number;\n width: string;\n}\n\nexport interface DotPageAssetLayoutBody {\n rows: DotPageAssetLayoutRow[];\n}\n\nexport interface DotPageAssetLayoutRow {\n identifier: number;\n value?: string;\n id?: string;\n columns: DotPageAssetLayoutColumn[];\n styleClass?: string;\n}\n\nexport interface DotPageAssetLayoutColumn {\n preview: boolean;\n containers: DotCMSContainer[];\n widthPercent: number;\n width: number;\n leftOffset: number;\n left: number;\n styleClass?: string;\n}\n\nexport interface DotCMSPage {\n template: string;\n modDate: number;\n metadata: string;\n cachettl: string;\n pageURI: string;\n title: string;\n type: string;\n showOnMenu: string;\n httpsRequired: boolean;\n inode: string;\n disabledWYSIWYG: any[];\n seokeywords: string;\n host: string;\n lastReview: number;\n working: boolean;\n locked: boolean;\n stInode: string;\n friendlyName: string;\n live: boolean;\n owner: string;\n identifier: string;\n nullProperties: any[];\n friendlyname: string;\n pagemetadata: string;\n languageId: number;\n url: string;\n seodescription: string;\n modUserName: string;\n folder: string;\n deleted: boolean;\n sortOrder: number;\n modUser: string;\n pageUrl: string;\n workingInode: string;\n shortyWorking: string;\n canEdit: boolean;\n canRead: boolean;\n canLock: boolean;\n lockedOn: number;\n lockedBy: string;\n lockedByName: string;\n liveInode: string;\n shortyLive: string;\n}\n\nexport interface DotCMSContainer {\n identifier: string;\n uuid: string;\n iDate: number;\n type: string;\n owner?: string;\n inode: string;\n source: string;\n title: string;\n friendlyName: string;\n modDate: number;\n modUser: string;\n sortOrder: number;\n showOnMenu: boolean;\n code?: string;\n maxContentlets: number;\n useDiv: boolean;\n sortContentletsBy?: string;\n preLoop: string;\n postLoop: string;\n staticify: boolean;\n luceneQuery?: string;\n notes: string;\n languageId?: number;\n path?: string;\n live: boolean;\n locked: boolean;\n working: boolean;\n deleted: boolean;\n name: string;\n archived: boolean;\n permissionId: string;\n versionId: string;\n versionType: string;\n permissionType: string;\n categoryId: string;\n idate: number;\n new: boolean;\n acceptTypes: string;\n contentlets: DotCMSContentlet[];\n}\n\nexport interface DotCMSContentlet {\n owner: string;\n identifier: string;\n hostName: string;\n modDate: number;\n languageId: number;\n body?: string;\n title: string;\n url: string;\n baseType: string;\n inode: string;\n titleImage: string;\n modUserName: string;\n archived: boolean;\n folder: string;\n hasTitleImage: boolean;\n sortOrder: number;\n modUser: string;\n host: string;\n working: boolean;\n locked: boolean;\n stInode: string;\n contentType: string;\n live: boolean;\n code?: string;\n widgetTitle?: string;\n endDate?: number;\n description?: string;\n recurrenceOccurs?: string;\n recurrenceDayOfWeek?: number;\n recurrenceDayOfMonth?: number;\n recurrenceStart?: number;\n recurrenceWeekOfMonth?: number;\n recurs?: boolean;\n noRecurrenceEnd?: boolean;\n urlTitle?: string;\n URL_MAP_FOR_CONTENT?: string;\n recurrenceDaysOfWeek?: string;\n recurrenceInterval?: number;\n urlMap?: string;\n recurrenceDatesToIgnore?: string;\n recurrenceMonthOfYear?: number;\n startDate?: number;\n recurrenceEnd?: number;\n categories?: string;\n image?: string;\n tags?: string;\n}\n\nexport interface DotCMSTemplate {\n iDate: number;\n type: string;\n owner: string;\n inode: string;\n identifier: string;\n source: string;\n title: string;\n friendlyName: string;\n modDate: number;\n modUser: string;\n sortOrder: number;\n showOnMenu: boolean;\n image: string;\n drawed: boolean;\n drawedBody: string;\n theme: string;\n anonymous: boolean;\n template: boolean;\n name: string;\n live: boolean;\n archived: boolean;\n locked: boolean;\n working: boolean;\n permissionId: string;\n versionId: string;\n versionType: string;\n deleted: boolean;\n permissionType: string;\n categoryId: string;\n idate: number;\n new: boolean;\n canEdit: boolean;\n}\n", + "properties": [ + { + "name": "canCreateTemplate", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 9 + }, + { + "name": "containers", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSPageAssetContainer", + "optional": false, + "description": "", + "line": 10 + }, + { + "name": "layout", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSLayout", + "optional": false, + "description": "", + "line": 11 + }, + { + "name": "page", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSPage", + "optional": false, + "description": "", + "line": 12 + }, + { + "name": "site", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSSite", + "optional": false, + "description": "", + "line": 13 + }, + { + "name": "template", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSTemplate", + "optional": false, + "description": "", + "line": 14 + }, + { + "name": "viewAs", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSViewAs", + "optional": false, + "description": "", + "line": 15 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotCMSPageAssetContainer", + "id": "interface-DotCMSPageAssetContainer-8e6a73749c34df0c00155e704df0c63721d0a5c138303ac5f092daa3257a542b81453ec50309883343d0a7dc27171935ef7cb2752699b9e25471a4fe22715ee8", + "file": "libs/dotcms/src/lib/models/DotCMSPage.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotCMSSite } from './DotCMSSite.model';\n\nexport interface DotCMSPageParams {\n url: string;\n language?: string;\n}\n\nexport interface DotCMSPageAsset {\n canCreateTemplate: boolean;\n containers: DotCMSPageAssetContainer;\n layout: DotCMSLayout;\n page: DotCMSPage;\n site: DotCMSSite;\n template: DotCMSTemplate;\n viewAs: DotCMSViewAs;\n}\n\nexport interface DotCMSViewAs {\n language: {\n id: number;\n languageCode: string;\n countryCode: string;\n language: string;\n country: string;\n };\n mode: string;\n}\n\nexport interface DotCMSPageAssetContainer {\n [key: string]: {\n container: DotCMSContainer;\n containerStructures: DotCMSContainerStructure[];\n contentlets: {\n [key: string]: DotCMSContentlet[];\n };\n };\n}\n\nexport interface DotCMSContainerStructure {\n id: string;\n structureId: string;\n containerInode: string;\n containerId: string;\n code: string;\n contentTypeVar: string;\n}\n\nexport interface DotCMSLayout {\n pageWidth: string;\n width: string;\n layout: string;\n title: string;\n header: boolean;\n footer: boolean;\n body: DotPageAssetLayoutBody;\n sidebar: DotPageAssetLayoutSidebar;\n}\n\nexport interface DotPageAssetLayoutSidebar {\n preview: boolean;\n containers: DotCMSContainer[];\n location: string;\n widthPercent: number;\n width: string;\n}\n\nexport interface DotPageAssetLayoutBody {\n rows: DotPageAssetLayoutRow[];\n}\n\nexport interface DotPageAssetLayoutRow {\n identifier: number;\n value?: string;\n id?: string;\n columns: DotPageAssetLayoutColumn[];\n styleClass?: string;\n}\n\nexport interface DotPageAssetLayoutColumn {\n preview: boolean;\n containers: DotCMSContainer[];\n widthPercent: number;\n width: number;\n leftOffset: number;\n left: number;\n styleClass?: string;\n}\n\nexport interface DotCMSPage {\n template: string;\n modDate: number;\n metadata: string;\n cachettl: string;\n pageURI: string;\n title: string;\n type: string;\n showOnMenu: string;\n httpsRequired: boolean;\n inode: string;\n disabledWYSIWYG: any[];\n seokeywords: string;\n host: string;\n lastReview: number;\n working: boolean;\n locked: boolean;\n stInode: string;\n friendlyName: string;\n live: boolean;\n owner: string;\n identifier: string;\n nullProperties: any[];\n friendlyname: string;\n pagemetadata: string;\n languageId: number;\n url: string;\n seodescription: string;\n modUserName: string;\n folder: string;\n deleted: boolean;\n sortOrder: number;\n modUser: string;\n pageUrl: string;\n workingInode: string;\n shortyWorking: string;\n canEdit: boolean;\n canRead: boolean;\n canLock: boolean;\n lockedOn: number;\n lockedBy: string;\n lockedByName: string;\n liveInode: string;\n shortyLive: string;\n}\n\nexport interface DotCMSContainer {\n identifier: string;\n uuid: string;\n iDate: number;\n type: string;\n owner?: string;\n inode: string;\n source: string;\n title: string;\n friendlyName: string;\n modDate: number;\n modUser: string;\n sortOrder: number;\n showOnMenu: boolean;\n code?: string;\n maxContentlets: number;\n useDiv: boolean;\n sortContentletsBy?: string;\n preLoop: string;\n postLoop: string;\n staticify: boolean;\n luceneQuery?: string;\n notes: string;\n languageId?: number;\n path?: string;\n live: boolean;\n locked: boolean;\n working: boolean;\n deleted: boolean;\n name: string;\n archived: boolean;\n permissionId: string;\n versionId: string;\n versionType: string;\n permissionType: string;\n categoryId: string;\n idate: number;\n new: boolean;\n acceptTypes: string;\n contentlets: DotCMSContentlet[];\n}\n\nexport interface DotCMSContentlet {\n owner: string;\n identifier: string;\n hostName: string;\n modDate: number;\n languageId: number;\n body?: string;\n title: string;\n url: string;\n baseType: string;\n inode: string;\n titleImage: string;\n modUserName: string;\n archived: boolean;\n folder: string;\n hasTitleImage: boolean;\n sortOrder: number;\n modUser: string;\n host: string;\n working: boolean;\n locked: boolean;\n stInode: string;\n contentType: string;\n live: boolean;\n code?: string;\n widgetTitle?: string;\n endDate?: number;\n description?: string;\n recurrenceOccurs?: string;\n recurrenceDayOfWeek?: number;\n recurrenceDayOfMonth?: number;\n recurrenceStart?: number;\n recurrenceWeekOfMonth?: number;\n recurs?: boolean;\n noRecurrenceEnd?: boolean;\n urlTitle?: string;\n URL_MAP_FOR_CONTENT?: string;\n recurrenceDaysOfWeek?: string;\n recurrenceInterval?: number;\n urlMap?: string;\n recurrenceDatesToIgnore?: string;\n recurrenceMonthOfYear?: number;\n startDate?: number;\n recurrenceEnd?: number;\n categories?: string;\n image?: string;\n tags?: string;\n}\n\nexport interface DotCMSTemplate {\n iDate: number;\n type: string;\n owner: string;\n inode: string;\n identifier: string;\n source: string;\n title: string;\n friendlyName: string;\n modDate: number;\n modUser: string;\n sortOrder: number;\n showOnMenu: boolean;\n image: string;\n drawed: boolean;\n drawedBody: string;\n theme: string;\n anonymous: boolean;\n template: boolean;\n name: string;\n live: boolean;\n archived: boolean;\n locked: boolean;\n working: boolean;\n permissionId: string;\n versionId: string;\n versionType: string;\n deleted: boolean;\n permissionType: string;\n categoryId: string;\n idate: number;\n new: boolean;\n canEdit: boolean;\n}\n", + "properties": [], + "indexSignatures": [ + { + "id": "index-declaration-8e6a73749c34df0c00155e704df0c63721d0a5c138303ac5f092daa3257a542b81453ec50309883343d0a7dc27171935ef7cb2752699b9e25471a4fe22715ee8", + "args": [ + { + "name": "key", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "returnType": "literal type", + "line": 29, + "deprecated": false, + "deprecationMessage": "" + } + ], + "kind": 175, + "methods": [] + }, + { + "name": "DotCMSPageParams", + "id": "interface-DotCMSPageParams-8e6a73749c34df0c00155e704df0c63721d0a5c138303ac5f092daa3257a542b81453ec50309883343d0a7dc27171935ef7cb2752699b9e25471a4fe22715ee8", + "file": "libs/dotcms/src/lib/models/DotCMSPage.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotCMSSite } from './DotCMSSite.model';\n\nexport interface DotCMSPageParams {\n url: string;\n language?: string;\n}\n\nexport interface DotCMSPageAsset {\n canCreateTemplate: boolean;\n containers: DotCMSPageAssetContainer;\n layout: DotCMSLayout;\n page: DotCMSPage;\n site: DotCMSSite;\n template: DotCMSTemplate;\n viewAs: DotCMSViewAs;\n}\n\nexport interface DotCMSViewAs {\n language: {\n id: number;\n languageCode: string;\n countryCode: string;\n language: string;\n country: string;\n };\n mode: string;\n}\n\nexport interface DotCMSPageAssetContainer {\n [key: string]: {\n container: DotCMSContainer;\n containerStructures: DotCMSContainerStructure[];\n contentlets: {\n [key: string]: DotCMSContentlet[];\n };\n };\n}\n\nexport interface DotCMSContainerStructure {\n id: string;\n structureId: string;\n containerInode: string;\n containerId: string;\n code: string;\n contentTypeVar: string;\n}\n\nexport interface DotCMSLayout {\n pageWidth: string;\n width: string;\n layout: string;\n title: string;\n header: boolean;\n footer: boolean;\n body: DotPageAssetLayoutBody;\n sidebar: DotPageAssetLayoutSidebar;\n}\n\nexport interface DotPageAssetLayoutSidebar {\n preview: boolean;\n containers: DotCMSContainer[];\n location: string;\n widthPercent: number;\n width: string;\n}\n\nexport interface DotPageAssetLayoutBody {\n rows: DotPageAssetLayoutRow[];\n}\n\nexport interface DotPageAssetLayoutRow {\n identifier: number;\n value?: string;\n id?: string;\n columns: DotPageAssetLayoutColumn[];\n styleClass?: string;\n}\n\nexport interface DotPageAssetLayoutColumn {\n preview: boolean;\n containers: DotCMSContainer[];\n widthPercent: number;\n width: number;\n leftOffset: number;\n left: number;\n styleClass?: string;\n}\n\nexport interface DotCMSPage {\n template: string;\n modDate: number;\n metadata: string;\n cachettl: string;\n pageURI: string;\n title: string;\n type: string;\n showOnMenu: string;\n httpsRequired: boolean;\n inode: string;\n disabledWYSIWYG: any[];\n seokeywords: string;\n host: string;\n lastReview: number;\n working: boolean;\n locked: boolean;\n stInode: string;\n friendlyName: string;\n live: boolean;\n owner: string;\n identifier: string;\n nullProperties: any[];\n friendlyname: string;\n pagemetadata: string;\n languageId: number;\n url: string;\n seodescription: string;\n modUserName: string;\n folder: string;\n deleted: boolean;\n sortOrder: number;\n modUser: string;\n pageUrl: string;\n workingInode: string;\n shortyWorking: string;\n canEdit: boolean;\n canRead: boolean;\n canLock: boolean;\n lockedOn: number;\n lockedBy: string;\n lockedByName: string;\n liveInode: string;\n shortyLive: string;\n}\n\nexport interface DotCMSContainer {\n identifier: string;\n uuid: string;\n iDate: number;\n type: string;\n owner?: string;\n inode: string;\n source: string;\n title: string;\n friendlyName: string;\n modDate: number;\n modUser: string;\n sortOrder: number;\n showOnMenu: boolean;\n code?: string;\n maxContentlets: number;\n useDiv: boolean;\n sortContentletsBy?: string;\n preLoop: string;\n postLoop: string;\n staticify: boolean;\n luceneQuery?: string;\n notes: string;\n languageId?: number;\n path?: string;\n live: boolean;\n locked: boolean;\n working: boolean;\n deleted: boolean;\n name: string;\n archived: boolean;\n permissionId: string;\n versionId: string;\n versionType: string;\n permissionType: string;\n categoryId: string;\n idate: number;\n new: boolean;\n acceptTypes: string;\n contentlets: DotCMSContentlet[];\n}\n\nexport interface DotCMSContentlet {\n owner: string;\n identifier: string;\n hostName: string;\n modDate: number;\n languageId: number;\n body?: string;\n title: string;\n url: string;\n baseType: string;\n inode: string;\n titleImage: string;\n modUserName: string;\n archived: boolean;\n folder: string;\n hasTitleImage: boolean;\n sortOrder: number;\n modUser: string;\n host: string;\n working: boolean;\n locked: boolean;\n stInode: string;\n contentType: string;\n live: boolean;\n code?: string;\n widgetTitle?: string;\n endDate?: number;\n description?: string;\n recurrenceOccurs?: string;\n recurrenceDayOfWeek?: number;\n recurrenceDayOfMonth?: number;\n recurrenceStart?: number;\n recurrenceWeekOfMonth?: number;\n recurs?: boolean;\n noRecurrenceEnd?: boolean;\n urlTitle?: string;\n URL_MAP_FOR_CONTENT?: string;\n recurrenceDaysOfWeek?: string;\n recurrenceInterval?: number;\n urlMap?: string;\n recurrenceDatesToIgnore?: string;\n recurrenceMonthOfYear?: number;\n startDate?: number;\n recurrenceEnd?: number;\n categories?: string;\n image?: string;\n tags?: string;\n}\n\nexport interface DotCMSTemplate {\n iDate: number;\n type: string;\n owner: string;\n inode: string;\n identifier: string;\n source: string;\n title: string;\n friendlyName: string;\n modDate: number;\n modUser: string;\n sortOrder: number;\n showOnMenu: boolean;\n image: string;\n drawed: boolean;\n drawedBody: string;\n theme: string;\n anonymous: boolean;\n template: boolean;\n name: string;\n live: boolean;\n archived: boolean;\n locked: boolean;\n working: boolean;\n permissionId: string;\n versionId: string;\n versionType: string;\n deleted: boolean;\n permissionType: string;\n categoryId: string;\n idate: number;\n new: boolean;\n canEdit: boolean;\n}\n", + "properties": [ + { + "name": "language", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 5 + }, + { + "name": "url", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 4 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotCMSPersonalizedItem", + "id": "interface-DotCMSPersonalizedItem-e1c4704f93209f7efcdb19670f83827d0cb06163873df7d917ae1c3ca8bc94f9a91cd64f85d17bb5dbb958cab920004e636a7c53e659b1f533743e3f437d38dd", + "file": "apps/dotcms-ui/src/app/api/services/dot-personalize/dot-personalize.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Injectable } from '@angular/core';\nimport { CoreWebService } from '@dotcms/dotcms-js';\nimport { Observable } from 'rxjs';\nimport { pluck } from 'rxjs/operators';\n\nexport interface DotCMSPersonalizedItem {\n relationType: string;\n treeOrder: number;\n personalization: string;\n container: string;\n contentlet: string;\n htmlPage: string;\n}\n\n@Injectable()\nexport class DotPersonalizeService {\n constructor(private coreWebService: CoreWebService) {}\n\n /**\n * Set a personalized page for the persona passed\n *\n * @param {string} pageId\n * @param {string} personaTag\n * @returns {Observable}\n * @memberof DotPersonalizeService\n */\n personalized(pageId: string, personaTag: string): Observable {\n return this.coreWebService\n .requestView({\n method: 'POST',\n url: `/api/v1/personalization/pagepersonas`,\n body: {\n pageId,\n personaTag\n }\n })\n .pipe(pluck('entity'));\n }\n\n /**\n * Remove the personalization of the page for the persona passed\n *\n * @param {string} pageId\n * @param {string} personaTag\n * @returns {Observable}\n * @memberof DotPersonalizeService\n */\n despersonalized(pageId: string, personaTag: string): Observable {\n return this.coreWebService\n .requestView({\n method: 'DELETE',\n url: `/api/v1/personalization/pagepersonas/page/${pageId}/personalization/${personaTag}`\n })\n .pipe(pluck('entity'));\n }\n}\n", + "properties": [ + { + "name": "container", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 10 + }, + { + "name": "contentlet", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 11 + }, + { + "name": "htmlPage", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 12 + }, + { + "name": "personalization", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 9 + }, + { + "name": "relationType", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 7 + }, + { + "name": "treeOrder", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 8 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotCMSResponse", + "id": "interface-DotCMSResponse-40ae8ada9d57dc6cf3e813a8895469d7bb40d4348e08ac03d2d0301a9bd07bd61e7ea203faf51d0bd9efc70b6537e386db94ddc656c0a9b29661e6d123e9d06a", + "file": "libs/dotcms-js/src/lib/core/core-web.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Injectable } from '@angular/core';\nimport { Subject, Observable, throwError } from 'rxjs';\nimport { map, catchError, filter } from 'rxjs/operators';\n\nimport {\n CwError,\n NETWORK_CONNECTION_ERROR,\n UNKNOWN_RESPONSE_ERROR,\n CLIENTS_ONLY_MESSAGES,\n SERVER_RESPONSE_ERROR\n} from './util/http-response-util';\nimport { ResponseView } from './util/response-view';\nimport { LoggerService } from './logger.service';\nimport { HttpCode } from './util/http-code';\nimport { Router } from '@angular/router';\nimport {\n HttpClient,\n HttpRequest,\n HttpHeaders,\n HttpParams,\n HttpResponse,\n HttpEventType,\n HttpEvent,\n HttpErrorResponse\n} from '@angular/common/http';\n\nexport interface DotCMSResponse {\n contentlets?: T;\n entity?: T;\n tempFiles?: T; // /api/v1/temp don't have entity\n errors: string[];\n i18nMessagesMap: { [key: string]: string };\n messages: string[];\n permissions: string[];\n}\n\nexport interface DotRequestOptionsArgs {\n url: string;\n body?:\n | {\n [key: string]: any;\n }\n | string;\n method?: string;\n params?: {\n [key: string]: any;\n };\n headers?: {\n [key: string]: any;\n };\n}\n\n@Injectable()\nexport class CoreWebService {\n private httpErrosSubjects: Subject[] = [];\n\n constructor(\n private loggerService: LoggerService,\n private router: Router,\n private http: HttpClient\n ) {}\n\n /**\n *\n * Request data from dotCMS endpoints\n *\n * @template T\n * @param {DotRequestOptionsArgs} options\n * @return {*} {Observable>}\n * @memberof CoreWebService\n * @deprecated\n */\n request(options: DotRequestOptionsArgs): Observable> {\n if (!options.method) {\n options.method = 'GET';\n }\n\n const request = this.getRequestOpts(options);\n const source = options.body;\n\n return this.http.request(request).pipe(\n filter(\n (event: HttpEvent> | any>) =>\n event.type === HttpEventType.Response\n ),\n map((resp: HttpResponse>) => {\n // some endpoints have empty body.\n try {\n return resp.body;\n } catch (error) {\n return resp;\n }\n }),\n catchError(\n (response: HttpErrorResponse, _original: Observable): Observable => {\n if (response) {\n this.emitHttpError(response.status);\n\n if (\n response.status === HttpCode.SERVER_ERROR ||\n response.status === HttpCode.FORBIDDEN\n ) {\n if (\n response.statusText &&\n response.statusText.indexOf('ECONNREFUSED') >= 0\n ) {\n throw new CwError(\n NETWORK_CONNECTION_ERROR,\n CLIENTS_ONLY_MESSAGES[NETWORK_CONNECTION_ERROR],\n request,\n response,\n source\n );\n } else {\n throw new CwError(\n SERVER_RESPONSE_ERROR,\n response.error.message,\n request,\n response,\n source\n );\n }\n } else if (response.status === HttpCode.NOT_FOUND) {\n this.loggerService.error(\n 'Could not execute request: 404 path not valid.',\n options.url\n );\n throw new CwError(\n UNKNOWN_RESPONSE_ERROR,\n response.headers.get('error-message'),\n request,\n response,\n source\n );\n }\n }\n return null;\n }\n )\n );\n }\n\n /**\n * Return a response adapted to the follow json format:\n *\n * \n * {\n * \"errors\":[],\n * \"entity\":{},\n * \"messages\":[],\n * \"i18nMessagesMap\":{}\n * }\n * \n *\n * @RequestOptionsArgs options\n * @returns Observable\n */\n requestView(options: DotRequestOptionsArgs): Observable> {\n if (!options.method) {\n options.method = 'GET';\n }\n\n let request;\n\n if (options.body) {\n if (typeof options.body === 'string') {\n request = this.getRequestOpts(options);\n } else {\n request = this.getRequestOpts<{ [key: string]: any }>(options);\n }\n } else {\n request = this.getRequestOpts(options);\n }\n\n return this.http.request(request).pipe(\n filter(\n (event: HttpEvent> | any>) =>\n event.type === HttpEventType.Response\n ),\n map((resp: HttpResponse>) => {\n if (resp.body && resp.body.errors && resp.body.errors.length > 0) {\n return this.handleRequestViewErrors(resp);\n } else {\n return new ResponseView(resp);\n }\n }),\n catchError((err: HttpErrorResponse) => {\n this.emitHttpError(err.status);\n return throwError(this.handleResponseHttpErrors(err));\n })\n );\n }\n\n /**\n * Emit to the subscriber when the request fail\n *\n * @param {number} httpErrorCode\n * @returns {Observable}\n * @memberof CoreWebService\n */\n subscribeToHttpError(httpErrorCode: number): Observable {\n if (!this.httpErrosSubjects[httpErrorCode]) {\n this.httpErrosSubjects[httpErrorCode] = new Subject();\n }\n\n return this.httpErrosSubjects[httpErrorCode].asObservable();\n }\n\n private handleRequestViewErrors(resp: HttpResponse>): ResponseView {\n if (resp.status === 401) {\n this.router.navigate(['/public/login']);\n }\n\n return new ResponseView(resp);\n }\n\n private handleResponseHttpErrors(resp: HttpErrorResponse): HttpErrorResponse {\n if (resp.status === 401) {\n this.router.navigate(['/public/login']);\n }\n\n return resp;\n }\n\n private emitHttpError(status: number): void {\n if (this.httpErrosSubjects[status]) {\n this.httpErrosSubjects[status].next();\n }\n }\n\n private getRequestOpts(options: DotRequestOptionsArgs): HttpRequest {\n const headers = this.getHttpHeaders(options.headers);\n const params = this.getHttpParams(options.params);\n const url = this.getFixedUrl(options.url);\n const body = options.body || null;\n\n if (\n options.method === 'POST' ||\n options.method === 'PUT' ||\n options.method === 'PATCH' ||\n options.method === 'DELETE'\n ) {\n return new HttpRequest(options.method, url, body, {\n headers,\n params\n });\n }\n\n const method = <'GET' | 'HEAD' | 'JSONP' | 'OPTIONS'>options.method;\n return new HttpRequest(method, url, {\n headers,\n params\n });\n }\n\n private getHttpHeaders(headers: { [key: string]: string }): HttpHeaders {\n let httpHeaders = this.getDefaultRequestHeaders();\n\n if (headers && Object.keys(headers).length) {\n Object.keys(headers).forEach((key) => {\n httpHeaders = httpHeaders.set(key, headers[key]);\n });\n\n // If Content-Type == 'multipart/form-data' we need to remove Content-Type,\n // otherwise \"boundary\" will not be added to Content-Type in the Header\n if (headers['Content-Type'] === 'multipart/form-data') {\n httpHeaders = httpHeaders.delete('Content-Type');\n }\n }\n return httpHeaders;\n }\n\n private getFixedUrl(url: string): string {\n if (url?.startsWith('api')) {\n return `/${url}`;\n }\n\n const version = url ? url.split('/')[0] : '';\n if (version.match(/v[1-9]/g)) {\n return `/api/${url}`;\n }\n return url;\n }\n\n private getHttpParams(params: { [key: string]: any }): HttpParams {\n if (params && Object.keys(params).length) {\n let httpParams = new HttpParams();\n\n Object.keys(params).forEach((key: string) => {\n httpParams = httpParams.set(key, params[key]);\n });\n return httpParams;\n }\n\n return null;\n }\n\n private getDefaultRequestHeaders(): HttpHeaders {\n const headers = new HttpHeaders()\n .set('Accept', '*/*')\n .set('Content-Type', 'application/json');\n return headers;\n }\n}\n", + "properties": [ + { + "name": "contentlets", + "deprecated": false, + "deprecationMessage": "", + "type": "T", + "optional": true, + "description": "", + "line": 28 + }, + { + "name": "entity", + "deprecated": false, + "deprecationMessage": "", + "type": "T", + "optional": true, + "description": "", + "line": 29 + }, + { + "name": "errors", + "deprecated": false, + "deprecationMessage": "", + "type": "string[]", + "optional": false, + "description": "", + "line": 31 + }, + { + "name": "i18nMessagesMap", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": false, + "description": "", + "line": 32 + }, + { + "name": "messages", + "deprecated": false, + "deprecationMessage": "", + "type": "string[]", + "optional": false, + "description": "", + "line": 33 + }, + { + "name": "permissions", + "deprecated": false, + "deprecationMessage": "", + "type": "string[]", + "optional": false, + "description": "", + "line": 34 + }, + { + "name": "tempFiles", + "deprecated": false, + "deprecationMessage": "", + "type": "T", + "optional": true, + "description": "", + "line": 30 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotCMSSite", + "id": "interface-DotCMSSite-a9756a2ccd1d2a7741bacf7c6f1ed834f49c9e525f0c3d263e73d3756615e0365110bcc7e0a7722297125a87dc443e26aed19ccffb0d1659ac2aa88b96fd8234", + "file": "libs/dotcms/src/lib/models/DotCMSSite.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotCMSSite {\n lowIndexPriority: boolean;\n name: string;\n default: boolean;\n aliases: string;\n parent: boolean;\n tagStorage: string;\n systemHost: boolean;\n inode: string;\n versionType: string;\n structureInode: string;\n hostname: string;\n hostThumbnail?: any;\n owner: string;\n permissionId: string;\n permissionType: string;\n type: string;\n identifier: string;\n modDate: number;\n host: string;\n live: boolean;\n indexPolicy: string;\n categoryId: string;\n actionId?: any;\n new: boolean;\n archived: boolean;\n locked: boolean;\n disabledWysiwyg: any[];\n modUser: string;\n working: boolean;\n titleImage: {\n present: boolean;\n };\n folder: string;\n htmlpage: boolean;\n fileAsset: boolean;\n vanityUrl: boolean;\n keyValue: boolean;\n structure?: DotCMSSiteStructure;\n title: string;\n languageId: number;\n indexPolicyDependencies: string;\n contentTypeId: string;\n versionId: string;\n lastReview: number;\n nextReview?: any;\n reviewInterval?: any;\n sortOrder: number;\n contentType: DotCMSSiteContentType;\n}\n\ninterface DotCMSSiteContentType {\n owner?: any;\n parentPermissionable: DotCMSSiteParentPermissionable;\n permissionId: string;\n permissionType: string;\n}\n\ninterface DotCMSSiteParentPermissionable {\n Inode: string;\n Identifier: string;\n permissionByIdentifier: boolean;\n type: string;\n owner?: any;\n identifier: string;\n permissionId: string;\n parentPermissionable?: any;\n permissionType: string;\n inode: string;\n childrenPermissionable?: any;\n}\n\ninterface DotCMSSiteStructure {\n iDate: number;\n type: string;\n owner?: any;\n inode: string;\n identifier: string;\n name: string;\n description: string;\n defaultStructure: boolean;\n reviewInterval?: any;\n reviewerRole?: any;\n pagedetail?: any;\n structureType: number;\n fixed: boolean;\n system: boolean;\n velocityVarName: string;\n urlMapPattern?: any;\n host: string;\n folder: string;\n publishDateVar?: any;\n expireDateVar?: any;\n modDate: number;\n fields: DotCMSSiteField[];\n widget: boolean;\n detailPage?: any;\n fieldsBySortOrder: DotCMSSiteField[];\n form: boolean;\n htmlpageAsset: boolean;\n content: boolean;\n fileAsset: boolean;\n persona: boolean;\n permissionId: string;\n permissionType: string;\n live: boolean;\n categoryId: string;\n idate: number;\n new: boolean;\n archived: boolean;\n locked: boolean;\n modUser: string;\n working: boolean;\n title: string;\n versionId: string;\n versionType: string;\n}\n\ninterface DotCMSSiteField {\n iDate: number;\n type: string;\n owner?: any;\n inode: string;\n identifier: string;\n structureInode: string;\n fieldName: string;\n fieldType: string;\n fieldRelationType?: any;\n fieldContentlet: string;\n required: boolean;\n velocityVarName: string;\n sortOrder: number;\n values?: any;\n regexCheck?: any;\n hint?: any;\n defaultValue?: any;\n indexed: boolean;\n listed: boolean;\n fixed: boolean;\n readOnly: boolean;\n searchable: boolean;\n unique: boolean;\n modDate: number;\n dataType: string;\n live: boolean;\n categoryId: string;\n idate: number;\n new: boolean;\n archived: boolean;\n locked: boolean;\n modUser: string;\n working: boolean;\n permissionId: string;\n parentPermissionable?: any;\n permissionType: string;\n title: string;\n versionId: string;\n versionType: string;\n}\n", + "properties": [ + { + "name": "actionId", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": true, + "description": "", + "line": 24 + }, + { + "name": "aliases", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 5 + }, + { + "name": "archived", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 26 + }, + { + "name": "categoryId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 23 + }, + { + "name": "contentType", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSSiteContentType", + "optional": false, + "description": "", + "line": 49 + }, + { + "name": "contentTypeId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 43 + }, + { + "name": "default", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 4 + }, + { + "name": "disabledWysiwyg", + "deprecated": false, + "deprecationMessage": "", + "type": "any[]", + "optional": false, + "description": "", + "line": 28 + }, + { + "name": "fileAsset", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 36 + }, + { + "name": "folder", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 34 + }, + { + "name": "host", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 20 + }, + { + "name": "hostname", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 12 + }, + { + "name": "hostThumbnail", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": true, + "description": "", + "line": 13 + }, + { + "name": "htmlpage", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 35 + }, + { + "name": "identifier", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 18 + }, + { + "name": "indexPolicy", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 22 + }, + { + "name": "indexPolicyDependencies", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 42 + }, + { + "name": "inode", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 9 + }, + { + "name": "keyValue", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 38 + }, + { + "name": "languageId", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 41 + }, + { + "name": "lastReview", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 45 + }, + { + "name": "live", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 21 + }, + { + "name": "locked", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 27 + }, + { + "name": "lowIndexPriority", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 2 + }, + { + "name": "modDate", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 19 + }, + { + "name": "modUser", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 29 + }, + { + "name": "name", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 3 + }, + { + "name": "new", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 25 + }, + { + "name": "nextReview", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": true, + "description": "", + "line": 46 + }, + { + "name": "owner", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 14 + }, + { + "name": "parent", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 6 + }, + { + "name": "permissionId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 15 + }, + { + "name": "permissionType", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 16 + }, + { + "name": "reviewInterval", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": true, + "description": "", + "line": 47 + }, + { + "name": "sortOrder", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 48 + }, + { + "name": "structure", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSSiteStructure", + "optional": true, + "description": "", + "line": 39 + }, + { + "name": "structureInode", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 11 + }, + { + "name": "systemHost", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 8 + }, + { + "name": "tagStorage", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 7 + }, + { + "name": "title", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 40 + }, + { + "name": "titleImage", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": false, + "description": "", + "line": 31 + }, + { + "name": "type", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 17 + }, + { + "name": "vanityUrl", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 37 + }, + { + "name": "versionId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 44 + }, + { + "name": "versionType", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 10 + }, + { + "name": "working", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 30 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotCMSSiteContentType", + "id": "interface-DotCMSSiteContentType-a9756a2ccd1d2a7741bacf7c6f1ed834f49c9e525f0c3d263e73d3756615e0365110bcc7e0a7722297125a87dc443e26aed19ccffb0d1659ac2aa88b96fd8234", + "file": "libs/dotcms/src/lib/models/DotCMSSite.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotCMSSite {\n lowIndexPriority: boolean;\n name: string;\n default: boolean;\n aliases: string;\n parent: boolean;\n tagStorage: string;\n systemHost: boolean;\n inode: string;\n versionType: string;\n structureInode: string;\n hostname: string;\n hostThumbnail?: any;\n owner: string;\n permissionId: string;\n permissionType: string;\n type: string;\n identifier: string;\n modDate: number;\n host: string;\n live: boolean;\n indexPolicy: string;\n categoryId: string;\n actionId?: any;\n new: boolean;\n archived: boolean;\n locked: boolean;\n disabledWysiwyg: any[];\n modUser: string;\n working: boolean;\n titleImage: {\n present: boolean;\n };\n folder: string;\n htmlpage: boolean;\n fileAsset: boolean;\n vanityUrl: boolean;\n keyValue: boolean;\n structure?: DotCMSSiteStructure;\n title: string;\n languageId: number;\n indexPolicyDependencies: string;\n contentTypeId: string;\n versionId: string;\n lastReview: number;\n nextReview?: any;\n reviewInterval?: any;\n sortOrder: number;\n contentType: DotCMSSiteContentType;\n}\n\ninterface DotCMSSiteContentType {\n owner?: any;\n parentPermissionable: DotCMSSiteParentPermissionable;\n permissionId: string;\n permissionType: string;\n}\n\ninterface DotCMSSiteParentPermissionable {\n Inode: string;\n Identifier: string;\n permissionByIdentifier: boolean;\n type: string;\n owner?: any;\n identifier: string;\n permissionId: string;\n parentPermissionable?: any;\n permissionType: string;\n inode: string;\n childrenPermissionable?: any;\n}\n\ninterface DotCMSSiteStructure {\n iDate: number;\n type: string;\n owner?: any;\n inode: string;\n identifier: string;\n name: string;\n description: string;\n defaultStructure: boolean;\n reviewInterval?: any;\n reviewerRole?: any;\n pagedetail?: any;\n structureType: number;\n fixed: boolean;\n system: boolean;\n velocityVarName: string;\n urlMapPattern?: any;\n host: string;\n folder: string;\n publishDateVar?: any;\n expireDateVar?: any;\n modDate: number;\n fields: DotCMSSiteField[];\n widget: boolean;\n detailPage?: any;\n fieldsBySortOrder: DotCMSSiteField[];\n form: boolean;\n htmlpageAsset: boolean;\n content: boolean;\n fileAsset: boolean;\n persona: boolean;\n permissionId: string;\n permissionType: string;\n live: boolean;\n categoryId: string;\n idate: number;\n new: boolean;\n archived: boolean;\n locked: boolean;\n modUser: string;\n working: boolean;\n title: string;\n versionId: string;\n versionType: string;\n}\n\ninterface DotCMSSiteField {\n iDate: number;\n type: string;\n owner?: any;\n inode: string;\n identifier: string;\n structureInode: string;\n fieldName: string;\n fieldType: string;\n fieldRelationType?: any;\n fieldContentlet: string;\n required: boolean;\n velocityVarName: string;\n sortOrder: number;\n values?: any;\n regexCheck?: any;\n hint?: any;\n defaultValue?: any;\n indexed: boolean;\n listed: boolean;\n fixed: boolean;\n readOnly: boolean;\n searchable: boolean;\n unique: boolean;\n modDate: number;\n dataType: string;\n live: boolean;\n categoryId: string;\n idate: number;\n new: boolean;\n archived: boolean;\n locked: boolean;\n modUser: string;\n working: boolean;\n permissionId: string;\n parentPermissionable?: any;\n permissionType: string;\n title: string;\n versionId: string;\n versionType: string;\n}\n", + "properties": [ + { + "name": "owner", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": true, + "description": "", + "line": 53 + }, + { + "name": "parentPermissionable", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSSiteParentPermissionable", + "optional": false, + "description": "", + "line": 54 + }, + { + "name": "permissionId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 55 + }, + { + "name": "permissionType", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 56 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotCMSSiteField", + "id": "interface-DotCMSSiteField-a9756a2ccd1d2a7741bacf7c6f1ed834f49c9e525f0c3d263e73d3756615e0365110bcc7e0a7722297125a87dc443e26aed19ccffb0d1659ac2aa88b96fd8234", + "file": "libs/dotcms/src/lib/models/DotCMSSite.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotCMSSite {\n lowIndexPriority: boolean;\n name: string;\n default: boolean;\n aliases: string;\n parent: boolean;\n tagStorage: string;\n systemHost: boolean;\n inode: string;\n versionType: string;\n structureInode: string;\n hostname: string;\n hostThumbnail?: any;\n owner: string;\n permissionId: string;\n permissionType: string;\n type: string;\n identifier: string;\n modDate: number;\n host: string;\n live: boolean;\n indexPolicy: string;\n categoryId: string;\n actionId?: any;\n new: boolean;\n archived: boolean;\n locked: boolean;\n disabledWysiwyg: any[];\n modUser: string;\n working: boolean;\n titleImage: {\n present: boolean;\n };\n folder: string;\n htmlpage: boolean;\n fileAsset: boolean;\n vanityUrl: boolean;\n keyValue: boolean;\n structure?: DotCMSSiteStructure;\n title: string;\n languageId: number;\n indexPolicyDependencies: string;\n contentTypeId: string;\n versionId: string;\n lastReview: number;\n nextReview?: any;\n reviewInterval?: any;\n sortOrder: number;\n contentType: DotCMSSiteContentType;\n}\n\ninterface DotCMSSiteContentType {\n owner?: any;\n parentPermissionable: DotCMSSiteParentPermissionable;\n permissionId: string;\n permissionType: string;\n}\n\ninterface DotCMSSiteParentPermissionable {\n Inode: string;\n Identifier: string;\n permissionByIdentifier: boolean;\n type: string;\n owner?: any;\n identifier: string;\n permissionId: string;\n parentPermissionable?: any;\n permissionType: string;\n inode: string;\n childrenPermissionable?: any;\n}\n\ninterface DotCMSSiteStructure {\n iDate: number;\n type: string;\n owner?: any;\n inode: string;\n identifier: string;\n name: string;\n description: string;\n defaultStructure: boolean;\n reviewInterval?: any;\n reviewerRole?: any;\n pagedetail?: any;\n structureType: number;\n fixed: boolean;\n system: boolean;\n velocityVarName: string;\n urlMapPattern?: any;\n host: string;\n folder: string;\n publishDateVar?: any;\n expireDateVar?: any;\n modDate: number;\n fields: DotCMSSiteField[];\n widget: boolean;\n detailPage?: any;\n fieldsBySortOrder: DotCMSSiteField[];\n form: boolean;\n htmlpageAsset: boolean;\n content: boolean;\n fileAsset: boolean;\n persona: boolean;\n permissionId: string;\n permissionType: string;\n live: boolean;\n categoryId: string;\n idate: number;\n new: boolean;\n archived: boolean;\n locked: boolean;\n modUser: string;\n working: boolean;\n title: string;\n versionId: string;\n versionType: string;\n}\n\ninterface DotCMSSiteField {\n iDate: number;\n type: string;\n owner?: any;\n inode: string;\n identifier: string;\n structureInode: string;\n fieldName: string;\n fieldType: string;\n fieldRelationType?: any;\n fieldContentlet: string;\n required: boolean;\n velocityVarName: string;\n sortOrder: number;\n values?: any;\n regexCheck?: any;\n hint?: any;\n defaultValue?: any;\n indexed: boolean;\n listed: boolean;\n fixed: boolean;\n readOnly: boolean;\n searchable: boolean;\n unique: boolean;\n modDate: number;\n dataType: string;\n live: boolean;\n categoryId: string;\n idate: number;\n new: boolean;\n archived: boolean;\n locked: boolean;\n modUser: string;\n working: boolean;\n permissionId: string;\n parentPermissionable?: any;\n permissionType: string;\n title: string;\n versionId: string;\n versionType: string;\n}\n", + "properties": [ + { + "name": "archived", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 149 + }, + { + "name": "categoryId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 146 + }, + { + "name": "dataType", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 144 + }, + { + "name": "defaultValue", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": true, + "description": "", + "line": 136 + }, + { + "name": "fieldContentlet", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 129 + }, + { + "name": "fieldName", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 126 + }, + { + "name": "fieldRelationType", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": true, + "description": "", + "line": 128 + }, + { + "name": "fieldType", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 127 + }, + { + "name": "fixed", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 139 + }, + { + "name": "hint", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": true, + "description": "", + "line": 135 + }, + { + "name": "idate", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 147 + }, + { + "name": "iDate", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 120 + }, + { + "name": "identifier", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 124 + }, + { + "name": "indexed", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 137 + }, + { + "name": "inode", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 123 + }, + { + "name": "listed", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 138 + }, + { + "name": "live", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 145 + }, + { + "name": "locked", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 150 + }, + { + "name": "modDate", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 143 + }, + { + "name": "modUser", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 151 + }, + { + "name": "new", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 148 + }, + { + "name": "owner", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": true, + "description": "", + "line": 122 + }, + { + "name": "parentPermissionable", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": true, + "description": "", + "line": 154 + }, + { + "name": "permissionId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 153 + }, + { + "name": "permissionType", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 155 + }, + { + "name": "readOnly", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 140 + }, + { + "name": "regexCheck", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": true, + "description": "", + "line": 134 + }, + { + "name": "required", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 130 + }, + { + "name": "searchable", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 141 + }, + { + "name": "sortOrder", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 132 + }, + { + "name": "structureInode", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 125 + }, + { + "name": "title", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 156 + }, + { + "name": "type", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 121 + }, + { + "name": "unique", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 142 + }, + { + "name": "values", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": true, + "description": "", + "line": 133 + }, + { + "name": "velocityVarName", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 131 + }, + { + "name": "versionId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 157 + }, + { + "name": "versionType", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 158 + }, + { + "name": "working", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 152 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotCMSSiteParentPermissionable", + "id": "interface-DotCMSSiteParentPermissionable-a9756a2ccd1d2a7741bacf7c6f1ed834f49c9e525f0c3d263e73d3756615e0365110bcc7e0a7722297125a87dc443e26aed19ccffb0d1659ac2aa88b96fd8234", + "file": "libs/dotcms/src/lib/models/DotCMSSite.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotCMSSite {\n lowIndexPriority: boolean;\n name: string;\n default: boolean;\n aliases: string;\n parent: boolean;\n tagStorage: string;\n systemHost: boolean;\n inode: string;\n versionType: string;\n structureInode: string;\n hostname: string;\n hostThumbnail?: any;\n owner: string;\n permissionId: string;\n permissionType: string;\n type: string;\n identifier: string;\n modDate: number;\n host: string;\n live: boolean;\n indexPolicy: string;\n categoryId: string;\n actionId?: any;\n new: boolean;\n archived: boolean;\n locked: boolean;\n disabledWysiwyg: any[];\n modUser: string;\n working: boolean;\n titleImage: {\n present: boolean;\n };\n folder: string;\n htmlpage: boolean;\n fileAsset: boolean;\n vanityUrl: boolean;\n keyValue: boolean;\n structure?: DotCMSSiteStructure;\n title: string;\n languageId: number;\n indexPolicyDependencies: string;\n contentTypeId: string;\n versionId: string;\n lastReview: number;\n nextReview?: any;\n reviewInterval?: any;\n sortOrder: number;\n contentType: DotCMSSiteContentType;\n}\n\ninterface DotCMSSiteContentType {\n owner?: any;\n parentPermissionable: DotCMSSiteParentPermissionable;\n permissionId: string;\n permissionType: string;\n}\n\ninterface DotCMSSiteParentPermissionable {\n Inode: string;\n Identifier: string;\n permissionByIdentifier: boolean;\n type: string;\n owner?: any;\n identifier: string;\n permissionId: string;\n parentPermissionable?: any;\n permissionType: string;\n inode: string;\n childrenPermissionable?: any;\n}\n\ninterface DotCMSSiteStructure {\n iDate: number;\n type: string;\n owner?: any;\n inode: string;\n identifier: string;\n name: string;\n description: string;\n defaultStructure: boolean;\n reviewInterval?: any;\n reviewerRole?: any;\n pagedetail?: any;\n structureType: number;\n fixed: boolean;\n system: boolean;\n velocityVarName: string;\n urlMapPattern?: any;\n host: string;\n folder: string;\n publishDateVar?: any;\n expireDateVar?: any;\n modDate: number;\n fields: DotCMSSiteField[];\n widget: boolean;\n detailPage?: any;\n fieldsBySortOrder: DotCMSSiteField[];\n form: boolean;\n htmlpageAsset: boolean;\n content: boolean;\n fileAsset: boolean;\n persona: boolean;\n permissionId: string;\n permissionType: string;\n live: boolean;\n categoryId: string;\n idate: number;\n new: boolean;\n archived: boolean;\n locked: boolean;\n modUser: string;\n working: boolean;\n title: string;\n versionId: string;\n versionType: string;\n}\n\ninterface DotCMSSiteField {\n iDate: number;\n type: string;\n owner?: any;\n inode: string;\n identifier: string;\n structureInode: string;\n fieldName: string;\n fieldType: string;\n fieldRelationType?: any;\n fieldContentlet: string;\n required: boolean;\n velocityVarName: string;\n sortOrder: number;\n values?: any;\n regexCheck?: any;\n hint?: any;\n defaultValue?: any;\n indexed: boolean;\n listed: boolean;\n fixed: boolean;\n readOnly: boolean;\n searchable: boolean;\n unique: boolean;\n modDate: number;\n dataType: string;\n live: boolean;\n categoryId: string;\n idate: number;\n new: boolean;\n archived: boolean;\n locked: boolean;\n modUser: string;\n working: boolean;\n permissionId: string;\n parentPermissionable?: any;\n permissionType: string;\n title: string;\n versionId: string;\n versionType: string;\n}\n", + "properties": [ + { + "name": "childrenPermissionable", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": true, + "description": "", + "line": 70 + }, + { + "name": "identifier", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 65 + }, + { + "name": "Identifier", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 61 + }, + { + "name": "inode", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 69 + }, + { + "name": "Inode", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 60 + }, + { + "name": "owner", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": true, + "description": "", + "line": 64 + }, + { + "name": "parentPermissionable", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": true, + "description": "", + "line": 67 + }, + { + "name": "permissionByIdentifier", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 62 + }, + { + "name": "permissionId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 66 + }, + { + "name": "permissionType", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 68 + }, + { + "name": "type", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 63 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotCMSSiteStructure", + "id": "interface-DotCMSSiteStructure-a9756a2ccd1d2a7741bacf7c6f1ed834f49c9e525f0c3d263e73d3756615e0365110bcc7e0a7722297125a87dc443e26aed19ccffb0d1659ac2aa88b96fd8234", + "file": "libs/dotcms/src/lib/models/DotCMSSite.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotCMSSite {\n lowIndexPriority: boolean;\n name: string;\n default: boolean;\n aliases: string;\n parent: boolean;\n tagStorage: string;\n systemHost: boolean;\n inode: string;\n versionType: string;\n structureInode: string;\n hostname: string;\n hostThumbnail?: any;\n owner: string;\n permissionId: string;\n permissionType: string;\n type: string;\n identifier: string;\n modDate: number;\n host: string;\n live: boolean;\n indexPolicy: string;\n categoryId: string;\n actionId?: any;\n new: boolean;\n archived: boolean;\n locked: boolean;\n disabledWysiwyg: any[];\n modUser: string;\n working: boolean;\n titleImage: {\n present: boolean;\n };\n folder: string;\n htmlpage: boolean;\n fileAsset: boolean;\n vanityUrl: boolean;\n keyValue: boolean;\n structure?: DotCMSSiteStructure;\n title: string;\n languageId: number;\n indexPolicyDependencies: string;\n contentTypeId: string;\n versionId: string;\n lastReview: number;\n nextReview?: any;\n reviewInterval?: any;\n sortOrder: number;\n contentType: DotCMSSiteContentType;\n}\n\ninterface DotCMSSiteContentType {\n owner?: any;\n parentPermissionable: DotCMSSiteParentPermissionable;\n permissionId: string;\n permissionType: string;\n}\n\ninterface DotCMSSiteParentPermissionable {\n Inode: string;\n Identifier: string;\n permissionByIdentifier: boolean;\n type: string;\n owner?: any;\n identifier: string;\n permissionId: string;\n parentPermissionable?: any;\n permissionType: string;\n inode: string;\n childrenPermissionable?: any;\n}\n\ninterface DotCMSSiteStructure {\n iDate: number;\n type: string;\n owner?: any;\n inode: string;\n identifier: string;\n name: string;\n description: string;\n defaultStructure: boolean;\n reviewInterval?: any;\n reviewerRole?: any;\n pagedetail?: any;\n structureType: number;\n fixed: boolean;\n system: boolean;\n velocityVarName: string;\n urlMapPattern?: any;\n host: string;\n folder: string;\n publishDateVar?: any;\n expireDateVar?: any;\n modDate: number;\n fields: DotCMSSiteField[];\n widget: boolean;\n detailPage?: any;\n fieldsBySortOrder: DotCMSSiteField[];\n form: boolean;\n htmlpageAsset: boolean;\n content: boolean;\n fileAsset: boolean;\n persona: boolean;\n permissionId: string;\n permissionType: string;\n live: boolean;\n categoryId: string;\n idate: number;\n new: boolean;\n archived: boolean;\n locked: boolean;\n modUser: string;\n working: boolean;\n title: string;\n versionId: string;\n versionType: string;\n}\n\ninterface DotCMSSiteField {\n iDate: number;\n type: string;\n owner?: any;\n inode: string;\n identifier: string;\n structureInode: string;\n fieldName: string;\n fieldType: string;\n fieldRelationType?: any;\n fieldContentlet: string;\n required: boolean;\n velocityVarName: string;\n sortOrder: number;\n values?: any;\n regexCheck?: any;\n hint?: any;\n defaultValue?: any;\n indexed: boolean;\n listed: boolean;\n fixed: boolean;\n readOnly: boolean;\n searchable: boolean;\n unique: boolean;\n modDate: number;\n dataType: string;\n live: boolean;\n categoryId: string;\n idate: number;\n new: boolean;\n archived: boolean;\n locked: boolean;\n modUser: string;\n working: boolean;\n permissionId: string;\n parentPermissionable?: any;\n permissionType: string;\n title: string;\n versionId: string;\n versionType: string;\n}\n", + "properties": [ + { + "name": "archived", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 110 + }, + { + "name": "categoryId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 107 + }, + { + "name": "content", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 101 + }, + { + "name": "defaultStructure", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 81 + }, + { + "name": "description", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 80 + }, + { + "name": "detailPage", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": true, + "description": "", + "line": 97 + }, + { + "name": "expireDateVar", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": true, + "description": "", + "line": 93 + }, + { + "name": "fields", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSSiteField[]", + "optional": false, + "description": "", + "line": 95 + }, + { + "name": "fieldsBySortOrder", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSSiteField[]", + "optional": false, + "description": "", + "line": 98 + }, + { + "name": "fileAsset", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 102 + }, + { + "name": "fixed", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 86 + }, + { + "name": "folder", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 91 + }, + { + "name": "form", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 99 + }, + { + "name": "host", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 90 + }, + { + "name": "htmlpageAsset", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 100 + }, + { + "name": "idate", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 108 + }, + { + "name": "iDate", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 74 + }, + { + "name": "identifier", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 78 + }, + { + "name": "inode", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 77 + }, + { + "name": "live", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 106 + }, + { + "name": "locked", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 111 + }, + { + "name": "modDate", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 94 + }, + { + "name": "modUser", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 112 + }, + { + "name": "name", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 79 + }, + { + "name": "new", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 109 + }, + { + "name": "owner", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": true, + "description": "", + "line": 76 + }, + { + "name": "pagedetail", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": true, + "description": "", + "line": 84 + }, + { + "name": "permissionId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 104 + }, + { + "name": "permissionType", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 105 + }, + { + "name": "persona", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 103 + }, + { + "name": "publishDateVar", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": true, + "description": "", + "line": 92 + }, + { + "name": "reviewerRole", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": true, + "description": "", + "line": 83 + }, + { + "name": "reviewInterval", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": true, + "description": "", + "line": 82 + }, + { + "name": "structureType", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 85 + }, + { + "name": "system", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 87 + }, + { + "name": "title", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 114 + }, + { + "name": "type", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 75 + }, + { + "name": "urlMapPattern", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": true, + "description": "", + "line": 89 + }, + { + "name": "velocityVarName", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 88 + }, + { + "name": "versionId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 115 + }, + { + "name": "versionType", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 116 + }, + { + "name": "widget", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 96 + }, + { + "name": "working", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 113 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotCMSSystemAction", + "id": "interface-DotCMSSystemAction-a3e7a308832e7c5391515c8a17e05fa98d4cf01205b5eb0304da870493446af9cdd2b8249e78124ff9e29658732de279943c7b21fba173c2da44fd99dcb68384", + "file": "libs/dotcms-models/src/lib/dot-workflow-action.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotCMSContentType } from './dot-content-types.model';\n\nexport interface DotCMSWorkflowActionEvent {\n workflow: DotCMSWorkflowAction;\n callback: string;\n inode: string;\n selectedInodes: string | string[];\n}\n\nexport interface DotCMSWorkflowAction {\n assignable: boolean;\n commentable: boolean;\n condition: string;\n icon: string;\n id: string;\n name: string;\n nextAssign: string;\n nextStep: string;\n nextStepCurrentStep: boolean;\n order: number;\n owner?: string;\n roleHierarchyForAssign: boolean;\n schemeId: string;\n showOn: string[];\n actionInputs: DotCMSWorkflowInput[];\n}\n\nexport enum DotCMSSystemActionType {\n UNPUBLISH = 'UNPUBLISH',\n UNARCHIVE = 'UNARCHIVE',\n PUBLISH = 'PUBLISH',\n NEW = 'NEW',\n EDIT = 'EDIT',\n DESTROY = 'DESTROY',\n DELETE = 'DELETE',\n ARCHIVE = 'ARCHIVE'\n}\n\nexport interface DotCMSSystemActionMappings {\n [key: string]: DotCMSSystemAction | string;\n}\n\nexport interface DotCMSSystemAction {\n identifier: string;\n systemAction: string;\n workflowAction: DotCMSWorkflowAction;\n owner: DotCMSContentType;\n ownerContentType: boolean;\n ownerScheme: boolean;\n}\n\nexport interface DotCMSWorkflowInput {\n id: string;\n body: any;\n}\n", + "properties": [ + { + "name": "identifier", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 44 + }, + { + "name": "owner", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSContentType", + "optional": false, + "description": "", + "line": 47 + }, + { + "name": "ownerContentType", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 48 + }, + { + "name": "ownerScheme", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 49 + }, + { + "name": "systemAction", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 45 + }, + { + "name": "workflowAction", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSWorkflowAction", + "optional": false, + "description": "", + "line": 46 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotCMSSystemActionMappings", + "id": "interface-DotCMSSystemActionMappings-a3e7a308832e7c5391515c8a17e05fa98d4cf01205b5eb0304da870493446af9cdd2b8249e78124ff9e29658732de279943c7b21fba173c2da44fd99dcb68384", + "file": "libs/dotcms-models/src/lib/dot-workflow-action.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotCMSContentType } from './dot-content-types.model';\n\nexport interface DotCMSWorkflowActionEvent {\n workflow: DotCMSWorkflowAction;\n callback: string;\n inode: string;\n selectedInodes: string | string[];\n}\n\nexport interface DotCMSWorkflowAction {\n assignable: boolean;\n commentable: boolean;\n condition: string;\n icon: string;\n id: string;\n name: string;\n nextAssign: string;\n nextStep: string;\n nextStepCurrentStep: boolean;\n order: number;\n owner?: string;\n roleHierarchyForAssign: boolean;\n schemeId: string;\n showOn: string[];\n actionInputs: DotCMSWorkflowInput[];\n}\n\nexport enum DotCMSSystemActionType {\n UNPUBLISH = 'UNPUBLISH',\n UNARCHIVE = 'UNARCHIVE',\n PUBLISH = 'PUBLISH',\n NEW = 'NEW',\n EDIT = 'EDIT',\n DESTROY = 'DESTROY',\n DELETE = 'DELETE',\n ARCHIVE = 'ARCHIVE'\n}\n\nexport interface DotCMSSystemActionMappings {\n [key: string]: DotCMSSystemAction | string;\n}\n\nexport interface DotCMSSystemAction {\n identifier: string;\n systemAction: string;\n workflowAction: DotCMSWorkflowAction;\n owner: DotCMSContentType;\n ownerContentType: boolean;\n ownerScheme: boolean;\n}\n\nexport interface DotCMSWorkflowInput {\n id: string;\n body: any;\n}\n", + "properties": [], + "indexSignatures": [ + { + "id": "index-declaration-a3e7a308832e7c5391515c8a17e05fa98d4cf01205b5eb0304da870493446af9cdd2b8249e78124ff9e29658732de279943c7b21fba173c2da44fd99dcb68384", + "args": [ + { + "name": "key", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "returnType": "DotCMSSystemAction | string", + "line": 39, + "deprecated": false, + "deprecationMessage": "" + } + ], + "kind": 175, + "methods": [] + }, + { + "name": "DotCMSTempFile", + "id": "interface-DotCMSTempFile-38f6e30ca3bb2018afcaa9dd92185a00f3634f426dc138fd43cb22a20185383679fe47ce642003669e91a2107c6b524400fbd2e293d35fbf14fc4da5917ec9ce", + "file": "libs/dotcms-models/src/lib/dot-temp-file.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotCMSTempFile {\n fileName: string;\n folder: string;\n id: string;\n image: boolean;\n length: number;\n mimeType: string;\n referenceUrl: string;\n thumbnailUrl: string;\n}\n", + "properties": [ + { + "name": "fileName", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 7 + }, + { + "name": "folder", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 8 + }, + { + "name": "id", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 9 + }, + { + "name": "image", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 10 + }, + { + "name": "length", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 11 + }, + { + "name": "mimeType", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 12 + }, + { + "name": "referenceUrl", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 13 + }, + { + "name": "thumbnailUrl", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 14 + } + ], + "indexSignatures": [], + "kind": 165, + "description": "

Interface that represent the response of /api/v1/temp, endpoint to upload temporary files.

\n", + "rawdescription": "\n\nInterface that represent the response of /api/v1/temp, endpoint to upload temporary files.\n\n", + "methods": [] + }, + { + "name": "DotCMSTempFile", + "id": "interface-DotCMSTempFile-5d35a8500f6765444d2da18df2f7d1457a3d165c249719323c3e8cce8f6df31546c30cfd5266a34381ce5c9577c683b165bf181683fc4a503d99f079660a6db4-1", + "file": "apps/dotcms-ui/src/app/api/services/dot-temp-file-upload/dot-temp-file-upload.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { HttpErrorResponse } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { DotHttpErrorManagerService } from '@services/dot-http-error-manager/dot-http-error-manager.service';\nimport { CoreWebService } from '@dotcms/dotcms-js';\nimport { Observable } from 'rxjs';\nimport { pluck, catchError, take, map } from 'rxjs/operators';\n\nexport interface DotCMSTempFile {\n fileName: string;\n folder: string;\n id: string;\n image: boolean;\n length: number;\n mimeType: string;\n referenceUrl: string;\n thumbnailUrl: string;\n}\n\n@Injectable()\nexport class DotTempFileUploadService {\n constructor(\n private coreWebService: CoreWebService,\n private dotHttpErrorManagerService: DotHttpErrorManagerService\n ) {}\n\n /**\n * Upload file to the dotcms temp service\n *\n * @param {(File | string)} file\n * @returns {(Observable)}\n * @memberof DotTempFileUploadService\n */\n upload(file: File | string): Observable {\n if (typeof file === 'string') {\n return this.uploadByUrl(file);\n }\n\n return this.uploadByFile(file);\n }\n\n private uploadByFile(file: File): Observable {\n const formData = new FormData();\n formData.append('file', file);\n\n return this.coreWebService\n .requestView({\n url: `/api/v1/temp`,\n body: formData,\n headers: { 'Content-Type': 'multipart/form-data' },\n method: 'POST'\n })\n .pipe(\n pluck('tempFiles'),\n catchError((error: HttpErrorResponse) => this.handleError(error))\n );\n }\n\n private uploadByUrl(file: string): Observable {\n return this.coreWebService\n .requestView({\n url: `/api/v1/temp/byUrl`,\n body: {\n remoteUrl: file\n },\n headers: {\n 'Content-Type': 'application/json'\n },\n method: 'POST'\n })\n .pipe(\n pluck('tempFiles'),\n catchError((error: HttpErrorResponse) => this.handleError(error))\n );\n }\n\n private handleError(error: HttpErrorResponse) {\n return this.dotHttpErrorManagerService.handle(error).pipe(\n take(1),\n map((err) => err.status.toString())\n );\n }\n}\n", + "properties": [ + { + "name": "fileName", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 9 + }, + { + "name": "folder", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 10 + }, + { + "name": "id", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 11 + }, + { + "name": "image", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 12 + }, + { + "name": "length", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 13 + }, + { + "name": "mimeType", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 14 + }, + { + "name": "referenceUrl", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 15 + }, + { + "name": "thumbnailUrl", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 16 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [], + "isDuplicate": true, + "duplicateId": 1, + "duplicateName": "DotCMSTempFile-1" + }, + { + "name": "DotCMSTemplate", + "id": "interface-DotCMSTemplate-8e6a73749c34df0c00155e704df0c63721d0a5c138303ac5f092daa3257a542b81453ec50309883343d0a7dc27171935ef7cb2752699b9e25471a4fe22715ee8", + "file": "libs/dotcms/src/lib/models/DotCMSPage.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotCMSSite } from './DotCMSSite.model';\n\nexport interface DotCMSPageParams {\n url: string;\n language?: string;\n}\n\nexport interface DotCMSPageAsset {\n canCreateTemplate: boolean;\n containers: DotCMSPageAssetContainer;\n layout: DotCMSLayout;\n page: DotCMSPage;\n site: DotCMSSite;\n template: DotCMSTemplate;\n viewAs: DotCMSViewAs;\n}\n\nexport interface DotCMSViewAs {\n language: {\n id: number;\n languageCode: string;\n countryCode: string;\n language: string;\n country: string;\n };\n mode: string;\n}\n\nexport interface DotCMSPageAssetContainer {\n [key: string]: {\n container: DotCMSContainer;\n containerStructures: DotCMSContainerStructure[];\n contentlets: {\n [key: string]: DotCMSContentlet[];\n };\n };\n}\n\nexport interface DotCMSContainerStructure {\n id: string;\n structureId: string;\n containerInode: string;\n containerId: string;\n code: string;\n contentTypeVar: string;\n}\n\nexport interface DotCMSLayout {\n pageWidth: string;\n width: string;\n layout: string;\n title: string;\n header: boolean;\n footer: boolean;\n body: DotPageAssetLayoutBody;\n sidebar: DotPageAssetLayoutSidebar;\n}\n\nexport interface DotPageAssetLayoutSidebar {\n preview: boolean;\n containers: DotCMSContainer[];\n location: string;\n widthPercent: number;\n width: string;\n}\n\nexport interface DotPageAssetLayoutBody {\n rows: DotPageAssetLayoutRow[];\n}\n\nexport interface DotPageAssetLayoutRow {\n identifier: number;\n value?: string;\n id?: string;\n columns: DotPageAssetLayoutColumn[];\n styleClass?: string;\n}\n\nexport interface DotPageAssetLayoutColumn {\n preview: boolean;\n containers: DotCMSContainer[];\n widthPercent: number;\n width: number;\n leftOffset: number;\n left: number;\n styleClass?: string;\n}\n\nexport interface DotCMSPage {\n template: string;\n modDate: number;\n metadata: string;\n cachettl: string;\n pageURI: string;\n title: string;\n type: string;\n showOnMenu: string;\n httpsRequired: boolean;\n inode: string;\n disabledWYSIWYG: any[];\n seokeywords: string;\n host: string;\n lastReview: number;\n working: boolean;\n locked: boolean;\n stInode: string;\n friendlyName: string;\n live: boolean;\n owner: string;\n identifier: string;\n nullProperties: any[];\n friendlyname: string;\n pagemetadata: string;\n languageId: number;\n url: string;\n seodescription: string;\n modUserName: string;\n folder: string;\n deleted: boolean;\n sortOrder: number;\n modUser: string;\n pageUrl: string;\n workingInode: string;\n shortyWorking: string;\n canEdit: boolean;\n canRead: boolean;\n canLock: boolean;\n lockedOn: number;\n lockedBy: string;\n lockedByName: string;\n liveInode: string;\n shortyLive: string;\n}\n\nexport interface DotCMSContainer {\n identifier: string;\n uuid: string;\n iDate: number;\n type: string;\n owner?: string;\n inode: string;\n source: string;\n title: string;\n friendlyName: string;\n modDate: number;\n modUser: string;\n sortOrder: number;\n showOnMenu: boolean;\n code?: string;\n maxContentlets: number;\n useDiv: boolean;\n sortContentletsBy?: string;\n preLoop: string;\n postLoop: string;\n staticify: boolean;\n luceneQuery?: string;\n notes: string;\n languageId?: number;\n path?: string;\n live: boolean;\n locked: boolean;\n working: boolean;\n deleted: boolean;\n name: string;\n archived: boolean;\n permissionId: string;\n versionId: string;\n versionType: string;\n permissionType: string;\n categoryId: string;\n idate: number;\n new: boolean;\n acceptTypes: string;\n contentlets: DotCMSContentlet[];\n}\n\nexport interface DotCMSContentlet {\n owner: string;\n identifier: string;\n hostName: string;\n modDate: number;\n languageId: number;\n body?: string;\n title: string;\n url: string;\n baseType: string;\n inode: string;\n titleImage: string;\n modUserName: string;\n archived: boolean;\n folder: string;\n hasTitleImage: boolean;\n sortOrder: number;\n modUser: string;\n host: string;\n working: boolean;\n locked: boolean;\n stInode: string;\n contentType: string;\n live: boolean;\n code?: string;\n widgetTitle?: string;\n endDate?: number;\n description?: string;\n recurrenceOccurs?: string;\n recurrenceDayOfWeek?: number;\n recurrenceDayOfMonth?: number;\n recurrenceStart?: number;\n recurrenceWeekOfMonth?: number;\n recurs?: boolean;\n noRecurrenceEnd?: boolean;\n urlTitle?: string;\n URL_MAP_FOR_CONTENT?: string;\n recurrenceDaysOfWeek?: string;\n recurrenceInterval?: number;\n urlMap?: string;\n recurrenceDatesToIgnore?: string;\n recurrenceMonthOfYear?: number;\n startDate?: number;\n recurrenceEnd?: number;\n categories?: string;\n image?: string;\n tags?: string;\n}\n\nexport interface DotCMSTemplate {\n iDate: number;\n type: string;\n owner: string;\n inode: string;\n identifier: string;\n source: string;\n title: string;\n friendlyName: string;\n modDate: number;\n modUser: string;\n sortOrder: number;\n showOnMenu: boolean;\n image: string;\n drawed: boolean;\n drawedBody: string;\n theme: string;\n anonymous: boolean;\n template: boolean;\n name: string;\n live: boolean;\n archived: boolean;\n locked: boolean;\n working: boolean;\n permissionId: string;\n versionId: string;\n versionType: string;\n deleted: boolean;\n permissionType: string;\n categoryId: string;\n idate: number;\n new: boolean;\n canEdit: boolean;\n}\n", + "properties": [ + { + "name": "anonymous", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 243 + }, + { + "name": "archived", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 247 + }, + { + "name": "canEdit", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 258 + }, + { + "name": "categoryId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 255 + }, + { + "name": "deleted", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 253 + }, + { + "name": "drawed", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 240 + }, + { + "name": "drawedBody", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 241 + }, + { + "name": "friendlyName", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 234 + }, + { + "name": "idate", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 256 + }, + { + "name": "iDate", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 227 + }, + { + "name": "identifier", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 231 + }, + { + "name": "image", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 239 + }, + { + "name": "inode", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 230 + }, + { + "name": "live", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 246 + }, + { + "name": "locked", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 248 + }, + { + "name": "modDate", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 235 + }, + { + "name": "modUser", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 236 + }, + { + "name": "name", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 245 + }, + { + "name": "new", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 257 + }, + { + "name": "owner", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 229 + }, + { + "name": "permissionId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 250 + }, + { + "name": "permissionType", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 254 + }, + { + "name": "showOnMenu", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 238 + }, + { + "name": "sortOrder", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 237 + }, + { + "name": "source", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 232 + }, + { + "name": "template", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 244 + }, + { + "name": "theme", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 242 + }, + { + "name": "title", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 233 + }, + { + "name": "type", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 228 + }, + { + "name": "versionId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 251 + }, + { + "name": "versionType", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 252 + }, + { + "name": "working", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 249 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotCMSTemplateThumbnail", + "id": "interface-DotCMSTemplateThumbnail-1462e8523b8ef572ef78d614d6b1f7471c8e748d981075163dca54114895276cd84153b18c0d39893615282e8284574cb9ddd47bbc5984a3b8de3f9f9c0069cb", + "file": "apps/dotcms-ui/src/app/portlets/dot-templates/dot-template-create-edit/dot-template-props/dot-template-thumbnail-field/dot-template-thumbnail-field.component.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { HttpErrorResponse } from '@angular/common/http';\nimport { Component, forwardRef } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nimport { throwError } from 'rxjs';\nimport { finalize, switchMap, take } from 'rxjs/operators';\n\nimport { DotCrudService } from '@services/dot-crud';\nimport { DotMessageService } from '@services/dot-message/dot-messages.service';\nimport {\n DotCMSTempFile,\n DotTempFileUploadService\n} from '@services/dot-temp-file-upload/dot-temp-file-upload.service';\nimport { DotWorkflowActionsFireService } from '@services/dot-workflow-actions-fire/dot-workflow-actions-fire.service';\nimport { DotCMSContentlet } from '@dotcms/dotcms-models';\n\nexport interface DotCMSTemplateThumbnail extends DotCMSContentlet {\n assetVersion: string;\n name: string;\n}\n\n@Component({\n selector: 'dot-template-thumbnail-field',\n templateUrl: './dot-template-thumbnail-field.component.html',\n styleUrls: ['./dot-template-thumbnail-field.component.scss'],\n providers: [\n {\n multi: true,\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DotTemplateThumbnailFieldComponent)\n }\n ]\n})\nexport class DotTemplateThumbnailFieldComponent implements ControlValueAccessor {\n asset: DotCMSTemplateThumbnail;\n error = '';\n loading = false;\n\n constructor(\n private dotTempFileUploadService: DotTempFileUploadService,\n private dotWorkflowActionsFireService: DotWorkflowActionsFireService,\n private dotCrudService: DotCrudService,\n private dotMessageService: DotMessageService\n ) {}\n\n /**\n * Handle thumbnail setup\n *\n * @param {(CustomEvent<{ name: string; value: File | string }>)} { detail: { value } }\n * @memberof DotTemplateThumbnailFieldComponent\n */\n onThumbnailChange({\n detail: { value }\n }: CustomEvent<{ name: string; value: File | string }>): void {\n if (value) {\n this.loading = true;\n this.error = '';\n\n this.dotTempFileUploadService\n .upload(value)\n .pipe(\n switchMap(([{ id, image }]: DotCMSTempFile[]) => {\n if (!image) {\n return throwError(\n this.dotMessageService.get(\n 'templates.properties.form.thumbnail.error.invalid.url'\n )\n );\n }\n\n return this.dotWorkflowActionsFireService.publishContentletAndWaitForIndex(\n 'dotAsset',\n {\n asset: id\n }\n );\n }),\n take(1),\n finalize(() => {\n this.loading = false;\n })\n )\n .subscribe(\n (asset: DotCMSTemplateThumbnail) => {\n this.asset = asset;\n this.propagateChange(this.asset.identifier);\n },\n (err: HttpErrorResponse | string) => {\n const defaultError = this.dotMessageService.get(\n 'templates.properties.form.thumbnail.error'\n );\n this.error = typeof err === 'string' ? err : defaultError;\n }\n );\n } else if (this.asset) {\n this.asset = null;\n this.propagateChange('');\n } else {\n this.error = this.dotMessageService.get(\n 'templates.properties.form.thumbnail.error.invalid.image'\n );\n }\n }\n\n propagateChange = (_: any) => {};\n\n writeValue(id: string): void {\n this.loading = true;\n\n this.dotCrudService\n .getDataById('/api/content', id, 'contentlets')\n .pipe(\n finalize(() => {\n this.loading = false;\n }),\n take(1)\n )\n .subscribe(\n ([contentlet]: DotCMSTemplateThumbnail[]) => {\n this.asset = contentlet;\n },\n () => {\n // do nothing, failing silently like any html input select that get pass an invalid value\n }\n );\n }\n\n registerOnChange(fn): void {\n this.propagateChange = fn;\n }\n\n registerOnTouched(): void {}\n}\n", + "properties": [ + { + "name": "assetVersion", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 18 + }, + { + "name": "name", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 19 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [], + "extends": "DotCMSContentlet" + }, + { + "name": "DotCMSViewAs", + "id": "interface-DotCMSViewAs-8e6a73749c34df0c00155e704df0c63721d0a5c138303ac5f092daa3257a542b81453ec50309883343d0a7dc27171935ef7cb2752699b9e25471a4fe22715ee8", + "file": "libs/dotcms/src/lib/models/DotCMSPage.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotCMSSite } from './DotCMSSite.model';\n\nexport interface DotCMSPageParams {\n url: string;\n language?: string;\n}\n\nexport interface DotCMSPageAsset {\n canCreateTemplate: boolean;\n containers: DotCMSPageAssetContainer;\n layout: DotCMSLayout;\n page: DotCMSPage;\n site: DotCMSSite;\n template: DotCMSTemplate;\n viewAs: DotCMSViewAs;\n}\n\nexport interface DotCMSViewAs {\n language: {\n id: number;\n languageCode: string;\n countryCode: string;\n language: string;\n country: string;\n };\n mode: string;\n}\n\nexport interface DotCMSPageAssetContainer {\n [key: string]: {\n container: DotCMSContainer;\n containerStructures: DotCMSContainerStructure[];\n contentlets: {\n [key: string]: DotCMSContentlet[];\n };\n };\n}\n\nexport interface DotCMSContainerStructure {\n id: string;\n structureId: string;\n containerInode: string;\n containerId: string;\n code: string;\n contentTypeVar: string;\n}\n\nexport interface DotCMSLayout {\n pageWidth: string;\n width: string;\n layout: string;\n title: string;\n header: boolean;\n footer: boolean;\n body: DotPageAssetLayoutBody;\n sidebar: DotPageAssetLayoutSidebar;\n}\n\nexport interface DotPageAssetLayoutSidebar {\n preview: boolean;\n containers: DotCMSContainer[];\n location: string;\n widthPercent: number;\n width: string;\n}\n\nexport interface DotPageAssetLayoutBody {\n rows: DotPageAssetLayoutRow[];\n}\n\nexport interface DotPageAssetLayoutRow {\n identifier: number;\n value?: string;\n id?: string;\n columns: DotPageAssetLayoutColumn[];\n styleClass?: string;\n}\n\nexport interface DotPageAssetLayoutColumn {\n preview: boolean;\n containers: DotCMSContainer[];\n widthPercent: number;\n width: number;\n leftOffset: number;\n left: number;\n styleClass?: string;\n}\n\nexport interface DotCMSPage {\n template: string;\n modDate: number;\n metadata: string;\n cachettl: string;\n pageURI: string;\n title: string;\n type: string;\n showOnMenu: string;\n httpsRequired: boolean;\n inode: string;\n disabledWYSIWYG: any[];\n seokeywords: string;\n host: string;\n lastReview: number;\n working: boolean;\n locked: boolean;\n stInode: string;\n friendlyName: string;\n live: boolean;\n owner: string;\n identifier: string;\n nullProperties: any[];\n friendlyname: string;\n pagemetadata: string;\n languageId: number;\n url: string;\n seodescription: string;\n modUserName: string;\n folder: string;\n deleted: boolean;\n sortOrder: number;\n modUser: string;\n pageUrl: string;\n workingInode: string;\n shortyWorking: string;\n canEdit: boolean;\n canRead: boolean;\n canLock: boolean;\n lockedOn: number;\n lockedBy: string;\n lockedByName: string;\n liveInode: string;\n shortyLive: string;\n}\n\nexport interface DotCMSContainer {\n identifier: string;\n uuid: string;\n iDate: number;\n type: string;\n owner?: string;\n inode: string;\n source: string;\n title: string;\n friendlyName: string;\n modDate: number;\n modUser: string;\n sortOrder: number;\n showOnMenu: boolean;\n code?: string;\n maxContentlets: number;\n useDiv: boolean;\n sortContentletsBy?: string;\n preLoop: string;\n postLoop: string;\n staticify: boolean;\n luceneQuery?: string;\n notes: string;\n languageId?: number;\n path?: string;\n live: boolean;\n locked: boolean;\n working: boolean;\n deleted: boolean;\n name: string;\n archived: boolean;\n permissionId: string;\n versionId: string;\n versionType: string;\n permissionType: string;\n categoryId: string;\n idate: number;\n new: boolean;\n acceptTypes: string;\n contentlets: DotCMSContentlet[];\n}\n\nexport interface DotCMSContentlet {\n owner: string;\n identifier: string;\n hostName: string;\n modDate: number;\n languageId: number;\n body?: string;\n title: string;\n url: string;\n baseType: string;\n inode: string;\n titleImage: string;\n modUserName: string;\n archived: boolean;\n folder: string;\n hasTitleImage: boolean;\n sortOrder: number;\n modUser: string;\n host: string;\n working: boolean;\n locked: boolean;\n stInode: string;\n contentType: string;\n live: boolean;\n code?: string;\n widgetTitle?: string;\n endDate?: number;\n description?: string;\n recurrenceOccurs?: string;\n recurrenceDayOfWeek?: number;\n recurrenceDayOfMonth?: number;\n recurrenceStart?: number;\n recurrenceWeekOfMonth?: number;\n recurs?: boolean;\n noRecurrenceEnd?: boolean;\n urlTitle?: string;\n URL_MAP_FOR_CONTENT?: string;\n recurrenceDaysOfWeek?: string;\n recurrenceInterval?: number;\n urlMap?: string;\n recurrenceDatesToIgnore?: string;\n recurrenceMonthOfYear?: number;\n startDate?: number;\n recurrenceEnd?: number;\n categories?: string;\n image?: string;\n tags?: string;\n}\n\nexport interface DotCMSTemplate {\n iDate: number;\n type: string;\n owner: string;\n inode: string;\n identifier: string;\n source: string;\n title: string;\n friendlyName: string;\n modDate: number;\n modUser: string;\n sortOrder: number;\n showOnMenu: boolean;\n image: string;\n drawed: boolean;\n drawedBody: string;\n theme: string;\n anonymous: boolean;\n template: boolean;\n name: string;\n live: boolean;\n archived: boolean;\n locked: boolean;\n working: boolean;\n permissionId: string;\n versionId: string;\n versionType: string;\n deleted: boolean;\n permissionType: string;\n categoryId: string;\n idate: number;\n new: boolean;\n canEdit: boolean;\n}\n", + "properties": [ + { + "name": "language", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": false, + "description": "", + "line": 19 + }, + { + "name": "mode", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 26 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotCMSWorkflow", + "id": "interface-DotCMSWorkflow-9adf5501d7580226435fd8c13b386645b905168d8a3082214efd13c8eb6291c9d38ccdf2cb3dbb9bf0f45a33828961268182a92a442cc1254134bd06745f7547", + "file": "libs/dotcms-models/src/lib/dot-workflow.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotCMSWorkflow {\n archived: boolean;\n creationDate: Date;\n defaultScheme: boolean;\n description: string;\n entryActionId: string;\n id: string;\n mandatory: boolean;\n modDate: Date;\n name: string;\n system: boolean;\n}\n", + "properties": [ + { + "name": "archived", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 2 + }, + { + "name": "creationDate", + "deprecated": false, + "deprecationMessage": "", + "type": "Date", + "optional": false, + "description": "", + "line": 3 + }, + { + "name": "defaultScheme", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 4 + }, + { + "name": "description", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 5 + }, + { + "name": "entryActionId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 6 + }, + { + "name": "id", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 7 + }, + { + "name": "mandatory", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 8 + }, + { + "name": "modDate", + "deprecated": false, + "deprecationMessage": "", + "type": "Date", + "optional": false, + "description": "", + "line": 9 + }, + { + "name": "name", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 10 + }, + { + "name": "system", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 11 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotCMSWorkflowAction", + "id": "interface-DotCMSWorkflowAction-a3e7a308832e7c5391515c8a17e05fa98d4cf01205b5eb0304da870493446af9cdd2b8249e78124ff9e29658732de279943c7b21fba173c2da44fd99dcb68384", + "file": "libs/dotcms-models/src/lib/dot-workflow-action.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotCMSContentType } from './dot-content-types.model';\n\nexport interface DotCMSWorkflowActionEvent {\n workflow: DotCMSWorkflowAction;\n callback: string;\n inode: string;\n selectedInodes: string | string[];\n}\n\nexport interface DotCMSWorkflowAction {\n assignable: boolean;\n commentable: boolean;\n condition: string;\n icon: string;\n id: string;\n name: string;\n nextAssign: string;\n nextStep: string;\n nextStepCurrentStep: boolean;\n order: number;\n owner?: string;\n roleHierarchyForAssign: boolean;\n schemeId: string;\n showOn: string[];\n actionInputs: DotCMSWorkflowInput[];\n}\n\nexport enum DotCMSSystemActionType {\n UNPUBLISH = 'UNPUBLISH',\n UNARCHIVE = 'UNARCHIVE',\n PUBLISH = 'PUBLISH',\n NEW = 'NEW',\n EDIT = 'EDIT',\n DESTROY = 'DESTROY',\n DELETE = 'DELETE',\n ARCHIVE = 'ARCHIVE'\n}\n\nexport interface DotCMSSystemActionMappings {\n [key: string]: DotCMSSystemAction | string;\n}\n\nexport interface DotCMSSystemAction {\n identifier: string;\n systemAction: string;\n workflowAction: DotCMSWorkflowAction;\n owner: DotCMSContentType;\n ownerContentType: boolean;\n ownerScheme: boolean;\n}\n\nexport interface DotCMSWorkflowInput {\n id: string;\n body: any;\n}\n", + "properties": [ + { + "name": "actionInputs", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSWorkflowInput[]", + "optional": false, + "description": "", + "line": 25 + }, + { + "name": "assignable", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 11 + }, + { + "name": "commentable", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 12 + }, + { + "name": "condition", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 13 + }, + { + "name": "icon", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 14 + }, + { + "name": "id", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 15 + }, + { + "name": "name", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 16 + }, + { + "name": "nextAssign", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 17 + }, + { + "name": "nextStep", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 18 + }, + { + "name": "nextStepCurrentStep", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 19 + }, + { + "name": "order", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 20 + }, + { + "name": "owner", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 21 + }, + { + "name": "roleHierarchyForAssign", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 22 + }, + { + "name": "schemeId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 23 + }, + { + "name": "showOn", + "deprecated": false, + "deprecationMessage": "", + "type": "string[]", + "optional": false, + "description": "", + "line": 24 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotCMSWorkflowActionEvent", + "id": "interface-DotCMSWorkflowActionEvent-a3e7a308832e7c5391515c8a17e05fa98d4cf01205b5eb0304da870493446af9cdd2b8249e78124ff9e29658732de279943c7b21fba173c2da44fd99dcb68384", + "file": "libs/dotcms-models/src/lib/dot-workflow-action.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotCMSContentType } from './dot-content-types.model';\n\nexport interface DotCMSWorkflowActionEvent {\n workflow: DotCMSWorkflowAction;\n callback: string;\n inode: string;\n selectedInodes: string | string[];\n}\n\nexport interface DotCMSWorkflowAction {\n assignable: boolean;\n commentable: boolean;\n condition: string;\n icon: string;\n id: string;\n name: string;\n nextAssign: string;\n nextStep: string;\n nextStepCurrentStep: boolean;\n order: number;\n owner?: string;\n roleHierarchyForAssign: boolean;\n schemeId: string;\n showOn: string[];\n actionInputs: DotCMSWorkflowInput[];\n}\n\nexport enum DotCMSSystemActionType {\n UNPUBLISH = 'UNPUBLISH',\n UNARCHIVE = 'UNARCHIVE',\n PUBLISH = 'PUBLISH',\n NEW = 'NEW',\n EDIT = 'EDIT',\n DESTROY = 'DESTROY',\n DELETE = 'DELETE',\n ARCHIVE = 'ARCHIVE'\n}\n\nexport interface DotCMSSystemActionMappings {\n [key: string]: DotCMSSystemAction | string;\n}\n\nexport interface DotCMSSystemAction {\n identifier: string;\n systemAction: string;\n workflowAction: DotCMSWorkflowAction;\n owner: DotCMSContentType;\n ownerContentType: boolean;\n ownerScheme: boolean;\n}\n\nexport interface DotCMSWorkflowInput {\n id: string;\n body: any;\n}\n", + "properties": [ + { + "name": "callback", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 5 + }, + { + "name": "inode", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 6 + }, + { + "name": "selectedInodes", + "deprecated": false, + "deprecationMessage": "", + "type": "string | string[]", + "optional": false, + "description": "", + "line": 7 + }, + { + "name": "workflow", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSWorkflowAction", + "optional": false, + "description": "", + "line": 4 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotCMSWorkflowInput", + "id": "interface-DotCMSWorkflowInput-a3e7a308832e7c5391515c8a17e05fa98d4cf01205b5eb0304da870493446af9cdd2b8249e78124ff9e29658732de279943c7b21fba173c2da44fd99dcb68384", + "file": "libs/dotcms-models/src/lib/dot-workflow-action.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotCMSContentType } from './dot-content-types.model';\n\nexport interface DotCMSWorkflowActionEvent {\n workflow: DotCMSWorkflowAction;\n callback: string;\n inode: string;\n selectedInodes: string | string[];\n}\n\nexport interface DotCMSWorkflowAction {\n assignable: boolean;\n commentable: boolean;\n condition: string;\n icon: string;\n id: string;\n name: string;\n nextAssign: string;\n nextStep: string;\n nextStepCurrentStep: boolean;\n order: number;\n owner?: string;\n roleHierarchyForAssign: boolean;\n schemeId: string;\n showOn: string[];\n actionInputs: DotCMSWorkflowInput[];\n}\n\nexport enum DotCMSSystemActionType {\n UNPUBLISH = 'UNPUBLISH',\n UNARCHIVE = 'UNARCHIVE',\n PUBLISH = 'PUBLISH',\n NEW = 'NEW',\n EDIT = 'EDIT',\n DESTROY = 'DESTROY',\n DELETE = 'DELETE',\n ARCHIVE = 'ARCHIVE'\n}\n\nexport interface DotCMSSystemActionMappings {\n [key: string]: DotCMSSystemAction | string;\n}\n\nexport interface DotCMSSystemAction {\n identifier: string;\n systemAction: string;\n workflowAction: DotCMSWorkflowAction;\n owner: DotCMSContentType;\n ownerContentType: boolean;\n ownerScheme: boolean;\n}\n\nexport interface DotCMSWorkflowInput {\n id: string;\n body: any;\n}\n", + "properties": [ + { + "name": "body", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": false, + "description": "", + "line": 54 + }, + { + "name": "id", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 53 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotContainer", + "id": "interface-DotContainer-3d5fbf3e953320fcb293d8df6bc02509c72a61191b425401f9b08f7289c6d82a3c84844ccff63bca42bae95d62cca8d7f72a0224a032c93751c4afe017aa1cbe", + "file": "apps/dotcms-ui/src/app/shared/models/container/dot-container.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export enum CONTAINER_SOURCE {\n FILE = 'FILE',\n DB = 'DB'\n}\n\nexport interface DotContainer {\n categoryId?: string;\n deleted?: boolean;\n friendlyName?: string;\n path?: string;\n identifier: string;\n name: string;\n type: string;\n source: CONTAINER_SOURCE;\n parentPermissionable: {\n hostname: string;\n };\n}\n\nexport interface DotContainerStructure {\n contentTypeVar: string;\n}\n\n// The template endpoint returns DotContainer but the page endpoint returns {container}\nexport interface DotContainerMap {\n [key: string]: DotContainer;\n}\n", + "properties": [ + { + "name": "categoryId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 7 + }, + { + "name": "deleted", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 8 + }, + { + "name": "friendlyName", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 9 + }, + { + "name": "identifier", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 11 + }, + { + "name": "name", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 12 + }, + { + "name": "parentPermissionable", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": false, + "description": "", + "line": 15 + }, + { + "name": "path", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 10 + }, + { + "name": "source", + "deprecated": false, + "deprecationMessage": "", + "type": "CONTAINER_SOURCE", + "optional": false, + "description": "", + "line": 14 + }, + { + "name": "type", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 13 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotContainerColumnBox", + "id": "interface-DotContainerColumnBox-be497d090be298b9ee0d762c93135cdfebb74567c7d1c4ef1e1c2ce8477b53c88439c526c8b57c91838bd80ebfcb55c3a67430dbcaffd187368b5899f4c35bb5", + "file": "apps/dotcms-ui/src/app/shared/models/dot-edit-layout-designer/dot-container-column-box.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotContainer } from '@models/container/dot-container.model';\n\n/**\n * It is a Container linked into a DotLayoutGridBox\n */\nexport interface DotContainerColumnBox {\n container: DotContainer;\n uuid?: string;\n}\n", + "properties": [ + { + "name": "container", + "deprecated": false, + "deprecationMessage": "", + "type": "DotContainer", + "optional": false, + "description": "", + "line": 7 + }, + { + "name": "uuid", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 8 + } + ], + "indexSignatures": [], + "kind": 165, + "description": "

It is a Container linked into a DotLayoutGridBox

\n", + "rawdescription": "\n\nIt is a Container linked into a DotLayoutGridBox\n", + "methods": [] + }, + { + "name": "DotContainerMap", + "id": "interface-DotContainerMap-3d5fbf3e953320fcb293d8df6bc02509c72a61191b425401f9b08f7289c6d82a3c84844ccff63bca42bae95d62cca8d7f72a0224a032c93751c4afe017aa1cbe", + "file": "apps/dotcms-ui/src/app/shared/models/container/dot-container.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export enum CONTAINER_SOURCE {\n FILE = 'FILE',\n DB = 'DB'\n}\n\nexport interface DotContainer {\n categoryId?: string;\n deleted?: boolean;\n friendlyName?: string;\n path?: string;\n identifier: string;\n name: string;\n type: string;\n source: CONTAINER_SOURCE;\n parentPermissionable: {\n hostname: string;\n };\n}\n\nexport interface DotContainerStructure {\n contentTypeVar: string;\n}\n\n// The template endpoint returns DotContainer but the page endpoint returns {container}\nexport interface DotContainerMap {\n [key: string]: DotContainer;\n}\n", + "properties": [], + "indexSignatures": [ + { + "id": "index-declaration-3d5fbf3e953320fcb293d8df6bc02509c72a61191b425401f9b08f7289c6d82a3c84844ccff63bca42bae95d62cca8d7f72a0224a032c93751c4afe017aa1cbe", + "args": [ + { + "name": "key", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "returnType": "DotContainer", + "line": 25, + "deprecated": false, + "deprecationMessage": "" + } + ], + "kind": 175, + "methods": [] + }, + { + "name": "DotContainerStructure", + "id": "interface-DotContainerStructure-3d5fbf3e953320fcb293d8df6bc02509c72a61191b425401f9b08f7289c6d82a3c84844ccff63bca42bae95d62cca8d7f72a0224a032c93751c4afe017aa1cbe", + "file": "apps/dotcms-ui/src/app/shared/models/container/dot-container.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export enum CONTAINER_SOURCE {\n FILE = 'FILE',\n DB = 'DB'\n}\n\nexport interface DotContainer {\n categoryId?: string;\n deleted?: boolean;\n friendlyName?: string;\n path?: string;\n identifier: string;\n name: string;\n type: string;\n source: CONTAINER_SOURCE;\n parentPermissionable: {\n hostname: string;\n };\n}\n\nexport interface DotContainerStructure {\n contentTypeVar: string;\n}\n\n// The template endpoint returns DotContainer but the page endpoint returns {container}\nexport interface DotContainerMap {\n [key: string]: DotContainer;\n}\n", + "properties": [ + { + "name": "contentTypeVar", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 21 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotContentletEvent", + "id": "interface-DotContentletEvent-548bff6c62c66666033e5858c740593d9da0e58c682b7338e62ed468d90162ab7c9f2a766f6cc365c405ec52b71752b143e28ae8b6643581879119257e9faab8", + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/dot-edit-content-html/models/dot-contentlets-events.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotPageContent } from '@portlets/dot-edit-page/shared/models/dot-page-content.model';\nimport { DotPageContainer } from '@models/dot-page-container/dot-page-container.model';\n\nexport interface DotContentletEvent {\n name: string;\n data: T;\n}\n\nexport interface DotContentletEventDragAndDropDotAsset extends DotContentletEvent {}\nexport interface DotContentletEventRelocate extends DotContentletEvent {}\nexport interface DotContentletEventSelect extends DotContentletEvent {}\nexport interface DotContentletEventSave extends DotContentletEvent {}\n\nexport interface DotAssetPayload {\n contentlet: DotPageContent;\n placeholderId: string;\n}\n\nexport interface DotRelocatePayload {\n container: DotPageContainer;\n contentlet: DotPageContent;\n}\n\nexport interface DotInlineDataset {\n mode: string;\n inode: string;\n fieldName: string;\n language: string;\n}\n\nexport interface DotInlineEditContent {\n innerHTML: string;\n dataset: DotInlineDataset;\n element: HTMLElement;\n isNotDirty: boolean;\n eventType: string;\n}\n", + "properties": [ + { + "name": "data", + "deprecated": false, + "deprecationMessage": "", + "type": "T", + "optional": false, + "description": "", + "line": 6 + }, + { + "name": "name", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 5 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotContentletEventDragAndDropDotAsset", + "id": "interface-DotContentletEventDragAndDropDotAsset-548bff6c62c66666033e5858c740593d9da0e58c682b7338e62ed468d90162ab7c9f2a766f6cc365c405ec52b71752b143e28ae8b6643581879119257e9faab8", + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/dot-edit-content-html/models/dot-contentlets-events.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotPageContent } from '@portlets/dot-edit-page/shared/models/dot-page-content.model';\nimport { DotPageContainer } from '@models/dot-page-container/dot-page-container.model';\n\nexport interface DotContentletEvent {\n name: string;\n data: T;\n}\n\nexport interface DotContentletEventDragAndDropDotAsset extends DotContentletEvent {}\nexport interface DotContentletEventRelocate extends DotContentletEvent {}\nexport interface DotContentletEventSelect extends DotContentletEvent {}\nexport interface DotContentletEventSave extends DotContentletEvent {}\n\nexport interface DotAssetPayload {\n contentlet: DotPageContent;\n placeholderId: string;\n}\n\nexport interface DotRelocatePayload {\n container: DotPageContainer;\n contentlet: DotPageContent;\n}\n\nexport interface DotInlineDataset {\n mode: string;\n inode: string;\n fieldName: string;\n language: string;\n}\n\nexport interface DotInlineEditContent {\n innerHTML: string;\n dataset: DotInlineDataset;\n element: HTMLElement;\n isNotDirty: boolean;\n eventType: string;\n}\n", + "properties": [], + "indexSignatures": [], + "methods": [], + "extends": "DotContentletEvent" + }, + { + "name": "DotContentletEventRelocate", + "id": "interface-DotContentletEventRelocate-548bff6c62c66666033e5858c740593d9da0e58c682b7338e62ed468d90162ab7c9f2a766f6cc365c405ec52b71752b143e28ae8b6643581879119257e9faab8", + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/dot-edit-content-html/models/dot-contentlets-events.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotPageContent } from '@portlets/dot-edit-page/shared/models/dot-page-content.model';\nimport { DotPageContainer } from '@models/dot-page-container/dot-page-container.model';\n\nexport interface DotContentletEvent {\n name: string;\n data: T;\n}\n\nexport interface DotContentletEventDragAndDropDotAsset extends DotContentletEvent {}\nexport interface DotContentletEventRelocate extends DotContentletEvent {}\nexport interface DotContentletEventSelect extends DotContentletEvent {}\nexport interface DotContentletEventSave extends DotContentletEvent {}\n\nexport interface DotAssetPayload {\n contentlet: DotPageContent;\n placeholderId: string;\n}\n\nexport interface DotRelocatePayload {\n container: DotPageContainer;\n contentlet: DotPageContent;\n}\n\nexport interface DotInlineDataset {\n mode: string;\n inode: string;\n fieldName: string;\n language: string;\n}\n\nexport interface DotInlineEditContent {\n innerHTML: string;\n dataset: DotInlineDataset;\n element: HTMLElement;\n isNotDirty: boolean;\n eventType: string;\n}\n", + "properties": [], + "indexSignatures": [], + "methods": [], + "extends": "DotContentletEvent" + }, + { + "name": "DotContentletEventSave", + "id": "interface-DotContentletEventSave-548bff6c62c66666033e5858c740593d9da0e58c682b7338e62ed468d90162ab7c9f2a766f6cc365c405ec52b71752b143e28ae8b6643581879119257e9faab8", + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/dot-edit-content-html/models/dot-contentlets-events.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotPageContent } from '@portlets/dot-edit-page/shared/models/dot-page-content.model';\nimport { DotPageContainer } from '@models/dot-page-container/dot-page-container.model';\n\nexport interface DotContentletEvent {\n name: string;\n data: T;\n}\n\nexport interface DotContentletEventDragAndDropDotAsset extends DotContentletEvent {}\nexport interface DotContentletEventRelocate extends DotContentletEvent {}\nexport interface DotContentletEventSelect extends DotContentletEvent {}\nexport interface DotContentletEventSave extends DotContentletEvent {}\n\nexport interface DotAssetPayload {\n contentlet: DotPageContent;\n placeholderId: string;\n}\n\nexport interface DotRelocatePayload {\n container: DotPageContainer;\n contentlet: DotPageContent;\n}\n\nexport interface DotInlineDataset {\n mode: string;\n inode: string;\n fieldName: string;\n language: string;\n}\n\nexport interface DotInlineEditContent {\n innerHTML: string;\n dataset: DotInlineDataset;\n element: HTMLElement;\n isNotDirty: boolean;\n eventType: string;\n}\n", + "properties": [], + "indexSignatures": [], + "methods": [], + "extends": "DotContentletEvent" + }, + { + "name": "DotContentletEventSelect", + "id": "interface-DotContentletEventSelect-548bff6c62c66666033e5858c740593d9da0e58c682b7338e62ed468d90162ab7c9f2a766f6cc365c405ec52b71752b143e28ae8b6643581879119257e9faab8", + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/dot-edit-content-html/models/dot-contentlets-events.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotPageContent } from '@portlets/dot-edit-page/shared/models/dot-page-content.model';\nimport { DotPageContainer } from '@models/dot-page-container/dot-page-container.model';\n\nexport interface DotContentletEvent {\n name: string;\n data: T;\n}\n\nexport interface DotContentletEventDragAndDropDotAsset extends DotContentletEvent {}\nexport interface DotContentletEventRelocate extends DotContentletEvent {}\nexport interface DotContentletEventSelect extends DotContentletEvent {}\nexport interface DotContentletEventSave extends DotContentletEvent {}\n\nexport interface DotAssetPayload {\n contentlet: DotPageContent;\n placeholderId: string;\n}\n\nexport interface DotRelocatePayload {\n container: DotPageContainer;\n contentlet: DotPageContent;\n}\n\nexport interface DotInlineDataset {\n mode: string;\n inode: string;\n fieldName: string;\n language: string;\n}\n\nexport interface DotInlineEditContent {\n innerHTML: string;\n dataset: DotInlineDataset;\n element: HTMLElement;\n isNotDirty: boolean;\n eventType: string;\n}\n", + "properties": [], + "indexSignatures": [], + "methods": [], + "extends": "DotContentletEvent" + }, + { + "name": "DotContentletItem", + "id": "interface-DotContentletItem-b72bd40fcb159748372a6d9bfc306a6983a2282c0c340245279d495f40cb4cfd80a1aa2b0ed3fdbc22a0cf71971fc1f564882a91375f908ce8b266b21e890fe8", + "file": "libs/dotcms-webcomponents/src/models/dot-contentlet-item.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotContentletItem {\n contentTypeIcon?: string;\n language: string;\n typeVariable: string;\n modDate: string;\n __wfstep__: string;\n title: string;\n sysPublishDate: string;\n baseType: string;\n inode: string;\n __title__: string;\n Identifier: string;\n permissions: string;\n contentStructureType: string;\n working: string;\n locked: string;\n live: string;\n owner: string;\n identifier: string;\n wfActionMapList: string;\n languageId: string;\n mediaType: string;\n statusIcons: string;\n hasLiveVersion: string;\n deleted: string;\n structureInode: string;\n __type__: string;\n __icon__: string;\n ownerCanRead: string;\n hasTitleImage: string;\n modUser: string;\n ownerCanWrite: string;\n ownerCanPublish: string;\n mimeType: string;\n titleImage: string;\n}\n", + "properties": [ + { + "name": "__icon__", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 28 + }, + { + "name": "__title__", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 11 + }, + { + "name": "__type__", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 27 + }, + { + "name": "__wfstep__", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 6 + }, + { + "name": "baseType", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 9 + }, + { + "name": "contentStructureType", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 14 + }, + { + "name": "contentTypeIcon", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 2 + }, + { + "name": "deleted", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 25 + }, + { + "name": "hasLiveVersion", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 24 + }, + { + "name": "hasTitleImage", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 30 + }, + { + "name": "identifier", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 19 + }, + { + "name": "Identifier", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 12 + }, + { + "name": "inode", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 10 + }, + { + "name": "language", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 3 + }, + { + "name": "languageId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 21 + }, + { + "name": "live", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 17 + }, + { + "name": "locked", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 16 + }, + { + "name": "mediaType", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 22 + }, + { + "name": "mimeType", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 34 + }, + { + "name": "modDate", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 5 + }, + { + "name": "modUser", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 31 + }, + { + "name": "owner", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 18 + }, + { + "name": "ownerCanPublish", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 33 + }, + { + "name": "ownerCanRead", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 29 + }, + { + "name": "ownerCanWrite", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 32 + }, + { + "name": "permissions", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 13 + }, + { + "name": "statusIcons", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 23 + }, + { + "name": "structureInode", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 26 + }, + { + "name": "sysPublishDate", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 8 + }, + { + "name": "title", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 7 + }, + { + "name": "titleImage", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 35 + }, + { + "name": "typeVariable", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 4 + }, + { + "name": "wfActionMapList", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 20 + }, + { + "name": "working", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 15 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotContentState", + "id": "interface-DotContentState-bd9875b076f3211a8cdaacbc2181100c799a7282aed0e2933f0243db318423472ab663c21e26f399983e31bce516705a4c3c29595c316d59fb291df15b956070", + "file": "libs/dotcms-models/src/lib/dot-content-state.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotContentState {\n live: string | boolean;\n working: string | boolean;\n deleted: string | boolean;\n hasLiveVersion: string | boolean;\n}\n", + "properties": [ + { + "name": "deleted", + "deprecated": false, + "deprecationMessage": "", + "type": "string | boolean", + "optional": false, + "description": "", + "line": 7 + }, + { + "name": "hasLiveVersion", + "deprecated": false, + "deprecationMessage": "", + "type": "string | boolean", + "optional": false, + "description": "", + "line": 8 + }, + { + "name": "live", + "deprecated": false, + "deprecationMessage": "", + "type": "string | boolean", + "optional": false, + "description": "", + "line": 5 + }, + { + "name": "working", + "deprecated": false, + "deprecationMessage": "", + "type": "string | boolean", + "optional": false, + "description": "", + "line": 6 + } + ], + "indexSignatures": [], + "kind": 165, + "description": "

Represent only the properties that define the status of any type of content

\n", + "rawdescription": "\n\nRepresent only the properties that define the status of any type of content\n", + "methods": [] + }, + { + "name": "DotContextMenuAction", + "id": "interface-DotContextMenuAction-72d61708215aa50aec105fb0ba7e6f8ebd7605fedb64b14ef5bcf3634a36f736fc68746d027660ed715f590d6e771843d51b92042b9da058a9523d7a9dec7d6c", + "file": "libs/dotcms-webcomponents/src/models/dot-context-menu-action.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotContextMenuAction {\n index: number;\n}\n", + "properties": [ + { + "name": "index", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 2 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotContextMenuOption", + "id": "interface-DotContextMenuOption-3e3f9bf5d04f6bd0aa0fe3ebda057421507f20e795ac44360af64ac7580ec5a341d1126a225e366fa2dc3ecc6a256257e6840a9e04cea5593cf9e27a375e8678", + "file": "libs/dotcms-webcomponents/src/models/dot-context-menu.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotContextMenuOption {\n label: string;\n action: (e: CustomEvent) => void;\n}\n", + "properties": [ + { + "name": "action", + "deprecated": false, + "deprecationMessage": "", + "type": "function", + "optional": false, + "description": "", + "line": 3 + }, + { + "name": "label", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 2 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotCrumb", + "id": "interface-DotCrumb-60bee30c74c258e95cca5ca277dc4f8b4d654d0e7350d522ceeef22001bcd83d5743ac4fbe153d9245490c5f2ac0d0f1c06c9d8ff94117dc5ebc7a5bd0a6ed3b", + "file": "apps/dotcms-ui/src/app/view/components/dot-crumbtrail/service/dot-crumbtrail.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Injectable } from '@angular/core';\nimport {\n DotNavigationService,\n replaceSectionsMap\n} from '../../dot-navigation/services/dot-navigation.service';\nimport { map, switchMap, filter, take } from 'rxjs/operators';\nimport { NavigationEnd, Router, ActivatedRoute, Data } from '@angular/router';\nimport { DotMenu, DotMenuItem } from '../../../../shared/models/navigation';\nimport { Observable, BehaviorSubject, Subject } from 'rxjs';\n\n@Injectable()\nexport class DotCrumbtrailService {\n private URL_EXCLUDES = ['/content-types-angular/create/content'];\n private crumbTrail: Subject = new BehaviorSubject([]);\n\n private portletsTitlePathFinder = {\n 'content-types-angular': 'contentType.name',\n 'edit-page': 'content.page.title',\n apps: 'data.name',\n templates: 'template.title'\n };\n\n constructor(\n public dotNavigationService: DotNavigationService,\n router: Router,\n private activeRoute: ActivatedRoute\n ) {\n this.dotNavigationService\n .onNavigationEnd()\n .pipe(\n map((event: NavigationEnd) => {\n if (this.URL_EXCLUDES.includes(event.url)) {\n return this.splitURL(event.url)[0];\n } else {\n return event.url;\n }\n }),\n switchMap(this.getCrumbtrail.bind(this))\n )\n .subscribe((crumbTrail: DotCrumb[]) => this.crumbTrail.next(crumbTrail));\n\n this.getCrumbtrail(router.url).subscribe((crumbTrail: DotCrumb[]) =>\n this.crumbTrail.next(crumbTrail)\n );\n }\n\n get crumbTrail$(): Observable {\n return this.crumbTrail.asObservable();\n }\n\n private splitURL(url: string): string[] {\n return url.split('/').filter((section: string) => section !== '' && section !== 'c');\n }\n\n private getMenuLabel(portletId: string): Observable {\n return this.dotNavigationService.items$.pipe(\n filter((dotMenus: DotMenu[]) => !!dotMenus.length),\n map((dotMenus: DotMenu[]) => {\n let res: DotCrumb[] = [];\n\n dotMenus.forEach((menu: DotMenu) => {\n menu.menuItems.forEach((menuItem: DotMenuItem) => {\n if (menuItem.id === portletId) {\n res = [\n {\n label: menu.name,\n url: `#/${menu.menuItems[0].menuLink}`\n },\n {\n label: menuItem.label,\n url: `#/${menuItem.menuLink}`\n }\n ];\n }\n });\n });\n\n return res;\n }),\n take(1)\n );\n }\n\n private getCrumbtrailSection(sectionKey: string): string {\n const data: Data = this.getData();\n let currentData: any = data;\n\n if (Object.keys(data).length) {\n this.portletsTitlePathFinder[sectionKey]\n .split('.')\n .forEach((key) => (currentData = currentData[key]));\n return currentData;\n }\n return null;\n }\n\n private getData(): Data {\n let data = {};\n let lastChild = this.activeRoute.root;\n\n do {\n lastChild = lastChild.firstChild;\n data = Object.assign(data, lastChild.data['value']);\n } while (lastChild.firstChild !== null);\n\n return data;\n }\n\n private getCrumbtrail(url: string): Observable {\n const sections: string[] = this.splitURL(url);\n const portletId = replaceSectionsMap[sections[0]] || sections[0];\n\n return this.getMenuLabel(portletId).pipe(\n map((crumbTrail: DotCrumb[]) => {\n if (this.shouldAddSection(sections, url)) {\n const sectionLabel = this.getCrumbtrailSection(sections[0]);\n\n crumbTrail.push({\n label: sectionLabel ? sectionLabel : sections[1],\n url: ''\n });\n }\n\n return crumbTrail;\n })\n );\n }\n\n private shouldAddSection(sections: String[], url: string): boolean {\n return sections.length > 1 && this.isPortletTitleAvailable(url);\n }\n\n private isPortletTitleAvailable(url: string): boolean {\n const sections: string[] = this.splitURL(url);\n return !!this.portletsTitlePathFinder[sections[0]];\n }\n}\n\nexport interface DotCrumb {\n label: string;\n url: string;\n}\n", + "properties": [ + { + "name": "label", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 140 + }, + { + "name": "url", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 141 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotCurrentUser", + "id": "interface-DotCurrentUser-17daf33d8d993d93f20caf0a04c274b20a9eac54abfd2ff06165a5b92c4e7ac2b9d8b06fce748cd47a769d67cdc3ad2d4e26d19e525fcb3141e1314cde72ffba", + "file": "apps/dotcms-ui/src/app/shared/models/dot-current-user/dot-current-user.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export enum UserPermissions {\n READ = 'READ',\n WRITE = 'WRITE'\n}\n\nexport enum PermissionsType {\n HTMLPAGES = 'HTMLPAGES',\n CONTAINERS = 'CONTAINERS',\n FOLDERS = 'FOLDERS',\n LINKS = 'LINKS',\n TEMPLATES = 'TEMPLATES',\n TEMPLATE_LAYOUTS = 'TEMPLATE_LAYOUTS',\n STRUCTURES = 'STRUCTURES',\n CONTENTLETS = 'CONTENTLETS',\n CATEGORY = 'CATEGORY',\n RULES = 'RULES'\n}\n\n/**\n * Interface for current users.\n *\n * @interface\n */\nexport interface DotCurrentUser {\n email: string;\n givenName: string;\n roleId: string;\n surnaname: string;\n userId: string;\n}\n\nexport interface DotPermissionsType {\n [key: string]: {\n canRead?: boolean;\n canWrite?: boolean;\n };\n}\n", + "properties": [ + { + "name": "email", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 25 + }, + { + "name": "givenName", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 26 + }, + { + "name": "roleId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 27 + }, + { + "name": "surnaname", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 28 + }, + { + "name": "userId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 29 + } + ], + "indexSignatures": [], + "kind": 165, + "description": "

Interface for current users.

\n", + "rawdescription": "\n\nInterface for current users.\n\n", + "methods": [] + }, + { + "name": "DotDateSlot", + "id": "interface-DotDateSlot-be0e07510439e3569f63e4d48b308ed4f0c5ee4dfeba48ee728adb417cd480329c42edadcdc011acea8ff443a325d77d90801027f8bcc93b46f80ed2eace16ff", + "file": "libs/dotcms-field-elements/src/models/dot-date-slot.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotDateSlot {\n date: string;\n time: string;\n}\n", + "properties": [ + { + "name": "date", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 2 + }, + { + "name": "time", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 3 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotDateSlot", + "id": "interface-DotDateSlot-be0e07510439e3569f63e4d48b308ed4f0c5ee4dfeba48ee728adb417cd480329c42edadcdc011acea8ff443a325d77d90801027f8bcc93b46f80ed2eace16ff-1", + "file": "libs/dotcms-webcomponents/src/models/dot-date-slot.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotDateSlot {\n date: string;\n time: string;\n}\n", + "properties": [ + { + "name": "date", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 2 + }, + { + "name": "time", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 3 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [], + "isDuplicate": true, + "duplicateId": 1, + "duplicateName": "DotDateSlot-1" + }, + { + "name": "DotDevice", + "id": "interface-DotDevice-14e4b124916c1fdc330fed7e6b7dfc2228810f2dac62a19e52c47736b55bbac9793f9a9f1120b4c6e68ef99a1d3f111ba2a00be20df74a8b8c12b3c63ff5720d", + "file": "apps/dotcms-ui/src/app/shared/models/dot-device/dot-device.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotDevice {\n cssHeight: string;\n cssWidth: string;\n name: string;\n inode: string;\n}\n", + "properties": [ + { + "name": "cssHeight", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 2 + }, + { + "name": "cssWidth", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 3 + }, + { + "name": "inode", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 5 + }, + { + "name": "name", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 4 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotDialogActions", + "id": "interface-DotDialogActions-caef8504346e88ab3c1bc23cf1666d4180baa8f93da266196a54cd3168baaf8443d6fa1841294b775b09bbfa21c5255062e3a28a650eb37ac845057ad0433143", + "file": "apps/dotcms-ui/src/app/view/components/dot-dialog/dot-dialog.component.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import {\n Component,\n Input,\n EventEmitter,\n Output,\n HostBinding,\n ViewChild,\n ElementRef,\n OnChanges,\n SimpleChanges\n} from '@angular/core';\nimport { fromEvent, Subscription } from 'rxjs';\nimport { filter } from 'rxjs/operators';\n\n@Component({\n selector: 'dot-dialog',\n templateUrl: './dot-dialog.component.html',\n styleUrls: ['./dot-dialog.component.scss']\n})\nexport class DotDialogComponent implements OnChanges {\n @ViewChild('dialog') dialog: ElementRef;\n\n @Input()\n @HostBinding('class.active')\n visible: boolean;\n\n @Input() header = '';\n\n @Input() actions: DotDialogActions;\n\n @Input() closeable = true;\n\n @Input() cssClass: string;\n\n @Input()\n contentStyle: {\n [key: string]: string;\n };\n\n @Input()\n headerStyle: {\n [key: string]: string;\n };\n\n @Input() width: string;\n\n @Input() height: string;\n\n @Input() hideButtons: boolean;\n\n @Input() appendToBody = false;\n\n @Input() bindEvents = true;\n\n @Output() hide: EventEmitter = new EventEmitter();\n\n @Output()\n beforeClose: EventEmitter<{\n close: () => void;\n }> = new EventEmitter();\n\n @Output() visibleChange: EventEmitter = new EventEmitter();\n\n isContentScrolled: boolean;\n\n private subscription: Subscription[] = [];\n\n constructor(private el: ElementRef) {}\n\n ngOnChanges(changes: SimpleChanges) {\n if (this.isVisible(changes)) {\n if (this.bindEvents) {\n this.bindKeydown();\n }\n this.appendContainer();\n }\n }\n\n /**\n * Accept button handler\n *\n * @memberof DotDialogComponent\n */\n acceptAction(): void {\n if (this.actions && this.canTriggerAction(this.actions.accept)) {\n this.actions.accept.action(this);\n this.unBindEvents();\n }\n }\n\n /**\n * Cancel button handler\n *\n * @memberof DotDialogComponent\n */\n cancelAction(): void {\n if (this.actions && this.canTriggerAction(this.actions.cancel)) {\n this.actions.cancel.action(this);\n } else {\n this.close();\n }\n }\n\n /**\n * Close dialog\n *\n * @memberof DotDialogComponent\n */\n close($event?: MouseEvent): void {\n if (this.beforeClose.observers.length) {\n this.beforeClose.emit({\n close: () => {\n this.handleClose();\n }\n });\n } else {\n this.handleClose();\n }\n\n if ($event) {\n $event.preventDefault();\n }\n }\n\n /**\n * Handle scroll event in the content\n *\n * @param {{ target: HTMLInputElement }} event\n * @memberof DotDialogComponent\n */\n onContentScroll(event: { target: HTMLInputElement }) {\n /*\n Absolute positioned overlays panels (in dropdowns, menus, etc...) inside the\n dialog content needs to be append to the body, this click is to hide them on\n scroll because they mantain their position relative to the body.\n */\n event.target.click();\n\n this.isContentScrolled = event.target.scrollTop > 0;\n }\n\n private bindKeydown(): void {\n this.subscription.push(\n fromEvent(document, 'keydown').subscribe(this.handleKeyboardEvents.bind(this))\n );\n\n this.subscription.push(\n fromEvent(this.el.nativeElement, 'click')\n .pipe(\n filter((event: MouseEvent) => {\n const el = event.target;\n return el.localName !== 'dot-dialog' && el.classList.contains('active');\n })\n )\n .subscribe(this.close.bind(this))\n );\n }\n\n private canTriggerAction(item: DialogButton): boolean {\n return item && !item.disabled && !!item.action;\n }\n\n private handleClose(): void {\n this.visibleChange.emit(false);\n this.hide.emit();\n this.unBindEvents();\n }\n\n private handleKeyboardEvents(event: KeyboardEvent): void {\n switch (event.code) {\n case 'Escape':\n this.cancelAction();\n break;\n case 'Enter':\n this.acceptAction();\n break;\n default:\n break;\n }\n }\n\n private unBindEvents(): void {\n this.subscription.forEach((sub: Subscription) => {\n sub.unsubscribe();\n });\n }\n\n private appendContainer() {\n if (this.appendToBody) {\n document.body.appendChild(this.el.nativeElement);\n }\n }\n\n private isVisible(changes: SimpleChanges): boolean {\n return changes.visible && changes.visible.currentValue;\n }\n}\n\nexport interface DialogButton {\n action?: (dialog?: any) => void;\n disabled?: boolean;\n label: string;\n}\n\nexport interface DotDialogActions {\n accept?: DialogButton;\n cancel?: DialogButton;\n}\n", + "properties": [ + { + "name": "accept", + "deprecated": false, + "deprecationMessage": "", + "type": "DialogButton", + "optional": true, + "description": "", + "line": 206 + }, + { + "name": "cancel", + "deprecated": false, + "deprecationMessage": "", + "type": "DialogButton", + "optional": true, + "description": "", + "line": 207 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotEditorAction", + "id": "interface-DotEditorAction-ad64300f7ece5e08c38b9fb3bec577b9ece873dc704a29691d6952b03f937daa45976e558d82414f8e87507a7b460cb8f689d6ec5c2e21914e26fa1de24c488d", + "file": "apps/dotcms-ui/src/app/view/components/dot-contentlet-editor/services/dot-contentlet-editor.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { HttpErrorResponse } from '@angular/common/http';\nimport { CoreWebService } from '@dotcms/dotcms-js';\nimport { DotHttpErrorManagerService } from '@services/dot-http-error-manager/dot-http-error-manager.service';\nimport { Injectable } from '@angular/core';\nimport { Subject, Observable, of } from 'rxjs';\nimport { mergeMap, map, filter, catchError, pluck, take } from 'rxjs/operators';\nimport { DotCMSContentlet, DotCMSContentType } from '@dotcms/dotcms-models';\n\ninterface DotAddEditEvents {\n load?: ($event: any) => void;\n keyDown?: ($event: any) => void;\n}\n\nexport interface DotEditorAction {\n header?: string;\n data: {\n [key: string]: string;\n };\n events?: DotAddEditEvents;\n}\n\n/**\n * Handle the url and events for add and edit contentlet components\n *\n * @export\n * @class DotContentletEditorService\n */\n@Injectable()\nexport class DotContentletEditorService {\n close$: Subject = new Subject();\n draggedContentType$: Subject = new Subject();\n\n private data: Subject = new Subject();\n private _header: Subject = new Subject();\n private _load: ($event: any) => void;\n private _keyDown: ($event: KeyboardEvent) => void;\n\n constructor(\n private coreWebService: CoreWebService,\n private httpErrorManagerService: DotHttpErrorManagerService\n ) {}\n\n get addUrl$(): Observable {\n return this.data.pipe(\n filter((action: DotEditorAction) => this.isAddUrl(action)),\n map((action: DotEditorAction) => this.geAddtUrl(action))\n );\n }\n\n get editUrl$(): Observable {\n return this.data.pipe(\n filter((action: DotEditorAction) => this.isEditUrl(action)),\n mergeMap((action: DotEditorAction) => of(this.getEditUrl(action)))\n );\n }\n\n get createUrl$(): Observable {\n return this.data.pipe(\n filter((action: DotEditorAction) => this.isCreateUrl(action)),\n map((action: DotEditorAction) => this.getCreateUrl(action))\n );\n }\n\n get header$(): Observable {\n return this._header;\n }\n\n get loadHandler(): ($event: any) => void {\n return this._load;\n }\n\n get keyDownHandler(): ($event: any) => void {\n return this._keyDown;\n }\n\n /**\n * Set url to create a contentlet\n *\n * @param DotEditorAction action\n * @memberof DotContentletEditorService\n */\n create(action: DotEditorAction): void {\n this.setData(action);\n }\n\n /**\n * Set data to add a contentlet\n *\n * @param DotEditorAction action\n * @memberof DotAddContentletServicex\n */\n add(action: DotEditorAction): void {\n this.setData(action);\n }\n\n /**\n * Set data to edit a contentlet\n *\n * @param DotEditorAction action\n * @memberof DotContentletEditorService\n */\n edit(action: DotEditorAction): void {\n this.setData(action);\n }\n\n /**\n * Clear data to add a contentlet\n *\n * @memberof DotAddContentletService\n */\n clear() {\n this.data.next(null);\n this._load = null;\n this._keyDown = null;\n this.close$.next(true);\n }\n\n /**\n * Call keydown handler\n *\n * @param KeyboardEvent $event\n * @memberof DotContentletEditorService\n */\n keyDown($event: KeyboardEvent): void {\n if (this._keyDown) {\n this._keyDown($event);\n }\n }\n\n /**\n * Call load handler\n *\n * @param * $event\n * @memberof DotContentletEditorService\n */\n load($event: any): void {\n if (this._load) {\n this._load($event);\n }\n }\n\n /**\n * Returns action url to display create contentlet dialog\n * @param {string} contentTypeVariable\n * @returns Observable\n * @memberof DotContentletEditorService\n */\n getActionUrl(contentTypeVariable: string): Observable {\n return this.coreWebService\n .requestView({\n url: `v1/portlet/_actionurl/${contentTypeVariable}`\n })\n .pipe(\n pluck('entity'),\n catchError((error: HttpErrorResponse) => {\n return this.httpErrorManagerService.handle(error).pipe(\n take(1),\n map(() => null)\n );\n })\n );\n }\n\n /**\n * Set the content Type being dragged from the Content palette\n * @param {DotCMSContentType} contentType\n * @memberof DotContentletEditorService\n */\n setDraggedContentType(contentType: DotCMSContentType | DotCMSContentlet): void {\n this.draggedContentType$.next(contentType);\n }\n\n private bindEvents(events: DotAddEditEvents): void {\n if (events.load) {\n this._load = events.load;\n }\n if (events.keyDown) {\n this._keyDown = events.keyDown;\n }\n }\n\n private geAddtUrl(action: DotEditorAction): string {\n return action === null\n ? ''\n : `/html/ng-contentlet-selector.jsp?ng=true&container_id=${action.data.container}&add=${action.data.baseTypes}`;\n }\n\n private getCreateUrl(action: DotEditorAction): string {\n return action === null ? '' : action.data.url;\n }\n\n private getEditUrl(action: DotEditorAction): string {\n return action === null\n ? ''\n : [\n `/c/portal/layout`,\n `?p_p_id=content`,\n `&p_p_action=1`,\n `&p_p_state=maximized`,\n `&p_p_mode=view`,\n `&_content_struts_action=%2Fext%2Fcontentlet%2Fedit_contentlet`,\n `&_content_cmd=edit&inode=${action.data.inode}`\n ].join('');\n }\n\n private isAddUrl(action: DotEditorAction): boolean {\n return action === null || !!action.data.container;\n }\n\n private isCreateUrl(action: DotEditorAction): boolean {\n return action === null || !!action.data.url;\n }\n\n private isEditUrl(action: DotEditorAction): boolean {\n return action === null || !!action.data.inode;\n }\n\n private setData(action: DotEditorAction): void {\n if (action.events) {\n this.bindEvents(action.events);\n }\n\n if (action.header) {\n this._header.next(action.header);\n }\n\n this.data.next({\n data: action.data\n });\n }\n}\n", + "properties": [ + { + "name": "data", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": false, + "description": "", + "line": 16 + }, + { + "name": "events", + "deprecated": false, + "deprecationMessage": "", + "type": "DotAddEditEvents", + "optional": true, + "description": "", + "line": 19 + }, + { + "name": "header", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 15 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotEditPageNavItem", + "id": "interface-DotEditPageNavItem-a4d2f9de1529c55044436e233341477c9224946f7ddce15119952731f70eeb0168f1b830782a8003983eec3195512ebd7b62238012876471b618712752b38b30", + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/main/dot-edit-page-nav/dot-edit-page-nav.component.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Component, Input, OnChanges, SimpleChanges } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\n\nimport { of as observableOf, Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\nimport * as _ from 'lodash';\n\nimport { DotTemplate } from '@shared/models/dot-edit-layout-designer';\nimport { DotMessageService } from '@services/dot-message/dot-messages.service';\nimport { DotLicenseService } from '@services/dot-license/dot-license.service';\nimport { DotContentletEditorService } from '@components/dot-contentlet-editor/services/dot-contentlet-editor.service';\nimport { DotPageRenderState } from '@portlets/dot-edit-page/shared/models';\nimport { DotPageRender } from '@models/dot-page/dot-rendered-page.model';\n\ninterface DotEditPageNavItem {\n action?: (inode: string) => void;\n disabled: boolean;\n icon: string;\n label: string;\n link?: string;\n needsEntepriseLicense: boolean;\n tooltip?: string;\n}\n\n@Component({\n selector: 'dot-edit-page-nav',\n templateUrl: './dot-edit-page-nav.component.html',\n styleUrls: ['./dot-edit-page-nav.component.scss']\n})\nexport class DotEditPageNavComponent implements OnChanges {\n @Input() pageState: DotPageRenderState;\n\n isEnterpriseLicense: boolean;\n model: Observable;\n\n constructor(\n private dotLicenseService: DotLicenseService,\n private dotContentletEditorService: DotContentletEditorService,\n private dotMessageService: DotMessageService,\n public route: ActivatedRoute\n ) {}\n\n ngOnChanges(changes: SimpleChanges): void {\n if (this.layoutChanged(changes)) {\n this.model = !this.model\n ? this.loadNavItems()\n : observableOf(this.getNavItems(this.pageState, this.isEnterpriseLicense));\n }\n }\n\n private layoutChanged(changes: SimpleChanges): boolean {\n return changes.pageState.firstChange\n ? true\n : !_.isEqual(\n changes.pageState.currentValue.layout,\n changes.pageState.previousValue.layout\n );\n }\n\n private loadNavItems(): Observable {\n return this.dotLicenseService.isEnterprise().pipe(\n map((isEnterpriseLicense: boolean) => {\n this.isEnterpriseLicense = isEnterpriseLicense;\n return this.getNavItems(this.pageState, isEnterpriseLicense);\n })\n );\n }\n\n private canGoToLayout(dotRenderedPage: DotPageRender): boolean {\n // Right now we only allowing users to edit layout, so no templates or advanced template can be edit from here.\n // https://github.com/dotCMS/core-web/pull/589\n return dotRenderedPage.page.canEdit && dotRenderedPage.template.drawed;\n }\n\n private getNavItems(\n dotRenderedPage: DotPageRender,\n enterpriselicense: boolean\n ): DotEditPageNavItem[] {\n return [\n {\n needsEntepriseLicense: false,\n disabled: false,\n icon: 'insert_drive_file',\n label: this.dotMessageService.get('editpage.toolbar.nav.content'),\n link: 'content'\n },\n this.getLayoutNavItem(dotRenderedPage, enterpriselicense),\n this.getRulesNavItem(dotRenderedPage, enterpriselicense),\n {\n needsEntepriseLicense: false,\n disabled: false,\n icon: 'more_horiz',\n label: this.dotMessageService.get('editpage.toolbar.nav.properties'),\n action: (inode: string) => {\n this.dotContentletEditorService.edit({\n data: {\n inode: inode\n }\n });\n }\n }\n ];\n }\n\n private getLayoutNavItem(\n dotRenderedPage: DotPageRender,\n enterpriselicense: boolean\n ): DotEditPageNavItem {\n // Right now we only allowing users to edit layout, so no templates or advanced template can be edit from here.\n // https://github.com/dotCMS/core-web/pull/589\n return {\n needsEntepriseLicense: !enterpriselicense,\n disabled: !this.canGoToLayout(dotRenderedPage),\n icon: 'view_quilt',\n label: this.getTemplateItemLabel(dotRenderedPage.template),\n link: 'layout',\n tooltip: dotRenderedPage.template.drawed\n ? null\n : this.dotMessageService.get('editpage.toolbar.nav.layout.advance.disabled')\n };\n }\n\n private getRulesNavItem(\n dotRenderedPage: DotPageRender,\n enterpriselicense: boolean\n ): DotEditPageNavItem {\n // Right now we only allowing users to edit layout, so no templates or advanced template can be edit from here.\n // https://github.com/dotCMS/core-web/pull/589\n return {\n needsEntepriseLicense: !enterpriselicense,\n disabled: false,\n icon: 'tune',\n label: this.dotMessageService.get('editpage.toolbar.nav.rules'),\n link: `rules/${dotRenderedPage.page.identifier}`\n };\n }\n\n private getTemplateItemLabel(template: DotTemplate): string {\n return this.dotMessageService.get(\n !template ? 'editpage.toolbar.nav.layout' : 'editpage.toolbar.nav.layout'\n );\n }\n}\n", + "properties": [ + { + "name": "action", + "deprecated": false, + "deprecationMessage": "", + "type": "function", + "optional": true, + "description": "", + "line": 16 + }, + { + "name": "disabled", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 17 + }, + { + "name": "icon", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 18 + }, + { + "name": "label", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 19 + }, + { + "name": "link", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 20 + }, + { + "name": "needsEntepriseLicense", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 21 + }, + { + "name": "tooltip", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 22 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotEditPageState", + "id": "interface-DotEditPageState-572b920b1e78de37f817a4f78ce466c956d2bd244e16cc727caf8a95f0f19faa64c81a7112820642292fff1341384de88ceda4cf2838d865aab0f4e993b5d286", + "file": "apps/dotcms-ui/src/app/shared/models/dot-edit-page-state/dot-edit-page-state.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotPageMode } from '@models/dot-page/dot-page-mode.enum';\n\nexport interface DotEditPageState {\n locked?: boolean;\n mode?: DotPageMode;\n}\n", + "properties": [ + { + "name": "locked", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 4 + }, + { + "name": "mode", + "deprecated": false, + "deprecationMessage": "", + "type": "DotPageMode", + "optional": true, + "description": "", + "line": 5 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotEditPageViewAs", + "id": "interface-DotEditPageViewAs-ef2127e3a4ce1a2e09935e43dc0929505987782ef6287b074c52e1696ba7c6d7d213b0dd5f0a31c92ad175ca39d00a3ae211509c9cff8bef391caeeeb8418650", + "file": "apps/dotcms-ui/src/app/shared/models/dot-edit-page-view-as/dot-edit-page-view-as.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotDevice } from '../dot-device/dot-device.model';\nimport { DotPersona } from '../dot-persona/dot-persona.model';\nimport { DotPageMode } from '@models/dot-page/dot-page-mode.enum';\n\nexport interface DotEditPageViewAs {\n persona?: DotPersona;\n language?: number;\n device?: DotDevice;\n mode: DotPageMode;\n}\n", + "properties": [ + { + "name": "device", + "deprecated": false, + "deprecationMessage": "", + "type": "DotDevice", + "optional": true, + "description": "", + "line": 8 + }, + { + "name": "language", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 7 + }, + { + "name": "mode", + "deprecated": false, + "deprecationMessage": "", + "type": "DotPageMode", + "optional": false, + "description": "", + "line": 9 + }, + { + "name": "persona", + "deprecated": false, + "deprecationMessage": "", + "type": "DotPersona", + "optional": true, + "description": "", + "line": 6 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotEditPopupButton", + "id": "interface-DotEditPopupButton-ee5dfd327371d367a53be91ed93a476ab4c85c2d43bbbfba506bfa14264b564ee64cb2c7b716b203446f66311452234c3a8f57eb6b4be464edd8bc05e9be29e1", + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/html/dot-edit-content-toolbar-html.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Injectable } from '@angular/core';\nimport { DotMessageService } from '@services/dot-message/dot-messages.service';\nimport { DotDOMHtmlUtilService } from './dot-dom-html-util.service';\nimport { DotLicenseService } from '@services/dot-license/dot-license.service';\nimport { take } from 'rxjs/operators';\n\ninterface DotEditPopupMenuItem {\n label: string;\n disabled?: boolean;\n tooltip?: string;\n dataset: {\n [propName: string]: string;\n };\n}\n\ninterface DotEditPopupButton {\n label: string;\n class?: string;\n}\n\ninterface DotEditPopupMenu {\n button: DotEditPopupButton;\n items?: DotEditPopupMenuItem[];\n}\n\nenum ValidationError {\n EnterpriseLicenseError,\n MaxContentletsLimitReachedError\n}\n\n/**\n * Service to generate the markup related with the Toolbars and sub-menu for containers.\n */\n@Injectable()\nexport class DotEditContentToolbarHtmlService {\n isEnterpriseLicense: boolean;\n\n constructor(\n private dotMessageService: DotMessageService,\n private dotDOMHtmlUtilService: DotDOMHtmlUtilService,\n private dotLicenseService: DotLicenseService\n ) {}\n\n /**\n * Add custom HTML buttons to the containers div\n *\n * @param Document doc\n * @memberof DotEditContentToolbarHtmlService\n */\n addContainerToolbar(doc: Document): void {\n this.dotLicenseService\n .isEnterprise()\n .pipe(take(1))\n .subscribe((isEnterpriseLicense: boolean) => {\n this.isEnterpriseLicense = isEnterpriseLicense;\n\n const containers = Array.from(\n doc.querySelectorAll('[data-dot-object=\"container\"]')\n );\n containers.forEach((container: HTMLElement) => {\n this.createContainerToolbar(container);\n });\n });\n }\n\n /**\n * Updates DOM with updated version of a specific Container toolbar\n *\n * @param HTMLElement container\n * @memberof DotEditContentToolbarHtmlService\n */\n updateContainerToolbar(container: HTMLElement): void {\n if (container.parentNode) {\n const toolbar = container.parentNode.querySelector(\n `[data-dot-container-inode=\"${container.dataset['dotInode']}\"]`\n );\n container.parentNode.removeChild(toolbar);\n this.createContainerToolbar(container);\n }\n }\n\n /**\n * Bind event to the document to add the contentlet toolbar on contentlet element mouseover\n *\n * @param {Document} doc\n * @memberof DotEditContentToolbarHtmlService\n */\n bindContentletEvents(doc: Document): void {\n doc.addEventListener('mouseover', (e) => {\n const contentlet: HTMLElement = (e.target as Element).closest(\n '[data-dot-object=\"contentlet\"]:not([data-dot-toolbar=\"true\"]'\n );\n\n if (contentlet) {\n contentlet.setAttribute('data-dot-toolbar', 'true');\n this.addToolbarToContentlet(contentlet);\n }\n });\n }\n\n /**\n * Return the HTML of the buttons for the contentlets\n *\n * @param {{ [key: string]: any }} contentletDataset\n * @returns {string}\n * @memberof DotEditContentToolbarHtmlService\n */\n getContentButton(contentletDataset: { [key: string]: any }): string {\n const identifier: string = contentletDataset.dotIdentifier;\n const inode: string = contentletDataset.dotInode;\n const canEdit: boolean = contentletDataset.dotCanEdit === 'true';\n const isForm: boolean = contentletDataset.dotBasetype === 'FORM';\n\n const dataset = {\n 'dot-identifier': identifier,\n 'dot-inode': inode\n };\n\n let editButtonClass = 'dotedit-contentlet__edit';\n editButtonClass += !canEdit || isForm ? ' dotedit-contentlet__disabled' : '';\n\n return `\n ${this.dotDOMHtmlUtilService.getButtomHTML(\n this.dotMessageService.get('editpage.content.contentlet.menu.drag'),\n 'dotedit-contentlet__drag',\n {\n ...dataset,\n 'dot-object': 'drag-content'\n }\n )}\n ${this.dotDOMHtmlUtilService.getButtomHTML(\n this.dotMessageService.get('editpage.content.contentlet.menu.edit'),\n editButtonClass,\n {\n ...dataset,\n 'dot-object': 'edit-content'\n }\n )}\n ${this.dotDOMHtmlUtilService.getButtomHTML(\n this.dotMessageService.get('editpage.content.contentlet.menu.remove'),\n 'dotedit-contentlet__remove',\n {\n ...dataset,\n 'dot-object': 'remove-content'\n }\n )}\n `;\n }\n\n /**\n * Returns the html for the edit vlt buttons\n *\n * @param {HTMLElement[]} vtls\n * @returns {string}\n * @memberof DotEditContentToolbarHtmlService\n */\n getEditVtlButtons(vtls: HTMLElement[]): string {\n return this.getDotEditPopupMenuHtml({\n button: {\n label: this.dotMessageService.get('editpage.content.container.action.edit.vtl'),\n class: 'dotedit-contentlet__code'\n },\n items: vtls.map((vtl: HTMLElement) => {\n return {\n disabled: vtl.dataset.dotCanEdit === 'false',\n label: vtl.dataset.dotUrl.split('/').slice(-1)[0],\n dataset: {\n action: 'code',\n inode: vtl.dataset.dotInode\n }\n };\n })\n });\n }\n\n private addToolbarToContentlet(contentlet: HTMLElement) {\n const contentletToolbar = document.createElement('div');\n contentletToolbar.classList.add('dotedit-contentlet__toolbar');\n\n const vtls: HTMLElement[] = Array.from(\n contentlet.querySelectorAll('[data-dot-object=\"vtl-file\"]')\n );\n\n if (vtls.length) {\n contentletToolbar.innerHTML += this.getEditVtlButtons(vtls);\n }\n\n contentletToolbar.innerHTML += this.getContentButton(contentlet.dataset);\n\n contentlet.insertAdjacentElement('afterbegin', contentletToolbar);\n }\n\n private createContainerToolbar(container: HTMLElement) {\n const containerToolbar = document.createElement('div');\n containerToolbar.classList.add('dotedit-container__toolbar');\n containerToolbar.setAttribute('data-dot-container-inode', container.dataset['dotInode']);\n\n if (!container.dataset.dotCanAdd.length) {\n container.classList.add('disabled');\n }\n\n containerToolbar.innerHTML = this.getContainerToolbarHtml(container);\n container.parentNode.insertBefore(containerToolbar, container);\n }\n\n private getContainerToolbarHtml(container: HTMLElement): string {\n return this.getDotEditPopupMenuHtml({\n button: {\n label: `${this.dotMessageService.get('editpage.content.container.action.add')}`,\n class: 'dotedit-container__add'\n },\n items: container.dataset.dotCanAdd\n .split(',')\n .filter((item: string) => item.length)\n .map((item: string) => {\n item = item.toLowerCase();\n const validationError: ValidationError = this.getContentletValidationError(\n item,\n container\n );\n return {\n label: this.dotMessageService.get(\n `editpage.content.container.menu.${item}`\n ),\n dataset: {\n action: 'add',\n add: item,\n identifier: container.dataset.dotIdentifier,\n uuid: container.dataset.dotUuid\n },\n disabled:\n validationError === ValidationError.EnterpriseLicenseError ||\n validationError === ValidationError.MaxContentletsLimitReachedError,\n tooltip: this.getTooltipErrorMessage(validationError)\n };\n })\n });\n }\n\n private getContentletValidationError(item: string, container: HTMLElement): ValidationError {\n if (item === 'form' && !this.isEnterpriseLicense) {\n return ValidationError.EnterpriseLicenseError;\n } else if (this.isMaxContentletsLimitReached(container)) {\n return ValidationError.MaxContentletsLimitReachedError;\n }\n }\n\n private isMaxContentletsLimitReached(container: HTMLElement): boolean {\n const contentletsSize = Array.from(\n container.querySelectorAll('[data-dot-object=\"contentlet\"]')\n ).length;\n return parseInt(container.dataset.maxContentlets, 10) <= contentletsSize;\n }\n\n private getTooltipErrorMessage(validationError: ValidationError): string {\n let errorMsg = '';\n if (validationError === ValidationError.EnterpriseLicenseError) {\n errorMsg = this.dotMessageService.get('dot.common.license.enterprise.only.error');\n } else if (validationError === ValidationError.MaxContentletsLimitReachedError) {\n errorMsg = this.dotMessageService.get('dot.common.contentlet.max.limit.error');\n }\n\n return errorMsg;\n }\n\n private getDotEditPopupMenuHtml(menu: DotEditPopupMenu): string {\n const isMenuItems = menu.items.length > 0;\n\n let result = '
';\n\n result += this.getDotEditPopupMenuButton(menu.button, !isMenuItems);\n\n if (isMenuItems) {\n result += this.getDotEditPopupMenuList(menu.items);\n }\n\n result += '
';\n\n return result;\n }\n\n private getDotEditPopupMenuButton(button: DotEditPopupButton, disabled = false): string {\n return `\n \n \n `;\n }\n\n private getDotEditPopupMenuList(items: DotEditPopupMenuItem[]): string {\n return `\n
    \n ${items\n .map((item: DotEditPopupMenuItem) => {\n return `\n
  • \n \n ${item.label}\n \n
  • \n `;\n })\n .join('')}\n
\n `;\n }\n\n private getDotEditPopupMenuItemDataSet(datasets: { [propName: string]: string }): string {\n return Object.keys(datasets)\n .map((key) => `data-dot-${key}=\"${datasets[key]}\"`)\n .join(' ');\n }\n}\n", + "properties": [ + { + "name": "class", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 18 + }, + { + "name": "label", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 17 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotEditPopupMenu", + "id": "interface-DotEditPopupMenu-ee5dfd327371d367a53be91ed93a476ab4c85c2d43bbbfba506bfa14264b564ee64cb2c7b716b203446f66311452234c3a8f57eb6b4be464edd8bc05e9be29e1", + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/html/dot-edit-content-toolbar-html.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Injectable } from '@angular/core';\nimport { DotMessageService } from '@services/dot-message/dot-messages.service';\nimport { DotDOMHtmlUtilService } from './dot-dom-html-util.service';\nimport { DotLicenseService } from '@services/dot-license/dot-license.service';\nimport { take } from 'rxjs/operators';\n\ninterface DotEditPopupMenuItem {\n label: string;\n disabled?: boolean;\n tooltip?: string;\n dataset: {\n [propName: string]: string;\n };\n}\n\ninterface DotEditPopupButton {\n label: string;\n class?: string;\n}\n\ninterface DotEditPopupMenu {\n button: DotEditPopupButton;\n items?: DotEditPopupMenuItem[];\n}\n\nenum ValidationError {\n EnterpriseLicenseError,\n MaxContentletsLimitReachedError\n}\n\n/**\n * Service to generate the markup related with the Toolbars and sub-menu for containers.\n */\n@Injectable()\nexport class DotEditContentToolbarHtmlService {\n isEnterpriseLicense: boolean;\n\n constructor(\n private dotMessageService: DotMessageService,\n private dotDOMHtmlUtilService: DotDOMHtmlUtilService,\n private dotLicenseService: DotLicenseService\n ) {}\n\n /**\n * Add custom HTML buttons to the containers div\n *\n * @param Document doc\n * @memberof DotEditContentToolbarHtmlService\n */\n addContainerToolbar(doc: Document): void {\n this.dotLicenseService\n .isEnterprise()\n .pipe(take(1))\n .subscribe((isEnterpriseLicense: boolean) => {\n this.isEnterpriseLicense = isEnterpriseLicense;\n\n const containers = Array.from(\n doc.querySelectorAll('[data-dot-object=\"container\"]')\n );\n containers.forEach((container: HTMLElement) => {\n this.createContainerToolbar(container);\n });\n });\n }\n\n /**\n * Updates DOM with updated version of a specific Container toolbar\n *\n * @param HTMLElement container\n * @memberof DotEditContentToolbarHtmlService\n */\n updateContainerToolbar(container: HTMLElement): void {\n if (container.parentNode) {\n const toolbar = container.parentNode.querySelector(\n `[data-dot-container-inode=\"${container.dataset['dotInode']}\"]`\n );\n container.parentNode.removeChild(toolbar);\n this.createContainerToolbar(container);\n }\n }\n\n /**\n * Bind event to the document to add the contentlet toolbar on contentlet element mouseover\n *\n * @param {Document} doc\n * @memberof DotEditContentToolbarHtmlService\n */\n bindContentletEvents(doc: Document): void {\n doc.addEventListener('mouseover', (e) => {\n const contentlet: HTMLElement = (e.target as Element).closest(\n '[data-dot-object=\"contentlet\"]:not([data-dot-toolbar=\"true\"]'\n );\n\n if (contentlet) {\n contentlet.setAttribute('data-dot-toolbar', 'true');\n this.addToolbarToContentlet(contentlet);\n }\n });\n }\n\n /**\n * Return the HTML of the buttons for the contentlets\n *\n * @param {{ [key: string]: any }} contentletDataset\n * @returns {string}\n * @memberof DotEditContentToolbarHtmlService\n */\n getContentButton(contentletDataset: { [key: string]: any }): string {\n const identifier: string = contentletDataset.dotIdentifier;\n const inode: string = contentletDataset.dotInode;\n const canEdit: boolean = contentletDataset.dotCanEdit === 'true';\n const isForm: boolean = contentletDataset.dotBasetype === 'FORM';\n\n const dataset = {\n 'dot-identifier': identifier,\n 'dot-inode': inode\n };\n\n let editButtonClass = 'dotedit-contentlet__edit';\n editButtonClass += !canEdit || isForm ? ' dotedit-contentlet__disabled' : '';\n\n return `\n ${this.dotDOMHtmlUtilService.getButtomHTML(\n this.dotMessageService.get('editpage.content.contentlet.menu.drag'),\n 'dotedit-contentlet__drag',\n {\n ...dataset,\n 'dot-object': 'drag-content'\n }\n )}\n ${this.dotDOMHtmlUtilService.getButtomHTML(\n this.dotMessageService.get('editpage.content.contentlet.menu.edit'),\n editButtonClass,\n {\n ...dataset,\n 'dot-object': 'edit-content'\n }\n )}\n ${this.dotDOMHtmlUtilService.getButtomHTML(\n this.dotMessageService.get('editpage.content.contentlet.menu.remove'),\n 'dotedit-contentlet__remove',\n {\n ...dataset,\n 'dot-object': 'remove-content'\n }\n )}\n `;\n }\n\n /**\n * Returns the html for the edit vlt buttons\n *\n * @param {HTMLElement[]} vtls\n * @returns {string}\n * @memberof DotEditContentToolbarHtmlService\n */\n getEditVtlButtons(vtls: HTMLElement[]): string {\n return this.getDotEditPopupMenuHtml({\n button: {\n label: this.dotMessageService.get('editpage.content.container.action.edit.vtl'),\n class: 'dotedit-contentlet__code'\n },\n items: vtls.map((vtl: HTMLElement) => {\n return {\n disabled: vtl.dataset.dotCanEdit === 'false',\n label: vtl.dataset.dotUrl.split('/').slice(-1)[0],\n dataset: {\n action: 'code',\n inode: vtl.dataset.dotInode\n }\n };\n })\n });\n }\n\n private addToolbarToContentlet(contentlet: HTMLElement) {\n const contentletToolbar = document.createElement('div');\n contentletToolbar.classList.add('dotedit-contentlet__toolbar');\n\n const vtls: HTMLElement[] = Array.from(\n contentlet.querySelectorAll('[data-dot-object=\"vtl-file\"]')\n );\n\n if (vtls.length) {\n contentletToolbar.innerHTML += this.getEditVtlButtons(vtls);\n }\n\n contentletToolbar.innerHTML += this.getContentButton(contentlet.dataset);\n\n contentlet.insertAdjacentElement('afterbegin', contentletToolbar);\n }\n\n private createContainerToolbar(container: HTMLElement) {\n const containerToolbar = document.createElement('div');\n containerToolbar.classList.add('dotedit-container__toolbar');\n containerToolbar.setAttribute('data-dot-container-inode', container.dataset['dotInode']);\n\n if (!container.dataset.dotCanAdd.length) {\n container.classList.add('disabled');\n }\n\n containerToolbar.innerHTML = this.getContainerToolbarHtml(container);\n container.parentNode.insertBefore(containerToolbar, container);\n }\n\n private getContainerToolbarHtml(container: HTMLElement): string {\n return this.getDotEditPopupMenuHtml({\n button: {\n label: `${this.dotMessageService.get('editpage.content.container.action.add')}`,\n class: 'dotedit-container__add'\n },\n items: container.dataset.dotCanAdd\n .split(',')\n .filter((item: string) => item.length)\n .map((item: string) => {\n item = item.toLowerCase();\n const validationError: ValidationError = this.getContentletValidationError(\n item,\n container\n );\n return {\n label: this.dotMessageService.get(\n `editpage.content.container.menu.${item}`\n ),\n dataset: {\n action: 'add',\n add: item,\n identifier: container.dataset.dotIdentifier,\n uuid: container.dataset.dotUuid\n },\n disabled:\n validationError === ValidationError.EnterpriseLicenseError ||\n validationError === ValidationError.MaxContentletsLimitReachedError,\n tooltip: this.getTooltipErrorMessage(validationError)\n };\n })\n });\n }\n\n private getContentletValidationError(item: string, container: HTMLElement): ValidationError {\n if (item === 'form' && !this.isEnterpriseLicense) {\n return ValidationError.EnterpriseLicenseError;\n } else if (this.isMaxContentletsLimitReached(container)) {\n return ValidationError.MaxContentletsLimitReachedError;\n }\n }\n\n private isMaxContentletsLimitReached(container: HTMLElement): boolean {\n const contentletsSize = Array.from(\n container.querySelectorAll('[data-dot-object=\"contentlet\"]')\n ).length;\n return parseInt(container.dataset.maxContentlets, 10) <= contentletsSize;\n }\n\n private getTooltipErrorMessage(validationError: ValidationError): string {\n let errorMsg = '';\n if (validationError === ValidationError.EnterpriseLicenseError) {\n errorMsg = this.dotMessageService.get('dot.common.license.enterprise.only.error');\n } else if (validationError === ValidationError.MaxContentletsLimitReachedError) {\n errorMsg = this.dotMessageService.get('dot.common.contentlet.max.limit.error');\n }\n\n return errorMsg;\n }\n\n private getDotEditPopupMenuHtml(menu: DotEditPopupMenu): string {\n const isMenuItems = menu.items.length > 0;\n\n let result = '
';\n\n result += this.getDotEditPopupMenuButton(menu.button, !isMenuItems);\n\n if (isMenuItems) {\n result += this.getDotEditPopupMenuList(menu.items);\n }\n\n result += '
';\n\n return result;\n }\n\n private getDotEditPopupMenuButton(button: DotEditPopupButton, disabled = false): string {\n return `\n \n \n `;\n }\n\n private getDotEditPopupMenuList(items: DotEditPopupMenuItem[]): string {\n return `\n
    \n ${items\n .map((item: DotEditPopupMenuItem) => {\n return `\n
  • \n \n ${item.label}\n \n
  • \n `;\n })\n .join('')}\n
\n `;\n }\n\n private getDotEditPopupMenuItemDataSet(datasets: { [propName: string]: string }): string {\n return Object.keys(datasets)\n .map((key) => `data-dot-${key}=\"${datasets[key]}\"`)\n .join(' ');\n }\n}\n", + "properties": [ + { + "name": "button", + "deprecated": false, + "deprecationMessage": "", + "type": "DotEditPopupButton", + "optional": false, + "description": "", + "line": 22 + }, + { + "name": "items", + "deprecated": false, + "deprecationMessage": "", + "type": "DotEditPopupMenuItem[]", + "optional": true, + "description": "", + "line": 23 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotEditPopupMenuItem", + "id": "interface-DotEditPopupMenuItem-ee5dfd327371d367a53be91ed93a476ab4c85c2d43bbbfba506bfa14264b564ee64cb2c7b716b203446f66311452234c3a8f57eb6b4be464edd8bc05e9be29e1", + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/html/dot-edit-content-toolbar-html.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Injectable } from '@angular/core';\nimport { DotMessageService } from '@services/dot-message/dot-messages.service';\nimport { DotDOMHtmlUtilService } from './dot-dom-html-util.service';\nimport { DotLicenseService } from '@services/dot-license/dot-license.service';\nimport { take } from 'rxjs/operators';\n\ninterface DotEditPopupMenuItem {\n label: string;\n disabled?: boolean;\n tooltip?: string;\n dataset: {\n [propName: string]: string;\n };\n}\n\ninterface DotEditPopupButton {\n label: string;\n class?: string;\n}\n\ninterface DotEditPopupMenu {\n button: DotEditPopupButton;\n items?: DotEditPopupMenuItem[];\n}\n\nenum ValidationError {\n EnterpriseLicenseError,\n MaxContentletsLimitReachedError\n}\n\n/**\n * Service to generate the markup related with the Toolbars and sub-menu for containers.\n */\n@Injectable()\nexport class DotEditContentToolbarHtmlService {\n isEnterpriseLicense: boolean;\n\n constructor(\n private dotMessageService: DotMessageService,\n private dotDOMHtmlUtilService: DotDOMHtmlUtilService,\n private dotLicenseService: DotLicenseService\n ) {}\n\n /**\n * Add custom HTML buttons to the containers div\n *\n * @param Document doc\n * @memberof DotEditContentToolbarHtmlService\n */\n addContainerToolbar(doc: Document): void {\n this.dotLicenseService\n .isEnterprise()\n .pipe(take(1))\n .subscribe((isEnterpriseLicense: boolean) => {\n this.isEnterpriseLicense = isEnterpriseLicense;\n\n const containers = Array.from(\n doc.querySelectorAll('[data-dot-object=\"container\"]')\n );\n containers.forEach((container: HTMLElement) => {\n this.createContainerToolbar(container);\n });\n });\n }\n\n /**\n * Updates DOM with updated version of a specific Container toolbar\n *\n * @param HTMLElement container\n * @memberof DotEditContentToolbarHtmlService\n */\n updateContainerToolbar(container: HTMLElement): void {\n if (container.parentNode) {\n const toolbar = container.parentNode.querySelector(\n `[data-dot-container-inode=\"${container.dataset['dotInode']}\"]`\n );\n container.parentNode.removeChild(toolbar);\n this.createContainerToolbar(container);\n }\n }\n\n /**\n * Bind event to the document to add the contentlet toolbar on contentlet element mouseover\n *\n * @param {Document} doc\n * @memberof DotEditContentToolbarHtmlService\n */\n bindContentletEvents(doc: Document): void {\n doc.addEventListener('mouseover', (e) => {\n const contentlet: HTMLElement = (e.target as Element).closest(\n '[data-dot-object=\"contentlet\"]:not([data-dot-toolbar=\"true\"]'\n );\n\n if (contentlet) {\n contentlet.setAttribute('data-dot-toolbar', 'true');\n this.addToolbarToContentlet(contentlet);\n }\n });\n }\n\n /**\n * Return the HTML of the buttons for the contentlets\n *\n * @param {{ [key: string]: any }} contentletDataset\n * @returns {string}\n * @memberof DotEditContentToolbarHtmlService\n */\n getContentButton(contentletDataset: { [key: string]: any }): string {\n const identifier: string = contentletDataset.dotIdentifier;\n const inode: string = contentletDataset.dotInode;\n const canEdit: boolean = contentletDataset.dotCanEdit === 'true';\n const isForm: boolean = contentletDataset.dotBasetype === 'FORM';\n\n const dataset = {\n 'dot-identifier': identifier,\n 'dot-inode': inode\n };\n\n let editButtonClass = 'dotedit-contentlet__edit';\n editButtonClass += !canEdit || isForm ? ' dotedit-contentlet__disabled' : '';\n\n return `\n ${this.dotDOMHtmlUtilService.getButtomHTML(\n this.dotMessageService.get('editpage.content.contentlet.menu.drag'),\n 'dotedit-contentlet__drag',\n {\n ...dataset,\n 'dot-object': 'drag-content'\n }\n )}\n ${this.dotDOMHtmlUtilService.getButtomHTML(\n this.dotMessageService.get('editpage.content.contentlet.menu.edit'),\n editButtonClass,\n {\n ...dataset,\n 'dot-object': 'edit-content'\n }\n )}\n ${this.dotDOMHtmlUtilService.getButtomHTML(\n this.dotMessageService.get('editpage.content.contentlet.menu.remove'),\n 'dotedit-contentlet__remove',\n {\n ...dataset,\n 'dot-object': 'remove-content'\n }\n )}\n `;\n }\n\n /**\n * Returns the html for the edit vlt buttons\n *\n * @param {HTMLElement[]} vtls\n * @returns {string}\n * @memberof DotEditContentToolbarHtmlService\n */\n getEditVtlButtons(vtls: HTMLElement[]): string {\n return this.getDotEditPopupMenuHtml({\n button: {\n label: this.dotMessageService.get('editpage.content.container.action.edit.vtl'),\n class: 'dotedit-contentlet__code'\n },\n items: vtls.map((vtl: HTMLElement) => {\n return {\n disabled: vtl.dataset.dotCanEdit === 'false',\n label: vtl.dataset.dotUrl.split('/').slice(-1)[0],\n dataset: {\n action: 'code',\n inode: vtl.dataset.dotInode\n }\n };\n })\n });\n }\n\n private addToolbarToContentlet(contentlet: HTMLElement) {\n const contentletToolbar = document.createElement('div');\n contentletToolbar.classList.add('dotedit-contentlet__toolbar');\n\n const vtls: HTMLElement[] = Array.from(\n contentlet.querySelectorAll('[data-dot-object=\"vtl-file\"]')\n );\n\n if (vtls.length) {\n contentletToolbar.innerHTML += this.getEditVtlButtons(vtls);\n }\n\n contentletToolbar.innerHTML += this.getContentButton(contentlet.dataset);\n\n contentlet.insertAdjacentElement('afterbegin', contentletToolbar);\n }\n\n private createContainerToolbar(container: HTMLElement) {\n const containerToolbar = document.createElement('div');\n containerToolbar.classList.add('dotedit-container__toolbar');\n containerToolbar.setAttribute('data-dot-container-inode', container.dataset['dotInode']);\n\n if (!container.dataset.dotCanAdd.length) {\n container.classList.add('disabled');\n }\n\n containerToolbar.innerHTML = this.getContainerToolbarHtml(container);\n container.parentNode.insertBefore(containerToolbar, container);\n }\n\n private getContainerToolbarHtml(container: HTMLElement): string {\n return this.getDotEditPopupMenuHtml({\n button: {\n label: `${this.dotMessageService.get('editpage.content.container.action.add')}`,\n class: 'dotedit-container__add'\n },\n items: container.dataset.dotCanAdd\n .split(',')\n .filter((item: string) => item.length)\n .map((item: string) => {\n item = item.toLowerCase();\n const validationError: ValidationError = this.getContentletValidationError(\n item,\n container\n );\n return {\n label: this.dotMessageService.get(\n `editpage.content.container.menu.${item}`\n ),\n dataset: {\n action: 'add',\n add: item,\n identifier: container.dataset.dotIdentifier,\n uuid: container.dataset.dotUuid\n },\n disabled:\n validationError === ValidationError.EnterpriseLicenseError ||\n validationError === ValidationError.MaxContentletsLimitReachedError,\n tooltip: this.getTooltipErrorMessage(validationError)\n };\n })\n });\n }\n\n private getContentletValidationError(item: string, container: HTMLElement): ValidationError {\n if (item === 'form' && !this.isEnterpriseLicense) {\n return ValidationError.EnterpriseLicenseError;\n } else if (this.isMaxContentletsLimitReached(container)) {\n return ValidationError.MaxContentletsLimitReachedError;\n }\n }\n\n private isMaxContentletsLimitReached(container: HTMLElement): boolean {\n const contentletsSize = Array.from(\n container.querySelectorAll('[data-dot-object=\"contentlet\"]')\n ).length;\n return parseInt(container.dataset.maxContentlets, 10) <= contentletsSize;\n }\n\n private getTooltipErrorMessage(validationError: ValidationError): string {\n let errorMsg = '';\n if (validationError === ValidationError.EnterpriseLicenseError) {\n errorMsg = this.dotMessageService.get('dot.common.license.enterprise.only.error');\n } else if (validationError === ValidationError.MaxContentletsLimitReachedError) {\n errorMsg = this.dotMessageService.get('dot.common.contentlet.max.limit.error');\n }\n\n return errorMsg;\n }\n\n private getDotEditPopupMenuHtml(menu: DotEditPopupMenu): string {\n const isMenuItems = menu.items.length > 0;\n\n let result = '
';\n\n result += this.getDotEditPopupMenuButton(menu.button, !isMenuItems);\n\n if (isMenuItems) {\n result += this.getDotEditPopupMenuList(menu.items);\n }\n\n result += '
';\n\n return result;\n }\n\n private getDotEditPopupMenuButton(button: DotEditPopupButton, disabled = false): string {\n return `\n \n \n `;\n }\n\n private getDotEditPopupMenuList(items: DotEditPopupMenuItem[]): string {\n return `\n
    \n ${items\n .map((item: DotEditPopupMenuItem) => {\n return `\n
  • \n \n ${item.label}\n \n
  • \n `;\n })\n .join('')}\n
\n `;\n }\n\n private getDotEditPopupMenuItemDataSet(datasets: { [propName: string]: string }): string {\n return Object.keys(datasets)\n .map((key) => `data-dot-${key}=\"${datasets[key]}\"`)\n .join(' ');\n }\n}\n", + "properties": [ + { + "name": "dataset", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": false, + "description": "", + "line": 11 + }, + { + "name": "disabled", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 9 + }, + { + "name": "label", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 8 + }, + { + "name": "tooltip", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 10 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotEnvironment", + "id": "interface-DotEnvironment-5e55c2ee899f23e5e89597054683f10289e469b00fd389c1153c9794959d778ee6437f977e0856fb9c4db13cc18aff1c97a22c3cafbac9e1f7f7f55418b77f3a", + "file": "apps/dotcms-ui/src/app/shared/models/dot-environment/dot-environment.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotEnvironment {\n id: string;\n name: string;\n}\n", + "properties": [ + { + "name": "id", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 7 + }, + { + "name": "name", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 8 + } + ], + "indexSignatures": [], + "kind": 165, + "description": "

Interface for environments.

\n", + "rawdescription": "\n\nInterface for environments.\n\n", + "methods": [] + }, + { + "name": "DotEvent", + "id": "interface-DotEvent-48a9c5fa77ca6f0fb5fbe0d458ce0464fc731a5b97613782545b73ff5de49493dd38cc4e2899db8440b1ef41734f93f0b676d6fe4f07c5e63d2dd22f712bdf6c", + "file": "apps/dotcms-ui/src/app/shared/models/dot-event/dot-event.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotEvent {\n name: string;\n data?: any;\n}\n", + "properties": [ + { + "name": "data", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": true, + "description": "", + "line": 8 + }, + { + "name": "name", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 7 + } + ], + "indexSignatures": [], + "kind": 165, + "description": "

Interface for custom events.

\n", + "rawdescription": "\n\nInterface for custom events.\n\n", + "methods": [] + }, + { + "name": "DotEventMessage", + "id": "interface-DotEventMessage-b0c1659b4a6fa50e144d62dac559c291010dfb31e171f34a411cfc31fcdf6cdf210d7c10c63ee3060c45a075e061a2b84ed2b1e469c5da94050a09e1380cfee5", + "file": "libs/dotcms-js/src/lib/core/util/models/dot-event-message.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotEventMessage {\n event: string;\n payload: any;\n}\n", + "properties": [ + { + "name": "event", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 2 + }, + { + "name": "payload", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": false, + "description": "", + "line": 3 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotEventTypeWrapper", + "id": "interface-DotEventTypeWrapper-6d4327d13af0f288c1aec41090bcd79783eb91deaf48538c4b30d6a8bedbc67b0275f2f5522f1408c822ea289414e051fd24aae1c503f8ae14b2851398eff30a", + "file": "libs/dotcms-js/src/lib/core/models/dot-events/dot-event-type-wrapper.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotEventTypeWrapper {\n data: T;\n name: string;\n}\n", + "properties": [ + { + "name": "data", + "deprecated": false, + "deprecationMessage": "", + "type": "T", + "optional": false, + "description": "", + "line": 2 + }, + { + "name": "name", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 3 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotFieldEvent", + "id": "interface-DotFieldEvent-da20896564a7050553af6b4e6ebf19e6011caf66860c43041c923265478603f35ce000e760f0c9d12bb542790530072418fcfa15fcc6ea423a626f1f6a1ca6a4", + "file": "libs/dotcms-field-elements/src/models/dot-field-event.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotFieldStatus } from './dot-field-status.model';\nimport { DotBinaryMessageError } from './dot-binary-message-error.model';\n\nexport interface DotFieldEvent {\n name: string;\n}\n\nexport interface DotFieldStatusEvent extends DotFieldEvent {\n status: DotFieldStatus;\n}\n\nexport interface DotInputCalendarStatusEvent extends DotFieldStatusEvent {\n isValidRange: boolean;\n}\n\nexport interface DotFieldValueEvent extends DotFieldEvent {\n fieldType?: string;\n value: string | File;\n}\n\nexport interface DotBinaryFileEvent {\n file: string | File;\n errorType: DotBinaryMessageError;\n}\n", + "properties": [ + { + "name": "name", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 5 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotFieldEvent", + "id": "interface-DotFieldEvent-da20896564a7050553af6b4e6ebf19e6011caf66860c43041c923265478603f35ce000e760f0c9d12bb542790530072418fcfa15fcc6ea423a626f1f6a1ca6a4-1", + "file": "libs/dotcms-webcomponents/src/models/dot-field-event.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotFieldStatus } from './dot-field-status.model';\nimport { DotBinaryMessageError } from './dot-binary-message-error.model';\n\nexport interface DotFieldEvent {\n name: string;\n}\n\nexport interface DotFieldStatusEvent extends DotFieldEvent {\n status: DotFieldStatus;\n}\n\nexport interface DotInputCalendarStatusEvent extends DotFieldStatusEvent {\n isValidRange: boolean;\n}\n\nexport interface DotFieldValueEvent extends DotFieldEvent {\n fieldType?: string;\n value: string | File;\n}\n\nexport interface DotBinaryFileEvent {\n file: string | File;\n errorType: DotBinaryMessageError;\n}\n", + "properties": [ + { + "name": "name", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 5 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [], + "isDuplicate": true, + "duplicateId": 1, + "duplicateName": "DotFieldEvent-1" + }, + { + "name": "DotFieldStatus", + "id": "interface-DotFieldStatus-fa43ef87e8f69eb45c6e5567c1e4987aab03d988e5a2f3f3c27c78bd7eee819081cb85ea15edbd34c4d644fa200fd5b894fa14c6c5e0a889bff8e060b9ac0f5e", + "file": "libs/dotcms-field-elements/src/models/dot-field-status.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotFieldStatus {\n dotTouched: boolean;\n dotValid: boolean;\n dotPristine: boolean;\n}\n\nexport interface DotFieldStatusClasses {\n 'dot-valid': boolean;\n 'dot-invalid': boolean;\n 'dot-pristine': boolean;\n 'dot-dirty': boolean;\n 'dot-touched': boolean;\n 'dot-untouched': boolean;\n 'dot-required'?: boolean;\n}\n", + "properties": [ + { + "name": "dotPristine", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 4 + }, + { + "name": "dotTouched", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 2 + }, + { + "name": "dotValid", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 3 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotFieldStatus", + "id": "interface-DotFieldStatus-fa43ef87e8f69eb45c6e5567c1e4987aab03d988e5a2f3f3c27c78bd7eee819081cb85ea15edbd34c4d644fa200fd5b894fa14c6c5e0a889bff8e060b9ac0f5e-1", + "file": "libs/dotcms-webcomponents/src/models/dot-field-status.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotFieldStatus {\n dotTouched: boolean;\n dotValid: boolean;\n dotPristine: boolean;\n}\n\nexport interface DotFieldStatusClasses {\n 'dot-valid': boolean;\n 'dot-invalid': boolean;\n 'dot-pristine': boolean;\n 'dot-dirty': boolean;\n 'dot-touched': boolean;\n 'dot-untouched': boolean;\n 'dot-required'?: boolean;\n}\n", + "properties": [ + { + "name": "dotPristine", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 4 + }, + { + "name": "dotTouched", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 2 + }, + { + "name": "dotValid", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 3 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [], + "isDuplicate": true, + "duplicateId": 1, + "duplicateName": "DotFieldStatus-1" + }, + { + "name": "DotFieldStatusClasses", + "id": "interface-DotFieldStatusClasses-fa43ef87e8f69eb45c6e5567c1e4987aab03d988e5a2f3f3c27c78bd7eee819081cb85ea15edbd34c4d644fa200fd5b894fa14c6c5e0a889bff8e060b9ac0f5e", + "file": "libs/dotcms-field-elements/src/models/dot-field-status.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotFieldStatus {\n dotTouched: boolean;\n dotValid: boolean;\n dotPristine: boolean;\n}\n\nexport interface DotFieldStatusClasses {\n 'dot-valid': boolean;\n 'dot-invalid': boolean;\n 'dot-pristine': boolean;\n 'dot-dirty': boolean;\n 'dot-touched': boolean;\n 'dot-untouched': boolean;\n 'dot-required'?: boolean;\n}\n", + "properties": [ + { + "name": "dot-dirty", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 11 + }, + { + "name": "dot-invalid", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 9 + }, + { + "name": "dot-pristine", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 10 + }, + { + "name": "dot-required", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 14 + }, + { + "name": "dot-touched", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 12 + }, + { + "name": "dot-untouched", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 13 + }, + { + "name": "dot-valid", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 8 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotFieldStatusClasses", + "id": "interface-DotFieldStatusClasses-fa43ef87e8f69eb45c6e5567c1e4987aab03d988e5a2f3f3c27c78bd7eee819081cb85ea15edbd34c4d644fa200fd5b894fa14c6c5e0a889bff8e060b9ac0f5e-1", + "file": "libs/dotcms-webcomponents/src/models/dot-field-status.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotFieldStatus {\n dotTouched: boolean;\n dotValid: boolean;\n dotPristine: boolean;\n}\n\nexport interface DotFieldStatusClasses {\n 'dot-valid': boolean;\n 'dot-invalid': boolean;\n 'dot-pristine': boolean;\n 'dot-dirty': boolean;\n 'dot-touched': boolean;\n 'dot-untouched': boolean;\n 'dot-required'?: boolean;\n}\n", + "properties": [ + { + "name": "dot-dirty", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 11 + }, + { + "name": "dot-invalid", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 9 + }, + { + "name": "dot-pristine", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 10 + }, + { + "name": "dot-required", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 14 + }, + { + "name": "dot-touched", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 12 + }, + { + "name": "dot-untouched", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 13 + }, + { + "name": "dot-valid", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 8 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [], + "isDuplicate": true, + "duplicateId": 1, + "duplicateName": "DotFieldStatusClasses-1" + }, + { + "name": "DotFieldStatusEvent", + "id": "interface-DotFieldStatusEvent-da20896564a7050553af6b4e6ebf19e6011caf66860c43041c923265478603f35ce000e760f0c9d12bb542790530072418fcfa15fcc6ea423a626f1f6a1ca6a4", + "file": "libs/dotcms-field-elements/src/models/dot-field-event.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotFieldStatus } from './dot-field-status.model';\nimport { DotBinaryMessageError } from './dot-binary-message-error.model';\n\nexport interface DotFieldEvent {\n name: string;\n}\n\nexport interface DotFieldStatusEvent extends DotFieldEvent {\n status: DotFieldStatus;\n}\n\nexport interface DotInputCalendarStatusEvent extends DotFieldStatusEvent {\n isValidRange: boolean;\n}\n\nexport interface DotFieldValueEvent extends DotFieldEvent {\n fieldType?: string;\n value: string | File;\n}\n\nexport interface DotBinaryFileEvent {\n file: string | File;\n errorType: DotBinaryMessageError;\n}\n", + "properties": [ + { + "name": "status", + "deprecated": false, + "deprecationMessage": "", + "type": "DotFieldStatus", + "optional": false, + "description": "", + "line": 9 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [], + "extends": "DotFieldEvent" + }, + { + "name": "DotFieldStatusEvent", + "id": "interface-DotFieldStatusEvent-da20896564a7050553af6b4e6ebf19e6011caf66860c43041c923265478603f35ce000e760f0c9d12bb542790530072418fcfa15fcc6ea423a626f1f6a1ca6a4-1", + "file": "libs/dotcms-webcomponents/src/models/dot-field-event.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotFieldStatus } from './dot-field-status.model';\nimport { DotBinaryMessageError } from './dot-binary-message-error.model';\n\nexport interface DotFieldEvent {\n name: string;\n}\n\nexport interface DotFieldStatusEvent extends DotFieldEvent {\n status: DotFieldStatus;\n}\n\nexport interface DotInputCalendarStatusEvent extends DotFieldStatusEvent {\n isValidRange: boolean;\n}\n\nexport interface DotFieldValueEvent extends DotFieldEvent {\n fieldType?: string;\n value: string | File;\n}\n\nexport interface DotBinaryFileEvent {\n file: string | File;\n errorType: DotBinaryMessageError;\n}\n", + "properties": [ + { + "name": "status", + "deprecated": false, + "deprecationMessage": "", + "type": "DotFieldStatus", + "optional": false, + "description": "", + "line": 9 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [], + "extends": "DotFieldEvent", + "isDuplicate": true, + "duplicateId": 1, + "duplicateName": "DotFieldStatusEvent-1" + }, + { + "name": "DotFieldValueEvent", + "id": "interface-DotFieldValueEvent-da20896564a7050553af6b4e6ebf19e6011caf66860c43041c923265478603f35ce000e760f0c9d12bb542790530072418fcfa15fcc6ea423a626f1f6a1ca6a4", + "file": "libs/dotcms-field-elements/src/models/dot-field-event.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotFieldStatus } from './dot-field-status.model';\nimport { DotBinaryMessageError } from './dot-binary-message-error.model';\n\nexport interface DotFieldEvent {\n name: string;\n}\n\nexport interface DotFieldStatusEvent extends DotFieldEvent {\n status: DotFieldStatus;\n}\n\nexport interface DotInputCalendarStatusEvent extends DotFieldStatusEvent {\n isValidRange: boolean;\n}\n\nexport interface DotFieldValueEvent extends DotFieldEvent {\n fieldType?: string;\n value: string | File;\n}\n\nexport interface DotBinaryFileEvent {\n file: string | File;\n errorType: DotBinaryMessageError;\n}\n", + "properties": [ + { + "name": "fieldType", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 17 + }, + { + "name": "value", + "deprecated": false, + "deprecationMessage": "", + "type": "string | File", + "optional": false, + "description": "", + "line": 18 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [], + "extends": "DotFieldEvent" + }, + { + "name": "DotFieldValueEvent", + "id": "interface-DotFieldValueEvent-da20896564a7050553af6b4e6ebf19e6011caf66860c43041c923265478603f35ce000e760f0c9d12bb542790530072418fcfa15fcc6ea423a626f1f6a1ca6a4-1", + "file": "libs/dotcms-webcomponents/src/models/dot-field-event.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotFieldStatus } from './dot-field-status.model';\nimport { DotBinaryMessageError } from './dot-binary-message-error.model';\n\nexport interface DotFieldEvent {\n name: string;\n}\n\nexport interface DotFieldStatusEvent extends DotFieldEvent {\n status: DotFieldStatus;\n}\n\nexport interface DotInputCalendarStatusEvent extends DotFieldStatusEvent {\n isValidRange: boolean;\n}\n\nexport interface DotFieldValueEvent extends DotFieldEvent {\n fieldType?: string;\n value: string | File;\n}\n\nexport interface DotBinaryFileEvent {\n file: string | File;\n errorType: DotBinaryMessageError;\n}\n", + "properties": [ + { + "name": "fieldType", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 17 + }, + { + "name": "value", + "deprecated": false, + "deprecationMessage": "", + "type": "string | File", + "optional": false, + "description": "", + "line": 18 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [], + "extends": "DotFieldEvent", + "isDuplicate": true, + "duplicateId": 1, + "duplicateName": "DotFieldValueEvent-1" + }, + { + "name": "DotFieldVariable", + "id": "interface-DotFieldVariable-dad02b8407f0eeae5a2b378b60b35a11d5f580f082e55eb80c19412e7e9dc56bd4fca87f92b49844d26c0bafe3a6ba264259f2dd7342c5740568869e831c247e", + "file": "apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/components/fields/dot-content-type-fields-variables/models/dot-field-variable.interface.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotFieldVariable {\n id?: string;\n clazz?: string;\n fieldId?: string;\n key: string;\n value: string;\n}\n", + "properties": [ + { + "name": "clazz", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 3 + }, + { + "name": "fieldId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 4 + }, + { + "name": "id", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 2 + }, + { + "name": "key", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 5 + }, + { + "name": "value", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 6 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotFileUpload", + "id": "interface-DotFileUpload-5b07b5e2d668712195811bbfbe7456c54dd95cb20a0897ccfabbdef089c5cf9eabbd8eabd6a31af9c571a75b51626e410d1ad66fac56d7db8dd8b2a67848e775", + "file": "apps/dotcms-ui/src/app/shared/models/dot-file-upload/dot-file-upload.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotFileUpload {\n files: File[];\n xhr: XMLHttpRequest;\n}\n", + "properties": [ + { + "name": "files", + "deprecated": false, + "deprecationMessage": "", + "type": "File[]", + "optional": false, + "description": "", + "line": 7 + }, + { + "name": "xhr", + "deprecated": false, + "deprecationMessage": "", + "type": "XMLHttpRequest", + "optional": false, + "description": "", + "line": 8 + } + ], + "indexSignatures": [], + "kind": 165, + "description": "

Interface used for the response of FileUpload of primeng

\n", + "rawdescription": "\n\nInterface used for the response of FileUpload of primeng\n\n", + "methods": [] + }, + { + "name": "DotFolder", + "id": "interface-DotFolder-335689f1d35817f7a670d4029bf57acc594dcb4b8d2e57c4bf89db5f70caaff2abb9c0cab09f48090f9be8570b65167d33b2c36ef3e60e54ef777fc382f74a69", + "file": "apps/dotcms-ui/src/app/view/components/_common/dot-page-selector/models/dot-page-selector.models.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotPageAsset } from '../service/dot-page-selector.service';\nimport { Site } from '@dotcms/dotcms-js';\n\nexport interface DotPageSelectorItem {\n label: string;\n payload: DotPageAsset | Site | DotFolder;\n}\n\nexport interface DotSimpleURL {\n host: string;\n pathname: string;\n}\n\nexport interface DotFolder {\n hostName: string;\n path: string;\n addChildrenAllowed: boolean;\n}\n\nexport interface CompleteEvent {\n originalEvent: InputEvent;\n query: string;\n}\n", + "properties": [ + { + "name": "addChildrenAllowed", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 17 + }, + { + "name": "hostName", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 15 + }, + { + "name": "path", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 16 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotFormModel", + "id": "interface-DotFormModel-eca85f0ad5805397fe9b62716e964188a700939786f0f69b4c1483e0104b3fcfab83bf6a287f4829b6e005660895f0285c50fb0399bfdc9f0b65a4e3fa3d141a", + "file": "apps/dotcms-ui/src/app/shared/models/dot-form/dot-form.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { EventEmitter } from '@angular/core';\n\nexport interface DotFormModel {\n data?: T;\n valid: EventEmitter;\n value: EventEmitter;\n}\n", + "properties": [ + { + "name": "data", + "deprecated": false, + "deprecationMessage": "", + "type": "T", + "optional": true, + "description": "", + "line": 4 + }, + { + "name": "valid", + "deprecated": false, + "deprecationMessage": "", + "type": "EventEmitter", + "optional": false, + "description": "", + "line": 5 + }, + { + "name": "value", + "deprecated": false, + "deprecationMessage": "", + "type": "EventEmitter", + "optional": false, + "description": "", + "line": 6 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotFunctionInfo", + "id": "interface-DotFunctionInfo-37c32361b853d9150465970f2033302d4e449f8848dfe7b3a891627783fc8392189963e2ebc3b856c9b99badda1e13e814ea3cd28106597de85f36664d0d7726", + "file": "apps/dotcms-ui/src/app/shared/models/dot-function-info/dot-function-info.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotFunctionInfo {\n name: string;\n args?: any[];\n}\n", + "properties": [ + { + "name": "args", + "deprecated": false, + "deprecationMessage": "", + "type": "any[]", + "optional": true, + "description": "", + "line": 8 + }, + { + "name": "name", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 7 + } + ], + "indexSignatures": [], + "kind": 165, + "description": "

Describe the information of a function that will be executed in other context

\n", + "rawdescription": "\n\nDescribe the information of a function that will be executed in other context\n\n", + "methods": [] + }, + { + "name": "DotGlobalMessage", + "id": "interface-DotGlobalMessage-10ef29486a3df4395d71a907b71938d832029de71838c7aad44103a138b95242903fc0e369a2dd165bc22d7178e9654d280ea4f25cb4a8fa27becb228f7f0b11", + "file": "apps/dotcms-ui/src/app/shared/models/dot-global-message/dot-global-message.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotGlobalMessage {\n value: string;\n type?: string;\n life?: number;\n}\n", + "properties": [ + { + "name": "life", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 4 + }, + { + "name": "type", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 3 + }, + { + "name": "value", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 2 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotHttpErrorHandled", + "id": "interface-DotHttpErrorHandled-3722d8715930ee766edf190b67b88c5875ba06c2a9ea717074a9a8035e6cbfdbd5633ba50f1ae5dc2a58b5381fd09458e0dba4c169d8b5d82dee46822a092f40", + "file": "apps/dotcms-ui/src/app/api/services/dot-http-error-manager/dot-http-error-manager.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Observable, of } from 'rxjs';\nimport { DotRouterService } from '../dot-router/dot-router.service';\nimport { DotMessageService } from '../dot-message/dot-messages.service';\nimport { Injectable } from '@angular/core';\n\nimport { LoginService, HttpCode } from '@dotcms/dotcms-js';\n\nimport { DotAlertConfirmService } from '../dot-alert-confirm';\nimport { HttpErrorResponse } from '@angular/common/http';\n\nexport interface DotHttpErrorHandled {\n redirected: boolean;\n status: HttpCode;\n}\n\n/**\n * Handle the UI for http errors messages\n *\n * @export\n * @class DotHttpErrorManagerService\n */\n@Injectable()\nexport class DotHttpErrorManagerService {\n private readonly errorHandlers;\n\n constructor(\n private dotDialogService: DotAlertConfirmService,\n private dotMessageService: DotMessageService,\n private loginService: LoginService,\n private dotRouterService: DotRouterService\n ) {\n if (!this.errorHandlers) {\n this.errorHandlers = {};\n this.errorHandlers[HttpCode.NOT_FOUND] = this.handleNotFound.bind(this);\n this.errorHandlers[HttpCode.UNAUTHORIZED] = this.handleUnathorized.bind(this);\n this.errorHandlers[HttpCode.FORBIDDEN] = this.handleForbidden.bind(this);\n this.errorHandlers[HttpCode.SERVER_ERROR] = this.handleServerError.bind(this);\n this.errorHandlers[HttpCode.BAD_REQUEST] = this.handleBadRequestError.bind(this);\n this.errorHandlers[HttpCode.NO_CONTENT] = this.handleNotContentError.bind(this);\n }\n }\n\n /**\n * Handle the http error message and return a true if it did a redirect\n *\n * @param ResponseView err\n * @returns Observable\n * @memberof DotHttpErrorManagerService\n */\n handle(err: HttpErrorResponse): Observable {\n const result: DotHttpErrorHandled = {\n redirected: this.callErrorHandler(err),\n status: err.status\n };\n\n if (\n err['error'] &&\n !Array.isArray(err['error']) &&\n this.contentletIsForbidden(err['error'].message)\n ) {\n result.status = HttpCode.FORBIDDEN;\n }\n return of(result);\n }\n\n private callErrorHandler(response: HttpErrorResponse | any): boolean {\n const code = response.status;\n\n return code === HttpCode.FORBIDDEN\n ? this.isLicenseError(response)\n ? this.handleLicense()\n : this.handleForbidden()\n : this.errorHandlers[code](response);\n }\n\n private contentletIsForbidden(error: string): boolean {\n return (\n error.indexOf('does not have permissions READ') > -1 ||\n error.indexOf('User cannot edit') > -1\n );\n }\n\n private isLicenseError(response: HttpErrorResponse): boolean {\n return (\n response.headers &&\n response.headers.get('error-key') === 'dotcms.api.error.license.required'\n );\n }\n\n private handleForbidden(): boolean {\n this.dotDialogService.alert({\n message: this.dotMessageService.get('dot.common.http.error.403.message'),\n header: this.dotMessageService.get('dot.common.http.error.403.header')\n });\n return false;\n }\n\n private handleLicense(): boolean {\n this.dotDialogService.alert({\n message: this.dotMessageService.get('dot.common.http.error.403.license.message'),\n header: this.dotMessageService.get('dot.common.http.error.403.license.header')\n });\n return false;\n }\n\n private handleNotFound(): boolean {\n this.dotDialogService.alert({\n message: this.dotMessageService.get('dot.common.http.error.404.message'),\n header: this.dotMessageService.get('dot.common.http.error.404.header')\n });\n return false;\n }\n\n private handleServerError(): boolean {\n this.dotDialogService.alert({\n message: this.dotMessageService.get('dot.common.http.error.500.message'),\n header: this.dotMessageService.get('dot.common.http.error.500.header')\n });\n return false;\n }\n\n private handleBadRequestError(response: HttpErrorResponse): boolean {\n const msg =\n this.getErrorMessage(response) ||\n this.dotMessageService.get('dot.common.http.error.400.message');\n this.dotDialogService.alert({\n message: msg,\n header: this.dotMessageService.get('dot.common.http.error.400.header')\n });\n return false;\n }\n\n private handleNotContentError(): boolean {\n this.dotDialogService.alert({\n message: this.dotMessageService.get('dot.common.http.error.204.message'),\n header: this.dotMessageService.get('dot.common.http.error.204.header')\n });\n return false;\n }\n\n private handleUnathorized(): boolean {\n if (this.loginService.auth.user) {\n this.handleForbidden();\n } else {\n this.dotRouterService.goToLogin();\n return true;\n }\n return false;\n }\n\n private getErrorMessage(response: HttpErrorResponse): string {\n let msg: string;\n if (Array.isArray(response['error'])) {\n msg = response.error[0].message;\n } else {\n msg = response['error'] ? response['error']['message'] : null;\n }\n return msg;\n }\n}\n", + "properties": [ + { + "name": "redirected", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 12 + }, + { + "name": "status", + "deprecated": false, + "deprecationMessage": "", + "type": "HttpCode", + "optional": false, + "description": "", + "line": 13 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotHttpErrorResponse", + "id": "interface-DotHttpErrorResponse-52d3f103eb3d441ca4b66dfc5211bf42152becba5377c3cc31adb1f3fa59c1ad722b71481afb082a0f3e0854cde1ad250d18445aed712316e67b442cc1b30739", + "file": "libs/dotcms-field-elements/src/models/dot-http-error-response.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotHttpErrorResponse {\n message: string;\n status: number;\n}\n", + "properties": [ + { + "name": "message", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 2 + }, + { + "name": "status", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 3 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotHttpErrorResponse", + "id": "interface-DotHttpErrorResponse-52d3f103eb3d441ca4b66dfc5211bf42152becba5377c3cc31adb1f3fa59c1ad722b71481afb082a0f3e0854cde1ad250d18445aed712316e67b442cc1b30739-1", + "file": "libs/dotcms-models/src/lib/dot-http-error-response.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotHttpErrorResponse {\n message: string;\n status: number;\n}\n", + "properties": [ + { + "name": "message", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 2 + }, + { + "name": "status", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 3 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [], + "isDuplicate": true, + "duplicateId": 1, + "duplicateName": "DotHttpErrorResponse-1" + }, + { + "name": "DotHttpRequestOptions", + "id": "interface-DotHttpRequestOptions-29dcbc262d3b0df215867ad093ba63af60ebdbc587d4ec4e40582f87c5c8a2dcb1d6733c138c4d8b37a020783390c04972332e487914d1cc1950aef2a16b2adb", + "file": "libs/dotcms-models/src/lib/dot-http-request-options.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotHttpRequestOptions {\n method: string;\n headers: { [key: string]: string };\n body: any;\n}\n", + "properties": [ + { + "name": "body", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": false, + "description": "", + "line": 4 + }, + { + "name": "headers", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": false, + "description": "", + "line": 3 + }, + { + "name": "method", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 2 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotInlineDataset", + "id": "interface-DotInlineDataset-548bff6c62c66666033e5858c740593d9da0e58c682b7338e62ed468d90162ab7c9f2a766f6cc365c405ec52b71752b143e28ae8b6643581879119257e9faab8", + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/dot-edit-content-html/models/dot-contentlets-events.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotPageContent } from '@portlets/dot-edit-page/shared/models/dot-page-content.model';\nimport { DotPageContainer } from '@models/dot-page-container/dot-page-container.model';\n\nexport interface DotContentletEvent {\n name: string;\n data: T;\n}\n\nexport interface DotContentletEventDragAndDropDotAsset extends DotContentletEvent {}\nexport interface DotContentletEventRelocate extends DotContentletEvent {}\nexport interface DotContentletEventSelect extends DotContentletEvent {}\nexport interface DotContentletEventSave extends DotContentletEvent {}\n\nexport interface DotAssetPayload {\n contentlet: DotPageContent;\n placeholderId: string;\n}\n\nexport interface DotRelocatePayload {\n container: DotPageContainer;\n contentlet: DotPageContent;\n}\n\nexport interface DotInlineDataset {\n mode: string;\n inode: string;\n fieldName: string;\n language: string;\n}\n\nexport interface DotInlineEditContent {\n innerHTML: string;\n dataset: DotInlineDataset;\n element: HTMLElement;\n isNotDirty: boolean;\n eventType: string;\n}\n", + "properties": [ + { + "name": "fieldName", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 27 + }, + { + "name": "inode", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 26 + }, + { + "name": "language", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 28 + }, + { + "name": "mode", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 25 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotInlineEditContent", + "id": "interface-DotInlineEditContent-548bff6c62c66666033e5858c740593d9da0e58c682b7338e62ed468d90162ab7c9f2a766f6cc365c405ec52b71752b143e28ae8b6643581879119257e9faab8", + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/dot-edit-content-html/models/dot-contentlets-events.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotPageContent } from '@portlets/dot-edit-page/shared/models/dot-page-content.model';\nimport { DotPageContainer } from '@models/dot-page-container/dot-page-container.model';\n\nexport interface DotContentletEvent {\n name: string;\n data: T;\n}\n\nexport interface DotContentletEventDragAndDropDotAsset extends DotContentletEvent {}\nexport interface DotContentletEventRelocate extends DotContentletEvent {}\nexport interface DotContentletEventSelect extends DotContentletEvent {}\nexport interface DotContentletEventSave extends DotContentletEvent {}\n\nexport interface DotAssetPayload {\n contentlet: DotPageContent;\n placeholderId: string;\n}\n\nexport interface DotRelocatePayload {\n container: DotPageContainer;\n contentlet: DotPageContent;\n}\n\nexport interface DotInlineDataset {\n mode: string;\n inode: string;\n fieldName: string;\n language: string;\n}\n\nexport interface DotInlineEditContent {\n innerHTML: string;\n dataset: DotInlineDataset;\n element: HTMLElement;\n isNotDirty: boolean;\n eventType: string;\n}\n", + "properties": [ + { + "name": "dataset", + "deprecated": false, + "deprecationMessage": "", + "type": "DotInlineDataset", + "optional": false, + "description": "", + "line": 33 + }, + { + "name": "element", + "deprecated": false, + "deprecationMessage": "", + "type": "HTMLElement", + "optional": false, + "description": "", + "line": 34 + }, + { + "name": "eventType", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 36 + }, + { + "name": "innerHTML", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 32 + }, + { + "name": "isNotDirty", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 35 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotInputCalendarStatusEvent", + "id": "interface-DotInputCalendarStatusEvent-da20896564a7050553af6b4e6ebf19e6011caf66860c43041c923265478603f35ce000e760f0c9d12bb542790530072418fcfa15fcc6ea423a626f1f6a1ca6a4", + "file": "libs/dotcms-field-elements/src/models/dot-field-event.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotFieldStatus } from './dot-field-status.model';\nimport { DotBinaryMessageError } from './dot-binary-message-error.model';\n\nexport interface DotFieldEvent {\n name: string;\n}\n\nexport interface DotFieldStatusEvent extends DotFieldEvent {\n status: DotFieldStatus;\n}\n\nexport interface DotInputCalendarStatusEvent extends DotFieldStatusEvent {\n isValidRange: boolean;\n}\n\nexport interface DotFieldValueEvent extends DotFieldEvent {\n fieldType?: string;\n value: string | File;\n}\n\nexport interface DotBinaryFileEvent {\n file: string | File;\n errorType: DotBinaryMessageError;\n}\n", + "properties": [ + { + "name": "isValidRange", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 13 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [], + "extends": "DotFieldStatusEvent" + }, + { + "name": "DotInputCalendarStatusEvent", + "id": "interface-DotInputCalendarStatusEvent-da20896564a7050553af6b4e6ebf19e6011caf66860c43041c923265478603f35ce000e760f0c9d12bb542790530072418fcfa15fcc6ea423a626f1f6a1ca6a4-1", + "file": "libs/dotcms-webcomponents/src/models/dot-field-event.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotFieldStatus } from './dot-field-status.model';\nimport { DotBinaryMessageError } from './dot-binary-message-error.model';\n\nexport interface DotFieldEvent {\n name: string;\n}\n\nexport interface DotFieldStatusEvent extends DotFieldEvent {\n status: DotFieldStatus;\n}\n\nexport interface DotInputCalendarStatusEvent extends DotFieldStatusEvent {\n isValidRange: boolean;\n}\n\nexport interface DotFieldValueEvent extends DotFieldEvent {\n fieldType?: string;\n value: string | File;\n}\n\nexport interface DotBinaryFileEvent {\n file: string | File;\n errorType: DotBinaryMessageError;\n}\n", + "properties": [ + { + "name": "isValidRange", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 13 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [], + "extends": "DotFieldStatusEvent", + "isDuplicate": true, + "duplicateId": 1, + "duplicateName": "DotInputCalendarStatusEvent-1" + }, + { + "name": "DotKeyValue", + "id": "interface-DotKeyValue-b4983e2e445a8b3f077f29d367d90efe7d181ad268bf6991d43f756d0a2fc31ef805ef3885bf51cb5095ea0b948f82af796363eaa49c0985f68bbd24fe7f5cce", + "file": "apps/dotcms-ui/src/app/shared/models/dot-key-value-ng/dot-key-value-ng.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotKeyValue {\n key: string;\n hidden?: boolean;\n value: string;\n}\n", + "properties": [ + { + "name": "hidden", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 3 + }, + { + "name": "key", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 2 + }, + { + "name": "value", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 4 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotKeyValueField", + "id": "interface-DotKeyValueField-085a466e790affad6cf714d1b9e1fbee9b15c986bf874438f0ae06e4080155c34677821c6d3c89b38af837ce11d9fbbf64f9f23648e74a99481afd7f2ad0fcbd", + "file": "libs/dotcms-field-elements/src/models/dot-key-value-field.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotKeyValueField {\n key: string;\n value: string;\n}\n", + "properties": [ + { + "name": "key", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 2 + }, + { + "name": "value", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 3 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotKeyValueField", + "id": "interface-DotKeyValueField-085a466e790affad6cf714d1b9e1fbee9b15c986bf874438f0ae06e4080155c34677821c6d3c89b38af837ce11d9fbbf64f9f23648e74a99481afd7f2ad0fcbd-1", + "file": "libs/dotcms-webcomponents/src/models/dot-key-value-field.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotKeyValueField {\n key: string;\n value: string;\n}\n", + "properties": [ + { + "name": "key", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 2 + }, + { + "name": "value", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 3 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [], + "isDuplicate": true, + "duplicateId": 1, + "duplicateName": "DotKeyValueField-1" + }, + { + "name": "DotLabel", + "id": "interface-DotLabel-0ab0c4689643306016d0bd5255087ad43e5c4510a35378b68ceae8bc09d520d0498e17edb18fb20d7df6c7c38af3f6589147b5033ffbb2b55a376f40fa5ffeb9", + "file": "libs/dotcms-field-elements/src/models/dot-html-tag.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotOption {\n label: string;\n value: string;\n}\n\nexport interface DotLabel {\n label: string;\n name: string;\n required?: boolean;\n}\n", + "properties": [ + { + "name": "label", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 7 + }, + { + "name": "name", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 8 + }, + { + "name": "required", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 9 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotLabel", + "id": "interface-DotLabel-0ab0c4689643306016d0bd5255087ad43e5c4510a35378b68ceae8bc09d520d0498e17edb18fb20d7df6c7c38af3f6589147b5033ffbb2b55a376f40fa5ffeb9-1", + "file": "libs/dotcms-webcomponents/src/models/dot-html-tag.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotOption {\n label: string;\n value: string;\n}\n\nexport interface DotLabel {\n label: string;\n name: string;\n required?: boolean;\n}\n", + "properties": [ + { + "name": "label", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 7 + }, + { + "name": "name", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 8 + }, + { + "name": "required", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 9 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [], + "isDuplicate": true, + "duplicateId": 1, + "duplicateName": "DotLabel-1" + }, + { + "name": "DotLanguage", + "id": "interface-DotLanguage-67b5e7b16b305ceddbdfb9edda2d1626bad55898279d49de77ed50b245bebfde39ab8fd2e89b344d37ec310cb2c382b21183c4d7860616a2291c31a3af52b83f", + "file": "apps/dotcms-ui/src/app/shared/models/dot-language/dot-language.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotLanguage {\n id: number;\n languageCode: string;\n countryCode: string;\n language: string;\n country: string;\n}\n", + "properties": [ + { + "name": "country", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 6 + }, + { + "name": "countryCode", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 4 + }, + { + "name": "id", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 2 + }, + { + "name": "language", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 5 + }, + { + "name": "languageCode", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 3 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotLargeMessageDisplayParams", + "id": "interface-DotLargeMessageDisplayParams-49630cdfba7fb878e3800354369ccff9d6248bd8edb313bcf4701af7273ea6d6d458692c0dc11eea787dae50f903df8a7a5d6683ac060fb56f76551fe6784611", + "file": "apps/dotcms-ui/src/app/view/components/dot-large-message-display/dot-large-message-display.component.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import {\n Component,\n OnInit,\n OnDestroy,\n ViewChildren,\n QueryList,\n AfterViewInit\n} from '@angular/core';\nimport { Subject, Observable } from 'rxjs';\nimport { takeUntil, filter } from 'rxjs/operators';\nimport { DotDialogComponent } from '@components/dot-dialog/dot-dialog.component';\nimport { DotcmsEventsService } from '@dotcms/dotcms-js';\nimport { DotParseHtmlService } from '@services/dot-parse-html/dot-parse-html.service';\n\ninterface DotLargeMessageDisplayParams {\n title: string;\n width: string;\n height: string;\n body: string;\n script?: string;\n code?: {\n lang: string;\n content: string;\n };\n}\n\n@Component({\n selector: 'dot-large-message-display',\n templateUrl: './dot-large-message-display.component.html',\n styleUrls: ['./dot-large-message-display.component.scss']\n})\nexport class DotLargeMessageDisplayComponent implements OnInit, OnDestroy, AfterViewInit {\n @ViewChildren(DotDialogComponent) dialogs: QueryList;\n\n messages: DotLargeMessageDisplayParams[] = [];\n private destroy$: Subject = new Subject();\n private recentlyDialogAdded: boolean;\n\n constructor(\n private dotcmsEventsService: DotcmsEventsService,\n private dotParseHtmlService: DotParseHtmlService\n ) {}\n\n ngAfterViewInit() {\n this.dialogs.changes\n .pipe(\n takeUntil(this.destroy$),\n filter(() => this.recentlyDialogAdded)\n )\n .subscribe((dialogs: QueryList) => {\n this.createContent(dialogs.last, this.messages[this.messages.length - 1]);\n this.recentlyDialogAdded = false;\n });\n }\n\n ngOnInit() {\n this.getMessages()\n .pipe(takeUntil(this.destroy$))\n .subscribe((content: DotLargeMessageDisplayParams) => {\n this.recentlyDialogAdded = true;\n this.messages.push(content);\n });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.complete();\n }\n\n /**\n * Close dialog's component by clearing messages from service\n *\n * @param {DotLargeMessageDisplayParams} messageToRemove\n * @memberof DotLargeMessageDisplayComponent\n */\n close(messageToRemove: DotLargeMessageDisplayParams) {\n this.messages.splice(this.messages.indexOf(messageToRemove), 1);\n }\n\n private createContent(\n dialogComponent: DotDialogComponent,\n content: DotLargeMessageDisplayParams\n ): void {\n const target = dialogComponent.dialog.nativeElement.querySelector('.dialog-message__body');\n this.dotParseHtmlService.parse(content.body, target, true);\n if (content.script) {\n this.dotParseHtmlService.parse(``, target, false);\n }\n }\n\n private getMessages(): Observable {\n return this.dotcmsEventsService\n .subscribeTo('LARGE_MESSAGE')\n .pipe(filter((data: DotLargeMessageDisplayParams) => !!data));\n }\n}\n", + "properties": [ + { + "name": "body", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 19 + }, + { + "name": "code", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": true, + "description": "", + "line": 21 + }, + { + "name": "height", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 18 + }, + { + "name": "script", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 20 + }, + { + "name": "title", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 16 + }, + { + "name": "width", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 17 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotLayout", + "id": "interface-DotLayout-9b99c7c00b23ac3f95f5ea66f5ff3e42c6e14827c0aa8e37fa0b284fa7ccbc12aa7146999f72a33a374cd4c0ed9721f6d0627f9636b03537baaf9ccb4e787cb2", + "file": "apps/dotcms-ui/src/app/shared/models/dot-edit-layout-designer/dot-layout.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotLayoutBody } from './dot-layout-body.model';\nimport { DotLayoutSideBar } from './dot-layout-sidebar.model';\n\nexport interface DotLayout {\n body: DotLayoutBody;\n footer: boolean;\n header: boolean;\n sidebar: DotLayoutSideBar;\n title: string;\n themeId?: string;\n width: string;\n}\n", + "properties": [ + { + "name": "body", + "deprecated": false, + "deprecationMessage": "", + "type": "DotLayoutBody", + "optional": false, + "description": "", + "line": 5 + }, + { + "name": "footer", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 6 + }, + { + "name": "header", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 7 + }, + { + "name": "sidebar", + "deprecated": false, + "deprecationMessage": "", + "type": "DotLayoutSideBar", + "optional": false, + "description": "", + "line": 8 + }, + { + "name": "themeId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 10 + }, + { + "name": "title", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 9 + }, + { + "name": "width", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 11 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotLayoutBody", + "id": "interface-DotLayoutBody-b2e02e0137ee58be8b89da882fd7386bc1bb2f2430b86aaaedd43a5271b1f58dd7cad8311e1eeb53b1e53cfc7ec158bda763c114261c832342e76911af95ead6", + "file": "apps/dotcms-ui/src/app/shared/models/dot-edit-layout-designer/dot-layout-body.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotLayoutRow } from './dot-layout-row.model';\n\nexport interface DotLayoutBody {\n rows: DotLayoutRow[];\n}\n", + "properties": [ + { + "name": "rows", + "deprecated": false, + "deprecationMessage": "", + "type": "DotLayoutRow[]", + "optional": false, + "description": "", + "line": 4 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotLayoutColumn", + "id": "interface-DotLayoutColumn-7d031aca960f7f75ba71170fdac72fcbbdbdac2bb9e87f95cafbfbbf9e1473f9485984d082e2ad2511f3f5556b426f992fdfcd716bb585ded9f35f2a21340212", + "file": "apps/dotcms-ui/src/app/shared/models/dot-edit-layout-designer/dot-layout-column.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotPageContainer } from '@models/dot-page-container/dot-page-container.model';\n\nexport interface DotLayoutColumn {\n containers: DotPageContainer[];\n leftOffset: number;\n width: number;\n styleClass?: string;\n}\n", + "properties": [ + { + "name": "containers", + "deprecated": false, + "deprecationMessage": "", + "type": "DotPageContainer[]", + "optional": false, + "description": "", + "line": 4 + }, + { + "name": "leftOffset", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 5 + }, + { + "name": "styleClass", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 7 + }, + { + "name": "width", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 6 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotLayoutGridBox", + "id": "interface-DotLayoutGridBox-422c4021faf0d1f50dda18ad115602e01ccd731d5eb56896064cb98b068d9b4b3d7edf4eda387ce6b9eb38daa649d8a7f369fc77aec23d1f766cec46ad7e30df", + "file": "apps/dotcms-ui/src/app/shared/models/dot-edit-layout-designer/dot-layout-grid-box.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotContainerColumnBox } from './dot-container-column-box.model';\nimport { NgGridItemConfig } from '@dotcms/dot-layout-grid';\n\n/**\n * It is NgGrid box\n *\n * for more information see: https://github.com/BTMorton/angular2-grid\n */\nexport interface DotLayoutGridBox {\n config: NgGridItemConfig;\n containers: DotContainerColumnBox[];\n}\n", + "properties": [ + { + "name": "config", + "deprecated": false, + "deprecationMessage": "", + "type": "NgGridItemConfig", + "optional": false, + "description": "", + "line": 10 + }, + { + "name": "containers", + "deprecated": false, + "deprecationMessage": "", + "type": "DotContainerColumnBox[]", + "optional": false, + "description": "", + "line": 11 + } + ], + "indexSignatures": [], + "kind": 165, + "description": "

It is NgGrid box

\n

for more information see: https://github.com/BTMorton/angular2-grid

\n", + "rawdescription": "\n\nIt is NgGrid box\n\nfor more information see: https://github.com/BTMorton/angular2-grid\n", + "methods": [] + }, + { + "name": "DotLayoutGridRow", + "id": "interface-DotLayoutGridRow-5a89e0e76238e5e4e2e0821283fb07b7b4a20f3ca057a160d781d556dcc8ad7764c0fa7244c921eb3f59a7a3f3da82d13e86f9784ca7aa84b5c4155e8948c189", + "file": "apps/dotcms-ui/src/app/shared/models/dot-edit-layout-designer/dot-layout-grid-row.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotLayoutGridBox } from './dot-layout-grid-box.model';\n\nexport interface DotLayoutGridRow {\n boxes: DotLayoutGridBox[];\n styleClass?: string;\n}\n", + "properties": [ + { + "name": "boxes", + "deprecated": false, + "deprecationMessage": "", + "type": "DotLayoutGridBox[]", + "optional": false, + "description": "", + "line": 4 + }, + { + "name": "styleClass", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 5 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotLayoutRow", + "id": "interface-DotLayoutRow-bb4bd2c88fa9accfc22d06e8a68d0e79342c49ebda85aa2f9cab356e83070bd2ae12eee17f5da75424c2e94b3de07354fe21759d5a46b3428684b23b8137c56a", + "file": "apps/dotcms-ui/src/app/shared/models/dot-edit-layout-designer/dot-layout-row.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotLayoutColumn } from './dot-layout-column.model';\n\nexport interface DotLayoutRow {\n styleClass?: string;\n columns: DotLayoutColumn[];\n}\n", + "properties": [ + { + "name": "columns", + "deprecated": false, + "deprecationMessage": "", + "type": "DotLayoutColumn[]", + "optional": false, + "description": "", + "line": 5 + }, + { + "name": "styleClass", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 4 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotLayoutSideBar", + "id": "interface-DotLayoutSideBar-bbb198217ac944aeaf9e20632c2f387d4caff7e757305e60a2261709d81d6e07d10acb3bf525426f0df2e16b4816e5f9b3e3b52d8004a378fbda11b93ef5a9cc", + "file": "apps/dotcms-ui/src/app/shared/models/dot-edit-layout-designer/dot-layout-sidebar.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotPageContainer } from '@models/dot-page-container/dot-page-container.model';\n\nexport interface DotLayoutSideBar {\n location?: string;\n containers?: DotPageContainer[];\n width?: string;\n widthPercent?: number;\n preview?: boolean;\n}\n", + "properties": [ + { + "name": "containers", + "deprecated": false, + "deprecationMessage": "", + "type": "DotPageContainer[]", + "optional": true, + "description": "", + "line": 5 + }, + { + "name": "location", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 4 + }, + { + "name": "preview", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 8 + }, + { + "name": "width", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 6 + }, + { + "name": "widthPercent", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 7 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotLocaleOptions", + "id": "interface-DotLocaleOptions-a11137e1c6270374b694f01b39400e103904dd6509f93fc999b204208f447ba189f1f52a7f58a2907d14e1454bc5c213760edb9d2b603732327db409274159ac", + "file": "apps/dotcms-ui/src/app/api/services/dot-format-date-service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Injectable } from '@angular/core';\nimport { isValid, format, formatDistanceToNowStrict, parse } from 'date-fns';\n\ninterface DotLocaleOptions {\n locale: Locale;\n}\n\n// Created outside of the service so it can be used on date.validator.ts\nexport function _isValid(date: string, formatPattern: string) {\n return isValid(parse(date, formatPattern, new Date()));\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class DotFormatDateService {\n private _localeOptions: DotLocaleOptions;\n\n constructor() {}\n\n get localeOptions(): DotLocaleOptions {\n return this._localeOptions;\n }\n\n set localeOptions(locale: DotLocaleOptions) {\n this._localeOptions = locale;\n }\n\n async setLang(languageId: string) {\n let [langCode, countryCode] = languageId.replace('_', '-').split('-');\n let localeLang;\n\n langCode = langCode?.toLowerCase() || 'en'\n countryCode = countryCode?.toLocaleUpperCase() || 'US';\n\n try {\n localeLang = await import(`date-fns/locale/${langCode}-${countryCode}/index.js`);\n } catch (error) {\n try {\n localeLang = await import(`date-fns/locale/${langCode}/index.js`);\n } catch (error) {\n localeLang = await import(`date-fns/locale/en-US`);\n }\n }\n \n this.localeOptions = { locale: localeLang.default };\n }\n\n /**\n * Checks if a date is valid based on a pattern\n *\n * @param {string} date\n * @param {string} formatPattern\n * @returns {boolean}\n * @memberof DotFormatDateService\n */\n isValid(date: string, formatPattern: string): boolean {\n return _isValid(date, formatPattern);\n }\n\n /**\n * Format a date based on a pattern\n *\n * @param {Date} date\n * @param {string} formatPattern\n * @returns {string}\n * @memberof DotFormatDateService\n */\n format(date: Date, formatPattern: string): string {\n return format(date, formatPattern, this.localeOptions);\n }\n\n /**\n * Gets relative strict time from on a specific date passed\n *\n * @param {string} time\n * @returns {string}\n * @memberof DotFormatDateService\n */\n getRelative(time: string): string {\n return formatDistanceToNowStrict(new Date(parseInt(time, 10)), {\n ...this.localeOptions,\n addSuffix: true\n });\n }\n}\n", + "properties": [ + { + "name": "locale", + "deprecated": false, + "deprecationMessage": "", + "type": "Locale", + "optional": false, + "description": "", + "line": 5 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotLoginCredentials", + "id": "interface-DotLoginCredentials-792a279544e78feaebe7e45d1bcf1c1fd62659e9b26ba7364d4e09edc02bbb57a14b2dbe74b062ba5d87ac747eb1ca4d117d575d27ad25b4336940fe676be866", + "file": "apps/dotcms-ui/src/app/shared/models/dot-login/dot-login-credentials.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotLoginCredentials {\n login: string;\n password: string;\n rememberMe: boolean;\n language: string;\n}\n", + "properties": [ + { + "name": "language", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 10 + }, + { + "name": "login", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 7 + }, + { + "name": "password", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 8 + }, + { + "name": "rememberMe", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 9 + } + ], + "indexSignatures": [], + "kind": 165, + "description": "

Interface for Login Credentials.

\n", + "rawdescription": "\n\nInterface for Login Credentials.\n\n", + "methods": [] + }, + { + "name": "DotLoginInformation", + "id": "interface-DotLoginInformation-83d6fc5c8e152c6ff1a8cbcbc5e2a3dec46468161eadc9c7335b5485bf2042fabeaa72d3e54b49008f0b4f09086db24bf2344111245d16e52a4add8091639023", + "file": "apps/dotcms-ui/src/app/shared/models/dot-login/dot-login-information.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotLoginUserSystemInformation } from '@models/dot-login/dot-login-user-system-information.model';\n\n/**\n * Interface that wrap all data needed to display the login page.\n *\n * @interface\n */\nexport interface DotLoginInformation {\n i18nMessagesMap: { [key: string]: string };\n entity: DotLoginUserSystemInformation;\n}\n", + "properties": [ + { + "name": "entity", + "deprecated": false, + "deprecationMessage": "", + "type": "DotLoginUserSystemInformation", + "optional": false, + "description": "", + "line": 10 + }, + { + "name": "i18nMessagesMap", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": false, + "description": "", + "line": 9 + } + ], + "indexSignatures": [], + "kind": 165, + "description": "

Interface that wrap all data needed to display the login page.

\n", + "rawdescription": "\n\nInterface that wrap all data needed to display the login page.\n\n", + "methods": [] + }, + { + "name": "DotLoginLanguage", + "id": "interface-DotLoginLanguage-0e4505d2c3e3ee1a7f2f2f4d493703d77554de056d4fc5abc69600e6303511812fad8c72e0bd96996b50b3f0a407b3cc3a5e73eb40c42a6b697b057c229032c2", + "file": "apps/dotcms-ui/src/app/shared/models/dot-login/dot-login-language.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotLoginLanguage {\n country: string;\n displayName: string;\n language: string;\n}\n", + "properties": [ + { + "name": "country", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 7 + }, + { + "name": "displayName", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 8 + }, + { + "name": "language", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 9 + } + ], + "indexSignatures": [], + "kind": 165, + "description": "

Interface for language specific for the login page.

\n", + "rawdescription": "\n\nInterface for language specific for the login page.\n\n", + "methods": [] + }, + { + "name": "DotLoginParams", + "id": "interface-DotLoginParams-5d0703d3d5d12558b1bbde9262016b10ec9cf6c418c9741070b97284d1a8fbc28be4f7b612438e8347bcf836241aa6a4a312b0f55c3c34f695902c625eee1712", + "file": "libs/dotcms-js/src/lib/core/login.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { CoreWebService } from './core-web.service';\nimport { Injectable } from '@angular/core';\nimport { Observable, Subject, of } from 'rxjs';\nimport { HttpCode } from './util/http-code';\nimport { pluck, tap, map } from 'rxjs/operators';\nimport { DotcmsEventsService } from './dotcms-events.service';\nimport { HttpResponse } from '@angular/common/http';\n\nexport interface DotLoginParams {\n login: string;\n password: string;\n rememberMe: boolean;\n language: string;\n backEndLogin: boolean;\n}\n\nexport const LOGOUT_URL = '/dotAdmin/logout';\n\n/**\n * This Service get the server configuration to display in the login component\n * and execute the login and forgot password routines\n */\n@Injectable()\nexport class LoginService {\n private _auth$: Subject = new Subject();\n private _logout$: Subject = new Subject();\n private _auth: Auth;\n private _loginAsUsersList$: Subject;\n private country = '';\n private lang = '';\n private urls: any;\n\n constructor(\n private coreWebService: CoreWebService,\n private dotcmsEventsService: DotcmsEventsService\n ) {\n this._loginAsUsersList$ = >new Subject();\n this.urls = {\n changePassword: 'v1/changePassword',\n getAuth: 'v1/authentication/logInUser',\n loginAs: 'v1/users/loginas',\n logout: 'v1/logout',\n logoutAs: 'v1/users/logoutas',\n recoverPassword: 'v1/forgotpassword',\n serverInfo: 'v1/loginform',\n userAuth: 'v1/authentication',\n current: '/api/v1/users/current/'\n };\n\n // when the session is expired/destroyed\n dotcmsEventsService.subscribeTo('SESSION_DESTROYED').subscribe(() => this.logOutUser());\n }\n\n /**\n * Get current logged in user\n *\n * @return {*} {Observable}\n * @memberof LoginService\n */\n getCurrentUser(): Observable {\n return this.coreWebService\n .request({\n url: this.urls.current\n })\n .pipe(map((res: HttpResponse) => res)) as unknown as Observable\n }\n\n get loginAsUsersList$(): Observable {\n return this._loginAsUsersList$.asObservable();\n }\n\n get auth$(): Observable {\n return this._auth$.asObservable();\n }\n\n get logout$(): Observable {\n return this._logout$.asObservable();\n }\n\n get auth(): Auth {\n return this._auth;\n }\n\n get isLogin$(): Observable {\n if (!!this.auth && !!this.auth.user) {\n return of(true);\n }\n\n return this.loadAuth().pipe(map((auth) => !!auth && !!auth.user));\n }\n\n /**\n * Load _auth information.\n * @returns Observable\n */\n public loadAuth(): Observable {\n return this.coreWebService\n .requestView({\n url: this.urls.getAuth\n })\n .pipe(\n pluck('entity'),\n tap((auth: Auth) => {\n if (auth.user) {\n this.setAuth(auth);\n }\n }),\n map((auth: Auth) => auth)\n );\n }\n\n /**\n * Change password\n * @param password\n * @param token\n * @returns Observable\n */\n public changePassword(password: string, token: string): Observable {\n const body = JSON.stringify({ password: password, token: token });\n\n return this.coreWebService.requestView({\n body: body,\n method: 'POST',\n url: this.urls.changePassword\n });\n }\n\n /**\n * Get the server information to configure the login component\n * @param language language and country to get the internationalized messages\n * @param i18nKeys array of message key to internationalize\n * @returns Observable Observable with an array of internationalized messages and server configuration info\n */\n public getLoginFormInfo(language: string, i18nKeys: Array): Observable {\n this.setLanguage(language);\n\n return this.coreWebService.requestView({\n body: { messagesKey: i18nKeys, language: this.lang, country: this.country },\n method: 'POST',\n url: this.urls.serverInfo\n });\n }\n\n /**\n * Do the login as request and return an Observable.\n * @param user user to loginas\n * @param password loginin user's password\n * @returns Observable\n */\n // TODO: password in the url is a no-no, fix asap. Sanchez and Jose have an idea.\n public loginAs(userData: { user: User; password: string }): Observable {\n return this.coreWebService\n .requestView({\n body: {\n password: userData.password,\n userId: userData.user.userId\n },\n method: 'POST',\n url: this.urls.loginAs\n })\n .pipe(\n map((res) => {\n if (!res.entity.loginAs) {\n throw res.errorsMessages;\n }\n\n this.setAuth({\n loginAsUser: userData.user,\n user: this._auth.user,\n isLoginAs: true\n });\n return res;\n }),\n pluck('entity', 'loginAs')\n );\n }\n\n /**\n * Executes the call to the login rest api\n * @param login User email or user id\n * @param password User password\n * @param rememberMe boolean indicating if the _auth want to use or not the remenber me option\n * @param language string with the language and country code, ex: en_US\n * @returns an array with the user if the user logged in successfully or the error message\n */\n public loginUser({\n login,\n password,\n rememberMe,\n language,\n backEndLogin\n }: DotLoginParams): Observable {\n this.setLanguage(language);\n\n return this.coreWebService\n .requestView({\n body: {\n userId: login,\n password: password,\n rememberMe: rememberMe,\n language: this.lang,\n country: this.country,\n backEndLogin: backEndLogin\n },\n method: 'POST',\n url: this.urls.userAuth\n })\n .pipe(\n map((response) => {\n const auth = {\n loginAsUser: null,\n user: response.entity,\n isLoginAs: false\n };\n\n this.setAuth(auth);\n this.coreWebService\n .subscribeToHttpError(HttpCode.UNAUTHORIZED)\n .subscribe(() => {\n this.logOutUser();\n });\n return response.entity;\n })\n );\n }\n\n /**\n * Logout \"login as\" user\n * @returns Observable\n */\n public logoutAs(): Observable {\n return this.coreWebService\n .requestView({\n method: 'PUT',\n url: `${this.urls.logoutAs}`\n })\n .pipe(\n map((res) => {\n this.setAuth({\n loginAsUser: null,\n user: this._auth.user,\n isLoginAs: true\n });\n return res;\n })\n );\n }\n\n /**\n * Executes the call to the recover passwrod rest api\n * @param email User email address\n * @returns an array with message indicating if the recover password was successfull\n * or if there is an error\n */\n public recoverPassword(login: string): Observable {\n return this.coreWebService.requestView({\n body: { userId: login },\n method: 'POST',\n url: this.urls.recoverPassword\n });\n }\n\n /**\n * Subscribe to ser change and call received function on change.\n * @param func function will call when user change\n */\n public watchUser(func: Function): void {\n if (this.auth) {\n func(this.auth);\n }\n\n this.auth$.subscribe((auth) => {\n if (auth.user) {\n func(auth);\n }\n });\n }\n\n /**\n * Set logged_auth and update auth Observable\n * @param _auth\n */\n public setAuth(auth: Auth): void {\n this._auth = auth;\n this._auth$.next(auth);\n\n // When not logged user we need to fire the observable chain\n if (!auth.user) {\n this._logout$.next();\n } else {\n this.dotcmsEventsService.start();\n }\n }\n\n /**\n * update the language and country variables from the string\n * @param language string containing the language and country\n */\n private setLanguage(language: string): void {\n if (language !== undefined && language !== '') {\n const languageDesc = language.split('_');\n this.lang = languageDesc[0];\n this.country = languageDesc[1];\n } else {\n this.lang = '';\n this.country = '';\n }\n }\n\n /**\n * Call the logout rest api\n * @returns Observable\n */\n private logOutUser(): void {\n window.location.href = `${LOGOUT_URL}?r=${new Date().getTime()}`;\n }\n}\n\nexport interface CurrentUser {\n email: string;\n givenName: string;\n loginAs: boolean\n roleId: string;\n surname: string;\n userId: string;\n}\n\nexport interface User {\n active?: boolean;\n actualCompanyId?: string;\n birthday?: number; // Timestamp\n comments?: string;\n companyId?: string;\n createDate?: number; // Timestamp\n deleteDate?: number; // Timestamp\n deleteInProgress?: boolean;\n emailAddress: string;\n failedLoginAttempts?: number;\n female?: boolean;\n firstName: string;\n fullName?: string;\n id?: string;\n languageId?: string;\n lastLoginDate?: number; // Timestamp\n lastLoginIP?: string;\n lastName: string;\n male?: boolean;\n middleName?: string;\n modificationDate?: number; // Timestamp\n name?: string;\n nickname?: string;\n requestPassword?: boolean;\n timeZoneId?: string;\n type?: string;\n userId: string;\n password?: string;\n}\n\nexport interface Auth {\n user: User;\n loginAsUser: User;\n isLoginAs?: boolean;\n}\n", + "properties": [ + { + "name": "backEndLogin", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 17 + }, + { + "name": "language", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 16 + }, + { + "name": "login", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 13 + }, + { + "name": "password", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 14 + }, + { + "name": "rememberMe", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 15 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotLoginUserSystemInformation", + "id": "interface-DotLoginUserSystemInformation-81d0aeb21c3fe026aca5e7d73157520e3ecf591e889130be0ae976738960ad90356a885c413a018ab13155587b0d41e474da8786d472d6b6a405adb149a7f43e", + "file": "apps/dotcms-ui/src/app/shared/models/dot-login/dot-login-user-system-information.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotLoginLanguage } from '@models/dot-login/dot-login-language.model';\n\n/**\n * Interface for system information.\n *\n * @interface\n */\nexport interface DotLoginUserSystemInformation {\n authorizationType: string;\n backgroundColor: string;\n backgroundPicture: string;\n buildDateString: string;\n companyEmail: string;\n currentLanguage: DotLoginLanguage;\n languages: DotLoginLanguage[];\n levelName: string;\n logo: string;\n serverId: string;\n version: string;\n}\n", + "properties": [ + { + "name": "authorizationType", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 9 + }, + { + "name": "backgroundColor", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 10 + }, + { + "name": "backgroundPicture", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 11 + }, + { + "name": "buildDateString", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 12 + }, + { + "name": "companyEmail", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 13 + }, + { + "name": "currentLanguage", + "deprecated": false, + "deprecationMessage": "", + "type": "DotLoginLanguage", + "optional": false, + "description": "", + "line": 14 + }, + { + "name": "languages", + "deprecated": false, + "deprecationMessage": "", + "type": "DotLoginLanguage[]", + "optional": false, + "description": "", + "line": 15 + }, + { + "name": "levelName", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 16 + }, + { + "name": "logo", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 17 + }, + { + "name": "serverId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 18 + }, + { + "name": "version", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 19 + } + ], + "indexSignatures": [], + "kind": 165, + "description": "

Interface for system information.

\n", + "rawdescription": "\n\nInterface for system information.\n\n", + "methods": [] + }, + { + "name": "DotMenu", + "id": "interface-DotMenu-8f524f1d3e73184e7416bac2bc366a4e200b600307ad0e620c25443339881e2be03f91f2f2d57642993e2efad5879a2a9df54b14d093c0700949f6bd390c5083", + "file": "apps/dotcms-ui/src/app/shared/models/navigation/menu.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotMenuItem } from './menu-item.model';\n\nexport interface DotMenu {\n active: boolean;\n id: string;\n isOpen: boolean;\n menuItems: DotMenuItem[];\n name: string;\n tabDescription: string;\n tabIcon: string;\n tabName: string;\n url: string;\n}\n", + "properties": [ + { + "name": "active", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 4 + }, + { + "name": "id", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 5 + }, + { + "name": "isOpen", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 6 + }, + { + "name": "menuItems", + "deprecated": false, + "deprecationMessage": "", + "type": "DotMenuItem[]", + "optional": false, + "description": "", + "line": 7 + }, + { + "name": "name", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 8 + }, + { + "name": "tabDescription", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 9 + }, + { + "name": "tabIcon", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 10 + }, + { + "name": "tabName", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 11 + }, + { + "name": "url", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 12 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotMenuItem", + "id": "interface-DotMenuItem-2f9d333a7b41a1302cc185739c4df2cb78960f329375bf2a2ce9ba95f157da71b7b388c603eb971756c60449f7ec28aa1d01e37f001671f3a14d50346d3c75c8", + "file": "apps/dotcms-ui/src/app/shared/models/navigation/menu-item.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotMenuItem {\n active: boolean;\n ajax: boolean;\n angular: boolean;\n id: string;\n label: string;\n url: string;\n menuLink: string;\n}\n", + "properties": [ + { + "name": "active", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 2 + }, + { + "name": "ajax", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 3 + }, + { + "name": "angular", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 4 + }, + { + "name": "id", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 5 + }, + { + "name": "label", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 6 + }, + { + "name": "menuLink", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 8 + }, + { + "name": "url", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 7 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotMenuItem", + "id": "interface-DotMenuItem-e8f9260ec171b52ea7b5d2dbc65fe2b5de85fbc9e601f74d5b3dd9abae68d4c95781d28251a2032245d480976d11031ee222e21eef39692887c9de170616440e-1", + "file": "libs/block-editor/src/lib/extensions/components/suggestions/suggestions.component.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { ChangeDetectorRef, Component, Input, OnInit, ViewChild } from '@angular/core';\n\nimport { map, take } from 'rxjs/operators';\nimport { MenuItem } from 'primeng/api';\n\nimport { SuggestionsService } from '../../services/suggestions/suggestions.service';\nimport { DotCMSContentlet } from '@dotcms/dotcms-models';\nimport { SuggestionListComponent } from '../suggestion-list/suggestion-list.component';\nimport { DomSanitizer, SafeUrl } from '@angular/platform-browser';\nimport { headerIcons, pIcon, ulIcon, olIcon, quoteIcon, codeIcon, lineIcon } from './suggestion-icons';\n\nexport interface SuggestionsCommandProps {\n payload?: DotCMSContentlet;\n type: { name: string; level?: number };\n}\n\nexport interface DotMenuItem extends Omit {\n icon: string | SafeUrl;\n}\n\n@Component({\n selector: 'dotcms-suggestions',\n templateUrl: './suggestions.component.html',\n styleUrls: ['./suggestions.component.scss']\n})\nexport class SuggestionsComponent implements OnInit {\n @ViewChild('list', { static: true }) list: SuggestionListComponent;\n\n @Input() onSelection: (props: SuggestionsCommandProps) => void;\n items: DotMenuItem[] = [];\n\n title = 'Select a block';\n selectionUpdated = false;\n\n constructor(\n private suggestionsService: SuggestionsService,\n private cd: ChangeDetectorRef,\n private domSanitizer: DomSanitizer\n ) {}\n\n ngOnInit(): void {\n const headings = [...Array(3).keys()].map((level) => {\n const size = level + 1;\n return {\n label: `Heading ${size}`,\n icon: this.sanitizeUrl(headerIcons[level]),\n command: () => {\n this.onSelection({\n type: {\n name: 'heading',\n level: level + 1\n }\n });\n }\n };\n });\n\n const paragraph = [\n {\n label: 'Paragraph',\n icon: this.sanitizeUrl(pIcon),\n command: () => {\n this.onSelection({\n type: {\n name: 'paragraph'\n }\n });\n }\n }\n ];\n\n const list = [\n {\n label: 'List Ordered',\n icon: this.sanitizeUrl(olIcon),\n command: () => {\n this.onSelection({\n type: {\n name: 'listOrdered'\n }\n });\n }\n },\n {\n label: 'List Unordered',\n icon: this.sanitizeUrl(ulIcon),\n command: () => {\n this.onSelection({\n type: {\n name: 'listUnordered'\n }\n });\n }\n }\n ];\n\n const block = [\n {\n label: 'Blockquote',\n icon: this.sanitizeUrl(quoteIcon),\n command: () => {\n this.onSelection({\n type: {\n name: 'blockQuote'\n }\n });\n }\n },\n {\n label: 'Code Block',\n icon: this.sanitizeUrl(codeIcon),\n command: () => {\n this.onSelection({\n type: {\n name: 'codeBlock'\n }\n });\n }\n },\n {\n label: 'Horizontal Line',\n icon: this.sanitizeUrl(lineIcon),\n command: () => {\n this.onSelection({\n type: {\n name: 'horizontalLine'\n }\n });\n }\n }\n ];\n\n this.items = [\n {\n label: 'Contentlets',\n icon: 'receipt',\n command: () => {\n this.initContentletSelection();\n }\n },\n ...headings,\n ...paragraph,\n ...list,\n ...block\n ];\n }\n\n /**\n * Execute the item command\n *\n * @memberof SuggestionsComponent\n */\n execCommand() {\n this.list.execCommand();\n }\n\n /**\n * Update the current item selected\n *\n * @param {KeyboardEvent} e\n * @memberof SuggestionsComponent\n */\n updateSelection(e: KeyboardEvent) {\n this.list.updateSelection(e);\n }\n\n /**\n * Set the first item active\n *\n * @memberof SuggestionsComponent\n */\n setFirstItemActive() {\n this.list.setFirstItemActive();\n }\n\n /**\n * Reset the key manager after we add new elements to the list\n *\n * @memberof SuggestionsComponent\n */\n resetKeyManager() {\n this.list.resetKeyManager();\n this.selectionUpdated = true;\n // Needs to wait until the item has been updated\n setTimeout(() => this.selectionUpdated = false, 0);\n }\n\n\n /**\n * Avoid closing the suggestions on manual scroll\n *\n * @param {MouseEvent} e\n * @memberof SuggestionsComponent\n */\n onMouseDownHandler(e: MouseEvent) {\n e.preventDefault();\n }\n\n /**\n * Handle the active item on menu events\n *\n * @param {MouseEvent} e\n * @memberof SuggestionsComponent\n */\n onMouseEnter(e: MouseEvent) {\n // If it's called right after updateSelection, do not update active Item\n if (this.selectionUpdated) {\n return;\n }\n e.preventDefault();\n const index = Number((e.target as HTMLElement).dataset.index);\n this.list.updateActiveItem(index);\n }\n\n /**\n * Execute the item command on mouse down\n *\n * @param {MouseEvent} e\n * @param {MenuItem} item\n * @memberof SuggestionsComponent\n */\n onMouseDown(e: MouseEvent, item: MenuItem) {\n e.preventDefault();\n item.command();\n }\n\n private initContentletSelection() {\n this.suggestionsService\n .getContentTypes()\n .pipe(\n map((items) => {\n return items.map((item) => {\n return {\n label: item.name,\n icon: item.icon,\n command: () => {\n this.suggestionsService\n .getContentlets(item.variable)\n .pipe(take(1))\n .subscribe((contentlets) => {\n this.items = contentlets.map((contentlet) => {\n return {\n label: contentlet.title,\n icon: 'image',\n command: () => {\n this.onSelection({\n payload: contentlet,\n type: {\n name: 'dotContent'\n }\n });\n }\n };\n });\n\n this.title = 'Select a contentlet';\n this.cd.detectChanges();\n this.resetKeyManager();\n });\n }\n };\n });\n }),\n take(1)\n )\n .subscribe((items) => {\n this.title = 'Select a content type';\n this.items = items;\n this.cd.detectChanges();\n this.resetKeyManager();\n });\n }\n\n private sanitizeUrl(url: string): SafeUrl {\n return this.domSanitizer.bypassSecurityTrustUrl(url);\n }\n}\n", + "properties": [ + { + "name": "icon", + "deprecated": false, + "deprecationMessage": "", + "type": "string | SafeUrl", + "optional": false, + "description": "", + "line": 18 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [], + "extends": "Omit", + "isDuplicate": true, + "duplicateId": 1, + "duplicateName": "DotMenuItem-1" + }, + { + "name": "DotMessage", + "id": "interface-DotMessage-36f2124ce1be2c8c1cdd8f4faf7251c6fa90848ab7fa14c615e8c0becea41b78b53ec00b2a4d13d1e71b9d916fd8cf9ff165a6cb24a6b956826d9afbf5215e9e", + "file": "apps/dotcms-ui/src/app/view/components/dot-message-display/model/dot-message.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotMessageSeverity } from './dot-message-severity.model';\nimport { DotMessageType } from './dot-message-type.model';\n\n/**\n *Message send from the backend\n *\n * @export\n * @interface DotMessage\n */\nexport interface DotMessage {\n life: number;\n message: string;\n portletIdList?: string[];\n severity: DotMessageSeverity;\n type: DotMessageType;\n}\n", + "properties": [ + { + "name": "life", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 11 + }, + { + "name": "message", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 12 + }, + { + "name": "portletIdList", + "deprecated": false, + "deprecationMessage": "", + "type": "string[]", + "optional": true, + "description": "", + "line": 13 + }, + { + "name": "severity", + "deprecated": false, + "deprecationMessage": "", + "type": "DotMessageSeverity", + "optional": false, + "description": "", + "line": 14 + }, + { + "name": "type", + "deprecated": false, + "deprecationMessage": "", + "type": "DotMessageType", + "optional": false, + "description": "", + "line": 15 + } + ], + "indexSignatures": [], + "kind": 165, + "description": "

Message send from the backend

\n", + "rawdescription": "\n\nMessage send from the backend\n\n", + "methods": [] + }, + { + "name": "DotOption", + "id": "interface-DotOption-0ab0c4689643306016d0bd5255087ad43e5c4510a35378b68ceae8bc09d520d0498e17edb18fb20d7df6c7c38af3f6589147b5033ffbb2b55a376f40fa5ffeb9", + "file": "libs/dotcms-field-elements/src/models/dot-html-tag.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotOption {\n label: string;\n value: string;\n}\n\nexport interface DotLabel {\n label: string;\n name: string;\n required?: boolean;\n}\n", + "properties": [ + { + "name": "label", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 2 + }, + { + "name": "value", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 3 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotOption", + "id": "interface-DotOption-0ab0c4689643306016d0bd5255087ad43e5c4510a35378b68ceae8bc09d520d0498e17edb18fb20d7df6c7c38af3f6589147b5033ffbb2b55a376f40fa5ffeb9-1", + "file": "libs/dotcms-webcomponents/src/models/dot-html-tag.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotOption {\n label: string;\n value: string;\n}\n\nexport interface DotLabel {\n label: string;\n name: string;\n required?: boolean;\n}\n", + "properties": [ + { + "name": "label", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 2 + }, + { + "name": "value", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 3 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [], + "isDuplicate": true, + "duplicateId": 1, + "duplicateName": "DotOption-1" + }, + { + "name": "DotPage", + "id": "interface-DotPage-623e415fe04f758f57a416f9959be43cbae677c93419bedf68bd2577dd6a80b66474d7f216d4106d9564889b8e376a32b82908b671cc07d431fdbcfae5f2c35e", + "file": "apps/dotcms-ui/src/app/shared/models/dot-page/dot-page.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotCMSContentType } from '@dotcms/dotcms-models';\n\n// TODO: we need to see why the endpoints are returning different \"Pages\" objects.\nexport interface DotPage {\n archived?: boolean;\n cacheTTL?: number;\n categoryId?: string;\n content?: boolean;\n contentType: DotCMSContentType;\n contentTypeId?: string;\n disabledWysiwyg?: Array;\n fileAsset: boolean;\n folder?: string;\n friendlyName: string;\n host: string;\n htmlpage?: boolean;\n httpsRequired?: boolean;\n identifier: string;\n inode: string;\n keyValue?: boolean;\n languageId?: number;\n lastReview?: Date;\n live?: boolean;\n locked?: boolean;\n lowIndexPriority?: boolean;\n menuOrder?: number;\n metadata?: string;\n modDate?: Date;\n modUser?: string;\n name: string;\n new?: boolean;\n nextReview?: string;\n owner?: string;\n pageUrl?: string;\n parentPermissionable?: any;\n permissionId?: string;\n permissionType?: string;\n redirect?: string;\n reviewInterval?: string;\n seoDescription?: string;\n seoKeywords?: string;\n showOnMenu?: boolean;\n sortOrder?: number;\n structure?: any;\n structureInode?: string;\n systemHost: false;\n templateId?: string;\n title?: string;\n type: string;\n uri: string;\n vanityUrl?: boolean;\n versionId?: string;\n versionType: string;\n working?: boolean;\n}\n\n// Extra properties from renderHTML\nexport interface DotPage {\n canEdit: boolean;\n canRead: boolean;\n canLock: boolean;\n identifier: string;\n liveInode?: string;\n lockMessage?: string;\n lockedBy?: string;\n lockedByName?: string;\n lockedOn?: Date;\n pageURI: string;\n remoteRendered?: boolean;\n shortyLive: string;\n shortyWorking: string;\n workingInode: string;\n rendered?: string;\n}\n", + "properties": [ + { + "name": "archived", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 5 + }, + { + "name": "cacheTTL", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 6 + }, + { + "name": "categoryId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 7 + }, + { + "name": "content", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 8 + }, + { + "name": "contentType", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSContentType", + "optional": false, + "description": "", + "line": 9 + }, + { + "name": "contentTypeId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 10 + }, + { + "name": "disabledWysiwyg", + "deprecated": false, + "deprecationMessage": "", + "type": "Array", + "optional": true, + "description": "", + "line": 11 + }, + { + "name": "fileAsset", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 12 + }, + { + "name": "folder", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 13 + }, + { + "name": "friendlyName", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 14 + }, + { + "name": "host", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 15 + }, + { + "name": "htmlpage", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 16 + }, + { + "name": "httpsRequired", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 17 + }, + { + "name": "identifier", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 18 + }, + { + "name": "inode", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 19 + }, + { + "name": "keyValue", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 20 + }, + { + "name": "languageId", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 21 + }, + { + "name": "lastReview", + "deprecated": false, + "deprecationMessage": "", + "type": "Date", + "optional": true, + "description": "", + "line": 22 + }, + { + "name": "live", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 23 + }, + { + "name": "locked", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 24 + }, + { + "name": "lowIndexPriority", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 25 + }, + { + "name": "menuOrder", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 26 + }, + { + "name": "metadata", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 27 + }, + { + "name": "modDate", + "deprecated": false, + "deprecationMessage": "", + "type": "Date", + "optional": true, + "description": "", + "line": 28 + }, + { + "name": "modUser", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 29 + }, + { + "name": "name", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 30 + }, + { + "name": "new", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 31 + }, + { + "name": "nextReview", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 32 + }, + { + "name": "owner", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 33 + }, + { + "name": "pageUrl", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 34 + }, + { + "name": "parentPermissionable", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": true, + "description": "", + "line": 35 + }, + { + "name": "permissionId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 36 + }, + { + "name": "permissionType", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 37 + }, + { + "name": "redirect", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 38 + }, + { + "name": "reviewInterval", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 39 + }, + { + "name": "seoDescription", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 40 + }, + { + "name": "seoKeywords", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 41 + }, + { + "name": "showOnMenu", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 42 + }, + { + "name": "sortOrder", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 43 + }, + { + "name": "structure", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": true, + "description": "", + "line": 44 + }, + { + "name": "structureInode", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 45 + }, + { + "name": "systemHost", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 46 + }, + { + "name": "templateId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 47 + }, + { + "name": "title", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 48 + }, + { + "name": "type", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 49 + }, + { + "name": "uri", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 50 + }, + { + "name": "vanityUrl", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 51 + }, + { + "name": "versionId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 52 + }, + { + "name": "versionType", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 53 + }, + { + "name": "working", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 54 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotPage", + "id": "interface-DotPage-623e415fe04f758f57a416f9959be43cbae677c93419bedf68bd2577dd6a80b66474d7f216d4106d9564889b8e376a32b82908b671cc07d431fdbcfae5f2c35e-1", + "file": "apps/dotcms-ui/src/app/shared/models/dot-page/dot-page.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotCMSContentType } from '@dotcms/dotcms-models';\n\n// TODO: we need to see why the endpoints are returning different \"Pages\" objects.\nexport interface DotPage {\n archived?: boolean;\n cacheTTL?: number;\n categoryId?: string;\n content?: boolean;\n contentType: DotCMSContentType;\n contentTypeId?: string;\n disabledWysiwyg?: Array;\n fileAsset: boolean;\n folder?: string;\n friendlyName: string;\n host: string;\n htmlpage?: boolean;\n httpsRequired?: boolean;\n identifier: string;\n inode: string;\n keyValue?: boolean;\n languageId?: number;\n lastReview?: Date;\n live?: boolean;\n locked?: boolean;\n lowIndexPriority?: boolean;\n menuOrder?: number;\n metadata?: string;\n modDate?: Date;\n modUser?: string;\n name: string;\n new?: boolean;\n nextReview?: string;\n owner?: string;\n pageUrl?: string;\n parentPermissionable?: any;\n permissionId?: string;\n permissionType?: string;\n redirect?: string;\n reviewInterval?: string;\n seoDescription?: string;\n seoKeywords?: string;\n showOnMenu?: boolean;\n sortOrder?: number;\n structure?: any;\n structureInode?: string;\n systemHost: false;\n templateId?: string;\n title?: string;\n type: string;\n uri: string;\n vanityUrl?: boolean;\n versionId?: string;\n versionType: string;\n working?: boolean;\n}\n\n// Extra properties from renderHTML\nexport interface DotPage {\n canEdit: boolean;\n canRead: boolean;\n canLock: boolean;\n identifier: string;\n liveInode?: string;\n lockMessage?: string;\n lockedBy?: string;\n lockedByName?: string;\n lockedOn?: Date;\n pageURI: string;\n remoteRendered?: boolean;\n shortyLive: string;\n shortyWorking: string;\n workingInode: string;\n rendered?: string;\n}\n", + "properties": [ + { + "name": "canEdit", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 59 + }, + { + "name": "canLock", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 61 + }, + { + "name": "canRead", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 60 + }, + { + "name": "identifier", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 62 + }, + { + "name": "liveInode", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 63 + }, + { + "name": "lockedBy", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 65 + }, + { + "name": "lockedByName", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 66 + }, + { + "name": "lockedOn", + "deprecated": false, + "deprecationMessage": "", + "type": "Date", + "optional": true, + "description": "", + "line": 67 + }, + { + "name": "lockMessage", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 64 + }, + { + "name": "pageURI", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 68 + }, + { + "name": "remoteRendered", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 69 + }, + { + "name": "rendered", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 73 + }, + { + "name": "shortyLive", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 70 + }, + { + "name": "shortyWorking", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 71 + }, + { + "name": "workingInode", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 72 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [], + "isDuplicate": true, + "duplicateId": 1, + "duplicateName": "DotPage-1" + }, + { + "name": "DotPageAsset", + "id": "interface-DotPageAsset-7f1143f40c37fc04b001bf3ef9dc49ee9ceda015f73611aff0aa5a086bc360ce500705f9631c4b4d327ee47f1649158c94fda5de705410a652923cef4a3d5b19", + "file": "apps/dotcms-ui/src/app/view/components/_common/dot-page-selector/service/dot-page-selector.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { map, pluck, flatMap } from 'rxjs/operators';\nimport { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { Site, CoreWebService } from '@dotcms/dotcms-js';\nimport { DotFolder, DotPageSelectorItem } from '../models/dot-page-selector.models';\n\nexport interface DotPageAsset {\n template: string;\n owner: string;\n identifier: string;\n friendlyname: string;\n modDate: string;\n cachettl: string;\n pagemetadata: string;\n languageId: number;\n title: string;\n showOnMenu: string;\n inode: string;\n seodescription: string;\n folder: string;\n __DOTNAME__?: string;\n path?: string;\n sortOrder: number;\n seokeywords: string;\n modUser: string;\n host: string;\n hostName: string;\n lastReview: string;\n stInode: string;\n url?: string;\n}\n\nconst PAGE_BASE_TYPE_QUERY = '+basetype:5';\nconst MAX_RESULTS_SIZE = 20;\n\n@Injectable()\nexport class DotPageSelectorService {\n constructor(private coreWebService: CoreWebService) {}\n\n /**\n * Get page asset by identifier\n *\n * @param {string} identifier\n * @returns {Observable}\n * @memberof DotPageSelectorService\n */\n getPageById(identifier: string): Observable {\n return this.coreWebService\n .requestView({\n body: this.getRequestBodyQuery(\n `${PAGE_BASE_TYPE_QUERY} +identifier:*${identifier}*`\n ),\n method: 'POST',\n url: '/api/es/search'\n })\n .pipe(\n pluck('contentlets'),\n flatMap((pages: DotPageAsset[]) => pages),\n map((page: DotPageAsset) => this.getPageSelectorItem(page))\n );\n }\n\n getPages(path: string): Observable {\n return this.coreWebService\n .requestView({\n url: `v1/page/search?path=${path}&onlyLiveSites=true&live=false`\n })\n .pipe(\n pluck('entity'),\n map((pages: DotPageAsset[]) => {\n return pages.map((page: DotPageAsset) => this.getPageSelectorItem(page));\n })\n );\n }\n\n getFolders(path: string): Observable {\n return this.coreWebService\n .requestView({\n url: `/api/v1/folder/byPath`,\n body: { path: path },\n method: 'POST'\n })\n .pipe(\n pluck('entity'),\n map((folder: DotFolder[]) => {\n return folder.map((folder: DotFolder) => this.getPageSelectorItem(folder));\n })\n );\n }\n\n getSites(param: string, specific?: boolean): Observable {\n let query = '+contenttype:Host -identifier:SYSTEM_HOST +host.hostName:';\n query += specific ? this.getSiteName(param) : `*${this.getSiteName(param)}*`;\n return this.coreWebService\n .requestView({\n body: param\n ? this.getRequestBodyQuery(query)\n : this.getRequestBodyQuery(query, MAX_RESULTS_SIZE),\n method: 'POST',\n url: '/api/es/search'\n })\n .pipe(\n pluck('contentlets'),\n map((sites: Site[]) => {\n return sites.map((site) => {\n return { payload: site, label: `//${site.hostname}/` };\n });\n })\n );\n }\n\n private getRequestBodyQuery(query: string, size?: number): { [key: string]: {} } {\n let obj = {\n query: {\n query_string: {\n query: query\n }\n }\n };\n if (size) {\n obj = Object.assign(obj, { size: size });\n }\n return obj;\n }\n\n private getSiteName(site: string): string {\n return site.replace(/\\//g, '').replace(' ', '?');\n }\n\n private getPageSelectorItem(item: DotPageAsset | DotFolder): DotPageSelectorItem {\n return {\n label: `//${item.hostName}${item.path}`,\n payload: item\n };\n }\n}\n", + "properties": [ + { + "name": "__DOTNAME__", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 21 + }, + { + "name": "cachettl", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 13 + }, + { + "name": "folder", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 20 + }, + { + "name": "friendlyname", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 11 + }, + { + "name": "host", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 26 + }, + { + "name": "hostName", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 27 + }, + { + "name": "identifier", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 10 + }, + { + "name": "inode", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 18 + }, + { + "name": "languageId", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 15 + }, + { + "name": "lastReview", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 28 + }, + { + "name": "modDate", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 12 + }, + { + "name": "modUser", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 25 + }, + { + "name": "owner", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 9 + }, + { + "name": "pagemetadata", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 14 + }, + { + "name": "path", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 22 + }, + { + "name": "seodescription", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 19 + }, + { + "name": "seokeywords", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 24 + }, + { + "name": "showOnMenu", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 17 + }, + { + "name": "sortOrder", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 23 + }, + { + "name": "stInode", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 29 + }, + { + "name": "template", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 8 + }, + { + "name": "title", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 16 + }, + { + "name": "url", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 30 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotPageAssetLayoutBody", + "id": "interface-DotPageAssetLayoutBody-8e6a73749c34df0c00155e704df0c63721d0a5c138303ac5f092daa3257a542b81453ec50309883343d0a7dc27171935ef7cb2752699b9e25471a4fe22715ee8", + "file": "libs/dotcms/src/lib/models/DotCMSPage.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotCMSSite } from './DotCMSSite.model';\n\nexport interface DotCMSPageParams {\n url: string;\n language?: string;\n}\n\nexport interface DotCMSPageAsset {\n canCreateTemplate: boolean;\n containers: DotCMSPageAssetContainer;\n layout: DotCMSLayout;\n page: DotCMSPage;\n site: DotCMSSite;\n template: DotCMSTemplate;\n viewAs: DotCMSViewAs;\n}\n\nexport interface DotCMSViewAs {\n language: {\n id: number;\n languageCode: string;\n countryCode: string;\n language: string;\n country: string;\n };\n mode: string;\n}\n\nexport interface DotCMSPageAssetContainer {\n [key: string]: {\n container: DotCMSContainer;\n containerStructures: DotCMSContainerStructure[];\n contentlets: {\n [key: string]: DotCMSContentlet[];\n };\n };\n}\n\nexport interface DotCMSContainerStructure {\n id: string;\n structureId: string;\n containerInode: string;\n containerId: string;\n code: string;\n contentTypeVar: string;\n}\n\nexport interface DotCMSLayout {\n pageWidth: string;\n width: string;\n layout: string;\n title: string;\n header: boolean;\n footer: boolean;\n body: DotPageAssetLayoutBody;\n sidebar: DotPageAssetLayoutSidebar;\n}\n\nexport interface DotPageAssetLayoutSidebar {\n preview: boolean;\n containers: DotCMSContainer[];\n location: string;\n widthPercent: number;\n width: string;\n}\n\nexport interface DotPageAssetLayoutBody {\n rows: DotPageAssetLayoutRow[];\n}\n\nexport interface DotPageAssetLayoutRow {\n identifier: number;\n value?: string;\n id?: string;\n columns: DotPageAssetLayoutColumn[];\n styleClass?: string;\n}\n\nexport interface DotPageAssetLayoutColumn {\n preview: boolean;\n containers: DotCMSContainer[];\n widthPercent: number;\n width: number;\n leftOffset: number;\n left: number;\n styleClass?: string;\n}\n\nexport interface DotCMSPage {\n template: string;\n modDate: number;\n metadata: string;\n cachettl: string;\n pageURI: string;\n title: string;\n type: string;\n showOnMenu: string;\n httpsRequired: boolean;\n inode: string;\n disabledWYSIWYG: any[];\n seokeywords: string;\n host: string;\n lastReview: number;\n working: boolean;\n locked: boolean;\n stInode: string;\n friendlyName: string;\n live: boolean;\n owner: string;\n identifier: string;\n nullProperties: any[];\n friendlyname: string;\n pagemetadata: string;\n languageId: number;\n url: string;\n seodescription: string;\n modUserName: string;\n folder: string;\n deleted: boolean;\n sortOrder: number;\n modUser: string;\n pageUrl: string;\n workingInode: string;\n shortyWorking: string;\n canEdit: boolean;\n canRead: boolean;\n canLock: boolean;\n lockedOn: number;\n lockedBy: string;\n lockedByName: string;\n liveInode: string;\n shortyLive: string;\n}\n\nexport interface DotCMSContainer {\n identifier: string;\n uuid: string;\n iDate: number;\n type: string;\n owner?: string;\n inode: string;\n source: string;\n title: string;\n friendlyName: string;\n modDate: number;\n modUser: string;\n sortOrder: number;\n showOnMenu: boolean;\n code?: string;\n maxContentlets: number;\n useDiv: boolean;\n sortContentletsBy?: string;\n preLoop: string;\n postLoop: string;\n staticify: boolean;\n luceneQuery?: string;\n notes: string;\n languageId?: number;\n path?: string;\n live: boolean;\n locked: boolean;\n working: boolean;\n deleted: boolean;\n name: string;\n archived: boolean;\n permissionId: string;\n versionId: string;\n versionType: string;\n permissionType: string;\n categoryId: string;\n idate: number;\n new: boolean;\n acceptTypes: string;\n contentlets: DotCMSContentlet[];\n}\n\nexport interface DotCMSContentlet {\n owner: string;\n identifier: string;\n hostName: string;\n modDate: number;\n languageId: number;\n body?: string;\n title: string;\n url: string;\n baseType: string;\n inode: string;\n titleImage: string;\n modUserName: string;\n archived: boolean;\n folder: string;\n hasTitleImage: boolean;\n sortOrder: number;\n modUser: string;\n host: string;\n working: boolean;\n locked: boolean;\n stInode: string;\n contentType: string;\n live: boolean;\n code?: string;\n widgetTitle?: string;\n endDate?: number;\n description?: string;\n recurrenceOccurs?: string;\n recurrenceDayOfWeek?: number;\n recurrenceDayOfMonth?: number;\n recurrenceStart?: number;\n recurrenceWeekOfMonth?: number;\n recurs?: boolean;\n noRecurrenceEnd?: boolean;\n urlTitle?: string;\n URL_MAP_FOR_CONTENT?: string;\n recurrenceDaysOfWeek?: string;\n recurrenceInterval?: number;\n urlMap?: string;\n recurrenceDatesToIgnore?: string;\n recurrenceMonthOfYear?: number;\n startDate?: number;\n recurrenceEnd?: number;\n categories?: string;\n image?: string;\n tags?: string;\n}\n\nexport interface DotCMSTemplate {\n iDate: number;\n type: string;\n owner: string;\n inode: string;\n identifier: string;\n source: string;\n title: string;\n friendlyName: string;\n modDate: number;\n modUser: string;\n sortOrder: number;\n showOnMenu: boolean;\n image: string;\n drawed: boolean;\n drawedBody: string;\n theme: string;\n anonymous: boolean;\n template: boolean;\n name: string;\n live: boolean;\n archived: boolean;\n locked: boolean;\n working: boolean;\n permissionId: string;\n versionId: string;\n versionType: string;\n deleted: boolean;\n permissionType: string;\n categoryId: string;\n idate: number;\n new: boolean;\n canEdit: boolean;\n}\n", + "properties": [ + { + "name": "rows", + "deprecated": false, + "deprecationMessage": "", + "type": "DotPageAssetLayoutRow[]", + "optional": false, + "description": "", + "line": 68 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotPageAssetLayoutColumn", + "id": "interface-DotPageAssetLayoutColumn-8e6a73749c34df0c00155e704df0c63721d0a5c138303ac5f092daa3257a542b81453ec50309883343d0a7dc27171935ef7cb2752699b9e25471a4fe22715ee8", + "file": "libs/dotcms/src/lib/models/DotCMSPage.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotCMSSite } from './DotCMSSite.model';\n\nexport interface DotCMSPageParams {\n url: string;\n language?: string;\n}\n\nexport interface DotCMSPageAsset {\n canCreateTemplate: boolean;\n containers: DotCMSPageAssetContainer;\n layout: DotCMSLayout;\n page: DotCMSPage;\n site: DotCMSSite;\n template: DotCMSTemplate;\n viewAs: DotCMSViewAs;\n}\n\nexport interface DotCMSViewAs {\n language: {\n id: number;\n languageCode: string;\n countryCode: string;\n language: string;\n country: string;\n };\n mode: string;\n}\n\nexport interface DotCMSPageAssetContainer {\n [key: string]: {\n container: DotCMSContainer;\n containerStructures: DotCMSContainerStructure[];\n contentlets: {\n [key: string]: DotCMSContentlet[];\n };\n };\n}\n\nexport interface DotCMSContainerStructure {\n id: string;\n structureId: string;\n containerInode: string;\n containerId: string;\n code: string;\n contentTypeVar: string;\n}\n\nexport interface DotCMSLayout {\n pageWidth: string;\n width: string;\n layout: string;\n title: string;\n header: boolean;\n footer: boolean;\n body: DotPageAssetLayoutBody;\n sidebar: DotPageAssetLayoutSidebar;\n}\n\nexport interface DotPageAssetLayoutSidebar {\n preview: boolean;\n containers: DotCMSContainer[];\n location: string;\n widthPercent: number;\n width: string;\n}\n\nexport interface DotPageAssetLayoutBody {\n rows: DotPageAssetLayoutRow[];\n}\n\nexport interface DotPageAssetLayoutRow {\n identifier: number;\n value?: string;\n id?: string;\n columns: DotPageAssetLayoutColumn[];\n styleClass?: string;\n}\n\nexport interface DotPageAssetLayoutColumn {\n preview: boolean;\n containers: DotCMSContainer[];\n widthPercent: number;\n width: number;\n leftOffset: number;\n left: number;\n styleClass?: string;\n}\n\nexport interface DotCMSPage {\n template: string;\n modDate: number;\n metadata: string;\n cachettl: string;\n pageURI: string;\n title: string;\n type: string;\n showOnMenu: string;\n httpsRequired: boolean;\n inode: string;\n disabledWYSIWYG: any[];\n seokeywords: string;\n host: string;\n lastReview: number;\n working: boolean;\n locked: boolean;\n stInode: string;\n friendlyName: string;\n live: boolean;\n owner: string;\n identifier: string;\n nullProperties: any[];\n friendlyname: string;\n pagemetadata: string;\n languageId: number;\n url: string;\n seodescription: string;\n modUserName: string;\n folder: string;\n deleted: boolean;\n sortOrder: number;\n modUser: string;\n pageUrl: string;\n workingInode: string;\n shortyWorking: string;\n canEdit: boolean;\n canRead: boolean;\n canLock: boolean;\n lockedOn: number;\n lockedBy: string;\n lockedByName: string;\n liveInode: string;\n shortyLive: string;\n}\n\nexport interface DotCMSContainer {\n identifier: string;\n uuid: string;\n iDate: number;\n type: string;\n owner?: string;\n inode: string;\n source: string;\n title: string;\n friendlyName: string;\n modDate: number;\n modUser: string;\n sortOrder: number;\n showOnMenu: boolean;\n code?: string;\n maxContentlets: number;\n useDiv: boolean;\n sortContentletsBy?: string;\n preLoop: string;\n postLoop: string;\n staticify: boolean;\n luceneQuery?: string;\n notes: string;\n languageId?: number;\n path?: string;\n live: boolean;\n locked: boolean;\n working: boolean;\n deleted: boolean;\n name: string;\n archived: boolean;\n permissionId: string;\n versionId: string;\n versionType: string;\n permissionType: string;\n categoryId: string;\n idate: number;\n new: boolean;\n acceptTypes: string;\n contentlets: DotCMSContentlet[];\n}\n\nexport interface DotCMSContentlet {\n owner: string;\n identifier: string;\n hostName: string;\n modDate: number;\n languageId: number;\n body?: string;\n title: string;\n url: string;\n baseType: string;\n inode: string;\n titleImage: string;\n modUserName: string;\n archived: boolean;\n folder: string;\n hasTitleImage: boolean;\n sortOrder: number;\n modUser: string;\n host: string;\n working: boolean;\n locked: boolean;\n stInode: string;\n contentType: string;\n live: boolean;\n code?: string;\n widgetTitle?: string;\n endDate?: number;\n description?: string;\n recurrenceOccurs?: string;\n recurrenceDayOfWeek?: number;\n recurrenceDayOfMonth?: number;\n recurrenceStart?: number;\n recurrenceWeekOfMonth?: number;\n recurs?: boolean;\n noRecurrenceEnd?: boolean;\n urlTitle?: string;\n URL_MAP_FOR_CONTENT?: string;\n recurrenceDaysOfWeek?: string;\n recurrenceInterval?: number;\n urlMap?: string;\n recurrenceDatesToIgnore?: string;\n recurrenceMonthOfYear?: number;\n startDate?: number;\n recurrenceEnd?: number;\n categories?: string;\n image?: string;\n tags?: string;\n}\n\nexport interface DotCMSTemplate {\n iDate: number;\n type: string;\n owner: string;\n inode: string;\n identifier: string;\n source: string;\n title: string;\n friendlyName: string;\n modDate: number;\n modUser: string;\n sortOrder: number;\n showOnMenu: boolean;\n image: string;\n drawed: boolean;\n drawedBody: string;\n theme: string;\n anonymous: boolean;\n template: boolean;\n name: string;\n live: boolean;\n archived: boolean;\n locked: boolean;\n working: boolean;\n permissionId: string;\n versionId: string;\n versionType: string;\n deleted: boolean;\n permissionType: string;\n categoryId: string;\n idate: number;\n new: boolean;\n canEdit: boolean;\n}\n", + "properties": [ + { + "name": "containers", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSContainer[]", + "optional": false, + "description": "", + "line": 81 + }, + { + "name": "left", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 85 + }, + { + "name": "leftOffset", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 84 + }, + { + "name": "preview", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 80 + }, + { + "name": "styleClass", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 86 + }, + { + "name": "width", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 83 + }, + { + "name": "widthPercent", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 82 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotPageAssetLayoutRow", + "id": "interface-DotPageAssetLayoutRow-8e6a73749c34df0c00155e704df0c63721d0a5c138303ac5f092daa3257a542b81453ec50309883343d0a7dc27171935ef7cb2752699b9e25471a4fe22715ee8", + "file": "libs/dotcms/src/lib/models/DotCMSPage.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotCMSSite } from './DotCMSSite.model';\n\nexport interface DotCMSPageParams {\n url: string;\n language?: string;\n}\n\nexport interface DotCMSPageAsset {\n canCreateTemplate: boolean;\n containers: DotCMSPageAssetContainer;\n layout: DotCMSLayout;\n page: DotCMSPage;\n site: DotCMSSite;\n template: DotCMSTemplate;\n viewAs: DotCMSViewAs;\n}\n\nexport interface DotCMSViewAs {\n language: {\n id: number;\n languageCode: string;\n countryCode: string;\n language: string;\n country: string;\n };\n mode: string;\n}\n\nexport interface DotCMSPageAssetContainer {\n [key: string]: {\n container: DotCMSContainer;\n containerStructures: DotCMSContainerStructure[];\n contentlets: {\n [key: string]: DotCMSContentlet[];\n };\n };\n}\n\nexport interface DotCMSContainerStructure {\n id: string;\n structureId: string;\n containerInode: string;\n containerId: string;\n code: string;\n contentTypeVar: string;\n}\n\nexport interface DotCMSLayout {\n pageWidth: string;\n width: string;\n layout: string;\n title: string;\n header: boolean;\n footer: boolean;\n body: DotPageAssetLayoutBody;\n sidebar: DotPageAssetLayoutSidebar;\n}\n\nexport interface DotPageAssetLayoutSidebar {\n preview: boolean;\n containers: DotCMSContainer[];\n location: string;\n widthPercent: number;\n width: string;\n}\n\nexport interface DotPageAssetLayoutBody {\n rows: DotPageAssetLayoutRow[];\n}\n\nexport interface DotPageAssetLayoutRow {\n identifier: number;\n value?: string;\n id?: string;\n columns: DotPageAssetLayoutColumn[];\n styleClass?: string;\n}\n\nexport interface DotPageAssetLayoutColumn {\n preview: boolean;\n containers: DotCMSContainer[];\n widthPercent: number;\n width: number;\n leftOffset: number;\n left: number;\n styleClass?: string;\n}\n\nexport interface DotCMSPage {\n template: string;\n modDate: number;\n metadata: string;\n cachettl: string;\n pageURI: string;\n title: string;\n type: string;\n showOnMenu: string;\n httpsRequired: boolean;\n inode: string;\n disabledWYSIWYG: any[];\n seokeywords: string;\n host: string;\n lastReview: number;\n working: boolean;\n locked: boolean;\n stInode: string;\n friendlyName: string;\n live: boolean;\n owner: string;\n identifier: string;\n nullProperties: any[];\n friendlyname: string;\n pagemetadata: string;\n languageId: number;\n url: string;\n seodescription: string;\n modUserName: string;\n folder: string;\n deleted: boolean;\n sortOrder: number;\n modUser: string;\n pageUrl: string;\n workingInode: string;\n shortyWorking: string;\n canEdit: boolean;\n canRead: boolean;\n canLock: boolean;\n lockedOn: number;\n lockedBy: string;\n lockedByName: string;\n liveInode: string;\n shortyLive: string;\n}\n\nexport interface DotCMSContainer {\n identifier: string;\n uuid: string;\n iDate: number;\n type: string;\n owner?: string;\n inode: string;\n source: string;\n title: string;\n friendlyName: string;\n modDate: number;\n modUser: string;\n sortOrder: number;\n showOnMenu: boolean;\n code?: string;\n maxContentlets: number;\n useDiv: boolean;\n sortContentletsBy?: string;\n preLoop: string;\n postLoop: string;\n staticify: boolean;\n luceneQuery?: string;\n notes: string;\n languageId?: number;\n path?: string;\n live: boolean;\n locked: boolean;\n working: boolean;\n deleted: boolean;\n name: string;\n archived: boolean;\n permissionId: string;\n versionId: string;\n versionType: string;\n permissionType: string;\n categoryId: string;\n idate: number;\n new: boolean;\n acceptTypes: string;\n contentlets: DotCMSContentlet[];\n}\n\nexport interface DotCMSContentlet {\n owner: string;\n identifier: string;\n hostName: string;\n modDate: number;\n languageId: number;\n body?: string;\n title: string;\n url: string;\n baseType: string;\n inode: string;\n titleImage: string;\n modUserName: string;\n archived: boolean;\n folder: string;\n hasTitleImage: boolean;\n sortOrder: number;\n modUser: string;\n host: string;\n working: boolean;\n locked: boolean;\n stInode: string;\n contentType: string;\n live: boolean;\n code?: string;\n widgetTitle?: string;\n endDate?: number;\n description?: string;\n recurrenceOccurs?: string;\n recurrenceDayOfWeek?: number;\n recurrenceDayOfMonth?: number;\n recurrenceStart?: number;\n recurrenceWeekOfMonth?: number;\n recurs?: boolean;\n noRecurrenceEnd?: boolean;\n urlTitle?: string;\n URL_MAP_FOR_CONTENT?: string;\n recurrenceDaysOfWeek?: string;\n recurrenceInterval?: number;\n urlMap?: string;\n recurrenceDatesToIgnore?: string;\n recurrenceMonthOfYear?: number;\n startDate?: number;\n recurrenceEnd?: number;\n categories?: string;\n image?: string;\n tags?: string;\n}\n\nexport interface DotCMSTemplate {\n iDate: number;\n type: string;\n owner: string;\n inode: string;\n identifier: string;\n source: string;\n title: string;\n friendlyName: string;\n modDate: number;\n modUser: string;\n sortOrder: number;\n showOnMenu: boolean;\n image: string;\n drawed: boolean;\n drawedBody: string;\n theme: string;\n anonymous: boolean;\n template: boolean;\n name: string;\n live: boolean;\n archived: boolean;\n locked: boolean;\n working: boolean;\n permissionId: string;\n versionId: string;\n versionType: string;\n deleted: boolean;\n permissionType: string;\n categoryId: string;\n idate: number;\n new: boolean;\n canEdit: boolean;\n}\n", + "properties": [ + { + "name": "columns", + "deprecated": false, + "deprecationMessage": "", + "type": "DotPageAssetLayoutColumn[]", + "optional": false, + "description": "", + "line": 75 + }, + { + "name": "id", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 74 + }, + { + "name": "identifier", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 72 + }, + { + "name": "styleClass", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 76 + }, + { + "name": "value", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 73 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotPageAssetLayoutSidebar", + "id": "interface-DotPageAssetLayoutSidebar-8e6a73749c34df0c00155e704df0c63721d0a5c138303ac5f092daa3257a542b81453ec50309883343d0a7dc27171935ef7cb2752699b9e25471a4fe22715ee8", + "file": "libs/dotcms/src/lib/models/DotCMSPage.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotCMSSite } from './DotCMSSite.model';\n\nexport interface DotCMSPageParams {\n url: string;\n language?: string;\n}\n\nexport interface DotCMSPageAsset {\n canCreateTemplate: boolean;\n containers: DotCMSPageAssetContainer;\n layout: DotCMSLayout;\n page: DotCMSPage;\n site: DotCMSSite;\n template: DotCMSTemplate;\n viewAs: DotCMSViewAs;\n}\n\nexport interface DotCMSViewAs {\n language: {\n id: number;\n languageCode: string;\n countryCode: string;\n language: string;\n country: string;\n };\n mode: string;\n}\n\nexport interface DotCMSPageAssetContainer {\n [key: string]: {\n container: DotCMSContainer;\n containerStructures: DotCMSContainerStructure[];\n contentlets: {\n [key: string]: DotCMSContentlet[];\n };\n };\n}\n\nexport interface DotCMSContainerStructure {\n id: string;\n structureId: string;\n containerInode: string;\n containerId: string;\n code: string;\n contentTypeVar: string;\n}\n\nexport interface DotCMSLayout {\n pageWidth: string;\n width: string;\n layout: string;\n title: string;\n header: boolean;\n footer: boolean;\n body: DotPageAssetLayoutBody;\n sidebar: DotPageAssetLayoutSidebar;\n}\n\nexport interface DotPageAssetLayoutSidebar {\n preview: boolean;\n containers: DotCMSContainer[];\n location: string;\n widthPercent: number;\n width: string;\n}\n\nexport interface DotPageAssetLayoutBody {\n rows: DotPageAssetLayoutRow[];\n}\n\nexport interface DotPageAssetLayoutRow {\n identifier: number;\n value?: string;\n id?: string;\n columns: DotPageAssetLayoutColumn[];\n styleClass?: string;\n}\n\nexport interface DotPageAssetLayoutColumn {\n preview: boolean;\n containers: DotCMSContainer[];\n widthPercent: number;\n width: number;\n leftOffset: number;\n left: number;\n styleClass?: string;\n}\n\nexport interface DotCMSPage {\n template: string;\n modDate: number;\n metadata: string;\n cachettl: string;\n pageURI: string;\n title: string;\n type: string;\n showOnMenu: string;\n httpsRequired: boolean;\n inode: string;\n disabledWYSIWYG: any[];\n seokeywords: string;\n host: string;\n lastReview: number;\n working: boolean;\n locked: boolean;\n stInode: string;\n friendlyName: string;\n live: boolean;\n owner: string;\n identifier: string;\n nullProperties: any[];\n friendlyname: string;\n pagemetadata: string;\n languageId: number;\n url: string;\n seodescription: string;\n modUserName: string;\n folder: string;\n deleted: boolean;\n sortOrder: number;\n modUser: string;\n pageUrl: string;\n workingInode: string;\n shortyWorking: string;\n canEdit: boolean;\n canRead: boolean;\n canLock: boolean;\n lockedOn: number;\n lockedBy: string;\n lockedByName: string;\n liveInode: string;\n shortyLive: string;\n}\n\nexport interface DotCMSContainer {\n identifier: string;\n uuid: string;\n iDate: number;\n type: string;\n owner?: string;\n inode: string;\n source: string;\n title: string;\n friendlyName: string;\n modDate: number;\n modUser: string;\n sortOrder: number;\n showOnMenu: boolean;\n code?: string;\n maxContentlets: number;\n useDiv: boolean;\n sortContentletsBy?: string;\n preLoop: string;\n postLoop: string;\n staticify: boolean;\n luceneQuery?: string;\n notes: string;\n languageId?: number;\n path?: string;\n live: boolean;\n locked: boolean;\n working: boolean;\n deleted: boolean;\n name: string;\n archived: boolean;\n permissionId: string;\n versionId: string;\n versionType: string;\n permissionType: string;\n categoryId: string;\n idate: number;\n new: boolean;\n acceptTypes: string;\n contentlets: DotCMSContentlet[];\n}\n\nexport interface DotCMSContentlet {\n owner: string;\n identifier: string;\n hostName: string;\n modDate: number;\n languageId: number;\n body?: string;\n title: string;\n url: string;\n baseType: string;\n inode: string;\n titleImage: string;\n modUserName: string;\n archived: boolean;\n folder: string;\n hasTitleImage: boolean;\n sortOrder: number;\n modUser: string;\n host: string;\n working: boolean;\n locked: boolean;\n stInode: string;\n contentType: string;\n live: boolean;\n code?: string;\n widgetTitle?: string;\n endDate?: number;\n description?: string;\n recurrenceOccurs?: string;\n recurrenceDayOfWeek?: number;\n recurrenceDayOfMonth?: number;\n recurrenceStart?: number;\n recurrenceWeekOfMonth?: number;\n recurs?: boolean;\n noRecurrenceEnd?: boolean;\n urlTitle?: string;\n URL_MAP_FOR_CONTENT?: string;\n recurrenceDaysOfWeek?: string;\n recurrenceInterval?: number;\n urlMap?: string;\n recurrenceDatesToIgnore?: string;\n recurrenceMonthOfYear?: number;\n startDate?: number;\n recurrenceEnd?: number;\n categories?: string;\n image?: string;\n tags?: string;\n}\n\nexport interface DotCMSTemplate {\n iDate: number;\n type: string;\n owner: string;\n inode: string;\n identifier: string;\n source: string;\n title: string;\n friendlyName: string;\n modDate: number;\n modUser: string;\n sortOrder: number;\n showOnMenu: boolean;\n image: string;\n drawed: boolean;\n drawedBody: string;\n theme: string;\n anonymous: boolean;\n template: boolean;\n name: string;\n live: boolean;\n archived: boolean;\n locked: boolean;\n working: boolean;\n permissionId: string;\n versionId: string;\n versionType: string;\n deleted: boolean;\n permissionType: string;\n categoryId: string;\n idate: number;\n new: boolean;\n canEdit: boolean;\n}\n", + "properties": [ + { + "name": "containers", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSContainer[]", + "optional": false, + "description": "", + "line": 61 + }, + { + "name": "location", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 62 + }, + { + "name": "preview", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 60 + }, + { + "name": "width", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 64 + }, + { + "name": "widthPercent", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 63 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotPageContainer", + "id": "interface-DotPageContainer-d7cd1deec6c13be91e3eb2f0dc2dc6e8686ae483ee46fc9eb14770442a057e9c57e5133dd99570a3da40737d271b79c87c4816ede5cc03e28c291400395035c5", + "file": "apps/dotcms-ui/src/app/shared/models/dot-page-container/dot-page-container.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotPageContainer {\n identifier: string;\n uuid: string;\n contentletsId?: string[];\n path?: string;\n}\n\nexport interface DotPageContainerPersonalized extends DotPageContainer {\n personaTag?: string;\n}\n", + "properties": [ + { + "name": "contentletsId", + "deprecated": false, + "deprecationMessage": "", + "type": "string[]", + "optional": true, + "description": "", + "line": 7 + }, + { + "name": "identifier", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 5 + }, + { + "name": "path", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 8 + }, + { + "name": "uuid", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 6 + } + ], + "indexSignatures": [], + "kind": 165, + "description": "

Represent a Container linked with a page and with content added to it

\n", + "rawdescription": "\n\nRepresent a Container linked with a page and with content added to it\n", + "methods": [] + }, + { + "name": "DotPageContainerPersonalized", + "id": "interface-DotPageContainerPersonalized-d7cd1deec6c13be91e3eb2f0dc2dc6e8686ae483ee46fc9eb14770442a057e9c57e5133dd99570a3da40737d271b79c87c4816ede5cc03e28c291400395035c5", + "file": "apps/dotcms-ui/src/app/shared/models/dot-page-container/dot-page-container.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotPageContainer {\n identifier: string;\n uuid: string;\n contentletsId?: string[];\n path?: string;\n}\n\nexport interface DotPageContainerPersonalized extends DotPageContainer {\n personaTag?: string;\n}\n", + "properties": [ + { + "name": "personaTag", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 12 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [], + "extends": "DotPageContainer" + }, + { + "name": "DotPageContent", + "id": "interface-DotPageContent-a110897a62c8478da2e6d82036f8c39afa5d07bcedcd5ccd5a4c092cac65b44c983b8b485129c5a8f0870d3bb9cd5c0a94df527f5d1cf7424e56c19c074c4e7c", + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/shared/models/dot-page-content.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotPageContent {\n identifier: string;\n inode: string;\n type?: string;\n baseType?: string;\n}\n", + "properties": [ + { + "name": "baseType", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 8 + }, + { + "name": "identifier", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 5 + }, + { + "name": "inode", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 6 + }, + { + "name": "type", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 7 + } + ], + "indexSignatures": [], + "kind": 165, + "description": "

Represent a Container linked with a page and with content added to it

\n", + "rawdescription": "\n\nRepresent a Container linked with a page and with content added to it\n", + "methods": [] + }, + { + "name": "DotPageRenderOptions", + "id": "interface-DotPageRenderOptions-9511dbac666a2a583e5712d838c00c8474ca666e49c4f0f85626762ba7f8e99275636dd4405bbec4c8f4f3836d9dc262eb700d994f6fbb6521b89e8e39d750cb", + "file": "apps/dotcms-ui/src/app/api/services/dot-page-render/dot-page-render.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { pluck } from 'rxjs/operators';\nimport { CoreWebService } from '@dotcms/dotcms-js';\nimport { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { DotPageRender } from '@models/dot-page/dot-rendered-page.model';\nimport { DotPageMode } from '@models/dot-page/dot-page-mode.enum';\n\nimport { DotPersona } from '@shared/models/dot-persona/dot-persona.model';\nimport { DotDevice } from '@shared/models/dot-device/dot-device.model';\nimport { Params } from '@angular/router';\n\n/**\n * Get a render page with the received params\n *\n * @export\n * @class DotPageRenderService\n */\n@Injectable()\nexport class DotPageRenderService {\n constructor(private coreWebService: CoreWebService) {}\n\n /**\n * Make request to get a rendered page\n *\n * @param {DotPageRenderOptions} options\n * @returns {Observable}\n * @memberof DotPageRenderService\n */\n get(\n { viewAs, mode, url }: DotPageRenderOptions,\n extraParams?: Params\n ): Observable {\n const params: DotPageRenderRequestParams = this.getOptionalViewAsParams(viewAs, mode);\n return this.coreWebService\n .requestView({\n url: `v1/page/render/${url.replace(/^\\//, '')}`,\n params: { ...extraParams, ...params }\n })\n .pipe(pluck('entity'));\n }\n\n private getOptionalViewAsParams(\n viewAsConfig: DotPageRenderOptionsViewAs = {},\n mode: DotPageMode\n ): DotPageRenderRequestParams {\n return {\n ...this.getPersonaParam(viewAsConfig.persona),\n ...this.getDeviceParam(viewAsConfig.device),\n ...this.getLanguageParam(viewAsConfig.language),\n ...this.getModeParam(mode)\n };\n }\n\n private getModeParam(mode: DotPageMode): { [key: string]: DotPageMode } {\n return mode ? { mode } : {};\n }\n\n private getPersonaParam(persona: DotPersona): { [key: string]: string } {\n return persona\n ? {\n 'com.dotmarketing.persona.id': persona.identifier || null\n }\n : {};\n }\n\n private getDeviceParam(device: DotDevice): { [key: string]: string } {\n return device\n ? {\n device_inode: device.inode\n }\n : {};\n }\n\n private getLanguageParam(language: number): { [key: string]: string } {\n return language\n ? {\n language_id: language.toString()\n }\n : {};\n }\n}\n\nexport interface DotPageRenderOptionsViewAs {\n persona?: DotPersona;\n language?: number;\n device?: DotDevice;\n}\n\nexport interface DotPageRenderOptions {\n url?: string;\n mode?: DotPageMode;\n viewAs?: DotPageRenderOptionsViewAs;\n}\n\ninterface DotPageRenderRequestParams {\n persona_id?: string;\n language_id?: string;\n device_inode?: string;\n mode?: DotPageMode;\n}\n", + "properties": [ + { + "name": "mode", + "deprecated": false, + "deprecationMessage": "", + "type": "DotPageMode", + "optional": true, + "description": "", + "line": 92 + }, + { + "name": "url", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 91 + }, + { + "name": "viewAs", + "deprecated": false, + "deprecationMessage": "", + "type": "DotPageRenderOptionsViewAs", + "optional": true, + "description": "", + "line": 93 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotPageRenderOptionsViewAs", + "id": "interface-DotPageRenderOptionsViewAs-9511dbac666a2a583e5712d838c00c8474ca666e49c4f0f85626762ba7f8e99275636dd4405bbec4c8f4f3836d9dc262eb700d994f6fbb6521b89e8e39d750cb", + "file": "apps/dotcms-ui/src/app/api/services/dot-page-render/dot-page-render.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { pluck } from 'rxjs/operators';\nimport { CoreWebService } from '@dotcms/dotcms-js';\nimport { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { DotPageRender } from '@models/dot-page/dot-rendered-page.model';\nimport { DotPageMode } from '@models/dot-page/dot-page-mode.enum';\n\nimport { DotPersona } from '@shared/models/dot-persona/dot-persona.model';\nimport { DotDevice } from '@shared/models/dot-device/dot-device.model';\nimport { Params } from '@angular/router';\n\n/**\n * Get a render page with the received params\n *\n * @export\n * @class DotPageRenderService\n */\n@Injectable()\nexport class DotPageRenderService {\n constructor(private coreWebService: CoreWebService) {}\n\n /**\n * Make request to get a rendered page\n *\n * @param {DotPageRenderOptions} options\n * @returns {Observable}\n * @memberof DotPageRenderService\n */\n get(\n { viewAs, mode, url }: DotPageRenderOptions,\n extraParams?: Params\n ): Observable {\n const params: DotPageRenderRequestParams = this.getOptionalViewAsParams(viewAs, mode);\n return this.coreWebService\n .requestView({\n url: `v1/page/render/${url.replace(/^\\//, '')}`,\n params: { ...extraParams, ...params }\n })\n .pipe(pluck('entity'));\n }\n\n private getOptionalViewAsParams(\n viewAsConfig: DotPageRenderOptionsViewAs = {},\n mode: DotPageMode\n ): DotPageRenderRequestParams {\n return {\n ...this.getPersonaParam(viewAsConfig.persona),\n ...this.getDeviceParam(viewAsConfig.device),\n ...this.getLanguageParam(viewAsConfig.language),\n ...this.getModeParam(mode)\n };\n }\n\n private getModeParam(mode: DotPageMode): { [key: string]: DotPageMode } {\n return mode ? { mode } : {};\n }\n\n private getPersonaParam(persona: DotPersona): { [key: string]: string } {\n return persona\n ? {\n 'com.dotmarketing.persona.id': persona.identifier || null\n }\n : {};\n }\n\n private getDeviceParam(device: DotDevice): { [key: string]: string } {\n return device\n ? {\n device_inode: device.inode\n }\n : {};\n }\n\n private getLanguageParam(language: number): { [key: string]: string } {\n return language\n ? {\n language_id: language.toString()\n }\n : {};\n }\n}\n\nexport interface DotPageRenderOptionsViewAs {\n persona?: DotPersona;\n language?: number;\n device?: DotDevice;\n}\n\nexport interface DotPageRenderOptions {\n url?: string;\n mode?: DotPageMode;\n viewAs?: DotPageRenderOptionsViewAs;\n}\n\ninterface DotPageRenderRequestParams {\n persona_id?: string;\n language_id?: string;\n device_inode?: string;\n mode?: DotPageMode;\n}\n", + "properties": [ + { + "name": "device", + "deprecated": false, + "deprecationMessage": "", + "type": "DotDevice", + "optional": true, + "description": "", + "line": 87 + }, + { + "name": "language", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 86 + }, + { + "name": "persona", + "deprecated": false, + "deprecationMessage": "", + "type": "DotPersona", + "optional": true, + "description": "", + "line": 85 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotPageRenderRequestParams", + "id": "interface-DotPageRenderRequestParams-9511dbac666a2a583e5712d838c00c8474ca666e49c4f0f85626762ba7f8e99275636dd4405bbec4c8f4f3836d9dc262eb700d994f6fbb6521b89e8e39d750cb", + "file": "apps/dotcms-ui/src/app/api/services/dot-page-render/dot-page-render.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { pluck } from 'rxjs/operators';\nimport { CoreWebService } from '@dotcms/dotcms-js';\nimport { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { DotPageRender } from '@models/dot-page/dot-rendered-page.model';\nimport { DotPageMode } from '@models/dot-page/dot-page-mode.enum';\n\nimport { DotPersona } from '@shared/models/dot-persona/dot-persona.model';\nimport { DotDevice } from '@shared/models/dot-device/dot-device.model';\nimport { Params } from '@angular/router';\n\n/**\n * Get a render page with the received params\n *\n * @export\n * @class DotPageRenderService\n */\n@Injectable()\nexport class DotPageRenderService {\n constructor(private coreWebService: CoreWebService) {}\n\n /**\n * Make request to get a rendered page\n *\n * @param {DotPageRenderOptions} options\n * @returns {Observable}\n * @memberof DotPageRenderService\n */\n get(\n { viewAs, mode, url }: DotPageRenderOptions,\n extraParams?: Params\n ): Observable {\n const params: DotPageRenderRequestParams = this.getOptionalViewAsParams(viewAs, mode);\n return this.coreWebService\n .requestView({\n url: `v1/page/render/${url.replace(/^\\//, '')}`,\n params: { ...extraParams, ...params }\n })\n .pipe(pluck('entity'));\n }\n\n private getOptionalViewAsParams(\n viewAsConfig: DotPageRenderOptionsViewAs = {},\n mode: DotPageMode\n ): DotPageRenderRequestParams {\n return {\n ...this.getPersonaParam(viewAsConfig.persona),\n ...this.getDeviceParam(viewAsConfig.device),\n ...this.getLanguageParam(viewAsConfig.language),\n ...this.getModeParam(mode)\n };\n }\n\n private getModeParam(mode: DotPageMode): { [key: string]: DotPageMode } {\n return mode ? { mode } : {};\n }\n\n private getPersonaParam(persona: DotPersona): { [key: string]: string } {\n return persona\n ? {\n 'com.dotmarketing.persona.id': persona.identifier || null\n }\n : {};\n }\n\n private getDeviceParam(device: DotDevice): { [key: string]: string } {\n return device\n ? {\n device_inode: device.inode\n }\n : {};\n }\n\n private getLanguageParam(language: number): { [key: string]: string } {\n return language\n ? {\n language_id: language.toString()\n }\n : {};\n }\n}\n\nexport interface DotPageRenderOptionsViewAs {\n persona?: DotPersona;\n language?: number;\n device?: DotDevice;\n}\n\nexport interface DotPageRenderOptions {\n url?: string;\n mode?: DotPageMode;\n viewAs?: DotPageRenderOptionsViewAs;\n}\n\ninterface DotPageRenderRequestParams {\n persona_id?: string;\n language_id?: string;\n device_inode?: string;\n mode?: DotPageMode;\n}\n", + "properties": [ + { + "name": "device_inode", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 99 + }, + { + "name": "language_id", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 98 + }, + { + "name": "mode", + "deprecated": false, + "deprecationMessage": "", + "type": "DotPageMode", + "optional": true, + "description": "", + "line": 100 + }, + { + "name": "persona_id", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 97 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotPageSelectorItem", + "id": "interface-DotPageSelectorItem-335689f1d35817f7a670d4029bf57acc594dcb4b8d2e57c4bf89db5f70caaff2abb9c0cab09f48090f9be8570b65167d33b2c36ef3e60e54ef777fc382f74a69", + "file": "apps/dotcms-ui/src/app/view/components/_common/dot-page-selector/models/dot-page-selector.models.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotPageAsset } from '../service/dot-page-selector.service';\nimport { Site } from '@dotcms/dotcms-js';\n\nexport interface DotPageSelectorItem {\n label: string;\n payload: DotPageAsset | Site | DotFolder;\n}\n\nexport interface DotSimpleURL {\n host: string;\n pathname: string;\n}\n\nexport interface DotFolder {\n hostName: string;\n path: string;\n addChildrenAllowed: boolean;\n}\n\nexport interface CompleteEvent {\n originalEvent: InputEvent;\n query: string;\n}\n", + "properties": [ + { + "name": "label", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 5 + }, + { + "name": "payload", + "deprecated": false, + "deprecationMessage": "", + "type": "DotPageAsset | Site | DotFolder", + "optional": false, + "description": "", + "line": 6 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotPageState", + "id": "interface-DotPageState-fda9273fa767653b125a94b0ac3fc2aba58b7aa90830a68c0213e9f1b06e5d37024183730986d5131f8e7312107a607f0879d2e47f72c9b6972f2155719909e8", + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/shared/models/dot-rendered-page-state.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { User } from '@dotcms/dotcms-js';\n\nimport { DotEditPageViewAs } from '@models/dot-edit-page-view-as/dot-edit-page-view-as.model';\nimport { DotContainer, DotContainerStructure } from '@shared/models/container/dot-container.model';\nimport { DotLayout, DotTemplate } from '@shared/models/dot-edit-layout-designer';\nimport { DotPageMode } from '@models/dot-page/dot-page-mode.enum';\nimport { DotPage } from '@models/dot-page/dot-page.model';\nimport { DotPageRender } from '@models/dot-page/dot-rendered-page.model';\n\ninterface DotPageState {\n locked?: boolean;\n lockedByAnotherUser?: boolean;\n mode: DotPageMode;\n}\n\nexport class DotPageRenderState extends DotPageRender {\n private _state: DotPageState;\n\n constructor(private _user: User, private dotRenderedPage: DotPageRender.Parameters) {\n super(dotRenderedPage);\n const locked = !!dotRenderedPage.page.lockedBy;\n const lockedByAnotherUser = locked ? dotRenderedPage.page.lockedBy !== _user.userId : false;\n\n this._state = {\n locked: locked,\n lockedByAnotherUser: lockedByAnotherUser,\n mode: dotRenderedPage.viewAs.mode\n };\n }\n\n get canCreateTemplate(): any {\n return this.dotRenderedPage.canCreateTemplate;\n }\n\n get containers(): {\n [key: string]: {\n container: DotContainer;\n containerStructures?: DotContainerStructure[];\n };\n } {\n return this.dotRenderedPage.containers;\n }\n\n get html(): string {\n return this.dotRenderedPage.page.rendered;\n }\n\n get layout(): DotLayout {\n return this.dotRenderedPage.layout;\n }\n\n get page(): DotPage {\n return this.dotRenderedPage.page;\n }\n\n get state(): DotPageState {\n return this._state;\n }\n\n get template(): DotTemplate {\n return this.dotRenderedPage.template;\n }\n\n get viewAs(): DotEditPageViewAs {\n return this.dotRenderedPage.viewAs;\n }\n\n get user(): User {\n return this._user;\n }\n\n set dotRenderedPageState(dotRenderedPageState: DotPageRender) {\n this.dotRenderedPage = dotRenderedPageState;\n }\n}\n", + "properties": [ + { + "name": "locked", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 11 + }, + { + "name": "lockedByAnotherUser", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 12 + }, + { + "name": "mode", + "deprecated": false, + "deprecationMessage": "", + "type": "DotPageMode", + "optional": false, + "description": "", + "line": 13 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotPageView", + "id": "interface-DotPageView-055657d002bf05d94f88740976919d79c80ade3868b4d0195cef2381f3166aa4758e1071930a5c66e536d1b94883656ac6e2e60038f2ed280329db82f7254c91", + "file": "apps/dotcms-ui/src/app/shared/models/dot-page/dot-page-view.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotLayout, DotTemplate } from '@shared/models/dot-edit-layout-designer';\nimport { DotPage } from './dot-page.model';\n\nexport interface DotPageView {\n layout: DotLayout;\n page: DotPage;\n containers?: any;\n site?: any;\n template?: DotTemplate;\n canEditTemplate: boolean;\n}\n", + "properties": [ + { + "name": "canEditTemplate", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 10 + }, + { + "name": "containers", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": true, + "description": "", + "line": 7 + }, + { + "name": "layout", + "deprecated": false, + "deprecationMessage": "", + "type": "DotLayout", + "optional": false, + "description": "", + "line": 5 + }, + { + "name": "page", + "deprecated": false, + "deprecationMessage": "", + "type": "DotPage", + "optional": false, + "description": "", + "line": 6 + }, + { + "name": "site", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": true, + "description": "", + "line": 8 + }, + { + "name": "template", + "deprecated": false, + "deprecationMessage": "", + "type": "DotTemplate", + "optional": true, + "description": "", + "line": 9 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotPermissionsType", + "id": "interface-DotPermissionsType-17daf33d8d993d93f20caf0a04c274b20a9eac54abfd2ff06165a5b92c4e7ac2b9d8b06fce748cd47a769d67cdc3ad2d4e26d19e525fcb3141e1314cde72ffba", + "file": "apps/dotcms-ui/src/app/shared/models/dot-current-user/dot-current-user.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export enum UserPermissions {\n READ = 'READ',\n WRITE = 'WRITE'\n}\n\nexport enum PermissionsType {\n HTMLPAGES = 'HTMLPAGES',\n CONTAINERS = 'CONTAINERS',\n FOLDERS = 'FOLDERS',\n LINKS = 'LINKS',\n TEMPLATES = 'TEMPLATES',\n TEMPLATE_LAYOUTS = 'TEMPLATE_LAYOUTS',\n STRUCTURES = 'STRUCTURES',\n CONTENTLETS = 'CONTENTLETS',\n CATEGORY = 'CATEGORY',\n RULES = 'RULES'\n}\n\n/**\n * Interface for current users.\n *\n * @interface\n */\nexport interface DotCurrentUser {\n email: string;\n givenName: string;\n roleId: string;\n surnaname: string;\n userId: string;\n}\n\nexport interface DotPermissionsType {\n [key: string]: {\n canRead?: boolean;\n canWrite?: boolean;\n };\n}\n", + "properties": [], + "indexSignatures": [ + { + "id": "index-declaration-17daf33d8d993d93f20caf0a04c274b20a9eac54abfd2ff06165a5b92c4e7ac2b9d8b06fce748cd47a769d67cdc3ad2d4e26d19e525fcb3141e1314cde72ffba", + "args": [ + { + "name": "key", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "returnType": "literal type", + "line": 32, + "deprecated": false, + "deprecationMessage": "" + } + ], + "kind": 175, + "methods": [] + }, + { + "name": "DotPersona", + "id": "interface-DotPersona-1a0c08c11fdaf137f91ff20f10fe2cc841c3f2902e8f9d6b652d1e5f9b8787b1ad309009bd37fbae869dadc76e8d6c5a10c78a755ad5c75b73f5107c841463c1", + "file": "apps/dotcms-ui/src/app/shared/models/dot-persona/dot-persona.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotCMSContentlet } from '@dotcms/dotcms-models';\n\nexport interface DotPersona extends DotCMSContentlet {\n description?: string;\n hostFolder?: string;\n keyTag: string;\n name: string;\n personalized: boolean;\n photo?: string;\n photoContentAsset?: string;\n photoVersion?: string;\n tags?: string;\n}\n", + "properties": [ + { + "name": "description", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 4 + }, + { + "name": "hostFolder", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 5 + }, + { + "name": "keyTag", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 6 + }, + { + "name": "name", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 7 + }, + { + "name": "personalized", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 8 + }, + { + "name": "photo", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 9 + }, + { + "name": "photoContentAsset", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 10 + }, + { + "name": "photoVersion", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 11 + }, + { + "name": "tags", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 12 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [], + "extends": "DotCMSContentlet" + }, + { + "name": "DotPortletToolbarActions", + "id": "interface-DotPortletToolbarActions-c12e1f051b5fff31b9b662382944b9a41ce3800113fdc8b49e522ee91354f7608521f007e8b5497d8bf14f41ab93df6e8a9a56725115d0bffe4babf1671e9f97", + "file": "apps/dotcms-ui/src/app/shared/models/dot-portlet-toolbar.model/dot-portlet-toolbar-actions.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { MenuItem } from 'primeng/api';\n\nexport interface DotPortletToolbarActions {\n primary: MenuItem[];\n cancel: (event: MouseEvent) => void;\n}\n", + "properties": [ + { + "name": "cancel", + "deprecated": false, + "deprecationMessage": "", + "type": "function", + "optional": false, + "description": "", + "line": 5 + }, + { + "name": "primary", + "deprecated": false, + "deprecationMessage": "", + "type": "MenuItem[]", + "optional": false, + "description": "", + "line": 4 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotProfile", + "id": "interface-DotProfile-1480e5b27675ec324c70a2dd7521774d98b6275caeedf3f0c5d66630fc3c32c6a356fe7d25a522b02701b96383b59b0c0425118b7f4992f7e342ac04a3550d4b", + "file": "apps/dotcms-ui/src/app/api/services/dot-gravatar-service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { map, pluck, catchError } from 'rxjs/operators';\nimport { Injectable } from '@angular/core';\nimport { Observable, of } from 'rxjs';\nimport { HttpClient } from '@angular/common/http';\n\ninterface DotProfile {\n displayName: string;\n hash: string;\n id: string;\n name: string[];\n photos: {\n type: string;\n value: string;\n };\n preferredUsername: string;\n profileUrl: string;\n requestHash: string;\n thumbnailUrl: string;\n urls: string[];\n}\n\n/**\n * Connect with Gravatar API\n *\n * @export\n * @class DotGravatarService\n */\n@Injectable()\nexport class DotGravatarService {\n constructor(private http: HttpClient) {}\n\n /**\n * Load the avatar url from a hash\n *\n * @param {string} hash\n * @returns {Observable}\n * @memberof DotGravatarService\n */\n getPhoto(hash: string): Observable {\n return this.http.jsonp(`//www.gravatar.com/${hash}.json?`, 'JSONP_CALLBACK').pipe(\n pluck('_body'),\n pluck('entry'),\n map((profiles: DotProfile[]) => profiles[0].photos[0].value),\n catchError(() => {\n return of(null);\n })\n );\n }\n}\n", + "properties": [ + { + "name": "displayName", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 7 + }, + { + "name": "hash", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 8 + }, + { + "name": "id", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 9 + }, + { + "name": "name", + "deprecated": false, + "deprecationMessage": "", + "type": "string[]", + "optional": false, + "description": "", + "line": 10 + }, + { + "name": "photos", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": false, + "description": "", + "line": 11 + }, + { + "name": "preferredUsername", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 15 + }, + { + "name": "profileUrl", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 16 + }, + { + "name": "requestHash", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 17 + }, + { + "name": "thumbnailUrl", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 18 + }, + { + "name": "urls", + "deprecated": false, + "deprecationMessage": "", + "type": "string[]", + "optional": false, + "description": "", + "line": 19 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotPushPublishData", + "id": "interface-DotPushPublishData-bf42ef0d399e13134f693e1ac26f49f6f35b1a17dc7a89942da87288be7161d7a2456cede248f4d433dc5b260b799e0a30a4c127f6e67d5b9d37beab024743ee", + "file": "apps/dotcms-ui/src/app/shared/models/dot-push-publish-data/dot-push-publish-data.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotPushPublishData {\n pushActionSelected: string;\n publishDate: string;\n expireDate: string;\n environment: string[];\n filterKey: string;\n timezoneId: string;\n}\n", + "properties": [ + { + "name": "environment", + "deprecated": false, + "deprecationMessage": "", + "type": "string[]", + "optional": false, + "description": "", + "line": 10 + }, + { + "name": "expireDate", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 9 + }, + { + "name": "filterKey", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 11 + }, + { + "name": "publishDate", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 8 + }, + { + "name": "pushActionSelected", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 7 + }, + { + "name": "timezoneId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 12 + } + ], + "indexSignatures": [], + "kind": 165, + "description": "

Data required for push publish

\n", + "rawdescription": "\n\nData required for push publish\n", + "methods": [] + }, + { + "name": "DotPushPublishDialogData", + "id": "interface-DotPushPublishDialogData-510e5ab619a32c807a8f81e904e10399b4133f1d20034043bb509f3f23f03bbb1f6522a5fa69ed4fcfb7e9e3209b27abb14a57eb22c0a70a1d16777f0a1640bb", + "file": "libs/dotcms-models/src/lib/dot-push-publish-dialog-data.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotPushPublishDialogData {\n assetIdentifier: string;\n title: string;\n dateFilter?: boolean;\n removeOnly?: boolean;\n isBundle?: boolean;\n restricted?: boolean;\n cats?: boolean;\n customCode?: string;\n}\n", + "properties": [ + { + "name": "assetIdentifier", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 7 + }, + { + "name": "cats", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 13 + }, + { + "name": "customCode", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 14 + }, + { + "name": "dateFilter", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 9 + }, + { + "name": "isBundle", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 11 + }, + { + "name": "removeOnly", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 10 + }, + { + "name": "restricted", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 12 + }, + { + "name": "title", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 8 + } + ], + "indexSignatures": [], + "kind": 165, + "description": "

Data that came from legacy PushPublish Dialog

\n", + "rawdescription": "\n\nData that came from legacy PushPublish Dialog\n", + "methods": [] + }, + { + "name": "DotPushPublishFilter", + "id": "interface-DotPushPublishFilter-18c276aa80d0d1123a357df78abcdf57f7dc7bdbfcf6da5fbe5e484d43c15ecc12898a8117f7ab036a7f87706d6726fa4f12baa5a4b8c82fa193e3d6f23a0082", + "file": "apps/dotcms-ui/src/app/api/services/dot-push-publish-filters/dot-push-publish-filters.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Injectable } from '@angular/core';\nimport { CoreWebService } from '@dotcms/dotcms-js';\nimport { Observable } from 'rxjs';\nimport { pluck } from 'rxjs/operators';\n\nexport interface DotPushPublishFilter {\n defaultFilter: boolean;\n key: string;\n title: string;\n}\n\n@Injectable()\nexport class DotPushPublishFiltersService {\n constructor(private coreWebService: CoreWebService) {}\n\n get(): Observable {\n return this.coreWebService\n .requestView({\n url: '/api/v1/pushpublish/filters/'\n })\n .pipe(pluck('entity'));\n }\n}\n", + "properties": [ + { + "name": "defaultFilter", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 7 + }, + { + "name": "key", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 8 + }, + { + "name": "title", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 9 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotRelationship", + "id": "interface-DotRelationship-8c463794de6b3bf8552c11b1e9a4f84a05fa6991871cb1c7d5aa454e7dc4fc5df8a5e4a447301d5adc3989f9f8d65b1f3b2589d76f5b4062b2232c2281e4f414", + "file": "apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/components/fields/content-type-fields-properties-form/field-properties/dot-relationships-property/model/dot-relationship.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotCMSContentType } from '@dotcms/dotcms-models';\n\nexport interface DotRelationship {\n archived: boolean;\n cardinality: number;\n categoryId: string;\n childRelationName: string;\n childRequired: boolean;\n childStructure: DotCMSContentType;\n childStructureInode: string;\n fixed: boolean;\n identifier: string;\n inode: string;\n live: boolean;\n locked: boolean;\n modDate: number;\n modUser: string;\n new: boolean;\n owner: string;\n parentRelationName: string;\n parentRequired: boolean;\n parentStructure: DotCMSContentType;\n parentStructureInode: string;\n permissionId: string;\n permissionType: string;\n relationTypeValue: string;\n title: string;\n type: string;\n versionId: null;\n versionType: string;\n working: boolean;\n}\n", + "properties": [ + { + "name": "archived", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 4 + }, + { + "name": "cardinality", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 5 + }, + { + "name": "categoryId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 6 + }, + { + "name": "childRelationName", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 7 + }, + { + "name": "childRequired", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 8 + }, + { + "name": "childStructure", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSContentType", + "optional": false, + "description": "", + "line": 9 + }, + { + "name": "childStructureInode", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 10 + }, + { + "name": "fixed", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 11 + }, + { + "name": "identifier", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 12 + }, + { + "name": "inode", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 13 + }, + { + "name": "live", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 14 + }, + { + "name": "locked", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 15 + }, + { + "name": "modDate", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 16 + }, + { + "name": "modUser", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 17 + }, + { + "name": "new", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 18 + }, + { + "name": "owner", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 19 + }, + { + "name": "parentRelationName", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 20 + }, + { + "name": "parentRequired", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 21 + }, + { + "name": "parentStructure", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSContentType", + "optional": false, + "description": "", + "line": 22 + }, + { + "name": "parentStructureInode", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 23 + }, + { + "name": "permissionId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 24 + }, + { + "name": "permissionType", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 25 + }, + { + "name": "relationTypeValue", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 26 + }, + { + "name": "title", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 27 + }, + { + "name": "type", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 28 + }, + { + "name": "versionId", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 29 + }, + { + "name": "versionType", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 30 + }, + { + "name": "working", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 31 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotRelationshipCardinality", + "id": "interface-DotRelationshipCardinality-d18979c350050aa6c70ccbd8bbe3d149ffca72dae1e7747dbf05b78692d57badaafc12a9437a581a6d129f2bbe0f37dfbb02d51f6526771765cd1cfebe718611", + "file": "apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/components/fields/content-type-fields-properties-form/field-properties/dot-relationships-property/model/dot-relationship-cardinality.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotRelationshipCardinality {\n name: string;\n id: number;\n label: string;\n}\n", + "properties": [ + { + "name": "id", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 3 + }, + { + "name": "label", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 4 + }, + { + "name": "name", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 2 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotRelationshipsPropertyValue", + "id": "interface-DotRelationshipsPropertyValue-ee0714b5d59005e45e7354d3fa8a01c71c65e2331d3818382a36b1536273605312dd3a9e88f81d612aee5a739cd4242e42c47a70eacd7bc8cc68c569c049d4f9", + "file": "apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/components/fields/content-type-fields-properties-form/field-properties/dot-relationships-property/model/dot-relationships-property-value.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotRelationshipsPropertyValue {\n velocityVar: string;\n cardinality: number;\n}\n", + "properties": [ + { + "name": "cardinality", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 9 + }, + { + "name": "velocityVar", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 8 + } + ], + "indexSignatures": [], + "kind": 165, + "description": "

Value return by {@see DotRelationshipsPropertyComponent}

\n", + "rawdescription": "\n\nValue return by {@see DotRelationshipsPropertyComponent}\n\n", + "methods": [] + }, + { + "name": "DotRelocatePayload", + "id": "interface-DotRelocatePayload-548bff6c62c66666033e5858c740593d9da0e58c682b7338e62ed468d90162ab7c9f2a766f6cc365c405ec52b71752b143e28ae8b6643581879119257e9faab8", + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/dot-edit-content-html/models/dot-contentlets-events.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotPageContent } from '@portlets/dot-edit-page/shared/models/dot-page-content.model';\nimport { DotPageContainer } from '@models/dot-page-container/dot-page-container.model';\n\nexport interface DotContentletEvent {\n name: string;\n data: T;\n}\n\nexport interface DotContentletEventDragAndDropDotAsset extends DotContentletEvent {}\nexport interface DotContentletEventRelocate extends DotContentletEvent {}\nexport interface DotContentletEventSelect extends DotContentletEvent {}\nexport interface DotContentletEventSave extends DotContentletEvent {}\n\nexport interface DotAssetPayload {\n contentlet: DotPageContent;\n placeholderId: string;\n}\n\nexport interface DotRelocatePayload {\n container: DotPageContainer;\n contentlet: DotPageContent;\n}\n\nexport interface DotInlineDataset {\n mode: string;\n inode: string;\n fieldName: string;\n language: string;\n}\n\nexport interface DotInlineEditContent {\n innerHTML: string;\n dataset: DotInlineDataset;\n element: HTMLElement;\n isNotDirty: boolean;\n eventType: string;\n}\n", + "properties": [ + { + "name": "container", + "deprecated": false, + "deprecationMessage": "", + "type": "DotPageContainer", + "optional": false, + "description": "", + "line": 20 + }, + { + "name": "contentlet", + "deprecated": false, + "deprecationMessage": "", + "type": "DotPageContent", + "optional": false, + "description": "", + "line": 21 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotRequestOptionsArgs", + "id": "interface-DotRequestOptionsArgs-40ae8ada9d57dc6cf3e813a8895469d7bb40d4348e08ac03d2d0301a9bd07bd61e7ea203faf51d0bd9efc70b6537e386db94ddc656c0a9b29661e6d123e9d06a", + "file": "libs/dotcms-js/src/lib/core/core-web.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Injectable } from '@angular/core';\nimport { Subject, Observable, throwError } from 'rxjs';\nimport { map, catchError, filter } from 'rxjs/operators';\n\nimport {\n CwError,\n NETWORK_CONNECTION_ERROR,\n UNKNOWN_RESPONSE_ERROR,\n CLIENTS_ONLY_MESSAGES,\n SERVER_RESPONSE_ERROR\n} from './util/http-response-util';\nimport { ResponseView } from './util/response-view';\nimport { LoggerService } from './logger.service';\nimport { HttpCode } from './util/http-code';\nimport { Router } from '@angular/router';\nimport {\n HttpClient,\n HttpRequest,\n HttpHeaders,\n HttpParams,\n HttpResponse,\n HttpEventType,\n HttpEvent,\n HttpErrorResponse\n} from '@angular/common/http';\n\nexport interface DotCMSResponse {\n contentlets?: T;\n entity?: T;\n tempFiles?: T; // /api/v1/temp don't have entity\n errors: string[];\n i18nMessagesMap: { [key: string]: string };\n messages: string[];\n permissions: string[];\n}\n\nexport interface DotRequestOptionsArgs {\n url: string;\n body?:\n | {\n [key: string]: any;\n }\n | string;\n method?: string;\n params?: {\n [key: string]: any;\n };\n headers?: {\n [key: string]: any;\n };\n}\n\n@Injectable()\nexport class CoreWebService {\n private httpErrosSubjects: Subject[] = [];\n\n constructor(\n private loggerService: LoggerService,\n private router: Router,\n private http: HttpClient\n ) {}\n\n /**\n *\n * Request data from dotCMS endpoints\n *\n * @template T\n * @param {DotRequestOptionsArgs} options\n * @return {*} {Observable>}\n * @memberof CoreWebService\n * @deprecated\n */\n request(options: DotRequestOptionsArgs): Observable> {\n if (!options.method) {\n options.method = 'GET';\n }\n\n const request = this.getRequestOpts(options);\n const source = options.body;\n\n return this.http.request(request).pipe(\n filter(\n (event: HttpEvent> | any>) =>\n event.type === HttpEventType.Response\n ),\n map((resp: HttpResponse>) => {\n // some endpoints have empty body.\n try {\n return resp.body;\n } catch (error) {\n return resp;\n }\n }),\n catchError(\n (response: HttpErrorResponse, _original: Observable): Observable => {\n if (response) {\n this.emitHttpError(response.status);\n\n if (\n response.status === HttpCode.SERVER_ERROR ||\n response.status === HttpCode.FORBIDDEN\n ) {\n if (\n response.statusText &&\n response.statusText.indexOf('ECONNREFUSED') >= 0\n ) {\n throw new CwError(\n NETWORK_CONNECTION_ERROR,\n CLIENTS_ONLY_MESSAGES[NETWORK_CONNECTION_ERROR],\n request,\n response,\n source\n );\n } else {\n throw new CwError(\n SERVER_RESPONSE_ERROR,\n response.error.message,\n request,\n response,\n source\n );\n }\n } else if (response.status === HttpCode.NOT_FOUND) {\n this.loggerService.error(\n 'Could not execute request: 404 path not valid.',\n options.url\n );\n throw new CwError(\n UNKNOWN_RESPONSE_ERROR,\n response.headers.get('error-message'),\n request,\n response,\n source\n );\n }\n }\n return null;\n }\n )\n );\n }\n\n /**\n * Return a response adapted to the follow json format:\n *\n * \n * {\n * \"errors\":[],\n * \"entity\":{},\n * \"messages\":[],\n * \"i18nMessagesMap\":{}\n * }\n * \n *\n * @RequestOptionsArgs options\n * @returns Observable\n */\n requestView(options: DotRequestOptionsArgs): Observable> {\n if (!options.method) {\n options.method = 'GET';\n }\n\n let request;\n\n if (options.body) {\n if (typeof options.body === 'string') {\n request = this.getRequestOpts(options);\n } else {\n request = this.getRequestOpts<{ [key: string]: any }>(options);\n }\n } else {\n request = this.getRequestOpts(options);\n }\n\n return this.http.request(request).pipe(\n filter(\n (event: HttpEvent> | any>) =>\n event.type === HttpEventType.Response\n ),\n map((resp: HttpResponse>) => {\n if (resp.body && resp.body.errors && resp.body.errors.length > 0) {\n return this.handleRequestViewErrors(resp);\n } else {\n return new ResponseView(resp);\n }\n }),\n catchError((err: HttpErrorResponse) => {\n this.emitHttpError(err.status);\n return throwError(this.handleResponseHttpErrors(err));\n })\n );\n }\n\n /**\n * Emit to the subscriber when the request fail\n *\n * @param {number} httpErrorCode\n * @returns {Observable}\n * @memberof CoreWebService\n */\n subscribeToHttpError(httpErrorCode: number): Observable {\n if (!this.httpErrosSubjects[httpErrorCode]) {\n this.httpErrosSubjects[httpErrorCode] = new Subject();\n }\n\n return this.httpErrosSubjects[httpErrorCode].asObservable();\n }\n\n private handleRequestViewErrors(resp: HttpResponse>): ResponseView {\n if (resp.status === 401) {\n this.router.navigate(['/public/login']);\n }\n\n return new ResponseView(resp);\n }\n\n private handleResponseHttpErrors(resp: HttpErrorResponse): HttpErrorResponse {\n if (resp.status === 401) {\n this.router.navigate(['/public/login']);\n }\n\n return resp;\n }\n\n private emitHttpError(status: number): void {\n if (this.httpErrosSubjects[status]) {\n this.httpErrosSubjects[status].next();\n }\n }\n\n private getRequestOpts(options: DotRequestOptionsArgs): HttpRequest {\n const headers = this.getHttpHeaders(options.headers);\n const params = this.getHttpParams(options.params);\n const url = this.getFixedUrl(options.url);\n const body = options.body || null;\n\n if (\n options.method === 'POST' ||\n options.method === 'PUT' ||\n options.method === 'PATCH' ||\n options.method === 'DELETE'\n ) {\n return new HttpRequest(options.method, url, body, {\n headers,\n params\n });\n }\n\n const method = <'GET' | 'HEAD' | 'JSONP' | 'OPTIONS'>options.method;\n return new HttpRequest(method, url, {\n headers,\n params\n });\n }\n\n private getHttpHeaders(headers: { [key: string]: string }): HttpHeaders {\n let httpHeaders = this.getDefaultRequestHeaders();\n\n if (headers && Object.keys(headers).length) {\n Object.keys(headers).forEach((key) => {\n httpHeaders = httpHeaders.set(key, headers[key]);\n });\n\n // If Content-Type == 'multipart/form-data' we need to remove Content-Type,\n // otherwise \"boundary\" will not be added to Content-Type in the Header\n if (headers['Content-Type'] === 'multipart/form-data') {\n httpHeaders = httpHeaders.delete('Content-Type');\n }\n }\n return httpHeaders;\n }\n\n private getFixedUrl(url: string): string {\n if (url?.startsWith('api')) {\n return `/${url}`;\n }\n\n const version = url ? url.split('/')[0] : '';\n if (version.match(/v[1-9]/g)) {\n return `/api/${url}`;\n }\n return url;\n }\n\n private getHttpParams(params: { [key: string]: any }): HttpParams {\n if (params && Object.keys(params).length) {\n let httpParams = new HttpParams();\n\n Object.keys(params).forEach((key: string) => {\n httpParams = httpParams.set(key, params[key]);\n });\n return httpParams;\n }\n\n return null;\n }\n\n private getDefaultRequestHeaders(): HttpHeaders {\n const headers = new HttpHeaders()\n .set('Accept', '*/*')\n .set('Content-Type', 'application/json');\n return headers;\n }\n}\n", + "properties": [ + { + "name": "body", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type | string", + "optional": true, + "description": "", + "line": 39 + }, + { + "name": "headers", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": true, + "description": "", + "line": 48 + }, + { + "name": "method", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 44 + }, + { + "name": "params", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": true, + "description": "", + "line": 45 + }, + { + "name": "url", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 38 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotRole", + "id": "interface-DotRole-3ad60de2b20b99281689cb1ea36e84fb6f8112af31f443d210e41f74e56106e2757b9ba5216e936cf47ee51bf87477a290976eb67fc1215817de467ebbe96d95", + "file": "apps/dotcms-ui/src/app/shared/models/dot-role/dot-role.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotRole {\n id: string;\n name: string;\n user: boolean;\n roleKey: string;\n}\n", + "properties": [ + { + "name": "id", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 2 + }, + { + "name": "name", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 3 + }, + { + "name": "roleKey", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 5 + }, + { + "name": "user", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 4 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotRuleMessage", + "id": "interface-DotRuleMessage-11751d95f8108b5c19ac3b86af6811e3a7b50f384c24c999deb5b42b110b6c162368ea468ee037d348a253df4965cd4902dfd6f0c4c10b5ca8e723e58330b049", + "file": "libs/dot-rules/src/lib/services/dot-view-rule-service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Injectable } from '@angular/core';\nimport { Subject, Observable } from 'rxjs';\n\n@Injectable()\nexport class RuleViewService {\n private _message: Subject = new Subject();\n\n public showErrorMessage(message: string, allowClose = true, errorKey = ''): void {\n this._message.next({\n message,\n allowClose,\n errorKey\n });\n }\n\n get message(): Observable {\n return this._message.asObservable();\n }\n}\n\nexport interface DotRuleMessage {\n message: string;\n allowClose: boolean;\n errorKey?: string;\n}\n", + "properties": [ + { + "name": "allowClose", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 23 + }, + { + "name": "errorKey", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 24 + }, + { + "name": "message", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 22 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotSelectButtonOption", + "id": "interface-DotSelectButtonOption-287cf0d73a539a1a94478f8648b96d6bbfb373b21fe78cfe7edde1cacb9aed2d6d7490db4d10fae98e907de8edd1518aa89c7148b037d5e7424f8b353dfedeee", + "file": "libs/dotcms-webcomponents/src/models/dotSelectButtonOption.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotSelectButtonOption {\n label: string;\n icon: string;\n disabled?: boolean\n}\n", + "properties": [ + { + "name": "disabled", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 4 + }, + { + "name": "icon", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 3 + }, + { + "name": "label", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 2 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotSimpleURL", + "id": "interface-DotSimpleURL-335689f1d35817f7a670d4029bf57acc594dcb4b8d2e57c4bf89db5f70caaff2abb9c0cab09f48090f9be8570b65167d33b2c36ef3e60e54ef777fc382f74a69", + "file": "apps/dotcms-ui/src/app/view/components/_common/dot-page-selector/models/dot-page-selector.models.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotPageAsset } from '../service/dot-page-selector.service';\nimport { Site } from '@dotcms/dotcms-js';\n\nexport interface DotPageSelectorItem {\n label: string;\n payload: DotPageAsset | Site | DotFolder;\n}\n\nexport interface DotSimpleURL {\n host: string;\n pathname: string;\n}\n\nexport interface DotFolder {\n hostName: string;\n path: string;\n addChildrenAllowed: boolean;\n}\n\nexport interface CompleteEvent {\n originalEvent: InputEvent;\n query: string;\n}\n", + "properties": [ + { + "name": "host", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 10 + }, + { + "name": "pathname", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 11 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotSite", + "id": "interface-DotSite-a60cfbb0503ff981d0e9192ef10ec838b4e32f07eee1259d7049327ae245980db3cf34f4b0a86632dca3ace89351bed2777058bdbe328e6d1f26b633abdfd5c1", + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/shared/models/dot-site.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotCMSContentType } from '@dotcms/dotcms-models';\n\nexport interface DotSite {\n archived?: string;\n categoryId?: string;\n contentType: DotCMSContentType;\n contentTypeId?: string;\n host?: string;\n hostname: string;\n identifier: string;\n inode?: string;\n keyValue?: boolean;\n locked?: boolean;\n modDate?: Date;\n name: string;\n owner?: string;\n permissionId: string;\n permissionType?: string;\n sortOrder?: number;\n tagStorage?: string;\n title?: string;\n type: string;\n vanityUrl?: boolean;\n versionId?: string;\n versionType?: string;\n}\n", + "properties": [ + { + "name": "archived", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 4 + }, + { + "name": "categoryId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 5 + }, + { + "name": "contentType", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSContentType", + "optional": false, + "description": "", + "line": 6 + }, + { + "name": "contentTypeId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 7 + }, + { + "name": "host", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 8 + }, + { + "name": "hostname", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 9 + }, + { + "name": "identifier", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 10 + }, + { + "name": "inode", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 11 + }, + { + "name": "keyValue", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 12 + }, + { + "name": "locked", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 13 + }, + { + "name": "modDate", + "deprecated": false, + "deprecationMessage": "", + "type": "Date", + "optional": true, + "description": "", + "line": 14 + }, + { + "name": "name", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 15 + }, + { + "name": "owner", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 16 + }, + { + "name": "permissionId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 17 + }, + { + "name": "permissionType", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 18 + }, + { + "name": "sortOrder", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 19 + }, + { + "name": "tagStorage", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 20 + }, + { + "name": "title", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 21 + }, + { + "name": "type", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 22 + }, + { + "name": "vanityUrl", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 23 + }, + { + "name": "versionId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 24 + }, + { + "name": "versionType", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 25 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotTag", + "id": "interface-DotTag-a5b2de85a08b99a3ae8bcae148904d1c6232fef9fc6c4a551238cf4cf06a03423b94ee06815fd7580ecf2bd78b139100578a875a6fcb62ede8012f0fd3f68ced", + "file": "apps/dotcms-ui/src/app/shared/models/dot-tag/dot-tag.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotTag {\n label: string;\n siteId: string;\n siteName: string;\n persona: boolean;\n}\n", + "properties": [ + { + "name": "label", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 2 + }, + { + "name": "persona", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 5 + }, + { + "name": "siteId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 3 + }, + { + "name": "siteName", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 4 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotTaskAction", + "id": "interface-DotTaskAction-f4b89890e8c4e78b1e2730409de0a11e2d0cf21bc52c149b597a550dcdd29b657cb51177ef3fc1bcdd91e4ce296ff998345b4b5d4ba50b973c3a9f2799af98b9", + "file": "apps/dotcms-ui/src/app/view/components/dot-workflow-task-detail/services/dot-workflow-task-detail.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Injectable } from '@angular/core';\nimport { BehaviorSubject, Observable, of } from 'rxjs';\nimport { mergeMap, map } from 'rxjs/operators';\nimport { DotMenuService } from '@services/dot-menu.service';\n\nexport interface DotTaskAction {\n header?: string;\n id: string;\n}\n\n/**\n * Handle the url and events for add and edit workflow tasks components\n *\n * @export\n * @class DotWorkflowTaskDetailService\n */\n@Injectable()\nexport class DotWorkflowTaskDetailService {\n private data: BehaviorSubject = new BehaviorSubject(null);\n private _header: BehaviorSubject = new BehaviorSubject('');\n\n constructor(private dotMenuService: DotMenuService) {}\n\n get viewUrl$(): Observable {\n return this.data.pipe(mergeMap((action: DotTaskAction) => this.getViewUrl(action)));\n }\n\n get header$(): Observable {\n return this._header;\n }\n\n /**\n * Set data to edit a workflow task\n *\n * @param DotTaskAction action\n * @memberof DotContentletEditorService\n */\n view(action: DotTaskAction): void {\n this.setData(action);\n }\n\n /**\n * Clear data to add a workflow task\n *\n * @memberof DotAddContentletService\n */\n clear() {\n this.data.next(null);\n }\n\n private getViewUrl(action: DotTaskAction): Observable {\n return action === null\n ? of('')\n : this.dotMenuService.getDotMenuId('workflow').pipe(\n map((portletId: string) => {\n return [\n `/c/portal/layout`,\n `?p_l_id=${portletId}`,\n `&p_p_id=workflow`,\n `&p_p_action=1`,\n `&p_p_state=maximized`,\n `&p_p_mode=view`,\n `&_workflow_struts_action=/ext/workflows/edit_workflow_task`,\n `&_workflow_cmd=view`,\n `&_workflow_taskId=${action.id}`\n ].join('');\n })\n );\n }\n\n private setData(action: DotTaskAction): void {\n if (action.header) {\n this._header.next(action.header);\n }\n\n this.data.next({\n id: action.id\n });\n }\n}\n", + "properties": [ + { + "name": "header", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 7 + }, + { + "name": "id", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 8 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotTemplate", + "id": "interface-DotTemplate-3e0bac6af07e956f22e3eb6b94a06d2793eb8569aa2322f2839e74509c61e3b70d8b4763850b8ce09c02924321fe08f38ed8bc52d5421d353dfee9c4c65c1bff", + "file": "apps/dotcms-ui/src/app/shared/models/dot-edit-layout-designer/dot-template.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotContainerMap } from '@shared/models/container/dot-container.model';\nimport { DotLayout } from './dot-layout.model';\n\nexport interface DotTemplate {\n anonymous: boolean;\n archived?: boolean;\n body?: string;\n categoryId?: string;\n countAddContainer?: number;\n countContainers?: number;\n deleted?: boolean;\n drawed?: boolean;\n drawedBody?: string;\n friendlyName: string;\n hasLiveVersion: boolean;\n iDate?: Date;\n identifier: string;\n image?: string;\n inode: string;\n live?: boolean;\n locked?: boolean;\n modDate?: Date;\n name: string;\n permissionId?: string;\n permissionType?: string;\n showOnMenu?: boolean;\n sortOrder?: number;\n theme?: string;\n title?: string;\n type: string;\n versionType: string;\n working: boolean;\n disableInteraction?: boolean;\n}\n\n// Extra properties from renderHTML\nexport interface DotTemplate {\n canEdit: boolean;\n canWrite?: boolean;\n canPublish?: boolean;\n containers?: DotContainerMap;\n layout: DotLayout;\n selectedimage?: string;\n themeId?: string;\n}\n", + "properties": [ + { + "name": "anonymous", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 5 + }, + { + "name": "archived", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 6 + }, + { + "name": "body", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 7 + }, + { + "name": "categoryId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 8 + }, + { + "name": "countAddContainer", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 9 + }, + { + "name": "countContainers", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 10 + }, + { + "name": "deleted", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 11 + }, + { + "name": "disableInteraction", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 33 + }, + { + "name": "drawed", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 12 + }, + { + "name": "drawedBody", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 13 + }, + { + "name": "friendlyName", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 14 + }, + { + "name": "hasLiveVersion", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 15 + }, + { + "name": "iDate", + "deprecated": false, + "deprecationMessage": "", + "type": "Date", + "optional": true, + "description": "", + "line": 16 + }, + { + "name": "identifier", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 17 + }, + { + "name": "image", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 18 + }, + { + "name": "inode", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 19 + }, + { + "name": "live", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 20 + }, + { + "name": "locked", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 21 + }, + { + "name": "modDate", + "deprecated": false, + "deprecationMessage": "", + "type": "Date", + "optional": true, + "description": "", + "line": 22 + }, + { + "name": "name", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 23 + }, + { + "name": "permissionId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 24 + }, + { + "name": "permissionType", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 25 + }, + { + "name": "showOnMenu", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 26 + }, + { + "name": "sortOrder", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 27 + }, + { + "name": "theme", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 28 + }, + { + "name": "title", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 29 + }, + { + "name": "type", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 30 + }, + { + "name": "versionType", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 31 + }, + { + "name": "working", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 32 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotTemplate", + "id": "interface-DotTemplate-3e0bac6af07e956f22e3eb6b94a06d2793eb8569aa2322f2839e74509c61e3b70d8b4763850b8ce09c02924321fe08f38ed8bc52d5421d353dfee9c4c65c1bff-1", + "file": "apps/dotcms-ui/src/app/shared/models/dot-edit-layout-designer/dot-template.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotContainerMap } from '@shared/models/container/dot-container.model';\nimport { DotLayout } from './dot-layout.model';\n\nexport interface DotTemplate {\n anonymous: boolean;\n archived?: boolean;\n body?: string;\n categoryId?: string;\n countAddContainer?: number;\n countContainers?: number;\n deleted?: boolean;\n drawed?: boolean;\n drawedBody?: string;\n friendlyName: string;\n hasLiveVersion: boolean;\n iDate?: Date;\n identifier: string;\n image?: string;\n inode: string;\n live?: boolean;\n locked?: boolean;\n modDate?: Date;\n name: string;\n permissionId?: string;\n permissionType?: string;\n showOnMenu?: boolean;\n sortOrder?: number;\n theme?: string;\n title?: string;\n type: string;\n versionType: string;\n working: boolean;\n disableInteraction?: boolean;\n}\n\n// Extra properties from renderHTML\nexport interface DotTemplate {\n canEdit: boolean;\n canWrite?: boolean;\n canPublish?: boolean;\n containers?: DotContainerMap;\n layout: DotLayout;\n selectedimage?: string;\n themeId?: string;\n}\n", + "properties": [ + { + "name": "canEdit", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 38 + }, + { + "name": "canPublish", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 40 + }, + { + "name": "canWrite", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 39 + }, + { + "name": "containers", + "deprecated": false, + "deprecationMessage": "", + "type": "DotContainerMap", + "optional": true, + "description": "", + "line": 41 + }, + { + "name": "layout", + "deprecated": false, + "deprecationMessage": "", + "type": "DotLayout", + "optional": false, + "description": "", + "line": 42 + }, + { + "name": "selectedimage", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 43 + }, + { + "name": "themeId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 44 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [], + "isDuplicate": true, + "duplicateId": 1, + "duplicateName": "DotTemplate-1" + }, + { + "name": "DotTemplateItemadvanced", + "id": "interface-DotTemplateItemadvanced-a7bf7cd06f6ccb75640235a21e6514864ba2d6966f8489daeeb153895a9bf331a31b51bb7f62450286316b8c950049d7eb57f94aff9d1927d2ef27144711cc66", + "file": "apps/dotcms-ui/src/app/portlets/dot-templates/dot-template-create-edit/store/dot-template.store.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Injectable } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\n\nimport { ComponentStore } from '@ngrx/component-store';\nimport { Observable, zip, of } from 'rxjs';\nimport { pluck, switchMap, take, tap, catchError } from 'rxjs/operators';\nimport * as _ from 'lodash';\n\nimport { DotTemplatesService } from '@services/dot-templates/dot-templates.service';\nimport { DotRouterService } from '@services/dot-router/dot-router.service';\nimport { DotTemplateContainersCacheService } from '@services/dot-template-containers-cache/dot-template-containers-cache.service';\nimport { DotContainerMap } from '@models/container/dot-container.model';\nimport { DotLayout, DotTemplate } from '@models/dot-edit-layout-designer';\nimport { DotGlobalMessageService } from '@components/_common/dot-global-message/dot-global-message.service';\nimport { DotMessageService } from '@services/dot-message/dot-messages.service';\n\nimport { HttpErrorResponse } from '@angular/common/http';\nimport { DotHttpErrorManagerService } from '@services/dot-http-error-manager/dot-http-error-manager.service';\nimport { DotEditLayoutService } from '@services/dot-edit-layout/dot-edit-layout.service';\n\ntype DotTemplateType = 'design' | 'advanced';\n\ninterface DotTemplateItemDesign {\n containers?: DotContainerMap;\n drawed?: boolean;\n friendlyName: string;\n identifier: string;\n layout: DotLayout;\n theme: string;\n title: string;\n type?: 'design';\n image?: string;\n}\n\ninterface DotTemplateItemadvanced {\n body: string;\n drawed?: boolean;\n friendlyName: string;\n identifier: string;\n title: string;\n type?: 'advanced';\n image?: string;\n}\n\nexport type DotTemplateItem = DotTemplateItemDesign | DotTemplateItemadvanced;\n\nexport interface DotTemplateState {\n original: DotTemplateItem;\n working?: DotTemplateItem;\n apiLink: string;\n}\n\nconst EMPTY_TEMPLATE = {\n identifier: '',\n title: '',\n friendlyName: '',\n image: ''\n};\n\nexport const EMPTY_TEMPLATE_DESIGN: DotTemplateItemDesign = {\n ...EMPTY_TEMPLATE,\n type: 'design',\n layout: {\n header: true,\n footer: true,\n body: {\n rows: []\n },\n sidebar: null,\n title: '',\n width: null\n },\n theme: '',\n containers: {},\n drawed: true\n};\n\nexport const EMPTY_TEMPLATE_ADVANCED: DotTemplateItemadvanced = {\n ...EMPTY_TEMPLATE,\n type: 'advanced',\n body: '',\n drawed: false\n};\n\n@Injectable()\nexport class DotTemplateStore extends ComponentStore {\n readonly vm$ = this.select(({ original, apiLink }: DotTemplateState) => {\n return {\n original,\n apiLink\n };\n });\n\n readonly didTemplateChanged$: Observable = this.select(\n ({ original, working }: DotTemplateState) => !_.isEqual(original, working)\n );\n\n readonly updateBody = this.updater((state: DotTemplateState, body: string) => ({\n ...state,\n working: {\n ...state.working,\n body\n }\n }));\n\n readonly updateTemplate = this.updater(\n (state: DotTemplateState, template: DotTemplateItem) => {\n return {\n ...state,\n working: template,\n original: template\n };\n }\n );\n\n readonly saveTemplate = this.effect((origin$: Observable) => {\n\n return origin$.pipe(\n switchMap((template: DotTemplateItem) => {\n this.dotGlobalMessageService.loading(\n this.dotMessageService.get('dot.common.message.saving')\n );\n return this.persistTemplate(template)\n }),\n tap((template: DotTemplate) => {\n if (template.drawed) {\n this.templateContainersCacheService.set(template.containers);\n }\n this.updateTemplate(this.getTemplateItem(template));\n this.dotGlobalMessageService.success(\n this.dotMessageService.get('dot.common.message.saved')\n );\n if (this.activatedRoute?.snapshot?.params['inode']) {\n this.dotRouterService.goToEditTemplate(template.identifier);\n }\n }),\n catchError((err: HttpErrorResponse) => {\n this.dotGlobalMessageService.error(err.statusText);\n this.dotHttpErrorManagerService.handle(err).subscribe(() => {\n this.dotEditLayoutService.changeDesactivateState(true);\n });\n return of(null);\n })\n );\n });\n\n readonly saveProperties = this.effect((origin$: Observable) => {\n return origin$.pipe(\n switchMap((template: DotTemplateItem) => this.persistTemplate(template)),\n tap((template: DotTemplate) => {\n this.updateTemplate(this.getTemplateItem(template));\n })\n );\n });\n\n readonly createTemplate = this.effect(\n (origin$: Observable) => {\n return origin$.pipe(\n switchMap((template: DotTemplateItem) => {\n if (template.type === 'design') {\n delete template.containers;\n }\n\n delete template.type;\n\n return this.dotTemplateService.create(template as DotTemplate);\n }),\n tap(({ identifier }: DotTemplate) => {\n this.dotRouterService.goToEditTemplate(identifier);\n })\n );\n }\n );\n\n constructor(\n private dotTemplateService: DotTemplatesService,\n private dotRouterService: DotRouterService,\n private activatedRoute: ActivatedRoute,\n private dotHttpErrorManagerService: DotHttpErrorManagerService,\n private dotEditLayoutService: DotEditLayoutService,\n private templateContainersCacheService: DotTemplateContainersCacheService,\n private dotGlobalMessageService: DotGlobalMessageService,\n private dotMessageService: DotMessageService\n ) {\n super(null);\n\n const template$ = this.activatedRoute.data.pipe(pluck('template'));\n const type$ = this.activatedRoute.params.pipe(pluck('type'));\n\n zip(template$, type$)\n .pipe(take(1))\n .subscribe(([dotTemplate, type]: [DotTemplate, string]) => {\n const fixType = type as DotTemplateType;\n const isAdvanced = this.getIsAdvanced(fixType, dotTemplate?.drawed);\n\n const template = dotTemplate\n ? this.getTemplateItem(dotTemplate)\n : this.getDefaultTemplate(isAdvanced);\n\n if (template.type === 'design') {\n this.templateContainersCacheService.set(template.containers);\n }\n\n this.setState({\n original: template,\n working: template,\n apiLink: this.getApiLink(template?.identifier)\n });\n });\n }\n\n /**\n * Redirect to template listing\n *\n * @memberof DotTemplateStore\n */\n goToTemplateList = () => {\n this.dotRouterService.gotoPortlet('templates');\n };\n\n /**\n * Redirect to edit specific version of a template.\n *\n * @memberof DotTemplateStore\n */\n goToEditTemplate = (id, inode) => {\n this.dotRouterService.goToEditTemplate(id, inode);\n };\n\n private getApiLink(identifier: string): string {\n return identifier ? `/api/v1/templates/${identifier}/working` : '';\n }\n\n private getDefaultTemplate(isAdvanced: boolean): DotTemplateItem {\n return isAdvanced ? EMPTY_TEMPLATE_ADVANCED : EMPTY_TEMPLATE_DESIGN;\n }\n\n private getIsAdvanced(type: DotTemplateType, drawed: boolean): boolean {\n return type === 'advanced' || drawed === false;\n }\n\n private getTemplateItem(template: DotTemplate): DotTemplateItem {\n const { identifier, title, friendlyName } = template;\n\n let result: DotTemplateItem;\n\n if (template.drawed) {\n result = {\n type: 'design',\n identifier,\n title,\n friendlyName,\n layout: template.layout || EMPTY_TEMPLATE_DESIGN.layout,\n theme: template.theme,\n containers: template.containers,\n drawed: true,\n image: template.image\n };\n } else {\n result = {\n type: 'advanced',\n identifier,\n title,\n friendlyName,\n body: template.body,\n drawed: false,\n image: template.image\n };\n }\n\n return result;\n }\n\n private persistTemplate(template: DotTemplateItem): Observable {\n delete template.type;\n if (template.type === 'design') {\n delete template.containers;\n }\n return this.dotTemplateService.update(template as DotTemplate);\n }\n}\n", + "properties": [ + { + "name": "body", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 36 + }, + { + "name": "drawed", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 37 + }, + { + "name": "friendlyName", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 38 + }, + { + "name": "identifier", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 39 + }, + { + "name": "image", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 42 + }, + { + "name": "title", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 40 + }, + { + "name": "type", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": true, + "description": "", + "line": 41 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotTemplateItemDesign", + "id": "interface-DotTemplateItemDesign-a7bf7cd06f6ccb75640235a21e6514864ba2d6966f8489daeeb153895a9bf331a31b51bb7f62450286316b8c950049d7eb57f94aff9d1927d2ef27144711cc66", + "file": "apps/dotcms-ui/src/app/portlets/dot-templates/dot-template-create-edit/store/dot-template.store.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Injectable } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\n\nimport { ComponentStore } from '@ngrx/component-store';\nimport { Observable, zip, of } from 'rxjs';\nimport { pluck, switchMap, take, tap, catchError } from 'rxjs/operators';\nimport * as _ from 'lodash';\n\nimport { DotTemplatesService } from '@services/dot-templates/dot-templates.service';\nimport { DotRouterService } from '@services/dot-router/dot-router.service';\nimport { DotTemplateContainersCacheService } from '@services/dot-template-containers-cache/dot-template-containers-cache.service';\nimport { DotContainerMap } from '@models/container/dot-container.model';\nimport { DotLayout, DotTemplate } from '@models/dot-edit-layout-designer';\nimport { DotGlobalMessageService } from '@components/_common/dot-global-message/dot-global-message.service';\nimport { DotMessageService } from '@services/dot-message/dot-messages.service';\n\nimport { HttpErrorResponse } from '@angular/common/http';\nimport { DotHttpErrorManagerService } from '@services/dot-http-error-manager/dot-http-error-manager.service';\nimport { DotEditLayoutService } from '@services/dot-edit-layout/dot-edit-layout.service';\n\ntype DotTemplateType = 'design' | 'advanced';\n\ninterface DotTemplateItemDesign {\n containers?: DotContainerMap;\n drawed?: boolean;\n friendlyName: string;\n identifier: string;\n layout: DotLayout;\n theme: string;\n title: string;\n type?: 'design';\n image?: string;\n}\n\ninterface DotTemplateItemadvanced {\n body: string;\n drawed?: boolean;\n friendlyName: string;\n identifier: string;\n title: string;\n type?: 'advanced';\n image?: string;\n}\n\nexport type DotTemplateItem = DotTemplateItemDesign | DotTemplateItemadvanced;\n\nexport interface DotTemplateState {\n original: DotTemplateItem;\n working?: DotTemplateItem;\n apiLink: string;\n}\n\nconst EMPTY_TEMPLATE = {\n identifier: '',\n title: '',\n friendlyName: '',\n image: ''\n};\n\nexport const EMPTY_TEMPLATE_DESIGN: DotTemplateItemDesign = {\n ...EMPTY_TEMPLATE,\n type: 'design',\n layout: {\n header: true,\n footer: true,\n body: {\n rows: []\n },\n sidebar: null,\n title: '',\n width: null\n },\n theme: '',\n containers: {},\n drawed: true\n};\n\nexport const EMPTY_TEMPLATE_ADVANCED: DotTemplateItemadvanced = {\n ...EMPTY_TEMPLATE,\n type: 'advanced',\n body: '',\n drawed: false\n};\n\n@Injectable()\nexport class DotTemplateStore extends ComponentStore {\n readonly vm$ = this.select(({ original, apiLink }: DotTemplateState) => {\n return {\n original,\n apiLink\n };\n });\n\n readonly didTemplateChanged$: Observable = this.select(\n ({ original, working }: DotTemplateState) => !_.isEqual(original, working)\n );\n\n readonly updateBody = this.updater((state: DotTemplateState, body: string) => ({\n ...state,\n working: {\n ...state.working,\n body\n }\n }));\n\n readonly updateTemplate = this.updater(\n (state: DotTemplateState, template: DotTemplateItem) => {\n return {\n ...state,\n working: template,\n original: template\n };\n }\n );\n\n readonly saveTemplate = this.effect((origin$: Observable) => {\n\n return origin$.pipe(\n switchMap((template: DotTemplateItem) => {\n this.dotGlobalMessageService.loading(\n this.dotMessageService.get('dot.common.message.saving')\n );\n return this.persistTemplate(template)\n }),\n tap((template: DotTemplate) => {\n if (template.drawed) {\n this.templateContainersCacheService.set(template.containers);\n }\n this.updateTemplate(this.getTemplateItem(template));\n this.dotGlobalMessageService.success(\n this.dotMessageService.get('dot.common.message.saved')\n );\n if (this.activatedRoute?.snapshot?.params['inode']) {\n this.dotRouterService.goToEditTemplate(template.identifier);\n }\n }),\n catchError((err: HttpErrorResponse) => {\n this.dotGlobalMessageService.error(err.statusText);\n this.dotHttpErrorManagerService.handle(err).subscribe(() => {\n this.dotEditLayoutService.changeDesactivateState(true);\n });\n return of(null);\n })\n );\n });\n\n readonly saveProperties = this.effect((origin$: Observable) => {\n return origin$.pipe(\n switchMap((template: DotTemplateItem) => this.persistTemplate(template)),\n tap((template: DotTemplate) => {\n this.updateTemplate(this.getTemplateItem(template));\n })\n );\n });\n\n readonly createTemplate = this.effect(\n (origin$: Observable) => {\n return origin$.pipe(\n switchMap((template: DotTemplateItem) => {\n if (template.type === 'design') {\n delete template.containers;\n }\n\n delete template.type;\n\n return this.dotTemplateService.create(template as DotTemplate);\n }),\n tap(({ identifier }: DotTemplate) => {\n this.dotRouterService.goToEditTemplate(identifier);\n })\n );\n }\n );\n\n constructor(\n private dotTemplateService: DotTemplatesService,\n private dotRouterService: DotRouterService,\n private activatedRoute: ActivatedRoute,\n private dotHttpErrorManagerService: DotHttpErrorManagerService,\n private dotEditLayoutService: DotEditLayoutService,\n private templateContainersCacheService: DotTemplateContainersCacheService,\n private dotGlobalMessageService: DotGlobalMessageService,\n private dotMessageService: DotMessageService\n ) {\n super(null);\n\n const template$ = this.activatedRoute.data.pipe(pluck('template'));\n const type$ = this.activatedRoute.params.pipe(pluck('type'));\n\n zip(template$, type$)\n .pipe(take(1))\n .subscribe(([dotTemplate, type]: [DotTemplate, string]) => {\n const fixType = type as DotTemplateType;\n const isAdvanced = this.getIsAdvanced(fixType, dotTemplate?.drawed);\n\n const template = dotTemplate\n ? this.getTemplateItem(dotTemplate)\n : this.getDefaultTemplate(isAdvanced);\n\n if (template.type === 'design') {\n this.templateContainersCacheService.set(template.containers);\n }\n\n this.setState({\n original: template,\n working: template,\n apiLink: this.getApiLink(template?.identifier)\n });\n });\n }\n\n /**\n * Redirect to template listing\n *\n * @memberof DotTemplateStore\n */\n goToTemplateList = () => {\n this.dotRouterService.gotoPortlet('templates');\n };\n\n /**\n * Redirect to edit specific version of a template.\n *\n * @memberof DotTemplateStore\n */\n goToEditTemplate = (id, inode) => {\n this.dotRouterService.goToEditTemplate(id, inode);\n };\n\n private getApiLink(identifier: string): string {\n return identifier ? `/api/v1/templates/${identifier}/working` : '';\n }\n\n private getDefaultTemplate(isAdvanced: boolean): DotTemplateItem {\n return isAdvanced ? EMPTY_TEMPLATE_ADVANCED : EMPTY_TEMPLATE_DESIGN;\n }\n\n private getIsAdvanced(type: DotTemplateType, drawed: boolean): boolean {\n return type === 'advanced' || drawed === false;\n }\n\n private getTemplateItem(template: DotTemplate): DotTemplateItem {\n const { identifier, title, friendlyName } = template;\n\n let result: DotTemplateItem;\n\n if (template.drawed) {\n result = {\n type: 'design',\n identifier,\n title,\n friendlyName,\n layout: template.layout || EMPTY_TEMPLATE_DESIGN.layout,\n theme: template.theme,\n containers: template.containers,\n drawed: true,\n image: template.image\n };\n } else {\n result = {\n type: 'advanced',\n identifier,\n title,\n friendlyName,\n body: template.body,\n drawed: false,\n image: template.image\n };\n }\n\n return result;\n }\n\n private persistTemplate(template: DotTemplateItem): Observable {\n delete template.type;\n if (template.type === 'design') {\n delete template.containers;\n }\n return this.dotTemplateService.update(template as DotTemplate);\n }\n}\n", + "properties": [ + { + "name": "containers", + "deprecated": false, + "deprecationMessage": "", + "type": "DotContainerMap", + "optional": true, + "description": "", + "line": 24 + }, + { + "name": "drawed", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 25 + }, + { + "name": "friendlyName", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 26 + }, + { + "name": "identifier", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 27 + }, + { + "name": "image", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 32 + }, + { + "name": "layout", + "deprecated": false, + "deprecationMessage": "", + "type": "DotLayout", + "optional": false, + "description": "", + "line": 28 + }, + { + "name": "theme", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 29 + }, + { + "name": "title", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 30 + }, + { + "name": "type", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": true, + "description": "", + "line": 31 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotTemplateState", + "id": "interface-DotTemplateState-a7bf7cd06f6ccb75640235a21e6514864ba2d6966f8489daeeb153895a9bf331a31b51bb7f62450286316b8c950049d7eb57f94aff9d1927d2ef27144711cc66", + "file": "apps/dotcms-ui/src/app/portlets/dot-templates/dot-template-create-edit/store/dot-template.store.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Injectable } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\n\nimport { ComponentStore } from '@ngrx/component-store';\nimport { Observable, zip, of } from 'rxjs';\nimport { pluck, switchMap, take, tap, catchError } from 'rxjs/operators';\nimport * as _ from 'lodash';\n\nimport { DotTemplatesService } from '@services/dot-templates/dot-templates.service';\nimport { DotRouterService } from '@services/dot-router/dot-router.service';\nimport { DotTemplateContainersCacheService } from '@services/dot-template-containers-cache/dot-template-containers-cache.service';\nimport { DotContainerMap } from '@models/container/dot-container.model';\nimport { DotLayout, DotTemplate } from '@models/dot-edit-layout-designer';\nimport { DotGlobalMessageService } from '@components/_common/dot-global-message/dot-global-message.service';\nimport { DotMessageService } from '@services/dot-message/dot-messages.service';\n\nimport { HttpErrorResponse } from '@angular/common/http';\nimport { DotHttpErrorManagerService } from '@services/dot-http-error-manager/dot-http-error-manager.service';\nimport { DotEditLayoutService } from '@services/dot-edit-layout/dot-edit-layout.service';\n\ntype DotTemplateType = 'design' | 'advanced';\n\ninterface DotTemplateItemDesign {\n containers?: DotContainerMap;\n drawed?: boolean;\n friendlyName: string;\n identifier: string;\n layout: DotLayout;\n theme: string;\n title: string;\n type?: 'design';\n image?: string;\n}\n\ninterface DotTemplateItemadvanced {\n body: string;\n drawed?: boolean;\n friendlyName: string;\n identifier: string;\n title: string;\n type?: 'advanced';\n image?: string;\n}\n\nexport type DotTemplateItem = DotTemplateItemDesign | DotTemplateItemadvanced;\n\nexport interface DotTemplateState {\n original: DotTemplateItem;\n working?: DotTemplateItem;\n apiLink: string;\n}\n\nconst EMPTY_TEMPLATE = {\n identifier: '',\n title: '',\n friendlyName: '',\n image: ''\n};\n\nexport const EMPTY_TEMPLATE_DESIGN: DotTemplateItemDesign = {\n ...EMPTY_TEMPLATE,\n type: 'design',\n layout: {\n header: true,\n footer: true,\n body: {\n rows: []\n },\n sidebar: null,\n title: '',\n width: null\n },\n theme: '',\n containers: {},\n drawed: true\n};\n\nexport const EMPTY_TEMPLATE_ADVANCED: DotTemplateItemadvanced = {\n ...EMPTY_TEMPLATE,\n type: 'advanced',\n body: '',\n drawed: false\n};\n\n@Injectable()\nexport class DotTemplateStore extends ComponentStore {\n readonly vm$ = this.select(({ original, apiLink }: DotTemplateState) => {\n return {\n original,\n apiLink\n };\n });\n\n readonly didTemplateChanged$: Observable = this.select(\n ({ original, working }: DotTemplateState) => !_.isEqual(original, working)\n );\n\n readonly updateBody = this.updater((state: DotTemplateState, body: string) => ({\n ...state,\n working: {\n ...state.working,\n body\n }\n }));\n\n readonly updateTemplate = this.updater(\n (state: DotTemplateState, template: DotTemplateItem) => {\n return {\n ...state,\n working: template,\n original: template\n };\n }\n );\n\n readonly saveTemplate = this.effect((origin$: Observable) => {\n\n return origin$.pipe(\n switchMap((template: DotTemplateItem) => {\n this.dotGlobalMessageService.loading(\n this.dotMessageService.get('dot.common.message.saving')\n );\n return this.persistTemplate(template)\n }),\n tap((template: DotTemplate) => {\n if (template.drawed) {\n this.templateContainersCacheService.set(template.containers);\n }\n this.updateTemplate(this.getTemplateItem(template));\n this.dotGlobalMessageService.success(\n this.dotMessageService.get('dot.common.message.saved')\n );\n if (this.activatedRoute?.snapshot?.params['inode']) {\n this.dotRouterService.goToEditTemplate(template.identifier);\n }\n }),\n catchError((err: HttpErrorResponse) => {\n this.dotGlobalMessageService.error(err.statusText);\n this.dotHttpErrorManagerService.handle(err).subscribe(() => {\n this.dotEditLayoutService.changeDesactivateState(true);\n });\n return of(null);\n })\n );\n });\n\n readonly saveProperties = this.effect((origin$: Observable) => {\n return origin$.pipe(\n switchMap((template: DotTemplateItem) => this.persistTemplate(template)),\n tap((template: DotTemplate) => {\n this.updateTemplate(this.getTemplateItem(template));\n })\n );\n });\n\n readonly createTemplate = this.effect(\n (origin$: Observable) => {\n return origin$.pipe(\n switchMap((template: DotTemplateItem) => {\n if (template.type === 'design') {\n delete template.containers;\n }\n\n delete template.type;\n\n return this.dotTemplateService.create(template as DotTemplate);\n }),\n tap(({ identifier }: DotTemplate) => {\n this.dotRouterService.goToEditTemplate(identifier);\n })\n );\n }\n );\n\n constructor(\n private dotTemplateService: DotTemplatesService,\n private dotRouterService: DotRouterService,\n private activatedRoute: ActivatedRoute,\n private dotHttpErrorManagerService: DotHttpErrorManagerService,\n private dotEditLayoutService: DotEditLayoutService,\n private templateContainersCacheService: DotTemplateContainersCacheService,\n private dotGlobalMessageService: DotGlobalMessageService,\n private dotMessageService: DotMessageService\n ) {\n super(null);\n\n const template$ = this.activatedRoute.data.pipe(pluck('template'));\n const type$ = this.activatedRoute.params.pipe(pluck('type'));\n\n zip(template$, type$)\n .pipe(take(1))\n .subscribe(([dotTemplate, type]: [DotTemplate, string]) => {\n const fixType = type as DotTemplateType;\n const isAdvanced = this.getIsAdvanced(fixType, dotTemplate?.drawed);\n\n const template = dotTemplate\n ? this.getTemplateItem(dotTemplate)\n : this.getDefaultTemplate(isAdvanced);\n\n if (template.type === 'design') {\n this.templateContainersCacheService.set(template.containers);\n }\n\n this.setState({\n original: template,\n working: template,\n apiLink: this.getApiLink(template?.identifier)\n });\n });\n }\n\n /**\n * Redirect to template listing\n *\n * @memberof DotTemplateStore\n */\n goToTemplateList = () => {\n this.dotRouterService.gotoPortlet('templates');\n };\n\n /**\n * Redirect to edit specific version of a template.\n *\n * @memberof DotTemplateStore\n */\n goToEditTemplate = (id, inode) => {\n this.dotRouterService.goToEditTemplate(id, inode);\n };\n\n private getApiLink(identifier: string): string {\n return identifier ? `/api/v1/templates/${identifier}/working` : '';\n }\n\n private getDefaultTemplate(isAdvanced: boolean): DotTemplateItem {\n return isAdvanced ? EMPTY_TEMPLATE_ADVANCED : EMPTY_TEMPLATE_DESIGN;\n }\n\n private getIsAdvanced(type: DotTemplateType, drawed: boolean): boolean {\n return type === 'advanced' || drawed === false;\n }\n\n private getTemplateItem(template: DotTemplate): DotTemplateItem {\n const { identifier, title, friendlyName } = template;\n\n let result: DotTemplateItem;\n\n if (template.drawed) {\n result = {\n type: 'design',\n identifier,\n title,\n friendlyName,\n layout: template.layout || EMPTY_TEMPLATE_DESIGN.layout,\n theme: template.theme,\n containers: template.containers,\n drawed: true,\n image: template.image\n };\n } else {\n result = {\n type: 'advanced',\n identifier,\n title,\n friendlyName,\n body: template.body,\n drawed: false,\n image: template.image\n };\n }\n\n return result;\n }\n\n private persistTemplate(template: DotTemplateItem): Observable {\n delete template.type;\n if (template.type === 'design') {\n delete template.containers;\n }\n return this.dotTemplateService.update(template as DotTemplate);\n }\n}\n", + "properties": [ + { + "name": "apiLink", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 50 + }, + { + "name": "original", + "deprecated": false, + "deprecationMessage": "", + "type": "DotTemplateItem", + "optional": false, + "description": "", + "line": 48 + }, + { + "name": "working", + "deprecated": false, + "deprecationMessage": "", + "type": "DotTemplateItem", + "optional": true, + "description": "", + "line": 49 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotTheme", + "id": "interface-DotTheme-e7e1654301c9904625cfdf83d199119a5894d115ce19c032db3e3c7668f5313f5d7c5b1a3ea287d4e34f74ec2798e5c47268d270e1f788af53aed09886f6e27a", + "file": "apps/dotcms-ui/src/app/shared/models/dot-edit-layout-designer/dot-theme.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotTheme {\n identifier: string;\n name: string;\n title: string;\n inode: string;\n themeThumbnail: string;\n hostId: string;\n host: {\n hostName: string;\n inode: string;\n identifier: string;\n };\n}\n", + "properties": [ + { + "name": "host", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": false, + "description": "", + "line": 8 + }, + { + "name": "hostId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 7 + }, + { + "name": "identifier", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 2 + }, + { + "name": "inode", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 5 + }, + { + "name": "name", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 3 + }, + { + "name": "themeThumbnail", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 6 + }, + { + "name": "title", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 4 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotTimeZone", + "id": "interface-DotTimeZone-45a6b4d7f75c0e497b68c4ac4596588b677d9631192f713ba3cd7da60bf6bc59ab4e9b374847046d5fed2f236ff6fca756c097baee0006b631f1b38081b0506a", + "file": "libs/dotcms-js/src/lib/core/dotcms-config.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { CoreWebService } from './core-web.service';\nimport { Injectable } from '@angular/core';\nimport { Observable, BehaviorSubject } from 'rxjs';\nimport { pluck, filter, map } from 'rxjs/operators';\nimport { LoggerService } from './logger.service';\nimport { Menu } from './routing.service';\n\n/**\n * Created by josecastro on 7/29/16.\n *\n * Wraps the configuration properties for dotCMS in order to provide an\n * easier way to access the information.\n *\n */\nconst DOTCMS_WEBSOCKET_RECONNECT_TIME = 'dotcms.websocket.reconnect.time';\nconst DOTCMS_DISABLE_WEBSOCKET_PROTOCOL = 'dotcms.websocket.disable';\nconst DOTCMS_PAGINATOR_ROWS = 'dotcms.paginator.rows';\nconst DOTCMS_PAGINATOR_LINKS = 'dotcms.paginator.links';\nconst EMAIL_REGEX = 'emailRegex';\n\nexport interface DotUiColors {\n primary: string;\n secondary: string;\n background: string;\n}\n\nexport interface ConfigParams {\n colors: DotUiColors;\n emailRegex: string;\n license: {\n displayServerId: string;\n isCommunity: boolean;\n level: number;\n levelName: string;\n };\n logos: {\n loginScreen: string;\n navBar: string;\n };\n menu: Menu[];\n paginatorLinks: number;\n paginatorRows: number;\n websocket: WebSocketConfigParams;\n}\n\nexport interface WebSocketConfigParams {\n disabledWebsockets: boolean;\n websocketReconnectTime: number;\n}\n\nexport interface DotTimeZone {\n id: string;\n label: string;\n offset: string;\n}\n\n@Injectable()\nexport class DotcmsConfigService {\n private configParamsSubject: BehaviorSubject = new BehaviorSubject(null);\n private configUrl: string;\n\n /**\n * Initializes this class with the dotCMS core configuration parameters.\n *\n * @param configParams - The configuration properties for the current instance.\n */\n constructor(private coreWebService: CoreWebService, private loggerService: LoggerService) {\n this.configUrl = 'v1/appconfiguration';\n this.loadConfig();\n }\n\n getConfig(): Observable {\n return this.configParamsSubject\n .asObservable()\n .pipe(filter((config: ConfigParams) => !!config));\n }\n\n loadConfig(): void {\n this.loggerService.debug('Loading configuration on: ', this.configUrl);\n\n this.coreWebService\n .requestView({\n url: this.configUrl\n })\n .pipe(pluck('entity'))\n .subscribe((res: any) => {\n this.loggerService.debug('Configuration Loaded!', res);\n\n const configParams: ConfigParams = {\n colors: res.config.colors,\n emailRegex: res.config[EMAIL_REGEX],\n license: res.config.license,\n logos: res.config.logos,\n menu: res.menu,\n paginatorLinks: res.config[DOTCMS_PAGINATOR_LINKS],\n paginatorRows: res.config[DOTCMS_PAGINATOR_ROWS],\n websocket: {\n websocketReconnectTime:\n res.config.websocket[DOTCMS_WEBSOCKET_RECONNECT_TIME],\n disabledWebsockets: res.config.websocket[DOTCMS_DISABLE_WEBSOCKET_PROTOCOL]\n }\n };\n\n this.configParamsSubject.next(configParams);\n\n this.loggerService.debug('this.configParams', configParams);\n\n return res;\n });\n }\n\n /**\n * Return a list of timezones.\n * @returns Observable\n * @memberof DotcmsConfigService\n */\n getTimeZone(): Observable {\n return this.coreWebService\n .requestView({\n url: this.configUrl\n })\n .pipe(\n pluck('entity', 'config', 'timezones'),\n map((timezones: DotTimeZone[]) => {\n return timezones.sort((a: DotTimeZone, b: DotTimeZone) => {\n if (a.label > b.label) {\n return 1;\n }\n if (a.label < b.label) {\n return -1;\n }\n // a must be equal to b\n return 0;\n });\n })\n );\n }\n}\n", + "properties": [ + { + "name": "id", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 52 + }, + { + "name": "label", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 53 + }, + { + "name": "offset", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 54 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotUiColors", + "id": "interface-DotUiColors-45a6b4d7f75c0e497b68c4ac4596588b677d9631192f713ba3cd7da60bf6bc59ab4e9b374847046d5fed2f236ff6fca756c097baee0006b631f1b38081b0506a", + "file": "libs/dotcms-js/src/lib/core/dotcms-config.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { CoreWebService } from './core-web.service';\nimport { Injectable } from '@angular/core';\nimport { Observable, BehaviorSubject } from 'rxjs';\nimport { pluck, filter, map } from 'rxjs/operators';\nimport { LoggerService } from './logger.service';\nimport { Menu } from './routing.service';\n\n/**\n * Created by josecastro on 7/29/16.\n *\n * Wraps the configuration properties for dotCMS in order to provide an\n * easier way to access the information.\n *\n */\nconst DOTCMS_WEBSOCKET_RECONNECT_TIME = 'dotcms.websocket.reconnect.time';\nconst DOTCMS_DISABLE_WEBSOCKET_PROTOCOL = 'dotcms.websocket.disable';\nconst DOTCMS_PAGINATOR_ROWS = 'dotcms.paginator.rows';\nconst DOTCMS_PAGINATOR_LINKS = 'dotcms.paginator.links';\nconst EMAIL_REGEX = 'emailRegex';\n\nexport interface DotUiColors {\n primary: string;\n secondary: string;\n background: string;\n}\n\nexport interface ConfigParams {\n colors: DotUiColors;\n emailRegex: string;\n license: {\n displayServerId: string;\n isCommunity: boolean;\n level: number;\n levelName: string;\n };\n logos: {\n loginScreen: string;\n navBar: string;\n };\n menu: Menu[];\n paginatorLinks: number;\n paginatorRows: number;\n websocket: WebSocketConfigParams;\n}\n\nexport interface WebSocketConfigParams {\n disabledWebsockets: boolean;\n websocketReconnectTime: number;\n}\n\nexport interface DotTimeZone {\n id: string;\n label: string;\n offset: string;\n}\n\n@Injectable()\nexport class DotcmsConfigService {\n private configParamsSubject: BehaviorSubject = new BehaviorSubject(null);\n private configUrl: string;\n\n /**\n * Initializes this class with the dotCMS core configuration parameters.\n *\n * @param configParams - The configuration properties for the current instance.\n */\n constructor(private coreWebService: CoreWebService, private loggerService: LoggerService) {\n this.configUrl = 'v1/appconfiguration';\n this.loadConfig();\n }\n\n getConfig(): Observable {\n return this.configParamsSubject\n .asObservable()\n .pipe(filter((config: ConfigParams) => !!config));\n }\n\n loadConfig(): void {\n this.loggerService.debug('Loading configuration on: ', this.configUrl);\n\n this.coreWebService\n .requestView({\n url: this.configUrl\n })\n .pipe(pluck('entity'))\n .subscribe((res: any) => {\n this.loggerService.debug('Configuration Loaded!', res);\n\n const configParams: ConfigParams = {\n colors: res.config.colors,\n emailRegex: res.config[EMAIL_REGEX],\n license: res.config.license,\n logos: res.config.logos,\n menu: res.menu,\n paginatorLinks: res.config[DOTCMS_PAGINATOR_LINKS],\n paginatorRows: res.config[DOTCMS_PAGINATOR_ROWS],\n websocket: {\n websocketReconnectTime:\n res.config.websocket[DOTCMS_WEBSOCKET_RECONNECT_TIME],\n disabledWebsockets: res.config.websocket[DOTCMS_DISABLE_WEBSOCKET_PROTOCOL]\n }\n };\n\n this.configParamsSubject.next(configParams);\n\n this.loggerService.debug('this.configParams', configParams);\n\n return res;\n });\n }\n\n /**\n * Return a list of timezones.\n * @returns Observable\n * @memberof DotcmsConfigService\n */\n getTimeZone(): Observable {\n return this.coreWebService\n .requestView({\n url: this.configUrl\n })\n .pipe(\n pluck('entity', 'config', 'timezones'),\n map((timezones: DotTimeZone[]) => {\n return timezones.sort((a: DotTimeZone, b: DotTimeZone) => {\n if (a.label > b.label) {\n return 1;\n }\n if (a.label < b.label) {\n return -1;\n }\n // a must be equal to b\n return 0;\n });\n })\n );\n }\n}\n", + "properties": [ + { + "name": "background", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 24 + }, + { + "name": "primary", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 22 + }, + { + "name": "secondary", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 23 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotUnlicensedPortlet", + "id": "interface-DotUnlicensedPortlet-5929535e3e646a3c9c6b85e20ddc629cf196d85b74baebb2bb418db3cf101c2b5b5430b636e96d0abc28137000692dec45468c6c11ac698129007fbbdb865cf4", + "file": "apps/dotcms-ui/src/app/portlets/dot-form-builder/resolvers/dot-form-resolver.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Observable, of } from 'rxjs';\nimport { Injectable } from '@angular/core';\nimport { Resolve, ActivatedRouteSnapshot } from '@angular/router';\nimport { take, switchMap } from 'rxjs/operators';\nimport { DotLicenseService } from '@services/dot-license/dot-license.service';\nimport { DotMessageService } from '@services/dot-message/dot-messages.service';\n\nexport interface DotUnlicensedPortlet {\n title: string;\n description: string;\n links: {\n text: string;\n link: string;\n }[];\n}\n\n/**\n * Check is there is license to view the form portlet\n *\n * @export\n * @class DotFormResolver\n * @implements {(Resolve)}\n */\n@Injectable()\nexport class DotFormResolver implements Resolve {\n constructor(\n private dotLicenseService: DotLicenseService,\n private dotMessageService: DotMessageService\n ) {}\n\n resolve(_route: ActivatedRouteSnapshot): Observable {\n return this.dotLicenseService.isEnterprise().pipe(\n switchMap((isEnterprise: boolean) =>\n isEnterprise ? of(null) : this.getUnlicensePortlet()\n ),\n take(1)\n );\n }\n\n private getUnlicensePortlet(): Observable {\n return of({\n title: this.dotMessageService.get('Forms-and-Form-Builder'),\n description: this.dotMessageService.get('Forms-and-Form-Builder-in-Enterprise'),\n links: [\n {\n text: this.dotMessageService.get('Learn-more-about-dotCMS-Enterprise'),\n link: 'https://dotcms.com/product/features/feature-list'\n },\n {\n text: this.dotMessageService.get('Contact-Us-for-more-Information'),\n link: 'https://dotcms.com/contact-us/'\n }\n ]\n });\n }\n}\n", + "properties": [ + { + "name": "description", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 10 + }, + { + "name": "links", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type[]", + "optional": false, + "description": "", + "line": 11 + }, + { + "name": "title", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 9 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotUnlicensedPortletData", + "id": "interface-DotUnlicensedPortletData-a46e05b74f4a775fc8263bf6b0e61f70463f37b16aec8998708e8d6431501a2719da4054764a7a5836ab33ea70f19d69af20b2e8e5db0eb3fbc2a8d351d477e8", + "file": "apps/dotcms-ui/src/app/api/services/dot-license/dot-license.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { pluck, map, take } from 'rxjs/operators';\nimport { Injectable } from '@angular/core';\nimport { CoreWebService } from '@dotcms/dotcms-js';\nimport { Observable, Subject, BehaviorSubject } from 'rxjs';\n\nexport interface DotUnlicensedPortletData {\n icon: string;\n titleKey: string;\n url: string;\n}\n\nconst enterprisePorlets: DotUnlicensedPortletData[] = [\n {\n icon: 'tune',\n titleKey: 'com.dotcms.repackage.javax.portlet.title.rules',\n url: '/rules'\n },\n {\n icon: 'cloud_upload',\n titleKey: 'com.dotcms.repackage.javax.portlet.title.publishing-queue',\n url: '/c/publishing-queue'\n },\n {\n icon: 'find_in_page',\n titleKey: 'com.dotcms.repackage.javax.portlet.title.site-search',\n url: '/c/site-search'\n },\n {\n icon: 'update',\n titleKey: 'com.dotcms.repackage.javax.portlet.title.time-machine',\n url: '/c/time-machine'\n },\n {\n icon: 'device_hub',\n titleKey: 'com.dotcms.repackage.javax.portlet.title.workflow-schemes',\n url: '/c/workflow-schemes'\n },\n {\n icon: 'find_in_page',\n titleKey: 'com.dotcms.repackage.javax.portlet.title.es-search',\n url: '/c/es-search'\n },\n {\n icon: 'business',\n titleKey: 'Forms-and-Form-Builder',\n url: '/forms'\n },\n {\n icon: 'apps',\n titleKey: 'com.dotcms.repackage.javax.portlet.title.apps',\n url: '/apps'\n }\n];\n\n/**\n * Handle license information of current logged in user\n * @export\n * @class DotLicenseService\n */\n@Injectable()\nexport class DotLicenseService {\n unlicenseData: Subject = new BehaviorSubject({\n icon: '',\n titleKey: '',\n url: ''\n });\n private licenseURL: string;\n\n constructor(private coreWebService: CoreWebService) {\n this.licenseURL = 'v1/appconfiguration';\n }\n\n /**\n * Gets if current user has an enterprise license\n *\n * @returns Observable\n * @memberof DotLicenseService\n */\n isEnterprise(): Observable {\n return this.getLicense().pipe(map((license) => license['level'] >= 200));\n }\n\n /**\n * Verifies if an url is an enterprise portlet and user has enterprise\n *\n * @param string url\n * @returns Observable\n * @memberof DotLicenseService\n */\n canAccessEnterprisePortlet(url: string): Observable {\n return this.isEnterprise().pipe(\n take(1),\n map((isEnterpriseUser: boolean) => {\n const urlMatch = this.checksIfEnterpriseUrl(url);\n return urlMatch ? urlMatch && isEnterpriseUser : true;\n })\n );\n }\n\n private checksIfEnterpriseUrl(url: string): boolean {\n const urlMatch = enterprisePorlets.filter((item) => {\n return url.indexOf(item.url) === 0;\n });\n if (!!urlMatch.length) {\n this.unlicenseData.next(...urlMatch);\n }\n return !!urlMatch.length;\n }\n\n private getLicense(): Observable {\n return this.coreWebService\n .requestView({\n url: this.licenseURL\n })\n .pipe(pluck('entity', 'config', 'license'));\n }\n}\n", + "properties": [ + { + "name": "icon", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 7 + }, + { + "name": "titleKey", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 8 + }, + { + "name": "url", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 9 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotWizardInput", + "id": "interface-DotWizardInput-c050474b065af4ad7d78a5084ae9bac177dd5985a2edb26735cdd6dec3519ffdd00cdd33f9732fbfd2ed68401a33abf1925512f64d0ccfcfd0597fe9e8e13c99", + "file": "apps/dotcms-ui/src/app/shared/models/dot-wizard-input/dot-wizard-input.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotWizardStep } from '@models/dot-wizard-step/dot-wizard-step.model';\n\nexport interface DotWizardInput {\n steps: DotWizardStep[];\n title: string;\n}\n", + "properties": [ + { + "name": "steps", + "deprecated": false, + "deprecationMessage": "", + "type": "DotWizardStep[]", + "optional": false, + "description": "", + "line": 4 + }, + { + "name": "title", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 5 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DotWizardStep", + "id": "interface-DotWizardStep-9de6d5e05b2b3446040bf67d572714b9a4c4fa1b8afe4eeaf8490979782f2c86188511094297e2917de6a23c13db670ae3c739695f3df4aa47d766cb5891290c", + "file": "apps/dotcms-ui/src/app/shared/models/dot-wizard-step/dot-wizard-step.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface DotWizardStep {\n component: T;\n data: { [key: string]: any };\n}\n", + "properties": [ + { + "name": "component", + "deprecated": false, + "deprecationMessage": "", + "type": "T", + "optional": false, + "description": "", + "line": 2 + }, + { + "name": "data", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": false, + "description": "", + "line": 3 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DragulaCustomEvent", + "id": "interface-DragulaCustomEvent-ff5bca9e59daf3f6806a691bd96068605e1673b5661323216eee87d650d4cdbf90f2f5b1f75fd2e6e93610f05213c9965b9dfd2765d196cc3d591b42fe056260", + "file": "apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/components/fields/service/field-drag-drop.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Injectable } from '@angular/core';\nimport { Observable, merge } from 'rxjs';\nimport { DragulaService } from 'ng2-dragula';\nimport { filter, map, tap } from 'rxjs/operators';\nimport { DotCMSContentTypeLayoutRow, DotCMSContentTypeField } from '@dotcms/dotcms-models';\nimport * as _ from 'lodash';\nimport { FieldUtil } from '../util/field-util';\nimport { DotAlertConfirmService } from '@services/dot-alert-confirm';\nimport { DotMessageService } from '@services/dot-message/dot-messages.service';\n\nconst MAX_COLS_PER_ROW = 4;\n\n/**\n * Provide method to handle with the Field Types\n */\n\ninterface DragulaCustomEvent {\n container?: Element;\n el: Element;\n name: string;\n sibling?: Element;\n source: Element;\n target?: Element;\n}\n\n@Injectable()\nexport class FieldDragDropService {\n private static readonly FIELD_BAG_NAME = 'fields-bag';\n private static readonly FIELD_ROW_BAG_NAME = 'fields-row-bag';\n private static readonly FIELD_ROW_BAG_CLASS_OVER = 'row-columns__item--over';\n\n private _fieldDropFromSource: Observable;\n private _fieldDropFromTarget: Observable;\n private _fieldRowDropFromTarget: Observable;\n private draggedEvent = false;\n private currentFullRowEl: HTMLElement = null;\n private currentColumnOvered: Element;\n\n constructor(\n private dragulaService: DragulaService,\n private dotAlertConfirmService: DotAlertConfirmService,\n private dotMessageService: DotMessageService\n ) {\n const dragulaOver$ = dragulaService.over();\n const dragulaDropModel$ = dragulaService.dropModel();\n\n const isRowFull = () => !!this.currentFullRowEl;\n const wasDrop = (target) => target === null;\n\n merge(dragulaService.drop(), dragulaOver$)\n .pipe(filter(isRowFull))\n .subscribe(({ target }: DragulaCustomEvent) => {\n this.clearCurrentFullRowEl();\n\n if (wasDrop(target)) {\n this.dotAlertConfirmService.alert({\n header: this.dotMessageService.get('contenttypes.fullrow.dialog.header'),\n message: this.dotMessageService.get('contenttypes.fullrow.dialog.message'),\n footerLabel: {\n accept: this.dotMessageService.get('contenttypes.fullrow.dialog.accept')\n }\n });\n }\n });\n\n dragulaOver$\n .pipe(\n filter(\n (group: { name: string; el: Element; container: Element; source: Element }) =>\n this.isAColumnContainer(group.container)\n )\n )\n .subscribe(\n (group: { name: string; el: Element; container: Element; source: Element }) => {\n if (!this.currentColumnOvered) {\n this.currentColumnOvered = group.container;\n }\n\n if (\n this.itShouldSetCurrentOveredContainer(\n group.container,\n group.source\n )\n ) {\n this.currentColumnOvered.classList.remove(\n FieldDragDropService.FIELD_ROW_BAG_CLASS_OVER\n );\n\n this.currentColumnOvered = group.container;\n\n this.currentColumnOvered.classList.add(\n FieldDragDropService.FIELD_ROW_BAG_CLASS_OVER\n );\n }\n }\n );\n\n dragulaService\n .dragend()\n .pipe(filter(() => !!this.currentColumnOvered))\n .subscribe(() => {\n this.currentColumnOvered.classList.remove(\n FieldDragDropService.FIELD_ROW_BAG_CLASS_OVER\n );\n });\n\n this._fieldRowDropFromTarget = dragulaDropModel$.pipe(\n filter((data: DragulaDropModel) => this.isFieldBeingDragFromColumns(data)),\n map((data: DragulaDropModel) => data.targetModel)\n );\n\n this._fieldDropFromTarget = dragulaDropModel$.pipe(\n tap(() => {\n this.draggedEvent = true;\n setTimeout(() => {\n this.draggedEvent = false;\n }, 100);\n }),\n filter((data: DragulaDropModel) => this.isDraggingExistingField(data)),\n map((data: DragulaDropModel) => this.getDroppedFieldData(data))\n );\n\n this._fieldDropFromSource = dragulaDropModel$.pipe(\n filter((data: DragulaDropModel) => this.isDraggingNewField(data)),\n map((data: DragulaDropModel) => this.getDroppedFieldData(data))\n );\n }\n\n /**\n * Returns status if a field is being dragged\n * @returns boolean\n *\n * @memberof FieldDragDropService\n */\n isDraggedEventStarted(): boolean {\n return this.draggedEvent;\n }\n\n /**\n * Set options for fields bag and rows bag\n *\n * @memberof FieldDragDropService\n */\n setBagOptions(): void {\n this.setFieldBagOptions();\n this.setFieldRowBagOptions();\n }\n\n /**\n * Set the options for the 'fields-bag' dragula group\n * @memberof FieldDragDropService\n */\n setFieldBagOptions(): void {\n const fieldBagOpts = this.dragulaService.find(FieldDragDropService.FIELD_BAG_NAME);\n if (!fieldBagOpts) {\n this.dragulaService.createGroup(FieldDragDropService.FIELD_BAG_NAME, {\n copy: this.shouldCopy.bind(this),\n accepts: this.shouldAccepts.bind(this),\n moves: this.shouldMovesField,\n copyItem: (item: any) => _.cloneDeep(item)\n });\n }\n }\n\n /**\n * Set the options for the 'fields-row-bag' dragula group\n * @memberof FieldDragDropService\n */\n setFieldRowBagOptions(): void {\n const fieldRowBagOpts = this.dragulaService.find(FieldDragDropService.FIELD_ROW_BAG_NAME);\n if (!fieldRowBagOpts) {\n this.dragulaService.createGroup(FieldDragDropService.FIELD_ROW_BAG_NAME, {\n copy: this.shouldCopy.bind(this),\n moves: this.shouldMoveRow.bind(this)\n });\n }\n }\n\n get fieldDropFromSource$(): Observable {\n return this._fieldDropFromSource;\n }\n\n get fieldDropFromTarget$(): Observable {\n return this._fieldDropFromTarget;\n }\n\n get fieldRowDropFromTarget$(): Observable {\n return this._fieldRowDropFromTarget;\n }\n\n private getDroppedFieldData(data: DragulaDropModel): DropFieldData {\n return {\n item: data.item,\n source: {\n columnId: (data.source).dataset.columnid,\n model: data.sourceModel\n },\n target: {\n columnId: (data.target).dataset.columnid,\n model: data.targetModel\n }\n };\n }\n\n private isDraggingNewField(data: DragulaDropModel): boolean {\n return (\n data.name === FieldDragDropService.FIELD_BAG_NAME &&\n this.isDraggingFromSource(data.source)\n );\n }\n\n private isDraggingExistingField(data: DragulaDropModel): boolean {\n return (\n data.name === FieldDragDropService.FIELD_BAG_NAME &&\n (data.source).dataset.dragType === 'target'\n );\n }\n\n private isDraggingFromSource(source: HTMLElement): boolean {\n return source.dataset.dragType === 'source';\n }\n\n private isFieldBeingDragFromColumns(data: DragulaDropModel): boolean {\n return data.name === FieldDragDropService.FIELD_ROW_BAG_NAME;\n }\n\n private isAColumnContainer(container: Element): boolean {\n return container.classList.contains('row-columns__item');\n }\n\n private isANewColumnContainer(container: Element): boolean {\n return this.currentColumnOvered && this.currentColumnOvered !== container;\n }\n\n private shouldCopy(_el: HTMLElement, source: HTMLElement): boolean {\n return this.isDraggingFromSource(source);\n }\n\n private shouldMoveRow(\n _el: HTMLElement,\n source: HTMLElement,\n handle: HTMLElement,\n _sibling: HTMLElement\n ): boolean {\n const noDrag = !handle.classList.contains('no-drag');\n const isDragButton =\n handle.parentElement.classList.contains('row-header__drag') ||\n handle.classList.contains('row-header__drag');\n return noDrag && this.shouldDrag(source, isDragButton);\n }\n\n private shouldDrag(source: HTMLElement, isDragButton: boolean): boolean {\n return this.isDraggingFromSource(source) || isDragButton;\n }\n\n private shouldAccepts(\n el: HTMLElement,\n target: HTMLElement,\n _source: HTMLElement,\n _sibling: HTMLElement\n ): boolean {\n const columnsCount = target.parentElement.querySelectorAll('.row-columns__item').length;\n const isColumnField = FieldUtil.isColumnBreak(el.dataset.clazz);\n const cantAddColumn = isColumnField && columnsCount >= MAX_COLS_PER_ROW;\n\n if (cantAddColumn) {\n this.clearCurrentFullRowEl();\n this.disableRowElement(target.parentElement.parentElement);\n return false;\n }\n\n return true;\n }\n\n private shouldMovesField(\n el: HTMLElement,\n _container: Element,\n _handle: Element,\n _sibling: Element\n ): boolean {\n return el.dataset.dragType !== 'not_field';\n }\n\n private itShouldSetCurrentOveredContainer(\n container: HTMLElement,\n source: HTMLElement\n ): boolean {\n return this.isANewColumnContainer(container) || this.isDraggingFromSource(source);\n }\n\n private disableRowElement(el: HTMLElement): void {\n this.currentFullRowEl = el;\n this.currentFullRowEl.style.opacity = '0.4';\n this.currentFullRowEl.style.cursor = 'not-allowed';\n }\n\n private clearCurrentFullRowEl(): void {\n if (this.currentFullRowEl && this.currentFullRowEl.style.opacity) {\n this.currentFullRowEl.style.opacity = null;\n this.currentFullRowEl.style.cursor = null;\n this.currentFullRowEl = null;\n }\n }\n}\n\ninterface DragulaDropModel {\n name: string;\n el: Element;\n target: Element;\n source: Element;\n sibling: Element;\n item: any;\n sourceModel: any[];\n targetModel: any[];\n sourceIndex: number;\n targetIndex: number;\n}\n\nexport interface DropFieldData {\n item: DotCMSContentTypeField;\n source?: {\n columnId: string;\n model: DotCMSContentTypeField[];\n };\n target: {\n columnId: string;\n model: DotCMSContentTypeField[];\n };\n}\n", + "properties": [ + { + "name": "container", + "deprecated": false, + "deprecationMessage": "", + "type": "Element", + "optional": true, + "description": "", + "line": 18 + }, + { + "name": "el", + "deprecated": false, + "deprecationMessage": "", + "type": "Element", + "optional": false, + "description": "", + "line": 19 + }, + { + "name": "name", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 20 + }, + { + "name": "sibling", + "deprecated": false, + "deprecationMessage": "", + "type": "Element", + "optional": true, + "description": "", + "line": 21 + }, + { + "name": "source", + "deprecated": false, + "deprecationMessage": "", + "type": "Element", + "optional": false, + "description": "", + "line": 22 + }, + { + "name": "target", + "deprecated": false, + "deprecationMessage": "", + "type": "Element", + "optional": true, + "description": "", + "line": 23 + } + ], + "indexSignatures": [], + "kind": 165, + "description": "

Provide method to handle with the Field Types

\n", + "rawdescription": "\n\nProvide method to handle with the Field Types\n", + "methods": [] + }, + { + "name": "DragulaDropModel", + "id": "interface-DragulaDropModel-ff5bca9e59daf3f6806a691bd96068605e1673b5661323216eee87d650d4cdbf90f2f5b1f75fd2e6e93610f05213c9965b9dfd2765d196cc3d591b42fe056260", + "file": "apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/components/fields/service/field-drag-drop.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Injectable } from '@angular/core';\nimport { Observable, merge } from 'rxjs';\nimport { DragulaService } from 'ng2-dragula';\nimport { filter, map, tap } from 'rxjs/operators';\nimport { DotCMSContentTypeLayoutRow, DotCMSContentTypeField } from '@dotcms/dotcms-models';\nimport * as _ from 'lodash';\nimport { FieldUtil } from '../util/field-util';\nimport { DotAlertConfirmService } from '@services/dot-alert-confirm';\nimport { DotMessageService } from '@services/dot-message/dot-messages.service';\n\nconst MAX_COLS_PER_ROW = 4;\n\n/**\n * Provide method to handle with the Field Types\n */\n\ninterface DragulaCustomEvent {\n container?: Element;\n el: Element;\n name: string;\n sibling?: Element;\n source: Element;\n target?: Element;\n}\n\n@Injectable()\nexport class FieldDragDropService {\n private static readonly FIELD_BAG_NAME = 'fields-bag';\n private static readonly FIELD_ROW_BAG_NAME = 'fields-row-bag';\n private static readonly FIELD_ROW_BAG_CLASS_OVER = 'row-columns__item--over';\n\n private _fieldDropFromSource: Observable;\n private _fieldDropFromTarget: Observable;\n private _fieldRowDropFromTarget: Observable;\n private draggedEvent = false;\n private currentFullRowEl: HTMLElement = null;\n private currentColumnOvered: Element;\n\n constructor(\n private dragulaService: DragulaService,\n private dotAlertConfirmService: DotAlertConfirmService,\n private dotMessageService: DotMessageService\n ) {\n const dragulaOver$ = dragulaService.over();\n const dragulaDropModel$ = dragulaService.dropModel();\n\n const isRowFull = () => !!this.currentFullRowEl;\n const wasDrop = (target) => target === null;\n\n merge(dragulaService.drop(), dragulaOver$)\n .pipe(filter(isRowFull))\n .subscribe(({ target }: DragulaCustomEvent) => {\n this.clearCurrentFullRowEl();\n\n if (wasDrop(target)) {\n this.dotAlertConfirmService.alert({\n header: this.dotMessageService.get('contenttypes.fullrow.dialog.header'),\n message: this.dotMessageService.get('contenttypes.fullrow.dialog.message'),\n footerLabel: {\n accept: this.dotMessageService.get('contenttypes.fullrow.dialog.accept')\n }\n });\n }\n });\n\n dragulaOver$\n .pipe(\n filter(\n (group: { name: string; el: Element; container: Element; source: Element }) =>\n this.isAColumnContainer(group.container)\n )\n )\n .subscribe(\n (group: { name: string; el: Element; container: Element; source: Element }) => {\n if (!this.currentColumnOvered) {\n this.currentColumnOvered = group.container;\n }\n\n if (\n this.itShouldSetCurrentOveredContainer(\n group.container,\n group.source\n )\n ) {\n this.currentColumnOvered.classList.remove(\n FieldDragDropService.FIELD_ROW_BAG_CLASS_OVER\n );\n\n this.currentColumnOvered = group.container;\n\n this.currentColumnOvered.classList.add(\n FieldDragDropService.FIELD_ROW_BAG_CLASS_OVER\n );\n }\n }\n );\n\n dragulaService\n .dragend()\n .pipe(filter(() => !!this.currentColumnOvered))\n .subscribe(() => {\n this.currentColumnOvered.classList.remove(\n FieldDragDropService.FIELD_ROW_BAG_CLASS_OVER\n );\n });\n\n this._fieldRowDropFromTarget = dragulaDropModel$.pipe(\n filter((data: DragulaDropModel) => this.isFieldBeingDragFromColumns(data)),\n map((data: DragulaDropModel) => data.targetModel)\n );\n\n this._fieldDropFromTarget = dragulaDropModel$.pipe(\n tap(() => {\n this.draggedEvent = true;\n setTimeout(() => {\n this.draggedEvent = false;\n }, 100);\n }),\n filter((data: DragulaDropModel) => this.isDraggingExistingField(data)),\n map((data: DragulaDropModel) => this.getDroppedFieldData(data))\n );\n\n this._fieldDropFromSource = dragulaDropModel$.pipe(\n filter((data: DragulaDropModel) => this.isDraggingNewField(data)),\n map((data: DragulaDropModel) => this.getDroppedFieldData(data))\n );\n }\n\n /**\n * Returns status if a field is being dragged\n * @returns boolean\n *\n * @memberof FieldDragDropService\n */\n isDraggedEventStarted(): boolean {\n return this.draggedEvent;\n }\n\n /**\n * Set options for fields bag and rows bag\n *\n * @memberof FieldDragDropService\n */\n setBagOptions(): void {\n this.setFieldBagOptions();\n this.setFieldRowBagOptions();\n }\n\n /**\n * Set the options for the 'fields-bag' dragula group\n * @memberof FieldDragDropService\n */\n setFieldBagOptions(): void {\n const fieldBagOpts = this.dragulaService.find(FieldDragDropService.FIELD_BAG_NAME);\n if (!fieldBagOpts) {\n this.dragulaService.createGroup(FieldDragDropService.FIELD_BAG_NAME, {\n copy: this.shouldCopy.bind(this),\n accepts: this.shouldAccepts.bind(this),\n moves: this.shouldMovesField,\n copyItem: (item: any) => _.cloneDeep(item)\n });\n }\n }\n\n /**\n * Set the options for the 'fields-row-bag' dragula group\n * @memberof FieldDragDropService\n */\n setFieldRowBagOptions(): void {\n const fieldRowBagOpts = this.dragulaService.find(FieldDragDropService.FIELD_ROW_BAG_NAME);\n if (!fieldRowBagOpts) {\n this.dragulaService.createGroup(FieldDragDropService.FIELD_ROW_BAG_NAME, {\n copy: this.shouldCopy.bind(this),\n moves: this.shouldMoveRow.bind(this)\n });\n }\n }\n\n get fieldDropFromSource$(): Observable {\n return this._fieldDropFromSource;\n }\n\n get fieldDropFromTarget$(): Observable {\n return this._fieldDropFromTarget;\n }\n\n get fieldRowDropFromTarget$(): Observable {\n return this._fieldRowDropFromTarget;\n }\n\n private getDroppedFieldData(data: DragulaDropModel): DropFieldData {\n return {\n item: data.item,\n source: {\n columnId: (data.source).dataset.columnid,\n model: data.sourceModel\n },\n target: {\n columnId: (data.target).dataset.columnid,\n model: data.targetModel\n }\n };\n }\n\n private isDraggingNewField(data: DragulaDropModel): boolean {\n return (\n data.name === FieldDragDropService.FIELD_BAG_NAME &&\n this.isDraggingFromSource(data.source)\n );\n }\n\n private isDraggingExistingField(data: DragulaDropModel): boolean {\n return (\n data.name === FieldDragDropService.FIELD_BAG_NAME &&\n (data.source).dataset.dragType === 'target'\n );\n }\n\n private isDraggingFromSource(source: HTMLElement): boolean {\n return source.dataset.dragType === 'source';\n }\n\n private isFieldBeingDragFromColumns(data: DragulaDropModel): boolean {\n return data.name === FieldDragDropService.FIELD_ROW_BAG_NAME;\n }\n\n private isAColumnContainer(container: Element): boolean {\n return container.classList.contains('row-columns__item');\n }\n\n private isANewColumnContainer(container: Element): boolean {\n return this.currentColumnOvered && this.currentColumnOvered !== container;\n }\n\n private shouldCopy(_el: HTMLElement, source: HTMLElement): boolean {\n return this.isDraggingFromSource(source);\n }\n\n private shouldMoveRow(\n _el: HTMLElement,\n source: HTMLElement,\n handle: HTMLElement,\n _sibling: HTMLElement\n ): boolean {\n const noDrag = !handle.classList.contains('no-drag');\n const isDragButton =\n handle.parentElement.classList.contains('row-header__drag') ||\n handle.classList.contains('row-header__drag');\n return noDrag && this.shouldDrag(source, isDragButton);\n }\n\n private shouldDrag(source: HTMLElement, isDragButton: boolean): boolean {\n return this.isDraggingFromSource(source) || isDragButton;\n }\n\n private shouldAccepts(\n el: HTMLElement,\n target: HTMLElement,\n _source: HTMLElement,\n _sibling: HTMLElement\n ): boolean {\n const columnsCount = target.parentElement.querySelectorAll('.row-columns__item').length;\n const isColumnField = FieldUtil.isColumnBreak(el.dataset.clazz);\n const cantAddColumn = isColumnField && columnsCount >= MAX_COLS_PER_ROW;\n\n if (cantAddColumn) {\n this.clearCurrentFullRowEl();\n this.disableRowElement(target.parentElement.parentElement);\n return false;\n }\n\n return true;\n }\n\n private shouldMovesField(\n el: HTMLElement,\n _container: Element,\n _handle: Element,\n _sibling: Element\n ): boolean {\n return el.dataset.dragType !== 'not_field';\n }\n\n private itShouldSetCurrentOveredContainer(\n container: HTMLElement,\n source: HTMLElement\n ): boolean {\n return this.isANewColumnContainer(container) || this.isDraggingFromSource(source);\n }\n\n private disableRowElement(el: HTMLElement): void {\n this.currentFullRowEl = el;\n this.currentFullRowEl.style.opacity = '0.4';\n this.currentFullRowEl.style.cursor = 'not-allowed';\n }\n\n private clearCurrentFullRowEl(): void {\n if (this.currentFullRowEl && this.currentFullRowEl.style.opacity) {\n this.currentFullRowEl.style.opacity = null;\n this.currentFullRowEl.style.cursor = null;\n this.currentFullRowEl = null;\n }\n }\n}\n\ninterface DragulaDropModel {\n name: string;\n el: Element;\n target: Element;\n source: Element;\n sibling: Element;\n item: any;\n sourceModel: any[];\n targetModel: any[];\n sourceIndex: number;\n targetIndex: number;\n}\n\nexport interface DropFieldData {\n item: DotCMSContentTypeField;\n source?: {\n columnId: string;\n model: DotCMSContentTypeField[];\n };\n target: {\n columnId: string;\n model: DotCMSContentTypeField[];\n };\n}\n", + "properties": [ + { + "name": "el", + "deprecated": false, + "deprecationMessage": "", + "type": "Element", + "optional": false, + "description": "", + "line": 308 + }, + { + "name": "item", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": false, + "description": "", + "line": 312 + }, + { + "name": "name", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 307 + }, + { + "name": "sibling", + "deprecated": false, + "deprecationMessage": "", + "type": "Element", + "optional": false, + "description": "", + "line": 311 + }, + { + "name": "source", + "deprecated": false, + "deprecationMessage": "", + "type": "Element", + "optional": false, + "description": "", + "line": 310 + }, + { + "name": "sourceIndex", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 315 + }, + { + "name": "sourceModel", + "deprecated": false, + "deprecationMessage": "", + "type": "any[]", + "optional": false, + "description": "", + "line": 313 + }, + { + "name": "target", + "deprecated": false, + "deprecationMessage": "", + "type": "Element", + "optional": false, + "description": "", + "line": 309 + }, + { + "name": "targetIndex", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 316 + }, + { + "name": "targetModel", + "deprecated": false, + "deprecationMessage": "", + "type": "any[]", + "optional": false, + "description": "", + "line": 314 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DropdownEvent", + "id": "interface-DropdownEvent-9bef2fb64c73bb3dfd1bd0d4945965e4ac9d56ed8e4f342857f2c0a131f32c9eb58e5bd12cbf5ce717d8d30795e274c60ab93bc5539a066c66e02cd59002c743", + "file": "apps/dotcms-ui/src/app/view/components/_common/dot-workflows-actions-selector-field/dot-workflows-actions-selector-field.component.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import {\n Component,\n Input,\n OnChanges,\n SimpleChanges,\n forwardRef,\n OnInit,\n ViewChild\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR, ControlValueAccessor } from '@angular/forms';\nimport { Observable } from 'rxjs';\nimport { tap } from 'rxjs/operators';\n\nimport { DotCMSWorkflowAction, DotCMSWorkflow } from '@dotcms/dotcms-models';\nimport { DotWorkflowsActionsSelectorFieldService } from './services/dot-workflows-actions-selector-field.service';\nimport { SelectItem, SelectItemGroup } from 'primeng/api';\nimport { Dropdown } from 'primeng/dropdown';\n\ninterface DropdownEvent {\n originalEvent: MouseEvent;\n value: DotCMSWorkflowAction;\n}\n\n@Component({\n selector: 'dot-workflows-actions-selector-field',\n templateUrl: './dot-workflows-actions-selector-field.component.html',\n styleUrls: ['./dot-workflows-actions-selector-field.component.scss'],\n providers: [\n {\n multi: true,\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DotWorkflowsActionsSelectorFieldComponent)\n }\n ]\n})\nexport class DotWorkflowsActionsSelectorFieldComponent\n implements ControlValueAccessor, OnChanges, OnInit {\n @ViewChild('dropdown') dropdown: Dropdown;\n @Input() workflows: DotCMSWorkflow[];\n\n actions$: Observable;\n disabled = false;\n value: string;\n\n constructor(\n private dotWorkflowsActionsSelectorFieldService: DotWorkflowsActionsSelectorFieldService\n ) {}\n\n ngOnInit() {\n this.actions$ = this.dotWorkflowsActionsSelectorFieldService.get().pipe(\n tap((actions: SelectItemGroup[]) => {\n const actionsIds = this.getActionsIds(actions);\n\n if (actionsIds.length && !actionsIds.includes(this.value)) {\n this.dropdown.clear(null);\n }\n })\n );\n this.dotWorkflowsActionsSelectorFieldService.load(this.workflows);\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (!changes.workflows.firstChange) {\n this.dotWorkflowsActionsSelectorFieldService.load(changes.workflows.currentValue);\n }\n }\n\n /**\n * Update value on change of the multiselect\n *\n * @param {DropdownEvent} { value }\n * @memberof DotWorkflowsActionsSelectorFieldComponent\n */\n handleChange({ value }: DropdownEvent): void {\n this.propagateChange(value || '');\n }\n\n propagateChange = (_: any) => {};\n\n /**\n * Set the function to be called when the control receives a change event.\n *\n * @param {*} fn\n * @memberof DotWorkflowsActionsSelectorFieldComponent\n */\n registerOnChange(fn): void {\n this.propagateChange = fn;\n }\n\n registerOnTouched(): void {}\n\n /**\n * Set disable state.\n *\n * @param {boolean} value\n * @memberof DotWorkflowsActionsSelectorFieldComponent\n */\n setDisabledState(value: boolean): void {\n this.disabled = value;\n }\n\n /**\n * Write a new value to the element\n *\n * @param {string} value\n * @memberof DotWorkflowsActionsSelectorFieldComponent\n */\n writeValue(value: string): void {\n if (value) {\n this.value = value;\n }\n }\n\n private getActionsIds(actions: SelectItemGroup[]): string[] {\n return actions.reduce((acc: string[], { items }: SelectItemGroup) => {\n return [...acc, ...items.map((item: SelectItem) => item.value)];\n }, []);\n }\n}\n", + "properties": [ + { + "name": "originalEvent", + "deprecated": false, + "deprecationMessage": "", + "type": "MouseEvent", + "optional": false, + "description": "", + "line": 20 + }, + { + "name": "value", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSWorkflowAction", + "optional": false, + "description": "", + "line": 21 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "DropFieldData", + "id": "interface-DropFieldData-ff5bca9e59daf3f6806a691bd96068605e1673b5661323216eee87d650d4cdbf90f2f5b1f75fd2e6e93610f05213c9965b9dfd2765d196cc3d591b42fe056260", + "file": "apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/components/fields/service/field-drag-drop.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Injectable } from '@angular/core';\nimport { Observable, merge } from 'rxjs';\nimport { DragulaService } from 'ng2-dragula';\nimport { filter, map, tap } from 'rxjs/operators';\nimport { DotCMSContentTypeLayoutRow, DotCMSContentTypeField } from '@dotcms/dotcms-models';\nimport * as _ from 'lodash';\nimport { FieldUtil } from '../util/field-util';\nimport { DotAlertConfirmService } from '@services/dot-alert-confirm';\nimport { DotMessageService } from '@services/dot-message/dot-messages.service';\n\nconst MAX_COLS_PER_ROW = 4;\n\n/**\n * Provide method to handle with the Field Types\n */\n\ninterface DragulaCustomEvent {\n container?: Element;\n el: Element;\n name: string;\n sibling?: Element;\n source: Element;\n target?: Element;\n}\n\n@Injectable()\nexport class FieldDragDropService {\n private static readonly FIELD_BAG_NAME = 'fields-bag';\n private static readonly FIELD_ROW_BAG_NAME = 'fields-row-bag';\n private static readonly FIELD_ROW_BAG_CLASS_OVER = 'row-columns__item--over';\n\n private _fieldDropFromSource: Observable;\n private _fieldDropFromTarget: Observable;\n private _fieldRowDropFromTarget: Observable;\n private draggedEvent = false;\n private currentFullRowEl: HTMLElement = null;\n private currentColumnOvered: Element;\n\n constructor(\n private dragulaService: DragulaService,\n private dotAlertConfirmService: DotAlertConfirmService,\n private dotMessageService: DotMessageService\n ) {\n const dragulaOver$ = dragulaService.over();\n const dragulaDropModel$ = dragulaService.dropModel();\n\n const isRowFull = () => !!this.currentFullRowEl;\n const wasDrop = (target) => target === null;\n\n merge(dragulaService.drop(), dragulaOver$)\n .pipe(filter(isRowFull))\n .subscribe(({ target }: DragulaCustomEvent) => {\n this.clearCurrentFullRowEl();\n\n if (wasDrop(target)) {\n this.dotAlertConfirmService.alert({\n header: this.dotMessageService.get('contenttypes.fullrow.dialog.header'),\n message: this.dotMessageService.get('contenttypes.fullrow.dialog.message'),\n footerLabel: {\n accept: this.dotMessageService.get('contenttypes.fullrow.dialog.accept')\n }\n });\n }\n });\n\n dragulaOver$\n .pipe(\n filter(\n (group: { name: string; el: Element; container: Element; source: Element }) =>\n this.isAColumnContainer(group.container)\n )\n )\n .subscribe(\n (group: { name: string; el: Element; container: Element; source: Element }) => {\n if (!this.currentColumnOvered) {\n this.currentColumnOvered = group.container;\n }\n\n if (\n this.itShouldSetCurrentOveredContainer(\n group.container,\n group.source\n )\n ) {\n this.currentColumnOvered.classList.remove(\n FieldDragDropService.FIELD_ROW_BAG_CLASS_OVER\n );\n\n this.currentColumnOvered = group.container;\n\n this.currentColumnOvered.classList.add(\n FieldDragDropService.FIELD_ROW_BAG_CLASS_OVER\n );\n }\n }\n );\n\n dragulaService\n .dragend()\n .pipe(filter(() => !!this.currentColumnOvered))\n .subscribe(() => {\n this.currentColumnOvered.classList.remove(\n FieldDragDropService.FIELD_ROW_BAG_CLASS_OVER\n );\n });\n\n this._fieldRowDropFromTarget = dragulaDropModel$.pipe(\n filter((data: DragulaDropModel) => this.isFieldBeingDragFromColumns(data)),\n map((data: DragulaDropModel) => data.targetModel)\n );\n\n this._fieldDropFromTarget = dragulaDropModel$.pipe(\n tap(() => {\n this.draggedEvent = true;\n setTimeout(() => {\n this.draggedEvent = false;\n }, 100);\n }),\n filter((data: DragulaDropModel) => this.isDraggingExistingField(data)),\n map((data: DragulaDropModel) => this.getDroppedFieldData(data))\n );\n\n this._fieldDropFromSource = dragulaDropModel$.pipe(\n filter((data: DragulaDropModel) => this.isDraggingNewField(data)),\n map((data: DragulaDropModel) => this.getDroppedFieldData(data))\n );\n }\n\n /**\n * Returns status if a field is being dragged\n * @returns boolean\n *\n * @memberof FieldDragDropService\n */\n isDraggedEventStarted(): boolean {\n return this.draggedEvent;\n }\n\n /**\n * Set options for fields bag and rows bag\n *\n * @memberof FieldDragDropService\n */\n setBagOptions(): void {\n this.setFieldBagOptions();\n this.setFieldRowBagOptions();\n }\n\n /**\n * Set the options for the 'fields-bag' dragula group\n * @memberof FieldDragDropService\n */\n setFieldBagOptions(): void {\n const fieldBagOpts = this.dragulaService.find(FieldDragDropService.FIELD_BAG_NAME);\n if (!fieldBagOpts) {\n this.dragulaService.createGroup(FieldDragDropService.FIELD_BAG_NAME, {\n copy: this.shouldCopy.bind(this),\n accepts: this.shouldAccepts.bind(this),\n moves: this.shouldMovesField,\n copyItem: (item: any) => _.cloneDeep(item)\n });\n }\n }\n\n /**\n * Set the options for the 'fields-row-bag' dragula group\n * @memberof FieldDragDropService\n */\n setFieldRowBagOptions(): void {\n const fieldRowBagOpts = this.dragulaService.find(FieldDragDropService.FIELD_ROW_BAG_NAME);\n if (!fieldRowBagOpts) {\n this.dragulaService.createGroup(FieldDragDropService.FIELD_ROW_BAG_NAME, {\n copy: this.shouldCopy.bind(this),\n moves: this.shouldMoveRow.bind(this)\n });\n }\n }\n\n get fieldDropFromSource$(): Observable {\n return this._fieldDropFromSource;\n }\n\n get fieldDropFromTarget$(): Observable {\n return this._fieldDropFromTarget;\n }\n\n get fieldRowDropFromTarget$(): Observable {\n return this._fieldRowDropFromTarget;\n }\n\n private getDroppedFieldData(data: DragulaDropModel): DropFieldData {\n return {\n item: data.item,\n source: {\n columnId: (data.source).dataset.columnid,\n model: data.sourceModel\n },\n target: {\n columnId: (data.target).dataset.columnid,\n model: data.targetModel\n }\n };\n }\n\n private isDraggingNewField(data: DragulaDropModel): boolean {\n return (\n data.name === FieldDragDropService.FIELD_BAG_NAME &&\n this.isDraggingFromSource(data.source)\n );\n }\n\n private isDraggingExistingField(data: DragulaDropModel): boolean {\n return (\n data.name === FieldDragDropService.FIELD_BAG_NAME &&\n (data.source).dataset.dragType === 'target'\n );\n }\n\n private isDraggingFromSource(source: HTMLElement): boolean {\n return source.dataset.dragType === 'source';\n }\n\n private isFieldBeingDragFromColumns(data: DragulaDropModel): boolean {\n return data.name === FieldDragDropService.FIELD_ROW_BAG_NAME;\n }\n\n private isAColumnContainer(container: Element): boolean {\n return container.classList.contains('row-columns__item');\n }\n\n private isANewColumnContainer(container: Element): boolean {\n return this.currentColumnOvered && this.currentColumnOvered !== container;\n }\n\n private shouldCopy(_el: HTMLElement, source: HTMLElement): boolean {\n return this.isDraggingFromSource(source);\n }\n\n private shouldMoveRow(\n _el: HTMLElement,\n source: HTMLElement,\n handle: HTMLElement,\n _sibling: HTMLElement\n ): boolean {\n const noDrag = !handle.classList.contains('no-drag');\n const isDragButton =\n handle.parentElement.classList.contains('row-header__drag') ||\n handle.classList.contains('row-header__drag');\n return noDrag && this.shouldDrag(source, isDragButton);\n }\n\n private shouldDrag(source: HTMLElement, isDragButton: boolean): boolean {\n return this.isDraggingFromSource(source) || isDragButton;\n }\n\n private shouldAccepts(\n el: HTMLElement,\n target: HTMLElement,\n _source: HTMLElement,\n _sibling: HTMLElement\n ): boolean {\n const columnsCount = target.parentElement.querySelectorAll('.row-columns__item').length;\n const isColumnField = FieldUtil.isColumnBreak(el.dataset.clazz);\n const cantAddColumn = isColumnField && columnsCount >= MAX_COLS_PER_ROW;\n\n if (cantAddColumn) {\n this.clearCurrentFullRowEl();\n this.disableRowElement(target.parentElement.parentElement);\n return false;\n }\n\n return true;\n }\n\n private shouldMovesField(\n el: HTMLElement,\n _container: Element,\n _handle: Element,\n _sibling: Element\n ): boolean {\n return el.dataset.dragType !== 'not_field';\n }\n\n private itShouldSetCurrentOveredContainer(\n container: HTMLElement,\n source: HTMLElement\n ): boolean {\n return this.isANewColumnContainer(container) || this.isDraggingFromSource(source);\n }\n\n private disableRowElement(el: HTMLElement): void {\n this.currentFullRowEl = el;\n this.currentFullRowEl.style.opacity = '0.4';\n this.currentFullRowEl.style.cursor = 'not-allowed';\n }\n\n private clearCurrentFullRowEl(): void {\n if (this.currentFullRowEl && this.currentFullRowEl.style.opacity) {\n this.currentFullRowEl.style.opacity = null;\n this.currentFullRowEl.style.cursor = null;\n this.currentFullRowEl = null;\n }\n }\n}\n\ninterface DragulaDropModel {\n name: string;\n el: Element;\n target: Element;\n source: Element;\n sibling: Element;\n item: any;\n sourceModel: any[];\n targetModel: any[];\n sourceIndex: number;\n targetIndex: number;\n}\n\nexport interface DropFieldData {\n item: DotCMSContentTypeField;\n source?: {\n columnId: string;\n model: DotCMSContentTypeField[];\n };\n target: {\n columnId: string;\n model: DotCMSContentTypeField[];\n };\n}\n", + "properties": [ + { + "name": "item", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSContentTypeField", + "optional": false, + "description": "", + "line": 320 + }, + { + "name": "source", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": true, + "description": "", + "line": 321 + }, + { + "name": "target", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": false, + "description": "", + "line": 325 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "ESContent", + "id": "interface-ESContent-21548382aed0d29a986975a7972fcfb484c7b18bf01044b9a632c6339fc3d6e87ec86abc0e04fe0037118c7ec2524f9b20a059990e8eb0295cd0945f7faa0247", + "file": "apps/dotcms-ui/src/app/shared/models/dot-es-content/dot-es-content.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotCMSContentlet } from \"@dotcms/dotcms-models\";\n\nexport interface ESContent {\n contentTook: number;\n jsonObjectView: { contentlets: DotCMSContentlet[] };\n queryTook: number;\n resultsSize: number;\n}\n", + "properties": [ + { + "name": "contentTook", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 4 + }, + { + "name": "jsonObjectView", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": false, + "description": "", + "line": 5 + }, + { + "name": "queryTook", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 6 + }, + { + "name": "resultsSize", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 7 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "FieldProperty", + "id": "interface-FieldProperty-6b21fca4042f9afa605935bd0e2b4b6bfa2bcac94eaaad56e9de1cf8753a6b124e98460dba42785259d6bb07cbef235863b1fbf5006a4adfc9e17f4d0ca1576b", + "file": "apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/components/fields/content-type-fields-properties-form/field-properties/field-properties.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotCMSContentTypeField } from '@dotcms/dotcms-models';\n\nexport interface FieldProperty {\n name: string;\n value: any;\n field: DotCMSContentTypeField;\n}\n", + "properties": [ + { + "name": "field", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSContentTypeField", + "optional": false, + "description": "", + "line": 6 + }, + { + "name": "name", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 4 + }, + { + "name": "value", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": false, + "description": "", + "line": 5 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "FieldType", + "id": "interface-FieldType-3756d7b45fc79d29803f4e9ff17aa32d073fadee139518b413d8f120d8bb3b4dd053ea23d012d0faac911cef01b75e8d5c2ab1c6e780dc37ab2115ab1a4480af", + "file": "apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/components/fields/models/field-type.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface FieldType {\n id: string;\n label: string;\n clazz: string;\n helpText: string;\n properties: string[];\n}\n", + "properties": [ + { + "name": "clazz", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 4 + }, + { + "name": "helpText", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 5 + }, + { + "name": "id", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 2 + }, + { + "name": "label", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 3 + }, + { + "name": "properties", + "deprecated": false, + "deprecationMessage": "", + "type": "string[]", + "optional": false, + "description": "", + "line": 6 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "FileSystemDirectoryEntry", + "id": "interface-FileSystemDirectoryEntry-450971d37445709726eb582a66b23c1abf147cab31fe948c9892afa05e10c4b69a0025589e85f3e86e4908c8d6e5d6f0676b2889bf9e9e0d10c11d35e4b38a45", + "file": "apps/dotcms-ui/src/app/portlets/dot-site-browser/models/file-system.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface FileSystemFileEntry extends FileSystemEntry {\n isDirectory: false;\n isFile: true;\n file(callback: (file: File) => void): void;\n}\n\nexport interface FileSystemDirectoryEntry extends FileSystemEntry {\n isDirectory: true;\n isFile: false;\n createReader(): FileSystemDirectoryReader;\n getFile(\n path?: string,\n options?: FileSystemFlags,\n successCallback?: (result: FileSystemFileEntry) => void,\n errorCallback?: (error: DOMError) => void\n ): void;\n getDirectory(\n path?: string,\n options?: FileSystemFlags,\n successCallback?: (result: FileSystemDirectoryEntry) => void,\n errorCallback?: (error: DOMError) => void\n ): void;\n}\n\nexport interface FileSystemFlags {\n create?: boolean;\n exclusive?: boolean;\n}\n\nexport interface FileSystemDirectoryReader {\n readEntries(\n successCallback: (result: FileSystemEntry[]) => void,\n errorCallback?: (error: DOMError) => void\n ): void;\n}\n\nexport interface FileSystemEntry {\n name: string;\n isDirectory: boolean;\n isFile: boolean;\n}\n", + "properties": [ + { + "name": "isDirectory", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 8 + }, + { + "name": "isFile", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 9 + } + ], + "indexSignatures": [], + "kind": 167, + "methods": [ + { + "name": "createReader", + "args": [], + "optional": false, + "returnType": "FileSystemDirectoryReader", + "typeParameters": [], + "line": 10, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "getDirectory", + "args": [ + { + "name": "path", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "optional": true + }, + { + "name": "options", + "type": "FileSystemFlags", + "deprecated": false, + "deprecationMessage": "", + "optional": true + }, + { + "name": "successCallback", + "type": "function", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "function": [ + { + "name": "result", + "type": "FileSystemDirectoryEntry", + "deprecated": false, + "deprecationMessage": "" + } + ] + }, + { + "name": "errorCallback", + "type": "function", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "function": [ + { + "name": "error", + "type": "DOMError", + "deprecated": false, + "deprecationMessage": "" + } + ] + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 17, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "path", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "tagName": { + "text": "param" + } + }, + { + "name": "options", + "type": "FileSystemFlags", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "tagName": { + "text": "param" + } + }, + { + "name": "successCallback", + "type": "function", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "function": [ + { + "name": "result", + "type": "FileSystemDirectoryEntry", + "deprecated": false, + "deprecationMessage": "" + } + ], + "tagName": { + "text": "param" + } + }, + { + "name": "errorCallback", + "type": "function", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "function": [ + { + "name": "error", + "type": "DOMError", + "deprecated": false, + "deprecationMessage": "" + } + ], + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getFile", + "args": [ + { + "name": "path", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "optional": true + }, + { + "name": "options", + "type": "FileSystemFlags", + "deprecated": false, + "deprecationMessage": "", + "optional": true + }, + { + "name": "successCallback", + "type": "function", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "function": [ + { + "name": "result", + "type": "FileSystemFileEntry", + "deprecated": false, + "deprecationMessage": "" + } + ] + }, + { + "name": "errorCallback", + "type": "function", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "function": [ + { + "name": "error", + "type": "DOMError", + "deprecated": false, + "deprecationMessage": "" + } + ] + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 11, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "path", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "tagName": { + "text": "param" + } + }, + { + "name": "options", + "type": "FileSystemFlags", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "tagName": { + "text": "param" + } + }, + { + "name": "successCallback", + "type": "function", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "function": [ + { + "name": "result", + "type": "FileSystemFileEntry", + "deprecated": false, + "deprecationMessage": "" + } + ], + "tagName": { + "text": "param" + } + }, + { + "name": "errorCallback", + "type": "function", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "function": [ + { + "name": "error", + "type": "DOMError", + "deprecated": false, + "deprecationMessage": "" + } + ], + "tagName": { + "text": "param" + } + } + ] + } + ], + "extends": "FileSystemEntry" + }, + { + "name": "FileSystemDirectoryReader", + "id": "interface-FileSystemDirectoryReader-450971d37445709726eb582a66b23c1abf147cab31fe948c9892afa05e10c4b69a0025589e85f3e86e4908c8d6e5d6f0676b2889bf9e9e0d10c11d35e4b38a45", + "file": "apps/dotcms-ui/src/app/portlets/dot-site-browser/models/file-system.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface FileSystemFileEntry extends FileSystemEntry {\n isDirectory: false;\n isFile: true;\n file(callback: (file: File) => void): void;\n}\n\nexport interface FileSystemDirectoryEntry extends FileSystemEntry {\n isDirectory: true;\n isFile: false;\n createReader(): FileSystemDirectoryReader;\n getFile(\n path?: string,\n options?: FileSystemFlags,\n successCallback?: (result: FileSystemFileEntry) => void,\n errorCallback?: (error: DOMError) => void\n ): void;\n getDirectory(\n path?: string,\n options?: FileSystemFlags,\n successCallback?: (result: FileSystemDirectoryEntry) => void,\n errorCallback?: (error: DOMError) => void\n ): void;\n}\n\nexport interface FileSystemFlags {\n create?: boolean;\n exclusive?: boolean;\n}\n\nexport interface FileSystemDirectoryReader {\n readEntries(\n successCallback: (result: FileSystemEntry[]) => void,\n errorCallback?: (error: DOMError) => void\n ): void;\n}\n\nexport interface FileSystemEntry {\n name: string;\n isDirectory: boolean;\n isFile: boolean;\n}\n", + "properties": [], + "indexSignatures": [], + "kind": 167, + "methods": [ + { + "name": "readEntries", + "args": [ + { + "name": "successCallback", + "type": "function", + "deprecated": false, + "deprecationMessage": "", + "function": [ + { + "name": "result", + "type": "FileSystemEntry[]", + "deprecated": false, + "deprecationMessage": "" + } + ] + }, + { + "name": "errorCallback", + "type": "function", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "function": [ + { + "name": "error", + "type": "DOMError", + "deprecated": false, + "deprecationMessage": "" + } + ] + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 31, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "successCallback", + "type": "function", + "deprecated": false, + "deprecationMessage": "", + "function": [ + { + "name": "result", + "type": "FileSystemEntry[]", + "deprecated": false, + "deprecationMessage": "" + } + ], + "tagName": { + "text": "param" + } + }, + { + "name": "errorCallback", + "type": "function", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "function": [ + { + "name": "error", + "type": "DOMError", + "deprecated": false, + "deprecationMessage": "" + } + ], + "tagName": { + "text": "param" + } + } + ] + } + ] + }, + { + "name": "FileSystemEntry", + "id": "interface-FileSystemEntry-450971d37445709726eb582a66b23c1abf147cab31fe948c9892afa05e10c4b69a0025589e85f3e86e4908c8d6e5d6f0676b2889bf9e9e0d10c11d35e4b38a45", + "file": "apps/dotcms-ui/src/app/portlets/dot-site-browser/models/file-system.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface FileSystemFileEntry extends FileSystemEntry {\n isDirectory: false;\n isFile: true;\n file(callback: (file: File) => void): void;\n}\n\nexport interface FileSystemDirectoryEntry extends FileSystemEntry {\n isDirectory: true;\n isFile: false;\n createReader(): FileSystemDirectoryReader;\n getFile(\n path?: string,\n options?: FileSystemFlags,\n successCallback?: (result: FileSystemFileEntry) => void,\n errorCallback?: (error: DOMError) => void\n ): void;\n getDirectory(\n path?: string,\n options?: FileSystemFlags,\n successCallback?: (result: FileSystemDirectoryEntry) => void,\n errorCallback?: (error: DOMError) => void\n ): void;\n}\n\nexport interface FileSystemFlags {\n create?: boolean;\n exclusive?: boolean;\n}\n\nexport interface FileSystemDirectoryReader {\n readEntries(\n successCallback: (result: FileSystemEntry[]) => void,\n errorCallback?: (error: DOMError) => void\n ): void;\n}\n\nexport interface FileSystemEntry {\n name: string;\n isDirectory: boolean;\n isFile: boolean;\n}\n", + "properties": [ + { + "name": "isDirectory", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 39 + }, + { + "name": "isFile", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 40 + }, + { + "name": "name", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 38 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "FileSystemFileEntry", + "id": "interface-FileSystemFileEntry-450971d37445709726eb582a66b23c1abf147cab31fe948c9892afa05e10c4b69a0025589e85f3e86e4908c8d6e5d6f0676b2889bf9e9e0d10c11d35e4b38a45", + "file": "apps/dotcms-ui/src/app/portlets/dot-site-browser/models/file-system.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface FileSystemFileEntry extends FileSystemEntry {\n isDirectory: false;\n isFile: true;\n file(callback: (file: File) => void): void;\n}\n\nexport interface FileSystemDirectoryEntry extends FileSystemEntry {\n isDirectory: true;\n isFile: false;\n createReader(): FileSystemDirectoryReader;\n getFile(\n path?: string,\n options?: FileSystemFlags,\n successCallback?: (result: FileSystemFileEntry) => void,\n errorCallback?: (error: DOMError) => void\n ): void;\n getDirectory(\n path?: string,\n options?: FileSystemFlags,\n successCallback?: (result: FileSystemDirectoryEntry) => void,\n errorCallback?: (error: DOMError) => void\n ): void;\n}\n\nexport interface FileSystemFlags {\n create?: boolean;\n exclusive?: boolean;\n}\n\nexport interface FileSystemDirectoryReader {\n readEntries(\n successCallback: (result: FileSystemEntry[]) => void,\n errorCallback?: (error: DOMError) => void\n ): void;\n}\n\nexport interface FileSystemEntry {\n name: string;\n isDirectory: boolean;\n isFile: boolean;\n}\n", + "properties": [ + { + "name": "isDirectory", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 2 + }, + { + "name": "isFile", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 3 + } + ], + "indexSignatures": [], + "kind": 167, + "methods": [ + { + "name": "file", + "args": [ + { + "name": "callback", + "type": "function", + "deprecated": false, + "deprecationMessage": "", + "function": [ + { + "name": "file", + "type": "File", + "deprecated": false, + "deprecationMessage": "" + } + ] + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 4, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "callback", + "type": "function", + "deprecated": false, + "deprecationMessage": "", + "function": [ + { + "name": "file", + "type": "File", + "deprecated": false, + "deprecationMessage": "" + } + ], + "tagName": { + "text": "param" + } + } + ] + } + ], + "extends": "FileSystemEntry" + }, + { + "name": "FileSystemFlags", + "id": "interface-FileSystemFlags-450971d37445709726eb582a66b23c1abf147cab31fe948c9892afa05e10c4b69a0025589e85f3e86e4908c8d6e5d6f0676b2889bf9e9e0d10c11d35e4b38a45", + "file": "apps/dotcms-ui/src/app/portlets/dot-site-browser/models/file-system.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface FileSystemFileEntry extends FileSystemEntry {\n isDirectory: false;\n isFile: true;\n file(callback: (file: File) => void): void;\n}\n\nexport interface FileSystemDirectoryEntry extends FileSystemEntry {\n isDirectory: true;\n isFile: false;\n createReader(): FileSystemDirectoryReader;\n getFile(\n path?: string,\n options?: FileSystemFlags,\n successCallback?: (result: FileSystemFileEntry) => void,\n errorCallback?: (error: DOMError) => void\n ): void;\n getDirectory(\n path?: string,\n options?: FileSystemFlags,\n successCallback?: (result: FileSystemDirectoryEntry) => void,\n errorCallback?: (error: DOMError) => void\n ): void;\n}\n\nexport interface FileSystemFlags {\n create?: boolean;\n exclusive?: boolean;\n}\n\nexport interface FileSystemDirectoryReader {\n readEntries(\n successCallback: (result: FileSystemEntry[]) => void,\n errorCallback?: (error: DOMError) => void\n ): void;\n}\n\nexport interface FileSystemEntry {\n name: string;\n isDirectory: boolean;\n isFile: boolean;\n}\n", + "properties": [ + { + "name": "create", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 26 + }, + { + "name": "exclusive", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 27 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "FloatingActionsKeydownProps", + "id": "interface-FloatingActionsKeydownProps-5887b1f834be48ad8178835b5942a33eea20385add996a499c804bd5effe413095a9641620a759dce23898789983c4601cb71495d98cdc2abd30559acb3a5930", + "file": "libs/block-editor/src/lib/plugins/floating.plugin.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Editor, posToDOMRect, Range } from '@tiptap/core';\nimport { EditorState, Plugin, PluginKey, Transaction } from 'prosemirror-state';\nimport { EditorView } from 'prosemirror-view';\nimport tippy, { Instance, Props } from 'tippy.js';\nimport { SuggestionsCommandProps } from '../extensions/components/suggestions/suggestions.component';\n\ninterface PluginState {\n open: boolean;\n}\n\nexport interface FloatingActionsPluginProps {\n editor: Editor;\n element: HTMLElement;\n tippyOptions?: Partial;\n render?: () => FloatingRenderActions;\n command: ({\n editor,\n range,\n props\n }: {\n editor: Editor;\n range: Range;\n props: SuggestionsCommandProps;\n }) => void;\n}\n\nexport type FloatingActionsViewProps = FloatingActionsPluginProps & {\n view: EditorView;\n key: PluginKey;\n};\n\nexport interface FloatingActionsProps {\n range: Range;\n editor: Editor;\n command: (props: { editor: Editor; range: Range; props: SuggestionsCommandProps }) => void;\n clientRect: (() => DOMRect) | null;\n}\n\nexport interface FloatingActionsKeydownProps {\n view: EditorView;\n event: KeyboardEvent;\n range: Range;\n}\n\nexport interface FloatingRenderActions {\n onStart?: (props: FloatingActionsProps) => void;\n onExit?: (props: FloatingActionsProps) => void;\n onKeyDown?: (props: FloatingActionsKeydownProps) => boolean;\n}\n\nexport const FLOATING_ACTIONS_MENU_KEYBOARD = 'menuFloating';\n\nexport class FloatingActionsView {\n editor: Editor;\n element: HTMLElement;\n view: EditorView;\n tippy!: Instance;\n render: () => FloatingRenderActions;\n command: (props: { editor: Editor; range: Range; props: SuggestionsCommandProps }) => void;\n key: PluginKey;\n invalidNodes = ['codeBlock', 'blockquote'];\n\n constructor({\n editor,\n element,\n view,\n tippyOptions,\n render,\n command,\n key\n }: FloatingActionsViewProps) {\n this.editor = editor;\n this.element = element;\n this.view = view;\n this.element.addEventListener('mousedown', this.mousedownHandler, { capture: true });\n this.editor.on('focus', () => {\n this.tippy.unmount();\n this.update(this.editor.view);\n });\n this.element.style.visibility = 'visible';\n this.render = render;\n this.command = command;\n this.key = key;\n this.createTooltip(tippyOptions);\n }\n\n /**\n * Element mousedown handler to update the plugin state and open\n *\n * @param {MouseEvent} e\n * @memberof FloatingActionsView\n */\n mousedownHandler = (e: MouseEvent): void => {\n e.preventDefault();\n\n const transaction = this.editor.state.tr.setMeta(FLOATING_ACTIONS_MENU_KEYBOARD, {\n open: true\n });\n this.editor.view.dispatch(transaction);\n };\n\n /**\n * Create the tooltip for the element\n *\n * @param {Partial} [options={}]\n * @memberof FloatingActionsView\n */\n createTooltip(options: Partial = {}): void {\n this.tippy = tippy(this.view.dom, {\n duration: 0,\n getReferenceClientRect: null,\n content: this.element,\n interactive: true,\n trigger: 'manual',\n placement: 'left',\n hideOnClick: 'toggle',\n ...options\n });\n }\n\n /**\n * Check the EditorState and based on that modify the DOM\n *\n * @param {EditorView} view\n * @param {EditorState} prevState\n * @return {*} {void}\n * @memberof FloatingActionsView\n */\n update(view: EditorView, prevState?: EditorState): void {\n const { selection } = view.state;\n const { $anchor, empty, from, to } = selection;\n const isRootDepth = $anchor.depth === 1;\n const isNodeEmpty =\n !selection.$anchor.parent.isLeaf && !selection.$anchor.parent.textContent;\n const isActive = isRootDepth && isNodeEmpty;\n const nodeType = $anchor.parent.type.name;\n \n const next = this.key?.getState(view.state);\n const prev = prevState ? this.key?.getState(prevState) : null;\n\n if (!prev?.open && (!empty || !isActive)) {\n this.hide();\n return;\n }\n\n // Hide is Parent node is not the editor\n if (!prev?.open && this.invalidNodes.includes(nodeType)) {\n this.hide();\n return;\n }\n\n this.tippy.setProps({\n getReferenceClientRect: () => posToDOMRect(view, from, to)\n });\n\n this.show();\n\n if (next.open) {\n const { from, to } = this.editor.state.selection;\n const rect = posToDOMRect(this.view, from, to);\n\n this.render().onStart({\n clientRect: () => rect,\n range: { from, to },\n editor: this.editor,\n command: this.command\n });\n } else if (prev && prev.open) {\n this.render().onExit(null);\n }\n }\n\n show() {\n this.tippy.show();\n }\n\n hide() {\n this.tippy.hide();\n }\n\n destroy() {\n this.tippy.destroy();\n this.element.removeEventListener('mousedown', this.mousedownHandler);\n }\n}\n\nexport const FloatingActionsPluginKey = new PluginKey(FLOATING_ACTIONS_MENU_KEYBOARD);\n\nexport const FloatingActionsPlugin = (options: FloatingActionsPluginProps) => {\n return new Plugin({\n key: FloatingActionsPluginKey,\n view: (view) =>\n new FloatingActionsView({ key: FloatingActionsPluginKey, view, ...options }),\n state: {\n /**\n * Init the plugin state\n *\n * @return {*} {PluginState}\n */\n init(): PluginState {\n return {\n open: false\n };\n },\n /**\n * Update the plugin state base on meta information\n *\n * @param {Transaction} transaction\n * @return {*} {PluginState}\n */\n apply(transaction: Transaction): PluginState {\n const transactionMeta = transaction.getMeta(FLOATING_ACTIONS_MENU_KEYBOARD);\n\n if (transactionMeta?.open) {\n return {\n open: transactionMeta?.open\n };\n }\n\n return {\n open: false\n };\n }\n },\n props: {\n /**\n * Catch and handle the keydown in the plugin\n *\n * @param {EditorView} view\n * @param {KeyboardEvent} event\n * @return {*}\n */\n handleKeyDown(view: EditorView, event: KeyboardEvent) {\n const { open, range } = this.getState(view.state);\n if (!open) {\n return false;\n }\n return options.render().onKeyDown({ event, range, view });\n }\n }\n });\n};\n", + "properties": [ + { + "name": "event", + "deprecated": false, + "deprecationMessage": "", + "type": "KeyboardEvent", + "optional": false, + "description": "", + "line": 41 + }, + { + "name": "range", + "deprecated": false, + "deprecationMessage": "", + "type": "Range", + "optional": false, + "description": "", + "line": 42 + }, + { + "name": "view", + "deprecated": false, + "deprecationMessage": "", + "type": "EditorView", + "optional": false, + "description": "", + "line": 40 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "FloatingActionsPluginProps", + "id": "interface-FloatingActionsPluginProps-5887b1f834be48ad8178835b5942a33eea20385add996a499c804bd5effe413095a9641620a759dce23898789983c4601cb71495d98cdc2abd30559acb3a5930", + "file": "libs/block-editor/src/lib/plugins/floating.plugin.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Editor, posToDOMRect, Range } from '@tiptap/core';\nimport { EditorState, Plugin, PluginKey, Transaction } from 'prosemirror-state';\nimport { EditorView } from 'prosemirror-view';\nimport tippy, { Instance, Props } from 'tippy.js';\nimport { SuggestionsCommandProps } from '../extensions/components/suggestions/suggestions.component';\n\ninterface PluginState {\n open: boolean;\n}\n\nexport interface FloatingActionsPluginProps {\n editor: Editor;\n element: HTMLElement;\n tippyOptions?: Partial;\n render?: () => FloatingRenderActions;\n command: ({\n editor,\n range,\n props\n }: {\n editor: Editor;\n range: Range;\n props: SuggestionsCommandProps;\n }) => void;\n}\n\nexport type FloatingActionsViewProps = FloatingActionsPluginProps & {\n view: EditorView;\n key: PluginKey;\n};\n\nexport interface FloatingActionsProps {\n range: Range;\n editor: Editor;\n command: (props: { editor: Editor; range: Range; props: SuggestionsCommandProps }) => void;\n clientRect: (() => DOMRect) | null;\n}\n\nexport interface FloatingActionsKeydownProps {\n view: EditorView;\n event: KeyboardEvent;\n range: Range;\n}\n\nexport interface FloatingRenderActions {\n onStart?: (props: FloatingActionsProps) => void;\n onExit?: (props: FloatingActionsProps) => void;\n onKeyDown?: (props: FloatingActionsKeydownProps) => boolean;\n}\n\nexport const FLOATING_ACTIONS_MENU_KEYBOARD = 'menuFloating';\n\nexport class FloatingActionsView {\n editor: Editor;\n element: HTMLElement;\n view: EditorView;\n tippy!: Instance;\n render: () => FloatingRenderActions;\n command: (props: { editor: Editor; range: Range; props: SuggestionsCommandProps }) => void;\n key: PluginKey;\n invalidNodes = ['codeBlock', 'blockquote'];\n\n constructor({\n editor,\n element,\n view,\n tippyOptions,\n render,\n command,\n key\n }: FloatingActionsViewProps) {\n this.editor = editor;\n this.element = element;\n this.view = view;\n this.element.addEventListener('mousedown', this.mousedownHandler, { capture: true });\n this.editor.on('focus', () => {\n this.tippy.unmount();\n this.update(this.editor.view);\n });\n this.element.style.visibility = 'visible';\n this.render = render;\n this.command = command;\n this.key = key;\n this.createTooltip(tippyOptions);\n }\n\n /**\n * Element mousedown handler to update the plugin state and open\n *\n * @param {MouseEvent} e\n * @memberof FloatingActionsView\n */\n mousedownHandler = (e: MouseEvent): void => {\n e.preventDefault();\n\n const transaction = this.editor.state.tr.setMeta(FLOATING_ACTIONS_MENU_KEYBOARD, {\n open: true\n });\n this.editor.view.dispatch(transaction);\n };\n\n /**\n * Create the tooltip for the element\n *\n * @param {Partial} [options={}]\n * @memberof FloatingActionsView\n */\n createTooltip(options: Partial = {}): void {\n this.tippy = tippy(this.view.dom, {\n duration: 0,\n getReferenceClientRect: null,\n content: this.element,\n interactive: true,\n trigger: 'manual',\n placement: 'left',\n hideOnClick: 'toggle',\n ...options\n });\n }\n\n /**\n * Check the EditorState and based on that modify the DOM\n *\n * @param {EditorView} view\n * @param {EditorState} prevState\n * @return {*} {void}\n * @memberof FloatingActionsView\n */\n update(view: EditorView, prevState?: EditorState): void {\n const { selection } = view.state;\n const { $anchor, empty, from, to } = selection;\n const isRootDepth = $anchor.depth === 1;\n const isNodeEmpty =\n !selection.$anchor.parent.isLeaf && !selection.$anchor.parent.textContent;\n const isActive = isRootDepth && isNodeEmpty;\n const nodeType = $anchor.parent.type.name;\n \n const next = this.key?.getState(view.state);\n const prev = prevState ? this.key?.getState(prevState) : null;\n\n if (!prev?.open && (!empty || !isActive)) {\n this.hide();\n return;\n }\n\n // Hide is Parent node is not the editor\n if (!prev?.open && this.invalidNodes.includes(nodeType)) {\n this.hide();\n return;\n }\n\n this.tippy.setProps({\n getReferenceClientRect: () => posToDOMRect(view, from, to)\n });\n\n this.show();\n\n if (next.open) {\n const { from, to } = this.editor.state.selection;\n const rect = posToDOMRect(this.view, from, to);\n\n this.render().onStart({\n clientRect: () => rect,\n range: { from, to },\n editor: this.editor,\n command: this.command\n });\n } else if (prev && prev.open) {\n this.render().onExit(null);\n }\n }\n\n show() {\n this.tippy.show();\n }\n\n hide() {\n this.tippy.hide();\n }\n\n destroy() {\n this.tippy.destroy();\n this.element.removeEventListener('mousedown', this.mousedownHandler);\n }\n}\n\nexport const FloatingActionsPluginKey = new PluginKey(FLOATING_ACTIONS_MENU_KEYBOARD);\n\nexport const FloatingActionsPlugin = (options: FloatingActionsPluginProps) => {\n return new Plugin({\n key: FloatingActionsPluginKey,\n view: (view) =>\n new FloatingActionsView({ key: FloatingActionsPluginKey, view, ...options }),\n state: {\n /**\n * Init the plugin state\n *\n * @return {*} {PluginState}\n */\n init(): PluginState {\n return {\n open: false\n };\n },\n /**\n * Update the plugin state base on meta information\n *\n * @param {Transaction} transaction\n * @return {*} {PluginState}\n */\n apply(transaction: Transaction): PluginState {\n const transactionMeta = transaction.getMeta(FLOATING_ACTIONS_MENU_KEYBOARD);\n\n if (transactionMeta?.open) {\n return {\n open: transactionMeta?.open\n };\n }\n\n return {\n open: false\n };\n }\n },\n props: {\n /**\n * Catch and handle the keydown in the plugin\n *\n * @param {EditorView} view\n * @param {KeyboardEvent} event\n * @return {*}\n */\n handleKeyDown(view: EditorView, event: KeyboardEvent) {\n const { open, range } = this.getState(view.state);\n if (!open) {\n return false;\n }\n return options.render().onKeyDown({ event, range, view });\n }\n }\n });\n};\n", + "properties": [ + { + "name": "command", + "deprecated": false, + "deprecationMessage": "", + "type": "function", + "optional": false, + "description": "", + "line": 16 + }, + { + "name": "editor", + "deprecated": false, + "deprecationMessage": "", + "type": "Editor", + "optional": false, + "description": "", + "line": 12 + }, + { + "name": "element", + "deprecated": false, + "deprecationMessage": "", + "type": "HTMLElement", + "optional": false, + "description": "", + "line": 13 + }, + { + "name": "render", + "deprecated": false, + "deprecationMessage": "", + "type": "function", + "optional": true, + "description": "", + "line": 15 + }, + { + "name": "tippyOptions", + "deprecated": false, + "deprecationMessage": "", + "type": "Partial", + "optional": true, + "description": "", + "line": 14 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "FloatingActionsProps", + "id": "interface-FloatingActionsProps-5887b1f834be48ad8178835b5942a33eea20385add996a499c804bd5effe413095a9641620a759dce23898789983c4601cb71495d98cdc2abd30559acb3a5930", + "file": "libs/block-editor/src/lib/plugins/floating.plugin.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Editor, posToDOMRect, Range } from '@tiptap/core';\nimport { EditorState, Plugin, PluginKey, Transaction } from 'prosemirror-state';\nimport { EditorView } from 'prosemirror-view';\nimport tippy, { Instance, Props } from 'tippy.js';\nimport { SuggestionsCommandProps } from '../extensions/components/suggestions/suggestions.component';\n\ninterface PluginState {\n open: boolean;\n}\n\nexport interface FloatingActionsPluginProps {\n editor: Editor;\n element: HTMLElement;\n tippyOptions?: Partial;\n render?: () => FloatingRenderActions;\n command: ({\n editor,\n range,\n props\n }: {\n editor: Editor;\n range: Range;\n props: SuggestionsCommandProps;\n }) => void;\n}\n\nexport type FloatingActionsViewProps = FloatingActionsPluginProps & {\n view: EditorView;\n key: PluginKey;\n};\n\nexport interface FloatingActionsProps {\n range: Range;\n editor: Editor;\n command: (props: { editor: Editor; range: Range; props: SuggestionsCommandProps }) => void;\n clientRect: (() => DOMRect) | null;\n}\n\nexport interface FloatingActionsKeydownProps {\n view: EditorView;\n event: KeyboardEvent;\n range: Range;\n}\n\nexport interface FloatingRenderActions {\n onStart?: (props: FloatingActionsProps) => void;\n onExit?: (props: FloatingActionsProps) => void;\n onKeyDown?: (props: FloatingActionsKeydownProps) => boolean;\n}\n\nexport const FLOATING_ACTIONS_MENU_KEYBOARD = 'menuFloating';\n\nexport class FloatingActionsView {\n editor: Editor;\n element: HTMLElement;\n view: EditorView;\n tippy!: Instance;\n render: () => FloatingRenderActions;\n command: (props: { editor: Editor; range: Range; props: SuggestionsCommandProps }) => void;\n key: PluginKey;\n invalidNodes = ['codeBlock', 'blockquote'];\n\n constructor({\n editor,\n element,\n view,\n tippyOptions,\n render,\n command,\n key\n }: FloatingActionsViewProps) {\n this.editor = editor;\n this.element = element;\n this.view = view;\n this.element.addEventListener('mousedown', this.mousedownHandler, { capture: true });\n this.editor.on('focus', () => {\n this.tippy.unmount();\n this.update(this.editor.view);\n });\n this.element.style.visibility = 'visible';\n this.render = render;\n this.command = command;\n this.key = key;\n this.createTooltip(tippyOptions);\n }\n\n /**\n * Element mousedown handler to update the plugin state and open\n *\n * @param {MouseEvent} e\n * @memberof FloatingActionsView\n */\n mousedownHandler = (e: MouseEvent): void => {\n e.preventDefault();\n\n const transaction = this.editor.state.tr.setMeta(FLOATING_ACTIONS_MENU_KEYBOARD, {\n open: true\n });\n this.editor.view.dispatch(transaction);\n };\n\n /**\n * Create the tooltip for the element\n *\n * @param {Partial} [options={}]\n * @memberof FloatingActionsView\n */\n createTooltip(options: Partial = {}): void {\n this.tippy = tippy(this.view.dom, {\n duration: 0,\n getReferenceClientRect: null,\n content: this.element,\n interactive: true,\n trigger: 'manual',\n placement: 'left',\n hideOnClick: 'toggle',\n ...options\n });\n }\n\n /**\n * Check the EditorState and based on that modify the DOM\n *\n * @param {EditorView} view\n * @param {EditorState} prevState\n * @return {*} {void}\n * @memberof FloatingActionsView\n */\n update(view: EditorView, prevState?: EditorState): void {\n const { selection } = view.state;\n const { $anchor, empty, from, to } = selection;\n const isRootDepth = $anchor.depth === 1;\n const isNodeEmpty =\n !selection.$anchor.parent.isLeaf && !selection.$anchor.parent.textContent;\n const isActive = isRootDepth && isNodeEmpty;\n const nodeType = $anchor.parent.type.name;\n \n const next = this.key?.getState(view.state);\n const prev = prevState ? this.key?.getState(prevState) : null;\n\n if (!prev?.open && (!empty || !isActive)) {\n this.hide();\n return;\n }\n\n // Hide is Parent node is not the editor\n if (!prev?.open && this.invalidNodes.includes(nodeType)) {\n this.hide();\n return;\n }\n\n this.tippy.setProps({\n getReferenceClientRect: () => posToDOMRect(view, from, to)\n });\n\n this.show();\n\n if (next.open) {\n const { from, to } = this.editor.state.selection;\n const rect = posToDOMRect(this.view, from, to);\n\n this.render().onStart({\n clientRect: () => rect,\n range: { from, to },\n editor: this.editor,\n command: this.command\n });\n } else if (prev && prev.open) {\n this.render().onExit(null);\n }\n }\n\n show() {\n this.tippy.show();\n }\n\n hide() {\n this.tippy.hide();\n }\n\n destroy() {\n this.tippy.destroy();\n this.element.removeEventListener('mousedown', this.mousedownHandler);\n }\n}\n\nexport const FloatingActionsPluginKey = new PluginKey(FLOATING_ACTIONS_MENU_KEYBOARD);\n\nexport const FloatingActionsPlugin = (options: FloatingActionsPluginProps) => {\n return new Plugin({\n key: FloatingActionsPluginKey,\n view: (view) =>\n new FloatingActionsView({ key: FloatingActionsPluginKey, view, ...options }),\n state: {\n /**\n * Init the plugin state\n *\n * @return {*} {PluginState}\n */\n init(): PluginState {\n return {\n open: false\n };\n },\n /**\n * Update the plugin state base on meta information\n *\n * @param {Transaction} transaction\n * @return {*} {PluginState}\n */\n apply(transaction: Transaction): PluginState {\n const transactionMeta = transaction.getMeta(FLOATING_ACTIONS_MENU_KEYBOARD);\n\n if (transactionMeta?.open) {\n return {\n open: transactionMeta?.open\n };\n }\n\n return {\n open: false\n };\n }\n },\n props: {\n /**\n * Catch and handle the keydown in the plugin\n *\n * @param {EditorView} view\n * @param {KeyboardEvent} event\n * @return {*}\n */\n handleKeyDown(view: EditorView, event: KeyboardEvent) {\n const { open, range } = this.getState(view.state);\n if (!open) {\n return false;\n }\n return options.render().onKeyDown({ event, range, view });\n }\n }\n });\n};\n", + "properties": [ + { + "name": "clientRect", + "deprecated": false, + "deprecationMessage": "", + "type": " | null", + "optional": false, + "description": "", + "line": 36 + }, + { + "name": "command", + "deprecated": false, + "deprecationMessage": "", + "type": "function", + "optional": false, + "description": "", + "line": 35 + }, + { + "name": "editor", + "deprecated": false, + "deprecationMessage": "", + "type": "Editor", + "optional": false, + "description": "", + "line": 34 + }, + { + "name": "range", + "deprecated": false, + "deprecationMessage": "", + "type": "Range", + "optional": false, + "description": "", + "line": 33 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "FloatingRenderActions", + "id": "interface-FloatingRenderActions-5887b1f834be48ad8178835b5942a33eea20385add996a499c804bd5effe413095a9641620a759dce23898789983c4601cb71495d98cdc2abd30559acb3a5930", + "file": "libs/block-editor/src/lib/plugins/floating.plugin.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Editor, posToDOMRect, Range } from '@tiptap/core';\nimport { EditorState, Plugin, PluginKey, Transaction } from 'prosemirror-state';\nimport { EditorView } from 'prosemirror-view';\nimport tippy, { Instance, Props } from 'tippy.js';\nimport { SuggestionsCommandProps } from '../extensions/components/suggestions/suggestions.component';\n\ninterface PluginState {\n open: boolean;\n}\n\nexport interface FloatingActionsPluginProps {\n editor: Editor;\n element: HTMLElement;\n tippyOptions?: Partial;\n render?: () => FloatingRenderActions;\n command: ({\n editor,\n range,\n props\n }: {\n editor: Editor;\n range: Range;\n props: SuggestionsCommandProps;\n }) => void;\n}\n\nexport type FloatingActionsViewProps = FloatingActionsPluginProps & {\n view: EditorView;\n key: PluginKey;\n};\n\nexport interface FloatingActionsProps {\n range: Range;\n editor: Editor;\n command: (props: { editor: Editor; range: Range; props: SuggestionsCommandProps }) => void;\n clientRect: (() => DOMRect) | null;\n}\n\nexport interface FloatingActionsKeydownProps {\n view: EditorView;\n event: KeyboardEvent;\n range: Range;\n}\n\nexport interface FloatingRenderActions {\n onStart?: (props: FloatingActionsProps) => void;\n onExit?: (props: FloatingActionsProps) => void;\n onKeyDown?: (props: FloatingActionsKeydownProps) => boolean;\n}\n\nexport const FLOATING_ACTIONS_MENU_KEYBOARD = 'menuFloating';\n\nexport class FloatingActionsView {\n editor: Editor;\n element: HTMLElement;\n view: EditorView;\n tippy!: Instance;\n render: () => FloatingRenderActions;\n command: (props: { editor: Editor; range: Range; props: SuggestionsCommandProps }) => void;\n key: PluginKey;\n invalidNodes = ['codeBlock', 'blockquote'];\n\n constructor({\n editor,\n element,\n view,\n tippyOptions,\n render,\n command,\n key\n }: FloatingActionsViewProps) {\n this.editor = editor;\n this.element = element;\n this.view = view;\n this.element.addEventListener('mousedown', this.mousedownHandler, { capture: true });\n this.editor.on('focus', () => {\n this.tippy.unmount();\n this.update(this.editor.view);\n });\n this.element.style.visibility = 'visible';\n this.render = render;\n this.command = command;\n this.key = key;\n this.createTooltip(tippyOptions);\n }\n\n /**\n * Element mousedown handler to update the plugin state and open\n *\n * @param {MouseEvent} e\n * @memberof FloatingActionsView\n */\n mousedownHandler = (e: MouseEvent): void => {\n e.preventDefault();\n\n const transaction = this.editor.state.tr.setMeta(FLOATING_ACTIONS_MENU_KEYBOARD, {\n open: true\n });\n this.editor.view.dispatch(transaction);\n };\n\n /**\n * Create the tooltip for the element\n *\n * @param {Partial} [options={}]\n * @memberof FloatingActionsView\n */\n createTooltip(options: Partial = {}): void {\n this.tippy = tippy(this.view.dom, {\n duration: 0,\n getReferenceClientRect: null,\n content: this.element,\n interactive: true,\n trigger: 'manual',\n placement: 'left',\n hideOnClick: 'toggle',\n ...options\n });\n }\n\n /**\n * Check the EditorState and based on that modify the DOM\n *\n * @param {EditorView} view\n * @param {EditorState} prevState\n * @return {*} {void}\n * @memberof FloatingActionsView\n */\n update(view: EditorView, prevState?: EditorState): void {\n const { selection } = view.state;\n const { $anchor, empty, from, to } = selection;\n const isRootDepth = $anchor.depth === 1;\n const isNodeEmpty =\n !selection.$anchor.parent.isLeaf && !selection.$anchor.parent.textContent;\n const isActive = isRootDepth && isNodeEmpty;\n const nodeType = $anchor.parent.type.name;\n \n const next = this.key?.getState(view.state);\n const prev = prevState ? this.key?.getState(prevState) : null;\n\n if (!prev?.open && (!empty || !isActive)) {\n this.hide();\n return;\n }\n\n // Hide is Parent node is not the editor\n if (!prev?.open && this.invalidNodes.includes(nodeType)) {\n this.hide();\n return;\n }\n\n this.tippy.setProps({\n getReferenceClientRect: () => posToDOMRect(view, from, to)\n });\n\n this.show();\n\n if (next.open) {\n const { from, to } = this.editor.state.selection;\n const rect = posToDOMRect(this.view, from, to);\n\n this.render().onStart({\n clientRect: () => rect,\n range: { from, to },\n editor: this.editor,\n command: this.command\n });\n } else if (prev && prev.open) {\n this.render().onExit(null);\n }\n }\n\n show() {\n this.tippy.show();\n }\n\n hide() {\n this.tippy.hide();\n }\n\n destroy() {\n this.tippy.destroy();\n this.element.removeEventListener('mousedown', this.mousedownHandler);\n }\n}\n\nexport const FloatingActionsPluginKey = new PluginKey(FLOATING_ACTIONS_MENU_KEYBOARD);\n\nexport const FloatingActionsPlugin = (options: FloatingActionsPluginProps) => {\n return new Plugin({\n key: FloatingActionsPluginKey,\n view: (view) =>\n new FloatingActionsView({ key: FloatingActionsPluginKey, view, ...options }),\n state: {\n /**\n * Init the plugin state\n *\n * @return {*} {PluginState}\n */\n init(): PluginState {\n return {\n open: false\n };\n },\n /**\n * Update the plugin state base on meta information\n *\n * @param {Transaction} transaction\n * @return {*} {PluginState}\n */\n apply(transaction: Transaction): PluginState {\n const transactionMeta = transaction.getMeta(FLOATING_ACTIONS_MENU_KEYBOARD);\n\n if (transactionMeta?.open) {\n return {\n open: transactionMeta?.open\n };\n }\n\n return {\n open: false\n };\n }\n },\n props: {\n /**\n * Catch and handle the keydown in the plugin\n *\n * @param {EditorView} view\n * @param {KeyboardEvent} event\n * @return {*}\n */\n handleKeyDown(view: EditorView, event: KeyboardEvent) {\n const { open, range } = this.getState(view.state);\n if (!open) {\n return false;\n }\n return options.render().onKeyDown({ event, range, view });\n }\n }\n });\n};\n", + "properties": [ + { + "name": "onExit", + "deprecated": false, + "deprecationMessage": "", + "type": "function", + "optional": true, + "description": "", + "line": 47 + }, + { + "name": "onKeyDown", + "deprecated": false, + "deprecationMessage": "", + "type": "function", + "optional": true, + "description": "", + "line": 48 + }, + { + "name": "onStart", + "deprecated": false, + "deprecationMessage": "", + "type": "function", + "optional": true, + "description": "", + "line": 46 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "FooterLabels", + "id": "interface-FooterLabels-ac2570b3d9ad0c3296b3133ef0e205f1864fd1783ceff196c1fd3b261441dd32e5474bea92a58bc4774bde058177c2636f575d880a72b59ad9002b7b55ef5a19", + "file": "apps/dotcms-ui/src/app/shared/models/dot-alert-confirm/footer-labels.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface FooterLabels {\n accept?: string;\n reject?: string;\n}\n", + "properties": [ + { + "name": "accept", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 2 + }, + { + "name": "reject", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 3 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "GCircle", + "id": "interface-GCircle-9d5275d1e46953bce6139cd06cc8004ee1ee5a2482c4ea1c031696cb71dccfc2dd09dc396eed7d36c4ae0180cae703acf50cd3e80b738e2944713f098b5cd738", + "file": "libs/dot-rules/src/lib/models/gcircle.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface GCircle {\n center: { lat: number; lng: number };\n radius: number;\n}\n", + "properties": [ + { + "name": "center", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": false, + "description": "", + "line": 2 + }, + { + "name": "radius", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 3 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "IBundle", + "id": "interface-IBundle-4b4c8c40cbcf13889b0ee16d476b439a59d09a7ea941fff2fa3b376392ea5d9cd91ccd9216cdb1627daede19b441c5eb7e25c07b1b492cdfb9ac9280c252bbfa", + "file": "libs/dot-rules/src/lib/services/bundle-service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { of as observableOf, Observable, Subject } from 'rxjs';\n\nimport { map, mergeMap } from 'rxjs/operators';\nimport { Injectable } from '@angular/core';\n\nimport { ApiRoot } from '@dotcms/dotcms-js';\nimport { CoreWebService } from '@dotcms/dotcms-js';\nimport { HttpResponse } from '@angular/common/http';\n\nexport interface IUser {\n givenName?: string;\n surname?: string;\n roleId?: string;\n userId?: string;\n}\n\nexport interface IBundle {\n name?: string;\n id?: string;\n}\n\nexport interface IPublishEnvironment {\n name?: string;\n id?: string;\n}\n\n@Injectable()\nexport class BundleService {\n bundles$: Subject = new Subject();\n\n private _bundleStoreUrl: string;\n private _loggedUserUrl: string;\n private _addToBundleUrl: string;\n private _pushEnvironementsUrl: string;\n private _pushRuleUrl: string;\n private _environmentsAry: IPublishEnvironment[] = [];\n\n static fromServerBundleTransformFn(data): IBundle[] {\n return data.items || [];\n }\n\n static fromServerEnvironmentTransformFn(data): IPublishEnvironment[] {\n // Endpoint return extra empty environment\n data.shift();\n return data;\n }\n\n constructor(public _apiRoot: ApiRoot, private coreWebService: CoreWebService) {\n this._bundleStoreUrl = `/api/bundle/getunsendbundles/userid`;\n this._loggedUserUrl = `/api/v1/users/current/`;\n this._addToBundleUrl = `/DotAjaxDirector/com.dotcms.publisher.ajax.RemotePublishAjaxAction/cmd/addToBundle`;\n this._pushEnvironementsUrl = `/api/environment/loadenvironments/roleId`;\n this._pushRuleUrl = `/DotAjaxDirector/com.dotcms.publisher.ajax.RemotePublishAjaxAction/cmd/publish`;\n }\n\n /**\n * Get current logged in user\n *\n * @return {*} {Observable}\n * @memberof BundleService\n * @deprecated use getCurrentUser in LoginService\n */\n getLoggedUser(): Observable {\n return this.coreWebService\n .request({\n url: this._loggedUserUrl\n })\n .pipe(map((res: HttpResponse) => res));\n }\n\n loadBundleStores(): void {\n const obs = this._doLoadBundleStores().pipe(\n map((bundles: IBundle[]) => {\n return bundles;\n })\n );\n obs.subscribe((bundles) => this.bundles$.next(bundles));\n }\n\n _doLoadBundleStores(): Observable {\n return this.getLoggedUser().pipe(\n mergeMap((user: IUser) => {\n return this.coreWebService\n .request({\n url: `${this._bundleStoreUrl}/${user.userId}`\n })\n .pipe(map(BundleService.fromServerBundleTransformFn));\n })\n );\n }\n\n loadPublishEnvironments(): Observable {\n let obs: Observable;\n if (this._environmentsAry.length) {\n obs = observableOf(this._environmentsAry);\n } else {\n obs = this._doLoadPublishEnvironments().pipe(\n map((environments: IPublishEnvironment[]) => {\n this._environmentsAry = environments;\n return environments;\n })\n );\n }\n return obs;\n }\n\n _doLoadPublishEnvironments(): Observable {\n return this.getLoggedUser().pipe(\n mergeMap((user: IUser) => {\n return this.coreWebService\n .request({\n url: `${this._pushEnvironementsUrl}/${user.roleId}/?name=0`\n })\n .pipe(map(BundleService.fromServerEnvironmentTransformFn));\n })\n );\n }\n\n addRuleToBundle(\n ruleId: string,\n bundle: IBundle\n ): Observable<{ errorMessages: string[]; total: number; errors: number }> {\n return this.coreWebService\n .request({\n body: `assetIdentifier=${ruleId}&bundleName=${bundle.name}&bundleSelect=${bundle.id}`,\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded'\n },\n method: 'POST',\n url: this._addToBundleUrl\n })\n .pipe(\n map(\n (res: HttpResponse) =>\n <{ errorMessages: string[]; total: number; errors: number }>(res)\n )\n );\n }\n\n pushPublishRule(\n ruleId: string,\n environmentId: string\n ): Observable<{ errorMessages: string[]; total: number; bundleId: string; errors: number }> {\n return this.coreWebService\n .request({\n body: this.getPublishRuleData(ruleId, environmentId),\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded'\n },\n method: 'POST',\n url: this._pushRuleUrl\n })\n .pipe(\n map(\n (res: HttpResponse) => <\n {\n errorMessages: string[];\n total: number;\n bundleId: string;\n errors: number;\n }\n >(res)\n )\n );\n }\n\n private getFormattedDate(date: Date): string {\n const yyyy = date.getFullYear().toString();\n const mm = (date.getMonth() + 1).toString();\n const dd = date.getDate().toString();\n return yyyy + '-' + (mm[1] ? mm : '0' + mm[0]) + '-' + (dd[1] ? dd : '0' + dd[0]);\n }\n\n private getPublishRuleData(ruleId: string, environmentId: string): string {\n let resul = '';\n resul += `assetIdentifier=${ruleId}`;\n resul += `&remotePublishDate=${this.getFormattedDate(new Date())}`;\n resul += '&remotePublishTime=00-00';\n resul += `&remotePublishExpireDate=${this.getFormattedDate(new Date())}`;\n resul += '&remotePublishExpireTime=00-00';\n resul += '&iWantTo=publish';\n resul += `&whoToSend=${environmentId}`;\n resul += '&bundleName=';\n resul += '&bundleSelect=';\n resul += '&forcePush=false';\n return resul;\n }\n}\n", + "properties": [ + { + "name": "id", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 19 + }, + { + "name": "name", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 18 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "ICondition", + "id": "interface-ICondition-8f232ed692d1321772b6574ee6b791326e4fc680e18453769d4a7869b2979ba14e4523f2c8ada062f260edf3547a6b0a32ba1550b39c318f14b24054c04e39a3", + "file": "libs/dot-rules/src/lib/services/Rule.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { from as observableFrom, Subject } from 'rxjs';\n\nimport { mergeMap, reduce, map, tap } from 'rxjs/operators';\n// tslint:disable-next-line:max-file-line-count\nimport { Injectable } from '@angular/core';\nimport { Observable, BehaviorSubject } from 'rxjs';\n\nimport { ApiRoot } from '@dotcms/dotcms-js';\nimport { ServerSideFieldModel, ServerSideTypeModel } from './ServerSideFieldModel';\nimport { CoreWebService } from '@dotcms/dotcms-js';\nimport { SiteService } from '@dotcms/dotcms-js';\nimport { CwError } from '@dotcms/dotcms-js';\nimport { I18nService } from './system/locale/I18n';\nimport { HttpResponse } from '@angular/common/http';\n\nexport const RULE_CREATE = 'RULE_CREATE';\nexport const RULE_DELETE = 'RULE_DELETE';\nexport const RULE_UPDATE_NAME = 'RULE_UPDATE_NAME';\nexport const RULE_UPDATE_ENABLED_STATE = 'RULE_UPDATE_ENABLED_STATE';\n\nexport const V_RULE_UPDATE_EXPANDED_STATE = 'V_RULE_UPDATE_EXPANDED_STATE';\n\nexport const RULE_UPDATE_FIRE_ON = 'RULE_UPDATE_FIRE_ON';\n\nexport const RULE_RULE_ACTION_CREATE = 'RULE_RULE_ACTION_CREATE';\nexport const RULE_RULE_ACTION_DELETE = 'RULE_RULE_ACTION_DELETE';\nexport const RULE_RULE_ACTION_UPDATE_TYPE = 'RULE_RULE_ACTION_UPDATE_TYPE';\nexport const RULE_RULE_ACTION_UPDATE_PARAMETER = 'RULE_RULE_ACTION_UPDATE_PARAMETER';\n\nexport const RULE_CONDITION_GROUP_UPDATE_OPERATOR = 'RULE_CONDITION_GROUP_UPDATE_OPERATOR';\nexport const RULE_CONDITION_GROUP_DELETE = 'RULE_CONDITION_GROUP_DELETE';\nexport const RULE_CONDITION_GROUP_CREATE = 'RULE_CONDITION_GROUP_CREATE';\n\nexport const RULE_CONDITION_CREATE = 'RULE_CONDITION_CREATE';\nexport const RULE_CONDITION_DELETE = 'RULE_CONDITION_DELETE';\nexport const RULE_CONDITION_UPDATE_TYPE = 'RULE_CONDITION_UPDATE_TYPE';\nexport const RULE_CONDITION_UPDATE_PARAMETER = 'RULE_CONDITION_UPDATE_PARAMETER';\nexport const RULE_CONDITION_UPDATE_OPERATOR = 'RULE_CONDITION_UPDATE_OPERATOR';\n\nlet idCounter = 1000;\n// tslint:disable-next-line:only-arrow-functions\nexport function getNextId(): string {\n return 'tempId' + ++idCounter;\n}\n\nexport class RuleEngineState {\n showRules = true;\n globalError: string = null;\n loading = true;\n saving = false;\n hasError = false;\n filter = '';\n deleting = false;\n}\n\nexport interface IRecord {\n _id?: string;\n _saving?: boolean;\n _saved?: boolean;\n deleting?: boolean;\n errors?: any;\n set?(string, any): any;\n}\n\nexport interface IRuleAction extends IRecord {\n id?: string;\n priority: number;\n type?: string;\n parameters?: { [key: string]: any };\n owningRule?: string;\n _owningRule?: RuleModel;\n}\n\nexport interface ICondition extends IRecord {\n id?: string;\n conditionlet?: string;\n type?: string;\n priority?: number;\n operator?: string;\n parameters?: { [key: string]: any };\n _type?: ServerSideTypeModel;\n}\n\nexport interface IConditionGroup extends IRecord {\n id?: string;\n priority: number;\n operator: string;\n conditions?: any;\n}\n\nexport interface IRule extends IRecord {\n _id?: string;\n _expanded?: boolean;\n _ruleActions?: ActionModel[];\n _conditionGroups?: ConditionGroupModel[];\n _ruleActionsLoaded?: boolean;\n _errors?: CwError[];\n _saving?: boolean;\n _saved?: boolean;\n deleting?: boolean;\n id?: string;\n priority?: number;\n name?: string;\n fireOn?: string;\n enabled?: boolean;\n conditionGroups?: any;\n ruleActions?: any;\n set?(string, any): IRule;\n}\n\nexport interface ParameterModel {\n key: string;\n value: string;\n priority: number;\n}\n\nexport class ActionModel extends ServerSideFieldModel {\n owningRule: string;\n _owningRule: RuleModel;\n\n constructor(key: string, type: ServerSideTypeModel, priority = 1) {\n super(key, type, priority);\n this.priority = priority || 1;\n this.type = type;\n }\n\n isValid(): boolean {\n try {\n return super.isValid();\n } catch (e) {\n this.loggerService.error(e);\n }\n }\n}\n\nexport class ConditionModel extends ServerSideFieldModel {\n operator = 'AND';\n conditionlet: string;\n\n constructor(iCondition: ICondition) {\n super(iCondition.id, iCondition._type);\n this.conditionlet = iCondition.conditionlet;\n this.key = iCondition.id;\n this.priority = iCondition.priority || 1;\n this.type = iCondition._type;\n this.operator = iCondition.operator || 'AND';\n }\n\n isValid(): boolean {\n try {\n return !!this.getParameterValue('comparison') && super.isValid();\n } catch (e) {\n this.loggerService.error(e);\n }\n }\n}\n\nexport class ConditionGroupModel {\n key: string;\n priority: number;\n\n operator: string;\n conditions: { [key: string]: boolean };\n _id: string;\n _conditions: ConditionModel[] = [];\n\n constructor(iGroup: IConditionGroup) {\n Object.assign(this, iGroup);\n this.key = iGroup.id;\n this._id = this.key != null ? this.key : getNextId();\n this.conditions = iGroup.conditions || {};\n }\n\n isPersisted(): boolean {\n return this.key != null;\n }\n\n isValid(): boolean {\n const valid = this.operator && (this.operator === 'AND' || this.operator === 'OR');\n return valid;\n }\n}\n\nexport class RuleModel {\n key: string;\n name: string;\n enabled = false;\n priority: number;\n fireOn: string;\n conditionGroups: { [key: string]: ConditionGroupModel } = {};\n ruleActions: { [key: string]: boolean } = {};\n\n _id: string;\n _expanded = false;\n _conditionGroups: ConditionGroupModel[] = [];\n _ruleActions: ActionModel[] = [];\n _saved = true;\n _saving = false;\n _deleting = true;\n _errors: { [key: string]: any };\n\n constructor(iRule: IRule) {\n Object.assign(this, iRule);\n this.key = iRule.id;\n this._id = this.key != null ? this.key : getNextId();\n const conGroups = Object.keys(iRule.conditionGroups || {});\n conGroups.forEach((groupId) => {\n const g = this.conditionGroups[groupId];\n const mg = new ConditionGroupModel(Object.assign({ id: groupId }, g));\n this.conditionGroups[groupId] = mg;\n this._conditionGroups.push(mg);\n });\n }\n\n isPersisted(): boolean {\n return this.key != null;\n }\n\n isValid(): boolean {\n let valid = !!this.name;\n valid = valid && this.name.trim().length > 0;\n return valid;\n }\n}\n\nexport const DEFAULT_RULE: IRule = {\n _conditionGroups: [],\n _expanded: false,\n _id: -1 + '',\n _ruleActions: [],\n conditionGroups: {},\n enabled: false,\n fireOn: 'EVERY_PAGE',\n name: null,\n priority: 1,\n ruleActions: {}\n};\n\n// @dynamic\n@Injectable()\nexport class RuleService {\n get rules(): RuleModel[] {\n return this._rules;\n }\n ruleActionTypes$: BehaviorSubject = new BehaviorSubject([]);\n conditionTypes$: BehaviorSubject = new BehaviorSubject([]);\n\n _ruleActionTypes: { [key: string]: ServerSideTypeModel } = {};\n _conditionTypes: { [key: string]: ServerSideTypeModel } = {};\n\n public _errors$: Subject = new Subject();\n\n protected _actionsEndpointUrl: string;\n // tslint:disable-next-line:no-unused-variable\n protected _ruleActions: { [key: string]: ActionModel } = {};\n // tslint:disable-next-line:no-unused-variable\n protected _conditions: { [key: string]: ConditionModel } = {};\n\n private _rulesEndpointUrl: string;\n private _conditionTypesEndpointUrl: string;\n private _ruleActionTypesEndpointUrl: string;\n\n private _rules$: Subject = new Subject();\n\n private _ruleActionTypesAry: ServerSideTypeModel[] = [];\n private _conditionTypesAry: ServerSideTypeModel[] = [];\n\n private _rules: RuleModel[];\n\n constructor(\n public _apiRoot: ApiRoot,\n private _resources: I18nService,\n private siteService: SiteService,\n private coreWebService: CoreWebService\n ) {\n this._rulesEndpointUrl = `/ruleengine/rules`;\n this._actionsEndpointUrl = `/ruleengine/actions`;\n this._conditionTypesEndpointUrl = `/api/v1/system/ruleengine/conditionlets`;\n this._ruleActionTypesEndpointUrl = `/api/v1/system/ruleengine/actionlets`;\n\n this._preCacheCommonResources(_resources);\n this.loadActionTypes().subscribe(\n (types: ServerSideTypeModel[]) => {\n this.ruleActionTypes$.next(types);\n },\n (err) => {\n this._errors$.next(err);\n }\n );\n this.loadConditionTypes().subscribe(\n (types: ServerSideTypeModel[]) => {\n this.conditionTypes$.next(types);\n },\n (err) => {\n this._errors$.next(err);\n }\n );\n\n this.siteService.switchSite$.subscribe((site) => {\n const siteId = this.loadRulesSiteId();\n if (siteId === site.identifier) {\n this.sendLoadRulesRequest(site.identifier);\n }\n });\n }\n\n static fromServerRulesTransformFn(ruleMap): RuleModel[] {\n return Object.keys(ruleMap).map((id: string) => {\n const r: IRule = ruleMap[id];\n r.id = id;\n return new RuleModel(r);\n });\n }\n\n static fromClientRuleTransformFn(rule: RuleModel): any {\n const sendRule = Object.assign({}, DEFAULT_RULE, rule);\n sendRule.key = rule.key;\n delete sendRule.id;\n sendRule.conditionGroups = {};\n sendRule._conditionGroups.forEach((conditionGroup: ConditionGroupModel) => {\n if (conditionGroup.key) {\n const sendGroup = {\n conditions: {},\n operator: conditionGroup.operator,\n priority: conditionGroup.priority\n };\n conditionGroup._conditions.forEach((condition: ConditionModel) => {\n sendGroup.conditions[condition.key] = true;\n });\n sendRule.conditionGroups[conditionGroup.key] = sendGroup;\n }\n });\n this.removeMeta(sendRule);\n return sendRule;\n }\n\n static removeMeta(entity: any): void {\n Object.keys(entity).forEach((key) => {\n if (key[0] === '_') {\n delete entity[key];\n }\n });\n }\n\n static alphaSort(key): (a, b) => number {\n return (a, b) => {\n let x;\n if (a[key] > b[key]) {\n x = 1;\n } else if (a[key] < b[key]) {\n x = -1;\n } else {\n x = 0;\n }\n return x;\n };\n }\n\n createRule(body: RuleModel): Observable {\n const siteId = this.loadRulesSiteId();\n return this.coreWebService\n .request({\n body: RuleService.fromClientRuleTransformFn(body),\n method: 'POST',\n url: `/api/v1/sites/${siteId}${this._rulesEndpointUrl}`\n })\n .pipe(\n map((result: HttpResponse) => {\n body.key = result['id']; // @todo:ggranum type the POST result correctly.\n return (\n (Object.assign({}, DEFAULT_RULE, body, result))\n );\n })\n );\n }\n\n deleteRule(ruleId: string): Observable<{ success: boolean } | CwError> {\n const siteId = this.loadRulesSiteId();\n return this.coreWebService\n .request({\n method: 'DELETE',\n url: `/api/v1/sites/${siteId}${this._rulesEndpointUrl}/${ruleId}`\n })\n .pipe(\n map((_result) => {\n return { success: true };\n })\n );\n }\n\n loadRules(): Observable {\n return this._rules$.asObservable();\n }\n\n public requestRules(siteId: string): void {\n if (siteId) {\n this.sendLoadRulesRequest(siteId);\n } else if (this.siteService.currentSite) {\n this.sendLoadRulesRequest(this.siteService.currentSite.identifier);\n } else {\n this.siteService.getCurrentSite().subscribe((site) => {\n this.sendLoadRulesRequest(site.identifier);\n });\n }\n }\n\n loadRule(id: string): Observable {\n const siteId = this.loadRulesSiteId();\n return this.coreWebService\n .request({\n url: `/api/v1/sites/${siteId}${this._rulesEndpointUrl}/${id}`\n })\n .pipe(\n map((result) => {\n return (\n (Object.assign({ key: id }, DEFAULT_RULE, result))\n );\n })\n );\n }\n\n updateRule(id: string, rule: RuleModel): Observable {\n let result;\n const siteId = this.loadRulesSiteId();\n if (!id) {\n result = this.createRule(rule);\n } else {\n result = this.coreWebService\n .request({\n body: RuleService.fromClientRuleTransformFn(rule),\n method: 'PUT',\n url: `/api/v1/sites/${siteId}${this._rulesEndpointUrl}/${id}`\n })\n .pipe(\n map((res) => {\n const r = Object.assign({}, DEFAULT_RULE, res);\n r.id = id;\n return r;\n })\n );\n }\n return result;\n }\n\n getConditionTypes(): Observable {\n return this.coreWebService\n .request({\n url: this._conditionTypesEndpointUrl\n })\n .pipe(map(this.fromServerServersideTypesTransformFn));\n }\n\n getRuleActionTypes(): Observable {\n return this.coreWebService\n .request({\n url: this._ruleActionTypesEndpointUrl\n })\n .pipe(map(this.fromServerServersideTypesTransformFn));\n }\n\n _doLoadRuleActionTypes(): Observable {\n return this.coreWebService\n .request({\n url: this._ruleActionTypesEndpointUrl\n })\n .pipe(map(this.fromServerServersideTypesTransformFn));\n }\n\n _doLoadConditionTypes(): Observable {\n return this.coreWebService\n .request({\n url: this._conditionTypesEndpointUrl\n })\n .pipe(map(this.fromServerServersideTypesTransformFn));\n }\n\n private fromServerServersideTypesTransformFn(typesMap): ServerSideTypeModel[] {\n const types = Object.keys(typesMap).map((key: string) => {\n const json: any = typesMap[key];\n json.key = key;\n return ServerSideTypeModel.fromJson(json);\n });\n return types.filter((type) => type.key !== 'CountRulesActionlet');\n }\n\n private _preCacheCommonResources(resources: I18nService): void {\n resources.get('api.sites.ruleengine').subscribe((_rsrc) => {});\n resources.get('api.ruleengine.system').subscribe((_rsrc) => {});\n resources.get('api.system.ruleengine').subscribe((_rsrc) => {});\n }\n\n private sendLoadRulesRequest(siteId: string): void {\n this.coreWebService\n .request({\n url: `/api/v1/sites/${siteId}/ruleengine/rules`\n })\n .subscribe(\n (ruleMap) => {\n this._rules = RuleService.fromServerRulesTransformFn(ruleMap);\n this._rules$.next(this.rules);\n\n return RuleService.fromServerRulesTransformFn(ruleMap);\n },\n (err) => {\n this._errors$.next(err);\n }\n );\n }\n\n private loadActionTypes(): Observable {\n let obs;\n if (this._ruleActionTypesAry.length) {\n obs = observableFrom(this._ruleActionTypesAry);\n } else {\n return this.actionAndConditionTypeLoader(\n this._doLoadRuleActionTypes(),\n this._ruleActionTypes\n );\n }\n return obs;\n }\n\n private actionAndConditionTypeLoader(\n requestObserver: Observable,\n typeMap: any\n ): Observable {\n return requestObserver.pipe(\n mergeMap((types: ServerSideTypeModel[]) => {\n return observableFrom(types).pipe(\n mergeMap((type) => {\n return this._resources.get(type.i18nKey + '.name', type.i18nKey).pipe(\n map((label: string) => {\n type._opt = { value: type.key, label: label };\n return type;\n })\n );\n }),\n reduce((types: any[], type: any) => {\n types.push(type);\n return types;\n }, []),\n tap((typ: any[]) => {\n typ = typ.sort((typeA, typeB) => {\n return typeA._opt.label.localeCompare(typeB._opt.label);\n });\n typ.forEach((type) => {\n typeMap[type.key] = type;\n });\n return typ;\n })\n );\n })\n );\n }\n\n private loadConditionTypes(): Observable {\n let obs;\n if (this._conditionTypesAry.length) {\n obs = observableFrom(this._conditionTypesAry);\n } else {\n return this.actionAndConditionTypeLoader(\n this._doLoadConditionTypes(),\n this._conditionTypes\n );\n }\n return obs;\n }\n\n private getPageIdFromUrl(): string {\n let query;\n\n const hash = document.location.hash;\n\n if (hash.includes('fromCore')) {\n query = hash.substr(hash.indexOf('?') + 1);\n return ApiRoot.parseQueryParam(query, 'realmId');\n } else if (hash.includes('edit-page')) {\n return hash.split('/').pop().split('?')[0];\n }\n return null;\n }\n\n /**\n * Return the Site Id or Page Id for the rules operations.\n * First will check if the realmId parameter is included in the url.\n * If not then search for the current site Id.\n * @returns string\n */\n private loadRulesSiteId(): string {\n let siteId = this.getPageIdFromUrl();\n\n if (!siteId) {\n /**\n * If the realmId parameter is not set get the current Site Id\n */\n siteId = `${this.siteService.currentSite.identifier}`;\n }\n return siteId;\n }\n}\n", + "properties": [ + { + "name": "_type", + "deprecated": false, + "deprecationMessage": "", + "type": "ServerSideTypeModel", + "optional": true, + "description": "", + "line": 81 + }, + { + "name": "conditionlet", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 76 + }, + { + "name": "id", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 75 + }, + { + "name": "operator", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 79 + }, + { + "name": "parameters", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": true, + "description": "", + "line": 80 + }, + { + "name": "priority", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 78 + }, + { + "name": "type", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 77 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [], + "extends": "IRecord" + }, + { + "name": "IConditionGroup", + "id": "interface-IConditionGroup-8f232ed692d1321772b6574ee6b791326e4fc680e18453769d4a7869b2979ba14e4523f2c8ada062f260edf3547a6b0a32ba1550b39c318f14b24054c04e39a3", + "file": "libs/dot-rules/src/lib/services/Rule.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { from as observableFrom, Subject } from 'rxjs';\n\nimport { mergeMap, reduce, map, tap } from 'rxjs/operators';\n// tslint:disable-next-line:max-file-line-count\nimport { Injectable } from '@angular/core';\nimport { Observable, BehaviorSubject } from 'rxjs';\n\nimport { ApiRoot } from '@dotcms/dotcms-js';\nimport { ServerSideFieldModel, ServerSideTypeModel } from './ServerSideFieldModel';\nimport { CoreWebService } from '@dotcms/dotcms-js';\nimport { SiteService } from '@dotcms/dotcms-js';\nimport { CwError } from '@dotcms/dotcms-js';\nimport { I18nService } from './system/locale/I18n';\nimport { HttpResponse } from '@angular/common/http';\n\nexport const RULE_CREATE = 'RULE_CREATE';\nexport const RULE_DELETE = 'RULE_DELETE';\nexport const RULE_UPDATE_NAME = 'RULE_UPDATE_NAME';\nexport const RULE_UPDATE_ENABLED_STATE = 'RULE_UPDATE_ENABLED_STATE';\n\nexport const V_RULE_UPDATE_EXPANDED_STATE = 'V_RULE_UPDATE_EXPANDED_STATE';\n\nexport const RULE_UPDATE_FIRE_ON = 'RULE_UPDATE_FIRE_ON';\n\nexport const RULE_RULE_ACTION_CREATE = 'RULE_RULE_ACTION_CREATE';\nexport const RULE_RULE_ACTION_DELETE = 'RULE_RULE_ACTION_DELETE';\nexport const RULE_RULE_ACTION_UPDATE_TYPE = 'RULE_RULE_ACTION_UPDATE_TYPE';\nexport const RULE_RULE_ACTION_UPDATE_PARAMETER = 'RULE_RULE_ACTION_UPDATE_PARAMETER';\n\nexport const RULE_CONDITION_GROUP_UPDATE_OPERATOR = 'RULE_CONDITION_GROUP_UPDATE_OPERATOR';\nexport const RULE_CONDITION_GROUP_DELETE = 'RULE_CONDITION_GROUP_DELETE';\nexport const RULE_CONDITION_GROUP_CREATE = 'RULE_CONDITION_GROUP_CREATE';\n\nexport const RULE_CONDITION_CREATE = 'RULE_CONDITION_CREATE';\nexport const RULE_CONDITION_DELETE = 'RULE_CONDITION_DELETE';\nexport const RULE_CONDITION_UPDATE_TYPE = 'RULE_CONDITION_UPDATE_TYPE';\nexport const RULE_CONDITION_UPDATE_PARAMETER = 'RULE_CONDITION_UPDATE_PARAMETER';\nexport const RULE_CONDITION_UPDATE_OPERATOR = 'RULE_CONDITION_UPDATE_OPERATOR';\n\nlet idCounter = 1000;\n// tslint:disable-next-line:only-arrow-functions\nexport function getNextId(): string {\n return 'tempId' + ++idCounter;\n}\n\nexport class RuleEngineState {\n showRules = true;\n globalError: string = null;\n loading = true;\n saving = false;\n hasError = false;\n filter = '';\n deleting = false;\n}\n\nexport interface IRecord {\n _id?: string;\n _saving?: boolean;\n _saved?: boolean;\n deleting?: boolean;\n errors?: any;\n set?(string, any): any;\n}\n\nexport interface IRuleAction extends IRecord {\n id?: string;\n priority: number;\n type?: string;\n parameters?: { [key: string]: any };\n owningRule?: string;\n _owningRule?: RuleModel;\n}\n\nexport interface ICondition extends IRecord {\n id?: string;\n conditionlet?: string;\n type?: string;\n priority?: number;\n operator?: string;\n parameters?: { [key: string]: any };\n _type?: ServerSideTypeModel;\n}\n\nexport interface IConditionGroup extends IRecord {\n id?: string;\n priority: number;\n operator: string;\n conditions?: any;\n}\n\nexport interface IRule extends IRecord {\n _id?: string;\n _expanded?: boolean;\n _ruleActions?: ActionModel[];\n _conditionGroups?: ConditionGroupModel[];\n _ruleActionsLoaded?: boolean;\n _errors?: CwError[];\n _saving?: boolean;\n _saved?: boolean;\n deleting?: boolean;\n id?: string;\n priority?: number;\n name?: string;\n fireOn?: string;\n enabled?: boolean;\n conditionGroups?: any;\n ruleActions?: any;\n set?(string, any): IRule;\n}\n\nexport interface ParameterModel {\n key: string;\n value: string;\n priority: number;\n}\n\nexport class ActionModel extends ServerSideFieldModel {\n owningRule: string;\n _owningRule: RuleModel;\n\n constructor(key: string, type: ServerSideTypeModel, priority = 1) {\n super(key, type, priority);\n this.priority = priority || 1;\n this.type = type;\n }\n\n isValid(): boolean {\n try {\n return super.isValid();\n } catch (e) {\n this.loggerService.error(e);\n }\n }\n}\n\nexport class ConditionModel extends ServerSideFieldModel {\n operator = 'AND';\n conditionlet: string;\n\n constructor(iCondition: ICondition) {\n super(iCondition.id, iCondition._type);\n this.conditionlet = iCondition.conditionlet;\n this.key = iCondition.id;\n this.priority = iCondition.priority || 1;\n this.type = iCondition._type;\n this.operator = iCondition.operator || 'AND';\n }\n\n isValid(): boolean {\n try {\n return !!this.getParameterValue('comparison') && super.isValid();\n } catch (e) {\n this.loggerService.error(e);\n }\n }\n}\n\nexport class ConditionGroupModel {\n key: string;\n priority: number;\n\n operator: string;\n conditions: { [key: string]: boolean };\n _id: string;\n _conditions: ConditionModel[] = [];\n\n constructor(iGroup: IConditionGroup) {\n Object.assign(this, iGroup);\n this.key = iGroup.id;\n this._id = this.key != null ? this.key : getNextId();\n this.conditions = iGroup.conditions || {};\n }\n\n isPersisted(): boolean {\n return this.key != null;\n }\n\n isValid(): boolean {\n const valid = this.operator && (this.operator === 'AND' || this.operator === 'OR');\n return valid;\n }\n}\n\nexport class RuleModel {\n key: string;\n name: string;\n enabled = false;\n priority: number;\n fireOn: string;\n conditionGroups: { [key: string]: ConditionGroupModel } = {};\n ruleActions: { [key: string]: boolean } = {};\n\n _id: string;\n _expanded = false;\n _conditionGroups: ConditionGroupModel[] = [];\n _ruleActions: ActionModel[] = [];\n _saved = true;\n _saving = false;\n _deleting = true;\n _errors: { [key: string]: any };\n\n constructor(iRule: IRule) {\n Object.assign(this, iRule);\n this.key = iRule.id;\n this._id = this.key != null ? this.key : getNextId();\n const conGroups = Object.keys(iRule.conditionGroups || {});\n conGroups.forEach((groupId) => {\n const g = this.conditionGroups[groupId];\n const mg = new ConditionGroupModel(Object.assign({ id: groupId }, g));\n this.conditionGroups[groupId] = mg;\n this._conditionGroups.push(mg);\n });\n }\n\n isPersisted(): boolean {\n return this.key != null;\n }\n\n isValid(): boolean {\n let valid = !!this.name;\n valid = valid && this.name.trim().length > 0;\n return valid;\n }\n}\n\nexport const DEFAULT_RULE: IRule = {\n _conditionGroups: [],\n _expanded: false,\n _id: -1 + '',\n _ruleActions: [],\n conditionGroups: {},\n enabled: false,\n fireOn: 'EVERY_PAGE',\n name: null,\n priority: 1,\n ruleActions: {}\n};\n\n// @dynamic\n@Injectable()\nexport class RuleService {\n get rules(): RuleModel[] {\n return this._rules;\n }\n ruleActionTypes$: BehaviorSubject = new BehaviorSubject([]);\n conditionTypes$: BehaviorSubject = new BehaviorSubject([]);\n\n _ruleActionTypes: { [key: string]: ServerSideTypeModel } = {};\n _conditionTypes: { [key: string]: ServerSideTypeModel } = {};\n\n public _errors$: Subject = new Subject();\n\n protected _actionsEndpointUrl: string;\n // tslint:disable-next-line:no-unused-variable\n protected _ruleActions: { [key: string]: ActionModel } = {};\n // tslint:disable-next-line:no-unused-variable\n protected _conditions: { [key: string]: ConditionModel } = {};\n\n private _rulesEndpointUrl: string;\n private _conditionTypesEndpointUrl: string;\n private _ruleActionTypesEndpointUrl: string;\n\n private _rules$: Subject = new Subject();\n\n private _ruleActionTypesAry: ServerSideTypeModel[] = [];\n private _conditionTypesAry: ServerSideTypeModel[] = [];\n\n private _rules: RuleModel[];\n\n constructor(\n public _apiRoot: ApiRoot,\n private _resources: I18nService,\n private siteService: SiteService,\n private coreWebService: CoreWebService\n ) {\n this._rulesEndpointUrl = `/ruleengine/rules`;\n this._actionsEndpointUrl = `/ruleengine/actions`;\n this._conditionTypesEndpointUrl = `/api/v1/system/ruleengine/conditionlets`;\n this._ruleActionTypesEndpointUrl = `/api/v1/system/ruleengine/actionlets`;\n\n this._preCacheCommonResources(_resources);\n this.loadActionTypes().subscribe(\n (types: ServerSideTypeModel[]) => {\n this.ruleActionTypes$.next(types);\n },\n (err) => {\n this._errors$.next(err);\n }\n );\n this.loadConditionTypes().subscribe(\n (types: ServerSideTypeModel[]) => {\n this.conditionTypes$.next(types);\n },\n (err) => {\n this._errors$.next(err);\n }\n );\n\n this.siteService.switchSite$.subscribe((site) => {\n const siteId = this.loadRulesSiteId();\n if (siteId === site.identifier) {\n this.sendLoadRulesRequest(site.identifier);\n }\n });\n }\n\n static fromServerRulesTransformFn(ruleMap): RuleModel[] {\n return Object.keys(ruleMap).map((id: string) => {\n const r: IRule = ruleMap[id];\n r.id = id;\n return new RuleModel(r);\n });\n }\n\n static fromClientRuleTransformFn(rule: RuleModel): any {\n const sendRule = Object.assign({}, DEFAULT_RULE, rule);\n sendRule.key = rule.key;\n delete sendRule.id;\n sendRule.conditionGroups = {};\n sendRule._conditionGroups.forEach((conditionGroup: ConditionGroupModel) => {\n if (conditionGroup.key) {\n const sendGroup = {\n conditions: {},\n operator: conditionGroup.operator,\n priority: conditionGroup.priority\n };\n conditionGroup._conditions.forEach((condition: ConditionModel) => {\n sendGroup.conditions[condition.key] = true;\n });\n sendRule.conditionGroups[conditionGroup.key] = sendGroup;\n }\n });\n this.removeMeta(sendRule);\n return sendRule;\n }\n\n static removeMeta(entity: any): void {\n Object.keys(entity).forEach((key) => {\n if (key[0] === '_') {\n delete entity[key];\n }\n });\n }\n\n static alphaSort(key): (a, b) => number {\n return (a, b) => {\n let x;\n if (a[key] > b[key]) {\n x = 1;\n } else if (a[key] < b[key]) {\n x = -1;\n } else {\n x = 0;\n }\n return x;\n };\n }\n\n createRule(body: RuleModel): Observable {\n const siteId = this.loadRulesSiteId();\n return this.coreWebService\n .request({\n body: RuleService.fromClientRuleTransformFn(body),\n method: 'POST',\n url: `/api/v1/sites/${siteId}${this._rulesEndpointUrl}`\n })\n .pipe(\n map((result: HttpResponse) => {\n body.key = result['id']; // @todo:ggranum type the POST result correctly.\n return (\n (Object.assign({}, DEFAULT_RULE, body, result))\n );\n })\n );\n }\n\n deleteRule(ruleId: string): Observable<{ success: boolean } | CwError> {\n const siteId = this.loadRulesSiteId();\n return this.coreWebService\n .request({\n method: 'DELETE',\n url: `/api/v1/sites/${siteId}${this._rulesEndpointUrl}/${ruleId}`\n })\n .pipe(\n map((_result) => {\n return { success: true };\n })\n );\n }\n\n loadRules(): Observable {\n return this._rules$.asObservable();\n }\n\n public requestRules(siteId: string): void {\n if (siteId) {\n this.sendLoadRulesRequest(siteId);\n } else if (this.siteService.currentSite) {\n this.sendLoadRulesRequest(this.siteService.currentSite.identifier);\n } else {\n this.siteService.getCurrentSite().subscribe((site) => {\n this.sendLoadRulesRequest(site.identifier);\n });\n }\n }\n\n loadRule(id: string): Observable {\n const siteId = this.loadRulesSiteId();\n return this.coreWebService\n .request({\n url: `/api/v1/sites/${siteId}${this._rulesEndpointUrl}/${id}`\n })\n .pipe(\n map((result) => {\n return (\n (Object.assign({ key: id }, DEFAULT_RULE, result))\n );\n })\n );\n }\n\n updateRule(id: string, rule: RuleModel): Observable {\n let result;\n const siteId = this.loadRulesSiteId();\n if (!id) {\n result = this.createRule(rule);\n } else {\n result = this.coreWebService\n .request({\n body: RuleService.fromClientRuleTransformFn(rule),\n method: 'PUT',\n url: `/api/v1/sites/${siteId}${this._rulesEndpointUrl}/${id}`\n })\n .pipe(\n map((res) => {\n const r = Object.assign({}, DEFAULT_RULE, res);\n r.id = id;\n return r;\n })\n );\n }\n return result;\n }\n\n getConditionTypes(): Observable {\n return this.coreWebService\n .request({\n url: this._conditionTypesEndpointUrl\n })\n .pipe(map(this.fromServerServersideTypesTransformFn));\n }\n\n getRuleActionTypes(): Observable {\n return this.coreWebService\n .request({\n url: this._ruleActionTypesEndpointUrl\n })\n .pipe(map(this.fromServerServersideTypesTransformFn));\n }\n\n _doLoadRuleActionTypes(): Observable {\n return this.coreWebService\n .request({\n url: this._ruleActionTypesEndpointUrl\n })\n .pipe(map(this.fromServerServersideTypesTransformFn));\n }\n\n _doLoadConditionTypes(): Observable {\n return this.coreWebService\n .request({\n url: this._conditionTypesEndpointUrl\n })\n .pipe(map(this.fromServerServersideTypesTransformFn));\n }\n\n private fromServerServersideTypesTransformFn(typesMap): ServerSideTypeModel[] {\n const types = Object.keys(typesMap).map((key: string) => {\n const json: any = typesMap[key];\n json.key = key;\n return ServerSideTypeModel.fromJson(json);\n });\n return types.filter((type) => type.key !== 'CountRulesActionlet');\n }\n\n private _preCacheCommonResources(resources: I18nService): void {\n resources.get('api.sites.ruleengine').subscribe((_rsrc) => {});\n resources.get('api.ruleengine.system').subscribe((_rsrc) => {});\n resources.get('api.system.ruleengine').subscribe((_rsrc) => {});\n }\n\n private sendLoadRulesRequest(siteId: string): void {\n this.coreWebService\n .request({\n url: `/api/v1/sites/${siteId}/ruleengine/rules`\n })\n .subscribe(\n (ruleMap) => {\n this._rules = RuleService.fromServerRulesTransformFn(ruleMap);\n this._rules$.next(this.rules);\n\n return RuleService.fromServerRulesTransformFn(ruleMap);\n },\n (err) => {\n this._errors$.next(err);\n }\n );\n }\n\n private loadActionTypes(): Observable {\n let obs;\n if (this._ruleActionTypesAry.length) {\n obs = observableFrom(this._ruleActionTypesAry);\n } else {\n return this.actionAndConditionTypeLoader(\n this._doLoadRuleActionTypes(),\n this._ruleActionTypes\n );\n }\n return obs;\n }\n\n private actionAndConditionTypeLoader(\n requestObserver: Observable,\n typeMap: any\n ): Observable {\n return requestObserver.pipe(\n mergeMap((types: ServerSideTypeModel[]) => {\n return observableFrom(types).pipe(\n mergeMap((type) => {\n return this._resources.get(type.i18nKey + '.name', type.i18nKey).pipe(\n map((label: string) => {\n type._opt = { value: type.key, label: label };\n return type;\n })\n );\n }),\n reduce((types: any[], type: any) => {\n types.push(type);\n return types;\n }, []),\n tap((typ: any[]) => {\n typ = typ.sort((typeA, typeB) => {\n return typeA._opt.label.localeCompare(typeB._opt.label);\n });\n typ.forEach((type) => {\n typeMap[type.key] = type;\n });\n return typ;\n })\n );\n })\n );\n }\n\n private loadConditionTypes(): Observable {\n let obs;\n if (this._conditionTypesAry.length) {\n obs = observableFrom(this._conditionTypesAry);\n } else {\n return this.actionAndConditionTypeLoader(\n this._doLoadConditionTypes(),\n this._conditionTypes\n );\n }\n return obs;\n }\n\n private getPageIdFromUrl(): string {\n let query;\n\n const hash = document.location.hash;\n\n if (hash.includes('fromCore')) {\n query = hash.substr(hash.indexOf('?') + 1);\n return ApiRoot.parseQueryParam(query, 'realmId');\n } else if (hash.includes('edit-page')) {\n return hash.split('/').pop().split('?')[0];\n }\n return null;\n }\n\n /**\n * Return the Site Id or Page Id for the rules operations.\n * First will check if the realmId parameter is included in the url.\n * If not then search for the current site Id.\n * @returns string\n */\n private loadRulesSiteId(): string {\n let siteId = this.getPageIdFromUrl();\n\n if (!siteId) {\n /**\n * If the realmId parameter is not set get the current Site Id\n */\n siteId = `${this.siteService.currentSite.identifier}`;\n }\n return siteId;\n }\n}\n", + "properties": [ + { + "name": "conditions", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": true, + "description": "", + "line": 88 + }, + { + "name": "id", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 85 + }, + { + "name": "operator", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 87 + }, + { + "name": "priority", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 86 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [], + "extends": "IRecord" + }, + { + "name": "INotification", + "id": "interface-INotification-298d87a51f2eec49a4fc71ea86df1a48f5f92427eb13133f6f571cdde4b3b7f1789a8c1d5b6aa585692c042ad0f644a3bfcbec3c57d21b803a86f650d9caa34f", + "file": "apps/dotcms-ui/src/app/shared/models/notifications/notification.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface INotification {\n id: string;\n title: string;\n message: string;\n}\n", + "properties": [ + { + "name": "id", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 2 + }, + { + "name": "message", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 4 + }, + { + "name": "title", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 3 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "IPublishEnvironment", + "id": "interface-IPublishEnvironment-4b4c8c40cbcf13889b0ee16d476b439a59d09a7ea941fff2fa3b376392ea5d9cd91ccd9216cdb1627daede19b441c5eb7e25c07b1b492cdfb9ac9280c252bbfa", + "file": "libs/dot-rules/src/lib/services/bundle-service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { of as observableOf, Observable, Subject } from 'rxjs';\n\nimport { map, mergeMap } from 'rxjs/operators';\nimport { Injectable } from '@angular/core';\n\nimport { ApiRoot } from '@dotcms/dotcms-js';\nimport { CoreWebService } from '@dotcms/dotcms-js';\nimport { HttpResponse } from '@angular/common/http';\n\nexport interface IUser {\n givenName?: string;\n surname?: string;\n roleId?: string;\n userId?: string;\n}\n\nexport interface IBundle {\n name?: string;\n id?: string;\n}\n\nexport interface IPublishEnvironment {\n name?: string;\n id?: string;\n}\n\n@Injectable()\nexport class BundleService {\n bundles$: Subject = new Subject();\n\n private _bundleStoreUrl: string;\n private _loggedUserUrl: string;\n private _addToBundleUrl: string;\n private _pushEnvironementsUrl: string;\n private _pushRuleUrl: string;\n private _environmentsAry: IPublishEnvironment[] = [];\n\n static fromServerBundleTransformFn(data): IBundle[] {\n return data.items || [];\n }\n\n static fromServerEnvironmentTransformFn(data): IPublishEnvironment[] {\n // Endpoint return extra empty environment\n data.shift();\n return data;\n }\n\n constructor(public _apiRoot: ApiRoot, private coreWebService: CoreWebService) {\n this._bundleStoreUrl = `/api/bundle/getunsendbundles/userid`;\n this._loggedUserUrl = `/api/v1/users/current/`;\n this._addToBundleUrl = `/DotAjaxDirector/com.dotcms.publisher.ajax.RemotePublishAjaxAction/cmd/addToBundle`;\n this._pushEnvironementsUrl = `/api/environment/loadenvironments/roleId`;\n this._pushRuleUrl = `/DotAjaxDirector/com.dotcms.publisher.ajax.RemotePublishAjaxAction/cmd/publish`;\n }\n\n /**\n * Get current logged in user\n *\n * @return {*} {Observable}\n * @memberof BundleService\n * @deprecated use getCurrentUser in LoginService\n */\n getLoggedUser(): Observable {\n return this.coreWebService\n .request({\n url: this._loggedUserUrl\n })\n .pipe(map((res: HttpResponse) => res));\n }\n\n loadBundleStores(): void {\n const obs = this._doLoadBundleStores().pipe(\n map((bundles: IBundle[]) => {\n return bundles;\n })\n );\n obs.subscribe((bundles) => this.bundles$.next(bundles));\n }\n\n _doLoadBundleStores(): Observable {\n return this.getLoggedUser().pipe(\n mergeMap((user: IUser) => {\n return this.coreWebService\n .request({\n url: `${this._bundleStoreUrl}/${user.userId}`\n })\n .pipe(map(BundleService.fromServerBundleTransformFn));\n })\n );\n }\n\n loadPublishEnvironments(): Observable {\n let obs: Observable;\n if (this._environmentsAry.length) {\n obs = observableOf(this._environmentsAry);\n } else {\n obs = this._doLoadPublishEnvironments().pipe(\n map((environments: IPublishEnvironment[]) => {\n this._environmentsAry = environments;\n return environments;\n })\n );\n }\n return obs;\n }\n\n _doLoadPublishEnvironments(): Observable {\n return this.getLoggedUser().pipe(\n mergeMap((user: IUser) => {\n return this.coreWebService\n .request({\n url: `${this._pushEnvironementsUrl}/${user.roleId}/?name=0`\n })\n .pipe(map(BundleService.fromServerEnvironmentTransformFn));\n })\n );\n }\n\n addRuleToBundle(\n ruleId: string,\n bundle: IBundle\n ): Observable<{ errorMessages: string[]; total: number; errors: number }> {\n return this.coreWebService\n .request({\n body: `assetIdentifier=${ruleId}&bundleName=${bundle.name}&bundleSelect=${bundle.id}`,\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded'\n },\n method: 'POST',\n url: this._addToBundleUrl\n })\n .pipe(\n map(\n (res: HttpResponse) =>\n <{ errorMessages: string[]; total: number; errors: number }>(res)\n )\n );\n }\n\n pushPublishRule(\n ruleId: string,\n environmentId: string\n ): Observable<{ errorMessages: string[]; total: number; bundleId: string; errors: number }> {\n return this.coreWebService\n .request({\n body: this.getPublishRuleData(ruleId, environmentId),\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded'\n },\n method: 'POST',\n url: this._pushRuleUrl\n })\n .pipe(\n map(\n (res: HttpResponse) => <\n {\n errorMessages: string[];\n total: number;\n bundleId: string;\n errors: number;\n }\n >(res)\n )\n );\n }\n\n private getFormattedDate(date: Date): string {\n const yyyy = date.getFullYear().toString();\n const mm = (date.getMonth() + 1).toString();\n const dd = date.getDate().toString();\n return yyyy + '-' + (mm[1] ? mm : '0' + mm[0]) + '-' + (dd[1] ? dd : '0' + dd[0]);\n }\n\n private getPublishRuleData(ruleId: string, environmentId: string): string {\n let resul = '';\n resul += `assetIdentifier=${ruleId}`;\n resul += `&remotePublishDate=${this.getFormattedDate(new Date())}`;\n resul += '&remotePublishTime=00-00';\n resul += `&remotePublishExpireDate=${this.getFormattedDate(new Date())}`;\n resul += '&remotePublishExpireTime=00-00';\n resul += '&iWantTo=publish';\n resul += `&whoToSend=${environmentId}`;\n resul += '&bundleName=';\n resul += '&bundleSelect=';\n resul += '&forcePush=false';\n return resul;\n }\n}\n", + "properties": [ + { + "name": "id", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 24 + }, + { + "name": "name", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 23 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "IRecord", + "id": "interface-IRecord-8f232ed692d1321772b6574ee6b791326e4fc680e18453769d4a7869b2979ba14e4523f2c8ada062f260edf3547a6b0a32ba1550b39c318f14b24054c04e39a3", + "file": "libs/dot-rules/src/lib/services/Rule.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { from as observableFrom, Subject } from 'rxjs';\n\nimport { mergeMap, reduce, map, tap } from 'rxjs/operators';\n// tslint:disable-next-line:max-file-line-count\nimport { Injectable } from '@angular/core';\nimport { Observable, BehaviorSubject } from 'rxjs';\n\nimport { ApiRoot } from '@dotcms/dotcms-js';\nimport { ServerSideFieldModel, ServerSideTypeModel } from './ServerSideFieldModel';\nimport { CoreWebService } from '@dotcms/dotcms-js';\nimport { SiteService } from '@dotcms/dotcms-js';\nimport { CwError } from '@dotcms/dotcms-js';\nimport { I18nService } from './system/locale/I18n';\nimport { HttpResponse } from '@angular/common/http';\n\nexport const RULE_CREATE = 'RULE_CREATE';\nexport const RULE_DELETE = 'RULE_DELETE';\nexport const RULE_UPDATE_NAME = 'RULE_UPDATE_NAME';\nexport const RULE_UPDATE_ENABLED_STATE = 'RULE_UPDATE_ENABLED_STATE';\n\nexport const V_RULE_UPDATE_EXPANDED_STATE = 'V_RULE_UPDATE_EXPANDED_STATE';\n\nexport const RULE_UPDATE_FIRE_ON = 'RULE_UPDATE_FIRE_ON';\n\nexport const RULE_RULE_ACTION_CREATE = 'RULE_RULE_ACTION_CREATE';\nexport const RULE_RULE_ACTION_DELETE = 'RULE_RULE_ACTION_DELETE';\nexport const RULE_RULE_ACTION_UPDATE_TYPE = 'RULE_RULE_ACTION_UPDATE_TYPE';\nexport const RULE_RULE_ACTION_UPDATE_PARAMETER = 'RULE_RULE_ACTION_UPDATE_PARAMETER';\n\nexport const RULE_CONDITION_GROUP_UPDATE_OPERATOR = 'RULE_CONDITION_GROUP_UPDATE_OPERATOR';\nexport const RULE_CONDITION_GROUP_DELETE = 'RULE_CONDITION_GROUP_DELETE';\nexport const RULE_CONDITION_GROUP_CREATE = 'RULE_CONDITION_GROUP_CREATE';\n\nexport const RULE_CONDITION_CREATE = 'RULE_CONDITION_CREATE';\nexport const RULE_CONDITION_DELETE = 'RULE_CONDITION_DELETE';\nexport const RULE_CONDITION_UPDATE_TYPE = 'RULE_CONDITION_UPDATE_TYPE';\nexport const RULE_CONDITION_UPDATE_PARAMETER = 'RULE_CONDITION_UPDATE_PARAMETER';\nexport const RULE_CONDITION_UPDATE_OPERATOR = 'RULE_CONDITION_UPDATE_OPERATOR';\n\nlet idCounter = 1000;\n// tslint:disable-next-line:only-arrow-functions\nexport function getNextId(): string {\n return 'tempId' + ++idCounter;\n}\n\nexport class RuleEngineState {\n showRules = true;\n globalError: string = null;\n loading = true;\n saving = false;\n hasError = false;\n filter = '';\n deleting = false;\n}\n\nexport interface IRecord {\n _id?: string;\n _saving?: boolean;\n _saved?: boolean;\n deleting?: boolean;\n errors?: any;\n set?(string, any): any;\n}\n\nexport interface IRuleAction extends IRecord {\n id?: string;\n priority: number;\n type?: string;\n parameters?: { [key: string]: any };\n owningRule?: string;\n _owningRule?: RuleModel;\n}\n\nexport interface ICondition extends IRecord {\n id?: string;\n conditionlet?: string;\n type?: string;\n priority?: number;\n operator?: string;\n parameters?: { [key: string]: any };\n _type?: ServerSideTypeModel;\n}\n\nexport interface IConditionGroup extends IRecord {\n id?: string;\n priority: number;\n operator: string;\n conditions?: any;\n}\n\nexport interface IRule extends IRecord {\n _id?: string;\n _expanded?: boolean;\n _ruleActions?: ActionModel[];\n _conditionGroups?: ConditionGroupModel[];\n _ruleActionsLoaded?: boolean;\n _errors?: CwError[];\n _saving?: boolean;\n _saved?: boolean;\n deleting?: boolean;\n id?: string;\n priority?: number;\n name?: string;\n fireOn?: string;\n enabled?: boolean;\n conditionGroups?: any;\n ruleActions?: any;\n set?(string, any): IRule;\n}\n\nexport interface ParameterModel {\n key: string;\n value: string;\n priority: number;\n}\n\nexport class ActionModel extends ServerSideFieldModel {\n owningRule: string;\n _owningRule: RuleModel;\n\n constructor(key: string, type: ServerSideTypeModel, priority = 1) {\n super(key, type, priority);\n this.priority = priority || 1;\n this.type = type;\n }\n\n isValid(): boolean {\n try {\n return super.isValid();\n } catch (e) {\n this.loggerService.error(e);\n }\n }\n}\n\nexport class ConditionModel extends ServerSideFieldModel {\n operator = 'AND';\n conditionlet: string;\n\n constructor(iCondition: ICondition) {\n super(iCondition.id, iCondition._type);\n this.conditionlet = iCondition.conditionlet;\n this.key = iCondition.id;\n this.priority = iCondition.priority || 1;\n this.type = iCondition._type;\n this.operator = iCondition.operator || 'AND';\n }\n\n isValid(): boolean {\n try {\n return !!this.getParameterValue('comparison') && super.isValid();\n } catch (e) {\n this.loggerService.error(e);\n }\n }\n}\n\nexport class ConditionGroupModel {\n key: string;\n priority: number;\n\n operator: string;\n conditions: { [key: string]: boolean };\n _id: string;\n _conditions: ConditionModel[] = [];\n\n constructor(iGroup: IConditionGroup) {\n Object.assign(this, iGroup);\n this.key = iGroup.id;\n this._id = this.key != null ? this.key : getNextId();\n this.conditions = iGroup.conditions || {};\n }\n\n isPersisted(): boolean {\n return this.key != null;\n }\n\n isValid(): boolean {\n const valid = this.operator && (this.operator === 'AND' || this.operator === 'OR');\n return valid;\n }\n}\n\nexport class RuleModel {\n key: string;\n name: string;\n enabled = false;\n priority: number;\n fireOn: string;\n conditionGroups: { [key: string]: ConditionGroupModel } = {};\n ruleActions: { [key: string]: boolean } = {};\n\n _id: string;\n _expanded = false;\n _conditionGroups: ConditionGroupModel[] = [];\n _ruleActions: ActionModel[] = [];\n _saved = true;\n _saving = false;\n _deleting = true;\n _errors: { [key: string]: any };\n\n constructor(iRule: IRule) {\n Object.assign(this, iRule);\n this.key = iRule.id;\n this._id = this.key != null ? this.key : getNextId();\n const conGroups = Object.keys(iRule.conditionGroups || {});\n conGroups.forEach((groupId) => {\n const g = this.conditionGroups[groupId];\n const mg = new ConditionGroupModel(Object.assign({ id: groupId }, g));\n this.conditionGroups[groupId] = mg;\n this._conditionGroups.push(mg);\n });\n }\n\n isPersisted(): boolean {\n return this.key != null;\n }\n\n isValid(): boolean {\n let valid = !!this.name;\n valid = valid && this.name.trim().length > 0;\n return valid;\n }\n}\n\nexport const DEFAULT_RULE: IRule = {\n _conditionGroups: [],\n _expanded: false,\n _id: -1 + '',\n _ruleActions: [],\n conditionGroups: {},\n enabled: false,\n fireOn: 'EVERY_PAGE',\n name: null,\n priority: 1,\n ruleActions: {}\n};\n\n// @dynamic\n@Injectable()\nexport class RuleService {\n get rules(): RuleModel[] {\n return this._rules;\n }\n ruleActionTypes$: BehaviorSubject = new BehaviorSubject([]);\n conditionTypes$: BehaviorSubject = new BehaviorSubject([]);\n\n _ruleActionTypes: { [key: string]: ServerSideTypeModel } = {};\n _conditionTypes: { [key: string]: ServerSideTypeModel } = {};\n\n public _errors$: Subject = new Subject();\n\n protected _actionsEndpointUrl: string;\n // tslint:disable-next-line:no-unused-variable\n protected _ruleActions: { [key: string]: ActionModel } = {};\n // tslint:disable-next-line:no-unused-variable\n protected _conditions: { [key: string]: ConditionModel } = {};\n\n private _rulesEndpointUrl: string;\n private _conditionTypesEndpointUrl: string;\n private _ruleActionTypesEndpointUrl: string;\n\n private _rules$: Subject = new Subject();\n\n private _ruleActionTypesAry: ServerSideTypeModel[] = [];\n private _conditionTypesAry: ServerSideTypeModel[] = [];\n\n private _rules: RuleModel[];\n\n constructor(\n public _apiRoot: ApiRoot,\n private _resources: I18nService,\n private siteService: SiteService,\n private coreWebService: CoreWebService\n ) {\n this._rulesEndpointUrl = `/ruleengine/rules`;\n this._actionsEndpointUrl = `/ruleengine/actions`;\n this._conditionTypesEndpointUrl = `/api/v1/system/ruleengine/conditionlets`;\n this._ruleActionTypesEndpointUrl = `/api/v1/system/ruleengine/actionlets`;\n\n this._preCacheCommonResources(_resources);\n this.loadActionTypes().subscribe(\n (types: ServerSideTypeModel[]) => {\n this.ruleActionTypes$.next(types);\n },\n (err) => {\n this._errors$.next(err);\n }\n );\n this.loadConditionTypes().subscribe(\n (types: ServerSideTypeModel[]) => {\n this.conditionTypes$.next(types);\n },\n (err) => {\n this._errors$.next(err);\n }\n );\n\n this.siteService.switchSite$.subscribe((site) => {\n const siteId = this.loadRulesSiteId();\n if (siteId === site.identifier) {\n this.sendLoadRulesRequest(site.identifier);\n }\n });\n }\n\n static fromServerRulesTransformFn(ruleMap): RuleModel[] {\n return Object.keys(ruleMap).map((id: string) => {\n const r: IRule = ruleMap[id];\n r.id = id;\n return new RuleModel(r);\n });\n }\n\n static fromClientRuleTransformFn(rule: RuleModel): any {\n const sendRule = Object.assign({}, DEFAULT_RULE, rule);\n sendRule.key = rule.key;\n delete sendRule.id;\n sendRule.conditionGroups = {};\n sendRule._conditionGroups.forEach((conditionGroup: ConditionGroupModel) => {\n if (conditionGroup.key) {\n const sendGroup = {\n conditions: {},\n operator: conditionGroup.operator,\n priority: conditionGroup.priority\n };\n conditionGroup._conditions.forEach((condition: ConditionModel) => {\n sendGroup.conditions[condition.key] = true;\n });\n sendRule.conditionGroups[conditionGroup.key] = sendGroup;\n }\n });\n this.removeMeta(sendRule);\n return sendRule;\n }\n\n static removeMeta(entity: any): void {\n Object.keys(entity).forEach((key) => {\n if (key[0] === '_') {\n delete entity[key];\n }\n });\n }\n\n static alphaSort(key): (a, b) => number {\n return (a, b) => {\n let x;\n if (a[key] > b[key]) {\n x = 1;\n } else if (a[key] < b[key]) {\n x = -1;\n } else {\n x = 0;\n }\n return x;\n };\n }\n\n createRule(body: RuleModel): Observable {\n const siteId = this.loadRulesSiteId();\n return this.coreWebService\n .request({\n body: RuleService.fromClientRuleTransformFn(body),\n method: 'POST',\n url: `/api/v1/sites/${siteId}${this._rulesEndpointUrl}`\n })\n .pipe(\n map((result: HttpResponse) => {\n body.key = result['id']; // @todo:ggranum type the POST result correctly.\n return (\n (Object.assign({}, DEFAULT_RULE, body, result))\n );\n })\n );\n }\n\n deleteRule(ruleId: string): Observable<{ success: boolean } | CwError> {\n const siteId = this.loadRulesSiteId();\n return this.coreWebService\n .request({\n method: 'DELETE',\n url: `/api/v1/sites/${siteId}${this._rulesEndpointUrl}/${ruleId}`\n })\n .pipe(\n map((_result) => {\n return { success: true };\n })\n );\n }\n\n loadRules(): Observable {\n return this._rules$.asObservable();\n }\n\n public requestRules(siteId: string): void {\n if (siteId) {\n this.sendLoadRulesRequest(siteId);\n } else if (this.siteService.currentSite) {\n this.sendLoadRulesRequest(this.siteService.currentSite.identifier);\n } else {\n this.siteService.getCurrentSite().subscribe((site) => {\n this.sendLoadRulesRequest(site.identifier);\n });\n }\n }\n\n loadRule(id: string): Observable {\n const siteId = this.loadRulesSiteId();\n return this.coreWebService\n .request({\n url: `/api/v1/sites/${siteId}${this._rulesEndpointUrl}/${id}`\n })\n .pipe(\n map((result) => {\n return (\n (Object.assign({ key: id }, DEFAULT_RULE, result))\n );\n })\n );\n }\n\n updateRule(id: string, rule: RuleModel): Observable {\n let result;\n const siteId = this.loadRulesSiteId();\n if (!id) {\n result = this.createRule(rule);\n } else {\n result = this.coreWebService\n .request({\n body: RuleService.fromClientRuleTransformFn(rule),\n method: 'PUT',\n url: `/api/v1/sites/${siteId}${this._rulesEndpointUrl}/${id}`\n })\n .pipe(\n map((res) => {\n const r = Object.assign({}, DEFAULT_RULE, res);\n r.id = id;\n return r;\n })\n );\n }\n return result;\n }\n\n getConditionTypes(): Observable {\n return this.coreWebService\n .request({\n url: this._conditionTypesEndpointUrl\n })\n .pipe(map(this.fromServerServersideTypesTransformFn));\n }\n\n getRuleActionTypes(): Observable {\n return this.coreWebService\n .request({\n url: this._ruleActionTypesEndpointUrl\n })\n .pipe(map(this.fromServerServersideTypesTransformFn));\n }\n\n _doLoadRuleActionTypes(): Observable {\n return this.coreWebService\n .request({\n url: this._ruleActionTypesEndpointUrl\n })\n .pipe(map(this.fromServerServersideTypesTransformFn));\n }\n\n _doLoadConditionTypes(): Observable {\n return this.coreWebService\n .request({\n url: this._conditionTypesEndpointUrl\n })\n .pipe(map(this.fromServerServersideTypesTransformFn));\n }\n\n private fromServerServersideTypesTransformFn(typesMap): ServerSideTypeModel[] {\n const types = Object.keys(typesMap).map((key: string) => {\n const json: any = typesMap[key];\n json.key = key;\n return ServerSideTypeModel.fromJson(json);\n });\n return types.filter((type) => type.key !== 'CountRulesActionlet');\n }\n\n private _preCacheCommonResources(resources: I18nService): void {\n resources.get('api.sites.ruleengine').subscribe((_rsrc) => {});\n resources.get('api.ruleengine.system').subscribe((_rsrc) => {});\n resources.get('api.system.ruleengine').subscribe((_rsrc) => {});\n }\n\n private sendLoadRulesRequest(siteId: string): void {\n this.coreWebService\n .request({\n url: `/api/v1/sites/${siteId}/ruleengine/rules`\n })\n .subscribe(\n (ruleMap) => {\n this._rules = RuleService.fromServerRulesTransformFn(ruleMap);\n this._rules$.next(this.rules);\n\n return RuleService.fromServerRulesTransformFn(ruleMap);\n },\n (err) => {\n this._errors$.next(err);\n }\n );\n }\n\n private loadActionTypes(): Observable {\n let obs;\n if (this._ruleActionTypesAry.length) {\n obs = observableFrom(this._ruleActionTypesAry);\n } else {\n return this.actionAndConditionTypeLoader(\n this._doLoadRuleActionTypes(),\n this._ruleActionTypes\n );\n }\n return obs;\n }\n\n private actionAndConditionTypeLoader(\n requestObserver: Observable,\n typeMap: any\n ): Observable {\n return requestObserver.pipe(\n mergeMap((types: ServerSideTypeModel[]) => {\n return observableFrom(types).pipe(\n mergeMap((type) => {\n return this._resources.get(type.i18nKey + '.name', type.i18nKey).pipe(\n map((label: string) => {\n type._opt = { value: type.key, label: label };\n return type;\n })\n );\n }),\n reduce((types: any[], type: any) => {\n types.push(type);\n return types;\n }, []),\n tap((typ: any[]) => {\n typ = typ.sort((typeA, typeB) => {\n return typeA._opt.label.localeCompare(typeB._opt.label);\n });\n typ.forEach((type) => {\n typeMap[type.key] = type;\n });\n return typ;\n })\n );\n })\n );\n }\n\n private loadConditionTypes(): Observable {\n let obs;\n if (this._conditionTypesAry.length) {\n obs = observableFrom(this._conditionTypesAry);\n } else {\n return this.actionAndConditionTypeLoader(\n this._doLoadConditionTypes(),\n this._conditionTypes\n );\n }\n return obs;\n }\n\n private getPageIdFromUrl(): string {\n let query;\n\n const hash = document.location.hash;\n\n if (hash.includes('fromCore')) {\n query = hash.substr(hash.indexOf('?') + 1);\n return ApiRoot.parseQueryParam(query, 'realmId');\n } else if (hash.includes('edit-page')) {\n return hash.split('/').pop().split('?')[0];\n }\n return null;\n }\n\n /**\n * Return the Site Id or Page Id for the rules operations.\n * First will check if the realmId parameter is included in the url.\n * If not then search for the current site Id.\n * @returns string\n */\n private loadRulesSiteId(): string {\n let siteId = this.getPageIdFromUrl();\n\n if (!siteId) {\n /**\n * If the realmId parameter is not set get the current Site Id\n */\n siteId = `${this.siteService.currentSite.identifier}`;\n }\n return siteId;\n }\n}\n", + "properties": [ + { + "name": "_id", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 57 + }, + { + "name": "_saved", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 59 + }, + { + "name": "_saving", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 58 + }, + { + "name": "deleting", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 60 + }, + { + "name": "errors", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": true, + "description": "", + "line": 61 + } + ], + "indexSignatures": [], + "kind": 167, + "methods": [ + { + "name": "set", + "args": [ + { + "name": "string", + "type": "", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "any", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": true, + "returnType": "any", + "typeParameters": [], + "line": 62, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "string", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "any", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ] + }, + { + "name": "IRule", + "id": "interface-IRule-8f232ed692d1321772b6574ee6b791326e4fc680e18453769d4a7869b2979ba14e4523f2c8ada062f260edf3547a6b0a32ba1550b39c318f14b24054c04e39a3", + "file": "libs/dot-rules/src/lib/services/Rule.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { from as observableFrom, Subject } from 'rxjs';\n\nimport { mergeMap, reduce, map, tap } from 'rxjs/operators';\n// tslint:disable-next-line:max-file-line-count\nimport { Injectable } from '@angular/core';\nimport { Observable, BehaviorSubject } from 'rxjs';\n\nimport { ApiRoot } from '@dotcms/dotcms-js';\nimport { ServerSideFieldModel, ServerSideTypeModel } from './ServerSideFieldModel';\nimport { CoreWebService } from '@dotcms/dotcms-js';\nimport { SiteService } from '@dotcms/dotcms-js';\nimport { CwError } from '@dotcms/dotcms-js';\nimport { I18nService } from './system/locale/I18n';\nimport { HttpResponse } from '@angular/common/http';\n\nexport const RULE_CREATE = 'RULE_CREATE';\nexport const RULE_DELETE = 'RULE_DELETE';\nexport const RULE_UPDATE_NAME = 'RULE_UPDATE_NAME';\nexport const RULE_UPDATE_ENABLED_STATE = 'RULE_UPDATE_ENABLED_STATE';\n\nexport const V_RULE_UPDATE_EXPANDED_STATE = 'V_RULE_UPDATE_EXPANDED_STATE';\n\nexport const RULE_UPDATE_FIRE_ON = 'RULE_UPDATE_FIRE_ON';\n\nexport const RULE_RULE_ACTION_CREATE = 'RULE_RULE_ACTION_CREATE';\nexport const RULE_RULE_ACTION_DELETE = 'RULE_RULE_ACTION_DELETE';\nexport const RULE_RULE_ACTION_UPDATE_TYPE = 'RULE_RULE_ACTION_UPDATE_TYPE';\nexport const RULE_RULE_ACTION_UPDATE_PARAMETER = 'RULE_RULE_ACTION_UPDATE_PARAMETER';\n\nexport const RULE_CONDITION_GROUP_UPDATE_OPERATOR = 'RULE_CONDITION_GROUP_UPDATE_OPERATOR';\nexport const RULE_CONDITION_GROUP_DELETE = 'RULE_CONDITION_GROUP_DELETE';\nexport const RULE_CONDITION_GROUP_CREATE = 'RULE_CONDITION_GROUP_CREATE';\n\nexport const RULE_CONDITION_CREATE = 'RULE_CONDITION_CREATE';\nexport const RULE_CONDITION_DELETE = 'RULE_CONDITION_DELETE';\nexport const RULE_CONDITION_UPDATE_TYPE = 'RULE_CONDITION_UPDATE_TYPE';\nexport const RULE_CONDITION_UPDATE_PARAMETER = 'RULE_CONDITION_UPDATE_PARAMETER';\nexport const RULE_CONDITION_UPDATE_OPERATOR = 'RULE_CONDITION_UPDATE_OPERATOR';\n\nlet idCounter = 1000;\n// tslint:disable-next-line:only-arrow-functions\nexport function getNextId(): string {\n return 'tempId' + ++idCounter;\n}\n\nexport class RuleEngineState {\n showRules = true;\n globalError: string = null;\n loading = true;\n saving = false;\n hasError = false;\n filter = '';\n deleting = false;\n}\n\nexport interface IRecord {\n _id?: string;\n _saving?: boolean;\n _saved?: boolean;\n deleting?: boolean;\n errors?: any;\n set?(string, any): any;\n}\n\nexport interface IRuleAction extends IRecord {\n id?: string;\n priority: number;\n type?: string;\n parameters?: { [key: string]: any };\n owningRule?: string;\n _owningRule?: RuleModel;\n}\n\nexport interface ICondition extends IRecord {\n id?: string;\n conditionlet?: string;\n type?: string;\n priority?: number;\n operator?: string;\n parameters?: { [key: string]: any };\n _type?: ServerSideTypeModel;\n}\n\nexport interface IConditionGroup extends IRecord {\n id?: string;\n priority: number;\n operator: string;\n conditions?: any;\n}\n\nexport interface IRule extends IRecord {\n _id?: string;\n _expanded?: boolean;\n _ruleActions?: ActionModel[];\n _conditionGroups?: ConditionGroupModel[];\n _ruleActionsLoaded?: boolean;\n _errors?: CwError[];\n _saving?: boolean;\n _saved?: boolean;\n deleting?: boolean;\n id?: string;\n priority?: number;\n name?: string;\n fireOn?: string;\n enabled?: boolean;\n conditionGroups?: any;\n ruleActions?: any;\n set?(string, any): IRule;\n}\n\nexport interface ParameterModel {\n key: string;\n value: string;\n priority: number;\n}\n\nexport class ActionModel extends ServerSideFieldModel {\n owningRule: string;\n _owningRule: RuleModel;\n\n constructor(key: string, type: ServerSideTypeModel, priority = 1) {\n super(key, type, priority);\n this.priority = priority || 1;\n this.type = type;\n }\n\n isValid(): boolean {\n try {\n return super.isValid();\n } catch (e) {\n this.loggerService.error(e);\n }\n }\n}\n\nexport class ConditionModel extends ServerSideFieldModel {\n operator = 'AND';\n conditionlet: string;\n\n constructor(iCondition: ICondition) {\n super(iCondition.id, iCondition._type);\n this.conditionlet = iCondition.conditionlet;\n this.key = iCondition.id;\n this.priority = iCondition.priority || 1;\n this.type = iCondition._type;\n this.operator = iCondition.operator || 'AND';\n }\n\n isValid(): boolean {\n try {\n return !!this.getParameterValue('comparison') && super.isValid();\n } catch (e) {\n this.loggerService.error(e);\n }\n }\n}\n\nexport class ConditionGroupModel {\n key: string;\n priority: number;\n\n operator: string;\n conditions: { [key: string]: boolean };\n _id: string;\n _conditions: ConditionModel[] = [];\n\n constructor(iGroup: IConditionGroup) {\n Object.assign(this, iGroup);\n this.key = iGroup.id;\n this._id = this.key != null ? this.key : getNextId();\n this.conditions = iGroup.conditions || {};\n }\n\n isPersisted(): boolean {\n return this.key != null;\n }\n\n isValid(): boolean {\n const valid = this.operator && (this.operator === 'AND' || this.operator === 'OR');\n return valid;\n }\n}\n\nexport class RuleModel {\n key: string;\n name: string;\n enabled = false;\n priority: number;\n fireOn: string;\n conditionGroups: { [key: string]: ConditionGroupModel } = {};\n ruleActions: { [key: string]: boolean } = {};\n\n _id: string;\n _expanded = false;\n _conditionGroups: ConditionGroupModel[] = [];\n _ruleActions: ActionModel[] = [];\n _saved = true;\n _saving = false;\n _deleting = true;\n _errors: { [key: string]: any };\n\n constructor(iRule: IRule) {\n Object.assign(this, iRule);\n this.key = iRule.id;\n this._id = this.key != null ? this.key : getNextId();\n const conGroups = Object.keys(iRule.conditionGroups || {});\n conGroups.forEach((groupId) => {\n const g = this.conditionGroups[groupId];\n const mg = new ConditionGroupModel(Object.assign({ id: groupId }, g));\n this.conditionGroups[groupId] = mg;\n this._conditionGroups.push(mg);\n });\n }\n\n isPersisted(): boolean {\n return this.key != null;\n }\n\n isValid(): boolean {\n let valid = !!this.name;\n valid = valid && this.name.trim().length > 0;\n return valid;\n }\n}\n\nexport const DEFAULT_RULE: IRule = {\n _conditionGroups: [],\n _expanded: false,\n _id: -1 + '',\n _ruleActions: [],\n conditionGroups: {},\n enabled: false,\n fireOn: 'EVERY_PAGE',\n name: null,\n priority: 1,\n ruleActions: {}\n};\n\n// @dynamic\n@Injectable()\nexport class RuleService {\n get rules(): RuleModel[] {\n return this._rules;\n }\n ruleActionTypes$: BehaviorSubject = new BehaviorSubject([]);\n conditionTypes$: BehaviorSubject = new BehaviorSubject([]);\n\n _ruleActionTypes: { [key: string]: ServerSideTypeModel } = {};\n _conditionTypes: { [key: string]: ServerSideTypeModel } = {};\n\n public _errors$: Subject = new Subject();\n\n protected _actionsEndpointUrl: string;\n // tslint:disable-next-line:no-unused-variable\n protected _ruleActions: { [key: string]: ActionModel } = {};\n // tslint:disable-next-line:no-unused-variable\n protected _conditions: { [key: string]: ConditionModel } = {};\n\n private _rulesEndpointUrl: string;\n private _conditionTypesEndpointUrl: string;\n private _ruleActionTypesEndpointUrl: string;\n\n private _rules$: Subject = new Subject();\n\n private _ruleActionTypesAry: ServerSideTypeModel[] = [];\n private _conditionTypesAry: ServerSideTypeModel[] = [];\n\n private _rules: RuleModel[];\n\n constructor(\n public _apiRoot: ApiRoot,\n private _resources: I18nService,\n private siteService: SiteService,\n private coreWebService: CoreWebService\n ) {\n this._rulesEndpointUrl = `/ruleengine/rules`;\n this._actionsEndpointUrl = `/ruleengine/actions`;\n this._conditionTypesEndpointUrl = `/api/v1/system/ruleengine/conditionlets`;\n this._ruleActionTypesEndpointUrl = `/api/v1/system/ruleengine/actionlets`;\n\n this._preCacheCommonResources(_resources);\n this.loadActionTypes().subscribe(\n (types: ServerSideTypeModel[]) => {\n this.ruleActionTypes$.next(types);\n },\n (err) => {\n this._errors$.next(err);\n }\n );\n this.loadConditionTypes().subscribe(\n (types: ServerSideTypeModel[]) => {\n this.conditionTypes$.next(types);\n },\n (err) => {\n this._errors$.next(err);\n }\n );\n\n this.siteService.switchSite$.subscribe((site) => {\n const siteId = this.loadRulesSiteId();\n if (siteId === site.identifier) {\n this.sendLoadRulesRequest(site.identifier);\n }\n });\n }\n\n static fromServerRulesTransformFn(ruleMap): RuleModel[] {\n return Object.keys(ruleMap).map((id: string) => {\n const r: IRule = ruleMap[id];\n r.id = id;\n return new RuleModel(r);\n });\n }\n\n static fromClientRuleTransformFn(rule: RuleModel): any {\n const sendRule = Object.assign({}, DEFAULT_RULE, rule);\n sendRule.key = rule.key;\n delete sendRule.id;\n sendRule.conditionGroups = {};\n sendRule._conditionGroups.forEach((conditionGroup: ConditionGroupModel) => {\n if (conditionGroup.key) {\n const sendGroup = {\n conditions: {},\n operator: conditionGroup.operator,\n priority: conditionGroup.priority\n };\n conditionGroup._conditions.forEach((condition: ConditionModel) => {\n sendGroup.conditions[condition.key] = true;\n });\n sendRule.conditionGroups[conditionGroup.key] = sendGroup;\n }\n });\n this.removeMeta(sendRule);\n return sendRule;\n }\n\n static removeMeta(entity: any): void {\n Object.keys(entity).forEach((key) => {\n if (key[0] === '_') {\n delete entity[key];\n }\n });\n }\n\n static alphaSort(key): (a, b) => number {\n return (a, b) => {\n let x;\n if (a[key] > b[key]) {\n x = 1;\n } else if (a[key] < b[key]) {\n x = -1;\n } else {\n x = 0;\n }\n return x;\n };\n }\n\n createRule(body: RuleModel): Observable {\n const siteId = this.loadRulesSiteId();\n return this.coreWebService\n .request({\n body: RuleService.fromClientRuleTransformFn(body),\n method: 'POST',\n url: `/api/v1/sites/${siteId}${this._rulesEndpointUrl}`\n })\n .pipe(\n map((result: HttpResponse) => {\n body.key = result['id']; // @todo:ggranum type the POST result correctly.\n return (\n (Object.assign({}, DEFAULT_RULE, body, result))\n );\n })\n );\n }\n\n deleteRule(ruleId: string): Observable<{ success: boolean } | CwError> {\n const siteId = this.loadRulesSiteId();\n return this.coreWebService\n .request({\n method: 'DELETE',\n url: `/api/v1/sites/${siteId}${this._rulesEndpointUrl}/${ruleId}`\n })\n .pipe(\n map((_result) => {\n return { success: true };\n })\n );\n }\n\n loadRules(): Observable {\n return this._rules$.asObservable();\n }\n\n public requestRules(siteId: string): void {\n if (siteId) {\n this.sendLoadRulesRequest(siteId);\n } else if (this.siteService.currentSite) {\n this.sendLoadRulesRequest(this.siteService.currentSite.identifier);\n } else {\n this.siteService.getCurrentSite().subscribe((site) => {\n this.sendLoadRulesRequest(site.identifier);\n });\n }\n }\n\n loadRule(id: string): Observable {\n const siteId = this.loadRulesSiteId();\n return this.coreWebService\n .request({\n url: `/api/v1/sites/${siteId}${this._rulesEndpointUrl}/${id}`\n })\n .pipe(\n map((result) => {\n return (\n (Object.assign({ key: id }, DEFAULT_RULE, result))\n );\n })\n );\n }\n\n updateRule(id: string, rule: RuleModel): Observable {\n let result;\n const siteId = this.loadRulesSiteId();\n if (!id) {\n result = this.createRule(rule);\n } else {\n result = this.coreWebService\n .request({\n body: RuleService.fromClientRuleTransformFn(rule),\n method: 'PUT',\n url: `/api/v1/sites/${siteId}${this._rulesEndpointUrl}/${id}`\n })\n .pipe(\n map((res) => {\n const r = Object.assign({}, DEFAULT_RULE, res);\n r.id = id;\n return r;\n })\n );\n }\n return result;\n }\n\n getConditionTypes(): Observable {\n return this.coreWebService\n .request({\n url: this._conditionTypesEndpointUrl\n })\n .pipe(map(this.fromServerServersideTypesTransformFn));\n }\n\n getRuleActionTypes(): Observable {\n return this.coreWebService\n .request({\n url: this._ruleActionTypesEndpointUrl\n })\n .pipe(map(this.fromServerServersideTypesTransformFn));\n }\n\n _doLoadRuleActionTypes(): Observable {\n return this.coreWebService\n .request({\n url: this._ruleActionTypesEndpointUrl\n })\n .pipe(map(this.fromServerServersideTypesTransformFn));\n }\n\n _doLoadConditionTypes(): Observable {\n return this.coreWebService\n .request({\n url: this._conditionTypesEndpointUrl\n })\n .pipe(map(this.fromServerServersideTypesTransformFn));\n }\n\n private fromServerServersideTypesTransformFn(typesMap): ServerSideTypeModel[] {\n const types = Object.keys(typesMap).map((key: string) => {\n const json: any = typesMap[key];\n json.key = key;\n return ServerSideTypeModel.fromJson(json);\n });\n return types.filter((type) => type.key !== 'CountRulesActionlet');\n }\n\n private _preCacheCommonResources(resources: I18nService): void {\n resources.get('api.sites.ruleengine').subscribe((_rsrc) => {});\n resources.get('api.ruleengine.system').subscribe((_rsrc) => {});\n resources.get('api.system.ruleengine').subscribe((_rsrc) => {});\n }\n\n private sendLoadRulesRequest(siteId: string): void {\n this.coreWebService\n .request({\n url: `/api/v1/sites/${siteId}/ruleengine/rules`\n })\n .subscribe(\n (ruleMap) => {\n this._rules = RuleService.fromServerRulesTransformFn(ruleMap);\n this._rules$.next(this.rules);\n\n return RuleService.fromServerRulesTransformFn(ruleMap);\n },\n (err) => {\n this._errors$.next(err);\n }\n );\n }\n\n private loadActionTypes(): Observable {\n let obs;\n if (this._ruleActionTypesAry.length) {\n obs = observableFrom(this._ruleActionTypesAry);\n } else {\n return this.actionAndConditionTypeLoader(\n this._doLoadRuleActionTypes(),\n this._ruleActionTypes\n );\n }\n return obs;\n }\n\n private actionAndConditionTypeLoader(\n requestObserver: Observable,\n typeMap: any\n ): Observable {\n return requestObserver.pipe(\n mergeMap((types: ServerSideTypeModel[]) => {\n return observableFrom(types).pipe(\n mergeMap((type) => {\n return this._resources.get(type.i18nKey + '.name', type.i18nKey).pipe(\n map((label: string) => {\n type._opt = { value: type.key, label: label };\n return type;\n })\n );\n }),\n reduce((types: any[], type: any) => {\n types.push(type);\n return types;\n }, []),\n tap((typ: any[]) => {\n typ = typ.sort((typeA, typeB) => {\n return typeA._opt.label.localeCompare(typeB._opt.label);\n });\n typ.forEach((type) => {\n typeMap[type.key] = type;\n });\n return typ;\n })\n );\n })\n );\n }\n\n private loadConditionTypes(): Observable {\n let obs;\n if (this._conditionTypesAry.length) {\n obs = observableFrom(this._conditionTypesAry);\n } else {\n return this.actionAndConditionTypeLoader(\n this._doLoadConditionTypes(),\n this._conditionTypes\n );\n }\n return obs;\n }\n\n private getPageIdFromUrl(): string {\n let query;\n\n const hash = document.location.hash;\n\n if (hash.includes('fromCore')) {\n query = hash.substr(hash.indexOf('?') + 1);\n return ApiRoot.parseQueryParam(query, 'realmId');\n } else if (hash.includes('edit-page')) {\n return hash.split('/').pop().split('?')[0];\n }\n return null;\n }\n\n /**\n * Return the Site Id or Page Id for the rules operations.\n * First will check if the realmId parameter is included in the url.\n * If not then search for the current site Id.\n * @returns string\n */\n private loadRulesSiteId(): string {\n let siteId = this.getPageIdFromUrl();\n\n if (!siteId) {\n /**\n * If the realmId parameter is not set get the current Site Id\n */\n siteId = `${this.siteService.currentSite.identifier}`;\n }\n return siteId;\n }\n}\n", + "properties": [ + { + "name": "_conditionGroups", + "deprecated": false, + "deprecationMessage": "", + "type": "ConditionGroupModel[]", + "optional": true, + "description": "", + "line": 95 + }, + { + "name": "_errors", + "deprecated": false, + "deprecationMessage": "", + "type": "CwError[]", + "optional": true, + "description": "", + "line": 97 + }, + { + "name": "_expanded", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 93 + }, + { + "name": "_id", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 92 + }, + { + "name": "_ruleActions", + "deprecated": false, + "deprecationMessage": "", + "type": "ActionModel[]", + "optional": true, + "description": "", + "line": 94 + }, + { + "name": "_ruleActionsLoaded", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 96 + }, + { + "name": "_saved", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 99 + }, + { + "name": "_saving", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 98 + }, + { + "name": "conditionGroups", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": true, + "description": "", + "line": 106 + }, + { + "name": "deleting", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 100 + }, + { + "name": "enabled", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 105 + }, + { + "name": "fireOn", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 104 + }, + { + "name": "id", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 101 + }, + { + "name": "name", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 103 + }, + { + "name": "priority", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 102 + }, + { + "name": "ruleActions", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": true, + "description": "", + "line": 107 + } + ], + "indexSignatures": [], + "kind": 167, + "methods": [ + { + "name": "set", + "args": [ + { + "name": "string", + "type": "", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "any", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": true, + "returnType": "IRule", + "typeParameters": [], + "line": 108, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "string", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "any", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "extends": "IRecord" + }, + { + "name": "IRuleAction", + "id": "interface-IRuleAction-8f232ed692d1321772b6574ee6b791326e4fc680e18453769d4a7869b2979ba14e4523f2c8ada062f260edf3547a6b0a32ba1550b39c318f14b24054c04e39a3", + "file": "libs/dot-rules/src/lib/services/Rule.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { from as observableFrom, Subject } from 'rxjs';\n\nimport { mergeMap, reduce, map, tap } from 'rxjs/operators';\n// tslint:disable-next-line:max-file-line-count\nimport { Injectable } from '@angular/core';\nimport { Observable, BehaviorSubject } from 'rxjs';\n\nimport { ApiRoot } from '@dotcms/dotcms-js';\nimport { ServerSideFieldModel, ServerSideTypeModel } from './ServerSideFieldModel';\nimport { CoreWebService } from '@dotcms/dotcms-js';\nimport { SiteService } from '@dotcms/dotcms-js';\nimport { CwError } from '@dotcms/dotcms-js';\nimport { I18nService } from './system/locale/I18n';\nimport { HttpResponse } from '@angular/common/http';\n\nexport const RULE_CREATE = 'RULE_CREATE';\nexport const RULE_DELETE = 'RULE_DELETE';\nexport const RULE_UPDATE_NAME = 'RULE_UPDATE_NAME';\nexport const RULE_UPDATE_ENABLED_STATE = 'RULE_UPDATE_ENABLED_STATE';\n\nexport const V_RULE_UPDATE_EXPANDED_STATE = 'V_RULE_UPDATE_EXPANDED_STATE';\n\nexport const RULE_UPDATE_FIRE_ON = 'RULE_UPDATE_FIRE_ON';\n\nexport const RULE_RULE_ACTION_CREATE = 'RULE_RULE_ACTION_CREATE';\nexport const RULE_RULE_ACTION_DELETE = 'RULE_RULE_ACTION_DELETE';\nexport const RULE_RULE_ACTION_UPDATE_TYPE = 'RULE_RULE_ACTION_UPDATE_TYPE';\nexport const RULE_RULE_ACTION_UPDATE_PARAMETER = 'RULE_RULE_ACTION_UPDATE_PARAMETER';\n\nexport const RULE_CONDITION_GROUP_UPDATE_OPERATOR = 'RULE_CONDITION_GROUP_UPDATE_OPERATOR';\nexport const RULE_CONDITION_GROUP_DELETE = 'RULE_CONDITION_GROUP_DELETE';\nexport const RULE_CONDITION_GROUP_CREATE = 'RULE_CONDITION_GROUP_CREATE';\n\nexport const RULE_CONDITION_CREATE = 'RULE_CONDITION_CREATE';\nexport const RULE_CONDITION_DELETE = 'RULE_CONDITION_DELETE';\nexport const RULE_CONDITION_UPDATE_TYPE = 'RULE_CONDITION_UPDATE_TYPE';\nexport const RULE_CONDITION_UPDATE_PARAMETER = 'RULE_CONDITION_UPDATE_PARAMETER';\nexport const RULE_CONDITION_UPDATE_OPERATOR = 'RULE_CONDITION_UPDATE_OPERATOR';\n\nlet idCounter = 1000;\n// tslint:disable-next-line:only-arrow-functions\nexport function getNextId(): string {\n return 'tempId' + ++idCounter;\n}\n\nexport class RuleEngineState {\n showRules = true;\n globalError: string = null;\n loading = true;\n saving = false;\n hasError = false;\n filter = '';\n deleting = false;\n}\n\nexport interface IRecord {\n _id?: string;\n _saving?: boolean;\n _saved?: boolean;\n deleting?: boolean;\n errors?: any;\n set?(string, any): any;\n}\n\nexport interface IRuleAction extends IRecord {\n id?: string;\n priority: number;\n type?: string;\n parameters?: { [key: string]: any };\n owningRule?: string;\n _owningRule?: RuleModel;\n}\n\nexport interface ICondition extends IRecord {\n id?: string;\n conditionlet?: string;\n type?: string;\n priority?: number;\n operator?: string;\n parameters?: { [key: string]: any };\n _type?: ServerSideTypeModel;\n}\n\nexport interface IConditionGroup extends IRecord {\n id?: string;\n priority: number;\n operator: string;\n conditions?: any;\n}\n\nexport interface IRule extends IRecord {\n _id?: string;\n _expanded?: boolean;\n _ruleActions?: ActionModel[];\n _conditionGroups?: ConditionGroupModel[];\n _ruleActionsLoaded?: boolean;\n _errors?: CwError[];\n _saving?: boolean;\n _saved?: boolean;\n deleting?: boolean;\n id?: string;\n priority?: number;\n name?: string;\n fireOn?: string;\n enabled?: boolean;\n conditionGroups?: any;\n ruleActions?: any;\n set?(string, any): IRule;\n}\n\nexport interface ParameterModel {\n key: string;\n value: string;\n priority: number;\n}\n\nexport class ActionModel extends ServerSideFieldModel {\n owningRule: string;\n _owningRule: RuleModel;\n\n constructor(key: string, type: ServerSideTypeModel, priority = 1) {\n super(key, type, priority);\n this.priority = priority || 1;\n this.type = type;\n }\n\n isValid(): boolean {\n try {\n return super.isValid();\n } catch (e) {\n this.loggerService.error(e);\n }\n }\n}\n\nexport class ConditionModel extends ServerSideFieldModel {\n operator = 'AND';\n conditionlet: string;\n\n constructor(iCondition: ICondition) {\n super(iCondition.id, iCondition._type);\n this.conditionlet = iCondition.conditionlet;\n this.key = iCondition.id;\n this.priority = iCondition.priority || 1;\n this.type = iCondition._type;\n this.operator = iCondition.operator || 'AND';\n }\n\n isValid(): boolean {\n try {\n return !!this.getParameterValue('comparison') && super.isValid();\n } catch (e) {\n this.loggerService.error(e);\n }\n }\n}\n\nexport class ConditionGroupModel {\n key: string;\n priority: number;\n\n operator: string;\n conditions: { [key: string]: boolean };\n _id: string;\n _conditions: ConditionModel[] = [];\n\n constructor(iGroup: IConditionGroup) {\n Object.assign(this, iGroup);\n this.key = iGroup.id;\n this._id = this.key != null ? this.key : getNextId();\n this.conditions = iGroup.conditions || {};\n }\n\n isPersisted(): boolean {\n return this.key != null;\n }\n\n isValid(): boolean {\n const valid = this.operator && (this.operator === 'AND' || this.operator === 'OR');\n return valid;\n }\n}\n\nexport class RuleModel {\n key: string;\n name: string;\n enabled = false;\n priority: number;\n fireOn: string;\n conditionGroups: { [key: string]: ConditionGroupModel } = {};\n ruleActions: { [key: string]: boolean } = {};\n\n _id: string;\n _expanded = false;\n _conditionGroups: ConditionGroupModel[] = [];\n _ruleActions: ActionModel[] = [];\n _saved = true;\n _saving = false;\n _deleting = true;\n _errors: { [key: string]: any };\n\n constructor(iRule: IRule) {\n Object.assign(this, iRule);\n this.key = iRule.id;\n this._id = this.key != null ? this.key : getNextId();\n const conGroups = Object.keys(iRule.conditionGroups || {});\n conGroups.forEach((groupId) => {\n const g = this.conditionGroups[groupId];\n const mg = new ConditionGroupModel(Object.assign({ id: groupId }, g));\n this.conditionGroups[groupId] = mg;\n this._conditionGroups.push(mg);\n });\n }\n\n isPersisted(): boolean {\n return this.key != null;\n }\n\n isValid(): boolean {\n let valid = !!this.name;\n valid = valid && this.name.trim().length > 0;\n return valid;\n }\n}\n\nexport const DEFAULT_RULE: IRule = {\n _conditionGroups: [],\n _expanded: false,\n _id: -1 + '',\n _ruleActions: [],\n conditionGroups: {},\n enabled: false,\n fireOn: 'EVERY_PAGE',\n name: null,\n priority: 1,\n ruleActions: {}\n};\n\n// @dynamic\n@Injectable()\nexport class RuleService {\n get rules(): RuleModel[] {\n return this._rules;\n }\n ruleActionTypes$: BehaviorSubject = new BehaviorSubject([]);\n conditionTypes$: BehaviorSubject = new BehaviorSubject([]);\n\n _ruleActionTypes: { [key: string]: ServerSideTypeModel } = {};\n _conditionTypes: { [key: string]: ServerSideTypeModel } = {};\n\n public _errors$: Subject = new Subject();\n\n protected _actionsEndpointUrl: string;\n // tslint:disable-next-line:no-unused-variable\n protected _ruleActions: { [key: string]: ActionModel } = {};\n // tslint:disable-next-line:no-unused-variable\n protected _conditions: { [key: string]: ConditionModel } = {};\n\n private _rulesEndpointUrl: string;\n private _conditionTypesEndpointUrl: string;\n private _ruleActionTypesEndpointUrl: string;\n\n private _rules$: Subject = new Subject();\n\n private _ruleActionTypesAry: ServerSideTypeModel[] = [];\n private _conditionTypesAry: ServerSideTypeModel[] = [];\n\n private _rules: RuleModel[];\n\n constructor(\n public _apiRoot: ApiRoot,\n private _resources: I18nService,\n private siteService: SiteService,\n private coreWebService: CoreWebService\n ) {\n this._rulesEndpointUrl = `/ruleengine/rules`;\n this._actionsEndpointUrl = `/ruleengine/actions`;\n this._conditionTypesEndpointUrl = `/api/v1/system/ruleengine/conditionlets`;\n this._ruleActionTypesEndpointUrl = `/api/v1/system/ruleengine/actionlets`;\n\n this._preCacheCommonResources(_resources);\n this.loadActionTypes().subscribe(\n (types: ServerSideTypeModel[]) => {\n this.ruleActionTypes$.next(types);\n },\n (err) => {\n this._errors$.next(err);\n }\n );\n this.loadConditionTypes().subscribe(\n (types: ServerSideTypeModel[]) => {\n this.conditionTypes$.next(types);\n },\n (err) => {\n this._errors$.next(err);\n }\n );\n\n this.siteService.switchSite$.subscribe((site) => {\n const siteId = this.loadRulesSiteId();\n if (siteId === site.identifier) {\n this.sendLoadRulesRequest(site.identifier);\n }\n });\n }\n\n static fromServerRulesTransformFn(ruleMap): RuleModel[] {\n return Object.keys(ruleMap).map((id: string) => {\n const r: IRule = ruleMap[id];\n r.id = id;\n return new RuleModel(r);\n });\n }\n\n static fromClientRuleTransformFn(rule: RuleModel): any {\n const sendRule = Object.assign({}, DEFAULT_RULE, rule);\n sendRule.key = rule.key;\n delete sendRule.id;\n sendRule.conditionGroups = {};\n sendRule._conditionGroups.forEach((conditionGroup: ConditionGroupModel) => {\n if (conditionGroup.key) {\n const sendGroup = {\n conditions: {},\n operator: conditionGroup.operator,\n priority: conditionGroup.priority\n };\n conditionGroup._conditions.forEach((condition: ConditionModel) => {\n sendGroup.conditions[condition.key] = true;\n });\n sendRule.conditionGroups[conditionGroup.key] = sendGroup;\n }\n });\n this.removeMeta(sendRule);\n return sendRule;\n }\n\n static removeMeta(entity: any): void {\n Object.keys(entity).forEach((key) => {\n if (key[0] === '_') {\n delete entity[key];\n }\n });\n }\n\n static alphaSort(key): (a, b) => number {\n return (a, b) => {\n let x;\n if (a[key] > b[key]) {\n x = 1;\n } else if (a[key] < b[key]) {\n x = -1;\n } else {\n x = 0;\n }\n return x;\n };\n }\n\n createRule(body: RuleModel): Observable {\n const siteId = this.loadRulesSiteId();\n return this.coreWebService\n .request({\n body: RuleService.fromClientRuleTransformFn(body),\n method: 'POST',\n url: `/api/v1/sites/${siteId}${this._rulesEndpointUrl}`\n })\n .pipe(\n map((result: HttpResponse) => {\n body.key = result['id']; // @todo:ggranum type the POST result correctly.\n return (\n (Object.assign({}, DEFAULT_RULE, body, result))\n );\n })\n );\n }\n\n deleteRule(ruleId: string): Observable<{ success: boolean } | CwError> {\n const siteId = this.loadRulesSiteId();\n return this.coreWebService\n .request({\n method: 'DELETE',\n url: `/api/v1/sites/${siteId}${this._rulesEndpointUrl}/${ruleId}`\n })\n .pipe(\n map((_result) => {\n return { success: true };\n })\n );\n }\n\n loadRules(): Observable {\n return this._rules$.asObservable();\n }\n\n public requestRules(siteId: string): void {\n if (siteId) {\n this.sendLoadRulesRequest(siteId);\n } else if (this.siteService.currentSite) {\n this.sendLoadRulesRequest(this.siteService.currentSite.identifier);\n } else {\n this.siteService.getCurrentSite().subscribe((site) => {\n this.sendLoadRulesRequest(site.identifier);\n });\n }\n }\n\n loadRule(id: string): Observable {\n const siteId = this.loadRulesSiteId();\n return this.coreWebService\n .request({\n url: `/api/v1/sites/${siteId}${this._rulesEndpointUrl}/${id}`\n })\n .pipe(\n map((result) => {\n return (\n (Object.assign({ key: id }, DEFAULT_RULE, result))\n );\n })\n );\n }\n\n updateRule(id: string, rule: RuleModel): Observable {\n let result;\n const siteId = this.loadRulesSiteId();\n if (!id) {\n result = this.createRule(rule);\n } else {\n result = this.coreWebService\n .request({\n body: RuleService.fromClientRuleTransformFn(rule),\n method: 'PUT',\n url: `/api/v1/sites/${siteId}${this._rulesEndpointUrl}/${id}`\n })\n .pipe(\n map((res) => {\n const r = Object.assign({}, DEFAULT_RULE, res);\n r.id = id;\n return r;\n })\n );\n }\n return result;\n }\n\n getConditionTypes(): Observable {\n return this.coreWebService\n .request({\n url: this._conditionTypesEndpointUrl\n })\n .pipe(map(this.fromServerServersideTypesTransformFn));\n }\n\n getRuleActionTypes(): Observable {\n return this.coreWebService\n .request({\n url: this._ruleActionTypesEndpointUrl\n })\n .pipe(map(this.fromServerServersideTypesTransformFn));\n }\n\n _doLoadRuleActionTypes(): Observable {\n return this.coreWebService\n .request({\n url: this._ruleActionTypesEndpointUrl\n })\n .pipe(map(this.fromServerServersideTypesTransformFn));\n }\n\n _doLoadConditionTypes(): Observable {\n return this.coreWebService\n .request({\n url: this._conditionTypesEndpointUrl\n })\n .pipe(map(this.fromServerServersideTypesTransformFn));\n }\n\n private fromServerServersideTypesTransformFn(typesMap): ServerSideTypeModel[] {\n const types = Object.keys(typesMap).map((key: string) => {\n const json: any = typesMap[key];\n json.key = key;\n return ServerSideTypeModel.fromJson(json);\n });\n return types.filter((type) => type.key !== 'CountRulesActionlet');\n }\n\n private _preCacheCommonResources(resources: I18nService): void {\n resources.get('api.sites.ruleengine').subscribe((_rsrc) => {});\n resources.get('api.ruleengine.system').subscribe((_rsrc) => {});\n resources.get('api.system.ruleengine').subscribe((_rsrc) => {});\n }\n\n private sendLoadRulesRequest(siteId: string): void {\n this.coreWebService\n .request({\n url: `/api/v1/sites/${siteId}/ruleengine/rules`\n })\n .subscribe(\n (ruleMap) => {\n this._rules = RuleService.fromServerRulesTransformFn(ruleMap);\n this._rules$.next(this.rules);\n\n return RuleService.fromServerRulesTransformFn(ruleMap);\n },\n (err) => {\n this._errors$.next(err);\n }\n );\n }\n\n private loadActionTypes(): Observable {\n let obs;\n if (this._ruleActionTypesAry.length) {\n obs = observableFrom(this._ruleActionTypesAry);\n } else {\n return this.actionAndConditionTypeLoader(\n this._doLoadRuleActionTypes(),\n this._ruleActionTypes\n );\n }\n return obs;\n }\n\n private actionAndConditionTypeLoader(\n requestObserver: Observable,\n typeMap: any\n ): Observable {\n return requestObserver.pipe(\n mergeMap((types: ServerSideTypeModel[]) => {\n return observableFrom(types).pipe(\n mergeMap((type) => {\n return this._resources.get(type.i18nKey + '.name', type.i18nKey).pipe(\n map((label: string) => {\n type._opt = { value: type.key, label: label };\n return type;\n })\n );\n }),\n reduce((types: any[], type: any) => {\n types.push(type);\n return types;\n }, []),\n tap((typ: any[]) => {\n typ = typ.sort((typeA, typeB) => {\n return typeA._opt.label.localeCompare(typeB._opt.label);\n });\n typ.forEach((type) => {\n typeMap[type.key] = type;\n });\n return typ;\n })\n );\n })\n );\n }\n\n private loadConditionTypes(): Observable {\n let obs;\n if (this._conditionTypesAry.length) {\n obs = observableFrom(this._conditionTypesAry);\n } else {\n return this.actionAndConditionTypeLoader(\n this._doLoadConditionTypes(),\n this._conditionTypes\n );\n }\n return obs;\n }\n\n private getPageIdFromUrl(): string {\n let query;\n\n const hash = document.location.hash;\n\n if (hash.includes('fromCore')) {\n query = hash.substr(hash.indexOf('?') + 1);\n return ApiRoot.parseQueryParam(query, 'realmId');\n } else if (hash.includes('edit-page')) {\n return hash.split('/').pop().split('?')[0];\n }\n return null;\n }\n\n /**\n * Return the Site Id or Page Id for the rules operations.\n * First will check if the realmId parameter is included in the url.\n * If not then search for the current site Id.\n * @returns string\n */\n private loadRulesSiteId(): string {\n let siteId = this.getPageIdFromUrl();\n\n if (!siteId) {\n /**\n * If the realmId parameter is not set get the current Site Id\n */\n siteId = `${this.siteService.currentSite.identifier}`;\n }\n return siteId;\n }\n}\n", + "properties": [ + { + "name": "_owningRule", + "deprecated": false, + "deprecationMessage": "", + "type": "RuleModel", + "optional": true, + "description": "", + "line": 71 + }, + { + "name": "id", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 66 + }, + { + "name": "owningRule", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 70 + }, + { + "name": "parameters", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": true, + "description": "", + "line": 69 + }, + { + "name": "priority", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 67 + }, + { + "name": "type", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 68 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [], + "extends": "IRecord" + }, + { + "name": "IUser", + "id": "interface-IUser-4b4c8c40cbcf13889b0ee16d476b439a59d09a7ea941fff2fa3b376392ea5d9cd91ccd9216cdb1627daede19b441c5eb7e25c07b1b492cdfb9ac9280c252bbfa", + "file": "libs/dot-rules/src/lib/services/bundle-service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { of as observableOf, Observable, Subject } from 'rxjs';\n\nimport { map, mergeMap } from 'rxjs/operators';\nimport { Injectable } from '@angular/core';\n\nimport { ApiRoot } from '@dotcms/dotcms-js';\nimport { CoreWebService } from '@dotcms/dotcms-js';\nimport { HttpResponse } from '@angular/common/http';\n\nexport interface IUser {\n givenName?: string;\n surname?: string;\n roleId?: string;\n userId?: string;\n}\n\nexport interface IBundle {\n name?: string;\n id?: string;\n}\n\nexport interface IPublishEnvironment {\n name?: string;\n id?: string;\n}\n\n@Injectable()\nexport class BundleService {\n bundles$: Subject = new Subject();\n\n private _bundleStoreUrl: string;\n private _loggedUserUrl: string;\n private _addToBundleUrl: string;\n private _pushEnvironementsUrl: string;\n private _pushRuleUrl: string;\n private _environmentsAry: IPublishEnvironment[] = [];\n\n static fromServerBundleTransformFn(data): IBundle[] {\n return data.items || [];\n }\n\n static fromServerEnvironmentTransformFn(data): IPublishEnvironment[] {\n // Endpoint return extra empty environment\n data.shift();\n return data;\n }\n\n constructor(public _apiRoot: ApiRoot, private coreWebService: CoreWebService) {\n this._bundleStoreUrl = `/api/bundle/getunsendbundles/userid`;\n this._loggedUserUrl = `/api/v1/users/current/`;\n this._addToBundleUrl = `/DotAjaxDirector/com.dotcms.publisher.ajax.RemotePublishAjaxAction/cmd/addToBundle`;\n this._pushEnvironementsUrl = `/api/environment/loadenvironments/roleId`;\n this._pushRuleUrl = `/DotAjaxDirector/com.dotcms.publisher.ajax.RemotePublishAjaxAction/cmd/publish`;\n }\n\n /**\n * Get current logged in user\n *\n * @return {*} {Observable}\n * @memberof BundleService\n * @deprecated use getCurrentUser in LoginService\n */\n getLoggedUser(): Observable {\n return this.coreWebService\n .request({\n url: this._loggedUserUrl\n })\n .pipe(map((res: HttpResponse) => res));\n }\n\n loadBundleStores(): void {\n const obs = this._doLoadBundleStores().pipe(\n map((bundles: IBundle[]) => {\n return bundles;\n })\n );\n obs.subscribe((bundles) => this.bundles$.next(bundles));\n }\n\n _doLoadBundleStores(): Observable {\n return this.getLoggedUser().pipe(\n mergeMap((user: IUser) => {\n return this.coreWebService\n .request({\n url: `${this._bundleStoreUrl}/${user.userId}`\n })\n .pipe(map(BundleService.fromServerBundleTransformFn));\n })\n );\n }\n\n loadPublishEnvironments(): Observable {\n let obs: Observable;\n if (this._environmentsAry.length) {\n obs = observableOf(this._environmentsAry);\n } else {\n obs = this._doLoadPublishEnvironments().pipe(\n map((environments: IPublishEnvironment[]) => {\n this._environmentsAry = environments;\n return environments;\n })\n );\n }\n return obs;\n }\n\n _doLoadPublishEnvironments(): Observable {\n return this.getLoggedUser().pipe(\n mergeMap((user: IUser) => {\n return this.coreWebService\n .request({\n url: `${this._pushEnvironementsUrl}/${user.roleId}/?name=0`\n })\n .pipe(map(BundleService.fromServerEnvironmentTransformFn));\n })\n );\n }\n\n addRuleToBundle(\n ruleId: string,\n bundle: IBundle\n ): Observable<{ errorMessages: string[]; total: number; errors: number }> {\n return this.coreWebService\n .request({\n body: `assetIdentifier=${ruleId}&bundleName=${bundle.name}&bundleSelect=${bundle.id}`,\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded'\n },\n method: 'POST',\n url: this._addToBundleUrl\n })\n .pipe(\n map(\n (res: HttpResponse) =>\n <{ errorMessages: string[]; total: number; errors: number }>(res)\n )\n );\n }\n\n pushPublishRule(\n ruleId: string,\n environmentId: string\n ): Observable<{ errorMessages: string[]; total: number; bundleId: string; errors: number }> {\n return this.coreWebService\n .request({\n body: this.getPublishRuleData(ruleId, environmentId),\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded'\n },\n method: 'POST',\n url: this._pushRuleUrl\n })\n .pipe(\n map(\n (res: HttpResponse) => <\n {\n errorMessages: string[];\n total: number;\n bundleId: string;\n errors: number;\n }\n >(res)\n )\n );\n }\n\n private getFormattedDate(date: Date): string {\n const yyyy = date.getFullYear().toString();\n const mm = (date.getMonth() + 1).toString();\n const dd = date.getDate().toString();\n return yyyy + '-' + (mm[1] ? mm : '0' + mm[0]) + '-' + (dd[1] ? dd : '0' + dd[0]);\n }\n\n private getPublishRuleData(ruleId: string, environmentId: string): string {\n let resul = '';\n resul += `assetIdentifier=${ruleId}`;\n resul += `&remotePublishDate=${this.getFormattedDate(new Date())}`;\n resul += '&remotePublishTime=00-00';\n resul += `&remotePublishExpireDate=${this.getFormattedDate(new Date())}`;\n resul += '&remotePublishExpireTime=00-00';\n resul += '&iWantTo=publish';\n resul += `&whoToSend=${environmentId}`;\n resul += '&bundleName=';\n resul += '&bundleSelect=';\n resul += '&forcePush=false';\n return resul;\n }\n}\n", + "properties": [ + { + "name": "givenName", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 11 + }, + { + "name": "roleId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 13 + }, + { + "name": "surname", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 12 + }, + { + "name": "userId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 14 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "Links", + "id": "interface-Links-42acf73380509bf7790063b918e9e7bfb88046cf84c5df55c392fa22dd13243e9b81c50c3f7d3e687ef5943e7ed5c112835a1cf21865fe64e33a411a41dbd4d0", + "file": "apps/dotcms-ui/src/app/api/services/paginator/paginator.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { take, map } from 'rxjs/operators';\nimport { CoreWebService, ResponseView } from '@dotcms/dotcms-js';\nimport { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nexport enum OrderDirection {\n ASC = 1,\n DESC = -1\n}\n\n/**\n * Provides util listing methods\n * @export\n * @class PaginatorService\n */\n@Injectable()\nexport class PaginatorService {\n public static readonly LINK_HEADER_NAME = 'Link';\n public static readonly PAGINATION_PER_PAGE_HEADER_NAME = 'X-Pagination-Per-Page';\n public static readonly PAGINATION_CURRENT_PAGE_HEADER_NAME = 'X-Pagination-Current-Page';\n public static readonly PAGINATION_MAX_LINK_PAGES_HEADER_NAME = 'X-Pagination-Link-Pages';\n public static readonly PAGINATION_TOTAL_ENTRIES_HEADER_NAME = 'X-Pagination-Total-Entries';\n\n public links: Links = {};\n\n public paginationPerPage = 40;\n public currentPage: number;\n public maxLinksPage: number;\n public totalRecords: number;\n\n private _url: string;\n private _filter: string;\n private _searchParam: string;\n private _sortField: string;\n private _sortOrder: OrderDirection;\n private _extraParams: Map = new Map();\n\n constructor(private coreWebService: CoreWebService) {}\n\n get url(): string {\n return this._url;\n }\n\n set url(url: string) {\n if (this._url !== url) {\n this.links = {};\n this._url = url;\n }\n }\n\n get filter(): string {\n return this._filter;\n }\n\n set filter(filter: string) {\n if (this._filter !== filter) {\n this.links = {};\n this._filter = filter;\n }\n }\n\n set searchParam(searchParam: string) {\n if (this._searchParam !== searchParam) {\n this.links = searchParam.length > 0 ? {} : this.links;\n this._searchParam = searchParam;\n }\n }\n\n get searchParam(): string {\n return this._searchParam;\n }\n\n /**\n * Set value of extra parameters of the eventual request.\n * @param string name\n * @param value\n *\n * @memberof DotThemeSelectorComponent\n */\n setExtraParams(name: string, value?: any): void {\n if (value !== null && value !== undefined) {\n this.extraParams.set(name, value.toString());\n this.links = {};\n }\n }\n\n /**\n * Delete extra parameters of the eventual request.\n * @param string name\n *\n * @memberof DotThemeSelectorComponent\n */\n deleteExtraParams(name: string): void {\n this.extraParams.delete(name);\n }\n\n get extraParams(): Map {\n return this._extraParams;\n }\n\n get sortField(): string {\n return this._sortField;\n }\n\n set sortField(sortField: string) {\n if (this._sortField !== sortField) {\n this.links = {};\n this._sortField = sortField;\n }\n }\n\n get sortOrder(): OrderDirection {\n return this._sortOrder;\n }\n\n set sortOrder(sortOrder: OrderDirection) {\n if (this._sortOrder !== sortOrder) {\n this.links = {};\n this._sortOrder = sortOrder;\n }\n }\n\n /**\n * Send a pagination request with url as base URL, if url is null or undefined then\n * it use the url property value instead.\n * Also it use the values of sortField, sortOrder and filter properties like query parameters,\n * so the finally url will be:\n * /orderby=[sortField-value]&direction=[sortOrder-value]&filter=[filter-value]\n * @param url base url\n */\n // tslint:disable-next-line:cyclomatic-complexity\n public get(url?: string): Observable {\n const params = {\n ...this.getParams(),\n ...this.getObjectFromMap(this.extraParams)\n };\n\n return this.coreWebService\n .requestView({\n params,\n url: url || this.url\n })\n .pipe(\n map((response: ResponseView) => {\n this.setLinks(response.header(PaginatorService.LINK_HEADER_NAME));\n this.paginationPerPage = parseInt(\n response.header(PaginatorService.PAGINATION_PER_PAGE_HEADER_NAME),\n 10\n );\n this.currentPage = parseInt(\n response.header(PaginatorService.PAGINATION_CURRENT_PAGE_HEADER_NAME),\n 10\n );\n this.maxLinksPage = parseInt(\n response.header(PaginatorService.PAGINATION_MAX_LINK_PAGES_HEADER_NAME),\n 10\n );\n this.totalRecords = parseInt(\n response.header(PaginatorService.PAGINATION_TOTAL_ENTRIES_HEADER_NAME),\n 10\n );\n return response.entity;\n }),\n take(1)\n );\n }\n\n /**\n * Request the last page\n * @returns Observable\n * @memberof PaginatorService\n */\n public getLastPage(): Observable {\n return this.get(this.links.last);\n }\n\n /**\n * Request the first page\n * @returns Observable\n * @memberof PaginatorService\n */\n public getFirstPage(): Observable {\n return this.get(this.links.first);\n }\n\n /**\n * request the pageParam page\n * @param number [pageParam=1] Page to request\n * @returns Observable\n * @memberof PaginatorServic\n */\n public getPage(pageParam = 1): Observable {\n const urlPage = this.links['x-page']\n ? this.links['x-page'].replace('pageValue', String(pageParam))\n : undefined;\n return this.get(urlPage);\n }\n\n /**\n * Request the current page\n * @returns Observable\n * @memberof PaginatorService\n */\n public getCurrentPage(): Observable {\n return this.getPage(this.currentPage);\n }\n\n /**\n * Request the next page\n * @returns Observable\n * @memberof PaginatorService\n */\n public getNextPage(): Observable {\n return this.get(this.links.next);\n }\n\n /**\n * Request the previous page\n * @returns Observable\n * @memberof PaginatorService\n */\n public getPrevPage(): Observable {\n return this.get(this.links.prev);\n }\n\n /**\n * Use the offset to request a page.\n * @param number offset Offset to be request\n * @returns Observable\n * @memberof PaginatorService\n */\n public getWithOffset(offset: number): Observable {\n const page = this.getPageFromOffset(offset);\n return this.getPage(page);\n }\n\n private getPageFromOffset(offset: number): number {\n return parseInt(String(offset / this.paginationPerPage), 10) + 1;\n }\n\n private setLinks(linksString: string): void {\n const linkSplit = linksString.split(',');\n\n linkSplit.forEach((linkRel) => {\n const linkrealSplit = linkRel.split(';');\n const url = linkrealSplit[0].substring(1, linkrealSplit[0].length - 1);\n const relSplit = linkrealSplit[1].split('=');\n const rel = relSplit[1].substring(1, relSplit[1].length - 1);\n this.links[rel] = url.trim();\n });\n }\n\n private getParams(): { [key: string]: any } {\n const params = new Map();\n\n if (this.filter) {\n params.set('filter', this.filter);\n }\n\n if (this.searchParam) {\n params.set('searchParam', this.searchParam);\n }\n\n if (this.sortField) {\n params.set('orderby', this.sortField);\n }\n\n if (this.sortOrder) {\n params.set('direction', OrderDirection[this.sortOrder]);\n }\n\n if (this.paginationPerPage) {\n params.set('per_page', String(this.paginationPerPage));\n }\n return this.getObjectFromMap(params);\n }\n\n private getObjectFromMap(map: Map): { [key: string]: any } {\n let result = Array.from(map).reduce(\n (obj, [key, value]) => Object.assign(obj, { [key]: value }),\n {}\n );\n\n return result;\n }\n}\n\ninterface Links {\n first?: string;\n last?: string;\n next?: string;\n 'x-page'?: string;\n prev?: string;\n}\n", + "properties": [ + { + "name": "first", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 289 + }, + { + "name": "last", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 290 + }, + { + "name": "next", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 291 + }, + { + "name": "prev", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 293 + }, + { + "name": "x-page", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 292 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "Menu", + "id": "interface-Menu-ad0924e5e68bc9486a4dcb5c35b9365501e7e292dabc45fe17205c126af16a5e87a4aa9e4aedac96586792b1f03a9134e0b428271fe3a697d1200fc6b5821cff", + "file": "libs/dotcms-js/src/lib/core/routing.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { CoreWebService } from './core-web.service';\nimport { Injectable } from '@angular/core';\nimport { LoginService } from './login.service';\nimport { Observable } from 'rxjs';\nimport { DotRouterService } from './dot-router.service';\nimport { Subject } from 'rxjs';\nimport { DotcmsEventsService } from './dotcms-events.service';\n\n@Injectable()\nexport class RoutingService {\n private _menusChange$: Subject = new Subject();\n private menus: Menu[];\n private urlMenus: string;\n private portlets: Map;\n private _currentPortletId: string;\n\n private _portletUrlSource$ = new Subject();\n private _currentPortlet$ = new Subject();\n\n // TODO: I think we should be able to remove the routing injection\n constructor(\n loginService: LoginService,\n private router: DotRouterService,\n private coreWebService: CoreWebService,\n dotcmsEventsService: DotcmsEventsService\n ) {\n this.urlMenus = 'v1/CORE_WEB/menu';\n this.portlets = new Map();\n\n loginService.watchUser(this.loadMenus.bind(this));\n dotcmsEventsService\n .subscribeTo('UPDATE_PORTLET_LAYOUTS')\n .subscribe(this.loadMenus.bind(this));\n }\n\n get currentPortletId(): string {\n return this._currentPortletId;\n }\n\n get currentMenu(): Menu[] {\n return this.menus;\n }\n\n get menusChange$(): Observable {\n return this._menusChange$.asObservable();\n }\n\n get portletUrl$(): Observable {\n return this._portletUrlSource$.asObservable();\n }\n\n get firstPortlet(): string {\n const porlets = this.portlets.entries().next().value;\n return porlets ? porlets[0] : null;\n }\n\n public addPortletURL(portletId: string, url: string): void {\n this.portlets.set(portletId.replace(' ', '_'), url);\n }\n\n public getPortletURL(portletId: string): string {\n return this.portlets.get(portletId);\n }\n\n public goToPortlet(portletId: string): void {\n this.router.gotoPortlet(portletId);\n this._currentPortletId = portletId;\n }\n\n public isPortlet(url: string): boolean {\n let id = this.getPortletId(url);\n if (id.indexOf('?') >= 0) {\n id = id.substr(0, id.indexOf('?'));\n }\n\n return this.portlets.has(id);\n }\n\n public setCurrentPortlet(url: string): void {\n let id = this.getPortletId(url);\n if (id.indexOf('?') >= 0) {\n id = id.substr(0, id.indexOf('?'));\n }\n this._currentPortletId = id;\n this._currentPortlet$.next(id);\n }\n\n get currentPortlet$(): Observable {\n return this._currentPortlet$;\n }\n\n public setMenus(menus: Menu[]): void {\n this.menus = menus;\n\n if (this.menus.length) {\n this.portlets = new Map();\n\n for (let i = 0; i < this.menus.length; i++) {\n const menu = this.menus[i];\n\n for (let k = 0; k < menu.menuItems.length; k++) {\n const subMenuItem = menu.menuItems[k];\n if (subMenuItem.angular) {\n this.portlets.set(subMenuItem.id, subMenuItem.url);\n } else {\n subMenuItem.menuLink = '/c/' + subMenuItem.id;\n this.portlets.set(subMenuItem.id, subMenuItem.url);\n }\n }\n }\n this._menusChange$.next(this.menus);\n }\n }\n\n /**\n * Refresh the portlet displayed. with the\n * @param url portlet url\n */\n public changeRefreshPortlet(url: string): void {\n const portletId = this.getPortletId(url);\n if (portletId === this.currentPortletId) {\n this._portletUrlSource$.next(url);\n }\n }\n\n private loadMenus(): void {\n this.coreWebService\n .requestView({\n url: this.urlMenus\n })\n .subscribe(\n (response) => {\n this.setMenus(response.entity);\n },\n (error) => this._menusChange$.error(error)\n );\n }\n\n private getPortletId(url: string): string {\n const urlSplit = url.split('/');\n return urlSplit[urlSplit.length - 1];\n }\n}\n\nexport interface Menu {\n tabDescription: string;\n tabName: string;\n url: string;\n menuItems: MenuItem[];\n}\n\nexport interface MenuItem {\n ajax: boolean;\n angular: boolean;\n id: string;\n name: string;\n url: string;\n menuLink: string;\n}\n", + "properties": [ + { + "name": "menuItems", + "deprecated": false, + "deprecationMessage": "", + "type": "MenuItem[]", + "optional": false, + "description": "", + "line": 149 + }, + { + "name": "tabDescription", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 146 + }, + { + "name": "tabName", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 147 + }, + { + "name": "url", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 148 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "MenuItem", + "id": "interface-MenuItem-ad0924e5e68bc9486a4dcb5c35b9365501e7e292dabc45fe17205c126af16a5e87a4aa9e4aedac96586792b1f03a9134e0b428271fe3a697d1200fc6b5821cff", + "file": "libs/dotcms-js/src/lib/core/routing.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { CoreWebService } from './core-web.service';\nimport { Injectable } from '@angular/core';\nimport { LoginService } from './login.service';\nimport { Observable } from 'rxjs';\nimport { DotRouterService } from './dot-router.service';\nimport { Subject } from 'rxjs';\nimport { DotcmsEventsService } from './dotcms-events.service';\n\n@Injectable()\nexport class RoutingService {\n private _menusChange$: Subject = new Subject();\n private menus: Menu[];\n private urlMenus: string;\n private portlets: Map;\n private _currentPortletId: string;\n\n private _portletUrlSource$ = new Subject();\n private _currentPortlet$ = new Subject();\n\n // TODO: I think we should be able to remove the routing injection\n constructor(\n loginService: LoginService,\n private router: DotRouterService,\n private coreWebService: CoreWebService,\n dotcmsEventsService: DotcmsEventsService\n ) {\n this.urlMenus = 'v1/CORE_WEB/menu';\n this.portlets = new Map();\n\n loginService.watchUser(this.loadMenus.bind(this));\n dotcmsEventsService\n .subscribeTo('UPDATE_PORTLET_LAYOUTS')\n .subscribe(this.loadMenus.bind(this));\n }\n\n get currentPortletId(): string {\n return this._currentPortletId;\n }\n\n get currentMenu(): Menu[] {\n return this.menus;\n }\n\n get menusChange$(): Observable {\n return this._menusChange$.asObservable();\n }\n\n get portletUrl$(): Observable {\n return this._portletUrlSource$.asObservable();\n }\n\n get firstPortlet(): string {\n const porlets = this.portlets.entries().next().value;\n return porlets ? porlets[0] : null;\n }\n\n public addPortletURL(portletId: string, url: string): void {\n this.portlets.set(portletId.replace(' ', '_'), url);\n }\n\n public getPortletURL(portletId: string): string {\n return this.portlets.get(portletId);\n }\n\n public goToPortlet(portletId: string): void {\n this.router.gotoPortlet(portletId);\n this._currentPortletId = portletId;\n }\n\n public isPortlet(url: string): boolean {\n let id = this.getPortletId(url);\n if (id.indexOf('?') >= 0) {\n id = id.substr(0, id.indexOf('?'));\n }\n\n return this.portlets.has(id);\n }\n\n public setCurrentPortlet(url: string): void {\n let id = this.getPortletId(url);\n if (id.indexOf('?') >= 0) {\n id = id.substr(0, id.indexOf('?'));\n }\n this._currentPortletId = id;\n this._currentPortlet$.next(id);\n }\n\n get currentPortlet$(): Observable {\n return this._currentPortlet$;\n }\n\n public setMenus(menus: Menu[]): void {\n this.menus = menus;\n\n if (this.menus.length) {\n this.portlets = new Map();\n\n for (let i = 0; i < this.menus.length; i++) {\n const menu = this.menus[i];\n\n for (let k = 0; k < menu.menuItems.length; k++) {\n const subMenuItem = menu.menuItems[k];\n if (subMenuItem.angular) {\n this.portlets.set(subMenuItem.id, subMenuItem.url);\n } else {\n subMenuItem.menuLink = '/c/' + subMenuItem.id;\n this.portlets.set(subMenuItem.id, subMenuItem.url);\n }\n }\n }\n this._menusChange$.next(this.menus);\n }\n }\n\n /**\n * Refresh the portlet displayed. with the\n * @param url portlet url\n */\n public changeRefreshPortlet(url: string): void {\n const portletId = this.getPortletId(url);\n if (portletId === this.currentPortletId) {\n this._portletUrlSource$.next(url);\n }\n }\n\n private loadMenus(): void {\n this.coreWebService\n .requestView({\n url: this.urlMenus\n })\n .subscribe(\n (response) => {\n this.setMenus(response.entity);\n },\n (error) => this._menusChange$.error(error)\n );\n }\n\n private getPortletId(url: string): string {\n const urlSplit = url.split('/');\n return urlSplit[urlSplit.length - 1];\n }\n}\n\nexport interface Menu {\n tabDescription: string;\n tabName: string;\n url: string;\n menuItems: MenuItem[];\n}\n\nexport interface MenuItem {\n ajax: boolean;\n angular: boolean;\n id: string;\n name: string;\n url: string;\n menuLink: string;\n}\n", + "properties": [ + { + "name": "ajax", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 153 + }, + { + "name": "angular", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 154 + }, + { + "name": "id", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 155 + }, + { + "name": "menuLink", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 158 + }, + { + "name": "name", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 156 + }, + { + "name": "url", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 157 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "MessageConfig", + "id": "interface-MessageConfig-e9bd5bdcda0f4a62a1fc0263d86fd1044a744a2f2c6525b90ba9c94811b0297ebafc8adb0475a6358cd3a044676760fc124df1d1e0f67c63ca60507600270650", + "file": "apps/dotcms-ui/src/app/test/dot-message-service.mock.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export class MockDotMessageService {\n constructor(private messages: MessageConfig) {}\n\n get(key: string, ...args: string[]): string {\n return this.messages[key]\n ? args.length\n ? this.formatMessage(this.messages[key], args)\n : this.messages[key]\n : key;\n }\n\n private formatMessage(message: string, args: string[]): string {\n return message.replace(/{(\\d+)}/g, (match, number) => {\n return typeof args[number] !== 'undefined' ? args[number] : match;\n });\n }\n}\n\ninterface MessageConfig {\n [propName: string]: string;\n}\n", + "properties": [], + "indexSignatures": [ + { + "id": "index-declaration-e9bd5bdcda0f4a62a1fc0263d86fd1044a744a2f2c6525b90ba9c94811b0297ebafc8adb0475a6358cd3a044676760fc124df1d1e0f67c63ca60507600270650", + "args": [ + { + "name": "propName", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "returnType": "string", + "line": 38, + "deprecated": false, + "deprecationMessage": "" + } + ], + "kind": 175, + "methods": [] + }, + { + "name": "NgGridConfig", + "id": "interface-NgGridConfig-2f66c481a0caefcac1bc61ebad1454ad41fb7df4fbcb9b78f290997966a008fb2c86d14f46dbf947db1c3df9ed7383d9caea259b1d509b841686a6ee49be9d09", + "file": "libs/dot-layout-grid/src/lib/interfaces/INgGrid.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export type NgConfigFixDirection = 'vertical' | 'horizontal' | 'cascade';\n\nexport interface NgGridConfig {\n margins?: number[];\n draggable?: boolean;\n resizable?: boolean;\n max_cols?: number;\n max_rows?: number;\n visible_cols?: number;\n visible_rows?: number;\n min_cols?: number;\n min_rows?: number;\n col_width?: number;\n row_height?: number;\n cascade?: string;\n min_width?: number;\n min_height?: number;\n fix_to_grid?: boolean;\n auto_style?: boolean;\n auto_resize?: boolean;\n maintain_ratio?: boolean;\n prefer_new?: boolean;\n zoom_on_drag?: boolean;\n limit_to_screen?: boolean;\n center_to_screen?: boolean;\n resize_directions?: string[];\n element_based_row_height?: boolean;\n fix_item_position_direction?: NgConfigFixDirection;\n fix_collision_position_direction?: NgConfigFixDirection;\n allow_overlap?: boolean;\n}\n\nexport interface NgGridItemConfig {\n uid?: string;\n payload?: any;\n col?: number;\n row?: number;\n sizex?: number;\n sizey?: number;\n dragHandle?: string;\n resizeHandle?: ResizeHandle;\n fixed?: boolean;\n draggable?: boolean;\n resizable?: boolean;\n borderSize?: number;\n maxCols?: number;\n minCols?: number;\n maxRows?: number;\n minRows?: number;\n minWidth?: number;\n minHeight?: number;\n resizeDirections?: string[];\n}\n\nexport interface NgGridItemEvent {\n uid: string;\n payload: any;\n col: number;\n row: number;\n sizex: number;\n sizey: number;\n width: number;\n height: number;\n left: number;\n top: number;\n}\n\nexport interface NgGridItemSize {\n x: number;\n y: number;\n}\n\nexport interface NgGridItemPosition {\n col: number;\n row: number;\n}\n\nexport interface NgGridRawPosition {\n left: number;\n top: number;\n}\n\nexport interface NgGridItemDimensions {\n width: number;\n height: number;\n}\n\nexport type ResizeHandle =\n | string\n | {\n bottomright?: string;\n bottomleft?: string;\n topright?: string;\n topleft?: string;\n right?: string;\n left?: string;\n bottom?: string;\n top?: string;\n };\n", + "properties": [ + { + "name": "allow_overlap", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 30 + }, + { + "name": "auto_resize", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 20 + }, + { + "name": "auto_style", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 19 + }, + { + "name": "cascade", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 15 + }, + { + "name": "center_to_screen", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 25 + }, + { + "name": "col_width", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 13 + }, + { + "name": "draggable", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 5 + }, + { + "name": "element_based_row_height", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 27 + }, + { + "name": "fix_collision_position_direction", + "deprecated": false, + "deprecationMessage": "", + "type": "NgConfigFixDirection", + "optional": true, + "description": "", + "line": 29 + }, + { + "name": "fix_item_position_direction", + "deprecated": false, + "deprecationMessage": "", + "type": "NgConfigFixDirection", + "optional": true, + "description": "", + "line": 28 + }, + { + "name": "fix_to_grid", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 18 + }, + { + "name": "limit_to_screen", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 24 + }, + { + "name": "maintain_ratio", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 21 + }, + { + "name": "margins", + "deprecated": false, + "deprecationMessage": "", + "type": "number[]", + "optional": true, + "description": "", + "line": 4 + }, + { + "name": "max_cols", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 7 + }, + { + "name": "max_rows", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 8 + }, + { + "name": "min_cols", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 11 + }, + { + "name": "min_height", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 17 + }, + { + "name": "min_rows", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 12 + }, + { + "name": "min_width", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 16 + }, + { + "name": "prefer_new", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 22 + }, + { + "name": "resizable", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 6 + }, + { + "name": "resize_directions", + "deprecated": false, + "deprecationMessage": "", + "type": "string[]", + "optional": true, + "description": "", + "line": 26 + }, + { + "name": "row_height", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 14 + }, + { + "name": "visible_cols", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 9 + }, + { + "name": "visible_rows", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 10 + }, + { + "name": "zoom_on_drag", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 23 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "NgGridItemConfig", + "id": "interface-NgGridItemConfig-2f66c481a0caefcac1bc61ebad1454ad41fb7df4fbcb9b78f290997966a008fb2c86d14f46dbf947db1c3df9ed7383d9caea259b1d509b841686a6ee49be9d09", + "file": "libs/dot-layout-grid/src/lib/interfaces/INgGrid.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export type NgConfigFixDirection = 'vertical' | 'horizontal' | 'cascade';\n\nexport interface NgGridConfig {\n margins?: number[];\n draggable?: boolean;\n resizable?: boolean;\n max_cols?: number;\n max_rows?: number;\n visible_cols?: number;\n visible_rows?: number;\n min_cols?: number;\n min_rows?: number;\n col_width?: number;\n row_height?: number;\n cascade?: string;\n min_width?: number;\n min_height?: number;\n fix_to_grid?: boolean;\n auto_style?: boolean;\n auto_resize?: boolean;\n maintain_ratio?: boolean;\n prefer_new?: boolean;\n zoom_on_drag?: boolean;\n limit_to_screen?: boolean;\n center_to_screen?: boolean;\n resize_directions?: string[];\n element_based_row_height?: boolean;\n fix_item_position_direction?: NgConfigFixDirection;\n fix_collision_position_direction?: NgConfigFixDirection;\n allow_overlap?: boolean;\n}\n\nexport interface NgGridItemConfig {\n uid?: string;\n payload?: any;\n col?: number;\n row?: number;\n sizex?: number;\n sizey?: number;\n dragHandle?: string;\n resizeHandle?: ResizeHandle;\n fixed?: boolean;\n draggable?: boolean;\n resizable?: boolean;\n borderSize?: number;\n maxCols?: number;\n minCols?: number;\n maxRows?: number;\n minRows?: number;\n minWidth?: number;\n minHeight?: number;\n resizeDirections?: string[];\n}\n\nexport interface NgGridItemEvent {\n uid: string;\n payload: any;\n col: number;\n row: number;\n sizex: number;\n sizey: number;\n width: number;\n height: number;\n left: number;\n top: number;\n}\n\nexport interface NgGridItemSize {\n x: number;\n y: number;\n}\n\nexport interface NgGridItemPosition {\n col: number;\n row: number;\n}\n\nexport interface NgGridRawPosition {\n left: number;\n top: number;\n}\n\nexport interface NgGridItemDimensions {\n width: number;\n height: number;\n}\n\nexport type ResizeHandle =\n | string\n | {\n bottomright?: string;\n bottomleft?: string;\n topright?: string;\n topleft?: string;\n right?: string;\n left?: string;\n bottom?: string;\n top?: string;\n };\n", + "properties": [ + { + "name": "borderSize", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 45 + }, + { + "name": "col", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 36 + }, + { + "name": "draggable", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 43 + }, + { + "name": "dragHandle", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 40 + }, + { + "name": "fixed", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 42 + }, + { + "name": "maxCols", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 46 + }, + { + "name": "maxRows", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 48 + }, + { + "name": "minCols", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 47 + }, + { + "name": "minHeight", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 51 + }, + { + "name": "minRows", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 49 + }, + { + "name": "minWidth", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 50 + }, + { + "name": "payload", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": true, + "description": "", + "line": 35 + }, + { + "name": "resizable", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 44 + }, + { + "name": "resizeDirections", + "deprecated": false, + "deprecationMessage": "", + "type": "string[]", + "optional": true, + "description": "", + "line": 52 + }, + { + "name": "resizeHandle", + "deprecated": false, + "deprecationMessage": "", + "type": "ResizeHandle", + "optional": true, + "description": "", + "line": 41 + }, + { + "name": "row", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 37 + }, + { + "name": "sizex", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 38 + }, + { + "name": "sizey", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 39 + }, + { + "name": "uid", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 34 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "NgGridItemDimensions", + "id": "interface-NgGridItemDimensions-2f66c481a0caefcac1bc61ebad1454ad41fb7df4fbcb9b78f290997966a008fb2c86d14f46dbf947db1c3df9ed7383d9caea259b1d509b841686a6ee49be9d09", + "file": "libs/dot-layout-grid/src/lib/interfaces/INgGrid.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export type NgConfigFixDirection = 'vertical' | 'horizontal' | 'cascade';\n\nexport interface NgGridConfig {\n margins?: number[];\n draggable?: boolean;\n resizable?: boolean;\n max_cols?: number;\n max_rows?: number;\n visible_cols?: number;\n visible_rows?: number;\n min_cols?: number;\n min_rows?: number;\n col_width?: number;\n row_height?: number;\n cascade?: string;\n min_width?: number;\n min_height?: number;\n fix_to_grid?: boolean;\n auto_style?: boolean;\n auto_resize?: boolean;\n maintain_ratio?: boolean;\n prefer_new?: boolean;\n zoom_on_drag?: boolean;\n limit_to_screen?: boolean;\n center_to_screen?: boolean;\n resize_directions?: string[];\n element_based_row_height?: boolean;\n fix_item_position_direction?: NgConfigFixDirection;\n fix_collision_position_direction?: NgConfigFixDirection;\n allow_overlap?: boolean;\n}\n\nexport interface NgGridItemConfig {\n uid?: string;\n payload?: any;\n col?: number;\n row?: number;\n sizex?: number;\n sizey?: number;\n dragHandle?: string;\n resizeHandle?: ResizeHandle;\n fixed?: boolean;\n draggable?: boolean;\n resizable?: boolean;\n borderSize?: number;\n maxCols?: number;\n minCols?: number;\n maxRows?: number;\n minRows?: number;\n minWidth?: number;\n minHeight?: number;\n resizeDirections?: string[];\n}\n\nexport interface NgGridItemEvent {\n uid: string;\n payload: any;\n col: number;\n row: number;\n sizex: number;\n sizey: number;\n width: number;\n height: number;\n left: number;\n top: number;\n}\n\nexport interface NgGridItemSize {\n x: number;\n y: number;\n}\n\nexport interface NgGridItemPosition {\n col: number;\n row: number;\n}\n\nexport interface NgGridRawPosition {\n left: number;\n top: number;\n}\n\nexport interface NgGridItemDimensions {\n width: number;\n height: number;\n}\n\nexport type ResizeHandle =\n | string\n | {\n bottomright?: string;\n bottomleft?: string;\n topright?: string;\n topleft?: string;\n right?: string;\n left?: string;\n bottom?: string;\n top?: string;\n };\n", + "properties": [ + { + "name": "height", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 85 + }, + { + "name": "width", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 84 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "NgGridItemEvent", + "id": "interface-NgGridItemEvent-2f66c481a0caefcac1bc61ebad1454ad41fb7df4fbcb9b78f290997966a008fb2c86d14f46dbf947db1c3df9ed7383d9caea259b1d509b841686a6ee49be9d09", + "file": "libs/dot-layout-grid/src/lib/interfaces/INgGrid.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export type NgConfigFixDirection = 'vertical' | 'horizontal' | 'cascade';\n\nexport interface NgGridConfig {\n margins?: number[];\n draggable?: boolean;\n resizable?: boolean;\n max_cols?: number;\n max_rows?: number;\n visible_cols?: number;\n visible_rows?: number;\n min_cols?: number;\n min_rows?: number;\n col_width?: number;\n row_height?: number;\n cascade?: string;\n min_width?: number;\n min_height?: number;\n fix_to_grid?: boolean;\n auto_style?: boolean;\n auto_resize?: boolean;\n maintain_ratio?: boolean;\n prefer_new?: boolean;\n zoom_on_drag?: boolean;\n limit_to_screen?: boolean;\n center_to_screen?: boolean;\n resize_directions?: string[];\n element_based_row_height?: boolean;\n fix_item_position_direction?: NgConfigFixDirection;\n fix_collision_position_direction?: NgConfigFixDirection;\n allow_overlap?: boolean;\n}\n\nexport interface NgGridItemConfig {\n uid?: string;\n payload?: any;\n col?: number;\n row?: number;\n sizex?: number;\n sizey?: number;\n dragHandle?: string;\n resizeHandle?: ResizeHandle;\n fixed?: boolean;\n draggable?: boolean;\n resizable?: boolean;\n borderSize?: number;\n maxCols?: number;\n minCols?: number;\n maxRows?: number;\n minRows?: number;\n minWidth?: number;\n minHeight?: number;\n resizeDirections?: string[];\n}\n\nexport interface NgGridItemEvent {\n uid: string;\n payload: any;\n col: number;\n row: number;\n sizex: number;\n sizey: number;\n width: number;\n height: number;\n left: number;\n top: number;\n}\n\nexport interface NgGridItemSize {\n x: number;\n y: number;\n}\n\nexport interface NgGridItemPosition {\n col: number;\n row: number;\n}\n\nexport interface NgGridRawPosition {\n left: number;\n top: number;\n}\n\nexport interface NgGridItemDimensions {\n width: number;\n height: number;\n}\n\nexport type ResizeHandle =\n | string\n | {\n bottomright?: string;\n bottomleft?: string;\n topright?: string;\n topleft?: string;\n right?: string;\n left?: string;\n bottom?: string;\n top?: string;\n };\n", + "properties": [ + { + "name": "col", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 58 + }, + { + "name": "height", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 63 + }, + { + "name": "left", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 64 + }, + { + "name": "payload", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": false, + "description": "", + "line": 57 + }, + { + "name": "row", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 59 + }, + { + "name": "sizex", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 60 + }, + { + "name": "sizey", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 61 + }, + { + "name": "top", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 65 + }, + { + "name": "uid", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 56 + }, + { + "name": "width", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 62 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "NgGridItemPosition", + "id": "interface-NgGridItemPosition-2f66c481a0caefcac1bc61ebad1454ad41fb7df4fbcb9b78f290997966a008fb2c86d14f46dbf947db1c3df9ed7383d9caea259b1d509b841686a6ee49be9d09", + "file": "libs/dot-layout-grid/src/lib/interfaces/INgGrid.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export type NgConfigFixDirection = 'vertical' | 'horizontal' | 'cascade';\n\nexport interface NgGridConfig {\n margins?: number[];\n draggable?: boolean;\n resizable?: boolean;\n max_cols?: number;\n max_rows?: number;\n visible_cols?: number;\n visible_rows?: number;\n min_cols?: number;\n min_rows?: number;\n col_width?: number;\n row_height?: number;\n cascade?: string;\n min_width?: number;\n min_height?: number;\n fix_to_grid?: boolean;\n auto_style?: boolean;\n auto_resize?: boolean;\n maintain_ratio?: boolean;\n prefer_new?: boolean;\n zoom_on_drag?: boolean;\n limit_to_screen?: boolean;\n center_to_screen?: boolean;\n resize_directions?: string[];\n element_based_row_height?: boolean;\n fix_item_position_direction?: NgConfigFixDirection;\n fix_collision_position_direction?: NgConfigFixDirection;\n allow_overlap?: boolean;\n}\n\nexport interface NgGridItemConfig {\n uid?: string;\n payload?: any;\n col?: number;\n row?: number;\n sizex?: number;\n sizey?: number;\n dragHandle?: string;\n resizeHandle?: ResizeHandle;\n fixed?: boolean;\n draggable?: boolean;\n resizable?: boolean;\n borderSize?: number;\n maxCols?: number;\n minCols?: number;\n maxRows?: number;\n minRows?: number;\n minWidth?: number;\n minHeight?: number;\n resizeDirections?: string[];\n}\n\nexport interface NgGridItemEvent {\n uid: string;\n payload: any;\n col: number;\n row: number;\n sizex: number;\n sizey: number;\n width: number;\n height: number;\n left: number;\n top: number;\n}\n\nexport interface NgGridItemSize {\n x: number;\n y: number;\n}\n\nexport interface NgGridItemPosition {\n col: number;\n row: number;\n}\n\nexport interface NgGridRawPosition {\n left: number;\n top: number;\n}\n\nexport interface NgGridItemDimensions {\n width: number;\n height: number;\n}\n\nexport type ResizeHandle =\n | string\n | {\n bottomright?: string;\n bottomleft?: string;\n topright?: string;\n topleft?: string;\n right?: string;\n left?: string;\n bottom?: string;\n top?: string;\n };\n", + "properties": [ + { + "name": "col", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 74 + }, + { + "name": "row", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 75 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "NgGridItemSize", + "id": "interface-NgGridItemSize-2f66c481a0caefcac1bc61ebad1454ad41fb7df4fbcb9b78f290997966a008fb2c86d14f46dbf947db1c3df9ed7383d9caea259b1d509b841686a6ee49be9d09", + "file": "libs/dot-layout-grid/src/lib/interfaces/INgGrid.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export type NgConfigFixDirection = 'vertical' | 'horizontal' | 'cascade';\n\nexport interface NgGridConfig {\n margins?: number[];\n draggable?: boolean;\n resizable?: boolean;\n max_cols?: number;\n max_rows?: number;\n visible_cols?: number;\n visible_rows?: number;\n min_cols?: number;\n min_rows?: number;\n col_width?: number;\n row_height?: number;\n cascade?: string;\n min_width?: number;\n min_height?: number;\n fix_to_grid?: boolean;\n auto_style?: boolean;\n auto_resize?: boolean;\n maintain_ratio?: boolean;\n prefer_new?: boolean;\n zoom_on_drag?: boolean;\n limit_to_screen?: boolean;\n center_to_screen?: boolean;\n resize_directions?: string[];\n element_based_row_height?: boolean;\n fix_item_position_direction?: NgConfigFixDirection;\n fix_collision_position_direction?: NgConfigFixDirection;\n allow_overlap?: boolean;\n}\n\nexport interface NgGridItemConfig {\n uid?: string;\n payload?: any;\n col?: number;\n row?: number;\n sizex?: number;\n sizey?: number;\n dragHandle?: string;\n resizeHandle?: ResizeHandle;\n fixed?: boolean;\n draggable?: boolean;\n resizable?: boolean;\n borderSize?: number;\n maxCols?: number;\n minCols?: number;\n maxRows?: number;\n minRows?: number;\n minWidth?: number;\n minHeight?: number;\n resizeDirections?: string[];\n}\n\nexport interface NgGridItemEvent {\n uid: string;\n payload: any;\n col: number;\n row: number;\n sizex: number;\n sizey: number;\n width: number;\n height: number;\n left: number;\n top: number;\n}\n\nexport interface NgGridItemSize {\n x: number;\n y: number;\n}\n\nexport interface NgGridItemPosition {\n col: number;\n row: number;\n}\n\nexport interface NgGridRawPosition {\n left: number;\n top: number;\n}\n\nexport interface NgGridItemDimensions {\n width: number;\n height: number;\n}\n\nexport type ResizeHandle =\n | string\n | {\n bottomright?: string;\n bottomleft?: string;\n topright?: string;\n topleft?: string;\n right?: string;\n left?: string;\n bottom?: string;\n top?: string;\n };\n", + "properties": [ + { + "name": "x", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 69 + }, + { + "name": "y", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 70 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "NgGridRawPosition", + "id": "interface-NgGridRawPosition-2f66c481a0caefcac1bc61ebad1454ad41fb7df4fbcb9b78f290997966a008fb2c86d14f46dbf947db1c3df9ed7383d9caea259b1d509b841686a6ee49be9d09", + "file": "libs/dot-layout-grid/src/lib/interfaces/INgGrid.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export type NgConfigFixDirection = 'vertical' | 'horizontal' | 'cascade';\n\nexport interface NgGridConfig {\n margins?: number[];\n draggable?: boolean;\n resizable?: boolean;\n max_cols?: number;\n max_rows?: number;\n visible_cols?: number;\n visible_rows?: number;\n min_cols?: number;\n min_rows?: number;\n col_width?: number;\n row_height?: number;\n cascade?: string;\n min_width?: number;\n min_height?: number;\n fix_to_grid?: boolean;\n auto_style?: boolean;\n auto_resize?: boolean;\n maintain_ratio?: boolean;\n prefer_new?: boolean;\n zoom_on_drag?: boolean;\n limit_to_screen?: boolean;\n center_to_screen?: boolean;\n resize_directions?: string[];\n element_based_row_height?: boolean;\n fix_item_position_direction?: NgConfigFixDirection;\n fix_collision_position_direction?: NgConfigFixDirection;\n allow_overlap?: boolean;\n}\n\nexport interface NgGridItemConfig {\n uid?: string;\n payload?: any;\n col?: number;\n row?: number;\n sizex?: number;\n sizey?: number;\n dragHandle?: string;\n resizeHandle?: ResizeHandle;\n fixed?: boolean;\n draggable?: boolean;\n resizable?: boolean;\n borderSize?: number;\n maxCols?: number;\n minCols?: number;\n maxRows?: number;\n minRows?: number;\n minWidth?: number;\n minHeight?: number;\n resizeDirections?: string[];\n}\n\nexport interface NgGridItemEvent {\n uid: string;\n payload: any;\n col: number;\n row: number;\n sizex: number;\n sizey: number;\n width: number;\n height: number;\n left: number;\n top: number;\n}\n\nexport interface NgGridItemSize {\n x: number;\n y: number;\n}\n\nexport interface NgGridItemPosition {\n col: number;\n row: number;\n}\n\nexport interface NgGridRawPosition {\n left: number;\n top: number;\n}\n\nexport interface NgGridItemDimensions {\n width: number;\n height: number;\n}\n\nexport type ResizeHandle =\n | string\n | {\n bottomright?: string;\n bottomleft?: string;\n topright?: string;\n topleft?: string;\n right?: string;\n left?: string;\n bottom?: string;\n top?: string;\n };\n", + "properties": [ + { + "name": "left", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 79 + }, + { + "name": "top", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 80 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "OnSaveDeactivate", + "id": "interface-OnSaveDeactivate-83389b8a84066a9fb136ccb56ba30f30073ac06303720fbacbf6c968e3e286780b6828088a3512a8a7cee455f8b235007a316e49ed173de73bf481604d83163b", + "file": "apps/dotcms-ui/src/app/shared/dot-save-on-deactivate-service/save-on-deactivate.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotAlertConfirm } from '../models/dot-alert-confirm/dot-alert-confirm.model';\nimport { Observable } from 'rxjs';\n\nexport interface OnSaveDeactivate {\n shouldSaveBefore(): boolean;\n onDeactivateSave(): Observable;\n getSaveWarningMessages(): DotAlertConfirm;\n}\n", + "properties": [], + "indexSignatures": [], + "kind": 167, + "methods": [ + { + "name": "getSaveWarningMessages", + "args": [], + "optional": false, + "returnType": "DotAlertConfirm", + "typeParameters": [], + "line": 7, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "onDeactivateSave", + "args": [], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 6, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "shouldSaveBefore", + "args": [], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 5, + "deprecated": false, + "deprecationMessage": "" + } + ] + }, + { + "name": "PageModelChangeEvent", + "id": "interface-PageModelChangeEvent-70940f7f351f9e62f5e434b2ae163972beeb943a75c89d4afa1834bc67a00d0a09fd5f50ebc92e4183ca21bf8c6d10f83542cdbac6cf21c8abb417581b56b8ad", + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/dot-edit-content-html/models/page-model-change-event.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotPageContainer } from '@models/dot-page-container/dot-page-container.model';\nimport { PageModelChangeEventType } from './page-model-change-event.type';\n\nexport interface PageModelChangeEvent {\n model: DotPageContainer[];\n type: PageModelChangeEventType;\n}\n", + "properties": [ + { + "name": "model", + "deprecated": false, + "deprecationMessage": "", + "type": "DotPageContainer[]", + "optional": false, + "description": "", + "line": 5 + }, + { + "name": "type", + "deprecated": false, + "deprecationMessage": "", + "type": "PageModelChangeEventType", + "optional": false, + "description": "", + "line": 6 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "PaginationEvent", + "id": "interface-PaginationEvent-fd26d0015e6d1a6b98015d16fc29dd6fe994e040a6a60d56043c783dbb619b4efd11b2aee5b6deaf3ea792a83082caad43cb58f79b2f7ba2abec9ddedd4c759d", + "file": "apps/dotcms-ui/src/app/view/components/_common/searchable-dropdown/component/searchable-dropdown.component.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { debounceTime } from 'rxjs/operators';\nimport {\n Component,\n ElementRef,\n EventEmitter,\n Input,\n Output,\n ViewChild,\n forwardRef,\n SimpleChanges,\n OnChanges,\n OnInit,\n SimpleChange,\n TemplateRef,\n ContentChildren,\n QueryList,\n AfterContentInit,\n AfterViewInit,\n ChangeDetectorRef\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { fromEvent } from 'rxjs';\nimport * as _ from 'lodash';\nimport { OverlayPanel } from 'primeng/overlaypanel';\nimport { DataView } from 'primeng/dataview';\nimport { PrimeTemplate } from 'primeng/api';\n\n/**\n * Dropdown with pagination and global search\n * @export\n * @class SearchableDropdownComponent\n * @implements {ControlValueAccessor}\n */\n@Component({\n providers: [\n {\n multi: true,\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SearchableDropdownComponent)\n }\n ],\n selector: 'dot-searchable-dropdown',\n styleUrls: ['./searchable-dropdown.component.scss'],\n templateUrl: './searchable-dropdown.component.html'\n})\nexport class SearchableDropdownComponent\n implements ControlValueAccessor, OnChanges, OnInit, AfterContentInit, AfterViewInit {\n @Input()\n data: any[];\n\n @Input() action: (action: any) => void;\n\n @Input()\n labelPropertyName: string | string[];\n\n @Input()\n valuePropertyName: string;\n\n @Input()\n pageLinkSize = 3;\n\n @Input()\n rows: number;\n\n @Input()\n cssClass: string;\n\n @Input()\n totalRecords: number;\n\n @Input()\n placeholder = '';\n\n @Input()\n persistentPlaceholder: boolean;\n\n /**\n * Sets the width of the searchable-dropdown button\n *\n * The CSS unit is **required**.\n * @memberof SearchableDropdownComponent\n */\n @Input()\n width = '300px';\n\n /**\n * Sets the width of the searchable-dropdown overlay\n *\n * The CSS unit is **required**.\n * @memberof SearchableDropdownComponent\n */\n @Input()\n overlayWidth = '300px';\n\n @Input()\n multiple: boolean;\n\n @Input()\n disabled = false;\n\n @Input()\n externalItemListTemplate: TemplateRef;\n\n @Input()\n externalFilterTemplate: TemplateRef;\n\n @Output()\n change: EventEmitter = new EventEmitter();\n\n @Output()\n filterChange: EventEmitter = new EventEmitter();\n\n @Output()\n hide: EventEmitter = new EventEmitter();\n\n @Output()\n pageChange: EventEmitter = new EventEmitter();\n\n @Output()\n show: EventEmitter = new EventEmitter();\n\n @ViewChild('searchInput', { static: false })\n searchInput: ElementRef;\n\n @ViewChild('searchPanel', { static: true })\n searchPanelRef: OverlayPanel;\n\n @ViewChild('dataView', { static: true })\n dataViewRef: DataView;\n\n @ViewChild('button')\n button: ElementRef;\n\n @ContentChildren(PrimeTemplate) templates: QueryList;\n\n valueString = '';\n value: any;\n overlayPanelMinHeight: string;\n options: any[];\n label: string;\n externalSelectTemplate: TemplateRef;\n\n keyMap: string[] = [\n 'Shift',\n 'Alt',\n 'Control',\n 'Meta',\n 'ArrowUp',\n 'ArrowDown',\n 'ArrowLeft',\n 'ArrowRight'\n ];\n\n constructor(private cd: ChangeDetectorRef) {}\n\n propagateChange = (_: any) => {};\n\n ngOnChanges(changes: SimpleChanges): void {\n if (this.usePlaceholder(changes.placeholder) || changes.persistentPlaceholder) {\n this.setLabel();\n }\n this.setOptions(changes);\n this.totalRecords = this.totalRecords || this.data?.length;\n }\n\n ngOnInit(): void {}\n\n ngAfterViewInit(): void {\n if (this.searchInput) {\n fromEvent(this.searchInput.nativeElement, 'keyup')\n .pipe(debounceTime(500))\n .subscribe((keyboardEvent: KeyboardEvent) => {\n if (!this.isModifierKey(keyboardEvent.key)) {\n this.filterChange.emit(keyboardEvent.target['value']);\n }\n });\n }\n }\n\n ngAfterContentInit() {\n this.totalRecords = this.totalRecords || this.data?.length;\n this.templates.forEach((item: PrimeTemplate) => {\n if (item.getType() === 'listItem') {\n this.externalItemListTemplate = item.template;\n } else if (item.getType() === 'select') {\n this.externalSelectTemplate = item.template;\n }\n });\n }\n\n /**\n * Emits hide event and clears any value on filter's input\n *\n * @memberof SearchableDropdownComponent\n */\n hideOverlayHandler(): void {\n if (this.searchInput?.nativeElement.value.length) {\n this.searchInput.nativeElement.value = '';\n this.paginate(null);\n }\n this.hide.emit();\n }\n\n /**\n * Emits show event, sets height of overlay panel based on content\n * and add css class if paginator present\n *\n * @memberof SearchableDropdownComponent\n */\n showOverlayHandler(): void {\n const cssClass =\n this.totalRecords > this.rows\n ? ' searchable-dropdown paginator'\n : ' searchable-dropdown';\n if (typeof this.cssClass === 'undefined') {\n this.cssClass = cssClass;\n } else {\n this.cssClass += cssClass;\n }\n setTimeout(() => {\n if (!this.overlayPanelMinHeight) {\n this.overlayPanelMinHeight = this.searchPanelRef.container\n .getBoundingClientRect()\n .height.toString();\n }\n }, 0);\n this.show.emit();\n this.dataViewRef.paginate({\n first: 0,\n rows: this.rows\n });\n }\n\n /**\n * Call when the current page is changed\n *\n * @param {PaginationEvent} event\n * @memberof SearchableDropdownComponent\n */\n paginate(event: PaginationEvent): void {\n const paginationEvent = Object.assign({}, event);\n if (this.searchInput) {\n paginationEvent.filter = this.searchInput.nativeElement.value;\n }\n this.pageChange.emit(paginationEvent);\n }\n\n /**\n * Write a new value to the element\n * @param * value\n * @memberof SearchableDropdownComponent\n */\n writeValue(value: any): void {\n this.setValue(value);\n }\n\n /**\n * Set the function to be called when the control receives a change event.\n *\n * @param {*} fn\n * @memberof SearchableDropdownComponent\n */\n registerOnChange(fn): void {\n this.propagateChange = fn;\n }\n\n registerOnTouched(): void {}\n\n /**\n * Get labels from container, if labelPropertyName is an array then loop through it and returns\n * a string containing the labels joining by \"-\" if is not just returns a label\n *\n * @param {*} dropDownItem\n * @returns {string}\n * @memberof SearchableDropdownComponent\n */\n getItemLabel(dropDownItem: any): string {\n let resultProps;\n\n if (Array.isArray(this.labelPropertyName)) {\n resultProps = this.labelPropertyName.map((item) => {\n if (item.indexOf('.') > -1) {\n let propertyName;\n item.split('.').forEach((nested) => {\n propertyName = propertyName ? propertyName[nested] : dropDownItem[nested];\n });\n\n return propertyName;\n }\n\n return dropDownItem[item];\n });\n\n return resultProps.join(' - ');\n } else {\n return dropDownItem[this.labelPropertyName];\n }\n }\n\n /**\n * Call when a option is clicked, if this option is not the same of the current value then the\n * change events is emitted. If multiple is true allow to emit the same value.\n *\n * @param {*} item\n * @memberof SearchableDropdownComponent\n */\n handleClick(item: any): void {\n if (this.value !== item || this.multiple) {\n this.setValue(item);\n this.propagateChange(this.getValueToPropagate());\n this.change.emit(Object.assign({}, this.value));\n }\n\n this.toggleOverlayPanel();\n }\n\n /**\n * Shows or hide the list of options.\n *\n * @param {MouseEvent} [$event]\n * @memberof SearchableDropdownComponent\n */\n toggleOverlayPanel($event?: MouseEvent): void {\n $event ? this.searchPanelRef.toggle($event) : this.searchPanelRef.hide();\n }\n\n /**\n * Disabled the component, for more information see:\n * {@link https://angular.io/api/forms/ControlValueAccessor#setdisabledstate}\n *\n * @param {boolean} isDisabled if it is true the component is disabled\n * @memberof SearchableDropdownComponent\n */\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n /**\n * Resets height value from Overlay Panel\n *\n * @memberof SearchableDropdownComponent\n */\n resetPanelMinHeight(): void {\n this.overlayPanelMinHeight = '';\n }\n\n private setLabel(): void {\n this.valueString = this.value\n ? this.value[this.getValueLabelPropertyName()]\n : this.placeholder;\n this.label = this.persistentPlaceholder ? this.placeholder : this.valueString;\n this.cd.markForCheck();\n }\n\n private setOptions(change: SimpleChanges): void {\n if (change.data && change.data.currentValue) {\n this.options = _.cloneDeep(change.data.currentValue).map((item) => {\n item.label = this.getItemLabel(item);\n return item;\n });\n }\n }\n\n private isModifierKey(key: string): boolean {\n return this.keyMap.includes(key);\n }\n\n private usePlaceholder(placeholderChange: SimpleChange): boolean {\n return placeholderChange && placeholderChange.currentValue && !this.value;\n }\n\n private setValue(newValue: any): void {\n this.value = newValue;\n\n this.setLabel();\n }\n\n private getValueLabelPropertyName(): string {\n return Array.isArray(this.labelPropertyName)\n ? this.labelPropertyName[0]\n : this.labelPropertyName;\n }\n\n private getValueToPropagate(): string {\n return !this.valuePropertyName ? this.value : this.value[this.valuePropertyName];\n }\n}\n\nexport interface PaginationEvent {\n first: number; // Index of the first record\n filter: string;\n page: number; // Index of the new page\n pageCount: number; // Total number of pages\n rows: number; // Number of rows to display in new page\n}\n", + "properties": [ + { + "name": "filter", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 391 + }, + { + "name": "first", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 390 + }, + { + "name": "page", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 392 + }, + { + "name": "pageCount", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 393 + }, + { + "name": "rows", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 394 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "Param", + "id": "interface-Param-07d750ccd8e423821996f4b14b8fa93aca2f6dbb7ff7ea2b5dcf82bbbfec5c5d287490ce137fcf2d08b05a6e61172dc1ccfaac4f2051f2f171f9402f60857d10", + "file": "libs/dot-rules/src/lib/custom-types/visitors-location/visitors-location.container.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy } from '@angular/core';\nimport { DecimalPipe } from '@angular/common';\nimport { FormControl } from '@angular/forms';\nimport { ServerSideFieldModel } from '../../services/ServerSideFieldModel';\nimport { Observable, BehaviorSubject } from 'rxjs';\nimport { I18nService } from '../.././services/system/locale/I18n';\nimport { LoggerService } from '@dotcms/dotcms-js';\nimport { GCircle } from '../../models/gcircle.model';\n\ninterface Param {\n key: string;\n priority?: number;\n value: T;\n}\n\ninterface VisitorsLocationParams {\n comparison: Param;\n latitude: Param;\n longitude: Param;\n radius: Param;\n preferredDisplayUnits: Param;\n}\n\nconst I8N_BASE = 'api.sites.ruleengine';\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [DecimalPipe],\n selector: 'cw-visitors-location-container',\n template: ` `\n})\nexport class VisitorsLocationContainer {\n @Input() componentInstance: ServerSideFieldModel;\n\n @Output()\n parameterValuesChange: EventEmitter<{ name: string; value: string }[]> = new EventEmitter(\n false\n );\n\n circle$: BehaviorSubject = new BehaviorSubject({\n center: { lat: 38.89, lng: -77.04 },\n radius: 10000\n });\n apiKey: string;\n preferredUnit = 'm';\n\n lat = 0;\n lng = 0;\n radius = 50000;\n comparisonValue = 'within';\n comparisonControl: FormControl;\n comparisonOptions: { value: string; label: Observable; icon: string }[];\n fromLabel = 'of';\n\n private _rsrcCache: { [key: string]: Observable };\n\n constructor(\n public resources: I18nService,\n public decimalPipe: DecimalPipe,\n private loggerService: LoggerService\n ) {\n resources.get(I8N_BASE).subscribe((_rsrc) => {});\n this._rsrcCache = {};\n\n this.circle$.subscribe(\n (_e) => {},\n (e) => {\n loggerService.error('VisitorsLocationContainer', 'Error updating area', e);\n },\n () => {}\n );\n }\n\n rsrc(subkey: string): Observable {\n let x = this._rsrcCache[subkey];\n if (!x) {\n x = this.resources.get(subkey);\n this._rsrcCache[subkey] = x;\n }\n return x;\n }\n\n ngOnChanges(change): void {\n if (change.componentInstance && this.componentInstance != null) {\n const temp: any = this.componentInstance.parameters;\n const params: VisitorsLocationParams = temp as VisitorsLocationParams;\n const comparisonDef = this.componentInstance.parameterDefs['comparison'];\n\n const opts = comparisonDef.inputType['options'];\n const i18nBaseKey = comparisonDef.i18nBaseKey || this.componentInstance.type.i18nKey;\n const rsrcKey = i18nBaseKey + '.inputs.comparison.';\n const optsAry = Object.keys(opts).map((key) => {\n const sOpt = opts[key];\n return {\n value: sOpt.value,\n label: this.rsrc(rsrcKey + sOpt.i18nKey),\n icon: sOpt.icon\n };\n });\n\n this.comparisonValue = params.comparison.value || comparisonDef.defaultValue;\n this.comparisonOptions = optsAry;\n this.comparisonControl = ServerSideFieldModel.createNgControl(\n this.componentInstance,\n 'comparison'\n );\n\n this.lat = parseFloat(params.latitude.value) || this.lat;\n this.lng = parseFloat(params.longitude.value) || this.lng;\n this.radius = parseFloat(params.radius.value) || 50000;\n this.preferredUnit =\n params.preferredDisplayUnits.value ||\n this.componentInstance.parameterDefs['preferredDisplayUnits'].defaultValue;\n\n this.circle$.next({ center: { lat: this.lat, lng: this.lng }, radius: this.radius });\n }\n }\n\n onComparisonChange(value: string): void {\n this.parameterValuesChange.emit([{ name: 'comparison', value }]);\n }\n\n onUpdate(circle: GCircle): void {\n this.loggerService.info('App', 'onUpdate', circle);\n this.parameterValuesChange.emit([\n { name: 'latitude', value: circle.center.lat + '' },\n { name: 'longitude', value: circle.center.lng + '' },\n { name: 'radius', value: circle.radius + '' }\n ]);\n\n this.lat = circle.center.lat;\n this.lng = circle.center.lng;\n this.radius = circle.radius;\n this.circle$.next(circle);\n }\n}\n", + "properties": [ + { + "name": "key", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 11 + }, + { + "name": "priority", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 12 + }, + { + "name": "value", + "deprecated": false, + "deprecationMessage": "", + "type": "T", + "optional": false, + "description": "", + "line": 13 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "ParameterChangeEvent", + "id": "interface-ParameterChangeEvent-0b1711c16d9f15e40a82a786230a6640be390785b85223d758ab5ed0bf1c9a9e698359f37bf80cea0ea3fb29b356bb2d1e4036a1bcd9ab8d0859a2634da11f8f", + "file": "libs/dot-rules/src/lib/rule-engine.container.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { from as observableFrom, Observable, merge, Subject } from 'rxjs';\nimport { reduce, mergeMap, take, map, filter, takeUntil } from 'rxjs/operators';\n// tslint:disable-next-line:max-file-line-count\nimport { Component, EventEmitter, ViewEncapsulation, OnDestroy } from '@angular/core';\nimport {\n RuleModel,\n RuleService,\n ConditionGroupModel,\n ConditionModel,\n ActionModel,\n RuleEngineState\n} from './services/Rule';\nimport { CwChangeEvent } from './services/util/CwEvent';\nimport { ServerSideFieldModel, ServerSideTypeModel } from './services/ServerSideFieldModel';\nimport { ConditionService } from './services/Condition';\nimport { ActionService } from './services/Action';\nimport { ConditionGroupService } from './services/ConditionGroup';\nimport { CwError } from '@dotcms/dotcms-js';\nimport { BundleService, IPublishEnvironment } from './services/bundle-service';\nimport { ActivatedRoute, Params } from '@angular/router';\nimport { HttpCode } from '@dotcms/dotcms-js';\nimport { LoggerService } from '@dotcms/dotcms-js';\nimport { RuleViewService } from './services/dot-view-rule-service';\n\nexport interface ParameterChangeEvent extends CwChangeEvent {\n rule?: RuleModel;\n source?: ServerSideFieldModel;\n name: string;\n value: string;\n}\n\nexport interface TypeChangeEvent extends CwChangeEvent {\n rule?: RuleModel;\n source: ServerSideFieldModel;\n value: any;\n index: number;\n}\n\nexport interface RuleActionEvent {\n type: string;\n payload: {\n rule?: RuleModel;\n value?: string | boolean;\n };\n}\nexport interface RuleActionActionEvent extends RuleActionEvent {\n payload: {\n rule?: RuleModel;\n value?: string | boolean;\n ruleAction?: ActionModel;\n index?: number;\n name?: string;\n };\n}\nexport interface ConditionGroupActionEvent extends RuleActionEvent {\n payload: {\n rule?: RuleModel;\n value?: string | boolean;\n conditionGroup?: ConditionGroupModel;\n index?: number;\n priority?: number;\n };\n}\nexport interface ConditionActionEvent extends RuleActionEvent {\n payload: {\n rule?: RuleModel;\n value?: string | boolean;\n condition?: ConditionModel;\n conditionGroup?: ConditionGroupModel;\n index?: number;\n name?: string;\n type?: string;\n };\n}\n\n/**\n *\n */\n@Component({\n encapsulation: ViewEncapsulation.None,\n selector: 'cw-rule-engine-container',\n styleUrls: ['./styles/rule-engine.scss', './styles/angular-material.layouts.scss'],\n template: `\n \n `\n})\nexport class RuleEngineContainer implements OnDestroy {\n rules: RuleModel[];\n state: RuleEngineState = new RuleEngineState();\n\n environments: IPublishEnvironment[] = [];\n\n rules$: EventEmitter = new EventEmitter();\n ruleActions$: EventEmitter = new EventEmitter();\n conditionGroups$: EventEmitter = new EventEmitter();\n globalError: string;\n pageId: string;\n isContentletHost: boolean;\n\n private destroy$: Subject = new Subject();\n\n constructor(\n public _ruleService: RuleService,\n private _ruleActionService: ActionService,\n private _conditionGroupService: ConditionGroupService,\n private _conditionService: ConditionService,\n public bundleService: BundleService,\n private route: ActivatedRoute,\n private loggerService: LoggerService,\n private ruleViewService: RuleViewService\n ) {\n this.rules$.subscribe((rules) => {\n this.rules = rules;\n });\n\n this.bundleService\n .loadPublishEnvironments()\n .pipe(take(1))\n .subscribe((environments) => (this.environments = environments));\n this.initRules();\n\n this._ruleService._errors$.subscribe((res) => {\n this.ruleViewService.showErrorMessage(\n res.message,\n false,\n res.response.headers.get('error-key')\n );\n this.state.loading = false;\n this.state.showRules = false;\n });\n\n merge(\n this._ruleActionService.error,\n this._conditionGroupService.error,\n this._conditionService.error\n )\n .pipe(takeUntil(this.destroy$))\n .subscribe((message: string) => {\n this.ruleViewService.showErrorMessage(message);\n\n this.initRules();\n });\n }\n\n alphaSort(key): (a, b) => number {\n return (a, b) => {\n let x;\n if (a[key] > b[key]) {\n x = 1;\n } else if (a[key] < b[key]) {\n x = -1;\n } else {\n x = 0;\n }\n return x;\n };\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.complete();\n }\n\n /**\n *\n * @param event\n */\n onCreateRule(event): void {\n this.loggerService.info('RuleEngineContainer', 'onCreateRule', event);\n const priority = this.rules.length ? this.rules[0].priority + 1 : 1;\n const rule = new RuleModel({ priority });\n const group = new ConditionGroupModel({ operator: 'AND', priority: 1 });\n group._conditions.push(new ConditionModel({ _type: new ServerSideTypeModel() }));\n rule._conditionGroups.push(group);\n const action = new ActionModel(null, new ServerSideTypeModel());\n action._owningRule = rule;\n rule._ruleActions.push(action);\n rule._saved = false;\n rule._expanded = false;\n this.rules$.emit([rule].concat(this.rules));\n }\n\n onDeleteRule(event: RuleActionEvent): void {\n const rule = event.payload.rule;\n rule._deleting = true;\n this.state.deleting = true;\n if (rule.isPersisted()) {\n this._ruleService.deleteRule(rule.key).subscribe(\n (_result) => {\n this.state.deleting = false;\n const rules = this.rules.filter((arrayRule) => arrayRule.key !== rule.key);\n this.rules$.emit(rules);\n },\n (e: CwError) => {\n this._handle403Error(e) ? null : { invalid: e.message };\n }\n );\n }\n }\n\n onUpdateEnabledState(event: RuleActionEvent): void {\n event.payload.rule.enabled = event.payload.value;\n this.patchRule(event.payload.rule, false);\n }\n\n onUpdateRuleName(event: RuleActionEvent): void {\n event.payload.rule.name = event.payload.value;\n this.patchRule(event.payload.rule, false);\n }\n\n onUpdateFireOn(event: RuleActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onUpdateFireOn', event);\n event.payload.rule.fireOn = event.payload.value;\n this.patchRule(event.payload.rule, false);\n }\n\n onUpdateExpandedState(event: RuleActionEvent): void {\n const rule = event.payload.rule;\n rule._expanded = event.payload.value;\n if (rule._expanded) {\n let obs2: Observable;\n if (rule._conditionGroups.length === 0) {\n const obs: Observable<\n ConditionGroupModel[]\n > = this._conditionGroupService.allAsArray(\n rule.key,\n Object.keys(rule.conditionGroups)\n );\n obs2 = obs.pipe(\n mergeMap((groups: ConditionGroupModel[]) => observableFrom(groups))\n );\n } else {\n obs2 = observableFrom(rule._conditionGroups);\n }\n\n const obs3: Observable = obs2.pipe(\n mergeMap(\n (group: ConditionGroupModel) =>\n this._conditionService.listForGroup(\n group,\n this._ruleService._conditionTypes\n ),\n (group: ConditionGroupModel, conditions: ConditionModel[]) => {\n if (conditions) {\n conditions.forEach((condition: ConditionModel) => {\n condition.type = this._ruleService._conditionTypes[\n condition.conditionlet\n ];\n });\n }\n group._conditions = conditions;\n return group;\n }\n )\n );\n\n const obs4: Observable = obs3.pipe(\n reduce((acc: ConditionGroupModel[], group: ConditionGroupModel) => {\n acc.push(group);\n return acc;\n }, [])\n );\n\n obs4.subscribe(\n (groups: ConditionGroupModel[]) => {\n rule._conditionGroups = groups;\n if (rule._conditionGroups.length === 0) {\n this.loggerService.info(\n 'RuleEngineContainer',\n 'conditionGroups',\n 'Add stub group'\n );\n const group = new ConditionGroupModel({ operator: 'AND', priority: 1 });\n group._conditions.push(\n new ConditionModel({\n _type: new ServerSideTypeModel(),\n operator: 'AND',\n priority: 1\n })\n );\n rule._conditionGroups.push(group);\n } else {\n rule._conditionGroups.sort(this.prioritySortFn);\n rule._conditionGroups.forEach((group: ConditionGroupModel) => {\n group._conditions.sort(this.prioritySortFn);\n if (group._conditions.length === 0) {\n group._conditions.push(\n new ConditionModel({\n _type: new ServerSideTypeModel(),\n operator: 'AND',\n priority: 1\n })\n );\n }\n });\n }\n },\n (e) => {\n this.loggerService.error('RuleEngineContainer', e);\n }\n );\n\n if (rule._ruleActions.length === 0) {\n this._ruleActionService\n .allAsArray(\n rule.key,\n Object.keys(rule.ruleActions),\n this._ruleService._ruleActionTypes\n )\n .subscribe((actions) => {\n rule._ruleActions = actions;\n if (rule._ruleActions.length === 0) {\n const action = new ActionModel(null, new ServerSideTypeModel(), 1);\n rule._ruleActions.push(action);\n rule._ruleActions.sort(this.prioritySortFn);\n } else {\n rule._ruleActions.sort(this.prioritySortFn);\n }\n });\n }\n }\n }\n\n onCreateRuleAction(event: RuleActionActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onCreateRuleAction', event);\n const rule = event.payload.rule;\n const priority = rule._ruleActions.length\n ? rule._ruleActions[rule._ruleActions.length - 1].priority + 1\n : 1;\n const entity = new ActionModel(null, new ServerSideTypeModel(), priority);\n\n this.patchRule(rule, true);\n rule._ruleActions.push(entity);\n rule._saved = false;\n }\n\n onDeleteRuleAction(event: RuleActionActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onDeleteRuleAction', event);\n const rule = event.payload.rule;\n const ruleAction = event.payload.ruleAction;\n if (ruleAction.isPersisted()) {\n this._ruleActionService.remove(rule.key, ruleAction).subscribe((_result) => {\n rule._ruleActions = rule._ruleActions.filter((aryAction) => {\n return aryAction.key !== ruleAction.key;\n });\n if (rule._ruleActions.length === 0) {\n rule._ruleActions.push(new ActionModel(null, new ServerSideTypeModel(), 1));\n }\n });\n }\n }\n\n onUpdateRuleActionType(event: RuleActionActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onUpdateRuleActionType');\n try {\n const ruleAction = event.payload.ruleAction;\n const rule = event.payload.rule;\n const idx = event.payload.index;\n const type: ServerSideTypeModel = this._ruleService._ruleActionTypes[\n event.payload.value\n ];\n rule._ruleActions[idx] = new ActionModel(ruleAction.key, type, ruleAction.priority);\n this.patchAction(rule, ruleAction);\n } catch (e) {\n this.loggerService.error('RuleComponent', 'onActionTypeChange', e);\n }\n }\n\n onUpdateRuleActionParameter(event: RuleActionActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onUpdateRuleActionParameter');\n const ruleAction = event.payload.ruleAction;\n ruleAction.setParameter(event.payload.name, event.payload.value);\n this.patchAction(event.payload.rule, ruleAction);\n }\n\n onCreateConditionGroup(event: ConditionGroupActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onCreateConditionGroup');\n const rule = event.payload.rule;\n const priority = rule._conditionGroups.length\n ? rule._conditionGroups[rule._conditionGroups.length - 1].priority + 1\n : 1;\n const group = new ConditionGroupModel({ operator: 'AND', priority: priority });\n group._conditions.push(\n new ConditionModel({ _type: new ServerSideTypeModel(), operator: 'AND', priority: 1 })\n );\n rule._conditionGroups.push(group);\n rule._conditionGroups.sort(this.prioritySortFn);\n }\n\n onUpdateConditionGroupOperator(event: ConditionGroupActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onUpdateConditionGroupOperator');\n const group = event.payload.conditionGroup;\n group.operator = event.payload.value;\n if (group.key != null) {\n this.patchConditionGroup(event.payload.rule, group);\n this.patchRule(event.payload.rule);\n }\n }\n\n onDeleteConditionGroup(event: ConditionGroupActionEvent): void {\n const rule = event.payload.rule;\n const group = event.payload.conditionGroup;\n this._conditionGroupService.remove(rule.key, group).subscribe();\n rule._conditionGroups = rule._conditionGroups.filter(\n (aryGroup) => aryGroup.key !== group.key\n );\n }\n\n onCreateCondition(event: ConditionActionEvent): void {\n const rule = event.payload.rule;\n this.ruleUpdating(rule, true);\n try {\n const group = event.payload.conditionGroup;\n const priority = group._conditions.length\n ? group._conditions[group._conditions.length - 1].priority + 1\n : 1;\n const entity = new ConditionModel({\n _type: new ServerSideTypeModel(),\n operator: 'AND',\n priority: priority\n });\n group._conditions.push(entity);\n this.ruleUpdated(rule);\n } catch (e) {\n this.loggerService.error('RuleEngineContainer', 'onCreateCondition', e);\n this.ruleUpdated(rule, [{ unhandledError: e }]);\n }\n }\n\n onUpdateConditionType(event: ConditionActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onUpdateConditionType');\n try {\n let condition = event.payload.condition;\n const group = event.payload.conditionGroup;\n const rule = event.payload.rule;\n const idx = event.payload.index;\n const type: ServerSideTypeModel = this._ruleService._conditionTypes[\n event.payload.value\n ];\n // replace the condition rather than mutate it to force event for 'onPush' NG2 components.\n condition = new ConditionModel({\n _type: type,\n id: condition.key,\n operator: condition.operator,\n priority: condition.priority\n });\n group._conditions[idx] = condition;\n this.patchCondition(rule, group, condition);\n } catch (e) {\n this.loggerService.error('RuleComponent', 'onActionTypeChange', e);\n }\n }\n\n onUpdateConditionParameter(event: ConditionActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onUpdateConditionParameter');\n const condition = event.payload.condition;\n condition.setParameter(event.payload.name, event.payload.value);\n this.patchCondition(event.payload.rule, event.payload.conditionGroup, condition);\n }\n\n onUpdateConditionOperator(event: ConditionActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onUpdateConditionOperator');\n const condition = event.payload.condition;\n condition.operator = event.payload.value;\n this.patchCondition(event.payload.rule, event.payload.conditionGroup, condition);\n }\n\n onDeleteCondition(event: ConditionActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onDeleteCondition', event);\n const rule = event.payload.rule;\n const group = event.payload.conditionGroup;\n const condition = event.payload.condition;\n if (condition.isPersisted()) {\n this._conditionService.remove(condition).subscribe((_result) => {\n group._conditions = group._conditions.filter((aryCondition) => {\n return aryCondition.key !== condition.key;\n });\n if (group._conditions.length === 0) {\n this.loggerService.info(\n 'RuleEngineContainer',\n 'condition',\n 'Remove Condition and remove Groups is empty'\n );\n this._conditionGroupService.remove(rule.key, group).subscribe();\n rule._conditionGroups = rule._conditionGroups.filter(\n (aryGroup) => aryGroup.key !== group.key\n );\n }\n if (rule._conditionGroups.length === 0) {\n this.loggerService.info(\n 'RuleEngineContainer',\n 'conditionGroups',\n 'Add stub group if Groups are empty'\n );\n const conditionGroup = new ConditionGroupModel({\n operator: 'AND',\n priority: 1\n });\n conditionGroup._conditions.push(\n new ConditionModel({\n _type: new ServerSideTypeModel(),\n operator: 'AND',\n priority: 1\n })\n );\n rule._conditionGroups.push(conditionGroup);\n }\n });\n }\n }\n\n ruleUpdating(rule, disable = true): void {\n if (disable && rule.enabled && rule.key) {\n this.loggerService.info(\n 'RuleEngineContainer',\n 'ruleUpdating',\n 'disabling rule due for edit.'\n );\n this.patchRule(rule, disable);\n }\n rule._saved = false;\n rule._saving = true;\n rule._errors = null;\n }\n\n ruleUpdated(rule: RuleModel, errors?: { [key: string]: any }): void {\n rule._saving = false;\n if (!errors) {\n rule._saved = true;\n } else {\n this.loggerService.error(errors);\n rule._errors = errors;\n }\n }\n\n patchConditionGroup(rule: RuleModel, group: ConditionGroupModel, disable = true): void {\n this.ruleUpdating(rule, false);\n if (disable && rule.enabled) {\n rule.enabled = false;\n }\n this._conditionGroupService\n .updateConditionGroup(rule.key, group)\n .subscribe((_result) => {});\n }\n\n patchRule(rule: RuleModel, disable = true): void {\n this.ruleUpdating(rule, false);\n if (disable && rule.enabled) {\n rule.enabled = false;\n }\n if (rule.isValid()) {\n if (rule.isPersisted()) {\n this._ruleService.updateRule(rule.key, rule).subscribe(\n () => {\n this.ruleUpdated(rule);\n },\n (e: CwError) => {\n const ruleError = this._handle403Error(e) ? null : { invalid: e.message };\n this.ruleUpdated(rule, ruleError);\n this.initRules();\n }\n );\n } else {\n this._ruleService.createRule(rule).subscribe(\n () => {\n this.ruleUpdated(rule);\n },\n (e: CwError) => {\n const ruleError = this._handle403Error(e) ? null : { invalid: e.message };\n this.ruleUpdated(rule, ruleError);\n this.initRules();\n }\n );\n }\n } else {\n this.ruleUpdated(rule, {\n invalid: 'Cannot save, rule is not valid.'\n });\n }\n }\n\n patchAction(rule: RuleModel, ruleAction: ActionModel): void {\n if (ruleAction.isValid()) {\n this.ruleUpdating(rule, false);\n if (!ruleAction.isPersisted()) {\n this._ruleActionService.createRuleAction(rule.key, ruleAction).subscribe(\n (_) => {\n this.ruleUpdated(rule);\n },\n (e: CwError) => {\n const ruleError = this._handle403Error(e) ? null : { invalid: e.message };\n this.ruleUpdated(rule, ruleError);\n }\n );\n } else {\n this._ruleActionService.updateRuleAction(rule.key, ruleAction).subscribe(\n (_result) => {\n this.ruleUpdated(rule);\n },\n (e: any) => {\n const ruleError = this._handle403Error(e) ? null : { invalid: e.message };\n this.ruleUpdated(rule, ruleError);\n }\n );\n }\n } else {\n this.ruleUpdating(rule);\n this.ruleUpdated(rule, {\n invalid: 'Cannot save, action is not valid.'\n });\n }\n }\n\n patchCondition(rule: RuleModel, group: ConditionGroupModel, condition: ConditionModel): void {\n try {\n if (condition.isValid()) {\n this.ruleUpdating(rule, false);\n if (condition.isPersisted()) {\n this._conditionService.save(group.key, condition).subscribe(\n (_result) => {\n this.ruleUpdated(rule);\n },\n (e: any) => {\n const ruleError = this._handle403Error(e)\n ? null\n : { invalid: e.message };\n this.ruleUpdated(rule, ruleError);\n }\n );\n } else {\n if (!group.isPersisted()) {\n this._conditionGroupService\n .createConditionGroup(rule.key, group)\n .subscribe((_foo) => {\n this._conditionService.add(group.key, condition).subscribe(\n () => {\n group.conditions[condition.key] = true;\n this.ruleUpdated(rule);\n },\n (e: CwError) => {\n const ruleError = this._handle403Error(e)\n ? null\n : { invalid: e.message };\n this.ruleUpdated(rule, ruleError);\n }\n );\n });\n } else {\n this._conditionService.add(group.key, condition).subscribe(\n () => {\n group.conditions[condition.key] = true;\n this.ruleUpdated(rule);\n },\n (e: CwError) => {\n const ruleError = this._handle403Error(e)\n ? null\n : { invalid: e.message };\n this.ruleUpdated(rule, ruleError);\n }\n );\n }\n }\n } else {\n this.ruleUpdating(rule);\n this.loggerService.info('RuleEngineContainer', 'patchCondition', 'Not valid');\n rule._saving = false;\n rule._errors = { invalid: 'Condition not valid.' };\n }\n } catch (e) {\n this.loggerService.error(e);\n this.ruleUpdated(rule, { invalid: e.message });\n }\n }\n\n prioritySortFn(a: any, b: any): number {\n return a.priority - b.priority;\n }\n\n private initRules(): void {\n this.state.loading = true;\n\n this.pageId = '';\n\n const pageIdParams = this.route.params.pipe(map((params: Params) => params.pageId));\n const queryParams = this.route.queryParams.pipe(map((params: Params) => params.realmId));\n\n merge(pageIdParams, queryParams)\n .pipe(\n filter((res) => !!res),\n take(1)\n )\n .subscribe((id: string) => {\n this.pageId = id;\n });\n\n this._ruleService.requestRules(this.pageId);\n this._ruleService\n .loadRules()\n .pipe(takeUntil(this.destroy$))\n .subscribe((rules: RuleModel[]) => {\n this.loadRules(rules);\n });\n this.route.queryParams\n .pipe(take(1))\n .subscribe(\n (params: Params) => (this.isContentletHost = params.isContentletHost === 'true')\n );\n }\n\n private loadRules(rules: RuleModel[]): void {\n rules.sort((a, b) => {\n return b.priority - a.priority;\n });\n this.rules$.emit(rules);\n this.state.loading = false;\n }\n\n private _handle403Error(e: CwError): boolean {\n let handled = false;\n try {\n if (e && e.response.status === HttpCode.FORBIDDEN) {\n const errorJson = e.response;\n if (errorJson && errorJson.error) {\n this.ruleViewService.showErrorMessage(\n errorJson.error.message.replace('dotcms.api.error.forbidden: ', '')\n );\n handled = true;\n }\n }\n } catch (e) {\n this.loggerService.error('Error while processing invalid response: ', e);\n }\n\n this.initRules();\n\n return handled;\n }\n}\n", + "properties": [ + { + "name": "name", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 28 + }, + { + "name": "rule", + "deprecated": false, + "deprecationMessage": "", + "type": "RuleModel", + "optional": true, + "description": "", + "line": 26 + }, + { + "name": "source", + "deprecated": false, + "deprecationMessage": "", + "type": "ServerSideFieldModel", + "optional": true, + "description": "", + "line": 27 + }, + { + "name": "value", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 29 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [], + "extends": "CwChangeEvent" + }, + { + "name": "ParameterModel", + "id": "interface-ParameterModel-8f232ed692d1321772b6574ee6b791326e4fc680e18453769d4a7869b2979ba14e4523f2c8ada062f260edf3547a6b0a32ba1550b39c318f14b24054c04e39a3", + "file": "libs/dot-rules/src/lib/services/Rule.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { from as observableFrom, Subject } from 'rxjs';\n\nimport { mergeMap, reduce, map, tap } from 'rxjs/operators';\n// tslint:disable-next-line:max-file-line-count\nimport { Injectable } from '@angular/core';\nimport { Observable, BehaviorSubject } from 'rxjs';\n\nimport { ApiRoot } from '@dotcms/dotcms-js';\nimport { ServerSideFieldModel, ServerSideTypeModel } from './ServerSideFieldModel';\nimport { CoreWebService } from '@dotcms/dotcms-js';\nimport { SiteService } from '@dotcms/dotcms-js';\nimport { CwError } from '@dotcms/dotcms-js';\nimport { I18nService } from './system/locale/I18n';\nimport { HttpResponse } from '@angular/common/http';\n\nexport const RULE_CREATE = 'RULE_CREATE';\nexport const RULE_DELETE = 'RULE_DELETE';\nexport const RULE_UPDATE_NAME = 'RULE_UPDATE_NAME';\nexport const RULE_UPDATE_ENABLED_STATE = 'RULE_UPDATE_ENABLED_STATE';\n\nexport const V_RULE_UPDATE_EXPANDED_STATE = 'V_RULE_UPDATE_EXPANDED_STATE';\n\nexport const RULE_UPDATE_FIRE_ON = 'RULE_UPDATE_FIRE_ON';\n\nexport const RULE_RULE_ACTION_CREATE = 'RULE_RULE_ACTION_CREATE';\nexport const RULE_RULE_ACTION_DELETE = 'RULE_RULE_ACTION_DELETE';\nexport const RULE_RULE_ACTION_UPDATE_TYPE = 'RULE_RULE_ACTION_UPDATE_TYPE';\nexport const RULE_RULE_ACTION_UPDATE_PARAMETER = 'RULE_RULE_ACTION_UPDATE_PARAMETER';\n\nexport const RULE_CONDITION_GROUP_UPDATE_OPERATOR = 'RULE_CONDITION_GROUP_UPDATE_OPERATOR';\nexport const RULE_CONDITION_GROUP_DELETE = 'RULE_CONDITION_GROUP_DELETE';\nexport const RULE_CONDITION_GROUP_CREATE = 'RULE_CONDITION_GROUP_CREATE';\n\nexport const RULE_CONDITION_CREATE = 'RULE_CONDITION_CREATE';\nexport const RULE_CONDITION_DELETE = 'RULE_CONDITION_DELETE';\nexport const RULE_CONDITION_UPDATE_TYPE = 'RULE_CONDITION_UPDATE_TYPE';\nexport const RULE_CONDITION_UPDATE_PARAMETER = 'RULE_CONDITION_UPDATE_PARAMETER';\nexport const RULE_CONDITION_UPDATE_OPERATOR = 'RULE_CONDITION_UPDATE_OPERATOR';\n\nlet idCounter = 1000;\n// tslint:disable-next-line:only-arrow-functions\nexport function getNextId(): string {\n return 'tempId' + ++idCounter;\n}\n\nexport class RuleEngineState {\n showRules = true;\n globalError: string = null;\n loading = true;\n saving = false;\n hasError = false;\n filter = '';\n deleting = false;\n}\n\nexport interface IRecord {\n _id?: string;\n _saving?: boolean;\n _saved?: boolean;\n deleting?: boolean;\n errors?: any;\n set?(string, any): any;\n}\n\nexport interface IRuleAction extends IRecord {\n id?: string;\n priority: number;\n type?: string;\n parameters?: { [key: string]: any };\n owningRule?: string;\n _owningRule?: RuleModel;\n}\n\nexport interface ICondition extends IRecord {\n id?: string;\n conditionlet?: string;\n type?: string;\n priority?: number;\n operator?: string;\n parameters?: { [key: string]: any };\n _type?: ServerSideTypeModel;\n}\n\nexport interface IConditionGroup extends IRecord {\n id?: string;\n priority: number;\n operator: string;\n conditions?: any;\n}\n\nexport interface IRule extends IRecord {\n _id?: string;\n _expanded?: boolean;\n _ruleActions?: ActionModel[];\n _conditionGroups?: ConditionGroupModel[];\n _ruleActionsLoaded?: boolean;\n _errors?: CwError[];\n _saving?: boolean;\n _saved?: boolean;\n deleting?: boolean;\n id?: string;\n priority?: number;\n name?: string;\n fireOn?: string;\n enabled?: boolean;\n conditionGroups?: any;\n ruleActions?: any;\n set?(string, any): IRule;\n}\n\nexport interface ParameterModel {\n key: string;\n value: string;\n priority: number;\n}\n\nexport class ActionModel extends ServerSideFieldModel {\n owningRule: string;\n _owningRule: RuleModel;\n\n constructor(key: string, type: ServerSideTypeModel, priority = 1) {\n super(key, type, priority);\n this.priority = priority || 1;\n this.type = type;\n }\n\n isValid(): boolean {\n try {\n return super.isValid();\n } catch (e) {\n this.loggerService.error(e);\n }\n }\n}\n\nexport class ConditionModel extends ServerSideFieldModel {\n operator = 'AND';\n conditionlet: string;\n\n constructor(iCondition: ICondition) {\n super(iCondition.id, iCondition._type);\n this.conditionlet = iCondition.conditionlet;\n this.key = iCondition.id;\n this.priority = iCondition.priority || 1;\n this.type = iCondition._type;\n this.operator = iCondition.operator || 'AND';\n }\n\n isValid(): boolean {\n try {\n return !!this.getParameterValue('comparison') && super.isValid();\n } catch (e) {\n this.loggerService.error(e);\n }\n }\n}\n\nexport class ConditionGroupModel {\n key: string;\n priority: number;\n\n operator: string;\n conditions: { [key: string]: boolean };\n _id: string;\n _conditions: ConditionModel[] = [];\n\n constructor(iGroup: IConditionGroup) {\n Object.assign(this, iGroup);\n this.key = iGroup.id;\n this._id = this.key != null ? this.key : getNextId();\n this.conditions = iGroup.conditions || {};\n }\n\n isPersisted(): boolean {\n return this.key != null;\n }\n\n isValid(): boolean {\n const valid = this.operator && (this.operator === 'AND' || this.operator === 'OR');\n return valid;\n }\n}\n\nexport class RuleModel {\n key: string;\n name: string;\n enabled = false;\n priority: number;\n fireOn: string;\n conditionGroups: { [key: string]: ConditionGroupModel } = {};\n ruleActions: { [key: string]: boolean } = {};\n\n _id: string;\n _expanded = false;\n _conditionGroups: ConditionGroupModel[] = [];\n _ruleActions: ActionModel[] = [];\n _saved = true;\n _saving = false;\n _deleting = true;\n _errors: { [key: string]: any };\n\n constructor(iRule: IRule) {\n Object.assign(this, iRule);\n this.key = iRule.id;\n this._id = this.key != null ? this.key : getNextId();\n const conGroups = Object.keys(iRule.conditionGroups || {});\n conGroups.forEach((groupId) => {\n const g = this.conditionGroups[groupId];\n const mg = new ConditionGroupModel(Object.assign({ id: groupId }, g));\n this.conditionGroups[groupId] = mg;\n this._conditionGroups.push(mg);\n });\n }\n\n isPersisted(): boolean {\n return this.key != null;\n }\n\n isValid(): boolean {\n let valid = !!this.name;\n valid = valid && this.name.trim().length > 0;\n return valid;\n }\n}\n\nexport const DEFAULT_RULE: IRule = {\n _conditionGroups: [],\n _expanded: false,\n _id: -1 + '',\n _ruleActions: [],\n conditionGroups: {},\n enabled: false,\n fireOn: 'EVERY_PAGE',\n name: null,\n priority: 1,\n ruleActions: {}\n};\n\n// @dynamic\n@Injectable()\nexport class RuleService {\n get rules(): RuleModel[] {\n return this._rules;\n }\n ruleActionTypes$: BehaviorSubject = new BehaviorSubject([]);\n conditionTypes$: BehaviorSubject = new BehaviorSubject([]);\n\n _ruleActionTypes: { [key: string]: ServerSideTypeModel } = {};\n _conditionTypes: { [key: string]: ServerSideTypeModel } = {};\n\n public _errors$: Subject = new Subject();\n\n protected _actionsEndpointUrl: string;\n // tslint:disable-next-line:no-unused-variable\n protected _ruleActions: { [key: string]: ActionModel } = {};\n // tslint:disable-next-line:no-unused-variable\n protected _conditions: { [key: string]: ConditionModel } = {};\n\n private _rulesEndpointUrl: string;\n private _conditionTypesEndpointUrl: string;\n private _ruleActionTypesEndpointUrl: string;\n\n private _rules$: Subject = new Subject();\n\n private _ruleActionTypesAry: ServerSideTypeModel[] = [];\n private _conditionTypesAry: ServerSideTypeModel[] = [];\n\n private _rules: RuleModel[];\n\n constructor(\n public _apiRoot: ApiRoot,\n private _resources: I18nService,\n private siteService: SiteService,\n private coreWebService: CoreWebService\n ) {\n this._rulesEndpointUrl = `/ruleengine/rules`;\n this._actionsEndpointUrl = `/ruleengine/actions`;\n this._conditionTypesEndpointUrl = `/api/v1/system/ruleengine/conditionlets`;\n this._ruleActionTypesEndpointUrl = `/api/v1/system/ruleengine/actionlets`;\n\n this._preCacheCommonResources(_resources);\n this.loadActionTypes().subscribe(\n (types: ServerSideTypeModel[]) => {\n this.ruleActionTypes$.next(types);\n },\n (err) => {\n this._errors$.next(err);\n }\n );\n this.loadConditionTypes().subscribe(\n (types: ServerSideTypeModel[]) => {\n this.conditionTypes$.next(types);\n },\n (err) => {\n this._errors$.next(err);\n }\n );\n\n this.siteService.switchSite$.subscribe((site) => {\n const siteId = this.loadRulesSiteId();\n if (siteId === site.identifier) {\n this.sendLoadRulesRequest(site.identifier);\n }\n });\n }\n\n static fromServerRulesTransformFn(ruleMap): RuleModel[] {\n return Object.keys(ruleMap).map((id: string) => {\n const r: IRule = ruleMap[id];\n r.id = id;\n return new RuleModel(r);\n });\n }\n\n static fromClientRuleTransformFn(rule: RuleModel): any {\n const sendRule = Object.assign({}, DEFAULT_RULE, rule);\n sendRule.key = rule.key;\n delete sendRule.id;\n sendRule.conditionGroups = {};\n sendRule._conditionGroups.forEach((conditionGroup: ConditionGroupModel) => {\n if (conditionGroup.key) {\n const sendGroup = {\n conditions: {},\n operator: conditionGroup.operator,\n priority: conditionGroup.priority\n };\n conditionGroup._conditions.forEach((condition: ConditionModel) => {\n sendGroup.conditions[condition.key] = true;\n });\n sendRule.conditionGroups[conditionGroup.key] = sendGroup;\n }\n });\n this.removeMeta(sendRule);\n return sendRule;\n }\n\n static removeMeta(entity: any): void {\n Object.keys(entity).forEach((key) => {\n if (key[0] === '_') {\n delete entity[key];\n }\n });\n }\n\n static alphaSort(key): (a, b) => number {\n return (a, b) => {\n let x;\n if (a[key] > b[key]) {\n x = 1;\n } else if (a[key] < b[key]) {\n x = -1;\n } else {\n x = 0;\n }\n return x;\n };\n }\n\n createRule(body: RuleModel): Observable {\n const siteId = this.loadRulesSiteId();\n return this.coreWebService\n .request({\n body: RuleService.fromClientRuleTransformFn(body),\n method: 'POST',\n url: `/api/v1/sites/${siteId}${this._rulesEndpointUrl}`\n })\n .pipe(\n map((result: HttpResponse) => {\n body.key = result['id']; // @todo:ggranum type the POST result correctly.\n return (\n (Object.assign({}, DEFAULT_RULE, body, result))\n );\n })\n );\n }\n\n deleteRule(ruleId: string): Observable<{ success: boolean } | CwError> {\n const siteId = this.loadRulesSiteId();\n return this.coreWebService\n .request({\n method: 'DELETE',\n url: `/api/v1/sites/${siteId}${this._rulesEndpointUrl}/${ruleId}`\n })\n .pipe(\n map((_result) => {\n return { success: true };\n })\n );\n }\n\n loadRules(): Observable {\n return this._rules$.asObservable();\n }\n\n public requestRules(siteId: string): void {\n if (siteId) {\n this.sendLoadRulesRequest(siteId);\n } else if (this.siteService.currentSite) {\n this.sendLoadRulesRequest(this.siteService.currentSite.identifier);\n } else {\n this.siteService.getCurrentSite().subscribe((site) => {\n this.sendLoadRulesRequest(site.identifier);\n });\n }\n }\n\n loadRule(id: string): Observable {\n const siteId = this.loadRulesSiteId();\n return this.coreWebService\n .request({\n url: `/api/v1/sites/${siteId}${this._rulesEndpointUrl}/${id}`\n })\n .pipe(\n map((result) => {\n return (\n (Object.assign({ key: id }, DEFAULT_RULE, result))\n );\n })\n );\n }\n\n updateRule(id: string, rule: RuleModel): Observable {\n let result;\n const siteId = this.loadRulesSiteId();\n if (!id) {\n result = this.createRule(rule);\n } else {\n result = this.coreWebService\n .request({\n body: RuleService.fromClientRuleTransformFn(rule),\n method: 'PUT',\n url: `/api/v1/sites/${siteId}${this._rulesEndpointUrl}/${id}`\n })\n .pipe(\n map((res) => {\n const r = Object.assign({}, DEFAULT_RULE, res);\n r.id = id;\n return r;\n })\n );\n }\n return result;\n }\n\n getConditionTypes(): Observable {\n return this.coreWebService\n .request({\n url: this._conditionTypesEndpointUrl\n })\n .pipe(map(this.fromServerServersideTypesTransformFn));\n }\n\n getRuleActionTypes(): Observable {\n return this.coreWebService\n .request({\n url: this._ruleActionTypesEndpointUrl\n })\n .pipe(map(this.fromServerServersideTypesTransformFn));\n }\n\n _doLoadRuleActionTypes(): Observable {\n return this.coreWebService\n .request({\n url: this._ruleActionTypesEndpointUrl\n })\n .pipe(map(this.fromServerServersideTypesTransformFn));\n }\n\n _doLoadConditionTypes(): Observable {\n return this.coreWebService\n .request({\n url: this._conditionTypesEndpointUrl\n })\n .pipe(map(this.fromServerServersideTypesTransformFn));\n }\n\n private fromServerServersideTypesTransformFn(typesMap): ServerSideTypeModel[] {\n const types = Object.keys(typesMap).map((key: string) => {\n const json: any = typesMap[key];\n json.key = key;\n return ServerSideTypeModel.fromJson(json);\n });\n return types.filter((type) => type.key !== 'CountRulesActionlet');\n }\n\n private _preCacheCommonResources(resources: I18nService): void {\n resources.get('api.sites.ruleengine').subscribe((_rsrc) => {});\n resources.get('api.ruleengine.system').subscribe((_rsrc) => {});\n resources.get('api.system.ruleengine').subscribe((_rsrc) => {});\n }\n\n private sendLoadRulesRequest(siteId: string): void {\n this.coreWebService\n .request({\n url: `/api/v1/sites/${siteId}/ruleengine/rules`\n })\n .subscribe(\n (ruleMap) => {\n this._rules = RuleService.fromServerRulesTransformFn(ruleMap);\n this._rules$.next(this.rules);\n\n return RuleService.fromServerRulesTransformFn(ruleMap);\n },\n (err) => {\n this._errors$.next(err);\n }\n );\n }\n\n private loadActionTypes(): Observable {\n let obs;\n if (this._ruleActionTypesAry.length) {\n obs = observableFrom(this._ruleActionTypesAry);\n } else {\n return this.actionAndConditionTypeLoader(\n this._doLoadRuleActionTypes(),\n this._ruleActionTypes\n );\n }\n return obs;\n }\n\n private actionAndConditionTypeLoader(\n requestObserver: Observable,\n typeMap: any\n ): Observable {\n return requestObserver.pipe(\n mergeMap((types: ServerSideTypeModel[]) => {\n return observableFrom(types).pipe(\n mergeMap((type) => {\n return this._resources.get(type.i18nKey + '.name', type.i18nKey).pipe(\n map((label: string) => {\n type._opt = { value: type.key, label: label };\n return type;\n })\n );\n }),\n reduce((types: any[], type: any) => {\n types.push(type);\n return types;\n }, []),\n tap((typ: any[]) => {\n typ = typ.sort((typeA, typeB) => {\n return typeA._opt.label.localeCompare(typeB._opt.label);\n });\n typ.forEach((type) => {\n typeMap[type.key] = type;\n });\n return typ;\n })\n );\n })\n );\n }\n\n private loadConditionTypes(): Observable {\n let obs;\n if (this._conditionTypesAry.length) {\n obs = observableFrom(this._conditionTypesAry);\n } else {\n return this.actionAndConditionTypeLoader(\n this._doLoadConditionTypes(),\n this._conditionTypes\n );\n }\n return obs;\n }\n\n private getPageIdFromUrl(): string {\n let query;\n\n const hash = document.location.hash;\n\n if (hash.includes('fromCore')) {\n query = hash.substr(hash.indexOf('?') + 1);\n return ApiRoot.parseQueryParam(query, 'realmId');\n } else if (hash.includes('edit-page')) {\n return hash.split('/').pop().split('?')[0];\n }\n return null;\n }\n\n /**\n * Return the Site Id or Page Id for the rules operations.\n * First will check if the realmId parameter is included in the url.\n * If not then search for the current site Id.\n * @returns string\n */\n private loadRulesSiteId(): string {\n let siteId = this.getPageIdFromUrl();\n\n if (!siteId) {\n /**\n * If the realmId parameter is not set get the current Site Id\n */\n siteId = `${this.siteService.currentSite.identifier}`;\n }\n return siteId;\n }\n}\n", + "properties": [ + { + "name": "key", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 112 + }, + { + "name": "priority", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 114 + }, + { + "name": "value", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 113 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "Parameters", + "id": "interface-Parameters-6071385f57bc13cad1bf6b389b61f8afcca77cb49474e01d2e7c5bf3dc3ba4734701a751d1bc3d55d5d4b3fe171ed03f9c0ba38e82b868a98d816c4d9821e681", + "file": "apps/dotcms-ui/src/app/shared/models/dot-page/dot-rendered-page.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotPage } from './dot-page.model';\nimport { DotEditPageViewAs } from '@models/dot-edit-page-view-as/dot-edit-page-view-as.model';\nimport { DotContainer, DotContainerStructure } from '@shared/models/container/dot-container.model';\nimport { DotLayout, DotTemplate } from '@shared/models/dot-edit-layout-designer';\n\nexport module DotPageRender {\n export interface Parameters {\n layout?: DotLayout;\n page: DotPage;\n containers?: {\n [key: string]: {\n container: DotContainer;\n containerStructures?: DotContainerStructure[];\n };\n };\n template?: DotTemplate;\n canCreateTemplate: boolean;\n viewAs: DotEditPageViewAs;\n numberContents: number;\n }\n}\n\nexport class DotPageRender {\n constructor(private _params: DotPageRender.Parameters) {}\n\n get params(): DotPageRender.Parameters {\n return this._params;\n }\n\n get layout(): DotLayout {\n return this._params.layout;\n }\n\n get page(): DotPage {\n return this._params.page;\n }\n\n get containers(): {\n [key: string]: {\n container: DotContainer;\n };\n } {\n return this._params.containers;\n }\n\n get template(): DotTemplate {\n return this._params.template;\n }\n\n get canCreateTemplate(): boolean {\n return this._params.canCreateTemplate;\n }\n\n get viewAs(): DotEditPageViewAs {\n return this._params.viewAs;\n }\n\n get numberContents(): number {\n return this._params.numberContents;\n }\n\n set numberContents(numberContents: number) {\n this._params.numberContents = numberContents;\n }\n}\n", + "properties": [ + { + "name": "canCreateTemplate", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 17 + }, + { + "name": "containers", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": true, + "description": "", + "line": 10 + }, + { + "name": "layout", + "deprecated": false, + "deprecationMessage": "", + "type": "DotLayout", + "optional": true, + "description": "", + "line": 8 + }, + { + "name": "numberContents", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 19 + }, + { + "name": "page", + "deprecated": false, + "deprecationMessage": "", + "type": "DotPage", + "optional": false, + "description": "", + "line": 9 + }, + { + "name": "template", + "deprecated": false, + "deprecationMessage": "", + "type": "DotTemplate", + "optional": true, + "description": "", + "line": 16 + }, + { + "name": "viewAs", + "deprecated": false, + "deprecationMessage": "", + "type": "DotEditPageViewAs", + "optional": false, + "description": "", + "line": 18 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "Payload", + "id": "interface-Payload-36820d64d59a0b422c3273bf030c4aa1e55414d03b59f37cdbc9ab573a97fb29fe21a419c1497782fbe6f1b7cd852c1d09775ac5f0a6940c690b772a7a30a61c", + "file": "libs/dot-rules/src/lib/rule-condition-component.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Component, EventEmitter, Input, Output, OnInit } from '@angular/core';\nimport { ServerSideTypeModel } from './services/ServerSideFieldModel';\nimport { I18nService } from './services/system/locale/I18n';\nimport {\n RULE_CONDITION_UPDATE_PARAMETER,\n RULE_CONDITION_UPDATE_TYPE,\n RULE_CONDITION_DELETE,\n RULE_CONDITION_UPDATE_OPERATOR,\n ConditionModel\n} from './services/Rule';\nimport { LoggerService } from '@dotcms/dotcms-js';\n\n@Component({\n selector: 'rule-condition',\n template: `
\n
\n \n
\n\n \n \n
\n \n
\n
\n \n \n \n \n \n \n \n
\n
\n
\n
\n \n
\n
`\n})\nexport class ConditionComponent implements OnInit {\n @Input() condition: ConditionModel;\n @Input() index: number;\n @Input() conditionTypes: { [key: string]: ServerSideTypeModel } = {};\n @Input() conditionTypePlaceholder = '';\n\n @Output()\n updateConditionType: EventEmitter<{ type: string; payload: Payload }> = new EventEmitter(false);\n @Output()\n updateConditionParameter: EventEmitter<{ type: string; payload: Payload }> = new EventEmitter(\n false\n );\n @Output()\n updateConditionOperator: EventEmitter<{ type: string; payload: Payload }> = new EventEmitter(\n false\n );\n\n @Output()\n deleteCondition: EventEmitter<{\n type: string;\n payload: { condition: ConditionModel };\n }> = new EventEmitter(false);\n\n typeDropdown: any;\n\n constructor(private _resources: I18nService, private loggerService: LoggerService) {}\n\n ngOnInit(): void {\n setTimeout(() => {\n this.typeDropdown = {\n options: Object.keys(this.conditionTypes).map((key) => {\n const type = this.conditionTypes[key];\n return {\n label: type._opt.label,\n value: type._opt.value\n };\n }),\n placeholder: this._resources.get(\n 'api.sites.ruleengine.rules.inputs.condition.type.placeholder'\n )\n };\n }, 0);\n }\n\n ngOnChanges(change): void {\n try {\n if (change.condition) {\n if (this.typeDropdown && this.condition.type) {\n if (this.condition.type.key !== 'NoSelection') {\n this.typeDropdown.value = this.condition.type.key;\n }\n }\n }\n } catch (e) {\n this.loggerService.error('ConditionComponent', 'ngOnChanges', e);\n }\n }\n\n onTypeChange(type: string): void {\n this.loggerService.info('ConditionComponent', 'onTypeChange', type);\n this.updateConditionType.emit({\n payload: { condition: this.condition, value: type, index: this.index },\n type: RULE_CONDITION_UPDATE_TYPE\n });\n }\n\n onParameterValuesChange(event: { name: string; value: string }[]): void {\n event.forEach((change) => this.onParameterValueChange(change));\n }\n\n onParameterValueChange(event: { name: string; value: string }): void {\n this.loggerService.info('ConditionComponent', 'onParameterValueChange');\n this.updateConditionParameter.emit({\n payload: {\n condition: this.condition,\n name: event.name,\n value: event.value,\n index: this.index\n },\n type: RULE_CONDITION_UPDATE_PARAMETER\n });\n }\n\n toggleOperator(): void {\n const op = this.condition.operator === 'AND' ? 'OR' : 'AND';\n this.updateConditionOperator.emit({\n type: RULE_CONDITION_UPDATE_OPERATOR,\n payload: { condition: this.condition, value: op, index: this.index }\n });\n }\n\n onDeleteConditionClicked(): void {\n this.deleteCondition.emit({\n type: RULE_CONDITION_DELETE,\n payload: { condition: this.condition }\n });\n }\n}\n\nexport interface Payload {\n condition: ConditionModel;\n index?: number;\n name?: string;\n value: string;\n}\n", + "properties": [ + { + "name": "condition", + "deprecated": false, + "deprecationMessage": "", + "type": "ConditionModel", + "optional": false, + "description": "", + "line": 170 + }, + { + "name": "index", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 171 + }, + { + "name": "name", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 172 + }, + { + "name": "value", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 173 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "PluginState", + "id": "interface-PluginState-fe365a70a36237c43ca41aa3a5e6097f87a6f382f0c232ae2fb7f346fc4eae18349c3c6cca0ffd4df9032e24f345affa7c232db4daeaf450b62296f6debfac06", + "file": "libs/block-editor/src/lib/plugins/bubble-link-form.plugin.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Editor, posToDOMRect, isNodeSelection } from '@tiptap/core';\nimport { EditorState, Plugin, PluginKey, Transaction } from 'prosemirror-state';\nimport { EditorView } from 'prosemirror-view';\nimport tippy, { Instance, Props } from 'tippy.js';\n\nimport { ComponentRef } from '@angular/core';\nimport { BubbleMenuLinkFormComponent } from '../extensions/components/bubble-menu-link-form/bubble-menu-link-form.component';\n\n// Interface\nimport { PluginStorage } from '../extensions/bubble-link-form.extension';\n\ninterface PluginState {\n toggle: boolean;\n}\n\nexport interface BubbleLinkFormProps {\n pluginKey: PluginKey;\n editor: Editor;\n element: HTMLElement;\n tippyOptions?: Partial;\n storage: PluginStorage;\n component?: ComponentRef;\n}\n\nexport type BubbleLinkFormViewProps = BubbleLinkFormProps & {\n view: EditorView;\n};\n\nexport class BubbleLinkFormView {\n public editor: Editor;\n\n public element: HTMLElement;\n\n public view: EditorView;\n\n public tippy: Instance | undefined;\n\n public tippyOptions?: Partial;\n\n public pluginKey: PluginKey;\n\n public component?: ComponentRef;\n\n public storage: PluginStorage;\n\n constructor({\n editor,\n element,\n view,\n tippyOptions = {},\n pluginKey,\n storage,\n component\n }: BubbleLinkFormViewProps) {\n this.editor = editor;\n this.element = element;\n this.view = view;\n\n this.tippyOptions = tippyOptions;\n\n // Detaches menu content from its current parent\n this.element.remove();\n this.element.style.visibility = 'visible';\n this.pluginKey = pluginKey;\n this.component = component;\n this.storage = storage;\n\n this.editor.on('focus', this.focusHandler);\n this.setComponentEvents();\n }\n\n update(view: EditorView, prevState?: EditorState): void {\n const next = this.pluginKey.getState(view.state);\n const prev = this.pluginKey.getState(prevState);\n\n // Check that the current plugin state is different to previous plugin state.\n if (next.toggle === prev.toggle) {\n this.detectLinkFormChanges();\n return;\n }\n\n this.createTooltip();\n \n this.tippy?.state.isVisible ? this.hide() : this.show();\n this.detectLinkFormChanges();\n }\n\n focusHandler = () => {\n if (this.tippy?.state.isVisible) {\n this.hide();\n }\n };\n\n createTooltip() {\n const { element: editorElement } = this.editor.options\n const editorIsAttached = !!editorElement.parentElement\n\n if (this.tippy || !editorIsAttached) {\n return\n }\n\n this.tippy = tippy(editorElement, {\n duration: 250,\n getReferenceClientRect: null,\n content: this.element,\n interactive: true,\n trigger: 'manual',\n placement: 'bottom',\n hideOnClick: 'toggle',\n ...this.tippyOptions\n });\n }\n\n show() {\n this.tippy?.show();\n // Afther show the component set values\n this.setInputValues();\n this.focusInput();\n this.setTippyPosition();\n }\n\n hide() {\n this.tippy?.hide();\n // Afther show the component focus editor\n this.editor.view.focus();\n this.editor.commands.unsetHighlight();\n }\n\n setTippyPosition() {\n const { view } = this.editor;\n const { state } = view;\n const { selection } = state;\n const { ranges } = selection;\n const from = Math.min(...ranges.map((range) => range.$from.pos));\n const to = Math.max(...ranges.map((range) => range.$to.pos));\n this.tippy.setProps({\n getReferenceClientRect: () => {\n if (isNodeSelection(state.selection)) {\n const node = view.nodeDOM(from) as HTMLElement;\n if (node) {\n return node.getBoundingClientRect();\n }\n }\n return posToDOMRect(view, from, to);\n }\n });\n }\n\n addLink(link: string) {\n if (link) {\n this.editor.commands.setLink({ href: link });\n }\n this.hide();\n }\n\n removeLink() {\n this.editor.commands.unsetLink();\n this.hide();\n }\n\n setInputValues() {\n this.component.instance.nodeLink = this.getNodeLink();\n this.component.instance.newLink = this.getNodeLink() || this.getLinkSelect();\n }\n\n focusInput() {\n this.component.instance.focusInput();\n }\n\n setComponentEvents() {\n this.component.instance.hideForm.subscribe(() => this.hide());\n this.component.instance.removeLink.subscribe(() => this.removeLink());\n this.component.instance.setLink.subscribe((event) => this.addLink(event));\n }\n\n detectLinkFormChanges() {\n this.component.changeDetectorRef.detectChanges();\n }\n\n getNodeLink(): string {\n return this.editor.isActive('link') ? this.editor.getAttributes('link').href : '';\n }\n\n getLinkSelect() {\n const { state } = this.editor;\n const { from, to } = state.selection;\n const text = state.doc.textBetween(from, to, ' ');\n\n return this.isLink(text) ? text : '';\n }\n\n isLink(nodeText: string) {\n const pattern = new RegExp(\n '^(https?:\\\\/\\\\/)?' + // protocol\n '((([a-z\\\\d]([a-z\\\\d-]*[a-z\\\\d])*)\\\\.)+[a-z]{2,}|' + // domain name\n '((\\\\d{1,3}\\\\.){3}\\\\d{1,3}))' + // OR ip (v4) address\n '(\\\\:\\\\d+)?(\\\\/[-a-z\\\\d%_.~+]*)*' + // port and path\n '(\\\\?[;&a-z\\\\d%_.~+=-]*)?' + // query string\n '(\\\\#[-a-z\\\\d_]*)?$',\n 'i'\n ); // fragment locator\n return !!pattern.test(nodeText);\n }\n\n destroy() {\n this.tippy?.destroy();\n this.editor.off('focus', this.focusHandler);\n }\n}\n\nexport const bubbleLinkFormPlugin = (options: BubbleLinkFormProps) => {\n return new Plugin({\n key: options.pluginKey as PluginKey,\n view: (view) => new BubbleLinkFormView({ view, ...options }),\n state: {\n init(): PluginState {\n return {\n toggle: true\n };\n },\n\n apply(transaction: Transaction): PluginState {\n const transactionMeta = transaction.getMeta(options.pluginKey);\n if (transactionMeta) {\n return {\n toggle: options.storage.show\n };\n }\n\n return {\n toggle: options.storage.show\n };\n }\n }\n });\n};\n", + "properties": [ + { + "name": "toggle", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 13 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "PluginState", + "id": "interface-PluginState-5887b1f834be48ad8178835b5942a33eea20385add996a499c804bd5effe413095a9641620a759dce23898789983c4601cb71495d98cdc2abd30559acb3a5930-1", + "file": "libs/block-editor/src/lib/plugins/floating.plugin.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Editor, posToDOMRect, Range } from '@tiptap/core';\nimport { EditorState, Plugin, PluginKey, Transaction } from 'prosemirror-state';\nimport { EditorView } from 'prosemirror-view';\nimport tippy, { Instance, Props } from 'tippy.js';\nimport { SuggestionsCommandProps } from '../extensions/components/suggestions/suggestions.component';\n\ninterface PluginState {\n open: boolean;\n}\n\nexport interface FloatingActionsPluginProps {\n editor: Editor;\n element: HTMLElement;\n tippyOptions?: Partial;\n render?: () => FloatingRenderActions;\n command: ({\n editor,\n range,\n props\n }: {\n editor: Editor;\n range: Range;\n props: SuggestionsCommandProps;\n }) => void;\n}\n\nexport type FloatingActionsViewProps = FloatingActionsPluginProps & {\n view: EditorView;\n key: PluginKey;\n};\n\nexport interface FloatingActionsProps {\n range: Range;\n editor: Editor;\n command: (props: { editor: Editor; range: Range; props: SuggestionsCommandProps }) => void;\n clientRect: (() => DOMRect) | null;\n}\n\nexport interface FloatingActionsKeydownProps {\n view: EditorView;\n event: KeyboardEvent;\n range: Range;\n}\n\nexport interface FloatingRenderActions {\n onStart?: (props: FloatingActionsProps) => void;\n onExit?: (props: FloatingActionsProps) => void;\n onKeyDown?: (props: FloatingActionsKeydownProps) => boolean;\n}\n\nexport const FLOATING_ACTIONS_MENU_KEYBOARD = 'menuFloating';\n\nexport class FloatingActionsView {\n editor: Editor;\n element: HTMLElement;\n view: EditorView;\n tippy!: Instance;\n render: () => FloatingRenderActions;\n command: (props: { editor: Editor; range: Range; props: SuggestionsCommandProps }) => void;\n key: PluginKey;\n invalidNodes = ['codeBlock', 'blockquote'];\n\n constructor({\n editor,\n element,\n view,\n tippyOptions,\n render,\n command,\n key\n }: FloatingActionsViewProps) {\n this.editor = editor;\n this.element = element;\n this.view = view;\n this.element.addEventListener('mousedown', this.mousedownHandler, { capture: true });\n this.editor.on('focus', () => {\n this.tippy.unmount();\n this.update(this.editor.view);\n });\n this.element.style.visibility = 'visible';\n this.render = render;\n this.command = command;\n this.key = key;\n this.createTooltip(tippyOptions);\n }\n\n /**\n * Element mousedown handler to update the plugin state and open\n *\n * @param {MouseEvent} e\n * @memberof FloatingActionsView\n */\n mousedownHandler = (e: MouseEvent): void => {\n e.preventDefault();\n\n const transaction = this.editor.state.tr.setMeta(FLOATING_ACTIONS_MENU_KEYBOARD, {\n open: true\n });\n this.editor.view.dispatch(transaction);\n };\n\n /**\n * Create the tooltip for the element\n *\n * @param {Partial} [options={}]\n * @memberof FloatingActionsView\n */\n createTooltip(options: Partial = {}): void {\n this.tippy = tippy(this.view.dom, {\n duration: 0,\n getReferenceClientRect: null,\n content: this.element,\n interactive: true,\n trigger: 'manual',\n placement: 'left',\n hideOnClick: 'toggle',\n ...options\n });\n }\n\n /**\n * Check the EditorState and based on that modify the DOM\n *\n * @param {EditorView} view\n * @param {EditorState} prevState\n * @return {*} {void}\n * @memberof FloatingActionsView\n */\n update(view: EditorView, prevState?: EditorState): void {\n const { selection } = view.state;\n const { $anchor, empty, from, to } = selection;\n const isRootDepth = $anchor.depth === 1;\n const isNodeEmpty =\n !selection.$anchor.parent.isLeaf && !selection.$anchor.parent.textContent;\n const isActive = isRootDepth && isNodeEmpty;\n const nodeType = $anchor.parent.type.name;\n \n const next = this.key?.getState(view.state);\n const prev = prevState ? this.key?.getState(prevState) : null;\n\n if (!prev?.open && (!empty || !isActive)) {\n this.hide();\n return;\n }\n\n // Hide is Parent node is not the editor\n if (!prev?.open && this.invalidNodes.includes(nodeType)) {\n this.hide();\n return;\n }\n\n this.tippy.setProps({\n getReferenceClientRect: () => posToDOMRect(view, from, to)\n });\n\n this.show();\n\n if (next.open) {\n const { from, to } = this.editor.state.selection;\n const rect = posToDOMRect(this.view, from, to);\n\n this.render().onStart({\n clientRect: () => rect,\n range: { from, to },\n editor: this.editor,\n command: this.command\n });\n } else if (prev && prev.open) {\n this.render().onExit(null);\n }\n }\n\n show() {\n this.tippy.show();\n }\n\n hide() {\n this.tippy.hide();\n }\n\n destroy() {\n this.tippy.destroy();\n this.element.removeEventListener('mousedown', this.mousedownHandler);\n }\n}\n\nexport const FloatingActionsPluginKey = new PluginKey(FLOATING_ACTIONS_MENU_KEYBOARD);\n\nexport const FloatingActionsPlugin = (options: FloatingActionsPluginProps) => {\n return new Plugin({\n key: FloatingActionsPluginKey,\n view: (view) =>\n new FloatingActionsView({ key: FloatingActionsPluginKey, view, ...options }),\n state: {\n /**\n * Init the plugin state\n *\n * @return {*} {PluginState}\n */\n init(): PluginState {\n return {\n open: false\n };\n },\n /**\n * Update the plugin state base on meta information\n *\n * @param {Transaction} transaction\n * @return {*} {PluginState}\n */\n apply(transaction: Transaction): PluginState {\n const transactionMeta = transaction.getMeta(FLOATING_ACTIONS_MENU_KEYBOARD);\n\n if (transactionMeta?.open) {\n return {\n open: transactionMeta?.open\n };\n }\n\n return {\n open: false\n };\n }\n },\n props: {\n /**\n * Catch and handle the keydown in the plugin\n *\n * @param {EditorView} view\n * @param {KeyboardEvent} event\n * @return {*}\n */\n handleKeyDown(view: EditorView, event: KeyboardEvent) {\n const { open, range } = this.getState(view.state);\n if (!open) {\n return false;\n }\n return options.render().onKeyDown({ event, range, view });\n }\n }\n });\n};\n", + "properties": [ + { + "name": "open", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 8 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [], + "isDuplicate": true, + "duplicateId": 1, + "duplicateName": "PluginState-1" + }, + { + "name": "PluginStorage", + "id": "interface-PluginStorage-b38b86d1e54e712264c72fae660a36e7ba7bda09d34042fa8991939f3d2ee15e1d66721e76ac86146df90b54216188b47ce2a78dfaa1182e144d0804e2e8e76a", + "file": "libs/block-editor/src/lib/extensions/bubble-link-form.extension.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Extension } from '@tiptap/core';\nimport { PluginKey } from 'prosemirror-state';\nimport { BubbleMenuLinkFormComponent } from './components/bubble-menu-link-form/bubble-menu-link-form.component';\nimport { Injector, ComponentFactoryResolver } from '@angular/core';\nimport { bubbleLinkFormPlugin } from '../plugins/bubble-link-form.plugin';\nimport { Props } from 'tippy.js';\n\nexport interface BubbleLinkFormOptions {\n pluginKey: PluginKey;\n tippyOptions?: Partial;\n element: HTMLElement | null;\n}\nexport interface PluginStorage {\n show: boolean;\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n bubbleLinkForm: {\n toogleLinkForm: () => ReturnType;\n };\n }\n\n interface Storage {\n bubbleLinkForm: PluginStorage;\n }\n}\nexport const LINK_FORM_PLUGIN_KEY = new PluginKey('addLink');\n\nexport const BubbleLinkFormExtension = (injector: Injector, resolver: ComponentFactoryResolver) => {\n\n return Extension.create({\n name: 'bubbleLinkForm',\n defaultOptions: {\n element: null,\n tippyOptions: {},\n pluginKey: LINK_FORM_PLUGIN_KEY,\n },\n\n addStorage() {\n return {\n show: true\n }\n },\n\n addCommands() {\n return {\n toogleLinkForm: () => ({ commands }) => {\n this.storage.show = !this.storage.show;\n return commands.setHighlight();\n }\n }\n },\n\n addProseMirrorPlugins() {\n const factory = resolver.resolveComponentFactory(BubbleMenuLinkFormComponent);\n const component = factory.create(injector);\n component.changeDetectorRef.detectChanges();\n \n return [\n bubbleLinkFormPlugin({\n pluginKey: this.options.pluginKey,\n editor: this.editor,\n element: component.location.nativeElement,\n tippyOptions: this.options.tippyOptions,\n storage: this.storage,\n component: component\n }) \n ]\n },\n })\n}\n", + "properties": [ + { + "name": "show", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 14 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "PortletNav", + "id": "interface-PortletNav-0134827b356ba7489295afaef36209336d36fb32dea5bd004de8133abc4a8ec4eb4fc6d41b0f2f0583043f91a58d47cc71a666700aedc83096575171fcc01446", + "file": "apps/dotcms-ui/src/app/shared/models/navigation/portlet-nav.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface PortletNav {\n url: string;\n previousUrl?: string;\n id?: string;\n}\n", + "properties": [ + { + "name": "id", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 4 + }, + { + "name": "previousUrl", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 3 + }, + { + "name": "url", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 2 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "PositionParams", + "id": "interface-PositionParams-ae368b835a891be911183677b6d0d11b4e3c749a9041928762606591a6fa8f9b52f5c7d0773cca3e3a6ead2ea5a55d381cd8193952ed8d990e61c84b7a4198e3", + "file": "libs/dotcms-webcomponents/src/elements/dot-tooltip/utils.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export type PositionX = 'left' | 'right' | 'center';\nexport type PositionY = 'bottom' | 'top';\n\ninterface PositionParams {\n tooltipEl: HTMLElement;\n targetEl: HTMLElement;\n position: { x: PositionX; y: PositionY };\n}\n\nexport const fadeIn = (el: HTMLElement) => {\n el.style.opacity = '0';\n\n (function fade() {\n let val = parseFloat(el.style.opacity);\n if (!((val += 0.1) > 1)) {\n el.style.opacity = val.toString();\n requestAnimationFrame(fade);\n }\n })();\n};\n\nexport const getElement = (content: string): HTMLElement => {\n const el = document.createElement('span');\n el.style.padding = '2px 5px';\n el.style.backgroundColor = '#444';\n el.style.borderRadius = '2px';\n el.style.color = '#fff';\n el.style.position = 'absolute';\n el.style.opacity = '0';\n el.style.whiteSpace = 'nowrap';\n\n el.innerText = content;\n return el;\n};\n\nexport const getPosition = (params: PositionParams): { top: number; left: number } => {\n let finalLeft = getPositionX(params);\n let finalTop = getPositionY(params);\n\n return {\n top: finalTop,\n left: finalLeft\n };\n};\n\nexport const getPositionX = ({\n tooltipEl: tooltip,\n targetEl: target,\n position\n}: PositionParams): number => {\n const tooltipPos = tooltip.getBoundingClientRect();\n const targetPos = target.getBoundingClientRect();\n let result = targetPos.left; // default left positioned\n\n if (position.x === 'center') {\n const targetCenter = targetPos.width / 2 + targetPos.left;\n const toolTipHalf = tooltipPos.width / 2;\n result = targetCenter - toolTipHalf;\n } else if (position.x === 'right') {\n result = targetPos.right - tooltipPos.width;\n }\n\n // Fix if the tooltip is out of the window\n if (result + tooltipPos.width > window.innerWidth) {\n result = targetPos.right - tooltipPos.width;\n }\n\n return result;\n};\n\nexport const getPositionY = ({\n tooltipEl: tooltip,\n targetEl: target,\n position\n}: PositionParams): number => {\n const MARGIN = 4; // this might be an attr in the future\n const tooltipPos = tooltip.getBoundingClientRect();\n const targetPos = target.getBoundingClientRect();\n let result = targetPos.bottom + MARGIN; // default bottom positioned\n\n if (position.y === 'top') {\n result = targetPos.top - tooltipPos.height - MARGIN;\n }\n\n return result;\n};\n", + "properties": [ + { + "name": "position", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": false, + "description": "", + "line": 7 + }, + { + "name": "targetEl", + "deprecated": false, + "deprecationMessage": "", + "type": "HTMLElement", + "optional": false, + "description": "", + "line": 6 + }, + { + "name": "tooltipEl", + "deprecated": false, + "deprecationMessage": "", + "type": "HTMLElement", + "optional": false, + "description": "", + "line": 5 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "Product", + "id": "interface-Product-db5e0c1fefbc0fee80a18f920994517234411e7adafc2db1d3ca2c81c56de9278e3c267a9c69adaf3f84e63a0c7b8cb4ea114c9c5c75a7a099a0d98e1fdbe9ca", + "file": "apps/dotcms-ui/src/stories/primeng/overlay/Product.interface.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface Product {\n id?: string;\n code?: string;\n name?: string;\n description?: string;\n price?: number;\n quantity?: number;\n inventoryStatus?: string;\n category?: string;\n image?: string;\n rating?: number;\n}\n", + "properties": [ + { + "name": "category", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 9 + }, + { + "name": "code", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 3 + }, + { + "name": "description", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 5 + }, + { + "name": "id", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 2 + }, + { + "name": "image", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 10 + }, + { + "name": "inventoryStatus", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 8 + }, + { + "name": "name", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 4 + }, + { + "name": "price", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 6 + }, + { + "name": "quantity", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 7 + }, + { + "name": "rating", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 11 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "PropValidationInfo", + "id": "interface-PropValidationInfo-d1965a61c198967f60acd0dc9ddddae2e1b6f47a54f0700354bba24c07d8e54fe5c4d6f54d9f5af7ea99d538cef3b95fc1291606034894722340a2f88c076f6d", + "file": "libs/dotcms-field-elements/src/utils/props/models/PropValidationInfo.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface PropValidationInfo {\n field: {\n type: string;\n name: string;\n };\n name: string;\n value: T;\n}\n", + "properties": [ + { + "name": "field", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": false, + "description": "", + "line": 2 + }, + { + "name": "name", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 6 + }, + { + "name": "value", + "deprecated": false, + "deprecationMessage": "", + "type": "T", + "optional": false, + "description": "", + "line": 7 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "PropValidationInfo", + "id": "interface-PropValidationInfo-d1965a61c198967f60acd0dc9ddddae2e1b6f47a54f0700354bba24c07d8e54fe5c4d6f54d9f5af7ea99d538cef3b95fc1291606034894722340a2f88c076f6d-1", + "file": "libs/dotcms-webcomponents/src/utils/props/models/PropValidationInfo.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface PropValidationInfo {\n field: {\n type: string;\n name: string;\n };\n name: string;\n value: T;\n}\n", + "properties": [ + { + "name": "field", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": false, + "description": "", + "line": 2 + }, + { + "name": "name", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 6 + }, + { + "name": "value", + "deprecated": false, + "deprecationMessage": "", + "type": "T", + "optional": false, + "description": "", + "line": 7 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [], + "isDuplicate": true, + "duplicateId": 1, + "duplicateName": "PropValidationInfo-1" + }, + { + "name": "PurgeReturnData", + "id": "interface-PurgeReturnData-0a774022a631c21706aa978c03179244f9ecd6e131c62b325a4b90052d58b078f50a3575b289568cca943ecac054aa18a52b874a9d679d05e5b02232a848db8b", + "file": "apps/dotcdn/src/app/app.models.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { ChartOptions } from 'chart.js';\nexport interface ChartDataSet {\n label: string;\n data: string[];\n borderColor?: string;\n fill?: boolean;\n}\n\nexport interface DotCDNStats {\n stats: {\n bandwidthPretty: string;\n bandwidthUsedChart: { [key: string]: number };\n requestsServedChart: { [key: string]: number };\n cacheHitRate: number;\n dateFrom: string;\n dateTo: string;\n geographicDistribution: unknown;\n totalBandwidthUsed: number;\n totalRequestsServed: number;\n cdnDomain: string;\n };\n}\n\nexport interface ChartData {\n labels: string[];\n datasets: ChartDataSet[];\n}\nexport interface DotChartStats {\n label: string;\n value: string;\n icon: string;\n}\n\nexport interface PurgeUrlOptions {\n hostId: string;\n invalidateAll: boolean;\n urls?: string[];\n}\nexport interface DotCDNState {\n chartBandwidthData: ChartData;\n chartRequestsData: ChartData;\n statsData: DotChartStats[];\n isChartLoading: boolean;\n cdnDomain: string;\n isPurgeUrlsLoading: boolean;\n isPurgeZoneLoading: boolean;\n}\n\nexport type CdnChartOptions = {\n bandwidthUsedChart: ChartOptions;\n requestsServedChart: ChartOptions;\n};\n\nexport interface PurgeReturnData {\n entity: { [key: string]: string | boolean };\n errors: string[];\n messages: string[];\n permissions: string[];\n i18nMessagesMap: { [key: string]: string };\n}\n\nexport const enum ChartPeriod {\n Last15Days = '15',\n Last30Days = '30',\n Last60Days = '60'\n}\n\nexport const enum LoadingState {\n IDLE = 'IDLE',\n LOADING = 'LOADING',\n LOADED = 'LOADED'\n}\n\nexport const enum Loader {\n CHART = 'CHART',\n PURGE_URLS = 'PURGE_URLS',\n PURGE_PULL_ZONE = 'PURGE_PULL_ZONE'\n}\n", + "properties": [ + { + "name": "entity", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": false, + "description": "", + "line": 55 + }, + { + "name": "errors", + "deprecated": false, + "deprecationMessage": "", + "type": "string[]", + "optional": false, + "description": "", + "line": 56 + }, + { + "name": "i18nMessagesMap", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": false, + "description": "", + "line": 59 + }, + { + "name": "messages", + "deprecated": false, + "deprecationMessage": "", + "type": "string[]", + "optional": false, + "description": "", + "line": 57 + }, + { + "name": "permissions", + "deprecated": false, + "deprecationMessage": "", + "type": "string[]", + "optional": false, + "description": "", + "line": 58 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "PurgeUrlOptions", + "id": "interface-PurgeUrlOptions-0a774022a631c21706aa978c03179244f9ecd6e131c62b325a4b90052d58b078f50a3575b289568cca943ecac054aa18a52b874a9d679d05e5b02232a848db8b", + "file": "apps/dotcdn/src/app/app.models.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { ChartOptions } from 'chart.js';\nexport interface ChartDataSet {\n label: string;\n data: string[];\n borderColor?: string;\n fill?: boolean;\n}\n\nexport interface DotCDNStats {\n stats: {\n bandwidthPretty: string;\n bandwidthUsedChart: { [key: string]: number };\n requestsServedChart: { [key: string]: number };\n cacheHitRate: number;\n dateFrom: string;\n dateTo: string;\n geographicDistribution: unknown;\n totalBandwidthUsed: number;\n totalRequestsServed: number;\n cdnDomain: string;\n };\n}\n\nexport interface ChartData {\n labels: string[];\n datasets: ChartDataSet[];\n}\nexport interface DotChartStats {\n label: string;\n value: string;\n icon: string;\n}\n\nexport interface PurgeUrlOptions {\n hostId: string;\n invalidateAll: boolean;\n urls?: string[];\n}\nexport interface DotCDNState {\n chartBandwidthData: ChartData;\n chartRequestsData: ChartData;\n statsData: DotChartStats[];\n isChartLoading: boolean;\n cdnDomain: string;\n isPurgeUrlsLoading: boolean;\n isPurgeZoneLoading: boolean;\n}\n\nexport type CdnChartOptions = {\n bandwidthUsedChart: ChartOptions;\n requestsServedChart: ChartOptions;\n};\n\nexport interface PurgeReturnData {\n entity: { [key: string]: string | boolean };\n errors: string[];\n messages: string[];\n permissions: string[];\n i18nMessagesMap: { [key: string]: string };\n}\n\nexport const enum ChartPeriod {\n Last15Days = '15',\n Last30Days = '30',\n Last60Days = '60'\n}\n\nexport const enum LoadingState {\n IDLE = 'IDLE',\n LOADING = 'LOADING',\n LOADED = 'LOADED'\n}\n\nexport const enum Loader {\n CHART = 'CHART',\n PURGE_URLS = 'PURGE_URLS',\n PURGE_PULL_ZONE = 'PURGE_PULL_ZONE'\n}\n", + "properties": [ + { + "name": "hostId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 35 + }, + { + "name": "invalidateAll", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 36 + }, + { + "name": "urls", + "deprecated": false, + "deprecationMessage": "", + "type": "string[]", + "optional": true, + "description": "", + "line": 37 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "queryEsParams", + "id": "interface-queryEsParams-65f6c8934c72555cfef89e3f1f4f3d85250129e7c589ff65d7e2b291bb2a7d03e3d2e7a3c5bf88e9d3ebda66b23a7181294231f8b8b53253c4038eaae640ce65", + "file": "apps/dotcms-ui/src/app/api/services/dot-es-content/dot-es-content.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { take, map, pluck } from 'rxjs/operators';\nimport { CoreWebService } from '@dotcms/dotcms-js';\nimport { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { ESContent } from '@dotcms/app/shared/models/dot-es-content/dot-es-content.model';\n\nexport enum ESOrderDirection {\n ASC = 'ASC',\n DESC = 'DESC'\n}\nexport interface queryEsParams {\n itemsPerPage?: number;\n filter?: string;\n lang?: string;\n offset?: string;\n query: string;\n sortField?: string;\n sortOrder?: ESOrderDirection;\n}\n\n/**\n * Provides util listing methods to get contentlets data from Elastic Search endpoint\n * @export\n * @class DotESContentService\n */\n@Injectable()\nexport class DotESContentService {\n private _paginationPerPage = 40;\n private _offset = '0';\n private _url = '/api/content/_search';\n private _defaultQueryParams = { '+languageId': '1', '+deleted': 'false', '+working': 'true' };\n private _sortField = 'modDate';\n private _sortOrder: ESOrderDirection = ESOrderDirection.DESC;\n private _extraParams: Map = new Map(Object.entries(this._defaultQueryParams));\n\n constructor(private coreWebService: CoreWebService) {}\n\n /**\n * Returns a list of contentlets from Elastic Search endpoint\n * @param queryEsParams params\n * @returns Observable\n * @memberof DotESContentService\n */\n public get(params: queryEsParams): Observable {\n this.setBaseParams(params);\n const queryParams = this.getESQuery(this.getObjectFromMap(this._extraParams));\n\n return this.coreWebService\n .requestView({\n body: JSON.stringify(queryParams),\n method: 'POST',\n url: this._url\n })\n .pipe(pluck('entity'), take(1));\n }\n\n private setExtraParams(name: string, value?: string | number): void {\n if (value !== null && value !== undefined) {\n this._extraParams.set(name, value.toString());\n }\n }\n\n private deleteExtraParams(name: string): void {\n this._extraParams.delete(name);\n }\n\n private getESQuery(params: {\n [key: string]: string | number;\n }): { [key: string]: string | number } {\n const query = {\n query: JSON.stringify(params).replace(/\"|{|}|,/g, ' '),\n sort: `${this._sortField || ''} ${this._sortOrder || ''}`,\n limit: this._paginationPerPage,\n offset: this._offset\n };\n\n return query;\n }\n\n private setBaseParams(params: queryEsParams): void {\n this._paginationPerPage = params.itemsPerPage || this._paginationPerPage;\n this._sortField = params.sortField || this._sortField;\n this._sortOrder = params.sortOrder || this._sortOrder;\n this._offset = params.offset || this._offset;\n this.deleteExtraParams('+languageId');\n this.deleteExtraParams('+title');\n\n // Getting values from Query string param\n const queryParamsArray = params.query.split('+').map((item) => {\n return item.split(':');\n });\n\n // Populating ExtraParams map\n queryParamsArray.forEach(([param, value]) => {\n if (param.length > 1) this.setExtraParams(`+${param}`, value);\n });\n\n if (params.lang) this.setExtraParams('+languageId', params.lang);\n\n let filterValue = '';\n if (params.filter && params.filter.indexOf(' ') > 0) {\n filterValue = `'${params.filter.replace(/'/g, \"\\\\'\")}'`;\n }\n this.setExtraParams('+title', `${filterValue || params.filter || ''}*`);\n }\n\n private getObjectFromMap(map: Map): { [key: string]: string | number } {\n let result = Array.from(map).reduce(\n (obj, [key, value]) => Object.assign(obj, { [key]: value }),\n {}\n );\n\n return result;\n }\n}\n", + "properties": [ + { + "name": "filter", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 13 + }, + { + "name": "itemsPerPage", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 12 + }, + { + "name": "lang", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 14 + }, + { + "name": "offset", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 15 + }, + { + "name": "query", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 16 + }, + { + "name": "sortField", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 17 + }, + { + "name": "sortOrder", + "deprecated": false, + "deprecationMessage": "", + "type": "ESOrderDirection", + "optional": true, + "description": "", + "line": 18 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "RegexTemplate", + "id": "interface-RegexTemplate-9da7d9b972683cf4ce823f8f18e747a0e21bd32c36adbd257c3231247257f34619d189b54416750a2164011eca3b9ea6d2fd809ffa74437c97b38cd907e63cd5", + "file": "apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/components/fields/content-type-fields-properties-form/field-properties/regex-check-property/regex-check-property.component.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Component, OnInit } from '@angular/core';\nimport { DotMessageService } from '@services/dot-message/dot-messages.service';\nimport { FieldProperty } from '../field-properties.model';\nimport { FormGroup } from '@angular/forms';\n\nexport interface RegexTemplate {\n label: string;\n value: string;\n}\n@Component({\n selector: 'dot-regex-check-property',\n templateUrl: './regex-check-property.component.html',\n styleUrls: ['./regex-check-property.component.scss']\n})\nexport class RegexCheckPropertyComponent implements OnInit {\n regexCheckTempletes: RegexTemplate[] = [];\n\n property: FieldProperty;\n group: FormGroup;\n\n constructor(private dotMessageService: DotMessageService) {}\n\n ngOnInit() {\n this.regexCheckTempletes = [\n {\n label: this.dotMessageService.get(\n 'contenttypes.field.properties.validation_regex.values.select'\n ),\n value: ''\n },\n {\n label: this.dotMessageService.get(\n 'contenttypes.field.properties.validation_regex.values.email'\n ),\n value: '^([a-zA-Z0-9]+[a-zA-Z0-9._%+-]*@(?:[a-zA-Z0-9-]+.)+[a-zA-Z]{2,4})$'\n },\n {\n label: this.dotMessageService.get(\n 'contenttypes.field.properties.validation_regex.values.numbers_only'\n ),\n value: '[0-9]*'\n },\n {\n label: this.dotMessageService.get(\n 'contenttypes.field.properties.validation_regex.values.letters_only'\n ),\n value: '[a-zA-Zs]*'\n },\n {\n label: this.dotMessageService.get(\n 'contenttypes.field.properties.validation_regex.values.alphanumeric'\n ),\n value: '[0-9a-zA-Zs]*'\n },\n {\n label: this.dotMessageService.get(\n 'contenttypes.field.properties.validation_regex.values.us_zip_code'\n ),\n value: '(^d{5}$)|(^d{5}-d{4}$)'\n },\n {\n label: this.dotMessageService.get(\n 'contenttypes.field.properties.validation_regex.values.us_phone'\n ),\n value: '^(?[1-9]d{2}[)-]s?d{3}-d{4}$'\n },\n {\n label: this.dotMessageService.get(\n 'contenttypes.field.properties.validation_regex.values.url_pattern'\n ),\n value:\n // tslint:disable-next-line:max-line-length\n '^((http|ftp|https):\\\\/\\\\/w{3}[d]*.|(http|ftp|https):\\\\/\\\\/|w{3}[d]*.)([wd._\\\\-#\\\\(\\\\)\\\\[\\\\),;:]+@[wd._\\\\-#\\\\(\\\\)\\\\[\\\\),;:])?([a-z0-9]+.)*[a-z-0-9]+.([a-z]{2,3})?[a-z]{2,6}(:[0-9]+)?(\\\\/[\\\\/a-zA-Z0-9._\\\\-,%s]+)*(\\\\/|\\\\?[a-z0-9=%&.\\\\-,#]+)?$'\n },\n {\n label: this.dotMessageService.get(\n 'contenttypes.field.properties.validation_regex.values.no_html'\n ),\n value: '[^(<[.\\n]+>)]*'\n }\n ];\n }\n\n templateSelect(event): void {\n this.group.controls[this.property.name].setValue(event.value);\n }\n}\n", + "properties": [ + { + "name": "label", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 7 + }, + { + "name": "value", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 8 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "Relationships", + "id": "interface-Relationships-c411403c9accaae031ba7992a8f495e6dfd1b23ab931867be818f4a46e794421dd0c6f6084293f65257d8ad53004de6a345bcc0634b385da941bda97edeee0ec", + "file": "libs/dotcms-models/src/lib/dot-content-types.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { DotCMSSystemActionMappings, DotCMSWorkflow } from '../index';\n\nexport interface DotCMSContentType {\n baseType: string;\n icon?: string;\n clazz: string;\n defaultType: boolean;\n description?: string;\n detailPage?: string;\n expireDateVar?: string;\n fields: DotCMSContentTypeField[];\n fixed: boolean;\n folder: string;\n host: string;\n iDate: number;\n id: string;\n layout: DotCMSContentTypeLayoutRow[];\n modDate: number;\n multilingualable: boolean;\n nEntries: number;\n name: string;\n owner?: string;\n publishDateVar?: string;\n system: boolean;\n urlMapPattern?: string;\n variable: string;\n versionable: boolean;\n workflows: DotCMSWorkflow[];\n systemActionMappings?: DotCMSSystemActionMappings;\n}\n\nexport interface DotCMSContentTypeField {\n categories?: DotCMSContentTypeFieldCategories;\n clazz: string;\n contentTypeId: string;\n dataType: string;\n defaultValue?: string;\n fieldType: string;\n fieldTypeLabel: string;\n fieldVariables: DotCMSContentTypeFieldVariable[];\n fixed: boolean;\n hint?: string;\n iDate: number;\n id: string;\n indexed: boolean;\n listed: boolean;\n modDate: number;\n name: string;\n readOnly: boolean;\n regexCheck?: string;\n relationships?: Relationships;\n required: boolean;\n searchable: boolean;\n sortOrder: number;\n unique: boolean;\n values?: string;\n variable: string;\n}\n\nexport interface DotCMSContentTypeLayoutRow {\n columns?: DotCMSContentTypeLayoutColumn[];\n divider: DotCMSContentTypeField;\n}\n\nexport interface DotCMSContentTypeLayoutColumn {\n columnDivider: DotCMSContentTypeField;\n fields: DotCMSContentTypeField[];\n}\n\nexport interface DotCMSContentTypeFieldCategories {\n categoryName: string;\n description?: string;\n inode: string;\n key: string;\n keywords?: string;\n sortOrder: number;\n}\n\nexport interface DotCMSContentTypeFieldVariable {\n clazz: string;\n fieldId: string;\n id: string;\n key: string;\n value: string;\n}\n\n/** @private */\ninterface Relationships {\n cardinality: number;\n velocityVar: string;\n}\n", + "properties": [ + { + "name": "cardinality", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 89 + }, + { + "name": "velocityVar", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 90 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "ResponseError", + "id": "interface-ResponseError-9b174bc550fcc718608fab2b5b05af7a1f8ca1311e0b776eceb840c5f57e51ab8edca3d7108c20c47fec9f96345a5c9f62188f8f9888f10e99e9312315c25d94", + "file": "libs/dotcms-js/src/lib/core/util/http-response-util.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { HttpCode } from './http-code';\nimport { HttpRequest, HttpErrorResponse, HttpResponse } from '@angular/common/http';\n\nexport const NETWORK_CONNECTION_ERROR = 1;\nexport const UNKNOWN_RESPONSE_ERROR = 2;\nexport const SERVER_RESPONSE_ERROR = 3;\nexport const CLIENTS_ONLY_MESSAGES = {\n 1: 'Could not connect to server.'\n};\n\nexport class CwError {\n constructor(\n public code: number,\n public message: string,\n public request?: HttpRequest,\n public response?: HttpErrorResponse,\n public source?: any\n ) {}\n}\n\nexport interface ResponseError {\n response: HttpResponse;\n msg: string;\n}\n\nexport function isSuccess(resp: HttpResponse): boolean {\n return resp.status > 199 && resp.status < 300;\n}\n\nexport function hasContent(resp: HttpResponse): boolean {\n return isSuccess(resp) && resp.status !== HttpCode.NO_CONTENT;\n}\n", + "properties": [ + { + "name": "msg", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 23 + }, + { + "name": "response", + "deprecated": false, + "deprecationMessage": "", + "type": "HttpResponse", + "optional": false, + "description": "", + "line": 22 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "RipplePosition", + "id": "interface-RipplePosition-b8f525cecc07ad1b6cd507ef427d35cf3061a9e79bb35a99b2ea2d76ae3cbfe75d13ddfaa23e9d62ce7c8a0b27a390ad3b25c3ca94482122124be170bce5a42e", + "file": "apps/dotcms-ui/src/app/view/directives/ripple/ripple-effect.directive.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Directive, ElementRef, HostListener, HostBinding, Renderer2 } from '@angular/core';\nimport { ColorUtil } from '../../../api/util/ColorUtil';\n\n/**\n * Directives to dotMdRipple effects.\n * How to use:\n * \n * \n * \n */\n@Directive({\n selector: '[dotMdRipple]'\n})\nexport class DotRippleEffectDirective {\n private static readonly WHITE_COLOR = 'rgba(255, 255, 255, 0.4)';\n private static readonly EFFECT_DEFAULT_COLOR = 'rgba(0, 0, 0, 0.2)';\n\n @HostBinding('style.overflow')\n overflow = 'hidden';\n\n @HostBinding('style.position')\n position = 'relative';\n\n private rippleElement: HTMLElement;\n private rippleSize: RippleSize;\n private hostNativeElement: HTMLElement;\n\n constructor(\n private host: ElementRef,\n private renderer2: Renderer2,\n private colorUtil: ColorUtil\n ) {\n this.hostNativeElement = host.nativeElement;\n }\n\n @HostListener('click', ['$event'])\n onClick(event: MouseEvent): void {\n if (!this.rippleElement) {\n this.createRippleElement();\n }\n\n this.setRipplePosition(event);\n this.animateRipple();\n }\n\n private animateRipple(): void {\n this.renderer2.addClass(this.rippleElement, 'animate');\n\n setTimeout(() => {\n this.renderer2.addClass(this.rippleElement, 'animate');\n }, 1);\n }\n\n private createRippleElement(): void {\n this.rippleElement = this.renderer2.createElement('div');\n this.renderer2.appendChild(this.hostNativeElement, this.rippleElement);\n this.rippleSize = this.getRippleSize();\n this.renderer2.addClass(this.rippleElement, 'ripple-effect');\n this.renderer2.setStyle(this.rippleElement, 'width', `${this.rippleSize.width}px`);\n this.renderer2.setStyle(this.rippleElement, 'height', `${this.rippleSize.height}px`);\n this.renderer2.setStyle(this.rippleElement, 'background', this.getRippleColor());\n }\n\n private getRippleColor(): string {\n const hostBackgroundColor = window.getComputedStyle(this.hostNativeElement, null)\n .backgroundColor;\n const isBright = this.colorUtil.isBrightness(hostBackgroundColor);\n\n return isBright\n ? DotRippleEffectDirective.WHITE_COLOR\n : DotRippleEffectDirective.EFFECT_DEFAULT_COLOR;\n }\n\n private getRipplePosition(event: MouseEvent): RipplePosition {\n const btnOffset = this.hostNativeElement.getBoundingClientRect();\n const xPos = event.pageX - btnOffset.left;\n const yPos = event.pageY - btnOffset.top;\n\n return {\n x: xPos - this.rippleSize.width / 2,\n y: yPos - this.rippleSize.height / 2\n };\n }\n\n private getRippleSize(): RippleSize {\n const btnOffset = this.host.nativeElement.getBoundingClientRect();\n const rippleSize =\n Math.sqrt(btnOffset.width * btnOffset.width + btnOffset.height * btnOffset.height) * 2 +\n 2;\n\n return {\n height: rippleSize,\n width: rippleSize\n };\n }\n\n private setRipplePosition(event: MouseEvent): void {\n const ripplePosition: RipplePosition = this.getRipplePosition(event);\n this.renderer2.setStyle(this.rippleElement, 'top', `${ripplePosition.y}px`);\n this.renderer2.setStyle(this.rippleElement, 'left', `${ripplePosition.x}px`);\n }\n}\n\ninterface RippleSize {\n height: number;\n width: number;\n}\n\ninterface RipplePosition {\n x: number;\n y: number;\n}\n", + "properties": [ + { + "name": "x", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 110 + }, + { + "name": "y", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 111 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "RippleSize", + "id": "interface-RippleSize-b8f525cecc07ad1b6cd507ef427d35cf3061a9e79bb35a99b2ea2d76ae3cbfe75d13ddfaa23e9d62ce7c8a0b27a390ad3b25c3ca94482122124be170bce5a42e", + "file": "apps/dotcms-ui/src/app/view/directives/ripple/ripple-effect.directive.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Directive, ElementRef, HostListener, HostBinding, Renderer2 } from '@angular/core';\nimport { ColorUtil } from '../../../api/util/ColorUtil';\n\n/**\n * Directives to dotMdRipple effects.\n * How to use:\n * \n * \n * \n */\n@Directive({\n selector: '[dotMdRipple]'\n})\nexport class DotRippleEffectDirective {\n private static readonly WHITE_COLOR = 'rgba(255, 255, 255, 0.4)';\n private static readonly EFFECT_DEFAULT_COLOR = 'rgba(0, 0, 0, 0.2)';\n\n @HostBinding('style.overflow')\n overflow = 'hidden';\n\n @HostBinding('style.position')\n position = 'relative';\n\n private rippleElement: HTMLElement;\n private rippleSize: RippleSize;\n private hostNativeElement: HTMLElement;\n\n constructor(\n private host: ElementRef,\n private renderer2: Renderer2,\n private colorUtil: ColorUtil\n ) {\n this.hostNativeElement = host.nativeElement;\n }\n\n @HostListener('click', ['$event'])\n onClick(event: MouseEvent): void {\n if (!this.rippleElement) {\n this.createRippleElement();\n }\n\n this.setRipplePosition(event);\n this.animateRipple();\n }\n\n private animateRipple(): void {\n this.renderer2.addClass(this.rippleElement, 'animate');\n\n setTimeout(() => {\n this.renderer2.addClass(this.rippleElement, 'animate');\n }, 1);\n }\n\n private createRippleElement(): void {\n this.rippleElement = this.renderer2.createElement('div');\n this.renderer2.appendChild(this.hostNativeElement, this.rippleElement);\n this.rippleSize = this.getRippleSize();\n this.renderer2.addClass(this.rippleElement, 'ripple-effect');\n this.renderer2.setStyle(this.rippleElement, 'width', `${this.rippleSize.width}px`);\n this.renderer2.setStyle(this.rippleElement, 'height', `${this.rippleSize.height}px`);\n this.renderer2.setStyle(this.rippleElement, 'background', this.getRippleColor());\n }\n\n private getRippleColor(): string {\n const hostBackgroundColor = window.getComputedStyle(this.hostNativeElement, null)\n .backgroundColor;\n const isBright = this.colorUtil.isBrightness(hostBackgroundColor);\n\n return isBright\n ? DotRippleEffectDirective.WHITE_COLOR\n : DotRippleEffectDirective.EFFECT_DEFAULT_COLOR;\n }\n\n private getRipplePosition(event: MouseEvent): RipplePosition {\n const btnOffset = this.hostNativeElement.getBoundingClientRect();\n const xPos = event.pageX - btnOffset.left;\n const yPos = event.pageY - btnOffset.top;\n\n return {\n x: xPos - this.rippleSize.width / 2,\n y: yPos - this.rippleSize.height / 2\n };\n }\n\n private getRippleSize(): RippleSize {\n const btnOffset = this.host.nativeElement.getBoundingClientRect();\n const rippleSize =\n Math.sqrt(btnOffset.width * btnOffset.width + btnOffset.height * btnOffset.height) * 2 +\n 2;\n\n return {\n height: rippleSize,\n width: rippleSize\n };\n }\n\n private setRipplePosition(event: MouseEvent): void {\n const ripplePosition: RipplePosition = this.getRipplePosition(event);\n this.renderer2.setStyle(this.rippleElement, 'top', `${ripplePosition.y}px`);\n this.renderer2.setStyle(this.rippleElement, 'left', `${ripplePosition.x}px`);\n }\n}\n\ninterface RippleSize {\n height: number;\n width: number;\n}\n\ninterface RipplePosition {\n x: number;\n y: number;\n}\n", + "properties": [ + { + "name": "height", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 105 + }, + { + "name": "width", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 106 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "RuleActionActionEvent", + "id": "interface-RuleActionActionEvent-0b1711c16d9f15e40a82a786230a6640be390785b85223d758ab5ed0bf1c9a9e698359f37bf80cea0ea3fb29b356bb2d1e4036a1bcd9ab8d0859a2634da11f8f", + "file": "libs/dot-rules/src/lib/rule-engine.container.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { from as observableFrom, Observable, merge, Subject } from 'rxjs';\nimport { reduce, mergeMap, take, map, filter, takeUntil } from 'rxjs/operators';\n// tslint:disable-next-line:max-file-line-count\nimport { Component, EventEmitter, ViewEncapsulation, OnDestroy } from '@angular/core';\nimport {\n RuleModel,\n RuleService,\n ConditionGroupModel,\n ConditionModel,\n ActionModel,\n RuleEngineState\n} from './services/Rule';\nimport { CwChangeEvent } from './services/util/CwEvent';\nimport { ServerSideFieldModel, ServerSideTypeModel } from './services/ServerSideFieldModel';\nimport { ConditionService } from './services/Condition';\nimport { ActionService } from './services/Action';\nimport { ConditionGroupService } from './services/ConditionGroup';\nimport { CwError } from '@dotcms/dotcms-js';\nimport { BundleService, IPublishEnvironment } from './services/bundle-service';\nimport { ActivatedRoute, Params } from '@angular/router';\nimport { HttpCode } from '@dotcms/dotcms-js';\nimport { LoggerService } from '@dotcms/dotcms-js';\nimport { RuleViewService } from './services/dot-view-rule-service';\n\nexport interface ParameterChangeEvent extends CwChangeEvent {\n rule?: RuleModel;\n source?: ServerSideFieldModel;\n name: string;\n value: string;\n}\n\nexport interface TypeChangeEvent extends CwChangeEvent {\n rule?: RuleModel;\n source: ServerSideFieldModel;\n value: any;\n index: number;\n}\n\nexport interface RuleActionEvent {\n type: string;\n payload: {\n rule?: RuleModel;\n value?: string | boolean;\n };\n}\nexport interface RuleActionActionEvent extends RuleActionEvent {\n payload: {\n rule?: RuleModel;\n value?: string | boolean;\n ruleAction?: ActionModel;\n index?: number;\n name?: string;\n };\n}\nexport interface ConditionGroupActionEvent extends RuleActionEvent {\n payload: {\n rule?: RuleModel;\n value?: string | boolean;\n conditionGroup?: ConditionGroupModel;\n index?: number;\n priority?: number;\n };\n}\nexport interface ConditionActionEvent extends RuleActionEvent {\n payload: {\n rule?: RuleModel;\n value?: string | boolean;\n condition?: ConditionModel;\n conditionGroup?: ConditionGroupModel;\n index?: number;\n name?: string;\n type?: string;\n };\n}\n\n/**\n *\n */\n@Component({\n encapsulation: ViewEncapsulation.None,\n selector: 'cw-rule-engine-container',\n styleUrls: ['./styles/rule-engine.scss', './styles/angular-material.layouts.scss'],\n template: `\n \n `\n})\nexport class RuleEngineContainer implements OnDestroy {\n rules: RuleModel[];\n state: RuleEngineState = new RuleEngineState();\n\n environments: IPublishEnvironment[] = [];\n\n rules$: EventEmitter = new EventEmitter();\n ruleActions$: EventEmitter = new EventEmitter();\n conditionGroups$: EventEmitter = new EventEmitter();\n globalError: string;\n pageId: string;\n isContentletHost: boolean;\n\n private destroy$: Subject = new Subject();\n\n constructor(\n public _ruleService: RuleService,\n private _ruleActionService: ActionService,\n private _conditionGroupService: ConditionGroupService,\n private _conditionService: ConditionService,\n public bundleService: BundleService,\n private route: ActivatedRoute,\n private loggerService: LoggerService,\n private ruleViewService: RuleViewService\n ) {\n this.rules$.subscribe((rules) => {\n this.rules = rules;\n });\n\n this.bundleService\n .loadPublishEnvironments()\n .pipe(take(1))\n .subscribe((environments) => (this.environments = environments));\n this.initRules();\n\n this._ruleService._errors$.subscribe((res) => {\n this.ruleViewService.showErrorMessage(\n res.message,\n false,\n res.response.headers.get('error-key')\n );\n this.state.loading = false;\n this.state.showRules = false;\n });\n\n merge(\n this._ruleActionService.error,\n this._conditionGroupService.error,\n this._conditionService.error\n )\n .pipe(takeUntil(this.destroy$))\n .subscribe((message: string) => {\n this.ruleViewService.showErrorMessage(message);\n\n this.initRules();\n });\n }\n\n alphaSort(key): (a, b) => number {\n return (a, b) => {\n let x;\n if (a[key] > b[key]) {\n x = 1;\n } else if (a[key] < b[key]) {\n x = -1;\n } else {\n x = 0;\n }\n return x;\n };\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.complete();\n }\n\n /**\n *\n * @param event\n */\n onCreateRule(event): void {\n this.loggerService.info('RuleEngineContainer', 'onCreateRule', event);\n const priority = this.rules.length ? this.rules[0].priority + 1 : 1;\n const rule = new RuleModel({ priority });\n const group = new ConditionGroupModel({ operator: 'AND', priority: 1 });\n group._conditions.push(new ConditionModel({ _type: new ServerSideTypeModel() }));\n rule._conditionGroups.push(group);\n const action = new ActionModel(null, new ServerSideTypeModel());\n action._owningRule = rule;\n rule._ruleActions.push(action);\n rule._saved = false;\n rule._expanded = false;\n this.rules$.emit([rule].concat(this.rules));\n }\n\n onDeleteRule(event: RuleActionEvent): void {\n const rule = event.payload.rule;\n rule._deleting = true;\n this.state.deleting = true;\n if (rule.isPersisted()) {\n this._ruleService.deleteRule(rule.key).subscribe(\n (_result) => {\n this.state.deleting = false;\n const rules = this.rules.filter((arrayRule) => arrayRule.key !== rule.key);\n this.rules$.emit(rules);\n },\n (e: CwError) => {\n this._handle403Error(e) ? null : { invalid: e.message };\n }\n );\n }\n }\n\n onUpdateEnabledState(event: RuleActionEvent): void {\n event.payload.rule.enabled = event.payload.value;\n this.patchRule(event.payload.rule, false);\n }\n\n onUpdateRuleName(event: RuleActionEvent): void {\n event.payload.rule.name = event.payload.value;\n this.patchRule(event.payload.rule, false);\n }\n\n onUpdateFireOn(event: RuleActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onUpdateFireOn', event);\n event.payload.rule.fireOn = event.payload.value;\n this.patchRule(event.payload.rule, false);\n }\n\n onUpdateExpandedState(event: RuleActionEvent): void {\n const rule = event.payload.rule;\n rule._expanded = event.payload.value;\n if (rule._expanded) {\n let obs2: Observable;\n if (rule._conditionGroups.length === 0) {\n const obs: Observable<\n ConditionGroupModel[]\n > = this._conditionGroupService.allAsArray(\n rule.key,\n Object.keys(rule.conditionGroups)\n );\n obs2 = obs.pipe(\n mergeMap((groups: ConditionGroupModel[]) => observableFrom(groups))\n );\n } else {\n obs2 = observableFrom(rule._conditionGroups);\n }\n\n const obs3: Observable = obs2.pipe(\n mergeMap(\n (group: ConditionGroupModel) =>\n this._conditionService.listForGroup(\n group,\n this._ruleService._conditionTypes\n ),\n (group: ConditionGroupModel, conditions: ConditionModel[]) => {\n if (conditions) {\n conditions.forEach((condition: ConditionModel) => {\n condition.type = this._ruleService._conditionTypes[\n condition.conditionlet\n ];\n });\n }\n group._conditions = conditions;\n return group;\n }\n )\n );\n\n const obs4: Observable = obs3.pipe(\n reduce((acc: ConditionGroupModel[], group: ConditionGroupModel) => {\n acc.push(group);\n return acc;\n }, [])\n );\n\n obs4.subscribe(\n (groups: ConditionGroupModel[]) => {\n rule._conditionGroups = groups;\n if (rule._conditionGroups.length === 0) {\n this.loggerService.info(\n 'RuleEngineContainer',\n 'conditionGroups',\n 'Add stub group'\n );\n const group = new ConditionGroupModel({ operator: 'AND', priority: 1 });\n group._conditions.push(\n new ConditionModel({\n _type: new ServerSideTypeModel(),\n operator: 'AND',\n priority: 1\n })\n );\n rule._conditionGroups.push(group);\n } else {\n rule._conditionGroups.sort(this.prioritySortFn);\n rule._conditionGroups.forEach((group: ConditionGroupModel) => {\n group._conditions.sort(this.prioritySortFn);\n if (group._conditions.length === 0) {\n group._conditions.push(\n new ConditionModel({\n _type: new ServerSideTypeModel(),\n operator: 'AND',\n priority: 1\n })\n );\n }\n });\n }\n },\n (e) => {\n this.loggerService.error('RuleEngineContainer', e);\n }\n );\n\n if (rule._ruleActions.length === 0) {\n this._ruleActionService\n .allAsArray(\n rule.key,\n Object.keys(rule.ruleActions),\n this._ruleService._ruleActionTypes\n )\n .subscribe((actions) => {\n rule._ruleActions = actions;\n if (rule._ruleActions.length === 0) {\n const action = new ActionModel(null, new ServerSideTypeModel(), 1);\n rule._ruleActions.push(action);\n rule._ruleActions.sort(this.prioritySortFn);\n } else {\n rule._ruleActions.sort(this.prioritySortFn);\n }\n });\n }\n }\n }\n\n onCreateRuleAction(event: RuleActionActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onCreateRuleAction', event);\n const rule = event.payload.rule;\n const priority = rule._ruleActions.length\n ? rule._ruleActions[rule._ruleActions.length - 1].priority + 1\n : 1;\n const entity = new ActionModel(null, new ServerSideTypeModel(), priority);\n\n this.patchRule(rule, true);\n rule._ruleActions.push(entity);\n rule._saved = false;\n }\n\n onDeleteRuleAction(event: RuleActionActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onDeleteRuleAction', event);\n const rule = event.payload.rule;\n const ruleAction = event.payload.ruleAction;\n if (ruleAction.isPersisted()) {\n this._ruleActionService.remove(rule.key, ruleAction).subscribe((_result) => {\n rule._ruleActions = rule._ruleActions.filter((aryAction) => {\n return aryAction.key !== ruleAction.key;\n });\n if (rule._ruleActions.length === 0) {\n rule._ruleActions.push(new ActionModel(null, new ServerSideTypeModel(), 1));\n }\n });\n }\n }\n\n onUpdateRuleActionType(event: RuleActionActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onUpdateRuleActionType');\n try {\n const ruleAction = event.payload.ruleAction;\n const rule = event.payload.rule;\n const idx = event.payload.index;\n const type: ServerSideTypeModel = this._ruleService._ruleActionTypes[\n event.payload.value\n ];\n rule._ruleActions[idx] = new ActionModel(ruleAction.key, type, ruleAction.priority);\n this.patchAction(rule, ruleAction);\n } catch (e) {\n this.loggerService.error('RuleComponent', 'onActionTypeChange', e);\n }\n }\n\n onUpdateRuleActionParameter(event: RuleActionActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onUpdateRuleActionParameter');\n const ruleAction = event.payload.ruleAction;\n ruleAction.setParameter(event.payload.name, event.payload.value);\n this.patchAction(event.payload.rule, ruleAction);\n }\n\n onCreateConditionGroup(event: ConditionGroupActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onCreateConditionGroup');\n const rule = event.payload.rule;\n const priority = rule._conditionGroups.length\n ? rule._conditionGroups[rule._conditionGroups.length - 1].priority + 1\n : 1;\n const group = new ConditionGroupModel({ operator: 'AND', priority: priority });\n group._conditions.push(\n new ConditionModel({ _type: new ServerSideTypeModel(), operator: 'AND', priority: 1 })\n );\n rule._conditionGroups.push(group);\n rule._conditionGroups.sort(this.prioritySortFn);\n }\n\n onUpdateConditionGroupOperator(event: ConditionGroupActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onUpdateConditionGroupOperator');\n const group = event.payload.conditionGroup;\n group.operator = event.payload.value;\n if (group.key != null) {\n this.patchConditionGroup(event.payload.rule, group);\n this.patchRule(event.payload.rule);\n }\n }\n\n onDeleteConditionGroup(event: ConditionGroupActionEvent): void {\n const rule = event.payload.rule;\n const group = event.payload.conditionGroup;\n this._conditionGroupService.remove(rule.key, group).subscribe();\n rule._conditionGroups = rule._conditionGroups.filter(\n (aryGroup) => aryGroup.key !== group.key\n );\n }\n\n onCreateCondition(event: ConditionActionEvent): void {\n const rule = event.payload.rule;\n this.ruleUpdating(rule, true);\n try {\n const group = event.payload.conditionGroup;\n const priority = group._conditions.length\n ? group._conditions[group._conditions.length - 1].priority + 1\n : 1;\n const entity = new ConditionModel({\n _type: new ServerSideTypeModel(),\n operator: 'AND',\n priority: priority\n });\n group._conditions.push(entity);\n this.ruleUpdated(rule);\n } catch (e) {\n this.loggerService.error('RuleEngineContainer', 'onCreateCondition', e);\n this.ruleUpdated(rule, [{ unhandledError: e }]);\n }\n }\n\n onUpdateConditionType(event: ConditionActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onUpdateConditionType');\n try {\n let condition = event.payload.condition;\n const group = event.payload.conditionGroup;\n const rule = event.payload.rule;\n const idx = event.payload.index;\n const type: ServerSideTypeModel = this._ruleService._conditionTypes[\n event.payload.value\n ];\n // replace the condition rather than mutate it to force event for 'onPush' NG2 components.\n condition = new ConditionModel({\n _type: type,\n id: condition.key,\n operator: condition.operator,\n priority: condition.priority\n });\n group._conditions[idx] = condition;\n this.patchCondition(rule, group, condition);\n } catch (e) {\n this.loggerService.error('RuleComponent', 'onActionTypeChange', e);\n }\n }\n\n onUpdateConditionParameter(event: ConditionActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onUpdateConditionParameter');\n const condition = event.payload.condition;\n condition.setParameter(event.payload.name, event.payload.value);\n this.patchCondition(event.payload.rule, event.payload.conditionGroup, condition);\n }\n\n onUpdateConditionOperator(event: ConditionActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onUpdateConditionOperator');\n const condition = event.payload.condition;\n condition.operator = event.payload.value;\n this.patchCondition(event.payload.rule, event.payload.conditionGroup, condition);\n }\n\n onDeleteCondition(event: ConditionActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onDeleteCondition', event);\n const rule = event.payload.rule;\n const group = event.payload.conditionGroup;\n const condition = event.payload.condition;\n if (condition.isPersisted()) {\n this._conditionService.remove(condition).subscribe((_result) => {\n group._conditions = group._conditions.filter((aryCondition) => {\n return aryCondition.key !== condition.key;\n });\n if (group._conditions.length === 0) {\n this.loggerService.info(\n 'RuleEngineContainer',\n 'condition',\n 'Remove Condition and remove Groups is empty'\n );\n this._conditionGroupService.remove(rule.key, group).subscribe();\n rule._conditionGroups = rule._conditionGroups.filter(\n (aryGroup) => aryGroup.key !== group.key\n );\n }\n if (rule._conditionGroups.length === 0) {\n this.loggerService.info(\n 'RuleEngineContainer',\n 'conditionGroups',\n 'Add stub group if Groups are empty'\n );\n const conditionGroup = new ConditionGroupModel({\n operator: 'AND',\n priority: 1\n });\n conditionGroup._conditions.push(\n new ConditionModel({\n _type: new ServerSideTypeModel(),\n operator: 'AND',\n priority: 1\n })\n );\n rule._conditionGroups.push(conditionGroup);\n }\n });\n }\n }\n\n ruleUpdating(rule, disable = true): void {\n if (disable && rule.enabled && rule.key) {\n this.loggerService.info(\n 'RuleEngineContainer',\n 'ruleUpdating',\n 'disabling rule due for edit.'\n );\n this.patchRule(rule, disable);\n }\n rule._saved = false;\n rule._saving = true;\n rule._errors = null;\n }\n\n ruleUpdated(rule: RuleModel, errors?: { [key: string]: any }): void {\n rule._saving = false;\n if (!errors) {\n rule._saved = true;\n } else {\n this.loggerService.error(errors);\n rule._errors = errors;\n }\n }\n\n patchConditionGroup(rule: RuleModel, group: ConditionGroupModel, disable = true): void {\n this.ruleUpdating(rule, false);\n if (disable && rule.enabled) {\n rule.enabled = false;\n }\n this._conditionGroupService\n .updateConditionGroup(rule.key, group)\n .subscribe((_result) => {});\n }\n\n patchRule(rule: RuleModel, disable = true): void {\n this.ruleUpdating(rule, false);\n if (disable && rule.enabled) {\n rule.enabled = false;\n }\n if (rule.isValid()) {\n if (rule.isPersisted()) {\n this._ruleService.updateRule(rule.key, rule).subscribe(\n () => {\n this.ruleUpdated(rule);\n },\n (e: CwError) => {\n const ruleError = this._handle403Error(e) ? null : { invalid: e.message };\n this.ruleUpdated(rule, ruleError);\n this.initRules();\n }\n );\n } else {\n this._ruleService.createRule(rule).subscribe(\n () => {\n this.ruleUpdated(rule);\n },\n (e: CwError) => {\n const ruleError = this._handle403Error(e) ? null : { invalid: e.message };\n this.ruleUpdated(rule, ruleError);\n this.initRules();\n }\n );\n }\n } else {\n this.ruleUpdated(rule, {\n invalid: 'Cannot save, rule is not valid.'\n });\n }\n }\n\n patchAction(rule: RuleModel, ruleAction: ActionModel): void {\n if (ruleAction.isValid()) {\n this.ruleUpdating(rule, false);\n if (!ruleAction.isPersisted()) {\n this._ruleActionService.createRuleAction(rule.key, ruleAction).subscribe(\n (_) => {\n this.ruleUpdated(rule);\n },\n (e: CwError) => {\n const ruleError = this._handle403Error(e) ? null : { invalid: e.message };\n this.ruleUpdated(rule, ruleError);\n }\n );\n } else {\n this._ruleActionService.updateRuleAction(rule.key, ruleAction).subscribe(\n (_result) => {\n this.ruleUpdated(rule);\n },\n (e: any) => {\n const ruleError = this._handle403Error(e) ? null : { invalid: e.message };\n this.ruleUpdated(rule, ruleError);\n }\n );\n }\n } else {\n this.ruleUpdating(rule);\n this.ruleUpdated(rule, {\n invalid: 'Cannot save, action is not valid.'\n });\n }\n }\n\n patchCondition(rule: RuleModel, group: ConditionGroupModel, condition: ConditionModel): void {\n try {\n if (condition.isValid()) {\n this.ruleUpdating(rule, false);\n if (condition.isPersisted()) {\n this._conditionService.save(group.key, condition).subscribe(\n (_result) => {\n this.ruleUpdated(rule);\n },\n (e: any) => {\n const ruleError = this._handle403Error(e)\n ? null\n : { invalid: e.message };\n this.ruleUpdated(rule, ruleError);\n }\n );\n } else {\n if (!group.isPersisted()) {\n this._conditionGroupService\n .createConditionGroup(rule.key, group)\n .subscribe((_foo) => {\n this._conditionService.add(group.key, condition).subscribe(\n () => {\n group.conditions[condition.key] = true;\n this.ruleUpdated(rule);\n },\n (e: CwError) => {\n const ruleError = this._handle403Error(e)\n ? null\n : { invalid: e.message };\n this.ruleUpdated(rule, ruleError);\n }\n );\n });\n } else {\n this._conditionService.add(group.key, condition).subscribe(\n () => {\n group.conditions[condition.key] = true;\n this.ruleUpdated(rule);\n },\n (e: CwError) => {\n const ruleError = this._handle403Error(e)\n ? null\n : { invalid: e.message };\n this.ruleUpdated(rule, ruleError);\n }\n );\n }\n }\n } else {\n this.ruleUpdating(rule);\n this.loggerService.info('RuleEngineContainer', 'patchCondition', 'Not valid');\n rule._saving = false;\n rule._errors = { invalid: 'Condition not valid.' };\n }\n } catch (e) {\n this.loggerService.error(e);\n this.ruleUpdated(rule, { invalid: e.message });\n }\n }\n\n prioritySortFn(a: any, b: any): number {\n return a.priority - b.priority;\n }\n\n private initRules(): void {\n this.state.loading = true;\n\n this.pageId = '';\n\n const pageIdParams = this.route.params.pipe(map((params: Params) => params.pageId));\n const queryParams = this.route.queryParams.pipe(map((params: Params) => params.realmId));\n\n merge(pageIdParams, queryParams)\n .pipe(\n filter((res) => !!res),\n take(1)\n )\n .subscribe((id: string) => {\n this.pageId = id;\n });\n\n this._ruleService.requestRules(this.pageId);\n this._ruleService\n .loadRules()\n .pipe(takeUntil(this.destroy$))\n .subscribe((rules: RuleModel[]) => {\n this.loadRules(rules);\n });\n this.route.queryParams\n .pipe(take(1))\n .subscribe(\n (params: Params) => (this.isContentletHost = params.isContentletHost === 'true')\n );\n }\n\n private loadRules(rules: RuleModel[]): void {\n rules.sort((a, b) => {\n return b.priority - a.priority;\n });\n this.rules$.emit(rules);\n this.state.loading = false;\n }\n\n private _handle403Error(e: CwError): boolean {\n let handled = false;\n try {\n if (e && e.response.status === HttpCode.FORBIDDEN) {\n const errorJson = e.response;\n if (errorJson && errorJson.error) {\n this.ruleViewService.showErrorMessage(\n errorJson.error.message.replace('dotcms.api.error.forbidden: ', '')\n );\n handled = true;\n }\n }\n } catch (e) {\n this.loggerService.error('Error while processing invalid response: ', e);\n }\n\n this.initRules();\n\n return handled;\n }\n}\n", + "properties": [ + { + "name": "payload", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": false, + "description": "", + "line": 47 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [], + "extends": "RuleActionEvent" + }, + { + "name": "RuleActionEvent", + "id": "interface-RuleActionEvent-0b1711c16d9f15e40a82a786230a6640be390785b85223d758ab5ed0bf1c9a9e698359f37bf80cea0ea3fb29b356bb2d1e4036a1bcd9ab8d0859a2634da11f8f", + "file": "libs/dot-rules/src/lib/rule-engine.container.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { from as observableFrom, Observable, merge, Subject } from 'rxjs';\nimport { reduce, mergeMap, take, map, filter, takeUntil } from 'rxjs/operators';\n// tslint:disable-next-line:max-file-line-count\nimport { Component, EventEmitter, ViewEncapsulation, OnDestroy } from '@angular/core';\nimport {\n RuleModel,\n RuleService,\n ConditionGroupModel,\n ConditionModel,\n ActionModel,\n RuleEngineState\n} from './services/Rule';\nimport { CwChangeEvent } from './services/util/CwEvent';\nimport { ServerSideFieldModel, ServerSideTypeModel } from './services/ServerSideFieldModel';\nimport { ConditionService } from './services/Condition';\nimport { ActionService } from './services/Action';\nimport { ConditionGroupService } from './services/ConditionGroup';\nimport { CwError } from '@dotcms/dotcms-js';\nimport { BundleService, IPublishEnvironment } from './services/bundle-service';\nimport { ActivatedRoute, Params } from '@angular/router';\nimport { HttpCode } from '@dotcms/dotcms-js';\nimport { LoggerService } from '@dotcms/dotcms-js';\nimport { RuleViewService } from './services/dot-view-rule-service';\n\nexport interface ParameterChangeEvent extends CwChangeEvent {\n rule?: RuleModel;\n source?: ServerSideFieldModel;\n name: string;\n value: string;\n}\n\nexport interface TypeChangeEvent extends CwChangeEvent {\n rule?: RuleModel;\n source: ServerSideFieldModel;\n value: any;\n index: number;\n}\n\nexport interface RuleActionEvent {\n type: string;\n payload: {\n rule?: RuleModel;\n value?: string | boolean;\n };\n}\nexport interface RuleActionActionEvent extends RuleActionEvent {\n payload: {\n rule?: RuleModel;\n value?: string | boolean;\n ruleAction?: ActionModel;\n index?: number;\n name?: string;\n };\n}\nexport interface ConditionGroupActionEvent extends RuleActionEvent {\n payload: {\n rule?: RuleModel;\n value?: string | boolean;\n conditionGroup?: ConditionGroupModel;\n index?: number;\n priority?: number;\n };\n}\nexport interface ConditionActionEvent extends RuleActionEvent {\n payload: {\n rule?: RuleModel;\n value?: string | boolean;\n condition?: ConditionModel;\n conditionGroup?: ConditionGroupModel;\n index?: number;\n name?: string;\n type?: string;\n };\n}\n\n/**\n *\n */\n@Component({\n encapsulation: ViewEncapsulation.None,\n selector: 'cw-rule-engine-container',\n styleUrls: ['./styles/rule-engine.scss', './styles/angular-material.layouts.scss'],\n template: `\n \n `\n})\nexport class RuleEngineContainer implements OnDestroy {\n rules: RuleModel[];\n state: RuleEngineState = new RuleEngineState();\n\n environments: IPublishEnvironment[] = [];\n\n rules$: EventEmitter = new EventEmitter();\n ruleActions$: EventEmitter = new EventEmitter();\n conditionGroups$: EventEmitter = new EventEmitter();\n globalError: string;\n pageId: string;\n isContentletHost: boolean;\n\n private destroy$: Subject = new Subject();\n\n constructor(\n public _ruleService: RuleService,\n private _ruleActionService: ActionService,\n private _conditionGroupService: ConditionGroupService,\n private _conditionService: ConditionService,\n public bundleService: BundleService,\n private route: ActivatedRoute,\n private loggerService: LoggerService,\n private ruleViewService: RuleViewService\n ) {\n this.rules$.subscribe((rules) => {\n this.rules = rules;\n });\n\n this.bundleService\n .loadPublishEnvironments()\n .pipe(take(1))\n .subscribe((environments) => (this.environments = environments));\n this.initRules();\n\n this._ruleService._errors$.subscribe((res) => {\n this.ruleViewService.showErrorMessage(\n res.message,\n false,\n res.response.headers.get('error-key')\n );\n this.state.loading = false;\n this.state.showRules = false;\n });\n\n merge(\n this._ruleActionService.error,\n this._conditionGroupService.error,\n this._conditionService.error\n )\n .pipe(takeUntil(this.destroy$))\n .subscribe((message: string) => {\n this.ruleViewService.showErrorMessage(message);\n\n this.initRules();\n });\n }\n\n alphaSort(key): (a, b) => number {\n return (a, b) => {\n let x;\n if (a[key] > b[key]) {\n x = 1;\n } else if (a[key] < b[key]) {\n x = -1;\n } else {\n x = 0;\n }\n return x;\n };\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.complete();\n }\n\n /**\n *\n * @param event\n */\n onCreateRule(event): void {\n this.loggerService.info('RuleEngineContainer', 'onCreateRule', event);\n const priority = this.rules.length ? this.rules[0].priority + 1 : 1;\n const rule = new RuleModel({ priority });\n const group = new ConditionGroupModel({ operator: 'AND', priority: 1 });\n group._conditions.push(new ConditionModel({ _type: new ServerSideTypeModel() }));\n rule._conditionGroups.push(group);\n const action = new ActionModel(null, new ServerSideTypeModel());\n action._owningRule = rule;\n rule._ruleActions.push(action);\n rule._saved = false;\n rule._expanded = false;\n this.rules$.emit([rule].concat(this.rules));\n }\n\n onDeleteRule(event: RuleActionEvent): void {\n const rule = event.payload.rule;\n rule._deleting = true;\n this.state.deleting = true;\n if (rule.isPersisted()) {\n this._ruleService.deleteRule(rule.key).subscribe(\n (_result) => {\n this.state.deleting = false;\n const rules = this.rules.filter((arrayRule) => arrayRule.key !== rule.key);\n this.rules$.emit(rules);\n },\n (e: CwError) => {\n this._handle403Error(e) ? null : { invalid: e.message };\n }\n );\n }\n }\n\n onUpdateEnabledState(event: RuleActionEvent): void {\n event.payload.rule.enabled = event.payload.value;\n this.patchRule(event.payload.rule, false);\n }\n\n onUpdateRuleName(event: RuleActionEvent): void {\n event.payload.rule.name = event.payload.value;\n this.patchRule(event.payload.rule, false);\n }\n\n onUpdateFireOn(event: RuleActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onUpdateFireOn', event);\n event.payload.rule.fireOn = event.payload.value;\n this.patchRule(event.payload.rule, false);\n }\n\n onUpdateExpandedState(event: RuleActionEvent): void {\n const rule = event.payload.rule;\n rule._expanded = event.payload.value;\n if (rule._expanded) {\n let obs2: Observable;\n if (rule._conditionGroups.length === 0) {\n const obs: Observable<\n ConditionGroupModel[]\n > = this._conditionGroupService.allAsArray(\n rule.key,\n Object.keys(rule.conditionGroups)\n );\n obs2 = obs.pipe(\n mergeMap((groups: ConditionGroupModel[]) => observableFrom(groups))\n );\n } else {\n obs2 = observableFrom(rule._conditionGroups);\n }\n\n const obs3: Observable = obs2.pipe(\n mergeMap(\n (group: ConditionGroupModel) =>\n this._conditionService.listForGroup(\n group,\n this._ruleService._conditionTypes\n ),\n (group: ConditionGroupModel, conditions: ConditionModel[]) => {\n if (conditions) {\n conditions.forEach((condition: ConditionModel) => {\n condition.type = this._ruleService._conditionTypes[\n condition.conditionlet\n ];\n });\n }\n group._conditions = conditions;\n return group;\n }\n )\n );\n\n const obs4: Observable = obs3.pipe(\n reduce((acc: ConditionGroupModel[], group: ConditionGroupModel) => {\n acc.push(group);\n return acc;\n }, [])\n );\n\n obs4.subscribe(\n (groups: ConditionGroupModel[]) => {\n rule._conditionGroups = groups;\n if (rule._conditionGroups.length === 0) {\n this.loggerService.info(\n 'RuleEngineContainer',\n 'conditionGroups',\n 'Add stub group'\n );\n const group = new ConditionGroupModel({ operator: 'AND', priority: 1 });\n group._conditions.push(\n new ConditionModel({\n _type: new ServerSideTypeModel(),\n operator: 'AND',\n priority: 1\n })\n );\n rule._conditionGroups.push(group);\n } else {\n rule._conditionGroups.sort(this.prioritySortFn);\n rule._conditionGroups.forEach((group: ConditionGroupModel) => {\n group._conditions.sort(this.prioritySortFn);\n if (group._conditions.length === 0) {\n group._conditions.push(\n new ConditionModel({\n _type: new ServerSideTypeModel(),\n operator: 'AND',\n priority: 1\n })\n );\n }\n });\n }\n },\n (e) => {\n this.loggerService.error('RuleEngineContainer', e);\n }\n );\n\n if (rule._ruleActions.length === 0) {\n this._ruleActionService\n .allAsArray(\n rule.key,\n Object.keys(rule.ruleActions),\n this._ruleService._ruleActionTypes\n )\n .subscribe((actions) => {\n rule._ruleActions = actions;\n if (rule._ruleActions.length === 0) {\n const action = new ActionModel(null, new ServerSideTypeModel(), 1);\n rule._ruleActions.push(action);\n rule._ruleActions.sort(this.prioritySortFn);\n } else {\n rule._ruleActions.sort(this.prioritySortFn);\n }\n });\n }\n }\n }\n\n onCreateRuleAction(event: RuleActionActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onCreateRuleAction', event);\n const rule = event.payload.rule;\n const priority = rule._ruleActions.length\n ? rule._ruleActions[rule._ruleActions.length - 1].priority + 1\n : 1;\n const entity = new ActionModel(null, new ServerSideTypeModel(), priority);\n\n this.patchRule(rule, true);\n rule._ruleActions.push(entity);\n rule._saved = false;\n }\n\n onDeleteRuleAction(event: RuleActionActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onDeleteRuleAction', event);\n const rule = event.payload.rule;\n const ruleAction = event.payload.ruleAction;\n if (ruleAction.isPersisted()) {\n this._ruleActionService.remove(rule.key, ruleAction).subscribe((_result) => {\n rule._ruleActions = rule._ruleActions.filter((aryAction) => {\n return aryAction.key !== ruleAction.key;\n });\n if (rule._ruleActions.length === 0) {\n rule._ruleActions.push(new ActionModel(null, new ServerSideTypeModel(), 1));\n }\n });\n }\n }\n\n onUpdateRuleActionType(event: RuleActionActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onUpdateRuleActionType');\n try {\n const ruleAction = event.payload.ruleAction;\n const rule = event.payload.rule;\n const idx = event.payload.index;\n const type: ServerSideTypeModel = this._ruleService._ruleActionTypes[\n event.payload.value\n ];\n rule._ruleActions[idx] = new ActionModel(ruleAction.key, type, ruleAction.priority);\n this.patchAction(rule, ruleAction);\n } catch (e) {\n this.loggerService.error('RuleComponent', 'onActionTypeChange', e);\n }\n }\n\n onUpdateRuleActionParameter(event: RuleActionActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onUpdateRuleActionParameter');\n const ruleAction = event.payload.ruleAction;\n ruleAction.setParameter(event.payload.name, event.payload.value);\n this.patchAction(event.payload.rule, ruleAction);\n }\n\n onCreateConditionGroup(event: ConditionGroupActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onCreateConditionGroup');\n const rule = event.payload.rule;\n const priority = rule._conditionGroups.length\n ? rule._conditionGroups[rule._conditionGroups.length - 1].priority + 1\n : 1;\n const group = new ConditionGroupModel({ operator: 'AND', priority: priority });\n group._conditions.push(\n new ConditionModel({ _type: new ServerSideTypeModel(), operator: 'AND', priority: 1 })\n );\n rule._conditionGroups.push(group);\n rule._conditionGroups.sort(this.prioritySortFn);\n }\n\n onUpdateConditionGroupOperator(event: ConditionGroupActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onUpdateConditionGroupOperator');\n const group = event.payload.conditionGroup;\n group.operator = event.payload.value;\n if (group.key != null) {\n this.patchConditionGroup(event.payload.rule, group);\n this.patchRule(event.payload.rule);\n }\n }\n\n onDeleteConditionGroup(event: ConditionGroupActionEvent): void {\n const rule = event.payload.rule;\n const group = event.payload.conditionGroup;\n this._conditionGroupService.remove(rule.key, group).subscribe();\n rule._conditionGroups = rule._conditionGroups.filter(\n (aryGroup) => aryGroup.key !== group.key\n );\n }\n\n onCreateCondition(event: ConditionActionEvent): void {\n const rule = event.payload.rule;\n this.ruleUpdating(rule, true);\n try {\n const group = event.payload.conditionGroup;\n const priority = group._conditions.length\n ? group._conditions[group._conditions.length - 1].priority + 1\n : 1;\n const entity = new ConditionModel({\n _type: new ServerSideTypeModel(),\n operator: 'AND',\n priority: priority\n });\n group._conditions.push(entity);\n this.ruleUpdated(rule);\n } catch (e) {\n this.loggerService.error('RuleEngineContainer', 'onCreateCondition', e);\n this.ruleUpdated(rule, [{ unhandledError: e }]);\n }\n }\n\n onUpdateConditionType(event: ConditionActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onUpdateConditionType');\n try {\n let condition = event.payload.condition;\n const group = event.payload.conditionGroup;\n const rule = event.payload.rule;\n const idx = event.payload.index;\n const type: ServerSideTypeModel = this._ruleService._conditionTypes[\n event.payload.value\n ];\n // replace the condition rather than mutate it to force event for 'onPush' NG2 components.\n condition = new ConditionModel({\n _type: type,\n id: condition.key,\n operator: condition.operator,\n priority: condition.priority\n });\n group._conditions[idx] = condition;\n this.patchCondition(rule, group, condition);\n } catch (e) {\n this.loggerService.error('RuleComponent', 'onActionTypeChange', e);\n }\n }\n\n onUpdateConditionParameter(event: ConditionActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onUpdateConditionParameter');\n const condition = event.payload.condition;\n condition.setParameter(event.payload.name, event.payload.value);\n this.patchCondition(event.payload.rule, event.payload.conditionGroup, condition);\n }\n\n onUpdateConditionOperator(event: ConditionActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onUpdateConditionOperator');\n const condition = event.payload.condition;\n condition.operator = event.payload.value;\n this.patchCondition(event.payload.rule, event.payload.conditionGroup, condition);\n }\n\n onDeleteCondition(event: ConditionActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onDeleteCondition', event);\n const rule = event.payload.rule;\n const group = event.payload.conditionGroup;\n const condition = event.payload.condition;\n if (condition.isPersisted()) {\n this._conditionService.remove(condition).subscribe((_result) => {\n group._conditions = group._conditions.filter((aryCondition) => {\n return aryCondition.key !== condition.key;\n });\n if (group._conditions.length === 0) {\n this.loggerService.info(\n 'RuleEngineContainer',\n 'condition',\n 'Remove Condition and remove Groups is empty'\n );\n this._conditionGroupService.remove(rule.key, group).subscribe();\n rule._conditionGroups = rule._conditionGroups.filter(\n (aryGroup) => aryGroup.key !== group.key\n );\n }\n if (rule._conditionGroups.length === 0) {\n this.loggerService.info(\n 'RuleEngineContainer',\n 'conditionGroups',\n 'Add stub group if Groups are empty'\n );\n const conditionGroup = new ConditionGroupModel({\n operator: 'AND',\n priority: 1\n });\n conditionGroup._conditions.push(\n new ConditionModel({\n _type: new ServerSideTypeModel(),\n operator: 'AND',\n priority: 1\n })\n );\n rule._conditionGroups.push(conditionGroup);\n }\n });\n }\n }\n\n ruleUpdating(rule, disable = true): void {\n if (disable && rule.enabled && rule.key) {\n this.loggerService.info(\n 'RuleEngineContainer',\n 'ruleUpdating',\n 'disabling rule due for edit.'\n );\n this.patchRule(rule, disable);\n }\n rule._saved = false;\n rule._saving = true;\n rule._errors = null;\n }\n\n ruleUpdated(rule: RuleModel, errors?: { [key: string]: any }): void {\n rule._saving = false;\n if (!errors) {\n rule._saved = true;\n } else {\n this.loggerService.error(errors);\n rule._errors = errors;\n }\n }\n\n patchConditionGroup(rule: RuleModel, group: ConditionGroupModel, disable = true): void {\n this.ruleUpdating(rule, false);\n if (disable && rule.enabled) {\n rule.enabled = false;\n }\n this._conditionGroupService\n .updateConditionGroup(rule.key, group)\n .subscribe((_result) => {});\n }\n\n patchRule(rule: RuleModel, disable = true): void {\n this.ruleUpdating(rule, false);\n if (disable && rule.enabled) {\n rule.enabled = false;\n }\n if (rule.isValid()) {\n if (rule.isPersisted()) {\n this._ruleService.updateRule(rule.key, rule).subscribe(\n () => {\n this.ruleUpdated(rule);\n },\n (e: CwError) => {\n const ruleError = this._handle403Error(e) ? null : { invalid: e.message };\n this.ruleUpdated(rule, ruleError);\n this.initRules();\n }\n );\n } else {\n this._ruleService.createRule(rule).subscribe(\n () => {\n this.ruleUpdated(rule);\n },\n (e: CwError) => {\n const ruleError = this._handle403Error(e) ? null : { invalid: e.message };\n this.ruleUpdated(rule, ruleError);\n this.initRules();\n }\n );\n }\n } else {\n this.ruleUpdated(rule, {\n invalid: 'Cannot save, rule is not valid.'\n });\n }\n }\n\n patchAction(rule: RuleModel, ruleAction: ActionModel): void {\n if (ruleAction.isValid()) {\n this.ruleUpdating(rule, false);\n if (!ruleAction.isPersisted()) {\n this._ruleActionService.createRuleAction(rule.key, ruleAction).subscribe(\n (_) => {\n this.ruleUpdated(rule);\n },\n (e: CwError) => {\n const ruleError = this._handle403Error(e) ? null : { invalid: e.message };\n this.ruleUpdated(rule, ruleError);\n }\n );\n } else {\n this._ruleActionService.updateRuleAction(rule.key, ruleAction).subscribe(\n (_result) => {\n this.ruleUpdated(rule);\n },\n (e: any) => {\n const ruleError = this._handle403Error(e) ? null : { invalid: e.message };\n this.ruleUpdated(rule, ruleError);\n }\n );\n }\n } else {\n this.ruleUpdating(rule);\n this.ruleUpdated(rule, {\n invalid: 'Cannot save, action is not valid.'\n });\n }\n }\n\n patchCondition(rule: RuleModel, group: ConditionGroupModel, condition: ConditionModel): void {\n try {\n if (condition.isValid()) {\n this.ruleUpdating(rule, false);\n if (condition.isPersisted()) {\n this._conditionService.save(group.key, condition).subscribe(\n (_result) => {\n this.ruleUpdated(rule);\n },\n (e: any) => {\n const ruleError = this._handle403Error(e)\n ? null\n : { invalid: e.message };\n this.ruleUpdated(rule, ruleError);\n }\n );\n } else {\n if (!group.isPersisted()) {\n this._conditionGroupService\n .createConditionGroup(rule.key, group)\n .subscribe((_foo) => {\n this._conditionService.add(group.key, condition).subscribe(\n () => {\n group.conditions[condition.key] = true;\n this.ruleUpdated(rule);\n },\n (e: CwError) => {\n const ruleError = this._handle403Error(e)\n ? null\n : { invalid: e.message };\n this.ruleUpdated(rule, ruleError);\n }\n );\n });\n } else {\n this._conditionService.add(group.key, condition).subscribe(\n () => {\n group.conditions[condition.key] = true;\n this.ruleUpdated(rule);\n },\n (e: CwError) => {\n const ruleError = this._handle403Error(e)\n ? null\n : { invalid: e.message };\n this.ruleUpdated(rule, ruleError);\n }\n );\n }\n }\n } else {\n this.ruleUpdating(rule);\n this.loggerService.info('RuleEngineContainer', 'patchCondition', 'Not valid');\n rule._saving = false;\n rule._errors = { invalid: 'Condition not valid.' };\n }\n } catch (e) {\n this.loggerService.error(e);\n this.ruleUpdated(rule, { invalid: e.message });\n }\n }\n\n prioritySortFn(a: any, b: any): number {\n return a.priority - b.priority;\n }\n\n private initRules(): void {\n this.state.loading = true;\n\n this.pageId = '';\n\n const pageIdParams = this.route.params.pipe(map((params: Params) => params.pageId));\n const queryParams = this.route.queryParams.pipe(map((params: Params) => params.realmId));\n\n merge(pageIdParams, queryParams)\n .pipe(\n filter((res) => !!res),\n take(1)\n )\n .subscribe((id: string) => {\n this.pageId = id;\n });\n\n this._ruleService.requestRules(this.pageId);\n this._ruleService\n .loadRules()\n .pipe(takeUntil(this.destroy$))\n .subscribe((rules: RuleModel[]) => {\n this.loadRules(rules);\n });\n this.route.queryParams\n .pipe(take(1))\n .subscribe(\n (params: Params) => (this.isContentletHost = params.isContentletHost === 'true')\n );\n }\n\n private loadRules(rules: RuleModel[]): void {\n rules.sort((a, b) => {\n return b.priority - a.priority;\n });\n this.rules$.emit(rules);\n this.state.loading = false;\n }\n\n private _handle403Error(e: CwError): boolean {\n let handled = false;\n try {\n if (e && e.response.status === HttpCode.FORBIDDEN) {\n const errorJson = e.response;\n if (errorJson && errorJson.error) {\n this.ruleViewService.showErrorMessage(\n errorJson.error.message.replace('dotcms.api.error.forbidden: ', '')\n );\n handled = true;\n }\n }\n } catch (e) {\n this.loggerService.error('Error while processing invalid response: ', e);\n }\n\n this.initRules();\n\n return handled;\n }\n}\n", + "properties": [ + { + "name": "payload", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": false, + "description": "", + "line": 41 + }, + { + "name": "type", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 40 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "SelectionFeedback", + "id": "interface-SelectionFeedback-fe2a55d98b30e86c8c674920a8ff123209935dfdf567bef9cc9287e96fcb028ce923a3239baee3ce76c94666542df856b9dbee1e4df228ca9d5a1bfbdc0712b4", + "file": "libs/dotcms-field-elements/src/components/dot-tags/components/dot-autocomplete/dot-autocomplete.tsx", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Component, Prop, Event, EventEmitter, Element, Watch, h } from '@stencil/core';\nimport autoComplete from '@tarekraafat/autocomplete.js/dist/js/autoComplete';\n\ninterface SelectionItem {\n index: number;\n value: string;\n match: string;\n}\n\ninterface SelectionFeedback {\n event: KeyboardEvent | MouseEvent;\n query: string;\n matched: number;\n results: string[];\n selection: SelectionItem;\n}\n\n@Component({\n tag: 'dot-autocomplete',\n styleUrl: 'dot-autocomplete.scss'\n})\nexport class DotAutocompleteComponent {\n @Element() el: HTMLElement;\n\n /** (optional) Disables field's interaction */\n @Prop({ reflect: true }) disabled = false;\n\n /** (optional) text to show when no value is set */\n @Prop({ reflect: true }) placeholder = '';\n\n /** (optional) Min characters to start search in the autocomplete input */\n @Prop({ reflect: true }) threshold = 0;\n\n /** (optional) Max results to show after a autocomplete search */\n @Prop({ reflect: true }) maxResults = 0;\n\n /** (optional) Duraction in ms to start search into the autocomplete */\n @Prop({ reflect: true }) debounce = 300;\n\n /** Function or array of string to get the data to use for the autocomplete search */\n @Prop() data: () => Promise | string[] = null;\n\n @Event() selection: EventEmitter;\n @Event() enter: EventEmitter;\n @Event() lostFocus: EventEmitter;\n\n private readonly id = `autoComplete${new Date().getTime()}`;\n\n private keyEvent = {\n Enter: this.emitEnter.bind(this),\n Escape: this.clean.bind(this)\n };\n\n componentDidLoad(): void {\n if (this.data) {\n this.initAutocomplete();\n }\n }\n\n render() {\n return (\n this.handleBlur(event)}\n onKeyDown={(event: KeyboardEvent) => this.handleKeyDown(event)}\n placeholder={this.placeholder || null}\n />\n );\n }\n\n @Watch('threshold')\n watchThreshold(): void {\n this.initAutocomplete();\n }\n\n @Watch('data')\n watchData(): void {\n this.initAutocomplete();\n }\n\n @Watch('maxResults')\n watchMaxResults(): void {\n this.initAutocomplete();\n }\n\n private handleKeyDown(event: KeyboardEvent): void {\n const { value } = this.getInputElement();\n\n if (value && this.keyEvent[event.key]) {\n event.preventDefault();\n this.keyEvent[event.key](value);\n }\n }\n\n private handleBlur(event: FocusEvent): void {\n event.preventDefault();\n setTimeout(() => {\n if (document.activeElement.parentElement !== this.getResultList()) {\n this.clean();\n this.lostFocus.emit(event);\n }\n }, 0);\n }\n\n private clean(): void {\n this.getInputElement().value = '';\n this.cleanOptions();\n }\n\n private cleanOptions(): void {\n this.getResultList().innerHTML = '';\n }\n\n private emitselect(select: string): void {\n this.clean();\n this.selection.emit(select);\n }\n\n private emitEnter(select: string): void {\n if (select) {\n this.clean();\n this.enter.emit(select);\n }\n }\n\n private getInputElement(): HTMLInputElement {\n return this.el.querySelector(`#${this.id}`);\n }\n\n private initAutocomplete(): void {\n this.clearList();\n // tslint:disable-next-line:no-unused-expression\n new autoComplete({\n data: {\n src: async () => this.getData()\n },\n sort: (a, b) => {\n if (a.match < b.match) {\n return -1;\n }\n if (a.match > b.match) {\n return 1;\n }\n return 0;\n },\n placeHolder: this.placeholder,\n selector: `#${this.id}`,\n threshold: this.threshold,\n searchEngine: 'strict',\n highlight: true,\n maxResults: this.maxResults,\n debounce: this.debounce,\n resultsList: {\n container: () => this.getResultListId(),\n destination: this.getInputElement(),\n position: 'afterend'\n },\n resultItem: ({ match }: SelectionItem) => match,\n onSelection: ({ event, selection }: SelectionFeedback) => {\n event.preventDefault();\n this.focusOnInput();\n this.emitselect(selection.value);\n }\n });\n }\n\n private clearList(): void {\n const list = this.getResultList();\n if (list) {\n list.remove();\n }\n }\n\n private focusOnInput(): void {\n this.getInputElement().focus();\n }\n\n private getResultList(): HTMLElement {\n return this.el.querySelector(`#${this.getResultListId()}`);\n }\n\n private getResultListId(): string {\n return `${this.id}_results_list`;\n }\n\n private async getData(): Promise {\n const autocomplete = this.getInputElement();\n autocomplete.setAttribute('placeholder', 'Loading...');\n const data = typeof this.data === 'function' ? await this.data() : [];\n autocomplete.setAttribute('placeholder', this.placeholder || '');\n return data;\n }\n}\n", + "properties": [ + { + "name": "event", + "deprecated": false, + "deprecationMessage": "", + "type": "KeyboardEvent | MouseEvent", + "optional": false, + "description": "", + "line": 11 + }, + { + "name": "matched", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 13 + }, + { + "name": "query", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 12 + }, + { + "name": "results", + "deprecated": false, + "deprecationMessage": "", + "type": "string[]", + "optional": false, + "description": "", + "line": 14 + }, + { + "name": "selection", + "deprecated": false, + "deprecationMessage": "", + "type": "SelectionItem", + "optional": false, + "description": "", + "line": 15 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "SelectionFeedback", + "id": "interface-SelectionFeedback-2d81b36dc83680e0d9a4d1bf10871307a6c59e0e8a474987ca6ea6f2ec28197f076955914a503e65c8b71a79dfb8527eb33f7fd63e413357d1580be03c90bb72-1", + "file": "libs/dotcms-webcomponents/src/components/contenttypes-fields/dot-tags/components/dot-autocomplete/dot-autocomplete.tsx", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Component, Prop, Event, EventEmitter, Element, Watch, h } from '@stencil/core';\nimport autoComplete from '@tarekraafat/autocomplete.js/dist/js/autoComplete';\n\ninterface SelectionItem {\n index: number;\n value: string;\n match: string;\n}\n\ninterface SelectionFeedback {\n event: KeyboardEvent | MouseEvent;\n query: string;\n matched: number;\n results: string[];\n selection: SelectionItem;\n}\n\n@Component({\n tag: 'dot-autocomplete',\n styleUrl: 'dot-autocomplete.scss'\n})\nexport class DotAutocompleteComponent {\n @Element()\n el: HTMLElement;\n\n /** (optional) Disables field's interaction */\n @Prop({ reflect: true })\n disabled = false;\n\n /** (optional) text to show when no value is set */\n @Prop({ reflect: true })\n placeholder = '';\n\n /** (optional) Min characters to start search in the autocomplete input */\n @Prop({ reflect: true })\n threshold = 0;\n\n /** (optional) Max results to show after a autocomplete search */\n @Prop({ reflect: true })\n maxResults = 0;\n\n /** (optional) Duraction in ms to start search into the autocomplete */\n @Prop({ reflect: true })\n debounce = 300;\n\n /** Function or array of string to get the data to use for the autocomplete search */\n @Prop()\n data: () => Promise | string[] = null;\n\n @Event()\n selection: EventEmitter;\n @Event()\n enter: EventEmitter;\n @Event()\n lostFocus: EventEmitter;\n\n private readonly id = `autoComplete${new Date().getTime()}`;\n\n private keyEvent = {\n Enter: this.emitEnter.bind(this),\n Escape: this.clean.bind(this)\n };\n\n componentDidLoad(): void {\n if (this.data) {\n this.initAutocomplete();\n }\n }\n\n render() {\n return (\n this.handleBlur(event)}\n onKeyDown={(event: KeyboardEvent) => this.handleKeyDown(event)}\n placeholder={this.placeholder || null}\n />\n );\n }\n\n @Watch('threshold')\n watchThreshold(): void {\n this.initAutocomplete();\n }\n\n @Watch('data')\n watchData(): void {\n this.initAutocomplete();\n }\n\n @Watch('maxResults')\n watchMaxResults(): void {\n this.initAutocomplete();\n }\n\n private handleKeyDown(event: KeyboardEvent): void {\n const { value } = this.getInputElement();\n\n if (value && this.keyEvent[event.key]) {\n event.preventDefault();\n this.keyEvent[event.key](value);\n }\n }\n\n private handleBlur(event: FocusEvent): void {\n event.preventDefault();\n setTimeout(() => {\n if (document.activeElement.parentElement !== this.getResultList()) {\n this.clean();\n this.lostFocus.emit(event);\n }\n }, 0);\n }\n\n private clean(): void {\n this.getInputElement().value = '';\n this.cleanOptions();\n }\n\n private cleanOptions(): void {\n this.getResultList().innerHTML = '';\n }\n\n private emitselect(select: string): void {\n this.clean();\n this.selection.emit(select);\n }\n\n private emitEnter(select: string): void {\n if (select) {\n this.clean();\n this.enter.emit(select);\n }\n }\n\n private getInputElement(): HTMLInputElement {\n return this.el.querySelector(`#${this.id}`);\n }\n\n private initAutocomplete(): void {\n this.clearList();\n // tslint:disable-next-line:no-unused-expression\n new autoComplete({\n data: {\n src: async () => this.getData()\n },\n sort: (a, b) => {\n if (a.match < b.match) {\n return -1;\n }\n if (a.match > b.match) {\n return 1;\n }\n return 0;\n },\n placeHolder: this.placeholder,\n selector: `#${this.id}`,\n threshold: this.threshold,\n searchEngine: 'strict',\n highlight: true,\n maxResults: this.maxResults,\n debounce: this.debounce,\n resultsList: {\n container: () => this.getResultListId(),\n destination: this.getInputElement(),\n position: 'afterend'\n },\n resultItem: ({ match }: SelectionItem) => match,\n onSelection: ({ event, selection }: SelectionFeedback) => {\n event.preventDefault();\n this.focusOnInput();\n this.emitselect(selection.value);\n }\n });\n }\n\n private clearList(): void {\n const list = this.getResultList();\n if (list) {\n list.remove();\n }\n }\n\n private focusOnInput(): void {\n this.getInputElement().focus();\n }\n\n private getResultList(): HTMLElement {\n return this.el.querySelector(`#${this.getResultListId()}`);\n }\n\n private getResultListId(): string {\n return `${this.id}_results_list`;\n }\n\n private async getData(): Promise {\n const autocomplete = this.getInputElement();\n autocomplete.setAttribute('placeholder', 'Loading...');\n const data = typeof this.data === 'function' ? await this.data() : [];\n autocomplete.setAttribute('placeholder', this.placeholder || '');\n return data;\n }\n}\n", + "properties": [ + { + "name": "event", + "deprecated": false, + "deprecationMessage": "", + "type": "KeyboardEvent | MouseEvent", + "optional": false, + "description": "", + "line": 11 + }, + { + "name": "matched", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 13 + }, + { + "name": "query", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 12 + }, + { + "name": "results", + "deprecated": false, + "deprecationMessage": "", + "type": "string[]", + "optional": false, + "description": "", + "line": 14 + }, + { + "name": "selection", + "deprecated": false, + "deprecationMessage": "", + "type": "SelectionItem", + "optional": false, + "description": "", + "line": 15 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [], + "isDuplicate": true, + "duplicateId": 1, + "duplicateName": "SelectionFeedback-1" + }, + { + "name": "SelectionItem", + "id": "interface-SelectionItem-fe2a55d98b30e86c8c674920a8ff123209935dfdf567bef9cc9287e96fcb028ce923a3239baee3ce76c94666542df856b9dbee1e4df228ca9d5a1bfbdc0712b4", + "file": "libs/dotcms-field-elements/src/components/dot-tags/components/dot-autocomplete/dot-autocomplete.tsx", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Component, Prop, Event, EventEmitter, Element, Watch, h } from '@stencil/core';\nimport autoComplete from '@tarekraafat/autocomplete.js/dist/js/autoComplete';\n\ninterface SelectionItem {\n index: number;\n value: string;\n match: string;\n}\n\ninterface SelectionFeedback {\n event: KeyboardEvent | MouseEvent;\n query: string;\n matched: number;\n results: string[];\n selection: SelectionItem;\n}\n\n@Component({\n tag: 'dot-autocomplete',\n styleUrl: 'dot-autocomplete.scss'\n})\nexport class DotAutocompleteComponent {\n @Element() el: HTMLElement;\n\n /** (optional) Disables field's interaction */\n @Prop({ reflect: true }) disabled = false;\n\n /** (optional) text to show when no value is set */\n @Prop({ reflect: true }) placeholder = '';\n\n /** (optional) Min characters to start search in the autocomplete input */\n @Prop({ reflect: true }) threshold = 0;\n\n /** (optional) Max results to show after a autocomplete search */\n @Prop({ reflect: true }) maxResults = 0;\n\n /** (optional) Duraction in ms to start search into the autocomplete */\n @Prop({ reflect: true }) debounce = 300;\n\n /** Function or array of string to get the data to use for the autocomplete search */\n @Prop() data: () => Promise | string[] = null;\n\n @Event() selection: EventEmitter;\n @Event() enter: EventEmitter;\n @Event() lostFocus: EventEmitter;\n\n private readonly id = `autoComplete${new Date().getTime()}`;\n\n private keyEvent = {\n Enter: this.emitEnter.bind(this),\n Escape: this.clean.bind(this)\n };\n\n componentDidLoad(): void {\n if (this.data) {\n this.initAutocomplete();\n }\n }\n\n render() {\n return (\n this.handleBlur(event)}\n onKeyDown={(event: KeyboardEvent) => this.handleKeyDown(event)}\n placeholder={this.placeholder || null}\n />\n );\n }\n\n @Watch('threshold')\n watchThreshold(): void {\n this.initAutocomplete();\n }\n\n @Watch('data')\n watchData(): void {\n this.initAutocomplete();\n }\n\n @Watch('maxResults')\n watchMaxResults(): void {\n this.initAutocomplete();\n }\n\n private handleKeyDown(event: KeyboardEvent): void {\n const { value } = this.getInputElement();\n\n if (value && this.keyEvent[event.key]) {\n event.preventDefault();\n this.keyEvent[event.key](value);\n }\n }\n\n private handleBlur(event: FocusEvent): void {\n event.preventDefault();\n setTimeout(() => {\n if (document.activeElement.parentElement !== this.getResultList()) {\n this.clean();\n this.lostFocus.emit(event);\n }\n }, 0);\n }\n\n private clean(): void {\n this.getInputElement().value = '';\n this.cleanOptions();\n }\n\n private cleanOptions(): void {\n this.getResultList().innerHTML = '';\n }\n\n private emitselect(select: string): void {\n this.clean();\n this.selection.emit(select);\n }\n\n private emitEnter(select: string): void {\n if (select) {\n this.clean();\n this.enter.emit(select);\n }\n }\n\n private getInputElement(): HTMLInputElement {\n return this.el.querySelector(`#${this.id}`);\n }\n\n private initAutocomplete(): void {\n this.clearList();\n // tslint:disable-next-line:no-unused-expression\n new autoComplete({\n data: {\n src: async () => this.getData()\n },\n sort: (a, b) => {\n if (a.match < b.match) {\n return -1;\n }\n if (a.match > b.match) {\n return 1;\n }\n return 0;\n },\n placeHolder: this.placeholder,\n selector: `#${this.id}`,\n threshold: this.threshold,\n searchEngine: 'strict',\n highlight: true,\n maxResults: this.maxResults,\n debounce: this.debounce,\n resultsList: {\n container: () => this.getResultListId(),\n destination: this.getInputElement(),\n position: 'afterend'\n },\n resultItem: ({ match }: SelectionItem) => match,\n onSelection: ({ event, selection }: SelectionFeedback) => {\n event.preventDefault();\n this.focusOnInput();\n this.emitselect(selection.value);\n }\n });\n }\n\n private clearList(): void {\n const list = this.getResultList();\n if (list) {\n list.remove();\n }\n }\n\n private focusOnInput(): void {\n this.getInputElement().focus();\n }\n\n private getResultList(): HTMLElement {\n return this.el.querySelector(`#${this.getResultListId()}`);\n }\n\n private getResultListId(): string {\n return `${this.id}_results_list`;\n }\n\n private async getData(): Promise {\n const autocomplete = this.getInputElement();\n autocomplete.setAttribute('placeholder', 'Loading...');\n const data = typeof this.data === 'function' ? await this.data() : [];\n autocomplete.setAttribute('placeholder', this.placeholder || '');\n return data;\n }\n}\n", + "properties": [ + { + "name": "index", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 5 + }, + { + "name": "match", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 7 + }, + { + "name": "value", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 6 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "SelectionItem", + "id": "interface-SelectionItem-2d81b36dc83680e0d9a4d1bf10871307a6c59e0e8a474987ca6ea6f2ec28197f076955914a503e65c8b71a79dfb8527eb33f7fd63e413357d1580be03c90bb72-1", + "file": "libs/dotcms-webcomponents/src/components/contenttypes-fields/dot-tags/components/dot-autocomplete/dot-autocomplete.tsx", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Component, Prop, Event, EventEmitter, Element, Watch, h } from '@stencil/core';\nimport autoComplete from '@tarekraafat/autocomplete.js/dist/js/autoComplete';\n\ninterface SelectionItem {\n index: number;\n value: string;\n match: string;\n}\n\ninterface SelectionFeedback {\n event: KeyboardEvent | MouseEvent;\n query: string;\n matched: number;\n results: string[];\n selection: SelectionItem;\n}\n\n@Component({\n tag: 'dot-autocomplete',\n styleUrl: 'dot-autocomplete.scss'\n})\nexport class DotAutocompleteComponent {\n @Element()\n el: HTMLElement;\n\n /** (optional) Disables field's interaction */\n @Prop({ reflect: true })\n disabled = false;\n\n /** (optional) text to show when no value is set */\n @Prop({ reflect: true })\n placeholder = '';\n\n /** (optional) Min characters to start search in the autocomplete input */\n @Prop({ reflect: true })\n threshold = 0;\n\n /** (optional) Max results to show after a autocomplete search */\n @Prop({ reflect: true })\n maxResults = 0;\n\n /** (optional) Duraction in ms to start search into the autocomplete */\n @Prop({ reflect: true })\n debounce = 300;\n\n /** Function or array of string to get the data to use for the autocomplete search */\n @Prop()\n data: () => Promise | string[] = null;\n\n @Event()\n selection: EventEmitter;\n @Event()\n enter: EventEmitter;\n @Event()\n lostFocus: EventEmitter;\n\n private readonly id = `autoComplete${new Date().getTime()}`;\n\n private keyEvent = {\n Enter: this.emitEnter.bind(this),\n Escape: this.clean.bind(this)\n };\n\n componentDidLoad(): void {\n if (this.data) {\n this.initAutocomplete();\n }\n }\n\n render() {\n return (\n this.handleBlur(event)}\n onKeyDown={(event: KeyboardEvent) => this.handleKeyDown(event)}\n placeholder={this.placeholder || null}\n />\n );\n }\n\n @Watch('threshold')\n watchThreshold(): void {\n this.initAutocomplete();\n }\n\n @Watch('data')\n watchData(): void {\n this.initAutocomplete();\n }\n\n @Watch('maxResults')\n watchMaxResults(): void {\n this.initAutocomplete();\n }\n\n private handleKeyDown(event: KeyboardEvent): void {\n const { value } = this.getInputElement();\n\n if (value && this.keyEvent[event.key]) {\n event.preventDefault();\n this.keyEvent[event.key](value);\n }\n }\n\n private handleBlur(event: FocusEvent): void {\n event.preventDefault();\n setTimeout(() => {\n if (document.activeElement.parentElement !== this.getResultList()) {\n this.clean();\n this.lostFocus.emit(event);\n }\n }, 0);\n }\n\n private clean(): void {\n this.getInputElement().value = '';\n this.cleanOptions();\n }\n\n private cleanOptions(): void {\n this.getResultList().innerHTML = '';\n }\n\n private emitselect(select: string): void {\n this.clean();\n this.selection.emit(select);\n }\n\n private emitEnter(select: string): void {\n if (select) {\n this.clean();\n this.enter.emit(select);\n }\n }\n\n private getInputElement(): HTMLInputElement {\n return this.el.querySelector(`#${this.id}`);\n }\n\n private initAutocomplete(): void {\n this.clearList();\n // tslint:disable-next-line:no-unused-expression\n new autoComplete({\n data: {\n src: async () => this.getData()\n },\n sort: (a, b) => {\n if (a.match < b.match) {\n return -1;\n }\n if (a.match > b.match) {\n return 1;\n }\n return 0;\n },\n placeHolder: this.placeholder,\n selector: `#${this.id}`,\n threshold: this.threshold,\n searchEngine: 'strict',\n highlight: true,\n maxResults: this.maxResults,\n debounce: this.debounce,\n resultsList: {\n container: () => this.getResultListId(),\n destination: this.getInputElement(),\n position: 'afterend'\n },\n resultItem: ({ match }: SelectionItem) => match,\n onSelection: ({ event, selection }: SelectionFeedback) => {\n event.preventDefault();\n this.focusOnInput();\n this.emitselect(selection.value);\n }\n });\n }\n\n private clearList(): void {\n const list = this.getResultList();\n if (list) {\n list.remove();\n }\n }\n\n private focusOnInput(): void {\n this.getInputElement().focus();\n }\n\n private getResultList(): HTMLElement {\n return this.el.querySelector(`#${this.getResultListId()}`);\n }\n\n private getResultListId(): string {\n return `${this.id}_results_list`;\n }\n\n private async getData(): Promise {\n const autocomplete = this.getInputElement();\n autocomplete.setAttribute('placeholder', 'Loading...');\n const data = typeof this.data === 'function' ? await this.data() : [];\n autocomplete.setAttribute('placeholder', this.placeholder || '');\n return data;\n }\n}\n", + "properties": [ + { + "name": "index", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 5 + }, + { + "name": "match", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 7 + }, + { + "name": "value", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 6 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [], + "isDuplicate": true, + "duplicateId": 1, + "duplicateName": "SelectionItem-1" + }, + { + "name": "ShouldShowProps", + "id": "interface-ShouldShowProps-8203b47bed407e12b5213c05913959cc83fc83f67e760385b4c681c0b0f07c03a5d0ee7781d080cbf9a2a9334e992b2ac414a13a200a3af418f6c4e3650db2f8", + "file": "libs/block-editor/src/lib/utils/bubble-menu.utils.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Editor, isTextSelection } from '@tiptap/core';\nimport { EditorView } from 'prosemirror-view';\nimport { EditorState } from 'prosemirror-state';\n\ninterface ShouldShowProps {\n editor: Editor;\n view: EditorView;\n state: EditorState;\n oldState?: EditorState;\n from: number;\n to: number;\n}\n\nexport const shouldShowBubbleMenu = ({ editor, state, from, to }: ShouldShowProps) => {\n\n const { doc, selection } = state\n const { empty } = selection\n\n // Current selected node\n const node = editor.state.doc.nodeAt(editor.state.selection.from);\n\n // Sometime check for `empty` is not enough.\n // Doubleclick an empty paragraph returns a node size of 2.\n // So we check also for an empty text size.\n const isEmptyTextBlock = !doc.textBetween(from, to).length\n && isTextSelection(state.selection)\n\n\n // If it's empty or the current node is type dotContent, it will not open.\n if (empty || isEmptyTextBlock || node.type.name == 'dotContent') {\n return false\n }\n\n return true;\n\n};\n", + "properties": [ + { + "name": "editor", + "deprecated": false, + "deprecationMessage": "", + "type": "Editor", + "optional": false, + "description": "", + "line": 6 + }, + { + "name": "from", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 10 + }, + { + "name": "oldState", + "deprecated": false, + "deprecationMessage": "", + "type": "EditorState", + "optional": true, + "description": "", + "line": 9 + }, + { + "name": "state", + "deprecated": false, + "deprecationMessage": "", + "type": "EditorState", + "optional": false, + "description": "", + "line": 8 + }, + { + "name": "to", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 11 + }, + { + "name": "view", + "deprecated": false, + "deprecationMessage": "", + "type": "EditorView", + "optional": false, + "description": "", + "line": 7 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "Site", + "id": "interface-Site-35f4cb54e2f2443e87c9afc75ce95303dcb2661c9666b268b84475c8c1b15e790c962349cf5c3099a3a01b1329e70e0ea2af4b90647b6f51ed7a9b201d885918", + "file": "libs/dotcms-js/src/lib/core/site.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Injectable } from '@angular/core';\nimport { CoreWebService } from './core-web.service';\nimport { Observable, Subject, of, merge } from 'rxjs';\nimport { pluck, map, take } from 'rxjs/operators';\nimport { LoginService, Auth } from './login.service';\nimport { LoggerService } from './logger.service';\nimport { DotcmsEventsService } from './dotcms-events.service';\nimport { DotEventTypeWrapper } from './models/dot-events/dot-event-type-wrapper';\n\n/**\n * Provide methods and data to hable the sites.\n * @export\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class SiteService {\n private selectedSite: Site;\n private urls: any;\n private events: string[] = [\n 'SAVE_SITE',\n 'PUBLISH_SITE',\n 'UPDATE_SITE_PERMISSIONS',\n 'UN_ARCHIVE_SITE',\n 'UPDATE_SITE',\n 'ARCHIVE_SITE'\n ];\n private _switchSite$: Subject = new Subject();\n private _refreshSites$: Subject = new Subject();\n\n constructor(\n loginService: LoginService,\n dotcmsEventsService: DotcmsEventsService,\n private coreWebService: CoreWebService,\n private loggerService: LoggerService\n ) {\n this.urls = {\n currentSiteUrl: 'v1/site/currentSite',\n sitesUrl: 'v1/site',\n switchSiteUrl: 'v1/site/switch'\n };\n\n dotcmsEventsService\n .subscribeToEvents(['ARCHIVE_SITE', 'UPDATE_SITE'])\n .subscribe((event: DotEventTypeWrapper) => this.eventResponse(event));\n\n dotcmsEventsService\n .subscribeToEvents(this.events)\n .subscribe(({ data }: DotEventTypeWrapper) => this.siteEventsHandler(data));\n\n dotcmsEventsService\n .subscribeToEvents(['SWITCH_SITE'])\n .subscribe(({ data }: DotEventTypeWrapper) => this.setCurrentSite(data));\n\n loginService.watchUser((auth: Auth) => {\n if (!auth.isLoginAs) {\n this.loadCurrentSite();\n }\n });\n }\n\n /**\n * Manage the response when an event happen\n *\n * @memberof SiteService\n */\n eventResponse({ name, data }: DotEventTypeWrapper): void {\n this.loggerService.debug('Capturing Site event', name, data);\n\n const siteIdentifier = data.identifier;\n if (siteIdentifier === this.selectedSite.identifier) {\n\n name === 'ARCHIVE_SITE'\n ? this.switchToDefaultSite()\n .pipe(take(1))\n .subscribe((currentSite: Site) => {\n this.switchSite(currentSite);\n })\n : this.loadCurrentSite();\n\n }\n }\n\n /**\n * Refresh the sites list if a event happen\n *\n * @memberof SiteService\n */\n siteEventsHandler(site: Site): void {\n this._refreshSites$.next(site);\n }\n\n /**\n * Observable trigger when an site event happens\n * @readonly\n * @memberof SiteService\n */\n get refreshSites$(): Observable {\n return this._refreshSites$.asObservable();\n }\n\n /**\n * Observable tigger when the current site is changed\n * @readonly\n * @memberof SiteService\n */\n get switchSite$(): Observable {\n return this._switchSite$.asObservable();\n }\n\n /**\n * Return the current site for the login user.\n * @readonly\n * @memberof SiteService\n */\n get currentSite(): Site {\n return this.selectedSite;\n }\n\n /**\n * Switch To Default Site in the BE and returns it.\n *\n * @returns Observable\n * @memberof SiteService\n */\n switchToDefaultSite(): Observable {\n return this.coreWebService\n .requestView({\n method: 'PUT',\n url: 'v1/site/switch'\n })\n .pipe(pluck('entity'));\n }\n\n /**\n * Get a site by the id\n *\n * @param string id\n * @returns Observable\n * @memberof SiteService\n */\n getSiteById(id: string): Observable {\n return this.coreWebService\n .requestView({\n url: `/api/content/render/false/query/+contentType:host%20+identifier:${id}`\n })\n .pipe(\n pluck('contentlets'),\n map((sites: Site[]) => sites[0])\n );\n }\n\n /**\n * Change the current site\n * @param Site site\n * @memberof SiteService\n */\n switchSite(site: Site): void {\n this.loggerService.debug('Applying a Site Switch', site.identifier);\n this.coreWebService\n .requestView({\n method: 'PUT',\n url: `${this.urls.switchSiteUrl}/${site.identifier}`\n })\n .pipe(take(1))\n .subscribe(() => {\n this.setCurrentSite(site);\n });\n }\n\n /**\n * Get the current site\n * @returns Observable\n * @memberof SiteService\n */\n getCurrentSite(): Observable {\n return merge(\n this.selectedSite ? of(this.selectedSite) : this.requestCurrentSite(),\n this.switchSite$\n );\n }\n\n private requestCurrentSite(): Observable {\n return this.coreWebService\n .requestView({\n url: this.urls.currentSiteUrl\n })\n .pipe(pluck('entity'));\n }\n\n private setCurrentSite(site: Site): void {\n if (this.selectedSite?.identifier !== site.identifier) {\n this.selectedSite = site;\n this._switchSite$.next({ ...site });\n }\n }\n\n private loadCurrentSite(): void {\n this.getCurrentSite()\n .pipe(take(1))\n .subscribe((currentSite: Site) => {\n this.setCurrentSite(currentSite);\n });\n }\n}\n\nexport interface Site {\n hostname: string;\n type: string;\n identifier: string;\n archived: boolean;\n}\n", + "properties": [ + { + "name": "archived", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 211 + }, + { + "name": "hostname", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 208 + }, + { + "name": "identifier", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 210 + }, + { + "name": "type", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 209 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "Storage", + "id": "interface-Storage-b38b86d1e54e712264c72fae660a36e7ba7bda09d34042fa8991939f3d2ee15e1d66721e76ac86146df90b54216188b47ce2a78dfaa1182e144d0804e2e8e76a", + "file": "libs/block-editor/src/lib/extensions/bubble-link-form.extension.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Extension } from '@tiptap/core';\nimport { PluginKey } from 'prosemirror-state';\nimport { BubbleMenuLinkFormComponent } from './components/bubble-menu-link-form/bubble-menu-link-form.component';\nimport { Injector, ComponentFactoryResolver } from '@angular/core';\nimport { bubbleLinkFormPlugin } from '../plugins/bubble-link-form.plugin';\nimport { Props } from 'tippy.js';\n\nexport interface BubbleLinkFormOptions {\n pluginKey: PluginKey;\n tippyOptions?: Partial;\n element: HTMLElement | null;\n}\nexport interface PluginStorage {\n show: boolean;\n}\n\ndeclare module '@tiptap/core' {\n interface Commands {\n bubbleLinkForm: {\n toogleLinkForm: () => ReturnType;\n };\n }\n\n interface Storage {\n bubbleLinkForm: PluginStorage;\n }\n}\nexport const LINK_FORM_PLUGIN_KEY = new PluginKey('addLink');\n\nexport const BubbleLinkFormExtension = (injector: Injector, resolver: ComponentFactoryResolver) => {\n\n return Extension.create({\n name: 'bubbleLinkForm',\n defaultOptions: {\n element: null,\n tippyOptions: {},\n pluginKey: LINK_FORM_PLUGIN_KEY,\n },\n\n addStorage() {\n return {\n show: true\n }\n },\n\n addCommands() {\n return {\n toogleLinkForm: () => ({ commands }) => {\n this.storage.show = !this.storage.show;\n return commands.setHighlight();\n }\n }\n },\n\n addProseMirrorPlugins() {\n const factory = resolver.resolveComponentFactory(BubbleMenuLinkFormComponent);\n const component = factory.create(injector);\n component.changeDetectorRef.detectChanges();\n \n return [\n bubbleLinkFormPlugin({\n pluginKey: this.options.pluginKey,\n editor: this.editor,\n element: component.location.nativeElement,\n tippyOptions: this.options.tippyOptions,\n storage: this.storage,\n component: component\n }) \n ]\n },\n })\n}\n", + "properties": [ + { + "name": "bubbleLinkForm", + "deprecated": false, + "deprecationMessage": "", + "type": "PluginStorage", + "optional": false, + "description": "", + "line": 25 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "StructureTypeView", + "id": "interface-StructureTypeView-c9e3cb1360f9d03debdadfede2563ddb2a59faf3053d4f20cf88fc51a8d2107178b41704c7c4977901ce20733f52ab9af9799788ed1ce03696179d5ab7d713d2", + "file": "apps/dotcms-ui/src/app/shared/models/contentlet/structure-type-view.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { ContentTypeView } from './content-type-view.model';\n\nexport interface StructureTypeView {\n name: string;\n label: string;\n types: ContentTypeView[];\n}\n", + "properties": [ + { + "name": "label", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 5 + }, + { + "name": "name", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 4 + }, + { + "name": "types", + "deprecated": false, + "deprecationMessage": "", + "type": "ContentTypeView[]", + "optional": false, + "description": "", + "line": 6 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "SuggestionsCommandProps", + "id": "interface-SuggestionsCommandProps-e8f9260ec171b52ea7b5d2dbc65fe2b5de85fbc9e601f74d5b3dd9abae68d4c95781d28251a2032245d480976d11031ee222e21eef39692887c9de170616440e", + "file": "libs/block-editor/src/lib/extensions/components/suggestions/suggestions.component.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { ChangeDetectorRef, Component, Input, OnInit, ViewChild } from '@angular/core';\n\nimport { map, take } from 'rxjs/operators';\nimport { MenuItem } from 'primeng/api';\n\nimport { SuggestionsService } from '../../services/suggestions/suggestions.service';\nimport { DotCMSContentlet } from '@dotcms/dotcms-models';\nimport { SuggestionListComponent } from '../suggestion-list/suggestion-list.component';\nimport { DomSanitizer, SafeUrl } from '@angular/platform-browser';\nimport { headerIcons, pIcon, ulIcon, olIcon, quoteIcon, codeIcon, lineIcon } from './suggestion-icons';\n\nexport interface SuggestionsCommandProps {\n payload?: DotCMSContentlet;\n type: { name: string; level?: number };\n}\n\nexport interface DotMenuItem extends Omit {\n icon: string | SafeUrl;\n}\n\n@Component({\n selector: 'dotcms-suggestions',\n templateUrl: './suggestions.component.html',\n styleUrls: ['./suggestions.component.scss']\n})\nexport class SuggestionsComponent implements OnInit {\n @ViewChild('list', { static: true }) list: SuggestionListComponent;\n\n @Input() onSelection: (props: SuggestionsCommandProps) => void;\n items: DotMenuItem[] = [];\n\n title = 'Select a block';\n selectionUpdated = false;\n\n constructor(\n private suggestionsService: SuggestionsService,\n private cd: ChangeDetectorRef,\n private domSanitizer: DomSanitizer\n ) {}\n\n ngOnInit(): void {\n const headings = [...Array(3).keys()].map((level) => {\n const size = level + 1;\n return {\n label: `Heading ${size}`,\n icon: this.sanitizeUrl(headerIcons[level]),\n command: () => {\n this.onSelection({\n type: {\n name: 'heading',\n level: level + 1\n }\n });\n }\n };\n });\n\n const paragraph = [\n {\n label: 'Paragraph',\n icon: this.sanitizeUrl(pIcon),\n command: () => {\n this.onSelection({\n type: {\n name: 'paragraph'\n }\n });\n }\n }\n ];\n\n const list = [\n {\n label: 'List Ordered',\n icon: this.sanitizeUrl(olIcon),\n command: () => {\n this.onSelection({\n type: {\n name: 'listOrdered'\n }\n });\n }\n },\n {\n label: 'List Unordered',\n icon: this.sanitizeUrl(ulIcon),\n command: () => {\n this.onSelection({\n type: {\n name: 'listUnordered'\n }\n });\n }\n }\n ];\n\n const block = [\n {\n label: 'Blockquote',\n icon: this.sanitizeUrl(quoteIcon),\n command: () => {\n this.onSelection({\n type: {\n name: 'blockQuote'\n }\n });\n }\n },\n {\n label: 'Code Block',\n icon: this.sanitizeUrl(codeIcon),\n command: () => {\n this.onSelection({\n type: {\n name: 'codeBlock'\n }\n });\n }\n },\n {\n label: 'Horizontal Line',\n icon: this.sanitizeUrl(lineIcon),\n command: () => {\n this.onSelection({\n type: {\n name: 'horizontalLine'\n }\n });\n }\n }\n ];\n\n this.items = [\n {\n label: 'Contentlets',\n icon: 'receipt',\n command: () => {\n this.initContentletSelection();\n }\n },\n ...headings,\n ...paragraph,\n ...list,\n ...block\n ];\n }\n\n /**\n * Execute the item command\n *\n * @memberof SuggestionsComponent\n */\n execCommand() {\n this.list.execCommand();\n }\n\n /**\n * Update the current item selected\n *\n * @param {KeyboardEvent} e\n * @memberof SuggestionsComponent\n */\n updateSelection(e: KeyboardEvent) {\n this.list.updateSelection(e);\n }\n\n /**\n * Set the first item active\n *\n * @memberof SuggestionsComponent\n */\n setFirstItemActive() {\n this.list.setFirstItemActive();\n }\n\n /**\n * Reset the key manager after we add new elements to the list\n *\n * @memberof SuggestionsComponent\n */\n resetKeyManager() {\n this.list.resetKeyManager();\n this.selectionUpdated = true;\n // Needs to wait until the item has been updated\n setTimeout(() => this.selectionUpdated = false, 0);\n }\n\n\n /**\n * Avoid closing the suggestions on manual scroll\n *\n * @param {MouseEvent} e\n * @memberof SuggestionsComponent\n */\n onMouseDownHandler(e: MouseEvent) {\n e.preventDefault();\n }\n\n /**\n * Handle the active item on menu events\n *\n * @param {MouseEvent} e\n * @memberof SuggestionsComponent\n */\n onMouseEnter(e: MouseEvent) {\n // If it's called right after updateSelection, do not update active Item\n if (this.selectionUpdated) {\n return;\n }\n e.preventDefault();\n const index = Number((e.target as HTMLElement).dataset.index);\n this.list.updateActiveItem(index);\n }\n\n /**\n * Execute the item command on mouse down\n *\n * @param {MouseEvent} e\n * @param {MenuItem} item\n * @memberof SuggestionsComponent\n */\n onMouseDown(e: MouseEvent, item: MenuItem) {\n e.preventDefault();\n item.command();\n }\n\n private initContentletSelection() {\n this.suggestionsService\n .getContentTypes()\n .pipe(\n map((items) => {\n return items.map((item) => {\n return {\n label: item.name,\n icon: item.icon,\n command: () => {\n this.suggestionsService\n .getContentlets(item.variable)\n .pipe(take(1))\n .subscribe((contentlets) => {\n this.items = contentlets.map((contentlet) => {\n return {\n label: contentlet.title,\n icon: 'image',\n command: () => {\n this.onSelection({\n payload: contentlet,\n type: {\n name: 'dotContent'\n }\n });\n }\n };\n });\n\n this.title = 'Select a contentlet';\n this.cd.detectChanges();\n this.resetKeyManager();\n });\n }\n };\n });\n }),\n take(1)\n )\n .subscribe((items) => {\n this.title = 'Select a content type';\n this.items = items;\n this.cd.detectChanges();\n this.resetKeyManager();\n });\n }\n\n private sanitizeUrl(url: string): SafeUrl {\n return this.domSanitizer.bypassSecurityTrustUrl(url);\n }\n}\n", + "properties": [ + { + "name": "payload", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSContentlet", + "optional": true, + "description": "", + "line": 13 + }, + { + "name": "type", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": false, + "description": "", + "line": 14 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "TypeChangeEvent", + "id": "interface-TypeChangeEvent-0b1711c16d9f15e40a82a786230a6640be390785b85223d758ab5ed0bf1c9a9e698359f37bf80cea0ea3fb29b356bb2d1e4036a1bcd9ab8d0859a2634da11f8f", + "file": "libs/dot-rules/src/lib/rule-engine.container.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { from as observableFrom, Observable, merge, Subject } from 'rxjs';\nimport { reduce, mergeMap, take, map, filter, takeUntil } from 'rxjs/operators';\n// tslint:disable-next-line:max-file-line-count\nimport { Component, EventEmitter, ViewEncapsulation, OnDestroy } from '@angular/core';\nimport {\n RuleModel,\n RuleService,\n ConditionGroupModel,\n ConditionModel,\n ActionModel,\n RuleEngineState\n} from './services/Rule';\nimport { CwChangeEvent } from './services/util/CwEvent';\nimport { ServerSideFieldModel, ServerSideTypeModel } from './services/ServerSideFieldModel';\nimport { ConditionService } from './services/Condition';\nimport { ActionService } from './services/Action';\nimport { ConditionGroupService } from './services/ConditionGroup';\nimport { CwError } from '@dotcms/dotcms-js';\nimport { BundleService, IPublishEnvironment } from './services/bundle-service';\nimport { ActivatedRoute, Params } from '@angular/router';\nimport { HttpCode } from '@dotcms/dotcms-js';\nimport { LoggerService } from '@dotcms/dotcms-js';\nimport { RuleViewService } from './services/dot-view-rule-service';\n\nexport interface ParameterChangeEvent extends CwChangeEvent {\n rule?: RuleModel;\n source?: ServerSideFieldModel;\n name: string;\n value: string;\n}\n\nexport interface TypeChangeEvent extends CwChangeEvent {\n rule?: RuleModel;\n source: ServerSideFieldModel;\n value: any;\n index: number;\n}\n\nexport interface RuleActionEvent {\n type: string;\n payload: {\n rule?: RuleModel;\n value?: string | boolean;\n };\n}\nexport interface RuleActionActionEvent extends RuleActionEvent {\n payload: {\n rule?: RuleModel;\n value?: string | boolean;\n ruleAction?: ActionModel;\n index?: number;\n name?: string;\n };\n}\nexport interface ConditionGroupActionEvent extends RuleActionEvent {\n payload: {\n rule?: RuleModel;\n value?: string | boolean;\n conditionGroup?: ConditionGroupModel;\n index?: number;\n priority?: number;\n };\n}\nexport interface ConditionActionEvent extends RuleActionEvent {\n payload: {\n rule?: RuleModel;\n value?: string | boolean;\n condition?: ConditionModel;\n conditionGroup?: ConditionGroupModel;\n index?: number;\n name?: string;\n type?: string;\n };\n}\n\n/**\n *\n */\n@Component({\n encapsulation: ViewEncapsulation.None,\n selector: 'cw-rule-engine-container',\n styleUrls: ['./styles/rule-engine.scss', './styles/angular-material.layouts.scss'],\n template: `\n \n `\n})\nexport class RuleEngineContainer implements OnDestroy {\n rules: RuleModel[];\n state: RuleEngineState = new RuleEngineState();\n\n environments: IPublishEnvironment[] = [];\n\n rules$: EventEmitter = new EventEmitter();\n ruleActions$: EventEmitter = new EventEmitter();\n conditionGroups$: EventEmitter = new EventEmitter();\n globalError: string;\n pageId: string;\n isContentletHost: boolean;\n\n private destroy$: Subject = new Subject();\n\n constructor(\n public _ruleService: RuleService,\n private _ruleActionService: ActionService,\n private _conditionGroupService: ConditionGroupService,\n private _conditionService: ConditionService,\n public bundleService: BundleService,\n private route: ActivatedRoute,\n private loggerService: LoggerService,\n private ruleViewService: RuleViewService\n ) {\n this.rules$.subscribe((rules) => {\n this.rules = rules;\n });\n\n this.bundleService\n .loadPublishEnvironments()\n .pipe(take(1))\n .subscribe((environments) => (this.environments = environments));\n this.initRules();\n\n this._ruleService._errors$.subscribe((res) => {\n this.ruleViewService.showErrorMessage(\n res.message,\n false,\n res.response.headers.get('error-key')\n );\n this.state.loading = false;\n this.state.showRules = false;\n });\n\n merge(\n this._ruleActionService.error,\n this._conditionGroupService.error,\n this._conditionService.error\n )\n .pipe(takeUntil(this.destroy$))\n .subscribe((message: string) => {\n this.ruleViewService.showErrorMessage(message);\n\n this.initRules();\n });\n }\n\n alphaSort(key): (a, b) => number {\n return (a, b) => {\n let x;\n if (a[key] > b[key]) {\n x = 1;\n } else if (a[key] < b[key]) {\n x = -1;\n } else {\n x = 0;\n }\n return x;\n };\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.complete();\n }\n\n /**\n *\n * @param event\n */\n onCreateRule(event): void {\n this.loggerService.info('RuleEngineContainer', 'onCreateRule', event);\n const priority = this.rules.length ? this.rules[0].priority + 1 : 1;\n const rule = new RuleModel({ priority });\n const group = new ConditionGroupModel({ operator: 'AND', priority: 1 });\n group._conditions.push(new ConditionModel({ _type: new ServerSideTypeModel() }));\n rule._conditionGroups.push(group);\n const action = new ActionModel(null, new ServerSideTypeModel());\n action._owningRule = rule;\n rule._ruleActions.push(action);\n rule._saved = false;\n rule._expanded = false;\n this.rules$.emit([rule].concat(this.rules));\n }\n\n onDeleteRule(event: RuleActionEvent): void {\n const rule = event.payload.rule;\n rule._deleting = true;\n this.state.deleting = true;\n if (rule.isPersisted()) {\n this._ruleService.deleteRule(rule.key).subscribe(\n (_result) => {\n this.state.deleting = false;\n const rules = this.rules.filter((arrayRule) => arrayRule.key !== rule.key);\n this.rules$.emit(rules);\n },\n (e: CwError) => {\n this._handle403Error(e) ? null : { invalid: e.message };\n }\n );\n }\n }\n\n onUpdateEnabledState(event: RuleActionEvent): void {\n event.payload.rule.enabled = event.payload.value;\n this.patchRule(event.payload.rule, false);\n }\n\n onUpdateRuleName(event: RuleActionEvent): void {\n event.payload.rule.name = event.payload.value;\n this.patchRule(event.payload.rule, false);\n }\n\n onUpdateFireOn(event: RuleActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onUpdateFireOn', event);\n event.payload.rule.fireOn = event.payload.value;\n this.patchRule(event.payload.rule, false);\n }\n\n onUpdateExpandedState(event: RuleActionEvent): void {\n const rule = event.payload.rule;\n rule._expanded = event.payload.value;\n if (rule._expanded) {\n let obs2: Observable;\n if (rule._conditionGroups.length === 0) {\n const obs: Observable<\n ConditionGroupModel[]\n > = this._conditionGroupService.allAsArray(\n rule.key,\n Object.keys(rule.conditionGroups)\n );\n obs2 = obs.pipe(\n mergeMap((groups: ConditionGroupModel[]) => observableFrom(groups))\n );\n } else {\n obs2 = observableFrom(rule._conditionGroups);\n }\n\n const obs3: Observable = obs2.pipe(\n mergeMap(\n (group: ConditionGroupModel) =>\n this._conditionService.listForGroup(\n group,\n this._ruleService._conditionTypes\n ),\n (group: ConditionGroupModel, conditions: ConditionModel[]) => {\n if (conditions) {\n conditions.forEach((condition: ConditionModel) => {\n condition.type = this._ruleService._conditionTypes[\n condition.conditionlet\n ];\n });\n }\n group._conditions = conditions;\n return group;\n }\n )\n );\n\n const obs4: Observable = obs3.pipe(\n reduce((acc: ConditionGroupModel[], group: ConditionGroupModel) => {\n acc.push(group);\n return acc;\n }, [])\n );\n\n obs4.subscribe(\n (groups: ConditionGroupModel[]) => {\n rule._conditionGroups = groups;\n if (rule._conditionGroups.length === 0) {\n this.loggerService.info(\n 'RuleEngineContainer',\n 'conditionGroups',\n 'Add stub group'\n );\n const group = new ConditionGroupModel({ operator: 'AND', priority: 1 });\n group._conditions.push(\n new ConditionModel({\n _type: new ServerSideTypeModel(),\n operator: 'AND',\n priority: 1\n })\n );\n rule._conditionGroups.push(group);\n } else {\n rule._conditionGroups.sort(this.prioritySortFn);\n rule._conditionGroups.forEach((group: ConditionGroupModel) => {\n group._conditions.sort(this.prioritySortFn);\n if (group._conditions.length === 0) {\n group._conditions.push(\n new ConditionModel({\n _type: new ServerSideTypeModel(),\n operator: 'AND',\n priority: 1\n })\n );\n }\n });\n }\n },\n (e) => {\n this.loggerService.error('RuleEngineContainer', e);\n }\n );\n\n if (rule._ruleActions.length === 0) {\n this._ruleActionService\n .allAsArray(\n rule.key,\n Object.keys(rule.ruleActions),\n this._ruleService._ruleActionTypes\n )\n .subscribe((actions) => {\n rule._ruleActions = actions;\n if (rule._ruleActions.length === 0) {\n const action = new ActionModel(null, new ServerSideTypeModel(), 1);\n rule._ruleActions.push(action);\n rule._ruleActions.sort(this.prioritySortFn);\n } else {\n rule._ruleActions.sort(this.prioritySortFn);\n }\n });\n }\n }\n }\n\n onCreateRuleAction(event: RuleActionActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onCreateRuleAction', event);\n const rule = event.payload.rule;\n const priority = rule._ruleActions.length\n ? rule._ruleActions[rule._ruleActions.length - 1].priority + 1\n : 1;\n const entity = new ActionModel(null, new ServerSideTypeModel(), priority);\n\n this.patchRule(rule, true);\n rule._ruleActions.push(entity);\n rule._saved = false;\n }\n\n onDeleteRuleAction(event: RuleActionActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onDeleteRuleAction', event);\n const rule = event.payload.rule;\n const ruleAction = event.payload.ruleAction;\n if (ruleAction.isPersisted()) {\n this._ruleActionService.remove(rule.key, ruleAction).subscribe((_result) => {\n rule._ruleActions = rule._ruleActions.filter((aryAction) => {\n return aryAction.key !== ruleAction.key;\n });\n if (rule._ruleActions.length === 0) {\n rule._ruleActions.push(new ActionModel(null, new ServerSideTypeModel(), 1));\n }\n });\n }\n }\n\n onUpdateRuleActionType(event: RuleActionActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onUpdateRuleActionType');\n try {\n const ruleAction = event.payload.ruleAction;\n const rule = event.payload.rule;\n const idx = event.payload.index;\n const type: ServerSideTypeModel = this._ruleService._ruleActionTypes[\n event.payload.value\n ];\n rule._ruleActions[idx] = new ActionModel(ruleAction.key, type, ruleAction.priority);\n this.patchAction(rule, ruleAction);\n } catch (e) {\n this.loggerService.error('RuleComponent', 'onActionTypeChange', e);\n }\n }\n\n onUpdateRuleActionParameter(event: RuleActionActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onUpdateRuleActionParameter');\n const ruleAction = event.payload.ruleAction;\n ruleAction.setParameter(event.payload.name, event.payload.value);\n this.patchAction(event.payload.rule, ruleAction);\n }\n\n onCreateConditionGroup(event: ConditionGroupActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onCreateConditionGroup');\n const rule = event.payload.rule;\n const priority = rule._conditionGroups.length\n ? rule._conditionGroups[rule._conditionGroups.length - 1].priority + 1\n : 1;\n const group = new ConditionGroupModel({ operator: 'AND', priority: priority });\n group._conditions.push(\n new ConditionModel({ _type: new ServerSideTypeModel(), operator: 'AND', priority: 1 })\n );\n rule._conditionGroups.push(group);\n rule._conditionGroups.sort(this.prioritySortFn);\n }\n\n onUpdateConditionGroupOperator(event: ConditionGroupActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onUpdateConditionGroupOperator');\n const group = event.payload.conditionGroup;\n group.operator = event.payload.value;\n if (group.key != null) {\n this.patchConditionGroup(event.payload.rule, group);\n this.patchRule(event.payload.rule);\n }\n }\n\n onDeleteConditionGroup(event: ConditionGroupActionEvent): void {\n const rule = event.payload.rule;\n const group = event.payload.conditionGroup;\n this._conditionGroupService.remove(rule.key, group).subscribe();\n rule._conditionGroups = rule._conditionGroups.filter(\n (aryGroup) => aryGroup.key !== group.key\n );\n }\n\n onCreateCondition(event: ConditionActionEvent): void {\n const rule = event.payload.rule;\n this.ruleUpdating(rule, true);\n try {\n const group = event.payload.conditionGroup;\n const priority = group._conditions.length\n ? group._conditions[group._conditions.length - 1].priority + 1\n : 1;\n const entity = new ConditionModel({\n _type: new ServerSideTypeModel(),\n operator: 'AND',\n priority: priority\n });\n group._conditions.push(entity);\n this.ruleUpdated(rule);\n } catch (e) {\n this.loggerService.error('RuleEngineContainer', 'onCreateCondition', e);\n this.ruleUpdated(rule, [{ unhandledError: e }]);\n }\n }\n\n onUpdateConditionType(event: ConditionActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onUpdateConditionType');\n try {\n let condition = event.payload.condition;\n const group = event.payload.conditionGroup;\n const rule = event.payload.rule;\n const idx = event.payload.index;\n const type: ServerSideTypeModel = this._ruleService._conditionTypes[\n event.payload.value\n ];\n // replace the condition rather than mutate it to force event for 'onPush' NG2 components.\n condition = new ConditionModel({\n _type: type,\n id: condition.key,\n operator: condition.operator,\n priority: condition.priority\n });\n group._conditions[idx] = condition;\n this.patchCondition(rule, group, condition);\n } catch (e) {\n this.loggerService.error('RuleComponent', 'onActionTypeChange', e);\n }\n }\n\n onUpdateConditionParameter(event: ConditionActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onUpdateConditionParameter');\n const condition = event.payload.condition;\n condition.setParameter(event.payload.name, event.payload.value);\n this.patchCondition(event.payload.rule, event.payload.conditionGroup, condition);\n }\n\n onUpdateConditionOperator(event: ConditionActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onUpdateConditionOperator');\n const condition = event.payload.condition;\n condition.operator = event.payload.value;\n this.patchCondition(event.payload.rule, event.payload.conditionGroup, condition);\n }\n\n onDeleteCondition(event: ConditionActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onDeleteCondition', event);\n const rule = event.payload.rule;\n const group = event.payload.conditionGroup;\n const condition = event.payload.condition;\n if (condition.isPersisted()) {\n this._conditionService.remove(condition).subscribe((_result) => {\n group._conditions = group._conditions.filter((aryCondition) => {\n return aryCondition.key !== condition.key;\n });\n if (group._conditions.length === 0) {\n this.loggerService.info(\n 'RuleEngineContainer',\n 'condition',\n 'Remove Condition and remove Groups is empty'\n );\n this._conditionGroupService.remove(rule.key, group).subscribe();\n rule._conditionGroups = rule._conditionGroups.filter(\n (aryGroup) => aryGroup.key !== group.key\n );\n }\n if (rule._conditionGroups.length === 0) {\n this.loggerService.info(\n 'RuleEngineContainer',\n 'conditionGroups',\n 'Add stub group if Groups are empty'\n );\n const conditionGroup = new ConditionGroupModel({\n operator: 'AND',\n priority: 1\n });\n conditionGroup._conditions.push(\n new ConditionModel({\n _type: new ServerSideTypeModel(),\n operator: 'AND',\n priority: 1\n })\n );\n rule._conditionGroups.push(conditionGroup);\n }\n });\n }\n }\n\n ruleUpdating(rule, disable = true): void {\n if (disable && rule.enabled && rule.key) {\n this.loggerService.info(\n 'RuleEngineContainer',\n 'ruleUpdating',\n 'disabling rule due for edit.'\n );\n this.patchRule(rule, disable);\n }\n rule._saved = false;\n rule._saving = true;\n rule._errors = null;\n }\n\n ruleUpdated(rule: RuleModel, errors?: { [key: string]: any }): void {\n rule._saving = false;\n if (!errors) {\n rule._saved = true;\n } else {\n this.loggerService.error(errors);\n rule._errors = errors;\n }\n }\n\n patchConditionGroup(rule: RuleModel, group: ConditionGroupModel, disable = true): void {\n this.ruleUpdating(rule, false);\n if (disable && rule.enabled) {\n rule.enabled = false;\n }\n this._conditionGroupService\n .updateConditionGroup(rule.key, group)\n .subscribe((_result) => {});\n }\n\n patchRule(rule: RuleModel, disable = true): void {\n this.ruleUpdating(rule, false);\n if (disable && rule.enabled) {\n rule.enabled = false;\n }\n if (rule.isValid()) {\n if (rule.isPersisted()) {\n this._ruleService.updateRule(rule.key, rule).subscribe(\n () => {\n this.ruleUpdated(rule);\n },\n (e: CwError) => {\n const ruleError = this._handle403Error(e) ? null : { invalid: e.message };\n this.ruleUpdated(rule, ruleError);\n this.initRules();\n }\n );\n } else {\n this._ruleService.createRule(rule).subscribe(\n () => {\n this.ruleUpdated(rule);\n },\n (e: CwError) => {\n const ruleError = this._handle403Error(e) ? null : { invalid: e.message };\n this.ruleUpdated(rule, ruleError);\n this.initRules();\n }\n );\n }\n } else {\n this.ruleUpdated(rule, {\n invalid: 'Cannot save, rule is not valid.'\n });\n }\n }\n\n patchAction(rule: RuleModel, ruleAction: ActionModel): void {\n if (ruleAction.isValid()) {\n this.ruleUpdating(rule, false);\n if (!ruleAction.isPersisted()) {\n this._ruleActionService.createRuleAction(rule.key, ruleAction).subscribe(\n (_) => {\n this.ruleUpdated(rule);\n },\n (e: CwError) => {\n const ruleError = this._handle403Error(e) ? null : { invalid: e.message };\n this.ruleUpdated(rule, ruleError);\n }\n );\n } else {\n this._ruleActionService.updateRuleAction(rule.key, ruleAction).subscribe(\n (_result) => {\n this.ruleUpdated(rule);\n },\n (e: any) => {\n const ruleError = this._handle403Error(e) ? null : { invalid: e.message };\n this.ruleUpdated(rule, ruleError);\n }\n );\n }\n } else {\n this.ruleUpdating(rule);\n this.ruleUpdated(rule, {\n invalid: 'Cannot save, action is not valid.'\n });\n }\n }\n\n patchCondition(rule: RuleModel, group: ConditionGroupModel, condition: ConditionModel): void {\n try {\n if (condition.isValid()) {\n this.ruleUpdating(rule, false);\n if (condition.isPersisted()) {\n this._conditionService.save(group.key, condition).subscribe(\n (_result) => {\n this.ruleUpdated(rule);\n },\n (e: any) => {\n const ruleError = this._handle403Error(e)\n ? null\n : { invalid: e.message };\n this.ruleUpdated(rule, ruleError);\n }\n );\n } else {\n if (!group.isPersisted()) {\n this._conditionGroupService\n .createConditionGroup(rule.key, group)\n .subscribe((_foo) => {\n this._conditionService.add(group.key, condition).subscribe(\n () => {\n group.conditions[condition.key] = true;\n this.ruleUpdated(rule);\n },\n (e: CwError) => {\n const ruleError = this._handle403Error(e)\n ? null\n : { invalid: e.message };\n this.ruleUpdated(rule, ruleError);\n }\n );\n });\n } else {\n this._conditionService.add(group.key, condition).subscribe(\n () => {\n group.conditions[condition.key] = true;\n this.ruleUpdated(rule);\n },\n (e: CwError) => {\n const ruleError = this._handle403Error(e)\n ? null\n : { invalid: e.message };\n this.ruleUpdated(rule, ruleError);\n }\n );\n }\n }\n } else {\n this.ruleUpdating(rule);\n this.loggerService.info('RuleEngineContainer', 'patchCondition', 'Not valid');\n rule._saving = false;\n rule._errors = { invalid: 'Condition not valid.' };\n }\n } catch (e) {\n this.loggerService.error(e);\n this.ruleUpdated(rule, { invalid: e.message });\n }\n }\n\n prioritySortFn(a: any, b: any): number {\n return a.priority - b.priority;\n }\n\n private initRules(): void {\n this.state.loading = true;\n\n this.pageId = '';\n\n const pageIdParams = this.route.params.pipe(map((params: Params) => params.pageId));\n const queryParams = this.route.queryParams.pipe(map((params: Params) => params.realmId));\n\n merge(pageIdParams, queryParams)\n .pipe(\n filter((res) => !!res),\n take(1)\n )\n .subscribe((id: string) => {\n this.pageId = id;\n });\n\n this._ruleService.requestRules(this.pageId);\n this._ruleService\n .loadRules()\n .pipe(takeUntil(this.destroy$))\n .subscribe((rules: RuleModel[]) => {\n this.loadRules(rules);\n });\n this.route.queryParams\n .pipe(take(1))\n .subscribe(\n (params: Params) => (this.isContentletHost = params.isContentletHost === 'true')\n );\n }\n\n private loadRules(rules: RuleModel[]): void {\n rules.sort((a, b) => {\n return b.priority - a.priority;\n });\n this.rules$.emit(rules);\n this.state.loading = false;\n }\n\n private _handle403Error(e: CwError): boolean {\n let handled = false;\n try {\n if (e && e.response.status === HttpCode.FORBIDDEN) {\n const errorJson = e.response;\n if (errorJson && errorJson.error) {\n this.ruleViewService.showErrorMessage(\n errorJson.error.message.replace('dotcms.api.error.forbidden: ', '')\n );\n handled = true;\n }\n }\n } catch (e) {\n this.loggerService.error('Error while processing invalid response: ', e);\n }\n\n this.initRules();\n\n return handled;\n }\n}\n", + "properties": [ + { + "name": "index", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 36 + }, + { + "name": "rule", + "deprecated": false, + "deprecationMessage": "", + "type": "RuleModel", + "optional": true, + "description": "", + "line": 33 + }, + { + "name": "source", + "deprecated": false, + "deprecationMessage": "", + "type": "ServerSideFieldModel", + "optional": false, + "description": "", + "line": 34 + }, + { + "name": "value", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": false, + "description": "", + "line": 35 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [], + "extends": "CwChangeEvent" + }, + { + "name": "TypeConstraint", + "id": "interface-TypeConstraint-07b17d378b1216b2123783c05f5608100201df3052e985081b9d8285fe2c72d9ed9380a9a25b85db5c47ba2b542a43b3fe70dab2496863c730ce8f70ee0c7b83", + "file": "libs/dot-rules/src/lib/services/util/CwInputModel.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Validators, ValidatorFn } from '@angular/forms';\nimport { CustomValidators } from '../validation/CustomValidators';\n\nexport class CwValidationResults {\n valid: boolean;\n\n constructor(valid: boolean) {\n this.valid = valid;\n }\n}\ninterface TypeConstraint {\n id: string;\n args: { [key: string]: any };\n}\n\ninterface ValidatorDefinition {\n key: string;\n providerFn: Function;\n}\nconst VALIDATIONS = {\n maxLength: {\n key: 'maxLength',\n providerFn: (constraint: TypeConstraint) =>\n CustomValidators.maxLength(constraint.args['value'])\n },\n maxValue: {\n key: 'maxValue',\n providerFn: (constraint: TypeConstraint) => CustomValidators.max(constraint.args['value'])\n },\n minLength: {\n key: 'minLength',\n providerFn: (constraint: TypeConstraint) =>\n CustomValidators.minLength(constraint.args['value'])\n },\n minValue: {\n key: 'minValue',\n providerFn: (constraint: TypeConstraint) => CustomValidators.min(constraint.args['value'])\n },\n required: {\n key: 'required',\n providerFn: (_constraint: TypeConstraint) => CustomValidators.required()\n }\n};\nexport class DataTypeModel {\n private _vFns: Function[];\n\n constructor(\n public id: string,\n public errorMessageKey: string,\n private _constraints: any,\n public defaultValue: string = null\n ) {}\n\n validators(): Array {\n if (this._vFns == null) {\n this._vFns = [];\n Object.keys(VALIDATIONS).forEach((vDefKey) => {\n const vDef: ValidatorDefinition = VALIDATIONS[vDefKey];\n const constraint: TypeConstraint = this._constraints[vDef.key];\n if (constraint) {\n const fn = vDef.providerFn(constraint);\n this._vFns.push(fn);\n }\n });\n }\n return this._vFns;\n }\n\n validator(): ValidatorFn {\n return Validators.compose(this.validators());\n }\n}\n\nexport class CwInputDefinition {\n private _vFns: Function[];\n private _validator: Function;\n\n static fromJson(json: any, name: string): CwInputDefinition {\n const typeId = json.id || json.type;\n let type = Registry[typeId];\n\n if (!type) {\n const msg =\n \"No input definition registered for '\" +\n (json.id || json.type) +\n \"'. Using default.\";\n // tslint:disable-next-line:no-console\n console.error(msg, json);\n type = 'text';\n }\n let dataType = null;\n if (json.dataType) {\n dataType = new DataTypeModel(\n json.dataType.id,\n json.dataType.errorMessageKey,\n json.dataType.constraints,\n json.dataType.defaultValue\n );\n }\n return new type(json, typeId, name, json.placeholder, dataType);\n }\n\n constructor(\n public json: any,\n public type: string,\n public name: string,\n public placeholder: string,\n public dataType: DataTypeModel,\n private _validators: Function[] = []\n ) {}\n\n validators(): Array {\n if (this._vFns == null) {\n this._vFns = this.dataType.validators().concat(this._validators);\n }\n return this._vFns;\n }\n\n validator(): Function {\n if (this._validator == null) {\n this._vFns = this.validators();\n if (this._vFns && this._vFns.length) {\n this._validator = Validators.compose(this._vFns);\n } else {\n this._validator = () => {\n return null;\n };\n }\n }\n return this._validator;\n }\n\n verify(value: any): { [key: string]: boolean } {\n return this.validator()({ value: value });\n }\n}\n\nexport class CwSpacerInputDefinition extends CwInputDefinition {\n protected flex;\n\n constructor(flex: number) {\n super({}, 'spacer', null, null, null);\n this.flex = flex;\n }\n}\n\nexport class CwDropdownInputModel extends CwInputDefinition {\n options: { [key: string]: any };\n allowAdditions: boolean;\n minSelections = 0;\n maxSelections = 1;\n selected: Array = [];\n i18nBaseKey: string;\n\n static createValidators(json: any): any[] {\n const ary = [];\n ary.push(CustomValidators.minSelections(json.minSelections || 0));\n ary.push(CustomValidators.maxSelections(json.maxSelections || 1));\n return ary;\n }\n\n constructor(json, type, name, placeholder, dataType) {\n super(json, type, name, placeholder, dataType, CwDropdownInputModel.createValidators(json));\n this.options = json.options;\n this.allowAdditions = json.allowAdditions;\n this.minSelections = json.minSelections;\n this.maxSelections = json.maxSelections;\n const defV = json.dataType.defaultValue;\n this.selected = defV == null || defV === '' ? [] : [defV];\n }\n}\n\nexport class CwRestDropdownInputModel extends CwInputDefinition {\n optionUrl: string;\n optionValueField: string;\n optionLabelField: string;\n allowAdditions: boolean;\n minSelections = 0;\n maxSelections = 1;\n selected: Array = [];\n i18nBaseKey: string;\n\n constructor(json, type, name, placeholder, dataType) {\n super(json, type, name, placeholder, dataType, CwDropdownInputModel.createValidators(json));\n this.optionUrl = json.optionUrl;\n this.optionValueField = json.jsonValueField;\n this.optionLabelField = json.jsonLabelField;\n this.allowAdditions = json.allowAdditions;\n this.minSelections = json.minSelections;\n this.maxSelections = json.maxSelections;\n const defV = json.dataType.defaultValue;\n this.selected = defV == null || defV === '' ? [] : [defV];\n }\n}\n\nexport class ParameterDefinition {\n defaultValue: string;\n priority: number;\n key: string;\n inputType: CwInputDefinition;\n i18nBaseKey: string;\n\n static fromJson(json: any): ParameterDefinition {\n const m = new ParameterDefinition();\n const defV = json.defaultValue;\n m.defaultValue = defV == null || defV === '' ? null : defV;\n m.priority = json.priority;\n m.key = json.key;\n m.inputType = CwInputDefinition.fromJson(json.inputType, m.key);\n m.i18nBaseKey = json.i18nBaseKey;\n\n return m;\n }\n\n constructor() {}\n}\n\nconst Registry = {\n text: CwInputDefinition,\n datetime: CwInputDefinition,\n number: CwInputDefinition,\n dropdown: CwDropdownInputModel,\n restDropdown: CwRestDropdownInputModel\n};\n", + "properties": [ + { + "name": "args", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": false, + "description": "", + "line": 13 + }, + { + "name": "id", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 12 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "User", + "id": "interface-User-5d0703d3d5d12558b1bbde9262016b10ec9cf6c418c9741070b97284d1a8fbc28be4f7b612438e8347bcf836241aa6a4a312b0f55c3c34f695902c625eee1712", + "file": "libs/dotcms-js/src/lib/core/login.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { CoreWebService } from './core-web.service';\nimport { Injectable } from '@angular/core';\nimport { Observable, Subject, of } from 'rxjs';\nimport { HttpCode } from './util/http-code';\nimport { pluck, tap, map } from 'rxjs/operators';\nimport { DotcmsEventsService } from './dotcms-events.service';\nimport { HttpResponse } from '@angular/common/http';\n\nexport interface DotLoginParams {\n login: string;\n password: string;\n rememberMe: boolean;\n language: string;\n backEndLogin: boolean;\n}\n\nexport const LOGOUT_URL = '/dotAdmin/logout';\n\n/**\n * This Service get the server configuration to display in the login component\n * and execute the login and forgot password routines\n */\n@Injectable()\nexport class LoginService {\n private _auth$: Subject = new Subject();\n private _logout$: Subject = new Subject();\n private _auth: Auth;\n private _loginAsUsersList$: Subject;\n private country = '';\n private lang = '';\n private urls: any;\n\n constructor(\n private coreWebService: CoreWebService,\n private dotcmsEventsService: DotcmsEventsService\n ) {\n this._loginAsUsersList$ = >new Subject();\n this.urls = {\n changePassword: 'v1/changePassword',\n getAuth: 'v1/authentication/logInUser',\n loginAs: 'v1/users/loginas',\n logout: 'v1/logout',\n logoutAs: 'v1/users/logoutas',\n recoverPassword: 'v1/forgotpassword',\n serverInfo: 'v1/loginform',\n userAuth: 'v1/authentication',\n current: '/api/v1/users/current/'\n };\n\n // when the session is expired/destroyed\n dotcmsEventsService.subscribeTo('SESSION_DESTROYED').subscribe(() => this.logOutUser());\n }\n\n /**\n * Get current logged in user\n *\n * @return {*} {Observable}\n * @memberof LoginService\n */\n getCurrentUser(): Observable {\n return this.coreWebService\n .request({\n url: this.urls.current\n })\n .pipe(map((res: HttpResponse) => res)) as unknown as Observable\n }\n\n get loginAsUsersList$(): Observable {\n return this._loginAsUsersList$.asObservable();\n }\n\n get auth$(): Observable {\n return this._auth$.asObservable();\n }\n\n get logout$(): Observable {\n return this._logout$.asObservable();\n }\n\n get auth(): Auth {\n return this._auth;\n }\n\n get isLogin$(): Observable {\n if (!!this.auth && !!this.auth.user) {\n return of(true);\n }\n\n return this.loadAuth().pipe(map((auth) => !!auth && !!auth.user));\n }\n\n /**\n * Load _auth information.\n * @returns Observable\n */\n public loadAuth(): Observable {\n return this.coreWebService\n .requestView({\n url: this.urls.getAuth\n })\n .pipe(\n pluck('entity'),\n tap((auth: Auth) => {\n if (auth.user) {\n this.setAuth(auth);\n }\n }),\n map((auth: Auth) => auth)\n );\n }\n\n /**\n * Change password\n * @param password\n * @param token\n * @returns Observable\n */\n public changePassword(password: string, token: string): Observable {\n const body = JSON.stringify({ password: password, token: token });\n\n return this.coreWebService.requestView({\n body: body,\n method: 'POST',\n url: this.urls.changePassword\n });\n }\n\n /**\n * Get the server information to configure the login component\n * @param language language and country to get the internationalized messages\n * @param i18nKeys array of message key to internationalize\n * @returns Observable Observable with an array of internationalized messages and server configuration info\n */\n public getLoginFormInfo(language: string, i18nKeys: Array): Observable {\n this.setLanguage(language);\n\n return this.coreWebService.requestView({\n body: { messagesKey: i18nKeys, language: this.lang, country: this.country },\n method: 'POST',\n url: this.urls.serverInfo\n });\n }\n\n /**\n * Do the login as request and return an Observable.\n * @param user user to loginas\n * @param password loginin user's password\n * @returns Observable\n */\n // TODO: password in the url is a no-no, fix asap. Sanchez and Jose have an idea.\n public loginAs(userData: { user: User; password: string }): Observable {\n return this.coreWebService\n .requestView({\n body: {\n password: userData.password,\n userId: userData.user.userId\n },\n method: 'POST',\n url: this.urls.loginAs\n })\n .pipe(\n map((res) => {\n if (!res.entity.loginAs) {\n throw res.errorsMessages;\n }\n\n this.setAuth({\n loginAsUser: userData.user,\n user: this._auth.user,\n isLoginAs: true\n });\n return res;\n }),\n pluck('entity', 'loginAs')\n );\n }\n\n /**\n * Executes the call to the login rest api\n * @param login User email or user id\n * @param password User password\n * @param rememberMe boolean indicating if the _auth want to use or not the remenber me option\n * @param language string with the language and country code, ex: en_US\n * @returns an array with the user if the user logged in successfully or the error message\n */\n public loginUser({\n login,\n password,\n rememberMe,\n language,\n backEndLogin\n }: DotLoginParams): Observable {\n this.setLanguage(language);\n\n return this.coreWebService\n .requestView({\n body: {\n userId: login,\n password: password,\n rememberMe: rememberMe,\n language: this.lang,\n country: this.country,\n backEndLogin: backEndLogin\n },\n method: 'POST',\n url: this.urls.userAuth\n })\n .pipe(\n map((response) => {\n const auth = {\n loginAsUser: null,\n user: response.entity,\n isLoginAs: false\n };\n\n this.setAuth(auth);\n this.coreWebService\n .subscribeToHttpError(HttpCode.UNAUTHORIZED)\n .subscribe(() => {\n this.logOutUser();\n });\n return response.entity;\n })\n );\n }\n\n /**\n * Logout \"login as\" user\n * @returns Observable\n */\n public logoutAs(): Observable {\n return this.coreWebService\n .requestView({\n method: 'PUT',\n url: `${this.urls.logoutAs}`\n })\n .pipe(\n map((res) => {\n this.setAuth({\n loginAsUser: null,\n user: this._auth.user,\n isLoginAs: true\n });\n return res;\n })\n );\n }\n\n /**\n * Executes the call to the recover passwrod rest api\n * @param email User email address\n * @returns an array with message indicating if the recover password was successfull\n * or if there is an error\n */\n public recoverPassword(login: string): Observable {\n return this.coreWebService.requestView({\n body: { userId: login },\n method: 'POST',\n url: this.urls.recoverPassword\n });\n }\n\n /**\n * Subscribe to ser change and call received function on change.\n * @param func function will call when user change\n */\n public watchUser(func: Function): void {\n if (this.auth) {\n func(this.auth);\n }\n\n this.auth$.subscribe((auth) => {\n if (auth.user) {\n func(auth);\n }\n });\n }\n\n /**\n * Set logged_auth and update auth Observable\n * @param _auth\n */\n public setAuth(auth: Auth): void {\n this._auth = auth;\n this._auth$.next(auth);\n\n // When not logged user we need to fire the observable chain\n if (!auth.user) {\n this._logout$.next();\n } else {\n this.dotcmsEventsService.start();\n }\n }\n\n /**\n * update the language and country variables from the string\n * @param language string containing the language and country\n */\n private setLanguage(language: string): void {\n if (language !== undefined && language !== '') {\n const languageDesc = language.split('_');\n this.lang = languageDesc[0];\n this.country = languageDesc[1];\n } else {\n this.lang = '';\n this.country = '';\n }\n }\n\n /**\n * Call the logout rest api\n * @returns Observable\n */\n private logOutUser(): void {\n window.location.href = `${LOGOUT_URL}?r=${new Date().getTime()}`;\n }\n}\n\nexport interface CurrentUser {\n email: string;\n givenName: string;\n loginAs: boolean\n roleId: string;\n surname: string;\n userId: string;\n}\n\nexport interface User {\n active?: boolean;\n actualCompanyId?: string;\n birthday?: number; // Timestamp\n comments?: string;\n companyId?: string;\n createDate?: number; // Timestamp\n deleteDate?: number; // Timestamp\n deleteInProgress?: boolean;\n emailAddress: string;\n failedLoginAttempts?: number;\n female?: boolean;\n firstName: string;\n fullName?: string;\n id?: string;\n languageId?: string;\n lastLoginDate?: number; // Timestamp\n lastLoginIP?: string;\n lastName: string;\n male?: boolean;\n middleName?: string;\n modificationDate?: number; // Timestamp\n name?: string;\n nickname?: string;\n requestPassword?: boolean;\n timeZoneId?: string;\n type?: string;\n userId: string;\n password?: string;\n}\n\nexport interface Auth {\n user: User;\n loginAsUser: User;\n isLoginAs?: boolean;\n}\n", + "properties": [ + { + "name": "active", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 332 + }, + { + "name": "actualCompanyId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 333 + }, + { + "name": "birthday", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 334 + }, + { + "name": "comments", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 335 + }, + { + "name": "companyId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 336 + }, + { + "name": "createDate", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 337 + }, + { + "name": "deleteDate", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 338 + }, + { + "name": "deleteInProgress", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 339 + }, + { + "name": "emailAddress", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 340 + }, + { + "name": "failedLoginAttempts", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 341 + }, + { + "name": "female", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 342 + }, + { + "name": "firstName", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 343 + }, + { + "name": "fullName", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 344 + }, + { + "name": "id", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 345 + }, + { + "name": "languageId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 346 + }, + { + "name": "lastLoginDate", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 347 + }, + { + "name": "lastLoginIP", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 348 + }, + { + "name": "lastName", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 349 + }, + { + "name": "male", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 350 + }, + { + "name": "middleName", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 351 + }, + { + "name": "modificationDate", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 352 + }, + { + "name": "name", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 353 + }, + { + "name": "nickname", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 354 + }, + { + "name": "password", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 359 + }, + { + "name": "requestPassword", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 355 + }, + { + "name": "timeZoneId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 356 + }, + { + "name": "type", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 357 + }, + { + "name": "userId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 358 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "ValidatorDefinition", + "id": "interface-ValidatorDefinition-07b17d378b1216b2123783c05f5608100201df3052e985081b9d8285fe2c72d9ed9380a9a25b85db5c47ba2b542a43b3fe70dab2496863c730ce8f70ee0c7b83", + "file": "libs/dot-rules/src/lib/services/util/CwInputModel.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Validators, ValidatorFn } from '@angular/forms';\nimport { CustomValidators } from '../validation/CustomValidators';\n\nexport class CwValidationResults {\n valid: boolean;\n\n constructor(valid: boolean) {\n this.valid = valid;\n }\n}\ninterface TypeConstraint {\n id: string;\n args: { [key: string]: any };\n}\n\ninterface ValidatorDefinition {\n key: string;\n providerFn: Function;\n}\nconst VALIDATIONS = {\n maxLength: {\n key: 'maxLength',\n providerFn: (constraint: TypeConstraint) =>\n CustomValidators.maxLength(constraint.args['value'])\n },\n maxValue: {\n key: 'maxValue',\n providerFn: (constraint: TypeConstraint) => CustomValidators.max(constraint.args['value'])\n },\n minLength: {\n key: 'minLength',\n providerFn: (constraint: TypeConstraint) =>\n CustomValidators.minLength(constraint.args['value'])\n },\n minValue: {\n key: 'minValue',\n providerFn: (constraint: TypeConstraint) => CustomValidators.min(constraint.args['value'])\n },\n required: {\n key: 'required',\n providerFn: (_constraint: TypeConstraint) => CustomValidators.required()\n }\n};\nexport class DataTypeModel {\n private _vFns: Function[];\n\n constructor(\n public id: string,\n public errorMessageKey: string,\n private _constraints: any,\n public defaultValue: string = null\n ) {}\n\n validators(): Array {\n if (this._vFns == null) {\n this._vFns = [];\n Object.keys(VALIDATIONS).forEach((vDefKey) => {\n const vDef: ValidatorDefinition = VALIDATIONS[vDefKey];\n const constraint: TypeConstraint = this._constraints[vDef.key];\n if (constraint) {\n const fn = vDef.providerFn(constraint);\n this._vFns.push(fn);\n }\n });\n }\n return this._vFns;\n }\n\n validator(): ValidatorFn {\n return Validators.compose(this.validators());\n }\n}\n\nexport class CwInputDefinition {\n private _vFns: Function[];\n private _validator: Function;\n\n static fromJson(json: any, name: string): CwInputDefinition {\n const typeId = json.id || json.type;\n let type = Registry[typeId];\n\n if (!type) {\n const msg =\n \"No input definition registered for '\" +\n (json.id || json.type) +\n \"'. Using default.\";\n // tslint:disable-next-line:no-console\n console.error(msg, json);\n type = 'text';\n }\n let dataType = null;\n if (json.dataType) {\n dataType = new DataTypeModel(\n json.dataType.id,\n json.dataType.errorMessageKey,\n json.dataType.constraints,\n json.dataType.defaultValue\n );\n }\n return new type(json, typeId, name, json.placeholder, dataType);\n }\n\n constructor(\n public json: any,\n public type: string,\n public name: string,\n public placeholder: string,\n public dataType: DataTypeModel,\n private _validators: Function[] = []\n ) {}\n\n validators(): Array {\n if (this._vFns == null) {\n this._vFns = this.dataType.validators().concat(this._validators);\n }\n return this._vFns;\n }\n\n validator(): Function {\n if (this._validator == null) {\n this._vFns = this.validators();\n if (this._vFns && this._vFns.length) {\n this._validator = Validators.compose(this._vFns);\n } else {\n this._validator = () => {\n return null;\n };\n }\n }\n return this._validator;\n }\n\n verify(value: any): { [key: string]: boolean } {\n return this.validator()({ value: value });\n }\n}\n\nexport class CwSpacerInputDefinition extends CwInputDefinition {\n protected flex;\n\n constructor(flex: number) {\n super({}, 'spacer', null, null, null);\n this.flex = flex;\n }\n}\n\nexport class CwDropdownInputModel extends CwInputDefinition {\n options: { [key: string]: any };\n allowAdditions: boolean;\n minSelections = 0;\n maxSelections = 1;\n selected: Array = [];\n i18nBaseKey: string;\n\n static createValidators(json: any): any[] {\n const ary = [];\n ary.push(CustomValidators.minSelections(json.minSelections || 0));\n ary.push(CustomValidators.maxSelections(json.maxSelections || 1));\n return ary;\n }\n\n constructor(json, type, name, placeholder, dataType) {\n super(json, type, name, placeholder, dataType, CwDropdownInputModel.createValidators(json));\n this.options = json.options;\n this.allowAdditions = json.allowAdditions;\n this.minSelections = json.minSelections;\n this.maxSelections = json.maxSelections;\n const defV = json.dataType.defaultValue;\n this.selected = defV == null || defV === '' ? [] : [defV];\n }\n}\n\nexport class CwRestDropdownInputModel extends CwInputDefinition {\n optionUrl: string;\n optionValueField: string;\n optionLabelField: string;\n allowAdditions: boolean;\n minSelections = 0;\n maxSelections = 1;\n selected: Array = [];\n i18nBaseKey: string;\n\n constructor(json, type, name, placeholder, dataType) {\n super(json, type, name, placeholder, dataType, CwDropdownInputModel.createValidators(json));\n this.optionUrl = json.optionUrl;\n this.optionValueField = json.jsonValueField;\n this.optionLabelField = json.jsonLabelField;\n this.allowAdditions = json.allowAdditions;\n this.minSelections = json.minSelections;\n this.maxSelections = json.maxSelections;\n const defV = json.dataType.defaultValue;\n this.selected = defV == null || defV === '' ? [] : [defV];\n }\n}\n\nexport class ParameterDefinition {\n defaultValue: string;\n priority: number;\n key: string;\n inputType: CwInputDefinition;\n i18nBaseKey: string;\n\n static fromJson(json: any): ParameterDefinition {\n const m = new ParameterDefinition();\n const defV = json.defaultValue;\n m.defaultValue = defV == null || defV === '' ? null : defV;\n m.priority = json.priority;\n m.key = json.key;\n m.inputType = CwInputDefinition.fromJson(json.inputType, m.key);\n m.i18nBaseKey = json.i18nBaseKey;\n\n return m;\n }\n\n constructor() {}\n}\n\nconst Registry = {\n text: CwInputDefinition,\n datetime: CwInputDefinition,\n number: CwInputDefinition,\n dropdown: CwDropdownInputModel,\n restDropdown: CwRestDropdownInputModel\n};\n", + "properties": [ + { + "name": "key", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 17 + }, + { + "name": "providerFn", + "deprecated": false, + "deprecationMessage": "", + "type": "Function", + "optional": false, + "description": "", + "line": 18 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "VisitorsLocationParams", + "id": "interface-VisitorsLocationParams-07d750ccd8e423821996f4b14b8fa93aca2f6dbb7ff7ea2b5dcf82bbbfec5c5d287490ce137fcf2d08b05a6e61172dc1ccfaac4f2051f2f171f9402f60857d10", + "file": "libs/dot-rules/src/lib/custom-types/visitors-location/visitors-location.container.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy } from '@angular/core';\nimport { DecimalPipe } from '@angular/common';\nimport { FormControl } from '@angular/forms';\nimport { ServerSideFieldModel } from '../../services/ServerSideFieldModel';\nimport { Observable, BehaviorSubject } from 'rxjs';\nimport { I18nService } from '../.././services/system/locale/I18n';\nimport { LoggerService } from '@dotcms/dotcms-js';\nimport { GCircle } from '../../models/gcircle.model';\n\ninterface Param {\n key: string;\n priority?: number;\n value: T;\n}\n\ninterface VisitorsLocationParams {\n comparison: Param;\n latitude: Param;\n longitude: Param;\n radius: Param;\n preferredDisplayUnits: Param;\n}\n\nconst I8N_BASE = 'api.sites.ruleengine';\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [DecimalPipe],\n selector: 'cw-visitors-location-container',\n template: ` `\n})\nexport class VisitorsLocationContainer {\n @Input() componentInstance: ServerSideFieldModel;\n\n @Output()\n parameterValuesChange: EventEmitter<{ name: string; value: string }[]> = new EventEmitter(\n false\n );\n\n circle$: BehaviorSubject = new BehaviorSubject({\n center: { lat: 38.89, lng: -77.04 },\n radius: 10000\n });\n apiKey: string;\n preferredUnit = 'm';\n\n lat = 0;\n lng = 0;\n radius = 50000;\n comparisonValue = 'within';\n comparisonControl: FormControl;\n comparisonOptions: { value: string; label: Observable; icon: string }[];\n fromLabel = 'of';\n\n private _rsrcCache: { [key: string]: Observable };\n\n constructor(\n public resources: I18nService,\n public decimalPipe: DecimalPipe,\n private loggerService: LoggerService\n ) {\n resources.get(I8N_BASE).subscribe((_rsrc) => {});\n this._rsrcCache = {};\n\n this.circle$.subscribe(\n (_e) => {},\n (e) => {\n loggerService.error('VisitorsLocationContainer', 'Error updating area', e);\n },\n () => {}\n );\n }\n\n rsrc(subkey: string): Observable {\n let x = this._rsrcCache[subkey];\n if (!x) {\n x = this.resources.get(subkey);\n this._rsrcCache[subkey] = x;\n }\n return x;\n }\n\n ngOnChanges(change): void {\n if (change.componentInstance && this.componentInstance != null) {\n const temp: any = this.componentInstance.parameters;\n const params: VisitorsLocationParams = temp as VisitorsLocationParams;\n const comparisonDef = this.componentInstance.parameterDefs['comparison'];\n\n const opts = comparisonDef.inputType['options'];\n const i18nBaseKey = comparisonDef.i18nBaseKey || this.componentInstance.type.i18nKey;\n const rsrcKey = i18nBaseKey + '.inputs.comparison.';\n const optsAry = Object.keys(opts).map((key) => {\n const sOpt = opts[key];\n return {\n value: sOpt.value,\n label: this.rsrc(rsrcKey + sOpt.i18nKey),\n icon: sOpt.icon\n };\n });\n\n this.comparisonValue = params.comparison.value || comparisonDef.defaultValue;\n this.comparisonOptions = optsAry;\n this.comparisonControl = ServerSideFieldModel.createNgControl(\n this.componentInstance,\n 'comparison'\n );\n\n this.lat = parseFloat(params.latitude.value) || this.lat;\n this.lng = parseFloat(params.longitude.value) || this.lng;\n this.radius = parseFloat(params.radius.value) || 50000;\n this.preferredUnit =\n params.preferredDisplayUnits.value ||\n this.componentInstance.parameterDefs['preferredDisplayUnits'].defaultValue;\n\n this.circle$.next({ center: { lat: this.lat, lng: this.lng }, radius: this.radius });\n }\n }\n\n onComparisonChange(value: string): void {\n this.parameterValuesChange.emit([{ name: 'comparison', value }]);\n }\n\n onUpdate(circle: GCircle): void {\n this.loggerService.info('App', 'onUpdate', circle);\n this.parameterValuesChange.emit([\n { name: 'latitude', value: circle.center.lat + '' },\n { name: 'longitude', value: circle.center.lng + '' },\n { name: 'radius', value: circle.radius + '' }\n ]);\n\n this.lat = circle.center.lat;\n this.lng = circle.center.lng;\n this.radius = circle.radius;\n this.circle$.next(circle);\n }\n}\n", + "properties": [ + { + "name": "comparison", + "deprecated": false, + "deprecationMessage": "", + "type": "Param", + "optional": false, + "description": "", + "line": 17 + }, + { + "name": "latitude", + "deprecated": false, + "deprecationMessage": "", + "type": "Param", + "optional": false, + "description": "", + "line": 18 + }, + { + "name": "longitude", + "deprecated": false, + "deprecationMessage": "", + "type": "Param", + "optional": false, + "description": "", + "line": 19 + }, + { + "name": "preferredDisplayUnits", + "deprecated": false, + "deprecationMessage": "", + "type": "Param", + "optional": false, + "description": "", + "line": 21 + }, + { + "name": "radius", + "deprecated": false, + "deprecationMessage": "", + "type": "Param", + "optional": false, + "description": "", + "line": 20 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + }, + { + "name": "WebSocketConfigParams", + "id": "interface-WebSocketConfigParams-45a6b4d7f75c0e497b68c4ac4596588b677d9631192f713ba3cd7da60bf6bc59ab4e9b374847046d5fed2f236ff6fca756c097baee0006b631f1b38081b0506a", + "file": "libs/dotcms-js/src/lib/core/dotcms-config.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { CoreWebService } from './core-web.service';\nimport { Injectable } from '@angular/core';\nimport { Observable, BehaviorSubject } from 'rxjs';\nimport { pluck, filter, map } from 'rxjs/operators';\nimport { LoggerService } from './logger.service';\nimport { Menu } from './routing.service';\n\n/**\n * Created by josecastro on 7/29/16.\n *\n * Wraps the configuration properties for dotCMS in order to provide an\n * easier way to access the information.\n *\n */\nconst DOTCMS_WEBSOCKET_RECONNECT_TIME = 'dotcms.websocket.reconnect.time';\nconst DOTCMS_DISABLE_WEBSOCKET_PROTOCOL = 'dotcms.websocket.disable';\nconst DOTCMS_PAGINATOR_ROWS = 'dotcms.paginator.rows';\nconst DOTCMS_PAGINATOR_LINKS = 'dotcms.paginator.links';\nconst EMAIL_REGEX = 'emailRegex';\n\nexport interface DotUiColors {\n primary: string;\n secondary: string;\n background: string;\n}\n\nexport interface ConfigParams {\n colors: DotUiColors;\n emailRegex: string;\n license: {\n displayServerId: string;\n isCommunity: boolean;\n level: number;\n levelName: string;\n };\n logos: {\n loginScreen: string;\n navBar: string;\n };\n menu: Menu[];\n paginatorLinks: number;\n paginatorRows: number;\n websocket: WebSocketConfigParams;\n}\n\nexport interface WebSocketConfigParams {\n disabledWebsockets: boolean;\n websocketReconnectTime: number;\n}\n\nexport interface DotTimeZone {\n id: string;\n label: string;\n offset: string;\n}\n\n@Injectable()\nexport class DotcmsConfigService {\n private configParamsSubject: BehaviorSubject = new BehaviorSubject(null);\n private configUrl: string;\n\n /**\n * Initializes this class with the dotCMS core configuration parameters.\n *\n * @param configParams - The configuration properties for the current instance.\n */\n constructor(private coreWebService: CoreWebService, private loggerService: LoggerService) {\n this.configUrl = 'v1/appconfiguration';\n this.loadConfig();\n }\n\n getConfig(): Observable {\n return this.configParamsSubject\n .asObservable()\n .pipe(filter((config: ConfigParams) => !!config));\n }\n\n loadConfig(): void {\n this.loggerService.debug('Loading configuration on: ', this.configUrl);\n\n this.coreWebService\n .requestView({\n url: this.configUrl\n })\n .pipe(pluck('entity'))\n .subscribe((res: any) => {\n this.loggerService.debug('Configuration Loaded!', res);\n\n const configParams: ConfigParams = {\n colors: res.config.colors,\n emailRegex: res.config[EMAIL_REGEX],\n license: res.config.license,\n logos: res.config.logos,\n menu: res.menu,\n paginatorLinks: res.config[DOTCMS_PAGINATOR_LINKS],\n paginatorRows: res.config[DOTCMS_PAGINATOR_ROWS],\n websocket: {\n websocketReconnectTime:\n res.config.websocket[DOTCMS_WEBSOCKET_RECONNECT_TIME],\n disabledWebsockets: res.config.websocket[DOTCMS_DISABLE_WEBSOCKET_PROTOCOL]\n }\n };\n\n this.configParamsSubject.next(configParams);\n\n this.loggerService.debug('this.configParams', configParams);\n\n return res;\n });\n }\n\n /**\n * Return a list of timezones.\n * @returns Observable\n * @memberof DotcmsConfigService\n */\n getTimeZone(): Observable {\n return this.coreWebService\n .requestView({\n url: this.configUrl\n })\n .pipe(\n pluck('entity', 'config', 'timezones'),\n map((timezones: DotTimeZone[]) => {\n return timezones.sort((a: DotTimeZone, b: DotTimeZone) => {\n if (a.label > b.label) {\n return 1;\n }\n if (a.label < b.label) {\n return -1;\n }\n // a must be equal to b\n return 0;\n });\n })\n );\n }\n}\n", + "properties": [ + { + "name": "disabledWebsockets", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 47 + }, + { + "name": "websocketReconnectTime", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 48 + } + ], + "indexSignatures": [], + "kind": 165, + "methods": [] + } + ], + "injectables": [ + { + "name": "ActionService", + "id": "injectable-ActionService-09f927f186344068715fc15f76bfa8e1fe38ecdda21e56e6f92d2ed941e0dd1cc5d281265cff540afc4153767bb6861a4771503e17ab61b3b2338b7c15cbe469", + "file": "libs/dot-rules/src/lib/services/Action.ts", + "properties": [ + { + "name": "_actionsEndpointUrl", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 25, + "modifierKind": [121] + }, + { + "name": "_error", + "defaultValue": "new Subject()", + "deprecated": false, + "deprecationMessage": "", + "type": "Subject", + "optional": false, + "description": "", + "line": 27, + "modifierKind": [121] + }, + { + "name": "_typeName", + "defaultValue": "'Action'", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 23, + "modifierKind": [121] + } + ], + "methods": [ + { + "name": "_catchRequestError", + "args": [ + { + "name": "_operation", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 201, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "_operation", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "_getPath", + "args": [ + { + "name": "_ruleKey", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "key", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "optional": true + } + ], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 193, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "_ruleKey", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "key", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "all", + "args": [ + { + "name": "ruleKey", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "keys", + "type": "string[]", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "ruleActionTypes", + "type": "literal type", + "deprecated": false, + "deprecationMessage": "", + "optional": true + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 101, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "ruleKey", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "keys", + "type": "string[]", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "ruleActionTypes", + "type": "literal type", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "allAsArray", + "args": [ + { + "name": "ruleKey", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "keys", + "type": "string[]", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "ruleActionTypes", + "type": "literal type", + "deprecated": false, + "deprecationMessage": "", + "optional": true + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 88, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "ruleKey", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "keys", + "type": "string[]", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "ruleActionTypes", + "type": "literal type", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "createRuleAction", + "args": [ + { + "name": "ruleId", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "model", + "type": "ActionModel", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 127, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "ruleId", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "model", + "type": "ActionModel", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "fromJson", + "args": [ + { + "name": "type", + "type": "ServerSideTypeModel", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "json", + "type": "any", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "ActionModel", + "typeParameters": [], + "line": 33, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [124], + "jsdoctags": [ + { + "name": "type", + "type": "ServerSideTypeModel", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "json", + "type": "any", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "get", + "args": [ + { + "name": "_ruleKey", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "key", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "ruleActionTypes", + "type": "literal type", + "deprecated": false, + "deprecationMessage": "", + "optional": true + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 113, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "_ruleKey", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "key", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "ruleActionTypes", + "type": "literal type", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "makeRequest", + "args": [ + { + "name": "childPath", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "optional": true + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 58, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "childPath", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "remove", + "args": [ + { + "name": "ruleId", + "type": "", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "model", + "type": "ActionModel", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 179, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "ruleId", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "model", + "type": "ActionModel", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "toJson", + "args": [ + { + "name": "action", + "type": "ActionModel", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "any", + "typeParameters": [], + "line": 42, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [124], + "jsdoctags": [ + { + "name": "action", + "type": "ActionModel", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "updateRuleAction", + "args": [ + { + "name": "ruleId", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "model", + "type": "ActionModel", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 153, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "ruleId", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "model", + "type": "ActionModel", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "description": "", + "rawdescription": "\n", + "sourceCode": "import { from as observableFrom, empty as observableEmpty, Subject } from 'rxjs';\n\nimport { mergeMap, reduce, catchError, map } from 'rxjs/operators';\nimport { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { ApiRoot } from '@dotcms/dotcms-js';\nimport { ServerSideTypeModel } from './ServerSideFieldModel';\nimport { HttpResponse } from '@angular/common/http';\nimport { CoreWebService } from '@dotcms/dotcms-js';\nimport { ActionModel } from './Rule';\nimport {\n UNKNOWN_RESPONSE_ERROR,\n CwError,\n SERVER_RESPONSE_ERROR,\n NETWORK_CONNECTION_ERROR,\n CLIENTS_ONLY_MESSAGES\n} from '@dotcms/dotcms-js';\nimport { LoggerService } from '@dotcms/dotcms-js';\nimport { HttpCode } from '@dotcms/dotcms-js';\n\n@Injectable()\nexport class ActionService {\n private _typeName = 'Action';\n\n private _actionsEndpointUrl: string;\n\n private _error: Subject = new Subject();\n\n public get error(): Observable {\n return this._error.asObservable();\n }\n\n static fromJson(type: ServerSideTypeModel, json: any): ActionModel {\n const ra = new ActionModel(json.key, type, json.priority);\n Object.keys(json.parameters).forEach((key) => {\n const param = json.parameters[key];\n ra.setParameter(key, param.value);\n });\n return ra;\n }\n\n static toJson(action: ActionModel): any {\n const json: any = {};\n json.actionlet = action.type.key;\n json.priority = action.priority;\n json.parameters = action.parameters;\n return json;\n }\n\n constructor(\n apiRoot: ApiRoot,\n private coreWebService: CoreWebService,\n private loggerService: LoggerService\n ) {\n this._actionsEndpointUrl = `/api/v1/sites/${apiRoot.siteId}/ruleengine/actions/`;\n }\n\n makeRequest(childPath?: string): Observable {\n let path = this._actionsEndpointUrl;\n if (childPath) {\n path = `${path}${childPath}`;\n }\n return this.coreWebService\n .request({\n url: path\n })\n .pipe(\n catchError((err: any, _source: Observable) => {\n if (err && err.status === HttpCode.NOT_FOUND) {\n this.loggerService.error(\n 'Could not retrieve ' + this._typeName + ' : 404 path not valid.',\n path\n );\n } else if (err) {\n this.loggerService.debug(\n 'Could not retrieve' + this._typeName + ': Response status code: ',\n err.status,\n 'error:',\n err,\n path\n );\n }\n return observableEmpty();\n })\n );\n }\n\n allAsArray(\n ruleKey: string,\n keys: string[],\n ruleActionTypes?: { [key: string]: ServerSideTypeModel }\n ): Observable {\n return this.all(ruleKey, keys, ruleActionTypes).pipe(\n reduce((acc: ActionModel[], item: ActionModel) => {\n acc.push(item);\n return acc;\n }, [])\n );\n }\n\n all(\n ruleKey: string,\n keys: string[],\n ruleActionTypes?: { [key: string]: ServerSideTypeModel }\n ): Observable {\n return observableFrom(keys).pipe(\n mergeMap((groupKey) => {\n return this.get(ruleKey, groupKey, ruleActionTypes);\n })\n );\n }\n\n get(\n _ruleKey: string,\n key: string,\n ruleActionTypes?: { [key: string]: ServerSideTypeModel }\n ): Observable {\n return this.makeRequest(key).pipe(\n map((json: any) => {\n json.id = key;\n json.key = key;\n return ActionService.fromJson(ruleActionTypes[json.actionlet], json);\n })\n );\n }\n\n createRuleAction(ruleId: string, model: ActionModel): Observable {\n this.loggerService.debug('Action', 'add', model);\n if (!model.isValid()) {\n throw new Error(`This should be thrown from a checkValid function on the model,\nand should provide the info needed to make the user aware of the fix.`);\n }\n const json = ActionService.toJson(model);\n json.owningRule = ruleId;\n const path = this._getPath(ruleId);\n\n const add = this.coreWebService\n .request({\n method: 'POST',\n body: json,\n url: path\n })\n .pipe(\n map((res: HttpResponse) => {\n const json: any = res;\n model.key = json.id;\n return model;\n })\n );\n return add.pipe(catchError(this._catchRequestError('add')));\n }\n\n updateRuleAction(ruleId: string, model: ActionModel): Observable {\n this.loggerService.debug('actionService', 'save');\n if (!model.isValid()) {\n throw new Error(`This should be thrown from a checkValid function on the model,\n and should provide the info needed to make the user aware of the fix.`);\n }\n if (!model.isPersisted()) {\n this.createRuleAction(ruleId, model);\n } else {\n const json = ActionService.toJson(model);\n json.owningRule = ruleId;\n const save = this.coreWebService\n .request({\n method: 'PUT',\n body: json,\n url: this._getPath(ruleId, model.key)\n })\n .pipe(\n map((_res: HttpResponse) => {\n return model;\n })\n );\n return save.pipe(catchError(this._catchRequestError('save')));\n }\n }\n\n remove(ruleId, model: ActionModel): Observable {\n const remove = this.coreWebService\n .request({\n method: 'DELETE',\n url: this._getPath(ruleId, model.key)\n })\n .pipe(\n map((_res: HttpResponse) => {\n return model;\n })\n );\n return remove.pipe(catchError(this._catchRequestError('remove')));\n }\n\n private _getPath(_ruleKey: string, key?: string): string {\n let p = this._actionsEndpointUrl;\n if (key) {\n p = p + key;\n }\n return p;\n }\n\n private _catchRequestError(\n _operation\n ): (response: HttpResponse, original: Observable) => Observable {\n return (response: HttpResponse): Observable => {\n if (response) {\n if (response.status === HttpCode.SERVER_ERROR) {\n if (response.body && response.body.indexOf('ECONNREFUSED') >= 0) {\n throw new CwError(\n NETWORK_CONNECTION_ERROR,\n CLIENTS_ONLY_MESSAGES[NETWORK_CONNECTION_ERROR]\n );\n } else {\n throw new CwError(\n SERVER_RESPONSE_ERROR,\n response.headers.get('error-message')\n );\n }\n } else if (response.status === HttpCode.NOT_FOUND) {\n this.loggerService.error('Could not execute request: 404 path not valid.');\n throw new CwError(\n UNKNOWN_RESPONSE_ERROR,\n response.headers.get('error-message')\n );\n } else {\n this.loggerService.debug(\n 'Could not execute request: Response status code: ',\n response.status,\n 'error:',\n response\n );\n\n this._error.next(\n response.body.error.replace('dotcms.api.error.forbidden: ', '')\n );\n\n throw new CwError(\n UNKNOWN_RESPONSE_ERROR,\n response.headers.get('error-message')\n );\n }\n }\n return null;\n };\n }\n}\n", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "apiRoot", + "type": "ApiRoot", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "coreWebService", + "type": "CoreWebService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "loggerService", + "type": "LoggerService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 48, + "jsdoctags": [ + { + "name": "apiRoot", + "type": "ApiRoot", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "coreWebService", + "type": "CoreWebService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "loggerService", + "type": "LoggerService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "accessors": { + "error": { + "name": "error", + "getSignature": { + "name": "error", + "type": "", + "returnType": "Observable", + "line": 29 + } + } + }, + "type": "injectable" + }, + { + "name": "AddToBundleService", + "id": "injectable-AddToBundleService-0d0ed0c83425cb27fb8d4f4297c5f5e550624d5ba8f15634416ff9d56670901165724a6e2ac179834e0583aa43553570b88dceb65f13dfefd88bd76324efc6e9", + "file": "apps/dotcms-ui/src/app/api/services/add-to-bundle/add-to-bundle.service.ts", + "properties": [ + { + "name": "addToBundleUrl", + "defaultValue": "`/DotAjaxDirector/com.dotcms.publisher.ajax.RemotePublishAjaxAction/cmd/addToBundle`", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 17, + "modifierKind": [121] + }, + { + "name": "bundleUrl", + "defaultValue": "`api/bundle/getunsendbundles/userid`", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 12, + "modifierKind": [121] + } + ], + "methods": [ + { + "name": "addToBundle", + "args": [ + { + "name": "assetIdentifier", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "bundleData", + "type": "DotBundle", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 48, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nAdd to bundle asset with specified name and id\n", + "description": "

Add to bundle asset with specified name and id

\n", + "jsdoctags": [ + { + "name": "assetIdentifier", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "bundleData", + "type": "DotBundle", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "tagName": { + "pos": 1695, + "end": 1702, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "returns" + }, + "comment": "

Observable

\n" + } + ] + }, + { + "name": "getBundles", + "args": [], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 29, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nGet bundle items\n", + "description": "

Get bundle items

\n", + "jsdoctags": [ + { + "tagName": { + "pos": 1086, + "end": 1093, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "returns" + }, + "comment": "

Observable<any[]>

\n" + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "description": "", + "rawdescription": "\n", + "sourceCode": "import { pluck, mergeMap, map } from 'rxjs/operators';\nimport { CoreWebService } from '@dotcms/dotcms-js';\nimport { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { DotCurrentUser } from '@models/dot-current-user/dot-current-user';\nimport { DotBundle } from '@models/dot-bundle/dot-bundle';\nimport { DotCurrentUserService } from '../dot-current-user/dot-current-user.service';\nimport { DotAjaxActionResponseView } from '@shared/models/ajax-action-response/dot-ajax-action-response';\n\n@Injectable()\nexport class AddToBundleService {\n private bundleUrl = `api/bundle/getunsendbundles/userid`;\n /*\n TODO: I had to do this because this line concat 'api/' into the URL\n https://github.com/dotCMS/dotcms-js/blob/master/src/core/core-web.service.ts#L169\n */\n private addToBundleUrl = `/DotAjaxDirector/com.dotcms.publisher.ajax.RemotePublishAjaxAction/cmd/addToBundle`;\n\n constructor(\n private coreWebService: CoreWebService,\n private currentUser: DotCurrentUserService\n ) {}\n\n /**\n * Get bundle items\n * @returns Observable\n * @memberof AddToBundleService\n */\n getBundles(): Observable {\n return this.currentUser.getCurrentUser().pipe(\n mergeMap((user: DotCurrentUser) => {\n return this.coreWebService\n .requestView({\n url: `${this.bundleUrl}/${user.userId}`\n })\n .pipe(pluck('bodyJsonObject', 'items'));\n })\n );\n }\n\n /**\n * Add to bundle asset with specified name and id\n * @param string ruleId\n * @param DotBundle bundleData\n * @returns Observable\n * @memberof AddToBundleService\n */\n addToBundle(\n assetIdentifier: string,\n bundleData: DotBundle\n ): Observable {\n return this.coreWebService\n .request({\n body: `assetIdentifier=${assetIdentifier}&bundleName=${bundleData.name}&bundleSelect=${bundleData.id}`,\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded'\n },\n method: 'POST',\n url: this.addToBundleUrl\n })\n .pipe(map((res: any) => res));\n }\n}\n", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "coreWebService", + "type": "CoreWebService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "currentUser", + "type": "DotCurrentUserService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 17, + "jsdoctags": [ + { + "name": "coreWebService", + "type": "CoreWebService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "currentUser", + "type": "DotCurrentUserService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "type": "injectable" + }, + { + "name": "ApiRoot", + "id": "injectable-ApiRoot-a4bc5336750af2910eaa9b5cbb9a3350d9f5f2a2b29b1f557b3de1dfe9e3c4136a5856ec13d2db2aeee9465f953f6f3fca2feb151ccd5dd4859c8388d4ff2ff9", + "file": "libs/dotcms-js/src/lib/core/api-root.service.ts", + "properties": [ + { + "name": "authUser", + "deprecated": false, + "deprecationMessage": "", + "type": "UserModel", + "optional": false, + "description": "", + "line": 8 + }, + { + "name": "hideFireOn", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 9 + }, + { + "name": "hideRulePushOptions", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 10 + }, + { + "name": "siteId", + "defaultValue": "'48190c8c-42c4-46af-8d1a-0cd5db894797'", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 7 + } + ], + "methods": [ + { + "name": "configureUser", + "args": [ + { + "name": "query", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "user", + "type": "UserModel", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 62, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "query", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "user", + "type": "UserModel", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "parseQueryParam", + "args": [ + { + "name": "query", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "token", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 12, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [124], + "jsdoctags": [ + { + "name": "query", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "token", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "description": "", + "rawdescription": "\n", + "sourceCode": "import { Injectable } from '@angular/core';\nimport { UserModel } from './shared/user.model';\nimport { LoggerService } from './logger.service';\n\n@Injectable()\nexport class ApiRoot {\n siteId = '48190c8c-42c4-46af-8d1a-0cd5db894797';\n authUser: UserModel;\n hideFireOn = false;\n hideRulePushOptions = false;\n\n static parseQueryParam(query: string, token: string): string {\n let idx = -1;\n let result = null;\n token = token + '=';\n if (query && query.length) {\n idx = query.indexOf(token);\n }\n if (idx >= 0) {\n let end = query.indexOf('&', idx);\n end = end !== -1 ? end : query.length;\n result = query.substring(idx + token.length, end);\n }\n\n return result;\n }\n\n constructor(authUser: UserModel, private loggerService: LoggerService) {\n this.authUser = authUser;\n\n try {\n let query = document.location.search.substring(1);\n if (query === '') {\n if (document.location.hash.indexOf('?') >= 0) {\n query = document.location.hash.substr(document.location.hash.indexOf('?') + 1);\n }\n }\n const siteId = ApiRoot.parseQueryParam(query, 'realmId');\n if (siteId) {\n this.siteId = siteId;\n this.loggerService.debug('Site Id set to ', this.siteId);\n }\n const hideFireOn = ApiRoot.parseQueryParam(query, 'hideFireOn');\n if (hideFireOn) {\n this.hideFireOn = hideFireOn === 'true' || hideFireOn === '1';\n this.loggerService.debug('hideFireOn set to ', this.hideFireOn);\n }\n\n const hideRulePushOptions = ApiRoot.parseQueryParam(query, 'hideRulePushOptions');\n if (hideRulePushOptions) {\n this.hideRulePushOptions =\n hideRulePushOptions === 'true' || hideRulePushOptions === '1';\n this.loggerService.debug('hideRulePushOptions set to ', this.hideRulePushOptions);\n }\n\n this.configureUser(query, authUser);\n } catch (e) {\n this.loggerService.error('Could not set baseUrl automatically.', e);\n }\n }\n\n private configureUser(query: string, user: UserModel): void {\n user.suppressAlerts = ApiRoot.parseQueryParam(query, 'suppressAlerts') === 'true';\n }\n}\n", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "authUser", + "type": "UserModel", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "loggerService", + "type": "LoggerService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 26, + "jsdoctags": [ + { + "name": "authUser", + "type": "UserModel", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "loggerService", + "type": "LoggerService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "type": "injectable" + }, + { + "name": "AppConfig", + "id": "injectable-AppConfig-beef521c3158535ddb4c1c4e609cf92b7585f5a334aa28fb4e3f2be6ba8c0c798e7aa219812c93ac9a37d831b1bd5f06d3dc9430d5fee0925aaf2b9d11eac95e", + "file": "libs/dotcms-js/src/lib/core/util/app.config.ts", + "properties": [ + { + "name": "dotCMSURLKey", + "defaultValue": "'siteURLJWT'", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 9, + "modifierKind": [123] + }, + { + "name": "iconPath", + "defaultValue": "'./src/assets/images/icons'", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 8, + "modifierKind": [123] + } + ], + "methods": [], + "deprecated": false, + "deprecationMessage": "", + "description": "

Configuration class for dotcms-js. You can extend this class to overide one to many config options and inject\nthe your AppConfig in the app.module ts file of your application

\n", + "rawdescription": "\n\nConfiguration class for dotcms-js. You can extend this class to overide one to many config options and inject\nthe your AppConfig in the app.module ts file of your application\n", + "sourceCode": "import { Injectable } from '@angular/core';\n/**\n * Configuration class for dotcms-js. You can extend this class to overide one to many config options and inject\n * the your AppConfig in the app.module ts file of your application\n */\n@Injectable()\nexport class AppConfig {\n public iconPath = './src/assets/images/icons';\n public dotCMSURLKey = 'siteURLJWT';\n constructor() {}\n}\n", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [], + "line": 9 + }, + "type": "injectable" + }, + { + "name": "BrowserUtil", + "id": "injectable-BrowserUtil-5527726e224c1fab1d86d881c05bcd0942a63cf94b1b8288f31539b268253cdd28843365301ebb8962d5e3b19ba2f11a8fa23c03e47ece5d08b7a6750c3f1480", + "file": "libs/dotcms-js/src/lib/core/browser-util.service.ts", + "properties": [], + "methods": [ + { + "name": "isIE11", + "args": [], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 11, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [123] + } + ], + "deprecated": true, + "deprecationMessage": "We don't support IE11 anymore", + "description": "

Check if the browser is ie11

\n", + "rawdescription": "\n\nCheck if the browser is ie11\n\n", + "sourceCode": "import { Injectable } from '@angular/core';\n/**\n * Check if the browser is ie11\n *\n * @export\n * @class BrowserUtil\n * @deprecated We don't support IE11 anymore\n */\n@Injectable()\nexport class BrowserUtil {\n public isIE11(): boolean {\n return navigator.appName === 'Netscape' && navigator.appVersion.indexOf('Trident') !== -1;\n }\n}\n", + "type": "injectable" + }, + { + "name": "BundleService", + "id": "injectable-BundleService-4b4c8c40cbcf13889b0ee16d476b439a59d09a7ea941fff2fa3b376392ea5d9cd91ccd9216cdb1627daede19b441c5eb7e25c07b1b492cdfb9ac9280c252bbfa", + "file": "libs/dot-rules/src/lib/services/bundle-service.ts", + "properties": [ + { + "name": "_addToBundleUrl", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 33, + "modifierKind": [121] + }, + { + "name": "_apiRoot", + "deprecated": false, + "deprecationMessage": "", + "type": "ApiRoot", + "optional": false, + "description": "", + "line": 48, + "modifierKind": [123] + }, + { + "name": "_bundleStoreUrl", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 31, + "modifierKind": [121] + }, + { + "name": "_environmentsAry", + "defaultValue": "[]", + "deprecated": false, + "deprecationMessage": "", + "type": "IPublishEnvironment[]", + "optional": false, + "description": "", + "line": 36, + "modifierKind": [121] + }, + { + "name": "_loggedUserUrl", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 32, + "modifierKind": [121] + }, + { + "name": "_pushEnvironementsUrl", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 34, + "modifierKind": [121] + }, + { + "name": "_pushRuleUrl", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 35, + "modifierKind": [121] + }, + { + "name": "bundles$", + "defaultValue": "new Subject()", + "deprecated": false, + "deprecationMessage": "", + "type": "Subject", + "optional": false, + "description": "", + "line": 29 + } + ], + "methods": [ + { + "name": "_doLoadBundleStores", + "args": [], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 80, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "_doLoadPublishEnvironments", + "args": [], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 107, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "addRuleToBundle", + "args": [ + { + "name": "ruleId", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "bundle", + "type": "IBundle", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 119, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "ruleId", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "bundle", + "type": "IBundle", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "fromServerBundleTransformFn", + "args": [ + { + "name": "data", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "IBundle[]", + "typeParameters": [], + "line": 38, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [124], + "jsdoctags": [ + { + "name": "data", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "fromServerEnvironmentTransformFn", + "args": [ + { + "name": "data", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "IPublishEnvironment[]", + "typeParameters": [], + "line": 42, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [124], + "jsdoctags": [ + { + "name": "data", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getFormattedDate", + "args": [ + { + "name": "date", + "type": "Date", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 167, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "date", + "type": "Date", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getLoggedUser", + "args": [], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 63, + "deprecated": true, + "deprecationMessage": "use getCurrentUser in LoginService", + "rawdescription": "\n\nGet current logged in user\n\n", + "description": "

Get current logged in user

\n", + "jsdoctags": [ + { + "tagName": { + "pos": 1765, + "end": 1771, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "originalKeywordKind": 105, + "escapedText": "return" + }, + "comment": "

{Observable}

\n", + "returnType": "" + } + ] + }, + { + "name": "getPublishRuleData", + "args": [ + { + "name": "ruleId", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "environmentId", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 174, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "ruleId", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "environmentId", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "loadBundleStores", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 71, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "loadPublishEnvironments", + "args": [], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 92, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "pushPublishRule", + "args": [ + { + "name": "ruleId", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "environmentId", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 140, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "ruleId", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "environmentId", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "description": "", + "rawdescription": "\n", + "sourceCode": "import { of as observableOf, Observable, Subject } from 'rxjs';\n\nimport { map, mergeMap } from 'rxjs/operators';\nimport { Injectable } from '@angular/core';\n\nimport { ApiRoot } from '@dotcms/dotcms-js';\nimport { CoreWebService } from '@dotcms/dotcms-js';\nimport { HttpResponse } from '@angular/common/http';\n\nexport interface IUser {\n givenName?: string;\n surname?: string;\n roleId?: string;\n userId?: string;\n}\n\nexport interface IBundle {\n name?: string;\n id?: string;\n}\n\nexport interface IPublishEnvironment {\n name?: string;\n id?: string;\n}\n\n@Injectable()\nexport class BundleService {\n bundles$: Subject = new Subject();\n\n private _bundleStoreUrl: string;\n private _loggedUserUrl: string;\n private _addToBundleUrl: string;\n private _pushEnvironementsUrl: string;\n private _pushRuleUrl: string;\n private _environmentsAry: IPublishEnvironment[] = [];\n\n static fromServerBundleTransformFn(data): IBundle[] {\n return data.items || [];\n }\n\n static fromServerEnvironmentTransformFn(data): IPublishEnvironment[] {\n // Endpoint return extra empty environment\n data.shift();\n return data;\n }\n\n constructor(public _apiRoot: ApiRoot, private coreWebService: CoreWebService) {\n this._bundleStoreUrl = `/api/bundle/getunsendbundles/userid`;\n this._loggedUserUrl = `/api/v1/users/current/`;\n this._addToBundleUrl = `/DotAjaxDirector/com.dotcms.publisher.ajax.RemotePublishAjaxAction/cmd/addToBundle`;\n this._pushEnvironementsUrl = `/api/environment/loadenvironments/roleId`;\n this._pushRuleUrl = `/DotAjaxDirector/com.dotcms.publisher.ajax.RemotePublishAjaxAction/cmd/publish`;\n }\n\n /**\n * Get current logged in user\n *\n * @return {*} {Observable}\n * @memberof BundleService\n * @deprecated use getCurrentUser in LoginService\n */\n getLoggedUser(): Observable {\n return this.coreWebService\n .request({\n url: this._loggedUserUrl\n })\n .pipe(map((res: HttpResponse) => res));\n }\n\n loadBundleStores(): void {\n const obs = this._doLoadBundleStores().pipe(\n map((bundles: IBundle[]) => {\n return bundles;\n })\n );\n obs.subscribe((bundles) => this.bundles$.next(bundles));\n }\n\n _doLoadBundleStores(): Observable {\n return this.getLoggedUser().pipe(\n mergeMap((user: IUser) => {\n return this.coreWebService\n .request({\n url: `${this._bundleStoreUrl}/${user.userId}`\n })\n .pipe(map(BundleService.fromServerBundleTransformFn));\n })\n );\n }\n\n loadPublishEnvironments(): Observable {\n let obs: Observable;\n if (this._environmentsAry.length) {\n obs = observableOf(this._environmentsAry);\n } else {\n obs = this._doLoadPublishEnvironments().pipe(\n map((environments: IPublishEnvironment[]) => {\n this._environmentsAry = environments;\n return environments;\n })\n );\n }\n return obs;\n }\n\n _doLoadPublishEnvironments(): Observable {\n return this.getLoggedUser().pipe(\n mergeMap((user: IUser) => {\n return this.coreWebService\n .request({\n url: `${this._pushEnvironementsUrl}/${user.roleId}/?name=0`\n })\n .pipe(map(BundleService.fromServerEnvironmentTransformFn));\n })\n );\n }\n\n addRuleToBundle(\n ruleId: string,\n bundle: IBundle\n ): Observable<{ errorMessages: string[]; total: number; errors: number }> {\n return this.coreWebService\n .request({\n body: `assetIdentifier=${ruleId}&bundleName=${bundle.name}&bundleSelect=${bundle.id}`,\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded'\n },\n method: 'POST',\n url: this._addToBundleUrl\n })\n .pipe(\n map(\n (res: HttpResponse) =>\n <{ errorMessages: string[]; total: number; errors: number }>(res)\n )\n );\n }\n\n pushPublishRule(\n ruleId: string,\n environmentId: string\n ): Observable<{ errorMessages: string[]; total: number; bundleId: string; errors: number }> {\n return this.coreWebService\n .request({\n body: this.getPublishRuleData(ruleId, environmentId),\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded'\n },\n method: 'POST',\n url: this._pushRuleUrl\n })\n .pipe(\n map(\n (res: HttpResponse) => <\n {\n errorMessages: string[];\n total: number;\n bundleId: string;\n errors: number;\n }\n >(res)\n )\n );\n }\n\n private getFormattedDate(date: Date): string {\n const yyyy = date.getFullYear().toString();\n const mm = (date.getMonth() + 1).toString();\n const dd = date.getDate().toString();\n return yyyy + '-' + (mm[1] ? mm : '0' + mm[0]) + '-' + (dd[1] ? dd : '0' + dd[0]);\n }\n\n private getPublishRuleData(ruleId: string, environmentId: string): string {\n let resul = '';\n resul += `assetIdentifier=${ruleId}`;\n resul += `&remotePublishDate=${this.getFormattedDate(new Date())}`;\n resul += '&remotePublishTime=00-00';\n resul += `&remotePublishExpireDate=${this.getFormattedDate(new Date())}`;\n resul += '&remotePublishExpireTime=00-00';\n resul += '&iWantTo=publish';\n resul += `&whoToSend=${environmentId}`;\n resul += '&bundleName=';\n resul += '&bundleSelect=';\n resul += '&forcePush=false';\n return resul;\n }\n}\n", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "_apiRoot", + "type": "ApiRoot", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "coreWebService", + "type": "CoreWebService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 46, + "jsdoctags": [ + { + "name": "_apiRoot", + "type": "ApiRoot", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "coreWebService", + "type": "CoreWebService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "type": "injectable" + }, + { + "name": "ColorUtil", + "id": "injectable-ColorUtil-7fdbe2973eb5d9e2865f78e86386460b225a12a507e7f6778f12e79a43aea7e3a7a5b5936886d2ae3069ac77cbce21e562008f6d2e296026dcb5b37262feb54b", + "file": "apps/dotcms-ui/src/app/api/util/ColorUtil.ts", + "properties": [], + "methods": [ + { + "name": "getBrightness", + "args": [ + { + "name": "color", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "number", + "typeParameters": [], + "line": 15, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nCheck color brightness.\n\nSee http://www.webmasterworld.com/forum88/9769.htm\n", + "description": "

Check color brightness.

\n

See http://www.webmasterworld.com/forum88/9769.htm

\n", + "modifierKind": [123], + "jsdoctags": [ + { + "name": { + "pos": 192, + "end": 197, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "color" + }, + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 186, + "end": 191, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "

color to check, it could be in hex or rgb format

\n" + }, + { + "tagName": { + "pos": 255, + "end": 261, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "originalKeywordKind": 105, + "escapedText": "return" + }, + "comment": "

brightness value from 0 to 255, where 255 is brigthest.

\n" + } + ] + }, + { + "name": "hex", + "args": [ + { + "name": "x", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 54, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "x", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "isBrightness", + "args": [ + { + "name": "color", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 37, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nReturn true if hexCode is a bright color\n", + "description": "

Return true if hexCode is a bright color

\n", + "modifierKind": [123], + "jsdoctags": [ + { + "name": { + "pos": 957, + "end": 962, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "color" + }, + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 951, + "end": 956, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "

color to check, it could be in hex or rgb format

\n" + } + ] + }, + { + "name": "rgb2hex", + "args": [ + { + "name": "rgb", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 45, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nConvert RGB color format to hex color format, for example, if you have rgb(0,0,0) return #000\nSee http://stackoverflow.com/questions/1740700/get-hex-value-rather-than-rgb-value-using-jquery\n", + "description": "

Convert RGB color format to hex color format, for example, if you have rgb(0,0,0) return #000\nSee http://stackoverflow.com/questions/1740700/get-hex-value-rather-than-rgb-value-using-jquery

\n", + "modifierKind": [123], + "jsdoctags": [ + { + "name": "rgb", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "description": "

Miscellaneous Color utility methods.

\n", + "rawdescription": "\n\nMiscellaneous Color utility methods.\n", + "sourceCode": "import { Injectable } from '@angular/core';\n\n/**\n * Miscellaneous Color utility methods.\n */\n@Injectable()\nexport class ColorUtil {\n /**\n * Check color brightness.\n *\n * @param color color to check, it could be in hex or rgb format\n * @return brightness value from 0 to 255, where 255 is brigthest.\n * @see http://www.webmasterworld.com/forum88/9769.htm\n */\n public getBrightness(color): number {\n const isHexCode = color.indexOf('#') !== -1;\n\n if (isHexCode) {\n // strip off any leading #\n color = color.replace('#', '');\n } else {\n color = this.rgb2hex(color);\n }\n\n const c_r = parseInt(color.substr(0, 2), 16);\n const c_g = parseInt(color.substr(2, 2), 16);\n const c_b = parseInt(color.substr(4, 2), 16);\n\n return (c_r * 299 + c_g * 587 + c_b * 114) / 1000;\n }\n\n /**\n * Return true if hexCode is a bright color\n * @param color color to check, it could be in hex or rgb format\n */\n\n public isBrightness(color): boolean {\n return this.getBrightness(color) > 138;\n }\n\n /**\n * Convert RGB color format to hex color format, for example, if you have rgb(0,0,0) return #000\n * @see http://stackoverflow.com/questions/1740700/get-hex-value-rather-than-rgb-value-using-jquery\n */\n public rgb2hex(rgb): string {\n if (rgb.search('rgb') === -1) {\n return rgb;\n } else {\n rgb = rgb.match(/^rgba?\\((\\d+),\\s*(\\d+),\\s*(\\d+)(?:,\\s*(\\d+(\\.\\d+)?))?\\)$/);\n return '#' + this.hex(rgb[1]) + this.hex(rgb[2]) + this.hex(rgb[3]);\n }\n }\n\n private hex(x: string): string {\n return ('0' + parseInt(x, 10).toString(16)).slice(-2);\n }\n}\n", + "type": "injectable" + }, + { + "name": "ConditionGroupService", + "id": "injectable-ConditionGroupService-648c87150925b839aa1f3ce05264b24d796fd011ce1542758d64ce60a7b0553dc5a798cdc74ce0393f25ec6882d71f81be7753ed3c98240ae76fd0711319685c", + "file": "libs/dot-rules/src/lib/services/ConditionGroup.ts", + "properties": [ + { + "name": "_baseUrl", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 19, + "modifierKind": [121] + }, + { + "name": "_error", + "defaultValue": "new Subject()", + "deprecated": false, + "deprecationMessage": "", + "type": "Subject", + "optional": false, + "description": "", + "line": 21, + "modifierKind": [121] + }, + { + "name": "_typeName", + "defaultValue": "'Condition Group'", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 17, + "modifierKind": [121] + } + ], + "methods": [ + { + "name": "_catchRequestError", + "args": [ + { + "name": "operation", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Func", + "typeParameters": [], + "line": 187, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "operation", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "_getPath", + "args": [ + { + "name": "ruleKey", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "key", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "optional": true + } + ], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 179, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "ruleKey", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "key", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "all", + "args": [ + { + "name": "ruleKey", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "keys", + "type": "string[]", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 79, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "ruleKey", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "keys", + "type": "string[]", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "allAsArray", + "args": [ + { + "name": "ruleKey", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "keys", + "type": "string[]", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 87, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "ruleKey", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "keys", + "type": "string[]", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "createConditionGroup", + "args": [ + { + "name": "ruleId", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "model", + "type": "ConditionGroupModel", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 112, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "ruleId", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "model", + "type": "ConditionGroupModel", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "get", + "args": [ + { + "name": "ruleKey", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "key", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 96, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "ruleKey", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "key", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "makeRequest", + "args": [ + { + "name": "path", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 48, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "path", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "remove", + "args": [ + { + "name": "ruleId", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "model", + "type": "ConditionGroupModel", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 165, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "ruleId", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "model", + "type": "ConditionGroupModel", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "toJson", + "args": [ + { + "name": "conditionGroup", + "type": "ConditionGroupModel", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "any", + "typeParameters": [], + "line": 31, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [124], + "jsdoctags": [ + { + "name": "conditionGroup", + "type": "ConditionGroupModel", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "toJsonList", + "args": [ + { + "name": "models", + "type": "literal type", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "any", + "typeParameters": [], + "line": 40, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [124], + "jsdoctags": [ + { + "name": "models", + "type": "literal type", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "updateConditionGroup", + "args": [ + { + "name": "ruleId", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "model", + "type": "ConditionGroupModel", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 137, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "ruleId", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "model", + "type": "ConditionGroupModel", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "description": "", + "rawdescription": "\n", + "sourceCode": "import { from as observableFrom, empty as observableEmpty, Subject } from 'rxjs';\n\nimport { reduce, mergeMap, catchError, map, tap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport { HttpResponse } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { ApiRoot } from '@dotcms/dotcms-js';\nimport { ConditionGroupModel, IConditionGroup } from './Rule';\nimport { HttpCode } from '@dotcms/dotcms-js';\nimport { CoreWebService, LoggerService } from '@dotcms/dotcms-js';\n\n@Injectable()\nexport class ConditionGroupService {\n public get error(): Observable {\n return this._error.asObservable();\n }\n private _typeName = 'Condition Group';\n\n private _baseUrl: string;\n\n private _error: Subject = new Subject();\n\n constructor(\n apiRoot: ApiRoot,\n private coreWebService: CoreWebService,\n private loggerService: LoggerService\n ) {\n this._baseUrl = '/api/v1/sites/' + apiRoot.siteId + '/ruleengine/rules';\n }\n\n static toJson(conditionGroup: ConditionGroupModel): any {\n const json: any = {};\n json.id = conditionGroup.key;\n json.operator = conditionGroup.operator;\n json.priority = conditionGroup.priority;\n json.conditions = conditionGroup.conditions;\n return json;\n }\n\n static toJsonList(models: { [key: string]: ConditionGroupModel }): any {\n const list = {};\n Object.keys(models).forEach((key) => {\n list[key] = ConditionGroupService.toJson(models[key]);\n });\n return list;\n }\n\n makeRequest(path: string): Observable {\n return this.coreWebService\n .request({\n url: path\n })\n .pipe(\n map((res: HttpResponse) => {\n const json = res;\n this.loggerService.info('ConditionGroupService', 'makeRequest-Response', json);\n return json;\n }),\n catchError((err: any, _source: Observable) => {\n if (err && err.status === HttpCode.NOT_FOUND) {\n this.loggerService.error(\n 'Could not retrieve ' + this._typeName + ' : 404 path not valid.',\n path\n );\n } else if (err) {\n this.loggerService.info(\n 'Could not retrieve' + this._typeName + ': Response status code: ',\n err.status,\n 'error:',\n err,\n path\n );\n }\n return observableEmpty();\n })\n );\n }\n\n all(ruleKey: string, keys: string[]): Observable {\n return observableFrom(keys).pipe(\n mergeMap((groupKey) => {\n return this.get(ruleKey, groupKey);\n })\n );\n }\n\n allAsArray(ruleKey: string, keys: string[]): Observable {\n return this.all(ruleKey, keys).pipe(\n reduce((acc: ConditionGroupModel[], group: ConditionGroupModel) => {\n acc.push(group);\n return acc;\n }, [])\n );\n }\n\n get(ruleKey: string, key: string): Observable {\n let result: Observable;\n result = this.makeRequest(this._getPath(ruleKey, key)).pipe(\n map((json: IConditionGroup) => {\n json.id = key;\n this.loggerService.info(\n 'ConditionGroupService',\n 'creatingConditionGroupFromJson≠≠'\n );\n return new ConditionGroupModel(json);\n })\n );\n\n return result;\n }\n\n createConditionGroup(ruleId: string, model: ConditionGroupModel): Observable {\n this.loggerService.info('ConditionGroupService', 'add', model);\n if (!model.isValid()) {\n throw new Error(`This should be thrown from a checkValid function on the model,\n and should provide the info needed to make the user aware of the fix`);\n }\n const json = ConditionGroupService.toJson(model);\n const path = this._getPath(ruleId);\n\n const add = this.coreWebService\n .request({\n method: 'POST',\n body: json,\n url: path\n })\n .pipe(\n map((res: HttpResponse) => {\n const json: any = res;\n model.key = json.id;\n return model;\n })\n );\n return add.pipe(catchError(this._catchRequestError('add')));\n }\n\n updateConditionGroup(\n ruleId: string,\n model: ConditionGroupModel\n ): Observable {\n this.loggerService.info('ConditionGroupService', 'save');\n if (!model.isValid()) {\n throw new Error(`This should be thrown from a checkValid function on the model,\n and should provide the info needed to make the user aware of the fix.`);\n }\n if (!model.isPersisted()) {\n this.createConditionGroup(ruleId, model);\n } else {\n const json = ConditionGroupService.toJson(model);\n const save = this.coreWebService\n .request({\n method: 'PUT',\n body: json,\n url: this._getPath(ruleId, model.key)\n })\n .pipe(\n tap(() => {\n return model;\n })\n );\n return save.pipe(catchError(this._catchRequestError('save')));\n }\n }\n\n remove(ruleId: string, model: ConditionGroupModel): Observable {\n const remove = this.coreWebService\n .request({\n method: 'DELETE',\n url: this._getPath(ruleId, model.key)\n })\n .pipe(\n tap(() => {\n return model;\n })\n );\n return remove.pipe(catchError(this._catchRequestError('remove')));\n }\n\n private _getPath(ruleKey: string, key?: string): string {\n let p = this._baseUrl + '/' + ruleKey + '/conditionGroups/';\n if (key) {\n p = p + key;\n }\n return p;\n }\n\n private _catchRequestError(operation): Func {\n return (err: any) => {\n if (err && err.status === HttpCode.NOT_FOUND) {\n this.loggerService.info('Could not ' + operation + ' Condition: URL not valid.');\n } else if (err) {\n this.loggerService.info(\n 'Could not ' + operation + ' Condition.',\n 'response status code: ',\n err.status,\n 'error:',\n err\n );\n }\n\n this._error.next(err.json().error.replace('dotcms.api.error.forbidden: ', ''));\n return observableEmpty();\n };\n }\n}\n\ntype Func = (any) => Observable;\n", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "apiRoot", + "type": "ApiRoot", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "coreWebService", + "type": "CoreWebService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "loggerService", + "type": "LoggerService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 21, + "jsdoctags": [ + { + "name": "apiRoot", + "type": "ApiRoot", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "coreWebService", + "type": "CoreWebService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "loggerService", + "type": "LoggerService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "accessors": { + "error": { + "name": "error", + "getSignature": { + "name": "error", + "type": "", + "returnType": "Observable", + "line": 14 + } + } + }, + "type": "injectable" + }, + { + "name": "ConditionService", + "id": "injectable-ConditionService-1c948f574b7c7899ba7996926ed4008b9cf88b47e6ccb33083f586070d5431da7f872c48b0bc55daf17c4f16f20e95c5583275a3828cb6319c2e184a5eacd62f", + "file": "libs/dot-rules/src/lib/services/Condition.ts", + "properties": [ + { + "name": "_baseUrl", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 20, + "modifierKind": [121] + }, + { + "name": "_error", + "defaultValue": "new Subject()", + "deprecated": false, + "deprecationMessage": "", + "type": "Subject", + "optional": false, + "description": "", + "line": 22, + "modifierKind": [121] + } + ], + "methods": [ + { + "name": "_catchRequestError", + "args": [ + { + "name": "operation", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 183, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "operation", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "add", + "args": [ + { + "name": "groupId", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "model", + "type": "ConditionModel", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 118, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "groupId", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "model", + "type": "ConditionModel", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "fromServerConditionTransformFn", + "args": [ + { + "name": "condition", + "type": "ICondition", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "ConditionModel", + "typeParameters": [], + "line": 42, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [124], + "jsdoctags": [ + { + "name": "condition", + "type": "ICondition", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "get", + "args": [ + { + "name": "conditionId", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "conditionTypes", + "type": "literal type", + "deprecated": false, + "deprecationMessage": "", + "optional": true + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 102, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "conditionId", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "conditionTypes", + "type": "literal type", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "listForGroup", + "args": [ + { + "name": "group", + "type": "ConditionGroupModel", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "conditionTypes", + "type": "literal type", + "deprecated": false, + "deprecationMessage": "", + "optional": true + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 87, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "group", + "type": "ConditionGroupModel", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "conditionTypes", + "type": "literal type", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "makeRequest", + "args": [ + { + "name": "childPath", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 62, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "childPath", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "remove", + "args": [ + { + "name": "model", + "type": "ConditionModel", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 169, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "model", + "type": "ConditionModel", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "save", + "args": [ + { + "name": "groupId", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "model", + "type": "ConditionModel", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 142, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "groupId", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "model", + "type": "ConditionModel", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "toJson", + "args": [ + { + "name": "condition", + "type": "ConditionModel", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "any", + "typeParameters": [], + "line": 32, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [124], + "jsdoctags": [ + { + "name": "condition", + "type": "ConditionModel", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "description": "", + "rawdescription": "\n", + "sourceCode": "import { from as observableFrom, empty as observableEmpty, Subject } from 'rxjs';\nimport { reduce, mergeMap, catchError, map } from 'rxjs/operators';\nimport { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { ApiRoot } from '@dotcms/dotcms-js';\nimport { ServerSideTypeModel } from './ServerSideFieldModel';\nimport { HttpResponse } from '@angular/common/http';\nimport { ConditionGroupModel, ConditionModel, ICondition } from './Rule';\nimport { HttpCode } from '@dotcms/dotcms-js';\nimport { CoreWebService, LoggerService } from '@dotcms/dotcms-js';\n\n// tslint:disable-next-line:no-unused-variable\n// const noop = (...arg: any[]) => {};\n\n@Injectable()\nexport class ConditionService {\n public get error(): Observable {\n return this._error.asObservable();\n }\n private _baseUrl: string;\n\n private _error: Subject = new Subject();\n\n constructor(\n apiRoot: ApiRoot,\n private coreWebService: CoreWebService,\n private loggerService: LoggerService\n ) {\n this._baseUrl = `/api/v1/sites/${apiRoot.siteId}/ruleengine/conditions`;\n }\n\n static toJson(condition: ConditionModel): any {\n const json: any = {};\n json.id = condition.key;\n json.conditionlet = condition.type.key;\n json.priority = condition.priority;\n json.operator = condition.operator;\n json.values = condition.parameters;\n return json;\n }\n\n static fromServerConditionTransformFn(condition: ICondition): ConditionModel {\n let conditionModel: ConditionModel = null;\n try {\n conditionModel = new ConditionModel(condition);\n const values = condition['values'];\n\n Object.keys(values).forEach((key) => {\n const x = values[key];\n conditionModel.setParameter(key, x.value, x.priority);\n // tslint:disable-next-line:no-console\n console.log('ConditionService', 'setting parameter', key, x);\n });\n } catch (e) {\n // tslint:disable-next-line:no-console\n console.error('Error reading Condition.', e);\n throw e;\n }\n return conditionModel;\n }\n\n makeRequest(childPath: string): Observable {\n return this.coreWebService\n .request({\n url: this._baseUrl + '/' + childPath\n })\n .pipe(\n catchError((err: any, _source: Observable) => {\n if (err && err.status === HttpCode.NOT_FOUND) {\n this.loggerService.info(\n 'Could not retrieve Condition Types: URL not valid.'\n );\n } else if (err) {\n this.loggerService.info(\n 'Could not retrieve Condition Types.',\n 'response status code: ',\n err.status,\n 'error:',\n err\n );\n }\n return observableEmpty();\n })\n );\n }\n\n listForGroup(\n group: ConditionGroupModel,\n conditionTypes?: { [key: string]: ServerSideTypeModel }\n ): Observable {\n return observableFrom(Object.keys(group.conditions)).pipe(\n mergeMap((conditionId) => {\n return this.get(conditionId, conditionTypes);\n }),\n reduce((acc: ConditionModel[], entity: ConditionModel) => {\n acc.push(entity);\n return acc;\n }, [])\n );\n }\n\n get(\n conditionId: string,\n conditionTypes?: { [key: string]: ServerSideTypeModel }\n ): Observable {\n let conditionModelResult: Observable;\n conditionModelResult = this.makeRequest(conditionId);\n\n return conditionModelResult.pipe(\n map((entity) => {\n entity.id = conditionId;\n entity._type = conditionTypes ? conditionTypes[entity.conditionlet] : null;\n return ConditionService.fromServerConditionTransformFn(entity);\n })\n );\n }\n\n add(groupId: string, model: ConditionModel): Observable {\n // this.loggerService.info(\"api.rule-engine.ConditionService\", \"add\", model)\n if (!model.isValid()) {\n throw new Error(`This should be thrown from a checkValid function on the model,\n and should provide the info needed to make the user aware of the fix.`);\n }\n const json = ConditionService.toJson(model);\n json.owningGroup = groupId;\n const add = this.coreWebService\n .request({\n method: 'POST',\n body: json,\n url: this._baseUrl + '/'\n })\n .pipe(\n map((res: HttpResponse) => {\n const json: any = res;\n model.key = json.id;\n return model;\n })\n );\n return add.pipe(catchError(this._catchRequestError('add')));\n }\n\n save(groupId: string, model: ConditionModel): Observable {\n this.loggerService.info('api.rule-engine.ConditionService', 'save', model);\n if (!model.isValid()) {\n throw new Error(`This should be thrown from a checkValid function on the model,\n and should provide the info needed to make the user aware of the fix.`);\n }\n if (!model.isPersisted()) {\n this.add(groupId, model);\n } else {\n const json = ConditionService.toJson(model);\n json.owningGroup = groupId;\n const body = JSON.stringify(json);\n const save = this.coreWebService\n .request({\n method: 'PUT',\n body: body,\n url: this._baseUrl + '/' + model.key\n })\n .pipe(\n map((_res: HttpResponse) => {\n return model;\n })\n );\n return save.pipe(catchError(this._catchRequestError('save')));\n }\n }\n\n remove(model: ConditionModel): Observable {\n const remove = this.coreWebService\n .request({\n method: 'DELETE',\n url: this._baseUrl + '/' + model.key\n })\n .pipe(\n map((_res: HttpResponse) => {\n return model;\n })\n );\n return remove.pipe(catchError(this._catchRequestError('remove')));\n }\n\n private _catchRequestError(operation): (any) => Observable {\n return (err: any) => {\n if (err && err.status === HttpCode.NOT_FOUND) {\n this.loggerService.info('Could not ' + operation + ' Condition: URL not valid.');\n } else if (err) {\n this.loggerService.info(\n 'Could not ' + operation + ' Condition.',\n 'response status code: ',\n err.status,\n 'error:',\n err\n );\n }\n\n this._error.next(err.json().error.replace('dotcms.api.error.forbidden: ', ''));\n\n return observableEmpty();\n };\n }\n}\n", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "apiRoot", + "type": "ApiRoot", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "coreWebService", + "type": "CoreWebService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "loggerService", + "type": "LoggerService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 22, + "jsdoctags": [ + { + "name": "apiRoot", + "type": "ApiRoot", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "coreWebService", + "type": "CoreWebService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "loggerService", + "type": "LoggerService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "accessors": { + "error": { + "name": "error", + "getSignature": { + "name": "error", + "type": "", + "returnType": "Observable", + "line": 17 + } + } + }, + "type": "injectable" + }, + { + "name": "CoreWebService", + "id": "injectable-CoreWebService-40ae8ada9d57dc6cf3e813a8895469d7bb40d4348e08ac03d2d0301a9bd07bd61e7ea203faf51d0bd9efc70b6537e386db94ddc656c0a9b29661e6d123e9d06a", + "file": "libs/dotcms-js/src/lib/core/core-web.service.ts", + "properties": [ + { + "name": "httpErrosSubjects", + "defaultValue": "[]", + "deprecated": false, + "deprecationMessage": "", + "type": "Subject[]", + "optional": false, + "description": "", + "line": 55, + "modifierKind": [121] + } + ], + "methods": [ + { + "name": "emitHttpError", + "args": [ + { + "name": "status", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 225, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "status", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getDefaultRequestHeaders", + "args": [], + "optional": false, + "returnType": "HttpHeaders", + "typeParameters": [], + "line": 298, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "getFixedUrl", + "args": [ + { + "name": "url", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 273, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "url", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getHttpHeaders", + "args": [ + { + "name": "headers", + "type": "literal type", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "HttpHeaders", + "typeParameters": [], + "line": 256, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "headers", + "type": "literal type", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getHttpParams", + "args": [ + { + "name": "params", + "type": "literal type", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "HttpParams", + "typeParameters": [], + "line": 285, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "params", + "type": "literal type", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getRequestOpts", + "args": [ + { + "name": "options", + "type": "DotRequestOptionsArgs", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "HttpRequest", + "typeParameters": ["T"], + "line": 231, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "options", + "type": "DotRequestOptionsArgs", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "handleRequestViewErrors", + "args": [ + { + "name": "resp", + "type": "HttpResponse>", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "ResponseView", + "typeParameters": ["T"], + "line": 209, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "resp", + "type": "HttpResponse>", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "handleResponseHttpErrors", + "args": [ + { + "name": "resp", + "type": "HttpErrorResponse", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "HttpErrorResponse", + "typeParameters": [], + "line": 217, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "resp", + "type": "HttpErrorResponse", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "request", + "args": [ + { + "name": "options", + "type": "DotRequestOptionsArgs", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable>", + "typeParameters": ["T"], + "line": 73, + "deprecated": true, + "deprecationMessage": "", + "rawdescription": "\n\n\nRequest data from dotCMS endpoints\n\n", + "description": "

Request data from dotCMS endpoints

\n", + "jsdoctags": [ + { + "name": { + "pos": 1576, + "end": 1583, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "options" + }, + "type": "DotRequestOptionsArgs", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 1546, + "end": 1551, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 1552, + "end": 1575, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 1553, + "end": 1574, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 177, + "typeName": { + "pos": 1553, + "end": 1574, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "DotRequestOptionsArgs" + } + } + } + }, + { + "tagName": { + "pos": 1592, + "end": 1598, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "originalKeywordKind": 105, + "escapedText": "return" + }, + "comment": "

{Observable<HttpResponse>}

\n", + "returnType": "" + } + ] + }, + { + "name": "requestView", + "args": [ + { + "name": "options", + "type": "DotRequestOptionsArgs", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable>", + "typeParameters": ["T"], + "line": 158, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nReturn a response adapted to the follow json format:\n\n\n{\n \"errors\":[],\n \"entity\":{},\n \"messages\":[],\n \"i18nMessagesMap\":{}\n}\n\n\n", + "description": "

Return a response adapted to the follow json format:

\n\n{\n \"errors\":[],\n \"entity\":{},\n \"messages\":[],\n \"i18nMessagesMap\":{}\n}\n\n\n", + "jsdoctags": [ + { + "name": "options", + "type": "DotRequestOptionsArgs", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "tagName": { + "pos": 4845, + "end": 4852, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "returns" + }, + "comment": "

Observable

\n" + } + ] + }, + { + "name": "subscribeToHttpError", + "args": [ + { + "name": "httpErrorCode", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 201, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nEmit to the subscriber when the request fail\n\n", + "description": "

Emit to the subscriber when the request fail

\n", + "jsdoctags": [ + { + "name": { + "pos": 6250, + "end": 6263, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "httpErrorCode" + }, + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 6235, + "end": 6240, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 6241, + "end": 6249, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 6242, + "end": 6248, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 146 + } + } + }, + { + "tagName": { + "pos": 6272, + "end": 6279, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "returns" + }, + "comment": "", + "returnType": "" + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "description": "", + "rawdescription": "\n", + "sourceCode": "import { Injectable } from '@angular/core';\nimport { Subject, Observable, throwError } from 'rxjs';\nimport { map, catchError, filter } from 'rxjs/operators';\n\nimport {\n CwError,\n NETWORK_CONNECTION_ERROR,\n UNKNOWN_RESPONSE_ERROR,\n CLIENTS_ONLY_MESSAGES,\n SERVER_RESPONSE_ERROR\n} from './util/http-response-util';\nimport { ResponseView } from './util/response-view';\nimport { LoggerService } from './logger.service';\nimport { HttpCode } from './util/http-code';\nimport { Router } from '@angular/router';\nimport {\n HttpClient,\n HttpRequest,\n HttpHeaders,\n HttpParams,\n HttpResponse,\n HttpEventType,\n HttpEvent,\n HttpErrorResponse\n} from '@angular/common/http';\n\nexport interface DotCMSResponse {\n contentlets?: T;\n entity?: T;\n tempFiles?: T; // /api/v1/temp don't have entity\n errors: string[];\n i18nMessagesMap: { [key: string]: string };\n messages: string[];\n permissions: string[];\n}\n\nexport interface DotRequestOptionsArgs {\n url: string;\n body?:\n | {\n [key: string]: any;\n }\n | string;\n method?: string;\n params?: {\n [key: string]: any;\n };\n headers?: {\n [key: string]: any;\n };\n}\n\n@Injectable()\nexport class CoreWebService {\n private httpErrosSubjects: Subject[] = [];\n\n constructor(\n private loggerService: LoggerService,\n private router: Router,\n private http: HttpClient\n ) {}\n\n /**\n *\n * Request data from dotCMS endpoints\n *\n * @template T\n * @param {DotRequestOptionsArgs} options\n * @return {*} {Observable>}\n * @memberof CoreWebService\n * @deprecated\n */\n request(options: DotRequestOptionsArgs): Observable> {\n if (!options.method) {\n options.method = 'GET';\n }\n\n const request = this.getRequestOpts(options);\n const source = options.body;\n\n return this.http.request(request).pipe(\n filter(\n (event: HttpEvent> | any>) =>\n event.type === HttpEventType.Response\n ),\n map((resp: HttpResponse>) => {\n // some endpoints have empty body.\n try {\n return resp.body;\n } catch (error) {\n return resp;\n }\n }),\n catchError(\n (response: HttpErrorResponse, _original: Observable): Observable => {\n if (response) {\n this.emitHttpError(response.status);\n\n if (\n response.status === HttpCode.SERVER_ERROR ||\n response.status === HttpCode.FORBIDDEN\n ) {\n if (\n response.statusText &&\n response.statusText.indexOf('ECONNREFUSED') >= 0\n ) {\n throw new CwError(\n NETWORK_CONNECTION_ERROR,\n CLIENTS_ONLY_MESSAGES[NETWORK_CONNECTION_ERROR],\n request,\n response,\n source\n );\n } else {\n throw new CwError(\n SERVER_RESPONSE_ERROR,\n response.error.message,\n request,\n response,\n source\n );\n }\n } else if (response.status === HttpCode.NOT_FOUND) {\n this.loggerService.error(\n 'Could not execute request: 404 path not valid.',\n options.url\n );\n throw new CwError(\n UNKNOWN_RESPONSE_ERROR,\n response.headers.get('error-message'),\n request,\n response,\n source\n );\n }\n }\n return null;\n }\n )\n );\n }\n\n /**\n * Return a response adapted to the follow json format:\n *\n * \n * {\n * \"errors\":[],\n * \"entity\":{},\n * \"messages\":[],\n * \"i18nMessagesMap\":{}\n * }\n * \n *\n * @RequestOptionsArgs options\n * @returns Observable\n */\n requestView(options: DotRequestOptionsArgs): Observable> {\n if (!options.method) {\n options.method = 'GET';\n }\n\n let request;\n\n if (options.body) {\n if (typeof options.body === 'string') {\n request = this.getRequestOpts(options);\n } else {\n request = this.getRequestOpts<{ [key: string]: any }>(options);\n }\n } else {\n request = this.getRequestOpts(options);\n }\n\n return this.http.request(request).pipe(\n filter(\n (event: HttpEvent> | any>) =>\n event.type === HttpEventType.Response\n ),\n map((resp: HttpResponse>) => {\n if (resp.body && resp.body.errors && resp.body.errors.length > 0) {\n return this.handleRequestViewErrors(resp);\n } else {\n return new ResponseView(resp);\n }\n }),\n catchError((err: HttpErrorResponse) => {\n this.emitHttpError(err.status);\n return throwError(this.handleResponseHttpErrors(err));\n })\n );\n }\n\n /**\n * Emit to the subscriber when the request fail\n *\n * @param {number} httpErrorCode\n * @returns {Observable}\n * @memberof CoreWebService\n */\n subscribeToHttpError(httpErrorCode: number): Observable {\n if (!this.httpErrosSubjects[httpErrorCode]) {\n this.httpErrosSubjects[httpErrorCode] = new Subject();\n }\n\n return this.httpErrosSubjects[httpErrorCode].asObservable();\n }\n\n private handleRequestViewErrors(resp: HttpResponse>): ResponseView {\n if (resp.status === 401) {\n this.router.navigate(['/public/login']);\n }\n\n return new ResponseView(resp);\n }\n\n private handleResponseHttpErrors(resp: HttpErrorResponse): HttpErrorResponse {\n if (resp.status === 401) {\n this.router.navigate(['/public/login']);\n }\n\n return resp;\n }\n\n private emitHttpError(status: number): void {\n if (this.httpErrosSubjects[status]) {\n this.httpErrosSubjects[status].next();\n }\n }\n\n private getRequestOpts(options: DotRequestOptionsArgs): HttpRequest {\n const headers = this.getHttpHeaders(options.headers);\n const params = this.getHttpParams(options.params);\n const url = this.getFixedUrl(options.url);\n const body = options.body || null;\n\n if (\n options.method === 'POST' ||\n options.method === 'PUT' ||\n options.method === 'PATCH' ||\n options.method === 'DELETE'\n ) {\n return new HttpRequest(options.method, url, body, {\n headers,\n params\n });\n }\n\n const method = <'GET' | 'HEAD' | 'JSONP' | 'OPTIONS'>options.method;\n return new HttpRequest(method, url, {\n headers,\n params\n });\n }\n\n private getHttpHeaders(headers: { [key: string]: string }): HttpHeaders {\n let httpHeaders = this.getDefaultRequestHeaders();\n\n if (headers && Object.keys(headers).length) {\n Object.keys(headers).forEach((key) => {\n httpHeaders = httpHeaders.set(key, headers[key]);\n });\n\n // If Content-Type == 'multipart/form-data' we need to remove Content-Type,\n // otherwise \"boundary\" will not be added to Content-Type in the Header\n if (headers['Content-Type'] === 'multipart/form-data') {\n httpHeaders = httpHeaders.delete('Content-Type');\n }\n }\n return httpHeaders;\n }\n\n private getFixedUrl(url: string): string {\n if (url?.startsWith('api')) {\n return `/${url}`;\n }\n\n const version = url ? url.split('/')[0] : '';\n if (version.match(/v[1-9]/g)) {\n return `/api/${url}`;\n }\n return url;\n }\n\n private getHttpParams(params: { [key: string]: any }): HttpParams {\n if (params && Object.keys(params).length) {\n let httpParams = new HttpParams();\n\n Object.keys(params).forEach((key: string) => {\n httpParams = httpParams.set(key, params[key]);\n });\n return httpParams;\n }\n\n return null;\n }\n\n private getDefaultRequestHeaders(): HttpHeaders {\n const headers = new HttpHeaders()\n .set('Accept', '*/*')\n .set('Content-Type', 'application/json');\n return headers;\n }\n}\n", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "loggerService", + "type": "LoggerService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "router", + "type": "Router", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "http", + "type": "HttpClient", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 55, + "jsdoctags": [ + { + "name": "loggerService", + "type": "LoggerService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "router", + "type": "Router", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "http", + "type": "HttpClient", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "type": "injectable" + }, + { + "name": "CoreWebServiceMock", + "id": "injectable-CoreWebServiceMock-55c8a96baa8b62af94047b49e8d8ed2a393f4930b618d93ee9146fc90cedbfb7e5b05370c4374b874d664791e4490d8a862c49747490d197cd32f6d5aeffe0c1", + "file": "apps/dotcms-ui/src/app/test/core-web.service.mock.ts", + "properties": [], + "methods": [ + { + "name": "request", + "args": [ + { + "name": "options", + "type": "DotRequestOptionsArgs", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": ["T"], + "line": 20, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "options", + "type": "DotRequestOptionsArgs", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "requestView", + "args": [ + { + "name": "options", + "type": "DotRequestOptionsArgs", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable>", + "typeParameters": ["T"], + "line": 56, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "options", + "type": "DotRequestOptionsArgs", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "subscribeTo", + "args": [ + { + "name": "httpErrorCode", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 89, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "httpErrorCode", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "description": "", + "rawdescription": "\n", + "sourceCode": "import { Injectable } from '@angular/core';\nimport { Observable, of } from 'rxjs';\nimport { map, filter } from 'rxjs/operators';\nimport { ResponseView } from '@dotcms/dotcms-js';\nimport {\n HttpClient,\n HttpRequest,\n HttpEvent,\n HttpEventType,\n HttpResponse,\n HttpParams,\n HttpHeaders\n} from '@angular/common/http';\nimport { DotCMSResponse, DotRequestOptionsArgs } from '@dotcms/dotcms-js';\n\n@Injectable()\nexport class CoreWebServiceMock {\n constructor(private _http: HttpClient) {}\n\n request(options: DotRequestOptionsArgs): Observable {\n if (!options.method) {\n options.method = 'GET';\n }\n\n const optionsArgs = {\n params: new HttpParams()\n };\n\n if (options.params) {\n Object.keys(options.params).forEach((key) => {\n optionsArgs.params = optionsArgs.params.set(key, options.params[key]);\n });\n }\n\n return this._http\n .request(\n new HttpRequest(options.method, options.url, options.body, {\n params: optionsArgs.params\n })\n )\n .pipe(\n filter(\n (event: HttpEvent> | any>) =>\n event.type === HttpEventType.Response\n ),\n map((resp: HttpResponse>) => {\n try {\n return resp.body;\n } catch (error) {\n return resp;\n }\n })\n );\n }\n\n requestView(options: DotRequestOptionsArgs): Observable> {\n if (!options.method) {\n options.method = 'GET';\n }\n\n const optionsArgs = {\n headers: new HttpHeaders(),\n params: new HttpParams()\n };\n\n if (options.params) {\n Object.keys(options.params).forEach((key: string) => {\n optionsArgs.params = optionsArgs.params.set(key, options.params[key]);\n });\n }\n\n return this._http\n .request(\n new HttpRequest(options.method, options.url, options.body, {\n params: optionsArgs.params\n })\n )\n .pipe(\n filter(\n (event: HttpEvent> | any>) =>\n event.type === HttpEventType.Response\n ),\n map((resp: HttpResponse>) => {\n return new ResponseView(resp);\n })\n );\n }\n\n subscribeTo(httpErrorCode: number): Observable {\n return of({\n error: httpErrorCode\n });\n }\n}\n", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "_http", + "type": "HttpClient", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 17, + "jsdoctags": [ + { + "name": "_http", + "type": "HttpClient", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "type": "injectable" + }, + { + "name": "CoreWebServiceMock", + "id": "injectable-CoreWebServiceMock-a78ebc7c851394fb20878acc6403735a2adfa28c838eb436791c3bcbb90045699c23f91f72534fa9eaab8481331c1e7fa69ec94cb97cc372e35665684790919b-1", + "file": "libs/dotcms-js/src/lib/core/core-web.service.mock.ts", + "properties": [], + "methods": [ + { + "name": "request", + "args": [ + { + "name": "options", + "type": "DotRequestOptionsArgs", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": ["T"], + "line": 20, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "options", + "type": "DotRequestOptionsArgs", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "requestView", + "args": [ + { + "name": "options", + "type": "DotRequestOptionsArgs", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable>", + "typeParameters": ["T"], + "line": 56, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "options", + "type": "DotRequestOptionsArgs", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "subscribeTo", + "args": [ + { + "name": "httpErrorCode", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 89, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "httpErrorCode", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "description": "", + "rawdescription": "\n", + "sourceCode": "import { Injectable } from '@angular/core';\nimport { Observable, of } from 'rxjs';\nimport { map, filter } from 'rxjs/operators';\nimport {\n HttpClient,\n HttpRequest,\n HttpEvent,\n HttpEventType,\n HttpResponse,\n HttpParams,\n HttpHeaders\n} from '@angular/common/http';\nimport { DotCMSResponse, DotRequestOptionsArgs } from './core-web.service';\nimport { ResponseView } from './util/response-view';\n\n@Injectable()\nexport class CoreWebServiceMock {\n constructor(private _http: HttpClient) {}\n\n request(options: DotRequestOptionsArgs): Observable {\n if (!options.method) {\n options.method = 'GET';\n }\n\n const optionsArgs = {\n params: new HttpParams()\n };\n\n if (options.params) {\n Object.keys(options.params).forEach((key) => {\n optionsArgs.params = optionsArgs.params.set(key, options.params[key]);\n });\n }\n\n return this._http\n .request(\n new HttpRequest(options.method, options.url, options.body, {\n params: optionsArgs.params\n })\n )\n .pipe(\n filter(\n (event: HttpEvent> | any>) =>\n event.type === HttpEventType.Response\n ),\n map((resp: HttpResponse>) => {\n try {\n return resp.body;\n } catch (error) {\n return resp;\n }\n })\n );\n }\n\n requestView(options: DotRequestOptionsArgs): Observable> {\n if (!options.method) {\n options.method = 'GET';\n }\n\n const optionsArgs = {\n headers: new HttpHeaders(),\n params: new HttpParams()\n };\n\n if (options.params) {\n Object.keys(options.params).forEach((key: string) => {\n optionsArgs.params = optionsArgs.params.set(key, options.params[key]);\n });\n }\n\n return this._http\n .request(\n new HttpRequest(options.method, options.url, options.body, {\n params: optionsArgs.params\n })\n )\n .pipe(\n filter(\n (event: HttpEvent> | any>) =>\n event.type === HttpEventType.Response\n ),\n map((resp: HttpResponse>) => {\n return new ResponseView(resp);\n })\n );\n }\n\n subscribeTo(httpErrorCode: number): Observable {\n return of({\n error: httpErrorCode\n });\n }\n}\n", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "_http", + "type": "HttpClient", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 17, + "jsdoctags": [ + { + "name": "_http", + "type": "HttpClient", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "type": "injectable", + "isDuplicate": true, + "duplicateId": 1, + "duplicateName": "CoreWebServiceMock-1" + }, + { + "name": "DotAccountService", + "id": "injectable-DotAccountService-ce5c15b22403bca491bf14ea6d07148bce9d4a1f670301d490ab5c9a8ce8f04ae8b0c021e4fc555ad447217fff12282b409e970caf79de9af85d84c1bd8b6327", + "file": "apps/dotcms-ui/src/app/api/services/dot-account-service.ts", + "properties": [], + "methods": [ + { + "name": "addStarterPage", + "args": [], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 36, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nPut request to add the getting starter portlet to menu\n\n", + "description": "

Put request to add the getting starter portlet to menu

\n", + "jsdoctags": [ + { + "tagName": { + "pos": 1026, + "end": 1033, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "returns" + }, + "comment": "", + "returnType": "" + } + ] + }, + { + "name": "removeStarterPage", + "args": [], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 60, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nput request to remove the getting starter portlet to menu\n\n", + "description": "

put request to remove the getting starter portlet to menu

\n", + "jsdoctags": [ + { + "tagName": { + "pos": 1754, + "end": 1761, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "returns" + }, + "comment": "", + "returnType": "" + } + ] + }, + { + "name": "updateUser", + "args": [ + { + "name": "user", + "type": "DotAccountUser", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 22, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nUpdates user data\n\n", + "description": "

Updates user data

\n", + "jsdoctags": [ + { + "name": { + "pos": 630, + "end": 634, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "user" + }, + "type": "DotAccountUser", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 607, + "end": 612, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 613, + "end": 629, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 614, + "end": 628, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 177, + "typeName": { + "pos": 614, + "end": 628, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "DotAccountUser" + } + } + } + }, + { + "tagName": { + "pos": 643, + "end": 650, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "returns" + }, + "comment": "", + "returnType": "" + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "description": "", + "rawdescription": "\n", + "sourceCode": "import { Observable } from 'rxjs';\nimport { Injectable } from '@angular/core';\nimport { CoreWebService, ResponseView } from '@dotcms/dotcms-js';\nimport { take, pluck, catchError, map } from 'rxjs/operators';\nimport { HttpErrorResponse } from '@angular/common/http';\nimport { DotHttpErrorManagerService } from './dot-http-error-manager/dot-http-error-manager.service';\n\n@Injectable()\nexport class DotAccountService {\n constructor(\n private coreWebService: CoreWebService,\n private httpErrorManagerService: DotHttpErrorManagerService\n ) {}\n\n /**\n * Updates user data\n *\n * @param {DotAccountUser} user\n * @returns {Observable}\n * @memberof DotAccountService\n */\n updateUser(user: DotAccountUser): Observable {\n return this.coreWebService.requestView({\n body: user,\n method: 'PUT',\n url: 'v1/users/current'\n });\n }\n\n /**\n * Put request to add the getting starter portlet to menu\n *\n * @returns {Observable}\n * @memberof DotAccountService\n */\n addStarterPage(): Observable {\n return this.coreWebService\n .requestView({\n method: 'PUT',\n url: '/api/v1/toolgroups/gettingstarted/_addtouser'\n })\n .pipe(\n take(1),\n pluck('entity'),\n catchError((error: HttpErrorResponse) => {\n return this.httpErrorManagerService.handle(error).pipe(\n take(1),\n map(() => null)\n );\n })\n );\n }\n\n /**\n * put request to remove the getting starter portlet to menu\n *\n * @returns {Observable}\n * @memberof DotAccountService\n */\n removeStarterPage(): Observable {\n return this.coreWebService\n .requestView({\n method: 'PUT',\n url: '/api/v1/toolgroups/gettingstarted/_removefromuser'\n })\n .pipe(\n take(1),\n pluck('entity'),\n catchError((error: HttpErrorResponse) => {\n return this.httpErrorManagerService.handle(error).pipe(\n take(1),\n map(() => null)\n );\n })\n );\n }\n}\n\nexport interface DotAccountUser {\n userId: string;\n givenName: string;\n surname: string;\n newPassword?: string;\n currentPassword: string;\n email: string;\n}\n", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "coreWebService", + "type": "CoreWebService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "httpErrorManagerService", + "type": "DotHttpErrorManagerService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 9, + "jsdoctags": [ + { + "name": "coreWebService", + "type": "CoreWebService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "httpErrorManagerService", + "type": "DotHttpErrorManagerService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "type": "injectable" + }, + { + "name": "DotAlertConfirmService", + "id": "injectable-DotAlertConfirmService-7d0495b212e935d699ed4d5021cb2fc4207b2a1807594d662372cf0b389a08d85723c980133291d6dc05349b8eff2014378b776ff1e5266289ae57d783384c3a", + "file": "apps/dotcms-ui/src/app/api/services/dot-alert-confirm/dot-alert-confirm.service.ts", + "properties": [ + { + "name": "_confirmDialogOpened$", + "defaultValue": "new Subject()", + "deprecated": false, + "deprecationMessage": "", + "type": "Subject", + "optional": false, + "description": "", + "line": 17, + "modifierKind": [121] + }, + { + "name": "alertModel", + "defaultValue": "null", + "deprecated": false, + "deprecationMessage": "", + "type": "DotAlertConfirm", + "optional": false, + "description": "", + "line": 15 + }, + { + "name": "confirmationService", + "deprecated": false, + "deprecationMessage": "", + "type": "ConfirmationService", + "optional": false, + "description": "", + "line": 20, + "modifierKind": [123] + }, + { + "name": "confirmModel", + "defaultValue": "null", + "deprecated": false, + "deprecationMessage": "", + "type": "DotAlertConfirm", + "optional": false, + "description": "", + "line": 16 + } + ], + "methods": [ + { + "name": "alert", + "args": [ + { + "name": "dialogModel", + "type": "DotAlertConfirm", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 60, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nConfirm wrapper method of ConfirmService\nAdd both accept and reject labels into confirmation object\n\n", + "description": "

Confirm wrapper method of ConfirmService\nAdd both accept and reject labels into confirmation object

\n", + "jsdoctags": [ + { + "name": "dialogModel", + "type": "DotAlertConfirm", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "alertAccept", + "args": [ + { + "name": "$event", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 74, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nCall the alert accept action and clear the model\n\n", + "description": "

Call the alert accept action and clear the model

\n", + "jsdoctags": [ + { + "name": "$event", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "alertReject", + "args": [ + { + "name": "$event", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 86, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nCall the alert reject action and clear the model\n\n", + "description": "

Call the alert reject action and clear the model

\n", + "jsdoctags": [ + { + "name": "$event", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "clearConfirm", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 98, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nclear confirm dialog object\n\n", + "description": "

clear confirm dialog object

\n", + "jsdoctags": [] + }, + { + "name": "confirm", + "args": [ + { + "name": "dialogModel", + "type": "DotAlertConfirm", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 39, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nConfirm wrapper method of ConfirmService\nAdd both accept and reject labels into confirmation object\n\n", + "description": "

Confirm wrapper method of ConfirmService\nAdd both accept and reject labels into confirmation object

\n", + "jsdoctags": [ + { + "name": "dialogModel", + "type": "DotAlertConfirm", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "description": "

Handle global confirmation and alert dialog component

\n", + "rawdescription": "\n\nHandle global confirmation and alert dialog component\n", + "sourceCode": "import { DotMessageService } from '../dot-message/dot-messages.service';\nimport { Injectable } from '@angular/core';\nimport { DotAlertConfirm } from '@models/dot-alert-confirm/dot-alert-confirm.model';\nimport { Observable, Subject } from 'rxjs';\nimport { ConfirmationService } from 'primeng/api';\n\n/**\n * Handle global confirmation and alert dialog component\n * @export\n * @class DotAlertConfirmService\n */\n\n@Injectable()\nexport class DotAlertConfirmService {\n alertModel: DotAlertConfirm = null;\n confirmModel: DotAlertConfirm = null;\n private _confirmDialogOpened$: Subject = new Subject();\n\n constructor(\n public confirmationService: ConfirmationService,\n private dotMessageService: DotMessageService\n ) {}\n\n /**\n * Get the confirmDialogOpened notification as an Observable\n * @returns Observable\n */\n get confirmDialogOpened$(): Observable {\n return this._confirmDialogOpened$.asObservable();\n }\n\n /**\n * Confirm wrapper method of ConfirmService\n * Add both accept and reject labels into confirmation object\n *\n * @param DotAlertConfirm dialogModel\n * @memberof DotAlertConfirmService\n */\n confirm(dialogModel: DotAlertConfirm): void {\n dialogModel.footerLabel = {\n accept: this.dotMessageService.get('dot.common.dialog.accept'),\n reject: this.dotMessageService.get('dot.common.dialog.reject'),\n ...dialogModel.footerLabel\n };\n\n this.confirmModel = dialogModel;\n setTimeout(() => {\n this.confirmationService.confirm(dialogModel);\n this._confirmDialogOpened$.next(true);\n }, 0);\n }\n\n /**\n * Confirm wrapper method of ConfirmService\n * Add both accept and reject labels into confirmation object\n *\n * @param DotAlertConfirm confirmation\n * @memberof DotAlertConfirmService\n */\n alert(dialogModel: DotAlertConfirm): void {\n dialogModel.footerLabel = {\n accept: this.dotMessageService.get('dot.common.dialog.accept'),\n ...dialogModel.footerLabel\n };\n\n this.alertModel = dialogModel;\n }\n\n /**\n * Call the alert accept action and clear the model\n *\n * @memberof DotAlertConfirmService\n */\n alertAccept($event): void {\n if (this.alertModel.accept) {\n this.alertModel.accept($event);\n }\n this.alertModel = null;\n }\n\n /**\n * Call the alert reject action and clear the model\n *\n * @memberof DotAlertConfirmService\n */\n alertReject($event): void {\n if (this.alertModel.reject) {\n this.alertModel.reject($event);\n }\n this.alertModel = null;\n }\n\n /**\n * clear confirm dialog object\n *\n * @memberof DotAlertConfirmService\n */\n clearConfirm(): void {\n this.confirmModel = null;\n }\n}\n", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "confirmationService", + "type": "ConfirmationService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotMessageService", + "type": "DotMessageService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 17, + "jsdoctags": [ + { + "name": "confirmationService", + "type": "ConfirmationService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotMessageService", + "type": "DotMessageService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "accessors": { + "confirmDialogOpened$": { + "name": "confirmDialogOpened$", + "getSignature": { + "name": "confirmDialogOpened$", + "type": "", + "returnType": "Observable", + "line": 28, + "rawdescription": "\n\nGet the confirmDialogOpened notification as an Observable\n", + "description": "

Get the confirmDialogOpened notification as an Observable

\n", + "jsdoctags": [ + { + "pos": 838, + "end": 872, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 339, + "tagName": { + "pos": 839, + "end": 846, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "returns" + }, + "comment": "

Observable

\n" + } + ] + } + } + }, + "type": "injectable" + }, + { + "name": "DotAppsService", + "id": "injectable-DotAppsService-4dbf7e7944b04442b657584594167a9977ddde4e3199b19091d336f131ac2bcb7b3aa5ded764b64646a13b3cfce0aa634999b5eeeea5f5cd97d437488465797c", + "file": "apps/dotcms-ui/src/app/api/services/dot-apps/dot-apps.service.ts", + "properties": [], + "methods": [ + { + "name": "deleteAllConfigurations", + "args": [ + { + "name": "appKey", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 216, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nDelete all configuration of a specific Service Integration\n", + "description": "

Delete all configuration of a specific Service Integration

\n", + "jsdoctags": [ + { + "name": { + "pos": 6838, + "end": 6844, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "appKey" + }, + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 6823, + "end": 6828, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 6829, + "end": 6837, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 6830, + "end": 6836, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 149 + } + } + }, + { + "tagName": { + "pos": 6853, + "end": 6860, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "returns" + }, + "comment": "

Observable

\n" + } + ] + }, + { + "name": "deleteConfiguration", + "args": [ + { + "name": "appKey", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "hostId", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 193, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nDelete configuration of a specific Service Integration\n", + "description": "

Delete configuration of a specific Service Integration

\n", + "jsdoctags": [ + { + "name": { + "pos": 6062, + "end": 6068, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "appKey" + }, + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 6047, + "end": 6052, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 6053, + "end": 6061, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 6054, + "end": 6060, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 149 + } + } + }, + { + "name": { + "pos": 6092, + "end": 6098, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "hostId" + }, + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 6077, + "end": 6082, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 6083, + "end": 6091, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 6084, + "end": 6090, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 149 + } + } + }, + { + "tagName": { + "pos": 6107, + "end": 6114, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "returns" + }, + "comment": "

Observable

\n" + } + ] + }, + { + "name": "exportConfiguration", + "args": [ + { + "name": "conf", + "type": "DotAppsExportConfiguration", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Promise", + "typeParameters": [], + "line": 131, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nExport configuration(s) of a Service Integration\n", + "description": "

Export configuration(s) of a Service Integration

\n", + "jsdoctags": [ + { + "name": { + "pos": 3983, + "end": 3987, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "conf" + }, + "type": "DotAppsExportConfiguration", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 3948, + "end": 3953, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 3954, + "end": 3982, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 3955, + "end": 3981, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 177, + "typeName": { + "pos": 3955, + "end": 3981, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "DotAppsExportConfiguration" + } + } + } + }, + { + "tagName": { + "pos": 3996, + "end": 4003, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "returns" + }, + "comment": "

Promise

\n" + } + ] + }, + { + "name": "get", + "args": [ + { + "name": "filter", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "optional": true + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 35, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nReturn a list of apps.\n", + "description": "

Return a list of apps.

\n", + "jsdoctags": [ + { + "name": { + "pos": 935, + "end": 941, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "filter" + }, + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "tagName": { + "pos": 920, + "end": 925, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 926, + "end": 934, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 927, + "end": 933, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 149 + } + } + }, + { + "tagName": { + "pos": 950, + "end": 957, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "returns" + }, + "comment": "

Observable<DotApps[]>

\n" + } + ] + }, + { + "name": "getConfiguration", + "args": [ + { + "name": "appKey", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "id", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 81, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nReturn a detail configuration of a specific App\n", + "description": "

Return a detail configuration of a specific App

\n", + "jsdoctags": [ + { + "name": { + "pos": 2339, + "end": 2345, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "appKey" + }, + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 2324, + "end": 2329, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 2330, + "end": 2338, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 2331, + "end": 2337, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 149 + } + } + }, + { + "name": { + "pos": 2369, + "end": 2371, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "id" + }, + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 2354, + "end": 2359, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 2360, + "end": 2368, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 2361, + "end": 2367, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 149 + } + } + }, + { + "tagName": { + "pos": 2380, + "end": 2387, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "returns" + }, + "comment": "

Observable

\n" + } + ] + }, + { + "name": "getConfigurationList", + "args": [ + { + "name": "appKey", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 58, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nReturn a list of configurations of a specific Apps\n", + "description": "

Return a list of configurations of a specific Apps

\n", + "jsdoctags": [ + { + "name": { + "pos": 1661, + "end": 1667, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "appKey" + }, + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 1646, + "end": 1651, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 1652, + "end": 1660, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 1653, + "end": 1659, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 149 + } + } + }, + { + "tagName": { + "pos": 1676, + "end": 1683, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "returns" + }, + "comment": "

Observable

\n" + } + ] + }, + { + "name": "importConfiguration", + "args": [ + { + "name": "conf", + "type": "DotAppsImportConfiguration", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 164, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nImport configuration(s) of a Service Integration\n", + "description": "

Import configuration(s) of a Service Integration

\n", + "jsdoctags": [ + { + "name": { + "pos": 5060, + "end": 5064, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "conf" + }, + "type": "DotAppsImportConfiguration", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 5025, + "end": 5030, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 5031, + "end": 5059, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 5032, + "end": 5058, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 177, + "typeName": { + "pos": 5032, + "end": 5058, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "DotAppsImportConfiguration" + } + } + } + }, + { + "tagName": { + "pos": 5073, + "end": 5080, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "returns" + }, + "comment": "

Promise

\n" + } + ] + }, + { + "name": "saveSiteConfiguration", + "args": [ + { + "name": "appKey", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "id", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "params", + "type": "DotAppsSaveData", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 105, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nSaves a detail configuration of a specific Service Integration\n", + "description": "

Saves a detail configuration of a specific Service Integration

\n", + "jsdoctags": [ + { + "name": { + "pos": 3072, + "end": 3078, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "appKey" + }, + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 3057, + "end": 3062, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 3063, + "end": 3071, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 3064, + "end": 3070, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 149 + } + } + }, + { + "name": { + "pos": 3102, + "end": 3104, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "id" + }, + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 3087, + "end": 3092, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 3093, + "end": 3101, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 3094, + "end": 3100, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 149 + } + } + }, + { + "name": { + "pos": 3137, + "end": 3143, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "params" + }, + "type": "DotAppsSaveData", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 3113, + "end": 3118, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 3119, + "end": 3136, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 3120, + "end": 3135, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 177, + "typeName": { + "pos": 3120, + "end": 3135, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "DotAppsSaveData" + } + } + } + }, + { + "tagName": { + "pos": 3152, + "end": 3159, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "returns" + }, + "comment": "

Observable

\n" + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "description": "

Provide util methods to get apps in the system.

\n", + "rawdescription": "\n\nProvide util methods to get apps in the system.\n", + "sourceCode": "import { pluck, catchError, take, map } from 'rxjs/operators';\nimport { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport {\n DotApps,\n DotAppsExportConfiguration,\n DotAppsImportConfiguration,\n DotAppsSaveData\n} from '@models/dot-apps/dot-apps.model';\nimport { CoreWebService } from '@dotcms/dotcms-js';\nimport { DotHttpErrorManagerService } from '@services/dot-http-error-manager/dot-http-error-manager.service';\nimport { HttpErrorResponse } from '@angular/common/http';\nimport { getDownloadLink } from '@shared/dot-utils';\n\nconst appsUrl = `v1/apps`;\n\n/**\n * Provide util methods to get apps in the system.\n * @export\n * @class DotAppsService\n */\n@Injectable()\nexport class DotAppsService {\n constructor(\n private coreWebService: CoreWebService,\n private httpErrorManagerService: DotHttpErrorManagerService\n ) {}\n\n /**\n * Return a list of apps.\n * @param {string} filter\n * @returns Observable\n * @memberof DotAppsService\n */\n get(filter?: string): Observable {\n const url = filter ? `${appsUrl}?filter=${filter}` : appsUrl;\n return this.coreWebService\n .requestView({\n url\n })\n .pipe(\n pluck('entity'),\n catchError((error: HttpErrorResponse) => {\n return this.httpErrorManagerService.handle(error).pipe(\n take(1),\n map(() => null)\n );\n })\n );\n }\n\n /**\n * Return a list of configurations of a specific Apps\n * @param {string} appKey\n * @returns Observable\n * @memberof DotAppsService\n */\n getConfigurationList(appKey: string): Observable {\n return this.coreWebService\n .requestView({\n url: `${appsUrl}/${appKey}`\n })\n .pipe(\n pluck('entity'),\n catchError((error: HttpErrorResponse) => {\n return this.httpErrorManagerService.handle(error).pipe(\n take(1),\n map(() => null)\n );\n })\n );\n }\n\n /**\n * Return a detail configuration of a specific App\n * @param {string} appKey\n * @param {string} id\n * @returns Observable\n * @memberof DotAppsService\n */\n getConfiguration(appKey: string, id: string): Observable {\n return this.coreWebService\n .requestView({\n url: `${appsUrl}/${appKey}/${id}`\n })\n .pipe(\n pluck('entity'),\n catchError((error: HttpErrorResponse) => {\n return this.httpErrorManagerService.handle(error).pipe(\n take(1),\n map(() => null)\n );\n })\n );\n }\n\n /**\n * Saves a detail configuration of a specific Service Integration\n * @param {string} appKey\n * @param {string} id\n * @param {DotAppsSaveData} params\n * @returns Observable\n * @memberof DotAppsService\n */\n saveSiteConfiguration(appKey: string, id: string, params: DotAppsSaveData): Observable {\n return this.coreWebService\n .requestView({\n body: {\n ...params\n },\n method: 'POST',\n url: `${appsUrl}/${appKey}/${id}`\n })\n .pipe(\n pluck('entity'),\n catchError((error: HttpErrorResponse) => {\n return this.httpErrorManagerService.handle(error).pipe(\n take(1),\n map(() => null)\n );\n })\n );\n }\n\n /**\n * Export configuration(s) of a Service Integration\n * @param {DotAppsExportConfiguration} conf\n * @returns Promise\n * @memberof DotAppsService\n */\n exportConfiguration(conf: DotAppsExportConfiguration): Promise {\n let fileName = '';\n\n return fetch(`/api/${appsUrl}/export`, {\n method: 'POST',\n cache: 'no-cache',\n headers: {\n 'Content-Type': 'application/json'\n },\n\n body: JSON.stringify(conf)\n })\n .then((res: Response) => {\n const key = 'filename=';\n const contentDisposition = res.headers.get('content-disposition');\n fileName = contentDisposition.slice(contentDisposition.indexOf(key) + key.length);\n return res.blob();\n })\n .then((blob: Blob) => {\n getDownloadLink(blob, fileName).click();\n return '';\n })\n .catch((error) => {\n return error.message;\n });\n }\n\n /**\n * Import configuration(s) of a Service Integration\n * @param {DotAppsImportConfiguration} conf\n * @returns Promise\n * @memberof DotAppsService\n */\n importConfiguration(conf: DotAppsImportConfiguration): Observable {\n const formData = new FormData();\n formData.append('json', JSON.stringify(conf.json));\n formData.append('file', conf.file);\n return this.coreWebService\n .requestView({\n url: `/api/${appsUrl}/import`,\n body: formData,\n headers: { 'Content-Type': 'multipart/form-data' },\n method: 'POST'\n })\n .pipe(\n pluck('entity'),\n catchError((error: HttpErrorResponse) => {\n return this.httpErrorManagerService.handle(error).pipe(\n take(1),\n map((err) => err.status.toString())\n );\n })\n );\n }\n\n /**\n * Delete configuration of a specific Service Integration\n * @param {string} appKey\n * @param {string} hostId\n * @returns Observable\n * @memberof DotAppsService\n */\n deleteConfiguration(appKey: string, hostId: string): Observable {\n return this.coreWebService\n .requestView({\n method: 'DELETE',\n url: `${appsUrl}/${appKey}/${hostId}`\n })\n .pipe(\n pluck('entity'),\n catchError((error: HttpErrorResponse) => {\n return this.httpErrorManagerService.handle(error).pipe(\n take(1),\n map(() => null)\n );\n })\n );\n }\n\n /**\n * Delete all configuration of a specific Service Integration\n * @param {string} appKey\n * @returns Observable\n * @memberof DotAppsService\n */\n deleteAllConfigurations(appKey: string): Observable {\n return this.coreWebService\n .requestView({\n method: 'DELETE',\n url: `${appsUrl}/${appKey}`\n })\n .pipe(\n pluck('entity'),\n catchError((error: HttpErrorResponse) => {\n return this.httpErrorManagerService.handle(error).pipe(\n take(1),\n map(() => null)\n );\n })\n );\n }\n}\n", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "coreWebService", + "type": "CoreWebService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "httpErrorManagerService", + "type": "DotHttpErrorManagerService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 23, + "jsdoctags": [ + { + "name": "coreWebService", + "type": "CoreWebService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "httpErrorManagerService", + "type": "DotHttpErrorManagerService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "type": "injectable" + }, + { + "name": "DotCDNService", + "id": "injectable-DotCDNService-79a1dab8a5fb83a642cc944688fd76f849640b76507dd35967fc761083442a7474db84cdca5207b0ab480fca569b19649f76e4d3fdeea3b956310b5eb78e3463", + "file": "apps/dotcdn/src/app/dotcdn.service.ts", + "properties": [], + "methods": [ + { + "name": "purgeCache", + "args": [ + { + "name": "urls", + "type": "string[]", + "deprecated": false, + "deprecationMessage": "", + "optional": true + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 42, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\n Makes a request to purge the cache\n\n", + "description": "

Makes a request to purge the cache

\n", + "jsdoctags": [ + { + "name": { + "pos": 1359, + "end": 1363, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "urls" + }, + "type": "string[]", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "tagName": { + "pos": 1341, + "end": 1346, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 1347, + "end": 1357, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 1348, + "end": 1356, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 182, + "elementType": { + "pos": 1348, + "end": 1354, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 149 + } + } + } + }, + { + "tagName": { + "pos": 1376, + "end": 1382, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "originalKeywordKind": 105, + "escapedText": "return" + }, + "comment": "", + "returnType": "" + } + ] + }, + { + "name": "purgeCacheAll", + "args": [], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 58, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\n Makes a request to purge the cache\n\n", + "description": "

Makes a request to purge the cache

\n", + "jsdoctags": [ + { + "tagName": { + "pos": 1881, + "end": 1887, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "originalKeywordKind": 105, + "escapedText": "return" + }, + "comment": "", + "returnType": "" + } + ] + }, + { + "name": "purgeUrlRequest", + "args": [ + { + "type": "PurgeUrlOptions", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable>", + "typeParameters": [], + "line": 66, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "type": "PurgeUrlOptions", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "requestStats", + "args": [ + { + "name": "period", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 21, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nRequest stats via Core Web Service\n\n", + "description": "

Request stats via Core Web Service

\n", + "jsdoctags": [ + { + "name": { + "pos": 574, + "end": 580, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "period" + }, + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 559, + "end": 564, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 565, + "end": 573, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 566, + "end": 572, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 149 + } + } + }, + { + "tagName": { + "pos": 589, + "end": 595, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "originalKeywordKind": 105, + "escapedText": "return" + }, + "comment": "

{Observable}

\n", + "returnType": "" + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "description": "", + "rawdescription": "\n", + "sourceCode": "import { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { CoreWebService, ResponseView, SiteService } from '@dotcms/dotcms-js';\nimport { pluck, mergeMap } from 'rxjs/operators';\nimport { format, subDays } from 'date-fns';\nimport { DotCDNStats, PurgeReturnData, PurgeUrlOptions } from './app.models';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class DotCDNService {\n constructor(private coreWebService: CoreWebService, private siteService: SiteService) {}\n\n /**\n * Request stats via Core Web Service\n *\n * @param {string} period\n * @return {*} {Observable}\n * @memberof DotCDNService\n */\n requestStats(period: string): Observable {\n return this.siteService.getCurrentSite().pipe(\n pluck('identifier'),\n mergeMap((hostId: string) => {\n const dateTo = format(new Date(), 'yyyy-MM-dd');\n const dateFrom = format(subDays(new Date(), parseInt(period, 10)), 'yyyy-MM-dd');\n return this.coreWebService.requestView({\n url: `/api/v1/dotcdn/stats?hostId=${hostId}&dateFrom=${dateFrom}&dateTo=${dateTo}`\n });\n }),\n pluck('entity')\n );\n }\n\n /**\n * Makes a request to purge the cache\n *\n * @param {string[]} [urls=[]]\n * @return {Observable>}\n * @memberof DotCDNService\n */\n purgeCache(urls?: string[]): Observable {\n return this.siteService.getCurrentSite().pipe(\n pluck('identifier'),\n mergeMap((hostId: string) => {\n return this.purgeUrlRequest({ hostId, invalidateAll: false, urls });\n }),\n pluck('bodyJsonObject')\n );\n }\n\n /**\n * Makes a request to purge the cache\n *\n * @return {Observable>}\n * @memberof DotCDNService\n */\n purgeCacheAll(): Observable {\n return this.siteService.getCurrentSite().pipe(\n pluck('identifier'),\n mergeMap((hostId: string) => this.purgeUrlRequest({ hostId, invalidateAll: true })),\n pluck('bodyJsonObject')\n );\n }\n\n private purgeUrlRequest({\n urls = [],\n invalidateAll,\n hostId\n }: PurgeUrlOptions): Observable> {\n return this.coreWebService.requestView({\n url: `/api/v1/dotcdn`,\n method: 'DELETE',\n body: JSON.stringify({\n urls,\n invalidateAll,\n hostId\n })\n });\n }\n}\n", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "coreWebService", + "type": "CoreWebService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "siteService", + "type": "SiteService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 11, + "jsdoctags": [ + { + "name": "coreWebService", + "type": "CoreWebService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "siteService", + "type": "SiteService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "type": "injectable" + }, + { + "name": "DotCDNStore", + "id": "injectable-DotCDNStore-11c30ee493e199dfc46cc3fe16b1b4e4e8b6c2a9f36bc288f54aacc26c7fe9aa03fb464bd387facd121667f488614a22c7b52f22bfede1b8278b50f97cba5554", + "file": "apps/dotcdn/src/app/dotcdn.component.store.ts", + "properties": [ + { + "name": "dispatchLoading", + "defaultValue": "this.updater(\n (state, action: { loadingState: string; loader: string }) => {\n switch (action.loader) {\n case Loader.CHART:\n return {\n ...state,\n isChartLoading: action.loadingState === LoadingState.LOADING\n };\n case Loader.PURGE_URLS:\n return {\n ...state,\n isPurgeUrlsLoading: action.loadingState === LoadingState.LOADING\n };\n case Loader.PURGE_PULL_ZONE:\n return {\n ...state,\n isPurgeZoneLoading: action.loadingState === LoadingState.LOADING\n };\n }\n }\n )", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "

Dispatches a loading state

\n", + "line": 126, + "rawdescription": "\n\n Dispatches a loading state\n\n", + "modifierKind": [144], + "jsdoctags": [ + { + "pos": 4041, + "end": 4068, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 325, + "tagName": { + "pos": 4042, + "end": 4050, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "memberof" + }, + "comment": "

DotCDNStore

\n" + } + ] + }, + { + "name": "getChartStats", + "defaultValue": "this.effect(\n (period$: Observable): Observable => {\n return period$.pipe(\n mergeMap((period: string) => {\n // Dispatch the loading state\n this.dispatchLoading({\n loadingState: LoadingState.LOADING,\n loader: Loader.CHART\n });\n return this.dotCdnService.requestStats(period).pipe(\n tapResponse(\n (data: DotCDNStats) => {\n // Now the chart is loaded\n this.dispatchLoading({\n loadingState: LoadingState.LOADED,\n loader: Loader.CHART\n });\n\n const {\n statsData,\n chartData: [chartBandwidthData, chartRequestsData],\n cdnDomain\n } = this.getChartStatsData(data);\n\n this.updateChartState({\n chartBandwidthData,\n chartRequestsData,\n statsData,\n cdnDomain\n });\n },\n (error) => {\n // TODO: Handle error\n console.log(error);\n }\n )\n );\n })\n );\n }\n )", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "

Handles the chart data fetching

\n", + "line": 79, + "rawdescription": "\n\n Handles the chart data fetching\n\n", + "jsdoctags": [ + { + "pos": 2216, + "end": 2243, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 325, + "tagName": { + "pos": 2217, + "end": 2225, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "memberof" + }, + "comment": "

DotCDNStore

\n" + } + ] + }, + { + "name": "selectedPeriod", + "defaultValue": "{ value: ChartPeriod.Last15Days }", + "deprecated": false, + "deprecationMessage": "", + "type": "SelectItem", + "optional": false, + "description": "", + "line": 20 + }, + { + "name": "updateChartState", + "defaultValue": "this.updater(\n (\n state,\n chartData: Omit<\n DotCDNState,\n 'isChartLoading' | 'isPurgeUrlsLoading' | 'isPurgeZoneLoading'\n >\n ) => {\n return {\n ...state,\n chartBandwidthData: chartData.chartBandwidthData,\n chartRequestsData: chartData.chartRequestsData,\n cdnDomain: chartData.cdnDomain,\n statsData: chartData.statsData\n };\n }\n )", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 56, + "modifierKind": [144] + }, + { + "name": "vm$", + "defaultValue": "this.select(\n ({ isChartLoading, chartBandwidthData, chartRequestsData, statsData, cdnDomain }) => ({\n chartBandwidthData,\n chartRequestsData,\n statsData,\n isChartLoading,\n cdnDomain\n })\n )", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 41, + "modifierKind": [144] + }, + { + "name": "vmPurgeLoaders$", + "defaultValue": "this.select(({ isPurgeUrlsLoading, isPurgeZoneLoading }) => ({\n isPurgeUrlsLoading,\n isPurgeZoneLoading\n }))", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 51, + "modifierKind": [144] + } + ], + "methods": [ + { + "name": "formatDate", + "args": [ + { + "name": "date", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "any", + "typeParameters": [], + "line": 247, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "date", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getChartStatsData", + "args": [ + { + "type": "DotCDNStats", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "{ chartData: {}; statsData: {}; cdnDomain: any; }", + "typeParameters": [], + "line": 196, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "type": "DotCDNStats", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getLabels", + "args": [ + { + "name": "data", + "type": "literal type", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "string[]", + "typeParameters": [], + "line": 259, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\n\nThis private method is responsible for transforming the keys from bandwidthUsedChart in order to make it more readable\nIt takes the timestamp and removes the time from the string\n", + "description": "

This private method is responsible for transforming the keys from bandwidthUsedChart in order to make it more readable\nIt takes the timestamp and removes the time from the string

\n", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "data", + "type": "literal type", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "purgeCDNCache", + "args": [ + { + "name": "urls", + "type": "string[]", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 157, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nPurges the CDN cache\n\n", + "description": "

Purges the CDN cache

\n", + "jsdoctags": [ + { + "name": { + "pos": 5012, + "end": 5016, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "urls" + }, + "type": "string[]", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 4994, + "end": 4999, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 5000, + "end": 5010, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 5001, + "end": 5009, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 182, + "elementType": { + "pos": 5001, + "end": 5007, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 149 + } + } + } + }, + { + "tagName": { + "pos": 5026, + "end": 5032, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "originalKeywordKind": 105, + "escapedText": "return" + }, + "comment": "

{(Observable<ResponseView> | void)}

\n", + "returnType": "" + } + ] + }, + { + "name": "purgeCDNCacheAll", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 178, + "deprecated": false, + "deprecationMessage": "" + } + ], + "deprecated": false, + "deprecationMessage": "", + "description": "", + "rawdescription": "\n", + "sourceCode": "import { Injectable } from '@angular/core';\nimport { ComponentStore, tapResponse } from '@ngrx/component-store';\nimport { SelectItem } from 'primeng/api';\nimport { Observable, of } from 'rxjs';\nimport { mergeMap, switchMapTo, tap, pluck } from 'rxjs/operators';\nimport {\n ChartData,\n DotCDNState,\n DotCDNStats,\n DotChartStats,\n ChartPeriod,\n Loader,\n LoadingState,\n PurgeReturnData\n} from './app.models';\nimport { DotCDNService } from './dotcdn.service';\n\n@Injectable()\nexport class DotCDNStore extends ComponentStore {\n selectedPeriod: SelectItem = { value: ChartPeriod.Last15Days };\n\n constructor(private readonly dotCdnService: DotCDNService) {\n super({\n chartBandwidthData: {\n labels: [],\n datasets: []\n },\n chartRequestsData: {\n labels: [],\n datasets: []\n },\n cdnDomain: '',\n statsData: [],\n isChartLoading: false,\n isPurgeUrlsLoading: false,\n isPurgeZoneLoading: false\n });\n this.getChartStats(this.selectedPeriod.value);\n }\n\n readonly vm$ = this.select(\n ({ isChartLoading, chartBandwidthData, chartRequestsData, statsData, cdnDomain }) => ({\n chartBandwidthData,\n chartRequestsData,\n statsData,\n isChartLoading,\n cdnDomain\n })\n );\n\n readonly vmPurgeLoaders$ = this.select(({ isPurgeUrlsLoading, isPurgeZoneLoading }) => ({\n isPurgeUrlsLoading,\n isPurgeZoneLoading\n }));\n\n readonly updateChartState = this.updater(\n (\n state,\n chartData: Omit<\n DotCDNState,\n 'isChartLoading' | 'isPurgeUrlsLoading' | 'isPurgeZoneLoading'\n >\n ) => {\n return {\n ...state,\n chartBandwidthData: chartData.chartBandwidthData,\n chartRequestsData: chartData.chartRequestsData,\n cdnDomain: chartData.cdnDomain,\n statsData: chartData.statsData\n };\n }\n );\n\n /**\n * Handles the chart data fetching\n *\n * @memberof DotCDNStore\n */\n getChartStats = this.effect(\n (period$: Observable): Observable => {\n return period$.pipe(\n mergeMap((period: string) => {\n // Dispatch the loading state\n this.dispatchLoading({\n loadingState: LoadingState.LOADING,\n loader: Loader.CHART\n });\n return this.dotCdnService.requestStats(period).pipe(\n tapResponse(\n (data: DotCDNStats) => {\n // Now the chart is loaded\n this.dispatchLoading({\n loadingState: LoadingState.LOADED,\n loader: Loader.CHART\n });\n\n const {\n statsData,\n chartData: [chartBandwidthData, chartRequestsData],\n cdnDomain\n } = this.getChartStatsData(data);\n\n this.updateChartState({\n chartBandwidthData,\n chartRequestsData,\n statsData,\n cdnDomain\n });\n },\n (error) => {\n // TODO: Handle error\n console.log(error);\n }\n )\n );\n })\n );\n }\n );\n\n /**\n * Dispatches a loading state\n *\n * @memberof DotCDNStore\n */\n readonly dispatchLoading = this.updater(\n (state, action: { loadingState: string; loader: string }) => {\n switch (action.loader) {\n case Loader.CHART:\n return {\n ...state,\n isChartLoading: action.loadingState === LoadingState.LOADING\n };\n case Loader.PURGE_URLS:\n return {\n ...state,\n isPurgeUrlsLoading: action.loadingState === LoadingState.LOADING\n };\n case Loader.PURGE_PULL_ZONE:\n return {\n ...state,\n isPurgeZoneLoading: action.loadingState === LoadingState.LOADING\n };\n }\n }\n );\n\n /**\n * Purges the CDN cache\n *\n * @param {boolean} [invalidateAll=false]\n * @param {string[]} [urls]\n * @return {*} {(Observable> | void)}\n * @memberof DotCDNStore\n */\n\n purgeCDNCache(urls: string[]): Observable {\n const loading$ = of(\n this.dispatchLoading({\n loadingState: LoadingState.LOADING,\n loader: Loader.PURGE_URLS\n })\n );\n return loading$.pipe(\n switchMapTo(\n this.dotCdnService.purgeCache(urls).pipe(\n tap(() => {\n this.dispatchLoading({\n loadingState: LoadingState.LOADED,\n loader: Loader.PURGE_URLS\n });\n })\n )\n )\n );\n }\n\n purgeCDNCacheAll(): void {\n const $loading = of(\n this.dispatchLoading({\n loadingState: LoadingState.LOADING,\n loader: Loader.PURGE_PULL_ZONE\n })\n );\n\n $loading\n .pipe(switchMapTo(this.dotCdnService.purgeCacheAll()), pluck('bodyJsonObject'))\n .subscribe(() => {\n this.dispatchLoading({\n loadingState: LoadingState.LOADED,\n loader: Loader.PURGE_PULL_ZONE\n });\n });\n }\n\n private getChartStatsData({ stats }: DotCDNStats) {\n const chartData: ChartData[] = [\n {\n labels: this.getLabels(stats.bandwidthUsedChart),\n datasets: [\n {\n label: 'Bandwidth Used',\n data: Object.values(stats.bandwidthUsedChart).map((values) =>\n (values / 1e6).toFixed(2).toString()\n ),\n borderColor: '#6f5fa3',\n fill: false\n }\n ]\n },\n {\n labels: this.getLabels(stats.requestsServedChart),\n datasets: [\n {\n label: 'Requests Served',\n data: Object.values(\n stats.requestsServedChart\n ).map((value: number): string => value.toString()),\n borderColor: '#FFA726',\n fill: false\n }\n ]\n }\n ];\n\n const statsData: DotChartStats[] = [\n {\n label: 'Bandwidth Used',\n value: stats.bandwidthPretty,\n icon: 'insert_chart_outlined'\n },\n {\n label: 'Requests Served',\n value: `${stats.totalRequestsServed}`,\n icon: 'file_download'\n },\n {\n label: 'Cache Hit Rate',\n value: `${stats.cacheHitRate.toFixed(2)}%`,\n icon: 'file_download'\n }\n ];\n\n return { chartData, statsData, cdnDomain: stats.cdnDomain };\n }\n\n private formatDate(date) {\n return new Date(date).toLocaleDateString('en-GB', {\n month: '2-digit',\n day: '2-digit'\n });\n }\n\n /**\n *\n * This private method is responsible for transforming the keys from bandwidthUsedChart in order to make it more readable\n * It takes the timestamp and removes the time from the string\n */\n private getLabels(data: { [key: string]: number }): string[] {\n return Object.keys(data).map((label) => {\n return this.formatDate(label.split('T')[0]);\n });\n }\n}\n", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "dotCdnService", + "type": "DotCDNService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 20, + "jsdoctags": [ + { + "name": "dotCdnService", + "type": "DotCDNService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "extends": "ComponentStore", + "type": "injectable" + }, + { + "name": "DotClipboardUtil", + "id": "injectable-DotClipboardUtil-e0836ac689ec8174d9efc4e124b61635a69009398796a27d7a72e050f3ea45649245b1b32b2a0435940ef929244c5e33a7b88a7fb9fb9dac9cdb9aa33a03348d", + "file": "apps/dotcms-ui/src/app/api/util/clipboard/ClipboardUtil.ts", + "properties": [], + "methods": [ + { + "name": "copy", + "args": [ + { + "name": "text", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Promise", + "typeParameters": [], + "line": 20, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nCopy the passed string to the clipboard\n\n", + "description": "

Copy the passed string to the clipboard

\n", + "jsdoctags": [ + { + "name": "text", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "tagName": { + "pos": 277, + "end": 284, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "returns" + }, + "comment": "

Promise

\n" + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "description": "

Clipboard utils

\n", + "rawdescription": "\n\nClipboard utils\n\n", + "sourceCode": "import { Injectable } from '@angular/core';\n\n/**\n * Clipboard utils\n *\n * @export\n * @class DotClipboardUtil\n */\n@Injectable()\nexport class DotClipboardUtil {\n constructor() {}\n\n /**\n * Copy the passed string to the clipboard\n *\n * @param string text\n * @returns Promise\n * @memberof DotClipboardUtil\n */\n copy(text: string): Promise {\n /*\n Aparently this is the only crossbrowser solution so far. If we do this in another place we might have\n to include an npm module.\n */\n const txtArea = document.createElement('textarea');\n\n txtArea.style.position = 'fixed';\n txtArea.style.top = '0';\n txtArea.style.left = '0';\n txtArea.style.opacity = '0';\n txtArea.value = text;\n document.body.appendChild(txtArea);\n txtArea.select();\n\n let result;\n\n return new Promise((resolve, reject) => {\n try {\n result = document.execCommand('copy');\n resolve(result);\n } catch (err) {\n reject(result);\n }\n document.body.removeChild(txtArea);\n });\n }\n}\n", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [], + "line": 10 + }, + "type": "injectable" + }, + { + "name": "DotcmsConfigService", + "id": "injectable-DotcmsConfigService-45a6b4d7f75c0e497b68c4ac4596588b677d9631192f713ba3cd7da60bf6bc59ab4e9b374847046d5fed2f236ff6fca756c097baee0006b631f1b38081b0506a", + "file": "libs/dotcms-js/src/lib/core/dotcms-config.service.ts", + "properties": [ + { + "name": "configParamsSubject", + "defaultValue": "new BehaviorSubject(null)", + "deprecated": false, + "deprecationMessage": "", + "type": "BehaviorSubject", + "optional": false, + "description": "", + "line": 59, + "modifierKind": [121] + }, + { + "name": "configUrl", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 60, + "modifierKind": [121] + } + ], + "methods": [ + { + "name": "getConfig", + "args": [], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 72, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "getTimeZone", + "args": [], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 117, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nReturn a list of timezones.\n", + "description": "

Return a list of timezones.

\n", + "jsdoctags": [ + { + "tagName": { + "pos": 3511, + "end": 3518, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "returns" + }, + "comment": "

Observable<DotTimeZone[]>

\n" + } + ] + }, + { + "name": "loadConfig", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 78, + "deprecated": false, + "deprecationMessage": "" + } + ], + "deprecated": false, + "deprecationMessage": "", + "description": "", + "rawdescription": "\n", + "sourceCode": "import { CoreWebService } from './core-web.service';\nimport { Injectable } from '@angular/core';\nimport { Observable, BehaviorSubject } from 'rxjs';\nimport { pluck, filter, map } from 'rxjs/operators';\nimport { LoggerService } from './logger.service';\nimport { Menu } from './routing.service';\n\n/**\n * Created by josecastro on 7/29/16.\n *\n * Wraps the configuration properties for dotCMS in order to provide an\n * easier way to access the information.\n *\n */\nconst DOTCMS_WEBSOCKET_RECONNECT_TIME = 'dotcms.websocket.reconnect.time';\nconst DOTCMS_DISABLE_WEBSOCKET_PROTOCOL = 'dotcms.websocket.disable';\nconst DOTCMS_PAGINATOR_ROWS = 'dotcms.paginator.rows';\nconst DOTCMS_PAGINATOR_LINKS = 'dotcms.paginator.links';\nconst EMAIL_REGEX = 'emailRegex';\n\nexport interface DotUiColors {\n primary: string;\n secondary: string;\n background: string;\n}\n\nexport interface ConfigParams {\n colors: DotUiColors;\n emailRegex: string;\n license: {\n displayServerId: string;\n isCommunity: boolean;\n level: number;\n levelName: string;\n };\n logos: {\n loginScreen: string;\n navBar: string;\n };\n menu: Menu[];\n paginatorLinks: number;\n paginatorRows: number;\n websocket: WebSocketConfigParams;\n}\n\nexport interface WebSocketConfigParams {\n disabledWebsockets: boolean;\n websocketReconnectTime: number;\n}\n\nexport interface DotTimeZone {\n id: string;\n label: string;\n offset: string;\n}\n\n@Injectable()\nexport class DotcmsConfigService {\n private configParamsSubject: BehaviorSubject = new BehaviorSubject(null);\n private configUrl: string;\n\n /**\n * Initializes this class with the dotCMS core configuration parameters.\n *\n * @param configParams - The configuration properties for the current instance.\n */\n constructor(private coreWebService: CoreWebService, private loggerService: LoggerService) {\n this.configUrl = 'v1/appconfiguration';\n this.loadConfig();\n }\n\n getConfig(): Observable {\n return this.configParamsSubject\n .asObservable()\n .pipe(filter((config: ConfigParams) => !!config));\n }\n\n loadConfig(): void {\n this.loggerService.debug('Loading configuration on: ', this.configUrl);\n\n this.coreWebService\n .requestView({\n url: this.configUrl\n })\n .pipe(pluck('entity'))\n .subscribe((res: any) => {\n this.loggerService.debug('Configuration Loaded!', res);\n\n const configParams: ConfigParams = {\n colors: res.config.colors,\n emailRegex: res.config[EMAIL_REGEX],\n license: res.config.license,\n logos: res.config.logos,\n menu: res.menu,\n paginatorLinks: res.config[DOTCMS_PAGINATOR_LINKS],\n paginatorRows: res.config[DOTCMS_PAGINATOR_ROWS],\n websocket: {\n websocketReconnectTime:\n res.config.websocket[DOTCMS_WEBSOCKET_RECONNECT_TIME],\n disabledWebsockets: res.config.websocket[DOTCMS_DISABLE_WEBSOCKET_PROTOCOL]\n }\n };\n\n this.configParamsSubject.next(configParams);\n\n this.loggerService.debug('this.configParams', configParams);\n\n return res;\n });\n }\n\n /**\n * Return a list of timezones.\n * @returns Observable\n * @memberof DotcmsConfigService\n */\n getTimeZone(): Observable {\n return this.coreWebService\n .requestView({\n url: this.configUrl\n })\n .pipe(\n pluck('entity', 'config', 'timezones'),\n map((timezones: DotTimeZone[]) => {\n return timezones.sort((a: DotTimeZone, b: DotTimeZone) => {\n if (a.label > b.label) {\n return 1;\n }\n if (a.label < b.label) {\n return -1;\n }\n // a must be equal to b\n return 0;\n });\n })\n );\n }\n}\n", + "constructorObj": { + "name": "constructor", + "description": "

Initializes this class with the dotCMS core configuration parameters.

\n", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "coreWebService", + "type": "CoreWebService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "loggerService", + "type": "LoggerService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 60, + "rawdescription": "\n\nInitializes this class with the dotCMS core configuration parameters.\n\n", + "jsdoctags": [ + { + "name": "coreWebService", + "type": "CoreWebService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "loggerService", + "type": "LoggerService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "type": "injectable" + }, + { + "name": "DotcmsEventsService", + "id": "injectable-DotcmsEventsService-e3464cfddc6ab95ecdcb7497d4503ce9f697b71aa9209f1873d9450ffcfeff44800e6265c39ad64b3c3d5bee776e64b04b29c4af51937de45d3727964b95be16", + "file": "libs/dotcms-js/src/lib/core/dotcms-events.service.ts", + "properties": [ + { + "name": "messagesSub", + "deprecated": false, + "deprecationMessage": "", + "type": "Subscription", + "optional": false, + "description": "", + "line": 13, + "modifierKind": [121] + }, + { + "name": "subjects", + "defaultValue": "[]", + "deprecated": false, + "deprecationMessage": "", + "type": "[]", + "optional": false, + "description": "", + "line": 12, + "modifierKind": [121] + } + ], + "methods": [ + { + "name": "destroy", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 22, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nClose the socket\n\n", + "description": "

Close the socket

\n", + "jsdoctags": [] + }, + { + "name": "open", + "args": [], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 100, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nListen when the socket is opened\n\n", + "description": "

Listen when the socket is opened

\n", + "jsdoctags": [ + { + "tagName": { + "pos": 3170, + "end": 3177, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "returns" + }, + "comment": "

Observable

\n" + } + ] + }, + { + "name": "start", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 32, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nStart the socket\n\n", + "description": "

Start the socket

\n", + "jsdoctags": [] + }, + { + "name": "subscribeTo", + "args": [ + { + "name": "clientEventType", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": ["T"], + "line": 66, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nThis method will be called by clients that want to receive notifications\nregarding incoming system events. The events they will receive will be\nbased on the type of event clients register for.\n\n", + "description": "

This method will be called by clients that want to receive notifications\nregarding incoming system events. The events they will receive will be\nbased on the type of event clients register for.

\n", + "jsdoctags": [ + { + "name": "clientEventType", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "subscribeToEvents", + "args": [ + { + "name": "clientEventTypes", + "type": "string[]", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable>", + "typeParameters": ["T"], + "line": 79, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nSubscribe to multiple events from the DotCMS WebSocket\n\n", + "description": "

Subscribe to multiple events from the DotCMS WebSocket

\n", + "jsdoctags": [ + { + "name": "clientEventTypes", + "type": "string[]", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "description": "", + "rawdescription": "\n", + "sourceCode": "import { Injectable } from '@angular/core';\nimport { Observable, Subscription } from 'rxjs';\nimport { LoggerService } from './logger.service';\nimport { Subject } from 'rxjs';\nimport { DotEventTypeWrapper } from './models';\nimport { DotEventsSocket } from './util/dot-event-socket';\nimport { DotEventMessage } from './util/models/dot-event-message';\nimport { switchMap } from 'rxjs/operators';\n\n@Injectable()\nexport class DotcmsEventsService {\n private subjects = [];\n private messagesSub: Subscription;\n\n constructor(private dotEventsSocket: DotEventsSocket, private loggerService: LoggerService) {}\n\n /**\n * Close the socket\n *\n * @memberof DotcmsEventsService\n */\n destroy(): void {\n this.dotEventsSocket.destroy();\n this.messagesSub.unsubscribe();\n }\n\n /**\n * Start the socket\n *\n * @memberof DotcmsEventsService\n */\n start(): void {\n this.loggerService.debug('start DotcmsEventsService', this.dotEventsSocket.isConnected());\n if (!this.dotEventsSocket.isConnected()) {\n this.loggerService.debug('Connecting with socket');\n\n this.messagesSub = this.dotEventsSocket\n .connect()\n .pipe(switchMap(() => this.dotEventsSocket.messages()))\n .subscribe(\n ({ event, payload }: DotEventMessage) => {\n if (!this.subjects[event]) {\n this.subjects[event] = new Subject();\n }\n this.subjects[event].next(payload.data);\n },\n (e) => {\n this.loggerService.debug(\n 'Error in the System Events service: ' + e.message\n );\n },\n () => {\n this.loggerService.debug('Completed');\n }\n );\n }\n }\n\n /**\n * This method will be called by clients that want to receive notifications\n * regarding incoming system events. The events they will receive will be\n * based on the type of event clients register for.\n *\n * @memberof DotcmsEventsService\n */\n subscribeTo(clientEventType: string): Observable {\n if (!this.subjects[clientEventType]) {\n this.subjects[clientEventType] = new Subject();\n }\n\n return this.subjects[clientEventType].asObservable();\n }\n\n /**\n * Subscribe to multiple events from the DotCMS WebSocket\n *\n * @memberof DotcmsEventsService\n */\n subscribeToEvents(clientEventTypes: string[]): Observable> {\n const subject: Subject> = new Subject>();\n\n clientEventTypes.forEach((eventType: string) => {\n this.subscribeTo(eventType).subscribe((data: T) => {\n subject.next({\n data: data,\n name: eventType\n });\n });\n });\n\n return subject.asObservable();\n }\n\n /**\n * Listen when the socket is opened\n *\n * @returns Observable\n * @memberof DotcmsEventsService\n */\n open(): Observable {\n return this.dotEventsSocket.open();\n }\n}\n", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "dotEventsSocket", + "type": "DotEventsSocket", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "loggerService", + "type": "LoggerService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 13, + "jsdoctags": [ + { + "name": "dotEventsSocket", + "type": "DotEventsSocket", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "loggerService", + "type": "LoggerService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "type": "injectable" + }, + { + "name": "DotContainerContentletService", + "id": "injectable-DotContainerContentletService-4423061d8c83e8282ecc468b3f5aed551e1349411a9db21af8654366fe0acd2ebd7eb193c703586541ba440408b80c24fdbb01143541d0588ce38e56d07c6c42", + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/dot-container-contentlet.service.ts", + "properties": [], + "methods": [ + { + "name": "getContentletToContainer", + "args": [ + { + "name": "container", + "type": "DotPageContainer", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "content", + "type": "DotPageContent", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "page", + "type": "DotPage", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 23, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nGet the HTML of a contentlet inside a container\n\n", + "description": "

Get the HTML of a contentlet inside a container

\n", + "jsdoctags": [ + { + "name": "container", + "type": "DotPageContainer", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "content", + "type": "DotPageContent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "page", + "type": "DotPage", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "tagName": { + "pos": 793, + "end": 800, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "returns" + }, + "comment": "

Observable

\n" + } + ] + }, + { + "name": "getFormToContainer", + "args": [ + { + "name": "container", + "type": "DotPageContainer", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "form", + "type": "DotCMSContentType", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 43, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nGet the HTML of a form inside a container\n\n", + "description": "

Get the HTML of a form inside a container

\n", + "jsdoctags": [ + { + "name": "container", + "type": "DotPageContainer", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "form", + "type": "DotCMSContentType", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "tagName": { + "pos": 1426, + "end": 1433, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "returns" + }, + "comment": "

Observable

\n" + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "description": "", + "rawdescription": "\n", + "sourceCode": "import { pluck } from 'rxjs/operators';\nimport { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { DotPageContainer } from '../../../../shared/models/dot-page-container/dot-page-container.model';\nimport { DotPageContent } from '../../shared/models/dot-page-content.model';\nimport { DotCMSContentType } from '@dotcms/dotcms-models';\nimport { CoreWebService } from '@dotcms/dotcms-js';\nimport { DotPage } from '@dotcms/app/shared/models/dot-page/dot-page.model';\n\n@Injectable()\nexport class DotContainerContentletService {\n constructor(private coreWebService: CoreWebService) {}\n\n /**\n * Get the HTML of a contentlet inside a container\n *\n * @param DotPageContainer container\n * @param DotPageContent content\n * @param DotPage page\n * @returns Observable\n * @memberof DotContainerContentletService\n */\n getContentletToContainer(\n container: DotPageContainer,\n content: DotPageContent,\n page: DotPage\n ): Observable {\n return this.coreWebService\n .requestView({\n url: `v1/containers/content/${content.identifier}?containerId=${container.identifier}&pageInode=${page.inode}`\n })\n .pipe(pluck('entity', 'render'));\n }\n\n /**\n * Get the HTML of a form inside a container\n *\n * @param DotPageContainer container\n * @param ContentType form\n * @returns Observable\n * @memberof DotContainerContentletService\n */\n getFormToContainer(\n container: DotPageContainer,\n form: DotCMSContentType\n ): Observable<{ render: string; content: any }> {\n return this.coreWebService\n .requestView({\n url: `v1/containers/form/${form.id}?containerId=${container.identifier}`\n })\n .pipe(pluck('entity'));\n }\n}\n", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "coreWebService", + "type": "CoreWebService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 11, + "jsdoctags": [ + { + "name": "coreWebService", + "type": "CoreWebService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "type": "injectable" + }, + { + "name": "DotContentletEditorService", + "id": "injectable-DotContentletEditorService-ad64300f7ece5e08c38b9fb3bec577b9ece873dc704a29691d6952b03f937daa45976e558d82414f8e87507a7b460cb8f689d6ec5c2e21914e26fa1de24c488d", + "file": "apps/dotcms-ui/src/app/view/components/dot-contentlet-editor/services/dot-contentlet-editor.service.ts", + "properties": [ + { + "name": "_header", + "defaultValue": "new Subject()", + "deprecated": false, + "deprecationMessage": "", + "type": "Subject", + "optional": false, + "description": "", + "line": 34, + "modifierKind": [121] + }, + { + "name": "_keyDown", + "deprecated": false, + "deprecationMessage": "", + "type": "function", + "optional": false, + "description": "", + "line": 36, + "modifierKind": [121] + }, + { + "name": "_load", + "deprecated": false, + "deprecationMessage": "", + "type": "function", + "optional": false, + "description": "", + "line": 35, + "modifierKind": [121] + }, + { + "name": "close$", + "defaultValue": "new Subject()", + "deprecated": false, + "deprecationMessage": "", + "type": "Subject", + "optional": false, + "description": "", + "line": 30 + }, + { + "name": "data", + "defaultValue": "new Subject()", + "deprecated": false, + "deprecationMessage": "", + "type": "Subject", + "optional": false, + "description": "", + "line": 33, + "modifierKind": [121] + }, + { + "name": "draggedContentType$", + "defaultValue": "new Subject()", + "deprecated": false, + "deprecationMessage": "", + "type": "Subject", + "optional": false, + "description": "", + "line": 31 + } + ], + "methods": [ + { + "name": "add", + "args": [ + { + "name": "action", + "type": "DotEditorAction", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 92, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nSet data to add a contentlet\n\n", + "description": "

Set data to add a contentlet

\n", + "jsdoctags": [ + { + "name": "action", + "type": "DotEditorAction", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "bindEvents", + "args": [ + { + "name": "events", + "type": "DotAddEditEvents", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 173, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "events", + "type": "DotAddEditEvents", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "clear", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 111, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nClear data to add a contentlet\n\n", + "description": "

Clear data to add a contentlet

\n", + "jsdoctags": [] + }, + { + "name": "create", + "args": [ + { + "name": "action", + "type": "DotEditorAction", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 82, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nSet url to create a contentlet\n\n", + "description": "

Set url to create a contentlet

\n", + "jsdoctags": [ + { + "name": "action", + "type": "DotEditorAction", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "edit", + "args": [ + { + "name": "action", + "type": "DotEditorAction", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 102, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nSet data to edit a contentlet\n\n", + "description": "

Set data to edit a contentlet

\n", + "jsdoctags": [ + { + "name": "action", + "type": "DotEditorAction", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "geAddtUrl", + "args": [ + { + "name": "action", + "type": "DotEditorAction", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 182, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "action", + "type": "DotEditorAction", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getActionUrl", + "args": [ + { + "name": "contentTypeVariable", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 148, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nReturns action url to display create contentlet dialog\n", + "description": "

Returns action url to display create contentlet dialog

\n", + "jsdoctags": [ + { + "name": { + "pos": 3857, + "end": 3876, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "contentTypeVariable" + }, + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 3842, + "end": 3847, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 3848, + "end": 3856, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 3849, + "end": 3855, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 149 + } + } + }, + { + "tagName": { + "pos": 3885, + "end": 3892, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "returns" + }, + "comment": "

Observable

\n" + } + ] + }, + { + "name": "getCreateUrl", + "args": [ + { + "name": "action", + "type": "DotEditorAction", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 188, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "action", + "type": "DotEditorAction", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getEditUrl", + "args": [ + { + "name": "action", + "type": "DotEditorAction", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 192, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "action", + "type": "DotEditorAction", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "isAddUrl", + "args": [ + { + "name": "action", + "type": "DotEditorAction", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 206, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "action", + "type": "DotEditorAction", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "isCreateUrl", + "args": [ + { + "name": "action", + "type": "DotEditorAction", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 210, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "action", + "type": "DotEditorAction", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "isEditUrl", + "args": [ + { + "name": "action", + "type": "DotEditorAction", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 214, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "action", + "type": "DotEditorAction", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "keyDown", + "args": [ + { + "name": "$event", + "type": "KeyboardEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 124, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nCall keydown handler\n\n", + "description": "

Call keydown handler

\n", + "jsdoctags": [ + { + "name": "$event", + "type": "KeyboardEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "load", + "args": [ + { + "name": "$event", + "type": "any", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 136, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nCall load handler\n\n", + "description": "

Call load handler

\n", + "jsdoctags": [ + { + "name": "$event", + "type": "any", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "setData", + "args": [ + { + "name": "action", + "type": "DotEditorAction", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 218, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "action", + "type": "DotEditorAction", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "setDraggedContentType", + "args": [ + { + "name": "contentType", + "type": "DotCMSContentType | DotCMSContentlet", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 169, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nSet the content Type being dragged from the Content palette\n", + "description": "

Set the content Type being dragged from the Content palette

\n", + "jsdoctags": [ + { + "name": { + "pos": 4610, + "end": 4621, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "contentType" + }, + "type": "DotCMSContentType | DotCMSContentlet", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 4584, + "end": 4589, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 4590, + "end": 4609, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 4591, + "end": 4608, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 177, + "typeName": { + "pos": 4591, + "end": 4608, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "DotCMSContentType" + } + } + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "description": "

Handle the url and events for add and edit contentlet components

\n", + "rawdescription": "\n\nHandle the url and events for add and edit contentlet components\n\n", + "sourceCode": "import { HttpErrorResponse } from '@angular/common/http';\nimport { CoreWebService } from '@dotcms/dotcms-js';\nimport { DotHttpErrorManagerService } from '@services/dot-http-error-manager/dot-http-error-manager.service';\nimport { Injectable } from '@angular/core';\nimport { Subject, Observable, of } from 'rxjs';\nimport { mergeMap, map, filter, catchError, pluck, take } from 'rxjs/operators';\nimport { DotCMSContentlet, DotCMSContentType } from '@dotcms/dotcms-models';\n\ninterface DotAddEditEvents {\n load?: ($event: any) => void;\n keyDown?: ($event: any) => void;\n}\n\nexport interface DotEditorAction {\n header?: string;\n data: {\n [key: string]: string;\n };\n events?: DotAddEditEvents;\n}\n\n/**\n * Handle the url and events for add and edit contentlet components\n *\n * @export\n * @class DotContentletEditorService\n */\n@Injectable()\nexport class DotContentletEditorService {\n close$: Subject = new Subject();\n draggedContentType$: Subject = new Subject();\n\n private data: Subject = new Subject();\n private _header: Subject = new Subject();\n private _load: ($event: any) => void;\n private _keyDown: ($event: KeyboardEvent) => void;\n\n constructor(\n private coreWebService: CoreWebService,\n private httpErrorManagerService: DotHttpErrorManagerService\n ) {}\n\n get addUrl$(): Observable {\n return this.data.pipe(\n filter((action: DotEditorAction) => this.isAddUrl(action)),\n map((action: DotEditorAction) => this.geAddtUrl(action))\n );\n }\n\n get editUrl$(): Observable {\n return this.data.pipe(\n filter((action: DotEditorAction) => this.isEditUrl(action)),\n mergeMap((action: DotEditorAction) => of(this.getEditUrl(action)))\n );\n }\n\n get createUrl$(): Observable {\n return this.data.pipe(\n filter((action: DotEditorAction) => this.isCreateUrl(action)),\n map((action: DotEditorAction) => this.getCreateUrl(action))\n );\n }\n\n get header$(): Observable {\n return this._header;\n }\n\n get loadHandler(): ($event: any) => void {\n return this._load;\n }\n\n get keyDownHandler(): ($event: any) => void {\n return this._keyDown;\n }\n\n /**\n * Set url to create a contentlet\n *\n * @param DotEditorAction action\n * @memberof DotContentletEditorService\n */\n create(action: DotEditorAction): void {\n this.setData(action);\n }\n\n /**\n * Set data to add a contentlet\n *\n * @param DotEditorAction action\n * @memberof DotAddContentletServicex\n */\n add(action: DotEditorAction): void {\n this.setData(action);\n }\n\n /**\n * Set data to edit a contentlet\n *\n * @param DotEditorAction action\n * @memberof DotContentletEditorService\n */\n edit(action: DotEditorAction): void {\n this.setData(action);\n }\n\n /**\n * Clear data to add a contentlet\n *\n * @memberof DotAddContentletService\n */\n clear() {\n this.data.next(null);\n this._load = null;\n this._keyDown = null;\n this.close$.next(true);\n }\n\n /**\n * Call keydown handler\n *\n * @param KeyboardEvent $event\n * @memberof DotContentletEditorService\n */\n keyDown($event: KeyboardEvent): void {\n if (this._keyDown) {\n this._keyDown($event);\n }\n }\n\n /**\n * Call load handler\n *\n * @param * $event\n * @memberof DotContentletEditorService\n */\n load($event: any): void {\n if (this._load) {\n this._load($event);\n }\n }\n\n /**\n * Returns action url to display create contentlet dialog\n * @param {string} contentTypeVariable\n * @returns Observable\n * @memberof DotContentletEditorService\n */\n getActionUrl(contentTypeVariable: string): Observable {\n return this.coreWebService\n .requestView({\n url: `v1/portlet/_actionurl/${contentTypeVariable}`\n })\n .pipe(\n pluck('entity'),\n catchError((error: HttpErrorResponse) => {\n return this.httpErrorManagerService.handle(error).pipe(\n take(1),\n map(() => null)\n );\n })\n );\n }\n\n /**\n * Set the content Type being dragged from the Content palette\n * @param {DotCMSContentType} contentType\n * @memberof DotContentletEditorService\n */\n setDraggedContentType(contentType: DotCMSContentType | DotCMSContentlet): void {\n this.draggedContentType$.next(contentType);\n }\n\n private bindEvents(events: DotAddEditEvents): void {\n if (events.load) {\n this._load = events.load;\n }\n if (events.keyDown) {\n this._keyDown = events.keyDown;\n }\n }\n\n private geAddtUrl(action: DotEditorAction): string {\n return action === null\n ? ''\n : `/html/ng-contentlet-selector.jsp?ng=true&container_id=${action.data.container}&add=${action.data.baseTypes}`;\n }\n\n private getCreateUrl(action: DotEditorAction): string {\n return action === null ? '' : action.data.url;\n }\n\n private getEditUrl(action: DotEditorAction): string {\n return action === null\n ? ''\n : [\n `/c/portal/layout`,\n `?p_p_id=content`,\n `&p_p_action=1`,\n `&p_p_state=maximized`,\n `&p_p_mode=view`,\n `&_content_struts_action=%2Fext%2Fcontentlet%2Fedit_contentlet`,\n `&_content_cmd=edit&inode=${action.data.inode}`\n ].join('');\n }\n\n private isAddUrl(action: DotEditorAction): boolean {\n return action === null || !!action.data.container;\n }\n\n private isCreateUrl(action: DotEditorAction): boolean {\n return action === null || !!action.data.url;\n }\n\n private isEditUrl(action: DotEditorAction): boolean {\n return action === null || !!action.data.inode;\n }\n\n private setData(action: DotEditorAction): void {\n if (action.events) {\n this.bindEvents(action.events);\n }\n\n if (action.header) {\n this._header.next(action.header);\n }\n\n this.data.next({\n data: action.data\n });\n }\n}\n", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "coreWebService", + "type": "CoreWebService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "httpErrorManagerService", + "type": "DotHttpErrorManagerService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 36, + "jsdoctags": [ + { + "name": "coreWebService", + "type": "CoreWebService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "httpErrorManagerService", + "type": "DotHttpErrorManagerService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "accessors": { + "addUrl$": { + "name": "addUrl$", + "getSignature": { + "name": "addUrl$", + "type": "", + "returnType": "Observable", + "line": 43 + } + }, + "editUrl$": { + "name": "editUrl$", + "getSignature": { + "name": "editUrl$", + "type": "", + "returnType": "Observable", + "line": 50 + } + }, + "createUrl$": { + "name": "createUrl$", + "getSignature": { + "name": "createUrl$", + "type": "", + "returnType": "Observable", + "line": 57 + } + }, + "header$": { + "name": "header$", + "getSignature": { + "name": "header$", + "type": "", + "returnType": "Observable", + "line": 64 + } + }, + "loadHandler": { + "name": "loadHandler", + "getSignature": { + "name": "loadHandler", + "type": "function", + "returnType": "void", + "line": 68 + } + }, + "keyDownHandler": { + "name": "keyDownHandler", + "getSignature": { + "name": "keyDownHandler", + "type": "function", + "returnType": "void", + "line": 72 + } + } + }, + "type": "injectable" + }, + { + "name": "DotContentletLockerService", + "id": "injectable-DotContentletLockerService-79a7d46b63d40af1b3c740b857f60294e15fbf8a2072d09f1ba4ad98e1ca5a12a715e3a7540a72db8b75943e9e6c8ebf2f811a06c09f361217daa817ccf7d3fb", + "file": "apps/dotcms-ui/src/app/api/services/dot-contentlet-locker/dot-contentlet-locker.service.ts", + "properties": [], + "methods": [ + { + "name": "lock", + "args": [ + { + "name": "inode", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 17, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nLock a content asset\n\n", + "description": "

Lock a content asset

\n", + "jsdoctags": [ + { + "name": "inode", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "tagName": { + "pos": 366, + "end": 373, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "returns" + }, + "comment": "

Observable

\n" + } + ] + }, + { + "name": "unlock", + "args": [ + { + "name": "inode", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 33, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nUnlock a content asset\n\n", + "description": "

Unlock a content asset

\n", + "jsdoctags": [ + { + "name": "inode", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "tagName": { + "pos": 769, + "end": 776, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "returns" + }, + "comment": "

Observable

\n" + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "description": "", + "rawdescription": "\n", + "sourceCode": "import { pluck } from 'rxjs/operators';\nimport { CoreWebService } from '@dotcms/dotcms-js';\nimport { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\n\n@Injectable()\nexport class DotContentletLockerService {\n constructor(private coreWebService: CoreWebService) {}\n\n /**\n * Lock a content asset\n *\n * @param string inode\n * @returns Observable\n * @memberof PageViewService\n */\n lock(inode: string): Observable {\n return this.coreWebService\n .requestView({\n method: 'PUT',\n url: `/api/content/lock/inode/${inode}`\n })\n .pipe(pluck('bodyJsonObject'));\n }\n\n /**\n * Unlock a content asset\n *\n * @param string inode\n * @returns Observable\n * @memberof PageViewService\n */\n unlock(inode: string): Observable {\n return this.coreWebService\n .requestView({\n method: 'PUT',\n url: `/api/content/unlock/inode/${inode}`\n })\n .pipe(pluck('bodyJsonObject'));\n }\n}\n", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "coreWebService", + "type": "CoreWebService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 7, + "jsdoctags": [ + { + "name": "coreWebService", + "type": "CoreWebService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "type": "injectable" + }, + { + "name": "DotContentTypeService", + "id": "injectable-DotContentTypeService-f3dd0c2fc293663579a508dbf09fe6be4567e5f4726e49a2008248ebba5d59443a4a41f168246e3d60d993a023a4da58138dbc43f0826a6c88c77e1ac2c73861", + "file": "apps/dotcms-ui/src/app/api/services/dot-content-type/dot-content-type.service.ts", + "properties": [], + "methods": [ + { + "name": "getAllContentTypes", + "args": [], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 44, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nGets all content types excluding the RECENT ones\n\n", + "description": "

Gets all content types excluding the RECENT ones

\n", + "jsdoctags": [ + { + "tagName": { + "pos": 1413, + "end": 1420, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "returns" + }, + "comment": "

Observable<StructureTypeView[]>

\n" + } + ] + }, + { + "name": "getBaseTypes", + "args": [], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 91, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "getContentType", + "args": [ + { + "name": "idOrVar", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 17, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nGet a content type by id or variable name\n", + "description": "

Get a content type by id or variable name

\n", + "jsdoctags": [ + { + "name": { + "pos": 539, + "end": 546, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "idOrVar" + }, + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 533, + "end": 538, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "

content type's id or variable name

\n" + }, + { + "tagName": { + "pos": 590, + "end": 597, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "returns" + }, + "comment": "

Content Type

\n" + } + ] + }, + { + "name": "getContentTypes", + "args": [ + { + "name": "filter", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "''" + }, + { + "name": "page", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "40" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 31, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nGet the content types from the endpoint\n\n", + "description": "

Get the content types from the endpoint

\n", + "jsdoctags": [ + { + "name": "filter", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "''", + "tagName": { + "text": "param" + } + }, + { + "name": "page", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "40", + "tagName": { + "text": "param" + } + }, + { + "tagName": { + "pos": 938, + "end": 945, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "returns" + }, + "comment": "", + "returnType": "" + } + ] + }, + { + "name": "getUrlById", + "args": [ + { + "name": "id", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 60, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nGet url by id\n\n", + "description": "

Get url by id

\n", + "jsdoctags": [ + { + "name": "id", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "tagName": { + "pos": 1863, + "end": 1870, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "returns" + }, + "comment": "

Observable

\n" + } + ] + }, + { + "name": "isContentTypeInMenu", + "args": [ + { + "name": "id", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 80, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nCheck is the content types is present in the object\n\n", + "description": "

Check is the content types is present in the object

\n", + "jsdoctags": [ + { + "name": "id", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "tagName": { + "pos": 2514, + "end": 2521, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "returns" + }, + "comment": "

Observable

\n" + } + ] + }, + { + "name": "isRecentContentType", + "args": [ + { + "name": "type", + "type": "StructureTypeView", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 87, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "type", + "type": "StructureTypeView", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "description": "", + "rawdescription": "\n", + "sourceCode": "import { toArray, defaultIfEmpty, map, pluck, flatMap, filter, take } from 'rxjs/operators';\nimport { CoreWebService } from '@dotcms/dotcms-js';\nimport { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { StructureTypeView, ContentTypeView } from '@models/contentlet';\nimport { DotCMSContentType } from '@dotcms/dotcms-models';\n\n@Injectable()\nexport class DotContentTypeService {\n constructor(private coreWebService: CoreWebService) {}\n\n /**\n * Get a content type by id or variable name\n * @param idOrVar content type's id or variable name\n * @returns Content Type\n */\n getContentType(idOrVar: string): Observable {\n return this.coreWebService\n .requestView({\n url: `v1/contenttype/id/${idOrVar}`\n })\n .pipe(take(1), pluck('entity'));\n }\n\n /**\n *Get the content types from the endpoint\n *\n * @returns {Observable}\n * @memberof DotContentTypeService\n */\n getContentTypes(filter = '', page = 40): Observable {\n return this.coreWebService\n .requestView({\n url: `/api/v1/contenttype?filter=${filter}&orderby=modDate&direction=DESC&per_page=${page}`\n })\n .pipe(pluck('entity'));\n }\n\n /**\n * Gets all content types excluding the RECENT ones\n *\n * @returns Observable\n */\n getAllContentTypes(): Observable {\n return this.getBaseTypes()\n .pipe(\n flatMap((structures: StructureTypeView[]) => structures),\n filter((structure: StructureTypeView) => !this.isRecentContentType(structure))\n )\n .pipe(toArray());\n }\n\n /**\n * Get url by id\n *\n * @param string id\n * @returns Observable\n * @memberof ContentletService\n */\n getUrlById(id: string): Observable {\n return this.getBaseTypes().pipe(\n flatMap((structures: StructureTypeView[]) => structures),\n pluck('types'),\n flatMap((contentTypeViews: ContentTypeView[]) => contentTypeViews),\n filter(\n (contentTypeView: ContentTypeView) =>\n contentTypeView.variable.toLocaleLowerCase() === id\n ),\n pluck('action')\n );\n }\n\n /**\n * Check is the content types is present in the object\n *\n * @param string id\n * @returns Observable\n * @memberof ContentletService\n */\n isContentTypeInMenu(id: string): Observable {\n return this.getUrlById(id).pipe(\n map((url: string) => !!url),\n defaultIfEmpty(false)\n );\n }\n\n private isRecentContentType(type: StructureTypeView): boolean {\n return type.name.startsWith('RECENT');\n }\n\n private getBaseTypes(): Observable {\n return this.coreWebService\n .requestView({\n url: 'v1/contenttype/basetypes'\n })\n .pipe(pluck('entity'));\n }\n}\n", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "coreWebService", + "type": "CoreWebService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 9, + "jsdoctags": [ + { + "name": "coreWebService", + "type": "CoreWebService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "type": "injectable" + }, + { + "name": "DotContentTypesInfoService", + "id": "injectable-DotContentTypesInfoService-84ce91ebc0979d6e8bcedd1ec2600ec6a6cee8ddf3214598b7b851240e5c864921fa3063c096f64d4e5b0c64a5722862d1ab4251c4bfd36759b421fe3c333c09", + "file": "apps/dotcms-ui/src/app/api/services/dot-content-types-info/dot-content-types-info.service.ts", + "properties": [ + { + "name": "contentTypeInfoCollection", + "defaultValue": "[\n {\n clazz: 'com.dotcms.contenttype.model.type.ImmutableSimpleContentType',\n icon: 'event_note',\n label: 'content'\n },\n {\n clazz: 'com.dotcms.contenttype.model.type.ImmutableWidgetContentType',\n icon: 'settings',\n label: 'widget'\n },\n {\n clazz: 'com.dotcms.contenttype.model.type.ImmutableFileAssetContentType',\n icon: 'insert_drive_file',\n label: 'fileasset'\n },\n {\n clazz: 'com.dotcms.contenttype.model.type.ImmutableDotAssetContentType',\n icon: 'file_copy',\n label: 'dotasset'\n },\n {\n clazz: 'com.dotcms.contenttype.model.type.ImmutablePageContentType',\n icon: 'description',\n label: 'htmlpage'\n },\n {\n clazz: 'com.dotcms.contenttype.model.type.ImmutablePersonaContentType',\n icon: 'person',\n label: 'persona'\n },\n {\n clazz: 'com.dotcms.contenttype.model.type.ImmutableFormContentType',\n icon: 'format_list_bulleted',\n label: 'form'\n },\n {\n clazz: 'com.dotcms.contenttype.model.type.ImmutableVanityUrlContentType',\n icon: 'format_strikethrough',\n label: 'vanity_url'\n },\n {\n clazz: 'com.dotcms.contenttype.model.type.ImmutableKeyValueContentType',\n icon: 'public',\n label: 'key_value'\n },\n /*\n PrimeNG used to use Font Awesome icons, now they are releasing with their own\n icon package \"PrimeIcons\" but they don't have many icons yet, so we keep\n using FA icons until we have a better icon offer from them.\n */\n {\n clazz: 'com.dotcms.contenttype.model.type.ImmutableSimpleContentType',\n icon: 'fa fa-newspaper-o',\n label: 'content_old'\n },\n {\n clazz: 'com.dotcms.contenttype.model.type.ImmutableWidgetContentType',\n icon: 'fa fa-cog',\n label: 'widget_old'\n },\n {\n clazz: 'com.dotcms.contenttype.model.type.ImmutableFileAssetContentType',\n icon: 'fa fa-file-o',\n label: 'fileasset_old'\n },\n {\n clazz: 'com.dotcms.contenttype.model.type.ImmutableDotAssetContentType',\n icon: 'fa fa-files-o',\n label: 'dotasset_old'\n },\n {\n clazz: 'com.dotcms.contenttype.model.type.ImmutablePageContentType',\n icon: 'fa fa-file-text-o',\n label: 'htmlpage_old'\n },\n {\n clazz: 'com.dotcms.contenttype.model.type.ImmutablePersonaContentType',\n icon: 'fa fa-user',\n label: 'persona_old'\n },\n {\n clazz: 'com.dotcms.contenttype.model.type.ImmutableFormContentType',\n icon: 'fa fa-list',\n label: 'form_old'\n },\n {\n clazz: 'com.dotcms.contenttype.model.type.ImmutableVanityUrlContentType',\n icon: 'fa fa-map-signs',\n label: 'vanity_url_old'\n },\n {\n clazz: 'com.dotcms.contenttype.model.type.ImmutableKeyValueContentType',\n icon: 'fa fa-globe',\n label: 'key_value_old'\n }\n // TODO: Remove this when set Material Design icons on NgPrime native components - END\n ]", + "deprecated": false, + "deprecationMessage": "", + "type": "[]", + "optional": false, + "description": "", + "line": 10, + "modifierKind": [121] + } + ], + "methods": [ + { + "name": "getClazz", + "args": [ + { + "name": "type", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 128, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nReturn an icon class property base on the content type name\n\n", + "description": "

Return an icon class property base on the content type name

\n", + "jsdoctags": [ + { + "name": "type", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "tagName": { + "pos": 4070, + "end": 4077, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "returns" + }, + "comment": "

string

\n" + } + ] + }, + { + "name": "getIcon", + "args": [ + { + "name": "type", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 117, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nReturn an icon class base on the content type name\n\n\n", + "description": "

Return an icon class base on the content type name

\n", + "jsdoctags": [ + { + "name": "type", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "tagName": { + "pos": 3797, + "end": 3804, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "returns" + }, + "comment": "

string

\n" + } + ] + }, + { + "name": "getItem", + "args": [ + { + "name": "type", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "prop", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 144, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "type", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "prop", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getLabel", + "args": [ + { + "name": "type", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 139, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nReturn the label property base on the content type name\n\n", + "description": "

Return the label property base on the content type name

\n", + "jsdoctags": [ + { + "name": "type", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "tagName": { + "pos": 4334, + "end": 4341, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "returns" + }, + "comment": "

string

\n" + } + ] + }, + { + "name": "getTypeName", + "args": [ + { + "name": "type", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 177, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nSome endpoints have different name/labels for the same content types\n", + "description": "

Some endpoints have different name/labels for the same content types

\n", + "modifierKind": [121], + "jsdoctags": [ + { + "name": { + "pos": 5672, + "end": 5676, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "originalKeywordKind": 151, + "escapedText": "type" + }, + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 5666, + "end": 5671, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "" + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "description": "

Provide data for the content types items

\n", + "rawdescription": "\n\nProvide data for the content types items\n", + "sourceCode": "import { Injectable } from '@angular/core';\n\n/**\n * Provide data for the content types items\n * @DotContentTypesInfoService\n * @class CrudService\n */\n@Injectable()\nexport class DotContentTypesInfoService {\n private contentTypeInfoCollection = [\n {\n clazz: 'com.dotcms.contenttype.model.type.ImmutableSimpleContentType',\n icon: 'event_note',\n label: 'content'\n },\n {\n clazz: 'com.dotcms.contenttype.model.type.ImmutableWidgetContentType',\n icon: 'settings',\n label: 'widget'\n },\n {\n clazz: 'com.dotcms.contenttype.model.type.ImmutableFileAssetContentType',\n icon: 'insert_drive_file',\n label: 'fileasset'\n },\n {\n clazz: 'com.dotcms.contenttype.model.type.ImmutableDotAssetContentType',\n icon: 'file_copy',\n label: 'dotasset'\n },\n {\n clazz: 'com.dotcms.contenttype.model.type.ImmutablePageContentType',\n icon: 'description',\n label: 'htmlpage'\n },\n {\n clazz: 'com.dotcms.contenttype.model.type.ImmutablePersonaContentType',\n icon: 'person',\n label: 'persona'\n },\n {\n clazz: 'com.dotcms.contenttype.model.type.ImmutableFormContentType',\n icon: 'format_list_bulleted',\n label: 'form'\n },\n {\n clazz: 'com.dotcms.contenttype.model.type.ImmutableVanityUrlContentType',\n icon: 'format_strikethrough',\n label: 'vanity_url'\n },\n {\n clazz: 'com.dotcms.contenttype.model.type.ImmutableKeyValueContentType',\n icon: 'public',\n label: 'key_value'\n },\n /*\n PrimeNG used to use Font Awesome icons, now they are releasing with their own\n icon package \"PrimeIcons\" but they don't have many icons yet, so we keep\n using FA icons until we have a better icon offer from them.\n */\n {\n clazz: 'com.dotcms.contenttype.model.type.ImmutableSimpleContentType',\n icon: 'fa fa-newspaper-o',\n label: 'content_old'\n },\n {\n clazz: 'com.dotcms.contenttype.model.type.ImmutableWidgetContentType',\n icon: 'fa fa-cog',\n label: 'widget_old'\n },\n {\n clazz: 'com.dotcms.contenttype.model.type.ImmutableFileAssetContentType',\n icon: 'fa fa-file-o',\n label: 'fileasset_old'\n },\n {\n clazz: 'com.dotcms.contenttype.model.type.ImmutableDotAssetContentType',\n icon: 'fa fa-files-o',\n label: 'dotasset_old'\n },\n {\n clazz: 'com.dotcms.contenttype.model.type.ImmutablePageContentType',\n icon: 'fa fa-file-text-o',\n label: 'htmlpage_old'\n },\n {\n clazz: 'com.dotcms.contenttype.model.type.ImmutablePersonaContentType',\n icon: 'fa fa-user',\n label: 'persona_old'\n },\n {\n clazz: 'com.dotcms.contenttype.model.type.ImmutableFormContentType',\n icon: 'fa fa-list',\n label: 'form_old'\n },\n {\n clazz: 'com.dotcms.contenttype.model.type.ImmutableVanityUrlContentType',\n icon: 'fa fa-map-signs',\n label: 'vanity_url_old'\n },\n {\n clazz: 'com.dotcms.contenttype.model.type.ImmutableKeyValueContentType',\n icon: 'fa fa-globe',\n label: 'key_value_old'\n }\n // TODO: Remove this when set Material Design icons on NgPrime native components - END\n ];\n\n /**\n * Return an icon class base on the content type name\n *\n * @param string type\n * @returns string\n *\n * @memberof ContentTypesInfoService\n */\n getIcon(type: string): string {\n return this.getItem(type, 'icon');\n }\n\n /**\n * Return an icon class property base on the content type name\n *\n * @param string type\n * @returns string\n * @memberof ContentTypesInfoService\n */\n getClazz(type: string): string {\n return this.getItem(type, 'clazz');\n }\n\n /**\n * Return the label property base on the content type name\n *\n * @param string type\n * @returns string\n * @memberof ContentTypesInfoService\n */\n getLabel(type: string): string {\n return this.getItem(type, 'label');\n }\n\n // tslint:disable-next-line:cyclomatic-complexity\n private getItem(type: string, prop: string): string {\n let result: any;\n // TODO: Remove this when set Material Design icons on NgPrime native components - BEGIN\n let oldValue = false;\n if (type.indexOf('_old') > 0) {\n oldValue = true;\n type = type.replace('_old', '');\n }\n // TODO: Remove this when set Material Design icons on NgPrime native components - END\n\n if (type) {\n type = this.getTypeName(type);\n\n for (let i = 0; i < this.contentTypeInfoCollection.length; i++) {\n const item = this.contentTypeInfoCollection[i];\n if (\n item.clazz.toLocaleLowerCase() === type.toLocaleLowerCase() ||\n item.label.toLocaleLowerCase() ===\n (oldValue ? `${type}_old` : type).toLocaleLowerCase()\n ) {\n result = item[prop];\n break;\n }\n }\n }\n\n return result;\n }\n\n /**\n * Some endpoints have different name/labels for the same content types\n * @param type\n */\n private getTypeName(type: string): string {\n if (type === 'htmlpage') {\n type = 'HTMLPAGE';\n }\n if (type === 'FILE' || type === 'file' || type === 'File') {\n type = 'FILEASSET';\n }\n\n return type;\n }\n}\n", + "type": "injectable" + }, + { + "name": "DotCrudService", + "id": "injectable-DotCrudService-daa2827e5cab6a26f84da45a4d2c66df84816b61d4b9dd3f9288d3e20be8fa1659fc709061f410600673236a1985e8bcf0f6b289ff9a665d72730acd83abea7b", + "file": "apps/dotcms-ui/src/app/api/services/dot-crud/dot-crud.service.ts", + "properties": [], + "methods": [ + { + "name": "delete", + "args": [ + { + "name": "baseUrl", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "id", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 76, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nDelete item by id from the data loaded\n\n", + "description": "

Delete item by id from the data loaded

\n", + "jsdoctags": [ + { + "name": "baseUrl", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "id", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "tagName": { + "pos": 1987, + "end": 1994, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "returns" + }, + "comment": "

Observable

\n" + } + ] + }, + { + "name": "getDataById", + "args": [ + { + "name": "baseUrl", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "id", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "pick", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "'entity'" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 60, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nGet item by id from the data loaded\n\n", + "description": "

Get item by id from the data loaded

\n", + "jsdoctags": [ + { + "name": { + "pos": 1478, + "end": 1485, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "baseUrl" + }, + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 1463, + "end": 1468, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 1469, + "end": 1477, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 1470, + "end": 1476, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 149 + } + } + }, + { + "name": { + "pos": 1509, + "end": 1511, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "id" + }, + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 1494, + "end": 1499, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 1500, + "end": 1508, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 1501, + "end": 1507, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 149 + } + } + }, + { + "name": { + "pos": 1536, + "end": 1540, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "pick" + }, + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "'entity'", + "tagName": { + "pos": 1520, + "end": 1525, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 1526, + "end": 1534, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 1527, + "end": 1533, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 149 + } + } + }, + { + "tagName": { + "pos": 1559, + "end": 1566, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "returns" + }, + "comment": "", + "returnType": "" + } + ] + }, + { + "name": "postData", + "args": [ + { + "name": "baseUrl", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "data", + "type": "any", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 23, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nWill do a POST request and return the response to the url provide\nand the data as body of the request.\n", + "description": "

Will do a POST request and return the response to the url provide\nand the data as body of the request.

\n", + "modifierKind": [123], + "jsdoctags": [ + { + "name": "baseUrl", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "data", + "type": "any", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "tagName": { + "pos": 533, + "end": 540, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "returns" + }, + "comment": "

Observable

\n" + } + ] + }, + { + "name": "putData", + "args": [ + { + "name": "baseUrl", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "data", + "type": "any", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 41, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nWill do a PUT request and return the response to the url provide\nand the data as body of the request.\n", + "description": "

Will do a PUT request and return the response to the url provide\nand the data as body of the request.

\n", + "modifierKind": [123], + "jsdoctags": [ + { + "name": "baseUrl", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "data", + "type": "any", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "tagName": { + "pos": 1057, + "end": 1064, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "returns" + }, + "comment": "

Observable

\n" + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "description": "

Provides util listing methods

\n", + "rawdescription": "\n\nProvides util listing methods\n", + "sourceCode": "import { pluck } from 'rxjs/operators';\nimport { CoreWebService } from '@dotcms/dotcms-js';\nimport { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\n\n/**\n * Provides util listing methods\n * @export\n * @class CrudService\n */\n@Injectable()\nexport class DotCrudService {\n constructor(private coreWebService: CoreWebService) {}\n\n /**\n * Will do a POST request and return the response to the url provide\n * and the data as body of the request.\n * @param string baseUrl\n * @param * data\n * @returns Observable\n * @memberof CrudService\n */\n public postData(baseUrl: string, data: any): Observable {\n return this.coreWebService\n .requestView({\n body: data,\n method: 'POST',\n url: `${baseUrl}`\n })\n .pipe(pluck('entity'));\n }\n\n /**\n * Will do a PUT request and return the response to the url provide\n * and the data as body of the request.\n * @param string baseUrl\n * @param * data\n * @returns Observable\n * @memberof CrudService\n */\n public putData(baseUrl: string, data: any): Observable {\n return this.coreWebService\n .requestView({\n body: data,\n method: 'PUT',\n url: `${baseUrl}`\n })\n .pipe(pluck('entity'));\n }\n\n /**\n * Get item by id from the data loaded\n *\n * @param {string} baseUrl\n * @param {string} id\n * @param {string} [pick='entity']\n * @returns {Observable}\n * @memberof DotCrudService\n */\n getDataById(baseUrl: string, id: string, pick = 'entity'): Observable {\n return this.coreWebService\n .requestView({\n url: `${baseUrl}/id/${id}`\n })\n .pipe(pluck(pick));\n }\n\n /**\n * Delete item by id from the data loaded\n *\n * @param string baseUrl\n * @param string id\n * @returns Observable\n * @memberof CrudService\n */\n delete(baseUrl: string, id: string): Observable {\n return this.coreWebService\n .requestView({\n method: 'DELETE',\n url: `${baseUrl}/${id}`\n })\n .pipe(pluck('entity'));\n }\n}\n", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "coreWebService", + "type": "CoreWebService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 12, + "jsdoctags": [ + { + "name": "coreWebService", + "type": "CoreWebService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "type": "injectable" + }, + { + "name": "DotCrumbtrailService", + "id": "injectable-DotCrumbtrailService-60bee30c74c258e95cca5ca277dc4f8b4d654d0e7350d522ceeef22001bcd83d5743ac4fbe153d9245490c5f2ac0d0f1c06c9d8ff94117dc5ebc7a5bd0a6ed3b", + "file": "apps/dotcms-ui/src/app/view/components/dot-crumbtrail/service/dot-crumbtrail.service.ts", + "properties": [ + { + "name": "crumbTrail", + "defaultValue": "new BehaviorSubject([])", + "deprecated": false, + "deprecationMessage": "", + "type": "Subject", + "optional": false, + "description": "", + "line": 14, + "modifierKind": [121] + }, + { + "name": "dotNavigationService", + "deprecated": false, + "deprecationMessage": "", + "type": "DotNavigationService", + "optional": false, + "description": "", + "line": 24, + "modifierKind": [123] + }, + { + "name": "portletsTitlePathFinder", + "defaultValue": "{\n 'content-types-angular': 'contentType.name',\n 'edit-page': 'content.page.title',\n apps: 'data.name',\n templates: 'template.title'\n }", + "deprecated": false, + "deprecationMessage": "", + "type": "object", + "optional": false, + "description": "", + "line": 16, + "modifierKind": [121] + }, + { + "name": "URL_EXCLUDES", + "defaultValue": "['/content-types-angular/create/content']", + "deprecated": false, + "deprecationMessage": "", + "type": "[]", + "optional": false, + "description": "", + "line": 13, + "modifierKind": [121] + } + ], + "methods": [ + { + "name": "getCrumbtrail", + "args": [ + { + "name": "url", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 109, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "url", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getCrumbtrailSection", + "args": [ + { + "name": "sectionKey", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 84, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "sectionKey", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getData", + "args": [], + "optional": false, + "returnType": "Data", + "typeParameters": [], + "line": 97, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "getMenuLabel", + "args": [ + { + "name": "portletId", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 55, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "portletId", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "isPortletTitleAvailable", + "args": [ + { + "name": "url", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 133, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "url", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "shouldAddSection", + "args": [ + { + "name": "sections", + "type": "String[]", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "url", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 129, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "sections", + "type": "String[]", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "url", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "splitURL", + "args": [ + { + "name": "url", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "string[]", + "typeParameters": [], + "line": 51, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "url", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "description": "", + "rawdescription": "\n", + "sourceCode": "import { Injectable } from '@angular/core';\nimport {\n DotNavigationService,\n replaceSectionsMap\n} from '../../dot-navigation/services/dot-navigation.service';\nimport { map, switchMap, filter, take } from 'rxjs/operators';\nimport { NavigationEnd, Router, ActivatedRoute, Data } from '@angular/router';\nimport { DotMenu, DotMenuItem } from '../../../../shared/models/navigation';\nimport { Observable, BehaviorSubject, Subject } from 'rxjs';\n\n@Injectable()\nexport class DotCrumbtrailService {\n private URL_EXCLUDES = ['/content-types-angular/create/content'];\n private crumbTrail: Subject = new BehaviorSubject([]);\n\n private portletsTitlePathFinder = {\n 'content-types-angular': 'contentType.name',\n 'edit-page': 'content.page.title',\n apps: 'data.name',\n templates: 'template.title'\n };\n\n constructor(\n public dotNavigationService: DotNavigationService,\n router: Router,\n private activeRoute: ActivatedRoute\n ) {\n this.dotNavigationService\n .onNavigationEnd()\n .pipe(\n map((event: NavigationEnd) => {\n if (this.URL_EXCLUDES.includes(event.url)) {\n return this.splitURL(event.url)[0];\n } else {\n return event.url;\n }\n }),\n switchMap(this.getCrumbtrail.bind(this))\n )\n .subscribe((crumbTrail: DotCrumb[]) => this.crumbTrail.next(crumbTrail));\n\n this.getCrumbtrail(router.url).subscribe((crumbTrail: DotCrumb[]) =>\n this.crumbTrail.next(crumbTrail)\n );\n }\n\n get crumbTrail$(): Observable {\n return this.crumbTrail.asObservable();\n }\n\n private splitURL(url: string): string[] {\n return url.split('/').filter((section: string) => section !== '' && section !== 'c');\n }\n\n private getMenuLabel(portletId: string): Observable {\n return this.dotNavigationService.items$.pipe(\n filter((dotMenus: DotMenu[]) => !!dotMenus.length),\n map((dotMenus: DotMenu[]) => {\n let res: DotCrumb[] = [];\n\n dotMenus.forEach((menu: DotMenu) => {\n menu.menuItems.forEach((menuItem: DotMenuItem) => {\n if (menuItem.id === portletId) {\n res = [\n {\n label: menu.name,\n url: `#/${menu.menuItems[0].menuLink}`\n },\n {\n label: menuItem.label,\n url: `#/${menuItem.menuLink}`\n }\n ];\n }\n });\n });\n\n return res;\n }),\n take(1)\n );\n }\n\n private getCrumbtrailSection(sectionKey: string): string {\n const data: Data = this.getData();\n let currentData: any = data;\n\n if (Object.keys(data).length) {\n this.portletsTitlePathFinder[sectionKey]\n .split('.')\n .forEach((key) => (currentData = currentData[key]));\n return currentData;\n }\n return null;\n }\n\n private getData(): Data {\n let data = {};\n let lastChild = this.activeRoute.root;\n\n do {\n lastChild = lastChild.firstChild;\n data = Object.assign(data, lastChild.data['value']);\n } while (lastChild.firstChild !== null);\n\n return data;\n }\n\n private getCrumbtrail(url: string): Observable {\n const sections: string[] = this.splitURL(url);\n const portletId = replaceSectionsMap[sections[0]] || sections[0];\n\n return this.getMenuLabel(portletId).pipe(\n map((crumbTrail: DotCrumb[]) => {\n if (this.shouldAddSection(sections, url)) {\n const sectionLabel = this.getCrumbtrailSection(sections[0]);\n\n crumbTrail.push({\n label: sectionLabel ? sectionLabel : sections[1],\n url: ''\n });\n }\n\n return crumbTrail;\n })\n );\n }\n\n private shouldAddSection(sections: String[], url: string): boolean {\n return sections.length > 1 && this.isPortletTitleAvailable(url);\n }\n\n private isPortletTitleAvailable(url: string): boolean {\n const sections: string[] = this.splitURL(url);\n return !!this.portletsTitlePathFinder[sections[0]];\n }\n}\n\nexport interface DotCrumb {\n label: string;\n url: string;\n}\n", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "dotNavigationService", + "type": "DotNavigationService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "router", + "type": "Router", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "activeRoute", + "type": "ActivatedRoute", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 21, + "jsdoctags": [ + { + "name": "dotNavigationService", + "type": "DotNavigationService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "router", + "type": "Router", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "activeRoute", + "type": "ActivatedRoute", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "accessors": { + "crumbTrail$": { + "name": "crumbTrail$", + "getSignature": { + "name": "crumbTrail$", + "type": "", + "returnType": "Observable", + "line": 47 + } + } + }, + "type": "injectable" + }, + { + "name": "DotCurrentUserService", + "id": "injectable-DotCurrentUserService-e737782f56b88d2045419b82001bf87f290a77910e8383a32afb828c772306372a9c76351a02fd077205d029904a8f701c46812a2232731de9e975646aa5d255", + "file": "apps/dotcms-ui/src/app/api/services/dot-current-user/dot-current-user.service.ts", + "properties": [ + { + "name": "currentUsersUrl", + "defaultValue": "'v1/users/current/'", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 14, + "modifierKind": [121] + }, + { + "name": "porletAccessUrl", + "defaultValue": "'v1/portlet/{0}/_doesuserhaveaccess'", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 16, + "modifierKind": [121] + }, + { + "name": "userPermissionsUrl", + "defaultValue": "'v1/permissions/_bypermissiontype?userid={0}'", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 15, + "modifierKind": [121] + } + ], + "methods": [ + { + "name": "getCurrentUser", + "args": [], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 26, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nGet logged user and userId.\n", + "description": "

Get logged user and userId.

\n", + "jsdoctags": [ + { + "tagName": { + "pos": 826, + "end": 833, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "returns" + }, + "comment": "

Observable

\n" + } + ] + }, + { + "name": "getUserPermissions", + "args": [ + { + "name": "userId", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "permissions", + "type": "UserPermissions[]", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "[]" + }, + { + "name": "permissionsType", + "type": "PermissionsType[]", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "[]" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 42, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nReturns User portlet permissions data\n", + "description": "

Returns User portlet permissions data

\n", + "jsdoctags": [ + { + "name": "userId", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "permissions", + "type": "UserPermissions[]", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "[]", + "tagName": { + "text": "param" + } + }, + { + "name": "permissionsType", + "type": "PermissionsType[]", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "[]", + "tagName": { + "text": "param" + } + }, + { + "tagName": { + "pos": 1321, + "end": 1328, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "returns" + }, + "comment": "

Observable

\n" + } + ] + }, + { + "name": "hasAccessToPortlet", + "args": [ + { + "name": "portletid", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 71, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nVerifies if current User has access to a specific portlet Id\n", + "description": "

Verifies if current User has access to a specific portlet Id

\n", + "jsdoctags": [ + { + "name": "portletid", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "tagName": { + "pos": 2235, + "end": 2242, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "returns" + }, + "comment": "

Observable

\n" + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "description": "", + "rawdescription": "\n", + "sourceCode": "import { Injectable } from '@angular/core';\nimport { CoreWebService } from '@dotcms/dotcms-js';\nimport { Observable } from 'rxjs';\nimport {\n DotCurrentUser,\n DotPermissionsType,\n PermissionsType,\n UserPermissions\n} from '@models/dot-current-user/dot-current-user';\nimport { map, pluck, take } from 'rxjs/operators';\nimport { formatMessage } from '@shared/dot-utils';\n@Injectable()\nexport class DotCurrentUserService {\n private currentUsersUrl = 'v1/users/current/';\n private userPermissionsUrl = 'v1/permissions/_bypermissiontype?userid={0}';\n private porletAccessUrl = 'v1/portlet/{0}/_doesuserhaveaccess';\n\n constructor(private coreWebService: CoreWebService) {}\n\n // TODO: We need to update the LoginService to get the userId in the User object\n /**\n * Get logged user and userId.\n * @returns Observable\n * @memberof DotCurrentUserService\n */\n getCurrentUser(): Observable {\n return this.coreWebService\n .request({\n url: this.currentUsersUrl\n })\n .pipe(map((res: any) => res));\n }\n\n /**\n * Returns User portlet permissions data\n * @param string userId\n * @param UserPermissions[] permissions\n * @param PermissionsType[] permissionsType\n * @returns Observable\n * @memberof DotCurrentUserService\n */\n getUserPermissions(\n userId: string,\n permissions: UserPermissions[] = [],\n permissionsType: PermissionsType[] = []\n ): Observable {\n let url = permissions.length\n ? `${this.userPermissionsUrl}&permission={1}`\n : this.userPermissionsUrl;\n url = permissionsType.length ? `${url}&permissiontype={2}` : url;\n\n const permissionsUrl = formatMessage(url, [\n userId,\n permissions.join(','),\n permissionsType.join(',')\n ]);\n\n return this.coreWebService\n .requestView({\n url: permissionsUrl\n })\n .pipe(take(1), pluck('entity'));\n }\n\n /**\n * Verifies if current User has access to a specific portlet Id\n * @param string portletid\n * @returns Observable\n * @memberof DotCurrentUserService\n */\n hasAccessToPortlet(portletid: string): Observable {\n return this.coreWebService\n .requestView({\n url: this.porletAccessUrl.replace('{0}', portletid)\n })\n .pipe(take(1), pluck('entity', 'response'));\n }\n}\n", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "coreWebService", + "type": "CoreWebService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 16, + "jsdoctags": [ + { + "name": "coreWebService", + "type": "CoreWebService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "type": "injectable" + }, + { + "name": "DotCustomEventHandlerService", + "id": "injectable-DotCustomEventHandlerService-4218006b21ccdf0a9c0d9b2214e630f733aa7c92381aef3293fa1b45adf7a2733c57aa89727f2c0b1443a289592fb6e4e8ea68aba066c5f6e253f28698ed9c6c", + "file": "apps/dotcms-ui/src/app/api/services/dot-custom-event-handler/dot-custom-event-handler.service.ts", + "properties": [ + { + "name": "handlers", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 21, + "modifierKind": [121, 144] + } + ], + "methods": [ + { + "name": "createContentlet", + "args": [ + { + "name": "$event", + "type": "CustomEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 66, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "$event", + "type": "CustomEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "downloadBundleDialog", + "args": [ + { + "name": "$event", + "type": "CustomEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 105, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "$event", + "type": "CustomEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "editContentlet", + "args": [ + { + "name": "$event", + "type": "CustomEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 83, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "$event", + "type": "CustomEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "editTask", + "args": [ + { + "name": "$event", + "type": "CustomEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 87, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "$event", + "type": "CustomEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "executeWorkflowWizard", + "args": [ + { + "name": "$event", + "type": "CustomEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 109, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "$event", + "type": "CustomEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "generateSecurePassword", + "args": [ + { + "name": "$event", + "type": "CustomEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 62, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "$event", + "type": "CustomEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "goToEditPage", + "args": [ + { + "name": "$event", + "type": "CustomEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 74, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "$event", + "type": "CustomEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "handle", + "args": [ + { + "name": "event", + "type": "CustomEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 56, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nHandle custom events from the iframe portlets\n\n", + "description": "

Handle custom events from the iframe portlets

\n", + "jsdoctags": [ + { + "name": "event", + "type": "CustomEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "pushPublishDialog", + "args": [ + { + "name": "$event", + "type": "CustomEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 101, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "$event", + "type": "CustomEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "setPersonalization", + "args": [ + { + "name": "$event", + "type": "CustomEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 91, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "$event", + "type": "CustomEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "description": "

Handle Custom events

\n", + "rawdescription": "\n\nHandle Custom events\n\n", + "sourceCode": "import { Injectable } from '@angular/core';\nimport { DotLoadingIndicatorService } from '@components/_common/iframe/dot-loading-indicator/dot-loading-indicator.service';\nimport { DotRouterService } from '@services/dot-router/dot-router.service';\nimport { DotUiColorsService } from '@services/dot-ui-colors/dot-ui-colors.service';\nimport { DotIframeService } from '@components/_common/iframe/service/dot-iframe/dot-iframe.service';\nimport { DotCMSEditPageEvent } from '@components/dot-contentlet-editor/components/dot-contentlet-wrapper/dot-contentlet-wrapper.component';\nimport { DotPushPublishDialogService, DotUiColors } from '@dotcms/dotcms-js';\nimport { DotDownloadBundleDialogService } from '@services/dot-download-bundle-dialog/dot-download-bundle-dialog.service';\nimport { DotWorkflowEventHandlerService } from '@services/dot-workflow-event-handler/dot-workflow-event-handler.service';\nimport { DotContentletEditorService } from '@components/dot-contentlet-editor/services/dot-contentlet-editor.service';\nimport { DotNavLogoService } from '@services/dot-nav-logo/dot-nav-logo.service';\nimport { DotGenerateSecurePasswordService } from '@services/dot-generate-secure-password/dot-generate-secure-password.service';\n/**\n * Handle Custom events\n *\n * @export\n * @class DotCustomEventHandlerService\n */\n@Injectable()\nexport class DotCustomEventHandlerService {\n private readonly handlers;\n\n constructor(\n private dotLoadingIndicatorService: DotLoadingIndicatorService,\n private dotRouterService: DotRouterService,\n private dotUiColorsService: DotUiColorsService,\n private dotNavLogoService: DotNavLogoService,\n private dotContentletEditorService: DotContentletEditorService,\n private dotIframeService: DotIframeService,\n private dotPushPublishDialogService: DotPushPublishDialogService,\n private dotDownloadBundleDialogService: DotDownloadBundleDialogService,\n private dotWorkflowEventHandlerService: DotWorkflowEventHandlerService,\n private dotGenerateSecurePasswordService: DotGenerateSecurePasswordService\n ) {\n if (!this.handlers) {\n this.handlers = {\n 'edit-page': this.goToEditPage.bind(this),\n 'edit-contentlet': this.editContentlet.bind(this),\n 'edit-task': this.editTask.bind(this),\n 'create-contentlet': this.createContentlet.bind(this),\n 'company-info-updated': this.setPersonalization.bind(this),\n 'push-publish': this.pushPublishDialog.bind(this),\n 'download-bundle': this.downloadBundleDialog.bind(this),\n 'workflow-wizard': this.executeWorkflowWizard.bind(this),\n 'generate-secure-password': this.generateSecurePassword.bind(this)\n };\n }\n }\n\n /**\n * Handle custom events from the iframe portlets\n *\n * @param CustomEvent event\n * @memberof DotCustomEventHandlerService\n */\n handle(event: CustomEvent): void {\n if (event && this.handlers[event.detail.name]) {\n this.handlers[event.detail.name](event);\n }\n }\n\n private generateSecurePassword($event: CustomEvent): void {\n this.dotGenerateSecurePasswordService.open($event.detail.data)\n }\n\n private createContentlet($event: CustomEvent): void {\n this.dotContentletEditorService.create({\n data: $event.detail.data\n });\n // TODO: Enabled this and remove previous 3 lines of code when endpoint gets updated\n // this.dotRouterService.goToCreateContent($event.detail.data);\n }\n\n private goToEditPage($event: CustomEvent): void {\n this.dotLoadingIndicatorService.show();\n this.dotRouterService.goToEditPage({\n url: $event.detail.data.url,\n language_id: $event.detail.data.languageId,\n host_id: $event.detail.data.hostId\n });\n }\n\n private editContentlet($event: CustomEvent): void {\n this.dotRouterService.goToEditContentlet($event.detail.data.inode);\n }\n\n private editTask($event: CustomEvent): void {\n this.dotRouterService.goToEditTask($event.detail.data.inode);\n }\n\n private setPersonalization($event: CustomEvent): void {\n this.dotNavLogoService.setLogo($event.detail.payload.navBarLogo);\n\n this.dotUiColorsService.setColors(\n document.querySelector('html'),\n $event.detail.payload.colors\n );\n this.dotIframeService.reloadColors();\n }\n\n private pushPublishDialog($event: CustomEvent): void {\n this.dotPushPublishDialogService.open($event.detail.data);\n }\n\n private downloadBundleDialog($event: CustomEvent): void {\n this.dotDownloadBundleDialogService.open($event.detail.data);\n }\n\n private executeWorkflowWizard($event: CustomEvent): void {\n this.dotWorkflowEventHandlerService.open($event.detail.data);\n }\n}\n", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "dotLoadingIndicatorService", + "type": "DotLoadingIndicatorService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotRouterService", + "type": "DotRouterService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotUiColorsService", + "type": "DotUiColorsService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotNavLogoService", + "type": "DotNavLogoService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotContentletEditorService", + "type": "DotContentletEditorService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotIframeService", + "type": "DotIframeService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotPushPublishDialogService", + "type": "DotPushPublishDialogService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotDownloadBundleDialogService", + "type": "DotDownloadBundleDialogService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotWorkflowEventHandlerService", + "type": "DotWorkflowEventHandlerService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotGenerateSecurePasswordService", + "type": "DotGenerateSecurePasswordService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 21, + "jsdoctags": [ + { + "name": "dotLoadingIndicatorService", + "type": "DotLoadingIndicatorService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotRouterService", + "type": "DotRouterService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotUiColorsService", + "type": "DotUiColorsService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotNavLogoService", + "type": "DotNavLogoService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotContentletEditorService", + "type": "DotContentletEditorService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotIframeService", + "type": "DotIframeService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotPushPublishDialogService", + "type": "DotPushPublishDialogService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotDownloadBundleDialogService", + "type": "DotDownloadBundleDialogService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotWorkflowEventHandlerService", + "type": "DotWorkflowEventHandlerService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotGenerateSecurePasswordService", + "type": "DotGenerateSecurePasswordService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "type": "injectable" + }, + { + "name": "DotDevicesService", + "id": "injectable-DotDevicesService-f13b3db87d67ae2e91a309617204c67d8210d13aaf1f0c2038bbad580542d5dd3e47fb716b517725590e5da3e56219377c3d689e5394127bdb7917e7e6cc4174", + "file": "apps/dotcms-ui/src/app/api/services/dot-devices/dot-devices.service.ts", + "properties": [], + "methods": [ + { + "name": "get", + "args": [], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 21, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nReturn available devices.\n", + "description": "

Return available devices.

\n", + "jsdoctags": [ + { + "tagName": { + "pos": 497, + "end": 504, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "returns" + }, + "comment": "

Observable<DotDevice[]>

\n" + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "description": "

Provide util methods to get the Devices & dimensions.

\n", + "rawdescription": "\n\nProvide util methods to get the Devices & dimensions.\n", + "sourceCode": "import { pluck } from 'rxjs/operators';\nimport { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { DotDevice } from '@models/dot-device/dot-device.model';\nimport { CoreWebService } from '@dotcms/dotcms-js';\n\n/**\n * Provide util methods to get the Devices & dimensions.\n * @export\n * @class DotDevicesService\n */\n@Injectable()\nexport class DotDevicesService {\n constructor(private coreWebService: CoreWebService) {}\n\n /**\n * Return available devices.\n * @returns Observable\n * @memberof DotDevicesService\n */\n get(): Observable {\n return this.coreWebService\n .requestView({\n url: [\n 'api',\n 'content',\n 'respectFrontendRoles/false',\n 'render/false',\n 'query/+contentType:previewDevice +live:true +deleted:false +working:true'\n ].join('/')\n })\n .pipe(pluck('contentlets'));\n }\n}\n", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "coreWebService", + "type": "CoreWebService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 13, + "jsdoctags": [ + { + "name": "coreWebService", + "type": "CoreWebService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "type": "injectable" + }, + { + "name": "DotDOMHtmlUtilService", + "id": "injectable-DotDOMHtmlUtilService-16274ecaa3b45c49f3ad9a0ae933fadc5f434119672530cdef8a0d1f9cf3b3ae7b17358d944f8fd62bd4dc99a624a461966bda3a8e91e12a37790d368cab3cbf", + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/html/dot-dom-html-util.service.ts", + "properties": [], + "methods": [ + { + "name": "createInlineScriptElement", + "args": [ + { + "name": "text", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "HTMLScriptElement", + "typeParameters": [], + "line": 60, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nCreate a `, target, false);\n }\n }\n\n private getMessages(): Observable {\n return this.dotcmsEventsService\n .subscribeTo('LARGE_MESSAGE')\n .pipe(filter((data: DotLargeMessageDisplayParams) => !!data));\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": ".dialog-message__code {\n overflow: auto;\n white-space: pre-wrap;\n}\n", + "styleUrl": "./dot-large-message-display.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "dotcmsEventsService", + "type": "DotcmsEventsService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotParseHtmlService", + "type": "DotParseHtmlService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 37, + "jsdoctags": [ + { + "name": "dotcmsEventsService", + "type": "DotcmsEventsService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotParseHtmlService", + "type": "DotParseHtmlService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": ["OnInit", "OnDestroy", "AfterViewInit"], + "templateData": "\n \n
\n\n
\n
\n                    {{ message.code.content }}\n                \n        
\n \n
\n" + }, + { + "name": "DotLayoutDesignerComponent", + "id": "component-DotLayoutDesignerComponent-6edd0d702736ab321e13f81d1b94b0e8ecf247504972dc174094638627cf197d96503dcab8f7e254fa5bea3fd8ff2ba9b0cb8bf7cd2b863d1e1251accebbb75e", + "file": "apps/dotcms-ui/src/app/view/components/dot-edit-layout-designer/components/dot-layout-designer/dot-layout-designer.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-layout-designer", + "styleUrls": ["./dot-layout-designer.component.scss"], + "styles": [], + "templateUrl": ["./dot-layout-designer.component.html"], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "group", + "deprecated": false, + "deprecationMessage": "", + "type": "ControlContainer", + "optional": false, + "description": "", + "line": 10, + "modifierKind": [123] + } + ], + "methodsClass": [], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component } from '@angular/core';\nimport { ControlContainer } from '@angular/forms';\n\n@Component({\n selector: 'dot-layout-designer',\n templateUrl: './dot-layout-designer.component.html',\n styleUrls: ['./dot-layout-designer.component.scss']\n})\nexport class DotLayoutDesignerComponent {\n constructor(public group: ControlContainer) {}\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"variables\" as *;\n@import \"mixins\";\n\n:host {\n background-color: $white;\n box-shadow: $md-shadow-1;\n display: flex;\n flex-grow: 1;\n margin: $spacing-3;\n overflow-x: hidden;\n overflow-y: auto;\n padding: $spacing-2 $spacing-8 $spacing-2 $spacing-2;\n}\n\n.dot-layout-designer {\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n}\n\n.dot-layout-designer__main {\n display: flex;\n flex-grow: 1;\n}\n\n.dot-layout-designer__footer,\n.dot-layout-designer__header,\n[class^=\"dot-layout-designer__sidebar\"] {\n align-items: center;\n background: $gray-bg;\n color: $gray;\n display: flex;\n flex-shrink: 0;\n font-size: $font-size-xx-large;\n justify-content: center;\n}\n\n[class^=\"dot-layout-designer__sidebar\"] {\n align-items: normal;\n\n dot-container-selector {\n width: 100%;\n }\n}\n\n.dot-layout-designer__sidebar--left,\n.dot-layout-designer__sidebar--right {\n border: 1px solid $gray-light;\n}\n\n.dot-layout-designer__sidebar {\n &--small {\n width: 200px;\n }\n\n &--medium {\n width: 250px;\n }\n\n &--large {\n width: 300px;\n }\n\n &--left {\n margin-right: $spacing-3;\n }\n\n &--right {\n margin-left: $spacing-9;\n }\n}\n\n.dot-layout-designer__footer,\n.dot-layout-designer__header {\n height: 80px;\n}\n\n.dot-layout-designer__header,\n.dot-layout-designer__main {\n margin-bottom: $spacing-3;\n}\n\n.dot-layout-designer__body {\n display: flex;\n flex-grow: 1;\n flex-direction: column;\n\n &::ng-deep .action-button--no-label .p-button.p-button-icon-only {\n height: $field-height;\n width: $field-height;\n font-size: $font-size-small;\n }\n}\n\n.dot-layout-designer__toolbar-add {\n align-self: flex-end;\n margin-bottom: $spacing-1;\n}\n\n.dot-layout-designer__grid-guides {\n background: repeating-linear-gradient(\n -90deg,\n transparent,\n transparent $spacing-1,\n $gray-bg $spacing-1,\n $gray-bg calc(100% / 12)\n );\n flex-grow: 1;\n margin-right: -$spacing-1;\n}\n", + "styleUrl": "./dot-layout-designer.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "group", + "type": "ControlContainer", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 9, + "jsdoctags": [ + { + "name": "group", + "type": "ControlContainer", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "templateData": "
\n
\n {{ 'editpage.layout.designer.header' | dm }}\n
\n
\n \n \n
\n
\n
\n \n
\n
\n \n \n
\n
\n
\n {{ 'editpage.layout.designer.footer' | dm }}\n
\n\n" + }, + { + "name": "DotLayoutPropertiesComponent", + "id": "component-DotLayoutPropertiesComponent-fbe5766b493b903ae77cea40c43bea976646095f416a13d507872c54cb91eb7b2c96c4b2d7c6ab22cedbc36959dd59d6e55551584481ffd2c9305ff5d65986a0", + "file": "apps/dotcms-ui/src/app/view/components/dot-edit-layout-designer/components/dot-layout-properties/dot-layout-properties.component.ts", + "encapsulation": ["ViewEncapsulation.None"], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-layout-properties", + "styleUrls": ["./dot-layout-properties.component.scss"], + "styles": [], + "templateUrl": ["./dot-layout-properties.component.html"], + "viewProviders": [], + "inputsClass": [ + { + "name": "group", + "deprecated": false, + "deprecationMessage": "", + "line": 11, + "type": "FormGroup", + "decorators": [] + } + ], + "outputsClass": [], + "propertiesClass": [], + "methodsClass": [], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { FormGroup } from '@angular/forms';\nimport { Component, Input, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'dot-layout-properties',\n templateUrl: './dot-layout-properties.component.html',\n styleUrls: ['./dot-layout-properties.component.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class DotLayoutPropertiesComponent {\n @Input() group: FormGroup;\n\n constructor() {}\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"variables\" as *;\n\n.dot-layout-properties__overlayPanel {\n .p-overlaypanel-content {\n padding: $spacing-1 0;\n }\n}\n", + "styleUrl": "./dot-layout-properties.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [], + "line": 11 + }, + "templateData": "\n
\n \n \n\n \n \n \n
\n
\n\n view_quilt\n\n" + }, + { + "name": "DotLayoutPropertiesItemComponent", + "id": "component-DotLayoutPropertiesItemComponent-9108534bf0e38502d863a04fc566f48c6cb3f9ce4fdf635d1e4fc8771ae94a8cf379e9181d1f2ec96c7dc7f22de2978dd0bc6d1e1d9ee14552e3cd438121fc8c", + "file": "apps/dotcms-ui/src/app/view/components/dot-edit-layout-designer/components/dot-layout-properties/dot-layout-properties-item/dot-layout-properties-item.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [ + { + "name": "{\n multi: true, provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DotLayoutPropertiesItemComponent)\n}", + "type": "component" + } + ], + "selector": "dot-layout-properties-item", + "styleUrls": ["./dot-layout-properties-item.component.scss"], + "styles": [], + "templateUrl": ["./dot-layout-properties-item.component.html"], + "viewProviders": [], + "inputsClass": [ + { + "name": "label", + "deprecated": false, + "deprecationMessage": "", + "line": 18, + "type": "string", + "decorators": [] + } + ], + "outputsClass": [ + { + "name": "change", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 21, + "type": "EventEmitter" + } + ], + "propertiesClass": [ + { + "name": "propagateChange", + "defaultValue": "() => {...}", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 27 + }, + { + "name": "value", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 23 + } + ], + "methodsClass": [ + { + "name": "onClick", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 30, + "deprecated": false, + "deprecationMessage": "", + "decorators": [ + { + "name": "HostListener", + "stringifiedArguments": "'click', ['$event']" + } + ] + }, + { + "name": "registerOnChange", + "args": [ + { + "name": "fn", + "type": "any", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 68, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nSet the function to be called when the control receives a change event\n", + "description": "

Set the function to be called when the control receives a change event

\n", + "jsdoctags": [ + { + "name": "fn", + "type": "any", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "registerOnTouched", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 72, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "setChecked", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 51, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nCheck item and set value to true\n", + "description": "

Check item and set value to true

\n", + "jsdoctags": [] + }, + { + "name": "setUnchecked", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 59, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nUncheck item and set value to false\n", + "description": "

Uncheck item and set value to false

\n", + "jsdoctags": [] + }, + { + "name": "writeValue", + "args": [ + { + "name": "value", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 41, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nWrite a new value to the property item\n", + "description": "

Write a new value to the property item

\n", + "jsdoctags": [ + { + "name": "value", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [ + { + "name": "click", + "args": [], + "argsDecorator": ["$event"], + "deprecated": false, + "deprecationMessage": "", + "line": 30 + } + ], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { Component, Input, Output, EventEmitter, forwardRef, HostListener } from '@angular/core';\n\n@Component({\n selector: 'dot-layout-properties-item',\n templateUrl: './dot-layout-properties-item.component.html',\n styleUrls: ['./dot-layout-properties-item.component.scss'],\n providers: [\n {\n multi: true,\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DotLayoutPropertiesItemComponent)\n }\n ]\n})\nexport class DotLayoutPropertiesItemComponent implements ControlValueAccessor {\n @Input()\n label: string;\n\n @Output()\n change: EventEmitter = new EventEmitter();\n\n value: boolean;\n\n constructor() {}\n\n propagateChange = (_: any) => {};\n\n @HostListener('click', ['$event'])\n onClick() {\n this.value = !this.value;\n this.propagateChange(this.value);\n this.change.emit(this.value);\n }\n\n /**\n * Write a new value to the property item\n * @param boolean value\n * @memberof DotLayoutPropertiesItemComponent\n */\n writeValue(value: boolean): void {\n if (value) {\n this.value = value;\n }\n }\n\n /**\n * Check item and set value to true\n * @memberof DotLayoutPropertiesItemComponent\n */\n setChecked() {\n this.value = true;\n }\n\n /**\n * Uncheck item and set value to false\n * @memberof DotLayoutPropertiesItemComponent\n */\n setUnchecked() {\n this.value = false;\n }\n\n /**\n * Set the function to be called when the control receives a change event\n * @param any fn\n * @memberof DotLayoutPropertiesItemComponent\n */\n registerOnChange(fn: any): void {\n this.propagateChange = fn;\n }\n\n registerOnTouched(): void {}\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"variables\" as *;\n\n:host {\n display: flex;\n cursor: pointer;\n align-content: center;\n padding: $spacing-1 $spacing-3;\n\n &:hover {\n background-color: $gray-bg;\n }\n\n &.property-item__footer {\n svg {\n transform: rotate(90deg);\n }\n }\n\n &.property-item__sidebar-left {\n svg {\n transform: rotate(180deg);\n }\n }\n\n &.property-item__header {\n svg {\n transform: rotate(270deg);\n }\n }\n}\n\n.property-item__icon--selected {\n rect {\n stroke: $brand-primary;\n fill: rgba($brand-primary_rgb, 0.2);\n }\n\n path {\n fill: $brand-primary;\n }\n}\n\n.property-item__label {\n padding-left: $spacing-1;\n align-self: center;\n}\n", + "styleUrl": "./dot-layout-properties-item.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [], + "line": 23 + }, + "implements": ["ControlValueAccessor"], + "templateData": "\n \n \n \n \n \n \n \n \n \n \n\n\n{{ label }}\n" + }, + { + "name": "DotLayoutSidebarComponent", + "id": "component-DotLayoutSidebarComponent-4b1423de2ab05c259abe7eee38e1f1af5aa95c993e0545d8bcc17bf9e0308b308069eaaf60ffd6e0ae10cb38bea765a5b4b6b08bb629b2e7611775c6f4cccd82", + "file": "apps/dotcms-ui/src/app/view/components/dot-edit-layout-designer/components/dot-layout-properties/dot-layout-property-sidebar/dot-layout-property-sidebar.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [ + { + "name": "{\n multi: true, provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DotLayoutSidebarComponent)\n}", + "type": "component" + } + ], + "selector": "dot-layout-property-sidebar", + "styleUrls": [], + "styles": [], + "templateUrl": ["./dot-layout-property-sidebar.component.html"], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "propagateChange", + "defaultValue": "() => {...}", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 29 + }, + { + "name": "propertyItemLeft", + "deprecated": false, + "deprecationMessage": "", + "type": "DotLayoutPropertiesItemComponent", + "optional": false, + "description": "", + "line": 20, + "decorators": [ + { + "name": "ViewChild", + "stringifiedArguments": "'propertyItemLeft', {static: true}" + } + ] + }, + { + "name": "propertyItemRight", + "deprecated": false, + "deprecationMessage": "", + "type": "DotLayoutPropertiesItemComponent", + "optional": false, + "description": "", + "line": 23, + "decorators": [ + { + "name": "ViewChild", + "stringifiedArguments": "'propertyItemRight', {static: true}" + } + ] + }, + { + "name": "value", + "deprecated": false, + "deprecationMessage": "", + "type": "DotLayoutSideBar", + "optional": false, + "description": "", + "line": 25 + } + ], + "methodsClass": [ + { + "name": "registerOnChange", + "args": [ + { + "name": "fn", + "type": "any", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 68, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nSet the function to be called when the control receives a change event\n", + "description": "

Set the function to be called when the control receives a change event

\n", + "jsdoctags": [ + { + "name": "fn", + "type": "any", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "registerOnTouched", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 72, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "setValue", + "args": [ + { + "name": "value", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "location", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 48, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nHandle sidebar left/right check and propagate a value\n", + "description": "

Handle sidebar left/right check and propagate a value

\n", + "jsdoctags": [ + { + "name": "value", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "location", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "writeValue", + "args": [ + { + "name": "value", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 36, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nWrite a new value to the property item\n", + "description": "

Write a new value to the property item

\n", + "jsdoctags": [ + { + "name": "value", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, forwardRef, ViewChild } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nimport { DotLayoutPropertiesItemComponent } from '../dot-layout-properties-item/dot-layout-properties-item.component';\nimport { DotLayoutSideBar } from '@models/dot-edit-layout-designer';\n\n@Component({\n selector: 'dot-layout-property-sidebar',\n templateUrl: './dot-layout-property-sidebar.component.html',\n providers: [\n {\n multi: true,\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DotLayoutSidebarComponent)\n }\n ]\n})\nexport class DotLayoutSidebarComponent implements ControlValueAccessor {\n @ViewChild('propertyItemLeft', { static: true })\n propertyItemLeft: DotLayoutPropertiesItemComponent;\n\n @ViewChild('propertyItemRight', { static: true })\n propertyItemRight: DotLayoutPropertiesItemComponent;\n\n value: DotLayoutSideBar;\n\n constructor() {}\n\n propagateChange = (_: any) => {};\n\n /**\n * Write a new value to the property item\n * @param any DotLayoutSideBar\n * @memberof DotLayoutSidebarComponent\n */\n writeValue(value): void {\n if (value) {\n this.value = value;\n }\n }\n\n /**\n * Handle sidebar left/right check and propagate a value\n * @param boolean value\n * @param string location\n * @memberof DotLayoutSidebarComponent\n */\n setValue(value: boolean, location: string): void {\n if (value && location === 'left') {\n this.propertyItemLeft.setChecked();\n this.propertyItemRight.setUnchecked();\n } else if (value && location === 'right') {\n this.propertyItemLeft.setUnchecked();\n this.propertyItemRight.setChecked();\n } else {\n this.value.containers = [];\n }\n\n this.value.location = value ? location : '';\n this.propagateChange(this.value);\n }\n\n /**\n * Set the function to be called when the control receives a change event\n * @param any fn\n * @memberof DotLayoutSidebarComponent\n */\n registerOnChange(fn: any): void {\n this.propagateChange = fn;\n }\n\n registerOnTouched(): void {}\n}\n", + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [], + "line": 25 + }, + "implements": ["ControlValueAccessor"], + "templateData": "\n\n\n\n" + }, + { + "name": "DotLegacyTemplateAdditionalActionsComponent", + "id": "component-DotLegacyTemplateAdditionalActionsComponent-eda77544f94ab1bc92c72c53342ff4dc260a8aa98c14f180e9d5527078c588679fd54ac4716a80366f09469834de6617742d5802a6ee62eb2460985307c85397", + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/layout/components/dot-template-additional-actions/dot-legacy-template-additional-actions-iframe/dot-legacy-template-additional-actions-iframe.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-legacy-addtional-actions", + "styleUrls": [], + "styles": [], + "templateUrl": ["./dot-legacy-template-additional-actions-iframe.component.html"], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "url", + "deprecated": false, + "deprecationMessage": "", + "type": "Observable", + "optional": false, + "description": "", + "line": 13 + } + ], + "methodsClass": [ + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 17, + "deprecated": false, + "deprecationMessage": "" + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { of as observableOf, Observable } from 'rxjs';\n\nimport { switchMap, combineLatest } from 'rxjs/operators';\nimport { Component, OnInit } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { DotMenuService } from '@services/dot-menu.service';\n\n@Component({\n selector: 'dot-legacy-addtional-actions',\n templateUrl: './dot-legacy-template-additional-actions-iframe.component.html'\n})\nexport class DotLegacyTemplateAdditionalActionsComponent implements OnInit {\n url: Observable;\n\n constructor(private route: ActivatedRoute, private dotMenuService: DotMenuService) {}\n\n ngOnInit(): void {\n this.url = this.route.params.pipe(\n combineLatest(this.dotMenuService.getDotMenuId('templates')),\n switchMap((resp) => {\n const tabName = resp[0].tabName;\n const templateId = resp[0].id;\n const portletId = resp[1];\n return observableOf(\n // tslint:disable-next-line:max-line-length\n `c/portal/layout?p_l_id=${portletId}&p_p_id=templates&p_p_action=1&p_p_state=maximized&p_p_mode=view&_templates_struts_action=%2Fext%2Ftemplates%2Fedit_template&_templates_cmd=edit&inode=${templateId}&drawed=false&selectedTab=${tabName}`\n );\n })\n );\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "route", + "type": "ActivatedRoute", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotMenuService", + "type": "DotMenuService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 13, + "jsdoctags": [ + { + "name": "route", + "type": "ActivatedRoute", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotMenuService", + "type": "DotMenuService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": ["OnInit"], + "templateData": "\n" + }, + { + "name": "DotListingDataTableComponent", + "id": "component-DotListingDataTableComponent-de1dbfa1f84e6eb02e5426b7cc20908d81f4199f58a8dcef2ce656dc89364b1d6631683906362f9b474eb3b5b0710ad5a76efb069edce382cf50f20e1d4450d9", + "file": "apps/dotcms-ui/src/app/view/components/dot-listing-data-table/dot-listing-data-table.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [ + { + "name": "PaginatorService" + }, + { + "name": "{\n provide: Table, useFactory: tableFactory, deps: [DotListingDataTableComponent]\n}", + "type": "component" + } + ], + "selector": "dot-listing-data-table", + "styleUrls": ["./dot-listing-data-table.component.scss"], + "styles": [], + "templateUrl": ["dot-listing-data-table.component.html"], + "viewProviders": [], + "inputsClass": [ + { + "name": "actionHeaderOptions", + "deprecated": false, + "deprecationMessage": "", + "line": 44, + "type": "ActionHeaderOptions", + "decorators": [] + }, + { + "name": "actions", + "deprecated": false, + "deprecationMessage": "", + "line": 51, + "type": "DotActionMenuItem[]", + "decorators": [] + }, + { + "name": "buttonActions", + "defaultValue": "[]", + "deprecated": false, + "deprecationMessage": "", + "line": 45, + "type": "ButtonAction[]", + "decorators": [] + }, + { + "name": "checkbox", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "line": 53, + "type": "boolean", + "decorators": [] + }, + { + "name": "columns", + "deprecated": false, + "deprecationMessage": "", + "line": 42, + "type": "DataTableColumn[]", + "decorators": [] + }, + { + "name": "contextMenu", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "line": 55, + "type": "boolean", + "decorators": [] + }, + { + "name": "dataKey", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "line": 52, + "type": "string", + "decorators": [] + }, + { + "name": "mapItems", + "deprecated": false, + "deprecationMessage": "", + "line": 54, + "type": "function", + "decorators": [] + }, + { + "name": "multipleSelection", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "line": 48, + "type": "boolean", + "decorators": [] + }, + { + "name": "paginationPerPage", + "defaultValue": "40", + "deprecated": false, + "deprecationMessage": "", + "line": 49, + "type": "number", + "decorators": [] + }, + { + "name": "paginatorExtraParams", + "defaultValue": "{}", + "deprecated": false, + "deprecationMessage": "", + "line": 50, + "type": "literal type", + "decorators": [] + }, + { + "name": "sortField", + "deprecated": false, + "deprecationMessage": "", + "line": 47, + "type": "string", + "decorators": [] + }, + { + "name": "sortOrder", + "deprecated": false, + "deprecationMessage": "", + "line": 46, + "type": "string", + "decorators": [] + }, + { + "name": "url", + "deprecated": false, + "deprecationMessage": "", + "line": 43, + "type": "string", + "decorators": [] + } + ], + "outputsClass": [ + { + "name": "onContextMenuSelect", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 58, + "type": "EventEmitter" + }, + { + "name": "rowWasClicked", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 56, + "type": "EventEmitter" + }, + { + "name": "selectedItems", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 57, + "type": "EventEmitter" + } + ], + "propertiesClass": [ + { + "name": "contextMenuItems", + "deprecated": false, + "deprecationMessage": "", + "type": "MenuItem[]", + "optional": false, + "description": "", + "line": 77 + }, + { + "name": "dataTable", + "deprecated": false, + "deprecationMessage": "", + "type": "Table", + "optional": false, + "description": "", + "line": 63, + "decorators": [ + { + "name": "ViewChild", + "stringifiedArguments": "'dataTable', {static: true}" + } + ] + }, + { + "name": "DATE_FORMAT", + "defaultValue": "'date'", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 70, + "modifierKind": [144] + }, + { + "name": "dateColumns", + "deprecated": false, + "deprecationMessage": "", + "type": "DataTableColumn[]", + "optional": false, + "description": "", + "line": 75 + }, + { + "name": "filter", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 73 + }, + { + "name": "globalSearch", + "deprecated": false, + "deprecationMessage": "", + "type": "ElementRef", + "optional": false, + "description": "", + "line": 61, + "decorators": [ + { + "name": "ViewChild", + "stringifiedArguments": "'gf', {static: true}" + } + ] + }, + { + "name": "headerTemplate", + "deprecated": false, + "deprecationMessage": "", + "type": "TemplateRef", + "optional": false, + "description": "", + "line": 68, + "decorators": [ + { + "name": "ContentChild", + "stringifiedArguments": "'headerTemplate'" + } + ] + }, + { + "name": "isContentFiltered", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 74 + }, + { + "name": "items", + "deprecated": false, + "deprecationMessage": "", + "type": "any[]", + "optional": false, + "description": "", + "line": 71 + }, + { + "name": "loading", + "defaultValue": "true", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 76 + }, + { + "name": "loggerService", + "deprecated": false, + "deprecationMessage": "", + "type": "LoggerService", + "optional": false, + "description": "", + "line": 82, + "modifierKind": [123] + }, + { + "name": "maxLinksPage", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 78 + }, + { + "name": "paginatorService", + "deprecated": false, + "deprecationMessage": "", + "type": "PaginatorService", + "optional": false, + "description": "", + "line": 83, + "modifierKind": [123] + }, + { + "name": "rowTemplate", + "deprecated": false, + "deprecationMessage": "", + "type": "TemplateRef", + "optional": false, + "description": "", + "line": 67, + "decorators": [ + { + "name": "ContentChild", + "stringifiedArguments": "'rowTemplate'" + } + ] + }, + { + "name": "selected", + "deprecated": false, + "deprecationMessage": "", + "type": "any[]", + "optional": false, + "description": "", + "line": 72 + }, + { + "name": "templates", + "deprecated": false, + "deprecationMessage": "", + "type": "QueryList", + "optional": false, + "description": "", + "line": 65, + "decorators": [ + { + "name": "ContentChildren", + "stringifiedArguments": "PrimeTemplate" + } + ] + }, + { + "name": "totalRecords", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 79 + } + ], + "methodsClass": [ + { + "name": "clearSelection", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 109, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nClear selection and notify change.\n\n", + "description": "

Clear selection and notify change.

\n", + "jsdoctags": [] + }, + { + "name": "focusFirstRow", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 198, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nFocus the fist row of the table is there are results.\n", + "description": "

Focus the fist row of the table is there are results.

\n", + "jsdoctags": [] + }, + { + "name": "formatData", + "args": [ + { + "name": "items", + "type": "any[]", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "any[]", + "typeParameters": [], + "line": 213, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "items", + "type": "any[]", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getAlign", + "args": [ + { + "name": "col", + "type": "DataTableColumn", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 190, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nColumn align, return the DataTableColumn's textAlign property if it exists,\notherwise return right if the content is number and left if the content's type is not number.\n", + "description": "

Column align, return the DataTableColumn's textAlign property if it exists,\notherwise return right if the content is number and left if the content's type is not number.

\n", + "jsdoctags": [ + { + "name": { + "pos": 5803, + "end": 5806, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "col" + }, + "type": "DataTableColumn", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 5779, + "end": 5784, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 5785, + "end": 5802, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 5786, + "end": 5801, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 177, + "typeName": { + "pos": 5786, + "end": 5801, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "DataTableColumn" + } + } + } + }, + { + "tagName": { + "pos": 5815, + "end": 5822, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "returns" + }, + "comment": "

string

\n" + } + ] + }, + { + "name": "getPage", + "args": [ + { + "name": "offset", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 246, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "offset", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "handleFilter", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 209, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nCheck if display results are filtered.\n", + "description": "

Check if display results are filtered.

\n", + "jsdoctags": [] + }, + { + "name": "handleRowCheck", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 100, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nEmit checked rows.\n\n", + "description": "

Emit checked rows.

\n", + "jsdoctags": [] + }, + { + "name": "handleRowClick", + "args": [ + { + "name": "rowData", + "type": "any", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 120, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nEmit selected row\n\n", + "description": "

Emit selected row

\n", + "jsdoctags": [ + { + "name": { + "pos": 3605, + "end": 3612, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "rowData" + }, + "type": "any", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 3593, + "end": 3598, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 3599, + "end": 3604, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 3600, + "end": 3603, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 130 + } + } + } + ] + }, + { + "name": "isTypeNumber", + "args": [ + { + "name": "col", + "type": "DataTableColumn", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 235, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "col", + "type": "DataTableColumn", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "loadCurrentPage", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 173, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nReloads data table with updated data on current page\n", + "description": "

Reloads data table with updated data on current page

\n", + "jsdoctags": [] + }, + { + "name": "loadData", + "args": [ + { + "name": "offset", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "sortFieldParam", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "optional": true + }, + { + "name": "sortOrderParam", + "type": "OrderDirection", + "deprecated": false, + "deprecationMessage": "", + "optional": true + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 142, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nRequest the data to the paginator service.\n\n", + "description": "

Request the data to the paginator service.

\n", + "jsdoctags": [ + { + "name": { + "pos": 4131, + "end": 4137, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "offset" + }, + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 4116, + "end": 4121, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 4122, + "end": 4130, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 4123, + "end": 4129, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 146 + } + } + }, + { + "name": { + "pos": 4161, + "end": 4175, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "sortFieldParam" + }, + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "tagName": { + "pos": 4146, + "end": 4151, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 4152, + "end": 4160, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 4153, + "end": 4159, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 149 + } + } + }, + { + "name": { + "pos": 4207, + "end": 4221, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "sortOrderParam" + }, + "type": "OrderDirection", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "tagName": { + "pos": 4184, + "end": 4189, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 4190, + "end": 4206, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 4191, + "end": 4205, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 177, + "typeName": { + "pos": 4191, + "end": 4205, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "OrderDirection" + } + } + } + } + ] + }, + { + "name": "loadDataPaginationEvent", + "args": [ + { + "name": "event", + "type": "LazyLoadEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 130, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nCall when click on any pagination link\n\n", + "description": "

Call when click on any pagination link

\n", + "jsdoctags": [ + { + "name": { + "pos": 3848, + "end": 3853, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "event" + }, + "type": "LazyLoadEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 3826, + "end": 3831, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 3832, + "end": 3847, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 3833, + "end": 3846, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 177, + "typeName": { + "pos": 3833, + "end": 3846, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "LazyLoadEvent" + } + } + } + } + ] + }, + { + "name": "loadFirstPage", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 158, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nLoad first page of results and reset the pagination url's and set the table pagination.\n\n", + "description": "

Load first page of results and reset the pagination url's and set the table pagination.

\n", + "jsdoctags": [] + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 89, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "paginationSetUp", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 253, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "setItems", + "args": [ + { + "name": "items", + "type": "any[]", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 223, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "items", + "type": "any[]", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "setSortParams", + "args": [ + { + "name": "sortFieldParam", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "optional": true + }, + { + "name": "sortOrderParam", + "type": "OrderDirection", + "deprecated": false, + "deprecationMessage": "", + "optional": true + } + ], + "optional": false, + "returnType": "{ sortField: string; sortOrder: any; }", + "typeParameters": [], + "line": 239, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "sortFieldParam", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "tagName": { + "text": "param" + } + }, + { + "name": "sortOrderParam", + "type": "OrderDirection", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import {\n Component,\n Input,\n Output,\n EventEmitter,\n ViewChild,\n ElementRef,\n OnInit,\n TemplateRef,\n ContentChildren,\n QueryList,\n ContentChild\n} from '@angular/core';\nimport { LazyLoadEvent, MenuItem, PrimeTemplate } from 'primeng/api';\nimport { Table } from 'primeng/table';\nimport { ActionHeaderOptions, ButtonAction } from '@models/action-header';\nimport { DataTableColumn } from '@models/data-table/data-table-column';\nimport { LoggerService } from '@dotcms/dotcms-js';\nimport { DotFormatDateService } from '@services/dot-format-date-service';\nimport { PaginatorService, OrderDirection } from '@services/paginator';\nimport { DotActionMenuItem } from '@shared/models/dot-action-menu/dot-action-menu-item.model';\nimport { take } from 'rxjs/operators';\n\nfunction tableFactory(dotListingDataTableComponent: DotListingDataTableComponent) {\n return dotListingDataTableComponent.dataTable;\n}\n\n@Component({\n providers: [\n PaginatorService,\n {\n provide: Table,\n useFactory: tableFactory,\n deps: [DotListingDataTableComponent]\n }\n ],\n selector: 'dot-listing-data-table',\n styleUrls: ['./dot-listing-data-table.component.scss'],\n templateUrl: 'dot-listing-data-table.component.html'\n})\nexport class DotListingDataTableComponent implements OnInit {\n @Input() columns: DataTableColumn[];\n @Input() url: string;\n @Input() actionHeaderOptions: ActionHeaderOptions;\n @Input() buttonActions: ButtonAction[] = [];\n @Input() sortOrder: string;\n @Input() sortField: string;\n @Input() multipleSelection = false;\n @Input() paginationPerPage = 40;\n @Input() paginatorExtraParams: { [key: string]: string } = {};\n @Input() actions: DotActionMenuItem[];\n @Input() dataKey = '';\n @Input() checkbox = false;\n @Input() mapItems: (item: any[]) => any[];\n @Input() contextMenu = false;\n @Output() rowWasClicked: EventEmitter = new EventEmitter();\n @Output() selectedItems: EventEmitter = new EventEmitter();\n @Output() onContextMenuSelect: EventEmitter = new EventEmitter();\n\n @ViewChild('gf', { static: true })\n globalSearch: ElementRef;\n @ViewChild('dataTable', { static: true })\n dataTable: Table;\n\n @ContentChildren(PrimeTemplate) templates: QueryList;\n\n @ContentChild('rowTemplate') rowTemplate: TemplateRef;\n @ContentChild('headerTemplate') headerTemplate: TemplateRef;\n\n readonly DATE_FORMAT = 'date';\n items: any[];\n selected: any[];\n filter;\n isContentFiltered = false;\n dateColumns: DataTableColumn[];\n loading = true;\n contextMenuItems: MenuItem[];\n maxLinksPage: number;\n totalRecords: number;\n\n constructor(\n public loggerService: LoggerService,\n public paginatorService: PaginatorService,\n private dotFormatDateService: DotFormatDateService\n ) {\n this.paginatorService.url = this.url;\n }\n\n ngOnInit(): void {\n this.globalSearch.nativeElement.focus();\n this.paginationSetUp();\n this.dateColumns = this.columns.filter((column) => column.format === this.DATE_FORMAT);\n }\n\n /**\n * Emit checked rows.\n *\n * @memberof DotListingDataTableComponent\n */\n handleRowCheck(): void {\n this.selectedItems.emit(this.selected);\n }\n\n /**\n * Clear selection and notify change.\n *\n * @memberof DotListingDataTableComponent\n */\n clearSelection(): void {\n this.selected = [];\n this.handleRowCheck();\n }\n\n /**\n * Emit selected row\n * @param {any} rowData\n *\n * @memberof DotListingDataTableComponent\n */\n handleRowClick(rowData: any): void {\n this.rowWasClicked.emit(rowData);\n }\n\n /**\n * Call when click on any pagination link\n * @param {LazyLoadEvent} event\n *\n * @memberof DotListingDataTableComponent\n */\n loadDataPaginationEvent(event: LazyLoadEvent): void {\n this.loadData(event.first, event.sortField, event.sortOrder);\n }\n\n /**\n * Request the data to the paginator service.\n * @param {number} offset\n * @param {string} sortFieldParam\n * @param {OrderDirection} sortOrderParam\n *\n * @memberof DotListingDataTableComponent\n */\n loadData(offset: number, sortFieldParam?: string, sortOrderParam?: OrderDirection): void {\n this.loading = true;\n\n const { sortField, sortOrder } = this.setSortParams(sortFieldParam, sortOrderParam);\n this.paginatorService.filter = this.filter;\n this.paginatorService.sortField = sortField;\n this.paginatorService.sortOrder =\n sortOrder === 1 ? OrderDirection.ASC : OrderDirection.DESC;\n this.getPage(offset);\n }\n\n /**\n * Load first page of results and reset the pagination url's and set the table pagination.\n *\n * @memberof DotListingDataTableComponent\n */\n loadFirstPage(): void {\n this.loading = true;\n this.paginatorService\n .get()\n .pipe(take(1))\n .subscribe((items) => {\n this.setItems(items);\n this.dataTable.first = 1;\n });\n }\n\n /**\n * Reloads data table with updated data on current page\n * @memberof DotListingDataTableComponent\n */\n loadCurrentPage(): void {\n this.loading = true;\n if (this.columns) {\n this.paginatorService\n .getCurrentPage()\n .pipe(take(1))\n .subscribe((items) => this.setItems(items));\n }\n }\n\n /**\n * Column align, return the DataTableColumn's textAlign property if it exists,\n * otherwise return right if the content is number and left if the content's type is not number.\n * @param {DataTableColumn} col\n * @returns string\n * @memberof DotListingDataTableComponent\n */\n getAlign(col: DataTableColumn): string {\n return col.textAlign ? col.textAlign : this.isTypeNumber(col) ? 'right' : 'left';\n }\n\n /**\n * Focus the fist row of the table is there are results.\n * @memberof ListingDataTableComponent\n */\n focusFirstRow(): void {\n const rows: HTMLTableRowElement[] = this.dataTable.tableViewChild.nativeElement.rows;\n if (rows.length > 1) {\n rows[1].focus();\n }\n }\n\n /**\n * Check if display results are filtered.\n * @memberof ListingDataTableComponent\n */\n handleFilter(): void {\n this.isContentFiltered = this.dataTable.filters.hasOwnProperty('global');\n }\n\n private formatData(items: any[]): any[] {\n return items.map((item) => {\n this.dateColumns.forEach(\n (col) =>\n (item[col.fieldName] = this.dotFormatDateService.getRelative(item[col.fieldName]))\n );\n return item;\n });\n }\n\n private setItems(items: any[]): void {\n setTimeout(() => {\n // avoid ExpressionChangedAfterItHasBeenCheckedError on p-table on tests.\n // TODO: Double check if versions after prime-ng 11.0.0 solve the need to add this hack.\n const formattedData = this.dateColumns ? this.formatData(items) : items;\n this.items = this.mapItems === undefined ? formattedData : this.mapItems(formattedData);\n this.loading = false;\n this.maxLinksPage = this.paginatorService.maxLinksPage;\n this.totalRecords = this.paginatorService.totalRecords;\n }, 0);\n }\n\n private isTypeNumber(col: DataTableColumn): boolean {\n return this.items && this.items[0] && typeof this.items[0][col.fieldName] === 'number';\n }\n\n private setSortParams(sortFieldParam?: string, sortOrderParam?: OrderDirection) {\n return {\n sortField: sortFieldParam || this.sortField,\n sortOrder: sortOrderParam || this.sortOrder\n };\n }\n\n private getPage(offset: number): void {\n this.paginatorService\n .getWithOffset(offset)\n .pipe(take(1))\n .subscribe((items) => this.setItems(items));\n }\n\n private paginationSetUp(): void {\n this.paginatorService.url = this.url;\n this.paginatorService.paginationPerPage = this.paginationPerPage;\n if (this.paginatorExtraParams) {\n Object.entries(this.paginatorExtraParams).forEach(([key, value]) =>\n this.paginatorService.setExtraParams(key, value)\n );\n }\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"variables\" as *;\n\n:host {\n display: flex;\n flex-direction: column;\n height: 100%;\n position: relative;\n\n p-table {\n flex-grow: 1;\n }\n\n ::ng-deep {\n .p-datatable {\n position: initial;\n }\n\n .p-datatable,\n .p-table {\n display: flex;\n flex-direction: column;\n height: 100%;\n justify-content: space-between;\n background: $white;\n }\n\n .p-datatable-tablewrapper,\n .p-table-wrapper {\n flex-grow: 1;\n background: $white;\n\n table tbody.p-datatable-data tr,\n table tbody.p-table-tbody tr {\n td {\n cursor: pointer;\n\n span {\n word-break: break-word;\n }\n }\n }\n }\n\n .p-datatable-data,\n .p-table-tbody {\n & > tr > .listing-datatable__action-column {\n padding-bottom: 0;\n padding-top: 0;\n }\n }\n }\n}\n\n.listing-datatable__column-icon {\n display: flex;\n align-items: center;\n\n dot-icon {\n margin-right: $spacing-1;\n }\n}\n\n.listing-datatable__empty {\n display: flex;\n justify-content: center;\n font-size: $spacing-9;\n font-size: $font-size-xx-large;\n margin-top: $spacing-9;\n}\n\ndot-action-header {\n background: $white;\n position: relative;\n z-index: 1;\n}\n\np-dataTable {\n display: flex;\n flex-grow: 1;\n}\n", + "styleUrl": "./dot-listing-data-table.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "loggerService", + "type": "LoggerService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "paginatorService", + "type": "PaginatorService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotFormatDateService", + "type": "DotFormatDateService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 79, + "jsdoctags": [ + { + "name": "loggerService", + "type": "LoggerService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "paginatorService", + "type": "PaginatorService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotFormatDateService", + "type": "DotFormatDateService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": ["OnInit"], + "templateData": "\n \n \n\n\n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n {{ 'No-Results-Found' | dm }}\n \n \n \n \n \n\n\n\n \n {{ col.header }}\n \n \n \n\n\n\n \n
\n \n {{ col.textContent || rowData[col.fieldName] }}\n
\n \n {{ rowData[col.fieldName] }}\n \n \n {{\n col.textContent\n ? (col.textContent | dotStringFormat: [rowData[col.fieldName]])\n : rowData[col.fieldName]\n }}\n \n \n \n \n \n \n
\n" + }, + { + "name": "DotLoadingIndicatorComponent", + "id": "component-DotLoadingIndicatorComponent-9e53dab5c7bfec70513369df3ac5874f84685f850983763c23433122ef35a0ce4546ead8f3730083c209fc79fff88e6a4d90d9e9866e4797efee8ae6586c132c", + "file": "apps/dotcms-ui/src/app/view/components/_common/iframe/dot-loading-indicator/dot-loading-indicator.component.ts", + "encapsulation": ["ViewEncapsulation.Emulated"], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-loading-indicator", + "styleUrls": ["./dot-loading-indicator.component.scss"], + "styles": [], + "templateUrl": ["dot-loading-indicator.component.html"], + "viewProviders": [], + "inputsClass": [ + { + "name": "fullscreen", + "deprecated": false, + "deprecationMessage": "", + "line": 12, + "type": "boolean", + "decorators": [] + } + ], + "outputsClass": [], + "propertiesClass": [ + { + "name": "dotLoadingIndicatorService", + "deprecated": false, + "deprecationMessage": "", + "type": "DotLoadingIndicatorService", + "optional": false, + "description": "", + "line": 14, + "modifierKind": [123] + } + ], + "methodsClass": [], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, Input, ViewEncapsulation } from '@angular/core';\nimport { DotLoadingIndicatorService } from './dot-loading-indicator.service';\n\n@Component({\n encapsulation: ViewEncapsulation.Emulated,\n selector: 'dot-loading-indicator',\n styleUrls: ['./dot-loading-indicator.component.scss'],\n templateUrl: 'dot-loading-indicator.component.html'\n})\nexport class DotLoadingIndicatorComponent {\n @Input()\n fullscreen: boolean;\n\n constructor(public dotLoadingIndicatorService: DotLoadingIndicatorService) {}\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"variables\" as *;\n\n.loader__overlay {\n background: rgba($white, 0.7);\n bottom: 0;\n left: 0;\n position: absolute;\n right: 0;\n top: 0;\n overflow: hidden;\n z-index: 1;\n\n dot-spinner {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n}\n", + "styleUrl": "./dot-loading-indicator.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "dotLoadingIndicatorService", + "type": "DotLoadingIndicatorService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 12, + "jsdoctags": [ + { + "name": "dotLoadingIndicatorService", + "type": "DotLoadingIndicatorService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "templateData": "\n\n
\n \n
\n" + }, + { + "name": "DotLoginAsComponent", + "id": "component-DotLoginAsComponent-1ea8d577ce79fb38cac5f7cf218dc75a33ab2dc4d3a73c48cc9827bdaef0e7c7db3c17f98b9305ddf0debf968d0573f2bd26b74e05f2db0e7ed69865acaa74cc", + "file": "apps/dotcms-ui/src/app/view/components/dot-toolbar/components/dot-login-as/dot-login-as.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-login-as", + "styleUrls": ["./dot-login-as.component.scss"], + "styles": [], + "templateUrl": ["dot-login-as.component.html"], + "viewProviders": [], + "inputsClass": [ + { + "name": "visible", + "deprecated": false, + "deprecationMessage": "", + "line": 35, + "type": "boolean", + "decorators": [] + } + ], + "outputsClass": [ + { + "name": "cancel", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 32, + "type": "EventEmitter" + } + ], + "propertiesClass": [ + { + "name": "destroy$", + "defaultValue": "new Subject()", + "deprecated": false, + "deprecationMessage": "", + "type": "Subject", + "optional": false, + "description": "", + "line": 49, + "modifierKind": [121] + }, + { + "name": "dialogActions", + "deprecated": false, + "deprecationMessage": "", + "type": "DotDialogActions", + "optional": false, + "description": "", + "line": 47 + }, + { + "name": "errorMessage", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 46 + }, + { + "name": "form", + "deprecated": false, + "deprecationMessage": "", + "type": "FormGroup", + "optional": false, + "description": "", + "line": 43 + }, + { + "name": "formEl", + "deprecated": false, + "deprecationMessage": "", + "type": "HTMLFormElement", + "optional": false, + "description": "", + "line": 41, + "decorators": [ + { + "name": "ViewChild", + "stringifiedArguments": "'formEl', {static: true}" + } + ] + }, + { + "name": "needPassword", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 44 + }, + { + "name": "paginationService", + "deprecated": false, + "deprecationMessage": "", + "type": "PaginatorService", + "optional": false, + "description": "", + "line": 57, + "modifierKind": [123] + }, + { + "name": "passwordElem", + "deprecated": false, + "deprecationMessage": "", + "type": "ElementRef", + "optional": false, + "description": "", + "line": 38, + "decorators": [ + { + "name": "ViewChild", + "stringifiedArguments": "'password'" + } + ] + }, + { + "name": "userCurrentPage", + "deprecated": false, + "deprecationMessage": "", + "type": "User[]", + "optional": false, + "description": "", + "line": 45 + } + ], + "methodsClass": [ + { + "name": "close", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 103, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nEmit cancel\n\n", + "description": "

Emit cancel

\n", + "jsdoctags": [] + }, + { + "name": "doLoginAs", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 112, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nDo request to login as specfied user\n\n", + "description": "

Do request to login as specfied user

\n", + "jsdoctags": [] + }, + { + "name": "getUsersList", + "args": [ + { + "name": "filter", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "''" + }, + { + "name": "offset", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "0" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 158, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nCall to load a new page of user.\n\n", + "description": "

Call to load a new page of user.

\n", + "jsdoctags": [ + { + "name": "filter", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "''", + "tagName": { + "text": "param" + } + }, + { + "name": "offset", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "0", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "handleFilterChange", + "args": [ + { + "name": "filter", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 174, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nCall when the user global serach changed\n", + "description": "

Call when the user global serach changed

\n", + "jsdoctags": [ + { + "name": "filter", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "handlePageChange", + "args": [ + { + "name": "event", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 183, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nCall when the current page changed\n", + "description": "

Call when the current page changed

\n", + "jsdoctags": [ + { + "name": "event", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "ngOnDestroy", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 93, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 60, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "userSelectedHandler", + "args": [ + { + "name": "user", + "type": "User", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 146, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nSet need password\n\n", + "description": "

Set need password

\n", + "jsdoctags": [ + { + "name": { + "pos": 4106, + "end": 4110, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "user" + }, + "type": "User", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 4093, + "end": 4098, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 4099, + "end": 4105, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 4100, + "end": 4104, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 177, + "typeName": { + "pos": 4100, + "end": 4104, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "User" + } + } + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import {\n Component,\n Output,\n EventEmitter,\n Input,\n OnInit,\n ElementRef,\n ViewChild,\n OnDestroy,\n Inject\n} from '@angular/core';\n\nimport { LoginService, User } from '@dotcms/dotcms-js';\n\nimport { FormGroup, FormBuilder, FormControl, Validators } from '@angular/forms';\nimport { Subject } from 'rxjs';\nimport { take, takeUntil } from 'rxjs/operators';\n\nimport { DotMessageService } from '@services/dot-message/dot-messages.service';\nimport { PaginatorService } from '@services/paginator';\nimport { DotDialogActions } from '@components/dot-dialog/dot-dialog.component';\nimport { LOCATION_TOKEN } from '@dotcms/app/providers';\nimport { DotNavigationService } from '@components/dot-navigation/services/dot-navigation.service';\n\n@Component({\n selector: 'dot-login-as',\n styleUrls: ['./dot-login-as.component.scss'],\n templateUrl: 'dot-login-as.component.html'\n})\nexport class DotLoginAsComponent implements OnInit, OnDestroy {\n @Output()\n cancel = new EventEmitter();\n\n @Input()\n visible: boolean;\n\n @ViewChild('password')\n passwordElem: ElementRef;\n\n @ViewChild('formEl', { static: true })\n formEl: HTMLFormElement;\n\n form: FormGroup;\n needPassword = false;\n userCurrentPage: User[];\n errorMessage: string;\n dialogActions: DotDialogActions;\n\n private destroy$: Subject = new Subject();\n\n constructor(\n @Inject(LOCATION_TOKEN) private location: Location,\n private dotMessageService: DotMessageService,\n private dotNavigationService: DotNavigationService,\n private fb: FormBuilder,\n private loginService: LoginService,\n public paginationService: PaginatorService\n ) {}\n\n ngOnInit(): void {\n this.paginationService.url = 'v1/users/loginAsData';\n this.getUsersList();\n\n this.form = this.fb.group({\n loginAsUser: new FormControl('', Validators.required),\n password: ''\n });\n\n this.form.valueChanges.pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.dialogActions = {\n ...this.dialogActions,\n accept: {\n ...this.dialogActions.accept,\n disabled: !this.form.valid\n }\n };\n });\n\n this.dialogActions = {\n accept: {\n label: this.dotMessageService.get('Change'),\n action: () => {\n this.formEl.ngSubmit.emit();\n },\n disabled: true\n },\n cancel: {\n label: this.dotMessageService.get('cancel')\n }\n };\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.complete();\n }\n\n /**\n * Emit cancel\n *\n * @memberof LoginAsComponent\n */\n close(): void {\n this.cancel.emit(true);\n }\n\n /**\n * Do request to login as specfied user\n *\n * @memberof LoginAsComponent\n */\n doLoginAs(): void {\n this.errorMessage = '';\n const password: string = this.form.value.password;\n const user: User = this.form.value.loginAsUser;\n this.loginService\n .loginAs({ user: user, password: password })\n .pipe(take(1))\n .subscribe(\n (data) => {\n if (data) {\n this.dotNavigationService.goToFirstPortlet().then(() => {\n this.location.reload();\n });\n }\n },\n (response) => {\n if (response.errorsMessages) {\n this.errorMessage = response.errorsMessages;\n } else {\n this.errorMessage = this.dotMessageService.get(\n 'loginas.error.wrong-credentials'\n );\n this.passwordElem.nativeElement.focus();\n }\n }\n );\n }\n\n /**\n * Set need password\n *\n * @param {User} user\n * @memberof LoginAsComponent\n */\n userSelectedHandler(user: User): void {\n this.errorMessage = '';\n this.needPassword = user.requestPassword || false;\n }\n\n /**\n * Call to load a new page of user.\n *\n * @param string [filter='']\n * @param number [page=1]\n * @memberof LoginAsComponent\n */\n getUsersList(filter = '', offset = 0): void {\n this.paginationService.filter = filter;\n this.paginationService\n .getWithOffset(offset)\n .pipe(take(1))\n .subscribe((items) => {\n // items.splice(0) to return a new object and trigger the change detection\n this.userCurrentPage = items.splice(0);\n });\n }\n\n /**\n * Call when the user global serach changed\n * @param any filter\n * @memberof SiteSelectorComponent\n */\n handleFilterChange(filter): void {\n this.getUsersList(filter);\n }\n\n /**\n * Call when the current page changed\n * @param any event\n * @memberof SiteSelectorComponent\n */\n handlePageChange(event): void {\n this.getUsersList(event.filter, event.first);\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"variables\" as *;\n@import \"mixins\";\n\n.login-as {\n width: 300px;\n}\n\n.login-as__error-message {\n color: $red;\n margin-top: 0;\n}\n\ninput[type=\"password\"] {\n width: 100%;\n}\n", + "styleUrl": "./dot-login-as.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "location", + "type": "Location", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotMessageService", + "type": "DotMessageService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotNavigationService", + "type": "DotNavigationService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "fb", + "type": "FormBuilder", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "loginService", + "type": "LoginService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "paginationService", + "type": "PaginatorService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 49, + "jsdoctags": [ + { + "name": "location", + "type": "Location", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotMessageService", + "type": "DotMessageService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotNavigationService", + "type": "DotNavigationService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "fb", + "type": "FormBuilder", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "loginService", + "type": "LoginService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "paginationService", + "type": "PaginatorService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": ["OnInit", "OnDestroy"], + "templateData": "\n
\n \n

{{ errorMessage }}

\n \n
\n \n \n \n
\n
\n \n
\n \n
\n\n" + }, + { + "name": "DotLoginComponent", + "id": "component-DotLoginComponent-1355bdb009d2d2a6d78f32140b43560130b177a8dcd5f58a8d7e22257560a3a5f828a42611a19df17ebe9712025548f7aecf47f7c6eea57f69f45819d9da4312", + "file": "apps/dotcms-ui/src/app/view/components/login/dot-login-component/dot-login.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-login-component", + "styleUrls": ["./dot-login.component.scss"], + "styles": [], + "templateUrl": ["./dot-login.component.html"], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "destroy$", + "defaultValue": "new Subject()", + "deprecated": false, + "deprecationMessage": "", + "type": "Subject", + "optional": false, + "description": "", + "line": 31, + "modifierKind": [121] + }, + { + "name": "isError", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 26 + }, + { + "name": "languages", + "defaultValue": "[]", + "deprecated": false, + "deprecationMessage": "", + "type": "SelectItem[]", + "optional": false, + "description": "", + "line": 28 + }, + { + "name": "loginForm", + "deprecated": false, + "deprecationMessage": "", + "type": "FormGroup", + "optional": false, + "description": "", + "line": 27 + }, + { + "name": "loginInfo$", + "deprecated": false, + "deprecationMessage": "", + "type": "Observable", + "optional": false, + "description": "", + "line": 29 + }, + { + "name": "loginPageStateService", + "deprecated": false, + "deprecationMessage": "", + "type": "DotLoginPageStateService", + "optional": false, + "description": "", + "line": 40, + "modifierKind": [123] + }, + { + "name": "message", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 25 + } + ], + "methodsClass": [ + { + "name": "getLanguageFormatted", + "args": [ + { + "name": "lang", + "type": "DotLoginLanguage", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 150, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "lang", + "type": "DotLoginLanguage", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "goToForgotPassword", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 113, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nDisplay the forgot password card\n\n", + "description": "

Display the forgot password card

\n", + "jsdoctags": [] + }, + { + "name": "isBadRequestOrUnathorized", + "args": [ + { + "name": "status", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 162, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "status", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "logInUser", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 72, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\n Executes the logIn service\n\n @memberof DotLoginComponent\n", + "description": "

Executes the logIn service

\n

@memberof DotLoginComponent

\n", + "jsdoctags": [] + }, + { + "name": "ngOnDestroy", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 63, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 45, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "onLanguageChange", + "args": [ + { + "name": "lang", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 103, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nCall the service to update the language\n\n", + "description": "

Call the service to update the language

\n", + "jsdoctags": [ + { + "name": "lang", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "setFromState", + "args": [ + { + "name": "disable", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 154, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "disable", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "setInitialFormValues", + "args": [ + { + "name": "loginInfo", + "type": "DotLoginInformation", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 117, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "loginInfo", + "type": "DotLoginInformation", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "setInitialMessage", + "args": [ + { + "name": "loginInfo", + "type": "DotLoginInformation", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 125, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "loginInfo", + "type": "DotLoginInformation", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "setLanguageItems", + "args": [ + { + "name": "languages", + "type": "DotLoginLanguage[]", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 140, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "languages", + "type": "DotLoginLanguage[]", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "setMessage", + "args": [ + { + "name": "message", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "error", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "", + "optional": true + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 166, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "message", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "error", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, OnInit, OnDestroy } from '@angular/core';\nimport { HttpCode, LoggerService, LoginService, User, DotLoginParams } from '@dotcms/dotcms-js';\nimport { DotLoginInformation, DotLoginLanguage } from '@models/dot-login';\nimport { SelectItem } from 'primeng/api';\nimport { FormBuilder, FormGroup, Validators } from '@angular/forms';\nimport { take, takeUntil, tap } from 'rxjs/operators';\nimport { Observable, Subject } from 'rxjs';\nimport { DotRouterService } from '@services/dot-router/dot-router.service';\nimport { DotLoginPageStateService } from '@components/login/shared/services/dot-login-page-state.service';\nimport { DotLoadingIndicatorService } from '@components/_common/iframe/dot-loading-indicator/dot-loading-indicator.service';\nimport { ActivatedRoute, Params } from '@angular/router';\nimport { DotMessageService } from '@services/dot-message/dot-messages.service';\nimport { DotFormatDateService } from '@services/dot-format-date-service';\n\n@Component({\n selector: 'dot-login-component',\n templateUrl: './dot-login.component.html',\n styleUrls: ['./dot-login.component.scss']\n})\n/**\n * The login component allows the user to fill all\n * the info required to log in the dotCMS angular backend\n */\nexport class DotLoginComponent implements OnInit, OnDestroy {\n message = '';\n isError = false;\n loginForm: FormGroup;\n languages: SelectItem[] = [];\n loginInfo$: Observable;\n\n private destroy$: Subject = new Subject();\n\n constructor(\n private loginService: LoginService,\n private fb: FormBuilder,\n private dotRouterService: DotRouterService,\n private dotLoadingIndicatorService: DotLoadingIndicatorService,\n private loggerService: LoggerService,\n private route: ActivatedRoute,\n public loginPageStateService: DotLoginPageStateService,\n private dotMessageService: DotMessageService,\n private dotFormatDateService: DotFormatDateService,\n ) {}\n\n ngOnInit() {\n this.dotMessageService.init(true);\n this.loginForm = this.fb.group({\n login: ['', [Validators.required]],\n language: [''],\n password: ['', [Validators.required]],\n rememberMe: false,\n backEndLogin: true\n });\n\n this.loginInfo$ = this.loginPageStateService.get().pipe(\n takeUntil(this.destroy$),\n tap((loginInfo: DotLoginInformation) => {\n this.setInitialFormValues(loginInfo);\n })\n );\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.complete();\n }\n /**\n * Executes the logIn service\n *\n * @memberof DotLoginComponent\n */\n logInUser(): void {\n this.setFromState(true);\n this.dotLoadingIndicatorService.show();\n this.setMessage('');\n this.loginService\n .loginUser(this.loginForm.value as DotLoginParams)\n .pipe(take(1))\n .subscribe(\n (user: User) => {\n this.setMessage('');\n this.dotLoadingIndicatorService.hide();\n this.dotRouterService.goToMain(user['editModeUrl']);\n this.dotFormatDateService.setLang(user.languageId);\n },\n (res: any) => {\n if (this.isBadRequestOrUnathorized(res.status)) {\n this.setMessage(res.error.errors[0].message, true);\n } else {\n this.loggerService.debug(res);\n }\n this.setFromState(false);\n this.dotLoadingIndicatorService.hide();\n }\n );\n }\n\n /**\n * Call the service to update the language\n *\n * @memberof DotLoginComponent\n */\n onLanguageChange(lang: string): void {\n this.loginPageStateService.update(lang);\n this.dotMessageService.init(true, lang);\n }\n\n /**\n * Display the forgot password card\n *\n * @memberof DotLoginComponent\n */\n goToForgotPassword(): void {\n this.dotRouterService.goToForgotPassword();\n }\n\n private setInitialFormValues(loginInfo: DotLoginInformation): void {\n this.loginForm\n .get('language')\n .setValue(this.getLanguageFormatted(loginInfo.entity.currentLanguage));\n this.setLanguageItems(loginInfo.entity.languages);\n this.setInitialMessage(loginInfo);\n }\n\n private setInitialMessage(loginInfo: DotLoginInformation): void {\n this.route.queryParams.pipe(take(1)).subscribe((params: Params) => {\n if (params['changedPassword']) {\n this.setMessage(loginInfo.i18nMessagesMap['reset-password-success']);\n } else if (params['resetEmailSent']) {\n this.setMessage(\n loginInfo.i18nMessagesMap['a-new-password-has-been-sent-to-x'].replace(\n '{0}',\n params['resetEmail']\n )\n );\n }\n });\n }\n\n private setLanguageItems(languages: DotLoginLanguage[]): void {\n this.languages =\n this.languages.length === 0\n ? (this.languages = languages.map((lang: DotLoginLanguage) => ({\n label: lang.displayName,\n value: this.getLanguageFormatted(lang)\n })))\n : this.languages;\n }\n\n private getLanguageFormatted(lang: DotLoginLanguage): string {\n return lang.language + '_' + lang.country;\n }\n\n private setFromState(disable: boolean): void {\n if (disable) {\n this.loginForm.disable();\n } else {\n this.loginForm.enable();\n }\n }\n\n private isBadRequestOrUnathorized(status: number) {\n return status === HttpCode.BAD_REQUEST || status === HttpCode.UNAUTHORIZED;\n }\n\n private setMessage(message: string, error?: boolean): void {\n this.message = message;\n this.isError = !!error;\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"variables\" as *;\n@import \"mixins\";\n@import \"dotcms-theme/utils/theme-variables\";\n\n:host {\n @include login-container;\n}\n\n.login__header {\n display: flex;\n flex-wrap: wrap;\n justify-content: space-between;\n}\n\n.login__logo {\n margin: $spacing-1 0 $spacing-1;\n\n img {\n width: 102px;\n }\n}\n\n.login__title {\n margin: 4rem 0 $spacing-4 0;\n}\n\n.login__password-settings {\n display: flex;\n\n p-checkbox {\n flex-grow: 1;\n }\n\n a {\n align-self: center;\n }\n}\n\n.login__footer {\n color: $gray-light;\n text-align: center;\n text-transform: uppercase;\n font-size: $font-size-x-small;\n}\n\n.login__button {\n margin-right: $spacing-1;\n}\n\n.login__message.success {\n color: $brand-primary;\n}\n", + "styleUrl": "./dot-login.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "loginService", + "type": "LoginService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "fb", + "type": "FormBuilder", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotRouterService", + "type": "DotRouterService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotLoadingIndicatorService", + "type": "DotLoadingIndicatorService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "loggerService", + "type": "LoggerService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "route", + "type": "ActivatedRoute", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "loginPageStateService", + "type": "DotLoginPageStateService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotMessageService", + "type": "DotMessageService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotFormatDateService", + "type": "DotFormatDateService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 31, + "jsdoctags": [ + { + "name": "loginService", + "type": "LoginService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "fb", + "type": "FormBuilder", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotRouterService", + "type": "DotRouterService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotLoadingIndicatorService", + "type": "DotLoadingIndicatorService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "loggerService", + "type": "LoggerService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "route", + "type": "ActivatedRoute", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "loginPageStateService", + "type": "DotLoginPageStateService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotMessageService", + "type": "DotMessageService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotFormatDateService", + "type": "DotFormatDateService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": ["OnInit", "OnDestroy"], + "templateData": "
\n
\n
\n
\n \"DotCMS\n
\n \n \n
\n\n

\n {{ loginInfo.i18nMessagesMap['welcome-login'] }}\n

\n\n

\n
\n \n\n \n\n \n \n
\n
\n \n\n \n\n \n \n
\n
\n \n {{ loginInfo.i18nMessagesMap['get-new-password'] }}\n
\n
\n \n \n
\n
\n {{ loginInfo.i18nMessagesMap['Server'] }}: {{ loginInfo.entity.serverId }}\n |\n {{ loginInfo.entity.levelName }}: {{ loginInfo.entity.version }} -\n {{ loginInfo.entity.buildDateString }}\n \n \n
\n \n
\n" + }, + { + "name": "DotLoginPageComponent", + "id": "component-DotLoginPageComponent-920090a2ec809f1af4a29e83e6475f9e414ce82be2b085c3272b3f2f6915895e6f3a52957051f7414485a475b5619168c3665e55bf47d52106c0f271c039f04a", + "file": "apps/dotcms-ui/src/app/view/components/login/main/dot-login-page.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-login-page-component", + "styleUrls": ["./dot-login-page.component.scss"], + "styles": [], + "templateUrl": ["dot-login-page.component.html"], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "loginPageStateService", + "deprecated": false, + "deprecationMessage": "", + "type": "DotLoginPageStateService", + "optional": false, + "description": "", + "line": 15, + "modifierKind": [123] + } + ], + "methodsClass": [ + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 17, + "deprecated": false, + "deprecationMessage": "" + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, OnInit } from '@angular/core';\nimport { DotLoginUserSystemInformation } from '@models/dot-login';\nimport { pluck, take } from 'rxjs/operators';\nimport { DotLoginPageStateService } from '@components/login/shared/services/dot-login-page-state.service';\n\n@Component({\n selector: 'dot-login-page-component',\n styleUrls: ['./dot-login-page.component.scss'],\n templateUrl: 'dot-login-page.component.html'\n})\n/**\n * The login component allows set the background image and background color.\n */\nexport class DotLoginPageComponent implements OnInit {\n constructor(public loginPageStateService: DotLoginPageStateService) {}\n\n ngOnInit(): void {\n this.loginPageStateService\n .get()\n .pipe(take(1), pluck('entity'))\n .subscribe((dotLoginUserSystemInformation: DotLoginUserSystemInformation) => {\n document.body.style.backgroundColor =\n dotLoginUserSystemInformation.backgroundColor || '';\n document.body.style.backgroundImage = dotLoginUserSystemInformation.backgroundPicture\n ? `url('${dotLoginUserSystemInformation.backgroundPicture}')`\n : '';\n });\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"variables\" as *;\n@import \"mixins\";\n\n:host {\n height: 100%;\n width: 100%;\n display: flex;\n justify-content: center;\n}\n\n.login {\n @include box_shadow(5);\n background-color: $white;\n border-radius: $border-radius * 3;\n align-self: center;\n max-width: 520px;\n width: 90%;\n display: flex;\n justify-content: center;\n padding: 5.5rem 0 4rem;\n}\n", + "styleUrl": "./dot-login-page.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "loginPageStateService", + "type": "DotLoginPageStateService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 14, + "jsdoctags": [ + { + "name": "loginPageStateService", + "type": "DotLoginPageStateService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": ["OnInit"], + "templateData": "
\n \n
\n" + }, + { + "name": "DotLogOutContainerComponent", + "id": "component-DotLogOutContainerComponent-38acf6873695e78a90001f5ca2e0f54523912abfaa7c45464f503d0962d343770df86ea680c5f2adb33ff8e9060d9e6f33620b3c30a88e93f2d78e95d1e86e53", + "file": "apps/dotcms-ui/src/app/view/components/login/dot-logout-container-component/dot-log-out-container.ts", + "encapsulation": ["ViewEncapsulation.Emulated"], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-log-out-container", + "styleUrls": [], + "styles": [], + "template": "", + "templateUrl": [], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [], + "methodsClass": [], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, ViewEncapsulation } from '@angular/core';\nimport { LoginService, LOGOUT_URL } from '@dotcms/dotcms-js';\nimport { DotRouterService } from '../../../../api/services/dot-router/dot-router.service';\nimport { take } from 'rxjs/operators';\n\n@Component({\n encapsulation: ViewEncapsulation.Emulated,\n selector: 'dot-log-out-container',\n template: ''\n})\nexport class DotLogOutContainerComponent {\n constructor(loginService: LoginService, router: DotRouterService) {\n loginService.isLogin$.pipe(take(1)).subscribe((isLogin) => {\n if (isLogin) {\n window.location.href = LOGOUT_URL;\n } else {\n router.goToLogin();\n }\n });\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "loginService", + "type": "LoginService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "router", + "type": "DotRouterService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 11, + "jsdoctags": [ + { + "name": "loginService", + "type": "LoginService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "router", + "type": "DotRouterService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + }, + { + "name": "DotMaterialIcon", + "id": "component-DotMaterialIcon-b08a6bc3de36a138424021040c4e8fc8635df3822caea898060d750f3f3b6ddf0b6f80c959b23e6c6c6f822bc7132f49d66298748cb74aec10965e38a45c23b0", + "file": "libs/dotcms-webcomponents/src/elements/dot-material-icon-picker/dot-material-icon-picker.tsx", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "styleUrls": [], + "styles": [], + "templateUrl": [], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "colorLabel", + "defaultValue": "'Color'", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

Label set for the input color

\n", + "line": 49, + "rawdescription": "\nLabel set for the input color", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{mutable: true, reflect: true}" + } + ] + }, + { + "name": "colorValue", + "defaultValue": "'#000'", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

Color value set from the input

\n", + "line": 45, + "rawdescription": "\nColor value set from the input", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{mutable: true, reflect: true}" + } + ] + }, + { + "name": "dotValueChange", + "deprecated": false, + "deprecationMessage": "", + "type": "EventEmitter", + "optional": false, + "description": "", + "line": 55, + "decorators": [ + { + "name": "Event", + "stringifiedArguments": "" + } + ] + }, + { + "name": "element", + "deprecated": false, + "deprecationMessage": "", + "type": "HTMLElement", + "optional": false, + "description": "", + "line": 20, + "decorators": [ + { + "name": "Element", + "stringifiedArguments": "" + } + ] + }, + { + "name": "emitValues", + "defaultValue": "() => {...}", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 172 + }, + { + "name": "findMatch", + "defaultValue": "() => {...}", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 69 + }, + { + "name": "getSuggestionElement", + "defaultValue": "() => {...}", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 151 + }, + { + "name": "name", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

Name that will be used as ID

\n", + "line": 31, + "rawdescription": "\nName that will be used as ID", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "onChangeColor", + "defaultValue": "() => {...}", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 81 + }, + { + "name": "onFocus", + "defaultValue": "() => {...}", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 86 + }, + { + "name": "onInput", + "defaultValue": "() => {...}", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 75 + }, + { + "name": "onKeyDown", + "defaultValue": "() => {...}", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 99 + }, + { + "name": "onKeyPress", + "defaultValue": "() => {...}", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 128 + }, + { + "name": "onSelect", + "defaultValue": "() => {...}", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 137 + }, + { + "name": "onTextChange", + "defaultValue": "() => {...}", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 144 + }, + { + "name": "placeholder", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

Value for input placeholder

\n", + "line": 27, + "rawdescription": "\nValue for input placeholder", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "selectedSuggestionIndex", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 24, + "decorators": [ + { + "name": "State", + "stringifiedArguments": "" + } + ] + }, + { + "name": "showColor", + "defaultValue": "null", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

Show/Hide color picker

\n", + "line": 41, + "rawdescription": "\nShow/Hide color picker", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{mutable: true, reflect: true}" + } + ] + }, + { + "name": "showSuggestions", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 22, + "decorators": [ + { + "name": "State", + "stringifiedArguments": "" + } + ] + }, + { + "name": "size", + "defaultValue": "null", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

Size value set for font-size

\n", + "line": 38, + "rawdescription": "\nSize value set for font-size", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{mutable: true, reflect: true}" + } + ] + }, + { + "name": "suggestionArr", + "defaultValue": "[]", + "deprecated": false, + "deprecationMessage": "", + "type": "string[]", + "optional": false, + "description": "", + "line": 23, + "decorators": [ + { + "name": "State", + "stringifiedArguments": "" + } + ] + }, + { + "name": "suggestionlist", + "defaultValue": "MaterialIconClasses", + "deprecated": false, + "deprecationMessage": "", + "type": "string[]", + "optional": false, + "description": "

Values that the auto-complete textbox should search for

\n", + "line": 52, + "rawdescription": "\nValues that the auto-complete textbox should search for", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "value", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

Value set from the dropdown option

\n", + "line": 35, + "rawdescription": "\nValue set from the dropdown option", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{mutable: true, reflect: true}" + } + ] + } + ], + "methodsClass": [ + { + "name": "componentWillLoad", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 65, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "getColorPicker", + "args": [ + { + "name": "show", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "JSX.Element", + "typeParameters": [], + "line": 245, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "show", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "handleWindowClick", + "args": [ + { + "name": "e", + "type": "Event", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 58, + "deprecated": false, + "deprecationMessage": "", + "decorators": [ + { + "name": "Listen", + "stringifiedArguments": "'click', {target: 'window'}" + } + ], + "jsdoctags": [ + { + "name": "e", + "type": "Event", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "render", + "args": [], + "optional": false, + "returnType": "any", + "typeParameters": [], + "line": 180, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "scrollIntoSelectedOption", + "args": [ + { + "name": "index", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 238, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "index", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import {\n Component,\n Prop,\n State,\n Listen,\n Element,\n Host,\n h,\n Event,\n EventEmitter\n} from '@stencil/core';\nimport { MaterialIconClasses } from './material-icon-classes';\nimport '@material/mwc-icon';\n\n@Component({\n tag: 'dot-material-icon-picker',\n styleUrl: 'dot-material-icon-picker.scss'\n})\nexport class DotMaterialIcon {\n @Element() element: HTMLElement;\n\n @State() showSuggestions: boolean;\n @State() suggestionArr: string[] = [];\n @State() selectedSuggestionIndex: number;\n\n /** Value for input placeholder */\n @Prop({ reflect: true }) placeholder: string = '';\n\n /** Name that will be used as ID */\n @Prop({ reflect: true })\n name = '';\n\n /** Value set from the dropdown option */\n @Prop({ mutable: true, reflect: true })\n value = '';\n\n /** Size value set for font-size */\n @Prop({ mutable: true, reflect: true }) size: string = null;\n\n /** Show/Hide color picker */\n @Prop({ mutable: true, reflect: true }) showColor: string = null;\n\n /** Color value set from the input */\n @Prop({ mutable: true, reflect: true })\n colorValue = '#000';\n\n /** Label set for the input color */\n @Prop({ mutable: true, reflect: true })\n colorLabel = 'Color';\n\n /** Values that the auto-complete textbox should search for */\n @Prop({ reflect: true }) suggestionlist: string[] = MaterialIconClasses;\n\n @Event()\n dotValueChange: EventEmitter<{ name: string; value: string; colorValue: string }>;\n\n @Listen('click', { target: 'window' })\n handleWindowClick(e: Event) {\n if (!this.element.contains(e.target as HTMLElement)) {\n this.showSuggestions = false;\n this.selectedSuggestionIndex = undefined;\n }\n }\n\n componentWillLoad() {\n this.emitValues();\n }\n\n findMatch = (searchTerm: string): string[] => {\n return this.suggestionlist.filter(\n (term) => term.includes(searchTerm) && term !== searchTerm\n );\n };\n\n onInput = (e: Event) => {\n this.value = (e.target as any).value;\n this.suggestionArr = this.findMatch(this.value);\n this.showSuggestions = true;\n };\n\n onChangeColor = (e: Event) => {\n this.colorValue = (e.target as any).value;\n this.emitValues();\n };\n\n onFocus = (resetSearch: boolean) => {\n this.showSuggestions = true;\n this.selectedSuggestionIndex = undefined;\n // On first focus, this.value is null\n const match = resetSearch ? '' : this.value || '';\n this.suggestionArr = this.findMatch(match);\n\n if (resetSearch) {\n const input: HTMLInputElement = this.element.querySelector('.dot-material-icon__input');\n input.focus();\n }\n };\n\n onKeyDown = (e: KeyboardEvent) => {\n switch (e.key) {\n case 'ArrowUp':\n if (this.suggestionArr.length > 0) {\n this.selectedSuggestionIndex =\n this.selectedSuggestionIndex === undefined ||\n this.selectedSuggestionIndex === 0\n ? this.suggestionArr.length - 1\n : this.selectedSuggestionIndex - 1;\n\n this.scrollIntoSelectedOption(this.selectedSuggestionIndex);\n }\n break;\n case 'ArrowDown':\n if (this.suggestionArr.length > 0) {\n this.selectedSuggestionIndex =\n this.selectedSuggestionIndex === undefined ||\n this.selectedSuggestionIndex === this.suggestionArr.length - 1\n ? 0\n : this.selectedSuggestionIndex + 1;\n\n this.scrollIntoSelectedOption(this.selectedSuggestionIndex);\n }\n break;\n default:\n break;\n }\n };\n\n onKeyPress = (e: KeyboardEvent) => {\n if (e.key === 'Enter') {\n e.preventDefault();\n if (this.selectedSuggestionIndex !== undefined) {\n this.onSelect(this.suggestionArr[this.selectedSuggestionIndex]);\n }\n }\n };\n\n onSelect = (selection: string) => {\n this.value = selection;\n this.selectedSuggestionIndex = undefined;\n this.showSuggestions = false;\n this.emitValues();\n };\n\n onTextChange = (e: Event) => {\n const value = (e.target as HTMLInputElement).value;\n if (this.suggestionlist.includes(value)) {\n this.onSelect(value);\n }\n };\n\n getSuggestionElement = (suggestion: string): JSX.Element => {\n const isSelected =\n this.selectedSuggestionIndex !== undefined &&\n suggestion === this.suggestionArr[this.selectedSuggestionIndex];\n return (\n this.onSelect(suggestion)}\n >\n \n \n );\n };\n\n emitValues = () => {\n this.dotValueChange.emit({\n colorValue: this.colorValue,\n name: this.name,\n value: this.value\n });\n };\n\n render() {\n return (\n \n
\n
\n \n {this.value}\n \n this.onTextChange(e)}\n onInput={(e) => this.onInput(e)}\n onClick={() => this.onFocus(false)}\n onKeyDown={(e) => this.onKeyDown(e)}\n onKeyPress={(e) => this.onKeyPress(e)}\n />\n {\n e.preventDefault();\n this.onFocus(true);\n }}\n >\n arrow_drop_down\n \n
\n
\n
\n
\n {this.getColorPicker(this.showColor)}\n \n );\n }\n\n private scrollIntoSelectedOption(index: number) {\n const optionsList = this.element.querySelectorAll('.dot-material-icon__option');\n optionsList[index].scrollIntoView({\n behavior: 'smooth'\n });\n }\n\n private getColorPicker(show: string): JSX.Element {\n return show === 'true' ? (\n
\n \n this.onChangeColor(e)}\n value={this.colorValue}\n />\n
\n ) : null;\n }\n}\n", + "tag": "dot-material-icon-picker", + "styleUrl": "dot-material-icon-picker.scss", + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "" + }, + { + "name": "DotMdIconSelectorComponent", + "id": "component-DotMdIconSelectorComponent-69e51cebe4eff276bb78d27456b9cf4295db4e472642dd2622655b1af7abac4c43ab8940deac325caf60c7698248fb905f69a8741e91ef1d8f06542d429836f5", + "file": "apps/dotcms-ui/src/app/view/components/_common/dot-md-icon-selector/dot-md-icon-selector.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [ + { + "name": "{\n provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DotMdIconSelectorComponent), multi: true\n}", + "type": "component" + } + ], + "selector": "dot-md-icon-selector", + "styleUrls": ["./dot-md-icon-selector.component.scss"], + "styles": [], + "templateUrl": ["./dot-md-icon-selector.component.html"], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "onChange", + "defaultValue": "() => {...}", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 22 + }, + { + "name": "onTouched", + "defaultValue": "() => {...}", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 21 + }, + { + "name": "value", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 17 + } + ], + "methodsClass": [ + { + "name": "onBlur", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 24, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "onSelect", + "args": [ + { + "name": "e", + "type": "CustomEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 46, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nHandle web component icon selection\n\n", + "description": "

Handle web component icon selection

\n", + "jsdoctags": [ + { + "name": { + "pos": 989, + "end": 990, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "e" + }, + "type": "CustomEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 961, + "end": 966, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 967, + "end": 988, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 968, + "end": 987, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 177, + "typeName": { + "pos": 968, + "end": 979, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "CustomEvent" + }, + "typeArguments": [ + { + "pos": 980, + "end": 986, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 149 + } + ] + } + } + } + ] + }, + { + "name": "registerOnChange", + "args": [ + { + "name": "fn", + "type": "any", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 32, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "fn", + "type": "any", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "registerOnTouched", + "args": [ + { + "name": "fn", + "type": "any", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 28, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "fn", + "type": "any", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "writeValue", + "args": [ + { + "name": "value", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 36, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "value", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, forwardRef } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\n@Component({\n selector: 'dot-md-icon-selector',\n templateUrl: './dot-md-icon-selector.component.html',\n styleUrls: ['./dot-md-icon-selector.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DotMdIconSelectorComponent),\n multi: true\n }\n ]\n})\nexport class DotMdIconSelectorComponent implements ControlValueAccessor {\n value = '';\n\n constructor() {}\n\n onTouched = () => {};\n onChange = (_) => {};\n\n onBlur() {\n this.onTouched();\n }\n\n registerOnTouched(fn: any) {\n this.onTouched = fn;\n }\n\n registerOnChange(fn: any) {\n this.onChange = fn;\n }\n\n writeValue(value: string) {\n this.value = value;\n }\n\n /**\n * Handle web component icon selection\n *\n * @param {CustomEvent} e\n * @memberof DotMdIconSelectorComponent\n */\n onSelect(e: CustomEvent) {\n this.onChange((e.target as HTMLInputElement).value);\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"variables\" as *;\n\ndot-material-icon-picker {\n border: solid 1px $gray-light;\n border-radius: $border-radius;\n transition: border-color $basic-speed ease-in;\n\n &.is-open {\n box-shadow: inset 0 0 0 1px $brand-primary;\n border-color: $brand-primary;\n }\n\n &:hover {\n border-color: $brand-primary;\n }\n\n &::ng-deep {\n .dot-material-icon__input, .dot-material-icon__button, .dot-material-icon__preview {\n border: 0;\n background: none;\n }\n\n .dot-material-icon__input {\n padding: $spacing-2;\n\n &:focus {\n outline: none;\n }\n }\n\n .dot-material-icon__preview {\n font-size: $font-size-x-large;\n margin-left: $spacing-2;\n }\n\n .dot-material-icon__button mwc-icon {\n font-size: 2rem; // we don't have 2rem var this is for this icon only\n }\n\n .dot-material-icon__list {\n border: 0;\n box-shadow: 0 5px 5px -3px rgba(0, 0, 0, 0.2), 0 8px 10px 1px rgba(0, 0, 0, 0.14),\n 0 3px 14px 2px rgba(0, 0, 0, 0.12);\n color: $black;\n\n li:hover {\n background: rgba($brand-secondary_rgb, 0.12);\n color: $black;\n }\n\n label {\n align-items: center;\n cursor: pointer;\n display: flex;\n padding: $spacing-2;\n }\n\n mwc-icon {\n font-size: $font-size-large;\n }\n }\n }\n}\n\n", + "styleUrl": "./dot-md-icon-selector.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [], + "line": 17 + }, + "implements": ["ControlValueAccessor"], + "templateData": "\n" + }, + { + "name": "DotMenuComponent", + "id": "component-DotMenuComponent-64ca06c38cbaa6730f4f2726832abcd5b67d9e8504c1d4a20adde9d3643faab925cd077f4297ce46ce17fdb0249f3e72e12f61081720cbc8af3aa2e29c6667bd", + "file": "apps/dotcms-ui/src/app/view/components/_common/dot-menu/dot-menu.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-menu", + "styleUrls": ["./dot-menu.component.scss"], + "styles": [], + "templateUrl": ["./dot-menu.component.html"], + "viewProviders": [], + "inputsClass": [ + { + "name": "float", + "deprecated": false, + "deprecationMessage": "", + "line": 26, + "type": "boolean", + "decorators": [] + }, + { + "name": "icon", + "deprecated": false, + "deprecationMessage": "", + "line": 20, + "type": "string", + "decorators": [] + }, + { + "name": "model", + "deprecated": false, + "deprecationMessage": "", + "line": 23, + "type": "MenuItem[]", + "decorators": [] + } + ], + "outputsClass": [], + "propertiesClass": [ + { + "name": "visible", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 28 + } + ], + "methodsClass": [ + { + "name": "itemClick", + "args": [ + { + "name": "$event", + "type": "", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "item", + "type": "MenuItem", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 61, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nHanlde the click on the menu items, by executing the command\nfuntion or prevent the default behavior if the item is disable.\n\n\n", + "description": "

Hanlde the click on the menu items, by executing the command\nfuntion or prevent the default behavior if the item is disable.

\n", + "jsdoctags": [ + { + "name": { + "pos": 1370, + "end": 1376, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "$event" + }, + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 1364, + "end": 1369, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "" + }, + { + "name": "item", + "type": "MenuItem", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "toggle", + "args": [ + { + "name": "$event", + "type": "MouseEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 38, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nToogle the visibility of the menu options & track\na document click when is open to eventually hide the menu\n\n", + "description": "

Toogle the visibility of the menu options & track\na document click when is open to eventually hide the menu

\n", + "jsdoctags": [ + { + "name": "$event", + "type": "MouseEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "

Custom Menu to display options as a pop-up.

\n", + "rawdescription": "\n\nCustom Menu to display options as a pop-up.\n\n", + "type": "component", + "sourceCode": "import { fromEvent as observableFromEvent } from 'rxjs';\n\nimport { take, skip } from 'rxjs/operators';\nimport { Component, Input } from '@angular/core';\nimport { MenuItem } from 'primeng/api';\n\n/**\n * Custom Menu to display options as a pop-up.\n *\n * @export\n * @class DotMenuComponent\n */\n@Component({\n selector: 'dot-menu',\n templateUrl: './dot-menu.component.html',\n styleUrls: ['./dot-menu.component.scss']\n})\nexport class DotMenuComponent {\n @Input()\n icon: string;\n\n @Input()\n model: MenuItem[];\n\n @Input()\n float: boolean;\n\n visible = false;\n\n constructor() {}\n\n /**\n * Toogle the visibility of the menu options & track\n * a document click when is open to eventually hide the menu\n *\n * @memberof DotMenuComponent\n */\n toggle($event: MouseEvent): void {\n $event.stopPropagation();\n\n this.visible = !this.visible;\n if (this.visible) {\n // Skip 1 because the event bubbling capture the document.click\n observableFromEvent(document, 'click')\n .pipe(skip(1), take(1))\n .subscribe(() => {\n this.visible = false;\n });\n }\n }\n\n /**\n * Hanlde the click on the menu items, by executing the command\n * funtion or prevent the default behavior if the item is disable.\n *\n * @param $event\n * @param MenuItem item\n *\n * @memberof DotMenuComponent\n */\n itemClick($event, item: MenuItem): void {\n if (item.disabled) {\n $event.preventDefault();\n return;\n }\n\n if (item.command) {\n item.command({\n originalEvent: $event,\n item: item\n });\n }\n this.visible = false;\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"variables\" as *;\n\n:host {\n position: relative;\n}\n\n.dot-menu__list {\n position: absolute;\n padding: 0;\n margin: 0;\n right: 0;\n top: $spacing-4;\n box-shadow: $md-shadow-1;\n background: $white;\n z-index: 1003;\n min-width: 160px;\n}\n\n.dot-menu-item {\n list-style: none;\n\n .dot-menu-item__link,\n .dot-menu-item__link:visited {\n cursor: pointer;\n color: $black;\n display: block;\n padding: $spacing-1;\n text-decoration: none;\n }\n}\n\n.dot-menu-item:hover {\n background-color: $gray-bg;\n}\n", + "styleUrl": "./dot-menu.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [], + "line": 28 + }, + "templateData": "\n\n\n \n\n\n\n" + }, + { + "name": "DotMessageDisplayComponent", + "id": "component-DotMessageDisplayComponent-c44004654a6b0709dd8eeedb5bd6c010b087ee3c8cef3998667b552f3b7538cc657f036a5e5bcaeb9277e4033ec2c1ab510092c6ef27acca382faf28814771b7", + "file": "apps/dotcms-ui/src/app/view/components/dot-message-display/dot-message-display.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [ + { + "name": "MessageService" + } + ], + "selector": "dot-message-display", + "styleUrls": ["dot-message-display.component.scss"], + "styles": [], + "templateUrl": ["dot-message-display.component.html"], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [], + "methodsClass": [ + { + "name": "ngOnDestroy", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 36, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 26, + "deprecated": false, + "deprecationMessage": "" + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "

Show message send from the Backend

\n", + "rawdescription": "\n\nShow message send from the Backend\n\n", + "type": "component", + "sourceCode": "import { Component, OnInit, OnDestroy } from '@angular/core';\nimport { DotMessageDisplayService } from './services';\nimport { MessageService } from 'primeng/api';\nimport { DotMessage } from './model/dot-message.model';\n\n/**\n *Show message send from the Backend\n *\n * @export\n * @class DotMessageDisplayComponent\n * @implements {OnInit}\n * @implements {OnDestroy}\n */\n@Component({\n providers: [MessageService],\n selector: 'dot-message-display',\n styleUrls: ['dot-message-display.component.scss'],\n templateUrl: 'dot-message-display.component.html'\n})\nexport class DotMessageDisplayComponent implements OnInit, OnDestroy {\n constructor(\n private dotMessageDisplayService: DotMessageDisplayService,\n private messageService: MessageService\n ) {}\n\n ngOnInit() {\n this.dotMessageDisplayService.messages().subscribe((dotMessage: DotMessage) => {\n this.messageService.add({\n life: dotMessage.life,\n detail: dotMessage.message,\n severity: dotMessage.severity.toLowerCase()\n });\n });\n }\n\n ngOnDestroy(): void {\n this.dotMessageDisplayService.unsubscribe();\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"variables\" as *;\n\n:host {\n ::ng-deep {\n .p-toast-message-content {\n display: flex;\n\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n font-size: $font-size-large;\n font-weight: bold;\n }\n\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n p {\n margin: 0;\n }\n }\n }\n\n dot-icon {\n margin-right: $spacing-1;\n\n &.info {\n color: $info;\n }\n\n &.error {\n color: $error;\n }\n\n &.warning {\n color: $warn;\n }\n\n &.success {\n color: $success;\n }\n\n ::ng-deep i {\n font-size: 2.5rem;\n }\n }\n}\n", + "styleUrl": "dot-message-display.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "dotMessageDisplayService", + "type": "DotMessageDisplayService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "messageService", + "type": "MessageService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 20, + "jsdoctags": [ + { + "name": "dotMessageDisplayService", + "type": "DotMessageDisplayService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "messageService", + "type": "MessageService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": ["OnInit", "OnDestroy"], + "templateData": "\n \n \n \n \n\n" + }, + { + "name": "DotMultiSelectComponent", + "id": "component-DotMultiSelectComponent-310ba9abb0213412761a2fb111563b5e8a976ffc2d99c54bdba332cf6b989bfd9defa99edbb20da31373c2285247413e94d3b2a1e076e6545ba6638ecd2c9790", + "file": "libs/dotcms-field-elements/src/components/dot-multi-select/dot-multi-select.tsx", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "styleUrls": [], + "styles": [], + "templateUrl": [], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "_dotPristine", + "defaultValue": "true", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 75 + }, + { + "name": "_dotTouched", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 74 + }, + { + "name": "_options", + "deprecated": false, + "deprecationMessage": "", + "type": "DotOption[]", + "optional": false, + "description": "", + "line": 68, + "decorators": [ + { + "name": "State", + "stringifiedArguments": "" + } + ] + }, + { + "name": "disabled", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "

(optional) Disables field's interaction

\n", + "line": 42, + "rawdescription": "\n(optional) Disables field's interaction", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "el", + "deprecated": false, + "deprecationMessage": "", + "type": "HTMLElement", + "optional": false, + "description": "", + "line": 39, + "decorators": [ + { + "name": "Element", + "stringifiedArguments": "" + } + ] + }, + { + "name": "hint", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

(optional) Hint text that suggest a clue of the field

\n", + "line": 51, + "rawdescription": "\n(optional) Hint text that suggest a clue of the field", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "label", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

(optional) Text to be rendered next to input field

\n", + "line": 48, + "rawdescription": "\n(optional) Text to be rendered next to input field", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "name", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

Name that will be used as ID

\n", + "line": 45, + "rawdescription": "\nName that will be used as ID", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "options", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

Value/Label dropdown options separated by comma, to be formatted as: Value|Label

\n", + "line": 54, + "rawdescription": "\nValue/Label dropdown options separated by comma, to be formatted as: Value|Label", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "required", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "

(optional) Determine if it is mandatory

\n", + "line": 57, + "rawdescription": "\n(optional) Determine if it is mandatory", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "requiredMessage", + "defaultValue": "`This field is required`", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "

(optional) Text that will be shown when required is set and condition is not met

\n", + "line": 60, + "rawdescription": "\n(optional) Text that will be shown when required is set and condition is not met", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "size", + "defaultValue": "'3'", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

(optional) Size number of the multi-select dropdown (default=3)

\n", + "line": 63, + "rawdescription": "\n(optional) Size number of the multi-select dropdown (default=3)", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "status", + "deprecated": false, + "deprecationMessage": "", + "type": "DotFieldStatus", + "optional": false, + "description": "", + "line": 69, + "decorators": [ + { + "name": "State", + "stringifiedArguments": "" + } + ] + }, + { + "name": "statusChange", + "deprecated": false, + "deprecationMessage": "", + "type": "EventEmitter", + "optional": false, + "description": "", + "line": 72, + "decorators": [ + { + "name": "Event", + "stringifiedArguments": "" + } + ] + }, + { + "name": "value", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

Value set from the dropdown option

\n", + "line": 66, + "rawdescription": "\nValue set from the dropdown option", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{mutable: true, reflect: true}" + } + ] + }, + { + "name": "valueChange", + "deprecated": false, + "deprecationMessage": "", + "type": "EventEmitter", + "optional": false, + "description": "", + "line": 71, + "decorators": [ + { + "name": "Event", + "stringifiedArguments": "" + } + ] + } + ], + "methodsClass": [ + { + "name": "componentDidLoad", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 84, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "componentWillLoad", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 77, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "emitInitialValue", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 171, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "emitStatusChange", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 178, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "emitValueChange", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 189, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "getValueFromMultiSelect", + "args": [], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 165, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "isValid", + "args": [], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 185, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "optionsWatch", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 93, + "deprecated": false, + "deprecationMessage": "", + "decorators": [ + { + "name": "Watch", + "stringifiedArguments": "'options'" + } + ] + }, + { + "name": "render", + "args": [], + "optional": false, + "returnType": "any", + "typeParameters": [], + "line": 112, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "reset", + "args": [], + "optional": false, + "returnType": "Promise", + "typeParameters": [], + "line": 105, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nReset properties of the field, clear value and emit events.\n\n\n", + "description": "

Reset properties of the field, clear value and emit events.

\n", + "decorators": [ + { + "name": "Method", + "stringifiedArguments": "" + } + ], + "modifierKind": [131], + "jsdoctags": [] + }, + { + "name": "setValue", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 154, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "shouldBeDisabled", + "args": [], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 149, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "validateProps", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 145, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "

Represent a dotcms multi select control.

\n", + "rawdescription": "\n\nRepresent a dotcms multi select control.\n\n", + "type": "component", + "sourceCode": "import {\n Component,\n Prop,\n State,\n Element,\n Method,\n Event,\n EventEmitter,\n Watch,\n Host,\n h\n} from '@stencil/core';\nimport { DotOption, DotFieldStatus, DotFieldValueEvent, DotFieldStatusEvent } from '../../models';\nimport {\n getClassNames,\n getDotOptionsFromFieldValue,\n getErrorClass,\n getId,\n getOriginalStatus,\n getTagError,\n getTagHint,\n updateStatus,\n checkProp,\n getHintId\n} from '../../utils';\nimport { getDotAttributesFromElement, setDotAttributesToElement } from '../dot-form/utils';\n\n/**\n * Represent a dotcms multi select control.\n *\n * @export\n * @class DotSelectComponent\n */\n@Component({\n tag: 'dot-multi-select',\n styleUrl: 'dot-multi-select.scss'\n})\nexport class DotMultiSelectComponent {\n @Element() el: HTMLElement;\n\n /** (optional) Disables field's interaction */\n @Prop({ reflect: true }) disabled = false;\n\n /** Name that will be used as ID */\n @Prop({ reflect: true }) name = '';\n\n /** (optional) Text to be rendered next to input field */\n @Prop({ reflect: true }) label = '';\n\n /** (optional) Hint text that suggest a clue of the field */\n @Prop({ reflect: true }) hint = '';\n\n /** Value/Label dropdown options separated by comma, to be formatted as: Value|Label */\n @Prop({ reflect: true }) options = '';\n\n /** (optional) Determine if it is mandatory */\n @Prop({ reflect: true }) required = false;\n\n /** (optional) Text that will be shown when required is set and condition is not met */\n @Prop({ reflect: true }) requiredMessage = `This field is required`;\n\n /** (optional) Size number of the multi-select dropdown (default=3) */\n @Prop({ reflect: true }) size = '3';\n\n /** Value set from the dropdown option */\n @Prop({ mutable: true, reflect: true }) value = '';\n\n @State() _options: DotOption[];\n @State() status: DotFieldStatus;\n\n @Event() valueChange: EventEmitter;\n @Event() statusChange: EventEmitter;\n\n _dotTouched = false;\n _dotPristine = true;\n\n componentWillLoad() {\n this.validateProps();\n this.emitInitialValue();\n this.status = getOriginalStatus(this.isValid());\n this.emitStatusChange();\n }\n\n componentDidLoad(): void {\n const htmlElement = this.el.querySelector('select');\n setTimeout(() => {\n const attrs = getDotAttributesFromElement(Array.from(this.el.attributes), []);\n setDotAttributesToElement(htmlElement, attrs);\n }, 0);\n }\n\n @Watch('options')\n optionsWatch(): void {\n const validOptions = checkProp(this, 'options');\n this._options = getDotOptionsFromFieldValue(validOptions);\n }\n\n /**\n * Reset properties of the field, clear value and emit events.\n *\n * @memberof DotSelectComponent\n *\n */\n @Method()\n async reset(): Promise {\n this.value = '';\n this.status = getOriginalStatus(this.isValid());\n this.emitInitialValue();\n this.emitStatusChange();\n }\n\n render() {\n const classes = getClassNames(this.status, this.isValid(), this.required);\n\n return (\n \n \n this.setValue()}\n >\n {this._options.map((item: DotOption) => {\n return (\n \n {item.label}\n \n );\n })}\n \n \n {getTagHint(this.hint)}\n {getTagError(!this.isValid(), this.requiredMessage)}\n \n );\n }\n\n private validateProps(): void {\n this.optionsWatch();\n }\n\n private shouldBeDisabled(): boolean {\n return this.disabled ? true : null;\n }\n\n // Todo: find how to set proper TYPE in TS\n private setValue(): void {\n this.value = this.getValueFromMultiSelect();\n this.status = updateStatus(this.status, {\n dotTouched: true,\n dotPristine: false,\n dotValid: this.isValid()\n });\n this.emitValueChange();\n this.emitStatusChange();\n }\n\n private getValueFromMultiSelect(): string {\n const selected = this.el.querySelectorAll('option:checked');\n const values = Array.from(selected).map((el: any) => el.value);\n return Array.from(values).join(',');\n }\n\n private emitInitialValue() {\n if (!this.value) {\n this.value = this._options.length ? this._options[0].value : '';\n this.emitValueChange();\n }\n }\n\n private emitStatusChange(): void {\n this.statusChange.emit({\n name: this.name,\n status: this.status\n });\n }\n\n private isValid(): boolean {\n return this.required ? !!this.value : true;\n }\n\n private emitValueChange(): void {\n this.valueChange.emit({\n name: this.name,\n value: this.value\n });\n }\n}\n", + "tag": "dot-multi-select", + "styleUrl": "dot-multi-select.scss", + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "" + }, + { + "name": "DotMultiSelectComponent", + "id": "component-DotMultiSelectComponent-d5bccbbe5fe5547e9af6a4616aa9a55b60771f04cedb07e99080adaf57d1535d3a3d118dd3e3988b8673b43c231c7d5a47e101136d2d96aa92602f1a92b2d8df-1", + "file": "libs/dotcms-webcomponents/src/components/contenttypes-fields/dot-multi-select/dot-multi-select.tsx", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "styleUrls": [], + "styles": [], + "templateUrl": [], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "_dotPristine", + "defaultValue": "true", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 94 + }, + { + "name": "_dotTouched", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 93 + }, + { + "name": "_options", + "deprecated": false, + "deprecationMessage": "", + "type": "DotOption[]", + "optional": false, + "description": "", + "line": 84, + "decorators": [ + { + "name": "State", + "stringifiedArguments": "" + } + ] + }, + { + "name": "disabled", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "

(optional) Disables field's interaction

\n", + "line": 77, + "rawdescription": "\n(optional) Disables field's interaction", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "dotStatusChange", + "deprecated": false, + "deprecationMessage": "", + "type": "EventEmitter", + "optional": false, + "description": "", + "line": 91, + "decorators": [ + { + "name": "Event", + "stringifiedArguments": "" + } + ] + }, + { + "name": "dotValueChange", + "deprecated": false, + "deprecationMessage": "", + "type": "EventEmitter", + "optional": false, + "description": "", + "line": 89, + "decorators": [ + { + "name": "Event", + "stringifiedArguments": "" + } + ] + }, + { + "name": "el", + "deprecated": false, + "deprecationMessage": "", + "type": "HTMLElement", + "optional": false, + "description": "", + "line": 45, + "decorators": [ + { + "name": "Element", + "stringifiedArguments": "" + } + ] + }, + { + "name": "hint", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

(optional) Hint text that suggest a clue of the field

\n", + "line": 61, + "rawdescription": "\n(optional) Hint text that suggest a clue of the field", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "label", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

(optional) Text to be rendered next to input field

\n", + "line": 57, + "rawdescription": "\n(optional) Text to be rendered next to input field", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "name", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

Name that will be used as ID

\n", + "line": 53, + "rawdescription": "\nName that will be used as ID", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "options", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

Value/Label dropdown options separated by comma, to be formatted as: Value|Label

\n", + "line": 65, + "rawdescription": "\nValue/Label dropdown options separated by comma, to be formatted as: Value|Label", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "required", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "

(optional) Determine if it is mandatory

\n", + "line": 69, + "rawdescription": "\n(optional) Determine if it is mandatory", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "requiredMessage", + "defaultValue": "`This field is required`", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "

(optional) Text that will be shown when required is set and condition is not met

\n", + "line": 73, + "rawdescription": "\n(optional) Text that will be shown when required is set and condition is not met", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "size", + "defaultValue": "'3'", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

(optional) Size number of the multi-select dropdown (default=3)

\n", + "line": 81, + "rawdescription": "\n(optional) Size number of the multi-select dropdown (default=3)", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "status", + "deprecated": false, + "deprecationMessage": "", + "type": "DotFieldStatus", + "optional": false, + "description": "", + "line": 86, + "decorators": [ + { + "name": "State", + "stringifiedArguments": "" + } + ] + }, + { + "name": "value", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

Value set from the dropdown option

\n", + "line": 49, + "rawdescription": "\nValue set from the dropdown option", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{mutable: true, reflect: true}" + } + ] + } + ], + "methodsClass": [ + { + "name": "componentDidLoad", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 103, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "componentWillLoad", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 96, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "emitInitialValue", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 190, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "emitStatusChange", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 197, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "emitValueChange", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 208, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "getValueFromMultiSelect", + "args": [], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 184, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "isValid", + "args": [], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 204, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "optionsWatch", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 112, + "deprecated": false, + "deprecationMessage": "", + "decorators": [ + { + "name": "Watch", + "stringifiedArguments": "'options'" + } + ] + }, + { + "name": "render", + "args": [], + "optional": false, + "returnType": "any", + "typeParameters": [], + "line": 131, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "reset", + "args": [], + "optional": false, + "returnType": "Promise", + "typeParameters": [], + "line": 124, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nReset properties of the field, clear value and emit events.\n\n\n", + "description": "

Reset properties of the field, clear value and emit events.

\n", + "decorators": [ + { + "name": "Method", + "stringifiedArguments": "" + } + ], + "modifierKind": [131], + "jsdoctags": [] + }, + { + "name": "setValue", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 173, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "shouldBeDisabled", + "args": [], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 168, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "validateProps", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 164, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "

Represent a dotcms multi select control.

\n", + "rawdescription": "\n\nRepresent a dotcms multi select control.\n\n", + "type": "component", + "sourceCode": "import {\n Component,\n Prop,\n State,\n Element,\n Method,\n Event,\n EventEmitter,\n Watch,\n h,\n Host\n} from '@stencil/core';\nimport {\n DotOption,\n DotFieldStatus,\n DotFieldValueEvent,\n DotFieldStatusEvent\n} from '../../../models';\nimport {\n getClassNames,\n getDotOptionsFromFieldValue,\n getErrorClass,\n getId,\n getOriginalStatus,\n getTagError,\n getTagHint,\n updateStatus,\n checkProp,\n getHintId\n} from '../../../utils';\nimport { getDotAttributesFromElement, setDotAttributesToElement } from '../dot-form/utils';\n\n/**\n * Represent a dotcms multi select control.\n *\n * @export\n * @class DotSelectComponent\n */\n@Component({\n tag: 'dot-multi-select',\n styleUrl: 'dot-multi-select.scss'\n})\nexport class DotMultiSelectComponent {\n @Element()\n el: HTMLElement;\n\n /** Value set from the dropdown option */\n @Prop({ mutable: true, reflect: true })\n value = '';\n\n /** Name that will be used as ID */\n @Prop({ reflect: true })\n name = '';\n\n /** (optional) Text to be rendered next to input field */\n @Prop({ reflect: true })\n label = '';\n\n /** (optional) Hint text that suggest a clue of the field */\n @Prop({ reflect: true })\n hint = '';\n\n /** Value/Label dropdown options separated by comma, to be formatted as: Value|Label */\n @Prop({ reflect: true })\n options = '';\n\n /** (optional) Determine if it is mandatory */\n @Prop({ reflect: true })\n required = false;\n\n /** (optional) Text that will be shown when required is set and condition is not met */\n @Prop({ reflect: true })\n requiredMessage = `This field is required`;\n\n /** (optional) Disables field's interaction */\n @Prop({ reflect: true })\n disabled = false;\n\n /** (optional) Size number of the multi-select dropdown (default=3) */\n @Prop({ reflect: true })\n size = '3';\n\n @State()\n _options: DotOption[];\n @State()\n status: DotFieldStatus;\n\n @Event()\n dotValueChange: EventEmitter;\n @Event()\n dotStatusChange: EventEmitter;\n\n _dotTouched = false;\n _dotPristine = true;\n\n componentWillLoad() {\n this.validateProps();\n this.emitInitialValue();\n this.status = getOriginalStatus(this.isValid());\n this.emitStatusChange();\n }\n\n componentDidLoad(): void {\n const htmlElement = this.el.querySelector('select');\n setTimeout(() => {\n const attrs = getDotAttributesFromElement(Array.from(this.el.attributes), []);\n setDotAttributesToElement(htmlElement, attrs);\n }, 0);\n }\n\n @Watch('options')\n optionsWatch(): void {\n const validOptions = checkProp(this, 'options');\n this._options = getDotOptionsFromFieldValue(validOptions);\n }\n\n /**\n * Reset properties of the field, clear value and emit events.\n *\n * @memberof DotSelectComponent\n *\n */\n @Method()\n async reset(): Promise {\n this.value = '';\n this.status = getOriginalStatus(this.isValid());\n this.emitInitialValue();\n this.emitStatusChange();\n }\n\n render() {\n const classes = getClassNames(this.status, this.isValid(), this.required);\n\n return (\n \n \n this.setValue()}\n >\n {this._options.map((item: DotOption) => {\n return (\n \n {item.label}\n \n );\n })}\n \n \n {getTagHint(this.hint)}\n {getTagError(!this.isValid(), this.requiredMessage)}\n \n );\n }\n\n private validateProps(): void {\n this.optionsWatch();\n }\n\n private shouldBeDisabled(): boolean {\n return this.disabled ? true : null;\n }\n\n // Todo: find how to set proper TYPE in TS\n private setValue(): void {\n this.value = this.getValueFromMultiSelect();\n this.status = updateStatus(this.status, {\n dotTouched: true,\n dotPristine: false,\n dotValid: this.isValid()\n });\n this.emitValueChange();\n this.emitStatusChange();\n }\n\n private getValueFromMultiSelect(): string {\n const selected = this.el.querySelectorAll('option:checked');\n const values = Array.from(selected).map((el: any) => el.value);\n return Array.from(values).join(',');\n }\n\n private emitInitialValue() {\n if (!this.value) {\n this.value = this._options.length ? this._options[0].value : '';\n this.emitValueChange();\n }\n }\n\n private emitStatusChange(): void {\n this.dotStatusChange.emit({\n name: this.name,\n status: this.status\n });\n }\n\n private isValid(): boolean {\n return this.required ? !!this.value : true;\n }\n\n private emitValueChange(): void {\n this.dotValueChange.emit({\n name: this.name,\n value: this.value\n });\n }\n}\n", + "tag": "dot-multi-select", + "styleUrl": "dot-multi-select.scss", + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "", + "isDuplicate": true, + "duplicateId": 1, + "duplicateName": "DotMultiSelectComponent-1" + }, + { + "name": "DotMyAccountComponent", + "id": "component-DotMyAccountComponent-9abe64832147e87c4732cdef9839bf91c8bb55710623c6cacf0d111ccde161b20913f7eedd8a30286c1fe0cfd604f8d3c0d4d068fe08a87d1e514abfcd339720", + "file": "apps/dotcms-ui/src/app/view/components/dot-toolbar/components/dot-my-account/dot-my-account.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-my-account", + "styleUrls": ["./dot-my-account.component.scss"], + "styles": [], + "templateUrl": ["dot-my-account.component.html"], + "viewProviders": [], + "inputsClass": [ + { + "name": "visible", + "deprecated": false, + "deprecationMessage": "", + "line": 34, + "type": "boolean", + "decorators": [] + } + ], + "outputsClass": [ + { + "name": "close", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 32, + "type": "EventEmitter" + } + ], + "propertiesClass": [ + { + "name": "changePasswordOption", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 49 + }, + { + "name": "destroy$", + "defaultValue": "new Subject()", + "deprecated": false, + "deprecationMessage": "", + "type": "Subject", + "optional": false, + "description": "", + "line": 53, + "modifierKind": [121] + }, + { + "name": "dialogActions", + "deprecated": false, + "deprecationMessage": "", + "type": "DotDialogActions", + "optional": false, + "description": "", + "line": 50 + }, + { + "name": "dotAccountUser", + "defaultValue": "{\n currentPassword: '',\n email: '',\n givenName: '',\n surname: '',\n userId: ''\n }", + "deprecated": false, + "deprecationMessage": "", + "type": "DotAccountUser", + "optional": false, + "description": "", + "line": 39 + }, + { + "name": "emailRegex", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 36 + }, + { + "name": "form", + "deprecated": false, + "deprecationMessage": "", + "type": "NgForm", + "optional": false, + "description": "", + "line": 30, + "decorators": [ + { + "name": "ViewChild", + "stringifiedArguments": "'myAccountForm', {static: true}" + } + ] + }, + { + "name": "message", + "defaultValue": "null", + "deprecated": false, + "deprecationMessage": "", + "type": "null", + "optional": false, + "description": "", + "line": 48 + }, + { + "name": "passwordConfirm", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 47 + }, + { + "name": "passwordMatch", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 37 + }, + { + "name": "showStarter", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 51 + } + ], + "methodsClass": [ + { + "name": "checkPasswords", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 113, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "getRequiredMessage", + "args": [ + { + "name": "args", + "type": "string[]", + "deprecated": false, + "deprecationMessage": "", + "dotDotDotToken": true + } + ], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 140, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "args", + "type": "string[]", + "deprecated": false, + "deprecationMessage": "", + "dotDotDotToken": true, + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "loadUser", + "args": [ + { + "name": "auth", + "type": "Auth", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 168, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "auth", + "type": "Auth", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "ngOnDestroy", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 108, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 71, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "save", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 144, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "setShowStarter", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 132, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nCalls Api based on checked input to add/remove starter portlet from menu\n\n", + "description": "

Calls Api based on checked input to add/remove starter portlet from menu

\n", + "jsdoctags": [] + }, + { + "name": "toggleChangePasswordOption", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 123, + "deprecated": false, + "deprecationMessage": "" + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import {\n Component,\n EventEmitter,\n Output,\n Input,\n OnInit,\n ViewChild,\n OnDestroy\n} from '@angular/core';\nimport { NgForm } from '@angular/forms';\nimport { take, takeUntil } from 'rxjs/operators';\nimport { Subject } from 'rxjs';\n\nimport { DotDialogActions } from '@components/dot-dialog/dot-dialog.component';\nimport { DotMessageService } from '@services/dot-message/dot-messages.service';\nimport { DotcmsConfigService, LoginService, User, Auth } from '@dotcms/dotcms-js';\nimport { DotRouterService } from '@services/dot-router/dot-router.service';\nimport { DotMenuService } from '@services/dot-menu.service';\nimport { DotAccountUser, DotAccountService } from '@services/dot-account-service';\n\ninterface AccountUserForm extends DotAccountUser {\n confirmPassword?: string;\n}\n@Component({\n selector: 'dot-my-account',\n styleUrls: ['./dot-my-account.component.scss'],\n templateUrl: 'dot-my-account.component.html'\n})\nexport class DotMyAccountComponent implements OnInit, OnDestroy {\n @ViewChild('myAccountForm', { static: true }) form: NgForm;\n\n @Output() close = new EventEmitter();\n\n @Input() visible: boolean;\n\n emailRegex: string;\n passwordMatch: boolean;\n\n dotAccountUser: DotAccountUser = {\n currentPassword: '',\n email: '',\n givenName: '',\n surname: '',\n userId: ''\n };\n\n passwordConfirm: string;\n message = null;\n changePasswordOption = false;\n dialogActions: DotDialogActions;\n showStarter: boolean;\n\n private destroy$: Subject = new Subject();\n\n constructor(\n private dotMessageService: DotMessageService,\n private dotAccountService: DotAccountService,\n private dotcmsConfigService: DotcmsConfigService,\n private loginService: LoginService,\n private dotRouterService: DotRouterService,\n private dotMenuService: DotMenuService\n ) {\n this.passwordMatch = false;\n this.changePasswordOption = false;\n this.loginService.watchUser(this.loadUser.bind(this));\n this.dotcmsConfigService.getConfig().subscribe((res) => {\n this.emailRegex = res.emailRegex;\n });\n }\n\n ngOnInit() {\n this.dialogActions = {\n accept: {\n label: this.dotMessageService.get('save'),\n action: () => {\n this.save();\n },\n disabled: true\n },\n cancel: {\n label: this.dotMessageService.get('modes.Close')\n }\n };\n\n this.dotMenuService\n .isPortletInMenu('starter')\n .pipe(take(1))\n .subscribe((showStarter: boolean) => {\n this.showStarter = showStarter;\n });\n\n this.form.valueChanges\n .pipe(takeUntil(this.destroy$))\n .subscribe((valueChange: AccountUserForm) => {\n this.dialogActions = {\n ...this.dialogActions,\n accept: {\n ...this.dialogActions.accept,\n disabled:\n (this.changePasswordOption &&\n valueChange.newPassword !== valueChange.confirmPassword) ||\n !this.form.valid\n }\n };\n });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.complete();\n }\n\n checkPasswords(): void {\n if (this.message) {\n this.message = null;\n }\n this.passwordMatch =\n this.dotAccountUser.newPassword !== '' &&\n this.passwordConfirm !== '' &&\n this.dotAccountUser.newPassword === this.passwordConfirm;\n }\n\n toggleChangePasswordOption(): void {\n this.changePasswordOption = !this.changePasswordOption;\n }\n\n /**\n * Calls Api based on checked input to add/remove starter portlet from menu\n *\n * @memberof DotMyAccountComponent\n */\n setShowStarter(): void {\n if (this.showStarter) {\n this.dotAccountService.addStarterPage().subscribe();\n } else {\n this.dotAccountService.removeStarterPage().subscribe();\n }\n }\n\n getRequiredMessage(...args: string[]): string {\n return this.dotMessageService.get('error.form.mandatory', ...args);\n }\n\n save(): void {\n this.dotAccountService.updateUser(this.dotAccountUser).subscribe(\n (response) => {\n // TODO: replace the alert with a Angular components\n alert(this.dotMessageService.get('message.createaccount.success'));\n this.setShowStarter();\n this.close.emit();\n\n if (response.entity.reauthenticate) {\n this.dotRouterService.doLogOut();\n } else {\n this.loginService.setAuth({\n loginAsUser: null,\n user: response.entity.user\n });\n }\n },\n (response) => {\n // TODO: We have to define how must be the user feedback in case of error\n this.message = response.errorsMessages;\n }\n );\n }\n\n private loadUser(auth: Auth): void {\n const user: User = auth.user;\n this.dotAccountUser.email = user.emailAddress;\n this.dotAccountUser.givenName = user.firstName;\n this.dotAccountUser.surname = user.lastName;\n this.dotAccountUser.userId = user.userId;\n this.dotAccountUser.newPassword = null;\n this.passwordConfirm = null;\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"variables\" as *;\n@import \"mixins\";\n\n.my-account,\n.error-message {\n width: 300px;\n}\n\n.my-account {\n .md-inputtext {\n width: 100%;\n }\n}\n", + "styleUrl": "./dot-my-account.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "dotMessageService", + "type": "DotMessageService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotAccountService", + "type": "DotAccountService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotcmsConfigService", + "type": "DotcmsConfigService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "loginService", + "type": "LoginService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotRouterService", + "type": "DotRouterService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotMenuService", + "type": "DotMenuService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 53, + "jsdoctags": [ + { + "name": "dotMessageService", + "type": "DotMessageService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotAccountService", + "type": "DotAccountService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotcmsConfigService", + "type": "DotcmsConfigService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "loginService", + "type": "LoginService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotRouterService", + "type": "DotRouterService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotMenuService", + "type": "DotMenuService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": ["OnInit", "OnDestroy"], + "templateData": "\n \n\n \n\n" + }, + { + "name": "DotNavIconComponent", + "id": "component-DotNavIconComponent-54987e09c6806fe9514031c0ecbfefb78af6e5b6fa30f7e3fadd7afeb69ff46f0c1c1ed0bf1108fdebd8ea900a814ca6e3a588934750adf0f32badcf87988b2f", + "file": "apps/dotcms-ui/src/app/view/components/dot-navigation/components/dot-nav-icon/dot-nav-icon.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-nav-icon", + "styleUrls": ["./dot-nav-icon.component.scss"], + "styles": [], + "templateUrl": ["./dot-nav-icon.component.html"], + "viewProviders": [], + "inputsClass": [ + { + "name": "icon", + "deprecated": false, + "deprecationMessage": "", + "line": 10, + "type": "string", + "decorators": [] + } + ], + "outputsClass": [], + "propertiesClass": [], + "methodsClass": [ + { + "name": "isFaIcon", + "args": [ + { + "name": "icon", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 14, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "icon", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, Input } from '@angular/core';\n\n@Component({\n selector: 'dot-nav-icon',\n templateUrl: './dot-nav-icon.component.html',\n styleUrls: ['./dot-nav-icon.component.scss']\n})\nexport class DotNavIconComponent {\n @Input()\n icon: string;\n\n constructor() {}\n\n isFaIcon(icon: string): boolean {\n return icon.startsWith('fa-');\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": ":host {\n display: flex;\n align-items: center;\n height: 18px;\n justify-content: center;\n overflow: hidden;\n width: 18px;\n}\n", + "styleUrl": "./dot-nav-icon.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [], + "line": 10 + }, + "templateData": "\n\n \n\n" + }, + { + "name": "DotNavigationComponent", + "id": "component-DotNavigationComponent-8e16e29daf16fb73c051de11e96d73e01bee4ea000c7897d2d7ae386b9f67223876d1fd499bcd15ce5e89f0ce3acac4118b319ec40eadf102db85e846b19c203", + "file": "apps/dotcms-ui/src/app/view/components/dot-navigation/dot-navigation.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-main-nav", + "styleUrls": ["./dot-navigation.component.scss"], + "styles": [], + "templateUrl": ["dot-navigation.component.html"], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "dotNavigationService", + "deprecated": false, + "deprecationMessage": "", + "type": "DotNavigationService", + "optional": false, + "description": "", + "line": 22, + "modifierKind": [123] + }, + { + "name": "iframeOverlayService", + "deprecated": false, + "deprecationMessage": "", + "type": "IframeOverlayService", + "optional": false, + "description": "", + "line": 23, + "modifierKind": [123] + }, + { + "name": "menu$", + "deprecated": false, + "deprecationMessage": "", + "type": "Observable", + "optional": false, + "description": "", + "line": 15 + } + ], + "methodsClass": [ + { + "name": "handleDocumentClick", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 67, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nHandle click on document to hide the fly-out menu\n\n", + "description": "

Handle click on document to hide the fly-out menu

\n", + "decorators": [ + { + "name": "HostListener", + "stringifiedArguments": "'document:click'" + } + ], + "jsdoctags": [] + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 26, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "onItemClick", + "args": [ + { + "name": "$event", + "type": "literal type", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 37, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nChange or refresh the portlets\n\n", + "description": "

Change or refresh the portlets

\n", + "jsdoctags": [ + { + "name": "$event", + "type": "literal type", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "onMenuClick", + "args": [ + { + "name": "event", + "type": "literal type", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 53, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nOpen menu with a single click when collapsed\notherwise Set isOpen to the passed DotMenu item\n\n", + "description": "

Open menu with a single click when collapsed\notherwise Set isOpen to the passed DotMenu item

\n", + "jsdoctags": [ + { + "name": "event", + "type": "literal type", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [ + { + "name": "style.overflow-y", + "deprecated": false, + "deprecationMessage": "", + "line": 17, + "type": "\"\" | \"scroll\"", + "decorators": [] + } + ], + "hostListeners": [ + { + "name": "document:click", + "args": [], + "argsDecorator": [], + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nHandle click on document to hide the fly-out menu\n\n", + "description": "

Handle click on document to hide the fly-out menu

\n", + "jsdoctags": [ + { + "pos": 2085, + "end": 2120, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 325, + "tagName": { + "pos": 2086, + "end": 2094, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "memberof" + }, + "comment": "

DotNavItemComponent

\n" + } + ], + "line": 67 + } + ], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, HostListener, OnInit, HostBinding } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { DotMenu, DotMenuItem } from '@models/navigation';\nimport { DotNavigationService } from './services/dot-navigation.service';\nimport { IframeOverlayService } from '@components/_common/iframe/service/iframe-overlay.service';\n\n@Component({\n providers: [],\n selector: 'dot-main-nav',\n styleUrls: ['./dot-navigation.component.scss'],\n templateUrl: 'dot-navigation.component.html'\n})\nexport class DotNavigationComponent implements OnInit {\n menu$: Observable;\n\n @HostBinding('style.overflow-y') get overFlow() {\n return this.dotNavigationService.collapsed$.getValue() ? '' : 'scroll';\n }\n\n constructor(\n public dotNavigationService: DotNavigationService,\n public iframeOverlayService: IframeOverlayService\n ) {}\n\n ngOnInit() {\n this.menu$ = this.dotNavigationService.items$;\n }\n\n /**\n * Change or refresh the portlets\n *\n * @param * event click event\n * @param string id menu item id\n * @memberof MainNavigationComponent\n */\n onItemClick($event: { originalEvent: MouseEvent; data: DotMenuItem }): void {\n $event.originalEvent.stopPropagation();\n\n if (!$event.originalEvent.ctrlKey && !$event.originalEvent.metaKey) {\n this.dotNavigationService.reloadCurrentPortlet($event.data.id);\n this.iframeOverlayService.hide();\n }\n }\n\n /**\n * Open menu with a single click when collapsed\n * otherwise Set isOpen to the passed DotMenu item\n *\n * @param DotMenu currentItem\n * @memberof DotNavigationComponent\n */\n onMenuClick(event: { originalEvent: MouseEvent; data: DotMenu }): void {\n if (this.dotNavigationService.collapsed$.getValue()) {\n this.dotNavigationService.goTo(event.data.menuItems[0].menuLink);\n } else {\n this.dotNavigationService.setOpen(event.data.id);\n }\n }\n\n /**\n * Handle click on document to hide the fly-out menu\n *\n * @memberof DotNavItemComponent\n */\n @HostListener('document:click')\n handleDocumentClick(): void {\n if (this.dotNavigationService.collapsed$.getValue()) {\n this.dotNavigationService.closeAllSections();\n }\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"variables\" as *;\n@import \"mixins\";\n@import \"dotcms-theme/utils/theme-variables\";\n\n:host {\n color: $white;\n text-decoration: none;\n display: block;\n height: 100%;\n line-height: 1.5;\n}\n\ndot-nav-item {\n cursor: pointer;\n}\n\nnav {\n transition: width $basic-speed ease;\n width: $navigation-width;\n\n .dot-nav__list-item--active {\n background-color: rgba($white_rgb, 0.1);\n }\n\n &.collapsed {\n width: $navigation-width-collased;\n }\n}\n\nul {\n @include naked-list;\n}\n", + "styleUrl": "./dot-navigation.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "dotNavigationService", + "type": "DotNavigationService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "iframeOverlayService", + "type": "IframeOverlayService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 19, + "jsdoctags": [ + { + "name": "dotNavigationService", + "type": "DotNavigationService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "iframeOverlayService", + "type": "IframeOverlayService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": ["OnInit"], + "accessors": { + "overFlow": { + "name": "overFlow", + "getSignature": { + "name": "overFlow", + "type": "", + "returnType": "", + "line": 17 + } + } + }, + "templateData": "\n" + }, + { + "name": "DotNavItemComponent", + "id": "component-DotNavItemComponent-05559e38fbb82d023b81dc8fd95c57af50bc969083a491b544069d54696490357e2ad610eac018f9a95d6f974b9b4b1256c7d867d3b78ce91fd638fcfc4725c1", + "file": "apps/dotcms-ui/src/app/view/components/dot-navigation/components/dot-nav-item/dot-nav-item.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-nav-item", + "styleUrls": ["./dot-nav-item.component.scss"], + "styles": [], + "templateUrl": ["./dot-nav-item.component.html"], + "viewProviders": [], + "inputsClass": [ + { + "name": "collapsed", + "deprecated": false, + "deprecationMessage": "", + "line": 32, + "type": "boolean", + "decorators": [] + }, + { + "name": "data", + "deprecated": false, + "deprecationMessage": "", + "line": 22, + "type": "DotMenu", + "decorators": [] + } + ], + "outputsClass": [ + { + "name": "itemClick", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 28, + "type": "EventEmitter" + }, + { + "name": "menuClick", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 25, + "type": "EventEmitter" + } + ], + "propertiesClass": [ + { + "name": "customStyles", + "defaultValue": "{}", + "deprecated": false, + "deprecationMessage": "", + "type": "object", + "optional": false, + "description": "", + "line": 34 + }, + { + "name": "mainHeaderHeight", + "defaultValue": "60", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 35 + }, + { + "name": "subnav", + "deprecated": false, + "deprecationMessage": "", + "type": "DotSubNavComponent", + "optional": false, + "description": "", + "line": 20, + "decorators": [ + { + "name": "ViewChild", + "stringifiedArguments": "'subnav', {static: true}" + } + ] + }, + { + "name": "windowHeight", + "defaultValue": "window.innerHeight", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 37, + "modifierKind": [121] + } + ], + "methodsClass": [ + { + "name": "clickHandler", + "args": [ + { + "name": "$event", + "type": "MouseEvent", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "data", + "type": "DotMenu", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 53, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nHandle click on menu section title\n\n", + "description": "

Handle click on menu section title

\n", + "jsdoctags": [ + { + "name": "$event", + "type": "MouseEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "data", + "type": "DotMenu", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "handleItemClick", + "args": [ + { + "name": "event", + "type": "literal type", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 111, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nHandle click in dot-sub-nav items\n\n", + "description": "

Handle click in dot-sub-nav items

\n", + "jsdoctags": [ + { + "name": "event", + "type": "literal type", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "isThereEnoughBottomSpace", + "args": [ + { + "name": "subMenuBottomY", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 115, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "subMenuBottomY", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "isThereEnoughTopSpace", + "args": [ + { + "name": "subMenuHeight", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 119, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "subMenuHeight", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "menuUnhovered", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 42, + "deprecated": false, + "deprecationMessage": "", + "decorators": [ + { + "name": "HostListener", + "stringifiedArguments": "'mouseleave', ['$event']" + } + ] + }, + { + "name": "resetSubMenuPosition", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 97, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nSets styles of the SubMenu with default properties\n\n", + "description": "

Sets styles of the SubMenu with default properties

\n", + "jsdoctags": [] + }, + { + "name": "setSubMenuPosition", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 65, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nAlign the submenu top or bottom depending of the browser window\n\n", + "description": "

Align the submenu top or bottom depending of the browser window

\n", + "jsdoctags": [] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [ + { + "name": "mouseleave", + "args": [], + "argsDecorator": ["$event"], + "deprecated": false, + "deprecationMessage": "", + "line": 42 + } + ], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import {\n Component,\n Output,\n EventEmitter,\n Input,\n HostBinding,\n ViewChild,\n ElementRef,\n HostListener\n} from '@angular/core';\nimport { DotMenu, DotMenuItem } from '@models/navigation';\nimport { DotSubNavComponent } from '../dot-sub-nav/dot-sub-nav.component';\n\n@Component({\n selector: 'dot-nav-item',\n templateUrl: './dot-nav-item.component.html',\n styleUrls: ['./dot-nav-item.component.scss']\n})\nexport class DotNavItemComponent {\n @ViewChild('subnav', { static: true }) subnav: DotSubNavComponent;\n\n @Input() data: DotMenu;\n\n @Output()\n menuClick: EventEmitter<{ originalEvent: MouseEvent; data: DotMenu }> = new EventEmitter();\n\n @Output()\n itemClick: EventEmitter<{ originalEvent: MouseEvent; data: DotMenuItem }> = new EventEmitter();\n\n @HostBinding('class.dot-nav-item__collapsed')\n @Input()\n collapsed: boolean;\n\n customStyles = {};\n mainHeaderHeight = 60;\n\n private windowHeight = window.innerHeight;\n\n constructor(private hostElRef: ElementRef) {}\n\n @HostListener('mouseleave', ['$event'])\n menuUnhovered() {\n this.resetSubMenuPosition();\n }\n\n /**\n * Handle click on menu section title\n *\n * @param MouseEvent $event\n * @param DotMenu data\n * @memberof DotNavItemComponent\n */\n clickHandler($event: MouseEvent, data: DotMenu): void {\n this.menuClick.emit({\n originalEvent: $event,\n data: data\n });\n }\n\n /**\n * Align the submenu top or bottom depending of the browser window\n *\n * @memberof DotNavItemComponent\n */\n setSubMenuPosition(): void {\n if (this.collapsed) {\n const [rects] = this.subnav.ul.nativeElement.getClientRects();\n\n if (window.innerHeight !== this.windowHeight) {\n this.customStyles = {};\n this.windowHeight = window.innerHeight;\n }\n\n if (\n !this.isThereEnoughBottomSpace(rects.bottom) &&\n !this.isThereEnoughTopSpace(rects.height)\n ) {\n this.customStyles = {\n 'max-height': `${this.windowHeight - this.mainHeaderHeight}px`,\n overflow: 'auto',\n top: `-${rects.top - this.mainHeaderHeight - 16}px`\n };\n } else if (!this.isThereEnoughBottomSpace(rects.bottom)) {\n this.customStyles = {\n bottom: '0',\n top: 'auto'\n };\n }\n }\n }\n\n /**\n * Sets styles of the SubMenu with default properties\n *\n * @memberof DotNavItemComponent\n */\n resetSubMenuPosition(): void {\n if (this.collapsed) {\n this.customStyles = {\n overflow: 'hidden'\n };\n }\n }\n\n /**\n * Handle click in dot-sub-nav items\n *\n * @param { originalEvent: MouseEvent; data: DotMenuItem } $event\n * @memberof DotNavItemComponent\n */\n handleItemClick(event: { originalEvent: MouseEvent; data: DotMenuItem }) {\n this.itemClick.emit(event);\n }\n\n private isThereEnoughBottomSpace(subMenuBottomY: number): boolean {\n return subMenuBottomY < window.innerHeight;\n }\n\n private isThereEnoughTopSpace(subMenuHeight: number): boolean {\n const availableTopSpace =\n this.hostElRef.nativeElement.getBoundingClientRect().bottom - this.mainHeaderHeight;\n return availableTopSpace > subMenuHeight;\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"variables\" as *;\n@import \"mixins\";\n@import \"dotcms-theme/utils/theme-variables\";\n\n:host {\n display: block;\n\n &.dot-nav-item__collapsed {\n position: relative;\n transition: background-color $basic-speed ease;\n\n &:hover {\n background-color: rgba($white_rgb, 0.1);\n\n dot-sub-nav {\n height: auto !important;\n left: $navigation-width-collased;\n opacity: 1;\n pointer-events: all;\n position: absolute;\n top: 0;\n transform: translateY(0);\n transition: opacity $basic-speed ease, transform $basic-speed ease;\n z-index: 2;\n }\n }\n\n dot-sub-nav,\n .dot-nav__item-label,\n .dot-nav__item-arrow {\n pointer-events: none;\n opacity: 0;\n }\n\n dot-sub-nav {\n background: var(--color-background);\n border-bottom-right-radius: 0.1875rem;\n border-top-right-radius: 0.1875rem;\n box-shadow: $md-shadow-2;\n transform: translateY(1rem);\n }\n\n dot-icon {\n opacity: 0;\n }\n\n .dot-nav__title {\n width: $navigation-width-collased;\n }\n\n .dot-nav__item {\n height: $navigation-item-height;\n }\n\n .dot-nav__item--active {\n background-color: $brand-primary;\n }\n }\n}\n\n.dot-nav__title {\n overflow: hidden;\n transition: width $basic-speed ease;\n width: $navigation-width;\n}\n\n.dot-nav__item {\n align-items: center;\n display: flex;\n justify-content: space-between;\n min-height: $navigation-item-height;\n padding: 14px 22px 13px 25px; // top and bottom padding to get min 48px height\n position: relative;\n transition: background-color $basic-speed ease;\n width: $navigation-width;\n}\n\n.dot-nav__item-label {\n flex: 1;\n margin-left: $spacing-3;\n word-break: break-word;\n transition: opacity $basic-speed ease;\n}\n\ndot-icon {\n opacity: 1;\n position: absolute;\n right: $spacing-1;\n top: 50%;\n transform: translateY(-50%);\n transition: opacity $basic-speed ease;\n}\n\ndot-nav-icon {\n flex-shrink: 0;\n pointer-events: none;\n}\n", + "styleUrl": "./dot-nav-item.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "hostElRef", + "type": "ElementRef", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 37, + "jsdoctags": [ + { + "name": "hostElRef", + "type": "ElementRef", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "templateData": "
\n \n \n {{ data.tabName }}\n \n \n
\n\n\n\n" + }, + { + "name": "DotNewRelationshipsComponent", + "id": "component-DotNewRelationshipsComponent-efc6184cd05e1fce3a5c1cc0018ec0a715eed8d9fe4a8e5afdc7151e3c4ff757abbf5bebf519a3de98a91cc4ca7d3db933632f5bf9d4acef3d7609765f65f191", + "file": "apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/components/fields/content-type-fields-properties-form/field-properties/dot-relationships-property/dot-new-relationships/dot-new-relationships.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [ + { + "name": "PaginatorService" + } + ], + "selector": "dot-new-relationships", + "styleUrls": ["./dot-new-relationships.component.scss"], + "styles": [], + "templateUrl": ["./dot-new-relationships.component.html"], + "viewProviders": [], + "inputsClass": [ + { + "name": "cardinality", + "deprecated": false, + "deprecationMessage": "", + "line": 23, + "type": "number", + "decorators": [] + }, + { + "name": "editing", + "deprecated": false, + "deprecationMessage": "", + "line": 27, + "type": "boolean", + "decorators": [] + }, + { + "name": "velocityVar", + "deprecated": false, + "deprecationMessage": "", + "line": 25, + "type": "string", + "decorators": [] + } + ], + "outputsClass": [ + { + "name": "change", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 29, + "type": "EventEmitter" + } + ], + "propertiesClass": [ + { + "name": "contentType", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSContentType", + "optional": false, + "description": "", + "line": 33 + }, + { + "name": "contentTypeCurrentPage", + "deprecated": false, + "deprecationMessage": "", + "type": "Observable", + "optional": false, + "description": "", + "line": 31 + }, + { + "name": "currentCardinalityIndex", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 34 + }, + { + "name": "paginatorService", + "deprecated": false, + "deprecationMessage": "", + "type": "PaginatorService", + "optional": false, + "description": "", + "line": 37, + "modifierKind": [123] + } + ], + "methodsClass": [ + { + "name": "cardinalityChanged", + "args": [ + { + "name": "cardinalityIndex", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 75, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nCall when the selected cardinality changed\n\n", + "description": "

Call when the selected cardinality changed

\n", + "jsdoctags": [ + { + "name": { + "pos": 2126, + "end": 2142, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "cardinalityIndex" + }, + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 2111, + "end": 2116, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "

selected cardinality index

\n", + "typeExpression": { + "pos": 2117, + "end": 2125, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 2118, + "end": 2124, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 146 + } + } + } + ] + }, + { + "name": "getContentTypeList", + "args": [ + { + "name": "filter", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "''" + }, + { + "name": "offset", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "0" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 87, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nLoad content types by pagination\n\n", + "description": "

Load content types by pagination

\n", + "jsdoctags": [ + { + "name": { + "pos": 2454, + "end": 2460, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "filter" + }, + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "''", + "tagName": { + "pos": 2438, + "end": 2443, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "

content types's filter

\n", + "typeExpression": { + "pos": 2444, + "end": 2452, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 2445, + "end": 2451, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 149 + } + } + }, + { + "name": { + "pos": 2512, + "end": 2518, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "offset" + }, + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "0", + "tagName": { + "pos": 2496, + "end": 2501, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "

pagination index

\n", + "typeExpression": { + "pos": 2502, + "end": 2510, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 2503, + "end": 2509, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 146 + } + } + } + ] + }, + { + "name": "loadContentType", + "args": [ + { + "name": "velocityVar", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 94, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "velocityVar", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "ngOnChanges", + "args": [ + { + "name": "changes", + "type": "SimpleChanges", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 45, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "changes", + "type": "SimpleChanges", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 41, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "triggerChanged", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 61, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nTrigger a change event, it send a object with the current content type's variable and\nthe current candinality's index.\n\n", + "description": "

Trigger a change event, it send a object with the current content type's variable and\nthe current candinality's index.

\n", + "jsdoctags": [] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import {\n Component,\n OnInit,\n Input,\n Output,\n EventEmitter,\n SimpleChanges,\n OnChanges\n} from '@angular/core';\nimport { PaginatorService } from '@services/paginator';\nimport { DotCMSContentType } from '@dotcms/dotcms-models';\nimport { Observable } from 'rxjs';\nimport { DotContentTypeService } from '@services/dot-content-type/dot-content-type.service';\nimport { DotRelationshipsPropertyValue } from '../model/dot-relationships-property-value.model';\n\n@Component({\n providers: [PaginatorService],\n selector: 'dot-new-relationships',\n templateUrl: './dot-new-relationships.component.html',\n styleUrls: ['./dot-new-relationships.component.scss']\n})\nexport class DotNewRelationshipsComponent implements OnInit, OnChanges {\n @Input() cardinality: number;\n\n @Input() velocityVar: string;\n\n @Input() editing: boolean;\n\n @Output() change: EventEmitter = new EventEmitter();\n\n contentTypeCurrentPage: Observable;\n\n contentType: DotCMSContentType;\n currentCardinalityIndex: number;\n\n constructor(\n public paginatorService: PaginatorService,\n private contentTypeService: DotContentTypeService\n ) {}\n\n ngOnInit() {\n this.paginatorService.url = 'v1/contenttype';\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.velocityVar) {\n this.loadContentType(changes.velocityVar.currentValue);\n }\n\n if (changes.cardinality) {\n this.currentCardinalityIndex = changes.cardinality.currentValue;\n }\n }\n\n /**\n * Trigger a change event, it send a object with the current content type's variable and\n * the current candinality's index.\n *\n * @memberof DotNewRelationshipsComponent\n */\n triggerChanged(): void {\n this.change.next({\n velocityVar:\n this.velocityVar || (this.contentType ? this.contentType.variable : undefined),\n cardinality: this.currentCardinalityIndex\n });\n }\n\n /**\n *Call when the selected cardinality changed\n *\n * @param {number} cardinalityIndex selected cardinality index\n * @memberof DotNewRelationshipsComponent\n */\n cardinalityChanged(cardinalityIndex: number): void {\n this.currentCardinalityIndex = cardinalityIndex;\n this.triggerChanged();\n }\n\n /**\n *Load content types by pagination\n *\n * @param {string} [filter=''] content types's filter\n * @param {number} [offset=0] pagination index\n * @memberof DotNewRelationshipsComponent\n */\n getContentTypeList(filter = '', offset = 0): void {\n if (!this.editing) {\n this.paginatorService.filter = filter;\n this.contentTypeCurrentPage = this.paginatorService.getWithOffset(offset);\n }\n }\n\n private loadContentType(velocityVar: string) {\n if (velocityVar) {\n if (velocityVar.includes('.')) {\n velocityVar = velocityVar.split('.')[0];\n }\n\n this.contentTypeService.getContentType(velocityVar).subscribe((contentType) => {\n this.contentType = contentType;\n });\n } else {\n this.contentType = null;\n }\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "", + "styleUrl": "./dot-new-relationships.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "paginatorService", + "type": "PaginatorService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "contentTypeService", + "type": "DotContentTypeService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 34, + "jsdoctags": [ + { + "name": "paginatorService", + "type": "PaginatorService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "contentTypeService", + "type": "DotContentTypeService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": ["OnInit", "OnChanges"], + "templateData": "
\n
\n
\n \n \n \n
\n" + }, + { + "name": "DotNotificationsItemComponent", + "id": "component-DotNotificationsItemComponent-3226edef59778241c009ccb1be32aea57c5ad9c12cf622c785d48e9cb5293f2ec7d63be2c006c92e63558c9ca352d0e85f43e250e9c5fa81578b853ac6e41fdf", + "file": "apps/dotcms-ui/src/app/view/components/dot-toolbar/components/dot-toolbar-notifications/components/dot-notifications/dot-notifications.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-notifications-item", + "styleUrls": ["./dot-notifications-item.component.scss"], + "styles": [], + "templateUrl": ["dot-notifications-item.component.html"], + "viewProviders": [], + "inputsClass": [ + { + "name": "data", + "deprecated": false, + "deprecationMessage": "", + "line": 11, + "type": "any", + "decorators": [] + } + ], + "outputsClass": [ + { + "name": "clear", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 13, + "type": "EventEmitter" + } + ], + "propertiesClass": [ + { + "name": "notificationIcons", + "defaultValue": "{\n ERROR: 'exclamation-triangle',\n INFO: 'info-circle',\n WARNING: 'ban'\n }", + "deprecated": false, + "deprecationMessage": "", + "type": "Object", + "optional": false, + "description": "", + "line": 18, + "modifierKind": [121] + }, + { + "name": "showLinkAction", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 15 + }, + { + "name": "showTitleLinked", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 16 + } + ], + "methodsClass": [ + { + "name": "getIconName", + "args": [ + { + "name": "val", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 44, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "val", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 26, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "onClear", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 48, + "deprecated": false, + "deprecationMessage": "" + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, Input, Output, EventEmitter, OnInit } from '@angular/core';\n\nimport { INotification } from '@models/notifications';\n\n@Component({\n selector: 'dot-notifications-item',\n styleUrls: ['./dot-notifications-item.component.scss'],\n templateUrl: 'dot-notifications-item.component.html'\n})\nexport class DotNotificationsItemComponent implements OnInit {\n @Input() data;\n\n @Output() clear = new EventEmitter();\n\n showLinkAction = false;\n showTitleLinked = false;\n\n private notificationIcons: Object = {\n ERROR: 'exclamation-triangle',\n INFO: 'info-circle',\n WARNING: 'ban'\n };\n\n constructor() {}\n\n ngOnInit(): void {\n // TODO: hand more than one action\n const actions = this.data.actions ? this.data.actions[0] : null;\n this.showLinkAction =\n actions &&\n actions.actionType === 'LINK' &&\n (actions.text || actions.text !== '') &&\n actions.action &&\n actions.action !== '';\n\n this.showTitleLinked =\n actions &&\n actions.actionType === 'LINK' &&\n (!actions.text || actions.text === '') &&\n actions.action &&\n actions.action !== '';\n }\n\n getIconName(val: string): string {\n return 'notification-item__icon pi pi-' + this.notificationIcons[val];\n }\n\n onClear(): void {\n this.clear.emit({\n id: this.data.id\n });\n }\n}\n\n@Component({\n selector: 'dot-notifications-list',\n styleUrls: ['./dot-notifications-list.component.scss'],\n templateUrl: 'dot-notifications-list.component.html'\n})\nexport class DotNotificationsListComponent {\n @Input() notifications: INotification[];\n @Output() dismissNotification = new EventEmitter();\n\n constructor() {}\n\n onClearNotification($event): void {\n this.dismissNotification.emit($event);\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"variables\" as *;\n@import \"mixins\";\n\n$notification-icon-size: 16px;\n\n:host {\n display: block;\n}\n\ndot-custom-time {\n color: $gray;\n display: block;\n}\n\na {\n color: $black;\n}\n\n.notification-item {\n border-top: solid 1px $gray-bg;\n position: relative;\n}\n\n.notification-item__content {\n margin-left: 1.71rem;\n}\n\n.notification-item__close {\n color: $gray;\n height: $notification-icon-size;\n position: absolute;\n right: 0;\n top: 1rem;\n width: $notification-icon-size;\n z-index: 1;\n\n &.p-state-hover {\n background: none;\n }\n}\n\n.notification-item__icon {\n font-size: $font-size-large;\n left: 0;\n position: absolute;\n top: 1rem;\n width: $notification-icon-size;\n}\n\n.notification-item__title {\n font-size: $body-font-size-base;\n}\n\n.notification-item__title,\n.notification-item__message {\n margin: 0;\n}\n\n.notification-item__message {\n line-height: 1.5rem;\n}\n\n.notification-item__wrapper {\n padding: 1rem 0;\n position: relative;\n}\n\n.warning {\n .notification-item__icon,\n .notification-item__link,\n .notification-item__title,\n .notification-item__title a {\n color: $brand-primary;\n }\n}\n\n.error {\n .notification-item__icon,\n .notification-item__link,\n .notification-item__title,\n .notification-item__title a {\n color: $brand-secondary;\n }\n}\n", + "styleUrl": "./dot-notifications-item.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [], + "line": 22 + }, + "implements": ["OnInit"], + "templateData": "
  • \n \n \n\n
    \n \n
    \n \n {{ data.notificationData.title }}\n \n \n {{ data.notificationData.title }}\n \n

    \n {{ data.notificationData.message }}\n {{ data.notificationData.actions[0].text }}\n \n

    \n \n
    \n
    \n
  • \n" + }, + { + "name": "DotNotificationsListComponent", + "id": "component-DotNotificationsListComponent-3226edef59778241c009ccb1be32aea57c5ad9c12cf622c785d48e9cb5293f2ec7d63be2c006c92e63558c9ca352d0e85f43e250e9c5fa81578b853ac6e41fdf", + "file": "apps/dotcms-ui/src/app/view/components/dot-toolbar/components/dot-toolbar-notifications/components/dot-notifications/dot-notifications.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-notifications-list", + "styleUrls": ["./dot-notifications-list.component.scss"], + "styles": [], + "templateUrl": ["dot-notifications-list.component.html"], + "viewProviders": [], + "inputsClass": [ + { + "name": "notifications", + "deprecated": false, + "deprecationMessage": "", + "line": 61, + "type": "INotification[]", + "decorators": [] + } + ], + "outputsClass": [ + { + "name": "dismissNotification", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 62, + "type": "EventEmitter" + } + ], + "propertiesClass": [], + "methodsClass": [ + { + "name": "onClearNotification", + "args": [ + { + "name": "$event", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 66, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "$event", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, Input, Output, EventEmitter, OnInit } from '@angular/core';\n\nimport { INotification } from '@models/notifications';\n\n@Component({\n selector: 'dot-notifications-item',\n styleUrls: ['./dot-notifications-item.component.scss'],\n templateUrl: 'dot-notifications-item.component.html'\n})\nexport class DotNotificationsItemComponent implements OnInit {\n @Input() data;\n\n @Output() clear = new EventEmitter();\n\n showLinkAction = false;\n showTitleLinked = false;\n\n private notificationIcons: Object = {\n ERROR: 'exclamation-triangle',\n INFO: 'info-circle',\n WARNING: 'ban'\n };\n\n constructor() {}\n\n ngOnInit(): void {\n // TODO: hand more than one action\n const actions = this.data.actions ? this.data.actions[0] : null;\n this.showLinkAction =\n actions &&\n actions.actionType === 'LINK' &&\n (actions.text || actions.text !== '') &&\n actions.action &&\n actions.action !== '';\n\n this.showTitleLinked =\n actions &&\n actions.actionType === 'LINK' &&\n (!actions.text || actions.text === '') &&\n actions.action &&\n actions.action !== '';\n }\n\n getIconName(val: string): string {\n return 'notification-item__icon pi pi-' + this.notificationIcons[val];\n }\n\n onClear(): void {\n this.clear.emit({\n id: this.data.id\n });\n }\n}\n\n@Component({\n selector: 'dot-notifications-list',\n styleUrls: ['./dot-notifications-list.component.scss'],\n templateUrl: 'dot-notifications-list.component.html'\n})\nexport class DotNotificationsListComponent {\n @Input() notifications: INotification[];\n @Output() dismissNotification = new EventEmitter();\n\n constructor() {}\n\n onClearNotification($event): void {\n this.dismissNotification.emit($event);\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"variables\" as *;\n\n:host {\n display: block;\n max-height: 600px;\n overflow-x: hidden;\n\n .dot-notifications-list {\n list-style: none;\n margin: 0;\n padding: 0 $spacing-3 0 0;\n }\n}\n", + "styleUrl": "./dot-notifications-list.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [], + "line": 62 + }, + "templateData": "
      \n \n
    \n" + }, + { + "name": "DotOverlayMaskComponent", + "id": "component-DotOverlayMaskComponent-cc6021b8085dd5cac2b84cdfc9372e5e873eb8732bca4100c77f2a0680b2f69f54bd95c84f1b37a1586a18f6729a66e0b7dfd0d8db2e97981bc97b448fe77583", + "file": "apps/dotcms-ui/src/app/view/components/_common/dot-overlay-mask/dot-overlay-mask.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-overlay-mask", + "styleUrls": ["./dot-overlay-mask.component.scss"], + "styles": [], + "template": "", + "templateUrl": [], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [], + "methodsClass": [ + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 11, + "deprecated": false, + "deprecationMessage": "" + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, OnInit } from '@angular/core';\n\n@Component({\n selector: 'dot-overlay-mask',\n template: '',\n styleUrls: ['./dot-overlay-mask.component.scss']\n})\nexport class DotOverlayMaskComponent implements OnInit {\n constructor() {}\n\n ngOnInit() {}\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": ":host {\n bottom: 0;\n left: 0;\n position: absolute;\n right: 0;\n top: 0;\n}\n", + "styleUrl": "./dot-overlay-mask.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [], + "line": 8 + }, + "implements": ["OnInit"] + }, + { + "name": "DotPageSelectorComponent", + "id": "component-DotPageSelectorComponent-bebcbf3cbc60c4dc46ee2a550aa4d1319fa5a1cd55cffccdd55d513d5669f9edbcb9240d2fd1d347989a9f566eb3ab562af4dfe0959e6d355c12df5b21142f9b", + "file": "apps/dotcms-ui/src/app/view/components/_common/dot-page-selector/dot-page-selector.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [ + { + "name": "{\n multi: true, provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DotPageSelectorComponent)\n}", + "type": "component" + } + ], + "selector": "dot-page-selector", + "styleUrls": ["./dot-page-selector.component.scss"], + "styles": [], + "templateUrl": ["./dot-page-selector.component.html"], + "viewProviders": [], + "inputsClass": [ + { + "name": "folderSearch", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "line": 60, + "type": "boolean", + "decorators": [] + }, + { + "name": "label", + "deprecated": false, + "deprecationMessage": "", + "line": 59, + "type": "string", + "decorators": [] + } + ], + "outputsClass": [ + { + "name": "selected", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 58, + "type": "EventEmitter" + } + ], + "propertiesClass": [ + { + "name": "autoComplete", + "deprecated": false, + "deprecationMessage": "", + "type": "AutoComplete", + "optional": false, + "description": "", + "line": 62, + "decorators": [ + { + "name": "ViewChild", + "stringifiedArguments": "'autoComplete'" + } + ] + }, + { + "name": "currentHost", + "deprecated": false, + "deprecationMessage": "", + "type": "Site", + "optional": false, + "description": "", + "line": 69, + "modifierKind": [121] + }, + { + "name": "invalidHost", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 70, + "modifierKind": [121] + }, + { + "name": "isError", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 68 + }, + { + "name": "message", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 66 + }, + { + "name": "propagateChange", + "defaultValue": "() => {...}", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 77 + }, + { + "name": "searchType", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 67 + }, + { + "name": "suggestions$", + "defaultValue": "new Subject()", + "deprecated": false, + "deprecationMessage": "", + "type": "Subject", + "optional": false, + "description": "", + "line": 65 + }, + { + "name": "val", + "deprecated": false, + "deprecationMessage": "", + "type": "DotPageSelectorItem", + "optional": false, + "description": "", + "line": 64 + } + ], + "methodsClass": [ + { + "name": "cleanAndValidateQuery", + "args": [ + { + "name": "query", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 282, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "query", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "cleanHost", + "args": [ + { + "name": "query", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 302, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "query", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "cleanPath", + "args": [ + { + "name": "query", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 308, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "query", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "fullSearch", + "args": [ + { + "name": "param", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 212, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "param", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getConditionalSearch", + "args": [ + { + "name": "param", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 236, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "param", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getEmptyMessage", + "args": [ + { + "name": "type", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 312, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "type", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getSecondStepData", + "args": [ + { + "name": "param", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 242, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "param", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getSiteName", + "args": [ + { + "name": "site", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 274, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "site", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "handleDataAndErrors", + "args": [ + { + "name": "data", + "type": "DotPageSelectorItem[]", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "query", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 173, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "data", + "type": "DotPageSelectorItem[]", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "query", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "handleFolderSelection", + "args": [ + { + "name": "folder", + "type": "DotFolder", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 324, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "folder", + "type": "DotFolder", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "handleSearchType", + "args": [ + { + "name": "query", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 201, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "query", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "isFolderAndHost", + "args": [ + { + "name": "query", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 195, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "query", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "isHostAndPath", + "args": [ + { + "name": "param", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 256, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "param", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "isSearchingForHost", + "args": [ + { + "name": "query", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 270, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "query", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "isTwoStepSearch", + "args": [ + { + "name": "query", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 248, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "query", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "onClear", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 84, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nHandle clear of the autocomplete\n\n", + "description": "

    Handle clear of the autocomplete

    \n", + "jsdoctags": [] + }, + { + "name": "onKeyEnter", + "args": [ + { + "name": "$event", + "type": "KeyboardEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 140, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nPrevent enter to propagate on selection\n\n", + "description": "

    Prevent enter to propagate on selection

    \n", + "jsdoctags": [ + { + "name": { + "pos": 3889, + "end": 3895, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "$event" + }, + "type": "KeyboardEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 3867, + "end": 3872, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 3873, + "end": 3888, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 3874, + "end": 3887, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 177, + "typeName": { + "pos": 3874, + "end": 3887, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "KeyboardEvent" + } + } + } + } + ] + }, + { + "name": "onSelect", + "args": [ + { + "name": "item", + "type": "DotPageSelectorItem", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 118, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nHandle option selected\n\n", + "description": "

    Handle option selected

    \n", + "jsdoctags": [ + { + "name": "item", + "type": "DotPageSelectorItem", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "parseUrl", + "args": [ + { + "name": "query", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "DotSimpleURL", + "typeParameters": [], + "line": 261, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "query", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "registerOnChange", + "args": [ + { + "name": "fn", + "type": "any", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 167, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nSet the function to be called when the control receives a change event.\n\n", + "description": "

    Set the function to be called when the control receives a change event.

    \n", + "jsdoctags": [ + { + "name": "fn", + "type": "any", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "registerOnTouched", + "args": [ + { + "name": "_fn", + "type": "any", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 171, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "_fn", + "type": "any", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "resetResults", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 278, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "search", + "args": [ + { + "name": "event", + "type": "CompleteEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 95, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nGet results and set it to the autotomplete\n\n", + "description": "

    Get results and set it to the autotomplete

    \n", + "jsdoctags": [ + { + "name": "event", + "type": "CompleteEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "setSearchType", + "args": [ + { + "name": "query", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 228, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "query", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "writeValue", + "args": [ + { + "name": "idenfier", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 150, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nWrite a new value to the element\n\n", + "description": "

    Write a new value to the element

    \n", + "jsdoctags": [ + { + "name": "idenfier", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "

    Search and select a page asset

    \n", + "rawdescription": "\n\nSearch and select a page asset\n\n", + "type": "component", + "sourceCode": "import {\n Component,\n Output,\n EventEmitter,\n forwardRef,\n Input,\n OnInit,\n ViewChild\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nimport { switchMap, take } from 'rxjs/operators';\n\nimport { Site } from '@dotcms/dotcms-js';\n\nimport { DotPageSelectorService, DotPageAsset } from './service/dot-page-selector.service';\nimport {\n DotPageSelectorItem,\n DotFolder,\n DotSimpleURL,\n CompleteEvent\n} from './models/dot-page-selector.models';\nimport { DotMessageService } from '@services/dot-message/dot-messages.service';\nimport { AutoComplete } from 'primeng/autocomplete';\nimport { of } from 'rxjs';\nimport { Observable, Subject } from 'rxjs';\n\nconst NO_SPECIAL_CHAR = /^[a-zA-Z0-9._/-]*$/g;\nconst REPLACE_SPECIAL_CHAR = /[^a-zA-Z0-9._/-]/g;\nconst NO_SPECIAL_CHAR_WHITE_SPACE = /^[a-zA-Z0-9._/-\\s]*$/g;\nconst REPLACE_SPECIAL_CHAR_WHITE_SPACE = /[^a-zA-Z0-9._/-\\s]/g;\nenum SearchType {\n SITE = 'site',\n FOLDER = 'folder',\n PAGE = 'page'\n}\n\n/**\n * Search and select a page asset\n *\n * @export\n * @class DotPageSelectorComponent\n * @implements {OnInit}\n */\n@Component({\n selector: 'dot-page-selector',\n templateUrl: './dot-page-selector.component.html',\n styleUrls: ['./dot-page-selector.component.scss'],\n providers: [\n {\n multi: true,\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DotPageSelectorComponent)\n }\n ]\n})\nexport class DotPageSelectorComponent implements ControlValueAccessor {\n @Output() selected = new EventEmitter();\n @Input() label: string;\n @Input() folderSearch = false;\n\n @ViewChild('autoComplete') autoComplete: AutoComplete;\n\n val: DotPageSelectorItem;\n suggestions$: Subject = new Subject();\n message: string;\n searchType: string;\n isError = false;\n private currentHost: Site;\n private invalidHost = false;\n\n constructor(\n private dotPageSelectorService: DotPageSelectorService,\n private dotMessageService: DotMessageService\n ) {}\n\n propagateChange = (_: any) => {};\n\n /**\n * Handle clear of the autocomplete\n *\n * @memberof DotPageSelectorComponent\n */\n onClear(): void {\n this.propagateChange(null);\n this.resetResults();\n }\n\n /**\n * Get results and set it to the autotomplete\n *\n * @param CompleteEvent param\n * @memberof DotPageSelectorComponent\n */\n search(event: CompleteEvent): void {\n this.propagateChange(null);\n const query = this.cleanAndValidateQuery(event.query);\n this.message = null;\n this.invalidHost = false;\n this.isError = false;\n if (!!query) {\n this.handleSearchType(query)\n .pipe(take(1))\n .subscribe((data) => {\n this.handleDataAndErrors(data, query);\n });\n } else {\n this.resetResults();\n }\n }\n\n /**\n * Handle option selected\n *\n * @param DotPageAsset item\n * @memberof DotPageSelectorComponent\n */\n onSelect(item: DotPageSelectorItem): void {\n if (this.searchType === 'site') {\n const site: Site = item.payload;\n this.currentHost = site;\n this.autoComplete.completeMethod.emit({ query: `//${site.hostname}/` });\n } else if (this.searchType === 'page') {\n const page: DotPageAsset = item.payload;\n this.selected.emit(page);\n this.propagateChange(page.identifier);\n } else if (this.searchType === 'folder') {\n this.handleFolderSelection(item.payload);\n }\n\n this.resetResults();\n }\n\n /**\n * Prevent enter to propagate on selection\n *\n * @param {KeyboardEvent} $event\n * @memberof DotTextareaContentComponent\n */\n onKeyEnter($event: KeyboardEvent): void {\n $event.stopPropagation();\n }\n\n /**\n * Write a new value to the element\n *\n * @param string idenfier\n * @memberof DotPageSelectorComponent\n */\n writeValue(idenfier: string): void {\n if (idenfier) {\n this.dotPageSelectorService\n .getPageById(idenfier)\n .pipe(take(1))\n .subscribe((item: DotPageSelectorItem) => {\n this.val = item;\n });\n }\n }\n\n /**\n * Set the function to be called when the control receives a change event.\n *\n * @param * fn\n * @memberof DotPageSelectorComponent\n */\n registerOnChange(fn: any): void {\n this.propagateChange = fn;\n }\n\n registerOnTouched(_fn: any): void {}\n\n private handleDataAndErrors(data: DotPageSelectorItem[], query: string): void {\n if (data.length === 0) {\n if (this.invalidHost) {\n this.message = this.getEmptyMessage(SearchType.SITE);\n } else if (this.isFolderAndHost(query)) {\n this.propagateChange(this.autoComplete.inputEL.nativeElement.value);\n this.message = this.dotMessageService.get('page.selector.folder.new');\n } else {\n this.message = this.getEmptyMessage(this.searchType);\n }\n } else if (\n this.searchType === SearchType.FOLDER &&\n this.currentHost &&\n (data[0].payload).path === '/'\n ) {\n //select the root folder of a host.\n this.handleFolderSelection(data[0].payload);\n }\n this.suggestions$.next(data);\n this.autoComplete.show();\n }\n\n private isFolderAndHost(query: string): boolean {\n return (\n this.searchType === SearchType.FOLDER && !query.endsWith('/') && query.startsWith('//')\n );\n }\n\n private handleSearchType(query: string): Observable {\n if (this.isTwoStepSearch(query)) {\n this.searchType = this.folderSearch ? SearchType.FOLDER : SearchType.PAGE;\n return this.fullSearch(query);\n } else {\n this.currentHost = null;\n this.searchType = this.setSearchType(query);\n return this.getConditionalSearch(query);\n }\n }\n\n private fullSearch(param: string): Observable {\n const host = decodeURI(this.parseUrl(param).host);\n return this.dotPageSelectorService.getSites(host, true).pipe(\n take(1),\n switchMap((results: DotPageSelectorItem[]) => {\n if (results.length) {\n this.currentHost = results[0].payload;\n return this.getSecondStepData(param);\n } else {\n this.invalidHost = true;\n return of([]);\n }\n })\n );\n }\n\n private setSearchType(query: string): string {\n return this.isSearchingForHost(query)\n ? SearchType.SITE\n : this.folderSearch\n ? SearchType.FOLDER\n : SearchType.PAGE;\n }\n\n private getConditionalSearch(param: string): Observable {\n return this.searchType === SearchType.SITE\n ? this.dotPageSelectorService.getSites(this.getSiteName(param))\n : this.getSecondStepData(param);\n }\n\n private getSecondStepData(param: string): Observable {\n return this.folderSearch\n ? this.dotPageSelectorService.getFolders(param)\n : this.dotPageSelectorService.getPages(param);\n }\n\n private isTwoStepSearch(query: string): boolean {\n return (\n query.startsWith('//') &&\n query.length > 2 &&\n (this.isHostAndPath(query) || query.endsWith('/'))\n );\n }\n\n private isHostAndPath(param: string): boolean {\n const url: DotSimpleURL | { [key: string]: string } = this.parseUrl(param);\n return url && !!(url.host && url.pathname.length > 0);\n }\n\n private parseUrl(query: string): DotSimpleURL {\n try {\n const url = new URL(`http:${query}`);\n return { host: url.host, pathname: url.pathname.substr(1) };\n } catch {\n return null;\n }\n }\n\n private isSearchingForHost(query: string): boolean {\n return query.startsWith('//') && (!!this.getSiteName(query) ? !query.endsWith('/') : true);\n }\n\n private getSiteName(site: string): string {\n return site.replace(/\\//g, '');\n }\n\n private resetResults(): void {\n this.suggestions$.next([]);\n }\n\n private cleanAndValidateQuery(query: string): string {\n let cleanedQuery = '';\n if (this.isTwoStepSearch(query)) {\n const url = this.parseUrl(query);\n url.host = this.cleanHost(decodeURI(url.host));\n url.pathname = this.cleanPath(url.pathname);\n cleanedQuery = `//${url.host}/${url.pathname}`;\n } else if (query.startsWith('//')) {\n cleanedQuery = this.cleanHost(query);\n } else {\n cleanedQuery = this.cleanPath(query);\n }\n this.autoComplete.inputEL.nativeElement.value = cleanedQuery;\n return cleanedQuery.startsWith('//')\n ? cleanedQuery\n : cleanedQuery.length >= 3\n ? cleanedQuery\n : '';\n }\n\n private cleanHost(query: string): string {\n return !NO_SPECIAL_CHAR_WHITE_SPACE.test(query)\n ? query.replace(REPLACE_SPECIAL_CHAR_WHITE_SPACE, '')\n : query;\n }\n\n private cleanPath(query: string): string {\n return !NO_SPECIAL_CHAR.test(query) ? query.replace(REPLACE_SPECIAL_CHAR, '') : query;\n }\n\n private getEmptyMessage(type: string): string {\n this.isError = true;\n switch (type) {\n case 'site':\n return this.dotMessageService.get('page.selector.no.sites.results');\n case 'page':\n return this.dotMessageService.get('page.selector.no.page.results');\n case 'folder':\n return this.dotMessageService.get('page.selector.no.folder.results');\n }\n }\n\n private handleFolderSelection(folder: DotFolder): void {\n if (folder.addChildrenAllowed) {\n this.selected.emit(`//${folder.hostName}${folder.path}`);\n this.propagateChange(`//${folder.hostName}${folder.path}`);\n } else {\n this.message = this.dotMessageService.get('page.selector.folder.permissions');\n this.isError = true;\n }\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"variables\" as *;\n@import \"mixins\";\n\n:host {\n position: relative;\n display: block;\n\n ::ng-deep {\n .p-autocomplete-panel {\n width: auto !important;\n }\n\n .p-autocomplete-list-item {\n white-space: nowrap;\n }\n\n .p-autocomplete-input {\n // important because p-autocomplete can add inline styles.\n padding-right: $spacing-9 !important;\n }\n }\n\n dot-field-helper {\n @include dot-field-helper-on-input;\n }\n\n .p-info{\n margin-top: $spacing-1;\n }\n}\n\n.dot-page-selector__item {\n display: flex;\n max-width: 380px;\n\n span {\n @include truncate-text;\n text-align: left;\n }\n\n &-host,\n &-url {\n flex-basis: 50%;\n }\n\n &-host {\n padding-left: $spacing-1;\n }\n}\n", + "styleUrl": "./dot-page-selector.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "dotPageSelectorService", + "type": "DotPageSelectorService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotMessageService", + "type": "DotMessageService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 70, + "jsdoctags": [ + { + "name": "dotPageSelectorService", + "type": "DotPageSelectorService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotMessageService", + "type": "DotMessageService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": ["ControlValueAccessor"], + "templateData": "
    \n \n \n \n
    \n {{ item.label }}\n \n \n {{ item.payload.path }}\n \n \n {{item.payload.hostName}}\n \n \n
    \n
    \n \n \n \n
    \n" + }, + { + "name": "DotPaletteComponent", + "id": "component-DotPaletteComponent-5caf9e38b6be8ed04aeee91d05eee6117ab3ad047bfe31db08fee20d6a05af7c931301b04c1d7e7893e30d81eb801560ff852fad7af59d114d8389798eb9da39", + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-palette", + "styleUrls": ["./dot-palette.component.scss"], + "styles": [], + "templateUrl": ["./dot-palette.component.html"], + "viewProviders": [], + "inputsClass": [ + { + "name": "items", + "defaultValue": "[]", + "deprecated": false, + "deprecationMessage": "", + "line": 30, + "type": "DotCMSContentType[]", + "decorators": [] + }, + { + "name": "languageId", + "deprecated": false, + "deprecationMessage": "", + "line": 31, + "type": "string", + "decorators": [] + } + ], + "outputsClass": [], + "propertiesClass": [ + { + "name": "contentlets", + "deprecated": false, + "deprecationMessage": "", + "type": "DotPaletteContentletsComponent", + "optional": false, + "description": "", + "line": 35, + "decorators": [ + { + "name": "ViewChild", + "stringifiedArguments": "'contentlets'" + } + ] + }, + { + "name": "contentTypes", + "deprecated": false, + "deprecationMessage": "", + "type": "DotPaletteContentTypeComponent", + "optional": false, + "description": "", + "line": 36, + "decorators": [ + { + "name": "ViewChild", + "stringifiedArguments": "'contentTypes'" + } + ] + }, + { + "name": "contentTypeVariable", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 32 + }, + { + "name": "stateContentlet", + "defaultValue": "'contentlet:out'", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 33 + } + ], + "methodsClass": [ + { + "name": "onAnimationDone", + "args": [ + { + "name": "event", + "type": "AnimationEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 55, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nFocus on the contentlet component search field\n\n", + "description": "

    Focus on the contentlet component search field

    \n", + "jsdoctags": [ + { + "name": { + "pos": 1859, + "end": 1864, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "event" + }, + "type": "AnimationEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 1836, + "end": 1841, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 1842, + "end": 1858, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 1843, + "end": 1857, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 177, + "typeName": { + "pos": 1843, + "end": 1857, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "AnimationEvent" + } + } + } + } + ] + }, + { + "name": "switchView", + "args": [ + { + "name": "variableName", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "optional": true + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 44, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nSets value on contentTypeVariable variable to show/hide components on the UI\n\n", + "description": "

    Sets value on contentTypeVariable variable to show/hide components on the UI

    \n", + "jsdoctags": [ + { + "name": "variableName", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { animate, state, style, transition, trigger, AnimationEvent } from '@angular/animations';\nimport { Component, Input, ViewChild } from '@angular/core';\nimport { DotCMSContentType } from '@dotcms/dotcms-models';\nimport { DotPaletteContentTypeComponent } from './dot-palette-content-type/dot-palette-content-type.component';\nimport { DotPaletteContentletsComponent } from './dot-palette-contentlets/dot-palette-contentlets.component';\n\n@Component({\n selector: 'dot-palette',\n templateUrl: './dot-palette.component.html',\n styleUrls: ['./dot-palette.component.scss'],\n animations: [\n trigger('inOut', [\n state(\n 'contentlet:in',\n style({\n transform: 'translateX(-100%)'\n })\n ),\n state(\n 'contentlet:out',\n style({\n transform: 'translateX(0%)'\n })\n ),\n transition('* => *', animate('200ms ease-in')),\n ])\n ]\n})\nexport class DotPaletteComponent {\n @Input() items: DotCMSContentType[] = [];\n @Input() languageId: string;\n contentTypeVariable = '';\n stateContentlet = 'contentlet:out';\n\n @ViewChild('contentlets') contentlets: DotPaletteContentletsComponent;\n @ViewChild('contentTypes') contentTypes: DotPaletteContentTypeComponent;\n\n /**\n * Sets value on contentTypeVariable variable to show/hide components on the UI\n *\n * @param string [variableName]\n * @memberof DotPaletteContentletsComponent\n */\n switchView(variableName?: string): void {\n this.contentTypeVariable = variableName ? variableName : '';\n this.stateContentlet = variableName ? 'contentlet:in' : 'contentlet:out';\n }\n\n /**\n * Focus on the contentlet component search field\n *\n * @param {AnimationEvent} event\n * @memberof DotPaletteComponent\n */\n onAnimationDone(event: AnimationEvent): void {\n if (event.toState === 'contentlet:in') {\n this.contentlets.focusInputFilter();\n }\n\n if (event.toState === 'contentlet:out') {\n this.contentTypes.focusInputFilter();\n }\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": ":host {\n background-color: white;\n display: block;\n height: 100%;\n}\n\ndiv {\n display: flex;\n height: 100%;\n}\n", + "styleUrl": "./dot-palette.component.scss" + } + ], + "stylesData": "", + "templateData": "
    \n \n \n
    \n" + }, + { + "name": "DotPaletteContentletsComponent", + "id": "component-DotPaletteContentletsComponent-45ac15263a2bc1dbb6d22dde36a2d5ee3ca333b0ce6cc27d521c00286b36509704aa8fe9eff3f0e60737b0443f3eb8ef4a03e44009f04ea2ca753e8682386bfc", + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette-contentlets/dot-palette-contentlets.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-palette-contentlets", + "styleUrls": ["./dot-palette-contentlets.component.scss"], + "styles": [], + "templateUrl": ["./dot-palette-contentlets.component.html"], + "viewProviders": [], + "inputsClass": [ + { + "name": "contentTypeVariable", + "deprecated": false, + "deprecationMessage": "", + "line": 25, + "type": "string", + "decorators": [] + }, + { + "name": "languageId", + "deprecated": false, + "deprecationMessage": "", + "line": 26, + "type": "string", + "decorators": [] + } + ], + "outputsClass": [ + { + "name": "back", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 27, + "type": "EventEmitter" + } + ], + "propertiesClass": [ + { + "name": "filter", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 32 + }, + { + "name": "hideNoResults", + "defaultValue": "true", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 31 + }, + { + "name": "inputFilter", + "deprecated": false, + "deprecationMessage": "", + "type": "DotPaletteInputFilterComponent", + "optional": false, + "description": "", + "line": 36, + "decorators": [ + { + "name": "ViewChild", + "stringifiedArguments": "'inputFilter'" + } + ] + }, + { + "name": "isFormContentType", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 30 + }, + { + "name": "items", + "defaultValue": "[]", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSContentlet[] | DotCMSContentType[]", + "optional": false, + "description": "", + "line": 29 + }, + { + "name": "itemsPerPage", + "defaultValue": "25", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 33 + }, + { + "name": "paginationService", + "deprecated": false, + "deprecationMessage": "", + "type": "PaginatorService", + "optional": false, + "description": "", + "line": 40, + "modifierKind": [123] + }, + { + "name": "paginatorESService", + "deprecated": false, + "deprecationMessage": "", + "type": "DotESContentService", + "optional": false, + "description": "", + "line": 39, + "modifierKind": [123] + }, + { + "name": "totalRecords", + "defaultValue": "0", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 34 + } + ], + "methodsClass": [ + { + "name": "backHandler", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 111, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nClear component and emit back\n\n", + "description": "

    Clear component and emit back

    \n", + "jsdoctags": [] + }, + { + "name": "dragStart", + "args": [ + { + "name": "contentType", + "type": "DotCMSContentlet", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 123, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nSet the contentlet being dragged from the Content palette to dotContentletEditorService\n\n", + "description": "

    Set the contentlet being dragged from the Content palette to dotContentletEditorService

    \n", + "jsdoctags": [ + { + "name": "contentType", + "type": "DotCMSContentlet", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "filterContentlets", + "args": [ + { + "name": "value", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 134, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nDoes the string formatting in order to do a filtering of the Contentlets,\nfinally call the loadData() to request the data\n\n", + "description": "

    Does the string formatting in order to do a filtering of the Contentlets,\nfinally call the loadData() to request the data

    \n", + "jsdoctags": [ + { + "name": "value", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "focusInputFilter", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 151, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nFocus the input filter\n\n", + "description": "

    Focus the input filter

    \n", + "jsdoctags": [] + }, + { + "name": "loadData", + "args": [ + { + "name": "event", + "type": "LazyLoadEvent", + "deprecated": false, + "deprecationMessage": "", + "optional": true + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 66, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nLoads data through pagination service\n\n", + "description": "

    Loads data through pagination service

    \n", + "jsdoctags": [ + { + "name": "event", + "type": "LazyLoadEvent", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "ngOnChanges", + "args": [ + { + "name": "changes", + "type": "SimpleChanges", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 44, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "changes", + "type": "SimpleChanges", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "paginate", + "args": [ + { + "name": "event", + "type": "LazyLoadEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 102, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nLoads data with a specific page\n\n", + "description": "

    Loads data with a specific page

    \n", + "jsdoctags": [ + { + "name": "event", + "type": "LazyLoadEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import {\n Component,\n EventEmitter,\n Input,\n OnChanges,\n Output,\n SimpleChanges,\n ViewChild\n} from '@angular/core';\nimport { ESContent } from '@dotcms/app/shared/models/dot-es-content/dot-es-content.model';\nimport { DotContentletEditorService } from '@dotcms/app/view/components/dot-contentlet-editor/services/dot-contentlet-editor.service';\nimport { DotCMSContentlet, DotCMSContentType } from '@dotcms/dotcms-models';\nimport { DotESContentService } from '@services/dot-es-content/dot-es-content.service';\nimport { PaginatorService } from '@services/paginator';\nimport { LazyLoadEvent } from 'primeng/api';\nimport { take } from 'rxjs/operators';\nimport { DotPaletteInputFilterComponent } from '../dot-palette-input-filter/dot-palette-input-filter.component';\n\n@Component({\n selector: 'dot-palette-contentlets',\n templateUrl: './dot-palette-contentlets.component.html',\n styleUrls: ['./dot-palette-contentlets.component.scss']\n})\nexport class DotPaletteContentletsComponent implements OnChanges {\n @Input() contentTypeVariable: string;\n @Input() languageId: string;\n @Output() back = new EventEmitter();\n\n items: DotCMSContentlet[] | DotCMSContentType[] = [];\n isFormContentType: boolean;\n hideNoResults = true;\n filter: string;\n itemsPerPage = 25;\n totalRecords = 0;\n\n @ViewChild('inputFilter') inputFilter: DotPaletteInputFilterComponent;\n\n constructor(\n public paginatorESService: DotESContentService,\n public paginationService: PaginatorService,\n private dotContentletEditorService: DotContentletEditorService\n ) {}\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes?.contentTypeVariable?.currentValue) {\n this.isFormContentType = changes?.contentTypeVariable?.currentValue === 'forms';\n\n if (this.isFormContentType) {\n this.paginationService.url = `v1/contenttype`;\n this.paginationService.paginationPerPage = this.itemsPerPage;\n this.paginationService.sortField = 'modDate';\n this.paginationService.setExtraParams('type', 'Form');\n this.paginationService.sortOrder = 1;\n }\n\n this.loadData();\n }\n }\n\n /**\n * Loads data through pagination service\n *\n * @param LazyLoadEvent [event]\n * @memberof DotPaletteContentletsComponent\n */\n loadData(event?: LazyLoadEvent): void {\n if (this.isFormContentType) {\n this.paginationService.setExtraParams('filter', this.filter);\n this.paginationService\n .getWithOffset((event && event.first) || 0)\n .pipe(take(1))\n .subscribe((data: DotCMSContentType[] | DotCMSContentlet[]) => {\n data.forEach((item) => (item.contentType = item.variable = 'FORM'));\n this.items = data;\n this.totalRecords = this.paginationService.totalRecords;\n this.hideNoResults = !!data?.length;\n });\n } else {\n this.paginatorESService\n .get({\n itemsPerPage: this.itemsPerPage,\n lang: this.languageId || '1',\n filter: this.filter || '',\n offset: (event && event.first.toString()) || '0',\n query: `+contentType: ${this.contentTypeVariable}`\n })\n .pipe(take(1))\n .subscribe((response: ESContent) => {\n this.totalRecords = response.resultsSize;\n this.items = response.jsonObjectView.contentlets;\n this.hideNoResults = !!response.jsonObjectView.contentlets?.length;\n });\n }\n }\n\n /**\n * Loads data with a specific page\n *\n * @param LazyLoadEvent event\n * @memberof DotPaletteContentletsComponent\n */\n paginate(event: LazyLoadEvent): void {\n this.loadData(event);\n }\n\n /**\n * Clear component and emit back\n *\n * @memberof DotPaletteContentletsComponent\n */\n backHandler(): void {\n this.filter = '';\n this.back.emit();\n this.items = null;\n }\n\n /**\n * Set the contentlet being dragged from the Content palette to dotContentletEditorService\n *\n * @param DotCMSContentType contentType\n * @memberof DotPaletteContentletsComponent\n */\n dragStart(contentType: DotCMSContentlet): void {\n this.dotContentletEditorService.setDraggedContentType(contentType);\n }\n\n /**\n * Does the string formatting in order to do a filtering of the Contentlets,\n * finally call the loadData() to request the data\n *\n * @param string value\n * @memberof DotPaletteContentletsComponent\n */\n filterContentlets(value: string): void {\n value = value.trim();\n this.filter = value;\n\n if (this.isFormContentType) {\n this.paginationService.searchParam = 'variable';\n this.paginationService.filter = value;\n }\n\n this.loadData({ first: 0 });\n }\n\n /**\n * Focus the input filter\n *\n * @memberof DotPaletteContentletsComponent\n */\n focusInputFilter(): void {\n this.inputFilter.focus();\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"libs/dot-primeng-theme-styles/src/scss/variables\" as *;\n\n:host {\n background: $white;\n border-left: 1px solid $gray-lighter;\n display: flex;\n flex-direction: column;\n height: 100%;\n min-width: $content-palette-width;\n padding: $spacing-1;\n position: relative;\n text-align: center;\n transition: all $basic-speed ease-in-out;\n width: $content-palette-width;\n}\n\n.dot-content-palette__items {\n margin-bottom: 50px;\n overflow: hidden auto;\n\n div {\n color: $black;\n cursor: grab;\n display: flex;\n overflow: hidden;\n padding: 0.25rem $spacing-1;\n position: relative;\n text-align: center;\n\n &:hover {\n background: $gray-bg;\n }\n\n img {\n height: 48px;\n object-fit: contain;\n width: 48px;\n }\n\n p {\n align-self: center;\n display: -webkit-box;\n font-size: $font-size-small;\n margin: 0 0 0 $spacing-1;\n overflow: hidden;\n text-align: left;\n text-overflow: ellipsis;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n }\n\n }\n\n p-paginator {\n bottom: 0;\n left: 1px;\n position: absolute;\n width: 100%;\n }\n}\n\n.dot-content-palette__empty {\n text-align: center;\n padding: $spacing-1 0;\n margin: $spacing-4;\n}\n", + "styleUrl": "./dot-palette-contentlets.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "paginatorESService", + "type": "DotESContentService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "paginationService", + "type": "PaginatorService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotContentletEditorService", + "type": "DotContentletEditorService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 36, + "jsdoctags": [ + { + "name": "paginatorESService", + "type": "DotESContentService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "paginationService", + "type": "PaginatorService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotContentletEditorService", + "type": "DotContentletEditorService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": ["OnChanges"], + "templateData": "\n\n
    \n \n \n \n \n \n

    {{ item.title || item.name }}

    \n
    \n \n\n\n\n \n\n\n{{\n 'No-Results' | dm\n}}\n" + }, + { + "name": "DotPaletteContentTypeComponent", + "id": "component-DotPaletteContentTypeComponent-61185cabf6f14bfc7963cb127d3907799fc5e24ac73e18ea90c4d456fc87027acdb73c850f3ab8167e1ef19b3fb89b475337d6289e1b6138e4f2600227b84c7b", + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette-content-type/dot-palette-content-type.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-palette-content-type", + "styleUrls": ["./dot-palette-content-type.component.scss"], + "styles": [], + "templateUrl": ["./dot-palette-content-type.component.html"], + "viewProviders": [], + "inputsClass": [ + { + "name": "items", + "defaultValue": "[]", + "deprecated": false, + "deprecationMessage": "", + "line": 22, + "type": "DotCMSContentType[]", + "decorators": [] + } + ], + "outputsClass": [ + { + "name": "selected", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 24, + "type": "EventEmitter" + } + ], + "propertiesClass": [ + { + "name": "filterInput", + "deprecated": false, + "deprecationMessage": "", + "type": "DotPaletteInputFilterComponent", + "optional": false, + "description": "", + "line": 20, + "decorators": [ + { + "name": "ViewChild", + "stringifiedArguments": "'filterInput', {static: true}" + } + ] + }, + { + "name": "itemsFiltered", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSContentType[]", + "optional": false, + "description": "", + "line": 26 + } + ], + "methodsClass": [ + { + "name": "dragStart", + "args": [ + { + "name": "contentType", + "type": "DotCMSContentType", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 42, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nSet the content Type being dragged from the Content palette to dotContentletEditorService\n\n", + "description": "

    Set the content Type being dragged from the Content palette to dotContentletEditorService

    \n", + "jsdoctags": [ + { + "name": "contentType", + "type": "DotCMSContentType", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "filterContentTypes", + "args": [ + { + "name": "value", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 65, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nDoes a filtering of the Content Types based on value from the filter component\n\n", + "description": "

    Does a filtering of the Content Types based on value from the filter component

    \n", + "jsdoctags": [ + { + "name": "value", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "focusInputFilter", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 76, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nFocus the filter input\n\n", + "description": "

    Focus the filter input

    \n", + "jsdoctags": [] + }, + { + "name": "ngOnChanges", + "args": [ + { + "name": "changes", + "type": "SimpleChanges", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 30, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "changes", + "type": "SimpleChanges", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "showContentTypesList", + "args": [ + { + "name": "contentTypeVariable", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 53, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nEmits the Content Type variable name to show contentlets and clears\ncomponent's local variables\n\n", + "description": "

    Emits the Content Type variable name to show contentlets and clears\ncomponent's local variables

    \n", + "jsdoctags": [ + { + "name": "contentTypeVariable", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import {\n Component,\n EventEmitter,\n Input,\n OnChanges,\n Output,\n SimpleChanges,\n ViewChild\n} from '@angular/core';\nimport { DotCMSContentType } from '@dotcms/dotcms-models';\nimport { DotContentletEditorService } from '@components/dot-contentlet-editor/services/dot-contentlet-editor.service';\nimport { DotPaletteInputFilterComponent } from '../dot-palette-input-filter/dot-palette-input-filter.component';\n\n@Component({\n selector: 'dot-palette-content-type',\n templateUrl: './dot-palette-content-type.component.html',\n styleUrls: ['./dot-palette-content-type.component.scss']\n})\nexport class DotPaletteContentTypeComponent implements OnChanges {\n @ViewChild('filterInput', { static: true }) filterInput: DotPaletteInputFilterComponent;\n\n @Input() items: DotCMSContentType[] = [];\n\n @Output() selected = new EventEmitter();\n\n itemsFiltered: DotCMSContentType[];\n\n constructor(private dotContentletEditorService: DotContentletEditorService) {}\n\n ngOnChanges(changes: SimpleChanges) {\n if (!changes?.items?.firstChange && changes?.items?.currentValue) {\n this.itemsFiltered = [...this.items];\n }\n }\n\n /**\n * Set the content Type being dragged from the Content palette to dotContentletEditorService\n *\n * @param DotCMSContentType contentType\n * @memberof DotPaletteContentTypeComponent\n */\n dragStart(contentType: DotCMSContentType): void {\n this.dotContentletEditorService.setDraggedContentType(contentType);\n }\n\n /**\n * Emits the Content Type variable name to show contentlets and clears\n * component's local variables\n *\n * @param string contentTypeVariable\n * @memberof DotPaletteContentTypeComponent\n */\n showContentTypesList(contentTypeVariable: string): void {\n this.filterInput.searchInput.nativeElement.value = '';\n this.itemsFiltered = [...this.items];\n this.selected.emit(contentTypeVariable);\n }\n\n /**\n * Does a filtering of the Content Types based on value from the filter component\n *\n * @param string value\n * @memberof DotPaletteContentTypeComponent\n */\n filterContentTypes(value: string): void {\n this.itemsFiltered = this.items.filter((item) =>\n item.name.toLowerCase().includes(value.toLowerCase())\n );\n }\n\n /**\n * Focus the filter input\n *\n * @memberof DotPaletteContentTypeComponent\n */\n focusInputFilter() {\n this.filterInput.focus();\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"libs/dot-primeng-theme-styles/src/scss/variables\" as *;\n\n:host {\n width: $content-palette-width;\n min-width: $content-palette-width;\n display: flex;\n flex-direction: column;\n padding: $spacing-1;\n border-left: 1px solid $gray-lighter;\n background: $white;\n transition: all $basic-speed ease-in-out;\n height: 100%;\n}\n\n.dot-content-palette__items {\n display: grid;\n grid-template-columns: 1fr 1fr;\n grid-gap: $spacing-1;\n grid-auto-rows: 6rem;\n overflow: hidden auto;\n\n div {\n border: 1px solid $gray-lighter;\n color: $black;\n cursor: grab;\n overflow: hidden;\n padding: 1rem $spacing-1;\n position: relative;\n text-align: center;\n\n &:hover {\n background: $gray-bg;\n }\n\n p {\n font-size: $font-size-small;\n margin: $spacing-1 0 0;\n overflow: hidden;\n text-align: center;\n text-overflow: ellipsis;\n white-space: nowrap;\n width: 100%;\n }\n\n .arrow {\n background-color: transparent;\n border: none;\n color: $gray;\n cursor: pointer;\n padding: 0;\n position: absolute;\n right: 0;\n top: 0;\n width: 32px;\n height: 32px;\n display: flex;\n align-items: flex-start;\n justify-content: flex-end;\n }\n }\n}\n\n.dot-content-palette__empty {\n text-align: center;\n padding: $spacing-1 0;\n margin: $spacing-4;\n}\n\n\n", + "styleUrl": "./dot-palette-content-type.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "dotContentletEditorService", + "type": "DotContentletEditorService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 26, + "jsdoctags": [ + { + "name": "dotContentletEditorService", + "type": "DotContentletEditorService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": ["OnChanges"], + "templateData": "\n\n \n \n

    {{ item.name }}

    \n \n \n\n\n\n {{ 'No-Results' | dm }}\n\n" + }, + { + "name": "DotPaletteInputFilterComponent", + "id": "component-DotPaletteInputFilterComponent-aafec63961e483bccf0e0bea55c9d699496c56f1c784853cff859d36c1a01745c38723aaaf6400bf963bb8c7f61a11c63715f2bf02a2665fe0ecb20af4031562", + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette-input-filter/dot-palette-input-filter.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-palette-input-filter", + "styleUrls": ["./dot-palette-input-filter.component.scss"], + "styles": [], + "templateUrl": ["./dot-palette-input-filter.component.html"], + "viewProviders": [], + "inputsClass": [ + { + "name": "goBackBtn", + "deprecated": false, + "deprecationMessage": "", + "line": 20, + "type": "boolean", + "decorators": [] + }, + { + "name": "value", + "deprecated": false, + "deprecationMessage": "", + "line": 21, + "type": "string", + "decorators": [] + } + ], + "outputsClass": [ + { + "name": "filter", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 23, + "type": "EventEmitter" + }, + { + "name": "goBack", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 22, + "type": "EventEmitter" + } + ], + "propertiesClass": [ + { + "name": "destroy$", + "defaultValue": "new Subject()", + "deprecated": false, + "deprecationMessage": "", + "type": "Subject", + "optional": false, + "description": "", + "line": 28, + "modifierKind": [121] + }, + { + "name": "searchInput", + "deprecated": false, + "deprecationMessage": "", + "type": "ElementRef", + "optional": false, + "description": "", + "line": 26, + "decorators": [ + { + "name": "ViewChild", + "stringifiedArguments": "'searchInput', {static: true}" + } + ] + } + ], + "methodsClass": [ + { + "name": "focus", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 50, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nFocus on the search input\n\n", + "description": "

    Focus on the search input

    \n", + "jsdoctags": [] + }, + { + "name": "ngOnDestroy", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 40, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 32, + "deprecated": false, + "deprecationMessage": "" + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import {\n Component,\n ElementRef,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Output,\n ViewChild\n} from '@angular/core';\nimport { debounceTime, takeUntil } from 'rxjs/operators';\nimport { fromEvent as observableFromEvent, Subject } from 'rxjs';\n\n@Component({\n selector: 'dot-palette-input-filter',\n templateUrl: './dot-palette-input-filter.component.html',\n styleUrls: ['./dot-palette-input-filter.component.scss']\n})\nexport class DotPaletteInputFilterComponent implements OnInit, OnDestroy {\n @Input() goBackBtn: boolean;\n @Input() value: string;\n @Output() goBack: EventEmitter = new EventEmitter();\n @Output() filter: EventEmitter = new EventEmitter();\n\n @ViewChild('searchInput', { static: true })\n searchInput: ElementRef;\n\n private destroy$: Subject = new Subject();\n\n constructor() {}\n\n ngOnInit() {\n observableFromEvent(this.searchInput.nativeElement, 'keyup')\n .pipe(debounceTime(500), takeUntil(this.destroy$))\n .subscribe(() => {\n this.filter.emit(this.value);\n });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.complete();\n }\n\n /**\n * Focus on the search input\n *\n * @memberof DotPaletteInputFilterComponent\n */\n focus() {\n this.searchInput.nativeElement.focus();\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"libs/dot-primeng-theme-styles/src/scss/variables\" as *;\n\n:host {\n display: flex;\n color: $gray;\n position: sticky;\n align-self: flex-start;\n margin-bottom: $spacing-3;\n margin-top: $spacing-3;\n top: 0;\n width: 100%;\n}\n\n.p-inputtext {\n flex: 1;\n padding-right: $spacing-5;\n}\n\n.dot-palette-input-filter__back-btn {\n background-color: transparent;\n border: 0;\n cursor: pointer;\n margin: 0 $spacing-1 0 0;\n padding: 0;\n}\n\n.dot-palette-input-filter__search-icon {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n right: $spacing-1;\n}\n", + "styleUrl": "./dot-palette-input-filter.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [], + "line": 28 + }, + "implements": ["OnInit", "OnDestroy"], + "templateData": "\n \n\n\n\n\n\n" + }, + { + "name": "DotPersonaSelectedItemComponent", + "id": "component-DotPersonaSelectedItemComponent-b1d4473e8dfc70f3ae396219fd3f4ab472b980a978ca216bb0f3190079337b935d8e909b49119d49e830ebce53acc2f369fc124b3ea87676ab67baae3a7fcfe7", + "file": "apps/dotcms-ui/src/app/view/components/dot-persona-selected-item/dot-persona-selected-item.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-persona-selected-item", + "styleUrls": ["./dot-persona-selected-item.component.scss"], + "styles": [], + "templateUrl": ["./dot-persona-selected-item.component.html"], + "viewProviders": [], + "inputsClass": [ + { + "name": "disabled", + "deprecated": false, + "deprecationMessage": "", + "line": 16, + "type": "boolean", + "decorators": [] + }, + { + "name": "isEditMode", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "line": 12, + "type": "boolean", + "decorators": [] + }, + { + "name": "persona", + "deprecated": false, + "deprecationMessage": "", + "line": 10, + "type": "DotPersona", + "decorators": [] + } + ], + "outputsClass": [ + { + "name": "selected", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 18, + "type": "EventEmitter" + } + ], + "propertiesClass": [], + "methodsClass": [], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, Input, Output, EventEmitter, HostBinding } from '@angular/core';\nimport { DotPersona } from '@models/dot-persona/dot-persona.model';\n\n@Component({\n selector: 'dot-persona-selected-item',\n templateUrl: './dot-persona-selected-item.component.html',\n styleUrls: ['./dot-persona-selected-item.component.scss']\n})\nexport class DotPersonaSelectedItemComponent {\n @Input() persona: DotPersona;\n\n @Input() isEditMode = false;\n\n @Input()\n @HostBinding('class.disabled')\n disabled: boolean;\n\n @Output() selected = new EventEmitter();\n\n constructor() {}\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"variables\" as *;\n@import \"dotcms-theme/utils/theme-variables\";\n@import \"mixins\";\n\n:host {\n width: 200px;\n display: flex;\n cursor: pointer;\n align-items: center;\n\n dot-icon {\n bottom: 0;\n position: absolute;\n right: 0;\n }\n\n &::ng-deep {\n .material-icons {\n color: $gray;\n transform: scale(1.2);\n }\n }\n\n &.disabled {\n &::ng-deep {\n .avatar__placeholder {\n background-color: $field-disabled-color;\n }\n\n .material-icons {\n color: $field-disabled-color;\n }\n }\n\n .dot-persona-selector__label,\n .dot-persona-selector__name {\n color: $field-disabled-color;\n }\n }\n\n @media only screen and (max-width: $screen-device-container-max) {\n & {\n width: unset;\n }\n }\n}\n\n.dot-persona-selector__container {\n align-items: center;\n cursor: pointer;\n display: flex;\n position: relative;\n width: 206px;\n}\n\ndot-avatar {\n margin-right: $spacing-1;\n}\n\n.dot-persona-selector__label-container {\n @include truncate-text;\n\n span {\n display: block;\n }\n}\n\n.dot-persona-selector__label {\n color: $gray;\n flex: 1;\n font-size: $font-size-small;\n line-height: $spacing-3;\n}\n\n.dot-persona-selector__label--edit {\n color: $brand-primary;\n}\n\n.dot-persona-selector__name {\n color: $black;\n font-weight: $font-weight-semi-bold;\n line-height: $spacing-3;\n margin-right: $spacing-4;\n @include truncate-text;\n}\n\ndot-icon {\n bottom: 0;\n position: absolute;\n right: 0;\n\n i.material-icons {\n color: $gray;\n font-size: $md-icon-size-big;\n }\n}\n\n@media only screen and (max-width: $screen-device-container-max) {\n .dot-persona-selector__label-container {\n display: none;\n }\n\n .dot-persona-selector__container {\n width: 4rem;\n }\n}\n", + "styleUrl": "./dot-persona-selected-item.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [], + "line": 18 + }, + "templateData": "\n \n
    \n \n {{\n isEditMode\n ? ('modes.persona.selector.title.edit' | dm)\n : ('modes.persona.selector.title.preview' | dm)\n }}\n \n {{\n persona?.name || ('modes.persona.no.persona' | dm)\n }}\n
    \n \n\n" + }, + { + "name": "DotPersonaSelectorComponent", + "id": "component-DotPersonaSelectorComponent-bdce5eed1b788a73714b35bffabd4dd66d37173931b73a145155ff4fd1ba39bba2bf4dc1eb5a0174804b128ec359647f9fbed5679922566b80e1f8688234e57f", + "file": "apps/dotcms-ui/src/app/view/components/dot-persona-selector/dot-persona-selector.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-persona-selector", + "styleUrls": ["./dot-persona-selector.component.scss"], + "styles": [], + "templateUrl": ["dot-persona-selector.component.html"], + "viewProviders": [], + "inputsClass": [ + { + "name": "disabled", + "deprecated": false, + "deprecationMessage": "", + "line": 27, + "type": "boolean", + "decorators": [] + }, + { + "name": "pageState", + "deprecated": false, + "deprecationMessage": "", + "line": 62, + "type": "", + "decorators": [] + } + ], + "outputsClass": [ + { + "name": "delete", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 31, + "type": "EventEmitter" + }, + { + "name": "selected", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 29, + "type": "EventEmitter" + } + ], + "propertiesClass": [ + { + "name": "_pageState", + "deprecated": false, + "deprecationMessage": "", + "type": "DotPageRenderState", + "optional": false, + "description": "", + "line": 45, + "modifierKind": [121] + }, + { + "name": "addAction", + "deprecated": false, + "deprecationMessage": "", + "type": "function", + "optional": false, + "description": "", + "line": 37 + }, + { + "name": "canDespersonalize", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 38 + }, + { + "name": "iframeOverlayService", + "deprecated": false, + "deprecationMessage": "", + "type": "IframeOverlayService", + "optional": false, + "description": "", + "line": 49, + "modifierKind": [123] + }, + { + "name": "isEditMode", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 39 + }, + { + "name": "paginationPerPage", + "defaultValue": "10", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 40 + }, + { + "name": "paginationService", + "deprecated": false, + "deprecationMessage": "", + "type": "PaginatorService", + "optional": false, + "description": "", + "line": 48, + "modifierKind": [123] + }, + { + "name": "personaDialog", + "deprecated": false, + "deprecationMessage": "", + "type": "DotAddPersonaDialogComponent", + "optional": false, + "description": "", + "line": 35, + "decorators": [ + { + "name": "ViewChild", + "stringifiedArguments": "'personaDialog', {static: true}" + } + ] + }, + { + "name": "personas", + "defaultValue": "[]", + "deprecated": false, + "deprecationMessage": "", + "type": "DotPersona[]", + "optional": false, + "description": "", + "line": 41 + }, + { + "name": "personaSeachQuery", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 46, + "modifierKind": [121] + }, + { + "name": "searchableDropdown", + "deprecated": false, + "deprecationMessage": "", + "type": "SearchableDropdownComponent", + "optional": false, + "description": "", + "line": 34, + "decorators": [ + { + "name": "ViewChild", + "stringifiedArguments": "'searchableDropdown', {static: true}" + } + ] + }, + { + "name": "totalRecords", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 42 + }, + { + "name": "value", + "deprecated": false, + "deprecationMessage": "", + "type": "DotPersona", + "optional": false, + "description": "", + "line": 43 + } + ], + "methodsClass": [ + { + "name": "getPersonasList", + "args": [ + { + "name": "filter", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "''" + }, + { + "name": "offset", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "0" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 144, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "filter", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "''", + "tagName": { + "text": "param" + } + }, + { + "name": "offset", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "0", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "handleFilterChange", + "args": [ + { + "name": "filter", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 83, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nCall when the global search changed\n\n", + "description": "

    Call when the global search changed

    \n", + "jsdoctags": [ + { + "name": { + "pos": 3107, + "end": 3113, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "filter" + }, + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 3092, + "end": 3097, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 3098, + "end": 3106, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 3099, + "end": 3105, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 149 + } + } + } + ] + }, + { + "name": "handleNewPersona", + "args": [ + { + "name": "persona", + "type": "DotPersona", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 138, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nPropagate the new persona and refresh the persona list\n\n", + "description": "

    Propagate the new persona and refresh the persona list

    \n", + "jsdoctags": [ + { + "name": { + "pos": 4809, + "end": 4816, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "persona" + }, + "type": "DotPersona", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 4790, + "end": 4795, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 4796, + "end": 4808, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 4797, + "end": 4807, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 177, + "typeName": { + "pos": 4797, + "end": 4807, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "DotPersona" + } + } + } + } + ] + }, + { + "name": "handlePageChange", + "args": [ + { + "name": "event", + "type": "PaginationEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 94, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nCall when the current page changed\n\n", + "description": "

    Call when the current page changed

    \n", + "jsdoctags": [ + { + "name": { + "pos": 3412, + "end": 3417, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "event" + }, + "type": "PaginationEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 3388, + "end": 3393, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 3394, + "end": 3411, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 3395, + "end": 3410, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 177, + "typeName": { + "pos": 3395, + "end": 3410, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "PaginationEvent" + } + } + } + } + ] + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 52, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "personaChange", + "args": [ + { + "name": "persona", + "type": "DotPersona", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 104, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nCall when the selected persona changed and the change event is emmited\n\n", + "description": "

    Call when the selected persona changed and the change event is emmited

    \n", + "jsdoctags": [ + { + "name": { + "pos": 3708, + "end": 3715, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "persona" + }, + "type": "DotPersona", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 3689, + "end": 3694, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 3695, + "end": 3707, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 3696, + "end": 3706, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 177, + "typeName": { + "pos": 3696, + "end": 3706, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "DotPersona" + } + } + } + } + ] + }, + { + "name": "reloadPersonasListCurrentPage", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 116, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nRefresh the current page in the persona list option\n\n", + "description": "

    Refresh the current page in the persona list option

    \n", + "jsdoctags": [] + }, + { + "name": "setList", + "args": [ + { + "name": "items", + "type": "DotPersona[]", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 153, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "items", + "type": "DotPersona[]", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "updatePersonaInCurrentList", + "args": [ + { + "name": "persona", + "type": "DotPersona", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 126, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nReplace the persona receive in the current page list of personas\n\n", + "description": "

    Replace the persona receive in the current page list of personas

    \n", + "jsdoctags": [ + { + "name": { + "pos": 4393, + "end": 4400, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "persona" + }, + "type": "DotPersona", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 4374, + "end": 4379, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 4380, + "end": 4392, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 4381, + "end": 4391, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 177, + "typeName": { + "pos": 4381, + "end": 4391, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "DotPersona" + } + } + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "

    It is dropdown of personas, it handle pagination and global search

    \n", + "rawdescription": "\n\nIt is dropdown of personas, it handle pagination and global search\n\n", + "type": "component", + "sourceCode": "import { Component, ViewChild, Output, EventEmitter, Input, OnInit } from '@angular/core';\nimport { PaginatorService } from '@services/paginator';\nimport {\n SearchableDropdownComponent,\n PaginationEvent\n} from '@components/_common/searchable-dropdown/component';\nimport { DotPersona } from '@shared/models/dot-persona/dot-persona.model';\nimport { delay, take } from 'rxjs/operators';\nimport { DotPageRenderState } from '@portlets/dot-edit-page/shared/models';\nimport { DotAddPersonaDialogComponent } from '@components/dot-add-persona-dialog/dot-add-persona-dialog.component';\nimport { IframeOverlayService } from '@components/_common/iframe/service/iframe-overlay.service';\nimport { DotPageMode } from '@models/dot-page/dot-page-mode.enum';\n\n/**\n * It is dropdown of personas, it handle pagination and global search\n *\n * @export\n * @class DotPersonaSelectorComponent\n * @implements {OnInit}\n */\n@Component({\n selector: 'dot-persona-selector',\n styleUrls: ['./dot-persona-selector.component.scss'],\n templateUrl: 'dot-persona-selector.component.html'\n})\nexport class DotPersonaSelectorComponent implements OnInit {\n @Input() disabled: boolean;\n\n @Output() selected: EventEmitter = new EventEmitter();\n\n @Output() delete: EventEmitter = new EventEmitter();\n\n @ViewChild('searchableDropdown', { static: true })\n searchableDropdown: SearchableDropdownComponent;\n @ViewChild('personaDialog', { static: true }) personaDialog: DotAddPersonaDialogComponent;\n\n addAction: (item: DotPersona) => void;\n canDespersonalize = false;\n isEditMode = false;\n paginationPerPage = 10;\n personas: DotPersona[] = [];\n totalRecords: number;\n value: DotPersona;\n\n private _pageState: DotPageRenderState;\n private personaSeachQuery: string;\n constructor(\n public paginationService: PaginatorService,\n public iframeOverlayService: IframeOverlayService\n ) {}\n\n ngOnInit(): void {\n this.addAction = () => {\n this.searchableDropdown.toggleOverlayPanel();\n this.personaDialog.visible = true;\n this.personaDialog.personaName = this.personas.length ? '' : this.personaSeachQuery;\n };\n this.paginationService.paginationPerPage = this.paginationPerPage;\n }\n\n @Input('pageState')\n set pageState(value: DotPageRenderState) {\n this._pageState = value;\n this.paginationService.paginationPerPage = this.paginationPerPage;\n this.paginationService.url = `v1/page/${this.pageState.page.identifier}/personas`;\n this.isEditMode = this.pageState.state.mode === DotPageMode.EDIT;\n this.paginationService.setExtraParams('respectFrontEndRoles', !this.isEditMode);\n this.value = this.pageState.viewAs && this.pageState.viewAs.persona;\n this.canDespersonalize = this.pageState.page.canEdit || this.pageState.page.canLock;\n this.reloadPersonasListCurrentPage();\n }\n\n get pageState(): DotPageRenderState {\n return this._pageState;\n }\n\n /**\n * Call when the global search changed\n *\n * @param {string} filter\n * @memberof DotPersonaSelectorComponent\n */\n handleFilterChange(filter: string): void {\n this.personaSeachQuery = filter.trim();\n this.getPersonasList(this.personaSeachQuery);\n }\n\n /**\n * Call when the current page changed\n *\n * @param {PaginationEvent} event\n * @memberof DotPersonaSelectorComponent\n */\n handlePageChange(event: PaginationEvent): void {\n this.getPersonasList(event.filter, event.first);\n }\n\n /**\n * Call when the selected persona changed and the change event is emmited\n *\n * @param {DotPersona} persona\n * @memberof DotPersonaSelectorComponent\n */\n personaChange(persona: DotPersona): void {\n if (!this.value || this.value.identifier !== persona.identifier) {\n this.selected.emit(persona);\n }\n this.searchableDropdown.toggleOverlayPanel();\n }\n\n /**\n * Refresh the current page in the persona list option\n *\n * @memberof DotPersonaSelectorComponent\n */\n reloadPersonasListCurrentPage(): void {\n this.paginationService.getCurrentPage().pipe(take(1)).subscribe(this.setList.bind(this));\n }\n\n /**\n * Replace the persona receive in the current page list of personas\n *\n * @param {DotPersona} persona\n * @memberof DotPersonaSelectorComponent\n */\n updatePersonaInCurrentList(persona: DotPersona): void {\n this.personas = this.personas.map((currentPersona: DotPersona) => {\n return currentPersona.identifier === persona.identifier ? persona : currentPersona;\n });\n }\n\n /**\n * Propagate the new persona and refresh the persona list\n *\n * @param {DotPersona} persona\n * @memberof DotPersonaSelectorComponent\n */\n handleNewPersona(persona: DotPersona): void {\n this.searchableDropdown.resetPanelMinHeight();\n this.personaChange(persona);\n this.getPersonasList();\n }\n\n private getPersonasList(filter = '', offset = 0): void {\n // Set filter if undefined\n this.paginationService.filter = filter;\n this.paginationService\n .getWithOffset(offset)\n .pipe(take(1), delay(0))\n .subscribe(this.setList.bind(this));\n }\n\n private setList(items: DotPersona[]): void {\n this.personas = items;\n this.totalRecords = this.totalRecords || this.paginationService.totalRecords;\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"variables\" as *;\n\n:host {\n display: flex;\n align-items: center;\n}\n", + "styleUrl": "./dot-persona-selector.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "paginationService", + "type": "PaginatorService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "iframeOverlayService", + "type": "IframeOverlayService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 46, + "jsdoctags": [ + { + "name": "paginationService", + "type": "PaginatorService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "iframeOverlayService", + "type": "IframeOverlayService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": ["OnInit"], + "accessors": { + "pageState": { + "name": "pageState", + "setSignature": { + "name": "pageState", + "type": "void", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "value", + "type": "DotPageRenderState", + "deprecated": false, + "deprecationMessage": "" + } + ], + "returnType": "void", + "line": 62, + "jsdoctags": [ + { + "name": "value", + "type": "DotPageRenderState", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "getSignature": { + "name": "pageState", + "type": "", + "returnType": "DotPageRenderState", + "line": 73 + } + } + }, + "templateData": "\n \n \n \n \n \n \n\n\n\n" + }, + { + "name": "DotPersonaSelectorOptionComponent", + "id": "component-DotPersonaSelectorOptionComponent-f41c1880b5ba782a142d5d6775f33920007d0ecb1cd9803427e44a77871aef6b5a861b98f55822390e416947433fa4bebd8daad856fa5b441b499d489f200190", + "file": "apps/dotcms-ui/src/app/view/components/dot-persona-selector-option/dot-persona-selector-option.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-persona-selector-option", + "styleUrls": ["./dot-persona-selector-option.component.scss"], + "styles": [], + "templateUrl": ["./dot-persona-selector-option.component.html"], + "viewProviders": [], + "inputsClass": [ + { + "name": "canDespersonalize", + "defaultValue": "true", + "deprecated": false, + "deprecationMessage": "", + "line": 10, + "type": "boolean", + "decorators": [] + }, + { + "name": "persona", + "deprecated": false, + "deprecationMessage": "", + "line": 12, + "type": "DotPersona", + "decorators": [] + }, + { + "name": "selected", + "deprecated": false, + "deprecationMessage": "", + "line": 14, + "type": "boolean", + "decorators": [] + } + ], + "outputsClass": [ + { + "name": "change", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 16, + "type": "EventEmitter" + }, + { + "name": "delete", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 18, + "type": "EventEmitter" + } + ], + "propertiesClass": [], + "methodsClass": [ + { + "name": "deletePersonalized", + "args": [ + { + "name": "$event", + "type": "MouseEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 32, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nEmit DotPersona field to be deleted\n", + "description": "

    Emit DotPersona field to be deleted

    \n", + "jsdoctags": [ + { + "name": { + "pos": 835, + "end": 841, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "$event" + }, + "type": "MouseEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 816, + "end": 821, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 822, + "end": 834, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 823, + "end": 833, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 177, + "typeName": { + "pos": 823, + "end": 833, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "MouseEvent" + } + } + } + } + ] + }, + { + "name": "onClick", + "args": [ + { + "name": "_$event", + "type": "MouseEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 23, + "deprecated": false, + "deprecationMessage": "", + "decorators": [ + { + "name": "HostListener", + "stringifiedArguments": "'click', ['$event']" + } + ], + "jsdoctags": [ + { + "name": "_$event", + "type": "MouseEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [ + { + "name": "click", + "args": [ + { + "name": "_$event", + "type": "MouseEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "argsDecorator": ["$event"], + "deprecated": false, + "deprecationMessage": "", + "line": 23 + } + ], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, EventEmitter, Input, Output, HostListener } from '@angular/core';\nimport { DotPersona } from '@models/dot-persona/dot-persona.model';\n\n@Component({\n selector: 'dot-persona-selector-option',\n templateUrl: './dot-persona-selector-option.component.html',\n styleUrls: ['./dot-persona-selector-option.component.scss']\n})\nexport class DotPersonaSelectorOptionComponent {\n @Input() canDespersonalize = true;\n\n @Input() persona: DotPersona;\n\n @Input() selected: boolean;\n\n @Output() change = new EventEmitter();\n\n @Output() delete = new EventEmitter();\n\n constructor() {}\n\n @HostListener('click', ['$event'])\n onClick(_$event: MouseEvent) {\n this.change.emit(this.persona);\n }\n\n /**\n * Emit DotPersona field to be deleted\n * @param {MouseEvent} $event\n * @memberof DotPersonaSelectorOptionComponent\n */\n deletePersonalized($event: MouseEvent) {\n $event.stopPropagation();\n this.delete.emit(this.persona);\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"variables\" as *;\n\n:host {\n align-items: center;\n cursor: pointer;\n display: flex;\n height: $navigation-item-height;\n width: 100%;\n\n &:hover {\n background-color: $bg-hover;\n }\n\n dot-avatar {\n margin: 0 $spacing-3;\n }\n\n .dot-persona-selector-option__label {\n display: -webkit-box;\n display: -moz-box;\n flex: 1;\n max-height: 42px;\n -webkit-line-clamp: 2;\n overflow: hidden;\n\n &.dot-persona-selector-option__personalized {\n color: $body-font-color;\n }\n\n &.dot-persona-selector-option__selected {\n color: $black;\n font-weight: $font-weight-semi-bold;\n }\n }\n\n button {\n margin-left: $spacing-4;\n margin-right: $spacing-3;\n }\n}\n", + "styleUrl": "./dot-persona-selector-option.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [], + "line": 18 + }, + "templateData": "\n\n\n{{ persona.name }}\n\n\n\n" + }, + { + "name": "DotPortletBaseComponent", + "id": "component-DotPortletBaseComponent-97730c41b9efa48f5c3a786b371c13675417c5f3d8ad5d8d27be26dcce7ee0b9994b56b3ef42b1dd2ff2dec6b8b60f4c0b55a8320cd6d128f813cd3297d91e8c", + "file": "apps/dotcms-ui/src/app/view/components/dot-portlet-base/dot-portlet-base.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-portlet-base", + "styleUrls": ["./dot-portlet-base.component.scss"], + "styles": [], + "templateUrl": ["./dot-portlet-base.component.html"], + "viewProviders": [], + "inputsClass": [ + { + "name": "boxed", + "defaultValue": "true", + "deprecated": false, + "deprecationMessage": "", + "line": 10, + "type": "boolean", + "decorators": [] + } + ], + "outputsClass": [], + "propertiesClass": [], + "methodsClass": [], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, Input } from '@angular/core';\n\n@Component({\n selector: 'dot-portlet-base',\n templateUrl: './dot-portlet-base.component.html',\n styleUrls: ['./dot-portlet-base.component.scss']\n})\nexport class DotPortletBaseComponent {\n @Input()\n boxed = true;\n\n constructor() {}\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"variables\" as *;\n\n:host {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n\ndot-portlet-box {\n flex-grow: 1;\n flex-basis: 0;\n}\n", + "styleUrl": "./dot-portlet-base.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [], + "line": 10 + }, + "templateData": "\n\n\n \n\n\n\n" + }, + { + "name": "DotPortletBoxComponent", + "id": "component-DotPortletBoxComponent-6e8fafd01bf7581182134996ab0f51e2324b0c8500d7f9c8a818f2bae6539292690506fd0152030bbe6e812efcabac37f0c7a206f3ed6cef6fff024852a120cd", + "file": "apps/dotcms-ui/src/app/view/components/dot-portlet-base/components/dot-portlet-box/dot-portlet-box.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-portlet-box", + "styleUrls": ["./dot-portlet-box.component.scss"], + "styles": [], + "templateUrl": ["./dot-portlet-box.component.html"], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [], + "methodsClass": [], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component } from '@angular/core';\n\n@Component({\n selector: 'dot-portlet-box',\n templateUrl: './dot-portlet-box.component.html',\n styleUrls: ['./dot-portlet-box.component.scss']\n})\nexport class DotPortletBoxComponent {\n constructor() {}\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"variables\" as *;\n\n:host {\n display: block;\n background-color: $white;\n box-shadow: $md-shadow-4;\n margin: $spacing-4;\n padding: 1px;\n}\n", + "styleUrl": "./dot-portlet-box.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [], + "line": 8 + }, + "templateData": "\n" + }, + { + "name": "DotPortletDetailComponent", + "id": "component-DotPortletDetailComponent-aa1e6447ca0161ba74c069db9b15bf0c03497b29e94c2477423bec5bda7153dcb6e429afc3c83827f69f5030e0c3fa7590080ba68e4f21e88e8bfce48e455e17", + "file": "apps/dotcms-ui/src/app/portlets/dot-porlet-detail/dot-portlet-detail.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-portlet-detail", + "styleUrls": ["./dot-portlet-detail.component.scss"], + "styles": [], + "templateUrl": ["./dot-portlet-detail.component.html"], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "isContent", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 11 + }, + { + "name": "isWorkflow", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 10 + } + ], + "methodsClass": [ + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 14, + "deprecated": false, + "deprecationMessage": "" + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, OnInit } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\n\n@Component({\n selector: 'dot-portlet-detail',\n templateUrl: './dot-portlet-detail.component.html',\n styleUrls: ['./dot-portlet-detail.component.scss']\n})\nexport class DotPortletDetailComponent implements OnInit {\n isWorkflow = false;\n isContent = false;\n constructor(private route: ActivatedRoute) {}\n\n ngOnInit() {\n const currentPortlet: string = this.route.parent.parent.snapshot.params.id;\n this.isWorkflow = currentPortlet === 'workflow';\n this.isContent = !this.isWorkflow;\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "", + "styleUrl": "./dot-portlet-detail.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "route", + "type": "ActivatedRoute", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 11, + "jsdoctags": [ + { + "name": "route", + "type": "ActivatedRoute", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": ["OnInit"], + "templateData": "\n\n" + }, + { + "name": "DotPortletToolbarComponent", + "id": "component-DotPortletToolbarComponent-6e5b00095ac7bebd9a87fbcecd169b5c7c81d8e071b418b3107f514b40cafcea62714ad451bbd3f5fcbdb58362f409af94809ea39aee7f947abe3326112f0d19", + "file": "apps/dotcms-ui/src/app/view/components/dot-portlet-base/components/dot-portlet-toolbar/dot-portlet-toolbar.component.ts", + "changeDetection": "ChangeDetectionStrategy.OnPush", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-portlet-toolbar", + "styleUrls": ["./dot-portlet-toolbar.component.scss"], + "styles": [], + "templateUrl": ["./dot-portlet-toolbar.component.html"], + "viewProviders": [], + "inputsClass": [ + { + "name": "actions", + "deprecated": false, + "deprecationMessage": "", + "line": 17, + "type": "DotPortletToolbarActions", + "decorators": [] + }, + { + "name": "actionsButtonLabel", + "deprecated": false, + "deprecationMessage": "", + "line": 15, + "type": "string", + "decorators": [] + }, + { + "name": "cancelButtonLabel", + "deprecated": false, + "deprecationMessage": "", + "line": 13, + "type": "string", + "decorators": [] + }, + { + "name": "title", + "deprecated": false, + "deprecationMessage": "", + "line": 11, + "type": "string", + "decorators": [] + } + ], + "outputsClass": [], + "propertiesClass": [], + "methodsClass": [ + { + "name": "onCancelClick", + "args": [ + { + "name": "$event", + "type": "MouseEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 27, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nHandle cancel button click\n\n", + "description": "

    Handle cancel button click

    \n", + "jsdoctags": [ + { + "name": { + "pos": 715, + "end": 721, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "$event" + }, + "type": "MouseEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 696, + "end": 701, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 702, + "end": 714, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 703, + "end": 713, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 177, + "typeName": { + "pos": 703, + "end": 713, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "MouseEvent" + } + } + } + } + ] + }, + { + "name": "onPrimaryClick", + "args": [ + { + "name": "$event", + "type": "MouseEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 41, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nHandle primary button click\n\n", + "description": "

    Handle primary button click

    \n", + "jsdoctags": [ + { + "name": { + "pos": 1029, + "end": 1035, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "$event" + }, + "type": "MouseEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 1010, + "end": 1015, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 1016, + "end": 1028, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 1017, + "end": 1027, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 177, + "typeName": { + "pos": 1017, + "end": 1027, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "MouseEvent" + } + } + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\nimport { DotPortletToolbarActions } from '@shared/models/dot-portlet-toolbar.model/dot-portlet-toolbar-actions.model';\n\n@Component({\n selector: 'dot-portlet-toolbar',\n templateUrl: './dot-portlet-toolbar.component.html',\n styleUrls: ['./dot-portlet-toolbar.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DotPortletToolbarComponent {\n @Input() title: string;\n\n @Input() cancelButtonLabel: string;\n\n @Input() actionsButtonLabel: string;\n\n @Input() actions: DotPortletToolbarActions;\n\n constructor() {}\n\n /**\n * Handle cancel button click\n *\n * @param {MouseEvent} $event\n * @memberof DotPortletToolbarComponent\n */\n onCancelClick($event: MouseEvent): void {\n try {\n this.actions.cancel($event);\n } catch (error) {\n console.error(error);\n }\n }\n\n /**\n * Handle primary button click\n *\n * @param {MouseEvent} $event\n * @memberof DotPortletToolbarComponent\n */\n onPrimaryClick($event: MouseEvent): void {\n try {\n this.actions.primary[0].command($event);\n } catch (error) {\n console.error(error);\n }\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"variables\" as *;\n\n:host ::ng-deep .p-button {\n // TODO: move this to an extend\n font-size: $font-size-small;\n padding: $spacing-1 $spacing-2;\n}\n\nh3 {\n margin: 0 $spacing-2 0 0;\n font-size: $font-size-xx-large;\n line-height: 1.6; // Default 39px height\n}\n\n.dot-portlet-toolbar__actions {\n display: flex;\n margin-left: $spacing-1;\n align-items: center;\n\n & > * {\n margin-left: $spacing-1;\n }\n}\n\n.dot-portlet-toolbar__extra-left,\n.dot-portlet-toolbar__extra-right {\n display: flex;\n align-items: center;\n}\n\n.dot-portlet-toolbar__extra-left ::ng-deep {\n & > * {\n margin-right: $spacing-3;\n\n &:last-child {\n margin-right: 0;\n }\n }\n}\n.dot-portlet-toolbar__extra-right ::ng-deep {\n & > * {\n margin-left: $spacing-3;\n\n &:first-child {\n margin-left: 0;\n }\n }\n}\n", + "styleUrl": "./dot-portlet-toolbar.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [], + "line": 17 + }, + "templateData": "\n
    \n

    {{ title }}

    \n
    \n \n
    \n
    \n\n
    \n
    \n \n
    \n\n
    \n \n\n \n \n \n
    \n
    \n
    \n\n\n \n \n\n" + }, + { + "name": "DotProgressBar", + "id": "component-DotProgressBar-b84ac47f590bc09d7598aba1454b9ef77cf08071b26b5081be4cde0a5e93677d3c086d9f0c383f0facfde93f8f019fc2b4424447f0e35ba8e969c26d3f31be24", + "file": "libs/dotcms-webcomponents/src/elements/dot-progress-bar/dot-progress-bar.tsx", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "styleUrls": [], + "styles": [], + "templateUrl": [], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "progress", + "defaultValue": "0", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "

    indicates the progress to be show, a value 1 to 100

    \n", + "line": 17, + "rawdescription": "\nindicates the progress to be show, a value 1 to 100", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "" + } + ] + }, + { + "name": "text", + "defaultValue": "'Uploading Files...'", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    text to be show bellow the progress bar

    \n", + "line": 14, + "rawdescription": "\ntext to be show bellow the progress bar", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "" + } + ] + } + ], + "methodsClass": [ + { + "name": "render", + "args": [], + "optional": false, + "returnType": "any", + "typeParameters": [], + "line": 19, + "deprecated": false, + "deprecationMessage": "" + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "

    Represent a dotCMS DotProgressBar control.

    \n", + "rawdescription": "\n\nRepresent a dotCMS DotProgressBar control.\n\n", + "type": "component", + "sourceCode": "import { Component, h, Host, Prop } from '@stencil/core';\n/**\n * Represent a dotCMS DotProgressBar control.\n *\n * @export\n * @class DotProgressBar\n */\n@Component({\n tag: 'dot-progress-bar',\n styleUrl: 'dot-progress-bar.scss'\n})\nexport class DotProgressBar {\n /** text to be show bellow the progress bar*/\n @Prop() text = 'Uploading Files...';\n\n /** indicates the progress to be show, a value 1 to 100 */\n @Prop() progress = 0;\n\n render() {\n return (\n \n
    \n {this.text}\n \n );\n }\n}\n", + "tag": "dot-progress-bar", + "styleUrl": "dot-progress-bar.scss", + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "" + }, + { + "name": "DotPushPublishDialogComponent", + "id": "component-DotPushPublishDialogComponent-b8cd4c2465485757fb08acf39c6e8c831f120710d24341191eef10e816341df6709f35d14883d2265e669b911ab1be75b338f840bac32aefb9a9134fe60a997e", + "file": "apps/dotcms-ui/src/app/view/components/_common/dot-push-publish-dialog/dot-push-publish-dialog.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-push-publish-dialog", + "styleUrls": ["./dot-push-publish-dialog.component.scss"], + "styles": [], + "templateUrl": ["dot-push-publish-dialog.component.html"], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [ + { + "name": "cancel", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 26, + "type": "EventEmitter" + } + ], + "propertiesClass": [ + { + "name": "destroy$", + "defaultValue": "new Subject()", + "deprecated": false, + "deprecationMessage": "", + "type": "Subject", + "optional": false, + "description": "", + "line": 28, + "modifierKind": [121] + }, + { + "name": "dialogActions", + "deprecated": false, + "deprecationMessage": "", + "type": "DotDialogActions", + "optional": false, + "description": "", + "line": 19 + }, + { + "name": "dialogShow", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 20 + }, + { + "name": "errorMessage", + "defaultValue": "null", + "deprecated": false, + "deprecationMessage": "", + "type": "null", + "optional": false, + "description": "", + "line": 24 + }, + { + "name": "eventData", + "deprecated": false, + "deprecationMessage": "", + "type": "DotPushPublishDialogData", + "optional": false, + "description": "", + "line": 21 + }, + { + "name": "formData", + "deprecated": false, + "deprecationMessage": "", + "type": "DotPushPublishData", + "optional": false, + "description": "", + "line": 22 + }, + { + "name": "formValid", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 23 + } + ], + "methodsClass": [ + { + "name": "close", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 53, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nClose the dialog and clear the data.\n", + "description": "

    Close the dialog and clear the data.

    \n", + "jsdoctags": [] + }, + { + "name": "ngOnDestroy", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 44, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 36, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "setDialogConfig", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 100, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "showDialog", + "args": [ + { + "name": "data", + "type": "DotPushPublishDialogData", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 94, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "data", + "type": "DotPushPublishDialogData", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "submitPushAction", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 65, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nWhen form is submitted\nIf form is valid then call pushPublishService with the corresponding form values\n", + "description": "

    When form is submitted\nIf form is valid then call pushPublishService with the corresponding form values

    \n", + "jsdoctags": [] + }, + { + "name": "updateFormValid", + "args": [ + { + "name": "valid", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 89, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nUpdate dialog action and form validation flag.\n", + "description": "

    Update dialog action and form validation flag.

    \n", + "jsdoctags": [ + { + "name": { + "pos": 2986, + "end": 2991, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "valid" + }, + "type": "boolean", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 2970, + "end": 2975, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 2976, + "end": 2985, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 2977, + "end": 2984, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 133 + } + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, Output, EventEmitter, OnInit, OnDestroy } from '@angular/core';\nimport { PushPublishService } from '@services/push-publish/push-publish.service';\nimport { DotMessageService } from '@services/dot-message/dot-messages.service';\nimport { DotPushPublishDialogService } from '@dotcms/dotcms-js';\nimport { DotDialogActions } from '@components/dot-dialog/dot-dialog.component';\nimport { takeUntil } from 'rxjs/operators';\n\nimport { Subject } from 'rxjs';\nimport { DotPushPublishDialogData } from '@dotcms/dotcms-models';\nimport { DotPushPublishData } from '@models/dot-push-publish-data/dot-push-publish-data';\nimport { DotAjaxActionResponseView } from '@models/ajax-action-response/dot-ajax-action-response';\n\n@Component({\n selector: 'dot-push-publish-dialog',\n styleUrls: ['./dot-push-publish-dialog.component.scss'],\n templateUrl: 'dot-push-publish-dialog.component.html'\n})\nexport class DotPushPublishDialogComponent implements OnInit, OnDestroy {\n dialogActions: DotDialogActions;\n dialogShow = false;\n eventData: DotPushPublishDialogData;\n formData: DotPushPublishData;\n formValid = false;\n errorMessage = null;\n\n @Output() cancel = new EventEmitter();\n\n private destroy$: Subject = new Subject();\n\n constructor(\n private pushPublishService: PushPublishService,\n private dotMessageService: DotMessageService,\n private dotPushPublishDialogService: DotPushPublishDialogService\n ) {}\n\n ngOnInit() {\n this.dotPushPublishDialogService.showDialog$\n .pipe(takeUntil(this.destroy$))\n .subscribe((data: DotPushPublishDialogData) => {\n this.showDialog(data);\n });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.complete();\n }\n\n /**\n * Close the dialog and clear the data.\n * @memberof DotPushPublishDialogComponent\n */\n close(): void {\n this.cancel.emit(true);\n this.dialogShow = false;\n this.eventData = null;\n this.errorMessage = null;\n }\n\n /**\n * When form is submitted\n * If form is valid then call pushPublishService with the corresponding form values\n * @memberof DotPushPublishDialogComponent\n */\n submitPushAction(): void {\n if (this.formValid) {\n this.pushPublishService\n .pushPublishContent(\n this.eventData.assetIdentifier,\n this.formData,\n !!this.eventData.isBundle\n )\n .pipe(takeUntil(this.destroy$))\n .subscribe((result: DotAjaxActionResponseView) => {\n if (!result?.errors) {\n this.close();\n } else {\n this.errorMessage = result.errors;\n }\n });\n }\n }\n\n /**\n * Update dialog action and form validation flag.\n * @param {boolean} valid\n * @memberof DotPushPublishDialogComponent\n */\n updateFormValid(valid: boolean): void {\n this.dialogActions.accept.disabled = !valid;\n this.formValid = valid;\n }\n\n private showDialog(data: DotPushPublishDialogData): void {\n this.eventData = data;\n this.setDialogConfig();\n this.dialogShow = true;\n }\n\n private setDialogConfig(): void {\n this.dialogActions = {\n accept: {\n action: () => {\n this.submitPushAction();\n },\n label: this.dotMessageService.get('contenttypes.content.push_publish.form.push'),\n disabled: !this.formValid\n },\n cancel: {\n action: () => {\n this.close();\n },\n label: this.dotMessageService.get('contenttypes.content.push_publish.form.cancel')\n }\n };\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"variables\" as *;\n\n.dot-push-publish-dialog__error {\n color: $error;\n}\n", + "styleUrl": "./dot-push-publish-dialog.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "pushPublishService", + "type": "PushPublishService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotMessageService", + "type": "DotMessageService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotPushPublishDialogService", + "type": "DotPushPublishDialogService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 28, + "jsdoctags": [ + { + "name": "pushPublishService", + "type": "PushPublishService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotMessageService", + "type": "DotMessageService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotPushPublishDialogService", + "type": "DotPushPublishDialogService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": ["OnInit", "OnDestroy"], + "templateData": "\n \n \n {{ errorMessage }}\n\n" + }, + { + "name": "DotPushPublishFormComponent", + "id": "component-DotPushPublishFormComponent-2eea008f73839c2fd8241963d89aa0d63df5cb0a477f6b367f8b08ba502b453502035a8f22a0653bfa208d3748b4bc71c1cdc3fd1edfd90f5b0fd837bfb72302", + "file": "apps/dotcms-ui/src/app/view/components/_common/forms/dot-push-publish-form/dot-push-publish-form.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-push-publish-form", + "styleUrls": ["./dot-push-publish-form.component.scss"], + "styles": [], + "templateUrl": ["./dot-push-publish-form.component.html"], + "viewProviders": [], + "inputsClass": [ + { + "name": "data", + "deprecated": false, + "deprecationMessage": "", + "line": 45, + "type": "DotPushPublishDialogData", + "decorators": [] + } + ], + "outputsClass": [ + { + "name": "valid", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 48, + "type": "EventEmitter" + }, + { + "name": "value", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 47, + "type": "EventEmitter" + } + ], + "propertiesClass": [ + { + "name": "_filterOptions", + "defaultValue": "null", + "deprecated": false, + "deprecationMessage": "", + "type": "SelectItem[]", + "optional": false, + "description": "", + "line": 53, + "modifierKind": [121] + }, + { + "name": "assetIdentifier", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 40 + }, + { + "name": "changeTimezoneActionLabel", + "defaultValue": "this.dotMessageService.get('Change')", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 43 + }, + { + "name": "customCodeContainer", + "deprecated": false, + "deprecationMessage": "", + "type": "ElementRef", + "optional": false, + "description": "", + "line": 50, + "decorators": [ + { + "name": "ViewChild", + "stringifiedArguments": "'customCode', {static: true}" + } + ] + }, + { + "name": "dateFieldMinDate", + "defaultValue": "new Date()", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 34 + }, + { + "name": "defaultFilterKey", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 52, + "modifierKind": [121] + }, + { + "name": "destroy$", + "defaultValue": "new Subject()", + "deprecated": false, + "deprecationMessage": "", + "type": "Subject", + "optional": false, + "description": "", + "line": 54, + "modifierKind": [121] + }, + { + "name": "eventData", + "defaultValue": "{ assetIdentifier: '', title: '' }", + "deprecated": false, + "deprecationMessage": "", + "type": "DotPushPublishDialogData", + "optional": false, + "description": "", + "line": 39 + }, + { + "name": "fb", + "deprecated": false, + "deprecationMessage": "", + "type": "FormBuilder", + "optional": false, + "description": "", + "line": 62, + "modifierKind": [123] + }, + { + "name": "filterOptions", + "defaultValue": "null", + "deprecated": false, + "deprecationMessage": "", + "type": "SelectItem[]", + "optional": false, + "description": "", + "line": 37 + }, + { + "name": "form", + "deprecated": false, + "deprecationMessage": "", + "type": "FormGroup", + "optional": false, + "description": "", + "line": 35 + }, + { + "name": "localTimezone", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 41 + }, + { + "name": "pushActions", + "deprecated": false, + "deprecationMessage": "", + "type": "SelectItem[]", + "optional": false, + "description": "", + "line": 36 + }, + { + "name": "showTimezonePicker", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 42 + }, + { + "name": "timeZoneOptions", + "defaultValue": "null", + "deprecated": false, + "deprecationMessage": "", + "type": "SelectItem[]", + "optional": false, + "description": "", + "line": 38 + } + ], + "methodsClass": [ + { + "name": "emitValues", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 89, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nEmit if form is valid and the value.\n", + "description": "

    Emit if form is valid and the value.

    \n", + "jsdoctags": [] + }, + { + "name": "getPushPublishActions", + "args": [], + "optional": false, + "returnType": "SelectItem[]", + "typeParameters": [], + "line": 264, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "initForm", + "args": [ + { + "name": "params", + "type": "literal type", + "deprecated": false, + "deprecationMessage": "", + "optional": true + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 208, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "params", + "type": "literal type", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "isRestrictedOrCategory", + "args": [], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 287, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "loadCustomCode", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 140, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "loadData", + "args": [ + { + "name": "data", + "type": "DotPushPublishDialogData", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 122, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "data", + "type": "DotPushPublishDialogData", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "loadFilters", + "args": [], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 173, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "loadTimezones", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 158, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "ngOnDestroy", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 80, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 65, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "setPreviousDayToMinDate", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 117, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "setUsersTimeZone", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 148, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "toggleTimezonePicker", + "args": [ + { + "name": "event", + "type": "MouseEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 108, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nShow/Hide timezone dropdown picker and changes link label\n", + "description": "

    Show/Hide timezone dropdown picker and changes link label

    \n", + "jsdoctags": [ + { + "name": "event", + "type": "MouseEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "updateTimezoneLabel", + "args": [ + { + "name": "timezone", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 99, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nChanges timezone label according to the one picked at the timezone dropdown\n", + "description": "

    Changes timezone label according to the one picked at the timezone dropdown

    \n", + "jsdoctags": [ + { + "name": "timezone", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import {\n Component,\n ElementRef,\n EventEmitter,\n Input,\n OnInit,\n Output,\n ViewChild,\n OnDestroy\n} from '@angular/core';\nimport {\n DotPushPublishFilter,\n DotPushPublishFiltersService\n} from '@services/dot-push-publish-filters/dot-push-publish-filters.service';\nimport { catchError, filter, map, take, takeUntil } from 'rxjs/operators';\nimport { DotPushPublishDialogData } from '@dotcms/dotcms-models';\nimport { Observable, of, Subject } from 'rxjs';\nimport { FormBuilder, FormGroup, Validators } from '@angular/forms';\nimport { DotParseHtmlService } from '@services/dot-parse-html/dot-parse-html.service';\nimport { DotMessageService } from '@services/dot-message/dot-messages.service';\nimport { DotPushPublishData } from '@models/dot-push-publish-data/dot-push-publish-data';\nimport { SelectItem } from 'primeng/api';\nimport { DotFormModel } from '@models/dot-form/dot-form.model';\nimport { DotHttpErrorManagerService } from '@services/dot-http-error-manager/dot-http-error-manager.service';\nimport { DotcmsConfigService, DotTimeZone } from '@dotcms/dotcms-js';\n\n@Component({\n selector: 'dot-push-publish-form',\n templateUrl: './dot-push-publish-form.component.html',\n styleUrls: ['./dot-push-publish-form.component.scss']\n})\nexport class DotPushPublishFormComponent\n implements OnInit, OnDestroy, DotFormModel {\n dateFieldMinDate = new Date();\n form: FormGroup;\n pushActions: SelectItem[];\n filterOptions: SelectItem[] = null;\n timeZoneOptions: SelectItem[] = null;\n eventData: DotPushPublishDialogData = { assetIdentifier: '', title: '' };\n assetIdentifier: string;\n localTimezone: string;\n showTimezonePicker = false;\n changeTimezoneActionLabel = this.dotMessageService.get('Change');\n\n @Input() data: DotPushPublishDialogData;\n\n @Output() value = new EventEmitter();\n @Output() valid = new EventEmitter();\n\n @ViewChild('customCode', { static: true }) customCodeContainer: ElementRef;\n\n private defaultFilterKey: string;\n private _filterOptions: SelectItem[] = null;\n private destroy$: Subject = new Subject();\n\n constructor(\n private dotPushPublishFiltersService: DotPushPublishFiltersService,\n private dotParseHtmlService: DotParseHtmlService,\n private dotMessageService: DotMessageService,\n private dotcmsConfigService: DotcmsConfigService,\n private httpErrorManagerService: DotHttpErrorManagerService,\n public fb: FormBuilder\n ) {}\n\n ngOnInit() {\n if (this.data) {\n this.setPreviousDayToMinDate();\n if (this.filterOptions) {\n this.loadData(this.data);\n } else {\n this.loadFilters()\n .pipe(take(1))\n .subscribe(() => {\n this.loadData(this.data);\n });\n }\n }\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.complete();\n }\n\n /**\n * Emit if form is valid and the value.\n * @memberof DotPushPublishFormComponent\n */\n emitValues(): void {\n this.valid.emit(this.form.valid);\n this.value.emit(this.form.value);\n }\n\n /**\n * Changes timezone label according to the one picked at the timezone dropdown\n * @param string timezone\n * @memberof DotPushPublishFormComponent\n */\n updateTimezoneLabel(timezone: string): void {\n this.localTimezone = this.timeZoneOptions.find(({ value }) => value === timezone)['label'];\n }\n\n /**\n * Show/Hide timezone dropdown picker and changes link label\n * @param MouseEvent event\n * @memberof DotPushPublishFormComponent\n */\n toggleTimezonePicker(event: MouseEvent): void {\n event.preventDefault();\n this.showTimezonePicker = !this.showTimezonePicker;\n\n this.changeTimezoneActionLabel = this.showTimezonePicker\n ? this.dotMessageService.get('hide')\n : this.dotMessageService.get('Change');\n }\n\n private setPreviousDayToMinDate() {\n const today = new Date();\n this.dateFieldMinDate.setDate(today.getDate()-1);\n }\n\n private loadData(data: DotPushPublishDialogData): void {\n this.eventData = data;\n if (this.eventData.customCode) {\n this.loadCustomCode();\n } else {\n this.assetIdentifier = this.eventData.assetIdentifier;\n this.pushActions = this.getPushPublishActions();\n this.initForm({\n filterKey: this.defaultFilterKey\n });\n this.form.valueChanges.subscribe(() => {\n this.emitValues();\n });\n this.emitValues();\n }\n this.loadTimezones();\n }\n\n private loadCustomCode(): void {\n this.dotParseHtmlService.parse(\n this.eventData.customCode,\n this.customCodeContainer.nativeElement,\n true\n );\n }\n\n private setUsersTimeZone(): void {\n const ppTimezone = this.form.get('timezoneId');\n\n const localTZItem = this.timeZoneOptions.find(\n ({ value }) => value === Intl.DateTimeFormat().resolvedOptions().timeZone\n );\n ppTimezone.setValue(localTZItem.value);\n this.localTimezone = localTZItem.label;\n }\n\n private loadTimezones(): void {\n this.dotcmsConfigService\n .getTimeZone()\n .pipe(take(1))\n .subscribe((timezones: DotTimeZone[]) => {\n this.timeZoneOptions = timezones.map((item: DotTimeZone) => {\n return {\n label: item.label,\n value: item.id\n };\n });\n this.setUsersTimeZone();\n });\n }\n\n private loadFilters(): Observable {\n return this.dotPushPublishFiltersService.get().pipe(\n map((filterOptions: DotPushPublishFilter[]) => {\n this._filterOptions = filterOptions\n .map((item: DotPushPublishFilter) => {\n return {\n label: item.title,\n value: item.key\n };\n })\n .sort((a: SelectItem, b: SelectItem) => {\n if (a.label > b.label) {\n return 1;\n }\n if (a.label < b.label) {\n return -1;\n }\n // a must be equal to b\n return 0;\n });\n\n this.filterOptions = this._filterOptions;\n\n this.defaultFilterKey = filterOptions\n .filter(({ defaultFilter }: DotPushPublishFilter) => defaultFilter)\n .map(({ key }: DotPushPublishFilter) => key)\n .join();\n }),\n catchError((error) => {\n this.httpErrorManagerService.handle(error);\n return of([]);\n })\n );\n }\n\n private initForm(params?: { [key: string]: any }): void {\n this.form = this.fb.group({\n ...params,\n pushActionSelected: [this.pushActions[0].value, [Validators.required]],\n publishDate: [new Date(), [Validators.required]],\n expireDate: [{ value: new Date(), disabled: true }, [Validators.required]],\n timezoneId: [''],\n environment: ['', [Validators.required]]\n });\n\n const publishDate = this.form.get('publishDate');\n const expireDate = this.form.get('expireDate');\n const ppFilter = this.form.get('filterKey');\n\n const enableFilters = () => {\n ppFilter.enable();\n this.filterOptions = this._filterOptions;\n ppFilter.setValue(this.defaultFilterKey);\n };\n\n this.form\n .get('filterKey')\n .valueChanges.pipe(takeUntil(this.destroy$))\n .pipe(filter((value: string) => !!value))\n .subscribe((filterSelected: string) => {\n this.defaultFilterKey = filterSelected;\n });\n\n this.form\n .get('pushActionSelected')\n .valueChanges.pipe(takeUntil(this.destroy$))\n .subscribe((pushActionSelected: string) => {\n switch (pushActionSelected) {\n case 'publish': {\n publishDate.enable();\n expireDate.disable();\n enableFilters();\n break;\n }\n case 'expire': {\n publishDate.disable();\n expireDate.enable();\n ppFilter.disable();\n ppFilter.setValue('');\n this.filterOptions = [];\n break;\n }\n default: {\n publishDate.enable();\n expireDate.enable();\n enableFilters();\n }\n }\n });\n }\n\n private getPushPublishActions(): SelectItem[] {\n return [\n {\n label: this.dotMessageService.get('contenttypes.content.push_publish.action.push'),\n value: 'publish'\n },\n {\n label: this.dotMessageService.get(\n 'contenttypes.content.push_publish.action.remove'\n ),\n value: 'expire',\n disabled: this.isRestrictedOrCategory()\n },\n {\n label: this.dotMessageService.get(\n 'contenttypes.content.push_publish.action.pushremove'\n ),\n value: 'publishexpire',\n disabled: !!this.eventData.removeOnly || this.isRestrictedOrCategory()\n }\n ];\n }\n\n private isRestrictedOrCategory(): boolean {\n return !!(this.eventData.restricted || this.eventData.cats);\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"variables\" as *;\n\nform,\n.custom-code {\n width: $form-width;\n}\n\n.custom-code {\n margin-bottom: $spacing-9;\n\n &.hidden {\n display: none;\n }\n}\n\n.p-inputtext {\n width: 100%;\n}\n\n.push-publish-dialog__error-message {\n color: $error;\n}\n\n.push-publish-dialog__action-select {\n display: block;\n border-bottom: solid 1px $gray-light;\n}\n\n.push-publish-dialog__publish-dates-container {\n margin-bottom: 0;\n\n .push-publish-dialog__publish-date,\n .push-publish-dialog__expire-date {\n margin-bottom: 0.5rem;\n }\n}\n\n.push-publish-dialog__timezone-label {\n font-size: 0.85rem;\n}\n", + "styleUrl": "./dot-push-publish-form.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "dotPushPublishFiltersService", + "type": "DotPushPublishFiltersService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotParseHtmlService", + "type": "DotParseHtmlService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotMessageService", + "type": "DotMessageService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotcmsConfigService", + "type": "DotcmsConfigService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "httpErrorManagerService", + "type": "DotHttpErrorManagerService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "fb", + "type": "FormBuilder", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 54, + "jsdoctags": [ + { + "name": "dotPushPublishFiltersService", + "type": "DotPushPublishFiltersService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotParseHtmlService", + "type": "DotParseHtmlService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotMessageService", + "type": "DotMessageService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotcmsConfigService", + "type": "DotcmsConfigService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "httpErrorManagerService", + "type": "DotHttpErrorManagerService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "fb", + "type": "FormBuilder", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": ["OnInit", "OnDestroy", "DotFormModel"], + "templateData": "\n
    \n \n \n \n
    \n\n
    \n \n \n
    \n\n
    \n
    \n \n
    \n \n
    \n \n
    \n
    \n \n
    \n \n
    \n \n
    \n
    \n
    \n {{ localTimezone }} -\n {{ changeTimezoneActionLabel }}\n
    \n
    \n \n \n
    \n
    \n \n \n \n
    \n\n
    \n" + }, + { + "name": "DotRadioComponent", + "id": "component-DotRadioComponent-4e380217100cff0adc8f2a3d13694a60850d80f87441387bb1b8276dd3e1f15a280b5a8cce13f7a5998c162f2c3efab138e90949ba7469a781099f13925c88ef", + "file": "libs/dotcms-field-elements/src/components/dot-radio/dot-radio.tsx", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "styleUrls": [], + "styles": [], + "templateUrl": [], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "_options", + "deprecated": false, + "deprecationMessage": "", + "type": "DotOption[]", + "optional": false, + "description": "", + "line": 65, + "decorators": [ + { + "name": "State", + "stringifiedArguments": "" + } + ] + }, + { + "name": "disabled", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "

    (optional) Disables field's interaction

    \n", + "line": 57, + "rawdescription": "\n(optional) Disables field's interaction", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true, mutable: true}" + } + ] + }, + { + "name": "el", + "deprecated": false, + "deprecationMessage": "", + "type": "HTMLElement", + "optional": false, + "description": "", + "line": 39, + "decorators": [ + { + "name": "Element", + "stringifiedArguments": "" + } + ] + }, + { + "name": "hint", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    (optional) Hint text that suggest a clue of the field

    \n", + "line": 51, + "rawdescription": "\n(optional) Hint text that suggest a clue of the field", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "label", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    (optional) Text to be rendered next to input field

    \n", + "line": 48, + "rawdescription": "\n(optional) Text to be rendered next to input field", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "name", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    Name that will be used as ID

    \n", + "line": 45, + "rawdescription": "\nName that will be used as ID", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "options", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    Value/Label ratio options separated by comma, to be formatted as: Value|Label

    \n", + "line": 63, + "rawdescription": "\nValue/Label ratio options separated by comma, to be formatted as: Value|Label", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "required", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "

    (optional) Determine if it is mandatory

    \n", + "line": 54, + "rawdescription": "\n(optional) Determine if it is mandatory", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "requiredMessage", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    (optional) Text that will be shown when required is set and condition is not met

    \n", + "line": 60, + "rawdescription": "\n(optional) Text that will be shown when required is set and condition is not met", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "status", + "deprecated": false, + "deprecationMessage": "", + "type": "DotFieldStatus", + "optional": false, + "description": "", + "line": 66, + "decorators": [ + { + "name": "State", + "stringifiedArguments": "" + } + ] + }, + { + "name": "statusChange", + "deprecated": false, + "deprecationMessage": "", + "type": "EventEmitter", + "optional": false, + "description": "", + "line": 69, + "decorators": [ + { + "name": "Event", + "stringifiedArguments": "" + } + ] + }, + { + "name": "value", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    Value set from the ratio option

    \n", + "line": 42, + "rawdescription": "\nValue set from the ratio option", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{mutable: true, reflect: true}" + } + ] + }, + { + "name": "valueChange", + "deprecated": false, + "deprecationMessage": "", + "type": "EventEmitter", + "optional": false, + "description": "", + "line": 68, + "decorators": [ + { + "name": "Event", + "stringifiedArguments": "" + } + ] + } + ], + "methodsClass": [ + { + "name": "componentDidLoad", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 89, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "componentWillLoad", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 82, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "emitStatusChange", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 178, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "emitValueChange", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 185, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "getErrorMessage", + "args": [], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 163, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "isValid", + "args": [], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 155, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "optionsWatch", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 104, + "deprecated": false, + "deprecationMessage": "", + "decorators": [ + { + "name": "Watch", + "stringifiedArguments": "'options'" + } + ] + }, + { + "name": "render", + "args": [], + "optional": false, + "returnType": "any", + "typeParameters": [], + "line": 114, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "reset", + "args": [], + "optional": false, + "returnType": "Promise", + "typeParameters": [], + "line": 75, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nReset properties of the field, clear value and emit events.\n", + "description": "

    Reset properties of the field, clear value and emit events.

    \n", + "decorators": [ + { + "name": "Method", + "stringifiedArguments": "" + } + ], + "modifierKind": [131] + }, + { + "name": "setValue", + "args": [ + { + "name": "event", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 167, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "event", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "showErrorMessage", + "args": [], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 159, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "validateProps", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 151, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "valueWatch", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 110, + "deprecated": false, + "deprecationMessage": "", + "decorators": [ + { + "name": "Watch", + "stringifiedArguments": "'value'" + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "

    Represent a dotcms radio control.

    \n", + "rawdescription": "\n\nRepresent a dotcms radio control.\n\n", + "type": "component", + "sourceCode": "import {\n Component,\n Element,\n Event,\n EventEmitter,\n Method,\n Prop,\n State,\n Watch,\n Host,\n h\n} from '@stencil/core';\nimport { DotFieldStatus, DotFieldStatusEvent, DotFieldValueEvent, DotOption } from '../../models';\nimport {\n getClassNames,\n getDotOptionsFromFieldValue,\n getErrorClass,\n getOriginalStatus,\n getTagError,\n getTagHint,\n updateStatus,\n checkProp,\n getId,\n getHintId\n} from '../../utils';\nimport { getDotAttributesFromElement, setDotAttributesToElement } from '../dot-form/utils';\n\n/**\n * Represent a dotcms radio control.\n *\n * @export\n * @class DotRadioComponent\n */\n@Component({\n tag: 'dot-radio',\n styleUrl: 'dot-radio.scss'\n})\nexport class DotRadioComponent {\n @Element() el: HTMLElement;\n\n /** Value set from the ratio option */\n @Prop({ mutable: true, reflect: true }) value = '';\n\n /** Name that will be used as ID */\n @Prop({ reflect: true }) name = '';\n\n /** (optional) Text to be rendered next to input field */\n @Prop({ reflect: true }) label = '';\n\n /** (optional) Hint text that suggest a clue of the field */\n @Prop({ reflect: true }) hint = '';\n\n /** (optional) Determine if it is mandatory */\n @Prop({ reflect: true }) required = false;\n\n /** (optional) Disables field's interaction */\n @Prop({ reflect: true, mutable: true }) disabled = false;\n\n /** (optional) Text that will be shown when required is set and condition is not met */\n @Prop({ reflect: true }) requiredMessage = '';\n\n /** Value/Label ratio options separated by comma, to be formatted as: Value|Label */\n @Prop({ reflect: true }) options = '';\n\n @State() _options: DotOption[];\n @State() status: DotFieldStatus;\n\n @Event() valueChange: EventEmitter;\n @Event() statusChange: EventEmitter;\n\n /**\n * Reset properties of the field, clear value and emit events.\n */\n @Method()\n async reset(): Promise {\n this.value = '';\n this.status = getOriginalStatus(this.isValid());\n this.emitStatusChange();\n this.emitValueChange();\n }\n\n componentWillLoad(): void {\n this.value = this.value || '';\n this.validateProps();\n this.status = getOriginalStatus(this.isValid());\n this.emitStatusChange();\n }\n\n componentDidLoad(): void {\n const attrException = ['dottype'];\n const htmlElements = this.el.querySelectorAll('input[type=\"radio\"]');\n setTimeout(() => {\n const attrs = getDotAttributesFromElement(\n Array.from(this.el.attributes),\n attrException\n );\n htmlElements.forEach((htmlElement: Element) => {\n setDotAttributesToElement(htmlElement, attrs);\n });\n }, 0);\n }\n\n @Watch('options')\n optionsWatch(): void {\n const validOptions = checkProp(this, 'options');\n this._options = getDotOptionsFromFieldValue(validOptions);\n }\n\n @Watch('value')\n valueWatch() {\n this.value = this.value || '';\n }\n\n render() {\n const classes = getClassNames(this.status, this.isValid(), this.required);\n\n return (\n \n \n \n {this._options.map((item: DotOption) => {\n item.value = item.value.trim();\n return (\n \n );\n })}\n
    \n \n {getTagHint(this.hint)}\n {getTagError(this.showErrorMessage(), this.getErrorMessage())}\n
    \n );\n }\n\n private validateProps(): void {\n this.optionsWatch();\n }\n\n private isValid(): boolean {\n return this.required ? !!this.value : true;\n }\n\n private showErrorMessage(): boolean {\n return this.getErrorMessage() && !this.status.dotPristine;\n }\n\n private getErrorMessage(): string {\n return this.isValid() ? '' : this.requiredMessage;\n }\n\n private setValue(event): void {\n this.value = event.target.value.trim();\n this.status = updateStatus(this.status, {\n dotTouched: true,\n dotPristine: false,\n dotValid: this.isValid()\n });\n this.emitValueChange();\n this.emitStatusChange();\n }\n\n private emitStatusChange(): void {\n this.statusChange.emit({\n name: this.name,\n status: this.status\n });\n }\n\n private emitValueChange(): void {\n this.valueChange.emit({\n name: this.name,\n value: this.value\n });\n }\n}\n", + "tag": "dot-radio", + "styleUrl": "dot-radio.scss", + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "" + }, + { + "name": "DotRadioComponent", + "id": "component-DotRadioComponent-f11b915e90c13c4a1ad80f4206c87050fc094c8b3588cd686f03b6c070538252389621024a13fd4234d607036def30d32f225534e66f71e1045a4aa71a4ab877-1", + "file": "libs/dotcms-webcomponents/src/components/contenttypes-fields/dot-radio/dot-radio.tsx", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "styleUrls": [], + "styles": [], + "templateUrl": [], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "_options", + "deprecated": false, + "deprecationMessage": "", + "type": "DotOption[]", + "optional": false, + "description": "", + "line": 80, + "decorators": [ + { + "name": "State", + "stringifiedArguments": "" + } + ] + }, + { + "name": "disabled", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "

    (optional) Disables field's interaction

    \n", + "line": 69, + "rawdescription": "\n(optional) Disables field's interaction", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true, mutable: true}" + } + ] + }, + { + "name": "dotStatusChange", + "deprecated": false, + "deprecationMessage": "", + "type": "EventEmitter", + "optional": false, + "description": "", + "line": 87, + "decorators": [ + { + "name": "Event", + "stringifiedArguments": "" + } + ] + }, + { + "name": "dotValueChange", + "deprecated": false, + "deprecationMessage": "", + "type": "EventEmitter", + "optional": false, + "description": "", + "line": 85, + "decorators": [ + { + "name": "Event", + "stringifiedArguments": "" + } + ] + }, + { + "name": "el", + "deprecated": false, + "deprecationMessage": "", + "type": "HTMLElement", + "optional": false, + "description": "", + "line": 45, + "decorators": [ + { + "name": "Element", + "stringifiedArguments": "" + } + ] + }, + { + "name": "hint", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    (optional) Hint text that suggest a clue of the field

    \n", + "line": 61, + "rawdescription": "\n(optional) Hint text that suggest a clue of the field", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "label", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    (optional) Text to be rendered next to input field

    \n", + "line": 57, + "rawdescription": "\n(optional) Text to be rendered next to input field", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "name", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    Name that will be used as ID

    \n", + "line": 53, + "rawdescription": "\nName that will be used as ID", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "options", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    Value/Label ratio options separated by comma, to be formatted as: Value|Label

    \n", + "line": 77, + "rawdescription": "\nValue/Label ratio options separated by comma, to be formatted as: Value|Label", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "required", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "

    (optional) Determine if it is mandatory

    \n", + "line": 65, + "rawdescription": "\n(optional) Determine if it is mandatory", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "requiredMessage", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    (optional) Text that will be shown when required is set and condition is not met

    \n", + "line": 73, + "rawdescription": "\n(optional) Text that will be shown when required is set and condition is not met", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "status", + "deprecated": false, + "deprecationMessage": "", + "type": "DotFieldStatus", + "optional": false, + "description": "", + "line": 82, + "decorators": [ + { + "name": "State", + "stringifiedArguments": "" + } + ] + }, + { + "name": "value", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    Value set from the ratio option

    \n", + "line": 49, + "rawdescription": "\nValue set from the ratio option", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{mutable: true, reflect: true}" + } + ] + } + ], + "methodsClass": [ + { + "name": "componentDidLoad", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 107, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "componentWillLoad", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 100, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "emitStatusChange", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 196, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "emitValueChange", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 203, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "getErrorMessage", + "args": [], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 181, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "isValid", + "args": [], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 173, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "optionsWatch", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 122, + "deprecated": false, + "deprecationMessage": "", + "decorators": [ + { + "name": "Watch", + "stringifiedArguments": "'options'" + } + ] + }, + { + "name": "render", + "args": [], + "optional": false, + "returnType": "any", + "typeParameters": [], + "line": 132, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "reset", + "args": [], + "optional": false, + "returnType": "Promise", + "typeParameters": [], + "line": 93, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nReset properties of the field, clear value and emit events.\n", + "description": "

    Reset properties of the field, clear value and emit events.

    \n", + "decorators": [ + { + "name": "Method", + "stringifiedArguments": "" + } + ], + "modifierKind": [131] + }, + { + "name": "setValue", + "args": [ + { + "name": "event", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 185, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "event", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "showErrorMessage", + "args": [], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 177, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "validateProps", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 169, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "valueWatch", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 128, + "deprecated": false, + "deprecationMessage": "", + "decorators": [ + { + "name": "Watch", + "stringifiedArguments": "'value'" + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "

    Represent a dotcms radio control.

    \n", + "rawdescription": "\n\nRepresent a dotcms radio control.\n\n", + "type": "component", + "sourceCode": "import {\n Component,\n Element,\n Event,\n EventEmitter,\n Method,\n Prop,\n State,\n Watch,\n h,\n Host\n} from '@stencil/core';\nimport {\n DotFieldStatus,\n DotFieldStatusEvent,\n DotFieldValueEvent,\n DotOption\n} from '../../../models';\nimport {\n getClassNames,\n getDotOptionsFromFieldValue,\n getErrorClass,\n getOriginalStatus,\n getTagError,\n getTagHint,\n updateStatus,\n checkProp,\n getId,\n getHintId\n} from '../../../utils';\nimport { getDotAttributesFromElement, setDotAttributesToElement } from '../dot-form/utils';\n\n/**\n * Represent a dotcms radio control.\n *\n * @export\n * @class DotRadioComponent\n */\n@Component({\n tag: 'dot-radio',\n styleUrl: 'dot-radio.scss'\n})\nexport class DotRadioComponent {\n @Element()\n el: HTMLElement;\n\n /** Value set from the ratio option */\n @Prop({ mutable: true, reflect: true })\n value = '';\n\n /** Name that will be used as ID */\n @Prop({ reflect: true })\n name = '';\n\n /** (optional) Text to be rendered next to input field */\n @Prop({ reflect: true })\n label = '';\n\n /** (optional) Hint text that suggest a clue of the field */\n @Prop({ reflect: true })\n hint = '';\n\n /** (optional) Determine if it is mandatory */\n @Prop({ reflect: true })\n required = false;\n\n /** (optional) Disables field's interaction */\n @Prop({ reflect: true, mutable: true })\n disabled = false;\n\n /** (optional) Text that will be shown when required is set and condition is not met */\n @Prop({ reflect: true })\n requiredMessage = '';\n\n /** Value/Label ratio options separated by comma, to be formatted as: Value|Label */\n @Prop({ reflect: true })\n options = '';\n\n @State()\n _options: DotOption[];\n @State()\n status: DotFieldStatus;\n\n @Event()\n dotValueChange: EventEmitter;\n @Event()\n dotStatusChange: EventEmitter;\n\n /**\n * Reset properties of the field, clear value and emit events.\n */\n @Method()\n async reset(): Promise {\n this.value = '';\n this.status = getOriginalStatus(this.isValid());\n this.emitStatusChange();\n this.emitValueChange();\n }\n\n componentWillLoad(): void {\n this.value = this.value || '';\n this.validateProps();\n this.status = getOriginalStatus(this.isValid());\n this.emitStatusChange();\n }\n\n componentDidLoad(): void {\n const attrException = ['dottype'];\n const htmlElements = this.el.querySelectorAll('input[type=\"radio\"]');\n setTimeout(() => {\n const attrs = getDotAttributesFromElement(\n Array.from(this.el.attributes),\n attrException\n );\n htmlElements.forEach((htmlElement: Element) => {\n setDotAttributesToElement(htmlElement, attrs);\n });\n }, 0);\n }\n\n @Watch('options')\n optionsWatch(): void {\n const validOptions = checkProp(this, 'options');\n this._options = getDotOptionsFromFieldValue(validOptions);\n }\n\n @Watch('value')\n valueWatch() {\n this.value = this.value || '';\n }\n\n render() {\n const classes = getClassNames(this.status, this.isValid(), this.required);\n\n return (\n \n \n \n {this._options.map((item: DotOption) => {\n item.value = item.value.trim();\n return (\n \n );\n })}\n \n \n {getTagHint(this.hint)}\n {getTagError(this.showErrorMessage(), this.getErrorMessage())}\n \n );\n }\n\n private validateProps(): void {\n this.optionsWatch();\n }\n\n private isValid(): boolean {\n return this.required ? !!this.value : true;\n }\n\n private showErrorMessage(): boolean {\n return this.getErrorMessage() && !this.status.dotPristine;\n }\n\n private getErrorMessage(): string {\n return this.isValid() ? '' : this.requiredMessage;\n }\n\n private setValue(event): void {\n this.value = event.target.value.trim();\n this.status = updateStatus(this.status, {\n dotTouched: true,\n dotPristine: false,\n dotValid: this.isValid()\n });\n this.emitValueChange();\n this.emitStatusChange();\n }\n\n private emitStatusChange(): void {\n this.dotStatusChange.emit({\n name: this.name,\n status: this.status\n });\n }\n\n private emitValueChange(): void {\n this.dotValueChange.emit({\n name: this.name,\n value: this.value\n });\n }\n}\n", + "tag": "dot-radio", + "styleUrl": "dot-radio.scss", + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "", + "isDuplicate": true, + "duplicateId": 1, + "duplicateName": "DotRadioComponent-1" + }, + { + "name": "DotRelationshipsPropertyComponent", + "id": "component-DotRelationshipsPropertyComponent-6e35be34237c3f406af9822a2c3386a886ac8f94c55823301e456eb0ea96458acdb02eec956ede2c489159a8786f1199726ad5803872a17ce1a452669681afea", + "file": "apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/components/fields/content-type-fields-properties-form/field-properties/dot-relationships-property/dot-relationships-property.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-relationships-property", + "styleUrls": ["./dot-relationships-property.component.scss"], + "styles": [], + "templateUrl": ["./dot-relationships-property.component.html"], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "beforeValue", + "deprecated": false, + "deprecationMessage": "", + "type": "DotRelationshipsPropertyValue", + "optional": false, + "description": "", + "line": 32 + }, + { + "name": "editing", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 30 + }, + { + "name": "group", + "deprecated": false, + "deprecationMessage": "", + "type": "FormGroup", + "optional": false, + "description": "", + "line": 26 + }, + { + "name": "property", + "deprecated": false, + "deprecationMessage": "", + "type": "FieldProperty", + "optional": false, + "description": "", + "line": 25 + }, + { + "name": "status", + "defaultValue": "this.STATUS_NEW", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 28 + }, + { + "name": "STATUS_EXISTING", + "defaultValue": "'EXISTING'", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 23, + "modifierKind": [144] + }, + { + "name": "STATUS_NEW", + "defaultValue": "'NEW'", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 22, + "modifierKind": [144] + } + ], + "methodsClass": [ + { + "name": "clean", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 55, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nClean the relationships property's value\n\n", + "description": "

    Clean the relationships property's value

    \n", + "jsdoctags": [] + }, + { + "name": "getValidationErrorMessage", + "args": [], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 65, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nReturn the validation error message according with the component's state.\n\n", + "description": "

    Return the validation error message according with the component's state.

    \n", + "jsdoctags": [ + { + "tagName": { + "pos": 1893, + "end": 1900, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "returns" + }, + "comment": "", + "returnType": "string" + } + ] + }, + { + "name": "handleChange", + "args": [ + { + "name": "value", + "type": "DotRelationshipsPropertyValue", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 46, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nHandle a change in the relationships property\n\n", + "description": "

    Handle a change in the relationships property

    \n", + "jsdoctags": [ + { + "name": { + "pos": 1363, + "end": 1368, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "value" + }, + "type": "DotRelationshipsPropertyValue", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 1325, + "end": 1330, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 1331, + "end": 1362, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 1332, + "end": 1361, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 177, + "typeName": { + "pos": 1332, + "end": 1361, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "DotRelationshipsPropertyValue" + } + } + } + } + ] + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 35, + "deprecated": false, + "deprecationMessage": "" + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "

    Component for relationships property field

    \n", + "rawdescription": "\n\nComponent for relationships property field\n\n", + "type": "component", + "sourceCode": "import { Component, OnInit } from '@angular/core';\nimport { DotMessageService } from '@services/dot-message/dot-messages.service';\nimport { FormGroup } from '@angular/forms';\nimport * as _ from 'lodash';\nimport { FieldProperty } from '../field-properties.model';\nimport { DotRelationshipsPropertyValue } from './model/dot-relationships-property-value.model';\n\n/**\n *Component for relationships property field\n *\n * @export\n * @class DotRelationshipsPropertyComponent\n * @implements {OnInit}\n */\n@Component({\n providers: [],\n selector: 'dot-relationships-property',\n templateUrl: './dot-relationships-property.component.html',\n styleUrls: ['./dot-relationships-property.component.scss']\n})\nexport class DotRelationshipsPropertyComponent implements OnInit {\n readonly STATUS_NEW = 'NEW';\n readonly STATUS_EXISTING = 'EXISTING';\n\n property: FieldProperty;\n group: FormGroup;\n\n status = this.STATUS_NEW;\n\n editing: boolean;\n\n beforeValue: DotRelationshipsPropertyValue;\n\n constructor(private dotMessageService: DotMessageService) {}\n ngOnInit() {\n this.beforeValue = _.cloneDeep(this.group.get(this.property.name).value);\n this.editing = !!this.group.get(this.property.name).value.velocityVar;\n }\n\n /**\n *Handle a change in the relationships property\n *\n * @param {DotRelationshipsPropertyValue} value\n * @memberof DotRelationshipsPropertyComponent\n */\n handleChange(value: DotRelationshipsPropertyValue): void {\n this.group.get(this.property.name).setValue(value);\n }\n\n /**\n *Clean the relationships property's value\n *\n * @memberof DotRelationshipsPropertyComponent\n */\n clean(): void {\n this.group.get(this.property.name).setValue(_.cloneDeep(this.beforeValue));\n }\n\n /**\n *Return the validation error message according with the component's state.\n *\n * @returns {string}\n * @memberof DotRelationshipsPropertyComponent\n */\n getValidationErrorMessage(): string {\n return this.status === this.STATUS_NEW\n ? this.dotMessageService.get(\n 'contenttypes.field.properties.relationships.new.error.required'\n )\n : this.dotMessageService.get(\n 'contenttypes.field.properties.relationships.edit.error.required'\n );\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"variables\" as *;\n\n.relationship__type {\n display: flex;\n\n p-radioButton {\n margin-right: $spacing-3;\n }\n}\n", + "styleUrl": "./dot-relationships-property.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "dotMessageService", + "type": "DotMessageService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 32, + "jsdoctags": [ + { + "name": "dotMessageService", + "type": "DotMessageService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": ["OnInit"], + "templateData": "
    \n \n \n\n \n \n
    \n\n
    \n \n \n\n \n
    \n \n \n \n
    \n
    \n\n \n \n
    \n" + }, + { + "name": "DotRelationshipTreeComponent", + "id": "component-DotRelationshipTreeComponent-a55891f997ba031b7c144cd1f9ddd7394ef0665f3108b20f37307c8bf416e1761b46a0c6423bf5c1d5180aa7cc56b456cc10363da10fc450f57e77a55d13c1f3", + "file": "apps/dotcms-ui/src/app/view/components/dot-relationship-tree/dot-relationship-tree.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-relationship-tree", + "styleUrls": ["./dot-relationship-tree.component.scss"], + "styles": [], + "templateUrl": ["./dot-relationship-tree.component.html"], + "viewProviders": [], + "inputsClass": [ + { + "name": "contentType", + "deprecated": false, + "deprecationMessage": "", + "line": 11, + "type": "DotCMSContentType", + "decorators": [] + }, + { + "name": "velocityVar", + "deprecated": false, + "deprecationMessage": "", + "line": 10, + "type": "string", + "decorators": [] + } + ], + "outputsClass": [], + "propertiesClass": [ + { + "name": "child", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 16 + }, + { + "name": "fieldName", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 15 + }, + { + "name": "isRelationshipChild", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 13 + }, + { + "name": "parent", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 17 + }, + { + "name": "relatedContentType", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 14 + } + ], + "methodsClass": [ + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 21, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "setInitialValues", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 29, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nSets initial values of the relationship tree component\n\n", + "description": "

    Sets initial values of the relationship tree component

    \n", + "jsdoctags": [] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, Input, OnInit } from '@angular/core';\nimport { DotCMSContentType } from '@dotcms/dotcms-models';\n\n@Component({\n selector: 'dot-relationship-tree',\n templateUrl: './dot-relationship-tree.component.html',\n styleUrls: ['./dot-relationship-tree.component.scss']\n})\nexport class DotRelationshipTreeComponent implements OnInit {\n @Input() velocityVar: string;\n @Input() contentType: DotCMSContentType;\n\n isRelationshipChild: boolean = false;\n relatedContentType: string;\n fieldName: string;\n child: string;\n parent: string;\n\n constructor() {}\n\n ngOnInit(): void {\n this.setInitialValues();\n }\n /**\n * Sets initial values of the relationship tree component\n *\n * @memberof DotRelationshipTreeComponent\n */\n setInitialValues(): void {\n // If velocityVar has a dot it means it's the child of the relationship\n this.isRelationshipChild = this.velocityVar?.indexOf('.') !== -1;\n\n const [relatedContentType] = this.velocityVar?.split('.');\n const contentTypeName = this.contentType?.name;\n\n this.parent = this.isRelationshipChild ? relatedContentType : contentTypeName;\n this.child = this.isRelationshipChild ? contentTypeName : relatedContentType;\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"variables\" as *;\n\n:host {\n border: 1px solid $gray-light;\n display: block;\n border-radius: $border-radius;\n padding: $spacing-3;\n\n ::ng-deep {\n .dot-tree--active {\n position: relative;\n &::after {\n background: $brand-primary;\n width: $spacing-1;\n height: $spacing-1;\n position: absolute;\n content: \"\";\n border-radius: 50%;\n right: 0;\n bottom: 0;\n }\n }\n }\n}\n\n.dot-tree {\n list-style: none;\n padding: 0;\n margin: 0;\n position: relative;\n\n & > li::after {\n background: $gray-light;\n width: 1px;\n height: 1.3rem;\n content: \"•\";\n position: absolute;\n top: 1.4rem;\n left: 0.8rem;\n color: $gray-light;\n display: flex;\n justify-content: space-evenly;\n align-items: flex-end;\n font-size: $font-size-x-large;\n line-height: 1px;\n }\n}\n.dot-tree--child {\n position: relative;\n\n li {\n padding-top: 0.3rem;\n }\n\n & > li::after {\n background: $gray-light;\n width: 1.3rem;\n height: 1px;\n content: \"\";\n position: absolute;\n left: 0.8rem;\n top: $spacing-3;\n }\n}\n\n.dot-tree-query {\n display: flex;\n justify-content: space-between;\n align-items: center;\n\n h3 {\n padding: 0;\n margin-bottom: $spacing-1;\n font-size: $font-size-medium;\n font-weight: bold;\n }\n\n code {\n color: $gray;\n }\n}\n\nul {\n list-style: none;\n padding-left: $spacing-5;\n\n li {\n span {\n margin-left: $spacing-1;\n }\n\n .dot-tree__content {\n display: flex;\n align-items: center;\n }\n }\n}\n", + "styleUrl": "./dot-relationship-tree.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [], + "line": 17 + }, + "implements": ["OnInit"], + "templateData": "
      \n
    • \n
      \n \n {{ parent }}\n
      \n
        \n
      • \n
        \n \n {{ child }}\n
        \n
      • \n
      \n
    • \n
    \n" + }, + { + "name": "DotReorderMenuComponent", + "id": "component-DotReorderMenuComponent-74bff366877833b642f1734aa72621e6cb854f0d9c4f2b170e0c27b66b375eefbd45de345afbf6dc813cc52307ea93eea3daad395e5ad93bb46096a4cf2ea7ba", + "file": "apps/dotcms-ui/src/app/view/components/dot-contentlet-editor/components/dot-reorder-menu/dot-reorder-menu.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-reorder-menu", + "styleUrls": [], + "styles": [], + "templateUrl": ["./dot-reorder-menu.component.html"], + "viewProviders": [], + "inputsClass": [ + { + "name": "url", + "deprecated": false, + "deprecationMessage": "", + "line": 8, + "type": "string", + "decorators": [] + } + ], + "outputsClass": [ + { + "name": "close", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 9, + "type": "EventEmitter" + } + ], + "propertiesClass": [], + "methodsClass": [ + { + "name": "onClose", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 18, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nHandle close event from the iframe\n\n", + "description": "

    Handle close event from the iframe

    \n", + "jsdoctags": [] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, Input, EventEmitter, Output } from '@angular/core';\n\n@Component({\n selector: 'dot-reorder-menu',\n templateUrl: './dot-reorder-menu.component.html'\n})\nexport class DotReorderMenuComponent {\n @Input() url: string;\n @Output() close: EventEmitter = new EventEmitter();\n\n constructor() {}\n\n /**\n * Handle close event from the iframe\n *\n * @memberof DotContentletWrapperComponent\n */\n onClose(): void {\n this.close.emit();\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [], + "line": 9 + }, + "templateData": "\n\n" + }, + { + "name": "DotSecondaryToolbarComponent", + "id": "component-DotSecondaryToolbarComponent-34b17a0e7b1d5c3a054132508e8255c353f37b26345cb534d731c4ae25feabcbd49a7d0a5843e4f12533a9b25fd123f6bf7cd839e341fed54fc49c3951077ac0", + "file": "apps/dotcms-ui/src/app/view/components/dot-secondary-toolbar/dot-secondary-toolbar.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-secondary-toolbar", + "styleUrls": ["./dot-secondary-toolbar.component.scss"], + "styles": [], + "templateUrl": ["./dot-secondary-toolbar.component.html"], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [], + "methodsClass": [], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component } from '@angular/core';\n\n@Component({\n selector: 'dot-secondary-toolbar',\n templateUrl: './dot-secondary-toolbar.component.html',\n styleUrls: ['./dot-secondary-toolbar.component.scss']\n})\nexport class DotSecondaryToolbarComponent {}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"variables\" as *;\n\n.dot-secondary-toolbar__main,\n.dot-secondary-toolbar__lower:empty {\n display: none;\n}\n\n.dot-secondary-toolbar__main {\n background-color: $white;\n border-bottom: solid 1px $gray-lighter;\n display: flex;\n padding: $spacing-3;\n}\n\n.dot-secondary-toolbar__lower {\n display: flex;\n padding: 0 $spacing-3;\n flex-wrap: wrap;\n background-color: $white;\n border-bottom: solid 1px $gray-lighter;\n}\n\n::ng-deep {\n .main-toolbar-left,\n .lower-toolbar-left {\n display: flex;\n flex-grow: 1;\n }\n\n .main-toolbar-right,\n .lower-toolbar-right {\n align-items: center;\n display: flex;\n }\n\n .lower-toolbar-left,\n .lower-toolbar-right {\n height: $dot-secondary-toolbar-height;\n }\n\n @media only screen and (max-width: $screen-device-container-max) {\n .lower-toolbar-right {\n flex-flow: row-reverse;\n }\n }\n\n .toolbar__sep {\n border-left: solid 1px $gray-bg;\n margin: 0 $spacing-3 0 $spacing-2;\n display: block;\n height: 40px;\n }\n}\n", + "styleUrl": "./dot-secondary-toolbar.component.scss" + } + ], + "stylesData": "", + "templateData": "
    \n \n \n
    \n\n
    \n \n \n
    \n" + }, + { + "name": "DotSelectButton", + "id": "component-DotSelectButton-c424feb4c83b90b6dcc1ce78c084cbf2906e6070be11ac83b0acf6b4d6805d6f0b1eb3e35ec27a3f73b21aca31ff7dda4df19d0fff430185c3d7c11120c035c8", + "file": "libs/dotcms-webcomponents/src/components/dot-select-button/dot-select-button.tsx", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "styleUrls": [], + "styles": [], + "templateUrl": [], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "options", + "defaultValue": "[]", + "deprecated": false, + "deprecationMessage": "", + "type": "DotSelectButtonOption[]", + "optional": false, + "description": "", + "line": 15, + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "selected", + "deprecated": false, + "deprecationMessage": "", + "type": "EventEmitter", + "optional": false, + "description": "", + "line": 17, + "decorators": [ + { + "name": "Event", + "stringifiedArguments": "" + } + ] + }, + { + "name": "value", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 12, + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + } + ], + "methodsClass": [ + { + "name": "render", + "args": [], + "optional": false, + "returnType": "any", + "typeParameters": [], + "line": 19, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "setSelected", + "args": [ + { + "name": "option", + "type": "DotSelectButtonOption", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 43, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "option", + "type": "DotSelectButtonOption", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, Prop, h, Host, Event, EventEmitter } from '@stencil/core';\nimport { DotSelectButtonOption } from '../../models/dotSelectButtonOption';\nimport '@material/mwc-icon-button';\n\n@Component({\n tag: 'dot-select-button',\n styleUrl: 'dot-select-button.scss',\n shadow: true\n})\nexport class DotSelectButton {\n @Prop({ reflect: true })\n value = '';\n\n @Prop({ reflect: true })\n options: DotSelectButtonOption[] = [];\n\n @Event() selected: EventEmitter;\n\n render() {\n return (\n \n {this.options.map((option: DotSelectButtonOption) => {\n const active =\n option.label.toLocaleLowerCase() === this.value.toLocaleLowerCase();\n return (\n {\n this.setSelected(option);\n }}\n />\n );\n })}\n \n );\n }\n\n private setSelected(option: DotSelectButtonOption) {\n this.value = option.label;\n this.selected.emit(option.label.toLocaleLowerCase());\n }\n}\n", + "tag": "dot-select-button", + "styleUrl": "dot-select-button.scss", + "shadow": true, + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "" + }, + { + "name": "DotSelectComponent", + "id": "component-DotSelectComponent-9faea6f774829cf0cdf2402253cacdbeb5fc6383bafe2d9a416d972728fc3886a2570009059bd8191a4ebda59b628d2f89dda24a95ba40fe837cb54bc6cf1743", + "file": "libs/dotcms-field-elements/src/components/dot-select/dot-select.tsx", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "styleUrls": [], + "styles": [], + "templateUrl": [], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "_dotPristine", + "defaultValue": "true", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 72 + }, + { + "name": "_dotTouched", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 71 + }, + { + "name": "_options", + "deprecated": false, + "deprecationMessage": "", + "type": "DotOption[]", + "optional": false, + "description": "", + "line": 65, + "decorators": [ + { + "name": "State", + "stringifiedArguments": "" + } + ] + }, + { + "name": "disabled", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "

    (optional) Disables field's interaction

    \n", + "line": 42, + "rawdescription": "\n(optional) Disables field's interaction", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "el", + "deprecated": false, + "deprecationMessage": "", + "type": "HTMLElement", + "optional": false, + "description": "", + "line": 39, + "decorators": [ + { + "name": "Element", + "stringifiedArguments": "" + } + ] + }, + { + "name": "hint", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    (optional) Hint text that suggest a clue of the field

    \n", + "line": 51, + "rawdescription": "\n(optional) Hint text that suggest a clue of the field", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "label", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    (optional) Text to be rendered next to input field

    \n", + "line": 48, + "rawdescription": "\n(optional) Text to be rendered next to input field", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "name", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    Name that will be used as ID

    \n", + "line": 45, + "rawdescription": "\nName that will be used as ID", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "options", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    Value/Label dropdown options separated by comma, to be formatted as: Value|Label

    \n", + "line": 54, + "rawdescription": "\nValue/Label dropdown options separated by comma, to be formatted as: Value|Label", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "required", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "

    (optional) Determine if it is mandatory

    \n", + "line": 57, + "rawdescription": "\n(optional) Determine if it is mandatory", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "requiredMessage", + "defaultValue": "`This field is required`", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "

    (optional) Text that will be shown when required is set and condition is not met

    \n", + "line": 60, + "rawdescription": "\n(optional) Text that will be shown when required is set and condition is not met", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "status", + "deprecated": false, + "deprecationMessage": "", + "type": "DotFieldStatus", + "optional": false, + "description": "", + "line": 66, + "decorators": [ + { + "name": "State", + "stringifiedArguments": "" + } + ] + }, + { + "name": "statusChange", + "deprecated": false, + "deprecationMessage": "", + "type": "EventEmitter", + "optional": false, + "description": "", + "line": 69, + "decorators": [ + { + "name": "Event", + "stringifiedArguments": "" + } + ] + }, + { + "name": "value", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    Value set from the dropdown option

    \n", + "line": 63, + "rawdescription": "\nValue set from the dropdown option", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{mutable: true, reflect: true}" + } + ] + }, + { + "name": "valueChange", + "deprecated": false, + "deprecationMessage": "", + "type": "EventEmitter", + "optional": false, + "description": "", + "line": 68, + "decorators": [ + { + "name": "Event", + "stringifiedArguments": "" + } + ] + } + ], + "methodsClass": [ + { + "name": "componentDidLoad", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 101, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "componentWillLoad", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 74, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "emitInitialValue", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 160, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "emitStatusChange", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 167, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "emitValueChange", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 178, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "isValid", + "args": [], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 174, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "optionsWatch", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 82, + "deprecated": false, + "deprecationMessage": "", + "decorators": [ + { + "name": "Watch", + "stringifiedArguments": "'options'" + } + ] + }, + { + "name": "render", + "args": [], + "optional": false, + "returnType": "any", + "typeParameters": [], + "line": 109, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "reset", + "args": [], + "optional": false, + "returnType": "Promise", + "typeParameters": [], + "line": 94, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nReset properties of the field, clear value and emit events.\n\n\n", + "description": "

    Reset properties of the field, clear value and emit events.

    \n", + "decorators": [ + { + "name": "Method", + "stringifiedArguments": "" + } + ], + "modifierKind": [131], + "jsdoctags": [] + }, + { + "name": "setValue", + "args": [ + { + "name": "event", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 149, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "event", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "shouldBeDisabled", + "args": [], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 144, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "validateProps", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 140, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "

    Represent a dotcms select control.

    \n", + "rawdescription": "\n\nRepresent a dotcms select control.\n\n", + "type": "component", + "sourceCode": "import {\n Component,\n Prop,\n State,\n Element,\n Method,\n Event,\n EventEmitter,\n Watch,\n Host,\n h\n} from '@stencil/core';\nimport { DotOption, DotFieldStatus, DotFieldValueEvent, DotFieldStatusEvent } from '../../models';\nimport {\n checkProp,\n getClassNames,\n getDotOptionsFromFieldValue,\n getErrorClass,\n getId,\n getOriginalStatus,\n getTagError,\n getTagHint,\n updateStatus,\n getHintId\n} from '../../utils';\nimport { getDotAttributesFromElement, setDotAttributesToElement } from '../dot-form/utils';\n\n/**\n * Represent a dotcms select control.\n *\n * @export\n * @class DotSelectComponent\n */\n@Component({\n tag: 'dot-select',\n styleUrl: 'dot-select.scss'\n})\nexport class DotSelectComponent {\n @Element() el: HTMLElement;\n\n /** (optional) Disables field's interaction */\n @Prop({ reflect: true }) disabled = false;\n\n /** Name that will be used as ID */\n @Prop({ reflect: true }) name = '';\n\n /** (optional) Text to be rendered next to input field */\n @Prop({ reflect: true }) label = '';\n\n /** (optional) Hint text that suggest a clue of the field */\n @Prop({ reflect: true }) hint = '';\n\n /** Value/Label dropdown options separated by comma, to be formatted as: Value|Label */\n @Prop({ reflect: true }) options = '';\n\n /** (optional) Determine if it is mandatory */\n @Prop({ reflect: true }) required = false;\n\n /** (optional) Text that will be shown when required is set and condition is not met */\n @Prop({ reflect: true }) requiredMessage = `This field is required`;\n\n /** Value set from the dropdown option */\n @Prop({ mutable: true, reflect: true }) value = '';\n\n @State() _options: DotOption[];\n @State() status: DotFieldStatus;\n\n @Event() valueChange: EventEmitter;\n @Event() statusChange: EventEmitter;\n\n _dotTouched = false;\n _dotPristine = true;\n\n componentWillLoad() {\n this.validateProps();\n this.emitInitialValue();\n this.status = getOriginalStatus(this.isValid());\n this.emitStatusChange();\n }\n\n @Watch('options')\n optionsWatch(): void {\n const validOptions = checkProp(this, 'options');\n this._options = getDotOptionsFromFieldValue(validOptions);\n }\n\n /**\n * Reset properties of the field, clear value and emit events.\n *\n * @memberof DotSelectComponent\n *\n */\n @Method()\n async reset(): Promise {\n this.value = '';\n this.status = getOriginalStatus(this.isValid());\n this.emitInitialValue();\n this.emitStatusChange();\n }\n\n componentDidLoad(): void {\n const htmlElement = this.el.querySelector('select');\n setTimeout(() => {\n const attrs = getDotAttributesFromElement(Array.from(this.el.attributes), []);\n setDotAttributesToElement(htmlElement, attrs);\n }, 0);\n }\n\n render() {\n const classes = getClassNames(this.status, this.isValid(), this.required);\n\n return (\n \n \n this.setValue(event)}\n >\n {this._options.map((item: DotOption) => {\n return (\n \n {item.label}\n \n );\n })}\n \n \n {getTagHint(this.hint)}\n {getTagError(!this.isValid(), this.requiredMessage)}\n \n );\n }\n\n private validateProps(): void {\n this.optionsWatch();\n }\n\n private shouldBeDisabled(): boolean {\n return this.disabled ? true : null;\n }\n\n // Todo: find how to set proper TYPE in TS\n private setValue(event): void {\n this.value = event.target.value;\n this.status = updateStatus(this.status, {\n dotTouched: true,\n dotPristine: false,\n dotValid: this.isValid()\n });\n this.emitValueChange();\n this.emitStatusChange();\n }\n\n private emitInitialValue() {\n if (!this.value) {\n this.value = this._options.length ? this._options[0].value : '';\n this.emitValueChange();\n }\n }\n\n private emitStatusChange(): void {\n this.statusChange.emit({\n name: this.name,\n status: this.status\n });\n }\n\n private isValid(): boolean {\n return this.required ? !!this.value : true;\n }\n\n private emitValueChange(): void {\n this.valueChange.emit({\n name: this.name,\n value: this.value\n });\n }\n}\n", + "tag": "dot-select", + "styleUrl": "dot-select.scss", + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "" + }, + { + "name": "DotSelectComponent", + "id": "component-DotSelectComponent-e45cbf14066d9292a601f000ad4712446c619ff10e0fb9adc569d2b52b5724bbf8fad269c48a3bc8e35ac04f4d57cd4cb9b9a7e088491c270b84a701befb2c6e-1", + "file": "libs/dotcms-webcomponents/src/components/contenttypes-fields/dot-select/dot-select.tsx", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "styleUrls": [], + "styles": [], + "templateUrl": [], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "_dotPristine", + "defaultValue": "true", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 90 + }, + { + "name": "_dotTouched", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 89 + }, + { + "name": "_options", + "deprecated": false, + "deprecationMessage": "", + "type": "DotOption[]", + "optional": false, + "description": "", + "line": 80, + "decorators": [ + { + "name": "State", + "stringifiedArguments": "" + } + ] + }, + { + "name": "disabled", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "

    (optional) Disables field's interaction

    \n", + "line": 77, + "rawdescription": "\n(optional) Disables field's interaction", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "dotStatusChange", + "deprecated": false, + "deprecationMessage": "", + "type": "EventEmitter", + "optional": false, + "description": "", + "line": 87, + "decorators": [ + { + "name": "Event", + "stringifiedArguments": "" + } + ] + }, + { + "name": "dotValueChange", + "deprecated": false, + "deprecationMessage": "", + "type": "EventEmitter", + "optional": false, + "description": "", + "line": 85, + "decorators": [ + { + "name": "Event", + "stringifiedArguments": "" + } + ] + }, + { + "name": "el", + "deprecated": false, + "deprecationMessage": "", + "type": "HTMLElement", + "optional": false, + "description": "", + "line": 45, + "decorators": [ + { + "name": "Element", + "stringifiedArguments": "" + } + ] + }, + { + "name": "hint", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    (optional) Hint text that suggest a clue of the field

    \n", + "line": 61, + "rawdescription": "\n(optional) Hint text that suggest a clue of the field", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "label", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    (optional) Text to be rendered next to input field

    \n", + "line": 57, + "rawdescription": "\n(optional) Text to be rendered next to input field", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "name", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    Name that will be used as ID

    \n", + "line": 53, + "rawdescription": "\nName that will be used as ID", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "options", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    Value/Label dropdown options separated by comma, to be formatted as: Value|Label

    \n", + "line": 65, + "rawdescription": "\nValue/Label dropdown options separated by comma, to be formatted as: Value|Label", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "required", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "

    (optional) Determine if it is mandatory

    \n", + "line": 69, + "rawdescription": "\n(optional) Determine if it is mandatory", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "requiredMessage", + "defaultValue": "`This field is required`", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "

    (optional) Text that will be shown when required is set and condition is not met

    \n", + "line": 73, + "rawdescription": "\n(optional) Text that will be shown when required is set and condition is not met", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "status", + "deprecated": false, + "deprecationMessage": "", + "type": "DotFieldStatus", + "optional": false, + "description": "", + "line": 82, + "decorators": [ + { + "name": "State", + "stringifiedArguments": "" + } + ] + }, + { + "name": "value", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    Value set from the dropdown option

    \n", + "line": 49, + "rawdescription": "\nValue set from the dropdown option", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{mutable: true, reflect: true}" + } + ] + } + ], + "methodsClass": [ + { + "name": "componentDidLoad", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 119, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "componentWillLoad", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 92, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "emitInitialValue", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 178, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "emitStatusChange", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 185, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "emitValueChange", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 196, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "isValid", + "args": [], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 192, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "optionsWatch", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 100, + "deprecated": false, + "deprecationMessage": "", + "decorators": [ + { + "name": "Watch", + "stringifiedArguments": "'options'" + } + ] + }, + { + "name": "render", + "args": [], + "optional": false, + "returnType": "any", + "typeParameters": [], + "line": 127, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "reset", + "args": [], + "optional": false, + "returnType": "Promise", + "typeParameters": [], + "line": 112, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nReset properties of the field, clear value and emit events.\n\n\n", + "description": "

    Reset properties of the field, clear value and emit events.

    \n", + "decorators": [ + { + "name": "Method", + "stringifiedArguments": "" + } + ], + "modifierKind": [131], + "jsdoctags": [] + }, + { + "name": "setValue", + "args": [ + { + "name": "event", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 167, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "event", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "shouldBeDisabled", + "args": [], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 162, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "validateProps", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 158, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "

    Represent a dotcms select control.

    \n", + "rawdescription": "\n\nRepresent a dotcms select control.\n\n", + "type": "component", + "sourceCode": "import {\n Component,\n Prop,\n State,\n Element,\n Method,\n Event,\n EventEmitter,\n Watch,\n h,\n Host\n} from '@stencil/core';\nimport {\n DotOption,\n DotFieldStatus,\n DotFieldValueEvent,\n DotFieldStatusEvent\n} from '../../../models';\nimport {\n checkProp,\n getClassNames,\n getDotOptionsFromFieldValue,\n getErrorClass,\n getId,\n getOriginalStatus,\n getTagError,\n getTagHint,\n updateStatus,\n getHintId\n} from '../../../utils';\nimport { getDotAttributesFromElement, setDotAttributesToElement } from '../dot-form/utils';\n\n/**\n * Represent a dotcms select control.\n *\n * @export\n * @class DotSelectComponent\n */\n@Component({\n tag: 'dot-select',\n styleUrl: 'dot-select.scss'\n})\nexport class DotSelectComponent {\n @Element()\n el: HTMLElement;\n\n /** Value set from the dropdown option */\n @Prop({ mutable: true, reflect: true })\n value = '';\n\n /** Name that will be used as ID */\n @Prop({ reflect: true })\n name = '';\n\n /** (optional) Text to be rendered next to input field */\n @Prop({ reflect: true })\n label = '';\n\n /** (optional) Hint text that suggest a clue of the field */\n @Prop({ reflect: true })\n hint = '';\n\n /** Value/Label dropdown options separated by comma, to be formatted as: Value|Label */\n @Prop({ reflect: true })\n options = '';\n\n /** (optional) Determine if it is mandatory */\n @Prop({ reflect: true })\n required = false;\n\n /** (optional) Text that will be shown when required is set and condition is not met */\n @Prop({ reflect: true })\n requiredMessage = `This field is required`;\n\n /** (optional) Disables field's interaction */\n @Prop({ reflect: true })\n disabled = false;\n\n @State()\n _options: DotOption[];\n @State()\n status: DotFieldStatus;\n\n @Event()\n dotValueChange: EventEmitter;\n @Event()\n dotStatusChange: EventEmitter;\n\n _dotTouched = false;\n _dotPristine = true;\n\n componentWillLoad() {\n this.validateProps();\n this.emitInitialValue();\n this.status = getOriginalStatus(this.isValid());\n this.emitStatusChange();\n }\n\n @Watch('options')\n optionsWatch(): void {\n const validOptions = checkProp(this, 'options');\n this._options = getDotOptionsFromFieldValue(validOptions);\n }\n\n /**\n * Reset properties of the field, clear value and emit events.\n *\n * @memberof DotSelectComponent\n *\n */\n @Method()\n async reset(): Promise {\n this.value = '';\n this.status = getOriginalStatus(this.isValid());\n this.emitInitialValue();\n this.emitStatusChange();\n }\n\n componentDidLoad(): void {\n const htmlElement = this.el.querySelector('select');\n setTimeout(() => {\n const attrs = getDotAttributesFromElement(Array.from(this.el.attributes), []);\n setDotAttributesToElement(htmlElement, attrs);\n }, 0);\n }\n\n render() {\n const classes = getClassNames(this.status, this.isValid(), this.required);\n\n return (\n \n \n this.setValue(event)}\n >\n {this._options.map((item: DotOption) => {\n return (\n \n {item.label}\n \n );\n })}\n \n \n {getTagHint(this.hint)}\n {getTagError(!this.isValid(), this.requiredMessage)}\n \n );\n }\n\n private validateProps(): void {\n this.optionsWatch();\n }\n\n private shouldBeDisabled(): boolean {\n return this.disabled ? true : null;\n }\n\n // Todo: find how to set proper TYPE in TS\n private setValue(event): void {\n this.value = event.target.value;\n this.status = updateStatus(this.status, {\n dotTouched: true,\n dotPristine: false,\n dotValid: this.isValid()\n });\n this.emitValueChange();\n this.emitStatusChange();\n }\n\n private emitInitialValue() {\n if (!this.value) {\n this.value = this._options.length ? this._options[0].value : '';\n this.emitValueChange();\n }\n }\n\n private emitStatusChange(): void {\n this.dotStatusChange.emit({\n name: this.name,\n status: this.status\n });\n }\n\n private isValid(): boolean {\n return this.required ? !!this.value : true;\n }\n\n private emitValueChange(): void {\n this.dotValueChange.emit({\n name: this.name,\n value: this.value\n });\n }\n}\n", + "tag": "dot-select", + "styleUrl": "dot-select.scss", + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "", + "isDuplicate": true, + "duplicateId": 1, + "duplicateName": "DotSelectComponent-1" + }, + { + "name": "DotSidebarPropertiesComponent", + "id": "component-DotSidebarPropertiesComponent-a526948410842ed38ff14e647b969304afaf0adab4c108c5e7a66e0e3d145c62922b4a8de596c5b8a2d28d67c2f6a63e2d1ecb63aca982475aba6da13402ff40", + "file": "apps/dotcms-ui/src/app/view/components/dot-edit-layout-designer/components/dot-sidebar-properties/dot-sidebar-properties.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [ + { + "name": "{\n multi: true, provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DotSidebarPropertiesComponent)\n}", + "type": "component" + } + ], + "selector": "dot-sidebar-properties", + "styleUrls": ["./dot-sidebar-properties.component.scss"], + "styles": [], + "templateUrl": ["./dot-sidebar-properties.component.html"], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [ + { + "name": "change", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 22, + "type": "EventEmitter" + } + ], + "propertiesClass": [ + { + "name": "overlay", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": false, + "description": "", + "line": 21, + "decorators": [ + { + "name": "ViewChild", + "stringifiedArguments": "'overlay', {static: true}" + } + ] + }, + { + "name": "propagateChange", + "defaultValue": "() => {...}", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 26 + }, + { + "name": "value", + "deprecated": false, + "deprecationMessage": "", + "type": "DotLayoutSideBar", + "optional": false, + "description": "", + "line": 20 + } + ], + "methodsClass": [ + { + "name": "changeSidebarSize", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 41, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nHides overlay panel and emits a notification to repainted the Grid\n\n", + "description": "

    Hides overlay panel and emits a notification to repainted the Grid

    \n", + "jsdoctags": [] + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 28, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "registerOnChange", + "args": [ + { + "name": "fn", + "type": "any", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 63, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nSet the function to be called when the control receives a change event\n", + "description": "

    Set the function to be called when the control receives a change event

    \n", + "jsdoctags": [ + { + "name": "fn", + "type": "any", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "registerOnTouched", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 67, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "writeValue", + "args": [ + { + "name": "value", + "type": "DotLayoutSideBar", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 52, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nWrite a new value to the property item\n", + "description": "

    Write a new value to the property item

    \n", + "jsdoctags": [ + { + "name": "value", + "type": "DotLayoutSideBar", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, OnInit, ViewChild, forwardRef, Output, EventEmitter } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nimport { DotEventsService } from '@services/dot-events/dot-events.service';\nimport { DotLayoutSideBar } from '@models/dot-edit-layout-designer';\n\n@Component({\n selector: 'dot-sidebar-properties',\n templateUrl: './dot-sidebar-properties.component.html',\n styleUrls: ['./dot-sidebar-properties.component.scss'],\n providers: [\n {\n multi: true,\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DotSidebarPropertiesComponent)\n }\n ]\n})\nexport class DotSidebarPropertiesComponent implements OnInit, ControlValueAccessor {\n value: DotLayoutSideBar;\n @ViewChild('overlay', { static: true }) overlay: any;\n @Output() change: EventEmitter = new EventEmitter();\n\n constructor(private dotEventsService: DotEventsService) {}\n\n propagateChange = (_: any) => {};\n\n ngOnInit() {\n this.value = {\n containers: [],\n location: '',\n width: ''\n };\n }\n\n /**\n * Hides overlay panel and emits a notification to repainted the Grid\n *\n * @memberof DotSidebarPropertiesComponent\n */\n changeSidebarSize(): void {\n this.overlay.hide();\n this.dotEventsService.notify('layout-sidebar-change');\n this.change.emit();\n }\n\n /**\n * Write a new value to the property item\n * @param DotLayoutSideBar value\n * @memberof DotSidebarPropertiesComponent\n */\n writeValue(value: DotLayoutSideBar): void {\n if (value) {\n this.value = value;\n }\n }\n\n /**\n * Set the function to be called when the control receives a change event\n * @param any fn\n * @memberof DotSidebarPropertiesComponent\n */\n registerOnChange(fn: any): void {\n this.propagateChange = fn;\n }\n\n registerOnTouched(): void {}\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"variables\" as *;\n\n:host {\n right: $spacing-1;\n top: $spacing-1;\n}\n", + "styleUrl": "./dot-sidebar-properties.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "dotEventsService", + "type": "DotEventsService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 22, + "jsdoctags": [ + { + "name": "dotEventsService", + "type": "DotEventsService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": ["OnInit", "ControlValueAccessor"], + "templateData": "\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n\n\n" + }, + { + "name": "DotSiteBrowserComponent", + "id": "component-DotSiteBrowserComponent-2c2f50ce19bf87fd30abfe1fa06318b6acd4181fcc56653e8c0eb265d3aa03cdabc6c4c85ca0a19ee409e540e047e2c3b7c32a766fb9a55f7e0325bfefab3d7a", + "file": "apps/dotcms-ui/src/app/portlets/dot-site-browser/dot-site-browser.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-site-browser", + "styleUrls": ["./dot-site-browser.component.scss"], + "styles": [], + "templateUrl": ["./dot-site-browser.component.html"], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "files", + "deprecated": false, + "deprecationMessage": "", + "type": "DotUploadFile[]", + "optional": false, + "description": "", + "line": 10 + } + ], + "methodsClass": [ + { + "name": "getFiles", + "args": [ + { + "name": "$event", + "type": "DotUploadFile[]", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 16, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "$event", + "type": "DotUploadFile[]", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 14, + "deprecated": false, + "deprecationMessage": "" + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, OnInit } from '@angular/core';\nimport { DotUploadFile } from './models/dot-upload-file.model';\n\n@Component({\n selector: 'dot-site-browser',\n templateUrl: './dot-site-browser.component.html',\n styleUrls: ['./dot-site-browser.component.scss']\n})\nexport class DotSiteBrowserComponent implements OnInit {\n files: DotUploadFile[];\n\n constructor() {}\n\n ngOnInit() {}\n\n getFiles($event: DotUploadFile[]) {\n this.files = $event;\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": ".drop-zone {\n width: 400px;\n height: 400px;\n border: dotted 2px;\n\n &.over {\n background-color: yellow;\n }\n}\n", + "styleUrl": "./dot-site-browser.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [], + "line": 10 + }, + "implements": ["OnInit"], + "templateData": "
    \n
      \n
    • \n {{ file.relativePath }}\n
    • \n
    \n
    \n" + }, + { + "name": "DotSiteSelectorComponent", + "id": "component-DotSiteSelectorComponent-6b55bfa7cec973a78cf5f638429cfcf29e7bc029b4dcd7e1bd1c154aec7252ee6dfb327bc40e78d278eca118fb6e75fa9027cace70ad8fbfd2aa4b128b45c593", + "file": "apps/dotcms-ui/src/app/view/components/_common/dot-site-selector/dot-site-selector.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [ + { + "name": "PaginatorService" + } + ], + "selector": "dot-site-selector", + "styleUrls": ["./dot-site-selector.component.scss"], + "styles": [], + "templateUrl": ["dot-site-selector.component.html"], + "viewProviders": [], + "inputsClass": [ + { + "name": "archive", + "deprecated": false, + "deprecationMessage": "", + "line": 35, + "type": "boolean", + "decorators": [] + }, + { + "name": "asField", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "line": 42, + "type": "boolean", + "decorators": [] + }, + { + "name": "cssClass", + "deprecated": false, + "deprecationMessage": "", + "line": 39, + "type": "string", + "decorators": [] + }, + { + "name": "id", + "deprecated": false, + "deprecationMessage": "", + "line": 36, + "type": "string", + "decorators": [] + }, + { + "name": "live", + "deprecated": false, + "deprecationMessage": "", + "line": 37, + "type": "boolean", + "decorators": [] + }, + { + "name": "pageSize", + "defaultValue": "10", + "deprecated": false, + "deprecationMessage": "", + "line": 41, + "type": "number", + "decorators": [] + }, + { + "name": "system", + "deprecated": false, + "deprecationMessage": "", + "line": 38, + "type": "boolean", + "decorators": [] + }, + { + "name": "width", + "deprecated": false, + "deprecationMessage": "", + "line": 40, + "type": "string", + "decorators": [] + } + ], + "outputsClass": [ + { + "name": "change", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 44, + "type": "EventEmitter" + }, + { + "name": "hide", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 45, + "type": "EventEmitter" + }, + { + "name": "show", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 46, + "type": "EventEmitter" + } + ], + "propertiesClass": [ + { + "name": "currentSite", + "deprecated": false, + "deprecationMessage": "", + "type": "Site", + "optional": false, + "description": "", + "line": 50 + }, + { + "name": "destroy$", + "defaultValue": "new Subject()", + "deprecated": false, + "deprecationMessage": "", + "type": "Subject", + "optional": false, + "description": "", + "line": 55, + "modifierKind": [121] + }, + { + "name": "moreThanOneSite", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 53 + }, + { + "name": "paginationService", + "deprecated": false, + "deprecationMessage": "", + "type": "PaginatorService", + "optional": false, + "description": "", + "line": 59, + "modifierKind": [123] + }, + { + "name": "searchableDropdown", + "deprecated": false, + "deprecationMessage": "", + "type": "SearchableDropdownComponent", + "optional": false, + "description": "", + "line": 48, + "decorators": [ + { + "name": "ViewChild", + "stringifiedArguments": "'searchableDropdown'" + } + ] + }, + { + "name": "sitesCurrentPage", + "deprecated": false, + "deprecationMessage": "", + "type": "Site[]", + "optional": false, + "description": "", + "line": 52 + } + ], + "methodsClass": [ + { + "name": "getSiteByIdFromCurrentPage", + "args": [ + { + "name": "siteId", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Site", + "typeParameters": [], + "line": 179, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "siteId", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getSitesList", + "args": [ + { + "name": "filter", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "''" + }, + { + "name": "offset", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "0" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 150, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nCall to load a new page.\n", + "description": "

    Call to load a new page.

    \n", + "jsdoctags": [ + { + "name": "filter", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "''", + "tagName": { + "text": "param" + } + }, + { + "name": "offset", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "0", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "handleFilterChange", + "args": [ + { + "name": "filter", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 131, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nCall when the global serach changed\n", + "description": "

    Call when the global serach changed

    \n", + "jsdoctags": [ + { + "name": "filter", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "handlePageChange", + "args": [ + { + "name": "event", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 140, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nCall when the current page changed\n", + "description": "

    Call when the current page changed

    \n", + "jsdoctags": [ + { + "name": "event", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "handleSitesRefresh", + "args": [ + { + "name": "site", + "type": "Site", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 105, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nManage the sites refresh when a event happen\n", + "description": "

    Manage the sites refresh when a event happen

    \n", + "jsdoctags": [ + { + "name": "site", + "type": "Site", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "ngOnChanges", + "args": [ + { + "name": "changes", + "type": "SimpleChanges", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 90, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "changes", + "type": "SimpleChanges", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "ngOnDestroy", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 96, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 63, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "selectCurrentSite", + "args": [ + { + "name": "siteId", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 186, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "siteId", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "siteChange", + "args": [ + { + "name": "site", + "type": "Site", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 166, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nCall when the selected site changed and the change event is emmited\n", + "description": "

    Call when the selected site changed and the change event is emmited

    \n", + "jsdoctags": [ + { + "name": "site", + "type": "Site", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "updateCurrentSite", + "args": [ + { + "name": "site", + "type": "Site", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 175, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nUpdates the current site\n\n", + "description": "

    Updates the current site

    \n", + "jsdoctags": [ + { + "name": { + "pos": 5328, + "end": 5332, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "site" + }, + "type": "Site", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 5315, + "end": 5320, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 5321, + "end": 5327, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 5322, + "end": 5326, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 177, + "typeName": { + "pos": 5322, + "end": 5326, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "Site" + } + } + } + } + ] + }, + { + "name": "updateValues", + "args": [ + { + "name": "items", + "type": "Site[]", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 201, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "items", + "type": "Site[]", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "

    It is dropdown of sites, it handle pagination and global search

    \n", + "rawdescription": "\n\nIt is dropdown of sites, it handle pagination and global search\n\n", + "type": "component", + "sourceCode": "import { Observable, Subject } from 'rxjs';\nimport {\n Component,\n EventEmitter,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n SimpleChanges,\n ViewChild\n} from '@angular/core';\nimport { Site, SiteService } from '@dotcms/dotcms-js';\nimport { PaginatorService } from '@services/paginator';\nimport { SearchableDropdownComponent } from '../searchable-dropdown/component';\nimport { DotEventsService } from '@services/dot-events/dot-events.service';\nimport { delay, retryWhen, take, takeUntil, tap } from 'rxjs/operators';\n\n/**\n * It is dropdown of sites, it handle pagination and global search\n *\n * @export\n * @class DotSiteSelectorComponent\n * @implements {OnInit}\n * @implements {OnChanges}\n * @implements {OnDestroy}\n */\n@Component({\n providers: [PaginatorService],\n selector: 'dot-site-selector',\n styleUrls: ['./dot-site-selector.component.scss'],\n templateUrl: 'dot-site-selector.component.html'\n})\nexport class DotSiteSelectorComponent implements OnInit, OnChanges, OnDestroy {\n @Input() archive: boolean;\n @Input() id: string;\n @Input() live: boolean;\n @Input() system: boolean;\n @Input() cssClass: string;\n @Input() width: string;\n @Input() pageSize = 10;\n @Input() asField = false;\n\n @Output() change: EventEmitter = new EventEmitter();\n @Output() hide: EventEmitter = new EventEmitter();\n @Output() show: EventEmitter = new EventEmitter();\n\n @ViewChild('searchableDropdown') searchableDropdown: SearchableDropdownComponent;\n\n currentSite: Site;\n\n sitesCurrentPage: Site[];\n moreThanOneSite = false;\n\n private destroy$: Subject = new Subject();\n\n constructor(\n private siteService: SiteService,\n public paginationService: PaginatorService,\n private dotEventsService: DotEventsService\n ) {}\n\n ngOnInit(): void {\n this.paginationService.url = 'v1/site';\n this.paginationService.setExtraParams('archive', this.archive);\n this.paginationService.setExtraParams('live', this.live);\n this.paginationService.setExtraParams('system', this.system);\n this.paginationService.paginationPerPage = this.pageSize;\n\n this.siteService.refreshSites$\n .pipe(takeUntil(this.destroy$))\n .subscribe((_site: Site) => this.handleSitesRefresh(_site));\n this.getSitesList();\n ['login-as', 'logout-as'].forEach((event: string) => {\n this.dotEventsService\n .listen(event)\n .pipe(takeUntil(this.destroy$))\n .subscribe(() => {\n this.getSitesList();\n });\n });\n\n this.siteService.switchSite$.pipe(takeUntil(this.destroy$)).subscribe(() => {\n setTimeout(() => {\n this.updateCurrentSite(this.siteService.currentSite);\n }, 200);\n });\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.id && changes.id.currentValue) {\n this.selectCurrentSite(changes.id.currentValue);\n }\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.complete();\n }\n\n /**\n * Manage the sites refresh when a event happen\n * @memberof SiteSelectorComponent\n */\n handleSitesRefresh(site: Site): void {\n this.paginationService\n .getCurrentPage()\n .pipe(\n take(1),\n tap((items: Site[]) => {\n const siteIndex = items.findIndex(\n (item: Site) => site.identifier === item.identifier\n );\n const shouldRetry = site.archived ? siteIndex >= 0 : siteIndex === -1;\n if (shouldRetry) {\n throw new Error('Indexing... site still present');\n }\n }),\n retryWhen((error) => error.pipe(delay(1000), take(10)))\n )\n .subscribe((items: Site[]) => {\n this.updateValues(items);\n });\n }\n\n /**\n * Call when the global serach changed\n * @param any filter\n * @memberof SiteSelectorComponent\n */\n handleFilterChange(filter): void {\n this.getSitesList(filter);\n }\n\n /**\n * Call when the current page changed\n * @param any event\n * @memberof SiteSelectorComponent\n */\n handlePageChange(event): void {\n this.getSitesList(event.filter, event.first);\n }\n\n /**\n * Call to load a new page.\n * @param string [filter='']\n * @param number [page=1]\n * @memberof SiteSelectorComponent\n */\n getSitesList(filter = '', offset = 0): void {\n this.paginationService.filter = `*${filter}`;\n this.paginationService\n .getWithOffset(offset)\n .pipe(take(1))\n .subscribe((items: Site[]) => {\n this.sitesCurrentPage = [...items];\n this.moreThanOneSite = this.moreThanOneSite || items.length > 1;\n });\n }\n\n /**\n * Call when the selected site changed and the change event is emmited\n * @param Site site\n * @memberof SiteSelectorComponent\n */\n siteChange(site: Site): void {\n this.change.emit(site);\n }\n /**\n * Updates the current site\n *\n * @param {Site} site\n * @memberof DotSiteSelectorComponent\n */\n updateCurrentSite(site: Site): void {\n this.currentSite = site;\n }\n\n private getSiteByIdFromCurrentPage(siteId: string): Site {\n return (\n this.sitesCurrentPage &&\n this.sitesCurrentPage.filter((site) => site.identifier === siteId)[0]\n );\n }\n\n private selectCurrentSite(siteId: string): void {\n const selectedInCurrentPage = this.getSiteByIdFromCurrentPage(siteId);\n\n if (selectedInCurrentPage) {\n this.updateCurrentSite(selectedInCurrentPage);\n } else {\n this.siteService\n .getSiteById(siteId)\n .pipe(take(1))\n .subscribe((site: Site) => {\n this.updateCurrentSite(site);\n });\n }\n }\n\n private updateValues(items: Site[]): void {\n this.sitesCurrentPage = [...items];\n this.moreThanOneSite = items.length > 1;\n this.updateCurrentSite(this.siteService.currentSite);\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"variables\" as *;\n@import \"mixins\";\n\n.site-selector__title {\n font-size: $font-size-large;\n}\n\n.site-selector__modal {\n @include box_shadow(2);\n background-color: $white;\n color: $black;\n display: block;\n left: 50%;\n padding: 40px 50px;\n position: fixed;\n top: 50%;\n transform: translate(-50%, -50%);\n}\n", + "styleUrl": "./dot-site-selector.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "siteService", + "type": "SiteService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "paginationService", + "type": "PaginatorService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotEventsService", + "type": "DotEventsService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 55, + "jsdoctags": [ + { + "name": "siteService", + "type": "SiteService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "paginationService", + "type": "PaginatorService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotEventsService", + "type": "DotEventsService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": ["OnInit", "OnChanges", "OnDestroy"], + "templateData": "\n\n\n\n \n {{ currentSite?.hostname }}\n \n\n" + }, + { + "name": "DotSiteSelectorFieldComponent", + "id": "component-DotSiteSelectorFieldComponent-4e054c6576f9f7c0060119431bf6e02bb35115c344012b9fc7b61cf34d548ebe1b86e602706ad8674576b07ad399390ef1d5f4e7ae6811d974c3d5275b4b6da3", + "file": "apps/dotcms-ui/src/app/view/components/_common/dot-site-selector-field/dot-site-selector-field.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [ + { + "name": "{\n multi: true, provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DotSiteSelectorFieldComponent)\n}", + "type": "component" + } + ], + "selector": "dot-site-selector-field", + "styleUrls": ["./dot-site-selector-field.component.scss"], + "styles": [], + "templateUrl": ["./dot-site-selector-field.component.html"], + "viewProviders": [], + "inputsClass": [ + { + "name": "archive", + "deprecated": false, + "deprecationMessage": "", + "line": 26, + "type": "boolean", + "decorators": [] + }, + { + "name": "live", + "deprecated": false, + "deprecationMessage": "", + "line": 28, + "type": "boolean", + "decorators": [] + }, + { + "name": "system", + "deprecated": false, + "deprecationMessage": "", + "line": 30, + "type": "boolean", + "decorators": [] + } + ], + "outputsClass": [], + "propertiesClass": [ + { + "name": "currentSiteSubscription", + "deprecated": false, + "deprecationMessage": "", + "type": "Subscription", + "optional": false, + "description": "", + "line": 34, + "modifierKind": [121] + }, + { + "name": "propagateChange", + "defaultValue": "() => {...}", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 38 + }, + { + "name": "value", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 32 + } + ], + "methodsClass": [ + { + "name": "isCurrentSiteSubscripted", + "args": [], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 102, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "isSelectingNewValue", + "args": [ + { + "name": "site", + "type": "Site", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 106, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "site", + "type": "Site", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "propagateCurrentSiteId", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 87, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "registerOnChange", + "args": [ + { + "name": "fn", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 45, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nSet the function to be called when the control receives a change event.\n", + "description": "

    Set the function to be called when the control receives a change event.

    \n", + "jsdoctags": [ + { + "name": "fn", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "registerOnTouched", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 50, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "setValue", + "args": [ + { + "name": "site", + "type": "Site", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 52, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "site", + "type": "Site", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "writeValue", + "args": [ + { + "name": "value", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 72, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nWrite a new value to the element\n", + "description": "

    Write a new value to the element

    \n", + "jsdoctags": [ + { + "name": "value", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "

    Form control to select DotCMS instance host identifier.

    \n", + "rawdescription": "\n\nForm control to select DotCMS instance host identifier.\n\n", + "type": "component", + "sourceCode": "import { Component, forwardRef, Input } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { Site, SiteService } from '@dotcms/dotcms-js';\nimport { Subscription } from 'rxjs';\n/**\n * Form control to select DotCMS instance host identifier.\n *\n * @export\n * @class DotSiteSelectorFieldComponent\n * @implements {ControlValueAccessor}\n */\n@Component({\n selector: 'dot-site-selector-field',\n templateUrl: './dot-site-selector-field.component.html',\n styleUrls: ['./dot-site-selector-field.component.scss'],\n providers: [\n {\n multi: true,\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DotSiteSelectorFieldComponent)\n }\n ]\n})\nexport class DotSiteSelectorFieldComponent implements ControlValueAccessor {\n @Input()\n archive: boolean;\n @Input()\n live: boolean;\n @Input()\n system: boolean;\n\n value: string;\n\n private currentSiteSubscription: Subscription;\n\n constructor(private siteService: SiteService) {}\n\n propagateChange = (_: any) => {};\n\n /**\n * Set the function to be called when the control receives a change event.\n * @param any fn\n * @memberof SearchableDropdownComponent\n */\n registerOnChange(fn): void {\n this.propagateChange = fn;\n this.propagateCurrentSiteId();\n }\n\n registerOnTouched(): void {}\n\n setValue(site: Site): void {\n /*\n TODO: we have an issue (ExpressionChangedAfterItHasBeenCheckedError) here with the\n form in content types when the current site is set for the first time, I'll debug\n and fix this later. --fmontes\n */\n setTimeout(() => {\n this.propagateChange(site.identifier);\n }, 0);\n\n if (this.isCurrentSiteSubscripted() && this.isSelectingNewValue(site)) {\n this.currentSiteSubscription.unsubscribe();\n }\n }\n\n /**\n * Write a new value to the element\n * @param * value\n * @memberof SearchableDropdownComponent\n */\n writeValue(value: string): void {\n if (value) {\n this.value = value;\n\n if (this.isCurrentSiteSubscripted()) {\n this.currentSiteSubscription.unsubscribe();\n }\n } else {\n this.currentSiteSubscription = this.siteService.switchSite$.subscribe((site: Site) => {\n this.value = site.identifier;\n this.propagateChange(site.identifier);\n });\n }\n }\n\n private propagateCurrentSiteId(): void {\n if (this.siteService.currentSite) {\n this.value = this.value || this.siteService.currentSite.identifier;\n this.propagateChange(this.value);\n } else {\n this.siteService.getCurrentSite().subscribe((currentSite: Site) => {\n if (!this.value) {\n this.value = currentSite.identifier;\n }\n\n this.propagateChange(this.value);\n });\n }\n }\n\n private isCurrentSiteSubscripted(): boolean {\n return this.currentSiteSubscription && !this.currentSiteSubscription.closed;\n }\n\n private isSelectingNewValue(site: Site): boolean {\n return site.identifier !== this.siteService.currentSite.identifier;\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "", + "styleUrl": "./dot-site-selector-field.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "siteService", + "type": "SiteService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 34, + "jsdoctags": [ + { + "name": "siteService", + "type": "SiteService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": ["ControlValueAccessor"], + "templateData": "\n" + }, + { + "name": "DotSpinnerComponent", + "id": "component-DotSpinnerComponent-33908a382e8b359b53915314a70a3da2133bf6ea6818a4cc27eb143a14444c41660fe04489fe65fb315ffb5bb2f7d7eb6455d52e7207355be8cbd2055851d7a8", + "file": "libs/ui/src/lib/dot-spinner/dot-spinner.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-spinner", + "styleUrls": ["./dot-spinner.component.scss"], + "styles": [], + "templateUrl": ["./dot-spinner.component.html"], + "viewProviders": [], + "inputsClass": [ + { + "name": "borderSize", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "line": 9, + "type": "string", + "decorators": [] + }, + { + "name": "size", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "line": 10, + "type": "string", + "decorators": [] + } + ], + "outputsClass": [], + "propertiesClass": [], + "methodsClass": [], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, Input } from '@angular/core';\n\n@Component({\n selector: 'dot-spinner',\n templateUrl: './dot-spinner.component.html',\n styleUrls: ['./dot-spinner.component.scss']\n})\nexport class DotSpinnerComponent {\n @Input() borderSize = '';\n @Input() size = '';\n\n constructor() {}\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"variables\" as *;\n\n$size: $field-height;\n$border-size: $size / 5;\n\ndiv {\n border-radius: 50%;\n width: $size;\n height: $size;\n display: inline-block;\n vertical-align: middle;\n font-size: 10px;\n position: relative;\n text-indent: -9999em;\n border: $border-size solid rgba($brand-primary_rgb, 0.2);\n border-left-color: $brand-primary;\n transform: translateZ(0);\n animation: load8 1.1s infinite linear;\n overflow: hidden;\n}\n@-webkit-keyframes load8 {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n@keyframes load8 {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n", + "styleUrl": "./dot-spinner.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [], + "line": 10 + }, + "templateData": "
    \n" + }, + { + "name": "DotStarterComponent", + "id": "component-DotStarterComponent-75ca00f47aac819061e858cf1d24edd6c2aeb6142950a183db72504c0447085e14b527abbba0799860593d1b88fde8eb2d2a25b0a9356cd57084b54d951de278", + "file": "apps/dotcms-ui/src/app/portlets/dot-starter/dot-starter.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-starter", + "styleUrls": ["./dot-starter.component.scss"], + "styles": [], + "templateUrl": ["./dot-starter.component.html"], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "showCreateContentLink", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 26 + }, + { + "name": "showCreateDataModelLink", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 27 + }, + { + "name": "showCreatePageLink", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 28 + }, + { + "name": "showCreateTemplateLink", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 29 + }, + { + "name": "userData$", + "deprecated": false, + "deprecationMessage": "", + "type": "Observable", + "optional": false, + "description": "", + "line": 18 + }, + { + "name": "username", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 25 + } + ], + "methodsClass": [ + { + "name": "handleVisibility", + "args": [ + { + "name": "hide", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 62, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nHit the endpoint to show/hide the tool group in the menu.\n", + "description": "

    Hit the endpoint to show/hide the tool group in the menu.

    \n", + "jsdoctags": [ + { + "name": { + "pos": 2046, + "end": 2050, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "hide" + }, + "type": "boolean", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 2030, + "end": 2035, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 2036, + "end": 2045, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 2037, + "end": 2044, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 133 + } + } + } + ] + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 33, + "deprecated": false, + "deprecationMessage": "" + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, OnInit } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport {\n DotCurrentUser,\n DotPermissionsType,\n PermissionsType\n} from '@models/dot-current-user/dot-current-user';\nimport { DotAccountService } from '@services/dot-account-service';\nimport { Observable } from 'rxjs';\nimport { pluck, take, map } from 'rxjs/operators';\n\n@Component({\n selector: 'dot-starter',\n templateUrl: './dot-starter.component.html',\n styleUrls: ['./dot-starter.component.scss']\n})\nexport class DotStarterComponent implements OnInit {\n userData$: Observable<{\n username: string;\n showCreateContentLink: boolean;\n showCreateDataModelLink: boolean;\n showCreatePageLink: boolean;\n showCreateTemplateLink: boolean;\n }>;\n username: string;\n showCreateContentLink: boolean;\n showCreateDataModelLink: boolean;\n showCreatePageLink: boolean;\n showCreateTemplateLink: boolean;\n\n constructor(private route: ActivatedRoute, private dotAccountService: DotAccountService) {}\n\n ngOnInit() {\n this.userData$ = this.route.data.pipe(\n pluck('userData'),\n take(1),\n map(\n ({\n user,\n permissions\n }: {\n user: DotCurrentUser;\n permissions: DotPermissionsType;\n }) => {\n return {\n username: user.givenName,\n showCreateContentLink: permissions[PermissionsType.CONTENTLETS].canWrite,\n showCreateDataModelLink: permissions[PermissionsType.STRUCTURES].canWrite,\n showCreatePageLink: permissions[PermissionsType.HTMLPAGES].canWrite,\n showCreateTemplateLink: permissions[PermissionsType.TEMPLATES].canWrite\n };\n }\n )\n );\n }\n\n /**\n * Hit the endpoint to show/hide the tool group in the menu.\n * @param {boolean} hide\n * @memberof DotStarterComponent\n */\n handleVisibility(hide: boolean): void {\n const layoutId = 'gettingstarted';\n hide\n ? this.dotAccountService.removeStarterPage().subscribe()\n : this.dotAccountService.addStarterPage().subscribe();\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"variables\" as *;\n\n$number-link-icon-size: 2.28rem;\n\n:host {\n display: block;\n font-size: $font-size-medium;\n height: 100%;\n overflow: auto;\n\n hr {\n border-top: 1px solid $gray-lighter;\n }\n\n a {\n text-decoration: none;\n }\n\n .dot-starter-header {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n\n p-checkbox {\n margin-top: $spacing-5;\n }\n }\n\n .dot-starter-title {\n color: $black;\n font-size: $font-size-x-large;\n margin: $spacing-5 $spacing-3 $spacing-1;\n }\n\n .dot-starter-description {\n color: $gray;\n margin: 0 $spacing-3 $spacing-5 $spacing-3;\n }\n\n .dot-starter-top-content,\n .dot-starter-bottom-content {\n display: flex;\n margin: 0 auto;\n max-width: 77.42rem;\n flex-grow: 1;\n }\n\n .dot-starter-top-main__section {\n background-color: $white;\n box-shadow: $md-shadow-4;\n counter-reset: css-counter 0;\n flex-grow: 1;\n margin-left: $spacing-1;\n margin-bottom: $spacing-4;\n margin-right: $spacing-1;\n }\n\n .dot-starter-top-main__block {\n align-content: space-between;\n border-bottom: 1px solid $gray-lighter;\n display: flex;\n margin: 0;\n padding: $spacing-5 0;\n transition: background-color $basic-speed ease-in;\n\n &:hover {\n background-color: $bg-hover;\n }\n }\n\n .dot-starter-top-main__link-number {\n align-self: center;\n margin: 0 $spacing-4;\n text-align: center;\n\n span {\n align-items: center;\n background-color: $brand-primary;\n border-radius: 50%;\n color: $white;\n counter-increment: css-counter 1;\n display: inline-flex;\n font-size: $md-icon-size-normal;\n height: $number-link-icon-size;\n justify-content: center;\n width: $number-link-icon-size;\n\n &::before {\n content: counter(css-counter);\n }\n }\n }\n\n .dot-starter-top-main__link-data {\n align-self: center;\n flex-grow: 1;\n\n h4 {\n color: $brand-primary;\n font-size: $font-size-large;\n font-weight: bold;\n margin: 0;\n }\n p {\n color: $gray;\n margin: 0;\n }\n }\n\n .dot-starter-top-main__link-arrow {\n align-self: center;\n\n i {\n color: $gray-light;\n font-size: $font-size-x-large;\n margin-right: $spacing-3;\n }\n }\n\n .dot-starter-top-secondary__section {\n margin-left: $spacing-1;\n\n h3 {\n font-size: $font-size-large;\n font-weight: $font-weight-semi-bold;\n margin: 0;\n }\n }\n\n .dot-starter-top-secondary__block {\n display: flex;\n padding: $spacing-3 0;\n }\n\n .dot-starter-top-secondary__link-icon {\n padding-top: 0;\n\n span {\n color: $brand-primary;\n fill: $brand-primary;\n display: inline-flex;\n width: $number-link-icon-size;\n }\n\n svg {\n fill: $brand-primary;\n height: 1.71rem;\n width: $md-icon-size-normal;\n }\n }\n\n .dot-starter-top-secondary__link-data {\n padding: 0;\n\n h4 {\n color: $black;\n font-size: $font-size-large;\n margin: 0;\n }\n p {\n color: $gray;\n margin: 0;\n }\n }\n\n .dot-starter-bottom-content {\n flex-wrap: wrap;\n margin-bottom: $spacing-5;\n padding-top: $spacing-1;\n }\n\n .dot-starter-bottom__block {\n background-color: $white;\n border-bottom: 1px solid $gray-lighter;\n box-shadow: $md-shadow-4;\n display: flex;\n flex-grow: 1;\n height: 100%;\n margin: $spacing-3 $spacing-1 0;\n overflow: hidden;\n padding: $spacing-3 0;\n transition: background-color $basic-speed ease-in;\n\n &:hover {\n background-color: $bg-hover;\n }\n }\n\n .dot-starter-bottom__link-icon {\n align-self: center;\n margin: 0 $spacing-5;\n text-align: center;\n\n span {\n color: $brand-primary;\n display: inline-flex;\n }\n }\n\n .dot-starter-bottom__link-data {\n align-self: center;\n margin-right: $spacing-5;\n padding: 0;\n\n h4 {\n color: $black;\n font-size: $font-size-large;\n margin: 0;\n }\n p {\n color: $gray;\n margin: 0;\n }\n }\n}\n", + "styleUrl": "./dot-starter.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "route", + "type": "ActivatedRoute", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotAccountService", + "type": "DotAccountService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 29, + "jsdoctags": [ + { + "name": "route", + "type": "ActivatedRoute", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotAccountService", + "type": "DotAccountService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": ["OnInit"], + "templateData": "\n
    \n
    \n
    \n

    {{ 'starter.title' | dm }}

    \n

    \n
    \n \n
    \n
    \n
    \n
    \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n
    \n
    \n
    \n

    {{ 'starter.side.title' | dm }}

    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n \n \n \n \n
    \n
    \n \n \n \n \n
    \n
    \n \n \n \n \n
    \n
    \n \n \n \n \n
    \n
    \n \n \n \n \n
    \n
    \n \n \n \n \n
    \n
    \n
    \n" + }, + { + "name": "DotStateIcon", + "id": "component-DotStateIcon-c91163912806f3503df682ac8edab7698cdf8f4d1bbe6cdbddfaca8329e825ca8036cd1fe64bab5ab690fdd01cc44fc9fc46a97ba0e57755bdd7080a83c79796", + "file": "libs/dotcms-webcomponents/src/elements/dot-state-icon/dot-state-icon.tsx", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "styleUrls": [], + "styles": [], + "templateUrl": [], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "labels", + "defaultValue": "{\n archived: 'Archived',\n published: 'Published',\n revision: 'Revision',\n draft: 'Draft'\n }", + "deprecated": false, + "deprecationMessage": "", + "type": "object", + "optional": false, + "description": "", + "line": 15, + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "size", + "defaultValue": "'16px'", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 13, + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "state", + "defaultValue": "null", + "deprecated": false, + "deprecationMessage": "", + "type": "DotContentState", + "optional": false, + "description": "", + "line": 11, + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + } + ], + "methodsClass": [ + { + "name": "getType", + "args": [ + { + "type": "DotContentState", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 40, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "type": "DotContentState", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "isTrue", + "args": [ + { + "name": "value", + "type": "string | boolean", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 58, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "value", + "type": "string | boolean", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "render", + "args": [], + "optional": false, + "returnType": "any", + "typeParameters": [], + "line": 22, + "deprecated": false, + "deprecationMessage": "" + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, h, Host, Prop } from '@stencil/core';\nimport { DotContentState } from '@dotcms/dotcms-models';\n\n@Component({\n tag: 'dot-state-icon',\n styleUrl: 'dot-state-icon.scss',\n shadow: true\n})\nexport class DotStateIcon {\n @Prop({ reflect: true })\n state: DotContentState = null;\n @Prop({ reflect: true })\n size = '16px';\n @Prop({ reflect: true })\n labels = {\n archived: 'Archived',\n published: 'Published',\n revision: 'Revision',\n draft: 'Draft'\n };\n\n render() {\n const state = this.state ? this.getType(this.state) : '';\n const name = this.labels[state];\n return (\n \n \n
    \n \n \n \n );\n }\n\n private getType({ live, working, deleted, hasLiveVersion }: DotContentState): string {\n if (this.isTrue(deleted)) {\n return 'archived'; // crossed\n }\n\n if (live.toString() === 'true') {\n if (this.isTrue(hasLiveVersion) && this.isTrue(working)) {\n return 'published'; // full\n }\n } else {\n if (this.isTrue(hasLiveVersion)) {\n return 'revision'; // half\n }\n }\n\n return 'draft'; // empty\n }\n\n private isTrue(value: string | boolean): boolean {\n return value ? value.toString() === 'true' : false;\n }\n}\n", + "tag": "dot-state-icon", + "styleUrl": "dot-state-icon.scss", + "shadow": true, + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "" + }, + { + "name": "DotSubNavComponent", + "id": "component-DotSubNavComponent-0448f733d63ab9aa391b8a0929d9bb54fbbe960022d4b88210a277fdd626f1133e452dfa1a2123c795b7cc831f17ff19deb77e4d7b6b9693ec2630eae5912f8b", + "file": "apps/dotcms-ui/src/app/view/components/dot-navigation/components/dot-sub-nav/dot-sub-nav.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-sub-nav", + "styleUrls": ["./dot-sub-nav.component.scss"], + "styles": [], + "templateUrl": ["./dot-sub-nav.component.html"], + "viewProviders": [], + "inputsClass": [ + { + "name": "collapsed", + "deprecated": false, + "deprecationMessage": "", + "line": 45, + "type": "boolean", + "decorators": [] + }, + { + "name": "data", + "deprecated": false, + "deprecationMessage": "", + "line": 40, + "type": "DotMenu", + "decorators": [] + } + ], + "outputsClass": [ + { + "name": "itemClick", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 43, + "type": "EventEmitter" + } + ], + "propertiesClass": [ + { + "name": "ul", + "deprecated": false, + "deprecationMessage": "", + "type": "ElementRef", + "optional": false, + "description": "", + "line": 38, + "decorators": [ + { + "name": "ViewChild", + "stringifiedArguments": "'ul', {static: true}" + } + ] + } + ], + "methodsClass": [ + { + "name": "onItemClick", + "args": [ + { + "name": "$event", + "type": "MouseEvent", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "item", + "type": "DotMenuItem", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 60, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nHandle click event in a menu sub item\n\n", + "description": "

    Handle click event in a menu sub item

    \n", + "jsdoctags": [ + { + "name": "$event", + "type": "MouseEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "item", + "type": "DotMenuItem", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [ + { + "name": "@expandAnimation", + "deprecated": false, + "deprecationMessage": "", + "line": 47, + "type": "string", + "decorators": [] + } + ], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import {\n Component,\n Input,\n Output,\n EventEmitter,\n HostBinding,\n ElementRef,\n ViewChild\n} from '@angular/core';\nimport { trigger, state, style, transition, animate } from '@angular/animations';\nimport { DotMenu, DotMenuItem } from '@models/navigation';\n\n@Component({\n animations: [\n trigger('expandAnimation', [\n state(\n 'expanded',\n style({\n height: '!',\n overflow: 'hidden'\n })\n ),\n state(\n 'collapsed',\n style({\n height: '0px',\n overflow: 'hidden'\n })\n ),\n transition('expanded <=> collapsed', animate('250ms ease-in-out'))\n ])\n ],\n selector: 'dot-sub-nav',\n templateUrl: './dot-sub-nav.component.html',\n styleUrls: ['./dot-sub-nav.component.scss']\n})\nexport class DotSubNavComponent {\n @ViewChild('ul', { static: true }) ul: ElementRef;\n\n @Input() data: DotMenu;\n\n @Output()\n itemClick: EventEmitter<{ originalEvent: MouseEvent; data: DotMenuItem }> = new EventEmitter();\n\n @Input() collapsed: boolean;\n\n @HostBinding('@expandAnimation') get getAnimation(): string {\n return !this.collapsed && this.data.isOpen ? 'expanded' : 'collapsed';\n }\n\n constructor() {}\n\n /**\n * Handle click event in a menu sub item\n *\n * @param MouseEvent $event\n * @param DotMenuItem item\n * @memberof DotSubNavComponent\n */\n onItemClick($event: MouseEvent, item: DotMenuItem): void {\n this.itemClick.emit({\n originalEvent: $event,\n data: item\n });\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"variables\" as *;\n@import \"mixins\";\n@import \"dotcms-theme/utils/theme-variables\";\n\n:host {\n display: block;\n}\n\nul {\n @include naked-list;\n}\n\na {\n color: $white;\n text-decoration: none;\n}\n\n.dot-nav-sub__link {\n display: block;\n padding: $spacing-1 $spacing-1 $spacing-1 56px;\n transition: background-color $basic-speed ease;\n width: $navigation-width;\n\n &:hover {\n background-color: rgba($white_rgb, 0.1);\n }\n\n &--active,\n &--active:hover {\n background-color: $brand-primary;\n }\n}\n\n.dot-nav-sub__item {\n width: $navigation-width;\n overflow: hidden;\n transition: width $basic-speed ease;\n}\n\n.dot-nav-sub__collapsed {\n background-color: rgba($white_rgb, 0.1);\n padding: $spacing-1 0;\n min-width: $navigation-width;\n\n .dot-nav-sub__link {\n padding: $spacing-1 $spacing-4;\n }\n}\n", + "styleUrl": "./dot-sub-nav.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [], + "line": 49 + }, + "accessors": { + "getAnimation": { + "name": "getAnimation", + "getSignature": { + "name": "getAnimation", + "type": "string", + "returnType": "string", + "line": 47 + } + } + }, + "templateData": "
      \n
    • \n {{ subItem.label }}\n
    • \n
    \n" + }, + { + "name": "DotTagsComponent", + "id": "component-DotTagsComponent-d5342df81c212c7d7218822d86083c32d392edfcadf5ceb31e426b51fbf53bafb25e72fab60f1893659619d11ca1b89e3de7d6458917f6f911e17c0e00c66fcb", + "file": "libs/dotcms-field-elements/src/components/dot-tags/dot-tags.tsx", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "styleUrls": [], + "styles": [], + "templateUrl": [], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "data", + "defaultValue": "null", + "deprecated": false, + "deprecationMessage": "", + "type": "function", + "optional": false, + "description": "

    Function or array of string to get the data to use for the autocomplete search

    \n", + "line": 37, + "rawdescription": "\nFunction or array of string to get the data to use for the autocomplete search", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "" + } + ] + }, + { + "name": "debounce", + "defaultValue": "300", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "

    Duraction in ms to start search into the autocomplete

    \n", + "line": 64, + "rawdescription": "\nDuraction in ms to start search into the autocomplete", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "disabled", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "

    (optional) Disables field's interaction

    \n", + "line": 58, + "rawdescription": "\n(optional) Disables field's interaction", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "el", + "deprecated": false, + "deprecationMessage": "", + "type": "HTMLElement", + "optional": false, + "description": "", + "line": 31, + "decorators": [ + { + "name": "Element", + "stringifiedArguments": "" + } + ] + }, + { + "name": "hint", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    (optional) Hint text that suggest a clue of the field

    \n", + "line": 46, + "rawdescription": "\n(optional) Hint text that suggest a clue of the field", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "label", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    (optional) Text to be rendered next to input field

    \n", + "line": 43, + "rawdescription": "\n(optional) Text to be rendered next to input field", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "name", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    Name that will be used as ID

    \n", + "line": 40, + "rawdescription": "\nName that will be used as ID", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "placeholder", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    (optional) text to show when no value is set

    \n", + "line": 49, + "rawdescription": "\n(optional) text to show when no value is set", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "required", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "

    (optional) Determine if it is mandatory

    \n", + "line": 52, + "rawdescription": "\n(optional) Determine if it is mandatory", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "requiredMessage", + "defaultValue": "'This field is required'", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    (optional) Text that be shown when required is set and value is not set

    \n", + "line": 55, + "rawdescription": "\n(optional) Text that be shown when required is set and value is not set", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "status", + "deprecated": false, + "deprecationMessage": "", + "type": "DotFieldStatus", + "optional": false, + "description": "", + "line": 66, + "decorators": [ + { + "name": "State", + "stringifiedArguments": "" + } + ] + }, + { + "name": "statusChange", + "deprecated": false, + "deprecationMessage": "", + "type": "EventEmitter", + "optional": false, + "description": "", + "line": 69, + "decorators": [ + { + "name": "Event", + "stringifiedArguments": "" + } + ] + }, + { + "name": "threshold", + "defaultValue": "0", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "

    Min characters to start search in the autocomplete input

    \n", + "line": 61, + "rawdescription": "\nMin characters to start search in the autocomplete input", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "value", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    Value formatted splitted with a comma, for example: tag-1,tag-2

    \n", + "line": 34, + "rawdescription": "\nValue formatted splitted with a comma, for example: tag-1,tag-2", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{mutable: true, reflect: true}" + } + ] + }, + { + "name": "valueChange", + "deprecated": false, + "deprecationMessage": "", + "type": "EventEmitter", + "optional": false, + "description": "", + "line": 68, + "decorators": [ + { + "name": "Event", + "stringifiedArguments": "" + } + ] + } + ], + "methodsClass": [ + { + "name": "addTag", + "args": [ + { + "name": "label", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 132, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "label", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "blurHandler", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 144, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "componentWillLoad", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 86, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "emitChanges", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 153, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "emitStatusChange", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 158, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "emitValueChange", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 165, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "getErrorMessage", + "args": [], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 172, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "getValues", + "args": [], + "optional": false, + "returnType": "string[]", + "typeParameters": [], + "line": 176, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "isDisabled", + "args": [], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 180, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "isValid", + "args": [], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 184, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "onEnterHandler", + "args": [ + { + "type": "CustomEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 188, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "type": "CustomEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "onSelectHandler", + "args": [ + { + "type": "CustomEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 194, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "type": "CustomEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "removeTag", + "args": [ + { + "name": "event", + "type": "CustomEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 199, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "event", + "type": "CustomEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "render", + "args": [], + "optional": false, + "returnType": "any", + "typeParameters": [], + "line": 92, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "reset", + "args": [], + "optional": false, + "returnType": "Promise", + "typeParameters": [], + "line": 75, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nReset properties of the filed, clear value and emit events.\n", + "description": "

    Reset properties of the filed, clear value and emit events.

    \n", + "decorators": [ + { + "name": "Method", + "stringifiedArguments": "" + } + ], + "modifierKind": [131] + }, + { + "name": "showErrorMessage", + "args": [], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 207, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "updateStatus", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 211, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "validateProps", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 219, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "valueWatch", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 82, + "deprecated": false, + "deprecationMessage": "", + "decorators": [ + { + "name": "Watch", + "stringifiedArguments": "'value'" + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import {\n Component,\n Prop,\n State,\n Element,\n Event,\n EventEmitter,\n Method,\n Watch,\n Host,\n h\n} from '@stencil/core';\nimport { DotFieldStatus, DotFieldValueEvent, DotFieldStatusEvent } from '../../models';\nimport {\n checkProp,\n getClassNames,\n getErrorClass,\n getOriginalStatus,\n getTagError,\n getTagHint,\n updateStatus,\n getHintId,\n isStringType\n} from '../../utils';\n\n@Component({\n tag: 'dot-tags',\n styleUrl: 'dot-tags.scss'\n})\nexport class DotTagsComponent {\n @Element() el: HTMLElement;\n\n /** Value formatted splitted with a comma, for example: tag-1,tag-2 */\n @Prop({ mutable: true, reflect: true }) value = '';\n\n /** Function or array of string to get the data to use for the autocomplete search */\n @Prop() data: () => Promise | string[] = null;\n\n /** Name that will be used as ID */\n @Prop({ reflect: true }) name = '';\n\n /** (optional) Text to be rendered next to input field */\n @Prop({ reflect: true }) label = '';\n\n /** (optional) Hint text that suggest a clue of the field */\n @Prop({ reflect: true }) hint = '';\n\n /** (optional) text to show when no value is set */\n @Prop({ reflect: true }) placeholder = '';\n\n /** (optional) Determine if it is mandatory */\n @Prop({ reflect: true }) required = false;\n\n /** (optional) Text that be shown when required is set and value is not set */\n @Prop({ reflect: true }) requiredMessage = 'This field is required';\n\n /** (optional) Disables field's interaction */\n @Prop({ reflect: true }) disabled = false;\n\n /** Min characters to start search in the autocomplete input */\n @Prop({ reflect: true }) threshold = 0;\n\n /** Duraction in ms to start search into the autocomplete */\n @Prop({ reflect: true }) debounce = 300;\n\n @State() status: DotFieldStatus;\n\n @Event() valueChange: EventEmitter;\n @Event() statusChange: EventEmitter;\n\n /**\n * Reset properties of the filed, clear value and emit events.\n */\n @Method()\n async reset(): Promise {\n this.value = '';\n this.status = getOriginalStatus(this.isValid());\n this.emitChanges();\n }\n\n @Watch('value')\n valueWatch(): void {\n this.value = checkProp(this, 'value', 'string');\n }\n\n componentWillLoad(): void {\n this.status = getOriginalStatus(this.isValid());\n this.validateProps();\n this.emitStatusChange();\n }\n\n render() {\n const classes = getClassNames(this.status, this.isValid(), this.required);\n\n return (\n \n \n \n \n
    \n {this.getValues().map((tagLab: string) => (\n \n ))}\n
    \n
    \n \n\n {getTagHint(this.hint)}\n {getTagError(this.showErrorMessage(), this.getErrorMessage())}\n \n );\n }\n\n private addTag(label: string): void {\n const values = this.getValues();\n\n if (!values.includes(label)) {\n values.push(label);\n this.value = values.join(',');\n\n this.updateStatus();\n this.emitChanges();\n }\n }\n\n private blurHandler(): void {\n if (!this.status.dotTouched) {\n this.status = updateStatus(this.status, {\n dotTouched: true\n });\n this.emitStatusChange();\n }\n }\n\n private emitChanges(): void {\n this.emitStatusChange();\n this.emitValueChange();\n }\n\n private emitStatusChange(): void {\n this.statusChange.emit({\n name: this.name,\n status: this.status\n });\n }\n\n private emitValueChange(): void {\n this.valueChange.emit({\n name: this.name,\n value: this.value\n });\n }\n\n private getErrorMessage(): string {\n return this.isValid() ? '' : this.requiredMessage;\n }\n\n private getValues(): string[] {\n return isStringType(this.value) ? this.value.split(',') : [];\n }\n\n private isDisabled(): boolean {\n return this.disabled || null;\n }\n\n private isValid(): boolean {\n return !this.required || (this.required && !!this.value);\n }\n\n private onEnterHandler({ detail = '' }: CustomEvent) {\n detail.split(',').forEach((label: string) => {\n this.addTag(label.trim());\n });\n }\n\n private onSelectHandler({ detail = '' }: CustomEvent) {\n const value = detail.replace(',', ' ').replace(/\\s+/g, ' ');\n this.addTag(value);\n }\n\n private removeTag(event: CustomEvent): void {\n const values = this.getValues().filter((item) => item !== event.detail);\n this.value = values.join(',');\n\n this.updateStatus();\n this.emitChanges();\n }\n\n private showErrorMessage(): boolean {\n return this.getErrorMessage() && !this.status.dotPristine;\n }\n\n private updateStatus(): void {\n this.status = updateStatus(this.status, {\n dotTouched: true,\n dotPristine: false,\n dotValid: this.isValid()\n });\n }\n\n private validateProps(): void {\n this.valueWatch();\n }\n}\n", + "tag": "dot-tags", + "styleUrl": "dot-tags.scss", + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "" + }, + { + "name": "DotTagsComponent", + "id": "component-DotTagsComponent-746eb210822dbe32debe5755de17127338cf86da173501a5eb8dbd3221d164992bf3a9da3a0af0a2606a2427af9600d9c4f0924047cbe4c5f20fa5acdb4755d1-1", + "file": "libs/dotcms-webcomponents/src/components/contenttypes-fields/dot-tags/dot-tags.tsx", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "styleUrls": [], + "styles": [], + "templateUrl": [], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "data", + "defaultValue": "null", + "deprecated": false, + "deprecationMessage": "", + "type": "function", + "optional": false, + "description": "

    Function or array of string to get the data to use for the autocomplete search

    \n", + "line": 76, + "rawdescription": "\nFunction or array of string to get the data to use for the autocomplete search", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "" + } + ] + }, + { + "name": "debounce", + "defaultValue": "300", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "

    Duraction in ms to start search into the autocomplete

    \n", + "line": 72, + "rawdescription": "\nDuraction in ms to start search into the autocomplete", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "disabled", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "

    (optional) Disables field's interaction

    \n", + "line": 64, + "rawdescription": "\n(optional) Disables field's interaction", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "dotStatusChange", + "deprecated": false, + "deprecationMessage": "", + "type": "EventEmitter", + "optional": false, + "description": "", + "line": 84, + "decorators": [ + { + "name": "Event", + "stringifiedArguments": "" + } + ] + }, + { + "name": "dotValueChange", + "deprecated": false, + "deprecationMessage": "", + "type": "EventEmitter", + "optional": false, + "description": "", + "line": 82, + "decorators": [ + { + "name": "Event", + "stringifiedArguments": "" + } + ] + }, + { + "name": "el", + "deprecated": false, + "deprecationMessage": "", + "type": "HTMLElement", + "optional": false, + "description": "", + "line": 32, + "decorators": [ + { + "name": "Element", + "stringifiedArguments": "" + } + ] + }, + { + "name": "hint", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    (optional) Hint text that suggest a clue of the field

    \n", + "line": 48, + "rawdescription": "\n(optional) Hint text that suggest a clue of the field", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "label", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    (optional) Text to be rendered next to input field

    \n", + "line": 44, + "rawdescription": "\n(optional) Text to be rendered next to input field", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "name", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    Name that will be used as ID

    \n", + "line": 40, + "rawdescription": "\nName that will be used as ID", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "placeholder", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    (optional) text to show when no value is set

    \n", + "line": 52, + "rawdescription": "\n(optional) text to show when no value is set", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "required", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "

    (optional) Determine if it is mandatory

    \n", + "line": 56, + "rawdescription": "\n(optional) Determine if it is mandatory", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "requiredMessage", + "defaultValue": "'This field is required'", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    (optional) Text that be shown when required is set and value is not set

    \n", + "line": 60, + "rawdescription": "\n(optional) Text that be shown when required is set and value is not set", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "status", + "deprecated": false, + "deprecationMessage": "", + "type": "DotFieldStatus", + "optional": false, + "description": "", + "line": 79, + "decorators": [ + { + "name": "State", + "stringifiedArguments": "" + } + ] + }, + { + "name": "threshold", + "defaultValue": "0", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "

    Min characters to start search in the autocomplete input

    \n", + "line": 68, + "rawdescription": "\nMin characters to start search in the autocomplete input", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "value", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    Value formatted splitted with a comma, for example: tag-1,tag-2

    \n", + "line": 36, + "rawdescription": "\nValue formatted splitted with a comma, for example: tag-1,tag-2", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{mutable: true, reflect: true}" + } + ] + } + ], + "methodsClass": [ + { + "name": "addTag", + "args": [ + { + "name": "label", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 147, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "label", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "blurHandler", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 159, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "componentWillLoad", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 101, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "emitChanges", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 168, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "emitStatusChange", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 173, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "emitValueChange", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 180, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "getErrorMessage", + "args": [], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 187, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "getValues", + "args": [], + "optional": false, + "returnType": "string[]", + "typeParameters": [], + "line": 191, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "isDisabled", + "args": [], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 195, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "isValid", + "args": [], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 199, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "onEnterHandler", + "args": [ + { + "type": "CustomEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 203, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "type": "CustomEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "onSelectHandler", + "args": [ + { + "type": "CustomEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 209, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "type": "CustomEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "removeTag", + "args": [ + { + "name": "event", + "type": "CustomEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 214, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "event", + "type": "CustomEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "render", + "args": [], + "optional": false, + "returnType": "any", + "typeParameters": [], + "line": 107, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "reset", + "args": [], + "optional": false, + "returnType": "Promise", + "typeParameters": [], + "line": 90, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nReset properties of the filed, clear value and emit events.\n", + "description": "

    Reset properties of the filed, clear value and emit events.

    \n", + "decorators": [ + { + "name": "Method", + "stringifiedArguments": "" + } + ], + "modifierKind": [131] + }, + { + "name": "showErrorMessage", + "args": [], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 222, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "updateStatus", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 226, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "validateProps", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 234, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "valueWatch", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 97, + "deprecated": false, + "deprecationMessage": "", + "decorators": [ + { + "name": "Watch", + "stringifiedArguments": "'value'" + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import {\n Component,\n Prop,\n State,\n Element,\n Event,\n EventEmitter,\n Method,\n Watch,\n h,\n Host\n} from '@stencil/core';\nimport { DotFieldStatus, DotFieldValueEvent, DotFieldStatusEvent } from '../../../models';\nimport {\n checkProp,\n getClassNames,\n getErrorClass,\n getOriginalStatus,\n getTagError,\n getTagHint,\n updateStatus,\n getHintId,\n isStringType\n} from '../../../utils';\n\n@Component({\n tag: 'dot-tags',\n styleUrl: 'dot-tags.scss'\n})\nexport class DotTagsComponent {\n @Element()\n el: HTMLElement;\n\n /** Value formatted splitted with a comma, for example: tag-1,tag-2 */\n @Prop({ mutable: true, reflect: true })\n value = '';\n\n /** Name that will be used as ID */\n @Prop({ reflect: true })\n name = '';\n\n /** (optional) Text to be rendered next to input field */\n @Prop({ reflect: true })\n label = '';\n\n /** (optional) Hint text that suggest a clue of the field */\n @Prop({ reflect: true })\n hint = '';\n\n /** (optional) text to show when no value is set */\n @Prop({ reflect: true })\n placeholder = '';\n\n /** (optional) Determine if it is mandatory */\n @Prop({ reflect: true })\n required = false;\n\n /** (optional) Text that be shown when required is set and value is not set */\n @Prop({ reflect: true })\n requiredMessage = 'This field is required';\n\n /** (optional) Disables field's interaction */\n @Prop({ reflect: true })\n disabled = false;\n\n /** Min characters to start search in the autocomplete input */\n @Prop({ reflect: true })\n threshold = 0;\n\n /** Duraction in ms to start search into the autocomplete */\n @Prop({ reflect: true })\n debounce = 300;\n\n /** Function or array of string to get the data to use for the autocomplete search */\n @Prop()\n data: () => Promise | string[] = null;\n\n @State()\n status: DotFieldStatus;\n\n @Event()\n dotValueChange: EventEmitter;\n @Event()\n dotStatusChange: EventEmitter;\n\n /**\n * Reset properties of the filed, clear value and emit events.\n */\n @Method()\n async reset(): Promise {\n this.value = '';\n this.status = getOriginalStatus(this.isValid());\n this.emitChanges();\n }\n\n @Watch('value')\n valueWatch(): void {\n this.value = checkProp(this, 'value', 'string');\n }\n\n componentWillLoad(): void {\n this.status = getOriginalStatus(this.isValid());\n this.validateProps();\n this.emitStatusChange();\n }\n\n render() {\n const classes = getClassNames(this.status, this.isValid(), this.required);\n\n return (\n \n \n \n \n
    \n {this.getValues().map((tagLab: string) => (\n \n ))}\n
    \n \n
    \n\n {getTagHint(this.hint)}\n {getTagError(this.showErrorMessage(), this.getErrorMessage())}\n
    \n );\n }\n\n private addTag(label: string): void {\n const values = this.getValues();\n\n if (!values.includes(label)) {\n values.push(label);\n this.value = values.join(',');\n\n this.updateStatus();\n this.emitChanges();\n }\n }\n\n private blurHandler(): void {\n if (!this.status.dotTouched) {\n this.status = updateStatus(this.status, {\n dotTouched: true\n });\n this.emitStatusChange();\n }\n }\n\n private emitChanges(): void {\n this.emitStatusChange();\n this.emitValueChange();\n }\n\n private emitStatusChange(): void {\n this.dotStatusChange.emit({\n name: this.name,\n status: this.status\n });\n }\n\n private emitValueChange(): void {\n this.dotValueChange.emit({\n name: this.name,\n value: this.value\n });\n }\n\n private getErrorMessage(): string {\n return this.isValid() ? '' : this.requiredMessage;\n }\n\n private getValues(): string[] {\n return isStringType(this.value) ? this.value.split(',') : [];\n }\n\n private isDisabled(): boolean {\n return this.disabled || null;\n }\n\n private isValid(): boolean {\n return !this.required || (this.required && !!this.value);\n }\n\n private onEnterHandler({ detail = '' }: CustomEvent) {\n detail.split(',').forEach((label: string) => {\n this.addTag(label.trim());\n });\n }\n\n private onSelectHandler({ detail = '' }: CustomEvent) {\n const value = detail.replace(',', ' ').replace(/\\s+/g, ' ');\n this.addTag(value);\n }\n\n private removeTag(event: CustomEvent): void {\n const values = this.getValues().filter((item) => item !== event.detail);\n this.value = values.join(',');\n\n this.updateStatus();\n this.emitChanges();\n }\n\n private showErrorMessage(): boolean {\n return this.getErrorMessage() && !this.status.dotPristine;\n }\n\n private updateStatus(): void {\n this.status = updateStatus(this.status, {\n dotTouched: true,\n dotPristine: false,\n dotValid: this.isValid()\n });\n }\n\n private validateProps(): void {\n this.valueWatch();\n }\n}\n", + "tag": "dot-tags", + "styleUrl": "dot-tags.scss", + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "", + "isDuplicate": true, + "duplicateId": 1, + "duplicateName": "DotTagsComponent-1" + }, + { + "name": "DotTemplateAdvancedComponent", + "id": "component-DotTemplateAdvancedComponent-01d8f75b0b89bd3d8d4f82dd90ae86880dddbd10ca6e20fc93e7185086fb5fea13c86935844542de5a096292c1fc762417e2b48913b3e7d02fa928145a24257d", + "file": "apps/dotcms-ui/src/app/portlets/dot-templates/dot-template-create-edit/dot-template-advanced/dot-template-advanced.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-template-advanced", + "styleUrls": ["./dot-template-advanced.scss"], + "styles": [], + "templateUrl": ["./dot-template-advanced.component.html"], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [ + { + "name": "cancel", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 19, + "type": "EventEmitter" + }, + { + "name": "save", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 18, + "type": "EventEmitter" + } + ], + "propertiesClass": [ + { + "name": "actions$", + "deprecated": false, + "deprecationMessage": "", + "type": "Observable", + "optional": false, + "description": "", + "line": 24 + }, + { + "name": "destroy$", + "defaultValue": "new Subject()", + "deprecated": false, + "deprecationMessage": "", + "type": "Subject", + "optional": false, + "description": "", + "line": 25, + "modifierKind": [121] + }, + { + "name": "editor", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": false, + "description": "", + "line": 22 + }, + { + "name": "form", + "deprecated": false, + "deprecationMessage": "", + "type": "FormGroup", + "optional": false, + "description": "", + "line": 23 + } + ], + "methodsClass": [ + { + "name": "containerChange", + "args": [ + { + "name": "container", + "type": "DotContainer", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 82, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nThis method handles the change event of the searchable selector and\ninserts the container to the editor\n\n", + "description": "

    This method handles the change event of the searchable selector and\ninserts the container to the editor

    \n", + "jsdoctags": [ + { + "name": { + "pos": 2686, + "end": 2695, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "container" + }, + "type": "DotContainer", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 2665, + "end": 2670, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 2671, + "end": 2685, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 2672, + "end": 2684, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 177, + "typeName": { + "pos": 2672, + "end": 2684, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "DotContainer" + } + } + } + } + ] + }, + { + "name": "getActions", + "args": [ + { + "name": "disabled", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "true" + } + ], + "optional": false, + "returnType": "DotPortletToolbarActions", + "typeParameters": [], + "line": 101, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "disabled", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "true", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "initEditor", + "args": [ + { + "name": "editor", + "type": "any", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 71, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nThis method initializes the monaco editor\n\n", + "description": "

    This method initializes the monaco editor

    \n", + "jsdoctags": [ + { + "name": { + "pos": 2398, + "end": 2404, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "editor" + }, + "type": "any", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 2388, + "end": 2393, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 2394, + "end": 2397, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 2395, + "end": 2396, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 310 + } + } + } + ] + }, + { + "name": "ngOnDestroy", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 60, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 33, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "setContainerId", + "args": [ + { + "type": "DotContainer", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 94, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "type": "DotContainer", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, EventEmitter, OnDestroy, OnInit, Output } from '@angular/core';\nimport { FormBuilder, FormGroup } from '@angular/forms';\n\nimport { Observable, Subject } from 'rxjs';\nimport { filter, map, take, takeUntil } from 'rxjs/operators';\n\nimport { DotContainer } from '@shared/models/container/dot-container.model';\nimport { DotTemplateItem, DotTemplateStore } from '../store/dot-template.store';\nimport { DotPortletToolbarActions } from '@models/dot-portlet-toolbar.model/dot-portlet-toolbar-actions.model';\nimport { DotMessageService } from '@services/dot-message/dot-messages.service';\n\n@Component({\n selector: 'dot-template-advanced',\n templateUrl: './dot-template-advanced.component.html',\n styleUrls: ['./dot-template-advanced.scss']\n})\nexport class DotTemplateAdvancedComponent implements OnInit, OnDestroy {\n @Output() save = new EventEmitter();\n @Output() cancel = new EventEmitter();\n\n // `any` because the type of the editor in the ngx-monaco-editor package is not typed\n editor: any;\n form: FormGroup;\n actions$: Observable;\n private destroy$: Subject = new Subject();\n\n constructor(\n private store: DotTemplateStore,\n private fb: FormBuilder,\n private dotMessageService: DotMessageService\n ) {}\n\n ngOnInit(): void {\n this.store.vm$.pipe(take(1)).subscribe(({ original }) => {\n if (original.type === 'advanced') {\n this.form = this.fb.group({\n title: original.title,\n body: original.body,\n identifier: original.identifier,\n friendlyName: original.friendlyName\n });\n }\n });\n\n this.form\n .get('body')\n .valueChanges.pipe(\n takeUntil(this.destroy$),\n filter((body: string) => body !== undefined)\n )\n .subscribe((body: string) => {\n this.store.updateBody(body);\n });\n\n this.actions$ = this.store.didTemplateChanged$.pipe(\n map((templateChange: boolean) => this.getActions(!templateChange))\n );\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.complete();\n }\n\n /**\n * This method initializes the monaco editor\n *\n * @param {*} editor\n * @memberof DotTemplateComponent\n */\n initEditor(editor: any): void {\n this.editor = editor;\n }\n\n /**\n * This method handles the change event of the searchable selector and\n * inserts the container to the editor\n *\n * @param {DotContainer} container\n * @memberof DotTemplateComponent\n */\n containerChange(container: DotContainer): void {\n const selection = this.editor.getSelection();\n\n const id = this.setContainerId(container);\n\n const text = `## Container: ${\n container.name\n }\\n## This is autogenerated code that cannot be changed\\n#parseContainer('${id}','${Date.now()}')\\n`;\n const operation = { range: selection, text: text, forceMoveMarkers: true };\n this.editor.executeEdits('source', [operation]);\n }\n\n private setContainerId({ identifier, parentPermissionable }: DotContainer): string {\n const regex = new RegExp('//' + parentPermissionable.hostname);\n return identifier?.includes(parentPermissionable.hostname)\n ? identifier.replace(regex, '')\n : identifier;\n }\n\n private getActions(disabled = true): DotPortletToolbarActions {\n return {\n primary: [\n {\n label: this.dotMessageService.get('save'),\n disabled: disabled,\n command: () => {\n this.save.emit(this.form.value);\n }\n }\n ],\n cancel: () => {\n this.cancel.emit();\n }\n };\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"variables\" as *;\n\n:host {\n display: block;\n height: 100%;\n\n & ::ng-deep dot-portlet-box {\n display: flex;\n flex-direction: column;\n }\n}\n\nform {\n margin: $spacing-3;\n height: 100%;\n display: flex;\n flex-direction: column;\n}\n\ndot-container-selector {\n margin-bottom: $spacing-2;\n}\n", + "styleUrl": "./dot-template-advanced.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "store", + "type": "DotTemplateStore", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "fb", + "type": "FormBuilder", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotMessageService", + "type": "DotMessageService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 25, + "jsdoctags": [ + { + "name": "store", + "type": "DotTemplateStore", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "fb", + "type": "FormBuilder", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotMessageService", + "type": "DotMessageService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": ["OnInit", "OnDestroy"], + "templateData": "\n \n \n \n\n
    \n \n \n \n
    \n" + }, + { + "name": "DotTemplateBuilderComponent", + "id": "component-DotTemplateBuilderComponent-a7c4bcbb8a0fcb55349dd845f4298da8be51192b2646f8068f89e2b6a5a63de6e71402b6d9afa0d6441999c3f0cc414505697450249eb427fef7e64d62bbe1f4", + "file": "apps/dotcms-ui/src/app/portlets/dot-templates/dot-template-create-edit/dot-template-builder/dot-template-builder.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-template-builder", + "styleUrls": ["./dot-template-builder.component.scss"], + "styles": [], + "templateUrl": ["./dot-template-builder.component.html"], + "viewProviders": [], + "inputsClass": [ + { + "name": "item", + "deprecated": false, + "deprecationMessage": "", + "line": 19, + "type": "DotTemplateItem", + "decorators": [] + } + ], + "outputsClass": [ + { + "name": "cancel", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 21, + "type": "EventEmitter" + }, + { + "name": "custom", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 22, + "type": "EventEmitter" + }, + { + "name": "save", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 20, + "type": "EventEmitter" + } + ], + "propertiesClass": [ + { + "name": "historyIframe", + "deprecated": false, + "deprecationMessage": "", + "type": "IframeComponent", + "optional": false, + "description": "", + "line": 23, + "decorators": [ + { + "name": "ViewChild", + "stringifiedArguments": "'historyIframe'" + } + ] + }, + { + "name": "historyUrl", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 25 + }, + { + "name": "permissionsUrl", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 24 + } + ], + "methodsClass": [ + { + "name": "ngOnChanges", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 34, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 29, + "deprecated": false, + "deprecationMessage": "" + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import {\n Component,\n EventEmitter,\n Input,\n OnChanges,\n OnInit,\n Output,\n ViewChild\n} from '@angular/core';\nimport { DotTemplateItem } from '../store/dot-template.store';\nimport { IframeComponent } from '@components/_common/iframe/iframe-component';\n\n@Component({\n selector: 'dot-template-builder',\n templateUrl: './dot-template-builder.component.html',\n styleUrls: ['./dot-template-builder.component.scss']\n})\nexport class DotTemplateBuilderComponent implements OnInit, OnChanges {\n @Input() item: DotTemplateItem;\n @Output() save = new EventEmitter();\n @Output() cancel = new EventEmitter();\n @Output() custom: EventEmitter = new EventEmitter();\n @ViewChild('historyIframe') historyIframe: IframeComponent;\n permissionsUrl = '';\n historyUrl = '';\n\n constructor() {}\n\n ngOnInit() {\n this.permissionsUrl = `/html/templates/permissions.jsp?templateId=${this.item.identifier}&popup=true`;\n this.historyUrl = `/html/templates/push_history.jsp?templateId=${this.item.identifier}&popup=true`;\n }\n\n ngOnChanges(): void {\n if (this.historyIframe) {\n this.historyIframe.iframeElement.nativeElement.contentWindow.location.reload();\n }\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"variables\" as *;\n\n:host,\n:host ::ng-deep .p-tabview-panels {\n overflow: hidden;\n flex-grow: 1;\n flex-basis: 0;\n}\n\n:host {\n & ::ng-deep {\n .p-tabview {\n display: flex;\n flex-direction: column;\n height: 100%;\n }\n .p-tabview-panel:not([hidden]) {\n height: 100%;\n }\n }\n}\n\ndot-portlet-box {\n height: 100%;\n padding: $spacing-3;\n}\n", + "styleUrl": "./dot-template-builder.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [], + "line": 25 + }, + "implements": ["OnInit", "OnChanges"], + "templateData": "\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n" + }, + { + "name": "DotTemplateCreateEditComponent", + "id": "component-DotTemplateCreateEditComponent-c33f35723f2229f70d634417f19d8b55f83eb48592611532ecec76b4c1b5f83489315254c38b939034904079cb021161fc5d34162fe879d6b3fa1cbff2f19558", + "file": "apps/dotcms-ui/src/app/portlets/dot-templates/dot-template-create-edit/dot-template-create-edit.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [ + { + "name": "DotTemplateStore" + } + ], + "selector": "dot-template-create-edit", + "styleUrls": ["./dot-template-create-edit.component.scss"], + "styles": [], + "templateUrl": ["./dot-template-create-edit.component.html"], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "destroy$", + "defaultValue": "new Subject()", + "deprecated": false, + "deprecationMessage": "", + "type": "Subject", + "optional": false, + "description": "", + "line": 28, + "modifierKind": [121] + }, + { + "name": "form", + "deprecated": false, + "deprecationMessage": "", + "type": "FormGroup", + "optional": false, + "description": "", + "line": 26 + }, + { + "name": "vm$", + "defaultValue": "this.store.vm$", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 24 + } + ], + "methodsClass": [ + { + "name": "cancelTemplate", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 107, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nHandle cancel button from designer\n\n", + "description": "

    Handle cancel button from designer

    \n", + "jsdoctags": [] + }, + { + "name": "createTemplate", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 121, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "editTemplateProps", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 65, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nStart template properties edition\n\n", + "description": "

    Start template properties edition

    \n", + "jsdoctags": [] + }, + { + "name": "getForm", + "args": [ + { + "name": "template", + "type": "DotTemplateItem", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "FormGroup", + "typeParameters": [], + "line": 141, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "template", + "type": "DotTemplateItem", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getFormValue", + "args": [ + { + "name": "template", + "type": "DotTemplateItem", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "literal type", + "typeParameters": [], + "line": 162, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "template", + "type": "DotTemplateItem", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "ngOnDestroy", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 55, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 38, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "onCustomEvent", + "args": [ + { + "name": "$event", + "type": "CustomEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 117, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nHandle the custom event emitted by the History Tab\n\n", + "description": "

    Handle the custom event emitted by the History Tab

    \n", + "jsdoctags": [ + { + "name": "$event", + "type": "CustomEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "saveTemplate", + "args": [ + { + "type": "DotTemplate", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 83, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nSave template to store\n\n", + "description": "

    Save template to store

    \n", + "jsdoctags": [ + { + "type": "DotTemplate", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "setSwitchSiteListener", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 183, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, OnDestroy, OnInit } from '@angular/core';\nimport { FormBuilder, FormGroup, Validators } from '@angular/forms';\n\nimport { Subject } from 'rxjs';\nimport { filter, takeUntil } from 'rxjs/operators';\n\nimport { DialogService } from 'primeng/dynamicdialog';\n\nimport { DotTemplate } from '@shared/models/dot-edit-layout-designer/dot-template.model';\n\nimport { DotTemplatePropsComponent } from './dot-template-props/dot-template-props.component';\nimport { DotTemplateItem, DotTemplateState, DotTemplateStore } from './store/dot-template.store';\nimport { DotMessageService } from '@services/dot-message/dot-messages.service';\nimport { DynamicDialogRef } from 'primeng/dynamicdialog/dynamicdialog-ref';\nimport { Site, SiteService } from '@dotcms/dotcms-js';\n\n@Component({\n selector: 'dot-template-create-edit',\n templateUrl: './dot-template-create-edit.component.html',\n styleUrls: ['./dot-template-create-edit.component.scss'],\n providers: [DotTemplateStore]\n})\nexport class DotTemplateCreateEditComponent implements OnInit, OnDestroy {\n vm$ = this.store.vm$;\n\n form: FormGroup;\n\n private destroy$: Subject = new Subject();\n\n constructor(\n private store: DotTemplateStore,\n private fb: FormBuilder,\n private dialogService: DialogService,\n private dotMessageService: DotMessageService,\n private dotSiteService: SiteService\n ) {}\n\n ngOnInit() {\n this.vm$.pipe(takeUntil(this.destroy$)).subscribe(({ original }: DotTemplateState) => {\n if (this.form) {\n const value = this.getFormValue(original);\n\n this.form.setValue(value);\n } else {\n this.form = this.getForm(original);\n }\n\n if (!original.identifier) {\n this.createTemplate();\n }\n });\n this.setSwitchSiteListener();\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.complete();\n }\n\n /**\n * Start template properties edition\n *\n * @memberof DotTemplateCreateEditComponent\n */\n editTemplateProps(): void {\n this.dialogService.open(DotTemplatePropsComponent, {\n header: this.dotMessageService.get('templates.properties.title'),\n width: '30rem',\n data: {\n template: this.form.value,\n onSave: (value: DotTemplateItem) => {\n this.store.saveProperties(value);\n }\n }\n });\n }\n\n /**\n * Save template to store\n *\n * @memberof DotTemplateCreateEditComponent\n */\n saveTemplate({ layout, body, themeId }: DotTemplate): void {\n let value = {\n ...this.form.value,\n body\n };\n\n if (layout) {\n value = {\n ...this.form.value,\n layout,\n theme: themeId\n };\n }\n this.store.saveTemplate({\n ...this.form.value,\n ...value\n });\n }\n\n /**\n * Handle cancel button from designer\n *\n * @memberof DotTemplateCreateEditComponent\n */\n cancelTemplate() {\n this.store.goToTemplateList();\n }\n\n /**\n * Handle the custom event emitted by the History Tab\n *\n * @param CustomEvent $event\n * @memberof DotTemplateBuilderComponent\n */\n onCustomEvent($event: CustomEvent): void {\n this.store.goToEditTemplate($event.detail.data.id, $event.detail.data.inode);\n }\n\n private createTemplate(): void {\n const ref: DynamicDialogRef = this.dialogService.open(DotTemplatePropsComponent, {\n header: this.dotMessageService.get('templates.create.title'),\n width: '40rem',\n closable: false,\n closeOnEscape: false,\n data: {\n template: this.form.value,\n onSave: (value: DotTemplateItem) => {\n this.store.createTemplate(value);\n }\n }\n });\n ref.onClose.pipe(takeUntil(this.destroy$)).subscribe((goToListing: boolean) => {\n if (goToListing || goToListing === undefined) {\n this.cancelTemplate();\n }\n });\n }\n\n private getForm(template: DotTemplateItem): FormGroup {\n if (template.type === 'design') {\n return this.fb.group({\n title: [template.title, Validators.required],\n layout: this.fb.group(template.layout),\n identifier: template.identifier,\n friendlyName: template.friendlyName,\n theme: template.theme,\n image: template.image\n });\n }\n\n return this.fb.group({\n title: [template.title, Validators.required],\n body: template.body,\n identifier: template.identifier,\n friendlyName: template.friendlyName,\n image: template.image\n });\n }\n\n private getFormValue(template: DotTemplateItem): { [key: string]: any } {\n if (template.type === 'design') {\n return {\n title: template.title,\n layout: template.layout,\n identifier: template.identifier,\n friendlyName: template.friendlyName,\n theme: template.theme,\n image: template.image\n };\n }\n\n return {\n title: template.title,\n body: template.body,\n identifier: template.identifier,\n friendlyName: template.friendlyName,\n image: template.image\n };\n }\n\n private setSwitchSiteListener(): void {\n /**\n * When the portlet reload (from the browser reload button), the site service emits\n * the switchSite$ because the `currentSite` was undefined and the loads the site, that trigger\n * an unwanted reload.\n *\n * This extra work in the filter is to prevent that extra reload.\n *\n */\n let currentHost = this.dotSiteService.currentSite?.hostname || null;\n this.dotSiteService.switchSite$\n .pipe(\n takeUntil(this.destroy$),\n filter((site: Site) => {\n if (currentHost === null) {\n currentHost = site?.hostname;\n return false;\n }\n return true;\n })\n )\n .subscribe(() => {\n this.store.goToTemplateList();\n });\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": ":host {\n display: block;\n height: 100%;\n}\n\ndot-portlet-base {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n", + "styleUrl": "./dot-template-create-edit.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "store", + "type": "DotTemplateStore", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "fb", + "type": "FormBuilder", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dialogService", + "type": "DialogService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotMessageService", + "type": "DotMessageService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotSiteService", + "type": "SiteService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 28, + "jsdoctags": [ + { + "name": "store", + "type": "DotTemplateStore", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "fb", + "type": "FormBuilder", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dialogService", + "type": "DialogService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotMessageService", + "type": "DotMessageService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotSiteService", + "type": "SiteService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": ["OnInit", "OnDestroy"], + "templateData": "\n \n \n \n \n \n \n \n \n \n\n" + }, + { + "name": "DotTemplateListComponent", + "id": "component-DotTemplateListComponent-2bad76c9a7bc13cf49bd7ae54633fc3ece4958de720220f1a8974007919114a5bca6dd452e7abe145b8731065c1550d8e0ffe9324755356d7980c8387c2ef35c", + "file": "apps/dotcms-ui/src/app/portlets/dot-templates/dot-template-list/dot-template-list.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-template-list", + "styleUrls": ["./dot-template-list.component.scss"], + "styles": [], + "templateUrl": ["./dot-template-list.component.html"], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "actionHeaderOptions", + "deprecated": false, + "deprecationMessage": "", + "type": "ActionHeaderOptions", + "optional": false, + "description": "", + "line": 37 + }, + { + "name": "addToBundleIdentifier", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 38 + }, + { + "name": "destroy$", + "defaultValue": "new Subject()", + "deprecated": false, + "deprecationMessage": "", + "type": "Subject", + "optional": false, + "description": "", + "line": 43, + "modifierKind": [121] + }, + { + "name": "dialogService", + "deprecated": false, + "deprecationMessage": "", + "type": "DialogService", + "optional": false, + "description": "", + "line": 54, + "modifierKind": [123] + }, + { + "name": "hasEnvironments", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 42, + "modifierKind": [121] + }, + { + "name": "isEnterPrise", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 41, + "modifierKind": [121] + }, + { + "name": "listing", + "deprecated": false, + "deprecationMessage": "", + "type": "DotListingDataTableComponent", + "optional": false, + "description": "", + "line": 34, + "decorators": [ + { + "name": "ViewChild", + "stringifiedArguments": "'listing', {static: false}" + } + ] + }, + { + "name": "selectedTemplates", + "defaultValue": "[]", + "deprecated": false, + "deprecationMessage": "", + "type": "DotTemplate[]", + "optional": false, + "description": "", + "line": 39 + }, + { + "name": "tableColumns", + "deprecated": false, + "deprecationMessage": "", + "type": "DataTableColumn[]", + "optional": false, + "description": "", + "line": 35 + }, + { + "name": "templateBulkActions", + "deprecated": false, + "deprecationMessage": "", + "type": "MenuItem[]", + "optional": false, + "description": "", + "line": 36 + } + ], + "methodsClass": [ + { + "name": "archiveTemplates", + "args": [ + { + "name": "identifiers", + "type": "string[]", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 510, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "identifiers", + "type": "string[]", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "deleteTemplate", + "args": [ + { + "name": "identifiers", + "type": "string[]", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 467, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "identifiers", + "type": "string[]", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "editTemplate", + "args": [ + { + "name": "template", + "type": "DotTemplate", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 107, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nHandle selected template.\n\n", + "description": "

    Handle selected template.

    \n", + "jsdoctags": [ + { + "name": "template", + "type": "DotTemplate", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getFailsInfo", + "args": [ + { + "name": "items", + "type": "DotBulkFailItem[]", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "DotBulkFailItem[]", + "typeParameters": [], + "line": 552, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "items", + "type": "DotBulkFailItem[]", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getTemplateName", + "args": [ + { + "name": "identifier", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 558, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "identifier", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getTemplateState", + "args": [ + { + "type": "DotTemplate", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "DotContentState", + "typeParameters": [], + "line": 180, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nget the attributes that define the state of a template.\n", + "description": "

    get the attributes that define the state of a template.

    \n", + "jsdoctags": [ + { + "type": "DotTemplate", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "tagName": { + "pos": 7007, + "end": 7014, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "returns" + }, + "comment": "

    DotContentState

    \n" + } + ] + }, + { + "name": "handleArchivedFilter", + "args": [ + { + "name": "checked", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 121, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nHandle filter for hide / show archive templates\n\n", + "description": "

    Handle filter for hide / show archive templates

    \n", + "jsdoctags": [ + { + "name": { + "pos": 4975, + "end": 4982, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "checked" + }, + "type": "boolean", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 4959, + "end": 4964, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 4965, + "end": 4974, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 4966, + "end": 4973, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 133 + } + } + } + ] + }, + { + "name": "handleButtonClick", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 221, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "isTemplateAsFile", + "args": [ + { + "type": "DotTemplate", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 217, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nIdentify if is a template as File based on the identifier path.\n", + "description": "

    Identify if is a template as File based on the identifier path.

    \n", + "jsdoctags": [ + { + "type": "DotTemplate", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "tagName": { + "pos": 8280, + "end": 8287, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "returns" + }, + "comment": "

    boolean

    \n" + } + ] + }, + { + "name": "mapTableItems", + "args": [ + { + "name": "templates", + "type": "DotTemplate[]", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "DotTemplate[]", + "typeParameters": [], + "line": 204, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nMap table results to add the disableInteraction property.\n", + "description": "

    Map table results to add the disableInteraction property.

    \n", + "jsdoctags": [ + { + "name": { + "pos": 7816, + "end": 7825, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "templates" + }, + "type": "DotTemplate[]", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 7794, + "end": 7799, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 7800, + "end": 7815, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 7801, + "end": 7814, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 182, + "elementType": { + "pos": 7801, + "end": 7812, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 177, + "typeName": { + "pos": 7801, + "end": 7812, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "DotTemplate" + } + } + } + } + }, + { + "tagName": { + "pos": 7834, + "end": 7841, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "returns" + }, + "comment": "

    DotTemplate[]

    \n" + } + ] + }, + { + "name": "ngOnDestroy", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 96, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 58, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "notifyResult", + "args": [ + { + "name": "response", + "type": "DotActionBulkResult", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "messageKey", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 519, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "response", + "type": "DotActionBulkResult", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "messageKey", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "publishTemplate", + "args": [ + { + "name": "identifiers", + "type": "string[]", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 483, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "identifiers", + "type": "string[]", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "setAddOptions", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 250, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "setArchiveTemplateActions", + "args": [ + { + "name": "template", + "type": "DotTemplate", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "DotActionMenuItem[]", + "typeParameters": [], + "line": 441, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "template", + "type": "DotTemplate", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "setBaseTemplateOptions", + "args": [ + { + "name": "template", + "type": "DotTemplate", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "DotActionMenuItem[]", + "typeParameters": [], + "line": 413, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "template", + "type": "DotTemplate", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "setContextMenu", + "args": [ + { + "name": "template", + "type": "DotTemplate", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 168, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nset the content menu items of the listing to be shown, base on the template status.\n", + "description": "

    set the content menu items of the listing to be shown, base on the template status.

    \n", + "jsdoctags": [ + { + "name": { + "pos": 6594, + "end": 6602, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "template" + }, + "type": "DotTemplate", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 6574, + "end": 6579, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 6580, + "end": 6593, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 6581, + "end": 6592, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 177, + "typeName": { + "pos": 6581, + "end": 6592, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "DotTemplate" + } + } + } + } + ] + }, + { + "name": "setCopyTemplateOptions", + "args": [ + { + "name": "template", + "type": "DotTemplate", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "DotActionMenuItem[]", + "typeParameters": [], + "line": 306, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "template", + "type": "DotTemplate", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "setLicenseAndRemotePublishTemplateBulkOptions", + "args": [], + "optional": false, + "returnType": "MenuItem[]", + "typeParameters": [], + "line": 384, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "setLicenseAndRemotePublishTemplateOptions", + "args": [ + { + "name": "template", + "type": "DotTemplate", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "DotActionMenuItem[]", + "typeParameters": [], + "line": 355, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "template", + "type": "DotTemplate", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "setStateLabels", + "args": [], + "optional": false, + "returnType": "literal type", + "typeParameters": [], + "line": 189, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nset the labels of dot-state-icon.\n", + "description": "

    set the labels of dot-state-icon.

    \n", + "jsdoctags": [ + { + "tagName": { + "pos": 7301, + "end": 7308, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "returns" + }, + "comment": "

    : string }

    \n", + "returnType": "" + } + ] + }, + { + "name": "setTemplateActions", + "args": [ + { + "name": "template", + "type": "DotTemplate", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "DotActionMenuItem[]", + "typeParameters": [], + "line": 144, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nSet the actions of each template based o current state.\n* @returns DotActionMenuItem[]\n", + "description": "

    Set the actions of each template based o current state.

    \n
      \n
    • @returns DotActionMenuItem[]
    • \n
    \n", + "jsdoctags": [ + { + "name": { + "pos": 5677, + "end": 5685, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "template" + }, + "type": "DotTemplate", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 5657, + "end": 5662, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "
      \n
    • \n
    \n", + "typeExpression": { + "pos": 5663, + "end": 5676, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 5664, + "end": 5675, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 177, + "typeName": { + "pos": 5664, + "end": 5675, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "DotTemplate" + } + } + } + }, + { + "tagName": { + "pos": 5695, + "end": 5702, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "returns" + }, + "comment": "

    DotActionMenuItem[]

    \n" + } + ] + }, + { + "name": "setTemplateBulkActions", + "args": [], + "optional": false, + "returnType": "MenuItem[]", + "typeParameters": [], + "line": 260, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "setTemplateColumns", + "args": [], + "optional": false, + "returnType": "DataTableColumn[]", + "typeParameters": [], + "line": 225, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "setUnPublishAndArchiveTemplateOptions", + "args": [ + { + "name": "template", + "type": "DotTemplate", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "DotActionMenuItem[]", + "typeParameters": [], + "line": 331, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "template", + "type": "DotTemplate", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "showErrorDialog", + "args": [ + { + "name": "result", + "type": "DotActionBulkResult", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 542, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "result", + "type": "DotActionBulkResult", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "showToastNotification", + "args": [ + { + "name": "message", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 533, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "message", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "unArchiveTemplate", + "args": [ + { + "name": "identifiers", + "type": "string[]", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 501, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "identifiers", + "type": "string[]", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "unPublishTemplate", + "args": [ + { + "name": "identifiers", + "type": "string[]", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 492, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "identifiers", + "type": "string[]", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "updateSelectedTemplates", + "args": [ + { + "name": "templates", + "type": "DotTemplate[]", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 134, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nKeep updated the selected templates in the grid\n\n", + "description": "

    Keep updated the selected templates in the grid

    \n", + "jsdoctags": [ + { + "name": { + "pos": 5398, + "end": 5407, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "templates" + }, + "type": "DotTemplate[]", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 5376, + "end": 5381, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 5382, + "end": 5397, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 5383, + "end": 5396, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 182, + "elementType": { + "pos": 5383, + "end": 5394, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 177, + "typeName": { + "pos": 5383, + "end": 5394, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "DotTemplate" + } + } + } + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, OnDestroy, OnInit, ViewChild } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { filter, pluck, take, takeUntil } from 'rxjs/operators';\nimport { Subject } from 'rxjs';\nimport { DotTemplate } from '@models/dot-edit-layout-designer';\nimport { DataTableColumn } from '@models/data-table';\nimport { DotMessageService } from '@services/dot-message/dot-messages.service';\nimport { DotListingDataTableComponent } from '@components/dot-listing-data-table/dot-listing-data-table.component';\nimport { MenuItem } from 'primeng/api';\nimport { ActionHeaderOptions } from '@models/action-header';\nimport { DotActionMenuItem } from '@models/dot-action-menu/dot-action-menu-item.model';\nimport { DotTemplatesService } from '@services/dot-templates/dot-templates.service';\nimport { DotMessageDisplayService } from '@components/dot-message-display/services';\nimport { DotMessageSeverity, DotMessageType } from '@components/dot-message-display/model';\nimport { DotPushPublishDialogService, Site, SiteService } from '@dotcms/dotcms-js';\nimport { DotRouterService } from '@services/dot-router/dot-router.service';\nimport { DialogService } from 'primeng/dynamicdialog';\nimport { DotBulkInformationComponent } from '@components/_common/dot-bulk-information/dot-bulk-information.component';\nimport {\n DotActionBulkResult,\n DotBulkFailItem\n} from '@models/dot-action-bulk-result/dot-action-bulk-result.model';\nimport { DotContentState } from '@dotcms/dotcms-models';\nimport { DotAlertConfirmService } from '@services/dot-alert-confirm';\nimport { DotSiteBrowserService } from '@services/dot-site-browser/dot-site-browser.service';\n\n@Component({\n selector: 'dot-template-list',\n templateUrl: './dot-template-list.component.html',\n styleUrls: ['./dot-template-list.component.scss']\n})\nexport class DotTemplateListComponent implements OnInit, OnDestroy {\n @ViewChild('listing', { static: false })\n listing: DotListingDataTableComponent;\n tableColumns: DataTableColumn[];\n templateBulkActions: MenuItem[];\n actionHeaderOptions: ActionHeaderOptions;\n addToBundleIdentifier: string;\n selectedTemplates: DotTemplate[] = [];\n\n private isEnterPrise: boolean;\n private hasEnvironments: boolean;\n private destroy$: Subject = new Subject();\n\n constructor(\n private dotAlertConfirmService: DotAlertConfirmService,\n private dotMessageDisplayService: DotMessageDisplayService,\n private dotMessageService: DotMessageService,\n private dotPushPublishDialogService: DotPushPublishDialogService,\n private dotRouterService: DotRouterService,\n private dotSiteService: SiteService,\n private dotTemplatesService: DotTemplatesService,\n private route: ActivatedRoute,\n public dialogService: DialogService,\n private dotSiteBrowserService: DotSiteBrowserService\n ) {}\n\n ngOnInit(): void {\n this.route.data\n .pipe(pluck('dotTemplateListResolverData'), take(1))\n .subscribe(([isEnterPrise, hasEnvironments]: [boolean, boolean]) => {\n this.isEnterPrise = isEnterPrise;\n this.hasEnvironments = hasEnvironments;\n this.tableColumns = this.setTemplateColumns();\n this.templateBulkActions = this.setTemplateBulkActions();\n });\n this.setAddOptions();\n\n /**\n * When the portlet reload (from the browser reload button), the site service emits\n * the switchSite$ because the `currentSite` was undefined and the loads the site, that trigger\n * an unwanted reload.\n *\n * This extra work in the filter is to prevent that extra reload.\n *\n */\n let currentHost = this.dotSiteService.currentSite?.hostname || null;\n\n this.dotSiteService.switchSite$\n .pipe(\n takeUntil(this.destroy$),\n filter((site: Site) => {\n if (currentHost === null) {\n currentHost = site?.hostname;\n return false;\n }\n\n return true;\n })\n )\n .subscribe(() => {\n this.dotRouterService.gotoPortlet('templates');\n });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.complete();\n }\n\n /**\n * Handle selected template.\n *\n * @param {DotTemplate} { template }\n * @memberof DotTemplateListComponent\n */\n editTemplate(template: DotTemplate): void {\n this.isTemplateAsFile(template)\n ? this.dotSiteBrowserService.setSelectedFolder(template.identifier).subscribe(() => {\n this.dotRouterService.goToSiteBrowser();\n })\n : this.dotRouterService.goToEditTemplate(template.identifier);\n }\n\n /**\n * Handle filter for hide / show archive templates\n * @param {boolean} checked\n *\n * @memberof DotTemplateListComponent\n */\n handleArchivedFilter(checked: boolean): void {\n checked\n ? this.listing.paginatorService.setExtraParams('archive', checked)\n : this.listing.paginatorService.deleteExtraParams('archive');\n this.listing.loadFirstPage();\n }\n\n /**\n * Keep updated the selected templates in the grid\n * @param {DotTemplate[]} templates\n *\n * @memberof DotTemplateListComponent\n */\n updateSelectedTemplates(templates: DotTemplate[]): void {\n this.selectedTemplates = templates;\n }\n\n /**\n * Set the actions of each template based o current state.\n * @param {DotTemplate} template\n ** @returns DotActionMenuItem[]\n * @memberof DotTemplateListComponent\n */\n setTemplateActions(template: DotTemplate): DotActionMenuItem[] {\n let options: DotActionMenuItem[];\n if (template.deleted) {\n options = this.setArchiveTemplateActions(template);\n } else {\n options = this.setBaseTemplateOptions(template);\n if (template.canPublish) {\n options = [\n ...options,\n ...this.setLicenseAndRemotePublishTemplateOptions(template),\n ...this.setUnPublishAndArchiveTemplateOptions(template)\n ];\n }\n options = [...options, ...this.setCopyTemplateOptions(template)];\n }\n\n return options;\n }\n\n /**\n * set the content menu items of the listing to be shown, base on the template status.\n * @param {DotTemplate} template\n * @memberof DotTemplateListComponent\n */\n setContextMenu(template: DotTemplate): void {\n this.listing.contextMenuItems = this.setTemplateActions(template).map(\n ({ menuItem }: DotActionMenuItem) => menuItem\n );\n }\n\n /**\n * get the attributes that define the state of a template.\n * @param {DotTemplate} { live, working, deleted, hasLiveVersion}\n * @returns DotContentState\n * @memberof DotTemplateListComponent\n */\n getTemplateState({ live, working, deleted, hasLiveVersion }: DotTemplate): DotContentState {\n return { live, working, deleted, hasLiveVersion };\n }\n\n /**\n * set the labels of dot-state-icon.\n * @returns { [key: string]: string }\n * @memberof DotTemplateListComponent\n */\n setStateLabels(): { [key: string]: string } {\n return {\n archived: this.dotMessageService.get('Archived'),\n published: this.dotMessageService.get('Published'),\n revision: this.dotMessageService.get('Revision'),\n draft: this.dotMessageService.get('Draft')\n };\n }\n\n /**\n * Map table results to add the disableInteraction property.\n * @param {DotTemplate[]} templates\n * @returns DotTemplate[]\n * @memberof DotTemplateListComponent\n */\n mapTableItems(templates: DotTemplate[]): DotTemplate[] {\n return templates.map((template) => {\n template.disableInteraction = template.identifier.includes('/') ? true : false;\n return template;\n });\n }\n\n /**\n * Identify if is a template as File based on the identifier path.\n * @param {DotTemplate} {identifier}\n * @returns boolean\n * @memberof DotTemplateListComponent\n */\n isTemplateAsFile({ identifier }: DotTemplate): boolean {\n return identifier.includes('/');\n }\n\n handleButtonClick(): void {\n this.dotRouterService.gotoPortlet(`/templates/new`);\n }\n\n private setTemplateColumns(): DataTableColumn[] {\n return [\n {\n fieldName: 'name',\n header: this.dotMessageService.get('templates.fieldName.name'),\n sortable: true\n },\n {\n fieldName: 'status',\n header: this.dotMessageService.get('templates.fieldName.status'),\n width: '8%'\n },\n {\n fieldName: 'friendlyName',\n header: this.dotMessageService.get('templates.fieldName.description')\n },\n {\n fieldName: 'modDate',\n format: 'date',\n header: this.dotMessageService.get('templates.fieldName.lastEdit'),\n sortable: true\n }\n ];\n }\n\n private setAddOptions(): void {\n this.actionHeaderOptions = {\n primary: {\n command: () => {\n this.dotRouterService.gotoPortlet(`/templates/new`);\n }\n }\n };\n }\n\n private setTemplateBulkActions(): MenuItem[] {\n return [\n {\n label: this.dotMessageService.get('Publish'),\n command: () => {\n this.publishTemplate(\n this.selectedTemplates.map((template) => template.identifier)\n );\n }\n },\n ...this.setLicenseAndRemotePublishTemplateBulkOptions(),\n {\n label: this.dotMessageService.get('Unpublish'),\n command: () => {\n this.unPublishTemplate(\n this.selectedTemplates.map((template) => template.identifier)\n );\n }\n },\n {\n label: this.dotMessageService.get('Archive'),\n command: () => {\n this.archiveTemplates(\n this.selectedTemplates.map((template) => template.identifier)\n );\n }\n },\n {\n label: this.dotMessageService.get('Unarchive'),\n command: () => {\n this.unArchiveTemplate(\n this.selectedTemplates.map((template) => template.identifier)\n );\n }\n },\n {\n label: this.dotMessageService.get('Delete'),\n command: () => {\n this.deleteTemplate(\n this.selectedTemplates.map((template) => template.identifier)\n );\n }\n }\n ];\n }\n\n private setCopyTemplateOptions(template: DotTemplate): DotActionMenuItem[] {\n return template.canWrite\n ? [\n {\n menuItem: {\n label: this.dotMessageService.get('Copy'),\n command: () => {\n this.dotTemplatesService\n .copy(template.identifier)\n .pipe(take(1))\n .subscribe((response: DotTemplate) => {\n if (response) {\n this.showToastNotification(\n this.dotMessageService.get('message.template.copy')\n );\n this.listing.loadCurrentPage();\n }\n });\n }\n }\n }\n ]\n : [];\n }\n\n private setUnPublishAndArchiveTemplateOptions(template: DotTemplate): DotActionMenuItem[] {\n const options: DotActionMenuItem[] = [];\n if (template.live) {\n options.push({\n menuItem: {\n label: this.dotMessageService.get('Unpublish'),\n command: () => {\n this.unPublishTemplate([template.identifier]);\n }\n }\n });\n } else {\n options.push({\n menuItem: {\n label: this.dotMessageService.get('Archive'),\n command: () => {\n this.archiveTemplates([template.identifier]);\n }\n }\n });\n }\n return options;\n }\n\n private setLicenseAndRemotePublishTemplateOptions(template: DotTemplate): DotActionMenuItem[] {\n const options: DotActionMenuItem[] = [];\n if (this.hasEnvironments) {\n options.push({\n menuItem: {\n label: this.dotMessageService.get('Remote-Publish'),\n command: () => {\n this.dotPushPublishDialogService.open({\n assetIdentifier: template.identifier,\n title: this.dotMessageService.get('contenttypes.content.push_publish')\n });\n }\n }\n });\n }\n\n if (this.isEnterPrise) {\n options.push({\n menuItem: {\n label: this.dotMessageService.get('Add-To-Bundle'),\n command: () => {\n this.addToBundleIdentifier = template.identifier;\n }\n }\n });\n }\n return options;\n }\n\n private setLicenseAndRemotePublishTemplateBulkOptions(): MenuItem[] {\n const bulkOptions: MenuItem[] = [];\n if (this.hasEnvironments) {\n bulkOptions.push({\n label: this.dotMessageService.get('Remote-Publish'),\n command: () => {\n this.dotPushPublishDialogService.open({\n assetIdentifier: this.selectedTemplates\n .map((template) => template.identifier)\n .toString(),\n title: this.dotMessageService.get('contenttypes.content.push_publish')\n });\n }\n });\n }\n\n if (this.isEnterPrise) {\n bulkOptions.push({\n label: this.dotMessageService.get('Add-To-Bundle'),\n command: () => {\n this.addToBundleIdentifier = this.selectedTemplates\n .map((template) => template.identifier)\n .toString();\n }\n });\n }\n return bulkOptions;\n }\n\n private setBaseTemplateOptions(template: DotTemplate): DotActionMenuItem[] {\n const options: DotActionMenuItem[] = [];\n\n if (template.canWrite) {\n options.push({\n menuItem: {\n label: this.dotMessageService.get('edit'),\n command: () => {\n this.editTemplate(template);\n }\n }\n });\n }\n\n if (template.canPublish) {\n options.push({\n menuItem: {\n label: this.dotMessageService.get('publish'),\n command: () => {\n this.publishTemplate([template.identifier]);\n }\n }\n });\n }\n\n return options;\n }\n\n private setArchiveTemplateActions(template: DotTemplate): DotActionMenuItem[] {\n const options: DotActionMenuItem[] = [];\n if (template.canPublish) {\n options.push({\n menuItem: {\n label: this.dotMessageService.get('Unarchive'),\n command: () => {\n this.unArchiveTemplate([template.identifier]);\n }\n }\n });\n }\n\n if (template.canWrite) {\n options.push({\n menuItem: {\n label: this.dotMessageService.get('Delete'),\n command: () => {\n this.deleteTemplate([template.identifier]);\n }\n }\n });\n }\n return options;\n }\n\n private deleteTemplate(identifiers: string[]): void {\n this.dotAlertConfirmService.confirm({\n accept: () => {\n this.dotTemplatesService\n .delete(identifiers)\n .pipe(take(1))\n .subscribe((response: DotActionBulkResult) => {\n this.notifyResult(response, 'message.template.full_delete');\n });\n },\n reject: () => {},\n header: this.dotMessageService.get('Delete-Template'),\n message: this.dotMessageService.get('message.template.confirm.delete.template')\n });\n }\n\n private publishTemplate(identifiers: string[]): void {\n this.dotTemplatesService\n .publish(identifiers)\n .pipe(take(1))\n .subscribe((response: DotActionBulkResult) => {\n this.notifyResult(response, 'message.template_list.published');\n });\n }\n\n private unPublishTemplate(identifiers: string[]): void {\n this.dotTemplatesService\n .unPublish(identifiers)\n .pipe(take(1))\n .subscribe((response: DotActionBulkResult) => {\n this.notifyResult(response, 'message.template.unpublished');\n });\n }\n\n private unArchiveTemplate(identifiers: string[]): void {\n this.dotTemplatesService\n .unArchive(identifiers)\n .pipe(take(1))\n .subscribe((response: DotActionBulkResult) => {\n this.notifyResult(response, 'message.template.undelete');\n });\n }\n\n private archiveTemplates(identifiers: string[]): void {\n this.dotTemplatesService\n .archive(identifiers)\n .pipe(take(1))\n .subscribe((response: DotActionBulkResult) => {\n this.notifyResult(response, 'message.template.delete');\n });\n }\n\n private notifyResult(response: DotActionBulkResult, messageKey: string): void {\n if (response.fails.length) {\n this.showErrorDialog({\n ...response,\n fails: this.getFailsInfo(response.fails),\n action: this.dotMessageService.get(messageKey)\n });\n } else {\n this.showToastNotification(this.dotMessageService.get(messageKey));\n }\n this.listing.clearSelection();\n this.listing.loadCurrentPage();\n }\n\n private showToastNotification(message: string): void {\n this.dotMessageDisplayService.push({\n life: 3000,\n message: message,\n severity: DotMessageSeverity.SUCCESS,\n type: DotMessageType.SIMPLE_MESSAGE\n });\n }\n\n private showErrorDialog(result: DotActionBulkResult): void {\n this.dialogService.open(DotBulkInformationComponent, {\n header: this.dotMessageService.get('Results'),\n width: '40rem',\n contentStyle: { 'max-height': '500px', overflow: 'auto' },\n baseZIndex: 10000,\n data: result\n });\n }\n\n private getFailsInfo(items: DotBulkFailItem[]): DotBulkFailItem[] {\n return items.map((item: DotBulkFailItem) => {\n return { ...item, description: this.getTemplateName(item.element) };\n });\n }\n\n private getTemplateName(identifier: string): string {\n return this.listing.items.find((template: DotTemplate) => {\n return template.identifier === identifier;\n }).name;\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"variables\" as *;\n\n:host {\n background: $gray-bg;\n box-shadow: $md-shadow-4;\n display: flex;\n height: 100%;\n overflow: auto;\n padding: $spacing-4 $spacing-4 0;\n\n &::ng-deep listing-data-table tr {\n cursor: pointer;\n }\n}\n\n.template-listing__header-options {\n width: 100%;\n\n div {\n display: flex;\n justify-content: space-between;\n margin: 0 $spacing-3;\n }\n}\n\ndot-state-icon {\n margin-right: 0.25rem;\n}\n", + "styleUrl": "./dot-template-list.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "dotAlertConfirmService", + "type": "DotAlertConfirmService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotMessageDisplayService", + "type": "DotMessageDisplayService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotMessageService", + "type": "DotMessageService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotPushPublishDialogService", + "type": "DotPushPublishDialogService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotRouterService", + "type": "DotRouterService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotSiteService", + "type": "SiteService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotTemplatesService", + "type": "DotTemplatesService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "route", + "type": "ActivatedRoute", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dialogService", + "type": "DialogService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotSiteBrowserService", + "type": "DotSiteBrowserService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 43, + "jsdoctags": [ + { + "name": "dotAlertConfirmService", + "type": "DotAlertConfirmService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotMessageDisplayService", + "type": "DotMessageDisplayService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotMessageService", + "type": "DotMessageService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotPushPublishDialogService", + "type": "DotPushPublishDialogService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotRouterService", + "type": "DotRouterService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotSiteService", + "type": "SiteService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotTemplatesService", + "type": "DotTemplatesService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "route", + "type": "ActivatedRoute", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dialogService", + "type": "DialogService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotSiteBrowserService", + "type": "DotSiteBrowserService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": ["OnInit", "OnDestroy"], + "templateData": "\n
    \n
    \n \n \n
    \n \n
    \n\n \n \n\n \n \n {{ rowData.name }}\n \n \n \n \n \n \n {{ rowData.friendlyName }}\n \n \n {{ rowData.modDate }}\n \n \n \n \n \n \n\n\n\n" + }, + { + "name": "DotTemplateNewComponent", + "id": "component-DotTemplateNewComponent-83b410d661ffc65cef81d20bf249dd0a6892bcc0ee204b14e6ced86382871ec79b5c73c46941ea0578a5127c89b1a833911bb10d7248d6118f39352bf3dda5bb", + "file": "apps/dotcms-ui/src/app/portlets/dot-templates/dot-template-create-edit/dot-template-new/dot-template-new.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-dot-template-new", + "styleUrls": ["./dot-template-new.component.scss"], + "styles": [], + "templateUrl": ["./dot-template-new.component.html"], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [], + "methodsClass": [ + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 22, + "deprecated": false, + "deprecationMessage": "" + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, OnInit } from '@angular/core';\nimport { take } from 'rxjs/operators';\n\nimport { DialogService } from 'primeng/dynamicdialog';\n\nimport { DotTemplateSelectorComponent } from '@portlets/dot-templates/dot-template-list/components/dot-template-selector/dot-template-selector.component';\nimport { DotMessageService } from '@services/dot-message/dot-messages.service';\nimport { DotRouterService } from '@services/dot-router/dot-router.service';\n\n@Component({\n selector: 'dot-dot-template-new',\n templateUrl: './dot-template-new.component.html',\n styleUrls: ['./dot-template-new.component.scss']\n})\nexport class DotTemplateNewComponent implements OnInit {\n constructor(\n private dialogService: DialogService,\n private dotMessageService: DotMessageService,\n private dotRouterService: DotRouterService\n ) {}\n\n ngOnInit(): void {\n const ref = this.dialogService.open(DotTemplateSelectorComponent, {\n header: this.dotMessageService.get('templates.select.template.title'),\n width: '37rem'\n });\n\n ref.onClose.pipe(take(1)).subscribe((value: string) => {\n value\n ? this.dotRouterService.gotoPortlet(`/templates/new/${value}`)\n : this.dotRouterService.goToURL(`/templates`);\n });\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "", + "styleUrl": "./dot-template-new.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "dialogService", + "type": "DialogService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotMessageService", + "type": "DotMessageService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotRouterService", + "type": "DotRouterService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 15, + "jsdoctags": [ + { + "name": "dialogService", + "type": "DialogService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotMessageService", + "type": "DotMessageService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotRouterService", + "type": "DotRouterService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": ["OnInit"], + "templateData": "" + }, + { + "name": "DotTemplatePropsComponent", + "id": "component-DotTemplatePropsComponent-ad70f03e1cd79d70ffcb067ea39b66ecdf78799ee7049b5df1a234a03d7a0d59ebff63349e3c893c665c0366cb0e69557a10ab3bdaece529adf8bc8e34ea721e", + "file": "apps/dotcms-ui/src/app/portlets/dot-templates/dot-template-create-edit/dot-template-props/dot-template-props.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-template-props", + "styleUrls": ["./dot-template-props.component.scss"], + "styles": [], + "templateUrl": ["./dot-template-props.component.html"], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "form", + "deprecated": false, + "deprecationMessage": "", + "type": "FormGroup", + "optional": false, + "description": "", + "line": 13 + }, + { + "name": "isFormValid$", + "deprecated": false, + "deprecationMessage": "", + "type": "Observable", + "optional": false, + "description": "", + "line": 15 + } + ], + "methodsClass": [ + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 23, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "onCancel", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 64, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nHandle cancel button\n\n", + "description": "

    Handle cancel button

    \n", + "jsdoctags": [] + }, + { + "name": "onSave", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 54, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nHandle save button\n\n", + "description": "

    Handle save button

    \n", + "jsdoctags": [] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, OnInit } from '@angular/core';\nimport { FormBuilder, FormGroup, Validators } from '@angular/forms';\nimport { DynamicDialogConfig, DynamicDialogRef } from 'primeng/dynamicdialog';\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\n@Component({\n selector: 'dot-template-props',\n templateUrl: './dot-template-props.component.html',\n styleUrls: ['./dot-template-props.component.scss']\n})\nexport class DotTemplatePropsComponent implements OnInit {\n form: FormGroup;\n\n isFormValid$: Observable;\n\n constructor(\n private ref: DynamicDialogRef,\n private config: DynamicDialogConfig,\n private fb: FormBuilder\n ) {}\n\n ngOnInit(): void {\n const { template } = this.config.data;\n\n const formGroupAttrs =\n template.theme !== undefined\n ? {\n ...template,\n title: [template.title, Validators.required],\n theme: [template.theme, Validators.required]\n }\n : {\n ...template,\n title: [template.title, Validators.required]\n };\n\n this.form = this.fb.group(formGroupAttrs);\n\n this.isFormValid$ = this.form.valueChanges.pipe(\n map(() => {\n return (\n JSON.stringify(this.form.value) !== JSON.stringify(template) && this.form.valid\n );\n })\n );\n }\n\n /**\n * Handle save button\n *\n * @memberof DotTemplatePropsComponent\n */\n onSave(): void {\n this.config.data?.onSave?.(this.form.value);\n this.ref.close(false);\n }\n\n /**\n * Handle cancel button\n *\n * @memberof DotTemplatePropsComponent\n */\n onCancel(): void {\n this.ref.close(true);\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "textarea {\n resize: vertical;\n}\n", + "styleUrl": "./dot-template-props.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "ref", + "type": "DynamicDialogRef", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "config", + "type": "DynamicDialogConfig", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "fb", + "type": "FormBuilder", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 15, + "jsdoctags": [ + { + "name": "ref", + "type": "DynamicDialogRef", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "config", + "type": "DynamicDialogConfig", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "fb", + "type": "FormBuilder", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": ["OnInit"], + "templateData": "\n
    \n
    \n \n \n \n
    \n
    \n \n \n
    \n \n
    \n \n \n
    \n
    \n
    \n \n \n
    \n
    \n\n" + }, + { + "name": "DotTemplateSelectorComponent", + "id": "component-DotTemplateSelectorComponent-845fbc1944cf09de2ab2616b5cc360a3d4f05063cdef59991185d6ecbb6e6e1a1f6bd97ff80c11cfe1a9aa73ed0538be764593ea03e976758dd981afc066dc19", + "file": "apps/dotcms-ui/src/app/portlets/dot-templates/dot-template-list/components/dot-template-selector/dot-template-selector.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-dot-template-selector", + "styleUrls": ["./dot-template-selector.component.scss"], + "styles": [], + "templateUrl": ["./dot-template-selector.component.html"], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "map", + "defaultValue": "{\n designer: this.dotMessageService.get('templates.template.selector.design'),\n advanced: this.dotMessageService.get('templates.template.selector.advanced')\n }", + "deprecated": false, + "deprecationMessage": "", + "type": "object", + "optional": false, + "description": "", + "line": 13 + }, + { + "name": "value", + "defaultValue": "'designer'", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 11 + } + ], + "methodsClass": [ + { + "name": "onClick", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 20, + "deprecated": false, + "deprecationMessage": "" + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component } from '@angular/core';\nimport { DotMessageService } from '@services/dot-message/dot-messages.service';\nimport { DynamicDialogRef } from 'primeng/dynamicdialog';\n\n@Component({\n selector: 'dot-dot-template-selector',\n templateUrl: './dot-template-selector.component.html',\n styleUrls: ['./dot-template-selector.component.scss']\n})\nexport class DotTemplateSelectorComponent {\n value = 'designer';\n\n map = {\n designer: this.dotMessageService.get('templates.template.selector.design'),\n advanced: this.dotMessageService.get('templates.template.selector.advanced')\n };\n\n constructor(private dotMessageService: DotMessageService, private ref: DynamicDialogRef) {}\n\n onClick(): void {\n this.ref.close(this.value);\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"variables\" as *;\n\n:host {\n display: block;\n max-width: 40rem;\n text-align: right;\n}\n\n.wrapper {\n display: block;\n max-width: 24rem;\n margin: 1rem auto 3rem;\n text-align: left;\n}\n\n.options {\n display: flex;\n justify-content: space-between;\n}\n\np {\n line-height: 1.5;\n color: $gray-dark;\n}\n\n.item {\n align-items: center;\n background-color: $gray-bg;\n border: solid 2px $gray-bg;\n border-radius: $border-radius;\n color: $gray-light;\n cursor: pointer;\n display: flex;\n flex-direction: column;\n padding: $spacing-5 $spacing-6;\n transition: border-color $basic-speed ease, color $basic-speed ease;\n\n &:hover {\n color: $gray;\n }\n\n span {\n font-size: $font-size-large;\n }\n}\n\ninput[type=\"radio\"] {\n appearance: none;\n position: absolute;\n\n &:checked + .item {\n border-color: $brand-primary;\n color: $brand-primary;\n background-color: rgba($brand-secondary_rgb, 0.1);\n }\n}\n", + "styleUrl": "./dot-template-selector.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "dotMessageService", + "type": "DotMessageService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "ref", + "type": "DynamicDialogRef", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 16, + "jsdoctags": [ + { + "name": "dotMessageService", + "type": "DotMessageService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "ref", + "type": "DynamicDialogRef", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "templateData": "
    \n
    \n \n \n
    \n\n

    \n
    \n\n\n" + }, + { + "name": "DotTemplateThumbnailFieldComponent", + "id": "component-DotTemplateThumbnailFieldComponent-1462e8523b8ef572ef78d614d6b1f7471c8e748d981075163dca54114895276cd84153b18c0d39893615282e8284574cb9ddd47bbc5984a3b8de3f9f9c0069cb", + "file": "apps/dotcms-ui/src/app/portlets/dot-templates/dot-template-create-edit/dot-template-props/dot-template-thumbnail-field/dot-template-thumbnail-field.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [ + { + "name": "{\n multi: true, provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DotTemplateThumbnailFieldComponent)\n}", + "type": "component" + } + ], + "selector": "dot-template-thumbnail-field", + "styleUrls": ["./dot-template-thumbnail-field.component.scss"], + "styles": [], + "templateUrl": ["./dot-template-thumbnail-field.component.html"], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "asset", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSTemplateThumbnail", + "optional": false, + "description": "", + "line": 35 + }, + { + "name": "error", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 36 + }, + { + "name": "loading", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 37 + }, + { + "name": "propagateChange", + "defaultValue": "() => {...}", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 105 + } + ], + "methodsClass": [ + { + "name": "onThumbnailChange", + "args": [ + { + "type": "CustomEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 52, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nHandle thumbnail setup\n\n", + "description": "

    Handle thumbnail setup

    \n", + "jsdoctags": [ + { + "type": "CustomEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "registerOnChange", + "args": [ + { + "name": "fn", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 128, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "fn", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "registerOnTouched", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 132, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "writeValue", + "args": [ + { + "name": "id", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 107, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "id", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { HttpErrorResponse } from '@angular/common/http';\nimport { Component, forwardRef } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nimport { throwError } from 'rxjs';\nimport { finalize, switchMap, take } from 'rxjs/operators';\n\nimport { DotCrudService } from '@services/dot-crud';\nimport { DotMessageService } from '@services/dot-message/dot-messages.service';\nimport {\n DotCMSTempFile,\n DotTempFileUploadService\n} from '@services/dot-temp-file-upload/dot-temp-file-upload.service';\nimport { DotWorkflowActionsFireService } from '@services/dot-workflow-actions-fire/dot-workflow-actions-fire.service';\nimport { DotCMSContentlet } from '@dotcms/dotcms-models';\n\nexport interface DotCMSTemplateThumbnail extends DotCMSContentlet {\n assetVersion: string;\n name: string;\n}\n\n@Component({\n selector: 'dot-template-thumbnail-field',\n templateUrl: './dot-template-thumbnail-field.component.html',\n styleUrls: ['./dot-template-thumbnail-field.component.scss'],\n providers: [\n {\n multi: true,\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DotTemplateThumbnailFieldComponent)\n }\n ]\n})\nexport class DotTemplateThumbnailFieldComponent implements ControlValueAccessor {\n asset: DotCMSTemplateThumbnail;\n error = '';\n loading = false;\n\n constructor(\n private dotTempFileUploadService: DotTempFileUploadService,\n private dotWorkflowActionsFireService: DotWorkflowActionsFireService,\n private dotCrudService: DotCrudService,\n private dotMessageService: DotMessageService\n ) {}\n\n /**\n * Handle thumbnail setup\n *\n * @param {(CustomEvent<{ name: string; value: File | string }>)} { detail: { value } }\n * @memberof DotTemplateThumbnailFieldComponent\n */\n onThumbnailChange({\n detail: { value }\n }: CustomEvent<{ name: string; value: File | string }>): void {\n if (value) {\n this.loading = true;\n this.error = '';\n\n this.dotTempFileUploadService\n .upload(value)\n .pipe(\n switchMap(([{ id, image }]: DotCMSTempFile[]) => {\n if (!image) {\n return throwError(\n this.dotMessageService.get(\n 'templates.properties.form.thumbnail.error.invalid.url'\n )\n );\n }\n\n return this.dotWorkflowActionsFireService.publishContentletAndWaitForIndex(\n 'dotAsset',\n {\n asset: id\n }\n );\n }),\n take(1),\n finalize(() => {\n this.loading = false;\n })\n )\n .subscribe(\n (asset: DotCMSTemplateThumbnail) => {\n this.asset = asset;\n this.propagateChange(this.asset.identifier);\n },\n (err: HttpErrorResponse | string) => {\n const defaultError = this.dotMessageService.get(\n 'templates.properties.form.thumbnail.error'\n );\n this.error = typeof err === 'string' ? err : defaultError;\n }\n );\n } else if (this.asset) {\n this.asset = null;\n this.propagateChange('');\n } else {\n this.error = this.dotMessageService.get(\n 'templates.properties.form.thumbnail.error.invalid.image'\n );\n }\n }\n\n propagateChange = (_: any) => {};\n\n writeValue(id: string): void {\n this.loading = true;\n\n this.dotCrudService\n .getDataById('/api/content', id, 'contentlets')\n .pipe(\n finalize(() => {\n this.loading = false;\n }),\n take(1)\n )\n .subscribe(\n ([contentlet]: DotCMSTemplateThumbnail[]) => {\n this.asset = contentlet;\n },\n () => {\n // do nothing, failing silently like any html input select that get pass an invalid value\n }\n );\n }\n\n registerOnChange(fn): void {\n this.propagateChange = fn;\n }\n\n registerOnTouched(): void {}\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"variables\" as *;\n@import \"dotcms-theme/extends/inputtext.extends\";\n\ndot-binary-file {\n display: block;\n\n & ::ng-deep {\n .dot-binary__container {\n display: flex;\n\n input {\n @extend #p-inputtext-extend;\n border-top-left-radius: $border-radius;\n border-bottom-left-radius: $border-radius;\n padding: 1.07rem;\n width: 100%;\n }\n }\n\n dot-binary-text-field {\n flex-grow: 1;\n }\n\n button {\n border-top-right-radius: $border-radius;\n border-bottom-right-radius: $border-radius;\n }\n\n .dot-file-preview__info {\n border-radius: $border-radius;\n }\n }\n}\n", + "styleUrl": "./dot-template-thumbnail-field.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "dotTempFileUploadService", + "type": "DotTempFileUploadService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotWorkflowActionsFireService", + "type": "DotWorkflowActionsFireService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotCrudService", + "type": "DotCrudService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotMessageService", + "type": "DotMessageService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 37, + "jsdoctags": [ + { + "name": "dotTempFileUploadService", + "type": "DotTempFileUploadService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotWorkflowActionsFireService", + "type": "DotWorkflowActionsFireService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotCrudService", + "type": "DotCrudService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotMessageService", + "type": "DotMessageService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": ["ControlValueAccessor"], + "templateData": "\n\n {{ error }}\n\n" + }, + { + "name": "DotTextareaComponent", + "id": "component-DotTextareaComponent-fb4eade5acd7d46f109c607bb01908a3de63b5f5423e4c48da2d7305e82a723c549828a07f8729ed85428696132a44464353c1695cd91602b3c94dad1e6c7557", + "file": "libs/dotcms-field-elements/src/components/dot-textarea/dot-textarea.tsx", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "styleUrls": [], + "styles": [], + "templateUrl": [], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "disabled", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "

    (optional) Disables field's interaction

    \n", + "line": 70, + "rawdescription": "\n(optional) Disables field's interaction", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{mutable: true, reflect: true}" + } + ] + }, + { + "name": "el", + "deprecated": false, + "deprecationMessage": "", + "type": "HTMLElement", + "optional": false, + "description": "", + "line": 38, + "decorators": [ + { + "name": "Element", + "stringifiedArguments": "" + } + ] + }, + { + "name": "hint", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    (optional) Hint text that suggest a clue of the field

    \n", + "line": 54, + "rawdescription": "\n(optional) Hint text that suggest a clue of the field", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "label", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    (optional) Text to be rendered next to \n\n" + }, + { + "name": "DotTextfieldComponent", + "id": "component-DotTextfieldComponent-4850f826510b69d74b0ee1d8103d2f4326b8961fbdc695acf5c29e456b0887d97f1315dace52893991512697f687afd2c312922f31b620673a797cd861208fe8", + "file": "libs/dotcms-field-elements/src/components/dot-textfield/dot-textfield.tsx", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "styleUrls": [], + "styles": [], + "templateUrl": [], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "disabled", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "

    (optional) Disables field's interaction

    \n", + "line": 71, + "rawdescription": "\n(optional) Disables field's interaction", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{mutable: true, reflect: true}" + } + ] + }, + { + "name": "el", + "deprecated": false, + "deprecationMessage": "", + "type": "HTMLElement", + "optional": false, + "description": "", + "line": 38, + "decorators": [ + { + "name": "Element", + "stringifiedArguments": "" + } + ] + }, + { + "name": "hint", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    (optional) Hint text that suggest a clue of the field

    \n", + "line": 57, + "rawdescription": "\n(optional) Hint text that suggest a clue of the field", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "label", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    (optional) Text to be rendered next to input field

    \n", + "line": 49, + "rawdescription": "\n(optional) Text to be rendered next to input field", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "name", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    Name that will be used as ID

    \n", + "line": 45, + "rawdescription": "\nName that will be used as ID", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "" + } + ] + }, + { + "name": "placeholder", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    (optional) Placeholder specifies a short hint that describes the expected value of the input field

    \n", + "line": 53, + "rawdescription": "\n(optional) Placeholder specifies a short hint that describes the expected value of the input field", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true, mutable: true}" + } + ] + }, + { + "name": "regexCheck", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    (optional) Regular expresion that is checked against the value to determine if is valid

    \n", + "line": 75, + "rawdescription": "\n(optional) Regular expresion that is checked against the value to determine if is valid", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{mutable: true, reflect: true}" + } + ] + }, + { + "name": "required", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "

    (optional) Determine if it is mandatory

    \n", + "line": 61, + "rawdescription": "\n(optional) Determine if it is mandatory", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{mutable: true, reflect: true}" + } + ] + }, + { + "name": "requiredMessage", + "defaultValue": "'This field is required'", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    (optional) Text that be shown when required is set and condition not met

    \n", + "line": 64, + "rawdescription": "\n(optional) Text that be shown when required is set and condition not met", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "" + } + ] + }, + { + "name": "status", + "deprecated": false, + "deprecationMessage": "", + "type": "DotFieldStatus", + "optional": false, + "description": "", + "line": 81, + "decorators": [ + { + "name": "State", + "stringifiedArguments": "" + } + ] + }, + { + "name": "statusChange", + "deprecated": false, + "deprecationMessage": "", + "type": "EventEmitter", + "optional": false, + "description": "", + "line": 84, + "decorators": [ + { + "name": "Event", + "stringifiedArguments": "" + } + ] + }, + { + "name": "type", + "defaultValue": "'text'", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    type specifies the type of element to display

    \n", + "line": 79, + "rawdescription": "\ntype specifies the type of element to display", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{mutable: true, reflect: true}" + } + ] + }, + { + "name": "validationMessage", + "defaultValue": "\"The field doesn't comply with the specified format\"", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    (optional) Text that be shown when the Regular Expression condition not met

    \n", + "line": 67, + "rawdescription": "\n(optional) Text that be shown when the Regular Expression condition not met", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "" + } + ] + }, + { + "name": "value", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    Value specifies the value of the element

    \n", + "line": 42, + "rawdescription": "\nValue specifies the value of the element", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{mutable: true}" + } + ] + }, + { + "name": "valueChange", + "deprecated": false, + "deprecationMessage": "", + "type": "EventEmitter", + "optional": false, + "description": "", + "line": 83, + "decorators": [ + { + "name": "Event", + "stringifiedArguments": "" + } + ] + } + ], + "methodsClass": [ + { + "name": "blurHandler", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 179, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "componentDidLoad", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 103, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "componentWillLoad", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 97, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "emitStatusChange", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 199, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "emitValueChange", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 206, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "getErrorMessage", + "args": [], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 171, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "isRegexValid", + "args": [], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 159, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "isValid", + "args": [], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 151, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "isValueRequired", + "args": [], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 155, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "regexCheckWatch", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 112, + "deprecated": false, + "deprecationMessage": "", + "decorators": [ + { + "name": "Watch", + "stringifiedArguments": "'regexCheck'" + } + ] + }, + { + "name": "render", + "args": [], + "optional": false, + "returnType": "any", + "typeParameters": [], + "line": 121, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "reset", + "args": [], + "optional": false, + "returnType": "Promise", + "typeParameters": [], + "line": 90, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nReset properties of the field, clear value and emit events.\n", + "description": "

    Reset properties of the field, clear value and emit events.

    \n", + "decorators": [ + { + "name": "Method", + "stringifiedArguments": "" + } + ], + "modifierKind": [131] + }, + { + "name": "setValue", + "args": [ + { + "name": "event", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 188, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "event", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "shouldShowErrorMessage", + "args": [], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 167, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "typeWatch", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 117, + "deprecated": false, + "deprecationMessage": "", + "decorators": [ + { + "name": "Watch", + "stringifiedArguments": "'type'" + } + ] + }, + { + "name": "validateProps", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 146, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "

    Represent a dotcms input control.

    \n", + "rawdescription": "\n\nRepresent a dotcms input control.\n\n", + "type": "component", + "sourceCode": "import {\n Component,\n Prop,\n State,\n Element,\n Event,\n EventEmitter,\n Method,\n Watch,\n Host,\n h\n} from '@stencil/core';\nimport { DotFieldStatus, DotFieldValueEvent, DotFieldStatusEvent } from '../../models';\nimport {\n checkProp,\n getClassNames,\n getErrorClass,\n getId,\n getOriginalStatus,\n getTagError,\n getTagHint,\n updateStatus,\n getHintId\n} from '../../utils';\nimport { setDotAttributesToElement, getDotAttributesFromElement } from '../dot-form/utils';\n\n/**\n * Represent a dotcms input control.\n *\n * @export\n * @class DotTextfieldComponent\n */\n@Component({\n tag: 'dot-textfield',\n styleUrl: 'dot-textfield.scss'\n})\nexport class DotTextfieldComponent {\n @Element() el: HTMLElement;\n\n /** Value specifies the value of the element */\n @Prop({ mutable: true })\n value = '';\n\n /** Name that will be used as ID */\n @Prop() name = '';\n\n /** (optional) Text to be rendered next to input field */\n @Prop({ reflect: true })\n label = '';\n\n /** (optional) Placeholder specifies a short hint that describes the expected value of the input field */\n @Prop({ reflect: true, mutable: true })\n placeholder = '';\n\n /** (optional) Hint text that suggest a clue of the field */\n @Prop({ reflect: true })\n hint = '';\n\n /** (optional) Determine if it is mandatory */\n @Prop({ mutable: true, reflect: true })\n required = false;\n\n /** (optional) Text that be shown when required is set and condition not met */\n @Prop() requiredMessage = 'This field is required';\n\n /** (optional) Text that be shown when the Regular Expression condition not met */\n @Prop() validationMessage = \"The field doesn't comply with the specified format\";\n\n /** (optional) Disables field's interaction */\n @Prop({ mutable: true, reflect: true })\n disabled = false;\n\n /** (optional) Regular expresion that is checked against the value to determine if is valid */\n @Prop({ mutable: true, reflect: true })\n regexCheck = '';\n\n /** type specifies the type of element to display */\n @Prop({ mutable: true, reflect: true })\n type = 'text';\n\n @State() status: DotFieldStatus;\n\n @Event() valueChange: EventEmitter;\n @Event() statusChange: EventEmitter;\n\n /**\n * Reset properties of the field, clear value and emit events.\n */\n @Method()\n async reset(): Promise {\n this.value = '';\n this.status = getOriginalStatus(this.isValid());\n this.emitStatusChange();\n this.emitValueChange();\n }\n\n componentWillLoad(): void {\n this.validateProps();\n this.status = getOriginalStatus(this.isValid());\n this.emitStatusChange();\n }\n\n componentDidLoad(): void {\n const htmlElement = this.el.querySelector('input');\n setTimeout(() => {\n const attrs = getDotAttributesFromElement(Array.from(this.el.attributes), []);\n setDotAttributesToElement(htmlElement, attrs);\n }, 0);\n }\n\n @Watch('regexCheck')\n regexCheckWatch(): void {\n this.regexCheck = checkProp(this, 'regexCheck');\n }\n\n @Watch('type')\n typeWatch(): void {\n this.type = checkProp(this, 'type');\n }\n\n render() {\n const classes = getClassNames(this.status, this.isValid(), this.required);\n\n return (\n \n \n this.blurHandler()}\n onInput={(event: Event) => this.setValue(event)}\n placeholder={this.placeholder}\n required={this.required || null}\n type={this.type}\n value={this.value}\n />\n \n {getTagHint(this.hint)}\n {getTagError(this.shouldShowErrorMessage(), this.getErrorMessage())}\n \n );\n }\n\n private validateProps(): void {\n this.regexCheckWatch();\n this.typeWatch();\n }\n\n private isValid(): boolean {\n return !this.isValueRequired() && this.isRegexValid();\n }\n\n private isValueRequired(): boolean {\n return this.required && !this.value;\n }\n\n private isRegexValid(): boolean {\n if (this.regexCheck && this.value) {\n const regex = new RegExp(this.regexCheck);\n return regex.test(this.value);\n }\n return true;\n }\n\n private shouldShowErrorMessage(): boolean {\n return this.getErrorMessage() && !this.status.dotPristine;\n }\n\n private getErrorMessage(): string {\n return this.isRegexValid()\n ? this.isValid()\n ? ''\n : this.requiredMessage\n : this.validationMessage;\n }\n\n private blurHandler(): void {\n if (!this.status.dotTouched) {\n this.status = updateStatus(this.status, {\n dotTouched: true\n });\n this.emitStatusChange();\n }\n }\n\n private setValue(event): void {\n this.value = event.target.value.toString();\n this.status = updateStatus(this.status, {\n dotTouched: true,\n dotPristine: false,\n dotValid: this.isValid()\n });\n this.emitValueChange();\n this.emitStatusChange();\n }\n\n private emitStatusChange(): void {\n this.statusChange.emit({\n name: this.name,\n status: this.status\n });\n }\n\n private emitValueChange(): void {\n this.valueChange.emit({\n name: this.name,\n value: this.value\n });\n }\n}\n", + "tag": "dot-textfield", + "styleUrl": "dot-textfield.scss", + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "" + }, + { + "name": "DotTextfieldComponent", + "id": "component-DotTextfieldComponent-7cff76e91711681e613b4393e17d9bd15717b3edeb65d6dd27811d33c9a5314f491398240e6073035e758f5337ac08b87194e6df57d719f933689037649825ae-1", + "file": "libs/dotcms-webcomponents/src/components/contenttypes-fields/dot-textfield/dot-textfield.tsx", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "styleUrls": [], + "styles": [], + "templateUrl": [], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "disabled", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "

    (optional) Disables field's interaction

    \n", + "line": 75, + "rawdescription": "\n(optional) Disables field's interaction", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{mutable: true, reflect: true}" + } + ] + }, + { + "name": "dotStatusChange", + "deprecated": false, + "deprecationMessage": "", + "type": "EventEmitter", + "optional": false, + "description": "", + "line": 91, + "decorators": [ + { + "name": "Event", + "stringifiedArguments": "" + } + ] + }, + { + "name": "dotValueChange", + "deprecated": false, + "deprecationMessage": "", + "type": "EventEmitter", + "optional": false, + "description": "", + "line": 89, + "decorators": [ + { + "name": "Event", + "stringifiedArguments": "" + } + ] + }, + { + "name": "el", + "deprecated": false, + "deprecationMessage": "", + "type": "HTMLElement", + "optional": false, + "description": "", + "line": 39, + "decorators": [ + { + "name": "Element", + "stringifiedArguments": "" + } + ] + }, + { + "name": "hint", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    (optional) Hint text that suggest a clue of the field

    \n", + "line": 59, + "rawdescription": "\n(optional) Hint text that suggest a clue of the field", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "label", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    (optional) Text to be rendered next to input field

    \n", + "line": 51, + "rawdescription": "\n(optional) Text to be rendered next to input field", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "name", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    Name that will be used as ID

    \n", + "line": 47, + "rawdescription": "\nName that will be used as ID", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "" + } + ] + }, + { + "name": "placeholder", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    (optional) Placeholder specifies a short hint that describes the expected value of the input field

    \n", + "line": 55, + "rawdescription": "\n(optional) Placeholder specifies a short hint that describes the expected value of the input field", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true, mutable: true}" + } + ] + }, + { + "name": "regexCheck", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    (optional) Regular expresion that is checked against the value to determine if is valid

    \n", + "line": 79, + "rawdescription": "\n(optional) Regular expresion that is checked against the value to determine if is valid", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{mutable: true, reflect: true}" + } + ] + }, + { + "name": "required", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "

    (optional) Determine if it is mandatory

    \n", + "line": 63, + "rawdescription": "\n(optional) Determine if it is mandatory", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{mutable: true, reflect: true}" + } + ] + }, + { + "name": "requiredMessage", + "defaultValue": "'This field is required'", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    (optional) Text that be shown when required is set and condition not met

    \n", + "line": 67, + "rawdescription": "\n(optional) Text that be shown when required is set and condition not met", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "" + } + ] + }, + { + "name": "status", + "deprecated": false, + "deprecationMessage": "", + "type": "DotFieldStatus", + "optional": false, + "description": "", + "line": 86, + "decorators": [ + { + "name": "State", + "stringifiedArguments": "" + } + ] + }, + { + "name": "type", + "defaultValue": "'text'", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    type specifies the type of element to display

    \n", + "line": 83, + "rawdescription": "\ntype specifies the type of element to display", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{mutable: true, reflect: true}" + } + ] + }, + { + "name": "validationMessage", + "defaultValue": "\"The field doesn't comply with the specified format\"", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    (optional) Text that be shown when the Regular Expression condition not met

    \n", + "line": 71, + "rawdescription": "\n(optional) Text that be shown when the Regular Expression condition not met", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "" + } + ] + }, + { + "name": "value", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    Value specifies the value of the element

    \n", + "line": 43, + "rawdescription": "\nValue specifies the value of the element", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{mutable: true}" + } + ] + } + ], + "methodsClass": [ + { + "name": "blurHandler", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 186, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "componentDidLoad", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 110, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "componentWillLoad", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 104, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "emitStatusChange", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 206, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "emitValueChange", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 213, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "getErrorMessage", + "args": [], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 178, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "isRegexValid", + "args": [], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 166, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "isValid", + "args": [], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 158, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "isValueRequired", + "args": [], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 162, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "regexCheckWatch", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 119, + "deprecated": false, + "deprecationMessage": "", + "decorators": [ + { + "name": "Watch", + "stringifiedArguments": "'regexCheck'" + } + ] + }, + { + "name": "render", + "args": [], + "optional": false, + "returnType": "any", + "typeParameters": [], + "line": 128, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "reset", + "args": [], + "optional": false, + "returnType": "Promise", + "typeParameters": [], + "line": 97, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nReset properties of the field, clear value and emit events.\n", + "description": "

    Reset properties of the field, clear value and emit events.

    \n", + "decorators": [ + { + "name": "Method", + "stringifiedArguments": "" + } + ], + "modifierKind": [131] + }, + { + "name": "setValue", + "args": [ + { + "name": "event", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 195, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "event", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "shouldShowErrorMessage", + "args": [], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 174, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "typeWatch", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 124, + "deprecated": false, + "deprecationMessage": "", + "decorators": [ + { + "name": "Watch", + "stringifiedArguments": "'type'" + } + ] + }, + { + "name": "validateProps", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 153, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "

    Represent a dotcms input control.

    \n", + "rawdescription": "\n\nRepresent a dotcms input control.\n\n", + "type": "component", + "sourceCode": "import {\n Component,\n Host,\n Prop,\n State,\n Element,\n Event,\n EventEmitter,\n Method,\n Watch,\n h\n} from '@stencil/core';\nimport { DotFieldStatus, DotFieldValueEvent, DotFieldStatusEvent } from '../../../models';\nimport {\n checkProp,\n getClassNames,\n getErrorClass,\n getId,\n getOriginalStatus,\n getTagError,\n getTagHint,\n updateStatus,\n getHintId\n} from '../../../utils';\nimport { setDotAttributesToElement, getDotAttributesFromElement } from '../dot-form/utils';\n\n/**\n * Represent a dotcms input control.\n *\n * @export\n * @class DotTextfieldComponent\n */\n@Component({\n tag: 'dot-textfield',\n styleUrl: 'dot-textfield.scss'\n})\nexport class DotTextfieldComponent {\n @Element()\n el: HTMLElement;\n\n /** Value specifies the value of the element */\n @Prop({ mutable: true })\n value = '';\n\n /** Name that will be used as ID */\n @Prop()\n name = '';\n\n /** (optional) Text to be rendered next to input field */\n @Prop({ reflect: true })\n label = '';\n\n /** (optional) Placeholder specifies a short hint that describes the expected value of the input field */\n @Prop({ reflect: true, mutable: true })\n placeholder = '';\n\n /** (optional) Hint text that suggest a clue of the field */\n @Prop({ reflect: true })\n hint = '';\n\n /** (optional) Determine if it is mandatory */\n @Prop({ mutable: true, reflect: true })\n required = false;\n\n /** (optional) Text that be shown when required is set and condition not met */\n @Prop()\n requiredMessage = 'This field is required';\n\n /** (optional) Text that be shown when the Regular Expression condition not met */\n @Prop()\n validationMessage = \"The field doesn't comply with the specified format\";\n\n /** (optional) Disables field's interaction */\n @Prop({ mutable: true, reflect: true })\n disabled = false;\n\n /** (optional) Regular expresion that is checked against the value to determine if is valid */\n @Prop({ mutable: true, reflect: true })\n regexCheck = '';\n\n /** type specifies the type of element to display */\n @Prop({ mutable: true, reflect: true })\n type = 'text';\n\n @State()\n status: DotFieldStatus;\n\n @Event()\n dotValueChange: EventEmitter;\n @Event()\n dotStatusChange: EventEmitter;\n\n /**\n * Reset properties of the field, clear value and emit events.\n */\n @Method()\n async reset(): Promise {\n this.value = '';\n this.status = getOriginalStatus(this.isValid());\n this.emitStatusChange();\n this.emitValueChange();\n }\n\n componentWillLoad(): void {\n this.validateProps();\n this.status = getOriginalStatus(this.isValid());\n this.emitStatusChange();\n }\n\n componentDidLoad(): void {\n const htmlElement = this.el.querySelector('input');\n setTimeout(() => {\n const attrs = getDotAttributesFromElement(Array.from(this.el.attributes), []);\n setDotAttributesToElement(htmlElement, attrs);\n }, 0);\n }\n\n @Watch('regexCheck')\n regexCheckWatch(): void {\n this.regexCheck = checkProp(this, 'regexCheck');\n }\n\n @Watch('type')\n typeWatch(): void {\n this.type = checkProp(this, 'type');\n }\n\n render() {\n const classes = getClassNames(this.status, this.isValid(), this.required);\n\n return (\n \n \n this.blurHandler()}\n onInput={(event: Event) => this.setValue(event)}\n placeholder={this.placeholder}\n required={this.required || null}\n type={this.type}\n value={this.value}\n />\n \n {getTagHint(this.hint)}\n {getTagError(this.shouldShowErrorMessage(), this.getErrorMessage())}\n \n );\n }\n\n private validateProps(): void {\n this.regexCheckWatch();\n this.typeWatch();\n }\n\n private isValid(): boolean {\n return !this.isValueRequired() && this.isRegexValid();\n }\n\n private isValueRequired(): boolean {\n return this.required && !this.value;\n }\n\n private isRegexValid(): boolean {\n if (this.regexCheck && this.value) {\n const regex = new RegExp(this.regexCheck);\n return regex.test(this.value);\n }\n return true;\n }\n\n private shouldShowErrorMessage(): boolean {\n return this.getErrorMessage() && !this.status.dotPristine;\n }\n\n private getErrorMessage(): string {\n return this.isRegexValid()\n ? this.isValid()\n ? ''\n : this.requiredMessage\n : this.validationMessage;\n }\n\n private blurHandler(): void {\n if (!this.status.dotTouched) {\n this.status = updateStatus(this.status, {\n dotTouched: true\n });\n this.emitStatusChange();\n }\n }\n\n private setValue(event): void {\n this.value = event.target.value.toString();\n this.status = updateStatus(this.status, {\n dotTouched: true,\n dotPristine: false,\n dotValid: this.isValid()\n });\n this.emitValueChange();\n this.emitStatusChange();\n }\n\n private emitStatusChange(): void {\n this.dotStatusChange.emit({\n name: this.name,\n status: this.status\n });\n }\n\n private emitValueChange(): void {\n this.dotValueChange.emit({\n name: this.name,\n value: this.value\n });\n }\n}\n", + "tag": "dot-textfield", + "styleUrl": "dot-textfield.scss", + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "", + "isDuplicate": true, + "duplicateId": 1, + "duplicateName": "DotTextfieldComponent-1" + }, + { + "name": "DotThemeSelectorComponent", + "id": "component-DotThemeSelectorComponent-9f34328f7fa6d386ff2f8edccd1e596e12c57a17082da48d3800148f8c24755c38db4f56b121c2b00fa9b917eca82add95bb3f6cf6484189d1fdfdc2ba6e77e3", + "file": "apps/dotcms-ui/src/app/view/components/dot-edit-layout-designer/components/dot-theme-selector/dot-theme-selector.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-theme-selector", + "styleUrls": ["./dot-theme-selector.component.scss"], + "styles": [], + "templateUrl": ["./dot-theme-selector.component.html"], + "viewProviders": [], + "inputsClass": [ + { + "name": "value", + "deprecated": false, + "deprecationMessage": "", + "line": 41, + "type": "DotTheme", + "decorators": [] + } + ], + "outputsClass": [ + { + "name": "close", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 47, + "type": "EventEmitter" + }, + { + "name": "selected", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 44, + "type": "EventEmitter" + } + ], + "propertiesClass": [ + { + "name": "cd", + "deprecated": false, + "deprecationMessage": "", + "type": "ChangeDetectorRef", + "optional": false, + "description": "", + "line": 70, + "modifierKind": [123] + }, + { + "name": "current", + "deprecated": false, + "deprecationMessage": "", + "type": "DotTheme", + "optional": false, + "description": "", + "line": 58 + }, + { + "name": "dataView", + "deprecated": false, + "deprecationMessage": "", + "type": "DataView", + "optional": false, + "description": "", + "line": 53, + "decorators": [ + { + "name": "ViewChild", + "stringifiedArguments": "'dataView', {static: true}" + } + ] + }, + { + "name": "destroy$", + "defaultValue": "new Subject()", + "deprecated": false, + "deprecationMessage": "", + "type": "Subject", + "optional": false, + "description": "", + "line": 62, + "modifierKind": [121] + }, + { + "name": "dialogActions", + "deprecated": false, + "deprecationMessage": "", + "type": "DotDialogActions", + "optional": false, + "description": "", + "line": 60 + }, + { + "name": "initialLoad", + "defaultValue": "true", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 64, + "modifierKind": [121] + }, + { + "name": "paginatorService", + "deprecated": false, + "deprecationMessage": "", + "type": "PaginatorService", + "optional": false, + "description": "", + "line": 68, + "modifierKind": [123] + }, + { + "name": "SEARCH_PARAM", + "defaultValue": "'searchParam'", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 63, + "modifierKind": [121] + }, + { + "name": "searchInput", + "deprecated": false, + "deprecationMessage": "", + "type": "ElementRef", + "optional": false, + "description": "", + "line": 50, + "decorators": [ + { + "name": "ViewChild", + "stringifiedArguments": "'searchInput', {static: true}" + } + ] + }, + { + "name": "siteSelector", + "deprecated": false, + "deprecationMessage": "", + "type": "DotSiteSelectorComponent", + "optional": false, + "description": "", + "line": 56, + "decorators": [ + { + "name": "ViewChild", + "stringifiedArguments": "'siteSelector', {static: true}" + } + ] + }, + { + "name": "themes", + "defaultValue": "[]", + "deprecated": false, + "deprecationMessage": "", + "type": "DotTheme[]", + "optional": false, + "description": "", + "line": 38 + }, + { + "name": "visible", + "defaultValue": "true", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 59 + } + ], + "methodsClass": [ + { + "name": "apply", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 165, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nPropagate the selected theme once the user apply the changes.\n\n", + "description": "

    Propagate the selected theme once the user apply the changes.

    \n", + "jsdoctags": [] + }, + { + "name": "filterThemes", + "args": [ + { + "name": "searchCriteria", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "optional": true + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 178, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "searchCriteria", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "hideDialog", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 174, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nPropagate the close event wen the modal closes.\n\n", + "description": "

    Propagate the close event wen the modal closes.

    \n", + "jsdoctags": [] + }, + { + "name": "ngOnDestroy", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 101, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 73, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "noThemesInInitialLoad", + "args": [ + { + "name": "themes", + "type": "DotTheme[]", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "$event", + "type": "LazyLoadEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 183, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "themes", + "type": "DotTheme[]", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "$event", + "type": "LazyLoadEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "paginate", + "args": [ + { + "name": "$event", + "type": "LazyLoadEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 112, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nLoad new page of themes.\n\n", + "description": "

    Load new page of themes.

    \n", + "jsdoctags": [ + { + "name": "$event", + "type": "LazyLoadEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "selectTheme", + "args": [ + { + "name": "theme", + "type": "DotTheme", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 149, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nSet the selected Theme by the user while the modal is open.\n\n", + "description": "

    Set the selected Theme by the user while the modal is open.

    \n", + "jsdoctags": [ + { + "name": "theme", + "type": "DotTheme", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "siteChange", + "args": [ + { + "name": "site", + "type": "Site", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 137, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nHandle change in the host to load the corresponding themes.\n\n", + "description": "

    Handle change in the host to load the corresponding themes.

    \n", + "jsdoctags": [ + { + "name": "site", + "type": "Site", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "

    The DotThemeSelectorComponent is modal that\nshow the themes of the available hosts

    \n", + "rawdescription": "\n\nThe DotThemeSelectorComponent is modal that\nshow the themes of the available hosts\n", + "type": "component", + "sourceCode": "import {\n Component,\n OnInit,\n Output,\n EventEmitter,\n Input,\n ViewChild,\n ElementRef,\n ChangeDetectorRef,\n OnDestroy\n} from '@angular/core';\n\nimport { fromEvent as observableFromEvent, Subject } from 'rxjs';\nimport { debounceTime, take, takeUntil } from 'rxjs/operators';\n\nimport { Site, SiteService } from '@dotcms/dotcms-js';\nimport { DataView } from 'primeng/dataview';\nimport { LazyLoadEvent } from 'primeng/api';\n\nimport { DotMessageService } from '@services/dot-message/dot-messages.service';\nimport { PaginatorService } from '@services/paginator';\nimport { DotDialogActions } from '@components/dot-dialog/dot-dialog.component';\nimport { DotTheme } from '@models/dot-edit-layout-designer';\nimport { DotSiteSelectorComponent } from '@components/_common/dot-site-selector/dot-site-selector.component';\n\n/**\n * The DotThemeSelectorComponent is modal that\n * show the themes of the available hosts\n * @export\n * @class DotThemeSelectorComponent\n */\n@Component({\n selector: 'dot-theme-selector',\n templateUrl: './dot-theme-selector.component.html',\n styleUrls: ['./dot-theme-selector.component.scss']\n})\nexport class DotThemeSelectorComponent implements OnInit, OnDestroy {\n themes: DotTheme[] = [];\n\n @Input()\n value: DotTheme;\n\n @Output()\n selected = new EventEmitter();\n\n @Output()\n close = new EventEmitter();\n\n @ViewChild('searchInput', { static: true })\n searchInput: ElementRef;\n\n @ViewChild('dataView', { static: true })\n dataView: DataView;\n\n @ViewChild('siteSelector', { static: true })\n siteSelector: DotSiteSelectorComponent;\n\n current: DotTheme;\n visible = true;\n dialogActions: DotDialogActions;\n\n private destroy$: Subject = new Subject();\n private SEARCH_PARAM = 'searchParam';\n private initialLoad = true;\n\n constructor(\n private dotMessageService: DotMessageService,\n public paginatorService: PaginatorService,\n private siteService: SiteService,\n public cd: ChangeDetectorRef\n ) {}\n\n ngOnInit() {\n this.dialogActions = {\n accept: {\n label: this.dotMessageService.get('dot.common.apply'),\n disabled: true,\n action: () => {\n this.apply();\n }\n },\n cancel: {\n label: this.dotMessageService.get('dot.common.cancel')\n }\n };\n this.current = this.value;\n this.paginatorService.url = 'v1/themes';\n this.paginatorService.setExtraParams(\n 'hostId',\n this.current?.hostId || this.siteService.currentSite.identifier\n );\n this.paginatorService.deleteExtraParams(this.SEARCH_PARAM);\n this.paginatorService.paginationPerPage = 8;\n observableFromEvent(this.searchInput.nativeElement, 'keyup')\n .pipe(debounceTime(500), takeUntil(this.destroy$))\n .subscribe((keyboardEvent: Event) => {\n this.filterThemes(keyboardEvent.target['value']);\n });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.complete();\n }\n\n /**\n * Load new page of themes.\n * @param LazyLoadEvent event\n *\n * @memberof DotThemeSelectorComponent\n */\n paginate($event: LazyLoadEvent): void {\n this.paginatorService\n .getWithOffset($event.first)\n .pipe(take(1))\n .subscribe((themes: DotTheme[]) => {\n if (this.noThemesInInitialLoad(themes, $event)) {\n this.siteService.getSiteById('SYSTEM_HOST').subscribe((site: Site) => {\n this.siteSelector.searchableDropdown.handleClick(site);\n this.cd.detectChanges();\n });\n } else {\n this.themes = themes;\n this.cd.detectChanges();\n }\n this.initialLoad = false;\n });\n this.dataView.first = $event.first;\n }\n\n /**\n * Handle change in the host to load the corresponding themes.\n * @param Site site\n *\n * @memberof DotThemeSelectorComponent\n */\n siteChange(site: Site): void {\n this.searchInput.nativeElement.value = null;\n this.paginatorService.setExtraParams('hostId', site.identifier);\n this.filterThemes('');\n }\n\n /**\n * Set the selected Theme by the user while the modal is open.\n * @param DotTheme theme\n *\n * @memberof DotThemeSelectorComponent\n */\n selectTheme(theme: DotTheme): void {\n this.current = theme;\n this.dialogActions = {\n ...this.dialogActions,\n accept: {\n ...this.dialogActions.accept,\n disabled: this.value.inode === this.current.inode\n }\n };\n }\n\n /**\n * Propagate the selected theme once the user apply the changes.\n *\n * @memberof DotThemeSelectorComponent\n */\n apply(): void {\n this.selected.emit(this.current);\n }\n\n /**\n * Propagate the close event wen the modal closes.\n *\n * @memberof DotThemeSelectorComponent\n */\n hideDialog(): void {\n this.close.emit(false);\n }\n\n private filterThemes(searchCriteria?: string): void {\n this.paginatorService.setExtraParams(this.SEARCH_PARAM, searchCriteria);\n this.paginate({ first: 0 });\n }\n\n private noThemesInInitialLoad(themes: DotTheme[], $event: LazyLoadEvent): boolean {\n return this.initialLoad && !themes.length && !$event.first;\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"variables\" as *;\n@import \"dotcms-theme/utils/theme-variables\";\n\n$theme-item-dimension: 240px;\n\n:host ::ng-deep {\n dot-site-selector {\n margin-left: $spacing-2;\n\n dot-searchable-dropdown .p-button,\n .site-selector__title {\n font-size: $font-size-large;\n min-width: 200px;\n }\n }\n\n .dialog__content {\n min-width: 77.85rem;\n padding: $spacing-3 $spacing-4 $dialog-padding;\n }\n\n @media (max-width: 1100px) {\n .dialog__content {\n min-width: calc(100vw - 5vw) !important;\n }\n }\n\n .p-dataview-emptymessage {\n text-align: center;\n padding-top: $spacing-7 * 2;\n }\n\n .p-dataview-content {\n min-height: $theme-item-dimension * 2;\n .p-g {\n margin: 0;\n }\n }\n\n .p-dataview-content .p-widget-content.p-g-12 {\n text-align: center;\n font-size: $font-size-large;\n margin-top: $spacing-7;\n }\n\n .paginator .dot-theme-container {\n .p-dataView {\n padding-bottom: 56px;\n position: relative;\n }\n }\n}\n\n.dot-theme__header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n\n.dot-theme-container {\n margin-top: $spacing-1;\n}\n\n.dot-theme-search-box {\n position: relative;\n\n input {\n font-size: $font-size-large;\n }\n\n dot-icon {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n right: $spacing-1;\n }\n}\n\n.dot-theme-item {\n align-items: center;\n background: $gray-bg;\n border-radius: 4px;\n cursor: pointer;\n display: flex;\n flex-direction: column;\n height: $theme-item-dimension;\n margin: $spacing-3 $spacing-1 0;\n padding: $spacing-4 $spacing-3;\n transition: background-color $field-animation-speed ease-in;\n width: $theme-item-dimension;\n\n svg {\n fill: $gray;\n border-radius: 6px;\n }\n\n &:hover,\n &.active {\n box-shadow: $md-shadow-3;\n background: $white;\n }\n}\n\n.dot-theme-iteme__image {\n border-radius: 6px;\n width: 9.28rem;\n height: 9.28rem;\n}\n", + "styleUrl": "./dot-theme-selector.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "dotMessageService", + "type": "DotMessageService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "paginatorService", + "type": "PaginatorService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "siteService", + "type": "SiteService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "cd", + "type": "ChangeDetectorRef", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 64, + "jsdoctags": [ + { + "name": "dotMessageService", + "type": "DotMessageService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "paginatorService", + "type": "PaginatorService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "siteService", + "type": "SiteService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "cd", + "type": "ChangeDetectorRef", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": ["OnInit", "OnDestroy"], + "templateData": " paginatorService.paginationPerPage ? 'paginator' : ''\n \"\n [header]=\"'editpage.layout.theme.header' | dm\"\n>\n
    \n \n
    \n \n \n
    \n
    \n
    \n paginatorService.paginationPerPage\"\n [rows]=\"paginatorService?.paginationPerPage\"\n [totalRecords]=\"paginatorService?.totalRecords\"\n [lazy]=\"true\"\n (onLazyLoad)=\"paginate($event)\"\n [emptyMessage]=\"'editpage.layout.theme.no.records.found' | dm\"\n [alwaysShowPaginator]=\"false\"\n layout=\"grid\"\n >\n \n \n \n \n \n \n
    {{ theme.name }}
    \n
    \n \n \n \n\n" + }, + { + "name": "DotThemeSelectorDropdownComponent", + "id": "component-DotThemeSelectorDropdownComponent-b0c4ce5af47afe74936707d75672ca0d47d6e5c657d9432c8a4d8a7a563b5447926c8d601722a75a496ca0578a61704336adbb79cc46847e266d9ddf6bc77587", + "file": "apps/dotcms-ui/src/app/view/components/dot-theme-selector-dropdown/dot-theme-selector-dropdown.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [ + { + "name": "{\n multi: true, provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DotThemeSelectorDropdownComponent)\n}", + "type": "component" + } + ], + "selector": "dot-theme-selector-dropdown", + "styleUrls": ["./dot-theme-selector-dropdown.component.scss"], + "styles": [], + "templateUrl": ["./dot-theme-selector-dropdown.component.html"], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "currentOffset", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 38 + }, + { + "name": "currentSiteIdentifier", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 39 + }, + { + "name": "destroy$", + "defaultValue": "new Subject()", + "deprecated": false, + "deprecationMessage": "", + "type": "Subject", + "optional": false, + "description": "", + "line": 51, + "modifierKind": [121] + }, + { + "name": "initialLoad", + "defaultValue": "true", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 50, + "modifierKind": [121] + }, + { + "name": "paginatorService", + "deprecated": false, + "deprecationMessage": "", + "type": "PaginatorService", + "optional": false, + "description": "", + "line": 54, + "modifierKind": [123, 144] + }, + { + "name": "propagateChange", + "defaultValue": "() => {...}", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 94 + }, + { + "name": "searchableDropdown", + "deprecated": false, + "deprecationMessage": "", + "type": "SearchableDropdownComponent", + "optional": false, + "description": "", + "line": 42, + "decorators": [ + { + "name": "ViewChild", + "stringifiedArguments": "'searchableDropdown', {static: true}" + } + ] + }, + { + "name": "searchInput", + "deprecated": false, + "deprecationMessage": "", + "type": "ElementRef", + "optional": false, + "description": "", + "line": 45, + "decorators": [ + { + "name": "ViewChild", + "stringifiedArguments": "'searchInput', {static: false}" + } + ] + }, + { + "name": "siteSelector", + "deprecated": false, + "deprecationMessage": "", + "type": "DotSiteSelectorComponent", + "optional": false, + "description": "", + "line": 48, + "decorators": [ + { + "name": "ViewChild", + "stringifiedArguments": "'siteSelector'" + } + ] + }, + { + "name": "themes", + "defaultValue": "[]", + "deprecated": false, + "deprecationMessage": "", + "type": "DotTheme[]", + "optional": false, + "description": "", + "line": 35 + }, + { + "name": "totalRecords", + "defaultValue": "0", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 37 + }, + { + "name": "value", + "defaultValue": "null", + "deprecated": false, + "deprecationMessage": "", + "type": "DotTheme", + "optional": false, + "description": "", + "line": 36 + } + ], + "methodsClass": [ + { + "name": "getFilteredThemes", + "args": [ + { + "name": "offset", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "0" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 189, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "offset", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "0", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "handlePageChange", + "args": [ + { + "name": "event", + "type": "LazyLoadEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 170, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nHandles page change for pagination purposes.\n\n", + "description": "

    Handles page change for pagination purposes.

    \n", + "jsdoctags": [ + { + "name": { + "pos": 5118, + "end": 5123, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "event" + }, + "type": "LazyLoadEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 5096, + "end": 5101, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 5102, + "end": 5117, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 5103, + "end": 5116, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 177, + "typeName": { + "pos": 5103, + "end": 5116, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "LazyLoadEvent" + } + } + } + }, + { + "tagName": { + "pos": 5132, + "end": 5138, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "originalKeywordKind": 105, + "escapedText": "return" + }, + "comment": "

    void

    \n" + } + ] + }, + { + "name": "ngAfterViewInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 68, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "ngOnDestroy", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 78, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 59, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "onChange", + "args": [ + { + "name": "theme", + "type": "DotTheme", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 157, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nHandles the onChange behavior of the select input\n\n", + "description": "

    Handles the onChange behavior of the select input

    \n", + "jsdoctags": [ + { + "name": { + "pos": 4787, + "end": 4792, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "theme" + }, + "type": "DotTheme", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 4770, + "end": 4775, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 4776, + "end": 4786, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 4777, + "end": 4785, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 177, + "typeName": { + "pos": 4777, + "end": 4785, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "DotTheme" + } + } + } + } + ] + }, + { + "name": "onHide", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 83, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "onShow", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 140, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nSets the themes when the drop down is opened\n\n", + "description": "

    Sets the themes when the drop down is opened

    \n", + "jsdoctags": [] + }, + { + "name": "registerOnChange", + "args": [ + { + "name": "fn", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 102, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nSet the function to be called when the control receives a change event.\n", + "description": "

    Set the function to be called when the control receives a change event.

    \n", + "jsdoctags": [ + { + "name": "fn", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "registerOnTouched", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 95, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "setHostThemes", + "args": [ + { + "name": "hostId", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "offset", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "0" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 193, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "hostId", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "offset", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "0", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "setTotalRecords", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 212, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "siteChange", + "args": [ + { + "name": "event", + "type": "Site", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 131, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\n Sets the themes on site host change\n\n", + "description": "

    Sets the themes on site host change

    \n", + "jsdoctags": [ + { + "name": { + "pos": 4022, + "end": 4027, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "event" + }, + "type": "Site", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 4009, + "end": 4014, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 4015, + "end": 4021, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 4016, + "end": 4020, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 177, + "typeName": { + "pos": 4016, + "end": 4020, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "Site" + } + } + } + } + ] + }, + { + "name": "writeValue", + "args": [ + { + "name": "identifier", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 112, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nWrites a new value to the element\n\n", + "description": "

    Writes a new value to the element

    \n", + "jsdoctags": [ + { + "name": { + "pos": 3386, + "end": 3396, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "identifier" + }, + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 3371, + "end": 3376, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 3377, + "end": 3385, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 3378, + "end": 3384, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 149 + } + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import {\n AfterViewInit,\n Component,\n ElementRef,\n forwardRef,\n OnDestroy,\n OnInit,\n ViewChild\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { DotSiteSelectorComponent } from '@components/_common/dot-site-selector/dot-site-selector.component';\nimport { SearchableDropdownComponent } from '@components/_common/searchable-dropdown/component';\nimport { DotTheme } from '@models/dot-edit-layout-designer';\nimport { DotThemesService } from '@services/dot-themes/dot-themes.service';\nimport { PaginatorService } from '@services/paginator';\nimport { Site, SiteService } from '@dotcms/dotcms-js';\nimport { LazyLoadEvent } from 'primeng/api';\nimport { fromEvent, Subject } from 'rxjs';\nimport { debounceTime, filter, take, takeUntil } from 'rxjs/operators';\n\n@Component({\n selector: 'dot-theme-selector-dropdown',\n templateUrl: './dot-theme-selector-dropdown.component.html',\n styleUrls: ['./dot-theme-selector-dropdown.component.scss'],\n providers: [\n {\n multi: true,\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DotThemeSelectorDropdownComponent)\n }\n ]\n})\nexport class DotThemeSelectorDropdownComponent\n implements OnInit, OnDestroy, ControlValueAccessor, AfterViewInit {\n themes: DotTheme[] = [];\n value: DotTheme = null;\n totalRecords: number = 0;\n currentOffset: number;\n currentSiteIdentifier: string;\n\n @ViewChild('searchableDropdown', { static: true })\n searchableDropdown: SearchableDropdownComponent;\n\n @ViewChild('searchInput', { static: false })\n searchInput: ElementRef;\n\n @ViewChild('siteSelector')\n siteSelector: DotSiteSelectorComponent;\n\n private initialLoad = true;\n private destroy$: Subject = new Subject();\n\n constructor(\n public readonly paginatorService: PaginatorService,\n private readonly siteService: SiteService,\n private readonly themesService: DotThemesService\n ) {}\n\n ngOnInit(): void {\n const interval = setInterval(() => {\n try {\n this.currentSiteIdentifier = this.siteService.currentSite.identifier;\n clearInterval(interval);\n } catch (e) {}\n }, 0);\n }\n\n ngAfterViewInit(): void {\n if (this.searchInput) {\n fromEvent(this.searchInput.nativeElement, 'keyup')\n .pipe(debounceTime(500), takeUntil(this.destroy$))\n .subscribe(() => {\n this.getFilteredThemes();\n });\n }\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.complete();\n }\n\n onHide(): void {\n if (this.value) {\n this.siteService\n .getSiteById(this.value.hostId)\n .pipe(take(1))\n .subscribe((site) => {\n this.siteSelector.updateCurrentSite(site);\n });\n }\n }\n\n propagateChange = (_: any) => {};\n registerOnTouched(): void {}\n\n /**\n * Set the function to be called when the control receives a change event.\n * @param any fn\n * @memberof SearchableDropdownComponent\n */\n registerOnChange(fn): void {\n this.propagateChange = fn;\n }\n\n /**\n * Writes a new value to the element\n *\n * @param {string} identifier\n * @memberof DotThemeSelectorDropdownComponent\n */\n writeValue(identifier: string): void {\n if (identifier) {\n this.themesService\n .get(identifier)\n .pipe(take(1))\n .subscribe((theme: DotTheme) => {\n this.value = theme;\n this.siteService.getSiteById(this.value.hostId).pipe(take(1)).subscribe((site) => {\n this.siteSelector?.updateCurrentSite(site);\n });\n });\n }\n }\n /**\n * Sets the themes on site host change\n *\n * @param {Site} event\n * @memberof DotThemeSelectorDropdownComponent\n */\n siteChange(event: Site): void {\n this.currentSiteIdentifier = event.identifier;\n this.setHostThemes(event.identifier);\n }\n /**\n * Sets the themes when the drop down is opened\n *\n * @memberof DotThemeSelectorDropdownComponent\n */\n onShow(): void {\n this.paginatorService.url = 'v1/themes';\n this.paginatorService.paginationPerPage = 5;\n\n if (this.value) {\n this.currentSiteIdentifier = this.value.hostId;\n }\n this.searchInput.nativeElement.value = '';\n this.setHostThemes(this.currentSiteIdentifier);\n }\n\n /**\n * Handles the onChange behavior of the select input\n *\n * @param {DotTheme} theme\n * @memberof DotThemeSelectorDropdownComponent\n */\n onChange(theme: DotTheme) {\n this.value = theme;\n this.propagateChange(theme.identifier);\n this.searchableDropdown.toggleOverlayPanel();\n }\n\n /**\n * Handles page change for pagination purposes.\n *\n * @param {LazyLoadEvent} event\n * @return void\n * @memberof DotThemeSelectorDropdownComponent\n */\n handlePageChange(event: LazyLoadEvent): void {\n this.currentOffset = event.first;\n if (this.currentSiteIdentifier && this.paginatorService.url) {\n this.paginatorService\n .getWithOffset(event.first)\n /*\n We load the first page of themes (onShow) so we dont want to load them when the\n first paginate event from the dataview inside triggers\n */\n .pipe(\n take(1),\n filter(() => !!(this.currentSiteIdentifier && this.themes.length))\n )\n .subscribe((themes) => {\n this.themes = themes;\n });\n }\n }\n\n private getFilteredThemes(offset = 0): void {\n this.setHostThemes(this.currentSiteIdentifier, this.currentOffset || offset);\n }\n\n private setHostThemes(hostId: string, offset: number = 0) {\n this.siteService.getSiteById(hostId).pipe(take(1)).subscribe((site: Site) => {\n this.siteSelector.updateCurrentSite(site);\n });\n\n this.paginatorService.setExtraParams('hostId', hostId);\n this.paginatorService.searchParam = this.searchInput.nativeElement.value;\n this.paginatorService\n .getWithOffset(offset)\n .pipe(take(1))\n .subscribe((themes: DotTheme[]) => {\n if (themes.length || !this.initialLoad) {\n this.themes = themes;\n this.setTotalRecords();\n }\n this.initialLoad = false;\n });\n }\n\n private setTotalRecords() {\n this.totalRecords = 0;\n\n // Timeout to activate change of pagination to the first page\n setTimeout(() => {\n this.totalRecords = this.paginatorService.totalRecords;\n }, 0);\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"variables\"as *;\n\n:host {\n display: flex;\n}\n\n.theme-selector__data-list-item {\n cursor: pointer;\n display: flex;\n line-height: normal;\n padding: $spacing-3 $spacing-3;\n transition: background-color 150ms ease-in;\n width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n &:hover,\n &.selected {\n background: $bg-highlight;\n }\n\n .dot-theme-item__image,\n .dot-theme-item__image--fallback {\n border-radius: $border-radius;\n width: 3.43rem;\n height: 3.43rem;\n }\n .dot-theme-item__image--fallback {\n background: $bg-highlight;\n width: 3.43rem;\n height: 3.43rem;\n font-size: $font-size-xx-large;\n color: $brand-primary_mod;\n text-transform: uppercase;\n text-align: center;\n line-height: 3.21rem;\n > span {\n line-height: 1;\n vertical-align: middle;\n }\n }\n .dot-theme-item__meta {\n display: flex;\n flex-direction: column;\n justify-content: center;\n margin-left: $spacing-2;\n .dot-theme-item__label {\n font-weight: bold;\n display: inline-block;\n margin-bottom: $spacing-1;\n }\n .dot-theme-item__date {\n color: $gray-dark;\n font-size: $font-size-small;\n }\n & > span {\n display: block;\n }\n }\n}\n\ndot-searchable-dropdown {\n width: 100%;\n display: block;\n}\n\n.theme-selector__filters {\n display: flex;\n margin: 0 $spacing-2;\n position: relative;\n\n dot-site-selector {\n margin-right: $spacing-2;\n display: block;\n\n // Required for shadow piercing. Required to force a style down to child components\n ::ng-deep {\n .site-selector__title {\n display: block;\n background: $gray-lighter;\n border: 1px solid $gray-light;\n border-radius: $border-radius;\n padding: $spacing-2;\n font-size: $font-size-medium;\n color: $gray-dark;\n text-overflow: ellipsis;\n min-width: 10rem;\n white-space: nowrap;\n overflow: hidden;\n }\n }\n }\n}\n\n.searchable-dropdown__search-section {\n flex-grow: 1;\n position: relative;\n\n input.searchable-dropdown__search-inputfield {\n width: 100%;\n }\n}\n\n.searchable-dropdown__search-icon {\n color: $gray;\n position: absolute;\n right: $spacing-1;\n top: 9px;\n}\n", + "styleUrl": "./dot-theme-selector-dropdown.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "paginatorService", + "type": "PaginatorService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "siteService", + "type": "SiteService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "themesService", + "type": "DotThemesService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 51, + "jsdoctags": [ + { + "name": "paginatorService", + "type": "PaginatorService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "siteService", + "type": "SiteService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "themesService", + "type": "DotThemesService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": ["OnInit", "OnDestroy", "ControlValueAccessor", "AfterViewInit"], + "templateData": "\n \n \n\n \n
    \n {{ item.label.charAt(0) }}\n
    \n
    \n \n {{ item.label }}\n \n {{ 'Last-Updated' | dm }}: {{ item.modDate | date: 'MM/dd/yy' }}\n \n \n
    \n\n\n\n
    \n \n
    \n \n \n
    \n
    \n
    \n\n\n\n" + }, + { + "name": "DotTimeComponent", + "id": "component-DotTimeComponent-b8daed9541bd225837441025080eca884a3d8c44b175287126df385bdf573498edd50a21bee1c092cc069758e5d2f828cd249e1ddcaa2e2b012d71169f142baf", + "file": "libs/dotcms-field-elements/src/components/dot-time/dot-time.tsx", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "styleUrls": [], + "styles": [], + "templateUrl": [], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "classNames", + "deprecated": false, + "deprecationMessage": "", + "type": "DotFieldStatusClasses", + "optional": false, + "description": "", + "line": 74, + "decorators": [ + { + "name": "State", + "stringifiedArguments": "" + } + ] + }, + { + "name": "disabled", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "

    (optional) Disables field's interaction

    \n", + "line": 60, + "rawdescription": "\n(optional) Disables field's interaction", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "el", + "deprecated": false, + "deprecationMessage": "", + "type": "HTMLElement", + "optional": false, + "description": "", + "line": 28, + "decorators": [ + { + "name": "Element", + "stringifiedArguments": "" + } + ] + }, + { + "name": "errorMessageElement", + "deprecated": false, + "deprecationMessage": "", + "type": "JSX.Element", + "optional": false, + "description": "", + "line": 75, + "decorators": [ + { + "name": "State", + "stringifiedArguments": "" + } + ] + }, + { + "name": "hint", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    (optional) Hint text that suggest a clue of the field

    \n", + "line": 44, + "rawdescription": "\n(optional) Hint text that suggest a clue of the field", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "label", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    (optional) Text to be rendered next to input field

    \n", + "line": 40, + "rawdescription": "\n(optional) Text to be rendered next to input field", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "max", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    (optional) Max, maximum value that the field will allow to set. Format should be hh:mm:ss

    \n", + "line": 68, + "rawdescription": "\n(optional) Max, maximum value that the field will allow to set. Format should be hh:mm:ss", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{mutable: true, reflect: true}" + } + ] + }, + { + "name": "min", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    (optional) Min, minimum value that the field will allow to set. Format should be hh:mm:ss

    \n", + "line": 64, + "rawdescription": "\n(optional) Min, minimum value that the field will allow to set. Format should be hh:mm:ss", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{mutable: true, reflect: true}" + } + ] + }, + { + "name": "name", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    Name that will be used as ID

    \n", + "line": 36, + "rawdescription": "\nName that will be used as ID", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "required", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "

    (optional) Determine if it is mandatory

    \n", + "line": 48, + "rawdescription": "\n(optional) Determine if it is mandatory", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "requiredMessage", + "defaultValue": "'This field is required'", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    (optional) Text that be shown when required is set and condition not met

    \n", + "line": 52, + "rawdescription": "\n(optional) Text that be shown when required is set and condition not met", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "statusChange", + "deprecated": false, + "deprecationMessage": "", + "type": "EventEmitter", + "optional": false, + "description": "", + "line": 78, + "decorators": [ + { + "name": "Event", + "stringifiedArguments": "" + } + ] + }, + { + "name": "step", + "defaultValue": "'1'", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    (optional) Step specifies the legal number intervals for the input field

    \n", + "line": 72, + "rawdescription": "\n(optional) Step specifies the legal number intervals for the input field", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "validationMessage", + "defaultValue": "\"The field doesn't comply with the specified format\"", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    (optional) Text that be shown when min or max are set and condition not met

    \n", + "line": 56, + "rawdescription": "\n(optional) Text that be shown when min or max are set and condition not met", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "value", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    Value format hh:mm:ss e.g., 15:22:00

    \n", + "line": 32, + "rawdescription": "\nValue format hh:mm:ss e.g., 15:22:00", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{mutable: true, reflect: true}" + } + ] + }, + { + "name": "valueChange", + "deprecated": false, + "deprecationMessage": "", + "type": "EventEmitter", + "optional": false, + "description": "", + "line": 77, + "decorators": [ + { + "name": "Event", + "stringifiedArguments": "" + } + ] + } + ], + "methodsClass": [ + { + "name": "componentDidLoad", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 93, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "componentWillLoad", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 89, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "emitStatusChange", + "args": [ + { + "name": "event", + "type": "CustomEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 124, + "deprecated": false, + "deprecationMessage": "", + "decorators": [ + { + "name": "Listen", + "stringifiedArguments": "'_statusChange'" + } + ], + "jsdoctags": [ + { + "name": "event", + "type": "CustomEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "emitValueChange", + "args": [ + { + "name": "event", + "type": "CustomEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 116, + "deprecated": false, + "deprecationMessage": "", + "decorators": [ + { + "name": "Listen", + "stringifiedArguments": "'_valueChange'" + } + ], + "jsdoctags": [ + { + "name": "event", + "type": "CustomEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getErrorMessage", + "args": [ + { + "name": "statusEvent", + "type": "DotInputCalendarStatusEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 174, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "statusEvent", + "type": "DotInputCalendarStatusEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "maxWatch", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 111, + "deprecated": false, + "deprecationMessage": "", + "decorators": [ + { + "name": "Watch", + "stringifiedArguments": "'max'" + } + ] + }, + { + "name": "minWatch", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 106, + "deprecated": false, + "deprecationMessage": "", + "decorators": [ + { + "name": "Watch", + "stringifiedArguments": "'min'" + } + ] + }, + { + "name": "render", + "args": [], + "optional": false, + "returnType": "any", + "typeParameters": [], + "line": 139, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "reset", + "args": [], + "optional": false, + "returnType": "Promise", + "typeParameters": [], + "line": 84, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nReset properties of the field, clear value and emit events.\n", + "description": "

    Reset properties of the field, clear value and emit events.

    \n", + "decorators": [ + { + "name": "Method", + "stringifiedArguments": "" + } + ], + "modifierKind": [131] + }, + { + "name": "setErrorMessageElement", + "args": [ + { + "name": "statusEvent", + "type": "DotInputCalendarStatusEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 167, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "statusEvent", + "type": "DotInputCalendarStatusEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "validateProps", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 162, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import {\n Component,\n Element,\n Event,\n EventEmitter,\n Listen,\n Method,\n Prop,\n State,\n Watch,\n Host,\n h\n} from '@stencil/core';\nimport {\n DotFieldStatusClasses,\n DotFieldStatusEvent,\n DotFieldValueEvent,\n DotInputCalendarStatusEvent\n} from '../../models';\nimport { checkProp, getClassNames, getTagError, getTagHint, getHintId } from '../../utils';\nimport { setDotAttributesToElement, getDotAttributesFromElement } from '../dot-form/utils';\n\n@Component({\n tag: 'dot-time',\n styleUrl: 'dot-time.scss'\n})\nexport class DotTimeComponent {\n @Element() el: HTMLElement;\n\n /** Value format hh:mm:ss e.g., 15:22:00 */\n @Prop({ mutable: true, reflect: true })\n value = '';\n\n /** Name that will be used as ID */\n @Prop({ reflect: true })\n name = '';\n\n /** (optional) Text to be rendered next to input field */\n @Prop({ reflect: true })\n label = '';\n\n /** (optional) Hint text that suggest a clue of the field */\n @Prop({ reflect: true })\n hint = '';\n\n /** (optional) Determine if it is mandatory */\n @Prop({ reflect: true })\n required = false;\n\n /** (optional) Text that be shown when required is set and condition not met */\n @Prop({ reflect: true })\n requiredMessage = 'This field is required';\n\n /** (optional) Text that be shown when min or max are set and condition not met */\n @Prop({ reflect: true })\n validationMessage = \"The field doesn't comply with the specified format\";\n\n /** (optional) Disables field's interaction */\n @Prop({ reflect: true })\n disabled = false;\n\n /** (optional) Min, minimum value that the field will allow to set. Format should be hh:mm:ss */\n @Prop({ mutable: true, reflect: true })\n min = '';\n\n /** (optional) Max, maximum value that the field will allow to set. Format should be hh:mm:ss */\n @Prop({ mutable: true, reflect: true })\n max = '';\n\n /** (optional) Step specifies the legal number intervals for the input field */\n @Prop({ reflect: true })\n step = '1';\n\n @State() classNames: DotFieldStatusClasses;\n @State() errorMessageElement: JSX.Element;\n\n @Event() valueChange: EventEmitter;\n @Event() statusChange: EventEmitter;\n\n /**\n * Reset properties of the field, clear value and emit events.\n */\n @Method()\n async reset(): Promise {\n const input = this.el.querySelector('dot-input-calendar');\n input.reset();\n }\n\n componentWillLoad(): void {\n this.validateProps();\n }\n\n componentDidLoad(): void {\n const attrException = ['dottype'];\n const htmlElement = this.el.querySelector('input[type=\"time\"]');\n setTimeout(() => {\n const attrs = getDotAttributesFromElement(\n Array.from(this.el.attributes),\n attrException\n );\n setDotAttributesToElement(htmlElement, attrs);\n }, 0);\n }\n\n @Watch('min')\n minWatch(): void {\n this.min = checkProp(this, 'min', 'time');\n }\n\n @Watch('max')\n maxWatch(): void {\n this.max = checkProp(this, 'max', 'time');\n }\n\n @Listen('_valueChange')\n emitValueChange(event: CustomEvent) {\n event.stopImmediatePropagation();\n const valueEvent: DotFieldValueEvent = event.detail;\n this.value = valueEvent.value as string;\n this.valueChange.emit(valueEvent);\n }\n\n @Listen('_statusChange')\n emitStatusChange(event: CustomEvent) {\n event.stopImmediatePropagation();\n const inputCalendarStatus: DotInputCalendarStatusEvent = event.detail;\n this.classNames = getClassNames(\n inputCalendarStatus.status,\n inputCalendarStatus.status.dotValid,\n this.required\n );\n this.setErrorMessageElement(inputCalendarStatus);\n this.statusChange.emit({\n name: inputCalendarStatus.name,\n status: inputCalendarStatus.status\n });\n }\n\n render() {\n return (\n \n \n \n \n {getTagHint(this.hint)}\n {this.errorMessageElement}\n \n );\n }\n\n private validateProps(): void {\n this.minWatch();\n this.maxWatch();\n }\n\n private setErrorMessageElement(statusEvent: DotInputCalendarStatusEvent) {\n this.errorMessageElement = getTagError(\n !statusEvent.status.dotValid && !statusEvent.status.dotPristine,\n this.getErrorMessage(statusEvent)\n );\n }\n\n private getErrorMessage(statusEvent: DotInputCalendarStatusEvent): string {\n return !!this.value\n ? statusEvent.isValidRange\n ? ''\n : this.validationMessage\n : this.requiredMessage;\n }\n}\n", + "tag": "dot-time", + "styleUrl": "dot-time.scss", + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "" + }, + { + "name": "DotTimeComponent", + "id": "component-DotTimeComponent-9e354bfa411496239b60968f4f785b348371b480582e1a92197140c2d3ba81f70f2d82e5367632c3ff3dd84d8b509cfbaf5a365b5249dd5e7c439f5162f58b88-1", + "file": "libs/dotcms-webcomponents/src/components/contenttypes-fields/dot-time/dot-time.tsx", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "styleUrls": [], + "styles": [], + "templateUrl": [], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "classNames", + "deprecated": false, + "deprecationMessage": "", + "type": "DotFieldStatusClasses", + "optional": false, + "description": "", + "line": 77, + "decorators": [ + { + "name": "State", + "stringifiedArguments": "" + } + ] + }, + { + "name": "disabled", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "

    (optional) Disables field's interaction

    \n", + "line": 62, + "rawdescription": "\n(optional) Disables field's interaction", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "dotStatusChange", + "deprecated": false, + "deprecationMessage": "", + "type": "EventEmitter", + "optional": false, + "description": "", + "line": 84, + "decorators": [ + { + "name": "Event", + "stringifiedArguments": "" + } + ] + }, + { + "name": "dotValueChange", + "deprecated": false, + "deprecationMessage": "", + "type": "EventEmitter", + "optional": false, + "description": "", + "line": 82, + "decorators": [ + { + "name": "Event", + "stringifiedArguments": "" + } + ] + }, + { + "name": "el", + "deprecated": false, + "deprecationMessage": "", + "type": "HTMLElement", + "optional": false, + "description": "", + "line": 30, + "decorators": [ + { + "name": "Element", + "stringifiedArguments": "" + } + ] + }, + { + "name": "errorMessageElement", + "deprecated": false, + "deprecationMessage": "", + "type": "JSX.Element", + "optional": false, + "description": "", + "line": 79, + "decorators": [ + { + "name": "State", + "stringifiedArguments": "" + } + ] + }, + { + "name": "hint", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    (optional) Hint text that suggest a clue of the field

    \n", + "line": 46, + "rawdescription": "\n(optional) Hint text that suggest a clue of the field", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "label", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    (optional) Text to be rendered next to input field

    \n", + "line": 42, + "rawdescription": "\n(optional) Text to be rendered next to input field", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "max", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    (optional) Max, maximum value that the field will allow to set. Format should be hh:mm:ss

    \n", + "line": 70, + "rawdescription": "\n(optional) Max, maximum value that the field will allow to set. Format should be hh:mm:ss", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{mutable: true, reflect: true}" + } + ] + }, + { + "name": "min", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    (optional) Min, minimum value that the field will allow to set. Format should be hh:mm:ss

    \n", + "line": 66, + "rawdescription": "\n(optional) Min, minimum value that the field will allow to set. Format should be hh:mm:ss", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{mutable: true, reflect: true}" + } + ] + }, + { + "name": "name", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    Name that will be used as ID

    \n", + "line": 38, + "rawdescription": "\nName that will be used as ID", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "required", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "

    (optional) Determine if it is mandatory

    \n", + "line": 50, + "rawdescription": "\n(optional) Determine if it is mandatory", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "requiredMessage", + "defaultValue": "'This field is required'", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    (optional) Text that be shown when required is set and condition not met

    \n", + "line": 54, + "rawdescription": "\n(optional) Text that be shown when required is set and condition not met", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "step", + "defaultValue": "'1'", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    (optional) Step specifies the legal number intervals for the input field

    \n", + "line": 74, + "rawdescription": "\n(optional) Step specifies the legal number intervals for the input field", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "validationMessage", + "defaultValue": "\"The field doesn't comply with the specified format\"", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    (optional) Text that be shown when min or max are set and condition not met

    \n", + "line": 58, + "rawdescription": "\n(optional) Text that be shown when min or max are set and condition not met", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "value", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    Value format hh:mm:ss e.g., 15:22:00

    \n", + "line": 34, + "rawdescription": "\nValue format hh:mm:ss e.g., 15:22:00", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{mutable: true, reflect: true}" + } + ] + } + ], + "methodsClass": [ + { + "name": "componentDidLoad", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 99, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "componentWillLoad", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 95, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "emitStatusChange", + "args": [ + { + "name": "event", + "type": "CustomEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 130, + "deprecated": false, + "deprecationMessage": "", + "decorators": [ + { + "name": "Listen", + "stringifiedArguments": "'_dotStatusChange'" + } + ], + "jsdoctags": [ + { + "name": "event", + "type": "CustomEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "emitValueChange", + "args": [ + { + "name": "event", + "type": "CustomEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 122, + "deprecated": false, + "deprecationMessage": "", + "decorators": [ + { + "name": "Listen", + "stringifiedArguments": "'_dotValueChange'" + } + ], + "jsdoctags": [ + { + "name": "event", + "type": "CustomEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getErrorMessage", + "args": [ + { + "name": "statusEvent", + "type": "DotInputCalendarStatusEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 180, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "statusEvent", + "type": "DotInputCalendarStatusEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "maxWatch", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 117, + "deprecated": false, + "deprecationMessage": "", + "decorators": [ + { + "name": "Watch", + "stringifiedArguments": "'max'" + } + ] + }, + { + "name": "minWatch", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 112, + "deprecated": false, + "deprecationMessage": "", + "decorators": [ + { + "name": "Watch", + "stringifiedArguments": "'min'" + } + ] + }, + { + "name": "render", + "args": [], + "optional": false, + "returnType": "any", + "typeParameters": [], + "line": 145, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "reset", + "args": [], + "optional": false, + "returnType": "Promise", + "typeParameters": [], + "line": 90, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nReset properties of the field, clear value and emit events.\n", + "description": "

    Reset properties of the field, clear value and emit events.

    \n", + "decorators": [ + { + "name": "Method", + "stringifiedArguments": "" + } + ], + "modifierKind": [131] + }, + { + "name": "setErrorMessageElement", + "args": [ + { + "name": "statusEvent", + "type": "DotInputCalendarStatusEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 173, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "statusEvent", + "type": "DotInputCalendarStatusEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "validateProps", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 168, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import {\n Component,\n Element,\n Event,\n EventEmitter,\n Listen,\n Method,\n Prop,\n State,\n Watch,\n h,\n Host\n} from '@stencil/core';\n\nimport {\n DotFieldStatusClasses,\n DotFieldStatusEvent,\n DotFieldValueEvent,\n DotInputCalendarStatusEvent\n} from '../../../models';\nimport { checkProp, getClassNames, getTagError, getTagHint, getHintId } from '../../../utils';\nimport { setDotAttributesToElement, getDotAttributesFromElement } from '../dot-form/utils';\n\n@Component({\n tag: 'dot-time',\n styleUrl: 'dot-time.scss'\n})\nexport class DotTimeComponent {\n @Element()\n el: HTMLElement;\n\n /** Value format hh:mm:ss e.g., 15:22:00 */\n @Prop({ mutable: true, reflect: true })\n value = '';\n\n /** Name that will be used as ID */\n @Prop({ reflect: true })\n name = '';\n\n /** (optional) Text to be rendered next to input field */\n @Prop({ reflect: true })\n label = '';\n\n /** (optional) Hint text that suggest a clue of the field */\n @Prop({ reflect: true })\n hint = '';\n\n /** (optional) Determine if it is mandatory */\n @Prop({ reflect: true })\n required = false;\n\n /** (optional) Text that be shown when required is set and condition not met */\n @Prop({ reflect: true })\n requiredMessage = 'This field is required';\n\n /** (optional) Text that be shown when min or max are set and condition not met */\n @Prop({ reflect: true })\n validationMessage = \"The field doesn't comply with the specified format\";\n\n /** (optional) Disables field's interaction */\n @Prop({ reflect: true })\n disabled = false;\n\n /** (optional) Min, minimum value that the field will allow to set. Format should be hh:mm:ss */\n @Prop({ mutable: true, reflect: true })\n min = '';\n\n /** (optional) Max, maximum value that the field will allow to set. Format should be hh:mm:ss */\n @Prop({ mutable: true, reflect: true })\n max = '';\n\n /** (optional) Step specifies the legal number intervals for the input field */\n @Prop({ reflect: true })\n step = '1';\n\n @State()\n classNames: DotFieldStatusClasses;\n @State()\n errorMessageElement: JSX.Element;\n\n @Event()\n dotValueChange: EventEmitter;\n @Event()\n dotStatusChange: EventEmitter;\n\n /**\n * Reset properties of the field, clear value and emit events.\n */\n @Method()\n async reset(): Promise {\n const input = this.el.querySelector('dot-input-calendar');\n input.reset();\n }\n\n componentWillLoad(): void {\n this.validateProps();\n }\n\n componentDidLoad(): void {\n const attrException = ['dottype'];\n const htmlElement = this.el.querySelector('input[type=\"time\"]');\n setTimeout(() => {\n const attrs = getDotAttributesFromElement(\n Array.from(this.el.attributes),\n attrException\n );\n setDotAttributesToElement(htmlElement, attrs);\n }, 0);\n }\n\n @Watch('min')\n minWatch(): void {\n this.min = checkProp(this, 'min', 'time');\n }\n\n @Watch('max')\n maxWatch(): void {\n this.max = checkProp(this, 'max', 'time');\n }\n\n @Listen('_dotValueChange')\n emitValueChange(event: CustomEvent) {\n event.stopImmediatePropagation();\n const valueEvent: DotFieldValueEvent = event.detail;\n this.value = valueEvent.value as string;\n this.dotValueChange.emit(valueEvent);\n }\n\n @Listen('_dotStatusChange')\n emitStatusChange(event: CustomEvent) {\n event.stopImmediatePropagation();\n const inputCalendarStatus: DotInputCalendarStatusEvent = event.detail;\n this.classNames = getClassNames(\n inputCalendarStatus.status,\n inputCalendarStatus.status.dotValid,\n this.required\n );\n this.setErrorMessageElement(inputCalendarStatus);\n this.dotStatusChange.emit({\n name: inputCalendarStatus.name,\n status: inputCalendarStatus.status\n });\n }\n\n render() {\n return (\n \n \n \n \n {getTagHint(this.hint)}\n {this.errorMessageElement}\n \n );\n }\n\n private validateProps(): void {\n this.minWatch();\n this.maxWatch();\n }\n\n private setErrorMessageElement(statusEvent: DotInputCalendarStatusEvent) {\n this.errorMessageElement = getTagError(\n !statusEvent.status.dotValid && !statusEvent.status.dotPristine,\n this.getErrorMessage(statusEvent)\n );\n }\n\n private getErrorMessage(statusEvent: DotInputCalendarStatusEvent): string {\n return !!this.value\n ? statusEvent.isValidRange\n ? ''\n : this.validationMessage\n : this.requiredMessage;\n }\n}\n", + "tag": "dot-time", + "styleUrl": "dot-time.scss", + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "", + "isDuplicate": true, + "duplicateId": 1, + "duplicateName": "DotTimeComponent-1" + }, + { + "name": "DotToolbarComponent", + "id": "component-DotToolbarComponent-9dfd1111bc149efbed448655df1b28b29552eabd1cba955cee93a95ddf676bfac41c0c8426b252cfe0c4405a60ba9972d4a7568eed6ead797e641045880aba98", + "file": "apps/dotcms-ui/src/app/view/components/dot-toolbar/dot-toolbar.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-toolbar", + "styleUrls": ["./dot-toolbar.component.scss"], + "styles": [], + "templateUrl": ["./dot-toolbar.component.html"], + "viewProviders": [], + "inputsClass": [ + { + "name": "collapsed", + "deprecated": false, + "deprecationMessage": "", + "line": 16, + "type": "boolean", + "decorators": [] + } + ], + "outputsClass": [], + "propertiesClass": [ + { + "name": "dotNavigationService", + "deprecated": false, + "deprecationMessage": "", + "type": "DotNavigationService", + "optional": false, + "description": "", + "line": 25, + "modifierKind": [123] + }, + { + "name": "iframeOverlayService", + "deprecated": false, + "deprecationMessage": "", + "type": "IframeOverlayService", + "optional": false, + "description": "", + "line": 26, + "modifierKind": [123] + }, + { + "name": "logo$", + "defaultValue": "this.dotNavLogoService.navBarLogo$", + "deprecated": false, + "deprecationMessage": "", + "type": "BehaviorSubject", + "optional": false, + "description": "", + "line": 17 + } + ], + "methodsClass": [ + { + "name": "handleMainButtonClick", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 47, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 29, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "siteChange", + "args": [ + { + "name": "site", + "type": "Site", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 39, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "site", + "type": "Site", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, Input, OnInit } from '@angular/core';\nimport { SiteService, Site, DotcmsEventsService, DotcmsConfigService } from '@dotcms/dotcms-js';\nimport { IframeOverlayService } from '../_common/iframe/service/iframe-overlay.service';\nimport { DotRouterService } from '@services/dot-router/dot-router.service';\nimport { DotNavigationService } from '../dot-navigation/services/dot-navigation.service';\nimport { DotNavLogoService } from '@services/dot-nav-logo/dot-nav-logo.service';\nimport { BehaviorSubject } from 'rxjs';\n\n@Component({\n selector: 'dot-toolbar',\n styleUrls: ['./dot-toolbar.component.scss'],\n templateUrl: './dot-toolbar.component.html'\n})\nexport class DotToolbarComponent implements OnInit {\n @Input()\n collapsed: boolean;\n logo$: BehaviorSubject = this.dotNavLogoService.navBarLogo$;\n\n constructor(\n private dotRouterService: DotRouterService,\n private dotcmsEventsService: DotcmsEventsService,\n private dotCmsConfigService: DotcmsConfigService,\n private dotNavLogoService: DotNavLogoService,\n private siteService: SiteService,\n public dotNavigationService: DotNavigationService,\n public iframeOverlayService: IframeOverlayService\n ) {}\n\n ngOnInit(): void {\n this.dotcmsEventsService.subscribeTo('ARCHIVE_SITE').subscribe((data: Site) => {\n if (data.hostname === this.siteService.currentSite.hostname && data.archived) {\n this.siteService.switchToDefaultSite().subscribe((defaultSite: Site) => {\n this.siteChange(defaultSite);\n });\n }\n });\n }\n\n siteChange(site: Site): void {\n this.siteService.switchSite(site);\n\n if (this.dotRouterService.isEditPage()) {\n this.dotRouterService.goToSiteBrowser();\n }\n }\n\n handleMainButtonClick(): void {\n this.dotNavigationService.toggle();\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"variables\" as *;\n@import \"mixins\";\n\n:host {\n ::ng-deep {\n dot-site-selector {\n span.p-button-text {\n max-width: 300px;\n @include truncate-text;\n }\n }\n }\n}\n\np-toolbar::ng-deep {\n z-index: 1004; // Menu and dropdown options in primeng use 1003.\n\n .p-toolbar {\n background-color: $toolbar-background;\n color: $toolbar-color;\n height: $toolbar-height;\n padding: 0 $spacing-3 0 0;\n box-shadow: $md-shadow-1;\n }\n\n .p-toolbar-group-right > * {\n margin-left: $spacing-3;\n }\n}\n\ndot-toolbar-user,\ndot-toolbar-notifications {\n width: 32px;\n}\n\n.toolbar__button-wrapper {\n align-items: center;\n background-color: $brand-background;\n display: flex;\n height: $toolbar-height;\n justify-content: center;\n width: 70px;\n}\n\n.toolbar__crumbtrail {\n margin-left: $spacing-4;\n}\n\n.toolbar__logo-wrapper.toolbar__logo-wrapper--whitelabel.toolbar__logo-wrapper--collapsed {\n width: 0;\n\n .toolbar__logo--whitelabel {\n display: none;\n }\n}\n\n.toolbar__logo-wrapper--collapsed.toolbar__logo-wrapper--whitelabel .toolbar__logo {\n display: none;\n}\n\n#logo {\n left: 0;\n position: relative;\n z-index: 1;\n display: block;\n width: 90px;\n height: 16px;\n background-repeat: no-repeat;\n}\n\n.toolbar__logo {\n @extend #logo;\n background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHdpZHRoPSI5MHB4IiBoZWlnaHQ9IjE2cHgiIHZpZXdCb3g9IjAgMCA5MCAxNiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4gICAgICAgIDx0aXRsZT4zRjE5NjAzNC05RDNCLTQxNUUtQjRGOS01MzI4OThGNzlCNDc8L3RpdGxlPiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggc2tldGNodG9vbC48L2Rlc2M+ICAgIDxkZWZzPjwvZGVmcz4gICAgPGcgaWQ9IjEtLUhvbWUiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPiAgICAgICAgPGcgaWQ9IkhvbWUtW01lbnUtRGlzcGxheWVkXSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTg2LjAwMDAwMCwgLTIyLjAwMDAwMCkiPiAgICAgICAgICAgIDxnIGlkPSJUb3AtQmFyIj4gICAgICAgICAgICAgICAgPGcgaWQ9IkxvZ28iPiAgICAgICAgICAgICAgICAgICAgPGcgaWQ9IkxvZ28rTWVudSI+ICAgICAgICAgICAgICAgICAgICAgICAgPGcgaWQ9IkxvZ28iIHRyYW5zZm9ybT0idHJhbnNsYXRlKDg2LjAwMDAwMCwgMjIuMDAwMDAwKSI+ICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxyZWN0IGlkPSJCYWNrZ3JvdW5kIiB4PSIwIiB5PSIwIiB3aWR0aD0iOTAiIGhlaWdodD0iMTYiPjwvcmVjdD4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPGcgaWQ9Ikdyb3VwLUNvcHktNSI+ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMC4xNTcyMzg3MjIsOS40NTk5OTk5OSBDMC4xNTcyMzg3MjIsOS40NDY5OTk5OSAwLjE1NzIzODcyMiw5LjQzMzY2NjY2IDAuMTU2ODg3MTYsOS40MjAzMzMzMiBMMC4xNTY4ODcxNiw5LjMxNzY2NjY2IEMwLjE1NzIzODcyMiw5LjMwNDMzMzMzIDAuMTU3MjM4NzIyLDkuMjkxMzMzMzMgMC4xNTcyMzg3MjIsOS4yNzggTDAuMTU3MjM4NzIyLDkuNDU5OTk5OTkiIGlkPSJGaWxsLTEyIiBmaWxsPSIjRkZGRkZGIj48L3BhdGg+ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNNS44ODY0MjAyMywxNS4yMjEgTDUuODIyMzM0NjMsMTUuMjIxIEMzLjAyNTMzMDc0LDE1LjIwNTMzMzMgMC4xOTMzMDczOTMsMTMuMDU3MzMzMyAwLjE1NzIzNzM1NCw5LjQ2IEwwLjE1NzIzNzM1NCw5LjI3OCBDMC4xOTMzMDczOTMsNS42NjY2NjY2NyAzLjA0NjY5MjYxLDMuNDcyNjY2NjcgNS44NTM1MDE5NSwzLjQ3MjY2NjY3IEM4LjE5NjMwMzUsMy40NzI2NjY2NyA5LjcxMjk5NjExLDQuNzQ4NjY2NjcgMTAuNjc3NDMxOSw2LjE1NyBMMTAuNjc3NDMxOSwwLjE1MSBMMTEuODAzMzA3NCwwLjE1MSBMMTEuODAyOTU3MiwxNC45NTczMzMzIEwxMC42Nzc0MzE5LDE0Ljk1NzMzMzMgTDEwLjY3NzQzMTksMTIuNDQ5IEM5LjY3MTMyMjk2LDEzLjkxNjY2NjcgOC4xODc4OTg4MywxNS4yMDkgNS44ODY0MjAyMywxNS4yMjEgTTUuOTY4NzE1OTUsNC41MDcgQzMuNDE4OTQ5NDIsNC41MDcgMS4zNzQ1MTM2Miw2LjI4OSAxLjM3NDUxMzYyLDkuMzAzMzMzMzMgTDEuMzc0NTEzNjIsOS4zNDcgQzEuMzc0NTEzNjIsMTIuMjk1IDMuNTEwNzAwMzksMTQuMTg3IDUuOTY4NzE1OTUsMTQuMTg3IEM4LjQwMzYxODY4LDE0LjE4NyAxMC43NDY0MjAyLDEyLjIyOTMzMzMgMTAuNzQ2NDIwMiw5LjM2OSBMMTAuNzQ2NDIwMiw5LjMyNSBDMTAuNzQ2NDIwMiw2LjQ0MjY2NjY3IDguNDAzNjE4NjgsNC41MDcgNS45Njg3MTU5NSw0LjUwNyIgaWQ9IkZpbGwtMTQiIGZpbGw9IiNGRkZGRkYiPjwvcGF0aD4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0yOC45ODIxMDEyLDEyLjA3NTMzMzMgTDI4Ljk4MjEwMTIsNC43MjcgTDI3LjI4MjYwNyw0LjcyNyBMMjcuMjgyNjA3LDMuNzM3IEwyOC45ODIxMDEyLDMuNzM3IEwyOC45ODIxMDEyLDAuMTUxIEwzMC4xMDc2MjY1LDAuMTUxIEwzMC4xMDc2MjY1LDMuNzM3IEwzNC4yMTg5MTA1LDMuNzM3IEwzNC4yMTg5MTA1LDQuNzI3IEwzMC4xMDc2MjY1LDQuNzI3IEwzMC4xMDc2MjY1LDExLjk2NSBDMzAuMTA3NjI2NSwxMy41NzEgMzEuMDk1MTc1MSwxNC4xNDMzMzMzIDMyLjQ1MDQyOCwxNC4xNDMzMzMzIEMzMy4wMjQ3NDcxLDE0LjE0MzMzMzMgMzMuNTA3NjY1NCwxNC4wMzMzMzMzIDM0LjE3MzAzNSwxMy43NDcgTDM0LjE3MzAzNSwxNC43NTk2NjY3IEMzMy41NzU5NTMzLDE1LjAyMyAzMy4wMDE2MzQyLDE1LjE1NTMzMzMgMzIuMjY2NTc1OSwxNS4xNTUzMzMzIEMzMC40NTIyMTc5LDE1LjE1NTMzMzMgMjguOTgyMTAxMiwxNC4yMDkzMzMzIDI4Ljk4MjEwMTIsMTIuMDc1MzMzMyIgaWQ9IkZpbGwtMTYiIGZpbGw9IiNGRkZGRkYiPjwvcGF0aD4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0zNi4zNzcxNTk1LDcuNzQgTDM2LjM3NzE1OTUsNy42ODYzMzMzMyBDMzYuMzc3MTU5NSwzLjU1NDMzMzMzIDM5LjY3NTk5MjIsMC4xNTEgNDQuMzAwMzExMywwLjE1MSBDNDcuMTQ4MDkzNCwwLjE1MSA0OC45MjQ5ODA1LDEuMDY5NjY2NjcgNTAuMzM0ODYzOCwyLjU4MiBMNDcuNzEyMjU2OCw1LjI4MjMzMzMzIEM0Ni43NTM0MjQxLDQuMzEwNjY2NjcgNDUuNzk1MjkxOCwzLjY4OSA0NC4yNzIyOTU3LDMuNjg5IEM0Mi4xMjkxMDUxLDMuNjg5IDQwLjYwNjgwOTMsNS40OTgzMzMzMyA0MC42MDY4MDkzLDcuNjMyIEw0MC42MDY4MDkzLDcuNjg2MzMzMzMgQzQwLjYwNjgwOTMsOS45MDA2NjY2NyA0Mi4xMDEwODk1LDExLjY4MzMzMzMgNDQuNDQxNDM5NywxMS42ODMzMzMzIEM0NS44NzkzMzg1LDExLjY4MzMzMzMgNDYuODY2NTM3LDExLjA4OTMzMzMgNDcuOTA5NzY2NSwxMC4xNDQgTDUwLjQxOTI2MDcsMTIuNTc1IEM0OC45NTI5OTYxLDE0LjExNCA0Ny4yNjEyMDYyLDE1LjIyMTMzMzMgNDQuMjQ0MjgwMiwxNS4yMjEzMzMzIEMzOS43MDQ3MDgyLDE1LjIyMTMzMzMgMzYuMzc3MTU5NSwxMS44NzIgMzYuMzc3MTU5NSw3Ljc0IiBpZD0iRmlsbC0xNyIgZmlsbD0iI0ZGRkZGRiI+PC9wYXRoPiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTUyLjQ0MDIzMzUsMC40MjEgTDU2LjcyNTIxNCwwLjQyMSBMNTYuNzI1MjE0LDIuNDczNjY2NjcgQzU3LjcxMzExMjgsMS4yNTgzMzMzMyA1OS4wMDk4ODMzLDAuMTUxIDYxLjE4MDczOTMsMC4xNTEgQzYzLjE1NTEzNjIsMC4xNTEgNjQuNjQ4NzE2LDAuOTg4MzMzMzMzIDY1LjQzODc1NDksMi40NDcgQzY2Ljc2NDI0MTIsMC45NjEzMzMzMzMgNjguMzQyOTE4MywwLjE1MSA3MC40MDEwMTE3LDAuMTUxIEM3My41ODc3ODIxLDAuMTUxIDc1LjUwNDc0NzEsMS45ODc2NjY2NyA3NS41MDQ3NDcxLDUuNDcxMzMzMzMgTDc1LjUwNDc0NzEsMTQuODk3IEw3MS4yMTk0MTYzLDE0Ljg5NyBMNzEuMjE5NDE2Myw2LjgyMiBDNzEuMjE5NDE2Myw0Ljg3NzY2NjY3IDcwLjMxNjk2NSwzLjg3ODMzMzMzIDY4LjcwOTU3MiwzLjg3ODMzMzMzIEM2Ny4xMDIxNzksMy44NzgzMzMzMyA2Ni4xMTUzMzA3LDQuODc3NjY2NjcgNjYuMTE1MzMwNyw2LjgyMiBMNjYuMTE1MzMwNywxNC44OTcgTDYxLjgyOTY0OTgsMTQuODk3IEw2MS44Mjk2NDk4LDYuODIyIEM2MS44Mjk2NDk4LDQuODc3NjY2NjcgNjAuOTI3NTQ4NiwzLjg3ODMzMzMzIDU5LjMyMDUwNTgsMy44NzgzMzMzMyBDNTcuNzEzMTEyOCwzLjg3ODMzMzMzIDU2LjcyNTIxNCw0Ljg3NzY2NjY3IDU2LjcyNTIxNCw2LjgyMiBMNTYuNzI1MjE0LDE0Ljg5NyBMNTIuNDQwMjMzNSwxNC44OTcgTDUyLjQ0MDIzMzUsMC40MjEiIGlkPSJGaWxsLTE4IiBmaWxsPSIjRkZGRkZGIj48L3BhdGg+ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNNzcuNTc3MTk4NCwxMi45Nzk2NjY3IEw3OS40MTAxMTY3LDEwLjI3ODY2NjcgQzgxLjA0NTUyNTMsMTEuNDEzNjY2NyA4Mi43NjU2ODA5LDEyLjAwNzMzMzMgODQuMTc1NTY0MiwxMi4wMDczMzMzIEM4NS40MTU2MDMxLDEyLjAwNzMzMzMgODUuOTgwMTE2NywxMS41NzU2NjY3IDg1Ljk4MDExNjcsMTAuOTI3IEM4NS45ODAxMTY3LDkuOTgyIDg0LjUxNDIwMjMsOS42ODUgODIuODUwMDc3OCw5LjE5ODY2NjY3IEM4MC43MzU2MDMxLDguNjA1IDc4LjMzODUyMTQsNy42NTkgNzguMzM4NTIxNCw0Ljg1MDY2NjY3IEM3OC4zMzg1MjE0LDEuODUyMzMzMzMgODAuODIsMC4yMDUzMzMzMzMgODMuODY1MjkxOCwwLjIwNTMzMzMzMyBDODUuNzgyNjA3LDAuMjA1MzMzMzMzIDg3Ljg2OTA2NjEsMC44MjYzMzMzMzMgODkuNTA0NDc0NywxLjg3OTMzMzMzIEw4Ny44NjkwNjYxLDQuNzE1NjY2NjcgQzg2LjM3NDQzNTgsMy44NzggODQuODgwNTA1OCwzLjM2NTMzMzMzIDgzLjc4MDE5NDYsMy4zNjUzMzMzMyBDODIuNzM4MDE1NiwzLjM2NTMzMzMzIDgyLjIwMTg2NzcsMy43OTc2NjY2NyA4Mi4yMDE4Njc3LDQuMzY0NjY2NjcgQzgyLjIwMTg2NzcsNS4yMjgzMzMzMyA4My42NDA0NjY5LDUuNjA2NjY2NjcgODUuMjc1MTc1MSw2LjE0NyBDODcuMzg5NjQ5OCw2LjgyMTY2NjY3IDg5Ljg0MzExMjgsNy43OTQzMzMzMyA4OS44NDMxMTI4LDEwLjQ0MSBDODkuODQzMTEyOCwxMy43MDg2NjY3IDg3LjMzMzYxODcsMTUuMTY3MzMzMyA4NC4wNjI4MDE2LDE1LjE2NzMzMzMgQzgxLjk0Nzk3NjcsMTUuMTY3MzMzMyA3OS41Nzk2MTA5LDE0LjQ5MiA3Ny41NzcxOTg0LDEyLjk3OTY2NjciIGlkPSJGaWxsLTE5IiBmaWxsPSIjRkZGRkZGIj48L3BhdGg+ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMjAuMDcwNzAwNCwzLjQ3MjY2NjY3IEMxNi41Nzg5MTA1LDMuNDcyNjY2NjcgMTQuMDI5NDk0Miw2LjIwMTMzMzMzIDE0LjAyOTQ5NDIsOS4zNDcgTDE0LjAyOTQ5NDIsOS4zOTEgQzE0LjAyOTQ5NDIsMTIuNTM3MzMzMyAxNi41NTYxNDc5LDE1LjIyMTMzMzMgMjAuMDI0ODI0OSwxNS4yMjEzMzMzIEMyMy41MTYyNjQ2LDE1LjIyMTMzMzMgMjYuMDY2MDMxMSwxMi40OTMgMjYuMDY2MDMxMSw5LjM0NyBMMjYuMDY2MDMxMSw5LjMwMzMzMzMzIEMyNi4wNjYwMzExLDYuMTU3IDIzLjUzOTM3NzQsMy40NzI2NjY2NyAyMC4wNzA3MDA0LDMuNDcyNjY2NjciIGlkPSJGaWxsLTIwIiBmaWxsPSIjQzMzNkU1Ij48L3BhdGg+ICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZz4gICAgICAgICAgICAgICAgICAgICAgICA8L2c+ICAgICAgICAgICAgICAgICAgICA8L2c+ICAgICAgICAgICAgICAgIDwvZz4gICAgICAgICAgICA8L2c+ICAgICAgICA8L2c+ICAgIDwvZz48L3N2Zz4=);\n\n .toolbar__logo-wrapper--collapsed & {\n background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHdpZHRoPSI5MHB4IiBoZWlnaHQ9IjE2cHgiIHZpZXdCb3g9IjAgMCA5MCAxNiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4gICAgICAgIDx0aXRsZT5DQ0YzN0MxMy0wRjk2LTQyODUtODUzRC03NTAyMUJCOTYwQkM8L3RpdGxlPiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggc2tldGNodG9vbC48L2Rlc2M+ICAgIDxkZWZzPjwvZGVmcz4gICAgPGcgaWQ9IjEtLUhvbWUiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPiAgICAgICAgPGcgaWQ9IkhvbWUtW01lbnUtQ29sYXBzZWRdIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtODYuMDAwMDAwLCAtMjIuMDAwMDAwKSI+ICAgICAgICAgICAgPGcgaWQ9IlRvcC1CYXIiPiAgICAgICAgICAgICAgICA8ZyBpZD0iTG9nbyI+ICAgICAgICAgICAgICAgICAgICA8ZyBpZD0iTG9nbytNZW51Ij4gICAgICAgICAgICAgICAgICAgICAgICA8ZyBpZD0iTG9nbyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoODYuMDAwMDAwLCAyMi4wMDAwMDApIj4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPHJlY3QgaWQ9IkJhY2tncm91bmQiIHg9IjAiIHk9IjAiIHdpZHRoPSI5MCIgaGVpZ2h0PSIxNiI+PC9yZWN0PiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZyBpZD0iR3JvdXAtQ29weS01Ij4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0wLjE1NzIzODcyMiw5Ljg3MTMwNDM0IEMwLjE1NzIzODcyMiw5Ljg1NzczOTEyIDAuMTU3MjM4NzIyLDkuODQzODI2MDggMC4xNTY4ODcxNiw5LjgyOTkxMzAzIEwwLjE1Njg4NzE2LDkuNzIyNzgyNjEgQzAuMTU3MjM4NzIyLDkuNzA4ODY5NTYgMC4xNTcyMzg3MjIsOS42OTUzMDQzNSAwLjE1NzIzODcyMiw5LjY4MTM5MTMgTDAuMTU3MjM4NzIyLDkuODcxMzA0MzQiIGlkPSJGaWxsLTEyIiBmaWxsPSIjRkZGRkZGIj48L3BhdGg+ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNNS44ODY0MjAyMywxNS44ODI3ODI2IEw1LjgyMjMzNDYzLDE1Ljg4Mjc4MjYgQzMuMDI1MzMwNzQsMTUuODY2NDM0OCAwLjE5MzMwNzM5MywxMy42MjUwNDM1IDAuMTU3MjM3MzU0LDkuODcxMzA0MzUgTDAuMTU3MjM3MzU0LDkuNjgxMzkxMyBDMC4xOTMzMDczOTMsNS45MTMwNDM0OCAzLjA0NjY5MjYxLDMuNjIzNjUyMTcgNS44NTM1MDE5NSwzLjYyMzY1MjE3IEM4LjE5NjMwMzUsMy42MjM2NTIxNyA5LjcxMjk5NjExLDQuOTU1MTMwNDMgMTAuNjc3NDMxOSw2LjQyNDY5NTY1IEwxMC42Nzc0MzE5LDAuMTU3NTY1MjE3IEwxMS44MDMzMDc0LDAuMTU3NTY1MjE3IEwxMS44MDI5NTcyLDE1LjYwNzY1MjIgTDEwLjY3NzQzMTksMTUuNjA3NjUyMiBMMTAuNjc3NDMxOSwxMi45OTAyNjA5IEM5LjY3MTMyMjk2LDE0LjUyMTczOTEgOC4xODc4OTg4MywxNS44NzAyNjA5IDUuODg2NDIwMjMsMTUuODgyNzgyNiBNNS45Njg3MTU5NSw0LjcwMjk1NjUyIEMzLjQxODk0OTQyLDQuNzAyOTU2NTIgMS4zNzQ1MTM2Miw2LjU2MjQzNDc4IDEuMzc0NTEzNjIsOS43MDc4MjYwOSBMMS4zNzQ1MTM2Miw5Ljc1MzM5MTMgQzEuMzc0NTEzNjIsMTIuODI5NTY1MiAzLjUxMDcwMDM5LDE0LjgwMzgyNjEgNS45Njg3MTU5NSwxNC44MDM4MjYxIEM4LjQwMzYxODY4LDE0LjgwMzgyNjEgMTAuNzQ2NDIwMiwxMi43NjEwNDM1IDEwLjc0NjQyMDIsOS43NzYzNDc4MyBMMTAuNzQ2NDIwMiw5LjczMDQzNDc4IEMxMC43NDY0MjAyLDYuNzIyNzgyNjEgOC40MDM2MTg2OCw0LjcwMjk1NjUyIDUuOTY4NzE1OTUsNC43MDI5NTY1MiIgaWQ9IkZpbGwtMTQiIGZpbGw9IiMyMTJEMzEiPjwvcGF0aD4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0yOC45ODIxMDEyLDEyLjYwMDM0NzggTDI4Ljk4MjEwMTIsNC45MzI1MjE3NCBMMjcuMjgyNjA3LDQuOTMyNTIxNzQgTDI3LjI4MjYwNywzLjg5OTQ3ODI2IEwyOC45ODIxMDEyLDMuODk5NDc4MjYgTDI4Ljk4MjEwMTIsMC4xNTc1NjUyMTcgTDMwLjEwNzYyNjUsMC4xNTc1NjUyMTcgTDMwLjEwNzYyNjUsMy44OTk0NzgyNiBMMzQuMjE4OTEwNSwzLjg5OTQ3ODI2IEwzNC4yMTg5MTA1LDQuOTMyNTIxNzQgTDMwLjEwNzYyNjUsNC45MzI1MjE3NCBMMzAuMTA3NjI2NSwxMi40ODUyMTc0IEMzMC4xMDc2MjY1LDE0LjE2MTA0MzUgMzEuMDk1MTc1MSwxNC43NTgyNjA5IDMyLjQ1MDQyOCwxNC43NTgyNjA5IEMzMy4wMjQ3NDcxLDE0Ljc1ODI2MDkgMzMuNTA3NjY1NCwxNC42NDM0NzgzIDM0LjE3MzAzNSwxNC4zNDQ2OTU3IEwzNC4xNzMwMzUsMTUuNDAxMzkxMyBDMzMuNTc1OTUzMywxNS42NzYxNzM5IDMzLjAwMTYzNDIsMTUuODE0MjYwOSAzMi4yNjY1NzU5LDE1LjgxNDI2MDkgQzMwLjQ1MjIxNzksMTUuODE0MjYwOSAyOC45ODIxMDEyLDE0LjgyNzEzMDQgMjguOTgyMTAxMiwxMi42MDAzNDc4IiBpZD0iRmlsbC0xNiIgZmlsbD0iIzIxMkQzMSI+PC9wYXRoPiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTM2LjM3NzE1OTUsOC4wNzY1MjE3NCBMMzYuMzc3MTU5NSw4LjAyMDUyMTc0IEMzNi4zNzcxNTk1LDMuNzA4ODY5NTcgMzkuNjc1OTkyMiwwLjE1NzU2NTIxNyA0NC4zMDAzMTEzLDAuMTU3NTY1MjE3IEM0Ny4xNDgwOTM0LDAuMTU3NTY1MjE3IDQ4LjkyNDk4MDUsMS4xMTYxNzM5MSA1MC4zMzQ4NjM4LDIuNjk0MjYwODcgTDQ3LjcxMjI1NjgsNS41MTIgQzQ2Ljc1MzQyNDEsNC40OTgwODY5NiA0NS43OTUyOTE4LDMuODQ5MzkxMyA0NC4yNzIyOTU3LDMuODQ5MzkxMyBDNDIuMTI5MTA1MSwzLjg0OTM5MTMgNDAuNjA2ODA5Myw1LjczNzM5MTMgNDAuNjA2ODA5Myw3Ljk2MzgyNjA5IEw0MC42MDY4MDkzLDguMDIwNTIxNzQgQzQwLjYwNjgwOTMsMTAuMzMxMTMwNCA0Mi4xMDEwODk1LDEyLjE5MTMwNDMgNDQuNDQxNDM5NywxMi4xOTEzMDQzIEM0NS44NzkzMzg1LDEyLjE5MTMwNDMgNDYuODY2NTM3LDExLjU3MTQ3ODMgNDcuOTA5NzY2NSwxMC41ODUwNDM1IEw1MC40MTkyNjA3LDEzLjEyMTczOTEgQzQ4Ljk1Mjk5NjEsMTQuNzI3NjUyMiA0Ny4yNjEyMDYyLDE1Ljg4MzEzMDQgNDQuMjQ0MjgwMiwxNS44ODMxMzA0IEMzOS43MDQ3MDgyLDE1Ljg4MzEzMDQgMzYuMzc3MTU5NSwxMi4zODgxNzM5IDM2LjM3NzE1OTUsOC4wNzY1MjE3NCIgaWQ9IkZpbGwtMTciIGZpbGw9IiMyMTJEMzEiPjwvcGF0aD4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik01Mi40NDAyMzM1LDAuNDM5MzA0MzQ4IEw1Ni43MjUyMTQsMC40MzkzMDQzNDggTDU2LjcyNTIxNCwyLjU4MTIxNzM5IEM1Ny43MTMxMTI4LDEuMzEzMDQzNDggNTkuMDA5ODgzMywwLjE1NzU2NTIxNyA2MS4xODA3MzkzLDAuMTU3NTY1MjE3IEM2My4xNTUxMzYyLDAuMTU3NTY1MjE3IDY0LjY0ODcxNiwxLjAzMTMwNDM1IDY1LjQzODc1NDksMi41NTMzOTEzIEM2Ni43NjQyNDEyLDEuMDAzMTMwNDMgNjguMzQyOTE4MywwLjE1NzU2NTIxNyA3MC40MDEwMTE3LDAuMTU3NTY1MjE3IEM3My41ODc3ODIxLDAuMTU3NTY1MjE3IDc1LjUwNDc0NzEsMi4wNzQwODY5NiA3NS41MDQ3NDcxLDUuNzA5MjE3MzkgTDc1LjUwNDc0NzEsMTUuNTQ0Njk1NyBMNzEuMjE5NDE2MywxNS41NDQ2OTU3IEw3MS4yMTk0MTYzLDcuMTE4NjA4NyBDNzEuMjE5NDE2Myw1LjA4OTczOTEzIDcwLjMxNjk2NSw0LjA0Njk1NjUyIDY4LjcwOTU3Miw0LjA0Njk1NjUyIEM2Ny4xMDIxNzksNC4wNDY5NTY1MiA2Ni4xMTUzMzA3LDUuMDg5NzM5MTMgNjYuMTE1MzMwNyw3LjExODYwODcgTDY2LjExNTMzMDcsMTUuNTQ0Njk1NyBMNjEuODI5NjQ5OCwxNS41NDQ2OTU3IEw2MS44Mjk2NDk4LDcuMTE4NjA4NyBDNjEuODI5NjQ5OCw1LjA4OTczOTEzIDYwLjkyNzU0ODYsNC4wNDY5NTY1MiA1OS4zMjA1MDU4LDQuMDQ2OTU2NTIgQzU3LjcxMzExMjgsNC4wNDY5NTY1MiA1Ni43MjUyMTQsNS4wODk3MzkxMyA1Ni43MjUyMTQsNy4xMTg2MDg3IEw1Ni43MjUyMTQsMTUuNTQ0Njk1NyBMNTIuNDQwMjMzNSwxNS41NDQ2OTU3IEw1Mi40NDAyMzM1LDAuNDM5MzA0MzQ4IiBpZD0iRmlsbC0xOCIgZmlsbD0iIzIxMkQzMSI+PC9wYXRoPiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTc3LjU3NzE5ODQsMTMuNTQ0IEw3OS40MTAxMTY3LDEwLjcyNTU2NTIgQzgxLjA0NTUyNTMsMTEuOTA5OTEzIDgyLjc2NTY4MDksMTIuNTI5MzkxMyA4NC4xNzU1NjQyLDEyLjUyOTM5MTMgQzg1LjQxNTYwMzEsMTIuNTI5MzkxMyA4NS45ODAxMTY3LDEyLjA3ODk1NjUgODUuOTgwMTE2NywxMS40MDIwODcgQzg1Ljk4MDExNjcsMTAuNDE2IDg0LjUxNDIwMjMsMTAuMTA2MDg3IDgyLjg1MDA3NzgsOS41OTg2MDg3IEM4MC43MzU2MDMxLDguOTc5MTMwNDMgNzguMzM4NTIxNCw3Ljk5MiA3OC4zMzg1MjE0LDUuMDYxNTY1MjIgQzc4LjMzODUyMTQsMS45MzI4Njk1NyA4MC44MiwwLjIxNDI2MDg3IDgzLjg2NTI5MTgsMC4yMTQyNjA4NyBDODUuNzgyNjA3LDAuMjE0MjYwODcgODcuODY5MDY2MSwwLjg2MjI2MDg3IDg5LjUwNDQ3NDcsMS45NjEwNDM0OCBMODcuODY5MDY2MSw0LjkyMDY5NTY1IEM4Ni4zNzQ0MzU4LDQuMDQ2NjA4NyA4NC44ODA1MDU4LDMuNTExNjUyMTcgODMuNzgwMTk0NiwzLjUxMTY1MjE3IEM4Mi43MzgwMTU2LDMuNTExNjUyMTcgODIuMjAxODY3NywzLjk2Mjc4MjYxIDgyLjIwMTg2NzcsNC41NTQ0MzQ3OCBDODIuMjAxODY3Nyw1LjQ1NTY1MjE3IDgzLjY0MDQ2NjksNS44NTA0MzQ3OCA4NS4yNzUxNzUxLDYuNDE0MjYwODcgQzg3LjM4OTY0OTgsNy4xMTgyNjA4NyA4OS44NDMxMTI4LDguMTMzMjE3MzkgODkuODQzMTEyOCwxMC44OTQ5NTY1IEM4OS44NDMxMTI4LDE0LjMwNDY5NTcgODcuMzMzNjE4NywxNS44MjY3ODI2IDg0LjA2MjgwMTYsMTUuODI2NzgyNiBDODEuOTQ3OTc2NywxNS44MjY3ODI2IDc5LjU3OTYxMDksMTUuMTIyMDg3IDc3LjU3NzE5ODQsMTMuNTQ0IiBpZD0iRmlsbC0xOSIgZmlsbD0iIzIxMkQzMSI+PC9wYXRoPiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTIwLjA3MDcwMDQsMy42MjM2NTIxNyBDMTYuNTc4OTEwNSwzLjYyMzY1MjE3IDE0LjAyOTQ5NDIsNi40NzA5NTY1MiAxNC4wMjk0OTQyLDkuNzUzMzkxMyBMMTQuMDI5NDk0Miw5Ljc5OTMwNDM1IEMxNC4wMjk0OTQyLDEzLjA4MjQzNDggMTYuNTU2MTQ3OSwxNS44ODMxMzA0IDIwLjAyNDgyNDksMTUuODgzMTMwNCBDMjMuNTE2MjY0NiwxNS44ODMxMzA0IDI2LjA2NjAzMTEsMTMuMDM2MTczOSAyNi4wNjYwMzExLDkuNzUzMzkxMyBMMjYuMDY2MDMxMSw5LjcwNzgyNjA5IEMyNi4wNjYwMzExLDYuNDI0Njk1NjUgMjMuNTM5Mzc3NCwzLjYyMzY1MjE3IDIwLjA3MDcwMDQsMy42MjM2NTIxNyIgaWQ9IkZpbGwtMjAiIGZpbGw9IiNDMzM2RTUiPjwvcGF0aD4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9nPiAgICAgICAgICAgICAgICAgICAgICAgIDwvZz4gICAgICAgICAgICAgICAgICAgIDwvZz4gICAgICAgICAgICAgICAgPC9nPiAgICAgICAgICAgIDwvZz4gICAgICAgIDwvZz4gICAgPC9nPjwvc3ZnPg==);\n }\n}\n\n.toolbar__logo--whitelabel {\n @extend #logo;\n}\n\n.toolbar__logo-bg {\n background-color: $brand-background;\n display: block;\n height: $toolbar-height;\n left: 0;\n position: absolute;\n top: 0;\n width: 130px;\n transition: width $basic-speed ease;\n\n .toolbar__logo-wrapper--collapsed & {\n width: 0;\n }\n}\n\n.toolbar__logo-wrapper {\n align-items: center;\n display: flex;\n height: 60px;\n justify-content: center;\n position: relative;\n width: 130px;\n}\n\n.toolbar__sep {\n border-left: solid 1px $gray-bg;\n margin: 0 $spacing-1 0 $spacing-4 !important;\n display: block;\n height: 40px;\n}\n", + "styleUrl": "./dot-toolbar.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "dotRouterService", + "type": "DotRouterService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotcmsEventsService", + "type": "DotcmsEventsService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotCmsConfigService", + "type": "DotcmsConfigService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotNavLogoService", + "type": "DotNavLogoService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "siteService", + "type": "SiteService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotNavigationService", + "type": "DotNavigationService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "iframeOverlayService", + "type": "IframeOverlayService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 17, + "jsdoctags": [ + { + "name": "dotRouterService", + "type": "DotRouterService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotcmsEventsService", + "type": "DotcmsEventsService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotCmsConfigService", + "type": "DotcmsConfigService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotNavLogoService", + "type": "DotNavLogoService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "siteService", + "type": "SiteService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotNavigationService", + "type": "DotNavigationService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "iframeOverlayService", + "type": "IframeOverlayService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": ["OnInit"], + "templateData": "\n
    \n
    \n \n
    \n \n
    \n \n
    \n \n \n
    \n \n \n
    \n \n \n \n \n \n
    \n
    \n" + }, + { + "name": "DotToolbarNotificationsComponent", + "id": "component-DotToolbarNotificationsComponent-f5ddcf0183fe2a346fe58b6084855fc6f88f2a5e18fb01e857019db93e7d20a441f1a54eab955693ad371fb9508fdf2845080f885d426a5918e276ed881487dc", + "file": "apps/dotcms-ui/src/app/view/components/dot-toolbar/components/dot-toolbar-notifications/dot-toolbar-notifications.component.ts", + "encapsulation": ["ViewEncapsulation.Emulated"], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-toolbar-notifications", + "styleUrls": ["./dot-toolbar-notifications.component.scss"], + "styles": [], + "templateUrl": ["dot-toolbar-notifications.component.html"], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "dropdown", + "deprecated": false, + "deprecationMessage": "", + "type": "DotDropdownComponent", + "optional": false, + "description": "", + "line": 16, + "decorators": [ + { + "name": "ViewChild", + "stringifiedArguments": "DotDropdownComponent, {static: true}" + } + ] + }, + { + "name": "existsMoreToLoad", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 17 + }, + { + "name": "iframeOverlayService", + "deprecated": false, + "deprecationMessage": "", + "type": "IframeOverlayService", + "optional": false, + "description": "", + "line": 25, + "modifierKind": [123] + }, + { + "name": "isNotificationsMarkedAsRead", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 21, + "modifierKind": [121] + }, + { + "name": "notifications", + "defaultValue": "[]", + "deprecated": false, + "deprecationMessage": "", + "type": "INotification[]", + "optional": false, + "description": "", + "line": 18 + }, + { + "name": "notificationsUnreadCount", + "defaultValue": "0", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 19 + }, + { + "name": "showNotifications", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 22, + "modifierKind": [121] + } + ], + "methodsClass": [ + { + "name": "clearNotitications", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 90, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "dismissAllNotifications", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 38, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "getNotifications", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 97, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "loadMore", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 74, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "markAllAsRead", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 105, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 31, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "onDismissNotification", + "args": [ + { + "name": "$event", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 50, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "$event", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "subscribeToNotifications", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 112, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "toggleNotifications", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 82, + "deprecated": false, + "deprecationMessage": "" + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, ViewEncapsulation, ViewChild, OnInit } from '@angular/core';\n\nimport { DotcmsEventsService, LoginService } from '@dotcms/dotcms-js';\nimport { INotification } from '@models/notifications';\nimport { IframeOverlayService } from '../../../_common/iframe/service/iframe-overlay.service';\nimport { NotificationsService } from '@services/notifications-service';\nimport { DotDropdownComponent } from '@components/_common/dot-dropdown-component/dot-dropdown.component';\n\n@Component({\n encapsulation: ViewEncapsulation.Emulated,\n selector: 'dot-toolbar-notifications',\n styleUrls: ['./dot-toolbar-notifications.component.scss'],\n templateUrl: 'dot-toolbar-notifications.component.html'\n})\nexport class DotToolbarNotificationsComponent implements OnInit {\n @ViewChild(DotDropdownComponent, { static: true }) dropdown: DotDropdownComponent;\n existsMoreToLoad = false;\n notifications: INotification[] = [];\n notificationsUnreadCount = 0;\n\n private isNotificationsMarkedAsRead = false;\n private showNotifications = false;\n\n constructor(\n public iframeOverlayService: IframeOverlayService,\n private dotcmsEventsService: DotcmsEventsService,\n private loginService: LoginService,\n private notificationService: NotificationsService\n ) {}\n\n ngOnInit(): void {\n this.getNotifications();\n this.subscribeToNotifications();\n\n this.loginService.watchUser(this.getNotifications.bind(this));\n }\n\n dismissAllNotifications(): void {\n const items = this.notifications.map((item) => item.id);\n this.notificationService.dismissNotifications({ items: items }).subscribe((res) => {\n // TODO: I think we should get here res and err\n if (res.errors.length) {\n return;\n }\n\n this.clearNotitications();\n });\n }\n\n onDismissNotification($event): void {\n const notificationId = $event.id;\n\n this.notificationService\n .dismissNotifications({ items: [notificationId] })\n .subscribe((res) => {\n if (res.errors.length) {\n return;\n }\n\n this.notifications = this.notifications.filter((item) => {\n return item.id !== notificationId;\n });\n\n if (this.notificationsUnreadCount) {\n this.notificationsUnreadCount--;\n }\n\n if (!this.notifications.length && !this.notificationsUnreadCount) {\n this.clearNotitications();\n }\n });\n }\n\n loadMore(): void {\n this.notificationService.getAllNotifications().subscribe((res) => {\n this.notificationsUnreadCount = res.entity.count;\n this.notifications = res.entity.notifications;\n this.existsMoreToLoad = false;\n });\n }\n\n toggleNotifications(): void {\n this.showNotifications = !this.showNotifications;\n\n if (this.showNotifications && !this.isNotificationsMarkedAsRead) {\n this.markAllAsRead();\n }\n }\n\n private clearNotitications(): void {\n this.notifications = [];\n this.notificationsUnreadCount = 0;\n this.showNotifications = false;\n this.dropdown.closeIt();\n }\n\n private getNotifications(): void {\n this.notificationService.getLastNotifications().subscribe((res) => {\n this.notificationsUnreadCount = res.entity.totalUnreadNotifications;\n this.notifications = res.entity.notifications;\n this.existsMoreToLoad = res.entity.total > res.entity.notifications.length;\n });\n }\n\n private markAllAsRead(): void {\n this.notificationService.markAllAsRead().subscribe(() => {\n this.isNotificationsMarkedAsRead = true;\n this.notificationsUnreadCount = 0;\n });\n }\n\n private subscribeToNotifications(): void {\n this.dotcmsEventsService\n .subscribeTo('NOTIFICATION')\n .subscribe((data: INotification) => {\n this.notifications.unshift(data);\n this.notificationsUnreadCount++;\n this.isNotificationsMarkedAsRead = false;\n });\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"variables\" as *;\n\n$notification-padding: $spacing-3;\n\n:host {\n position: relative;\n\n .badge {\n background-color: $brand-primary;\n border-radius: 2px;\n color: $white;\n font-size: $font-size-small;\n line-height: $font-size-small;\n padding: 2px 5px;\n position: absolute;\n left: 16px;\n top: -3px;\n }\n\n .toolbar-notifications {\n padding: $notification-padding 0 $notification-padding $notification-padding;\n width: 350px;\n\n &:before {\n background: $white;\n content: \"\";\n height: 10px;\n position: absolute;\n right: 15px;\n top: -5px;\n transform: rotate(45deg);\n width: 10px;\n }\n }\n\n .toolbar-notifications__heading {\n display: flex;\n margin-bottom: $font-size-x-small;\n justify-content: space-between;\n padding-right: $notification-padding;\n }\n\n .toolbar-notifications__title {\n align-self: center;\n font-size: $font-size-large;\n margin: 0;\n }\n\n .toolbar-notifications__footer {\n text-align: center;\n }\n\n .toolbar-notifications__footer button {\n margin: auto;\n }\n}\n", + "styleUrl": "./dot-toolbar-notifications.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "iframeOverlayService", + "type": "IframeOverlayService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotcmsEventsService", + "type": "DotcmsEventsService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "loginService", + "type": "LoginService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "notificationService", + "type": "NotificationsService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 22, + "jsdoctags": [ + { + "name": "iframeOverlayService", + "type": "IframeOverlayService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotcmsEventsService", + "type": "DotcmsEventsService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "loginService", + "type": "LoginService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "notificationService", + "type": "NotificationsService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": ["OnInit"], + "templateData": "{{\n notificationsUnreadCount\n}}\n\n\n
    \n
    \n

    \n {{ 'notifications_title' | dm }}\n

    \n \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n\n" + }, + { + "name": "DotToolbarUserComponent", + "id": "component-DotToolbarUserComponent-7e18686fe993e09f703f62f77d416b231eee5561ef4d01f93491f66d8880fa2d92ac1ea62a109f34bcd3805e328aad298499bb2f06ccfd230b8ef4d81c0368c2", + "file": "apps/dotcms-ui/src/app/view/components/dot-toolbar/components/dot-toolbar-user/dot-toolbar-user.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-toolbar-user", + "styleUrls": ["./dot-toolbar-user.component.scss"], + "styles": [], + "templateUrl": ["dot-toolbar-user.component.html"], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "auth", + "deprecated": false, + "deprecationMessage": "", + "type": "Auth", + "optional": false, + "description": "", + "line": 18 + }, + { + "name": "dropdown", + "deprecated": false, + "deprecationMessage": "", + "type": "DotDropdownComponent", + "optional": false, + "description": "", + "line": 17, + "decorators": [ + { + "name": "ViewChild", + "stringifiedArguments": "DotDropdownComponent" + } + ] + }, + { + "name": "haveLoginAsPermission$", + "deprecated": false, + "deprecationMessage": "", + "type": "Observable", + "optional": false, + "description": "", + "line": 25 + }, + { + "name": "iframeOverlayService", + "deprecated": false, + "deprecationMessage": "", + "type": "IframeOverlayService", + "optional": false, + "description": "", + "line": 31, + "modifierKind": [123] + }, + { + "name": "logoutUrl", + "defaultValue": "`${LOGOUT_URL}?r=${new Date().getTime()}`", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 23 + }, + { + "name": "showLoginAs", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 20 + }, + { + "name": "showMyAccount", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 21 + } + ], + "methodsClass": [ + { + "name": "logout", + "args": [], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 52, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nCall the logout service and clear the user session\n\n", + "description": "

    Call the logout service and clear the user session

    \n", + "jsdoctags": [ + { + "tagName": { + "pos": 1833, + "end": 1840, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "returns" + }, + "comment": "

    boolean

    \n" + } + ] + }, + { + "name": "logoutAs", + "args": [ + { + "name": "$event", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 63, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nCall the logout as service and clear the user login as\n\n", + "description": "

    Call the logout as service and clear the user login as

    \n", + "jsdoctags": [ + { + "name": "$event", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 36, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "toggleMyAccount", + "args": [], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 97, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nToggle show/hide my acccont menu\n\n", + "description": "

    Toggle show/hide my acccont menu

    \n", + "jsdoctags": [ + { + "tagName": { + "pos": 2898, + "end": 2905, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "returns" + }, + "comment": "

    boolean

    \n" + } + ] + }, + { + "name": "tooggleLoginAs", + "args": [], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 85, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nToggle show/hide login as dialog\n\n", + "description": "

    Toggle show/hide login as dialog

    \n", + "jsdoctags": [ + { + "tagName": { + "pos": 2633, + "end": 2640, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "returns" + }, + "comment": "

    boolean

    \n" + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, ViewChild, OnInit, Inject } from '@angular/core';\nimport { DotDropdownComponent } from '@components/_common/dot-dropdown-component/dot-dropdown.component';\nimport { IframeOverlayService } from '../../../_common/iframe/service/iframe-overlay.service';\nimport { LoginService, Auth, LoggerService, LOGOUT_URL, CurrentUser } from '@dotcms/dotcms-js';\nimport { LOCATION_TOKEN } from '@dotcms/app/providers';\nimport { DotNavigationService } from '@components/dot-navigation/services/dot-navigation.service';\nimport { DotRouterService } from '@services/dot-router/dot-router.service';\nimport { map } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\n\n@Component({\n selector: 'dot-toolbar-user',\n styleUrls: ['./dot-toolbar-user.component.scss'],\n templateUrl: 'dot-toolbar-user.component.html'\n})\nexport class DotToolbarUserComponent implements OnInit {\n @ViewChild(DotDropdownComponent) dropdown: DotDropdownComponent;\n auth: Auth;\n\n showLoginAs = false;\n showMyAccount = false;\n\n logoutUrl = `${LOGOUT_URL}?r=${new Date().getTime()}`;\n\n haveLoginAsPermission$: Observable;\n\n constructor(\n @Inject(LOCATION_TOKEN) private location: Location,\n private loggerService: LoggerService,\n private loginService: LoginService,\n public iframeOverlayService: IframeOverlayService,\n private dotNavigationService: DotNavigationService,\n private dotRouterService: DotRouterService\n ) {}\n\n ngOnInit(): void {\n this.loginService.watchUser((auth: Auth) => {\n this.auth = auth;\n });\n\n this.haveLoginAsPermission$ = this.loginService\n .getCurrentUser()\n .pipe(map((res: CurrentUser) => res.loginAs));\n }\n\n /**\n * Call the logout service and clear the user session\n *\n * @returns boolean\n * @memberof ToolbarUserComponent\n */\n logout(): boolean {\n this.dotRouterService.doLogOut();\n return false;\n }\n\n /**\n * Call the logout as service and clear the user login as\n *\n * @param any $event\n * @memberof To/olbarUserComponent\n */\n logoutAs($event): void {\n $event.preventDefault();\n\n this.loginService.logoutAs().subscribe(\n () => {\n this.dropdown.closeIt();\n this.dotNavigationService.goToFirstPortlet().then(() => {\n this.location.reload();\n });\n },\n (error) => {\n this.loggerService.error(error);\n }\n );\n }\n\n /**\n * Toggle show/hide login as dialog\n *\n * @returns boolean\n * @memberof ToolbarUserComponent\n */\n tooggleLoginAs(): boolean {\n this.dropdown.closeIt();\n this.showLoginAs = !this.showLoginAs;\n return false;\n }\n\n /**\n * Toggle show/hide my acccont menu\n *\n * @returns boolean\n * @memberof ToolbarUserComponent\n */\n toggleMyAccount(): boolean {\n this.showMyAccount = !this.showMyAccount;\n return false;\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"variables\" as *;\n@import \"mixins\";\n\n:host {\n display: block;\n\n .toolbar-user__content {\n min-width: 250px;\n }\n\n .toolbar-user__email {\n margin: 0;\n }\n\n .toolbar-user__header {\n background: $gray-bg;\n padding: $spacing-1 $spacing-3;\n display: flex;\n align-items: center;\n }\n\n .toolbar-user__header-gravatar {\n margin-right: $spacing-1;\n }\n\n .toolbar-user__menu {\n @include naked-list();\n margin: $spacing-3;\n white-space: nowrap;\n }\n\n .toolbar-user__user-name {\n margin: 0;\n white-space: nowrap;\n }\n\n .user-menu__item {\n display: block;\n padding: 0.25rem 0;\n }\n}\n", + "styleUrl": "./dot-toolbar-user.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "location", + "type": "Location", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "loggerService", + "type": "LoggerService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "loginService", + "type": "LoginService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "iframeOverlayService", + "type": "IframeOverlayService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotNavigationService", + "type": "DotNavigationService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotRouterService", + "type": "DotRouterService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 25, + "jsdoctags": [ + { + "name": "location", + "type": "Location", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "loggerService", + "type": "LoggerService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "loginService", + "type": "LoginService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "iframeOverlayService", + "type": "IframeOverlayService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotNavigationService", + "type": "DotNavigationService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotRouterService", + "type": "DotRouterService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": ["OnInit"], + "templateData": "\n
    \n
    \n \n
    \n
    \n {{\n auth.loginAsUser\n ? auth.loginAsUser.name || auth.loginAsUser.fullName\n : auth.user.name || auth.user.fullName\n }}\n
    \n

    \n {{ auth.loginAsUser ? auth.loginAsUser.emailAddress : auth.user.emailAddress }}\n

    \n
    \n
    \n
      \n
    • \n \n
    • \n
    • \n login-as\n
    • \n
    • \n \n
    • \n
    • \n logout-as\n
    • \n
    \n
    \n\n\n\n\n" + }, + { + "name": "DotTooltip", + "id": "component-DotTooltip-a36234f80e3ccd8a96a16160f9536586764f96aab4acd63fabdacb5d29f5f3f67d89a5cb0b73e2c612289da3d27d0001d7cd4b12ed08bec6436dffdfd06e822b", + "file": "libs/dotcms-webcomponents/src/elements/dot-tooltip/dot-tooltip.tsx", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "styleUrls": [], + "styles": [], + "templateUrl": [], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "content", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 12, + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "" + } + ] + }, + { + "name": "delay", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 14, + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "" + } + ] + }, + { + "name": "el", + "deprecated": false, + "deprecationMessage": "", + "type": "HTMLElement", + "optional": false, + "description": "", + "line": 10, + "decorators": [ + { + "name": "Element", + "stringifiedArguments": "" + } + ] + }, + { + "name": "for", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 13, + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "" + } + ] + }, + { + "name": "position", + "defaultValue": "'center bottom'", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 15, + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "" + } + ] + }, + { + "name": "showing", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 19, + "modifierKind": [121] + }, + { + "name": "targetEl", + "deprecated": false, + "deprecationMessage": "", + "type": "HTMLElement", + "optional": false, + "description": "", + "line": 17, + "modifierKind": [121] + }, + { + "name": "tooltipEl", + "deprecated": false, + "deprecationMessage": "", + "type": "HTMLElement", + "optional": false, + "description": "", + "line": 18, + "modifierKind": [121] + } + ], + "methodsClass": [ + { + "name": "appendTooltip", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 34, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "bindEvents", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 54, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "connectedCallback", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 21, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "disconnectedCallback", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 30, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "removeToolTip", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 73, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "render", + "args": [], + "optional": false, + "returnType": "any", + "typeParameters": [], + "line": 87, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "showTooltip", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 60, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "unBindEvents", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 81, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, Prop, Element } from '@stencil/core';\nimport { getElement, getPosition, PositionX, PositionY, fadeIn } from './utils';\n\n@Component({\n tag: 'dot-tooltip',\n styleUrl: 'dot-tooltip.scss',\n shadow: true\n})\nexport class DotTooltip {\n @Element() el: HTMLElement;\n\n @Prop() content: string;\n @Prop() for: string;\n @Prop() delay: number;\n @Prop() position = 'center bottom';\n\n private targetEl: HTMLElement;\n private tooltipEl: HTMLElement;\n private showing = false;\n\n connectedCallback() {\n const selector = `#${this.for}`;\n this.targetEl = this.el.parentElement\n ? this.el.parentElement.querySelector(selector)\n : this.el.offsetParent.shadowRoot.querySelector(selector);\n\n this.bindEvents();\n }\n\n disconnectedCallback() {\n this.unBindEvents();\n }\n\n private appendTooltip() {\n this.tooltipEl = getElement(this.content);\n document.body.appendChild(this.tooltipEl);\n\n const [x, y] = this.position.split(' ');\n\n const { left, top } = getPosition({\n tooltipEl: this.tooltipEl,\n targetEl: this.targetEl,\n position: {\n x: x as PositionX,\n y: y as PositionY\n }\n });\n\n this.tooltipEl.style.left = `${left}px`;\n this.tooltipEl.style.top = `${top}px`;\n fadeIn(this.tooltipEl);\n }\n\n private bindEvents() {\n this.targetEl.addEventListener('mouseenter', this.showTooltip.bind(this));\n this.targetEl.addEventListener('mouseleave', this.removeToolTip.bind(this));\n window.addEventListener('scroll', this.removeToolTip.bind(this));\n }\n\n private showTooltip() {\n this.showing = true;\n if (this.delay) {\n setTimeout(() => {\n if (this.showing) {\n this.appendTooltip();\n }\n }, this.delay);\n } else {\n this.appendTooltip();\n }\n }\n\n private removeToolTip() {\n this.showing = false;\n if (this.tooltipEl) {\n document.body.removeChild(this.tooltipEl);\n this.tooltipEl = null;\n }\n }\n\n private unBindEvents() {\n this.targetEl.removeEventListener('mouseenter', this.showTooltip.bind(this));\n this.targetEl.removeEventListener('mouseleave', this.removeToolTip.bind(this));\n window.removeEventListener('scroll', this.removeToolTip.bind(this));\n }\n\n render() {\n return null;\n }\n}\n", + "tag": "dot-tooltip", + "styleUrl": "dot-tooltip.scss", + "shadow": true, + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "" + }, + { + "name": "DotUnlicenseComponent", + "id": "component-DotUnlicenseComponent-8d2b456c8cd7eed2896eae45793c8e112f3bbdd2a7c1d332bf4366b50bf47a6662cf4dbb72c0c15b229401a0ff84d21ed5d6fb1e567082d44b6eed3e8ac021a8", + "file": "libs/dot-rules/src/lib/components/dot-unlicense/dot-unlicense.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-unlicense", + "styleUrls": ["./dot-unlicense.component.scss"], + "styles": [], + "templateUrl": ["./dot-unlicense.component.html"], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "contactUsLabel", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 13 + }, + { + "name": "learnMoreEnterpriseLabel", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 12 + }, + { + "name": "onlyEnterpriseLabel", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 11 + }, + { + "name": "requestTrialLabel", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 14 + }, + { + "name": "rulesTitle", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 10 + } + ], + "methodsClass": [ + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 18, + "deprecated": false, + "deprecationMessage": "" + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, OnInit } from '@angular/core';\nimport { I18nService } from '../../services/system/locale/I18n';\n\n@Component({\n selector: 'dot-unlicense',\n templateUrl: './dot-unlicense.component.html',\n styleUrls: ['./dot-unlicense.component.scss']\n})\nexport class DotUnlicenseComponent implements OnInit {\n rulesTitle: string;\n onlyEnterpriseLabel: string;\n learnMoreEnterpriseLabel: string;\n contactUsLabel: string;\n requestTrialLabel: string;\n\n constructor(private resources: I18nService) {}\n\n ngOnInit() {\n this.resources.get('com.dotcms.repackage.javax.portlet.title.rules').subscribe((label) => {\n this.rulesTitle = label;\n });\n this.resources.get('only-available-in-enterprise').subscribe((label) => {\n this.onlyEnterpriseLabel = label;\n });\n this.resources.get('Learn-more-about-dotCMS-Enterprise').subscribe((label) => {\n this.learnMoreEnterpriseLabel = label;\n });\n this.resources.get('Contact-Us-for-more-Information').subscribe((label) => {\n this.contactUsLabel = label;\n });\n this.resources.get('request-trial-license').subscribe((label) => {\n this.requestTrialLabel = label;\n });\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@import \"../../styles/rule-engine.scss\";\n\n.portlet-wrapper {\n align-items: center;\n display: flex;\n height: 100%;\n justify-content: center;\n}\n\n.unlicense-content {\n text-align: center;\n\n i,\n h4 {\n color: $gray-light;\n }\n\n h4 {\n font-size: $font-size-xx-large;\n font-weight: 400;\n margin: $spacing-3 0;\n }\n\n i {\n border: 7px solid;\n border-radius: 10px;\n font-size: 120px;\n }\n\n p {\n font-size: $font-size-medium;\n font-weight: 400;\n line-height: 1.5em;\n }\n\n ul {\n display: inline-block;\n\n li {\n line-height: 1.5em;\n list-style-type: disc;\n text-align: left;\n\n a {\n color: var(--color-main);\n font-size: $font-size-medium;\n }\n }\n }\n}\n\n.request-license-button {\n background: var(--color-main);\n border: solid 1px transparent;\n border-radius: 2px;\n color: #fff;\n display: inline-block;\n line-height: 36px;\n padding: 0 $spacing-4;\n text-decoration: none;\n text-transform: uppercase;\n\n &:hover {\n background: var(--color-main_mod);\n border: solid 1px transparent;\n }\n}\n", + "styleUrl": "./dot-unlicense.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "resources", + "type": "I18nService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 14, + "jsdoctags": [ + { + "name": "resources", + "type": "I18nService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": ["OnInit"], + "templateData": "
    \n
    \n tune\n

    \n {{ rulesTitle }}\n

    \n

    {{ rulesTitle }} {{ onlyEnterpriseLabel }}

    \n \n

    \n {{ requestTrialLabel }}\n

    \n
    \n
    \n" + }, + { + "name": "DotUnlicensedPorletComponent", + "id": "component-DotUnlicensedPorletComponent-5ce82e84ed9a7a077a1bebe429483bd6ea9725be1ce14d5e629bb2ceda89226fbff705688690597265cb2df3b7538e2cdf33dc372bd20a753c40b438bc93933e", + "file": "apps/dotcms-ui/src/app/portlets/shared/dot-unlicensed-porlet/dot-unlicensed-porlet.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-unlicensed-porlet", + "styleUrls": ["./dot-unlicensed-porlet.component.scss"], + "styles": [], + "templateUrl": ["./dot-unlicensed-porlet.component.html"], + "viewProviders": [], + "inputsClass": [ + { + "name": "data", + "deprecated": false, + "deprecationMessage": "", + "line": 10, + "type": "DotUnlicensedPortlet", + "decorators": [] + } + ], + "outputsClass": [], + "propertiesClass": [], + "methodsClass": [], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, Input } from '@angular/core';\nimport { DotUnlicensedPortlet } from '@portlets/dot-form-builder/resolvers/dot-form-resolver.service';\n\n@Component({\n selector: 'dot-unlicensed-porlet',\n templateUrl: './dot-unlicensed-porlet.component.html',\n styleUrls: ['./dot-unlicensed-porlet.component.scss']\n})\nexport class DotUnlicensedPorletComponent {\n @Input() data: DotUnlicensedPortlet;\n\n constructor() {}\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"variables\" as *;\n\n:host {\n align-items: center;\n background-color: $white;\n box-shadow: $md-shadow-4;\n display: flex;\n flex-direction: column;\n height: calc(100vh - 48px - #{$toolbar-height});\n justify-content: center;\n margin: $spacing-4;\n padding: $spacing-9;\n}\n\nh4 {\n margin: 0;\n}\n\ndot-icon::ng-deep .material-icons,\nh4 {\n color: $gray-light;\n}\n", + "styleUrl": "./dot-unlicensed-porlet.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [], + "line": 10 + }, + "templateData": "\n\n

    \n

    \n\n\n

    \n \n

    \n" + }, + { + "name": "DotWhatsChangedComponent", + "id": "component-DotWhatsChangedComponent-3fedde17da685b56195e1ffd055103ce03b4e5269394e38ad77013865a7a1c666ee9e2c604838fd74df3323ab02a50c4e0ca197259b529a4fb68d97544c135ce", + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-whats-changed/dot-whats-changed.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-whats-changed", + "styleUrls": ["./dot-whats-changed.component.scss"], + "styles": [], + "templateUrl": ["./dot-whats-changed.component.html"], + "viewProviders": [], + "inputsClass": [ + { + "name": "languageId", + "deprecated": false, + "deprecationMessage": "", + "line": 10, + "type": "string", + "decorators": [] + }, + { + "name": "pageId", + "deprecated": false, + "deprecationMessage": "", + "line": 12, + "type": "string", + "decorators": [] + } + ], + "outputsClass": [], + "propertiesClass": [ + { + "name": "url", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 13 + } + ], + "methodsClass": [ + { + "name": "ngOnChanges", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 17, + "deprecated": false, + "deprecationMessage": "" + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, Input, OnChanges } from '@angular/core';\n\n@Component({\n selector: 'dot-whats-changed',\n templateUrl: './dot-whats-changed.component.html',\n styleUrls: ['./dot-whats-changed.component.scss']\n})\nexport class DotWhatsChangedComponent implements OnChanges {\n @Input()\n languageId: string;\n @Input()\n pageId: string;\n url: string;\n\n constructor() {}\n\n ngOnChanges(): void {\n this.url = `/html/portlet/ext/htmlpages/view_live_working_diff.jsp?id=${this.pageId}&pageLang=${this.languageId}`;\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": ":host {\n display: flex;\n flex-direction: column;\n\n dot-iframe {\n flex-grow: 1;\n display: flex;\n flex-direction: column;\n\n ::ng-deep iframe {\n flex-grow: 1;\n }\n }\n}\n", + "styleUrl": "./dot-whats-changed.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [], + "line": 13 + }, + "implements": ["OnChanges"], + "templateData": "\n" + }, + { + "name": "DotWizardComponent", + "id": "component-DotWizardComponent-11172fdfed32bad07f294a425e9beb3a16c7e2bcb812d04eb0795abc1cf6c9ef053eba22356bdc768bc1f39ba07213a1a0900dd34385cc22bf095f28238c3c4c", + "file": "apps/dotcms-ui/src/app/view/components/_common/dot-wizard/dot-wizard.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-wizard", + "styleUrls": ["./dot-wizard.component.scss"], + "styles": [], + "templateUrl": ["./dot-wizard.component.html"], + "viewProviders": [], + "inputsClass": [ + { + "name": "data", + "deprecated": false, + "deprecationMessage": "", + "line": 35, + "type": "DotWizardInput", + "decorators": [] + } + ], + "outputsClass": [], + "propertiesClass": [ + { + "name": "componentsHost", + "deprecated": false, + "deprecationMessage": "", + "type": "DotContainerReferenceDirective[]", + "optional": false, + "description": "", + "line": 41, + "modifierKind": [121] + }, + { + "name": "currentStep", + "defaultValue": "0", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 40, + "modifierKind": [121] + }, + { + "name": "destroy$", + "defaultValue": "new Subject()", + "deprecated": false, + "deprecationMessage": "", + "type": "Subject", + "optional": false, + "description": "", + "line": 43, + "modifierKind": [121] + }, + { + "name": "dialog", + "deprecated": false, + "deprecationMessage": "", + "type": "DotDialogComponent", + "optional": false, + "description": "", + "line": 38, + "decorators": [ + { + "name": "ViewChild", + "stringifiedArguments": "'dialog', {static: true}" + } + ] + }, + { + "name": "dialogActions", + "deprecated": false, + "deprecationMessage": "", + "type": "DotDialogActions", + "optional": false, + "description": "", + "line": 32 + }, + { + "name": "formHosts", + "deprecated": false, + "deprecationMessage": "", + "type": "QueryList", + "optional": false, + "description": "", + "line": 37, + "decorators": [ + { + "name": "ViewChildren", + "stringifiedArguments": "DotContainerReferenceDirective" + } + ] + }, + { + "name": "stepsValidation", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean[]", + "optional": false, + "description": "", + "line": 42, + "modifierKind": [121] + }, + { + "name": "transform", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 33 + }, + { + "name": "wizardData", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": false, + "description": "", + "line": 31 + } + ], + "methodsClass": [ + { + "name": "close", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 72, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nClose the dialog and reset the wizard state\n", + "description": "

    Close the dialog and reset the wizard state

    \n", + "jsdoctags": [] + }, + { + "name": "consolidateValues", + "args": [ + { + "name": "data", + "type": "literal type", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "step", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 129, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "data", + "type": "literal type", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "step", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "focusFistFormElement", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 195, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "getAcceptAction", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 167, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "handleEnter", + "args": [ + { + "name": "event", + "type": "KeyboardEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 104, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nhandle the enter event, if the form is valid move to the next step\n", + "description": "

    handle the enter event, if the form is valid move to the next step

    \n", + "jsdoctags": [ + { + "name": "event", + "type": "KeyboardEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "handleTab", + "args": [ + { + "name": "event", + "type": "KeyboardEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 85, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nhandle the tab event, so when is the last field of a a step\nfocus the next/submit button.\n", + "description": "

    handle the tab event, so when is the last field of a a step\nfocus the next/submit button.

    \n", + "jsdoctags": [ + { + "name": { + "pos": 2635, + "end": 2640, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "event" + }, + "type": "KeyboardEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 2613, + "end": 2618, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 2619, + "end": 2634, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 2620, + "end": 2633, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 177, + "typeName": { + "pos": 2620, + "end": 2633, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "KeyboardEvent" + } + } + } + } + ] + }, + { + "name": "isFirstStep", + "args": [], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 175, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "isLastStep", + "args": [], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 171, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "loadComponents", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 111, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "loadNextStep", + "args": [ + { + "name": "next", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 150, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "next", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "ngOnDestroy", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 63, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 51, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "sendValue", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 186, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "setCancelButton", + "args": [], + "optional": false, + "returnType": "DialogButton", + "typeParameters": [], + "line": 212, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "setDialogActions", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 135, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "setValid", + "args": [ + { + "name": "valid", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "step", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 179, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "valid", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "step", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "updateTransform", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 191, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import {\n Component,\n ComponentFactoryResolver,\n Input,\n OnInit,\n QueryList,\n ViewChild,\n ViewChildren,\n OnDestroy,\n ComponentRef\n} from '@angular/core';\nimport { DotContainerReferenceDirective } from '@directives/dot-container-reference/dot-container-reference.directive';\nimport {\n DialogButton,\n DotDialogActions,\n DotDialogComponent\n} from '@components/dot-dialog/dot-dialog.component';\nimport { DotMessageService } from '@services/dot-message/dot-messages.service';\nimport { DotWizardStep } from '@models/dot-wizard-step/dot-wizard-step.model';\nimport { DotWizardService } from '@services/dot-wizard/dot-wizard.service';\nimport { Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { DotWizardInput } from '@models/dot-wizard-input/dot-wizard-input.model';\n\n@Component({\n selector: 'dot-wizard',\n templateUrl: './dot-wizard.component.html',\n styleUrls: ['./dot-wizard.component.scss']\n})\nexport class DotWizardComponent implements OnInit, OnDestroy {\n wizardData: { [key: string]: string };\n dialogActions: DotDialogActions;\n transform = '';\n\n @Input() data: DotWizardInput;\n @ViewChildren(DotContainerReferenceDirective)\n formHosts: QueryList;\n @ViewChild('dialog', { static: true }) dialog: DotDialogComponent;\n\n private currentStep = 0;\n private componentsHost: DotContainerReferenceDirective[];\n private stepsValidation: boolean[];\n private destroy$: Subject = new Subject();\n\n constructor(\n private componentFactoryResolver: ComponentFactoryResolver,\n private dotMessageService: DotMessageService,\n private dotWizardService: DotWizardService\n ) {}\n\n ngOnInit() {\n this.dotWizardService.showDialog$.pipe(takeUntil(this.destroy$)).subscribe((data) => {\n this.data = data;\n // need to wait to render the dotContainerReference.\n setTimeout(() => {\n this.loadComponents();\n this.setDialogActions();\n this.focusFistFormElement();\n }, 0);\n });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.complete();\n }\n\n /**\n * Close the dialog and reset the wizard state\n * @memberof DotWizardComponent\n */\n close(): void {\n this.dialog.visible = false;\n this.data = null;\n this.currentStep = 0;\n this.updateTransform();\n }\n\n /**\n * handle the tab event, so when is the last field of a a step\n * focus the next/submit button.\n * @param {KeyboardEvent} event\n * @memberof DotWizardComponent\n */\n handleTab(event: KeyboardEvent): void {\n const [form]: HTMLFieldSetElement[] = event\n .composedPath()\n .filter((x: Node) => x.nodeName === 'FORM') as HTMLFieldSetElement[];\n if (form) {\n if (form.elements.item(form.elements.length - 1) === event.target) {\n const acceptButton = document.getElementsByClassName(\n 'dialog__button-accept'\n )[0] as HTMLButtonElement;\n acceptButton.focus();\n event.preventDefault();\n }\n }\n }\n\n /**\n * handle the enter event, if the form is valid move to the next step\n * @memberof DotWizardComponent\n */\n handleEnter(event: KeyboardEvent): void {\n event.stopImmediatePropagation();\n if (this.stepsValidation[this.currentStep]) {\n this.dialog.acceptAction();\n }\n }\n\n private loadComponents(): void {\n this.componentsHost = this.formHosts.toArray();\n this.stepsValidation = [];\n this.data.steps.forEach((step: DotWizardStep, index: number) => {\n const comp = this.componentFactoryResolver.resolveComponentFactory(step.component);\n const viewContainerRef = this.componentsHost[index].viewContainerRef;\n viewContainerRef.clear();\n const componentRef: ComponentRef = viewContainerRef.createComponent(comp);\n componentRef.instance.data = step.data;\n componentRef.instance.value\n .pipe(takeUntil(this.destroy$))\n .subscribe((data) => this.consolidateValues(data, index));\n componentRef.instance.valid.pipe(takeUntil(this.destroy$)).subscribe((valid) => {\n this.setValid(valid, index);\n });\n });\n }\n\n private consolidateValues(data: { [key: string]: string }, step: number): void {\n if (this.stepsValidation[step] === true) {\n this.wizardData = { ...this.wizardData, ...data };\n }\n }\n\n private setDialogActions(): void {\n this.dialogActions = {\n accept: {\n action: () => {\n this.getAcceptAction();\n },\n label: this.isLastStep()\n ? this.dotMessageService.get('send')\n : this.dotMessageService.get('next'),\n disabled: true\n },\n cancel: this.setCancelButton()\n };\n }\n\n private loadNextStep(next: number): void {\n this.currentStep += next;\n this.focusFistFormElement();\n this.updateTransform();\n if (this.isLastStep()) {\n this.dialogActions.accept.label = this.dotMessageService.get('send');\n this.dialogActions.cancel.disabled = false;\n } else if (this.isFirstStep()) {\n this.dialogActions.cancel.disabled = true;\n this.dialogActions.accept.label = this.dotMessageService.get('next');\n } else {\n this.dialogActions.cancel.disabled = false;\n this.dialogActions.accept.label = this.dotMessageService.get('next');\n }\n this.dialogActions.accept.disabled = !this.stepsValidation[this.currentStep];\n }\n\n private getAcceptAction(): void {\n this.isLastStep() ? this.sendValue() : this.loadNextStep(1);\n }\n\n private isLastStep(): boolean {\n return this.currentStep === this.componentsHost.length - 1;\n }\n\n private isFirstStep(): boolean {\n return this.currentStep === 0;\n }\n\n private setValid(valid: boolean, step: number): void {\n this.stepsValidation[step] = valid;\n if (this.currentStep === step) {\n this.dialogActions.accept.disabled = !valid;\n }\n }\n\n private sendValue(): void {\n this.dotWizardService.output$(this.wizardData);\n this.close();\n }\n\n private updateTransform(): void {\n this.transform = `translateX(${this.currentStep * 400 * -1}px)`;\n }\n\n private focusFistFormElement(): void {\n let count = 0;\n // need to wait dynamic component to load the form.\n const interval = setInterval(() => {\n const form: HTMLFormElement = this.componentsHost[\n this.currentStep\n ].viewContainerRef.element.nativeElement.parentNode.children[0].getElementsByTagName(\n 'form'\n )[0];\n if (form || count === 10) {\n clearInterval(interval);\n (form.elements[0] as HTMLElement).focus();\n }\n count++;\n }, 200);\n }\n\n private setCancelButton(): DialogButton {\n if (this.componentsHost.length === 1) {\n return {\n action: () => this.close(),\n label: this.dotMessageService.get('cancel'),\n disabled: false\n };\n }\n return {\n action: () => this.loadNextStep(-1),\n label: this.dotMessageService.get('previous'),\n disabled: true\n };\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"variables\" as *;\n\n.dot-wizard__step {\n width: $form-width;\n flex-shrink: 0;\n}\n.dot-wizard__view {\n width: $form-width;\n overflow: hidden;\n}\n\n.dot-wizard__container {\n display: flex;\n transition: transform $basic-speed ease-in;\n}\n", + "styleUrl": "./dot-wizard.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "componentFactoryResolver", + "type": "ComponentFactoryResolver", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotMessageService", + "type": "DotMessageService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotWizardService", + "type": "DotWizardService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 43, + "jsdoctags": [ + { + "name": "componentFactoryResolver", + "type": "ComponentFactoryResolver", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotMessageService", + "type": "DotMessageService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotWizardService", + "type": "DotWizardService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": ["OnInit", "OnDestroy"], + "templateData": "\n
    \n \n
    \n \n
    \n
    \n \n\n" + }, + { + "name": "DotWorkflowsActionsSelectorFieldComponent", + "id": "component-DotWorkflowsActionsSelectorFieldComponent-9bef2fb64c73bb3dfd1bd0d4945965e4ac9d56ed8e4f342857f2c0a131f32c9eb58e5bd12cbf5ce717d8d30795e274c60ab93bc5539a066c66e02cd59002c743", + "file": "apps/dotcms-ui/src/app/view/components/_common/dot-workflows-actions-selector-field/dot-workflows-actions-selector-field.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [ + { + "name": "{\n multi: true, provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DotWorkflowsActionsSelectorFieldComponent)\n}", + "type": "component" + } + ], + "selector": "dot-workflows-actions-selector-field", + "styleUrls": ["./dot-workflows-actions-selector-field.component.scss"], + "styles": [], + "templateUrl": ["./dot-workflows-actions-selector-field.component.html"], + "viewProviders": [], + "inputsClass": [ + { + "name": "workflows", + "deprecated": false, + "deprecationMessage": "", + "line": 39, + "type": "DotCMSWorkflow[]", + "decorators": [] + } + ], + "outputsClass": [], + "propertiesClass": [ + { + "name": "actions$", + "deprecated": false, + "deprecationMessage": "", + "type": "Observable", + "optional": false, + "description": "", + "line": 41 + }, + { + "name": "disabled", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 42 + }, + { + "name": "dropdown", + "deprecated": false, + "deprecationMessage": "", + "type": "Dropdown", + "optional": false, + "description": "", + "line": 38, + "decorators": [ + { + "name": "ViewChild", + "stringifiedArguments": "'dropdown'" + } + ] + }, + { + "name": "propagateChange", + "defaultValue": "() => {...}", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 78 + }, + { + "name": "value", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 43 + } + ], + "methodsClass": [ + { + "name": "getActionsIds", + "args": [ + { + "name": "actions", + "type": "SelectItemGroup[]", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "string[]", + "typeParameters": [], + "line": 114, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "actions", + "type": "SelectItemGroup[]", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "handleChange", + "args": [ + { + "type": "DropdownEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 74, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nUpdate value on change of the multiselect\n\n", + "description": "

    Update value on change of the multiselect

    \n", + "jsdoctags": [ + { + "type": "DropdownEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "ngOnChanges", + "args": [ + { + "name": "changes", + "type": "SimpleChanges", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 62, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "changes", + "type": "SimpleChanges", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 49, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "registerOnChange", + "args": [ + { + "name": "fn", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 86, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nSet the function to be called when the control receives a change event.\n\n", + "description": "

    Set the function to be called when the control receives a change event.

    \n", + "jsdoctags": [ + { + "name": { + "pos": 2584, + "end": 2586, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "fn" + }, + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 2574, + "end": 2579, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 2580, + "end": 2583, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 2581, + "end": 2582, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 310 + } + } + } + ] + }, + { + "name": "registerOnTouched", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 90, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "setDisabledState", + "args": [ + { + "name": "value", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 98, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nSet disable state.\n\n", + "description": "

    Set disable state.

    \n", + "jsdoctags": [ + { + "name": { + "pos": 2828, + "end": 2833, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "value" + }, + "type": "boolean", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 2812, + "end": 2817, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 2818, + "end": 2827, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 2819, + "end": 2826, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 133 + } + } + } + ] + }, + { + "name": "writeValue", + "args": [ + { + "name": "value", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 108, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nWrite a new value to the element\n\n", + "description": "

    Write a new value to the element

    \n", + "jsdoctags": [ + { + "name": { + "pos": 3062, + "end": 3067, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "value" + }, + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 3047, + "end": 3052, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 3053, + "end": 3061, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 3054, + "end": 3060, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 149 + } + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import {\n Component,\n Input,\n OnChanges,\n SimpleChanges,\n forwardRef,\n OnInit,\n ViewChild\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR, ControlValueAccessor } from '@angular/forms';\nimport { Observable } from 'rxjs';\nimport { tap } from 'rxjs/operators';\n\nimport { DotCMSWorkflowAction, DotCMSWorkflow } from '@dotcms/dotcms-models';\nimport { DotWorkflowsActionsSelectorFieldService } from './services/dot-workflows-actions-selector-field.service';\nimport { SelectItem, SelectItemGroup } from 'primeng/api';\nimport { Dropdown } from 'primeng/dropdown';\n\ninterface DropdownEvent {\n originalEvent: MouseEvent;\n value: DotCMSWorkflowAction;\n}\n\n@Component({\n selector: 'dot-workflows-actions-selector-field',\n templateUrl: './dot-workflows-actions-selector-field.component.html',\n styleUrls: ['./dot-workflows-actions-selector-field.component.scss'],\n providers: [\n {\n multi: true,\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DotWorkflowsActionsSelectorFieldComponent)\n }\n ]\n})\nexport class DotWorkflowsActionsSelectorFieldComponent\n implements ControlValueAccessor, OnChanges, OnInit {\n @ViewChild('dropdown') dropdown: Dropdown;\n @Input() workflows: DotCMSWorkflow[];\n\n actions$: Observable;\n disabled = false;\n value: string;\n\n constructor(\n private dotWorkflowsActionsSelectorFieldService: DotWorkflowsActionsSelectorFieldService\n ) {}\n\n ngOnInit() {\n this.actions$ = this.dotWorkflowsActionsSelectorFieldService.get().pipe(\n tap((actions: SelectItemGroup[]) => {\n const actionsIds = this.getActionsIds(actions);\n\n if (actionsIds.length && !actionsIds.includes(this.value)) {\n this.dropdown.clear(null);\n }\n })\n );\n this.dotWorkflowsActionsSelectorFieldService.load(this.workflows);\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (!changes.workflows.firstChange) {\n this.dotWorkflowsActionsSelectorFieldService.load(changes.workflows.currentValue);\n }\n }\n\n /**\n * Update value on change of the multiselect\n *\n * @param {DropdownEvent} { value }\n * @memberof DotWorkflowsActionsSelectorFieldComponent\n */\n handleChange({ value }: DropdownEvent): void {\n this.propagateChange(value || '');\n }\n\n propagateChange = (_: any) => {};\n\n /**\n * Set the function to be called when the control receives a change event.\n *\n * @param {*} fn\n * @memberof DotWorkflowsActionsSelectorFieldComponent\n */\n registerOnChange(fn): void {\n this.propagateChange = fn;\n }\n\n registerOnTouched(): void {}\n\n /**\n * Set disable state.\n *\n * @param {boolean} value\n * @memberof DotWorkflowsActionsSelectorFieldComponent\n */\n setDisabledState(value: boolean): void {\n this.disabled = value;\n }\n\n /**\n * Write a new value to the element\n *\n * @param {string} value\n * @memberof DotWorkflowsActionsSelectorFieldComponent\n */\n writeValue(value: string): void {\n if (value) {\n this.value = value;\n }\n }\n\n private getActionsIds(actions: SelectItemGroup[]): string[] {\n return actions.reduce((acc: string[], { items }: SelectItemGroup) => {\n return [...acc, ...items.map((item: SelectItem) => item.value)];\n }, []);\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "", + "styleUrl": "./dot-workflows-actions-selector-field.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "dotWorkflowsActionsSelectorFieldService", + "type": "DotWorkflowsActionsSelectorFieldService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 43, + "jsdoctags": [ + { + "name": "dotWorkflowsActionsSelectorFieldService", + "type": "DotWorkflowsActionsSelectorFieldService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": ["ControlValueAccessor", "OnChanges", "OnInit"], + "templateData": "\n" + }, + { + "name": "DotWorkflowsSelectorFieldComponent", + "id": "component-DotWorkflowsSelectorFieldComponent-e4a8734c54137b7c4aa676cdc1bd54275c3a9f104a20ba2f207ad7b051c1bb18d8854a060012e96b7a65cc4e831ad720b8ae89a1230b3ea49f2d22ad08bc6aba", + "file": "apps/dotcms-ui/src/app/view/components/_common/dot-workflows-selector-field/dot-workflows-selector-field.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [ + { + "name": "{\n multi: true, provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DotWorkflowsSelectorFieldComponent)\n}", + "type": "component" + } + ], + "selector": "dot-workflows-selector-field", + "styleUrls": ["./dot-workflows-selector-field.component.scss"], + "styles": [], + "templateUrl": ["./dot-workflows-selector-field.component.html"], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "disabled", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 22 + }, + { + "name": "options$", + "deprecated": false, + "deprecationMessage": "", + "type": "Observable", + "optional": false, + "description": "", + "line": 20 + }, + { + "name": "propagateChange", + "defaultValue": "() => {...}", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 26 + }, + { + "name": "value", + "defaultValue": "[]", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSWorkflow[]", + "optional": false, + "description": "", + "line": 21 + } + ], + "methodsClass": [ + { + "name": "handleChange", + "args": [ + { + "name": "value", + "type": "DotCMSWorkflow[]", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 50, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nUpdate value on change of the multiselect\n\n", + "description": "

    Update value on change of the multiselect

    \n", + "jsdoctags": [ + { + "name": { + "pos": 1449, + "end": 1454, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "value" + }, + "type": "DotCMSWorkflow[]", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 1424, + "end": 1429, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 1430, + "end": 1448, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 1431, + "end": 1447, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 182, + "elementType": { + "pos": 1431, + "end": 1445, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 177, + "typeName": { + "pos": 1431, + "end": 1445, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "DotCMSWorkflow" + } + } + } + } + } + ] + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 40, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "registerOnChange", + "args": [ + { + "name": "fn", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 34, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nSet the function to be called when the control receives a change event.\n\n", + "description": "

    Set the function to be called when the control receives a change event.

    \n", + "jsdoctags": [ + { + "name": { + "pos": 1101, + "end": 1103, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "fn" + }, + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 1091, + "end": 1096, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 1097, + "end": 1100, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 1098, + "end": 1099, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 310 + } + } + } + ] + }, + { + "name": "registerOnTouched", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 38, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "setDisabledState", + "args": [ + { + "name": "isDisabled", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 60, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nSet disable state.\n\n", + "description": "

    Set disable state.

    \n", + "jsdoctags": [ + { + "name": "isDisabled", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "writeValue", + "args": [ + { + "name": "value", + "type": "DotCMSWorkflow[]", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 70, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nWrite a new value to the element\n\n", + "description": "

    Write a new value to the element

    \n", + "jsdoctags": [ + { + "name": { + "pos": 1924, + "end": 1929, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "value" + }, + "type": "DotCMSWorkflow[]", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 1899, + "end": 1904, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 1905, + "end": 1923, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 1906, + "end": 1922, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 182, + "elementType": { + "pos": 1906, + "end": 1920, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 177, + "typeName": { + "pos": 1906, + "end": 1920, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "DotCMSWorkflow" + } + } + } + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { DotWorkflowService } from '@services/dot-workflow/dot-workflow.service';\nimport { Observable } from 'rxjs';\nimport { DotCMSWorkflow } from '@dotcms/dotcms-models';\nimport { Component, OnInit, forwardRef } from '@angular/core';\nimport { NG_VALUE_ACCESSOR, ControlValueAccessor } from '@angular/forms';\n\n@Component({\n selector: 'dot-workflows-selector-field',\n templateUrl: './dot-workflows-selector-field.component.html',\n styleUrls: ['./dot-workflows-selector-field.component.scss'],\n providers: [\n {\n multi: true,\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DotWorkflowsSelectorFieldComponent)\n }\n ]\n})\nexport class DotWorkflowsSelectorFieldComponent implements ControlValueAccessor, OnInit {\n options$: Observable;\n value: DotCMSWorkflow[] = [];\n disabled = false;\n\n constructor(private dotWorkflowService: DotWorkflowService) {}\n\n propagateChange = (_: any) => {};\n\n /**\n * Set the function to be called when the control receives a change event.\n *\n * @param {*} fn\n * @memberof DotWorkflowsSelectorFieldComponent\n */\n registerOnChange(fn): void {\n this.propagateChange = fn;\n }\n\n registerOnTouched(): void {}\n\n ngOnInit() {\n this.options$ = this.dotWorkflowService.get();\n }\n\n /**\n * Update value on change of the multiselect\n *\n * @param {DotCMSWorkflow[]} value\n * @memberof DotWorkflowsSelectorFieldComponent\n */\n handleChange(value: DotCMSWorkflow[]): void {\n this.propagateChange(value);\n }\n\n /**\n * Set disable state.\n *\n * @param boolean isDisabled\n * @memberof DotWorkflowsSelectorFieldComponent\n */\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n /**\n * Write a new value to the element\n *\n * @param {DotCMSWorkflow[]} value\n * @memberof DotWorkflowsSelectorFieldComponent\n */\n writeValue(value: DotCMSWorkflow[]): void {\n this.value = value;\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"variables\" as *;\n@import \"mixins\";\n\n.workflow__archive-label {\n color: $gray;\n text-decoration: line-through;\n}\n\n.workflow__archive-message {\n color: $gray;\n font-size: $font-size-small;\n margin-left: $spacing-1;\n}\n", + "styleUrl": "./dot-workflows-selector-field.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "dotWorkflowService", + "type": "DotWorkflowService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 22, + "jsdoctags": [ + { + "name": "dotWorkflowService", + "type": "DotWorkflowService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": ["ControlValueAccessor", "OnInit"], + "templateData": "\n \n {{\n workflow.name\n }}\n ({{ 'dot.common.archived' | dm }})
    \n \n\n" + }, + { + "name": "DotWorkflowTaskComponent", + "id": "component-DotWorkflowTaskComponent-d0e3522bb7f8be7b40b4d031cb3859da8062363bce9d6141729f7d15cce8b15fa0253ebeb804cda024037c43ff75dfd1452fd4e2acb1f675c17301ad1c492bf1", + "file": "apps/dotcms-ui/src/app/portlets/dot-porlet-detail/dot-workflow-task/dot-workflow-task.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-workflow-task", + "styleUrls": [], + "styles": [], + "template": "", + "templateUrl": [], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [], + "methodsClass": [ + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 25, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "onCloseWorkflowTaskEditor", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 37, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nHandle close event from the dot-workflow-task-detail\n\n", + "description": "

    Handle close event from the dot-workflow-task-detail

    \n", + "jsdoctags": [] + }, + { + "name": "onCustomEvent", + "args": [ + { + "name": "$event", + "type": "CustomEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 48, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nHandle custom event from the dot-workflow-task-detail\n\n", + "description": "

    Handle custom event from the dot-workflow-task-detail

    \n", + "jsdoctags": [ + { + "name": "$event", + "type": "CustomEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, OnInit } from '@angular/core';\nimport { DotWorkflowTaskDetailService } from '@components/dot-workflow-task-detail/services/dot-workflow-task-detail.service';\nimport { ActivatedRoute } from '@angular/router';\nimport { DotMessageService } from '@services/dot-message/dot-messages.service';\nimport { DotRouterService } from '@services/dot-router/dot-router.service';\nimport { DotIframeService } from '@components/_common/iframe/service/dot-iframe/dot-iframe.service';\nimport { DotCustomEventHandlerService } from '@services/dot-custom-event-handler/dot-custom-event-handler.service';\n\n@Component({\n providers: [],\n selector: 'dot-workflow-task',\n template:\n ''\n})\nexport class DotWorkflowTaskComponent implements OnInit {\n constructor(\n private dotWorkflowTaskDetailService: DotWorkflowTaskDetailService,\n private dotMessageService: DotMessageService,\n private dotRouterService: DotRouterService,\n private route: ActivatedRoute,\n private dotIframeService: DotIframeService,\n private dotCustomEventHandlerService: DotCustomEventHandlerService\n ) {}\n\n ngOnInit() {\n this.dotWorkflowTaskDetailService.view({\n header: this.dotMessageService.get('workflow.task.dialog.header'),\n id: this.route.snapshot.params.asset\n });\n }\n\n /**\n * Handle close event from the dot-workflow-task-detail\n *\n * @memberof DotWorkflowTaskComponent\n */\n onCloseWorkflowTaskEditor(): void {\n this.dotRouterService.gotoPortlet('/c/workflow');\n this.dotIframeService.reloadData('workflow');\n }\n\n /**\n * Handle custom event from the dot-workflow-task-detail\n *\n * @param CustomEvent $event\n * @memberof DotWorkflowTaskComponent\n */\n onCustomEvent($event: CustomEvent): void {\n if (['edit-task-executed-workflow', 'close'].includes($event.detail.name)) {\n this.onCloseWorkflowTaskEditor();\n } else {\n $event.detail.data.callback = 'fileActionCallbackFromAngular';\n this.dotCustomEventHandlerService.handle($event);\n }\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "dotWorkflowTaskDetailService", + "type": "DotWorkflowTaskDetailService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotMessageService", + "type": "DotMessageService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotRouterService", + "type": "DotRouterService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "route", + "type": "ActivatedRoute", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotIframeService", + "type": "DotIframeService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotCustomEventHandlerService", + "type": "DotCustomEventHandlerService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 15, + "jsdoctags": [ + { + "name": "dotWorkflowTaskDetailService", + "type": "DotWorkflowTaskDetailService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotMessageService", + "type": "DotMessageService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotRouterService", + "type": "DotRouterService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "route", + "type": "ActivatedRoute", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotIframeService", + "type": "DotIframeService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotCustomEventHandlerService", + "type": "DotCustomEventHandlerService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": ["OnInit"] + }, + { + "name": "DotWorkflowTaskDetailComponent", + "id": "component-DotWorkflowTaskDetailComponent-6fd06176e4c2bc327124b631f74d20dbe984cbe35f89e59d0387250b60f8f4820e71e57ddea831942a5979f8f803c7bfda397a449462e6e58f31feae5bc1d581", + "file": "apps/dotcms-ui/src/app/view/components/dot-workflow-task-detail/dot-workflow-task-detail.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-workflow-task-detail", + "styleUrls": [], + "styles": [], + "templateUrl": ["./dot-workflow-task-detail.component.html"], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [ + { + "name": "close", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 18, + "type": "EventEmitter" + }, + { + "name": "custom", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 21, + "type": "EventEmitter" + } + ], + "propertiesClass": [ + { + "name": "header$", + "deprecated": false, + "deprecationMessage": "", + "type": "Observable", + "optional": false, + "description": "", + "line": 24 + }, + { + "name": "url$", + "deprecated": false, + "deprecationMessage": "", + "type": "Observable", + "optional": false, + "description": "", + "line": 23 + } + ], + "methodsClass": [ + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 28, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "onClose", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 38, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nHandle close dialog event\n\n", + "description": "

    Handle close dialog event

    \n", + "jsdoctags": [] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "

    Allow user to view a workflow task to a DotCMS instance

    \n", + "rawdescription": "\n\nAllow user to view a workflow task to a DotCMS instance\n\n", + "type": "component", + "sourceCode": "import { Component, EventEmitter, Output, OnInit } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { DotWorkflowTaskDetailService } from './services/dot-workflow-task-detail.service';\n\n/**\n * Allow user to view a workflow task to a DotCMS instance\n *\n * @export\n * @class DotWorkflowTaskDetailComponent\n * @implements {OnInit}\n */\n@Component({\n selector: 'dot-workflow-task-detail',\n templateUrl: './dot-workflow-task-detail.component.html'\n})\nexport class DotWorkflowTaskDetailComponent implements OnInit {\n @Output()\n close: EventEmitter = new EventEmitter();\n\n @Output()\n custom: EventEmitter = new EventEmitter();\n\n url$: Observable;\n header$: Observable;\n\n constructor(private dotWorkflowTaskDetailService: DotWorkflowTaskDetailService) {}\n\n ngOnInit() {\n this.url$ = this.dotWorkflowTaskDetailService.viewUrl$;\n this.header$ = this.dotWorkflowTaskDetailService.header$;\n }\n\n /**\n * Handle close dialog event\n *\n * @memberof DotWorkflowTaskDetailComponent\n */\n onClose(): void {\n this.dotWorkflowTaskDetailService.clear();\n this.close.emit();\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "dotWorkflowTaskDetailService", + "type": "DotWorkflowTaskDetailService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 24, + "jsdoctags": [ + { + "name": "dotWorkflowTaskDetailService", + "type": "DotWorkflowTaskDetailService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": ["OnInit"], + "templateData": "\n" + }, + { + "name": "DragHandlerComponent", + "id": "component-DragHandlerComponent-d851aded0394132e29b10a086695d2d31d03e89ba8bf73bcd56afed4e6a76faaf104a47a59efab76dbabb43d42719459858093501d598ab3cb96523dbd3816e3", + "file": "libs/block-editor/src/lib/extensions/components/drag-handler/drag-handler.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dotcms-drag-handler", + "styleUrls": ["./drag-handler.component.scss"], + "styles": [], + "templateUrl": ["./drag-handler.component.html"], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [], + "methodsClass": [], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'dotcms-drag-handler',\n templateUrl: './drag-handler.component.html',\n styleUrls: ['./drag-handler.component.scss']\n})\nexport class DragHandlerComponent {}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": ":host {\n position: absolute;\n cursor: grab;\n z-index: 1;\n}\n", + "styleUrl": "./drag-handler.component.scss" + } + ], + "stylesData": "", + "templateData": "drag_indicator\n" + }, + { + "name": "Dropdown", + "id": "component-Dropdown-bee0394bb4c5c3027a50acc731ff69b3ae8db45d30792bc65fa15440eba519823985f042590096837aa4f78296c3964dde026d38697f3f95e5cd1b483ecce327", + "file": "libs/dot-rules/src/lib/components/dropdown/dropdown.ts", + "changeDetection": "ChangeDetectionStrategy.OnPush", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "cw-input-dropdown", + "styleUrls": [], + "styles": [], + "template": " 0\"\n [placeholder]=\"placeholder\"\n [options]=\"dropdownOptions | async\"\n [editable]=\"allowAdditions\"\n [filter]=\"true\"\n [(ngModel)]=\"modelValue\"\n *ngIf=\"maxSelections <= 1\"\n (onChange)=\"fireChange($event.value)\"\n>\n\n 1\"\n [value]=\"modelValue\"\n [options]=\"dropdownOptions | async\"\n [placeholder]=\"placeholder\"\n (onChange)=\"fireChange($event)\"\n>\n\n", + "templateUrl": [], + "viewProviders": [], + "inputsClass": [ + { + "name": "allowAdditions", + "deprecated": false, + "deprecationMessage": "", + "line": 62, + "type": "boolean", + "decorators": [] + }, + { + "name": "focus", + "deprecated": false, + "deprecationMessage": "", + "line": 58, + "type": "boolean", + "decorators": [] + }, + { + "name": "maxSelections", + "deprecated": false, + "deprecationMessage": "", + "line": 64, + "type": "number", + "decorators": [] + }, + { + "name": "minSelections", + "deprecated": false, + "deprecationMessage": "", + "line": 63, + "type": "number", + "decorators": [] + }, + { + "name": "name", + "deprecated": false, + "deprecationMessage": "", + "line": 60, + "type": "string", + "decorators": [] + }, + { + "name": "options", + "deprecated": false, + "deprecationMessage": "", + "line": 59, + "type": "any", + "decorators": [] + }, + { + "name": "placeholder", + "deprecated": false, + "deprecationMessage": "", + "line": 61, + "type": "string", + "decorators": [] + }, + { + "name": "value", + "deprecated": false, + "deprecationMessage": "", + "line": 55, + "type": "string", + "decorators": [] + } + ], + "outputsClass": [ + { + "name": "enter", + "defaultValue": "new EventEmitter(false)", + "deprecated": false, + "deprecationMessage": "", + "line": 68, + "type": "EventEmitter" + }, + { + "name": "onDropDownChange", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 66, + "type": "EventEmitter" + }, + { + "name": "touch", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 67, + "type": "EventEmitter" + } + ], + "propertiesClass": [ + { + "name": "dropdownOptions", + "deprecated": false, + "deprecationMessage": "", + "type": "Observable", + "optional": false, + "description": "", + "line": 73 + }, + { + "name": "inputDropdown", + "deprecated": false, + "deprecationMessage": "", + "type": "PDropdown", + "optional": false, + "description": "", + "line": 70, + "decorators": [ + { + "name": "ViewChild", + "stringifiedArguments": "'inputDropdown'" + } + ] + }, + { + "name": "isFocusSet", + "defaultValue": "() => {...}", + "deprecated": false, + "deprecationMessage": "", + "type": "Function", + "optional": false, + "description": "", + "line": 111 + }, + { + "name": "modelValue", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 72 + }, + { + "name": "onChange", + "defaultValue": "() => {...}", + "deprecated": false, + "deprecationMessage": "", + "type": "Function", + "optional": false, + "description": "", + "line": 119 + }, + { + "name": "onTouched", + "defaultValue": "() => {...}", + "deprecated": false, + "deprecationMessage": "", + "type": "Function", + "optional": false, + "description": "", + "line": 120 + } + ], + "methodsClass": [ + { + "name": "fireChange", + "args": [ + { + "name": "value", + "type": "any", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 134, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "value", + "type": "any", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "fireTouch", + "args": [ + { + "name": "$event", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 143, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "$event", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "ngOnChanges", + "args": [ + { + "name": "changes", + "type": "SimpleChanges", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 85, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "changes", + "type": "SimpleChanges", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "registerOnChange", + "args": [ + { + "name": "fn", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 126, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "fn", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "registerOnTouched", + "args": [ + { + "name": "fn", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 130, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "fn", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "writeValue", + "args": [ + { + "name": "value", + "type": "any", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 122, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "value", + "type": "any", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "

    Angular wrapper around OLD Semantic UI Dropdown Module.

    \n", + "rawdescription": "\n\nAngular wrapper around OLD Semantic UI Dropdown Module.\n\n", + "type": "component", + "sourceCode": "import {\n Component,\n EventEmitter,\n Optional,\n OnChanges,\n SimpleChanges,\n ViewChild\n} from '@angular/core';\nimport { Output, Input, ChangeDetectionStrategy } from '@angular/core';\nimport { ControlValueAccessor, NgControl } from '@angular/forms';\nimport { of, Observable, from } from 'rxjs';\nimport * as _ from 'lodash';\nimport { map, mergeMap, toArray } from 'rxjs/operators';\n\nimport { Dropdown as PDropdown } from 'primeng/dropdown';\nimport { SelectItem } from 'primeng/api';\n\n/**\n * Angular wrapper around OLD Semantic UI Dropdown Module.\n *\n */\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'cw-input-dropdown',\n template: `\n 0\"\n [placeholder]=\"placeholder\"\n [options]=\"dropdownOptions | async\"\n [editable]=\"allowAdditions\"\n [filter]=\"true\"\n [(ngModel)]=\"modelValue\"\n *ngIf=\"maxSelections <= 1\"\n (onChange)=\"fireChange($event.value)\"\n >\n \n 1\"\n [value]=\"modelValue\"\n [options]=\"dropdownOptions | async\"\n [placeholder]=\"placeholder\"\n (onChange)=\"fireChange($event)\"\n >\n \n `\n})\nexport class Dropdown implements ControlValueAccessor, OnChanges {\n @Input()\n set value(value: string) {\n this.modelValue = value;\n }\n @Input() focus: boolean;\n @Input() options: any;\n @Input() name: string;\n @Input() placeholder: string;\n @Input() allowAdditions: boolean;\n @Input() minSelections: number;\n @Input() maxSelections: number;\n\n @Output() onDropDownChange: EventEmitter = new EventEmitter();\n @Output() touch: EventEmitter = new EventEmitter();\n @Output() enter: EventEmitter = new EventEmitter(false);\n\n @ViewChild('inputDropdown') inputDropdown: PDropdown;\n\n modelValue: string;\n dropdownOptions: Observable;\n\n constructor(@Optional() control: NgControl) {\n if (control && !control.valueAccessor) {\n control.valueAccessor = this;\n }\n this.placeholder = '';\n this.allowAdditions = false;\n this.minSelections = 0;\n this.maxSelections = 1;\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes.options && changes.options.currentValue) {\n this.dropdownOptions = >from(this.options).pipe(\n mergeMap((item: { [key: string]: any }) => {\n if (item.label.pipe) {\n return item.label.pipe(\n map((text: string) => {\n return {\n label: text,\n value: item.value\n };\n })\n );\n }\n\n return of({\n label: item.label,\n value: item.value\n });\n }),\n toArray()\n );\n }\n this.isFocusSet(changes);\n }\n\n isFocusSet: Function = (changes: SimpleChanges) => {\n if (changes.focus && changes.focus.currentValue) {\n setTimeout(() => {\n this.inputDropdown.focus();\n }, 0);\n }\n };\n\n onChange: Function = () => {};\n onTouched: Function = () => {};\n\n writeValue(value: any): void {\n this.modelValue = _.isEmpty(value) ? '' : value;\n }\n\n registerOnChange(fn): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn): void {\n this.onTouched = fn;\n }\n\n fireChange(value: any): void {\n this.modelValue = value;\n if (this.onDropDownChange) {\n this.onDropDownChange.emit(value);\n this.onChange(value);\n this.fireTouch(value);\n }\n }\n\n fireTouch($event): void {\n this.onTouched();\n this.touch.emit($event);\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "control", + "type": "NgControl", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 73, + "jsdoctags": [ + { + "name": "control", + "type": "NgControl", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": ["ControlValueAccessor", "OnChanges"], + "accessors": { + "value": { + "name": "value", + "setSignature": { + "name": "value", + "type": "void", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "value", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "returnType": "void", + "line": 55, + "jsdoctags": [ + { + "name": "value", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + } + } + }, + { + "name": "DynamicDialogButtonComponent", + "id": "component-DynamicDialogButtonComponent-dcc32ed168480bdc3eb47fb49d24c1960c11717ba27065ecf3dccc14f72cc4a51207e69eaf104b17970a621ea6095e798e960ed91908c862382d685c3b536bc3", + "file": "apps/dotcms-ui/src/stories/primeng/overlay/DynamicDialogButton.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [ + { + "name": "DialogService" + }, + { + "name": "MessageService" + } + ], + "selector": "app-p-dialog-button", + "styleUrls": [], + "styles": [], + "template": "", + "templateUrl": [], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "dialogService", + "deprecated": false, + "deprecationMessage": "", + "type": "DialogService", + "optional": false, + "description": "", + "line": 20, + "modifierKind": [123] + }, + { + "name": "messageService", + "deprecated": false, + "deprecationMessage": "", + "type": "MessageService", + "optional": false, + "description": "", + "line": 20, + "modifierKind": [123] + }, + { + "name": "ref", + "deprecated": false, + "deprecationMessage": "", + "type": "DynamicDialogRef", + "optional": false, + "description": "", + "line": 22 + } + ], + "methodsClass": [ + { + "name": "ngOnDestroy", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 43, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "show", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 24, + "deprecated": false, + "deprecationMessage": "" + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component } from '@angular/core';\nimport { MessageService } from 'primeng/api';\nimport { DynamicDialogProductsComponent } from './DynamicDialogProducts.component';\nimport { Product } from './Product.interface';\nimport { DialogService } from 'primeng/dynamicdialog';\nimport { DynamicDialogRef } from 'primeng/dynamicdialog';\n\n@Component({\n selector: 'app-p-dialog-button',\n providers: [DialogService, MessageService],\n template: ``\n})\nexport class DynamicDialogButtonComponent {\n constructor(public dialogService: DialogService, public messageService: MessageService) {}\n\n ref: DynamicDialogRef;\n\n show() {\n this.ref = this.dialogService.open(DynamicDialogProductsComponent, {\n header: 'Choose a Product',\n width: '70%',\n contentStyle: { 'max-height': '500px', overflow: 'auto' },\n baseZIndex: 10000\n });\n\n this.ref.onClose.subscribe((product: Product) => {\n if (product) {\n this.messageService.add({\n severity: 'info',\n summary: 'Product Selected',\n detail: product.name\n });\n }\n });\n }\n\n ngOnDestroy() {\n if (this.ref) {\n this.ref.close();\n }\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "dialogService", + "type": "DialogService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "messageService", + "type": "MessageService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 19, + "jsdoctags": [ + { + "name": "dialogService", + "type": "DialogService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "messageService", + "type": "MessageService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + }, + { + "name": "DynamicDialogProductsComponent", + "id": "component-DynamicDialogProductsComponent-2a35d4a70be3bcc4656c43b400d943182bf5daeda5044a252d50e20d4e4b9a35ccf812fc5ef0ad5ec9be37c681ac9eb526d15d25d51ac58a4e493dd585a905ca", + "file": "apps/dotcms-ui/src/stories/primeng/overlay/DynamicDialogProducts.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "app-p-dynamic-dialog", + "styleUrls": [], + "styles": [], + "template": "ProductsTableTemplate", + "templateUrl": [], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "config", + "deprecated": false, + "deprecationMessage": "", + "type": "DynamicDialogConfig", + "optional": false, + "description": "", + "line": 39, + "modifierKind": [123] + }, + { + "name": "products", + "deprecated": false, + "deprecationMessage": "", + "type": "Product[]", + "optional": false, + "description": "", + "line": 34 + }, + { + "name": "ref", + "deprecated": false, + "deprecationMessage": "", + "type": "DynamicDialogRef", + "optional": false, + "description": "", + "line": 38, + "modifierKind": [123] + } + ], + "methodsClass": [ + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 42, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "selectProduct", + "args": [ + { + "name": "product", + "type": "Product", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 46, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "product", + "type": "Product", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component } from '@angular/core';\nimport { ProductService } from './SharedProducts.service';\nimport { Product } from './Product.interface';\nimport { DynamicDialogRef, DynamicDialogConfig } from 'primeng/dynamicdialog';\n\nexport const ProductsTableTemplate = `\n \n \n \n Name \n Brand \n Status \n \n \n \n \n \n {{product.name}}\n {{product.price}}\n {{product.inventoryStatus}}\n \n \n \n \n \n \n`;\n\n@Component({\n selector: 'app-p-dynamic-dialog',\n template: ProductsTableTemplate\n})\nexport class DynamicDialogProductsComponent {\n products: Product[];\n\n constructor(\n private productService: ProductService,\n public ref: DynamicDialogRef,\n public config: DynamicDialogConfig\n ) {}\n\n ngOnInit() {\n this.productService.getProductsSmall().then((products) => (this.products = products));\n }\n\n selectProduct(product: Product) {\n this.ref.close(product);\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "productService", + "type": "ProductService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "ref", + "type": "DynamicDialogRef", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "config", + "type": "DynamicDialogConfig", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 34, + "jsdoctags": [ + { + "name": "productService", + "type": "ProductService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "ref", + "type": "DynamicDialogRef", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "config", + "type": "DynamicDialogConfig", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + }, + { + "name": "ForgotPasswordComponent", + "id": "component-ForgotPasswordComponent-2e3798015122c482a6873a704fdb9a315119dfe42ac1f30a984fb52b6251374c961acba6cef16cd221abdae9725cdbe64f6f6b85c1f13a1d2f3b7fdd48d3eb87", + "file": "apps/dotcms-ui/src/app/view/components/login/forgot-password-component/forgot-password.component.ts", + "encapsulation": ["ViewEncapsulation.Emulated"], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-forgot-password-component", + "styleUrls": ["./forgot-password.component.scss"], + "styles": [], + "templateUrl": ["forgot-password.component.html"], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "forgotPasswordConfirmationMessage", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 23, + "modifierKind": [121] + }, + { + "name": "forgotPasswordForm", + "deprecated": false, + "deprecationMessage": "", + "type": "FormGroup", + "optional": false, + "description": "", + "line": 20 + }, + { + "name": "loginInfo$", + "deprecated": false, + "deprecationMessage": "", + "type": "Observable", + "optional": false, + "description": "", + "line": 21 + }, + { + "name": "loginPageStateService", + "deprecated": false, + "deprecationMessage": "", + "type": "DotLoginPageStateService", + "optional": false, + "description": "", + "line": 27, + "modifierKind": [123] + }, + { + "name": "message", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 18 + } + ], + "methodsClass": [ + { + "name": "goToLogin", + "args": [ + { + "name": "parameters", + "type": "NavigationExtras", + "deprecated": false, + "deprecationMessage": "", + "optional": true + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 78, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nExecutes the recover password service\n\n", + "description": "

    Executes the recover password service

    \n", + "jsdoctags": [ + { + "name": "parameters", + "type": "NavigationExtras", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 32, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "submit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 50, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nExecutes the recover password service\n\n", + "description": "

    Executes the recover password service

    \n", + "jsdoctags": [] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, ViewEncapsulation, OnInit } from '@angular/core';\nimport { DotLoginInformation } from '@models/dot-login';\nimport { FormBuilder, FormGroup, Validators } from '@angular/forms';\nimport { Observable } from 'rxjs';\nimport { take, tap } from 'rxjs/operators';\nimport { DotLoginPageStateService } from '@components/login/shared/services/dot-login-page-state.service';\nimport { LoginService } from '@dotcms/dotcms-js';\nimport { DotRouterService } from '@services/dot-router/dot-router.service';\nimport { NavigationExtras } from '@angular/router';\n\n@Component({\n encapsulation: ViewEncapsulation.Emulated,\n selector: 'dot-forgot-password-component',\n templateUrl: 'forgot-password.component.html',\n styleUrls: ['./forgot-password.component.scss']\n})\nexport class ForgotPasswordComponent implements OnInit {\n message = '';\n\n forgotPasswordForm: FormGroup;\n loginInfo$: Observable;\n\n private forgotPasswordConfirmationMessage = '';\n\n constructor(\n private fb: FormBuilder,\n public loginPageStateService: DotLoginPageStateService,\n private dotRouterService: DotRouterService,\n private loginService: LoginService\n ) {}\n\n ngOnInit(): void {\n this.loginInfo$ = this.loginPageStateService.get().pipe(\n take(1),\n tap((loginInfo: DotLoginInformation) => {\n this.forgotPasswordConfirmationMessage =\n loginInfo.i18nMessagesMap['an-email-with-instructions-will-be-sent'];\n })\n );\n this.forgotPasswordForm = this.fb.group({\n login: ['', [Validators.required]]\n });\n }\n\n /**\n * Executes the recover password service\n *\n * @memberof ForgotPasswordComponent\n */\n submit(): void {\n if (confirm(this.forgotPasswordConfirmationMessage)) {\n this.message = '';\n this.loginService\n .recoverPassword(this.forgotPasswordForm.get('login').value)\n .pipe(take(1))\n .subscribe(\n () => {\n this.goToLogin({\n queryParams: {\n resetEmailSent: true,\n resetEmail: this.forgotPasswordForm.get('login').value\n }\n });\n },\n (response) => {\n this.message = response.error?.errors[0]?.message;\n }\n );\n }\n }\n\n /**\n * Executes the recover password service\n *\n * @param NavigationExtras parameters\n * @memberof ForgotPasswordComponent\n */\n goToLogin(parameters?: NavigationExtras): void {\n this.dotRouterService.goToLogin(parameters);\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"variables\" as *;\n@import \"mixins\";\n\n:host {\n @include login-container;\n}\n\nh3 {\n margin: 0;\n}\n\nbutton[type=\"submit\"] {\n margin-left: $spacing-1;\n}\n", + "styleUrl": "./forgot-password.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "fb", + "type": "FormBuilder", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "loginPageStateService", + "type": "DotLoginPageStateService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotRouterService", + "type": "DotRouterService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "loginService", + "type": "LoginService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 23, + "jsdoctags": [ + { + "name": "fb", + "type": "FormBuilder", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "loginPageStateService", + "type": "DotLoginPageStateService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotRouterService", + "type": "DotRouterService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "loginService", + "type": "LoginService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": ["OnInit"], + "templateData": "
    \n

    {{ loginInfo.i18nMessagesMap['forgot-password'] }}

    \n

    \n
    \n
    \n \n \n \n \n
    \n
    \n \n \n
    \n
    \n
    \n" + }, + { + "name": "GlobalSearchComponent", + "id": "component-GlobalSearchComponent-710d5785584cf2c80e3f74681f0d3ce9cf0e2a6c4a79f7b10407207595e95a1a164ab76c88ff4fcefcd3493f786454f2025986e4ccb823e78508f9ebda72515f", + "file": "apps/dotcms-ui/src/app/view/components/global-search/global-search.ts", + "encapsulation": ["ViewEncapsulation.Emulated"], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-global-search", + "styleUrls": ["./global-search.scss"], + "styles": [], + "templateUrl": ["global-search.html"], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [], + "methodsClass": [], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, ViewEncapsulation } from '@angular/core';\n\n@Component({\n encapsulation: ViewEncapsulation.Emulated,\n selector: 'dot-global-search',\n styleUrls: ['./global-search.scss'],\n templateUrl: 'global-search.html'\n})\nexport class GlobalSearchComponent {\n constructor() {}\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"variables\" as *;\n@import \"mixins\";\n\n$placeholder-color: rgba($white, 0.5);\n\n:host {\n flex: 1;\n margin: 0 50px;\n\n .global-search__textbox {\n background-color: rgba($white, 0.2);\n border: none;\n color: $white;\n font-size: $font-size-large;\n height: 36px;\n padding: 0 10px;\n width: 100%;\n\n &::-webkit-input-placeholder {\n color: $placeholder-color;\n }\n\n &:-moz-placeholder {\n color: $placeholder-color;\n }\n\n &::-moz-placeholder {\n color: $placeholder-color;\n }\n\n &:-ms-input-placeholder {\n color: $placeholder-color;\n }\n }\n}\n", + "styleUrl": "./global-search.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [], + "line": 9 + }, + "templateData": "\n" + }, + { + "name": "HintPropertyComponent", + "id": "component-HintPropertyComponent-5fd8de80c9dfbde61ec3bb7d330ed71f2191a9d9306692709bd112dceb51639430904dbe96e5436610ef4499602005eab124c6abac5593cd243ec96236f34499", + "file": "apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/components/fields/content-type-fields-properties-form/field-properties/hint-property/hint-property.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-hint-property", + "styleUrls": [], + "styles": [], + "templateUrl": ["./hint-property.component.html"], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "group", + "deprecated": false, + "deprecationMessage": "", + "type": "FormGroup", + "optional": false, + "description": "", + "line": 11 + }, + { + "name": "property", + "deprecated": false, + "deprecationMessage": "", + "type": "FieldProperty", + "optional": false, + "description": "", + "line": 10 + } + ], + "methodsClass": [], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component } from '@angular/core';\nimport { FormGroup } from '@angular/forms';\nimport { FieldProperty } from '../field-properties.model';\n\n@Component({\n selector: 'dot-hint-property',\n templateUrl: './hint-property.component.html'\n})\nexport class HintPropertyComponent {\n property: FieldProperty;\n group: FormGroup;\n\n constructor() {}\n}\n", + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [], + "line": 11 + }, + "templateData": "
    \n \n \n
    \n" + }, + { + "name": "IframeComponent", + "id": "component-IframeComponent-e1af16e421e4e58a6204864d844843a1d5977a3898b8c668c539bf55accd4cb0112c075295d959dc32eeaecdfd45caad923de08eadf80a17abf593881670f1fd", + "file": "apps/dotcms-ui/src/app/view/components/_common/iframe/iframe-component/iframe.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-iframe", + "styleUrls": ["./iframe.component.scss"], + "styles": [], + "templateUrl": ["iframe.component.html"], + "viewProviders": [], + "inputsClass": [ + { + "name": "isLoading", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "line": 35, + "type": "boolean", + "decorators": [] + }, + { + "name": "src", + "deprecated": false, + "deprecationMessage": "", + "line": 33, + "type": "string", + "decorators": [] + } + ], + "outputsClass": [ + { + "name": "custom", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 41, + "type": "EventEmitter" + }, + { + "name": "keydown", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 39, + "type": "EventEmitter" + }, + { + "name": "load", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 37, + "type": "EventEmitter" + } + ], + "propertiesClass": [ + { + "name": "destroy$", + "defaultValue": "new Subject()", + "deprecated": false, + "deprecationMessage": "", + "type": "Subject", + "optional": false, + "description": "", + "line": 45, + "modifierKind": [121] + }, + { + "name": "dotLoadingIndicatorService", + "deprecated": false, + "deprecationMessage": "", + "type": "DotLoadingIndicatorService", + "optional": false, + "description": "", + "line": 53, + "modifierKind": [123] + }, + { + "name": "iframeElement", + "deprecated": false, + "deprecationMessage": "", + "type": "ElementRef", + "optional": false, + "description": "", + "line": 31, + "decorators": [ + { + "name": "ViewChild", + "stringifiedArguments": "'iframeElement'" + } + ] + }, + { + "name": "iframeOverlayService", + "deprecated": false, + "deprecationMessage": "", + "type": "IframeOverlayService", + "optional": false, + "description": "", + "line": 54, + "modifierKind": [123] + }, + { + "name": "loggerService", + "deprecated": false, + "deprecationMessage": "", + "type": "LoggerService", + "optional": false, + "description": "", + "line": 55, + "modifierKind": [123] + }, + { + "name": "showOverlay", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 43 + } + ], + "methodsClass": [ + { + "name": "bindGlobalEvents", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 123, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "emitCustonEvent", + "args": [ + { + "name": "$event", + "type": "CustomEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 204, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "$event", + "type": "CustomEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "emitKeyDown", + "args": [ + { + "name": "$event", + "type": "KeyboardEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 198, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "$event", + "type": "KeyboardEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getIframeDocument", + "args": [], + "optional": false, + "returnType": "Document", + "typeParameters": [], + "line": 214, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "getIframeLocation", + "args": [], + "optional": false, + "returnType": "any", + "typeParameters": [], + "line": 218, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "getIframeWindow", + "args": [], + "optional": false, + "returnType": "Window", + "typeParameters": [], + "line": 210, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "handleErrors", + "args": [ + { + "name": "error", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 222, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "error", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "handleIframeEvents", + "args": [ + { + "name": "$event", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 234, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "$event", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "isIframeHaveContent", + "args": [], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 255, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "ngOnDestroy", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 98, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 58, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "onLoad", + "args": [ + { + "name": "$event", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 109, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nCalled when iframe load event happen.\n\n", + "description": "

    Called when iframe load event happen.

    \n", + "jsdoctags": [ + { + "name": "$event", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "setArgs", + "args": [ + { + "name": "args", + "type": "any[]", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "any[]", + "typeParameters": [], + "line": 262, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "args", + "type": "any[]", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import {\n Component,\n ElementRef,\n OnInit,\n Input,\n ViewChild,\n Output,\n EventEmitter,\n NgZone,\n OnDestroy\n} from '@angular/core';\n\nimport { takeUntil, filter, debounceTime } from 'rxjs/operators';\nimport { Subject } from 'rxjs';\n\nimport { DotcmsEventsService, DotEventTypeWrapper, LoggerService } from '@dotcms/dotcms-js';\n\nimport { DotLoadingIndicatorService } from '../dot-loading-indicator/dot-loading-indicator.service';\nimport { IframeOverlayService } from '../service/iframe-overlay.service';\nimport { DotIframeService } from '../service/dot-iframe/dot-iframe.service';\nimport { DotUiColorsService } from '@services/dot-ui-colors/dot-ui-colors.service';\nimport { DotRouterService } from '@services/dot-router/dot-router.service';\nimport { DotFunctionInfo } from '@models/dot-function-info/dot-function-info.model';\n\n@Component({\n selector: 'dot-iframe',\n styleUrls: ['./iframe.component.scss'],\n templateUrl: 'iframe.component.html'\n})\nexport class IframeComponent implements OnInit, OnDestroy {\n @ViewChild('iframeElement') iframeElement: ElementRef;\n\n @Input() src: string;\n\n @Input() isLoading = false;\n\n @Output() load: EventEmitter = new EventEmitter();\n\n @Output() keydown: EventEmitter = new EventEmitter();\n\n @Output() custom: EventEmitter = new EventEmitter();\n\n showOverlay = false;\n\n private destroy$: Subject = new Subject();\n\n constructor(\n private dotIframeService: DotIframeService,\n private dotRouterService: DotRouterService,\n private dotUiColorsService: DotUiColorsService,\n private dotcmsEventsService: DotcmsEventsService,\n private ngZone: NgZone,\n public dotLoadingIndicatorService: DotLoadingIndicatorService,\n public iframeOverlayService: IframeOverlayService,\n public loggerService: LoggerService\n ) {}\n\n ngOnInit(): void {\n this.iframeOverlayService.overlay\n .pipe(takeUntil(this.destroy$))\n .subscribe((val: boolean) => (this.showOverlay = val));\n\n this.dotIframeService\n .reloaded()\n .pipe(takeUntil(this.destroy$))\n .subscribe(() => {\n if (this.getIframeWindow()) {\n this.getIframeLocation().reload();\n }\n });\n\n this.dotIframeService\n .ran()\n .pipe(takeUntil(this.destroy$))\n .subscribe((func: DotFunctionInfo) => {\n if (\n this.getIframeWindow() &&\n typeof this.getIframeWindow()[func.name] === 'function'\n ) {\n this.getIframeWindow()[func.name](...this.setArgs(func.args));\n }\n });\n\n this.dotIframeService\n .reloadedColors()\n .pipe(takeUntil(this.destroy$))\n .subscribe(() => {\n const doc = this.getIframeDocument();\n\n if (doc) {\n this.dotUiColorsService.setColors(doc.querySelector('html'));\n }\n });\n\n this.bindGlobalEvents();\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.complete();\n }\n\n /**\n * Called when iframe load event happen.\n *\n * @param any $event\n * @memberof IframeComponent\n */\n onLoad($event): void {\n // JSP is setting the error number in the title\n const errorCode = parseInt($event.target.contentDocument.title, 10);\n if (errorCode > 400) {\n this.handleErrors(errorCode);\n }\n\n this.dotLoadingIndicatorService.hide();\n\n if (this.isIframeHaveContent()) {\n this.handleIframeEvents($event);\n }\n }\n\n private bindGlobalEvents(): void {\n const events: string[] = [\n 'SAVE_FOLDER',\n 'UPDATE_FOLDER',\n 'DELETE_FOLDER',\n 'SAVE_PAGE_ASSET',\n 'UPDATE_PAGE_ASSET',\n 'ARCHIVE_PAGE_ASSET',\n 'UN_ARCHIVE_PAGE_ASSET',\n 'DELETE_PAGE_ASSET',\n 'PUBLISH_PAGE_ASSET',\n 'UN_PUBLISH_PAGE_ASSET',\n 'SAVE_FILE_ASSET',\n 'UPDATE_FILE_ASSET',\n 'ARCHIVE_FILE_ASSET',\n 'UN_ARCHIVE_FILE_ASSET',\n 'DELETE_FILE_ASSET',\n 'PUBLISH_FILE_ASSET',\n 'UN_PUBLISH_FILE_ASSET',\n 'SAVE_LINK',\n 'UPDATE_LINK',\n 'ARCHIVE_LINK',\n 'UN_ARCHIVE_LINK',\n 'MOVE_LINK',\n 'COPY_LINK',\n 'DELETE_LINK',\n 'PUBLISH_LINK',\n 'UN_PUBLISH_LINK',\n 'MOVE_FOLDER',\n 'COPY_FOLDER',\n 'MOVE_FILE_ASSET',\n 'COPY_FILE_ASSET',\n 'MOVE_PAGE_ASSET',\n 'COPY_PAGE_ASSET',\n 'DELETE_BUNDLE',\n 'PAGE_RELOAD'\n ];\n\n const webSocketEvents$ = this.dotcmsEventsService\n .subscribeToEvents(events)\n .pipe(takeUntil(this.destroy$));\n\n webSocketEvents$\n .pipe(filter(() => this.dotRouterService.currentPortlet.id === 'site-browser'))\n .subscribe((event: DotEventTypeWrapper) => {\n this.loggerService.debug('Capturing Site Browser event', event.name, event.data);\n });\n\n webSocketEvents$\n .pipe(\n filter(\n (event: DotEventTypeWrapper) =>\n (this.iframeElement.nativeElement.contentWindow &&\n event.name === 'DELETE_BUNDLE') ||\n event.name === 'PAGE_RELOAD' // Provinding this event so backend devs can reload the jsp easily\n )\n )\n .subscribe(() => {\n this.iframeElement.nativeElement.contentWindow.postMessage('reload');\n });\n\n /**\n * The debouncetime is required because when the websocket event is received,\n * the list of plugins still cannot be updated, thi is because the framework (OSGI)\n * needs to restart before the list can be refreshed.\n * Currently, an event cannot be emitted when the framework finishes restarting.\n */\n this.dotcmsEventsService\n .subscribeTo('OSGI_BUNDLES_LOADED')\n .pipe(takeUntil(this.destroy$), debounceTime(4000))\n .subscribe(() => {\n this.dotIframeService.run({ name: 'getBundlesData' });\n });\n }\n\n private emitKeyDown($event: KeyboardEvent): void {\n this.ngZone.run(() => {\n this.keydown.emit($event);\n });\n }\n\n private emitCustonEvent($event: CustomEvent): void {\n this.ngZone.run(() => {\n this.custom.emit($event);\n });\n }\n\n private getIframeWindow(): Window {\n return this.iframeElement && this.iframeElement.nativeElement.contentWindow;\n }\n\n private getIframeDocument(): Document {\n return this.getIframeWindow().document;\n }\n\n private getIframeLocation(): any {\n return this.iframeElement.nativeElement.contentWindow.location;\n }\n\n private handleErrors(error: number): void {\n const errorMapHandler = {\n 401: () => {\n this.dotRouterService.doLogOut();\n }\n };\n\n if (errorMapHandler[error]) {\n errorMapHandler[error]();\n }\n }\n\n private handleIframeEvents($event): void {\n this.getIframeWindow().removeEventListener('keydown', this.emitKeyDown.bind(this));\n this.getIframeWindow().document.removeEventListener(\n 'ng-event',\n this.emitCustonEvent.bind(this)\n );\n\n this.getIframeWindow().addEventListener('keydown', this.emitKeyDown.bind(this));\n this.getIframeWindow().document.addEventListener(\n 'ng-event',\n this.emitCustonEvent.bind(this)\n );\n this.load.emit($event);\n\n const doc = this.getIframeDocument();\n\n if (doc) {\n this.dotUiColorsService.setColors(doc.querySelector('html'));\n }\n }\n\n private isIframeHaveContent(): boolean {\n return (\n this.iframeElement &&\n this.iframeElement.nativeElement.contentWindow.document.body.innerHTML.length\n );\n }\n\n private setArgs(args: any[]): any[] {\n return args ? args : [];\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": ":host {\n display: block;\n height: 100%;\n position: relative;\n overflow: hidden;\n\n iframe {\n border: none;\n margin: 0;\n padding: 0;\n }\n}\n", + "styleUrl": "./iframe.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "dotIframeService", + "type": "DotIframeService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotRouterService", + "type": "DotRouterService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotUiColorsService", + "type": "DotUiColorsService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotcmsEventsService", + "type": "DotcmsEventsService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "ngZone", + "type": "NgZone", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotLoadingIndicatorService", + "type": "DotLoadingIndicatorService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "iframeOverlayService", + "type": "IframeOverlayService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "loggerService", + "type": "LoggerService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 45, + "jsdoctags": [ + { + "name": "dotIframeService", + "type": "DotIframeService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotRouterService", + "type": "DotRouterService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotUiColorsService", + "type": "DotUiColorsService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotcmsEventsService", + "type": "DotcmsEventsService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "ngZone", + "type": "NgZone", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotLoadingIndicatorService", + "type": "DotLoadingIndicatorService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "iframeOverlayService", + "type": "IframeOverlayService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "loggerService", + "type": "LoggerService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": ["OnInit", "OnDestroy"], + "templateData": "\n\n\n\n" + }, + { + "name": "IframePortletLegacyComponent", + "id": "component-IframePortletLegacyComponent-8b8735387214dafc9b764976196683d0ee6d92baf75214be407d6d6be8d5ad04e80e5fb8a365a88a9eab435e72e9aefd07a0fa7950a5867ef1687e0f22adf316", + "file": "apps/dotcms-ui/src/app/view/components/_common/iframe/iframe-porlet-legacy/iframe-porlet-legacy.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-iframe-porlet", + "styleUrls": ["./iframe-porlet-legacy.component.scss"], + "styles": [], + "templateUrl": ["iframe-porlet-legacy.component.html"], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "canAccessPortlet", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 21 + }, + { + "name": "destroy$", + "defaultValue": "new Subject()", + "deprecated": false, + "deprecationMessage": "", + "type": "Subject", + "optional": false, + "description": "", + "line": 25, + "modifierKind": [121] + }, + { + "name": "isLoading", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 23 + }, + { + "name": "loggerService", + "deprecated": false, + "deprecationMessage": "", + "type": "LoggerService", + "optional": false, + "description": "", + "line": 34, + "modifierKind": [123] + }, + { + "name": "siteService", + "deprecated": false, + "deprecationMessage": "", + "type": "SiteService", + "optional": false, + "description": "", + "line": 35, + "modifierKind": [123] + }, + { + "name": "url", + "defaultValue": "new BehaviorSubject('')", + "deprecated": false, + "deprecationMessage": "", + "type": "BehaviorSubject", + "optional": false, + "description": "", + "line": 22 + } + ], + "methodsClass": [ + { + "name": "ngOnDestroy", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 64, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 38, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "onCustomEvent", + "args": [ + { + "name": "$event", + "type": "CustomEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 75, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nHandle the custom events emmited by the iframe\n\n", + "description": "

    Handle the custom events emmited by the iframe

    \n", + "jsdoctags": [ + { + "name": "$event", + "type": "CustomEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "reloadIframePortlet", + "args": [ + { + "name": "portletId", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "optional": true + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 83, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nTigger when the current site is changed, this method reload the iframe if is neccesary\n", + "description": "

    Tigger when the current site is changed, this method reload the iframe if is neccesary

    \n", + "jsdoctags": [ + { + "name": "portletId", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "setIframeSrc", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 94, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "setPortletUrl", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 110, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "setUrl", + "args": [ + { + "name": "nextUrl", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 138, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nThis function set isLoading to true, to remove the Legacy Iframe from the DOM while the src attribute is updated.\n", + "description": "

    This function set isLoading to true, to remove the Legacy Iframe from the DOM while the src attribute is updated.

    \n", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "nextUrl", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { pluck, map, withLatestFrom, mergeMap, takeUntil, skip } from 'rxjs/operators';\nimport { Component, OnInit, OnDestroy } from '@angular/core';\nimport { ActivatedRoute, UrlSegment } from '@angular/router';\n\nimport { BehaviorSubject, Subject } from 'rxjs';\n\nimport { SiteService, LoggerService } from '@dotcms/dotcms-js';\n\nimport { DotLoadingIndicatorService } from '../dot-loading-indicator/dot-loading-indicator.service';\nimport { DotMenuService } from '@services/dot-menu.service';\nimport { DotRouterService } from '@services/dot-router/dot-router.service';\nimport { DotContentTypeService } from '@services/dot-content-type/dot-content-type.service';\nimport { DotCustomEventHandlerService } from '@services/dot-custom-event-handler/dot-custom-event-handler.service';\n\n@Component({\n selector: 'dot-iframe-porlet',\n styleUrls: ['./iframe-porlet-legacy.component.scss'],\n templateUrl: 'iframe-porlet-legacy.component.html'\n})\nexport class IframePortletLegacyComponent implements OnInit, OnDestroy {\n canAccessPortlet: boolean;\n url: BehaviorSubject = new BehaviorSubject('');\n isLoading = false;\n\n private destroy$: Subject = new Subject();\n\n constructor(\n private contentletService: DotContentTypeService,\n private dotLoadingIndicatorService: DotLoadingIndicatorService,\n private dotMenuService: DotMenuService,\n private dotRouterService: DotRouterService,\n private route: ActivatedRoute,\n private dotCustomEventHandlerService: DotCustomEventHandlerService,\n public loggerService: LoggerService,\n public siteService: SiteService\n ) {}\n\n ngOnInit(): void {\n this.dotRouterService.portletReload$.subscribe((portletId: string) => {\n if (this.dotRouterService.isJSPPortlet()) {\n this.reloadIframePortlet(portletId);\n }\n });\n /**\n * skip first - to avoid subscription when page loads due login user subscription:\n * https://github.com/dotCMS/core-web/blob/master/projects/dotcms-js/src/lib/core/site.service.ts#L58\n */\n this.siteService.switchSite$.pipe(takeUntil(this.destroy$), skip(1)).subscribe(() => {\n if (this.url.getValue() !== '') {\n this.reloadIframePortlet();\n }\n });\n\n this.route.data\n .pipe(pluck('canAccessPortlet'), takeUntil(this.destroy$))\n .subscribe((canAccessPortlet: boolean) => {\n if (canAccessPortlet) {\n this.setIframeSrc();\n }\n this.canAccessPortlet = canAccessPortlet;\n });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.complete();\n }\n\n /**\n * Handle the custom events emmited by the iframe\n *\n * @param CustomEvent $event\n * @memberof IframePortletLegacyComponent\n */\n onCustomEvent($event: CustomEvent): void {\n this.dotCustomEventHandlerService.handle($event);\n }\n\n /**\n * Tigger when the current site is changed, this method reload the iframe if is neccesary\n * @memberof IframePortletLegacyComponent\n */\n reloadIframePortlet(portletId?: string): void {\n this.dotLoadingIndicatorService.show();\n if (portletId) {\n this.dotMenuService.getUrlById(portletId).subscribe((url: string) => {\n this.setUrl(url);\n });\n } else {\n this.setUrl(this.url.getValue());\n }\n }\n\n private setIframeSrc(): void {\n // We use the query param to load a page in edit mode in the iframe\n const queryUrl$ = this.route.queryParams.pipe(\n pluck('url'),\n map((url: string) => url)\n );\n\n queryUrl$.subscribe((queryUrl: string) => {\n if (queryUrl) {\n this.setUrl(queryUrl);\n } else {\n this.setPortletUrl();\n }\n });\n }\n\n private setPortletUrl(): void {\n const portletId$ = this.route.params.pipe(\n pluck('id'),\n map((id: string) => id)\n );\n\n portletId$\n .pipe(\n withLatestFrom(\n this.route.parent.url.pipe(\n map((urlSegment: UrlSegment[]) => urlSegment[0].path)\n )\n ),\n mergeMap(([id, url]) =>\n url === 'add'\n ? this.contentletService.getUrlById(id)\n : this.dotMenuService.getUrlById(id)\n )\n )\n .subscribe((url: string) => {\n this.setUrl(url);\n });\n }\n\n /**\n * This function set isLoading to true, to remove the Legacy Iframe from the DOM while the src attribute is updated.\n * @param string nextUrl\n */\n private setUrl(nextUrl: string): void {\n this.dotLoadingIndicatorService.show();\n this.isLoading = true;\n this.url.next(nextUrl);\n // Need's this time to update the iFrame src.\n setTimeout(() => {\n this.isLoading = false;\n }, 0);\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"variables\" as *;\n\n$iframe-margin: $spacing-4;\n\n:host {\n background-color: $gray-bg;\n display: block;\n padding: $iframe-margin;\n height: 100%;\n}\n\ndot-iframe {\n background-color: $white;\n box-shadow: $md-shadow-4;\n}\n", + "styleUrl": "./iframe-porlet-legacy.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "contentletService", + "type": "DotContentTypeService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotLoadingIndicatorService", + "type": "DotLoadingIndicatorService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotMenuService", + "type": "DotMenuService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotRouterService", + "type": "DotRouterService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "route", + "type": "ActivatedRoute", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotCustomEventHandlerService", + "type": "DotCustomEventHandlerService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "loggerService", + "type": "LoggerService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "siteService", + "type": "SiteService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 25, + "jsdoctags": [ + { + "name": "contentletService", + "type": "DotContentTypeService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotLoadingIndicatorService", + "type": "DotLoadingIndicatorService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotMenuService", + "type": "DotMenuService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotRouterService", + "type": "DotRouterService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "route", + "type": "ActivatedRoute", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotCustomEventHandlerService", + "type": "DotCustomEventHandlerService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "loggerService", + "type": "LoggerService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "siteService", + "type": "SiteService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": ["OnInit", "OnDestroy"], + "templateData": "\n \n \n\n\n \n\n\n" + }, + { + "name": "ImageBlockComponent", + "id": "component-ImageBlockComponent-2e443f28ff50f337bfcb098485d20ceef037c9b4a57e2558d26c228a002cffafbabde783033b42c2f4f5e018c4dd678424b78eef5a0cc2733f5c5dac7c3c19d2", + "file": "libs/block-editor/src/lib/extensions/blocks/image-block/image-block.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dotcms-image-block", + "styleUrls": ["./image-block.component.scss"], + "styles": [], + "templateUrl": ["./image-block.component.html"], + "viewProviders": [], + "inputsClass": [ + { + "name": "decorations", + "deprecated": false, + "deprecationMessage": "", + "line": 19, + "type": "", + "decorators": [], + "inheritance": { + "file": "AngularNodeViewComponent" + } + }, + { + "name": "deleteNode", + "deprecated": false, + "deprecationMessage": "", + "line": 24, + "type": "", + "decorators": [], + "inheritance": { + "file": "AngularNodeViewComponent" + } + }, + { + "name": "editor", + "deprecated": false, + "deprecationMessage": "", + "line": 17, + "type": "", + "decorators": [], + "inheritance": { + "file": "AngularNodeViewComponent" + } + }, + { + "name": "extension", + "deprecated": false, + "deprecationMessage": "", + "line": 21, + "type": "", + "decorators": [], + "inheritance": { + "file": "AngularNodeViewComponent" + } + }, + { + "name": "getPos", + "deprecated": false, + "deprecationMessage": "", + "line": 22, + "type": "", + "decorators": [], + "inheritance": { + "file": "AngularNodeViewComponent" + } + }, + { + "name": "node", + "deprecated": false, + "deprecationMessage": "", + "line": 18, + "type": "", + "decorators": [], + "inheritance": { + "file": "AngularNodeViewComponent" + } + }, + { + "name": "selected", + "deprecated": false, + "deprecationMessage": "", + "line": 20, + "type": "", + "decorators": [], + "inheritance": { + "file": "AngularNodeViewComponent" + } + }, + { + "name": "updateAttributes", + "deprecated": false, + "deprecationMessage": "", + "line": 23, + "type": "", + "decorators": [], + "inheritance": { + "file": "AngularNodeViewComponent" + } + } + ], + "outputsClass": [], + "propertiesClass": [ + { + "name": "data", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": false, + "description": "", + "line": 10 + } + ], + "methodsClass": [ + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 14, + "deprecated": false, + "deprecationMessage": "" + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, OnInit } from '@angular/core';\nimport { AngularNodeViewComponent } from '../../../NodeViewRenderer';\n\n@Component({\n selector: 'dotcms-image-block',\n templateUrl: './image-block.component.html',\n styleUrls: ['./image-block.component.scss']\n})\nexport class ImageBlockComponent extends AngularNodeViewComponent implements OnInit {\n data: {\n asset: string;\n };\n\n ngOnInit(): void {\n this.data = this.node.attrs.data;\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": ":host {\n display: block;\n\n img {\n max-width: 100%;\n }\n}\n", + "styleUrl": "./image-block.component.scss" + } + ], + "stylesData": "", + "extends": "AngularNodeViewComponent", + "implements": ["OnInit"], + "templateData": "\n" + }, + { + "name": "InputDate", + "id": "component-InputDate-ed6f15d57a70eab7fbb75c537a15cbd43bdf6acb52c5720cd8cb288104615c5f084f1f7bbfec3b281a3c2dcbc5f7254268025992a5b1366866c59858b7873132", + "file": "libs/dot-rules/src/lib/components/input-date/input-date.ts", + "changeDetection": "ChangeDetectionStrategy.OnPush", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "cw-input-date", + "styleUrls": [], + "styles": [], + "template": "", + "templateUrl": [], + "viewProviders": [], + "inputsClass": [ + { + "name": "disabled", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "line": 36, + "type": "boolean", + "decorators": [] + }, + { + "name": "focused", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "line": 37, + "type": "boolean", + "decorators": [] + }, + { + "name": "icon", + "deprecated": false, + "deprecationMessage": "", + "line": 35, + "type": "string", + "decorators": [] + }, + { + "name": "placeholder", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "line": 32, + "type": "string", + "decorators": [] + }, + { + "name": "required", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "line": 39, + "type": "boolean", + "decorators": [] + }, + { + "name": "tabIndex", + "defaultValue": "null", + "deprecated": false, + "deprecationMessage": "", + "line": 38, + "type": "number", + "decorators": [] + }, + { + "name": "type", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "line": 33, + "type": "string", + "decorators": [] + }, + { + "name": "value", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "line": 34, + "type": "string", + "decorators": [] + } + ], + "outputsClass": [ + { + "name": "blur", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 41, + "type": "EventEmitter" + } + ], + "propertiesClass": [ + { + "name": "DEFAULT_VALUE", + "deprecated": false, + "deprecationMessage": "", + "type": "Date", + "optional": false, + "description": "", + "line": 31, + "modifierKind": [121, 124] + }, + { + "name": "errorMessage", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 43 + }, + { + "name": "modelValue", + "deprecated": false, + "deprecationMessage": "", + "type": "Date", + "optional": false, + "description": "", + "line": 46 + }, + { + "name": "onChange", + "deprecated": false, + "deprecationMessage": "", + "type": "Function", + "optional": false, + "description": "", + "line": 44 + }, + { + "name": "onTouched", + "deprecated": false, + "deprecationMessage": "", + "type": "Function", + "optional": false, + "description": "", + "line": 45 + } + ], + "methodsClass": [ + { + "name": "_defaultValue", + "args": [], + "optional": false, + "returnType": "Date", + "typeParameters": [], + "line": 48, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121, 124] + }, + { + "name": "convertToISOFormat", + "args": [ + { + "name": "value", + "type": "Date", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 105, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "value", + "type": "Date", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "ngOnChanges", + "args": [ + { + "name": "change", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 70, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "change", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "onBlur", + "args": [ + { + "name": "_value", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 80, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "_value", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "registerOnChange", + "args": [ + { + "name": "fn", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 97, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "fn", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "registerOnTouched", + "args": [ + { + "name": "fn", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 101, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "fn", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "updateValue", + "args": [ + { + "name": "value", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 85, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "value", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "writeValue", + "args": [ + { + "name": "value", + "type": "any", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 93, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "value", + "type": "any", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n Output,\n Optional\n} from '@angular/core';\nimport { NgControl, ControlValueAccessor } from '@angular/forms';\nimport * as _ from 'lodash';\n\n// @dynamic\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n // host: { role: 'text' },\n selector: 'cw-input-date',\n template: ``\n})\nexport class InputDate implements ControlValueAccessor {\n private static DEFAULT_VALUE: Date;\n @Input() placeholder = '';\n @Input() type = '';\n @Input() value = '';\n @Input() icon: string;\n @Input() disabled = false;\n @Input() focused = false;\n @Input() tabIndex: number = null;\n @Input() required = false;\n\n @Output() blur: EventEmitter = new EventEmitter();\n\n errorMessage: string;\n onChange: Function;\n onTouched: Function;\n modelValue: Date;\n\n private static _defaultValue(): Date {\n let d = new Date();\n\n d.setHours(0);\n d.setMinutes(0);\n d.setSeconds(0);\n d.setMilliseconds(0);\n d.setMonth(d.getMonth() + 1);\n d.setDate(1);\n return d;\n }\n\n constructor(@Optional() control: NgControl, private _elementRef: ElementRef) {\n if (control) {\n control.valueAccessor = this;\n }\n\n if (!InputDate.DEFAULT_VALUE) {\n InputDate.DEFAULT_VALUE = InputDate._defaultValue();\n }\n }\n\n ngOnChanges(change): void {\n if (change.focused) {\n let f = change.focused.currentValue === true || change.focused.currentValue === 'true';\n if (f) {\n let el = this._elementRef.nativeElement;\n el.children[0].children[0].focus();\n }\n }\n }\n\n onBlur(_value): void {\n // this.onTouched();\n // this.blur.emit(value);\n }\n\n updateValue(value): void {\n this.value = this.convertToISOFormat(value);\n this.modelValue = value;\n this.onChange(this.value);\n this.onTouched();\n this.blur.emit(value);\n }\n\n writeValue(value: any): void {\n this.modelValue = _.isEmpty(value) ? InputDate.DEFAULT_VALUE : new Date(value);\n }\n\n registerOnChange(fn): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn): void {\n this.onTouched = fn;\n }\n\n private convertToISOFormat(value: Date): string {\n const offset = new Date().getTimezoneOffset() * 60000;\n return new Date(value.getTime() - offset).toISOString().slice(0, -5);\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "control", + "type": "NgControl", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "_elementRef", + "type": "ElementRef", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 58, + "jsdoctags": [ + { + "name": "control", + "type": "NgControl", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "_elementRef", + "type": "ElementRef", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": ["ControlValueAccessor"] + }, + { + "name": "KeyValueTableComponent", + "id": "component-KeyValueTableComponent-192ad217ef05c297d55828e9e8eeaf5bfc6099d9494aa569566ba1e105701ea5e70ec4f112ab0cf504992c1c404dca30bd171ba229f3fe0cce994377d49c36b7", + "file": "libs/dotcms-field-elements/src/components/dot-key-value/key-value-table/key-value-table.tsx", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "styleUrls": [], + "styles": [], + "templateUrl": [], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "buttonLabel", + "defaultValue": "'Delete'", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    (optional) Label for the delete button in each item list

    \n", + "line": 18, + "rawdescription": "\n(optional) Label for the delete button in each item list", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "delete", + "deprecated": false, + "deprecationMessage": "", + "type": "EventEmitter", + "optional": false, + "description": "

    Emit the index of the item deleted from the list

    \n", + "line": 27, + "rawdescription": "\nEmit the index of the item deleted from the list", + "decorators": [ + { + "name": "Event", + "stringifiedArguments": "" + } + ] + }, + { + "name": "disabled", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "

    (optional) Disables all form interaction

    \n", + "line": 12, + "rawdescription": "\n(optional) Disables all form interaction", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "emptyMessage", + "defaultValue": "'No values'", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    (optional) Message to show when the list of items is empty

    \n", + "line": 24, + "rawdescription": "\n(optional) Message to show when the list of items is empty", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "items", + "defaultValue": "[]", + "deprecated": false, + "deprecationMessage": "", + "type": "DotKeyValueField[]", + "optional": false, + "description": "

    (optional) Items to render in the list of key value

    \n", + "line": 9, + "rawdescription": "\n(optional) Items to render in the list of key value", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "" + } + ] + } + ], + "methodsClass": [ + { + "name": "getEmptyRow", + "args": [], + "optional": false, + "returnType": "JSX.Element", + "typeParameters": [], + "line": 67, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "getRow", + "args": [ + { + "name": "item", + "type": "DotKeyValueField", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "index", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "JSX.Element", + "typeParameters": [], + "line": 41, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "item", + "type": "DotKeyValueField", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "index", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "isValidItems", + "args": [ + { + "name": "items", + "type": "DotKeyValueField[]", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 75, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "items", + "type": "DotKeyValueField[]", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "onDelete", + "args": [ + { + "name": "index", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 37, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "index", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "render", + "args": [], + "optional": false, + "returnType": "any", + "typeParameters": [], + "line": 29, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "renderRows", + "args": [ + { + "name": "items", + "type": "DotKeyValueField[]", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "JSX.Element", + "typeParameters": [], + "line": 61, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "items", + "type": "DotKeyValueField[]", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, Prop, Event, EventEmitter, h } from '@stencil/core';\nimport { DotKeyValueField } from '../../../models';\n\n@Component({\n tag: 'key-value-table'\n})\nexport class KeyValueTableComponent {\n /** (optional) Items to render in the list of key value */\n @Prop() items: DotKeyValueField[] = [];\n\n /** (optional) Disables all form interaction */\n @Prop({ reflect: true }) disabled = false;\n\n /** (optional) Label for the delete button in each item list */\n @Prop({\n reflect: true\n })\n buttonLabel = 'Delete';\n\n /** (optional) Message to show when the list of items is empty */\n @Prop({\n reflect: true\n })\n emptyMessage = 'No values';\n\n /** Emit the index of the item deleted from the list */\n @Event() delete: EventEmitter;\n\n render() {\n return (\n \n {this.renderRows(this.items)}\n
    \n );\n }\n\n private onDelete(index: number): void {\n this.delete.emit(index);\n }\n\n private getRow(item: DotKeyValueField, index: number): JSX.Element {\n const label = `${this.buttonLabel} ${item.key}, ${item.value}`;\n return (\n \n \n this.onDelete(index)}\n class=\"dot-key-value__delete-button\"\n >\n {this.buttonLabel}\n \n \n {item.key}\n {item.value}\n \n );\n }\n\n private renderRows(items: DotKeyValueField[]): JSX.Element {\n return this.isValidItems(items)\n ? ((items.map(this.getRow.bind(this)) as unknown) as JSX.Element)\n : this.getEmptyRow();\n }\n\n private getEmptyRow(): JSX.Element {\n return (\n \n {this.emptyMessage}\n \n );\n }\n\n private isValidItems(items: DotKeyValueField[]): boolean {\n return Array.isArray(items) && !!items.length;\n }\n}\n", + "tag": "key-value-table", + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "" + }, + { + "name": "KeyValueTableComponent", + "id": "component-KeyValueTableComponent-2b30786ed6287a03edd80b6f7ed80e56a91e9d4fe53a52c0a6c4992c2d60e180498f710ee9938d3aacd1dcc41bd2a9d374db416204c1d407658336479329090e-1", + "file": "libs/dotcms-webcomponents/src/components/contenttypes-fields/dot-key-value/components/key-value-table/key-value-table.tsx", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "styleUrls": [], + "styles": [], + "templateUrl": [], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "buttonLabel", + "defaultValue": "'Delete'", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    (optional) Label for the delete button in each item list

    \n", + "line": 20, + "rawdescription": "\n(optional) Label for the delete button in each item list", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "delete", + "deprecated": false, + "deprecationMessage": "", + "type": "EventEmitter", + "optional": false, + "description": "

    Emit the index of the item deleted from the list

    \n", + "line": 30, + "rawdescription": "\nEmit the index of the item deleted from the list", + "decorators": [ + { + "name": "Event", + "stringifiedArguments": "" + } + ] + }, + { + "name": "disabled", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "

    (optional) Disables all form interaction

    \n", + "line": 14, + "rawdescription": "\n(optional) Disables all form interaction", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "emptyMessage", + "defaultValue": "'No values'", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "

    (optional) Message to show when the list of items is empty

    \n", + "line": 26, + "rawdescription": "\n(optional) Message to show when the list of items is empty", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "{reflect: true}" + } + ] + }, + { + "name": "items", + "defaultValue": "[]", + "deprecated": false, + "deprecationMessage": "", + "type": "DotKeyValueField[]", + "optional": false, + "description": "

    (optional) Items to render in the list of key value

    \n", + "line": 10, + "rawdescription": "\n(optional) Items to render in the list of key value", + "decorators": [ + { + "name": "Prop", + "stringifiedArguments": "" + } + ] + } + ], + "methodsClass": [ + { + "name": "getEmptyRow", + "args": [], + "optional": false, + "returnType": "JSX.Element", + "typeParameters": [], + "line": 70, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "getRow", + "args": [ + { + "name": "item", + "type": "DotKeyValueField", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "index", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "JSX.Element", + "typeParameters": [], + "line": 44, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "item", + "type": "DotKeyValueField", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "index", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "isValidItems", + "args": [ + { + "name": "items", + "type": "DotKeyValueField[]", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 78, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "items", + "type": "DotKeyValueField[]", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "onDelete", + "args": [ + { + "name": "index", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 40, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "index", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "render", + "args": [], + "optional": false, + "returnType": "any", + "typeParameters": [], + "line": 32, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "renderRows", + "args": [ + { + "name": "items", + "type": "DotKeyValueField[]", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "JSX.Element | []", + "typeParameters": [], + "line": 64, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "items", + "type": "DotKeyValueField[]", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, Prop, Event, EventEmitter, h } from '@stencil/core';\nimport { DotKeyValueField } from '../../../../../models';\n\n@Component({\n tag: 'key-value-table'\n})\nexport class KeyValueTableComponent {\n /** (optional) Items to render in the list of key value */\n @Prop()\n items: DotKeyValueField[] = [];\n\n /** (optional) Disables all form interaction */\n @Prop({ reflect: true })\n disabled = false;\n\n /** (optional) Label for the delete button in each item list */\n @Prop({\n reflect: true\n })\n buttonLabel = 'Delete';\n\n /** (optional) Message to show when the list of items is empty */\n @Prop({\n reflect: true\n })\n emptyMessage = 'No values';\n\n /** Emit the index of the item deleted from the list */\n @Event()\n delete: EventEmitter;\n\n render() {\n return (\n \n {this.renderRows(this.items)}\n
    \n );\n }\n\n private onDelete(index: number): void {\n this.delete.emit(index);\n }\n\n private getRow(item: DotKeyValueField, index: number): JSX.Element {\n const label = `${this.buttonLabel} ${item.key}, ${item.value}`;\n return (\n \n \n this.onDelete(index)}\n class=\"dot-key-value__delete-button\"\n >\n {this.buttonLabel}\n \n \n {item.key}\n {item.value}\n \n );\n }\n\n private renderRows(items: DotKeyValueField[]): JSX.Element | JSX.Element[] {\n return this.isValidItems(items)\n ? items.map((item, index) => this.getRow(item, index))\n : this.getEmptyRow();\n }\n\n private getEmptyRow(): JSX.Element {\n return (\n \n {this.emptyMessage}\n \n );\n }\n\n private isValidItems(items: DotKeyValueField[]): boolean {\n return Array.isArray(items) && !!items.length;\n }\n}\n", + "tag": "key-value-table", + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "", + "isDuplicate": true, + "duplicateId": 1, + "duplicateName": "KeyValueTableComponent-1" + }, + { + "name": "LoaderComponent", + "id": "component-LoaderComponent-abb20018a88932c9e1374b0038c8feeda3c2fa33effac42fa314e2d2b445ec4a648414d827a6b335c1021306f62ad5fb00bdef4195c319c6190a467c6ca32491", + "file": "libs/block-editor/src/lib/extensions/components/loader/loader.component.ts", + "encapsulation": ["ViewEncapsulation.None"], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dotcms-message", + "styleUrls": ["./loader.component.scss"], + "styles": [], + "templateUrl": ["./loader.component.html"], + "viewProviders": [], + "inputsClass": [ + { + "name": "decorations", + "deprecated": false, + "deprecationMessage": "", + "line": 19, + "type": "", + "decorators": [], + "inheritance": { + "file": "AngularNodeViewComponent" + } + }, + { + "name": "deleteNode", + "deprecated": false, + "deprecationMessage": "", + "line": 24, + "type": "", + "decorators": [], + "inheritance": { + "file": "AngularNodeViewComponent" + } + }, + { + "name": "editor", + "deprecated": false, + "deprecationMessage": "", + "line": 17, + "type": "", + "decorators": [], + "inheritance": { + "file": "AngularNodeViewComponent" + } + }, + { + "name": "extension", + "deprecated": false, + "deprecationMessage": "", + "line": 21, + "type": "", + "decorators": [], + "inheritance": { + "file": "AngularNodeViewComponent" + } + }, + { + "name": "getPos", + "deprecated": false, + "deprecationMessage": "", + "line": 22, + "type": "", + "decorators": [], + "inheritance": { + "file": "AngularNodeViewComponent" + } + }, + { + "name": "node", + "deprecated": false, + "deprecationMessage": "", + "line": 18, + "type": "", + "decorators": [], + "inheritance": { + "file": "AngularNodeViewComponent" + } + }, + { + "name": "selected", + "deprecated": false, + "deprecationMessage": "", + "line": 20, + "type": "", + "decorators": [], + "inheritance": { + "file": "AngularNodeViewComponent" + } + }, + { + "name": "updateAttributes", + "deprecated": false, + "deprecationMessage": "", + "line": 23, + "type": "", + "decorators": [], + "inheritance": { + "file": "AngularNodeViewComponent" + } + } + ], + "outputsClass": [], + "propertiesClass": [ + { + "name": "data", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": false, + "description": "", + "line": 16 + } + ], + "methodsClass": [], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, ViewEncapsulation } from '@angular/core';\nimport { AngularNodeViewComponent } from '../../../NodeViewRenderer';\n\nexport const enum MessageType {\n INFO = 'info',\n ERROR = 'error'\n}\n\n@Component({\n selector: 'dotcms-message',\n templateUrl: './loader.component.html',\n styleUrls: ['./loader.component.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class LoaderComponent extends AngularNodeViewComponent {\n data: {\n type: MessageType;\n message: string;\n };\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"libs/dot-primeng-theme-styles/src/scss/variables\" as *;\ndotcms-message {\n background-color: $gray-light;\n display: block;\n padding: $spacing-3;\n}\n", + "styleUrl": "./loader.component.scss" + } + ], + "stylesData": "", + "extends": "AngularNodeViewComponent", + "templateData": "{{data.message}}\n" + }, + { + "name": "MainComponentLegacyComponent", + "id": "component-MainComponentLegacyComponent-cdd632df45f64f2140a58a953146e7ae22dbf667a7047981870c86e410e4ca87feb43fda753330fc0dc0df4f57e1e639b3d6af60ac9b76dc4bd0a40d2188c084", + "file": "apps/dotcms-ui/src/app/view/components/main-legacy/main-legacy.component.ts", + "encapsulation": ["ViewEncapsulation.None"], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-main-component", + "styleUrls": ["./main-legacy.component.scss"], + "styles": [], + "templateUrl": ["./main-legacy.component.html"], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [], + "methodsClass": [ + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 14, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "onCustomEvent", + "args": [ + { + "name": "$event", + "type": "CustomEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 25, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nHandle the custom events emmited by the Create Contentlet\n\n", + "description": "

    Handle the custom events emmited by the Create Contentlet

    \n", + "jsdoctags": [ + { + "name": "$event", + "type": "CustomEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, OnInit, ViewEncapsulation } from '@angular/core';\nimport { DotCustomEventHandlerService } from '@services/dot-custom-event-handler/dot-custom-event-handler.service';\n\n@Component({\n encapsulation: ViewEncapsulation.None,\n providers: [],\n selector: 'dot-main-component',\n styleUrls: ['./main-legacy.component.scss'],\n templateUrl: './main-legacy.component.html'\n})\nexport class MainComponentLegacyComponent implements OnInit {\n constructor(private dotCustomEventHandlerService: DotCustomEventHandlerService) {}\n\n ngOnInit(): void {\n document.body.style.backgroundColor = '';\n document.body.style.backgroundImage = '';\n }\n\n /**\n * Handle the custom events emmited by the Create Contentlet\n *\n * @param CustomEvent $event\n * @memberof MainComponentLegacyComponent\n */\n onCustomEvent($event: CustomEvent): void {\n this.dotCustomEventHandlerService.handle($event);\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"variables\" as *;\n@import \"mixins\";\n@import \"dotcms-theme/utils/_mixins.scss\";\n\n.layout {\n display: flex;\n flex-direction: column;\n height: 100vh;\n width: 100vw;\n}\n\n.layout__header {\n flex-shrink: 0;\n z-index: 11;\n}\n\n.layout__content {\n display: flex;\n flex-grow: 1;\n overflow: hidden;\n}\n\n.layout__main {\n background-color: $gray-bg;\n width: 100%;\n overflow: hidden;\n}\n\n.layout__sidebar {\n background-color: $brand-background;\n flex-shrink: 0;\n transition: width $basic-speed * 2 cubic-bezier(0.25, 0.8, 0.25, 1);\n\n .collapsed & {\n width: 0;\n }\n}\n", + "styleUrl": "./main-legacy.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "dotCustomEventHandlerService", + "type": "DotCustomEventHandlerService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 11, + "jsdoctags": [ + { + "name": "dotCustomEventHandlerService", + "type": "DotCustomEventHandlerService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": ["OnInit"], + "templateData": "\n\n\n\n
    \n
    \n \n
    \n
    \n \n
    \n \n
    \n
    \n
    \n\n\n\n\n\n\n\n\n" + }, + { + "name": "MainCoreLegacyComponent", + "id": "component-MainCoreLegacyComponent-e668ba57d1fe4f77f50fd2c2d4f7ede1e4b380c7412769fe2505b38221b9906afd39107dba37f349820f4bd083283e27ff220196249cdd006facc5828532e74c", + "file": "apps/dotcms-ui/src/app/view/components/main-core-legacy/main-core-legacy-component.ts", + "encapsulation": ["ViewEncapsulation.None"], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-main-core-component", + "styleUrls": [], + "styles": [], + "template": "", + "templateUrl": [], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [], + "methodsClass": [], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, ViewEncapsulation } from '@angular/core';\n\n@Component({\n encapsulation: ViewEncapsulation.None,\n providers: [],\n selector: 'dot-main-core-component',\n template: ''\n})\nexport class MainCoreLegacyComponent {}\n", + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "" + }, + { + "name": "MockDotNotLicensedComponent", + "id": "component-MockDotNotLicensedComponent-a0a1ac09a5ced1eb7177e5a4bf8d147ce5c9644df9141bcf62b2f22a053445e8c82609e8be4eea0e13ac023987a0fb7eccb896a1b245f0fcb0f0bbc396883023", + "file": "apps/dotcms-ui/src/app/test/dot-not-licensed.component.mock.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-not-licensed-component", + "styleUrls": [], + "styles": [], + "template": "", + "templateUrl": [], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [], + "methodsClass": [], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component } from '@angular/core';\n\n@Component({\n selector: 'dot-not-licensed-component',\n template: ``\n})\nexport class MockDotNotLicensedComponent {}\n", + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "" + }, + { + "name": "ModalDialogComponent", + "id": "component-ModalDialogComponent-168553daf9f0acdc1ee441d8ea5a67320db3c667004125e6401c436ca876aef17bec53c3e23619a7002f4e0e2ef588187d183c06038bcd05d12e7a190bfa38fa", + "file": "libs/dot-rules/src/lib/modal-dialog/dialog-component.ts", + "changeDetection": "ChangeDetectionStrategy.OnPush", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "cw-modal-dialog", + "styleUrls": [], + "styles": [], + "template": "\n \n\n \n \n \n \n \n ", + "templateUrl": [], + "viewProviders": [], + "inputsClass": [ + { + "name": "errorMessage", + "defaultValue": "null", + "deprecated": false, + "deprecationMessage": "", + "line": 48, + "type": "string", + "decorators": [] + }, + { + "name": "headerText", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "line": 46, + "type": "string", + "decorators": [] + }, + { + "name": "hidden", + "defaultValue": "true", + "deprecated": false, + "deprecationMessage": "", + "line": 45, + "type": "boolean", + "decorators": [] + }, + { + "name": "okButtonText", + "defaultValue": "'Ok'", + "deprecated": false, + "deprecationMessage": "", + "line": 47, + "type": "string", + "decorators": [] + }, + { + "name": "okEnabled", + "defaultValue": "true", + "deprecated": false, + "deprecationMessage": "", + "line": 44, + "type": "boolean", + "decorators": [] + } + ], + "outputsClass": [ + { + "name": "cancel", + "defaultValue": "new EventEmitter(false)", + "deprecated": false, + "deprecationMessage": "", + "line": 51, + "type": "EventEmitter" + }, + { + "name": "close", + "defaultValue": "new EventEmitter(false)", + "deprecated": false, + "deprecationMessage": "", + "line": 50, + "type": "EventEmitter" + }, + { + "name": "ok", + "defaultValue": "new EventEmitter(false)", + "deprecated": false, + "deprecationMessage": "", + "line": 52, + "type": "EventEmitter" + }, + { + "name": "open", + "defaultValue": "new EventEmitter(false)", + "deprecated": false, + "deprecationMessage": "", + "line": 53, + "type": "EventEmitter" + } + ], + "propertiesClass": [ + { + "name": "_keyListener", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": false, + "description": "", + "line": 55, + "modifierKind": [121] + } + ], + "methodsClass": [ + { + "name": "addEscapeListener", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 76, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "ngOnChanges", + "args": [ + { + "name": "change", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 63, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "change", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "onCancel", + "args": [ + { + "name": "_e", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 59, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "_e", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "removeEscapeListener", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 93, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, ChangeDetectionStrategy, Input, Output, EventEmitter } from '@angular/core';\nimport { KeyCode } from '../services/util/key-util';\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'cw-modal-dialog',\n template: `\n \n\n \n \n \n \n \n `\n})\nexport class ModalDialogComponent {\n @Input() okEnabled = true;\n @Input() hidden = true;\n @Input() headerText = '';\n @Input() okButtonText = 'Ok';\n @Input() errorMessage: string = null;\n\n @Output() close: EventEmitter<{ isCanceled: boolean }> = new EventEmitter(false);\n @Output() cancel: EventEmitter = new EventEmitter(false);\n @Output() ok: EventEmitter = new EventEmitter(false);\n @Output() open: EventEmitter = new EventEmitter(false);\n\n private _keyListener: any;\n\n constructor() {}\n\n onCancel(_e): void {\n this.cancel.emit(true);\n }\n\n ngOnChanges(change): void {\n if (change.hidden) {\n if (!this.hidden) {\n this.addEscapeListener();\n\n // wait until the dialog is really show up\n setTimeout(() => this.open.emit(false), 2);\n } else {\n this.removeEscapeListener();\n }\n }\n }\n\n private addEscapeListener(): void {\n if (!this._keyListener) {\n this._keyListener = (e) => {\n if (e.keyCode === KeyCode.ESCAPE) {\n e.preventDefault();\n e.stopPropagation();\n this.cancel.emit(false);\n } else if (e.keyCode === KeyCode.ENTER) {\n e.stopPropagation();\n e.preventDefault();\n this.ok.emit(true);\n }\n };\n document.body.addEventListener('keyup', this._keyListener);\n }\n }\n\n private removeEscapeListener(): void {\n if (this._keyListener) {\n document.body.removeEventListener('keyup', this._keyListener);\n this._keyListener = null;\n }\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [], + "line": 55 + } + }, + { + "name": "NamePropertyComponent", + "id": "component-NamePropertyComponent-a97f7451a7694920dfb348edac8ad61c9d760cfdb2adf5ce0c08b156992a79588d2237801a8f67290a862285c1c53c7b825cbd78e6cfe3bbcbe20666ec614869", + "file": "apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/components/fields/content-type-fields-properties-form/field-properties/name-property/name-property.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-name-property", + "styleUrls": ["./name-property.component.scss"], + "styles": [], + "templateUrl": ["./name-property.component.html"], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "group", + "deprecated": false, + "deprecationMessage": "", + "type": "FormGroup", + "optional": false, + "description": "", + "line": 12 + }, + { + "name": "property", + "deprecated": false, + "deprecationMessage": "", + "type": "FieldProperty", + "optional": false, + "description": "", + "line": 11 + } + ], + "methodsClass": [], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component } from '@angular/core';\nimport { FormGroup } from '@angular/forms/forms';\nimport { FieldProperty } from '../field-properties.model';\n\n@Component({\n selector: 'dot-name-property',\n styleUrls: ['./name-property.component.scss'],\n templateUrl: './name-property.component.html'\n})\nexport class NamePropertyComponent {\n property: FieldProperty;\n group: FormGroup;\n\n constructor() {}\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"variables\" as *;\n\n.form__field-variable {\n font-size: $label-font-size;\n color: $label-color;\n margin-top: $spacing-1;\n display: flex;\n\n dot-copy-link {\n margin-left: $spacing-1;\n }\n}\n", + "styleUrl": "./name-property.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [], + "line": 12 + }, + "templateData": "
    \n \n \n \n \n
    \n {{ 'contenttypes.field.properties.name.variable' | dm }}: \n \n
    \n
    \n" + }, + { + "name": "NgGridPlaceholder", + "id": "component-NgGridPlaceholder-bc2edffcf1a16737b9f89e3f508d9f57291caaa7cc1097c38031533c8e0cfe8572f770a929aa03afcfa99b7689e2d528dfefb3a52fa278c1ac30567abbd0dada", + "file": "libs/dot-layout-grid/src/lib/components/NgGridPlaceholder.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "ng-grid-placeholder", + "styleUrls": [], + "styles": [], + "template": "", + "templateUrl": [], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "_cascadeMode", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 13, + "modifierKind": [121] + }, + { + "name": "_ngGrid", + "deprecated": false, + "deprecationMessage": "", + "type": "NgGrid", + "optional": false, + "description": "", + "line": 12, + "modifierKind": [121] + }, + { + "name": "_position", + "deprecated": false, + "deprecationMessage": "", + "type": "NgGridItemPosition", + "optional": false, + "description": "", + "line": 11, + "modifierKind": [121] + }, + { + "name": "_size", + "deprecated": false, + "deprecationMessage": "", + "type": "NgGridItemSize", + "optional": false, + "description": "", + "line": 10, + "modifierKind": [121] + } + ], + "methodsClass": [ + { + "name": "_recalculateDimensions", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 111, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "_recalculatePosition", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 98, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "_setDimensions", + "args": [ + { + "name": "w", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "h", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 65, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "w", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "h", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "_setPosition", + "args": [ + { + "name": "x", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "y", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 70, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "x", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "y", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 21, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [123] + }, + { + "name": "registerGrid", + "args": [ + { + "name": "ngGrid", + "type": "NgGrid", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 17, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [123], + "jsdoctags": [ + { + "name": "ngGrid", + "type": "NgGrid", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "setCascadeMode", + "args": [ + { + "name": "cascade", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 38, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [123], + "jsdoctags": [ + { + "name": "cascade", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "setGridPosition", + "args": [ + { + "name": "newPosition", + "type": "NgGridItemPosition", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 33, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [123], + "jsdoctags": [ + { + "name": "newPosition", + "type": "NgGridItemPosition", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "setSize", + "args": [ + { + "name": "newSize", + "type": "NgGridItemSize", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 28, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [123], + "jsdoctags": [ + { + "name": "newSize", + "type": "NgGridItemSize", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, ElementRef, OnInit, Renderer2 } from '@angular/core';\nimport { NgGrid } from '../directives/NgGrid';\nimport { NgGridItemPosition, NgGridItemSize } from '../interfaces/INgGrid';\n\n@Component({\n selector: 'ng-grid-placeholder',\n template: ''\n})\nexport class NgGridPlaceholder implements OnInit {\n private _size: NgGridItemSize;\n private _position: NgGridItemPosition;\n private _ngGrid: NgGrid;\n private _cascadeMode: string;\n\n constructor(private _ngEl: ElementRef, private _renderer: Renderer2) {}\n\n public registerGrid(ngGrid: NgGrid) {\n this._ngGrid = ngGrid;\n }\n\n public ngOnInit(): void {\n this._renderer.addClass(this._ngEl.nativeElement, 'grid-placeholder');\n if (this._ngGrid.autoStyle) {\n this._renderer.setStyle(this._ngEl.nativeElement, 'position', 'absolute');\n }\n }\n\n public setSize(newSize: NgGridItemSize): void {\n this._size = newSize;\n this._recalculateDimensions();\n }\n\n public setGridPosition(newPosition: NgGridItemPosition): void {\n this._position = newPosition;\n this._recalculatePosition();\n }\n\n public setCascadeMode(cascade: string): void {\n this._cascadeMode = cascade;\n switch (cascade) {\n case 'up':\n case 'left':\n default:\n this._renderer.setStyle(this._ngEl.nativeElement, 'left', '0px');\n this._renderer.setStyle(this._ngEl.nativeElement, 'top', '0px');\n this._renderer.removeStyle(this._ngEl.nativeElement, 'right');\n this._renderer.removeStyle(this._ngEl.nativeElement, 'bottom');\n break;\n case 'right':\n this._renderer.setStyle(this._ngEl.nativeElement, 'right', '0px');\n this._renderer.setStyle(this._ngEl.nativeElement, 'top', '0px');\n this._renderer.removeStyle(this._ngEl.nativeElement, 'left');\n this._renderer.removeStyle(this._ngEl.nativeElement, 'bottom');\n break;\n case 'down':\n this._renderer.setStyle(this._ngEl.nativeElement, 'left', '0px');\n this._renderer.setStyle(this._ngEl.nativeElement, 'bottom', '0px');\n this._renderer.removeStyle(this._ngEl.nativeElement, 'right');\n this._renderer.removeStyle(this._ngEl.nativeElement, 'top');\n break;\n }\n }\n\n // \tPrivate methods\n private _setDimensions(w: number, h: number): void {\n this._renderer.setStyle(this._ngEl.nativeElement, 'width', w + 'px');\n this._renderer.setStyle(this._ngEl.nativeElement, 'height', h + 'px');\n }\n\n private _setPosition(x: number, y: number): void {\n switch (this._cascadeMode) {\n case 'up':\n case 'left':\n default:\n this._renderer.setStyle(\n this._ngEl.nativeElement,\n 'transform',\n 'translate(' + x + 'px, ' + y + 'px)'\n );\n break;\n case 'right':\n this._renderer.setStyle(\n this._ngEl.nativeElement,\n 'transform',\n 'translate(' + -x + 'px, ' + y + 'px)'\n );\n break;\n case 'down':\n this._renderer.setStyle(\n this._ngEl.nativeElement,\n 'transform',\n 'translate(' + x + 'px, ' + -y + 'px)'\n );\n break;\n }\n }\n\n private _recalculatePosition(): void {\n const x: number =\n (this._ngGrid.colWidth + this._ngGrid.marginLeft + this._ngGrid.marginRight) *\n (this._position.col - 1) +\n this._ngGrid.marginLeft +\n this._ngGrid.screenMargin;\n const y: number =\n (this._ngGrid.rowHeight + this._ngGrid.marginTop + this._ngGrid.marginBottom) *\n (this._position.row - 1) +\n this._ngGrid.marginTop;\n this._setPosition(x, y);\n }\n\n private _recalculateDimensions(): void {\n const w: number =\n this._ngGrid.colWidth * this._size.x +\n (this._ngGrid.marginLeft + this._ngGrid.marginRight) * (this._size.x - 1);\n const h: number =\n this._ngGrid.rowHeight * this._size.y +\n (this._ngGrid.marginTop + this._ngGrid.marginBottom) * (this._size.y - 1);\n this._setDimensions(w, h);\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "_ngEl", + "type": "ElementRef", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "_renderer", + "type": "Renderer2", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 13, + "jsdoctags": [ + { + "name": "_ngEl", + "type": "ElementRef", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "_renderer", + "type": "Renderer2", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": ["OnInit"] + }, + { + "name": "NotLicensedComponent", + "id": "component-NotLicensedComponent-7c9580550d0be10bf5f539f4dfbbebe094e65ada59f8993231e4c3117245131c6ec9db4f17cfd65a7dd7696dc3b8b2a334a6ee8ef1de423ae6b25db1f29bfbd2", + "file": "apps/dotcms-ui/src/app/view/components/not-licensed/not-licensed.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-not-licensed-component", + "styleUrls": ["./not-licensed.component.scss"], + "styles": [], + "templateUrl": ["not-licensed.component.html"], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "destroy$", + "defaultValue": "new Subject()", + "deprecated": false, + "deprecationMessage": "", + "type": "Subject", + "optional": false, + "description": "", + "line": 17, + "modifierKind": [121] + }, + { + "name": "unlicenseData", + "deprecated": false, + "deprecationMessage": "", + "type": "DotUnlicensedPortletData", + "optional": false, + "description": "", + "line": 15 + } + ], + "methodsClass": [ + { + "name": "ngOnDestroy", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 29, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 21, + "deprecated": false, + "deprecationMessage": "" + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, OnInit, OnDestroy } from '@angular/core';\nimport {\n DotUnlicensedPortletData,\n DotLicenseService\n} from '@services/dot-license/dot-license.service';\nimport { takeUntil } from 'rxjs/operators';\nimport { Subject } from 'rxjs';\n\n@Component({\n selector: 'dot-not-licensed-component',\n styleUrls: ['./not-licensed.component.scss'],\n templateUrl: 'not-licensed.component.html'\n})\nexport class NotLicensedComponent implements OnInit, OnDestroy {\n unlicenseData: DotUnlicensedPortletData;\n\n private destroy$: Subject = new Subject();\n\n constructor(private dotLicense: DotLicenseService) {}\n\n ngOnInit() {\n this.dotLicense.unlicenseData\n .pipe(takeUntil(this.destroy$))\n .subscribe((unlicenseData: DotUnlicensedPortletData) => {\n this.unlicenseData = unlicenseData;\n });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.complete();\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"variables\" as *;\n\n:host {\n align-items: center;\n background-color: $white;\n box-shadow: $md-shadow-4;\n display: flex;\n flex-direction: column;\n height: calc(100vh - 48px - #{$toolbar-height});\n justify-content: center;\n padding: $spacing-9;\n width: 100%;\n}\n\nh4 {\n margin: 0;\n}\n\ndot-icon::ng-deep .material-icons,\nh4 {\n color: $gray-light;\n}\n", + "styleUrl": "./not-licensed.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "dotLicense", + "type": "DotLicenseService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 17, + "jsdoctags": [ + { + "name": "dotLicense", + "type": "DotLicenseService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": ["OnInit", "OnDestroy"], + "templateData": "\n

    {{ unlicenseData.titleKey | dm }}

    \n

    {{ unlicenseData.titleKey | dm }} {{ 'only-available-in-enterprise' | dm }}

    \n\n

    \n \n

    \n" + }, + { + "name": "PushPublishEnvSelectorComponent", + "id": "component-PushPublishEnvSelectorComponent-57407a87e54223052b232fb5b30c8f9cdc5dbc2c6125a686a7d2994a57f37d3456c8030d6dc91213fd46c143906211d47f46de63bddb5ff083d33d532759f166", + "file": "apps/dotcms-ui/src/app/view/components/_common/dot-push-publish-env-selector/dot-push-publish-env-selector.component.ts", + "encapsulation": ["ViewEncapsulation.None"], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [ + { + "name": "{\n multi: true, provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => PushPublishEnvSelectorComponent)\n}", + "type": "component" + } + ], + "selector": "dot-push-publish-env-selector", + "styleUrls": ["./dot-push-publish-env-selector.component.scss"], + "styles": [], + "templateUrl": ["dot-push-publish-env-selector.component.html"], + "viewProviders": [], + "inputsClass": [ + { + "name": "assetIdentifier", + "deprecated": false, + "deprecationMessage": "", + "line": 21, + "type": "string", + "decorators": [] + }, + { + "name": "showList", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "line": 23, + "type": "boolean", + "decorators": [] + } + ], + "outputsClass": [], + "propertiesClass": [ + { + "name": "propagateChange", + "defaultValue": "() => {...}", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 50 + }, + { + "name": "propagateTouched", + "defaultValue": "() => {...}", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 51 + }, + { + "name": "pushEnvironments", + "deprecated": false, + "deprecationMessage": "", + "type": "DotEnvironment[]", + "optional": false, + "description": "", + "line": 24 + }, + { + "name": "selectedEnvironmentIds", + "defaultValue": "[]", + "deprecated": false, + "deprecationMessage": "", + "type": "string[]", + "optional": false, + "description": "", + "line": 26 + }, + { + "name": "selectedEnvironments", + "deprecated": false, + "deprecationMessage": "", + "type": "DotEnvironment[]", + "optional": false, + "description": "", + "line": 25 + }, + { + "name": "value", + "deprecated": false, + "deprecationMessage": "", + "type": "string[]", + "optional": false, + "description": "", + "line": 27 + } + ], + "methodsClass": [ + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 31, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "propagateEnvironmentId", + "args": [ + { + "name": "selectedEnvironments", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 101, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "selectedEnvironments", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "registerOnChange", + "args": [ + { + "name": "fn", + "type": "any", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 58, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nSet the function to be called when the control receives a change event.\n", + "description": "

    Set the function to be called when the control receives a change event.

    \n", + "jsdoctags": [ + { + "name": "fn", + "type": "any", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "registerOnTouched", + "args": [ + { + "name": "fn", + "type": "any", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 62, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "fn", + "type": "any", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "removeEnvironmentItem", + "args": [ + { + "name": "environmentItem", + "type": "DotEnvironment", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 94, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nRemove selected environments and progagate new environments\n", + "description": "

    Remove selected environments and progagate new environments

    \n", + "jsdoctags": [ + { + "name": "environmentItem", + "type": "DotEnvironment", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "valueChange", + "args": [ + { + "name": "_event", + "type": "", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "selectedEnvironments", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 85, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nPropagate environment id when multiselect changes\n", + "description": "

    Propagate environment id when multiselect changes

    \n", + "jsdoctags": [ + { + "name": "_event", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "selectedEnvironments", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "writeValue", + "args": [ + { + "name": "value", + "type": "string[]", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 72, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nWrite a new value to the element\nReset value\n", + "description": "

    Write a new value to the element\nReset value

    \n", + "jsdoctags": [ + { + "name": "value", + "type": "string[]", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, OnInit, Input, ViewEncapsulation, forwardRef } from '@angular/core';\nimport { PushPublishService } from '@services/push-publish/push-publish.service';\nimport { NG_VALUE_ACCESSOR, ControlValueAccessor } from '@angular/forms';\nimport { DotEnvironment } from '@models/dot-environment/dot-environment';\nimport { take } from 'rxjs/operators';\n@Component({\n encapsulation: ViewEncapsulation.None,\n selector: 'dot-push-publish-env-selector',\n styleUrls: ['./dot-push-publish-env-selector.component.scss'],\n templateUrl: 'dot-push-publish-env-selector.component.html',\n providers: [\n {\n multi: true,\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => PushPublishEnvSelectorComponent)\n }\n ]\n})\nexport class PushPublishEnvSelectorComponent implements OnInit, ControlValueAccessor {\n @Input()\n assetIdentifier: string;\n @Input()\n showList = false;\n pushEnvironments: DotEnvironment[];\n selectedEnvironments: DotEnvironment[];\n selectedEnvironmentIds: string[] = [];\n value: string[];\n\n constructor(private pushPublishService: PushPublishService) {}\n\n ngOnInit() {\n this.pushPublishService\n .getEnvironments()\n .pipe(take(1))\n .subscribe((environments) => {\n this.pushEnvironments = environments;\n\n if (this.pushPublishService.lastEnvironmentPushed) {\n this.selectedEnvironments = environments.filter((env) => {\n return this.pushPublishService.lastEnvironmentPushed.includes(env.id);\n });\n this.valueChange('', this.selectedEnvironments);\n } else if (environments.length === 1) {\n this.selectedEnvironments = environments;\n this.valueChange('', this.selectedEnvironments);\n }\n });\n }\n\n propagateChange = (_: any) => {};\n propagateTouched = (_: any) => {};\n\n /**\n * Set the function to be called when the control receives a change event.\n * @param * fn\n * @memberof PushPublishEnvSelectorComponent\n */\n registerOnChange(fn: any): void {\n this.propagateChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n this.propagateTouched = fn;\n }\n\n /**\n * Write a new value to the element\n * Reset value\n * @param string[] value\n * @memberof PushPublishEnvSelectorComponent\n */\n writeValue(value: string[]): void {\n if (value) {\n this.selectedEnvironmentIds = value;\n }\n this.selectedEnvironments = [];\n }\n\n /**\n * Propagate environment id when multiselect changes\n * @param any $event\n * @param any selectedEnvironments\n * @memberof PushPublishEnvSelectorComponent\n */\n valueChange(_event, selectedEnvironments): void {\n this.propagateEnvironmentId(selectedEnvironments);\n }\n\n /**\n * Remove selected environments and progagate new environments\n * @param DotEnvironment i\n * @memberof PushPublishEnvSelectorComponent\n */\n removeEnvironmentItem(environmentItem: DotEnvironment): void {\n this.selectedEnvironments = this.selectedEnvironments.filter(\n (environment) => environment.id !== environmentItem.id\n );\n this.propagateEnvironmentId(this.selectedEnvironments);\n }\n\n private propagateEnvironmentId(selectedEnvironments): void {\n this.selectedEnvironmentIds = selectedEnvironments.map((environment) => environment.id);\n this.propagateChange(this.selectedEnvironmentIds);\n this.propagateTouched(this.selectedEnvironmentIds);\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"variables\" as *;\n@import \"mixins\";\n\n.p-multiselect {\n width: 100%;\n}\n\n.environment-selector__list {\n height: 140px;\n margin: $spacing-1 0;\n overflow-x: hidden;\n border: 1px solid $gray;\n padding: 0;\n}\n\n.environment-selector__list-item {\n @include naked-list;\n border-top: 1px solid $gray-bg;\n padding: $spacing-1 0;\n\n &:first-child {\n border-top: none;\n }\n}\n", + "styleUrl": "./dot-push-publish-env-selector.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "pushPublishService", + "type": "PushPublishService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 27, + "jsdoctags": [ + { + "name": "pushPublishService", + "type": "PushPublishService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": ["OnInit", "ControlValueAccessor"], + "templateData": "\n\n\n\n
      \n
    • \n \n {{ environment.name }}\n
    • \n
    \n" + }, + { + "name": "RegexCheckPropertyComponent", + "id": "component-RegexCheckPropertyComponent-9da7d9b972683cf4ce823f8f18e747a0e21bd32c36adbd257c3231247257f34619d189b54416750a2164011eca3b9ea6d2fd809ffa74437c97b38cd907e63cd5", + "file": "apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/components/fields/content-type-fields-properties-form/field-properties/regex-check-property/regex-check-property.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-regex-check-property", + "styleUrls": ["./regex-check-property.component.scss"], + "styles": [], + "templateUrl": ["./regex-check-property.component.html"], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "group", + "deprecated": false, + "deprecationMessage": "", + "type": "FormGroup", + "optional": false, + "description": "", + "line": 19 + }, + { + "name": "property", + "deprecated": false, + "deprecationMessage": "", + "type": "FieldProperty", + "optional": false, + "description": "", + "line": 18 + }, + { + "name": "regexCheckTempletes", + "defaultValue": "[]", + "deprecated": false, + "deprecationMessage": "", + "type": "RegexTemplate[]", + "optional": false, + "description": "", + "line": 16 + } + ], + "methodsClass": [ + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 23, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "templateSelect", + "args": [ + { + "name": "event", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 84, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "event", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, OnInit } from '@angular/core';\nimport { DotMessageService } from '@services/dot-message/dot-messages.service';\nimport { FieldProperty } from '../field-properties.model';\nimport { FormGroup } from '@angular/forms';\n\nexport interface RegexTemplate {\n label: string;\n value: string;\n}\n@Component({\n selector: 'dot-regex-check-property',\n templateUrl: './regex-check-property.component.html',\n styleUrls: ['./regex-check-property.component.scss']\n})\nexport class RegexCheckPropertyComponent implements OnInit {\n regexCheckTempletes: RegexTemplate[] = [];\n\n property: FieldProperty;\n group: FormGroup;\n\n constructor(private dotMessageService: DotMessageService) {}\n\n ngOnInit() {\n this.regexCheckTempletes = [\n {\n label: this.dotMessageService.get(\n 'contenttypes.field.properties.validation_regex.values.select'\n ),\n value: ''\n },\n {\n label: this.dotMessageService.get(\n 'contenttypes.field.properties.validation_regex.values.email'\n ),\n value: '^([a-zA-Z0-9]+[a-zA-Z0-9._%+-]*@(?:[a-zA-Z0-9-]+.)+[a-zA-Z]{2,4})$'\n },\n {\n label: this.dotMessageService.get(\n 'contenttypes.field.properties.validation_regex.values.numbers_only'\n ),\n value: '[0-9]*'\n },\n {\n label: this.dotMessageService.get(\n 'contenttypes.field.properties.validation_regex.values.letters_only'\n ),\n value: '[a-zA-Zs]*'\n },\n {\n label: this.dotMessageService.get(\n 'contenttypes.field.properties.validation_regex.values.alphanumeric'\n ),\n value: '[0-9a-zA-Zs]*'\n },\n {\n label: this.dotMessageService.get(\n 'contenttypes.field.properties.validation_regex.values.us_zip_code'\n ),\n value: '(^d{5}$)|(^d{5}-d{4}$)'\n },\n {\n label: this.dotMessageService.get(\n 'contenttypes.field.properties.validation_regex.values.us_phone'\n ),\n value: '^(?[1-9]d{2}[)-]s?d{3}-d{4}$'\n },\n {\n label: this.dotMessageService.get(\n 'contenttypes.field.properties.validation_regex.values.url_pattern'\n ),\n value:\n // tslint:disable-next-line:max-line-length\n '^((http|ftp|https):\\\\/\\\\/w{3}[d]*.|(http|ftp|https):\\\\/\\\\/|w{3}[d]*.)([wd._\\\\-#\\\\(\\\\)\\\\[\\\\),;:]+@[wd._\\\\-#\\\\(\\\\)\\\\[\\\\),;:])?([a-z0-9]+.)*[a-z-0-9]+.([a-z]{2,3})?[a-z]{2,6}(:[0-9]+)?(\\\\/[\\\\/a-zA-Z0-9._\\\\-,%s]+)*(\\\\/|\\\\?[a-z0-9=%&.\\\\-,#]+)?$'\n },\n {\n label: this.dotMessageService.get(\n 'contenttypes.field.properties.validation_regex.values.no_html'\n ),\n value: '[^(<[.\\n]+>)]*'\n }\n ];\n }\n\n templateSelect(event): void {\n this.group.controls[this.property.name].setValue(event.value);\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": ".form__validation-input-container {\n display: flex;\n\n .p-inputtext {\n max-width: 70%;\n margin-right: 5%;\n }\n\n p-dropdown {\n .p-dropdown {\n width: auto;\n }\n }\n}\n", + "styleUrl": "./regex-check-property.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "dotMessageService", + "type": "DotMessageService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 19, + "jsdoctags": [ + { + "name": "dotMessageService", + "type": "DotMessageService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": ["OnInit"], + "templateData": "
    \n \n
    \n \n \n \n
    \n
    \n" + }, + { + "name": "ResetPasswordComponent", + "id": "component-ResetPasswordComponent-d50cb99c53f6f07a88adfa0f87be644885055a712903eb6742d00c0caa49994578dee73079d26e6db5b094ba1c336b118d516e0d241cf556f81f047d344a440d", + "file": "apps/dotcms-ui/src/app/view/components/login/reset-password-component/reset-password.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-reset-password-component", + "styleUrls": ["./reset-password.component.scss"], + "styles": [], + "templateUrl": ["reset-password.component.html"], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "dotLoginPageStateService", + "deprecated": false, + "deprecationMessage": "", + "type": "DotLoginPageStateService", + "optional": false, + "description": "", + "line": 26, + "modifierKind": [123] + }, + { + "name": "loginInfo$", + "deprecated": false, + "deprecationMessage": "", + "type": "Observable", + "optional": false, + "description": "", + "line": 19 + }, + { + "name": "message", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 20 + }, + { + "name": "passwordDontMatchMessage", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 21, + "modifierKind": [121] + }, + { + "name": "resetPasswordForm", + "deprecated": false, + "deprecationMessage": "", + "type": "FormGroup", + "optional": false, + "description": "", + "line": 18 + } + ], + "methodsClass": [ + { + "name": "cleanConfirmPassword", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 51, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nClean confirm password field value.\n\n", + "description": "

    Clean confirm password field value.

    \n", + "jsdoctags": [] + }, + { + "name": "cleanMessage", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 61, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nClean the error message\n\n", + "description": "

    Clean the error message

    \n", + "jsdoctags": [] + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 31, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "submit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 70, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nValidate password change and make the request.\n\n", + "description": "

    Validate password change and make the request.

    \n", + "jsdoctags": [] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, OnInit } from '@angular/core';\nimport { FormBuilder, FormGroup, Validators } from '@angular/forms';\nimport { Observable } from 'rxjs';\nimport { DotLoginInformation } from '@models/dot-login';\nimport { take, tap } from 'rxjs/operators';\nimport { DotLoginPageStateService } from '@components/login/shared/services/dot-login-page-state.service';\nimport { LoginService } from '@dotcms/dotcms-js';\nimport { ActivatedRoute } from '@angular/router';\nimport { DotRouterService } from '@services/dot-router/dot-router.service';\n\n@Component({\n providers: [],\n selector: 'dot-reset-password-component',\n styleUrls: ['./reset-password.component.scss'],\n templateUrl: 'reset-password.component.html'\n})\nexport class ResetPasswordComponent implements OnInit {\n resetPasswordForm: FormGroup;\n loginInfo$: Observable;\n message = '';\n private passwordDontMatchMessage = '';\n\n constructor(\n private fb: FormBuilder,\n private loginService: LoginService,\n public dotLoginPageStateService: DotLoginPageStateService,\n private dotRouterService: DotRouterService,\n private route: ActivatedRoute\n ) {}\n\n ngOnInit(): void {\n this.loginInfo$ = this.dotLoginPageStateService.get().pipe(\n take(1),\n tap((loginInfo: DotLoginInformation) => {\n this.passwordDontMatchMessage =\n loginInfo.i18nMessagesMap['reset-password-confirmation-do-not-match'];\n })\n );\n\n this.resetPasswordForm = this.fb.group({\n password: ['', [Validators.required]],\n confirmPassword: ['', [Validators.required]]\n });\n }\n\n /**\n * Clean confirm password field value.\n *\n * @memberof ResetPasswordComponent\n */\n cleanConfirmPassword(): void {\n this.cleanMessage();\n this.resetPasswordForm.get('confirmPassword').setValue('');\n }\n\n /**\n * Clean the error message\n *\n * @memberof ResetPasswordComponent\n */\n cleanMessage(): void {\n this.message = '';\n }\n\n /**\n * Validate password change and make the request.\n *\n * @memberof ResetPasswordComponent\n */\n submit(): void {\n if (\n this.resetPasswordForm.valid &&\n this.resetPasswordForm.get('password').value ===\n this.resetPasswordForm.get('confirmPassword').value\n ) {\n this.cleanMessage();\n this.loginService\n .changePassword(\n this.resetPasswordForm.get('password').value,\n this.route.snapshot.paramMap.get('token')\n )\n .pipe(take(1))\n .subscribe(\n () => {\n this.dotRouterService.goToLogin({\n queryParams: {\n changedPassword: true\n }\n });\n },\n (response) => {\n this.message = response.error?.errors[0]?.message;\n }\n );\n } else {\n this.message = this.passwordDontMatchMessage;\n }\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@import \"mixins\";\n\n:host {\n @include login-container;\n}\n\nh3 {\n margin: 0;\n}\n", + "styleUrl": "./reset-password.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "fb", + "type": "FormBuilder", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "loginService", + "type": "LoginService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotLoginPageStateService", + "type": "DotLoginPageStateService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotRouterService", + "type": "DotRouterService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "route", + "type": "ActivatedRoute", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 21, + "jsdoctags": [ + { + "name": "fb", + "type": "FormBuilder", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "loginService", + "type": "LoginService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotLoginPageStateService", + "type": "DotLoginPageStateService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotRouterService", + "type": "DotRouterService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "route", + "type": "ActivatedRoute", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": ["OnInit"], + "templateData": "
    \n

    {{ loginInfo.i18nMessagesMap['reset-password'] }}

    \n

    \n
    \n
    \n \n \n \n \n
    \n
    \n \n \n \n \n
    \n
    \n \n
    \n
    \n
    \n" + }, + { + "name": "RestDropdown", + "id": "component-RestDropdown-6cf528d168068fcfbf3656f98efa0a4bacfcfde0de6666c52916075536e565a374ccbe74d59d70bafcb8405a36c51ac2b1d012f69b1edcf3deb5c072748d2f5b", + "file": "libs/dot-rules/src/lib/components/restdropdown/RestDropdown.ts", + "changeDetection": "ChangeDetectionStrategy.OnPush", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "cw-input-rest-dropdown", + "styleUrls": [], + "styles": [], + "template": "\n\n", + "templateUrl": [], + "viewProviders": [], + "inputsClass": [ + { + "name": "allowAdditions", + "deprecated": false, + "deprecationMessage": "", + "line": 29, + "type": "boolean", + "decorators": [] + }, + { + "name": "maxSelections", + "deprecated": false, + "deprecationMessage": "", + "line": 31, + "type": "number", + "decorators": [] + }, + { + "name": "minSelections", + "deprecated": false, + "deprecationMessage": "", + "line": 30, + "type": "number", + "decorators": [] + }, + { + "name": "optionLabelField", + "deprecated": false, + "deprecationMessage": "", + "line": 34, + "type": "string", + "decorators": [] + }, + { + "name": "optionUrl", + "deprecated": false, + "deprecationMessage": "", + "line": 32, + "type": "string", + "decorators": [] + }, + { + "name": "optionValueField", + "deprecated": false, + "deprecationMessage": "", + "line": 33, + "type": "string", + "decorators": [] + }, + { + "name": "placeholder", + "deprecated": false, + "deprecationMessage": "", + "line": 28, + "type": "string", + "decorators": [] + }, + { + "name": "value", + "deprecated": false, + "deprecationMessage": "", + "line": 35, + "type": "string", + "decorators": [] + } + ], + "outputsClass": [ + { + "name": "change", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 37, + "type": "EventEmitter" + }, + { + "name": "touch", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 38, + "type": "EventEmitter" + } + ], + "propertiesClass": [ + { + "name": "_modelValue", + "deprecated": false, + "deprecationMessage": "", + "type": "string[] | string", + "optional": false, + "description": "", + "line": 40, + "modifierKind": [121] + }, + { + "name": "_options", + "deprecated": false, + "deprecationMessage": "", + "type": "Observable", + "optional": false, + "description": "", + "line": 41, + "modifierKind": [121] + }, + { + "name": "control", + "deprecated": false, + "deprecationMessage": "", + "type": "NgControl", + "optional": false, + "description": "", + "line": 43, + "decorators": [ + { + "name": "Optional", + "stringifiedArguments": "" + } + ], + "modifierKind": [123] + }, + { + "name": "onChange", + "defaultValue": "() => {...}", + "deprecated": false, + "deprecationMessage": "", + "type": "Function", + "optional": false, + "description": "", + "line": 56 + }, + { + "name": "onTouched", + "defaultValue": "() => {...}", + "deprecated": false, + "deprecationMessage": "", + "type": "Function", + "optional": false, + "description": "", + "line": 57 + } + ], + "methodsClass": [ + { + "name": "fireChange", + "args": [ + { + "name": "$event", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 85, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "$event", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "fireTouch", + "args": [ + { + "name": "$event", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 91, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "$event", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "jsonEntriesToOptions", + "args": [ + { + "name": "res", + "type": "any", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "any", + "typeParameters": [], + "line": 114, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "res", + "type": "any", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "jsonEntryToOption", + "args": [ + { + "name": "json", + "type": "any", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "key", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "null" + } + ], + "optional": false, + "returnType": "literal type", + "typeParameters": [], + "line": 127, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "json", + "type": "any", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "key", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "null", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "ngAfterViewInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 59, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "ngOnChanges", + "args": [ + { + "name": "change", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 96, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "change", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "registerOnChange", + "args": [ + { + "name": "fn", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 77, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "fn", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "registerOnTouched", + "args": [ + { + "name": "fn", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 81, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "fn", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "writeValue", + "args": [ + { + "name": "value", + "type": "any", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 61, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "value", + "type": "any", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { map } from 'rxjs/operators';\nimport { Component, EventEmitter, OnChanges, Optional } from '@angular/core';\nimport { AfterViewInit, Output, Input, ChangeDetectionStrategy } from '@angular/core';\nimport { NgControl, ControlValueAccessor } from '@angular/forms';\nimport { CoreWebService } from '@dotcms/dotcms-js';\nimport { Verify } from '../../services/validation/Verify';\nimport { Observable } from 'rxjs';\nimport * as _ from 'lodash';\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'cw-input-rest-dropdown',\n template: `\n \n \n `\n})\nexport class RestDropdown implements AfterViewInit, OnChanges, ControlValueAccessor {\n @Input() placeholder: string;\n @Input() allowAdditions: boolean;\n @Input() minSelections: number;\n @Input() maxSelections: number;\n @Input() optionUrl: string;\n @Input() optionValueField: string;\n @Input() optionLabelField: string;\n @Input() value: string;\n\n @Output() change: EventEmitter = new EventEmitter();\n @Output() touch: EventEmitter = new EventEmitter();\n\n private _modelValue: string[] | string;\n private _options: Observable;\n\n constructor(private coreWebService: CoreWebService, @Optional() public control: NgControl) {\n if (control) {\n control.valueAccessor = this;\n }\n\n this.placeholder = '';\n this.optionValueField = 'key';\n this.optionLabelField = 'value';\n this.allowAdditions = false;\n this.minSelections = 0;\n this.maxSelections = 1;\n }\n\n onChange: Function = () => {};\n onTouched: Function = () => {};\n\n ngAfterViewInit(): void {}\n\n writeValue(value: any): void {\n if (value && value.indexOf(',') > -1) {\n this._modelValue = value.split(',');\n } else {\n this._modelValue = _.isEmpty(value) ? null : value;\n }\n }\n\n get modelValue() {\n return this._modelValue;\n }\n\n get options() {\n return this._options;\n }\n\n registerOnChange(fn): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn): void {\n this.onTouched = fn;\n }\n\n fireChange($event): void {\n $event = Array.isArray($event) ? $event.join() : $event;\n this.change.emit($event);\n this.onChange($event);\n }\n\n fireTouch($event): void {\n this.onTouched($event);\n this.touch.emit($event);\n }\n\n ngOnChanges(change): void {\n if (change.optionUrl) {\n this._options = this.coreWebService\n .request({\n url: change.optionUrl.currentValue\n })\n .pipe(map((res: any) => this.jsonEntriesToOptions(res)));\n }\n\n if (\n change.value &&\n typeof change.value.currentValue === 'string' &&\n this.maxSelections > 1\n ) {\n this._modelValue = change.value.currentValue.split(',');\n }\n }\n\n private jsonEntriesToOptions(res: any): any {\n const valuesJson = res;\n let ary = [];\n if (Verify.isArray(valuesJson)) {\n ary = valuesJson.map((valueJson) => this.jsonEntryToOption(valueJson));\n } else {\n ary = Object.keys(valuesJson).map((key) => {\n return this.jsonEntryToOption(valuesJson[key], key);\n });\n }\n return ary;\n }\n\n private jsonEntryToOption(json: any, key: string = null): { value: string; label: string } {\n const opt = { value: null, label: null };\n if (!json[this.optionValueField] && this.optionValueField === 'key' && key != null) {\n opt.value = key;\n } else {\n opt.value = json[this.optionValueField];\n }\n opt.label = json[this.optionLabelField];\n return opt;\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "coreWebService", + "type": "CoreWebService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "control", + "type": "NgControl", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 41, + "jsdoctags": [ + { + "name": "coreWebService", + "type": "CoreWebService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "control", + "type": "NgControl", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": ["AfterViewInit", "OnChanges", "ControlValueAccessor"], + "accessors": { + "modelValue": { + "name": "modelValue", + "getSignature": { + "name": "modelValue", + "type": "", + "returnType": "", + "line": 69 + } + }, + "options": { + "name": "options", + "getSignature": { + "name": "options", + "type": "", + "returnType": "", + "line": 73 + } + } + } + }, + { + "name": "RippleComponent", + "id": "component-RippleComponent-515b01c64fc86eb0456e2826dfe27accaf79a9a8e9c627e430167c14d88b8419fe6a13b0521d1a975e9c5001b2478aac389891f289959d7a3897be4380ac6831", + "file": "apps/dotcms-ui/src/stories/primeng/misc/Ripple.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "app-p-button-ripple", + "styleUrls": [], + "styles": [], + "template": "", + "templateUrl": [], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [], + "methodsClass": [ + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 17, + "deprecated": false, + "deprecationMessage": "" + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component } from '@angular/core';\nimport { PrimeNGConfig } from 'primeng/api';\n\n@Component({\n selector: 'app-p-button-ripple',\n template: ``\n})\nexport class RippleComponent {\n constructor(private primengConfig: PrimeNGConfig) {}\n\n ngOnInit() {\n this.primengConfig.ripple = true;\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "primengConfig", + "type": "PrimeNGConfig", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 14, + "jsdoctags": [ + { + "name": "primengConfig", + "type": "PrimeNGConfig", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + }, + { + "name": "RuleActionComponent", + "id": "component-RuleActionComponent-479307590a1ad7a48fa55b5356e1380cb73c4111e8cadd48035648831430fc556261d1aa3bf1f22770c8b48eb7507050c20a7c00846064747b23b1754a3e94da", + "file": "libs/dot-rules/src/lib/rule-action-component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "rule-action", + "styleUrls": [], + "styles": [], + "template": "
    \n
    \n \n \n
    \n \n \n
    \n
    \n \n
    \n
    \n
    \n", + "templateUrl": [], + "viewProviders": [], + "inputsClass": [ + { + "name": "action", + "deprecated": false, + "deprecationMessage": "", + "line": 51, + "type": "ActionModel", + "decorators": [] + }, + { + "name": "actionTypePlaceholder", + "deprecated": false, + "deprecationMessage": "", + "line": 53, + "type": "string", + "decorators": [] + }, + { + "name": "index", + "defaultValue": "0", + "deprecated": false, + "deprecationMessage": "", + "line": 52, + "type": "number", + "decorators": [] + }, + { + "name": "ruleActionTypes", + "defaultValue": "{}", + "deprecated": false, + "deprecationMessage": "", + "line": 54, + "type": "literal type", + "decorators": [] + } + ], + "outputsClass": [ + { + "name": "deleteRuleAction", + "defaultValue": "new EventEmitter(false)", + "deprecated": false, + "deprecationMessage": "", + "line": 59, + "type": "EventEmitter" + }, + { + "name": "updateRuleActionParameter", + "defaultValue": "new EventEmitter(false)", + "deprecated": false, + "deprecationMessage": "", + "line": 58, + "type": "EventEmitter" + }, + { + "name": "updateRuleActionType", + "defaultValue": "new EventEmitter(false)", + "deprecated": false, + "deprecationMessage": "", + "line": 56, + "type": "EventEmitter" + } + ], + "propertiesClass": [ + { + "name": "typeDropdown", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": false, + "description": "", + "line": 61 + } + ], + "methodsClass": [ + { + "name": "ngOnChanges", + "args": [ + { + "name": "change", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 65, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "change", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 75, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "onDeleteRuleActionClicked", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 110, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "onParameterValueChange", + "args": [ + { + "name": "event", + "type": "literal type", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 97, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "event", + "type": "literal type", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "onTypeChange", + "args": [ + { + "name": "type", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 89, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "type", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, EventEmitter, Input, Output, OnInit } from '@angular/core';\n\nimport { ServerSideTypeModel } from './services/ServerSideFieldModel';\nimport {\n RULE_RULE_ACTION_UPDATE_TYPE,\n RULE_RULE_ACTION_UPDATE_PARAMETER,\n RULE_RULE_ACTION_DELETE,\n ActionModel\n} from './services/Rule';\nimport { RuleActionActionEvent } from './rule-engine.container';\nimport { LoggerService } from '@dotcms/dotcms-js';\n\n@Component({\n selector: 'rule-action',\n template: `\n
    \n
    \n \n \n
    \n \n \n
    \n
    \n \n
    \n
    \n
    \n `\n})\nexport class RuleActionComponent implements OnInit {\n @Input() action: ActionModel;\n @Input() index = 0;\n @Input() actionTypePlaceholder: string;\n @Input() ruleActionTypes: { [key: string]: ServerSideTypeModel } = {};\n\n @Output() updateRuleActionType: EventEmitter = new EventEmitter(false);\n @Output()\n updateRuleActionParameter: EventEmitter = new EventEmitter(false);\n @Output() deleteRuleAction: EventEmitter = new EventEmitter(false);\n\n typeDropdown: any;\n\n constructor(private loggerService: LoggerService) {}\n\n ngOnChanges(change): void {\n if (change.action) {\n if (this.typeDropdown && this.action.type) {\n if (this.action.type.key !== 'NoSelection') {\n this.typeDropdown.value = this.action.type.key;\n }\n }\n }\n }\n\n ngOnInit(): void {\n setTimeout(() => {\n this.typeDropdown = {\n options: Object.keys(this.ruleActionTypes).map((key) => {\n const type = this.ruleActionTypes[key];\n return {\n label: type._opt.label,\n value: type._opt.value\n };\n })\n };\n }, 0);\n }\n\n onTypeChange(type: string): void {\n this.loggerService.info('RuleActionComponent', 'onTypeChange', type);\n this.updateRuleActionType.emit({\n type: RULE_RULE_ACTION_UPDATE_TYPE,\n payload: { ruleAction: this.action, value: type, index: this.index }\n });\n }\n\n onParameterValueChange(event: { name: string; value: string }): void {\n this.loggerService.info('RuleActionComponent', 'onParameterValueChange', event);\n this.updateRuleActionParameter.emit({\n payload: {\n ruleAction: this.action,\n name: event.name,\n value: event.value,\n index: this.index\n },\n type: RULE_RULE_ACTION_UPDATE_PARAMETER\n });\n }\n\n onDeleteRuleActionClicked(): void {\n this.deleteRuleAction.emit({\n type: RULE_RULE_ACTION_DELETE,\n payload: { ruleAction: this.action, index: this.index }\n });\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "loggerService", + "type": "LoggerService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 61, + "jsdoctags": [ + { + "name": "loggerService", + "type": "LoggerService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": ["OnInit"] + }, + { + "name": "RuleComponent", + "id": "component-RuleComponent-960c71de7a4af7877d456728911ead1516b85f01c0ed99841bc8a70db9f96165fe606aff28e89e2328dafb06e6eb7d9057ce7e8c7ff91249cef252cb00468543", + "file": "libs/dot-rules/src/lib/rule-component.ts", + "changeDetection": "ChangeDetectionStrategy.Default", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "rule", + "styleUrls": [], + "styles": [], + "template": "
    \n \n \n
    \n \n
    \n \n \n Name is required\n
    \n
    \n {{\n rsrc('inputs.fireOn.label') | async\n }}\n \n \n \n
    \n {{\n statusText(30)\n }}\n \n
    \n \n \n \n
    \n
    \n \n
    \n \n
    \n
    \n {{ rsrc('inputs.action.firesActions') | async }}\n
    \n
    \n \n \n
    \n \n \n
    \n
    \n
    \n
    \n \n \n \n ", + "templateUrl": [], + "viewProviders": [], + "inputsClass": [ + { + "name": "conditionTypes", + "deprecated": false, + "deprecationMessage": "", + "line": 222, + "type": "literal type", + "decorators": [] + }, + { + "name": "environmentStores", + "deprecated": false, + "deprecationMessage": "", + "line": 223, + "type": "IPublishEnvironment[]", + "decorators": [] + }, + { + "name": "errors", + "deprecated": false, + "deprecationMessage": "", + "line": 219, + "type": "literal type", + "decorators": [] + }, + { + "name": "hidden", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "line": 225, + "type": "boolean", + "decorators": [] + }, + { + "name": "rule", + "deprecated": false, + "deprecationMessage": "", + "line": 216, + "type": "RuleModel", + "decorators": [] + }, + { + "name": "ruleActions", + "deprecated": false, + "deprecationMessage": "", + "line": 220, + "type": "ActionModel[]", + "decorators": [] + }, + { + "name": "ruleActionTypes", + "defaultValue": "{}", + "deprecated": false, + "deprecationMessage": "", + "line": 221, + "type": "literal type", + "decorators": [] + }, + { + "name": "saved", + "deprecated": false, + "deprecationMessage": "", + "line": 217, + "type": "boolean", + "decorators": [] + }, + { + "name": "saving", + "deprecated": false, + "deprecationMessage": "", + "line": 218, + "type": "boolean", + "decorators": [] + } + ], + "outputsClass": [ + { + "name": "createCondition", + "defaultValue": "new EventEmitter(false)", + "deprecated": false, + "deprecationMessage": "", + "line": 244, + "type": "EventEmitter" + }, + { + "name": "createConditionGroup", + "defaultValue": "new EventEmitter(false)", + "deprecated": false, + "deprecationMessage": "", + "line": 242, + "type": "EventEmitter" + }, + { + "name": "createRuleAction", + "defaultValue": "new EventEmitter(false)", + "deprecated": false, + "deprecationMessage": "", + "line": 233, + "type": "EventEmitter" + }, + { + "name": "deleteCondition", + "defaultValue": "new EventEmitter(false)", + "deprecated": false, + "deprecationMessage": "", + "line": 245, + "type": "EventEmitter" + }, + { + "name": "deleteRule", + "defaultValue": "new EventEmitter(false)", + "deprecated": false, + "deprecationMessage": "", + "line": 227, + "type": "EventEmitter" + }, + { + "name": "deleteRuleAction", + "defaultValue": "new EventEmitter(false)", + "deprecated": false, + "deprecationMessage": "", + "line": 237, + "type": "EventEmitter" + }, + { + "name": "openPushPublishDialog", + "defaultValue": "new EventEmitter(false)", + "deprecated": false, + "deprecationMessage": "", + "line": 250, + "type": "EventEmitter" + }, + { + "name": "updateConditionGroupOperator", + "defaultValue": "new EventEmitter(false)", + "deprecated": false, + "deprecationMessage": "", + "line": 240, + "type": "EventEmitter" + }, + { + "name": "updateConditionOperator", + "defaultValue": "new EventEmitter(false)", + "deprecated": false, + "deprecationMessage": "", + "line": 249, + "type": "EventEmitter" + }, + { + "name": "updateConditionParameter", + "defaultValue": "new EventEmitter(false)", + "deprecated": false, + "deprecationMessage": "", + "line": 248, + "type": "EventEmitter" + }, + { + "name": "updateConditionType", + "defaultValue": "new EventEmitter(false)", + "deprecated": false, + "deprecationMessage": "", + "line": 246, + "type": "EventEmitter" + }, + { + "name": "updateEnabledState", + "defaultValue": "new EventEmitter(false)", + "deprecated": false, + "deprecationMessage": "", + "line": 230, + "type": "EventEmitter" + }, + { + "name": "updateExpandedState", + "defaultValue": "new EventEmitter(false)", + "deprecated": false, + "deprecationMessage": "", + "line": 228, + "type": "EventEmitter" + }, + { + "name": "updateFireOn", + "defaultValue": "new EventEmitter(false)", + "deprecated": false, + "deprecationMessage": "", + "line": 231, + "type": "EventEmitter" + }, + { + "name": "updateName", + "defaultValue": "new EventEmitter(false)", + "deprecated": false, + "deprecationMessage": "", + "line": 229, + "type": "EventEmitter" + }, + { + "name": "updateRuleActionParameter", + "defaultValue": "new EventEmitter(false)", + "deprecated": false, + "deprecationMessage": "", + "line": 236, + "type": "EventEmitter" + }, + { + "name": "updateRuleActionType", + "defaultValue": "new EventEmitter(false)", + "deprecated": false, + "deprecationMessage": "", + "line": 234, + "type": "EventEmitter" + } + ], + "propertiesClass": [ + { + "name": "_rsrcCache", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": false, + "description": "", + "line": 266, + "modifierKind": [121] + }, + { + "name": "_updateEnabledStateDelay", + "defaultValue": "new EventEmitter(false)", + "deprecated": false, + "deprecationMessage": "", + "type": "EventEmitter", + "optional": false, + "description": "", + "line": 261, + "modifierKind": [121] + }, + { + "name": "actionTypePlaceholder", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 257 + }, + { + "name": "apiRoot", + "deprecated": false, + "deprecationMessage": "", + "type": "ApiRoot", + "optional": false, + "description": "", + "line": 273, + "modifierKind": [123] + }, + { + "name": "conditionTypePlaceholder", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 258 + }, + { + "name": "elementRef", + "deprecated": false, + "deprecationMessage": "", + "type": "ElementRef", + "optional": false, + "description": "", + "line": 270, + "modifierKind": [123] + }, + { + "name": "fireOn", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": false, + "description": "", + "line": 253 + }, + { + "name": "formModel", + "deprecated": false, + "deprecationMessage": "", + "type": "FormGroup", + "optional": false, + "description": "", + "line": 252 + }, + { + "name": "hideFireOn", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 256 + }, + { + "name": "resources", + "deprecated": false, + "deprecationMessage": "", + "type": "I18nService", + "optional": false, + "description": "", + "line": 271, + "modifierKind": [123] + }, + { + "name": "ruleActionOptions", + "deprecated": false, + "deprecationMessage": "", + "type": "MenuItem[]", + "optional": false, + "description": "", + "line": 259 + }, + { + "name": "ruleService", + "deprecated": false, + "deprecationMessage": "", + "type": "RuleService", + "optional": false, + "description": "", + "line": 272, + "modifierKind": [123] + }, + { + "name": "showAddToBundleDialog", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 255 + } + ], + "methodsClass": [ + { + "name": "deleteRuleClicked", + "args": [ + { + "name": "event", + "type": "any", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 509, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "event", + "type": "any", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "initFormModel", + "args": [ + { + "name": "fb", + "type": "FormBuilder", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 338, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "fb", + "type": "FormBuilder", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "ngOnChanges", + "args": [ + { + "name": "change", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 356, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "change", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "onCreateCondition", + "args": [ + { + "name": "event", + "type": "ConditionActionEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 427, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "event", + "type": "ConditionActionEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "onCreateConditionGroupClicked", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 418, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "onCreateRuleAction", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 408, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "onDeleteCondition", + "args": [ + { + "name": "event", + "type": "ConditionActionEvent", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "conditionGroup", + "type": "ConditionGroupModel", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 413, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "event", + "type": "ConditionActionEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "conditionGroup", + "type": "ConditionGroupModel", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "onDeleteRuleAction", + "args": [ + { + "name": "event", + "type": "literal type", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 452, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "event", + "type": "literal type", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "onUpdateConditionGroupOperator", + "args": [ + { + "name": "event", + "type": "literal type", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "conditionGroup", + "type": "ConditionGroupModel", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 460, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "event", + "type": "literal type", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "conditionGroup", + "type": "ConditionGroupModel", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "onUpdateConditionOperator", + "args": [ + { + "name": "event", + "type": "", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "conditionGroup", + "type": "ConditionGroupModel", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 498, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "event", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "conditionGroup", + "type": "ConditionGroupModel", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "onUpdateConditionParameter", + "args": [ + { + "name": "event", + "type": "", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "conditionGroup", + "type": "ConditionGroupModel", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 487, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "event", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "conditionGroup", + "type": "ConditionGroupModel", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "onUpdateConditionType", + "args": [ + { + "name": "event", + "type": "literal type", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "conditionGroup", + "type": "ConditionGroupModel", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 473, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "event", + "type": "literal type", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "conditionGroup", + "type": "ConditionGroupModel", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "onUpdateRuleActionParameter", + "args": [ + { + "name": "event", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 444, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "event", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "onUpdateRuleActionType", + "args": [ + { + "name": "event", + "type": "literal type", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 433, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "event", + "type": "literal type", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "rsrc", + "args": [ + { + "name": "subkey", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "defVal", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "'-missing-'" + } + ], + "optional": false, + "returnType": "any", + "typeParameters": [], + "line": 347, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "subkey", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "defVal", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "'-missing-'", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "setRuleEnabledState", + "args": [ + { + "name": "event", + "type": "any", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 400, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "event", + "type": "any", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "setRuleExpandedState", + "args": [ + { + "name": "expanded", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 391, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "expanded", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "statusText", + "args": [ + { + "name": "length", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "0" + } + ], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 376, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "length", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "0", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { debounceTime } from 'rxjs/operators';\nimport {\n Component,\n EventEmitter,\n ElementRef,\n Input,\n Output,\n ChangeDetectionStrategy\n} from '@angular/core';\nimport { FormControl, Validators, FormGroup, FormBuilder } from '@angular/forms';\nimport { Observable } from 'rxjs';\n\nimport {\n RuleModel,\n RULE_UPDATE_ENABLED_STATE,\n RULE_UPDATE_NAME,\n RULE_DELETE,\n RULE_RULE_ACTION_UPDATE_TYPE,\n RULE_RULE_ACTION_UPDATE_PARAMETER,\n V_RULE_UPDATE_EXPANDED_STATE,\n RULE_CONDITION_UPDATE_PARAMETER,\n RULE_CONDITION_UPDATE_OPERATOR,\n RULE_CONDITION_UPDATE_TYPE,\n ConditionGroupModel,\n ActionModel,\n RULE_RULE_ACTION_DELETE,\n RULE_RULE_ACTION_CREATE,\n RULE_CONDITION_GROUP_CREATE,\n RuleService\n} from './services/Rule';\n\nimport { I18nService } from './services/system/locale/I18n';\nimport { UserModel } from '@dotcms/dotcms-js';\nimport { ApiRoot } from '@dotcms/dotcms-js';\nimport {\n ConditionActionEvent,\n RuleActionActionEvent,\n RuleActionEvent,\n ConditionGroupActionEvent\n} from './rule-engine.container';\nimport { ServerSideTypeModel } from './services/ServerSideFieldModel';\nimport { IPublishEnvironment } from './services/bundle-service';\nimport { LoggerService } from '@dotcms/dotcms-js';\nimport { MenuItem } from 'primeng/api';\n\nconst I8N_BASE = 'api.sites.ruleengine';\n\n@Component({\n changeDetection: ChangeDetectionStrategy.Default,\n selector: 'rule',\n template: `
    \n \n \n \n
    \n \n
    \n \n \n Name is required\n
    \n
    \n {{\n rsrc('inputs.fireOn.label') | async\n }}\n \n \n \n
    \n {{\n statusText(30)\n }}\n \n
    \n \n \n \n
    \n
    \n \n
    \n \n
    \n
    \n {{ rsrc('inputs.action.firesActions') | async }}\n
    \n
    \n \n \n
    \n \n \n
    \n
    \n
    \n
    \n \n \n \n `\n})\nclass RuleComponent {\n @Input() rule: RuleModel;\n @Input() saved: boolean;\n @Input() saving: boolean;\n @Input() errors: { [key: string]: any };\n @Input() ruleActions: ActionModel[];\n @Input() ruleActionTypes: { [key: string]: ServerSideTypeModel } = {};\n @Input() conditionTypes: { [key: string]: ServerSideTypeModel };\n @Input() environmentStores: IPublishEnvironment[];\n\n @Input() hidden = false;\n\n @Output() deleteRule: EventEmitter = new EventEmitter(false);\n @Output() updateExpandedState: EventEmitter = new EventEmitter(false);\n @Output() updateName: EventEmitter = new EventEmitter(false);\n @Output() updateEnabledState: EventEmitter = new EventEmitter(false);\n @Output() updateFireOn: EventEmitter = new EventEmitter(false);\n\n @Output() createRuleAction: EventEmitter = new EventEmitter(false);\n @Output() updateRuleActionType: EventEmitter = new EventEmitter(false);\n @Output()\n updateRuleActionParameter: EventEmitter = new EventEmitter(false);\n @Output() deleteRuleAction: EventEmitter = new EventEmitter(false);\n\n @Output()\n updateConditionGroupOperator: EventEmitter = new EventEmitter(false);\n @Output()\n createConditionGroup: EventEmitter = new EventEmitter(false);\n\n @Output() createCondition: EventEmitter = new EventEmitter(false);\n @Output() deleteCondition: EventEmitter = new EventEmitter(false);\n @Output() updateConditionType: EventEmitter = new EventEmitter(false);\n @Output()\n updateConditionParameter: EventEmitter = new EventEmitter(false);\n @Output() updateConditionOperator: EventEmitter = new EventEmitter(false);\n @Output() openPushPublishDialog: EventEmitter = new EventEmitter(false);\n\n formModel: FormGroup;\n fireOn: any;\n // tslint:disable-next-line:no-unused-variable\n showAddToBundleDialog = false;\n hideFireOn: boolean;\n actionTypePlaceholder = '';\n conditionTypePlaceholder = '';\n ruleActionOptions: MenuItem[];\n\n private _updateEnabledStateDelay: EventEmitter<{\n type: string;\n payload: { rule: RuleModel; value: boolean };\n }> = new EventEmitter(false);\n\n private _rsrcCache: { [key: string]: Observable };\n\n constructor(\n private _user: UserModel,\n public elementRef: ElementRef,\n public resources: I18nService,\n public ruleService: RuleService,\n public apiRoot: ApiRoot,\n fb: FormBuilder,\n private loggerService: LoggerService\n ) {\n this._rsrcCache = {};\n this.hideFireOn = document.location.hash.includes('edit-page') || apiRoot.hideFireOn;\n\n /* Need to delay the firing of the state change toggle, to give any blur events time to fire. */\n this._updateEnabledStateDelay.pipe(debounceTime(20)).subscribe((event: RuleActionEvent) => {\n this.updateEnabledState.emit(event);\n });\n\n this.fireOn = {\n options: [\n { label: this.rsrc('inputs.fireOn.options.EveryPage'), value: 'EVERY_PAGE' },\n { label: this.rsrc('inputs.fireOn.options.OncePerVisit'), value: 'ONCE_PER_VISIT' },\n {\n label: this.rsrc('inputs.fireOn.options.OncePerVisitor'),\n value: 'ONCE_PER_VISITOR'\n },\n { label: this.rsrc('inputs.fireOn.options.EveryRequest'), value: 'EVERY_REQUEST' }\n ],\n placeholder: this.rsrc('inputs.fireOn.placeholder', 'Select One'),\n value: 'EVERY_PAGE'\n };\n this.initFormModel(fb);\n\n this.resources\n .get('api.sites.ruleengine.rules.inputs.action.type.placeholder')\n .subscribe((label) => {\n this.actionTypePlaceholder = label;\n });\n\n this.resources\n .get('api.sites.ruleengine.rules.inputs.condition.type.placeholder')\n .subscribe((label) => {\n this.conditionTypePlaceholder = label;\n });\n\n this.resources\n .get('api.sites.ruleengine.rules.inputs.add_to_bundle.label')\n .subscribe((addToBundleLabel) => {\n this.resources\n .get('api.sites.ruleengine.rules.inputs.deleteRule.label')\n .subscribe((deleteRuleLabel) => {\n this.ruleActionOptions = [\n {\n label: addToBundleLabel,\n visible: !this.apiRoot.hideRulePushOptions,\n command: () => {\n this.showAddToBundleDialog = true;\n }\n },\n {\n label: deleteRuleLabel,\n visible: !this.apiRoot.hideRulePushOptions,\n command: (event) => {\n this.deleteRuleClicked(event.originalEvent);\n }\n }\n ];\n });\n });\n }\n\n initFormModel(fb: FormBuilder): void {\n const vFns = [];\n vFns.push(Validators.required);\n vFns.push(Validators.minLength(3));\n this.formModel = fb.group({\n name: new FormControl(this.rule ? this.rule.name : '', Validators.compose(vFns))\n });\n }\n\n rsrc(subkey: string, defVal = '-missing-'): any {\n let msgObserver = this._rsrcCache[subkey];\n if (!msgObserver) {\n msgObserver = this.resources.get(I8N_BASE + '.rules.' + subkey, defVal);\n this._rsrcCache[subkey] = msgObserver;\n }\n return msgObserver;\n }\n\n ngOnChanges(change): void {\n if (change.rule) {\n const rule = this.rule;\n const ctrl: FormControl = this.formModel.controls['name'];\n ctrl.patchValue(this.rule.name, {});\n\n ctrl.valueChanges.pipe(debounceTime(250)).subscribe((name: string) => {\n if (ctrl.valid) {\n this.updateName.emit({\n payload: { rule: this.rule, value: name },\n type: RULE_UPDATE_NAME\n });\n }\n });\n if (rule.isPersisted()) {\n this.fireOn.value = rule.fireOn;\n }\n }\n }\n\n statusText(length = 0): string {\n let t = '';\n if (this.saved) {\n t = 'All changes saved';\n } else if (this.saving) {\n t = 'Saving...';\n } else if (this.errors) {\n t = this.errors['invalid'] || this.errors['serverError'] || 'Unsaved changes...';\n }\n if (length) {\n t = t.substring(0, length) + '...';\n }\n return t;\n }\n\n setRuleExpandedState(expanded: boolean): void {\n if (this.rule.name) {\n this.updateExpandedState.emit({\n payload: { rule: this.rule, value: expanded },\n type: V_RULE_UPDATE_EXPANDED_STATE\n });\n }\n }\n\n setRuleEnabledState(event: any): void {\n this._updateEnabledStateDelay.emit({\n payload: { rule: this.rule, value: event.checked },\n type: RULE_UPDATE_ENABLED_STATE\n });\n event.originalEvent.stopPropagation();\n }\n\n onCreateRuleAction(): void {\n this.loggerService.info('RuleComponent', 'onCreateRuleAction');\n this.createRuleAction.emit({ payload: { rule: this.rule }, type: RULE_RULE_ACTION_CREATE });\n }\n\n onDeleteCondition(event: ConditionActionEvent, conditionGroup: ConditionGroupModel): void {\n Object.assign(event.payload, { conditionGroup: conditionGroup, rule: this.rule });\n this.deleteCondition.emit(event);\n }\n\n onCreateConditionGroupClicked(): void {\n const len = this.rule._conditionGroups.length;\n const priority: number = len ? this.rule._conditionGroups[len - 1].priority : 1;\n this.createConditionGroup.emit({\n payload: { rule: this.rule, priority },\n type: RULE_CONDITION_GROUP_CREATE\n });\n }\n\n onCreateCondition(event: ConditionActionEvent): void {\n this.loggerService.info('RuleComponent', 'onCreateCondition');\n Object.assign(event.payload, { rule: this.rule });\n this.createCondition.emit(event);\n }\n\n onUpdateRuleActionType(event: {\n type: string;\n payload: { value: string; index: number };\n }): void {\n this.loggerService.info('RuleComponent', 'onUpdateRuleActionType');\n this.updateRuleActionType.emit({\n payload: Object.assign({ rule: this.rule }, event.payload),\n type: RULE_RULE_ACTION_UPDATE_TYPE\n });\n }\n\n onUpdateRuleActionParameter(event): void {\n this.loggerService.info('RuleComponent', 'onUpdateRuleActionParameter');\n this.updateRuleActionParameter.emit({\n payload: Object.assign({ rule: this.rule }, event.payload),\n type: RULE_RULE_ACTION_UPDATE_PARAMETER\n });\n }\n\n onDeleteRuleAction(event: { type: string; payload: { value: string; index: number } }): void {\n this.loggerService.info('RuleComponent', 'onDeleteRuleAction');\n this.deleteRuleAction.emit({\n payload: Object.assign({ rule: this.rule }, event.payload),\n type: RULE_RULE_ACTION_DELETE\n });\n }\n\n onUpdateConditionGroupOperator(\n event: { type: string; payload: { value: string; index: number } },\n conditionGroup: ConditionGroupModel\n ): void {\n this.updateConditionGroupOperator.emit({\n payload: Object.assign(\n { conditionGroup: conditionGroup, rule: this.rule },\n event.payload\n ),\n type: RULE_CONDITION_UPDATE_TYPE\n });\n }\n\n onUpdateConditionType(\n event: { type: string; payload: { value: string; index: number } },\n conditionGroup: ConditionGroupModel\n ): void {\n this.loggerService.info('RuleComponent', 'onUpdateConditionType');\n this.updateConditionType.emit({\n payload: Object.assign(\n { conditionGroup: conditionGroup, rule: this.rule },\n event.payload\n ),\n type: RULE_CONDITION_UPDATE_TYPE\n });\n }\n\n onUpdateConditionParameter(event, conditionGroup: ConditionGroupModel): void {\n this.loggerService.info('RuleComponent', 'onUpdateConditionParameter');\n this.updateConditionParameter.emit({\n payload: Object.assign(\n { conditionGroup: conditionGroup, rule: this.rule },\n event.payload\n ),\n type: RULE_CONDITION_UPDATE_PARAMETER\n });\n }\n\n onUpdateConditionOperator(event, conditionGroup: ConditionGroupModel): void {\n this.loggerService.info('RuleComponent', 'onUpdateConditionOperator');\n this.updateConditionOperator.emit({\n payload: Object.assign(\n { conditionGroup: conditionGroup, rule: this.rule },\n event.payload\n ),\n type: RULE_CONDITION_UPDATE_OPERATOR\n });\n }\n\n deleteRuleClicked(event: any): void {\n let noWarn = this._user.suppressAlerts || (event.altKey && event.shiftKey);\n if (!noWarn) {\n noWarn = this.ruleActions.length === 1 && !this.ruleActions[0].isPersisted();\n noWarn = noWarn && this.rule._conditionGroups.length === 1;\n if (noWarn) {\n const conditions = this.rule._conditionGroups[0].conditions;\n const keys = Object.keys(conditions);\n noWarn = noWarn && keys.length === 0;\n }\n }\n\n if (noWarn || confirm('Are you sure you want delete this rule?')) {\n this.deleteRule.emit({ payload: { rule: this.rule }, type: RULE_DELETE });\n }\n }\n}\n\nexport { RuleComponent };\n", + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "_user", + "type": "UserModel", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "elementRef", + "type": "ElementRef", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "resources", + "type": "I18nService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "ruleService", + "type": "RuleService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "apiRoot", + "type": "ApiRoot", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "fb", + "type": "FormBuilder", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "loggerService", + "type": "LoggerService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 266, + "jsdoctags": [ + { + "name": "_user", + "type": "UserModel", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "elementRef", + "type": "ElementRef", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "resources", + "type": "I18nService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "ruleService", + "type": "RuleService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "apiRoot", + "type": "ApiRoot", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "fb", + "type": "FormBuilder", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "loggerService", + "type": "LoggerService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + }, + { + "name": "RuleEngineComponent", + "id": "component-RuleEngineComponent-7be48fd9fecaab1d09ea15d71771dcea6046892923e15216d2a12c614d050535b978bebae0e0f0e76004d54f999e964c4a57e759c56b5f4e20898df84996ed01", + "file": "libs/dot-rules/src/lib/rule-engine.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "cw-rule-engine", + "styleUrls": [], + "styles": [], + "template": "
    \n\n
    {{ globalError.message }}
    \n

    {{ rsrc('contact.admin.error') | async }}

    \n X\n\n\n
    \n
    \n
    \n \n
    \n \n
    \n
    \n {{ rsrc('inputs.filter.status.show.label') | async }}:\n {{ rsrc('inputs.filter.status.all.label') | async }}\n |\n {{ rsrc('inputs.filter.status.active.label') | async }}\n |\n {{ rsrc('inputs.filter.status.inactive.label') | async }}\n
    \n
    \n
    \n tune\n

    \n {{ rsrc('inputs.no.rules') | async }}\n {{\n rsrc(pageId && !isContentletHost ? 'inputs.on.page' : 'inputs.on.site')\n | async\n }}{{ rsrc('inputs.add.one.now') | async }}\n

    \n {{\n rsrc('inputs.page.rules.fired.every.time') | async\n }}\n \n
    \n \n
    \n", + "templateUrl": [], + "viewProviders": [], + "inputsClass": [ + { + "name": "conditionTypes", + "defaultValue": "{}", + "deprecated": false, + "deprecationMessage": "", + "line": 151, + "type": "literal type", + "decorators": [] + }, + { + "name": "environmentStores", + "deprecated": false, + "deprecationMessage": "", + "line": 152, + "type": "IPublishEnvironment[]", + "decorators": [] + }, + { + "name": "isContentletHost", + "deprecated": false, + "deprecationMessage": "", + "line": 150, + "type": "boolean", + "decorators": [] + }, + { + "name": "loading", + "deprecated": false, + "deprecationMessage": "", + "line": 147, + "type": "boolean", + "decorators": [] + }, + { + "name": "pageId", + "deprecated": false, + "deprecationMessage": "", + "line": 149, + "type": "string", + "decorators": [] + }, + { + "name": "ruleActionTypes", + "defaultValue": "{}", + "deprecated": false, + "deprecationMessage": "", + "line": 146, + "type": "literal type", + "decorators": [] + }, + { + "name": "rules", + "deprecated": false, + "deprecationMessage": "", + "line": 145, + "type": "RuleModel[]", + "decorators": [] + }, + { + "name": "showRules", + "deprecated": false, + "deprecationMessage": "", + "line": 148, + "type": "boolean", + "decorators": [] + } + ], + "outputsClass": [ + { + "name": "createCondition", + "defaultValue": "new EventEmitter(false)", + "deprecated": false, + "deprecationMessage": "", + "line": 172, + "type": "EventEmitter" + }, + { + "name": "createConditionGroup", + "defaultValue": "new EventEmitter(false)", + "deprecated": false, + "deprecationMessage": "", + "line": 168, + "type": "EventEmitter" + }, + { + "name": "createRule", + "defaultValue": "new EventEmitter(false)", + "deprecated": false, + "deprecationMessage": "", + "line": 154, + "type": "EventEmitter" + }, + { + "name": "createRuleAction", + "defaultValue": "new EventEmitter(false)", + "deprecated": false, + "deprecationMessage": "", + "line": 161, + "type": "EventEmitter" + }, + { + "name": "deleteCondition", + "defaultValue": "new EventEmitter(false)", + "deprecated": false, + "deprecationMessage": "", + "line": 173, + "type": "EventEmitter" + }, + { + "name": "deleteRule", + "defaultValue": "new EventEmitter(false)", + "deprecated": false, + "deprecationMessage": "", + "line": 155, + "type": "EventEmitter" + }, + { + "name": "deleteRuleAction", + "defaultValue": "new EventEmitter(false)", + "deprecated": false, + "deprecationMessage": "", + "line": 162, + "type": "EventEmitter" + }, + { + "name": "updateConditionGroupOperator", + "defaultValue": "new EventEmitter(false)", + "deprecated": false, + "deprecationMessage": "", + "line": 170, + "type": "EventEmitter" + }, + { + "name": "updateConditionOperator", + "defaultValue": "new EventEmitter(false)", + "deprecated": false, + "deprecationMessage": "", + "line": 177, + "type": "EventEmitter" + }, + { + "name": "updateConditionParameter", + "defaultValue": "new EventEmitter(false)", + "deprecated": false, + "deprecationMessage": "", + "line": 176, + "type": "EventEmitter" + }, + { + "name": "updateConditionType", + "defaultValue": "new EventEmitter(false)", + "deprecated": false, + "deprecationMessage": "", + "line": 174, + "type": "EventEmitter" + }, + { + "name": "updateEnabledState", + "defaultValue": "new EventEmitter(false)", + "deprecated": false, + "deprecationMessage": "", + "line": 158, + "type": "EventEmitter" + }, + { + "name": "updateExpandedState", + "defaultValue": "new EventEmitter(false)", + "deprecated": false, + "deprecationMessage": "", + "line": 157, + "type": "EventEmitter" + }, + { + "name": "updateFireOn", + "defaultValue": "new EventEmitter(false)", + "deprecated": false, + "deprecationMessage": "", + "line": 159, + "type": "EventEmitter" + }, + { + "name": "updateName", + "defaultValue": "new EventEmitter(false)", + "deprecated": false, + "deprecationMessage": "", + "line": 156, + "type": "EventEmitter" + }, + { + "name": "updateRuleActionParameter", + "defaultValue": "new EventEmitter(false)", + "deprecated": false, + "deprecationMessage": "", + "line": 165, + "type": "EventEmitter" + }, + { + "name": "updateRuleActionType", + "defaultValue": "new EventEmitter(false)", + "deprecated": false, + "deprecationMessage": "", + "line": 163, + "type": "EventEmitter" + } + ], + "propertiesClass": [ + { + "name": "_rsrcCache", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": false, + "description": "", + "line": 187, + "modifierKind": [121] + }, + { + "name": "activeRules", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 184 + }, + { + "name": "destroy$", + "defaultValue": "new Subject()", + "deprecated": false, + "deprecationMessage": "", + "type": "Subject", + "optional": false, + "description": "", + "line": 188, + "modifierKind": [121] + }, + { + "name": "filterText", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 182 + }, + { + "name": "globalError", + "deprecated": false, + "deprecationMessage": "", + "type": "DotRuleMessage", + "optional": false, + "description": "", + "line": 179 + }, + { + "name": "pushPublishTitleLabel", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 189, + "modifierKind": [121] + }, + { + "name": "resources", + "deprecated": false, + "deprecationMessage": "", + "type": "I18nService", + "optional": false, + "description": "", + "line": 186, + "modifierKind": [121] + }, + { + "name": "showCloseButton", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 180 + }, + { + "name": "status", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 183 + } + ], + "methodsClass": [ + { + "name": "addRule", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 237, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "isFiltered", + "args": [ + { + "name": "rule", + "type": "RuleModel", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 270, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "rule", + "type": "RuleModel", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "isFilteringField", + "args": [ + { + "name": "field", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "value", + "type": "any", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "null" + } + ], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 259, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "field", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "value", + "type": "any", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "null", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "ngOnChange", + "args": [ + { + "name": "change", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 231, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "change", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "ngOnDestroy", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 217, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "rsrc", + "args": [ + { + "name": "subkey", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 222, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "subkey", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "setFieldFilter", + "args": [ + { + "name": "field", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "value", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "null" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 250, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "field", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "value", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "null", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "showPushPublishDialog", + "args": [ + { + "name": "ruleKey", + "type": "any", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 274, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "ruleKey", + "type": "any", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "updateActiveRuleCount", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 241, + "deprecated": false, + "deprecationMessage": "" + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n\n\n", + "type": "component", + "sourceCode": "import { Component, EventEmitter, Input, Output, OnDestroy } from '@angular/core';\nimport { Observable, Subject } from 'rxjs';\nimport { RuleModel, RULE_CREATE } from './services/Rule';\nimport { I18nService } from './services/system/locale/I18n';\nimport { CwFilter } from './services/util/CwFilter';\nimport { ServerSideTypeModel } from './services/ServerSideFieldModel';\nimport {\n ConditionActionEvent,\n RuleActionActionEvent,\n RuleActionEvent,\n ConditionGroupActionEvent\n} from './rule-engine.container';\nimport { IPublishEnvironment } from './services/bundle-service';\nimport { RuleViewService, DotRuleMessage } from './services/dot-view-rule-service';\nimport { take, takeUntil } from 'rxjs/operators';\nimport { DotPushPublishDialogService } from '@dotcms/dotcms-js';\n\nconst I8N_BASE = 'api.sites.ruleengine';\n\n/**\n *\n */\n@Component({\n selector: 'cw-rule-engine',\n template: `\n
    \n \n
    {{ globalError.message }}
    \n

    {{ rsrc('contact.admin.error') | async }}

    \n X\n \n \n
    \n
    \n
    \n \n
    \n \n
    \n
    \n {{ rsrc('inputs.filter.status.show.label') | async }}:\n {{ rsrc('inputs.filter.status.all.label') | async }}\n |\n {{ rsrc('inputs.filter.status.active.label') | async }}\n |\n {{ rsrc('inputs.filter.status.inactive.label') | async }}\n
    \n
    \n
    \n tune\n

    \n {{ rsrc('inputs.no.rules') | async }}\n {{\n rsrc(pageId && !isContentletHost ? 'inputs.on.page' : 'inputs.on.site')\n | async\n }}{{ rsrc('inputs.add.one.now') | async }}\n

    \n {{\n rsrc('inputs.page.rules.fired.every.time') | async\n }}\n \n
    \n \n
    \n `\n})\nexport class RuleEngineComponent implements OnDestroy {\n @Input() rules: RuleModel[];\n @Input() ruleActionTypes: { [key: string]: ServerSideTypeModel } = {};\n @Input() loading: boolean;\n @Input() showRules: boolean;\n @Input() pageId: string;\n @Input() isContentletHost: boolean;\n @Input() conditionTypes: { [key: string]: ServerSideTypeModel } = {};\n @Input() environmentStores: IPublishEnvironment[];\n\n @Output() createRule: EventEmitter<{ type: string }> = new EventEmitter(false);\n @Output() deleteRule: EventEmitter = new EventEmitter(false);\n @Output() updateName: EventEmitter = new EventEmitter(false);\n @Output() updateExpandedState: EventEmitter = new EventEmitter(false);\n @Output() updateEnabledState: EventEmitter = new EventEmitter(false);\n @Output() updateFireOn: EventEmitter = new EventEmitter(false);\n\n @Output() createRuleAction: EventEmitter = new EventEmitter(false);\n @Output() deleteRuleAction: EventEmitter = new EventEmitter(false);\n @Output() updateRuleActionType: EventEmitter = new EventEmitter(false);\n @Output()\n updateRuleActionParameter: EventEmitter = new EventEmitter(false);\n\n @Output()\n createConditionGroup: EventEmitter = new EventEmitter(false);\n @Output()\n updateConditionGroupOperator: EventEmitter = new EventEmitter(false);\n\n @Output() createCondition: EventEmitter = new EventEmitter(false);\n @Output() deleteCondition: EventEmitter = new EventEmitter(false);\n @Output() updateConditionType: EventEmitter = new EventEmitter(false);\n @Output()\n updateConditionParameter: EventEmitter = new EventEmitter(false);\n @Output() updateConditionOperator: EventEmitter = new EventEmitter(false);\n\n globalError: DotRuleMessage;\n showCloseButton: boolean;\n\n filterText: string;\n status: string;\n activeRules: number;\n\n private resources: I18nService;\n private _rsrcCache: { [key: string]: Observable };\n private destroy$: Subject = new Subject();\n private pushPublishTitleLabel = '';\n\n constructor(\n resources: I18nService,\n private ruleViewService: RuleViewService,\n private dotPushPublishDialogService: DotPushPublishDialogService\n ) {\n this.resources = resources;\n resources.get(I8N_BASE).subscribe((_rsrc) => {});\n this.filterText = '';\n this.rules = [];\n this._rsrcCache = {};\n this.status = null;\n\n this.ruleViewService.message\n .pipe(takeUntil(this.destroy$))\n .subscribe((dotRuleMessage: DotRuleMessage) => {\n this.globalError = dotRuleMessage;\n this.showCloseButton = dotRuleMessage.allowClose;\n });\n\n this.rsrc('pushPublish.title')\n .pipe(take(1))\n .subscribe((label) => {\n this.pushPublishTitleLabel = label;\n });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.complete();\n }\n\n rsrc(subkey: string): Observable {\n let x = this._rsrcCache[subkey];\n if (!x) {\n x = this.resources.get(I8N_BASE + '.rules.' + subkey);\n this._rsrcCache[subkey] = x;\n }\n return x;\n }\n\n ngOnChange(change): void {\n if (change.rules) {\n this.updateActiveRuleCount();\n }\n }\n\n addRule(): void {\n this.createRule.emit({ type: RULE_CREATE });\n }\n\n updateActiveRuleCount(): void {\n this.activeRules = 0;\n for (let i = 0; i < this.rules.length; i++) {\n if (this.rules[i].enabled) {\n this.activeRules++;\n }\n }\n }\n\n setFieldFilter(field: string, value: boolean = null): void {\n // remove old status\n const re = new RegExp(field + ':[\\\\w]*');\n this.filterText = this.filterText.replace(re, ''); // whitespace issues: \"blah:foo enabled:false mahRule\"\n if (value !== null) {\n this.filterText = field + ':' + value + ' ' + this.filterText;\n }\n }\n\n isFilteringField(field: string, value: any = null): boolean {\n let isFiltering;\n if (value === null) {\n const re = new RegExp(field + ':[\\\\w]*');\n isFiltering = this.filterText.match(re) != null;\n } else {\n isFiltering = this.filterText.indexOf(field + ':' + value) >= 0;\n }\n return isFiltering;\n }\n\n isFiltered(rule: RuleModel): boolean {\n return CwFilter.isFiltered(rule, this.filterText);\n }\n\n showPushPublishDialog(ruleKey: any): void {\n this.dotPushPublishDialogService.open({\n assetIdentifier: ruleKey,\n title: this.pushPublishTitleLabel\n });\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "resources", + "type": "I18nService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "ruleViewService", + "type": "RuleViewService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dotPushPublishDialogService", + "type": "DotPushPublishDialogService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 189, + "jsdoctags": [ + { + "name": "resources", + "type": "I18nService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "ruleViewService", + "type": "RuleViewService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dotPushPublishDialogService", + "type": "DotPushPublishDialogService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": ["OnDestroy"] + }, + { + "name": "RuleEngineContainer", + "id": "component-RuleEngineContainer-0b1711c16d9f15e40a82a786230a6640be390785b85223d758ab5ed0bf1c9a9e698359f37bf80cea0ea3fb29b356bb2d1e4036a1bcd9ab8d0859a2634da11f8f", + "file": "libs/dot-rules/src/lib/rule-engine.container.ts", + "encapsulation": ["ViewEncapsulation.None"], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "cw-rule-engine-container", + "styleUrls": ["./styles/rule-engine.scss", "./styles/angular-material.layouts.scss"], + "styles": [], + "template": "\n", + "templateUrl": [], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "_ruleService", + "deprecated": false, + "deprecationMessage": "", + "type": "RuleService", + "optional": false, + "description": "", + "line": 129, + "modifierKind": [123] + }, + { + "name": "bundleService", + "deprecated": false, + "deprecationMessage": "", + "type": "BundleService", + "optional": false, + "description": "", + "line": 133, + "modifierKind": [123] + }, + { + "name": "conditionGroups$", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "type": "EventEmitter", + "optional": false, + "description": "", + "line": 121 + }, + { + "name": "destroy$", + "defaultValue": "new Subject()", + "deprecated": false, + "deprecationMessage": "", + "type": "Subject", + "optional": false, + "description": "", + "line": 126, + "modifierKind": [121] + }, + { + "name": "environments", + "defaultValue": "[]", + "deprecated": false, + "deprecationMessage": "", + "type": "IPublishEnvironment[]", + "optional": false, + "description": "", + "line": 117 + }, + { + "name": "globalError", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 122 + }, + { + "name": "isContentletHost", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 124 + }, + { + "name": "pageId", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 123 + }, + { + "name": "ruleActions$", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "type": "EventEmitter", + "optional": false, + "description": "", + "line": 120 + }, + { + "name": "rules", + "deprecated": false, + "deprecationMessage": "", + "type": "RuleModel[]", + "optional": false, + "description": "", + "line": 114 + }, + { + "name": "rules$", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "type": "EventEmitter", + "optional": false, + "description": "", + "line": 119 + }, + { + "name": "state", + "defaultValue": "new RuleEngineState()", + "deprecated": false, + "deprecationMessage": "", + "type": "RuleEngineState", + "optional": false, + "description": "", + "line": 115 + } + ], + "methodsClass": [ + { + "name": "_handle403Error", + "args": [ + { + "name": "e", + "type": "CwError", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 744, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "e", + "type": "CwError", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "alphaSort", + "args": [ + { + "name": "key", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "number", + "typeParameters": [], + "line": 171, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "key", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "initRules", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 705, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "loadRules", + "args": [ + { + "name": "rules", + "type": "RuleModel[]", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 736, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "rules", + "type": "RuleModel[]", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "ngOnDestroy", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 185, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "onCreateCondition", + "args": [ + { + "name": "event", + "type": "ConditionActionEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 435, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "event", + "type": "ConditionActionEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "onCreateConditionGroup", + "args": [ + { + "name": "event", + "type": "ConditionGroupActionEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 402, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "event", + "type": "ConditionGroupActionEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "onCreateRule", + "args": [ + { + "name": "event", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 194, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\n\n", + "description": "", + "jsdoctags": [ + { + "name": { + "pos": 6410, + "end": 6415, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "event" + }, + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 6404, + "end": 6409, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "" + } + ] + }, + { + "name": "onCreateRuleAction", + "args": [ + { + "name": "event", + "type": "RuleActionActionEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 350, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "event", + "type": "RuleActionActionEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "onDeleteCondition", + "args": [ + { + "name": "event", + "type": "ConditionActionEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 494, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "event", + "type": "ConditionActionEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "onDeleteConditionGroup", + "args": [ + { + "name": "event", + "type": "ConditionGroupActionEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 426, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "event", + "type": "ConditionGroupActionEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "onDeleteRule", + "args": [ + { + "name": "event", + "type": "RuleActionEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 209, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "event", + "type": "RuleActionEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "onDeleteRuleAction", + "args": [ + { + "name": "event", + "type": "RuleActionActionEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 363, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "event", + "type": "RuleActionActionEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "onUpdateConditionGroupOperator", + "args": [ + { + "name": "event", + "type": "ConditionGroupActionEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 416, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "event", + "type": "ConditionGroupActionEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "onUpdateConditionOperator", + "args": [ + { + "name": "event", + "type": "ConditionActionEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 487, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "event", + "type": "ConditionActionEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "onUpdateConditionParameter", + "args": [ + { + "name": "event", + "type": "ConditionActionEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 480, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "event", + "type": "ConditionActionEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "onUpdateConditionType", + "args": [ + { + "name": "event", + "type": "ConditionActionEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 456, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "event", + "type": "ConditionActionEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "onUpdateEnabledState", + "args": [ + { + "name": "event", + "type": "RuleActionEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 227, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "event", + "type": "RuleActionEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "onUpdateExpandedState", + "args": [ + { + "name": "event", + "type": "RuleActionEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 243, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "event", + "type": "RuleActionEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "onUpdateFireOn", + "args": [ + { + "name": "event", + "type": "RuleActionEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 237, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "event", + "type": "RuleActionEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "onUpdateRuleActionParameter", + "args": [ + { + "name": "event", + "type": "RuleActionActionEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 395, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "event", + "type": "RuleActionActionEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "onUpdateRuleActionType", + "args": [ + { + "name": "event", + "type": "RuleActionActionEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 379, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "event", + "type": "RuleActionActionEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "onUpdateRuleName", + "args": [ + { + "name": "event", + "type": "RuleActionEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 232, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "event", + "type": "RuleActionEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "patchAction", + "args": [ + { + "name": "rule", + "type": "RuleModel", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "ruleAction", + "type": "ActionModel", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 608, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "rule", + "type": "RuleModel", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "ruleAction", + "type": "ActionModel", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "patchCondition", + "args": [ + { + "name": "rule", + "type": "RuleModel", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "group", + "type": "ConditionGroupModel", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "condition", + "type": "ConditionModel", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 640, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "rule", + "type": "RuleModel", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "group", + "type": "ConditionGroupModel", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "condition", + "type": "ConditionModel", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "patchConditionGroup", + "args": [ + { + "name": "rule", + "type": "RuleModel", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "group", + "type": "ConditionGroupModel", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "disable", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "true" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 562, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "rule", + "type": "RuleModel", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "group", + "type": "ConditionGroupModel", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "disable", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "true", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "patchRule", + "args": [ + { + "name": "rule", + "type": "RuleModel", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "disable", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "true" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 572, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "rule", + "type": "RuleModel", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "disable", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "true", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "prioritySortFn", + "args": [ + { + "name": "a", + "type": "any", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "b", + "type": "any", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "number", + "typeParameters": [], + "line": 701, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "a", + "type": "any", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "b", + "type": "any", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "ruleUpdated", + "args": [ + { + "name": "rule", + "type": "RuleModel", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "errors", + "type": "literal type", + "deprecated": false, + "deprecationMessage": "", + "optional": true + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 552, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "rule", + "type": "RuleModel", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "errors", + "type": "literal type", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "ruleUpdating", + "args": [ + { + "name": "rule", + "type": "", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "disable", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "true" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 538, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "rule", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "disable", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "true", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n\n\n", + "type": "component", + "sourceCode": "import { from as observableFrom, Observable, merge, Subject } from 'rxjs';\nimport { reduce, mergeMap, take, map, filter, takeUntil } from 'rxjs/operators';\n// tslint:disable-next-line:max-file-line-count\nimport { Component, EventEmitter, ViewEncapsulation, OnDestroy } from '@angular/core';\nimport {\n RuleModel,\n RuleService,\n ConditionGroupModel,\n ConditionModel,\n ActionModel,\n RuleEngineState\n} from './services/Rule';\nimport { CwChangeEvent } from './services/util/CwEvent';\nimport { ServerSideFieldModel, ServerSideTypeModel } from './services/ServerSideFieldModel';\nimport { ConditionService } from './services/Condition';\nimport { ActionService } from './services/Action';\nimport { ConditionGroupService } from './services/ConditionGroup';\nimport { CwError } from '@dotcms/dotcms-js';\nimport { BundleService, IPublishEnvironment } from './services/bundle-service';\nimport { ActivatedRoute, Params } from '@angular/router';\nimport { HttpCode } from '@dotcms/dotcms-js';\nimport { LoggerService } from '@dotcms/dotcms-js';\nimport { RuleViewService } from './services/dot-view-rule-service';\n\nexport interface ParameterChangeEvent extends CwChangeEvent {\n rule?: RuleModel;\n source?: ServerSideFieldModel;\n name: string;\n value: string;\n}\n\nexport interface TypeChangeEvent extends CwChangeEvent {\n rule?: RuleModel;\n source: ServerSideFieldModel;\n value: any;\n index: number;\n}\n\nexport interface RuleActionEvent {\n type: string;\n payload: {\n rule?: RuleModel;\n value?: string | boolean;\n };\n}\nexport interface RuleActionActionEvent extends RuleActionEvent {\n payload: {\n rule?: RuleModel;\n value?: string | boolean;\n ruleAction?: ActionModel;\n index?: number;\n name?: string;\n };\n}\nexport interface ConditionGroupActionEvent extends RuleActionEvent {\n payload: {\n rule?: RuleModel;\n value?: string | boolean;\n conditionGroup?: ConditionGroupModel;\n index?: number;\n priority?: number;\n };\n}\nexport interface ConditionActionEvent extends RuleActionEvent {\n payload: {\n rule?: RuleModel;\n value?: string | boolean;\n condition?: ConditionModel;\n conditionGroup?: ConditionGroupModel;\n index?: number;\n name?: string;\n type?: string;\n };\n}\n\n/**\n *\n */\n@Component({\n encapsulation: ViewEncapsulation.None,\n selector: 'cw-rule-engine-container',\n styleUrls: ['./styles/rule-engine.scss', './styles/angular-material.layouts.scss'],\n template: `\n \n `\n})\nexport class RuleEngineContainer implements OnDestroy {\n rules: RuleModel[];\n state: RuleEngineState = new RuleEngineState();\n\n environments: IPublishEnvironment[] = [];\n\n rules$: EventEmitter = new EventEmitter();\n ruleActions$: EventEmitter = new EventEmitter();\n conditionGroups$: EventEmitter = new EventEmitter();\n globalError: string;\n pageId: string;\n isContentletHost: boolean;\n\n private destroy$: Subject = new Subject();\n\n constructor(\n public _ruleService: RuleService,\n private _ruleActionService: ActionService,\n private _conditionGroupService: ConditionGroupService,\n private _conditionService: ConditionService,\n public bundleService: BundleService,\n private route: ActivatedRoute,\n private loggerService: LoggerService,\n private ruleViewService: RuleViewService\n ) {\n this.rules$.subscribe((rules) => {\n this.rules = rules;\n });\n\n this.bundleService\n .loadPublishEnvironments()\n .pipe(take(1))\n .subscribe((environments) => (this.environments = environments));\n this.initRules();\n\n this._ruleService._errors$.subscribe((res) => {\n this.ruleViewService.showErrorMessage(\n res.message,\n false,\n res.response.headers.get('error-key')\n );\n this.state.loading = false;\n this.state.showRules = false;\n });\n\n merge(\n this._ruleActionService.error,\n this._conditionGroupService.error,\n this._conditionService.error\n )\n .pipe(takeUntil(this.destroy$))\n .subscribe((message: string) => {\n this.ruleViewService.showErrorMessage(message);\n\n this.initRules();\n });\n }\n\n alphaSort(key): (a, b) => number {\n return (a, b) => {\n let x;\n if (a[key] > b[key]) {\n x = 1;\n } else if (a[key] < b[key]) {\n x = -1;\n } else {\n x = 0;\n }\n return x;\n };\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.complete();\n }\n\n /**\n *\n * @param event\n */\n onCreateRule(event): void {\n this.loggerService.info('RuleEngineContainer', 'onCreateRule', event);\n const priority = this.rules.length ? this.rules[0].priority + 1 : 1;\n const rule = new RuleModel({ priority });\n const group = new ConditionGroupModel({ operator: 'AND', priority: 1 });\n group._conditions.push(new ConditionModel({ _type: new ServerSideTypeModel() }));\n rule._conditionGroups.push(group);\n const action = new ActionModel(null, new ServerSideTypeModel());\n action._owningRule = rule;\n rule._ruleActions.push(action);\n rule._saved = false;\n rule._expanded = false;\n this.rules$.emit([rule].concat(this.rules));\n }\n\n onDeleteRule(event: RuleActionEvent): void {\n const rule = event.payload.rule;\n rule._deleting = true;\n this.state.deleting = true;\n if (rule.isPersisted()) {\n this._ruleService.deleteRule(rule.key).subscribe(\n (_result) => {\n this.state.deleting = false;\n const rules = this.rules.filter((arrayRule) => arrayRule.key !== rule.key);\n this.rules$.emit(rules);\n },\n (e: CwError) => {\n this._handle403Error(e) ? null : { invalid: e.message };\n }\n );\n }\n }\n\n onUpdateEnabledState(event: RuleActionEvent): void {\n event.payload.rule.enabled = event.payload.value;\n this.patchRule(event.payload.rule, false);\n }\n\n onUpdateRuleName(event: RuleActionEvent): void {\n event.payload.rule.name = event.payload.value;\n this.patchRule(event.payload.rule, false);\n }\n\n onUpdateFireOn(event: RuleActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onUpdateFireOn', event);\n event.payload.rule.fireOn = event.payload.value;\n this.patchRule(event.payload.rule, false);\n }\n\n onUpdateExpandedState(event: RuleActionEvent): void {\n const rule = event.payload.rule;\n rule._expanded = event.payload.value;\n if (rule._expanded) {\n let obs2: Observable;\n if (rule._conditionGroups.length === 0) {\n const obs: Observable<\n ConditionGroupModel[]\n > = this._conditionGroupService.allAsArray(\n rule.key,\n Object.keys(rule.conditionGroups)\n );\n obs2 = obs.pipe(\n mergeMap((groups: ConditionGroupModel[]) => observableFrom(groups))\n );\n } else {\n obs2 = observableFrom(rule._conditionGroups);\n }\n\n const obs3: Observable = obs2.pipe(\n mergeMap(\n (group: ConditionGroupModel) =>\n this._conditionService.listForGroup(\n group,\n this._ruleService._conditionTypes\n ),\n (group: ConditionGroupModel, conditions: ConditionModel[]) => {\n if (conditions) {\n conditions.forEach((condition: ConditionModel) => {\n condition.type = this._ruleService._conditionTypes[\n condition.conditionlet\n ];\n });\n }\n group._conditions = conditions;\n return group;\n }\n )\n );\n\n const obs4: Observable = obs3.pipe(\n reduce((acc: ConditionGroupModel[], group: ConditionGroupModel) => {\n acc.push(group);\n return acc;\n }, [])\n );\n\n obs4.subscribe(\n (groups: ConditionGroupModel[]) => {\n rule._conditionGroups = groups;\n if (rule._conditionGroups.length === 0) {\n this.loggerService.info(\n 'RuleEngineContainer',\n 'conditionGroups',\n 'Add stub group'\n );\n const group = new ConditionGroupModel({ operator: 'AND', priority: 1 });\n group._conditions.push(\n new ConditionModel({\n _type: new ServerSideTypeModel(),\n operator: 'AND',\n priority: 1\n })\n );\n rule._conditionGroups.push(group);\n } else {\n rule._conditionGroups.sort(this.prioritySortFn);\n rule._conditionGroups.forEach((group: ConditionGroupModel) => {\n group._conditions.sort(this.prioritySortFn);\n if (group._conditions.length === 0) {\n group._conditions.push(\n new ConditionModel({\n _type: new ServerSideTypeModel(),\n operator: 'AND',\n priority: 1\n })\n );\n }\n });\n }\n },\n (e) => {\n this.loggerService.error('RuleEngineContainer', e);\n }\n );\n\n if (rule._ruleActions.length === 0) {\n this._ruleActionService\n .allAsArray(\n rule.key,\n Object.keys(rule.ruleActions),\n this._ruleService._ruleActionTypes\n )\n .subscribe((actions) => {\n rule._ruleActions = actions;\n if (rule._ruleActions.length === 0) {\n const action = new ActionModel(null, new ServerSideTypeModel(), 1);\n rule._ruleActions.push(action);\n rule._ruleActions.sort(this.prioritySortFn);\n } else {\n rule._ruleActions.sort(this.prioritySortFn);\n }\n });\n }\n }\n }\n\n onCreateRuleAction(event: RuleActionActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onCreateRuleAction', event);\n const rule = event.payload.rule;\n const priority = rule._ruleActions.length\n ? rule._ruleActions[rule._ruleActions.length - 1].priority + 1\n : 1;\n const entity = new ActionModel(null, new ServerSideTypeModel(), priority);\n\n this.patchRule(rule, true);\n rule._ruleActions.push(entity);\n rule._saved = false;\n }\n\n onDeleteRuleAction(event: RuleActionActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onDeleteRuleAction', event);\n const rule = event.payload.rule;\n const ruleAction = event.payload.ruleAction;\n if (ruleAction.isPersisted()) {\n this._ruleActionService.remove(rule.key, ruleAction).subscribe((_result) => {\n rule._ruleActions = rule._ruleActions.filter((aryAction) => {\n return aryAction.key !== ruleAction.key;\n });\n if (rule._ruleActions.length === 0) {\n rule._ruleActions.push(new ActionModel(null, new ServerSideTypeModel(), 1));\n }\n });\n }\n }\n\n onUpdateRuleActionType(event: RuleActionActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onUpdateRuleActionType');\n try {\n const ruleAction = event.payload.ruleAction;\n const rule = event.payload.rule;\n const idx = event.payload.index;\n const type: ServerSideTypeModel = this._ruleService._ruleActionTypes[\n event.payload.value\n ];\n rule._ruleActions[idx] = new ActionModel(ruleAction.key, type, ruleAction.priority);\n this.patchAction(rule, ruleAction);\n } catch (e) {\n this.loggerService.error('RuleComponent', 'onActionTypeChange', e);\n }\n }\n\n onUpdateRuleActionParameter(event: RuleActionActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onUpdateRuleActionParameter');\n const ruleAction = event.payload.ruleAction;\n ruleAction.setParameter(event.payload.name, event.payload.value);\n this.patchAction(event.payload.rule, ruleAction);\n }\n\n onCreateConditionGroup(event: ConditionGroupActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onCreateConditionGroup');\n const rule = event.payload.rule;\n const priority = rule._conditionGroups.length\n ? rule._conditionGroups[rule._conditionGroups.length - 1].priority + 1\n : 1;\n const group = new ConditionGroupModel({ operator: 'AND', priority: priority });\n group._conditions.push(\n new ConditionModel({ _type: new ServerSideTypeModel(), operator: 'AND', priority: 1 })\n );\n rule._conditionGroups.push(group);\n rule._conditionGroups.sort(this.prioritySortFn);\n }\n\n onUpdateConditionGroupOperator(event: ConditionGroupActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onUpdateConditionGroupOperator');\n const group = event.payload.conditionGroup;\n group.operator = event.payload.value;\n if (group.key != null) {\n this.patchConditionGroup(event.payload.rule, group);\n this.patchRule(event.payload.rule);\n }\n }\n\n onDeleteConditionGroup(event: ConditionGroupActionEvent): void {\n const rule = event.payload.rule;\n const group = event.payload.conditionGroup;\n this._conditionGroupService.remove(rule.key, group).subscribe();\n rule._conditionGroups = rule._conditionGroups.filter(\n (aryGroup) => aryGroup.key !== group.key\n );\n }\n\n onCreateCondition(event: ConditionActionEvent): void {\n const rule = event.payload.rule;\n this.ruleUpdating(rule, true);\n try {\n const group = event.payload.conditionGroup;\n const priority = group._conditions.length\n ? group._conditions[group._conditions.length - 1].priority + 1\n : 1;\n const entity = new ConditionModel({\n _type: new ServerSideTypeModel(),\n operator: 'AND',\n priority: priority\n });\n group._conditions.push(entity);\n this.ruleUpdated(rule);\n } catch (e) {\n this.loggerService.error('RuleEngineContainer', 'onCreateCondition', e);\n this.ruleUpdated(rule, [{ unhandledError: e }]);\n }\n }\n\n onUpdateConditionType(event: ConditionActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onUpdateConditionType');\n try {\n let condition = event.payload.condition;\n const group = event.payload.conditionGroup;\n const rule = event.payload.rule;\n const idx = event.payload.index;\n const type: ServerSideTypeModel = this._ruleService._conditionTypes[\n event.payload.value\n ];\n // replace the condition rather than mutate it to force event for 'onPush' NG2 components.\n condition = new ConditionModel({\n _type: type,\n id: condition.key,\n operator: condition.operator,\n priority: condition.priority\n });\n group._conditions[idx] = condition;\n this.patchCondition(rule, group, condition);\n } catch (e) {\n this.loggerService.error('RuleComponent', 'onActionTypeChange', e);\n }\n }\n\n onUpdateConditionParameter(event: ConditionActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onUpdateConditionParameter');\n const condition = event.payload.condition;\n condition.setParameter(event.payload.name, event.payload.value);\n this.patchCondition(event.payload.rule, event.payload.conditionGroup, condition);\n }\n\n onUpdateConditionOperator(event: ConditionActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onUpdateConditionOperator');\n const condition = event.payload.condition;\n condition.operator = event.payload.value;\n this.patchCondition(event.payload.rule, event.payload.conditionGroup, condition);\n }\n\n onDeleteCondition(event: ConditionActionEvent): void {\n this.loggerService.info('RuleEngineContainer', 'onDeleteCondition', event);\n const rule = event.payload.rule;\n const group = event.payload.conditionGroup;\n const condition = event.payload.condition;\n if (condition.isPersisted()) {\n this._conditionService.remove(condition).subscribe((_result) => {\n group._conditions = group._conditions.filter((aryCondition) => {\n return aryCondition.key !== condition.key;\n });\n if (group._conditions.length === 0) {\n this.loggerService.info(\n 'RuleEngineContainer',\n 'condition',\n 'Remove Condition and remove Groups is empty'\n );\n this._conditionGroupService.remove(rule.key, group).subscribe();\n rule._conditionGroups = rule._conditionGroups.filter(\n (aryGroup) => aryGroup.key !== group.key\n );\n }\n if (rule._conditionGroups.length === 0) {\n this.loggerService.info(\n 'RuleEngineContainer',\n 'conditionGroups',\n 'Add stub group if Groups are empty'\n );\n const conditionGroup = new ConditionGroupModel({\n operator: 'AND',\n priority: 1\n });\n conditionGroup._conditions.push(\n new ConditionModel({\n _type: new ServerSideTypeModel(),\n operator: 'AND',\n priority: 1\n })\n );\n rule._conditionGroups.push(conditionGroup);\n }\n });\n }\n }\n\n ruleUpdating(rule, disable = true): void {\n if (disable && rule.enabled && rule.key) {\n this.loggerService.info(\n 'RuleEngineContainer',\n 'ruleUpdating',\n 'disabling rule due for edit.'\n );\n this.patchRule(rule, disable);\n }\n rule._saved = false;\n rule._saving = true;\n rule._errors = null;\n }\n\n ruleUpdated(rule: RuleModel, errors?: { [key: string]: any }): void {\n rule._saving = false;\n if (!errors) {\n rule._saved = true;\n } else {\n this.loggerService.error(errors);\n rule._errors = errors;\n }\n }\n\n patchConditionGroup(rule: RuleModel, group: ConditionGroupModel, disable = true): void {\n this.ruleUpdating(rule, false);\n if (disable && rule.enabled) {\n rule.enabled = false;\n }\n this._conditionGroupService\n .updateConditionGroup(rule.key, group)\n .subscribe((_result) => {});\n }\n\n patchRule(rule: RuleModel, disable = true): void {\n this.ruleUpdating(rule, false);\n if (disable && rule.enabled) {\n rule.enabled = false;\n }\n if (rule.isValid()) {\n if (rule.isPersisted()) {\n this._ruleService.updateRule(rule.key, rule).subscribe(\n () => {\n this.ruleUpdated(rule);\n },\n (e: CwError) => {\n const ruleError = this._handle403Error(e) ? null : { invalid: e.message };\n this.ruleUpdated(rule, ruleError);\n this.initRules();\n }\n );\n } else {\n this._ruleService.createRule(rule).subscribe(\n () => {\n this.ruleUpdated(rule);\n },\n (e: CwError) => {\n const ruleError = this._handle403Error(e) ? null : { invalid: e.message };\n this.ruleUpdated(rule, ruleError);\n this.initRules();\n }\n );\n }\n } else {\n this.ruleUpdated(rule, {\n invalid: 'Cannot save, rule is not valid.'\n });\n }\n }\n\n patchAction(rule: RuleModel, ruleAction: ActionModel): void {\n if (ruleAction.isValid()) {\n this.ruleUpdating(rule, false);\n if (!ruleAction.isPersisted()) {\n this._ruleActionService.createRuleAction(rule.key, ruleAction).subscribe(\n (_) => {\n this.ruleUpdated(rule);\n },\n (e: CwError) => {\n const ruleError = this._handle403Error(e) ? null : { invalid: e.message };\n this.ruleUpdated(rule, ruleError);\n }\n );\n } else {\n this._ruleActionService.updateRuleAction(rule.key, ruleAction).subscribe(\n (_result) => {\n this.ruleUpdated(rule);\n },\n (e: any) => {\n const ruleError = this._handle403Error(e) ? null : { invalid: e.message };\n this.ruleUpdated(rule, ruleError);\n }\n );\n }\n } else {\n this.ruleUpdating(rule);\n this.ruleUpdated(rule, {\n invalid: 'Cannot save, action is not valid.'\n });\n }\n }\n\n patchCondition(rule: RuleModel, group: ConditionGroupModel, condition: ConditionModel): void {\n try {\n if (condition.isValid()) {\n this.ruleUpdating(rule, false);\n if (condition.isPersisted()) {\n this._conditionService.save(group.key, condition).subscribe(\n (_result) => {\n this.ruleUpdated(rule);\n },\n (e: any) => {\n const ruleError = this._handle403Error(e)\n ? null\n : { invalid: e.message };\n this.ruleUpdated(rule, ruleError);\n }\n );\n } else {\n if (!group.isPersisted()) {\n this._conditionGroupService\n .createConditionGroup(rule.key, group)\n .subscribe((_foo) => {\n this._conditionService.add(group.key, condition).subscribe(\n () => {\n group.conditions[condition.key] = true;\n this.ruleUpdated(rule);\n },\n (e: CwError) => {\n const ruleError = this._handle403Error(e)\n ? null\n : { invalid: e.message };\n this.ruleUpdated(rule, ruleError);\n }\n );\n });\n } else {\n this._conditionService.add(group.key, condition).subscribe(\n () => {\n group.conditions[condition.key] = true;\n this.ruleUpdated(rule);\n },\n (e: CwError) => {\n const ruleError = this._handle403Error(e)\n ? null\n : { invalid: e.message };\n this.ruleUpdated(rule, ruleError);\n }\n );\n }\n }\n } else {\n this.ruleUpdating(rule);\n this.loggerService.info('RuleEngineContainer', 'patchCondition', 'Not valid');\n rule._saving = false;\n rule._errors = { invalid: 'Condition not valid.' };\n }\n } catch (e) {\n this.loggerService.error(e);\n this.ruleUpdated(rule, { invalid: e.message });\n }\n }\n\n prioritySortFn(a: any, b: any): number {\n return a.priority - b.priority;\n }\n\n private initRules(): void {\n this.state.loading = true;\n\n this.pageId = '';\n\n const pageIdParams = this.route.params.pipe(map((params: Params) => params.pageId));\n const queryParams = this.route.queryParams.pipe(map((params: Params) => params.realmId));\n\n merge(pageIdParams, queryParams)\n .pipe(\n filter((res) => !!res),\n take(1)\n )\n .subscribe((id: string) => {\n this.pageId = id;\n });\n\n this._ruleService.requestRules(this.pageId);\n this._ruleService\n .loadRules()\n .pipe(takeUntil(this.destroy$))\n .subscribe((rules: RuleModel[]) => {\n this.loadRules(rules);\n });\n this.route.queryParams\n .pipe(take(1))\n .subscribe(\n (params: Params) => (this.isContentletHost = params.isContentletHost === 'true')\n );\n }\n\n private loadRules(rules: RuleModel[]): void {\n rules.sort((a, b) => {\n return b.priority - a.priority;\n });\n this.rules$.emit(rules);\n this.state.loading = false;\n }\n\n private _handle403Error(e: CwError): boolean {\n let handled = false;\n try {\n if (e && e.response.status === HttpCode.FORBIDDEN) {\n const errorJson = e.response;\n if (errorJson && errorJson.error) {\n this.ruleViewService.showErrorMessage(\n errorJson.error.message.replace('dotcms.api.error.forbidden: ', '')\n );\n handled = true;\n }\n }\n } catch (e) {\n this.loggerService.error('Error while processing invalid response: ', e);\n }\n\n this.initRules();\n\n return handled;\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "// @import \"~primeicons/primeicons.css\";\n// @import \"~primeng/resources/primeng.css\";\n// @import \"~primeng/resources/themes/nova-light/theme.css\";\n\n$background-primary: #f2f2f2;\n$background-secondary: #dff1f9;\n$background-secondary-alternate: #d4efd5;\n$background-tertiary: #fd7b1d;\n$foreground-tertiary: #ffffff;\n$foreground-disabled: #a4a4a4;\n$foreground-active: #848484;\n\n$text-emphasis: #fc7e1c;\n$warn: #cb3927;\n$brand-primary-one: #209021;\n$black: #0a0725;\n$gray: #7e7a86;\n$gray-light: #b3b1b8;\n$gray-bg: #f1f3f4;\n$white: #fff;\n$md-shadow-4: 0 2px 4px 0 rgba(0, 0, 0, 0.1);\n\n$font-size-xx-large: 24px;\n$font-size-x-large: 18px;\n$font-size-medium: 14px;\n\n$action-button-height: 48px;\n\n$brand-primary: var(--color-main);\n$brand-primary_mod: var(--color-main_mod);\n\n$md-shadow-1: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);\n$md-shadow-3: 0 10px 24px 0 rgba(0, 0, 0, 0.2);\n\n$spacing-3: 1rem;\n$spacing-4: 1.5rem;\n\n// generic transform\n@mixin transform($transforms) {\n -moz-transform: $transforms;\n -o-transform: $transforms;\n -ms-transform: $transforms;\n -webkit-transform: $transforms;\n transform: $transforms;\n}\n\n@mixin valid-and-dirty-or-touched {\n transition-property: border-left, border-left-width;\n transition-delay: 1s;\n transition-duration: 600ms;\n transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55);\n}\n\n@mixin valid-and-dirty-or-touched-focused {\n transition-property: border-left;\n transition-delay: 0s;\n transition-duration: 0s;\n}\n\n@mixin invalid-and-dirty-or-touched {\n box-shadow: 0 2px 0 $warn;\n}\n\n@mixin invalid-and-pristine-or-untouched {\n}\n\n$finder-s-input: \".ui.input input\";\n\n.rules__engine-container {\n background-color: $gray-bg;\n display: flex;\n flex-grow: 1;\n min-height: 100%;\n padding: $spacing-4;\n\n cw-rule-engine {\n box-shadow: $md-shadow-4;\n padding: $spacing-3 $spacing-4;\n flex-grow: 1;\n background-color: $foreground-tertiary;\n overflow: scroll;\n }\n\n .cw-message {\n &.ui.message {\n &:first-child {\n margin: 2em 2em 1em;\n }\n }\n }\n\n .cw-loading {\n background-color: rgba(10, 10, 10, 0.35);\n width: 100%;\n height: 100%;\n }\n\n .close-button {\n font-size: $font-size-medium;\n position: absolute;\n right: 5px;\n top: 5px;\n cursor: pointer;\n font-style: normal;\n }\n\n .ui.fluid.input input:hover {\n border-color: rgba(34, 36, 38, 0.35);\n box-shadow: none;\n }\n\n .cw-rule-status-text {\n margin-top: 0.2em;\n margin-right: 2em;\n }\n\n .cw-saved {\n .ui.checkbox input:checked ~ .box:after,\n .ui.checkbox input:checked ~ label:after {\n background-color: $brand-primary-one;\n border: 0.5em solid white;\n }\n .cw-rule-status-text {\n opacity: 0;\n transition-property: opacity;\n transition-delay: 1s;\n transition-duration: 2s;\n transition-timing-function: cubic-bezier(1, 0.1, 0, 1);\n }\n }\n\n .cw-saving {\n .ui.checkbox input:checked ~ .box:after,\n .ui.checkbox input:checked ~ label:after {\n background-color: $background-tertiary;\n }\n .cw-rule-status-text {\n opacity: 1;\n transition-property: opacity;\n transition-delay: 0s;\n transition-duration: 0s;\n }\n }\n\n /* Semantic Text input box. */\n\n .ng-dirty.ng-valid input:focus,\n .ng-dirty.ng-valid .ui.input input:focus,\n input:focus.ng-valid.ng-dirty,\n .ng-dirty.ui.input input:focus.ng-valid,\n .ng-dirty.ng-valid .ui.input input:focus,\n p-dropdown.ng-dirty.ng-valid .ui-dropdown {\n @include valid-and-dirty-or-touched-focused;\n }\n\n .ng-dirty.ng-valid input,\n input.ng-dirty.ng-valid,\n .ng-dirty.ui.input input.ng-valid,\n .ng-dirty.ng-valid .ui.input input,\n .ng-dirty.ui.dropdown.ng-valid,\n .ng-dirty.ui.selection.dropdown.ng-valid,\n p-dropdown.ng-touched.ng-valid .ui-dropdown {\n @include valid-and-dirty-or-touched;\n }\n\n // Untouched fields that aren't yet valid.\n .ng-untouched.ng-pristine.ng-invalid {\n #{$finder-s-input}, // Text Input fields\n .ui-dropdown // Drop down fields\n {\n @include invalid-and-pristine-or-untouched;\n }\n }\n\n // Touched but unmodified (pristine) fields that aren't valid.\n .ng-touched.ng-pristine.ng-invalid {\n #{$finder-s-input}, // Text Input fields\n .ui-dropdown // Drop down fields\n {\n @include invalid-and-dirty-or-touched;\n }\n }\n\n // Dirty fields that aren't valid.\n .ng-dirty.ng-invalid {\n #{$finder-s-input}, // Text Input fields\n .ui-dropdown // Drop down fields\n {\n @include invalid-and-dirty-or-touched;\n }\n }\n\n .cw-rule-engine {\n > .cw-header {\n padding-bottom: 2em;\n\n .cw-button-add {\n background-color: $background-tertiary;\n color: $foreground-tertiary;\n }\n }\n\n .cw-btn-group .ui.basic.buttons .ui.button:focus {\n border: 1px solid #96c8da;\n }\n }\n\n .cw-warn {\n color: $warn;\n }\n\n .cw-hidden {\n display: none !important;\n }\n\n .cw-button-link.ui.basic.black.button {\n box-shadow: none !important;\n }\n\n .cw-button-link.ui.basic.black.button {\n &:focus,\n &:hover,\n &:active {\n box-shadow: none !important;\n background-color: inherit;\n }\n }\n\n .cw-filter-links {\n font-size: 0.8em;\n color: $foreground-disabled;\n\n span:first-child {\n padding: 0 4px 0 0;\n }\n\n span {\n padding: 0 4px;\n }\n }\n\n .cw-filter-link {\n &.active {\n &:hover {\n color: $foreground-active;\n }\n font-weight: bold;\n color: $foreground-active;\n }\n &:hover {\n color: $foreground-disabled;\n }\n color: $foreground-disabled;\n }\n\n .cw-rule {\n margin-bottom: 2em;\n border: 1px solid $background-primary;\n border-radius: 0.5em;\n background-color: #fff;\n\n .cw-header-actions {\n margin-right: 0.5em;\n position: relative;\n\n .cw-btn-group .ui.basic.buttons .ui.button:focus {\n border: none;\n }\n\n .ui.vertical.menu {\n position: absolute;\n right: 0;\n top: 25px;\n z-index: 4;\n }\n\n p-inputSwitch {\n margin: 4px 15px 0 0;\n }\n }\n\n .cw-type-dropdown {\n max-height: 2em;\n }\n .cw-input-label-right {\n margin-left: 0.25em;\n }\n .cw-input-label-left {\n margin-right: 0.25em;\n }\n .cw-input,\n &.cw-last {\n margin-right: 1em;\n }\n\n .cw-rule-name-input {\n margin-right: 1em;\n }\n\n > .cw-header {\n background-color: #fff;\n padding: 0.35em 0;\n border-top-left-radius: 0.5em;\n border-top-right-radius: 0.5em;\n }\n\n .cw-rule-caret {\n min-width: 1.25em;\n max-width: 1.25em;\n margin-left: 0;\n }\n\n .cw-rule-cloud {\n min-width: 1em;\n max-width: 1em;\n margin-left: 0.5em;\n margin-right: 0.25em;\n color: white;\n text-shadow: 1px 1px 8px #555555;\n &.out-of-sync {\n color: red;\n text-shadow: 1px 1px 8px black;\n }\n }\n .cw-fire-on-label {\n font-weight: bold;\n margin-right: 0.5em;\n min-width: 4em;\n max-width: 4em;\n }\n\n .cw-fire-on-dropdown {\n min-width: 12em;\n max-width: 12em;\n }\n\n .cw-btn-group {\n .ui.basic {\n background-color: white;\n }\n }\n\n .cw-accordion-body {\n margin: 1em;\n }\n\n .cw-action-separator {\n background-color: $background-secondary-alternate;\n }\n\n .cw-add-action-button {\n width: 2em;\n height: 2em;\n }\n\n .cw-comparator-selector {\n min-width: 10em;\n max-width: 10em;\n }\n\n .cw-condition-component-body {\n margin-left: 1em;\n }\n\n cw-toggle-input.cw-input {\n margin-top: 0.75em;\n }\n\n .cw-condition-row,\n .cw-action-row {\n margin-bottom: 0.5em;\n min-height: 1em;\n }\n\n .cw-action-row {\n // This is the width + margin of the condition toggle button\n padding-left: 6em;\n }\n }\n\n .cw-header-info-arrow {\n font-size: 16px;\n font-weight: bold;\n padding: 0.5em;\n }\n\n .cw-condition-group-separator,\n .cw-action-separator {\n padding: 0.5em 1em;\n background-color: $background-secondary;\n border-radius: 0.5em;\n width: 100%;\n }\n\n .cw-action-group {\n margin-top: 1em;\n }\n\n .cw-rule-group {\n .cw-header-text {\n width: 200em;\n margin-left: 2em;\n }\n\n .cw-group-operator {\n color: $text-emphasis;\n background-color: $background-primary;\n opacity: 50;\n height: 1.25em;\n width: 4em;\n vertical-align: middle;\n div {\n margin-top: -0.5em;\n }\n &.ui.button:hover {\n background-color: $background-primary !important;\n }\n }\n }\n\n .cw-last {\n margin-right: 0;\n }\n\n .ui.basic.button.cw-button-toggle-operator {\n width: 100%;\n margin: 0;\n }\n\n .cw-rule-actions,\n .cw-conditions {\n padding: 0.5em 2em 0 2em;\n\n .cw-entry {\n > div.buttons {\n width: 100%;\n }\n }\n .cw-btn-group {\n .ui.basic.buttons {\n border: none;\n }\n }\n\n .cw-add-btn {\n min-width: 39px;\n height: 36px;\n }\n\n .cw-delete-btn {\n margin-right: 0.5em;\n }\n\n .trash {\n color: $warn;\n }\n }\n\n .cw-button-add-item i {\n color: $brand-primary-one;\n }\n\n .cw-spacer.cw-condition-operator {\n width: 4em;\n }\n\n .cw-spacer.cw-add-condition {\n width: 2.25em;\n }\n\n .basic button.ui.cw-button-add-item:hover {\n font-weight: bolder;\n }\n\n .cw-condition-toggle {\n min-width: 5em;\n max-width: 5em;\n margin-right: 1em;\n\n button {\n padding: 0.75em 0;\n width: 100%;\n }\n }\n\n .cw-condition-buttons {\n width: 3em;\n max-width: 3em;\n }\n\n .cw-name-field {\n margin: 0.5em 2em 0.5em 2em;\n }\n\n .cw-spacer {\n &.cw-4em {\n width: 4em;\n }\n\n &.cw-3em {\n width: 3em;\n }\n &.cw-2em {\n width: 2em;\n }\n }\n\n .ui.modal.cw-modal-dialog2 {\n display: block;\n margin: -103px 0 0 -200px;\n height: 600px;\n width: 400px;\n }\n\n .ui.modal.cw-modal-dialog {\n display: block;\n position: absolute;\n margin-left: auto;\n margin-right: auto;\n top: 50%;\n left: 50%;\n @include transform(translate(-50%, -50%));\n }\n\n .cw-modal-dialog .cw-dialog-body {\n height: 100%;\n width: 100%;\n }\n\n .cw-visitors-location {\n .cw-latLong .ui.input input,\n .cw-radius .ui.input input {\n text-align: right;\n color: lightgray;\n }\n }\n\n cw-modal-dialog .ui.dimmer {\n background-color: rgba(0, 0, 0, 0.55);\n }\n\n .cw-rule-engine__empty {\n margin-top: 7em;\n text-align: center;\n\n i {\n font-size: 120px;\n color: $gray-light;\n border: 7px solid;\n border-radius: 10px;\n margin-bottom: $spacing-4;\n }\n\n h2 {\n font-size: $font-size-xx-large;\n margin: 0;\n color: $gray;\n }\n\n span {\n display: block;\n }\n\n button {\n margin-top: $spacing-3;\n }\n }\n\n .dot-icon-button {\n border-radius: 50%;\n height: $action-button-height;\n width: $action-button-height;\n display: inline-flex;\n justify-content: center;\n border: none;\n background-color: $brand-primary;\n box-shadow: $md-shadow-1;\n outline: none;\n align-items: center;\n\n &:hover {\n background: $brand-primary_mod;\n box-shadow: $md-shadow-3;\n }\n\n &:active,\n &:focus {\n background: $brand-primary_mod;\n }\n\n i {\n color: $white;\n font-size: $font-size-x-large;\n }\n }\n}\n", + "styleUrl": "./styles/rule-engine.scss" + }, + { + "data": "/*!\n * Angular Material Design\n * https://github.com/angular/material\n * @license MIT\n * v1.0.2\n */\n/*\n*\n* Responsive attributes\n*\n* References:\n* 1) https://scotch.io/tutorials/a-visual-guide-to-css3-flexbox-properties#flex\n* 2) https://css-tricks.com/almanac/properties/f/flex/\n* 3) https://css-tricks.com/snippets/css/a-guide-to-flexbox/\n* 4) https://github.com/philipwalton/flexbugs#3-min-height-on-a-flex-container-wont-apply-to-its-flex-items\n* 5) http://godban.com.ua/projects/flexgrid\n*\n*/\n@-moz-document url-prefix() {\n [layout-fill] {\n margin: 0;\n width: 100%;\n min-height: 100%;\n height: 100%;\n }\n}\n\n/*\n * Apply Mixins to create Layout/Flexbox styles\n *\n */\n[flex-order] {\n -webkit-order: 0;\n -ms-flex-order: 0;\n order: 0;\n}\n\n[flex-order=\"-20\"] {\n -webkit-order: -20;\n -ms-flex-order: -20;\n order: -20;\n}\n\n[flex-order=\"-19\"] {\n -webkit-order: -19;\n -ms-flex-order: -19;\n order: -19;\n}\n\n[flex-order=\"-18\"] {\n -webkit-order: -18;\n -ms-flex-order: -18;\n order: -18;\n}\n\n[flex-order=\"-17\"] {\n -webkit-order: -17;\n -ms-flex-order: -17;\n order: -17;\n}\n\n[flex-order=\"-16\"] {\n -webkit-order: -16;\n -ms-flex-order: -16;\n order: -16;\n}\n\n[flex-order=\"-15\"] {\n -webkit-order: -15;\n -ms-flex-order: -15;\n order: -15;\n}\n\n[flex-order=\"-14\"] {\n -webkit-order: -14;\n -ms-flex-order: -14;\n order: -14;\n}\n\n[flex-order=\"-13\"] {\n -webkit-order: -13;\n -ms-flex-order: -13;\n order: -13;\n}\n\n[flex-order=\"-12\"] {\n -webkit-order: -12;\n -ms-flex-order: -12;\n order: -12;\n}\n\n[flex-order=\"-11\"] {\n -webkit-order: -11;\n -ms-flex-order: -11;\n order: -11;\n}\n\n[flex-order=\"-10\"] {\n -webkit-order: -10;\n -ms-flex-order: -10;\n order: -10;\n}\n\n[flex-order=\"-9\"] {\n -webkit-order: -9;\n -ms-flex-order: -9;\n order: -9;\n}\n\n[flex-order=\"-8\"] {\n -webkit-order: -8;\n -ms-flex-order: -8;\n order: -8;\n}\n\n[flex-order=\"-7\"] {\n -webkit-order: -7;\n -ms-flex-order: -7;\n order: -7;\n}\n\n[flex-order=\"-6\"] {\n -webkit-order: -6;\n -ms-flex-order: -6;\n order: -6;\n}\n\n[flex-order=\"-5\"] {\n -webkit-order: -5;\n -ms-flex-order: -5;\n order: -5;\n}\n\n[flex-order=\"-4\"] {\n -webkit-order: -4;\n -ms-flex-order: -4;\n order: -4;\n}\n\n[flex-order=\"-3\"] {\n -webkit-order: -3;\n -ms-flex-order: -3;\n order: -3;\n}\n\n[flex-order=\"-2\"] {\n -webkit-order: -2;\n -ms-flex-order: -2;\n order: -2;\n}\n\n[flex-order=\"-1\"] {\n -webkit-order: -1;\n -ms-flex-order: -1;\n order: -1;\n}\n\n[flex-order=\"0\"] {\n -webkit-order: 0;\n -ms-flex-order: 0;\n order: 0;\n}\n\n[flex-order=\"1\"] {\n -webkit-order: 1;\n -ms-flex-order: 1;\n order: 1;\n}\n\n[flex-order=\"2\"] {\n -webkit-order: 2;\n -ms-flex-order: 2;\n order: 2;\n}\n\n[flex-order=\"3\"] {\n -webkit-order: 3;\n -ms-flex-order: 3;\n order: 3;\n}\n\n[flex-order=\"4\"] {\n -webkit-order: 4;\n -ms-flex-order: 4;\n order: 4;\n}\n\n[flex-order=\"5\"] {\n -webkit-order: 5;\n -ms-flex-order: 5;\n order: 5;\n}\n\n[flex-order=\"6\"] {\n -webkit-order: 6;\n -ms-flex-order: 6;\n order: 6;\n}\n\n[flex-order=\"7\"] {\n -webkit-order: 7;\n -ms-flex-order: 7;\n order: 7;\n}\n\n[flex-order=\"8\"] {\n -webkit-order: 8;\n -ms-flex-order: 8;\n order: 8;\n}\n\n[flex-order=\"9\"] {\n -webkit-order: 9;\n -ms-flex-order: 9;\n order: 9;\n}\n\n[flex-order=\"10\"] {\n -webkit-order: 10;\n -ms-flex-order: 10;\n order: 10;\n}\n\n[flex-order=\"11\"] {\n -webkit-order: 11;\n -ms-flex-order: 11;\n order: 11;\n}\n\n[flex-order=\"12\"] {\n -webkit-order: 12;\n -ms-flex-order: 12;\n order: 12;\n}\n\n[flex-order=\"13\"] {\n -webkit-order: 13;\n -ms-flex-order: 13;\n order: 13;\n}\n\n[flex-order=\"14\"] {\n -webkit-order: 14;\n -ms-flex-order: 14;\n order: 14;\n}\n\n[flex-order=\"15\"] {\n -webkit-order: 15;\n -ms-flex-order: 15;\n order: 15;\n}\n\n[flex-order=\"16\"] {\n -webkit-order: 16;\n -ms-flex-order: 16;\n order: 16;\n}\n\n[flex-order=\"17\"] {\n -webkit-order: 17;\n -ms-flex-order: 17;\n order: 17;\n}\n\n[flex-order=\"18\"] {\n -webkit-order: 18;\n -ms-flex-order: 18;\n order: 18;\n}\n\n[flex-order=\"19\"] {\n -webkit-order: 19;\n -ms-flex-order: 19;\n order: 19;\n}\n\n[flex-order=\"20\"] {\n -webkit-order: 20;\n -ms-flex-order: 20;\n order: 20;\n}\n\n[flex-offset=\"0\"] {\n margin-left: 0%;\n}\n\n[flex-offset=\"5\"] {\n margin-left: 5%;\n}\n\n[flex-offset=\"10\"] {\n margin-left: 10%;\n}\n\n[flex-offset=\"15\"] {\n margin-left: 15%;\n}\n\n[flex-offset=\"20\"] {\n margin-left: 20%;\n}\n\n[flex-offset=\"25\"] {\n margin-left: 25%;\n}\n\n[flex-offset=\"30\"] {\n margin-left: 30%;\n}\n\n[flex-offset=\"35\"] {\n margin-left: 35%;\n}\n\n[flex-offset=\"40\"] {\n margin-left: 40%;\n}\n\n[flex-offset=\"45\"] {\n margin-left: 45%;\n}\n\n[flex-offset=\"50\"] {\n margin-left: 50%;\n}\n\n[flex-offset=\"55\"] {\n margin-left: 55%;\n}\n\n[flex-offset=\"60\"] {\n margin-left: 60%;\n}\n\n[flex-offset=\"65\"] {\n margin-left: 65%;\n}\n\n[flex-offset=\"70\"] {\n margin-left: 70%;\n}\n\n[flex-offset=\"75\"] {\n margin-left: 75%;\n}\n\n[flex-offset=\"80\"] {\n margin-left: 80%;\n}\n\n[flex-offset=\"85\"] {\n margin-left: 85%;\n}\n\n[flex-offset=\"90\"] {\n margin-left: 90%;\n}\n\n[flex-offset=\"95\"] {\n margin-left: 95%;\n}\n\n[flex-offset=\"33\"] {\n margin-left: calc(100% / 3);\n}\n\n[flex-offset=\"66\"] {\n margin-left: calc(200% / 3);\n}\n\n[layout-align] {\n -webkit-justify-content: flex-start;\n -ms-flex-pack: start;\n justify-content: flex-start;\n -webkit-align-content: stretch;\n -ms-flex-line-pack: stretch;\n align-content: stretch;\n -webkit-align-items: stretch;\n -ms-flex-align: stretch;\n align-items: stretch;\n}\n\n[layout-align=\"start\"],\n[layout-align=\"start start\"],\n[layout-align=\"start center\"],\n[layout-align=\"start end\"],\n[layout-align=\"start stretch\"] {\n -webkit-justify-content: start;\n -ms-flex-pack: start;\n justify-content: start;\n}\n\n[layout-align=\"center\"],\n[layout-align=\"center start\"],\n[layout-align=\"center center\"],\n[layout-align=\"center end\"],\n[layout-align=\"center stretch\"] {\n -webkit-justify-content: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n[layout-align=\"end\"],\n[layout-align=\"end center\"],\n[layout-align=\"end start\"],\n[layout-align=\"end end\"],\n[layout-align=\"end stretch\"] {\n -webkit-justify-content: flex-end;\n -ms-flex-pack: end;\n justify-content: flex-end;\n}\n\n[layout-align=\"space-around\"],\n[layout-align=\"space-around center\"],\n[layout-align=\"space-around start\"],\n[layout-align=\"space-around end\"],\n[layout-align=\"space-around stretch\"] {\n -webkit-justify-content: space-around;\n -ms-flex-pack: distribute;\n justify-content: space-around;\n}\n\n[layout-align=\"space-between\"],\n[layout-align=\"space-between center\"],\n[layout-align=\"space-between start\"],\n[layout-align=\"space-between end\"],\n[layout-align=\"space-between stretch\"] {\n -webkit-justify-content: space-between;\n -ms-flex-pack: justify;\n justify-content: space-between;\n}\n\n[layout-align=\"start start\"],\n[layout-align=\"center start\"],\n[layout-align=\"end start\"],\n[layout-align=\"space-between start\"],\n[layout-align=\"space-around start\"] {\n -webkit-align-items: flex-start;\n -ms-flex-align: start;\n align-items: flex-start;\n -webkit-align-content: flex-start;\n -ms-flex-line-pack: start;\n align-content: flex-start;\n}\n\n[layout-align=\"start center\"],\n[layout-align=\"center center\"],\n[layout-align=\"end center\"],\n[layout-align=\"space-between center\"],\n[layout-align=\"space-around center\"] {\n -webkit-align-items: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-align-content: center;\n -ms-flex-line-pack: center;\n align-content: center;\n max-width: 100%;\n}\n\n[layout-align=\"start center\"] > *,\n[layout-align=\"center center\"] > *,\n[layout-align=\"end center\"] > *,\n[layout-align=\"space-between center\"] > *,\n[layout-align=\"space-around center\"] > * {\n max-width: 100%;\n box-sizing: border-box;\n}\n\n[layout-align=\"start end\"],\n[layout-align=\"center end\"],\n[layout-align=\"end end\"],\n[layout-align=\"space-between end\"],\n[layout-align=\"space-around end\"] {\n -webkit-align-items: flex-end;\n -ms-flex-align: end;\n align-items: flex-end;\n -webkit-align-content: flex-end;\n -ms-flex-line-pack: end;\n align-content: flex-end;\n}\n\n[layout-align=\"start stretch\"],\n[layout-align=\"center stretch\"],\n[layout-align=\"end stretch\"],\n[layout-align=\"space-between stretch\"],\n[layout-align=\"space-around stretch\"] {\n -webkit-align-items: stretch;\n -ms-flex-align: stretch;\n align-items: stretch;\n -webkit-align-content: stretch;\n -ms-flex-line-pack: stretch;\n align-content: stretch;\n}\n\n[flex] {\n -webkit-flex: 1;\n -ms-flex: 1;\n flex: 1;\n box-sizing: border-box;\n}\n\n@media screen {\n [flex] {\n -webkit-flex: 1 1 0%;\n -ms-flex: 1 1 0%;\n flex: 1 1 0%;\n }\n}\n\n[flex-grow] {\n -webkit-flex: 1 1 100%;\n -ms-flex: 1 1 100%;\n flex: 1 1 100%;\n box-sizing: border-box;\n}\n\n[flex-initial] {\n -webkit-flex: 0 1 auto;\n -ms-flex: 0 1 auto;\n flex: 0 1 auto;\n box-sizing: border-box;\n}\n\n[flex-auto] {\n -webkit-flex: 1 1 auto;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n box-sizing: border-box;\n}\n\n[flex-none] {\n -webkit-flex: 0 0 auto;\n -ms-flex: 0 0 auto;\n flex: 0 0 auto;\n box-sizing: border-box;\n}\n\n[flex=\"0\"] {\n -webkit-flex: 1 1 0%;\n -ms-flex: 1 1 0%;\n flex: 1 1 0%;\n max-width: 0%;\n max-height: 100%;\n box-sizing: border-box;\n}\n\n[layout=\"row\"] > [flex=\"0\"],\n[layout=\"row\"] > [flex=\"0\"] {\n -webkit-flex: 1 1 0%;\n -ms-flex: 1 1 0%;\n flex: 1 1 0%;\n max-width: 0%;\n max-height: 100%;\n box-sizing: border-box;\n}\n\n[layout=\"column\"] > [flex=\"0\"],\n[layout=\"column\"] > [flex=\"0\"] {\n -webkit-flex: 1 1 0%;\n -ms-flex: 1 1 0%;\n flex: 1 1 0%;\n max-width: 100%;\n max-height: 0%;\n box-sizing: border-box;\n}\n\n[flex=\"5\"] {\n -webkit-flex: 1 1 5%;\n -ms-flex: 1 1 5%;\n flex: 1 1 5%;\n max-width: 5%;\n max-height: 100%;\n box-sizing: border-box;\n}\n\n[layout=\"row\"] > [flex=\"5\"],\n[layout=\"row\"] > [flex=\"5\"] {\n -webkit-flex: 1 1 5%;\n -ms-flex: 1 1 5%;\n flex: 1 1 5%;\n max-width: 5%;\n max-height: 100%;\n box-sizing: border-box;\n}\n\n[layout=\"column\"] > [flex=\"5\"],\n[layout=\"column\"] > [flex=\"5\"] {\n -webkit-flex: 1 1 5%;\n -ms-flex: 1 1 5%;\n flex: 1 1 5%;\n max-width: 100%;\n max-height: 5%;\n box-sizing: border-box;\n}\n\n[flex=\"10\"] {\n -webkit-flex: 1 1 10%;\n -ms-flex: 1 1 10%;\n flex: 1 1 10%;\n max-width: 10%;\n max-height: 100%;\n box-sizing: border-box;\n}\n\n[layout=\"row\"] > [flex=\"10\"],\n[layout=\"row\"] > [flex=\"10\"] {\n -webkit-flex: 1 1 10%;\n -ms-flex: 1 1 10%;\n flex: 1 1 10%;\n max-width: 10%;\n max-height: 100%;\n box-sizing: border-box;\n}\n\n[layout=\"column\"] > [flex=\"10\"],\n[layout=\"column\"] > [flex=\"10\"] {\n -webkit-flex: 1 1 10%;\n -ms-flex: 1 1 10%;\n flex: 1 1 10%;\n max-width: 100%;\n max-height: 10%;\n box-sizing: border-box;\n}\n\n[flex=\"15\"] {\n -webkit-flex: 1 1 15%;\n -ms-flex: 1 1 15%;\n flex: 1 1 15%;\n max-width: 15%;\n max-height: 100%;\n box-sizing: border-box;\n}\n\n[layout=\"row\"] > [flex=\"15\"],\n[layout=\"row\"] > [flex=\"15\"] {\n -webkit-flex: 1 1 15%;\n -ms-flex: 1 1 15%;\n flex: 1 1 15%;\n max-width: 15%;\n max-height: 100%;\n box-sizing: border-box;\n}\n\n[layout=\"column\"] > [flex=\"15\"],\n[layout=\"column\"] > [flex=\"15\"] {\n -webkit-flex: 1 1 15%;\n -ms-flex: 1 1 15%;\n flex: 1 1 15%;\n max-width: 100%;\n max-height: 15%;\n box-sizing: border-box;\n}\n\n[flex=\"20\"] {\n -webkit-flex: 1 1 20%;\n -ms-flex: 1 1 20%;\n flex: 1 1 20%;\n max-width: 20%;\n max-height: 100%;\n box-sizing: border-box;\n}\n\n[layout=\"row\"] > [flex=\"20\"],\n[layout=\"row\"] > [flex=\"20\"] {\n -webkit-flex: 1 1 20%;\n -ms-flex: 1 1 20%;\n flex: 1 1 20%;\n max-width: 20%;\n max-height: 100%;\n box-sizing: border-box;\n}\n\n[layout=\"column\"] > [flex=\"20\"],\n[layout=\"column\"] > [flex=\"20\"] {\n -webkit-flex: 1 1 20%;\n -ms-flex: 1 1 20%;\n flex: 1 1 20%;\n max-width: 100%;\n max-height: 20%;\n box-sizing: border-box;\n}\n\n[flex=\"25\"] {\n -webkit-flex: 1 1 25%;\n -ms-flex: 1 1 25%;\n flex: 1 1 25%;\n max-width: 25%;\n max-height: 100%;\n box-sizing: border-box;\n}\n\n[layout=\"row\"] > [flex=\"25\"],\n[layout=\"row\"] > [flex=\"25\"] {\n -webkit-flex: 1 1 25%;\n -ms-flex: 1 1 25%;\n flex: 1 1 25%;\n max-width: 25%;\n max-height: 100%;\n box-sizing: border-box;\n}\n\n[layout=\"column\"] > [flex=\"25\"],\n[layout=\"column\"] > [flex=\"25\"] {\n -webkit-flex: 1 1 25%;\n -ms-flex: 1 1 25%;\n flex: 1 1 25%;\n max-width: 100%;\n max-height: 25%;\n box-sizing: border-box;\n}\n\n[flex=\"30\"] {\n -webkit-flex: 1 1 30%;\n -ms-flex: 1 1 30%;\n flex: 1 1 30%;\n max-width: 30%;\n max-height: 100%;\n box-sizing: border-box;\n}\n\n[layout=\"row\"] > [flex=\"30\"],\n[layout=\"row\"] > [flex=\"30\"] {\n -webkit-flex: 1 1 30%;\n -ms-flex: 1 1 30%;\n flex: 1 1 30%;\n max-width: 30%;\n max-height: 100%;\n box-sizing: border-box;\n}\n\n[layout=\"column\"] > [flex=\"30\"],\n[layout=\"column\"] > [flex=\"30\"] {\n -webkit-flex: 1 1 30%;\n -ms-flex: 1 1 30%;\n flex: 1 1 30%;\n max-width: 100%;\n max-height: 30%;\n box-sizing: border-box;\n}\n\n[flex=\"35\"] {\n -webkit-flex: 1 1 35%;\n -ms-flex: 1 1 35%;\n flex: 1 1 35%;\n max-width: 35%;\n max-height: 100%;\n box-sizing: border-box;\n}\n\n[layout=\"row\"] > [flex=\"35\"],\n[layout=\"row\"] > [flex=\"35\"] {\n -webkit-flex: 1 1 35%;\n -ms-flex: 1 1 35%;\n flex: 1 1 35%;\n max-width: 35%;\n max-height: 100%;\n box-sizing: border-box;\n}\n\n[layout=\"column\"] > [flex=\"35\"],\n[layout=\"column\"] > [flex=\"35\"] {\n -webkit-flex: 1 1 35%;\n -ms-flex: 1 1 35%;\n flex: 1 1 35%;\n max-width: 100%;\n max-height: 35%;\n box-sizing: border-box;\n}\n\n[flex=\"40\"] {\n -webkit-flex: 1 1 40%;\n -ms-flex: 1 1 40%;\n flex: 1 1 40%;\n max-width: 40%;\n max-height: 100%;\n box-sizing: border-box;\n}\n\n[layout=\"row\"] > [flex=\"40\"],\n[layout=\"row\"] > [flex=\"40\"] {\n -webkit-flex: 1 1 40%;\n -ms-flex: 1 1 40%;\n flex: 1 1 40%;\n max-width: 40%;\n max-height: 100%;\n box-sizing: border-box;\n}\n\n[layout=\"column\"] > [flex=\"40\"],\n[layout=\"column\"] > [flex=\"40\"] {\n -webkit-flex: 1 1 40%;\n -ms-flex: 1 1 40%;\n flex: 1 1 40%;\n max-width: 100%;\n max-height: 40%;\n box-sizing: border-box;\n}\n\n[flex=\"45\"] {\n -webkit-flex: 1 1 45%;\n -ms-flex: 1 1 45%;\n flex: 1 1 45%;\n max-width: 45%;\n max-height: 100%;\n box-sizing: border-box;\n}\n\n[layout=\"row\"] > [flex=\"45\"],\n[layout=\"row\"] > [flex=\"45\"] {\n -webkit-flex: 1 1 45%;\n -ms-flex: 1 1 45%;\n flex: 1 1 45%;\n max-width: 45%;\n max-height: 100%;\n box-sizing: border-box;\n}\n\n[layout=\"column\"] > [flex=\"45\"],\n[layout=\"column\"] > [flex=\"45\"] {\n -webkit-flex: 1 1 45%;\n -ms-flex: 1 1 45%;\n flex: 1 1 45%;\n max-width: 100%;\n max-height: 45%;\n box-sizing: border-box;\n}\n\n[flex=\"50\"] {\n -webkit-flex: 1 1 50%;\n -ms-flex: 1 1 50%;\n flex: 1 1 50%;\n max-width: 50%;\n max-height: 100%;\n box-sizing: border-box;\n}\n\n[layout=\"row\"] > [flex=\"50\"],\n[layout=\"row\"] > [flex=\"50\"] {\n -webkit-flex: 1 1 50%;\n -ms-flex: 1 1 50%;\n flex: 1 1 50%;\n max-width: 50%;\n max-height: 100%;\n box-sizing: border-box;\n}\n\n[layout=\"column\"] > [flex=\"50\"],\n[layout=\"column\"] > [flex=\"50\"] {\n -webkit-flex: 1 1 50%;\n -ms-flex: 1 1 50%;\n flex: 1 1 50%;\n max-width: 100%;\n max-height: 50%;\n box-sizing: border-box;\n}\n\n[flex=\"55\"] {\n -webkit-flex: 1 1 55%;\n -ms-flex: 1 1 55%;\n flex: 1 1 55%;\n max-width: 55%;\n max-height: 100%;\n box-sizing: border-box;\n}\n\n[layout=\"row\"] > [flex=\"55\"],\n[layout=\"row\"] > [flex=\"55\"] {\n -webkit-flex: 1 1 55%;\n -ms-flex: 1 1 55%;\n flex: 1 1 55%;\n max-width: 55%;\n max-height: 100%;\n box-sizing: border-box;\n}\n\n[layout=\"column\"] > [flex=\"55\"],\n[layout=\"column\"] > [flex=\"55\"] {\n -webkit-flex: 1 1 55%;\n -ms-flex: 1 1 55%;\n flex: 1 1 55%;\n max-width: 100%;\n max-height: 55%;\n box-sizing: border-box;\n}\n\n[flex=\"60\"] {\n -webkit-flex: 1 1 60%;\n -ms-flex: 1 1 60%;\n flex: 1 1 60%;\n max-width: 60%;\n max-height: 100%;\n box-sizing: border-box;\n}\n\n[layout=\"row\"] > [flex=\"60\"],\n[layout=\"row\"] > [flex=\"60\"] {\n -webkit-flex: 1 1 60%;\n -ms-flex: 1 1 60%;\n flex: 1 1 60%;\n max-width: 60%;\n max-height: 100%;\n box-sizing: border-box;\n}\n\n[layout=\"column\"] > [flex=\"60\"],\n[layout=\"column\"] > [flex=\"60\"] {\n -webkit-flex: 1 1 60%;\n -ms-flex: 1 1 60%;\n flex: 1 1 60%;\n max-width: 100%;\n max-height: 60%;\n box-sizing: border-box;\n}\n\n[flex=\"65\"] {\n -webkit-flex: 1 1 65%;\n -ms-flex: 1 1 65%;\n flex: 1 1 65%;\n max-width: 65%;\n max-height: 100%;\n box-sizing: border-box;\n}\n\n[layout=\"row\"] > [flex=\"65\"],\n[layout=\"row\"] > [flex=\"65\"] {\n -webkit-flex: 1 1 65%;\n -ms-flex: 1 1 65%;\n flex: 1 1 65%;\n max-width: 65%;\n max-height: 100%;\n box-sizing: border-box;\n}\n\n[layout=\"column\"] > [flex=\"65\"],\n[layout=\"column\"] > [flex=\"65\"] {\n -webkit-flex: 1 1 65%;\n -ms-flex: 1 1 65%;\n flex: 1 1 65%;\n max-width: 100%;\n max-height: 65%;\n box-sizing: border-box;\n}\n\n[flex=\"70\"] {\n -webkit-flex: 1 1 70%;\n -ms-flex: 1 1 70%;\n flex: 1 1 70%;\n max-width: 70%;\n max-height: 100%;\n box-sizing: border-box;\n}\n\n[layout=\"row\"] > [flex=\"70\"],\n[layout=\"row\"] > [flex=\"70\"] {\n -webkit-flex: 1 1 70%;\n -ms-flex: 1 1 70%;\n flex: 1 1 70%;\n max-width: 70%;\n max-height: 100%;\n box-sizing: border-box;\n}\n\n[layout=\"column\"] > [flex=\"70\"],\n[layout=\"column\"] > [flex=\"70\"] {\n -webkit-flex: 1 1 70%;\n -ms-flex: 1 1 70%;\n flex: 1 1 70%;\n max-width: 100%;\n max-height: 70%;\n box-sizing: border-box;\n}\n\n[flex=\"75\"] {\n -webkit-flex: 1 1 75%;\n -ms-flex: 1 1 75%;\n flex: 1 1 75%;\n max-width: 75%;\n max-height: 100%;\n box-sizing: border-box;\n}\n\n[layout=\"row\"] > [flex=\"75\"],\n[layout=\"row\"] > [flex=\"75\"] {\n -webkit-flex: 1 1 75%;\n -ms-flex: 1 1 75%;\n flex: 1 1 75%;\n max-width: 75%;\n max-height: 100%;\n box-sizing: border-box;\n}\n\n[layout=\"column\"] > [flex=\"75\"],\n[layout=\"column\"] > [flex=\"75\"] {\n -webkit-flex: 1 1 75%;\n -ms-flex: 1 1 75%;\n flex: 1 1 75%;\n max-width: 100%;\n max-height: 75%;\n box-sizing: border-box;\n}\n\n[flex=\"80\"] {\n -webkit-flex: 1 1 80%;\n -ms-flex: 1 1 80%;\n flex: 1 1 80%;\n max-width: 80%;\n max-height: 100%;\n box-sizing: border-box;\n}\n\n[layout=\"row\"] > [flex=\"80\"],\n[layout=\"row\"] > [flex=\"80\"] {\n -webkit-flex: 1 1 80%;\n -ms-flex: 1 1 80%;\n flex: 1 1 80%;\n max-width: 80%;\n max-height: 100%;\n box-sizing: border-box;\n}\n\n[layout=\"column\"] > [flex=\"80\"],\n[layout=\"column\"] > [flex=\"80\"] {\n -webkit-flex: 1 1 80%;\n -ms-flex: 1 1 80%;\n flex: 1 1 80%;\n max-width: 100%;\n max-height: 80%;\n box-sizing: border-box;\n}\n\n[flex=\"85\"] {\n -webkit-flex: 1 1 85%;\n -ms-flex: 1 1 85%;\n flex: 1 1 85%;\n max-width: 85%;\n max-height: 100%;\n box-sizing: border-box;\n}\n\n[layout=\"row\"] > [flex=\"85\"],\n[layout=\"row\"] > [flex=\"85\"] {\n -webkit-flex: 1 1 85%;\n -ms-flex: 1 1 85%;\n flex: 1 1 85%;\n max-width: 85%;\n max-height: 100%;\n box-sizing: border-box;\n}\n\n[layout=\"column\"] > [flex=\"85\"],\n[layout=\"column\"] > [flex=\"85\"] {\n -webkit-flex: 1 1 85%;\n -ms-flex: 1 1 85%;\n flex: 1 1 85%;\n max-width: 100%;\n max-height: 85%;\n box-sizing: border-box;\n}\n\n[flex=\"90\"] {\n -webkit-flex: 1 1 90%;\n -ms-flex: 1 1 90%;\n flex: 1 1 90%;\n max-width: 90%;\n max-height: 100%;\n box-sizing: border-box;\n}\n\n[layout=\"row\"] > [flex=\"90\"],\n[layout=\"row\"] > [flex=\"90\"] {\n -webkit-flex: 1 1 90%;\n -ms-flex: 1 1 90%;\n flex: 1 1 90%;\n max-width: 90%;\n max-height: 100%;\n box-sizing: border-box;\n}\n\n[layout=\"column\"] > [flex=\"90\"],\n[layout=\"column\"] > [flex=\"90\"] {\n -webkit-flex: 1 1 90%;\n -ms-flex: 1 1 90%;\n flex: 1 1 90%;\n max-width: 100%;\n max-height: 90%;\n box-sizing: border-box;\n}\n\n[flex=\"95\"] {\n -webkit-flex: 1 1 95%;\n -ms-flex: 1 1 95%;\n flex: 1 1 95%;\n max-width: 95%;\n max-height: 100%;\n box-sizing: border-box;\n}\n\n[layout=\"row\"] > [flex=\"95\"],\n[layout=\"row\"] > [flex=\"95\"] {\n -webkit-flex: 1 1 95%;\n -ms-flex: 1 1 95%;\n flex: 1 1 95%;\n max-width: 95%;\n max-height: 100%;\n box-sizing: border-box;\n}\n\n[layout=\"column\"] > [flex=\"95\"],\n[layout=\"column\"] > [flex=\"95\"] {\n -webkit-flex: 1 1 95%;\n -ms-flex: 1 1 95%;\n flex: 1 1 95%;\n max-width: 100%;\n max-height: 95%;\n box-sizing: border-box;\n}\n\n[flex=\"100\"] {\n -webkit-flex: 1 1 100%;\n -ms-flex: 1 1 100%;\n flex: 1 1 100%;\n max-width: 100%;\n max-height: 100%;\n box-sizing: border-box;\n}\n\n[layout=\"row\"] > [flex=\"100\"],\n[layout=\"row\"] > [flex=\"100\"] {\n -webkit-flex: 1 1 100%;\n -ms-flex: 1 1 100%;\n flex: 1 1 100%;\n max-width: 100%;\n max-height: 100%;\n box-sizing: border-box;\n}\n\n[layout=\"column\"] > [flex=\"100\"],\n[layout=\"column\"] > [flex=\"100\"] {\n -webkit-flex: 1 1 100%;\n -ms-flex: 1 1 100%;\n flex: 1 1 100%;\n max-width: 100%;\n max-height: 100%;\n box-sizing: border-box;\n}\n\n[layout=\"row\"] > [flex=\"33\"],\n[layout=\"row\"] > [flex=\"33\"],\n[layout=\"row\"] > [flex=\"33\"],\n[layout=\"row\"] > [flex=\"33\"] {\n -webkit-flex: 1 1 33%;\n -ms-flex: 1 1 33%;\n flex: 1 1 33%;\n max-width: calc(100% / 3);\n max-height: 100%;\n box-sizing: border-box;\n}\n\n[layout=\"row\"] > [flex=\"34\"],\n[layout=\"row\"] > [flex=\"34\"],\n[layout=\"row\"] > [flex=\"34\"],\n[layout=\"row\"] > [flex=\"34\"] {\n -webkit-flex: 1 1 34%;\n -ms-flex: 1 1 34%;\n flex: 1 1 34%;\n max-width: 34%;\n max-height: 100%;\n box-sizing: border-box;\n}\n\n[layout=\"row\"] > [flex=\"66\"],\n[layout=\"row\"] > [flex=\"66\"],\n[layout=\"row\"] > [flex=\"66\"],\n[layout=\"row\"] > [flex=\"66\"] {\n -webkit-flex: 1 1 66%;\n -ms-flex: 1 1 66%;\n flex: 1 1 66%;\n max-width: calc(200% / 3);\n max-height: 100%;\n box-sizing: border-box;\n}\n\n[layout=\"row\"] > [flex=\"67\"],\n[layout=\"row\"] > [flex=\"67\"],\n[layout=\"row\"] > [flex=\"67\"],\n[layout=\"row\"] > [flex=\"67\"] {\n -webkit-flex: 1 1 67%;\n -ms-flex: 1 1 67%;\n flex: 1 1 67%;\n max-width: 67%;\n max-height: 100%;\n box-sizing: border-box;\n}\n\n[layout=\"column\"] > [flex=\"33\"],\n[layout=\"column\"] > [flex=\"33\"],\n[layout=\"column\"] > [flex=\"33\"],\n[layout=\"column\"] > [flex=\"33\"] {\n -webkit-flex: 1 1 33%;\n -ms-flex: 1 1 33%;\n flex: 1 1 33%;\n max-width: 100%;\n max-height: calc(100% / 3);\n box-sizing: border-box;\n}\n\n[layout=\"column\"] > [flex=\"34\"],\n[layout=\"column\"] > [flex=\"34\"],\n[layout=\"column\"] > [flex=\"34\"],\n[layout=\"column\"] > [flex=\"34\"] {\n -webkit-flex: 1 1 34%;\n -ms-flex: 1 1 34%;\n flex: 1 1 34%;\n max-width: 100%;\n max-height: 34%;\n box-sizing: border-box;\n}\n\n[layout=\"column\"] > [flex=\"66\"],\n[layout=\"column\"] > [flex=\"66\"],\n[layout=\"column\"] > [flex=\"66\"],\n[layout=\"column\"] > [flex=\"66\"] {\n -webkit-flex: 1 1 66%;\n -ms-flex: 1 1 66%;\n flex: 1 1 66%;\n max-width: 100%;\n max-height: calc(200% / 3);\n box-sizing: border-box;\n}\n\n[layout=\"column\"] > [flex=\"67\"],\n[layout=\"column\"] > [flex=\"67\"],\n[layout=\"column\"] > [flex=\"67\"],\n[layout=\"column\"] > [flex=\"67\"] {\n -webkit-flex: 1 1 67%;\n -ms-flex: 1 1 67%;\n flex: 1 1 67%;\n max-width: 100%;\n max-height: 67%;\n box-sizing: border-box;\n}\n\n[layout],\n[layout=\"column\"],\n[layout=\"row\"] {\n box-sizing: border-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n}\n\n[layout=\"column\"] {\n -webkit-flex-direction: column;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n\n[layout=\"row\"] {\n -webkit-flex-direction: row;\n -ms-flex-direction: row;\n flex-direction: row;\n}\n\n[layout-padding] > [flex-sm],\n[layout-padding] > [flex-lt-md] {\n padding: 4px;\n}\n\n[layout-padding],\n[layout-padding] > [flex],\n[layout-padding] > [flex-gt-sm],\n[layout-padding] > [flex-md],\n[layout-padding] > [flex-lt-lg] {\n padding: 8px;\n}\n\n[layout-padding] > [flex-gt-md],\n[layout-padding] > [flex-lg] {\n padding: 16px;\n}\n\n[layout-margin] > [flex-sm],\n[layout-margin] > [flex-lt-md] {\n margin: 4px;\n}\n\n[layout-margin],\n[layout-margin] > [flex],\n[layout-margin] > [flex-gt-sm],\n[layout-margin] > [flex-md],\n[layout-margin] > [flex-lt-lg] {\n margin: 8px;\n}\n\n[layout-margin] > [flex-gt-md],\n[layout-margin] > [flex-lg] {\n margin: 16px;\n}\n\n[layout-wrap] {\n -webkit-flex-wrap: wrap;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n}\n\n[layout-nowrap] {\n -webkit-flex-wrap: nowrap;\n -ms-flex-wrap: nowrap;\n flex-wrap: nowrap;\n}\n\n[layout-fill] {\n margin: 0;\n width: 100%;\n min-height: 100%;\n height: 100%;\n}\n\n/**\n * `hide-gt-sm show-gt-lg` should hide from 600px to 1200px\n * `show-md hide-gt-sm` should show from 0px to 960px and hide at >960px\n * `hide-gt-md show-gt-sm` should show everywhere (show overrides hide)`\n *\n * hide means hide everywhere\n * Sizes:\n * $layout-breakpoint-xs: 600px !default;\n * $layout-breakpoint-sm: 960px !default;\n * $layout-breakpoint-md: 1280px !default;\n * $layout-breakpoint-lg: 1920px !default;\n */\n@media (max-width: 599px) {\n [hide-xs]:not([show-xs]):not([show]),\n [hide]:not([show-xs]):not([show]) {\n display: none;\n }\n [flex-order-xs=\"-20\"] {\n -webkit-order: -20;\n -ms-flex-order: -20;\n order: -20;\n }\n [flex-order-xs=\"-19\"] {\n -webkit-order: -19;\n -ms-flex-order: -19;\n order: -19;\n }\n [flex-order-xs=\"-18\"] {\n -webkit-order: -18;\n -ms-flex-order: -18;\n order: -18;\n }\n [flex-order-xs=\"-17\"] {\n -webkit-order: -17;\n -ms-flex-order: -17;\n order: -17;\n }\n [flex-order-xs=\"-16\"] {\n -webkit-order: -16;\n -ms-flex-order: -16;\n order: -16;\n }\n [flex-order-xs=\"-15\"] {\n -webkit-order: -15;\n -ms-flex-order: -15;\n order: -15;\n }\n [flex-order-xs=\"-14\"] {\n -webkit-order: -14;\n -ms-flex-order: -14;\n order: -14;\n }\n [flex-order-xs=\"-13\"] {\n -webkit-order: -13;\n -ms-flex-order: -13;\n order: -13;\n }\n [flex-order-xs=\"-12\"] {\n -webkit-order: -12;\n -ms-flex-order: -12;\n order: -12;\n }\n [flex-order-xs=\"-11\"] {\n -webkit-order: -11;\n -ms-flex-order: -11;\n order: -11;\n }\n [flex-order-xs=\"-10\"] {\n -webkit-order: -10;\n -ms-flex-order: -10;\n order: -10;\n }\n [flex-order-xs=\"-9\"] {\n -webkit-order: -9;\n -ms-flex-order: -9;\n order: -9;\n }\n [flex-order-xs=\"-8\"] {\n -webkit-order: -8;\n -ms-flex-order: -8;\n order: -8;\n }\n [flex-order-xs=\"-7\"] {\n -webkit-order: -7;\n -ms-flex-order: -7;\n order: -7;\n }\n [flex-order-xs=\"-6\"] {\n -webkit-order: -6;\n -ms-flex-order: -6;\n order: -6;\n }\n [flex-order-xs=\"-5\"] {\n -webkit-order: -5;\n -ms-flex-order: -5;\n order: -5;\n }\n [flex-order-xs=\"-4\"] {\n -webkit-order: -4;\n -ms-flex-order: -4;\n order: -4;\n }\n [flex-order-xs=\"-3\"] {\n -webkit-order: -3;\n -ms-flex-order: -3;\n order: -3;\n }\n [flex-order-xs=\"-2\"] {\n -webkit-order: -2;\n -ms-flex-order: -2;\n order: -2;\n }\n [flex-order-xs=\"-1\"] {\n -webkit-order: -1;\n -ms-flex-order: -1;\n order: -1;\n }\n [flex-order-xs=\"0\"] {\n -webkit-order: 0;\n -ms-flex-order: 0;\n order: 0;\n }\n [flex-order-xs=\"1\"] {\n -webkit-order: 1;\n -ms-flex-order: 1;\n order: 1;\n }\n [flex-order-xs=\"2\"] {\n -webkit-order: 2;\n -ms-flex-order: 2;\n order: 2;\n }\n [flex-order-xs=\"3\"] {\n -webkit-order: 3;\n -ms-flex-order: 3;\n order: 3;\n }\n [flex-order-xs=\"4\"] {\n -webkit-order: 4;\n -ms-flex-order: 4;\n order: 4;\n }\n [flex-order-xs=\"5\"] {\n -webkit-order: 5;\n -ms-flex-order: 5;\n order: 5;\n }\n [flex-order-xs=\"6\"] {\n -webkit-order: 6;\n -ms-flex-order: 6;\n order: 6;\n }\n [flex-order-xs=\"7\"] {\n -webkit-order: 7;\n -ms-flex-order: 7;\n order: 7;\n }\n [flex-order-xs=\"8\"] {\n -webkit-order: 8;\n -ms-flex-order: 8;\n order: 8;\n }\n [flex-order-xs=\"9\"] {\n -webkit-order: 9;\n -ms-flex-order: 9;\n order: 9;\n }\n [flex-order-xs=\"10\"] {\n -webkit-order: 10;\n -ms-flex-order: 10;\n order: 10;\n }\n [flex-order-xs=\"11\"] {\n -webkit-order: 11;\n -ms-flex-order: 11;\n order: 11;\n }\n [flex-order-xs=\"12\"] {\n -webkit-order: 12;\n -ms-flex-order: 12;\n order: 12;\n }\n [flex-order-xs=\"13\"] {\n -webkit-order: 13;\n -ms-flex-order: 13;\n order: 13;\n }\n [flex-order-xs=\"14\"] {\n -webkit-order: 14;\n -ms-flex-order: 14;\n order: 14;\n }\n [flex-order-xs=\"15\"] {\n -webkit-order: 15;\n -ms-flex-order: 15;\n order: 15;\n }\n [flex-order-xs=\"16\"] {\n -webkit-order: 16;\n -ms-flex-order: 16;\n order: 16;\n }\n [flex-order-xs=\"17\"] {\n -webkit-order: 17;\n -ms-flex-order: 17;\n order: 17;\n }\n [flex-order-xs=\"18\"] {\n -webkit-order: 18;\n -ms-flex-order: 18;\n order: 18;\n }\n [flex-order-xs=\"19\"] {\n -webkit-order: 19;\n -ms-flex-order: 19;\n order: 19;\n }\n [flex-order-xs=\"20\"] {\n -webkit-order: 20;\n -ms-flex-order: 20;\n order: 20;\n }\n [flex-offset-xs=\"0\"] {\n margin-left: 0%;\n }\n [flex-offset-xs=\"5\"] {\n margin-left: 5%;\n }\n [flex-offset-xs=\"10\"] {\n margin-left: 10%;\n }\n [flex-offset-xs=\"15\"] {\n margin-left: 15%;\n }\n [flex-offset-xs=\"20\"] {\n margin-left: 20%;\n }\n [flex-offset-xs=\"25\"] {\n margin-left: 25%;\n }\n [flex-offset-xs=\"30\"] {\n margin-left: 30%;\n }\n [flex-offset-xs=\"35\"] {\n margin-left: 35%;\n }\n [flex-offset-xs=\"40\"] {\n margin-left: 40%;\n }\n [flex-offset-xs=\"45\"] {\n margin-left: 45%;\n }\n [flex-offset-xs=\"50\"] {\n margin-left: 50%;\n }\n [flex-offset-xs=\"55\"] {\n margin-left: 55%;\n }\n [flex-offset-xs=\"60\"] {\n margin-left: 60%;\n }\n [flex-offset-xs=\"65\"] {\n margin-left: 65%;\n }\n [flex-offset-xs=\"70\"] {\n margin-left: 70%;\n }\n [flex-offset-xs=\"75\"] {\n margin-left: 75%;\n }\n [flex-offset-xs=\"80\"] {\n margin-left: 80%;\n }\n [flex-offset-xs=\"85\"] {\n margin-left: 85%;\n }\n [flex-offset-xs=\"90\"] {\n margin-left: 90%;\n }\n [flex-offset-xs=\"95\"] {\n margin-left: 95%;\n }\n [flex-offset-xs=\"33\"] {\n margin-left: calc(100% / 3);\n }\n [flex-offset-xs=\"66\"] {\n margin-left: calc(200% / 3);\n }\n [layout-align-xs] {\n -webkit-justify-content: flex-start;\n -ms-flex-pack: start;\n justify-content: flex-start;\n -webkit-align-content: stretch;\n -ms-flex-line-pack: stretch;\n align-content: stretch;\n -webkit-align-items: stretch;\n -ms-flex-align: stretch;\n align-items: stretch;\n }\n [layout-align-xs=\"start\"],\n [layout-align-xs=\"start start\"],\n [layout-align-xs=\"start center\"],\n [layout-align-xs=\"start end\"],\n [layout-align-xs=\"start stretch\"] {\n -webkit-justify-content: start;\n -ms-flex-pack: start;\n justify-content: start;\n }\n [layout-align-xs=\"center\"],\n [layout-align-xs=\"center start\"],\n [layout-align-xs=\"center center\"],\n [layout-align-xs=\"center end\"],\n [layout-align-xs=\"center stretch\"] {\n -webkit-justify-content: center;\n -ms-flex-pack: center;\n justify-content: center;\n }\n [layout-align-xs=\"end\"],\n [layout-align-xs=\"end center\"],\n [layout-align-xs=\"end start\"],\n [layout-align-xs=\"end end\"],\n [layout-align-xs=\"end stretch\"] {\n -webkit-justify-content: flex-end;\n -ms-flex-pack: end;\n justify-content: flex-end;\n }\n [layout-align-xs=\"space-around\"],\n [layout-align-xs=\"space-around center\"],\n [layout-align-xs=\"space-around start\"],\n [layout-align-xs=\"space-around end\"],\n [layout-align-xs=\"space-around stretch\"] {\n -webkit-justify-content: space-around;\n -ms-flex-pack: distribute;\n justify-content: space-around;\n }\n [layout-align-xs=\"space-between\"],\n [layout-align-xs=\"space-between center\"],\n [layout-align-xs=\"space-between start\"],\n [layout-align-xs=\"space-between end\"],\n [layout-align-xs=\"space-between stretch\"] {\n -webkit-justify-content: space-between;\n -ms-flex-pack: justify;\n justify-content: space-between;\n }\n [layout-align-xs=\"start start\"],\n [layout-align-xs=\"center start\"],\n [layout-align-xs=\"end start\"],\n [layout-align-xs=\"space-between start\"],\n [layout-align-xs=\"space-around start\"] {\n -webkit-align-items: flex-start;\n -ms-flex-align: start;\n align-items: flex-start;\n -webkit-align-content: flex-start;\n -ms-flex-line-pack: start;\n align-content: flex-start;\n }\n [layout-align-xs=\"start center\"],\n [layout-align-xs=\"center center\"],\n [layout-align-xs=\"end center\"],\n [layout-align-xs=\"space-between center\"],\n [layout-align-xs=\"space-around center\"] {\n -webkit-align-items: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-align-content: center;\n -ms-flex-line-pack: center;\n align-content: center;\n max-width: 100%;\n }\n [layout-align-xs=\"start center\"] > *,\n [layout-align-xs=\"center center\"] > *,\n [layout-align-xs=\"end center\"] > *,\n [layout-align-xs=\"space-between center\"] > *,\n [layout-align-xs=\"space-around center\"] > * {\n max-width: 100%;\n box-sizing: border-box;\n }\n [layout-align-xs=\"start end\"],\n [layout-align-xs=\"center end\"],\n [layout-align-xs=\"end end\"],\n [layout-align-xs=\"space-between end\"],\n [layout-align-xs=\"space-around end\"] {\n -webkit-align-items: flex-end;\n -ms-flex-align: end;\n align-items: flex-end;\n -webkit-align-content: flex-end;\n -ms-flex-line-pack: end;\n align-content: flex-end;\n }\n [layout-align-xs=\"start stretch\"],\n [layout-align-xs=\"center stretch\"],\n [layout-align-xs=\"end stretch\"],\n [layout-align-xs=\"space-between stretch\"],\n [layout-align-xs=\"space-around stretch\"] {\n -webkit-align-items: stretch;\n -ms-flex-align: stretch;\n align-items: stretch;\n -webkit-align-content: stretch;\n -ms-flex-line-pack: stretch;\n align-content: stretch;\n }\n [flex-xs] {\n -webkit-flex: 1;\n -ms-flex: 1;\n flex: 1;\n box-sizing: border-box;\n }\n}\n\n@media screen and (max-width: 599px) {\n [flex-xs] {\n -webkit-flex: 1 1 0%;\n -ms-flex: 1 1 0%;\n flex: 1 1 0%;\n }\n}\n\n@media (max-width: 599px) {\n [flex-xs-grow] {\n -webkit-flex: 1 1 100%;\n -ms-flex: 1 1 100%;\n flex: 1 1 100%;\n box-sizing: border-box;\n }\n [flex-xs-initial] {\n -webkit-flex: 0 1 auto;\n -ms-flex: 0 1 auto;\n flex: 0 1 auto;\n box-sizing: border-box;\n }\n [flex-xs-auto] {\n -webkit-flex: 1 1 auto;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n box-sizing: border-box;\n }\n [flex-xs-none] {\n -webkit-flex: 0 0 auto;\n -ms-flex: 0 0 auto;\n flex: 0 0 auto;\n box-sizing: border-box;\n }\n [flex-xs=\"0\"] {\n -webkit-flex: 1 1 0%;\n -ms-flex: 1 1 0%;\n flex: 1 1 0%;\n max-width: 0%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-xs=\"0\"],\n [layout-xs=\"row\"] > [flex-xs=\"0\"] {\n -webkit-flex: 1 1 0%;\n -ms-flex: 1 1 0%;\n flex: 1 1 0%;\n max-width: 0%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-xs=\"0\"],\n [layout-xs=\"column\"] > [flex-xs=\"0\"] {\n -webkit-flex: 1 1 0%;\n -ms-flex: 1 1 0%;\n flex: 1 1 0%;\n max-width: 100%;\n max-height: 0%;\n box-sizing: border-box;\n }\n [flex-xs=\"5\"] {\n -webkit-flex: 1 1 5%;\n -ms-flex: 1 1 5%;\n flex: 1 1 5%;\n max-width: 5%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-xs=\"5\"],\n [layout-xs=\"row\"] > [flex-xs=\"5\"] {\n -webkit-flex: 1 1 5%;\n -ms-flex: 1 1 5%;\n flex: 1 1 5%;\n max-width: 5%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-xs=\"5\"],\n [layout-xs=\"column\"] > [flex-xs=\"5\"] {\n -webkit-flex: 1 1 5%;\n -ms-flex: 1 1 5%;\n flex: 1 1 5%;\n max-width: 100%;\n max-height: 5%;\n box-sizing: border-box;\n }\n [flex-xs=\"10\"] {\n -webkit-flex: 1 1 10%;\n -ms-flex: 1 1 10%;\n flex: 1 1 10%;\n max-width: 10%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-xs=\"10\"],\n [layout-xs=\"row\"] > [flex-xs=\"10\"] {\n -webkit-flex: 1 1 10%;\n -ms-flex: 1 1 10%;\n flex: 1 1 10%;\n max-width: 10%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-xs=\"10\"],\n [layout-xs=\"column\"] > [flex-xs=\"10\"] {\n -webkit-flex: 1 1 10%;\n -ms-flex: 1 1 10%;\n flex: 1 1 10%;\n max-width: 100%;\n max-height: 10%;\n box-sizing: border-box;\n }\n [flex-xs=\"15\"] {\n -webkit-flex: 1 1 15%;\n -ms-flex: 1 1 15%;\n flex: 1 1 15%;\n max-width: 15%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-xs=\"15\"],\n [layout-xs=\"row\"] > [flex-xs=\"15\"] {\n -webkit-flex: 1 1 15%;\n -ms-flex: 1 1 15%;\n flex: 1 1 15%;\n max-width: 15%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-xs=\"15\"],\n [layout-xs=\"column\"] > [flex-xs=\"15\"] {\n -webkit-flex: 1 1 15%;\n -ms-flex: 1 1 15%;\n flex: 1 1 15%;\n max-width: 100%;\n max-height: 15%;\n box-sizing: border-box;\n }\n [flex-xs=\"20\"] {\n -webkit-flex: 1 1 20%;\n -ms-flex: 1 1 20%;\n flex: 1 1 20%;\n max-width: 20%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-xs=\"20\"],\n [layout-xs=\"row\"] > [flex-xs=\"20\"] {\n -webkit-flex: 1 1 20%;\n -ms-flex: 1 1 20%;\n flex: 1 1 20%;\n max-width: 20%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-xs=\"20\"],\n [layout-xs=\"column\"] > [flex-xs=\"20\"] {\n -webkit-flex: 1 1 20%;\n -ms-flex: 1 1 20%;\n flex: 1 1 20%;\n max-width: 100%;\n max-height: 20%;\n box-sizing: border-box;\n }\n [flex-xs=\"25\"] {\n -webkit-flex: 1 1 25%;\n -ms-flex: 1 1 25%;\n flex: 1 1 25%;\n max-width: 25%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-xs=\"25\"],\n [layout-xs=\"row\"] > [flex-xs=\"25\"] {\n -webkit-flex: 1 1 25%;\n -ms-flex: 1 1 25%;\n flex: 1 1 25%;\n max-width: 25%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-xs=\"25\"],\n [layout-xs=\"column\"] > [flex-xs=\"25\"] {\n -webkit-flex: 1 1 25%;\n -ms-flex: 1 1 25%;\n flex: 1 1 25%;\n max-width: 100%;\n max-height: 25%;\n box-sizing: border-box;\n }\n [flex-xs=\"30\"] {\n -webkit-flex: 1 1 30%;\n -ms-flex: 1 1 30%;\n flex: 1 1 30%;\n max-width: 30%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-xs=\"30\"],\n [layout-xs=\"row\"] > [flex-xs=\"30\"] {\n -webkit-flex: 1 1 30%;\n -ms-flex: 1 1 30%;\n flex: 1 1 30%;\n max-width: 30%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-xs=\"30\"],\n [layout-xs=\"column\"] > [flex-xs=\"30\"] {\n -webkit-flex: 1 1 30%;\n -ms-flex: 1 1 30%;\n flex: 1 1 30%;\n max-width: 100%;\n max-height: 30%;\n box-sizing: border-box;\n }\n [flex-xs=\"35\"] {\n -webkit-flex: 1 1 35%;\n -ms-flex: 1 1 35%;\n flex: 1 1 35%;\n max-width: 35%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-xs=\"35\"],\n [layout-xs=\"row\"] > [flex-xs=\"35\"] {\n -webkit-flex: 1 1 35%;\n -ms-flex: 1 1 35%;\n flex: 1 1 35%;\n max-width: 35%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-xs=\"35\"],\n [layout-xs=\"column\"] > [flex-xs=\"35\"] {\n -webkit-flex: 1 1 35%;\n -ms-flex: 1 1 35%;\n flex: 1 1 35%;\n max-width: 100%;\n max-height: 35%;\n box-sizing: border-box;\n }\n [flex-xs=\"40\"] {\n -webkit-flex: 1 1 40%;\n -ms-flex: 1 1 40%;\n flex: 1 1 40%;\n max-width: 40%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-xs=\"40\"],\n [layout-xs=\"row\"] > [flex-xs=\"40\"] {\n -webkit-flex: 1 1 40%;\n -ms-flex: 1 1 40%;\n flex: 1 1 40%;\n max-width: 40%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-xs=\"40\"],\n [layout-xs=\"column\"] > [flex-xs=\"40\"] {\n -webkit-flex: 1 1 40%;\n -ms-flex: 1 1 40%;\n flex: 1 1 40%;\n max-width: 100%;\n max-height: 40%;\n box-sizing: border-box;\n }\n [flex-xs=\"45\"] {\n -webkit-flex: 1 1 45%;\n -ms-flex: 1 1 45%;\n flex: 1 1 45%;\n max-width: 45%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-xs=\"45\"],\n [layout-xs=\"row\"] > [flex-xs=\"45\"] {\n -webkit-flex: 1 1 45%;\n -ms-flex: 1 1 45%;\n flex: 1 1 45%;\n max-width: 45%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-xs=\"45\"],\n [layout-xs=\"column\"] > [flex-xs=\"45\"] {\n -webkit-flex: 1 1 45%;\n -ms-flex: 1 1 45%;\n flex: 1 1 45%;\n max-width: 100%;\n max-height: 45%;\n box-sizing: border-box;\n }\n [flex-xs=\"50\"] {\n -webkit-flex: 1 1 50%;\n -ms-flex: 1 1 50%;\n flex: 1 1 50%;\n max-width: 50%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-xs=\"50\"],\n [layout-xs=\"row\"] > [flex-xs=\"50\"] {\n -webkit-flex: 1 1 50%;\n -ms-flex: 1 1 50%;\n flex: 1 1 50%;\n max-width: 50%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-xs=\"50\"],\n [layout-xs=\"column\"] > [flex-xs=\"50\"] {\n -webkit-flex: 1 1 50%;\n -ms-flex: 1 1 50%;\n flex: 1 1 50%;\n max-width: 100%;\n max-height: 50%;\n box-sizing: border-box;\n }\n [flex-xs=\"55\"] {\n -webkit-flex: 1 1 55%;\n -ms-flex: 1 1 55%;\n flex: 1 1 55%;\n max-width: 55%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-xs=\"55\"],\n [layout-xs=\"row\"] > [flex-xs=\"55\"] {\n -webkit-flex: 1 1 55%;\n -ms-flex: 1 1 55%;\n flex: 1 1 55%;\n max-width: 55%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-xs=\"55\"],\n [layout-xs=\"column\"] > [flex-xs=\"55\"] {\n -webkit-flex: 1 1 55%;\n -ms-flex: 1 1 55%;\n flex: 1 1 55%;\n max-width: 100%;\n max-height: 55%;\n box-sizing: border-box;\n }\n [flex-xs=\"60\"] {\n -webkit-flex: 1 1 60%;\n -ms-flex: 1 1 60%;\n flex: 1 1 60%;\n max-width: 60%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-xs=\"60\"],\n [layout-xs=\"row\"] > [flex-xs=\"60\"] {\n -webkit-flex: 1 1 60%;\n -ms-flex: 1 1 60%;\n flex: 1 1 60%;\n max-width: 60%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-xs=\"60\"],\n [layout-xs=\"column\"] > [flex-xs=\"60\"] {\n -webkit-flex: 1 1 60%;\n -ms-flex: 1 1 60%;\n flex: 1 1 60%;\n max-width: 100%;\n max-height: 60%;\n box-sizing: border-box;\n }\n [flex-xs=\"65\"] {\n -webkit-flex: 1 1 65%;\n -ms-flex: 1 1 65%;\n flex: 1 1 65%;\n max-width: 65%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-xs=\"65\"],\n [layout-xs=\"row\"] > [flex-xs=\"65\"] {\n -webkit-flex: 1 1 65%;\n -ms-flex: 1 1 65%;\n flex: 1 1 65%;\n max-width: 65%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-xs=\"65\"],\n [layout-xs=\"column\"] > [flex-xs=\"65\"] {\n -webkit-flex: 1 1 65%;\n -ms-flex: 1 1 65%;\n flex: 1 1 65%;\n max-width: 100%;\n max-height: 65%;\n box-sizing: border-box;\n }\n [flex-xs=\"70\"] {\n -webkit-flex: 1 1 70%;\n -ms-flex: 1 1 70%;\n flex: 1 1 70%;\n max-width: 70%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-xs=\"70\"],\n [layout-xs=\"row\"] > [flex-xs=\"70\"] {\n -webkit-flex: 1 1 70%;\n -ms-flex: 1 1 70%;\n flex: 1 1 70%;\n max-width: 70%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-xs=\"70\"],\n [layout-xs=\"column\"] > [flex-xs=\"70\"] {\n -webkit-flex: 1 1 70%;\n -ms-flex: 1 1 70%;\n flex: 1 1 70%;\n max-width: 100%;\n max-height: 70%;\n box-sizing: border-box;\n }\n [flex-xs=\"75\"] {\n -webkit-flex: 1 1 75%;\n -ms-flex: 1 1 75%;\n flex: 1 1 75%;\n max-width: 75%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-xs=\"75\"],\n [layout-xs=\"row\"] > [flex-xs=\"75\"] {\n -webkit-flex: 1 1 75%;\n -ms-flex: 1 1 75%;\n flex: 1 1 75%;\n max-width: 75%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-xs=\"75\"],\n [layout-xs=\"column\"] > [flex-xs=\"75\"] {\n -webkit-flex: 1 1 75%;\n -ms-flex: 1 1 75%;\n flex: 1 1 75%;\n max-width: 100%;\n max-height: 75%;\n box-sizing: border-box;\n }\n [flex-xs=\"80\"] {\n -webkit-flex: 1 1 80%;\n -ms-flex: 1 1 80%;\n flex: 1 1 80%;\n max-width: 80%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-xs=\"80\"],\n [layout-xs=\"row\"] > [flex-xs=\"80\"] {\n -webkit-flex: 1 1 80%;\n -ms-flex: 1 1 80%;\n flex: 1 1 80%;\n max-width: 80%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-xs=\"80\"],\n [layout-xs=\"column\"] > [flex-xs=\"80\"] {\n -webkit-flex: 1 1 80%;\n -ms-flex: 1 1 80%;\n flex: 1 1 80%;\n max-width: 100%;\n max-height: 80%;\n box-sizing: border-box;\n }\n [flex-xs=\"85\"] {\n -webkit-flex: 1 1 85%;\n -ms-flex: 1 1 85%;\n flex: 1 1 85%;\n max-width: 85%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-xs=\"85\"],\n [layout-xs=\"row\"] > [flex-xs=\"85\"] {\n -webkit-flex: 1 1 85%;\n -ms-flex: 1 1 85%;\n flex: 1 1 85%;\n max-width: 85%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-xs=\"85\"],\n [layout-xs=\"column\"] > [flex-xs=\"85\"] {\n -webkit-flex: 1 1 85%;\n -ms-flex: 1 1 85%;\n flex: 1 1 85%;\n max-width: 100%;\n max-height: 85%;\n box-sizing: border-box;\n }\n [flex-xs=\"90\"] {\n -webkit-flex: 1 1 90%;\n -ms-flex: 1 1 90%;\n flex: 1 1 90%;\n max-width: 90%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-xs=\"90\"],\n [layout-xs=\"row\"] > [flex-xs=\"90\"] {\n -webkit-flex: 1 1 90%;\n -ms-flex: 1 1 90%;\n flex: 1 1 90%;\n max-width: 90%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-xs=\"90\"],\n [layout-xs=\"column\"] > [flex-xs=\"90\"] {\n -webkit-flex: 1 1 90%;\n -ms-flex: 1 1 90%;\n flex: 1 1 90%;\n max-width: 100%;\n max-height: 90%;\n box-sizing: border-box;\n }\n [flex-xs=\"95\"] {\n -webkit-flex: 1 1 95%;\n -ms-flex: 1 1 95%;\n flex: 1 1 95%;\n max-width: 95%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-xs=\"95\"],\n [layout-xs=\"row\"] > [flex-xs=\"95\"] {\n -webkit-flex: 1 1 95%;\n -ms-flex: 1 1 95%;\n flex: 1 1 95%;\n max-width: 95%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-xs=\"95\"],\n [layout-xs=\"column\"] > [flex-xs=\"95\"] {\n -webkit-flex: 1 1 95%;\n -ms-flex: 1 1 95%;\n flex: 1 1 95%;\n max-width: 100%;\n max-height: 95%;\n box-sizing: border-box;\n }\n [flex-xs=\"100\"] {\n -webkit-flex: 1 1 100%;\n -ms-flex: 1 1 100%;\n flex: 1 1 100%;\n max-width: 100%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-xs=\"100\"],\n [layout-xs=\"row\"] > [flex-xs=\"100\"] {\n -webkit-flex: 1 1 100%;\n -ms-flex: 1 1 100%;\n flex: 1 1 100%;\n max-width: 100%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-xs=\"100\"],\n [layout-xs=\"column\"] > [flex-xs=\"100\"] {\n -webkit-flex: 1 1 100%;\n -ms-flex: 1 1 100%;\n flex: 1 1 100%;\n max-width: 100%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-xs=\"33\"],\n [layout=\"row\"] > [flex-xs=\"33\"],\n [layout-xs=\"row\"] > [flex-xs=\"33\"],\n [layout-xs=\"row\"] > [flex-xs=\"33\"] {\n -webkit-flex: 1 1 33%;\n -ms-flex: 1 1 33%;\n flex: 1 1 33%;\n max-width: calc(100% / 3);\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-xs=\"34\"],\n [layout=\"row\"] > [flex-xs=\"34\"],\n [layout-xs=\"row\"] > [flex-xs=\"34\"],\n [layout-xs=\"row\"] > [flex-xs=\"34\"] {\n -webkit-flex: 1 1 34%;\n -ms-flex: 1 1 34%;\n flex: 1 1 34%;\n max-width: 34%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-xs=\"66\"],\n [layout=\"row\"] > [flex-xs=\"66\"],\n [layout-xs=\"row\"] > [flex-xs=\"66\"],\n [layout-xs=\"row\"] > [flex-xs=\"66\"] {\n -webkit-flex: 1 1 66%;\n -ms-flex: 1 1 66%;\n flex: 1 1 66%;\n max-width: calc(200% / 3);\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-xs=\"67\"],\n [layout=\"row\"] > [flex-xs=\"67\"],\n [layout-xs=\"row\"] > [flex-xs=\"67\"],\n [layout-xs=\"row\"] > [flex-xs=\"67\"] {\n -webkit-flex: 1 1 67%;\n -ms-flex: 1 1 67%;\n flex: 1 1 67%;\n max-width: 67%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-xs=\"33\"],\n [layout=\"column\"] > [flex-xs=\"33\"],\n [layout-xs=\"column\"] > [flex-xs=\"33\"],\n [layout-xs=\"column\"] > [flex-xs=\"33\"] {\n -webkit-flex: 1 1 33%;\n -ms-flex: 1 1 33%;\n flex: 1 1 33%;\n max-width: 100%;\n max-height: calc(100% / 3);\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-xs=\"34\"],\n [layout=\"column\"] > [flex-xs=\"34\"],\n [layout-xs=\"column\"] > [flex-xs=\"34\"],\n [layout-xs=\"column\"] > [flex-xs=\"34\"] {\n -webkit-flex: 1 1 34%;\n -ms-flex: 1 1 34%;\n flex: 1 1 34%;\n max-width: 100%;\n max-height: 34%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-xs=\"66\"],\n [layout=\"column\"] > [flex-xs=\"66\"],\n [layout-xs=\"column\"] > [flex-xs=\"66\"],\n [layout-xs=\"column\"] > [flex-xs=\"66\"] {\n -webkit-flex: 1 1 66%;\n -ms-flex: 1 1 66%;\n flex: 1 1 66%;\n max-width: 100%;\n max-height: calc(200% / 3);\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-xs=\"67\"],\n [layout=\"column\"] > [flex-xs=\"67\"],\n [layout-xs=\"column\"] > [flex-xs=\"67\"],\n [layout-xs=\"column\"] > [flex-xs=\"67\"] {\n -webkit-flex: 1 1 67%;\n -ms-flex: 1 1 67%;\n flex: 1 1 67%;\n max-width: 100%;\n max-height: 67%;\n box-sizing: border-box;\n }\n [layout-xs],\n [layout-xs=\"column\"],\n [layout-xs=\"row\"] {\n box-sizing: border-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n }\n [layout-xs=\"column\"] {\n -webkit-flex-direction: column;\n -ms-flex-direction: column;\n flex-direction: column;\n }\n [layout-xs=\"row\"] {\n -webkit-flex-direction: row;\n -ms-flex-direction: row;\n flex-direction: row;\n }\n}\n\n@media (min-width: 600px) {\n [flex-order-gt-xs=\"-20\"] {\n -webkit-order: -20;\n -ms-flex-order: -20;\n order: -20;\n }\n [flex-order-gt-xs=\"-19\"] {\n -webkit-order: -19;\n -ms-flex-order: -19;\n order: -19;\n }\n [flex-order-gt-xs=\"-18\"] {\n -webkit-order: -18;\n -ms-flex-order: -18;\n order: -18;\n }\n [flex-order-gt-xs=\"-17\"] {\n -webkit-order: -17;\n -ms-flex-order: -17;\n order: -17;\n }\n [flex-order-gt-xs=\"-16\"] {\n -webkit-order: -16;\n -ms-flex-order: -16;\n order: -16;\n }\n [flex-order-gt-xs=\"-15\"] {\n -webkit-order: -15;\n -ms-flex-order: -15;\n order: -15;\n }\n [flex-order-gt-xs=\"-14\"] {\n -webkit-order: -14;\n -ms-flex-order: -14;\n order: -14;\n }\n [flex-order-gt-xs=\"-13\"] {\n -webkit-order: -13;\n -ms-flex-order: -13;\n order: -13;\n }\n [flex-order-gt-xs=\"-12\"] {\n -webkit-order: -12;\n -ms-flex-order: -12;\n order: -12;\n }\n [flex-order-gt-xs=\"-11\"] {\n -webkit-order: -11;\n -ms-flex-order: -11;\n order: -11;\n }\n [flex-order-gt-xs=\"-10\"] {\n -webkit-order: -10;\n -ms-flex-order: -10;\n order: -10;\n }\n [flex-order-gt-xs=\"-9\"] {\n -webkit-order: -9;\n -ms-flex-order: -9;\n order: -9;\n }\n [flex-order-gt-xs=\"-8\"] {\n -webkit-order: -8;\n -ms-flex-order: -8;\n order: -8;\n }\n [flex-order-gt-xs=\"-7\"] {\n -webkit-order: -7;\n -ms-flex-order: -7;\n order: -7;\n }\n [flex-order-gt-xs=\"-6\"] {\n -webkit-order: -6;\n -ms-flex-order: -6;\n order: -6;\n }\n [flex-order-gt-xs=\"-5\"] {\n -webkit-order: -5;\n -ms-flex-order: -5;\n order: -5;\n }\n [flex-order-gt-xs=\"-4\"] {\n -webkit-order: -4;\n -ms-flex-order: -4;\n order: -4;\n }\n [flex-order-gt-xs=\"-3\"] {\n -webkit-order: -3;\n -ms-flex-order: -3;\n order: -3;\n }\n [flex-order-gt-xs=\"-2\"] {\n -webkit-order: -2;\n -ms-flex-order: -2;\n order: -2;\n }\n [flex-order-gt-xs=\"-1\"] {\n -webkit-order: -1;\n -ms-flex-order: -1;\n order: -1;\n }\n [flex-order-gt-xs=\"0\"] {\n -webkit-order: 0;\n -ms-flex-order: 0;\n order: 0;\n }\n [flex-order-gt-xs=\"1\"] {\n -webkit-order: 1;\n -ms-flex-order: 1;\n order: 1;\n }\n [flex-order-gt-xs=\"2\"] {\n -webkit-order: 2;\n -ms-flex-order: 2;\n order: 2;\n }\n [flex-order-gt-xs=\"3\"] {\n -webkit-order: 3;\n -ms-flex-order: 3;\n order: 3;\n }\n [flex-order-gt-xs=\"4\"] {\n -webkit-order: 4;\n -ms-flex-order: 4;\n order: 4;\n }\n [flex-order-gt-xs=\"5\"] {\n -webkit-order: 5;\n -ms-flex-order: 5;\n order: 5;\n }\n [flex-order-gt-xs=\"6\"] {\n -webkit-order: 6;\n -ms-flex-order: 6;\n order: 6;\n }\n [flex-order-gt-xs=\"7\"] {\n -webkit-order: 7;\n -ms-flex-order: 7;\n order: 7;\n }\n [flex-order-gt-xs=\"8\"] {\n -webkit-order: 8;\n -ms-flex-order: 8;\n order: 8;\n }\n [flex-order-gt-xs=\"9\"] {\n -webkit-order: 9;\n -ms-flex-order: 9;\n order: 9;\n }\n [flex-order-gt-xs=\"10\"] {\n -webkit-order: 10;\n -ms-flex-order: 10;\n order: 10;\n }\n [flex-order-gt-xs=\"11\"] {\n -webkit-order: 11;\n -ms-flex-order: 11;\n order: 11;\n }\n [flex-order-gt-xs=\"12\"] {\n -webkit-order: 12;\n -ms-flex-order: 12;\n order: 12;\n }\n [flex-order-gt-xs=\"13\"] {\n -webkit-order: 13;\n -ms-flex-order: 13;\n order: 13;\n }\n [flex-order-gt-xs=\"14\"] {\n -webkit-order: 14;\n -ms-flex-order: 14;\n order: 14;\n }\n [flex-order-gt-xs=\"15\"] {\n -webkit-order: 15;\n -ms-flex-order: 15;\n order: 15;\n }\n [flex-order-gt-xs=\"16\"] {\n -webkit-order: 16;\n -ms-flex-order: 16;\n order: 16;\n }\n [flex-order-gt-xs=\"17\"] {\n -webkit-order: 17;\n -ms-flex-order: 17;\n order: 17;\n }\n [flex-order-gt-xs=\"18\"] {\n -webkit-order: 18;\n -ms-flex-order: 18;\n order: 18;\n }\n [flex-order-gt-xs=\"19\"] {\n -webkit-order: 19;\n -ms-flex-order: 19;\n order: 19;\n }\n [flex-order-gt-xs=\"20\"] {\n -webkit-order: 20;\n -ms-flex-order: 20;\n order: 20;\n }\n [flex-offset-gt-xs=\"0\"] {\n margin-left: 0%;\n }\n [flex-offset-gt-xs=\"5\"] {\n margin-left: 5%;\n }\n [flex-offset-gt-xs=\"10\"] {\n margin-left: 10%;\n }\n [flex-offset-gt-xs=\"15\"] {\n margin-left: 15%;\n }\n [flex-offset-gt-xs=\"20\"] {\n margin-left: 20%;\n }\n [flex-offset-gt-xs=\"25\"] {\n margin-left: 25%;\n }\n [flex-offset-gt-xs=\"30\"] {\n margin-left: 30%;\n }\n [flex-offset-gt-xs=\"35\"] {\n margin-left: 35%;\n }\n [flex-offset-gt-xs=\"40\"] {\n margin-left: 40%;\n }\n [flex-offset-gt-xs=\"45\"] {\n margin-left: 45%;\n }\n [flex-offset-gt-xs=\"50\"] {\n margin-left: 50%;\n }\n [flex-offset-gt-xs=\"55\"] {\n margin-left: 55%;\n }\n [flex-offset-gt-xs=\"60\"] {\n margin-left: 60%;\n }\n [flex-offset-gt-xs=\"65\"] {\n margin-left: 65%;\n }\n [flex-offset-gt-xs=\"70\"] {\n margin-left: 70%;\n }\n [flex-offset-gt-xs=\"75\"] {\n margin-left: 75%;\n }\n [flex-offset-gt-xs=\"80\"] {\n margin-left: 80%;\n }\n [flex-offset-gt-xs=\"85\"] {\n margin-left: 85%;\n }\n [flex-offset-gt-xs=\"90\"] {\n margin-left: 90%;\n }\n [flex-offset-gt-xs=\"95\"] {\n margin-left: 95%;\n }\n [flex-offset-gt-xs=\"33\"] {\n margin-left: calc(100% / 3);\n }\n [flex-offset-gt-xs=\"66\"] {\n margin-left: calc(200% / 3);\n }\n [layout-align-gt-xs] {\n -webkit-justify-content: flex-start;\n -ms-flex-pack: start;\n justify-content: flex-start;\n -webkit-align-content: stretch;\n -ms-flex-line-pack: stretch;\n align-content: stretch;\n -webkit-align-items: stretch;\n -ms-flex-align: stretch;\n align-items: stretch;\n }\n [layout-align-gt-xs=\"start\"],\n [layout-align-gt-xs=\"start start\"],\n [layout-align-gt-xs=\"start center\"],\n [layout-align-gt-xs=\"start end\"],\n [layout-align-gt-xs=\"start stretch\"] {\n -webkit-justify-content: start;\n -ms-flex-pack: start;\n justify-content: start;\n }\n [layout-align-gt-xs=\"center\"],\n [layout-align-gt-xs=\"center start\"],\n [layout-align-gt-xs=\"center center\"],\n [layout-align-gt-xs=\"center end\"],\n [layout-align-gt-xs=\"center stretch\"] {\n -webkit-justify-content: center;\n -ms-flex-pack: center;\n justify-content: center;\n }\n [layout-align-gt-xs=\"end\"],\n [layout-align-gt-xs=\"end center\"],\n [layout-align-gt-xs=\"end start\"],\n [layout-align-gt-xs=\"end end\"],\n [layout-align-gt-xs=\"end stretch\"] {\n -webkit-justify-content: flex-end;\n -ms-flex-pack: end;\n justify-content: flex-end;\n }\n [layout-align-gt-xs=\"space-around\"],\n [layout-align-gt-xs=\"space-around center\"],\n [layout-align-gt-xs=\"space-around start\"],\n [layout-align-gt-xs=\"space-around end\"],\n [layout-align-gt-xs=\"space-around stretch\"] {\n -webkit-justify-content: space-around;\n -ms-flex-pack: distribute;\n justify-content: space-around;\n }\n [layout-align-gt-xs=\"space-between\"],\n [layout-align-gt-xs=\"space-between center\"],\n [layout-align-gt-xs=\"space-between start\"],\n [layout-align-gt-xs=\"space-between end\"],\n [layout-align-gt-xs=\"space-between stretch\"] {\n -webkit-justify-content: space-between;\n -ms-flex-pack: justify;\n justify-content: space-between;\n }\n [layout-align-gt-xs=\"start start\"],\n [layout-align-gt-xs=\"center start\"],\n [layout-align-gt-xs=\"end start\"],\n [layout-align-gt-xs=\"space-between start\"],\n [layout-align-gt-xs=\"space-around start\"] {\n -webkit-align-items: flex-start;\n -ms-flex-align: start;\n align-items: flex-start;\n -webkit-align-content: flex-start;\n -ms-flex-line-pack: start;\n align-content: flex-start;\n }\n [layout-align-gt-xs=\"start center\"],\n [layout-align-gt-xs=\"center center\"],\n [layout-align-gt-xs=\"end center\"],\n [layout-align-gt-xs=\"space-between center\"],\n [layout-align-gt-xs=\"space-around center\"] {\n -webkit-align-items: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-align-content: center;\n -ms-flex-line-pack: center;\n align-content: center;\n max-width: 100%;\n }\n [layout-align-gt-xs=\"start center\"] > *,\n [layout-align-gt-xs=\"center center\"] > *,\n [layout-align-gt-xs=\"end center\"] > *,\n [layout-align-gt-xs=\"space-between center\"] > *,\n [layout-align-gt-xs=\"space-around center\"] > * {\n max-width: 100%;\n box-sizing: border-box;\n }\n [layout-align-gt-xs=\"start end\"],\n [layout-align-gt-xs=\"center end\"],\n [layout-align-gt-xs=\"end end\"],\n [layout-align-gt-xs=\"space-between end\"],\n [layout-align-gt-xs=\"space-around end\"] {\n -webkit-align-items: flex-end;\n -ms-flex-align: end;\n align-items: flex-end;\n -webkit-align-content: flex-end;\n -ms-flex-line-pack: end;\n align-content: flex-end;\n }\n [layout-align-gt-xs=\"start stretch\"],\n [layout-align-gt-xs=\"center stretch\"],\n [layout-align-gt-xs=\"end stretch\"],\n [layout-align-gt-xs=\"space-between stretch\"],\n [layout-align-gt-xs=\"space-around stretch\"] {\n -webkit-align-items: stretch;\n -ms-flex-align: stretch;\n align-items: stretch;\n -webkit-align-content: stretch;\n -ms-flex-line-pack: stretch;\n align-content: stretch;\n }\n [flex-gt-xs] {\n -webkit-flex: 1;\n -ms-flex: 1;\n flex: 1;\n box-sizing: border-box;\n }\n}\n\n@media screen and (min-width: 600px) {\n [flex-gt-xs] {\n -webkit-flex: 1 1 0%;\n -ms-flex: 1 1 0%;\n flex: 1 1 0%;\n }\n}\n\n@media (min-width: 600px) {\n [flex-gt-xs-grow] {\n -webkit-flex: 1 1 100%;\n -ms-flex: 1 1 100%;\n flex: 1 1 100%;\n box-sizing: border-box;\n }\n [flex-gt-xs-initial] {\n -webkit-flex: 0 1 auto;\n -ms-flex: 0 1 auto;\n flex: 0 1 auto;\n box-sizing: border-box;\n }\n [flex-gt-xs-auto] {\n -webkit-flex: 1 1 auto;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n box-sizing: border-box;\n }\n [flex-gt-xs-none] {\n -webkit-flex: 0 0 auto;\n -ms-flex: 0 0 auto;\n flex: 0 0 auto;\n box-sizing: border-box;\n }\n [flex-gt-xs=\"0\"] {\n -webkit-flex: 1 1 0%;\n -ms-flex: 1 1 0%;\n flex: 1 1 0%;\n max-width: 0%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-xs=\"0\"],\n [layout-gt-xs=\"row\"] > [flex-gt-xs=\"0\"] {\n -webkit-flex: 1 1 0%;\n -ms-flex: 1 1 0%;\n flex: 1 1 0%;\n max-width: 0%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-xs=\"0\"],\n [layout-gt-xs=\"column\"] > [flex-gt-xs=\"0\"] {\n -webkit-flex: 1 1 0%;\n -ms-flex: 1 1 0%;\n flex: 1 1 0%;\n max-width: 100%;\n max-height: 0%;\n box-sizing: border-box;\n }\n [flex-gt-xs=\"5\"] {\n -webkit-flex: 1 1 5%;\n -ms-flex: 1 1 5%;\n flex: 1 1 5%;\n max-width: 5%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-xs=\"5\"],\n [layout-gt-xs=\"row\"] > [flex-gt-xs=\"5\"] {\n -webkit-flex: 1 1 5%;\n -ms-flex: 1 1 5%;\n flex: 1 1 5%;\n max-width: 5%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-xs=\"5\"],\n [layout-gt-xs=\"column\"] > [flex-gt-xs=\"5\"] {\n -webkit-flex: 1 1 5%;\n -ms-flex: 1 1 5%;\n flex: 1 1 5%;\n max-width: 100%;\n max-height: 5%;\n box-sizing: border-box;\n }\n [flex-gt-xs=\"10\"] {\n -webkit-flex: 1 1 10%;\n -ms-flex: 1 1 10%;\n flex: 1 1 10%;\n max-width: 10%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-xs=\"10\"],\n [layout-gt-xs=\"row\"] > [flex-gt-xs=\"10\"] {\n -webkit-flex: 1 1 10%;\n -ms-flex: 1 1 10%;\n flex: 1 1 10%;\n max-width: 10%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-xs=\"10\"],\n [layout-gt-xs=\"column\"] > [flex-gt-xs=\"10\"] {\n -webkit-flex: 1 1 10%;\n -ms-flex: 1 1 10%;\n flex: 1 1 10%;\n max-width: 100%;\n max-height: 10%;\n box-sizing: border-box;\n }\n [flex-gt-xs=\"15\"] {\n -webkit-flex: 1 1 15%;\n -ms-flex: 1 1 15%;\n flex: 1 1 15%;\n max-width: 15%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-xs=\"15\"],\n [layout-gt-xs=\"row\"] > [flex-gt-xs=\"15\"] {\n -webkit-flex: 1 1 15%;\n -ms-flex: 1 1 15%;\n flex: 1 1 15%;\n max-width: 15%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-xs=\"15\"],\n [layout-gt-xs=\"column\"] > [flex-gt-xs=\"15\"] {\n -webkit-flex: 1 1 15%;\n -ms-flex: 1 1 15%;\n flex: 1 1 15%;\n max-width: 100%;\n max-height: 15%;\n box-sizing: border-box;\n }\n [flex-gt-xs=\"20\"] {\n -webkit-flex: 1 1 20%;\n -ms-flex: 1 1 20%;\n flex: 1 1 20%;\n max-width: 20%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-xs=\"20\"],\n [layout-gt-xs=\"row\"] > [flex-gt-xs=\"20\"] {\n -webkit-flex: 1 1 20%;\n -ms-flex: 1 1 20%;\n flex: 1 1 20%;\n max-width: 20%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-xs=\"20\"],\n [layout-gt-xs=\"column\"] > [flex-gt-xs=\"20\"] {\n -webkit-flex: 1 1 20%;\n -ms-flex: 1 1 20%;\n flex: 1 1 20%;\n max-width: 100%;\n max-height: 20%;\n box-sizing: border-box;\n }\n [flex-gt-xs=\"25\"] {\n -webkit-flex: 1 1 25%;\n -ms-flex: 1 1 25%;\n flex: 1 1 25%;\n max-width: 25%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-xs=\"25\"],\n [layout-gt-xs=\"row\"] > [flex-gt-xs=\"25\"] {\n -webkit-flex: 1 1 25%;\n -ms-flex: 1 1 25%;\n flex: 1 1 25%;\n max-width: 25%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-xs=\"25\"],\n [layout-gt-xs=\"column\"] > [flex-gt-xs=\"25\"] {\n -webkit-flex: 1 1 25%;\n -ms-flex: 1 1 25%;\n flex: 1 1 25%;\n max-width: 100%;\n max-height: 25%;\n box-sizing: border-box;\n }\n [flex-gt-xs=\"30\"] {\n -webkit-flex: 1 1 30%;\n -ms-flex: 1 1 30%;\n flex: 1 1 30%;\n max-width: 30%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-xs=\"30\"],\n [layout-gt-xs=\"row\"] > [flex-gt-xs=\"30\"] {\n -webkit-flex: 1 1 30%;\n -ms-flex: 1 1 30%;\n flex: 1 1 30%;\n max-width: 30%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-xs=\"30\"],\n [layout-gt-xs=\"column\"] > [flex-gt-xs=\"30\"] {\n -webkit-flex: 1 1 30%;\n -ms-flex: 1 1 30%;\n flex: 1 1 30%;\n max-width: 100%;\n max-height: 30%;\n box-sizing: border-box;\n }\n [flex-gt-xs=\"35\"] {\n -webkit-flex: 1 1 35%;\n -ms-flex: 1 1 35%;\n flex: 1 1 35%;\n max-width: 35%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-xs=\"35\"],\n [layout-gt-xs=\"row\"] > [flex-gt-xs=\"35\"] {\n -webkit-flex: 1 1 35%;\n -ms-flex: 1 1 35%;\n flex: 1 1 35%;\n max-width: 35%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-xs=\"35\"],\n [layout-gt-xs=\"column\"] > [flex-gt-xs=\"35\"] {\n -webkit-flex: 1 1 35%;\n -ms-flex: 1 1 35%;\n flex: 1 1 35%;\n max-width: 100%;\n max-height: 35%;\n box-sizing: border-box;\n }\n [flex-gt-xs=\"40\"] {\n -webkit-flex: 1 1 40%;\n -ms-flex: 1 1 40%;\n flex: 1 1 40%;\n max-width: 40%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-xs=\"40\"],\n [layout-gt-xs=\"row\"] > [flex-gt-xs=\"40\"] {\n -webkit-flex: 1 1 40%;\n -ms-flex: 1 1 40%;\n flex: 1 1 40%;\n max-width: 40%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-xs=\"40\"],\n [layout-gt-xs=\"column\"] > [flex-gt-xs=\"40\"] {\n -webkit-flex: 1 1 40%;\n -ms-flex: 1 1 40%;\n flex: 1 1 40%;\n max-width: 100%;\n max-height: 40%;\n box-sizing: border-box;\n }\n [flex-gt-xs=\"45\"] {\n -webkit-flex: 1 1 45%;\n -ms-flex: 1 1 45%;\n flex: 1 1 45%;\n max-width: 45%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-xs=\"45\"],\n [layout-gt-xs=\"row\"] > [flex-gt-xs=\"45\"] {\n -webkit-flex: 1 1 45%;\n -ms-flex: 1 1 45%;\n flex: 1 1 45%;\n max-width: 45%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-xs=\"45\"],\n [layout-gt-xs=\"column\"] > [flex-gt-xs=\"45\"] {\n -webkit-flex: 1 1 45%;\n -ms-flex: 1 1 45%;\n flex: 1 1 45%;\n max-width: 100%;\n max-height: 45%;\n box-sizing: border-box;\n }\n [flex-gt-xs=\"50\"] {\n -webkit-flex: 1 1 50%;\n -ms-flex: 1 1 50%;\n flex: 1 1 50%;\n max-width: 50%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-xs=\"50\"],\n [layout-gt-xs=\"row\"] > [flex-gt-xs=\"50\"] {\n -webkit-flex: 1 1 50%;\n -ms-flex: 1 1 50%;\n flex: 1 1 50%;\n max-width: 50%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-xs=\"50\"],\n [layout-gt-xs=\"column\"] > [flex-gt-xs=\"50\"] {\n -webkit-flex: 1 1 50%;\n -ms-flex: 1 1 50%;\n flex: 1 1 50%;\n max-width: 100%;\n max-height: 50%;\n box-sizing: border-box;\n }\n [flex-gt-xs=\"55\"] {\n -webkit-flex: 1 1 55%;\n -ms-flex: 1 1 55%;\n flex: 1 1 55%;\n max-width: 55%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-xs=\"55\"],\n [layout-gt-xs=\"row\"] > [flex-gt-xs=\"55\"] {\n -webkit-flex: 1 1 55%;\n -ms-flex: 1 1 55%;\n flex: 1 1 55%;\n max-width: 55%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-xs=\"55\"],\n [layout-gt-xs=\"column\"] > [flex-gt-xs=\"55\"] {\n -webkit-flex: 1 1 55%;\n -ms-flex: 1 1 55%;\n flex: 1 1 55%;\n max-width: 100%;\n max-height: 55%;\n box-sizing: border-box;\n }\n [flex-gt-xs=\"60\"] {\n -webkit-flex: 1 1 60%;\n -ms-flex: 1 1 60%;\n flex: 1 1 60%;\n max-width: 60%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-xs=\"60\"],\n [layout-gt-xs=\"row\"] > [flex-gt-xs=\"60\"] {\n -webkit-flex: 1 1 60%;\n -ms-flex: 1 1 60%;\n flex: 1 1 60%;\n max-width: 60%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-xs=\"60\"],\n [layout-gt-xs=\"column\"] > [flex-gt-xs=\"60\"] {\n -webkit-flex: 1 1 60%;\n -ms-flex: 1 1 60%;\n flex: 1 1 60%;\n max-width: 100%;\n max-height: 60%;\n box-sizing: border-box;\n }\n [flex-gt-xs=\"65\"] {\n -webkit-flex: 1 1 65%;\n -ms-flex: 1 1 65%;\n flex: 1 1 65%;\n max-width: 65%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-xs=\"65\"],\n [layout-gt-xs=\"row\"] > [flex-gt-xs=\"65\"] {\n -webkit-flex: 1 1 65%;\n -ms-flex: 1 1 65%;\n flex: 1 1 65%;\n max-width: 65%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-xs=\"65\"],\n [layout-gt-xs=\"column\"] > [flex-gt-xs=\"65\"] {\n -webkit-flex: 1 1 65%;\n -ms-flex: 1 1 65%;\n flex: 1 1 65%;\n max-width: 100%;\n max-height: 65%;\n box-sizing: border-box;\n }\n [flex-gt-xs=\"70\"] {\n -webkit-flex: 1 1 70%;\n -ms-flex: 1 1 70%;\n flex: 1 1 70%;\n max-width: 70%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-xs=\"70\"],\n [layout-gt-xs=\"row\"] > [flex-gt-xs=\"70\"] {\n -webkit-flex: 1 1 70%;\n -ms-flex: 1 1 70%;\n flex: 1 1 70%;\n max-width: 70%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-xs=\"70\"],\n [layout-gt-xs=\"column\"] > [flex-gt-xs=\"70\"] {\n -webkit-flex: 1 1 70%;\n -ms-flex: 1 1 70%;\n flex: 1 1 70%;\n max-width: 100%;\n max-height: 70%;\n box-sizing: border-box;\n }\n [flex-gt-xs=\"75\"] {\n -webkit-flex: 1 1 75%;\n -ms-flex: 1 1 75%;\n flex: 1 1 75%;\n max-width: 75%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-xs=\"75\"],\n [layout-gt-xs=\"row\"] > [flex-gt-xs=\"75\"] {\n -webkit-flex: 1 1 75%;\n -ms-flex: 1 1 75%;\n flex: 1 1 75%;\n max-width: 75%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-xs=\"75\"],\n [layout-gt-xs=\"column\"] > [flex-gt-xs=\"75\"] {\n -webkit-flex: 1 1 75%;\n -ms-flex: 1 1 75%;\n flex: 1 1 75%;\n max-width: 100%;\n max-height: 75%;\n box-sizing: border-box;\n }\n [flex-gt-xs=\"80\"] {\n -webkit-flex: 1 1 80%;\n -ms-flex: 1 1 80%;\n flex: 1 1 80%;\n max-width: 80%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-xs=\"80\"],\n [layout-gt-xs=\"row\"] > [flex-gt-xs=\"80\"] {\n -webkit-flex: 1 1 80%;\n -ms-flex: 1 1 80%;\n flex: 1 1 80%;\n max-width: 80%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-xs=\"80\"],\n [layout-gt-xs=\"column\"] > [flex-gt-xs=\"80\"] {\n -webkit-flex: 1 1 80%;\n -ms-flex: 1 1 80%;\n flex: 1 1 80%;\n max-width: 100%;\n max-height: 80%;\n box-sizing: border-box;\n }\n [flex-gt-xs=\"85\"] {\n -webkit-flex: 1 1 85%;\n -ms-flex: 1 1 85%;\n flex: 1 1 85%;\n max-width: 85%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-xs=\"85\"],\n [layout-gt-xs=\"row\"] > [flex-gt-xs=\"85\"] {\n -webkit-flex: 1 1 85%;\n -ms-flex: 1 1 85%;\n flex: 1 1 85%;\n max-width: 85%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-xs=\"85\"],\n [layout-gt-xs=\"column\"] > [flex-gt-xs=\"85\"] {\n -webkit-flex: 1 1 85%;\n -ms-flex: 1 1 85%;\n flex: 1 1 85%;\n max-width: 100%;\n max-height: 85%;\n box-sizing: border-box;\n }\n [flex-gt-xs=\"90\"] {\n -webkit-flex: 1 1 90%;\n -ms-flex: 1 1 90%;\n flex: 1 1 90%;\n max-width: 90%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-xs=\"90\"],\n [layout-gt-xs=\"row\"] > [flex-gt-xs=\"90\"] {\n -webkit-flex: 1 1 90%;\n -ms-flex: 1 1 90%;\n flex: 1 1 90%;\n max-width: 90%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-xs=\"90\"],\n [layout-gt-xs=\"column\"] > [flex-gt-xs=\"90\"] {\n -webkit-flex: 1 1 90%;\n -ms-flex: 1 1 90%;\n flex: 1 1 90%;\n max-width: 100%;\n max-height: 90%;\n box-sizing: border-box;\n }\n [flex-gt-xs=\"95\"] {\n -webkit-flex: 1 1 95%;\n -ms-flex: 1 1 95%;\n flex: 1 1 95%;\n max-width: 95%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-xs=\"95\"],\n [layout-gt-xs=\"row\"] > [flex-gt-xs=\"95\"] {\n -webkit-flex: 1 1 95%;\n -ms-flex: 1 1 95%;\n flex: 1 1 95%;\n max-width: 95%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-xs=\"95\"],\n [layout-gt-xs=\"column\"] > [flex-gt-xs=\"95\"] {\n -webkit-flex: 1 1 95%;\n -ms-flex: 1 1 95%;\n flex: 1 1 95%;\n max-width: 100%;\n max-height: 95%;\n box-sizing: border-box;\n }\n [flex-gt-xs=\"100\"] {\n -webkit-flex: 1 1 100%;\n -ms-flex: 1 1 100%;\n flex: 1 1 100%;\n max-width: 100%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-xs=\"100\"],\n [layout-gt-xs=\"row\"] > [flex-gt-xs=\"100\"] {\n -webkit-flex: 1 1 100%;\n -ms-flex: 1 1 100%;\n flex: 1 1 100%;\n max-width: 100%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-xs=\"100\"],\n [layout-gt-xs=\"column\"] > [flex-gt-xs=\"100\"] {\n -webkit-flex: 1 1 100%;\n -ms-flex: 1 1 100%;\n flex: 1 1 100%;\n max-width: 100%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-xs=\"33\"],\n [layout=\"row\"] > [flex-gt-xs=\"33\"],\n [layout-gt-xs=\"row\"] > [flex-gt-xs=\"33\"],\n [layout-gt-xs=\"row\"] > [flex-gt-xs=\"33\"] {\n -webkit-flex: 1 1 33%;\n -ms-flex: 1 1 33%;\n flex: 1 1 33%;\n max-width: calc(100% / 3);\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-xs=\"34\"],\n [layout=\"row\"] > [flex-gt-xs=\"34\"],\n [layout-gt-xs=\"row\"] > [flex-gt-xs=\"34\"],\n [layout-gt-xs=\"row\"] > [flex-gt-xs=\"34\"] {\n -webkit-flex: 1 1 34%;\n -ms-flex: 1 1 34%;\n flex: 1 1 34%;\n max-width: 34%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-xs=\"66\"],\n [layout=\"row\"] > [flex-gt-xs=\"66\"],\n [layout-gt-xs=\"row\"] > [flex-gt-xs=\"66\"],\n [layout-gt-xs=\"row\"] > [flex-gt-xs=\"66\"] {\n -webkit-flex: 1 1 66%;\n -ms-flex: 1 1 66%;\n flex: 1 1 66%;\n max-width: calc(200% / 3);\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-xs=\"67\"],\n [layout=\"row\"] > [flex-gt-xs=\"67\"],\n [layout-gt-xs=\"row\"] > [flex-gt-xs=\"67\"],\n [layout-gt-xs=\"row\"] > [flex-gt-xs=\"67\"] {\n -webkit-flex: 1 1 67%;\n -ms-flex: 1 1 67%;\n flex: 1 1 67%;\n max-width: 67%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-xs=\"33\"],\n [layout=\"column\"] > [flex-gt-xs=\"33\"],\n [layout-gt-xs=\"column\"] > [flex-gt-xs=\"33\"],\n [layout-gt-xs=\"column\"] > [flex-gt-xs=\"33\"] {\n -webkit-flex: 1 1 33%;\n -ms-flex: 1 1 33%;\n flex: 1 1 33%;\n max-width: 100%;\n max-height: calc(100% / 3);\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-xs=\"34\"],\n [layout=\"column\"] > [flex-gt-xs=\"34\"],\n [layout-gt-xs=\"column\"] > [flex-gt-xs=\"34\"],\n [layout-gt-xs=\"column\"] > [flex-gt-xs=\"34\"] {\n -webkit-flex: 1 1 34%;\n -ms-flex: 1 1 34%;\n flex: 1 1 34%;\n max-width: 100%;\n max-height: 34%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-xs=\"66\"],\n [layout=\"column\"] > [flex-gt-xs=\"66\"],\n [layout-gt-xs=\"column\"] > [flex-gt-xs=\"66\"],\n [layout-gt-xs=\"column\"] > [flex-gt-xs=\"66\"] {\n -webkit-flex: 1 1 66%;\n -ms-flex: 1 1 66%;\n flex: 1 1 66%;\n max-width: 100%;\n max-height: calc(200% / 3);\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-xs=\"67\"],\n [layout=\"column\"] > [flex-gt-xs=\"67\"],\n [layout-gt-xs=\"column\"] > [flex-gt-xs=\"67\"],\n [layout-gt-xs=\"column\"] > [flex-gt-xs=\"67\"] {\n -webkit-flex: 1 1 67%;\n -ms-flex: 1 1 67%;\n flex: 1 1 67%;\n max-width: 100%;\n max-height: 67%;\n box-sizing: border-box;\n }\n [layout-gt-xs],\n [layout-gt-xs=\"column\"],\n [layout-gt-xs=\"row\"] {\n box-sizing: border-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n }\n [layout-gt-xs=\"column\"] {\n -webkit-flex-direction: column;\n -ms-flex-direction: column;\n flex-direction: column;\n }\n [layout-gt-xs=\"row\"] {\n -webkit-flex-direction: row;\n -ms-flex-direction: row;\n flex-direction: row;\n }\n}\n\n@media (min-width: 600px) and (max-width: 959px) {\n [hide-sm]:not([show-gt-xs]):not([show-sm]):not([show]),\n [hide-gt-xs]:not([show-gt-xs]):not([show-sm]):not([show]) {\n display: none;\n }\n [hide-sm]:not([show-sm]):not([show]) {\n display: none;\n }\n [flex-order-sm=\"-20\"] {\n -webkit-order: -20;\n -ms-flex-order: -20;\n order: -20;\n }\n [flex-order-sm=\"-19\"] {\n -webkit-order: -19;\n -ms-flex-order: -19;\n order: -19;\n }\n [flex-order-sm=\"-18\"] {\n -webkit-order: -18;\n -ms-flex-order: -18;\n order: -18;\n }\n [flex-order-sm=\"-17\"] {\n -webkit-order: -17;\n -ms-flex-order: -17;\n order: -17;\n }\n [flex-order-sm=\"-16\"] {\n -webkit-order: -16;\n -ms-flex-order: -16;\n order: -16;\n }\n [flex-order-sm=\"-15\"] {\n -webkit-order: -15;\n -ms-flex-order: -15;\n order: -15;\n }\n [flex-order-sm=\"-14\"] {\n -webkit-order: -14;\n -ms-flex-order: -14;\n order: -14;\n }\n [flex-order-sm=\"-13\"] {\n -webkit-order: -13;\n -ms-flex-order: -13;\n order: -13;\n }\n [flex-order-sm=\"-12\"] {\n -webkit-order: -12;\n -ms-flex-order: -12;\n order: -12;\n }\n [flex-order-sm=\"-11\"] {\n -webkit-order: -11;\n -ms-flex-order: -11;\n order: -11;\n }\n [flex-order-sm=\"-10\"] {\n -webkit-order: -10;\n -ms-flex-order: -10;\n order: -10;\n }\n [flex-order-sm=\"-9\"] {\n -webkit-order: -9;\n -ms-flex-order: -9;\n order: -9;\n }\n [flex-order-sm=\"-8\"] {\n -webkit-order: -8;\n -ms-flex-order: -8;\n order: -8;\n }\n [flex-order-sm=\"-7\"] {\n -webkit-order: -7;\n -ms-flex-order: -7;\n order: -7;\n }\n [flex-order-sm=\"-6\"] {\n -webkit-order: -6;\n -ms-flex-order: -6;\n order: -6;\n }\n [flex-order-sm=\"-5\"] {\n -webkit-order: -5;\n -ms-flex-order: -5;\n order: -5;\n }\n [flex-order-sm=\"-4\"] {\n -webkit-order: -4;\n -ms-flex-order: -4;\n order: -4;\n }\n [flex-order-sm=\"-3\"] {\n -webkit-order: -3;\n -ms-flex-order: -3;\n order: -3;\n }\n [flex-order-sm=\"-2\"] {\n -webkit-order: -2;\n -ms-flex-order: -2;\n order: -2;\n }\n [flex-order-sm=\"-1\"] {\n -webkit-order: -1;\n -ms-flex-order: -1;\n order: -1;\n }\n [flex-order-sm=\"0\"] {\n -webkit-order: 0;\n -ms-flex-order: 0;\n order: 0;\n }\n [flex-order-sm=\"1\"] {\n -webkit-order: 1;\n -ms-flex-order: 1;\n order: 1;\n }\n [flex-order-sm=\"2\"] {\n -webkit-order: 2;\n -ms-flex-order: 2;\n order: 2;\n }\n [flex-order-sm=\"3\"] {\n -webkit-order: 3;\n -ms-flex-order: 3;\n order: 3;\n }\n [flex-order-sm=\"4\"] {\n -webkit-order: 4;\n -ms-flex-order: 4;\n order: 4;\n }\n [flex-order-sm=\"5\"] {\n -webkit-order: 5;\n -ms-flex-order: 5;\n order: 5;\n }\n [flex-order-sm=\"6\"] {\n -webkit-order: 6;\n -ms-flex-order: 6;\n order: 6;\n }\n [flex-order-sm=\"7\"] {\n -webkit-order: 7;\n -ms-flex-order: 7;\n order: 7;\n }\n [flex-order-sm=\"8\"] {\n -webkit-order: 8;\n -ms-flex-order: 8;\n order: 8;\n }\n [flex-order-sm=\"9\"] {\n -webkit-order: 9;\n -ms-flex-order: 9;\n order: 9;\n }\n [flex-order-sm=\"10\"] {\n -webkit-order: 10;\n -ms-flex-order: 10;\n order: 10;\n }\n [flex-order-sm=\"11\"] {\n -webkit-order: 11;\n -ms-flex-order: 11;\n order: 11;\n }\n [flex-order-sm=\"12\"] {\n -webkit-order: 12;\n -ms-flex-order: 12;\n order: 12;\n }\n [flex-order-sm=\"13\"] {\n -webkit-order: 13;\n -ms-flex-order: 13;\n order: 13;\n }\n [flex-order-sm=\"14\"] {\n -webkit-order: 14;\n -ms-flex-order: 14;\n order: 14;\n }\n [flex-order-sm=\"15\"] {\n -webkit-order: 15;\n -ms-flex-order: 15;\n order: 15;\n }\n [flex-order-sm=\"16\"] {\n -webkit-order: 16;\n -ms-flex-order: 16;\n order: 16;\n }\n [flex-order-sm=\"17\"] {\n -webkit-order: 17;\n -ms-flex-order: 17;\n order: 17;\n }\n [flex-order-sm=\"18\"] {\n -webkit-order: 18;\n -ms-flex-order: 18;\n order: 18;\n }\n [flex-order-sm=\"19\"] {\n -webkit-order: 19;\n -ms-flex-order: 19;\n order: 19;\n }\n [flex-order-sm=\"20\"] {\n -webkit-order: 20;\n -ms-flex-order: 20;\n order: 20;\n }\n [flex-offset-sm=\"0\"] {\n margin-left: 0%;\n }\n [flex-offset-sm=\"5\"] {\n margin-left: 5%;\n }\n [flex-offset-sm=\"10\"] {\n margin-left: 10%;\n }\n [flex-offset-sm=\"15\"] {\n margin-left: 15%;\n }\n [flex-offset-sm=\"20\"] {\n margin-left: 20%;\n }\n [flex-offset-sm=\"25\"] {\n margin-left: 25%;\n }\n [flex-offset-sm=\"30\"] {\n margin-left: 30%;\n }\n [flex-offset-sm=\"35\"] {\n margin-left: 35%;\n }\n [flex-offset-sm=\"40\"] {\n margin-left: 40%;\n }\n [flex-offset-sm=\"45\"] {\n margin-left: 45%;\n }\n [flex-offset-sm=\"50\"] {\n margin-left: 50%;\n }\n [flex-offset-sm=\"55\"] {\n margin-left: 55%;\n }\n [flex-offset-sm=\"60\"] {\n margin-left: 60%;\n }\n [flex-offset-sm=\"65\"] {\n margin-left: 65%;\n }\n [flex-offset-sm=\"70\"] {\n margin-left: 70%;\n }\n [flex-offset-sm=\"75\"] {\n margin-left: 75%;\n }\n [flex-offset-sm=\"80\"] {\n margin-left: 80%;\n }\n [flex-offset-sm=\"85\"] {\n margin-left: 85%;\n }\n [flex-offset-sm=\"90\"] {\n margin-left: 90%;\n }\n [flex-offset-sm=\"95\"] {\n margin-left: 95%;\n }\n [flex-offset-sm=\"33\"] {\n margin-left: calc(100% / 3);\n }\n [flex-offset-sm=\"66\"] {\n margin-left: calc(200% / 3);\n }\n [layout-align-sm] {\n -webkit-justify-content: flex-start;\n -ms-flex-pack: start;\n justify-content: flex-start;\n -webkit-align-content: stretch;\n -ms-flex-line-pack: stretch;\n align-content: stretch;\n -webkit-align-items: stretch;\n -ms-flex-align: stretch;\n align-items: stretch;\n }\n [layout-align-sm=\"start\"],\n [layout-align-sm=\"start start\"],\n [layout-align-sm=\"start center\"],\n [layout-align-sm=\"start end\"],\n [layout-align-sm=\"start stretch\"] {\n -webkit-justify-content: start;\n -ms-flex-pack: start;\n justify-content: start;\n }\n [layout-align-sm=\"center\"],\n [layout-align-sm=\"center start\"],\n [layout-align-sm=\"center center\"],\n [layout-align-sm=\"center end\"],\n [layout-align-sm=\"center stretch\"] {\n -webkit-justify-content: center;\n -ms-flex-pack: center;\n justify-content: center;\n }\n [layout-align-sm=\"end\"],\n [layout-align-sm=\"end center\"],\n [layout-align-sm=\"end start\"],\n [layout-align-sm=\"end end\"],\n [layout-align-sm=\"end stretch\"] {\n -webkit-justify-content: flex-end;\n -ms-flex-pack: end;\n justify-content: flex-end;\n }\n [layout-align-sm=\"space-around\"],\n [layout-align-sm=\"space-around center\"],\n [layout-align-sm=\"space-around start\"],\n [layout-align-sm=\"space-around end\"],\n [layout-align-sm=\"space-around stretch\"] {\n -webkit-justify-content: space-around;\n -ms-flex-pack: distribute;\n justify-content: space-around;\n }\n [layout-align-sm=\"space-between\"],\n [layout-align-sm=\"space-between center\"],\n [layout-align-sm=\"space-between start\"],\n [layout-align-sm=\"space-between end\"],\n [layout-align-sm=\"space-between stretch\"] {\n -webkit-justify-content: space-between;\n -ms-flex-pack: justify;\n justify-content: space-between;\n }\n [layout-align-sm=\"start start\"],\n [layout-align-sm=\"center start\"],\n [layout-align-sm=\"end start\"],\n [layout-align-sm=\"space-between start\"],\n [layout-align-sm=\"space-around start\"] {\n -webkit-align-items: flex-start;\n -ms-flex-align: start;\n align-items: flex-start;\n -webkit-align-content: flex-start;\n -ms-flex-line-pack: start;\n align-content: flex-start;\n }\n [layout-align-sm=\"start center\"],\n [layout-align-sm=\"center center\"],\n [layout-align-sm=\"end center\"],\n [layout-align-sm=\"space-between center\"],\n [layout-align-sm=\"space-around center\"] {\n -webkit-align-items: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-align-content: center;\n -ms-flex-line-pack: center;\n align-content: center;\n max-width: 100%;\n }\n [layout-align-sm=\"start center\"] > *,\n [layout-align-sm=\"center center\"] > *,\n [layout-align-sm=\"end center\"] > *,\n [layout-align-sm=\"space-between center\"] > *,\n [layout-align-sm=\"space-around center\"] > * {\n max-width: 100%;\n box-sizing: border-box;\n }\n [layout-align-sm=\"start end\"],\n [layout-align-sm=\"center end\"],\n [layout-align-sm=\"end end\"],\n [layout-align-sm=\"space-between end\"],\n [layout-align-sm=\"space-around end\"] {\n -webkit-align-items: flex-end;\n -ms-flex-align: end;\n align-items: flex-end;\n -webkit-align-content: flex-end;\n -ms-flex-line-pack: end;\n align-content: flex-end;\n }\n [layout-align-sm=\"start stretch\"],\n [layout-align-sm=\"center stretch\"],\n [layout-align-sm=\"end stretch\"],\n [layout-align-sm=\"space-between stretch\"],\n [layout-align-sm=\"space-around stretch\"] {\n -webkit-align-items: stretch;\n -ms-flex-align: stretch;\n align-items: stretch;\n -webkit-align-content: stretch;\n -ms-flex-line-pack: stretch;\n align-content: stretch;\n }\n [flex-sm] {\n -webkit-flex: 1;\n -ms-flex: 1;\n flex: 1;\n box-sizing: border-box;\n }\n}\n\n@media screen and (min-width: 600px) and (max-width: 959px) {\n [flex-sm] {\n -webkit-flex: 1 1 0%;\n -ms-flex: 1 1 0%;\n flex: 1 1 0%;\n }\n}\n\n@media (min-width: 600px) and (max-width: 959px) {\n [flex-sm-grow] {\n -webkit-flex: 1 1 100%;\n -ms-flex: 1 1 100%;\n flex: 1 1 100%;\n box-sizing: border-box;\n }\n [flex-sm-initial] {\n -webkit-flex: 0 1 auto;\n -ms-flex: 0 1 auto;\n flex: 0 1 auto;\n box-sizing: border-box;\n }\n [flex-sm-auto] {\n -webkit-flex: 1 1 auto;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n box-sizing: border-box;\n }\n [flex-sm-none] {\n -webkit-flex: 0 0 auto;\n -ms-flex: 0 0 auto;\n flex: 0 0 auto;\n box-sizing: border-box;\n }\n [flex-sm=\"0\"] {\n -webkit-flex: 1 1 0%;\n -ms-flex: 1 1 0%;\n flex: 1 1 0%;\n max-width: 0%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-sm=\"0\"],\n [layout-sm=\"row\"] > [flex-sm=\"0\"] {\n -webkit-flex: 1 1 0%;\n -ms-flex: 1 1 0%;\n flex: 1 1 0%;\n max-width: 0%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-sm=\"0\"],\n [layout-sm=\"column\"] > [flex-sm=\"0\"] {\n -webkit-flex: 1 1 0%;\n -ms-flex: 1 1 0%;\n flex: 1 1 0%;\n max-width: 100%;\n max-height: 0%;\n box-sizing: border-box;\n }\n [flex-sm=\"5\"] {\n -webkit-flex: 1 1 5%;\n -ms-flex: 1 1 5%;\n flex: 1 1 5%;\n max-width: 5%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-sm=\"5\"],\n [layout-sm=\"row\"] > [flex-sm=\"5\"] {\n -webkit-flex: 1 1 5%;\n -ms-flex: 1 1 5%;\n flex: 1 1 5%;\n max-width: 5%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-sm=\"5\"],\n [layout-sm=\"column\"] > [flex-sm=\"5\"] {\n -webkit-flex: 1 1 5%;\n -ms-flex: 1 1 5%;\n flex: 1 1 5%;\n max-width: 100%;\n max-height: 5%;\n box-sizing: border-box;\n }\n [flex-sm=\"10\"] {\n -webkit-flex: 1 1 10%;\n -ms-flex: 1 1 10%;\n flex: 1 1 10%;\n max-width: 10%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-sm=\"10\"],\n [layout-sm=\"row\"] > [flex-sm=\"10\"] {\n -webkit-flex: 1 1 10%;\n -ms-flex: 1 1 10%;\n flex: 1 1 10%;\n max-width: 10%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-sm=\"10\"],\n [layout-sm=\"column\"] > [flex-sm=\"10\"] {\n -webkit-flex: 1 1 10%;\n -ms-flex: 1 1 10%;\n flex: 1 1 10%;\n max-width: 100%;\n max-height: 10%;\n box-sizing: border-box;\n }\n [flex-sm=\"15\"] {\n -webkit-flex: 1 1 15%;\n -ms-flex: 1 1 15%;\n flex: 1 1 15%;\n max-width: 15%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-sm=\"15\"],\n [layout-sm=\"row\"] > [flex-sm=\"15\"] {\n -webkit-flex: 1 1 15%;\n -ms-flex: 1 1 15%;\n flex: 1 1 15%;\n max-width: 15%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-sm=\"15\"],\n [layout-sm=\"column\"] > [flex-sm=\"15\"] {\n -webkit-flex: 1 1 15%;\n -ms-flex: 1 1 15%;\n flex: 1 1 15%;\n max-width: 100%;\n max-height: 15%;\n box-sizing: border-box;\n }\n [flex-sm=\"20\"] {\n -webkit-flex: 1 1 20%;\n -ms-flex: 1 1 20%;\n flex: 1 1 20%;\n max-width: 20%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-sm=\"20\"],\n [layout-sm=\"row\"] > [flex-sm=\"20\"] {\n -webkit-flex: 1 1 20%;\n -ms-flex: 1 1 20%;\n flex: 1 1 20%;\n max-width: 20%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-sm=\"20\"],\n [layout-sm=\"column\"] > [flex-sm=\"20\"] {\n -webkit-flex: 1 1 20%;\n -ms-flex: 1 1 20%;\n flex: 1 1 20%;\n max-width: 100%;\n max-height: 20%;\n box-sizing: border-box;\n }\n [flex-sm=\"25\"] {\n -webkit-flex: 1 1 25%;\n -ms-flex: 1 1 25%;\n flex: 1 1 25%;\n max-width: 25%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-sm=\"25\"],\n [layout-sm=\"row\"] > [flex-sm=\"25\"] {\n -webkit-flex: 1 1 25%;\n -ms-flex: 1 1 25%;\n flex: 1 1 25%;\n max-width: 25%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-sm=\"25\"],\n [layout-sm=\"column\"] > [flex-sm=\"25\"] {\n -webkit-flex: 1 1 25%;\n -ms-flex: 1 1 25%;\n flex: 1 1 25%;\n max-width: 100%;\n max-height: 25%;\n box-sizing: border-box;\n }\n [flex-sm=\"30\"] {\n -webkit-flex: 1 1 30%;\n -ms-flex: 1 1 30%;\n flex: 1 1 30%;\n max-width: 30%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-sm=\"30\"],\n [layout-sm=\"row\"] > [flex-sm=\"30\"] {\n -webkit-flex: 1 1 30%;\n -ms-flex: 1 1 30%;\n flex: 1 1 30%;\n max-width: 30%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-sm=\"30\"],\n [layout-sm=\"column\"] > [flex-sm=\"30\"] {\n -webkit-flex: 1 1 30%;\n -ms-flex: 1 1 30%;\n flex: 1 1 30%;\n max-width: 100%;\n max-height: 30%;\n box-sizing: border-box;\n }\n [flex-sm=\"35\"] {\n -webkit-flex: 1 1 35%;\n -ms-flex: 1 1 35%;\n flex: 1 1 35%;\n max-width: 35%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-sm=\"35\"],\n [layout-sm=\"row\"] > [flex-sm=\"35\"] {\n -webkit-flex: 1 1 35%;\n -ms-flex: 1 1 35%;\n flex: 1 1 35%;\n max-width: 35%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-sm=\"35\"],\n [layout-sm=\"column\"] > [flex-sm=\"35\"] {\n -webkit-flex: 1 1 35%;\n -ms-flex: 1 1 35%;\n flex: 1 1 35%;\n max-width: 100%;\n max-height: 35%;\n box-sizing: border-box;\n }\n [flex-sm=\"40\"] {\n -webkit-flex: 1 1 40%;\n -ms-flex: 1 1 40%;\n flex: 1 1 40%;\n max-width: 40%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-sm=\"40\"],\n [layout-sm=\"row\"] > [flex-sm=\"40\"] {\n -webkit-flex: 1 1 40%;\n -ms-flex: 1 1 40%;\n flex: 1 1 40%;\n max-width: 40%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-sm=\"40\"],\n [layout-sm=\"column\"] > [flex-sm=\"40\"] {\n -webkit-flex: 1 1 40%;\n -ms-flex: 1 1 40%;\n flex: 1 1 40%;\n max-width: 100%;\n max-height: 40%;\n box-sizing: border-box;\n }\n [flex-sm=\"45\"] {\n -webkit-flex: 1 1 45%;\n -ms-flex: 1 1 45%;\n flex: 1 1 45%;\n max-width: 45%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-sm=\"45\"],\n [layout-sm=\"row\"] > [flex-sm=\"45\"] {\n -webkit-flex: 1 1 45%;\n -ms-flex: 1 1 45%;\n flex: 1 1 45%;\n max-width: 45%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-sm=\"45\"],\n [layout-sm=\"column\"] > [flex-sm=\"45\"] {\n -webkit-flex: 1 1 45%;\n -ms-flex: 1 1 45%;\n flex: 1 1 45%;\n max-width: 100%;\n max-height: 45%;\n box-sizing: border-box;\n }\n [flex-sm=\"50\"] {\n -webkit-flex: 1 1 50%;\n -ms-flex: 1 1 50%;\n flex: 1 1 50%;\n max-width: 50%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-sm=\"50\"],\n [layout-sm=\"row\"] > [flex-sm=\"50\"] {\n -webkit-flex: 1 1 50%;\n -ms-flex: 1 1 50%;\n flex: 1 1 50%;\n max-width: 50%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-sm=\"50\"],\n [layout-sm=\"column\"] > [flex-sm=\"50\"] {\n -webkit-flex: 1 1 50%;\n -ms-flex: 1 1 50%;\n flex: 1 1 50%;\n max-width: 100%;\n max-height: 50%;\n box-sizing: border-box;\n }\n [flex-sm=\"55\"] {\n -webkit-flex: 1 1 55%;\n -ms-flex: 1 1 55%;\n flex: 1 1 55%;\n max-width: 55%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-sm=\"55\"],\n [layout-sm=\"row\"] > [flex-sm=\"55\"] {\n -webkit-flex: 1 1 55%;\n -ms-flex: 1 1 55%;\n flex: 1 1 55%;\n max-width: 55%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-sm=\"55\"],\n [layout-sm=\"column\"] > [flex-sm=\"55\"] {\n -webkit-flex: 1 1 55%;\n -ms-flex: 1 1 55%;\n flex: 1 1 55%;\n max-width: 100%;\n max-height: 55%;\n box-sizing: border-box;\n }\n [flex-sm=\"60\"] {\n -webkit-flex: 1 1 60%;\n -ms-flex: 1 1 60%;\n flex: 1 1 60%;\n max-width: 60%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-sm=\"60\"],\n [layout-sm=\"row\"] > [flex-sm=\"60\"] {\n -webkit-flex: 1 1 60%;\n -ms-flex: 1 1 60%;\n flex: 1 1 60%;\n max-width: 60%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-sm=\"60\"],\n [layout-sm=\"column\"] > [flex-sm=\"60\"] {\n -webkit-flex: 1 1 60%;\n -ms-flex: 1 1 60%;\n flex: 1 1 60%;\n max-width: 100%;\n max-height: 60%;\n box-sizing: border-box;\n }\n [flex-sm=\"65\"] {\n -webkit-flex: 1 1 65%;\n -ms-flex: 1 1 65%;\n flex: 1 1 65%;\n max-width: 65%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-sm=\"65\"],\n [layout-sm=\"row\"] > [flex-sm=\"65\"] {\n -webkit-flex: 1 1 65%;\n -ms-flex: 1 1 65%;\n flex: 1 1 65%;\n max-width: 65%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-sm=\"65\"],\n [layout-sm=\"column\"] > [flex-sm=\"65\"] {\n -webkit-flex: 1 1 65%;\n -ms-flex: 1 1 65%;\n flex: 1 1 65%;\n max-width: 100%;\n max-height: 65%;\n box-sizing: border-box;\n }\n [flex-sm=\"70\"] {\n -webkit-flex: 1 1 70%;\n -ms-flex: 1 1 70%;\n flex: 1 1 70%;\n max-width: 70%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-sm=\"70\"],\n [layout-sm=\"row\"] > [flex-sm=\"70\"] {\n -webkit-flex: 1 1 70%;\n -ms-flex: 1 1 70%;\n flex: 1 1 70%;\n max-width: 70%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-sm=\"70\"],\n [layout-sm=\"column\"] > [flex-sm=\"70\"] {\n -webkit-flex: 1 1 70%;\n -ms-flex: 1 1 70%;\n flex: 1 1 70%;\n max-width: 100%;\n max-height: 70%;\n box-sizing: border-box;\n }\n [flex-sm=\"75\"] {\n -webkit-flex: 1 1 75%;\n -ms-flex: 1 1 75%;\n flex: 1 1 75%;\n max-width: 75%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-sm=\"75\"],\n [layout-sm=\"row\"] > [flex-sm=\"75\"] {\n -webkit-flex: 1 1 75%;\n -ms-flex: 1 1 75%;\n flex: 1 1 75%;\n max-width: 75%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-sm=\"75\"],\n [layout-sm=\"column\"] > [flex-sm=\"75\"] {\n -webkit-flex: 1 1 75%;\n -ms-flex: 1 1 75%;\n flex: 1 1 75%;\n max-width: 100%;\n max-height: 75%;\n box-sizing: border-box;\n }\n [flex-sm=\"80\"] {\n -webkit-flex: 1 1 80%;\n -ms-flex: 1 1 80%;\n flex: 1 1 80%;\n max-width: 80%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-sm=\"80\"],\n [layout-sm=\"row\"] > [flex-sm=\"80\"] {\n -webkit-flex: 1 1 80%;\n -ms-flex: 1 1 80%;\n flex: 1 1 80%;\n max-width: 80%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-sm=\"80\"],\n [layout-sm=\"column\"] > [flex-sm=\"80\"] {\n -webkit-flex: 1 1 80%;\n -ms-flex: 1 1 80%;\n flex: 1 1 80%;\n max-width: 100%;\n max-height: 80%;\n box-sizing: border-box;\n }\n [flex-sm=\"85\"] {\n -webkit-flex: 1 1 85%;\n -ms-flex: 1 1 85%;\n flex: 1 1 85%;\n max-width: 85%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-sm=\"85\"],\n [layout-sm=\"row\"] > [flex-sm=\"85\"] {\n -webkit-flex: 1 1 85%;\n -ms-flex: 1 1 85%;\n flex: 1 1 85%;\n max-width: 85%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-sm=\"85\"],\n [layout-sm=\"column\"] > [flex-sm=\"85\"] {\n -webkit-flex: 1 1 85%;\n -ms-flex: 1 1 85%;\n flex: 1 1 85%;\n max-width: 100%;\n max-height: 85%;\n box-sizing: border-box;\n }\n [flex-sm=\"90\"] {\n -webkit-flex: 1 1 90%;\n -ms-flex: 1 1 90%;\n flex: 1 1 90%;\n max-width: 90%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-sm=\"90\"],\n [layout-sm=\"row\"] > [flex-sm=\"90\"] {\n -webkit-flex: 1 1 90%;\n -ms-flex: 1 1 90%;\n flex: 1 1 90%;\n max-width: 90%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-sm=\"90\"],\n [layout-sm=\"column\"] > [flex-sm=\"90\"] {\n -webkit-flex: 1 1 90%;\n -ms-flex: 1 1 90%;\n flex: 1 1 90%;\n max-width: 100%;\n max-height: 90%;\n box-sizing: border-box;\n }\n [flex-sm=\"95\"] {\n -webkit-flex: 1 1 95%;\n -ms-flex: 1 1 95%;\n flex: 1 1 95%;\n max-width: 95%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-sm=\"95\"],\n [layout-sm=\"row\"] > [flex-sm=\"95\"] {\n -webkit-flex: 1 1 95%;\n -ms-flex: 1 1 95%;\n flex: 1 1 95%;\n max-width: 95%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-sm=\"95\"],\n [layout-sm=\"column\"] > [flex-sm=\"95\"] {\n -webkit-flex: 1 1 95%;\n -ms-flex: 1 1 95%;\n flex: 1 1 95%;\n max-width: 100%;\n max-height: 95%;\n box-sizing: border-box;\n }\n [flex-sm=\"100\"] {\n -webkit-flex: 1 1 100%;\n -ms-flex: 1 1 100%;\n flex: 1 1 100%;\n max-width: 100%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-sm=\"100\"],\n [layout-sm=\"row\"] > [flex-sm=\"100\"] {\n -webkit-flex: 1 1 100%;\n -ms-flex: 1 1 100%;\n flex: 1 1 100%;\n max-width: 100%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-sm=\"100\"],\n [layout-sm=\"column\"] > [flex-sm=\"100\"] {\n -webkit-flex: 1 1 100%;\n -ms-flex: 1 1 100%;\n flex: 1 1 100%;\n max-width: 100%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-sm=\"33\"],\n [layout=\"row\"] > [flex-sm=\"33\"],\n [layout-sm=\"row\"] > [flex-sm=\"33\"],\n [layout-sm=\"row\"] > [flex-sm=\"33\"] {\n -webkit-flex: 1 1 33%;\n -ms-flex: 1 1 33%;\n flex: 1 1 33%;\n max-width: calc(100% / 3);\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-sm=\"34\"],\n [layout=\"row\"] > [flex-sm=\"34\"],\n [layout-sm=\"row\"] > [flex-sm=\"34\"],\n [layout-sm=\"row\"] > [flex-sm=\"34\"] {\n -webkit-flex: 1 1 34%;\n -ms-flex: 1 1 34%;\n flex: 1 1 34%;\n max-width: 34%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-sm=\"66\"],\n [layout=\"row\"] > [flex-sm=\"66\"],\n [layout-sm=\"row\"] > [flex-sm=\"66\"],\n [layout-sm=\"row\"] > [flex-sm=\"66\"] {\n -webkit-flex: 1 1 66%;\n -ms-flex: 1 1 66%;\n flex: 1 1 66%;\n max-width: calc(200% / 3);\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-sm=\"67\"],\n [layout=\"row\"] > [flex-sm=\"67\"],\n [layout-sm=\"row\"] > [flex-sm=\"67\"],\n [layout-sm=\"row\"] > [flex-sm=\"67\"] {\n -webkit-flex: 1 1 67%;\n -ms-flex: 1 1 67%;\n flex: 1 1 67%;\n max-width: 67%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-sm=\"33\"],\n [layout=\"column\"] > [flex-sm=\"33\"],\n [layout-sm=\"column\"] > [flex-sm=\"33\"],\n [layout-sm=\"column\"] > [flex-sm=\"33\"] {\n -webkit-flex: 1 1 33%;\n -ms-flex: 1 1 33%;\n flex: 1 1 33%;\n max-width: 100%;\n max-height: calc(100% / 3);\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-sm=\"34\"],\n [layout=\"column\"] > [flex-sm=\"34\"],\n [layout-sm=\"column\"] > [flex-sm=\"34\"],\n [layout-sm=\"column\"] > [flex-sm=\"34\"] {\n -webkit-flex: 1 1 34%;\n -ms-flex: 1 1 34%;\n flex: 1 1 34%;\n max-width: 100%;\n max-height: 34%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-sm=\"66\"],\n [layout=\"column\"] > [flex-sm=\"66\"],\n [layout-sm=\"column\"] > [flex-sm=\"66\"],\n [layout-sm=\"column\"] > [flex-sm=\"66\"] {\n -webkit-flex: 1 1 66%;\n -ms-flex: 1 1 66%;\n flex: 1 1 66%;\n max-width: 100%;\n max-height: calc(200% / 3);\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-sm=\"67\"],\n [layout=\"column\"] > [flex-sm=\"67\"],\n [layout-sm=\"column\"] > [flex-sm=\"67\"],\n [layout-sm=\"column\"] > [flex-sm=\"67\"] {\n -webkit-flex: 1 1 67%;\n -ms-flex: 1 1 67%;\n flex: 1 1 67%;\n max-width: 100%;\n max-height: 67%;\n box-sizing: border-box;\n }\n [layout-sm],\n [layout-sm=\"column\"],\n [layout-sm=\"row\"] {\n box-sizing: border-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n }\n [layout-sm=\"column\"] {\n -webkit-flex-direction: column;\n -ms-flex-direction: column;\n flex-direction: column;\n }\n [layout-sm=\"row\"] {\n -webkit-flex-direction: row;\n -ms-flex-direction: row;\n flex-direction: row;\n }\n}\n\n@media (min-width: 960px) {\n [flex-order-gt-sm=\"-20\"] {\n -webkit-order: -20;\n -ms-flex-order: -20;\n order: -20;\n }\n [flex-order-gt-sm=\"-19\"] {\n -webkit-order: -19;\n -ms-flex-order: -19;\n order: -19;\n }\n [flex-order-gt-sm=\"-18\"] {\n -webkit-order: -18;\n -ms-flex-order: -18;\n order: -18;\n }\n [flex-order-gt-sm=\"-17\"] {\n -webkit-order: -17;\n -ms-flex-order: -17;\n order: -17;\n }\n [flex-order-gt-sm=\"-16\"] {\n -webkit-order: -16;\n -ms-flex-order: -16;\n order: -16;\n }\n [flex-order-gt-sm=\"-15\"] {\n -webkit-order: -15;\n -ms-flex-order: -15;\n order: -15;\n }\n [flex-order-gt-sm=\"-14\"] {\n -webkit-order: -14;\n -ms-flex-order: -14;\n order: -14;\n }\n [flex-order-gt-sm=\"-13\"] {\n -webkit-order: -13;\n -ms-flex-order: -13;\n order: -13;\n }\n [flex-order-gt-sm=\"-12\"] {\n -webkit-order: -12;\n -ms-flex-order: -12;\n order: -12;\n }\n [flex-order-gt-sm=\"-11\"] {\n -webkit-order: -11;\n -ms-flex-order: -11;\n order: -11;\n }\n [flex-order-gt-sm=\"-10\"] {\n -webkit-order: -10;\n -ms-flex-order: -10;\n order: -10;\n }\n [flex-order-gt-sm=\"-9\"] {\n -webkit-order: -9;\n -ms-flex-order: -9;\n order: -9;\n }\n [flex-order-gt-sm=\"-8\"] {\n -webkit-order: -8;\n -ms-flex-order: -8;\n order: -8;\n }\n [flex-order-gt-sm=\"-7\"] {\n -webkit-order: -7;\n -ms-flex-order: -7;\n order: -7;\n }\n [flex-order-gt-sm=\"-6\"] {\n -webkit-order: -6;\n -ms-flex-order: -6;\n order: -6;\n }\n [flex-order-gt-sm=\"-5\"] {\n -webkit-order: -5;\n -ms-flex-order: -5;\n order: -5;\n }\n [flex-order-gt-sm=\"-4\"] {\n -webkit-order: -4;\n -ms-flex-order: -4;\n order: -4;\n }\n [flex-order-gt-sm=\"-3\"] {\n -webkit-order: -3;\n -ms-flex-order: -3;\n order: -3;\n }\n [flex-order-gt-sm=\"-2\"] {\n -webkit-order: -2;\n -ms-flex-order: -2;\n order: -2;\n }\n [flex-order-gt-sm=\"-1\"] {\n -webkit-order: -1;\n -ms-flex-order: -1;\n order: -1;\n }\n [flex-order-gt-sm=\"0\"] {\n -webkit-order: 0;\n -ms-flex-order: 0;\n order: 0;\n }\n [flex-order-gt-sm=\"1\"] {\n -webkit-order: 1;\n -ms-flex-order: 1;\n order: 1;\n }\n [flex-order-gt-sm=\"2\"] {\n -webkit-order: 2;\n -ms-flex-order: 2;\n order: 2;\n }\n [flex-order-gt-sm=\"3\"] {\n -webkit-order: 3;\n -ms-flex-order: 3;\n order: 3;\n }\n [flex-order-gt-sm=\"4\"] {\n -webkit-order: 4;\n -ms-flex-order: 4;\n order: 4;\n }\n [flex-order-gt-sm=\"5\"] {\n -webkit-order: 5;\n -ms-flex-order: 5;\n order: 5;\n }\n [flex-order-gt-sm=\"6\"] {\n -webkit-order: 6;\n -ms-flex-order: 6;\n order: 6;\n }\n [flex-order-gt-sm=\"7\"] {\n -webkit-order: 7;\n -ms-flex-order: 7;\n order: 7;\n }\n [flex-order-gt-sm=\"8\"] {\n -webkit-order: 8;\n -ms-flex-order: 8;\n order: 8;\n }\n [flex-order-gt-sm=\"9\"] {\n -webkit-order: 9;\n -ms-flex-order: 9;\n order: 9;\n }\n [flex-order-gt-sm=\"10\"] {\n -webkit-order: 10;\n -ms-flex-order: 10;\n order: 10;\n }\n [flex-order-gt-sm=\"11\"] {\n -webkit-order: 11;\n -ms-flex-order: 11;\n order: 11;\n }\n [flex-order-gt-sm=\"12\"] {\n -webkit-order: 12;\n -ms-flex-order: 12;\n order: 12;\n }\n [flex-order-gt-sm=\"13\"] {\n -webkit-order: 13;\n -ms-flex-order: 13;\n order: 13;\n }\n [flex-order-gt-sm=\"14\"] {\n -webkit-order: 14;\n -ms-flex-order: 14;\n order: 14;\n }\n [flex-order-gt-sm=\"15\"] {\n -webkit-order: 15;\n -ms-flex-order: 15;\n order: 15;\n }\n [flex-order-gt-sm=\"16\"] {\n -webkit-order: 16;\n -ms-flex-order: 16;\n order: 16;\n }\n [flex-order-gt-sm=\"17\"] {\n -webkit-order: 17;\n -ms-flex-order: 17;\n order: 17;\n }\n [flex-order-gt-sm=\"18\"] {\n -webkit-order: 18;\n -ms-flex-order: 18;\n order: 18;\n }\n [flex-order-gt-sm=\"19\"] {\n -webkit-order: 19;\n -ms-flex-order: 19;\n order: 19;\n }\n [flex-order-gt-sm=\"20\"] {\n -webkit-order: 20;\n -ms-flex-order: 20;\n order: 20;\n }\n [flex-offset-gt-sm=\"0\"] {\n margin-left: 0%;\n }\n [flex-offset-gt-sm=\"5\"] {\n margin-left: 5%;\n }\n [flex-offset-gt-sm=\"10\"] {\n margin-left: 10%;\n }\n [flex-offset-gt-sm=\"15\"] {\n margin-left: 15%;\n }\n [flex-offset-gt-sm=\"20\"] {\n margin-left: 20%;\n }\n [flex-offset-gt-sm=\"25\"] {\n margin-left: 25%;\n }\n [flex-offset-gt-sm=\"30\"] {\n margin-left: 30%;\n }\n [flex-offset-gt-sm=\"35\"] {\n margin-left: 35%;\n }\n [flex-offset-gt-sm=\"40\"] {\n margin-left: 40%;\n }\n [flex-offset-gt-sm=\"45\"] {\n margin-left: 45%;\n }\n [flex-offset-gt-sm=\"50\"] {\n margin-left: 50%;\n }\n [flex-offset-gt-sm=\"55\"] {\n margin-left: 55%;\n }\n [flex-offset-gt-sm=\"60\"] {\n margin-left: 60%;\n }\n [flex-offset-gt-sm=\"65\"] {\n margin-left: 65%;\n }\n [flex-offset-gt-sm=\"70\"] {\n margin-left: 70%;\n }\n [flex-offset-gt-sm=\"75\"] {\n margin-left: 75%;\n }\n [flex-offset-gt-sm=\"80\"] {\n margin-left: 80%;\n }\n [flex-offset-gt-sm=\"85\"] {\n margin-left: 85%;\n }\n [flex-offset-gt-sm=\"90\"] {\n margin-left: 90%;\n }\n [flex-offset-gt-sm=\"95\"] {\n margin-left: 95%;\n }\n [flex-offset-gt-sm=\"33\"] {\n margin-left: calc(100% / 3);\n }\n [flex-offset-gt-sm=\"66\"] {\n margin-left: calc(200% / 3);\n }\n [layout-align-gt-sm] {\n -webkit-justify-content: flex-start;\n -ms-flex-pack: start;\n justify-content: flex-start;\n -webkit-align-content: stretch;\n -ms-flex-line-pack: stretch;\n align-content: stretch;\n -webkit-align-items: stretch;\n -ms-flex-align: stretch;\n align-items: stretch;\n }\n [layout-align-gt-sm=\"start\"],\n [layout-align-gt-sm=\"start start\"],\n [layout-align-gt-sm=\"start center\"],\n [layout-align-gt-sm=\"start end\"],\n [layout-align-gt-sm=\"start stretch\"] {\n -webkit-justify-content: start;\n -ms-flex-pack: start;\n justify-content: start;\n }\n [layout-align-gt-sm=\"center\"],\n [layout-align-gt-sm=\"center start\"],\n [layout-align-gt-sm=\"center center\"],\n [layout-align-gt-sm=\"center end\"],\n [layout-align-gt-sm=\"center stretch\"] {\n -webkit-justify-content: center;\n -ms-flex-pack: center;\n justify-content: center;\n }\n [layout-align-gt-sm=\"end\"],\n [layout-align-gt-sm=\"end center\"],\n [layout-align-gt-sm=\"end start\"],\n [layout-align-gt-sm=\"end end\"],\n [layout-align-gt-sm=\"end stretch\"] {\n -webkit-justify-content: flex-end;\n -ms-flex-pack: end;\n justify-content: flex-end;\n }\n [layout-align-gt-sm=\"space-around\"],\n [layout-align-gt-sm=\"space-around center\"],\n [layout-align-gt-sm=\"space-around start\"],\n [layout-align-gt-sm=\"space-around end\"],\n [layout-align-gt-sm=\"space-around stretch\"] {\n -webkit-justify-content: space-around;\n -ms-flex-pack: distribute;\n justify-content: space-around;\n }\n [layout-align-gt-sm=\"space-between\"],\n [layout-align-gt-sm=\"space-between center\"],\n [layout-align-gt-sm=\"space-between start\"],\n [layout-align-gt-sm=\"space-between end\"],\n [layout-align-gt-sm=\"space-between stretch\"] {\n -webkit-justify-content: space-between;\n -ms-flex-pack: justify;\n justify-content: space-between;\n }\n [layout-align-gt-sm=\"start start\"],\n [layout-align-gt-sm=\"center start\"],\n [layout-align-gt-sm=\"end start\"],\n [layout-align-gt-sm=\"space-between start\"],\n [layout-align-gt-sm=\"space-around start\"] {\n -webkit-align-items: flex-start;\n -ms-flex-align: start;\n align-items: flex-start;\n -webkit-align-content: flex-start;\n -ms-flex-line-pack: start;\n align-content: flex-start;\n }\n [layout-align-gt-sm=\"start center\"],\n [layout-align-gt-sm=\"center center\"],\n [layout-align-gt-sm=\"end center\"],\n [layout-align-gt-sm=\"space-between center\"],\n [layout-align-gt-sm=\"space-around center\"] {\n -webkit-align-items: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-align-content: center;\n -ms-flex-line-pack: center;\n align-content: center;\n max-width: 100%;\n }\n [layout-align-gt-sm=\"start center\"] > *,\n [layout-align-gt-sm=\"center center\"] > *,\n [layout-align-gt-sm=\"end center\"] > *,\n [layout-align-gt-sm=\"space-between center\"] > *,\n [layout-align-gt-sm=\"space-around center\"] > * {\n max-width: 100%;\n box-sizing: border-box;\n }\n [layout-align-gt-sm=\"start end\"],\n [layout-align-gt-sm=\"center end\"],\n [layout-align-gt-sm=\"end end\"],\n [layout-align-gt-sm=\"space-between end\"],\n [layout-align-gt-sm=\"space-around end\"] {\n -webkit-align-items: flex-end;\n -ms-flex-align: end;\n align-items: flex-end;\n -webkit-align-content: flex-end;\n -ms-flex-line-pack: end;\n align-content: flex-end;\n }\n [layout-align-gt-sm=\"start stretch\"],\n [layout-align-gt-sm=\"center stretch\"],\n [layout-align-gt-sm=\"end stretch\"],\n [layout-align-gt-sm=\"space-between stretch\"],\n [layout-align-gt-sm=\"space-around stretch\"] {\n -webkit-align-items: stretch;\n -ms-flex-align: stretch;\n align-items: stretch;\n -webkit-align-content: stretch;\n -ms-flex-line-pack: stretch;\n align-content: stretch;\n }\n [flex-gt-sm] {\n -webkit-flex: 1;\n -ms-flex: 1;\n flex: 1;\n box-sizing: border-box;\n }\n}\n\n@media screen and (min-width: 960px) {\n [flex-gt-sm] {\n -webkit-flex: 1 1 0%;\n -ms-flex: 1 1 0%;\n flex: 1 1 0%;\n }\n}\n\n@media (min-width: 960px) {\n [flex-gt-sm-grow] {\n -webkit-flex: 1 1 100%;\n -ms-flex: 1 1 100%;\n flex: 1 1 100%;\n box-sizing: border-box;\n }\n [flex-gt-sm-initial] {\n -webkit-flex: 0 1 auto;\n -ms-flex: 0 1 auto;\n flex: 0 1 auto;\n box-sizing: border-box;\n }\n [flex-gt-sm-auto] {\n -webkit-flex: 1 1 auto;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n box-sizing: border-box;\n }\n [flex-gt-sm-none] {\n -webkit-flex: 0 0 auto;\n -ms-flex: 0 0 auto;\n flex: 0 0 auto;\n box-sizing: border-box;\n }\n [flex-gt-sm=\"0\"] {\n -webkit-flex: 1 1 0%;\n -ms-flex: 1 1 0%;\n flex: 1 1 0%;\n max-width: 0%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-sm=\"0\"],\n [layout-gt-sm=\"row\"] > [flex-gt-sm=\"0\"] {\n -webkit-flex: 1 1 0%;\n -ms-flex: 1 1 0%;\n flex: 1 1 0%;\n max-width: 0%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-sm=\"0\"],\n [layout-gt-sm=\"column\"] > [flex-gt-sm=\"0\"] {\n -webkit-flex: 1 1 0%;\n -ms-flex: 1 1 0%;\n flex: 1 1 0%;\n max-width: 100%;\n max-height: 0%;\n box-sizing: border-box;\n }\n [flex-gt-sm=\"5\"] {\n -webkit-flex: 1 1 5%;\n -ms-flex: 1 1 5%;\n flex: 1 1 5%;\n max-width: 5%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-sm=\"5\"],\n [layout-gt-sm=\"row\"] > [flex-gt-sm=\"5\"] {\n -webkit-flex: 1 1 5%;\n -ms-flex: 1 1 5%;\n flex: 1 1 5%;\n max-width: 5%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-sm=\"5\"],\n [layout-gt-sm=\"column\"] > [flex-gt-sm=\"5\"] {\n -webkit-flex: 1 1 5%;\n -ms-flex: 1 1 5%;\n flex: 1 1 5%;\n max-width: 100%;\n max-height: 5%;\n box-sizing: border-box;\n }\n [flex-gt-sm=\"10\"] {\n -webkit-flex: 1 1 10%;\n -ms-flex: 1 1 10%;\n flex: 1 1 10%;\n max-width: 10%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-sm=\"10\"],\n [layout-gt-sm=\"row\"] > [flex-gt-sm=\"10\"] {\n -webkit-flex: 1 1 10%;\n -ms-flex: 1 1 10%;\n flex: 1 1 10%;\n max-width: 10%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-sm=\"10\"],\n [layout-gt-sm=\"column\"] > [flex-gt-sm=\"10\"] {\n -webkit-flex: 1 1 10%;\n -ms-flex: 1 1 10%;\n flex: 1 1 10%;\n max-width: 100%;\n max-height: 10%;\n box-sizing: border-box;\n }\n [flex-gt-sm=\"15\"] {\n -webkit-flex: 1 1 15%;\n -ms-flex: 1 1 15%;\n flex: 1 1 15%;\n max-width: 15%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-sm=\"15\"],\n [layout-gt-sm=\"row\"] > [flex-gt-sm=\"15\"] {\n -webkit-flex: 1 1 15%;\n -ms-flex: 1 1 15%;\n flex: 1 1 15%;\n max-width: 15%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-sm=\"15\"],\n [layout-gt-sm=\"column\"] > [flex-gt-sm=\"15\"] {\n -webkit-flex: 1 1 15%;\n -ms-flex: 1 1 15%;\n flex: 1 1 15%;\n max-width: 100%;\n max-height: 15%;\n box-sizing: border-box;\n }\n [flex-gt-sm=\"20\"] {\n -webkit-flex: 1 1 20%;\n -ms-flex: 1 1 20%;\n flex: 1 1 20%;\n max-width: 20%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-sm=\"20\"],\n [layout-gt-sm=\"row\"] > [flex-gt-sm=\"20\"] {\n -webkit-flex: 1 1 20%;\n -ms-flex: 1 1 20%;\n flex: 1 1 20%;\n max-width: 20%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-sm=\"20\"],\n [layout-gt-sm=\"column\"] > [flex-gt-sm=\"20\"] {\n -webkit-flex: 1 1 20%;\n -ms-flex: 1 1 20%;\n flex: 1 1 20%;\n max-width: 100%;\n max-height: 20%;\n box-sizing: border-box;\n }\n [flex-gt-sm=\"25\"] {\n -webkit-flex: 1 1 25%;\n -ms-flex: 1 1 25%;\n flex: 1 1 25%;\n max-width: 25%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-sm=\"25\"],\n [layout-gt-sm=\"row\"] > [flex-gt-sm=\"25\"] {\n -webkit-flex: 1 1 25%;\n -ms-flex: 1 1 25%;\n flex: 1 1 25%;\n max-width: 25%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-sm=\"25\"],\n [layout-gt-sm=\"column\"] > [flex-gt-sm=\"25\"] {\n -webkit-flex: 1 1 25%;\n -ms-flex: 1 1 25%;\n flex: 1 1 25%;\n max-width: 100%;\n max-height: 25%;\n box-sizing: border-box;\n }\n [flex-gt-sm=\"30\"] {\n -webkit-flex: 1 1 30%;\n -ms-flex: 1 1 30%;\n flex: 1 1 30%;\n max-width: 30%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-sm=\"30\"],\n [layout-gt-sm=\"row\"] > [flex-gt-sm=\"30\"] {\n -webkit-flex: 1 1 30%;\n -ms-flex: 1 1 30%;\n flex: 1 1 30%;\n max-width: 30%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-sm=\"30\"],\n [layout-gt-sm=\"column\"] > [flex-gt-sm=\"30\"] {\n -webkit-flex: 1 1 30%;\n -ms-flex: 1 1 30%;\n flex: 1 1 30%;\n max-width: 100%;\n max-height: 30%;\n box-sizing: border-box;\n }\n [flex-gt-sm=\"35\"] {\n -webkit-flex: 1 1 35%;\n -ms-flex: 1 1 35%;\n flex: 1 1 35%;\n max-width: 35%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-sm=\"35\"],\n [layout-gt-sm=\"row\"] > [flex-gt-sm=\"35\"] {\n -webkit-flex: 1 1 35%;\n -ms-flex: 1 1 35%;\n flex: 1 1 35%;\n max-width: 35%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-sm=\"35\"],\n [layout-gt-sm=\"column\"] > [flex-gt-sm=\"35\"] {\n -webkit-flex: 1 1 35%;\n -ms-flex: 1 1 35%;\n flex: 1 1 35%;\n max-width: 100%;\n max-height: 35%;\n box-sizing: border-box;\n }\n [flex-gt-sm=\"40\"] {\n -webkit-flex: 1 1 40%;\n -ms-flex: 1 1 40%;\n flex: 1 1 40%;\n max-width: 40%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-sm=\"40\"],\n [layout-gt-sm=\"row\"] > [flex-gt-sm=\"40\"] {\n -webkit-flex: 1 1 40%;\n -ms-flex: 1 1 40%;\n flex: 1 1 40%;\n max-width: 40%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-sm=\"40\"],\n [layout-gt-sm=\"column\"] > [flex-gt-sm=\"40\"] {\n -webkit-flex: 1 1 40%;\n -ms-flex: 1 1 40%;\n flex: 1 1 40%;\n max-width: 100%;\n max-height: 40%;\n box-sizing: border-box;\n }\n [flex-gt-sm=\"45\"] {\n -webkit-flex: 1 1 45%;\n -ms-flex: 1 1 45%;\n flex: 1 1 45%;\n max-width: 45%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-sm=\"45\"],\n [layout-gt-sm=\"row\"] > [flex-gt-sm=\"45\"] {\n -webkit-flex: 1 1 45%;\n -ms-flex: 1 1 45%;\n flex: 1 1 45%;\n max-width: 45%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-sm=\"45\"],\n [layout-gt-sm=\"column\"] > [flex-gt-sm=\"45\"] {\n -webkit-flex: 1 1 45%;\n -ms-flex: 1 1 45%;\n flex: 1 1 45%;\n max-width: 100%;\n max-height: 45%;\n box-sizing: border-box;\n }\n [flex-gt-sm=\"50\"] {\n -webkit-flex: 1 1 50%;\n -ms-flex: 1 1 50%;\n flex: 1 1 50%;\n max-width: 50%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-sm=\"50\"],\n [layout-gt-sm=\"row\"] > [flex-gt-sm=\"50\"] {\n -webkit-flex: 1 1 50%;\n -ms-flex: 1 1 50%;\n flex: 1 1 50%;\n max-width: 50%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-sm=\"50\"],\n [layout-gt-sm=\"column\"] > [flex-gt-sm=\"50\"] {\n -webkit-flex: 1 1 50%;\n -ms-flex: 1 1 50%;\n flex: 1 1 50%;\n max-width: 100%;\n max-height: 50%;\n box-sizing: border-box;\n }\n [flex-gt-sm=\"55\"] {\n -webkit-flex: 1 1 55%;\n -ms-flex: 1 1 55%;\n flex: 1 1 55%;\n max-width: 55%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-sm=\"55\"],\n [layout-gt-sm=\"row\"] > [flex-gt-sm=\"55\"] {\n -webkit-flex: 1 1 55%;\n -ms-flex: 1 1 55%;\n flex: 1 1 55%;\n max-width: 55%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-sm=\"55\"],\n [layout-gt-sm=\"column\"] > [flex-gt-sm=\"55\"] {\n -webkit-flex: 1 1 55%;\n -ms-flex: 1 1 55%;\n flex: 1 1 55%;\n max-width: 100%;\n max-height: 55%;\n box-sizing: border-box;\n }\n [flex-gt-sm=\"60\"] {\n -webkit-flex: 1 1 60%;\n -ms-flex: 1 1 60%;\n flex: 1 1 60%;\n max-width: 60%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-sm=\"60\"],\n [layout-gt-sm=\"row\"] > [flex-gt-sm=\"60\"] {\n -webkit-flex: 1 1 60%;\n -ms-flex: 1 1 60%;\n flex: 1 1 60%;\n max-width: 60%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-sm=\"60\"],\n [layout-gt-sm=\"column\"] > [flex-gt-sm=\"60\"] {\n -webkit-flex: 1 1 60%;\n -ms-flex: 1 1 60%;\n flex: 1 1 60%;\n max-width: 100%;\n max-height: 60%;\n box-sizing: border-box;\n }\n [flex-gt-sm=\"65\"] {\n -webkit-flex: 1 1 65%;\n -ms-flex: 1 1 65%;\n flex: 1 1 65%;\n max-width: 65%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-sm=\"65\"],\n [layout-gt-sm=\"row\"] > [flex-gt-sm=\"65\"] {\n -webkit-flex: 1 1 65%;\n -ms-flex: 1 1 65%;\n flex: 1 1 65%;\n max-width: 65%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-sm=\"65\"],\n [layout-gt-sm=\"column\"] > [flex-gt-sm=\"65\"] {\n -webkit-flex: 1 1 65%;\n -ms-flex: 1 1 65%;\n flex: 1 1 65%;\n max-width: 100%;\n max-height: 65%;\n box-sizing: border-box;\n }\n [flex-gt-sm=\"70\"] {\n -webkit-flex: 1 1 70%;\n -ms-flex: 1 1 70%;\n flex: 1 1 70%;\n max-width: 70%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-sm=\"70\"],\n [layout-gt-sm=\"row\"] > [flex-gt-sm=\"70\"] {\n -webkit-flex: 1 1 70%;\n -ms-flex: 1 1 70%;\n flex: 1 1 70%;\n max-width: 70%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-sm=\"70\"],\n [layout-gt-sm=\"column\"] > [flex-gt-sm=\"70\"] {\n -webkit-flex: 1 1 70%;\n -ms-flex: 1 1 70%;\n flex: 1 1 70%;\n max-width: 100%;\n max-height: 70%;\n box-sizing: border-box;\n }\n [flex-gt-sm=\"75\"] {\n -webkit-flex: 1 1 75%;\n -ms-flex: 1 1 75%;\n flex: 1 1 75%;\n max-width: 75%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-sm=\"75\"],\n [layout-gt-sm=\"row\"] > [flex-gt-sm=\"75\"] {\n -webkit-flex: 1 1 75%;\n -ms-flex: 1 1 75%;\n flex: 1 1 75%;\n max-width: 75%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-sm=\"75\"],\n [layout-gt-sm=\"column\"] > [flex-gt-sm=\"75\"] {\n -webkit-flex: 1 1 75%;\n -ms-flex: 1 1 75%;\n flex: 1 1 75%;\n max-width: 100%;\n max-height: 75%;\n box-sizing: border-box;\n }\n [flex-gt-sm=\"80\"] {\n -webkit-flex: 1 1 80%;\n -ms-flex: 1 1 80%;\n flex: 1 1 80%;\n max-width: 80%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-sm=\"80\"],\n [layout-gt-sm=\"row\"] > [flex-gt-sm=\"80\"] {\n -webkit-flex: 1 1 80%;\n -ms-flex: 1 1 80%;\n flex: 1 1 80%;\n max-width: 80%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-sm=\"80\"],\n [layout-gt-sm=\"column\"] > [flex-gt-sm=\"80\"] {\n -webkit-flex: 1 1 80%;\n -ms-flex: 1 1 80%;\n flex: 1 1 80%;\n max-width: 100%;\n max-height: 80%;\n box-sizing: border-box;\n }\n [flex-gt-sm=\"85\"] {\n -webkit-flex: 1 1 85%;\n -ms-flex: 1 1 85%;\n flex: 1 1 85%;\n max-width: 85%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-sm=\"85\"],\n [layout-gt-sm=\"row\"] > [flex-gt-sm=\"85\"] {\n -webkit-flex: 1 1 85%;\n -ms-flex: 1 1 85%;\n flex: 1 1 85%;\n max-width: 85%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-sm=\"85\"],\n [layout-gt-sm=\"column\"] > [flex-gt-sm=\"85\"] {\n -webkit-flex: 1 1 85%;\n -ms-flex: 1 1 85%;\n flex: 1 1 85%;\n max-width: 100%;\n max-height: 85%;\n box-sizing: border-box;\n }\n [flex-gt-sm=\"90\"] {\n -webkit-flex: 1 1 90%;\n -ms-flex: 1 1 90%;\n flex: 1 1 90%;\n max-width: 90%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-sm=\"90\"],\n [layout-gt-sm=\"row\"] > [flex-gt-sm=\"90\"] {\n -webkit-flex: 1 1 90%;\n -ms-flex: 1 1 90%;\n flex: 1 1 90%;\n max-width: 90%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-sm=\"90\"],\n [layout-gt-sm=\"column\"] > [flex-gt-sm=\"90\"] {\n -webkit-flex: 1 1 90%;\n -ms-flex: 1 1 90%;\n flex: 1 1 90%;\n max-width: 100%;\n max-height: 90%;\n box-sizing: border-box;\n }\n [flex-gt-sm=\"95\"] {\n -webkit-flex: 1 1 95%;\n -ms-flex: 1 1 95%;\n flex: 1 1 95%;\n max-width: 95%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-sm=\"95\"],\n [layout-gt-sm=\"row\"] > [flex-gt-sm=\"95\"] {\n -webkit-flex: 1 1 95%;\n -ms-flex: 1 1 95%;\n flex: 1 1 95%;\n max-width: 95%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-sm=\"95\"],\n [layout-gt-sm=\"column\"] > [flex-gt-sm=\"95\"] {\n -webkit-flex: 1 1 95%;\n -ms-flex: 1 1 95%;\n flex: 1 1 95%;\n max-width: 100%;\n max-height: 95%;\n box-sizing: border-box;\n }\n [flex-gt-sm=\"100\"] {\n -webkit-flex: 1 1 100%;\n -ms-flex: 1 1 100%;\n flex: 1 1 100%;\n max-width: 100%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-sm=\"100\"],\n [layout-gt-sm=\"row\"] > [flex-gt-sm=\"100\"] {\n -webkit-flex: 1 1 100%;\n -ms-flex: 1 1 100%;\n flex: 1 1 100%;\n max-width: 100%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-sm=\"100\"],\n [layout-gt-sm=\"column\"] > [flex-gt-sm=\"100\"] {\n -webkit-flex: 1 1 100%;\n -ms-flex: 1 1 100%;\n flex: 1 1 100%;\n max-width: 100%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-sm=\"33\"],\n [layout=\"row\"] > [flex-gt-sm=\"33\"],\n [layout-gt-sm=\"row\"] > [flex-gt-sm=\"33\"],\n [layout-gt-sm=\"row\"] > [flex-gt-sm=\"33\"] {\n -webkit-flex: 1 1 33%;\n -ms-flex: 1 1 33%;\n flex: 1 1 33%;\n max-width: calc(100% / 3);\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-sm=\"34\"],\n [layout=\"row\"] > [flex-gt-sm=\"34\"],\n [layout-gt-sm=\"row\"] > [flex-gt-sm=\"34\"],\n [layout-gt-sm=\"row\"] > [flex-gt-sm=\"34\"] {\n -webkit-flex: 1 1 34%;\n -ms-flex: 1 1 34%;\n flex: 1 1 34%;\n max-width: 34%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-sm=\"66\"],\n [layout=\"row\"] > [flex-gt-sm=\"66\"],\n [layout-gt-sm=\"row\"] > [flex-gt-sm=\"66\"],\n [layout-gt-sm=\"row\"] > [flex-gt-sm=\"66\"] {\n -webkit-flex: 1 1 66%;\n -ms-flex: 1 1 66%;\n flex: 1 1 66%;\n max-width: calc(200% / 3);\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-sm=\"67\"],\n [layout=\"row\"] > [flex-gt-sm=\"67\"],\n [layout-gt-sm=\"row\"] > [flex-gt-sm=\"67\"],\n [layout-gt-sm=\"row\"] > [flex-gt-sm=\"67\"] {\n -webkit-flex: 1 1 67%;\n -ms-flex: 1 1 67%;\n flex: 1 1 67%;\n max-width: 67%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-sm=\"33\"],\n [layout=\"column\"] > [flex-gt-sm=\"33\"],\n [layout-gt-sm=\"column\"] > [flex-gt-sm=\"33\"],\n [layout-gt-sm=\"column\"] > [flex-gt-sm=\"33\"] {\n -webkit-flex: 1 1 33%;\n -ms-flex: 1 1 33%;\n flex: 1 1 33%;\n max-width: 100%;\n max-height: calc(100% / 3);\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-sm=\"34\"],\n [layout=\"column\"] > [flex-gt-sm=\"34\"],\n [layout-gt-sm=\"column\"] > [flex-gt-sm=\"34\"],\n [layout-gt-sm=\"column\"] > [flex-gt-sm=\"34\"] {\n -webkit-flex: 1 1 34%;\n -ms-flex: 1 1 34%;\n flex: 1 1 34%;\n max-width: 100%;\n max-height: 34%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-sm=\"66\"],\n [layout=\"column\"] > [flex-gt-sm=\"66\"],\n [layout-gt-sm=\"column\"] > [flex-gt-sm=\"66\"],\n [layout-gt-sm=\"column\"] > [flex-gt-sm=\"66\"] {\n -webkit-flex: 1 1 66%;\n -ms-flex: 1 1 66%;\n flex: 1 1 66%;\n max-width: 100%;\n max-height: calc(200% / 3);\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-sm=\"67\"],\n [layout=\"column\"] > [flex-gt-sm=\"67\"],\n [layout-gt-sm=\"column\"] > [flex-gt-sm=\"67\"],\n [layout-gt-sm=\"column\"] > [flex-gt-sm=\"67\"] {\n -webkit-flex: 1 1 67%;\n -ms-flex: 1 1 67%;\n flex: 1 1 67%;\n max-width: 100%;\n max-height: 67%;\n box-sizing: border-box;\n }\n [layout-gt-sm],\n [layout-gt-sm=\"column\"],\n [layout-gt-sm=\"row\"] {\n box-sizing: border-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n }\n [layout-gt-sm=\"column\"] {\n -webkit-flex-direction: column;\n -ms-flex-direction: column;\n flex-direction: column;\n }\n [layout-gt-sm=\"row\"] {\n -webkit-flex-direction: row;\n -ms-flex-direction: row;\n flex-direction: row;\n }\n}\n\n@media (min-width: 960px) and (max-width: 1279px) {\n [hide]:not([show-gt-xs]):not([show-gt-sm]):not([show-md]):not([show]),\n [hide-gt-xs]:not([show-gt-xs]):not([show-gt-sm]):not([show-md]):not([show]),\n [hide-gt-sm]:not([show-gt-xs]):not([show-gt-sm]):not([show-md]):not([show]) {\n display: none;\n }\n [hide-md]:not([show-md]):not([show]) {\n display: none;\n }\n [flex-order-md=\"-20\"] {\n -webkit-order: -20;\n -ms-flex-order: -20;\n order: -20;\n }\n [flex-order-md=\"-19\"] {\n -webkit-order: -19;\n -ms-flex-order: -19;\n order: -19;\n }\n [flex-order-md=\"-18\"] {\n -webkit-order: -18;\n -ms-flex-order: -18;\n order: -18;\n }\n [flex-order-md=\"-17\"] {\n -webkit-order: -17;\n -ms-flex-order: -17;\n order: -17;\n }\n [flex-order-md=\"-16\"] {\n -webkit-order: -16;\n -ms-flex-order: -16;\n order: -16;\n }\n [flex-order-md=\"-15\"] {\n -webkit-order: -15;\n -ms-flex-order: -15;\n order: -15;\n }\n [flex-order-md=\"-14\"] {\n -webkit-order: -14;\n -ms-flex-order: -14;\n order: -14;\n }\n [flex-order-md=\"-13\"] {\n -webkit-order: -13;\n -ms-flex-order: -13;\n order: -13;\n }\n [flex-order-md=\"-12\"] {\n -webkit-order: -12;\n -ms-flex-order: -12;\n order: -12;\n }\n [flex-order-md=\"-11\"] {\n -webkit-order: -11;\n -ms-flex-order: -11;\n order: -11;\n }\n [flex-order-md=\"-10\"] {\n -webkit-order: -10;\n -ms-flex-order: -10;\n order: -10;\n }\n [flex-order-md=\"-9\"] {\n -webkit-order: -9;\n -ms-flex-order: -9;\n order: -9;\n }\n [flex-order-md=\"-8\"] {\n -webkit-order: -8;\n -ms-flex-order: -8;\n order: -8;\n }\n [flex-order-md=\"-7\"] {\n -webkit-order: -7;\n -ms-flex-order: -7;\n order: -7;\n }\n [flex-order-md=\"-6\"] {\n -webkit-order: -6;\n -ms-flex-order: -6;\n order: -6;\n }\n [flex-order-md=\"-5\"] {\n -webkit-order: -5;\n -ms-flex-order: -5;\n order: -5;\n }\n [flex-order-md=\"-4\"] {\n -webkit-order: -4;\n -ms-flex-order: -4;\n order: -4;\n }\n [flex-order-md=\"-3\"] {\n -webkit-order: -3;\n -ms-flex-order: -3;\n order: -3;\n }\n [flex-order-md=\"-2\"] {\n -webkit-order: -2;\n -ms-flex-order: -2;\n order: -2;\n }\n [flex-order-md=\"-1\"] {\n -webkit-order: -1;\n -ms-flex-order: -1;\n order: -1;\n }\n [flex-order-md=\"0\"] {\n -webkit-order: 0;\n -ms-flex-order: 0;\n order: 0;\n }\n [flex-order-md=\"1\"] {\n -webkit-order: 1;\n -ms-flex-order: 1;\n order: 1;\n }\n [flex-order-md=\"2\"] {\n -webkit-order: 2;\n -ms-flex-order: 2;\n order: 2;\n }\n [flex-order-md=\"3\"] {\n -webkit-order: 3;\n -ms-flex-order: 3;\n order: 3;\n }\n [flex-order-md=\"4\"] {\n -webkit-order: 4;\n -ms-flex-order: 4;\n order: 4;\n }\n [flex-order-md=\"5\"] {\n -webkit-order: 5;\n -ms-flex-order: 5;\n order: 5;\n }\n [flex-order-md=\"6\"] {\n -webkit-order: 6;\n -ms-flex-order: 6;\n order: 6;\n }\n [flex-order-md=\"7\"] {\n -webkit-order: 7;\n -ms-flex-order: 7;\n order: 7;\n }\n [flex-order-md=\"8\"] {\n -webkit-order: 8;\n -ms-flex-order: 8;\n order: 8;\n }\n [flex-order-md=\"9\"] {\n -webkit-order: 9;\n -ms-flex-order: 9;\n order: 9;\n }\n [flex-order-md=\"10\"] {\n -webkit-order: 10;\n -ms-flex-order: 10;\n order: 10;\n }\n [flex-order-md=\"11\"] {\n -webkit-order: 11;\n -ms-flex-order: 11;\n order: 11;\n }\n [flex-order-md=\"12\"] {\n -webkit-order: 12;\n -ms-flex-order: 12;\n order: 12;\n }\n [flex-order-md=\"13\"] {\n -webkit-order: 13;\n -ms-flex-order: 13;\n order: 13;\n }\n [flex-order-md=\"14\"] {\n -webkit-order: 14;\n -ms-flex-order: 14;\n order: 14;\n }\n [flex-order-md=\"15\"] {\n -webkit-order: 15;\n -ms-flex-order: 15;\n order: 15;\n }\n [flex-order-md=\"16\"] {\n -webkit-order: 16;\n -ms-flex-order: 16;\n order: 16;\n }\n [flex-order-md=\"17\"] {\n -webkit-order: 17;\n -ms-flex-order: 17;\n order: 17;\n }\n [flex-order-md=\"18\"] {\n -webkit-order: 18;\n -ms-flex-order: 18;\n order: 18;\n }\n [flex-order-md=\"19\"] {\n -webkit-order: 19;\n -ms-flex-order: 19;\n order: 19;\n }\n [flex-order-md=\"20\"] {\n -webkit-order: 20;\n -ms-flex-order: 20;\n order: 20;\n }\n [flex-offset-md=\"0\"] {\n margin-left: 0%;\n }\n [flex-offset-md=\"5\"] {\n margin-left: 5%;\n }\n [flex-offset-md=\"10\"] {\n margin-left: 10%;\n }\n [flex-offset-md=\"15\"] {\n margin-left: 15%;\n }\n [flex-offset-md=\"20\"] {\n margin-left: 20%;\n }\n [flex-offset-md=\"25\"] {\n margin-left: 25%;\n }\n [flex-offset-md=\"30\"] {\n margin-left: 30%;\n }\n [flex-offset-md=\"35\"] {\n margin-left: 35%;\n }\n [flex-offset-md=\"40\"] {\n margin-left: 40%;\n }\n [flex-offset-md=\"45\"] {\n margin-left: 45%;\n }\n [flex-offset-md=\"50\"] {\n margin-left: 50%;\n }\n [flex-offset-md=\"55\"] {\n margin-left: 55%;\n }\n [flex-offset-md=\"60\"] {\n margin-left: 60%;\n }\n [flex-offset-md=\"65\"] {\n margin-left: 65%;\n }\n [flex-offset-md=\"70\"] {\n margin-left: 70%;\n }\n [flex-offset-md=\"75\"] {\n margin-left: 75%;\n }\n [flex-offset-md=\"80\"] {\n margin-left: 80%;\n }\n [flex-offset-md=\"85\"] {\n margin-left: 85%;\n }\n [flex-offset-md=\"90\"] {\n margin-left: 90%;\n }\n [flex-offset-md=\"95\"] {\n margin-left: 95%;\n }\n [flex-offset-md=\"33\"] {\n margin-left: calc(100% / 3);\n }\n [flex-offset-md=\"66\"] {\n margin-left: calc(200% / 3);\n }\n [layout-align-md] {\n -webkit-justify-content: flex-start;\n -ms-flex-pack: start;\n justify-content: flex-start;\n -webkit-align-content: stretch;\n -ms-flex-line-pack: stretch;\n align-content: stretch;\n -webkit-align-items: stretch;\n -ms-flex-align: stretch;\n align-items: stretch;\n }\n [layout-align-md=\"start\"],\n [layout-align-md=\"start start\"],\n [layout-align-md=\"start center\"],\n [layout-align-md=\"start end\"],\n [layout-align-md=\"start stretch\"] {\n -webkit-justify-content: start;\n -ms-flex-pack: start;\n justify-content: start;\n }\n [layout-align-md=\"center\"],\n [layout-align-md=\"center start\"],\n [layout-align-md=\"center center\"],\n [layout-align-md=\"center end\"],\n [layout-align-md=\"center stretch\"] {\n -webkit-justify-content: center;\n -ms-flex-pack: center;\n justify-content: center;\n }\n [layout-align-md=\"end\"],\n [layout-align-md=\"end center\"],\n [layout-align-md=\"end start\"],\n [layout-align-md=\"end end\"],\n [layout-align-md=\"end stretch\"] {\n -webkit-justify-content: flex-end;\n -ms-flex-pack: end;\n justify-content: flex-end;\n }\n [layout-align-md=\"space-around\"],\n [layout-align-md=\"space-around center\"],\n [layout-align-md=\"space-around start\"],\n [layout-align-md=\"space-around end\"],\n [layout-align-md=\"space-around stretch\"] {\n -webkit-justify-content: space-around;\n -ms-flex-pack: distribute;\n justify-content: space-around;\n }\n [layout-align-md=\"space-between\"],\n [layout-align-md=\"space-between center\"],\n [layout-align-md=\"space-between start\"],\n [layout-align-md=\"space-between end\"],\n [layout-align-md=\"space-between stretch\"] {\n -webkit-justify-content: space-between;\n -ms-flex-pack: justify;\n justify-content: space-between;\n }\n [layout-align-md=\"start start\"],\n [layout-align-md=\"center start\"],\n [layout-align-md=\"end start\"],\n [layout-align-md=\"space-between start\"],\n [layout-align-md=\"space-around start\"] {\n -webkit-align-items: flex-start;\n -ms-flex-align: start;\n align-items: flex-start;\n -webkit-align-content: flex-start;\n -ms-flex-line-pack: start;\n align-content: flex-start;\n }\n [layout-align-md=\"start center\"],\n [layout-align-md=\"center center\"],\n [layout-align-md=\"end center\"],\n [layout-align-md=\"space-between center\"],\n [layout-align-md=\"space-around center\"] {\n -webkit-align-items: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-align-content: center;\n -ms-flex-line-pack: center;\n align-content: center;\n max-width: 100%;\n }\n [layout-align-md=\"start center\"] > *,\n [layout-align-md=\"center center\"] > *,\n [layout-align-md=\"end center\"] > *,\n [layout-align-md=\"space-between center\"] > *,\n [layout-align-md=\"space-around center\"] > * {\n max-width: 100%;\n box-sizing: border-box;\n }\n [layout-align-md=\"start end\"],\n [layout-align-md=\"center end\"],\n [layout-align-md=\"end end\"],\n [layout-align-md=\"space-between end\"],\n [layout-align-md=\"space-around end\"] {\n -webkit-align-items: flex-end;\n -ms-flex-align: end;\n align-items: flex-end;\n -webkit-align-content: flex-end;\n -ms-flex-line-pack: end;\n align-content: flex-end;\n }\n [layout-align-md=\"start stretch\"],\n [layout-align-md=\"center stretch\"],\n [layout-align-md=\"end stretch\"],\n [layout-align-md=\"space-between stretch\"],\n [layout-align-md=\"space-around stretch\"] {\n -webkit-align-items: stretch;\n -ms-flex-align: stretch;\n align-items: stretch;\n -webkit-align-content: stretch;\n -ms-flex-line-pack: stretch;\n align-content: stretch;\n }\n [flex-md] {\n -webkit-flex: 1;\n -ms-flex: 1;\n flex: 1;\n box-sizing: border-box;\n }\n}\n\n@media screen and (min-width: 960px) and (max-width: 1279px) {\n [flex-md] {\n -webkit-flex: 1 1 0%;\n -ms-flex: 1 1 0%;\n flex: 1 1 0%;\n }\n}\n\n@media (min-width: 960px) and (max-width: 1279px) {\n [flex-md-grow] {\n -webkit-flex: 1 1 100%;\n -ms-flex: 1 1 100%;\n flex: 1 1 100%;\n box-sizing: border-box;\n }\n [flex-md-initial] {\n -webkit-flex: 0 1 auto;\n -ms-flex: 0 1 auto;\n flex: 0 1 auto;\n box-sizing: border-box;\n }\n [flex-md-auto] {\n -webkit-flex: 1 1 auto;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n box-sizing: border-box;\n }\n [flex-md-none] {\n -webkit-flex: 0 0 auto;\n -ms-flex: 0 0 auto;\n flex: 0 0 auto;\n box-sizing: border-box;\n }\n [flex-md=\"0\"] {\n -webkit-flex: 1 1 0%;\n -ms-flex: 1 1 0%;\n flex: 1 1 0%;\n max-width: 0%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-md=\"0\"],\n [layout-md=\"row\"] > [flex-md=\"0\"] {\n -webkit-flex: 1 1 0%;\n -ms-flex: 1 1 0%;\n flex: 1 1 0%;\n max-width: 0%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-md=\"0\"],\n [layout-md=\"column\"] > [flex-md=\"0\"] {\n -webkit-flex: 1 1 0%;\n -ms-flex: 1 1 0%;\n flex: 1 1 0%;\n max-width: 100%;\n max-height: 0%;\n box-sizing: border-box;\n }\n [flex-md=\"5\"] {\n -webkit-flex: 1 1 5%;\n -ms-flex: 1 1 5%;\n flex: 1 1 5%;\n max-width: 5%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-md=\"5\"],\n [layout-md=\"row\"] > [flex-md=\"5\"] {\n -webkit-flex: 1 1 5%;\n -ms-flex: 1 1 5%;\n flex: 1 1 5%;\n max-width: 5%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-md=\"5\"],\n [layout-md=\"column\"] > [flex-md=\"5\"] {\n -webkit-flex: 1 1 5%;\n -ms-flex: 1 1 5%;\n flex: 1 1 5%;\n max-width: 100%;\n max-height: 5%;\n box-sizing: border-box;\n }\n [flex-md=\"10\"] {\n -webkit-flex: 1 1 10%;\n -ms-flex: 1 1 10%;\n flex: 1 1 10%;\n max-width: 10%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-md=\"10\"],\n [layout-md=\"row\"] > [flex-md=\"10\"] {\n -webkit-flex: 1 1 10%;\n -ms-flex: 1 1 10%;\n flex: 1 1 10%;\n max-width: 10%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-md=\"10\"],\n [layout-md=\"column\"] > [flex-md=\"10\"] {\n -webkit-flex: 1 1 10%;\n -ms-flex: 1 1 10%;\n flex: 1 1 10%;\n max-width: 100%;\n max-height: 10%;\n box-sizing: border-box;\n }\n [flex-md=\"15\"] {\n -webkit-flex: 1 1 15%;\n -ms-flex: 1 1 15%;\n flex: 1 1 15%;\n max-width: 15%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-md=\"15\"],\n [layout-md=\"row\"] > [flex-md=\"15\"] {\n -webkit-flex: 1 1 15%;\n -ms-flex: 1 1 15%;\n flex: 1 1 15%;\n max-width: 15%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-md=\"15\"],\n [layout-md=\"column\"] > [flex-md=\"15\"] {\n -webkit-flex: 1 1 15%;\n -ms-flex: 1 1 15%;\n flex: 1 1 15%;\n max-width: 100%;\n max-height: 15%;\n box-sizing: border-box;\n }\n [flex-md=\"20\"] {\n -webkit-flex: 1 1 20%;\n -ms-flex: 1 1 20%;\n flex: 1 1 20%;\n max-width: 20%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-md=\"20\"],\n [layout-md=\"row\"] > [flex-md=\"20\"] {\n -webkit-flex: 1 1 20%;\n -ms-flex: 1 1 20%;\n flex: 1 1 20%;\n max-width: 20%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-md=\"20\"],\n [layout-md=\"column\"] > [flex-md=\"20\"] {\n -webkit-flex: 1 1 20%;\n -ms-flex: 1 1 20%;\n flex: 1 1 20%;\n max-width: 100%;\n max-height: 20%;\n box-sizing: border-box;\n }\n [flex-md=\"25\"] {\n -webkit-flex: 1 1 25%;\n -ms-flex: 1 1 25%;\n flex: 1 1 25%;\n max-width: 25%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-md=\"25\"],\n [layout-md=\"row\"] > [flex-md=\"25\"] {\n -webkit-flex: 1 1 25%;\n -ms-flex: 1 1 25%;\n flex: 1 1 25%;\n max-width: 25%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-md=\"25\"],\n [layout-md=\"column\"] > [flex-md=\"25\"] {\n -webkit-flex: 1 1 25%;\n -ms-flex: 1 1 25%;\n flex: 1 1 25%;\n max-width: 100%;\n max-height: 25%;\n box-sizing: border-box;\n }\n [flex-md=\"30\"] {\n -webkit-flex: 1 1 30%;\n -ms-flex: 1 1 30%;\n flex: 1 1 30%;\n max-width: 30%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-md=\"30\"],\n [layout-md=\"row\"] > [flex-md=\"30\"] {\n -webkit-flex: 1 1 30%;\n -ms-flex: 1 1 30%;\n flex: 1 1 30%;\n max-width: 30%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-md=\"30\"],\n [layout-md=\"column\"] > [flex-md=\"30\"] {\n -webkit-flex: 1 1 30%;\n -ms-flex: 1 1 30%;\n flex: 1 1 30%;\n max-width: 100%;\n max-height: 30%;\n box-sizing: border-box;\n }\n [flex-md=\"35\"] {\n -webkit-flex: 1 1 35%;\n -ms-flex: 1 1 35%;\n flex: 1 1 35%;\n max-width: 35%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-md=\"35\"],\n [layout-md=\"row\"] > [flex-md=\"35\"] {\n -webkit-flex: 1 1 35%;\n -ms-flex: 1 1 35%;\n flex: 1 1 35%;\n max-width: 35%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-md=\"35\"],\n [layout-md=\"column\"] > [flex-md=\"35\"] {\n -webkit-flex: 1 1 35%;\n -ms-flex: 1 1 35%;\n flex: 1 1 35%;\n max-width: 100%;\n max-height: 35%;\n box-sizing: border-box;\n }\n [flex-md=\"40\"] {\n -webkit-flex: 1 1 40%;\n -ms-flex: 1 1 40%;\n flex: 1 1 40%;\n max-width: 40%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-md=\"40\"],\n [layout-md=\"row\"] > [flex-md=\"40\"] {\n -webkit-flex: 1 1 40%;\n -ms-flex: 1 1 40%;\n flex: 1 1 40%;\n max-width: 40%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-md=\"40\"],\n [layout-md=\"column\"] > [flex-md=\"40\"] {\n -webkit-flex: 1 1 40%;\n -ms-flex: 1 1 40%;\n flex: 1 1 40%;\n max-width: 100%;\n max-height: 40%;\n box-sizing: border-box;\n }\n [flex-md=\"45\"] {\n -webkit-flex: 1 1 45%;\n -ms-flex: 1 1 45%;\n flex: 1 1 45%;\n max-width: 45%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-md=\"45\"],\n [layout-md=\"row\"] > [flex-md=\"45\"] {\n -webkit-flex: 1 1 45%;\n -ms-flex: 1 1 45%;\n flex: 1 1 45%;\n max-width: 45%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-md=\"45\"],\n [layout-md=\"column\"] > [flex-md=\"45\"] {\n -webkit-flex: 1 1 45%;\n -ms-flex: 1 1 45%;\n flex: 1 1 45%;\n max-width: 100%;\n max-height: 45%;\n box-sizing: border-box;\n }\n [flex-md=\"50\"] {\n -webkit-flex: 1 1 50%;\n -ms-flex: 1 1 50%;\n flex: 1 1 50%;\n max-width: 50%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-md=\"50\"],\n [layout-md=\"row\"] > [flex-md=\"50\"] {\n -webkit-flex: 1 1 50%;\n -ms-flex: 1 1 50%;\n flex: 1 1 50%;\n max-width: 50%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-md=\"50\"],\n [layout-md=\"column\"] > [flex-md=\"50\"] {\n -webkit-flex: 1 1 50%;\n -ms-flex: 1 1 50%;\n flex: 1 1 50%;\n max-width: 100%;\n max-height: 50%;\n box-sizing: border-box;\n }\n [flex-md=\"55\"] {\n -webkit-flex: 1 1 55%;\n -ms-flex: 1 1 55%;\n flex: 1 1 55%;\n max-width: 55%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-md=\"55\"],\n [layout-md=\"row\"] > [flex-md=\"55\"] {\n -webkit-flex: 1 1 55%;\n -ms-flex: 1 1 55%;\n flex: 1 1 55%;\n max-width: 55%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-md=\"55\"],\n [layout-md=\"column\"] > [flex-md=\"55\"] {\n -webkit-flex: 1 1 55%;\n -ms-flex: 1 1 55%;\n flex: 1 1 55%;\n max-width: 100%;\n max-height: 55%;\n box-sizing: border-box;\n }\n [flex-md=\"60\"] {\n -webkit-flex: 1 1 60%;\n -ms-flex: 1 1 60%;\n flex: 1 1 60%;\n max-width: 60%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-md=\"60\"],\n [layout-md=\"row\"] > [flex-md=\"60\"] {\n -webkit-flex: 1 1 60%;\n -ms-flex: 1 1 60%;\n flex: 1 1 60%;\n max-width: 60%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-md=\"60\"],\n [layout-md=\"column\"] > [flex-md=\"60\"] {\n -webkit-flex: 1 1 60%;\n -ms-flex: 1 1 60%;\n flex: 1 1 60%;\n max-width: 100%;\n max-height: 60%;\n box-sizing: border-box;\n }\n [flex-md=\"65\"] {\n -webkit-flex: 1 1 65%;\n -ms-flex: 1 1 65%;\n flex: 1 1 65%;\n max-width: 65%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-md=\"65\"],\n [layout-md=\"row\"] > [flex-md=\"65\"] {\n -webkit-flex: 1 1 65%;\n -ms-flex: 1 1 65%;\n flex: 1 1 65%;\n max-width: 65%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-md=\"65\"],\n [layout-md=\"column\"] > [flex-md=\"65\"] {\n -webkit-flex: 1 1 65%;\n -ms-flex: 1 1 65%;\n flex: 1 1 65%;\n max-width: 100%;\n max-height: 65%;\n box-sizing: border-box;\n }\n [flex-md=\"70\"] {\n -webkit-flex: 1 1 70%;\n -ms-flex: 1 1 70%;\n flex: 1 1 70%;\n max-width: 70%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-md=\"70\"],\n [layout-md=\"row\"] > [flex-md=\"70\"] {\n -webkit-flex: 1 1 70%;\n -ms-flex: 1 1 70%;\n flex: 1 1 70%;\n max-width: 70%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-md=\"70\"],\n [layout-md=\"column\"] > [flex-md=\"70\"] {\n -webkit-flex: 1 1 70%;\n -ms-flex: 1 1 70%;\n flex: 1 1 70%;\n max-width: 100%;\n max-height: 70%;\n box-sizing: border-box;\n }\n [flex-md=\"75\"] {\n -webkit-flex: 1 1 75%;\n -ms-flex: 1 1 75%;\n flex: 1 1 75%;\n max-width: 75%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-md=\"75\"],\n [layout-md=\"row\"] > [flex-md=\"75\"] {\n -webkit-flex: 1 1 75%;\n -ms-flex: 1 1 75%;\n flex: 1 1 75%;\n max-width: 75%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-md=\"75\"],\n [layout-md=\"column\"] > [flex-md=\"75\"] {\n -webkit-flex: 1 1 75%;\n -ms-flex: 1 1 75%;\n flex: 1 1 75%;\n max-width: 100%;\n max-height: 75%;\n box-sizing: border-box;\n }\n [flex-md=\"80\"] {\n -webkit-flex: 1 1 80%;\n -ms-flex: 1 1 80%;\n flex: 1 1 80%;\n max-width: 80%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-md=\"80\"],\n [layout-md=\"row\"] > [flex-md=\"80\"] {\n -webkit-flex: 1 1 80%;\n -ms-flex: 1 1 80%;\n flex: 1 1 80%;\n max-width: 80%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-md=\"80\"],\n [layout-md=\"column\"] > [flex-md=\"80\"] {\n -webkit-flex: 1 1 80%;\n -ms-flex: 1 1 80%;\n flex: 1 1 80%;\n max-width: 100%;\n max-height: 80%;\n box-sizing: border-box;\n }\n [flex-md=\"85\"] {\n -webkit-flex: 1 1 85%;\n -ms-flex: 1 1 85%;\n flex: 1 1 85%;\n max-width: 85%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-md=\"85\"],\n [layout-md=\"row\"] > [flex-md=\"85\"] {\n -webkit-flex: 1 1 85%;\n -ms-flex: 1 1 85%;\n flex: 1 1 85%;\n max-width: 85%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-md=\"85\"],\n [layout-md=\"column\"] > [flex-md=\"85\"] {\n -webkit-flex: 1 1 85%;\n -ms-flex: 1 1 85%;\n flex: 1 1 85%;\n max-width: 100%;\n max-height: 85%;\n box-sizing: border-box;\n }\n [flex-md=\"90\"] {\n -webkit-flex: 1 1 90%;\n -ms-flex: 1 1 90%;\n flex: 1 1 90%;\n max-width: 90%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-md=\"90\"],\n [layout-md=\"row\"] > [flex-md=\"90\"] {\n -webkit-flex: 1 1 90%;\n -ms-flex: 1 1 90%;\n flex: 1 1 90%;\n max-width: 90%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-md=\"90\"],\n [layout-md=\"column\"] > [flex-md=\"90\"] {\n -webkit-flex: 1 1 90%;\n -ms-flex: 1 1 90%;\n flex: 1 1 90%;\n max-width: 100%;\n max-height: 90%;\n box-sizing: border-box;\n }\n [flex-md=\"95\"] {\n -webkit-flex: 1 1 95%;\n -ms-flex: 1 1 95%;\n flex: 1 1 95%;\n max-width: 95%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-md=\"95\"],\n [layout-md=\"row\"] > [flex-md=\"95\"] {\n -webkit-flex: 1 1 95%;\n -ms-flex: 1 1 95%;\n flex: 1 1 95%;\n max-width: 95%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-md=\"95\"],\n [layout-md=\"column\"] > [flex-md=\"95\"] {\n -webkit-flex: 1 1 95%;\n -ms-flex: 1 1 95%;\n flex: 1 1 95%;\n max-width: 100%;\n max-height: 95%;\n box-sizing: border-box;\n }\n [flex-md=\"100\"] {\n -webkit-flex: 1 1 100%;\n -ms-flex: 1 1 100%;\n flex: 1 1 100%;\n max-width: 100%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-md=\"100\"],\n [layout-md=\"row\"] > [flex-md=\"100\"] {\n -webkit-flex: 1 1 100%;\n -ms-flex: 1 1 100%;\n flex: 1 1 100%;\n max-width: 100%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-md=\"100\"],\n [layout-md=\"column\"] > [flex-md=\"100\"] {\n -webkit-flex: 1 1 100%;\n -ms-flex: 1 1 100%;\n flex: 1 1 100%;\n max-width: 100%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-md=\"33\"],\n [layout=\"row\"] > [flex-md=\"33\"],\n [layout-md=\"row\"] > [flex-md=\"33\"],\n [layout-md=\"row\"] > [flex-md=\"33\"] {\n -webkit-flex: 1 1 33%;\n -ms-flex: 1 1 33%;\n flex: 1 1 33%;\n max-width: calc(100% / 3);\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-md=\"34\"],\n [layout=\"row\"] > [flex-md=\"34\"],\n [layout-md=\"row\"] > [flex-md=\"34\"],\n [layout-md=\"row\"] > [flex-md=\"34\"] {\n -webkit-flex: 1 1 34%;\n -ms-flex: 1 1 34%;\n flex: 1 1 34%;\n max-width: 34%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-md=\"66\"],\n [layout=\"row\"] > [flex-md=\"66\"],\n [layout-md=\"row\"] > [flex-md=\"66\"],\n [layout-md=\"row\"] > [flex-md=\"66\"] {\n -webkit-flex: 1 1 66%;\n -ms-flex: 1 1 66%;\n flex: 1 1 66%;\n max-width: calc(200% / 3);\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-md=\"67\"],\n [layout=\"row\"] > [flex-md=\"67\"],\n [layout-md=\"row\"] > [flex-md=\"67\"],\n [layout-md=\"row\"] > [flex-md=\"67\"] {\n -webkit-flex: 1 1 67%;\n -ms-flex: 1 1 67%;\n flex: 1 1 67%;\n max-width: 67%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-md=\"33\"],\n [layout=\"column\"] > [flex-md=\"33\"],\n [layout-md=\"column\"] > [flex-md=\"33\"],\n [layout-md=\"column\"] > [flex-md=\"33\"] {\n -webkit-flex: 1 1 33%;\n -ms-flex: 1 1 33%;\n flex: 1 1 33%;\n max-width: 100%;\n max-height: calc(100% / 3);\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-md=\"34\"],\n [layout=\"column\"] > [flex-md=\"34\"],\n [layout-md=\"column\"] > [flex-md=\"34\"],\n [layout-md=\"column\"] > [flex-md=\"34\"] {\n -webkit-flex: 1 1 34%;\n -ms-flex: 1 1 34%;\n flex: 1 1 34%;\n max-width: 100%;\n max-height: 34%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-md=\"66\"],\n [layout=\"column\"] > [flex-md=\"66\"],\n [layout-md=\"column\"] > [flex-md=\"66\"],\n [layout-md=\"column\"] > [flex-md=\"66\"] {\n -webkit-flex: 1 1 66%;\n -ms-flex: 1 1 66%;\n flex: 1 1 66%;\n max-width: 100%;\n max-height: calc(200% / 3);\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-md=\"67\"],\n [layout=\"column\"] > [flex-md=\"67\"],\n [layout-md=\"column\"] > [flex-md=\"67\"],\n [layout-md=\"column\"] > [flex-md=\"67\"] {\n -webkit-flex: 1 1 67%;\n -ms-flex: 1 1 67%;\n flex: 1 1 67%;\n max-width: 100%;\n max-height: 67%;\n box-sizing: border-box;\n }\n [layout-md],\n [layout-md=\"column\"],\n [layout-md=\"row\"] {\n box-sizing: border-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n }\n [layout-md=\"column\"] {\n -webkit-flex-direction: column;\n -ms-flex-direction: column;\n flex-direction: column;\n }\n [layout-md=\"row\"] {\n -webkit-flex-direction: row;\n -ms-flex-direction: row;\n flex-direction: row;\n }\n}\n\n@media (min-width: 1280px) {\n [flex-order-gt-md=\"-20\"] {\n -webkit-order: -20;\n -ms-flex-order: -20;\n order: -20;\n }\n [flex-order-gt-md=\"-19\"] {\n -webkit-order: -19;\n -ms-flex-order: -19;\n order: -19;\n }\n [flex-order-gt-md=\"-18\"] {\n -webkit-order: -18;\n -ms-flex-order: -18;\n order: -18;\n }\n [flex-order-gt-md=\"-17\"] {\n -webkit-order: -17;\n -ms-flex-order: -17;\n order: -17;\n }\n [flex-order-gt-md=\"-16\"] {\n -webkit-order: -16;\n -ms-flex-order: -16;\n order: -16;\n }\n [flex-order-gt-md=\"-15\"] {\n -webkit-order: -15;\n -ms-flex-order: -15;\n order: -15;\n }\n [flex-order-gt-md=\"-14\"] {\n -webkit-order: -14;\n -ms-flex-order: -14;\n order: -14;\n }\n [flex-order-gt-md=\"-13\"] {\n -webkit-order: -13;\n -ms-flex-order: -13;\n order: -13;\n }\n [flex-order-gt-md=\"-12\"] {\n -webkit-order: -12;\n -ms-flex-order: -12;\n order: -12;\n }\n [flex-order-gt-md=\"-11\"] {\n -webkit-order: -11;\n -ms-flex-order: -11;\n order: -11;\n }\n [flex-order-gt-md=\"-10\"] {\n -webkit-order: -10;\n -ms-flex-order: -10;\n order: -10;\n }\n [flex-order-gt-md=\"-9\"] {\n -webkit-order: -9;\n -ms-flex-order: -9;\n order: -9;\n }\n [flex-order-gt-md=\"-8\"] {\n -webkit-order: -8;\n -ms-flex-order: -8;\n order: -8;\n }\n [flex-order-gt-md=\"-7\"] {\n -webkit-order: -7;\n -ms-flex-order: -7;\n order: -7;\n }\n [flex-order-gt-md=\"-6\"] {\n -webkit-order: -6;\n -ms-flex-order: -6;\n order: -6;\n }\n [flex-order-gt-md=\"-5\"] {\n -webkit-order: -5;\n -ms-flex-order: -5;\n order: -5;\n }\n [flex-order-gt-md=\"-4\"] {\n -webkit-order: -4;\n -ms-flex-order: -4;\n order: -4;\n }\n [flex-order-gt-md=\"-3\"] {\n -webkit-order: -3;\n -ms-flex-order: -3;\n order: -3;\n }\n [flex-order-gt-md=\"-2\"] {\n -webkit-order: -2;\n -ms-flex-order: -2;\n order: -2;\n }\n [flex-order-gt-md=\"-1\"] {\n -webkit-order: -1;\n -ms-flex-order: -1;\n order: -1;\n }\n [flex-order-gt-md=\"0\"] {\n -webkit-order: 0;\n -ms-flex-order: 0;\n order: 0;\n }\n [flex-order-gt-md=\"1\"] {\n -webkit-order: 1;\n -ms-flex-order: 1;\n order: 1;\n }\n [flex-order-gt-md=\"2\"] {\n -webkit-order: 2;\n -ms-flex-order: 2;\n order: 2;\n }\n [flex-order-gt-md=\"3\"] {\n -webkit-order: 3;\n -ms-flex-order: 3;\n order: 3;\n }\n [flex-order-gt-md=\"4\"] {\n -webkit-order: 4;\n -ms-flex-order: 4;\n order: 4;\n }\n [flex-order-gt-md=\"5\"] {\n -webkit-order: 5;\n -ms-flex-order: 5;\n order: 5;\n }\n [flex-order-gt-md=\"6\"] {\n -webkit-order: 6;\n -ms-flex-order: 6;\n order: 6;\n }\n [flex-order-gt-md=\"7\"] {\n -webkit-order: 7;\n -ms-flex-order: 7;\n order: 7;\n }\n [flex-order-gt-md=\"8\"] {\n -webkit-order: 8;\n -ms-flex-order: 8;\n order: 8;\n }\n [flex-order-gt-md=\"9\"] {\n -webkit-order: 9;\n -ms-flex-order: 9;\n order: 9;\n }\n [flex-order-gt-md=\"10\"] {\n -webkit-order: 10;\n -ms-flex-order: 10;\n order: 10;\n }\n [flex-order-gt-md=\"11\"] {\n -webkit-order: 11;\n -ms-flex-order: 11;\n order: 11;\n }\n [flex-order-gt-md=\"12\"] {\n -webkit-order: 12;\n -ms-flex-order: 12;\n order: 12;\n }\n [flex-order-gt-md=\"13\"] {\n -webkit-order: 13;\n -ms-flex-order: 13;\n order: 13;\n }\n [flex-order-gt-md=\"14\"] {\n -webkit-order: 14;\n -ms-flex-order: 14;\n order: 14;\n }\n [flex-order-gt-md=\"15\"] {\n -webkit-order: 15;\n -ms-flex-order: 15;\n order: 15;\n }\n [flex-order-gt-md=\"16\"] {\n -webkit-order: 16;\n -ms-flex-order: 16;\n order: 16;\n }\n [flex-order-gt-md=\"17\"] {\n -webkit-order: 17;\n -ms-flex-order: 17;\n order: 17;\n }\n [flex-order-gt-md=\"18\"] {\n -webkit-order: 18;\n -ms-flex-order: 18;\n order: 18;\n }\n [flex-order-gt-md=\"19\"] {\n -webkit-order: 19;\n -ms-flex-order: 19;\n order: 19;\n }\n [flex-order-gt-md=\"20\"] {\n -webkit-order: 20;\n -ms-flex-order: 20;\n order: 20;\n }\n [flex-offset-gt-md=\"0\"] {\n margin-left: 0%;\n }\n [flex-offset-gt-md=\"5\"] {\n margin-left: 5%;\n }\n [flex-offset-gt-md=\"10\"] {\n margin-left: 10%;\n }\n [flex-offset-gt-md=\"15\"] {\n margin-left: 15%;\n }\n [flex-offset-gt-md=\"20\"] {\n margin-left: 20%;\n }\n [flex-offset-gt-md=\"25\"] {\n margin-left: 25%;\n }\n [flex-offset-gt-md=\"30\"] {\n margin-left: 30%;\n }\n [flex-offset-gt-md=\"35\"] {\n margin-left: 35%;\n }\n [flex-offset-gt-md=\"40\"] {\n margin-left: 40%;\n }\n [flex-offset-gt-md=\"45\"] {\n margin-left: 45%;\n }\n [flex-offset-gt-md=\"50\"] {\n margin-left: 50%;\n }\n [flex-offset-gt-md=\"55\"] {\n margin-left: 55%;\n }\n [flex-offset-gt-md=\"60\"] {\n margin-left: 60%;\n }\n [flex-offset-gt-md=\"65\"] {\n margin-left: 65%;\n }\n [flex-offset-gt-md=\"70\"] {\n margin-left: 70%;\n }\n [flex-offset-gt-md=\"75\"] {\n margin-left: 75%;\n }\n [flex-offset-gt-md=\"80\"] {\n margin-left: 80%;\n }\n [flex-offset-gt-md=\"85\"] {\n margin-left: 85%;\n }\n [flex-offset-gt-md=\"90\"] {\n margin-left: 90%;\n }\n [flex-offset-gt-md=\"95\"] {\n margin-left: 95%;\n }\n [flex-offset-gt-md=\"33\"] {\n margin-left: calc(100% / 3);\n }\n [flex-offset-gt-md=\"66\"] {\n margin-left: calc(200% / 3);\n }\n [layout-align-gt-md] {\n -webkit-justify-content: flex-start;\n -ms-flex-pack: start;\n justify-content: flex-start;\n -webkit-align-content: stretch;\n -ms-flex-line-pack: stretch;\n align-content: stretch;\n -webkit-align-items: stretch;\n -ms-flex-align: stretch;\n align-items: stretch;\n }\n [layout-align-gt-md=\"start\"],\n [layout-align-gt-md=\"start start\"],\n [layout-align-gt-md=\"start center\"],\n [layout-align-gt-md=\"start end\"],\n [layout-align-gt-md=\"start stretch\"] {\n -webkit-justify-content: start;\n -ms-flex-pack: start;\n justify-content: start;\n }\n [layout-align-gt-md=\"center\"],\n [layout-align-gt-md=\"center start\"],\n [layout-align-gt-md=\"center center\"],\n [layout-align-gt-md=\"center end\"],\n [layout-align-gt-md=\"center stretch\"] {\n -webkit-justify-content: center;\n -ms-flex-pack: center;\n justify-content: center;\n }\n [layout-align-gt-md=\"end\"],\n [layout-align-gt-md=\"end center\"],\n [layout-align-gt-md=\"end start\"],\n [layout-align-gt-md=\"end end\"],\n [layout-align-gt-md=\"end stretch\"] {\n -webkit-justify-content: flex-end;\n -ms-flex-pack: end;\n justify-content: flex-end;\n }\n [layout-align-gt-md=\"space-around\"],\n [layout-align-gt-md=\"space-around center\"],\n [layout-align-gt-md=\"space-around start\"],\n [layout-align-gt-md=\"space-around end\"],\n [layout-align-gt-md=\"space-around stretch\"] {\n -webkit-justify-content: space-around;\n -ms-flex-pack: distribute;\n justify-content: space-around;\n }\n [layout-align-gt-md=\"space-between\"],\n [layout-align-gt-md=\"space-between center\"],\n [layout-align-gt-md=\"space-between start\"],\n [layout-align-gt-md=\"space-between end\"],\n [layout-align-gt-md=\"space-between stretch\"] {\n -webkit-justify-content: space-between;\n -ms-flex-pack: justify;\n justify-content: space-between;\n }\n [layout-align-gt-md=\"start start\"],\n [layout-align-gt-md=\"center start\"],\n [layout-align-gt-md=\"end start\"],\n [layout-align-gt-md=\"space-between start\"],\n [layout-align-gt-md=\"space-around start\"] {\n -webkit-align-items: flex-start;\n -ms-flex-align: start;\n align-items: flex-start;\n -webkit-align-content: flex-start;\n -ms-flex-line-pack: start;\n align-content: flex-start;\n }\n [layout-align-gt-md=\"start center\"],\n [layout-align-gt-md=\"center center\"],\n [layout-align-gt-md=\"end center\"],\n [layout-align-gt-md=\"space-between center\"],\n [layout-align-gt-md=\"space-around center\"] {\n -webkit-align-items: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-align-content: center;\n -ms-flex-line-pack: center;\n align-content: center;\n max-width: 100%;\n }\n [layout-align-gt-md=\"start center\"] > *,\n [layout-align-gt-md=\"center center\"] > *,\n [layout-align-gt-md=\"end center\"] > *,\n [layout-align-gt-md=\"space-between center\"] > *,\n [layout-align-gt-md=\"space-around center\"] > * {\n max-width: 100%;\n box-sizing: border-box;\n }\n [layout-align-gt-md=\"start end\"],\n [layout-align-gt-md=\"center end\"],\n [layout-align-gt-md=\"end end\"],\n [layout-align-gt-md=\"space-between end\"],\n [layout-align-gt-md=\"space-around end\"] {\n -webkit-align-items: flex-end;\n -ms-flex-align: end;\n align-items: flex-end;\n -webkit-align-content: flex-end;\n -ms-flex-line-pack: end;\n align-content: flex-end;\n }\n [layout-align-gt-md=\"start stretch\"],\n [layout-align-gt-md=\"center stretch\"],\n [layout-align-gt-md=\"end stretch\"],\n [layout-align-gt-md=\"space-between stretch\"],\n [layout-align-gt-md=\"space-around stretch\"] {\n -webkit-align-items: stretch;\n -ms-flex-align: stretch;\n align-items: stretch;\n -webkit-align-content: stretch;\n -ms-flex-line-pack: stretch;\n align-content: stretch;\n }\n [flex-gt-md] {\n -webkit-flex: 1;\n -ms-flex: 1;\n flex: 1;\n box-sizing: border-box;\n }\n}\n\n@media screen and (min-width: 1280px) {\n [flex-gt-md] {\n -webkit-flex: 1 1 0%;\n -ms-flex: 1 1 0%;\n flex: 1 1 0%;\n }\n}\n\n@media (min-width: 1280px) {\n [flex-gt-md-grow] {\n -webkit-flex: 1 1 100%;\n -ms-flex: 1 1 100%;\n flex: 1 1 100%;\n box-sizing: border-box;\n }\n [flex-gt-md-initial] {\n -webkit-flex: 0 1 auto;\n -ms-flex: 0 1 auto;\n flex: 0 1 auto;\n box-sizing: border-box;\n }\n [flex-gt-md-auto] {\n -webkit-flex: 1 1 auto;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n box-sizing: border-box;\n }\n [flex-gt-md-none] {\n -webkit-flex: 0 0 auto;\n -ms-flex: 0 0 auto;\n flex: 0 0 auto;\n box-sizing: border-box;\n }\n [flex-gt-md=\"0\"] {\n -webkit-flex: 1 1 0%;\n -ms-flex: 1 1 0%;\n flex: 1 1 0%;\n max-width: 0%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-md=\"0\"],\n [layout-gt-md=\"row\"] > [flex-gt-md=\"0\"] {\n -webkit-flex: 1 1 0%;\n -ms-flex: 1 1 0%;\n flex: 1 1 0%;\n max-width: 0%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-md=\"0\"],\n [layout-gt-md=\"column\"] > [flex-gt-md=\"0\"] {\n -webkit-flex: 1 1 0%;\n -ms-flex: 1 1 0%;\n flex: 1 1 0%;\n max-width: 100%;\n max-height: 0%;\n box-sizing: border-box;\n }\n [flex-gt-md=\"5\"] {\n -webkit-flex: 1 1 5%;\n -ms-flex: 1 1 5%;\n flex: 1 1 5%;\n max-width: 5%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-md=\"5\"],\n [layout-gt-md=\"row\"] > [flex-gt-md=\"5\"] {\n -webkit-flex: 1 1 5%;\n -ms-flex: 1 1 5%;\n flex: 1 1 5%;\n max-width: 5%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-md=\"5\"],\n [layout-gt-md=\"column\"] > [flex-gt-md=\"5\"] {\n -webkit-flex: 1 1 5%;\n -ms-flex: 1 1 5%;\n flex: 1 1 5%;\n max-width: 100%;\n max-height: 5%;\n box-sizing: border-box;\n }\n [flex-gt-md=\"10\"] {\n -webkit-flex: 1 1 10%;\n -ms-flex: 1 1 10%;\n flex: 1 1 10%;\n max-width: 10%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-md=\"10\"],\n [layout-gt-md=\"row\"] > [flex-gt-md=\"10\"] {\n -webkit-flex: 1 1 10%;\n -ms-flex: 1 1 10%;\n flex: 1 1 10%;\n max-width: 10%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-md=\"10\"],\n [layout-gt-md=\"column\"] > [flex-gt-md=\"10\"] {\n -webkit-flex: 1 1 10%;\n -ms-flex: 1 1 10%;\n flex: 1 1 10%;\n max-width: 100%;\n max-height: 10%;\n box-sizing: border-box;\n }\n [flex-gt-md=\"15\"] {\n -webkit-flex: 1 1 15%;\n -ms-flex: 1 1 15%;\n flex: 1 1 15%;\n max-width: 15%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-md=\"15\"],\n [layout-gt-md=\"row\"] > [flex-gt-md=\"15\"] {\n -webkit-flex: 1 1 15%;\n -ms-flex: 1 1 15%;\n flex: 1 1 15%;\n max-width: 15%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-md=\"15\"],\n [layout-gt-md=\"column\"] > [flex-gt-md=\"15\"] {\n -webkit-flex: 1 1 15%;\n -ms-flex: 1 1 15%;\n flex: 1 1 15%;\n max-width: 100%;\n max-height: 15%;\n box-sizing: border-box;\n }\n [flex-gt-md=\"20\"] {\n -webkit-flex: 1 1 20%;\n -ms-flex: 1 1 20%;\n flex: 1 1 20%;\n max-width: 20%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-md=\"20\"],\n [layout-gt-md=\"row\"] > [flex-gt-md=\"20\"] {\n -webkit-flex: 1 1 20%;\n -ms-flex: 1 1 20%;\n flex: 1 1 20%;\n max-width: 20%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-md=\"20\"],\n [layout-gt-md=\"column\"] > [flex-gt-md=\"20\"] {\n -webkit-flex: 1 1 20%;\n -ms-flex: 1 1 20%;\n flex: 1 1 20%;\n max-width: 100%;\n max-height: 20%;\n box-sizing: border-box;\n }\n [flex-gt-md=\"25\"] {\n -webkit-flex: 1 1 25%;\n -ms-flex: 1 1 25%;\n flex: 1 1 25%;\n max-width: 25%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-md=\"25\"],\n [layout-gt-md=\"row\"] > [flex-gt-md=\"25\"] {\n -webkit-flex: 1 1 25%;\n -ms-flex: 1 1 25%;\n flex: 1 1 25%;\n max-width: 25%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-md=\"25\"],\n [layout-gt-md=\"column\"] > [flex-gt-md=\"25\"] {\n -webkit-flex: 1 1 25%;\n -ms-flex: 1 1 25%;\n flex: 1 1 25%;\n max-width: 100%;\n max-height: 25%;\n box-sizing: border-box;\n }\n [flex-gt-md=\"30\"] {\n -webkit-flex: 1 1 30%;\n -ms-flex: 1 1 30%;\n flex: 1 1 30%;\n max-width: 30%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-md=\"30\"],\n [layout-gt-md=\"row\"] > [flex-gt-md=\"30\"] {\n -webkit-flex: 1 1 30%;\n -ms-flex: 1 1 30%;\n flex: 1 1 30%;\n max-width: 30%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-md=\"30\"],\n [layout-gt-md=\"column\"] > [flex-gt-md=\"30\"] {\n -webkit-flex: 1 1 30%;\n -ms-flex: 1 1 30%;\n flex: 1 1 30%;\n max-width: 100%;\n max-height: 30%;\n box-sizing: border-box;\n }\n [flex-gt-md=\"35\"] {\n -webkit-flex: 1 1 35%;\n -ms-flex: 1 1 35%;\n flex: 1 1 35%;\n max-width: 35%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-md=\"35\"],\n [layout-gt-md=\"row\"] > [flex-gt-md=\"35\"] {\n -webkit-flex: 1 1 35%;\n -ms-flex: 1 1 35%;\n flex: 1 1 35%;\n max-width: 35%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-md=\"35\"],\n [layout-gt-md=\"column\"] > [flex-gt-md=\"35\"] {\n -webkit-flex: 1 1 35%;\n -ms-flex: 1 1 35%;\n flex: 1 1 35%;\n max-width: 100%;\n max-height: 35%;\n box-sizing: border-box;\n }\n [flex-gt-md=\"40\"] {\n -webkit-flex: 1 1 40%;\n -ms-flex: 1 1 40%;\n flex: 1 1 40%;\n max-width: 40%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-md=\"40\"],\n [layout-gt-md=\"row\"] > [flex-gt-md=\"40\"] {\n -webkit-flex: 1 1 40%;\n -ms-flex: 1 1 40%;\n flex: 1 1 40%;\n max-width: 40%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-md=\"40\"],\n [layout-gt-md=\"column\"] > [flex-gt-md=\"40\"] {\n -webkit-flex: 1 1 40%;\n -ms-flex: 1 1 40%;\n flex: 1 1 40%;\n max-width: 100%;\n max-height: 40%;\n box-sizing: border-box;\n }\n [flex-gt-md=\"45\"] {\n -webkit-flex: 1 1 45%;\n -ms-flex: 1 1 45%;\n flex: 1 1 45%;\n max-width: 45%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-md=\"45\"],\n [layout-gt-md=\"row\"] > [flex-gt-md=\"45\"] {\n -webkit-flex: 1 1 45%;\n -ms-flex: 1 1 45%;\n flex: 1 1 45%;\n max-width: 45%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-md=\"45\"],\n [layout-gt-md=\"column\"] > [flex-gt-md=\"45\"] {\n -webkit-flex: 1 1 45%;\n -ms-flex: 1 1 45%;\n flex: 1 1 45%;\n max-width: 100%;\n max-height: 45%;\n box-sizing: border-box;\n }\n [flex-gt-md=\"50\"] {\n -webkit-flex: 1 1 50%;\n -ms-flex: 1 1 50%;\n flex: 1 1 50%;\n max-width: 50%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-md=\"50\"],\n [layout-gt-md=\"row\"] > [flex-gt-md=\"50\"] {\n -webkit-flex: 1 1 50%;\n -ms-flex: 1 1 50%;\n flex: 1 1 50%;\n max-width: 50%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-md=\"50\"],\n [layout-gt-md=\"column\"] > [flex-gt-md=\"50\"] {\n -webkit-flex: 1 1 50%;\n -ms-flex: 1 1 50%;\n flex: 1 1 50%;\n max-width: 100%;\n max-height: 50%;\n box-sizing: border-box;\n }\n [flex-gt-md=\"55\"] {\n -webkit-flex: 1 1 55%;\n -ms-flex: 1 1 55%;\n flex: 1 1 55%;\n max-width: 55%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-md=\"55\"],\n [layout-gt-md=\"row\"] > [flex-gt-md=\"55\"] {\n -webkit-flex: 1 1 55%;\n -ms-flex: 1 1 55%;\n flex: 1 1 55%;\n max-width: 55%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-md=\"55\"],\n [layout-gt-md=\"column\"] > [flex-gt-md=\"55\"] {\n -webkit-flex: 1 1 55%;\n -ms-flex: 1 1 55%;\n flex: 1 1 55%;\n max-width: 100%;\n max-height: 55%;\n box-sizing: border-box;\n }\n [flex-gt-md=\"60\"] {\n -webkit-flex: 1 1 60%;\n -ms-flex: 1 1 60%;\n flex: 1 1 60%;\n max-width: 60%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-md=\"60\"],\n [layout-gt-md=\"row\"] > [flex-gt-md=\"60\"] {\n -webkit-flex: 1 1 60%;\n -ms-flex: 1 1 60%;\n flex: 1 1 60%;\n max-width: 60%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-md=\"60\"],\n [layout-gt-md=\"column\"] > [flex-gt-md=\"60\"] {\n -webkit-flex: 1 1 60%;\n -ms-flex: 1 1 60%;\n flex: 1 1 60%;\n max-width: 100%;\n max-height: 60%;\n box-sizing: border-box;\n }\n [flex-gt-md=\"65\"] {\n -webkit-flex: 1 1 65%;\n -ms-flex: 1 1 65%;\n flex: 1 1 65%;\n max-width: 65%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-md=\"65\"],\n [layout-gt-md=\"row\"] > [flex-gt-md=\"65\"] {\n -webkit-flex: 1 1 65%;\n -ms-flex: 1 1 65%;\n flex: 1 1 65%;\n max-width: 65%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-md=\"65\"],\n [layout-gt-md=\"column\"] > [flex-gt-md=\"65\"] {\n -webkit-flex: 1 1 65%;\n -ms-flex: 1 1 65%;\n flex: 1 1 65%;\n max-width: 100%;\n max-height: 65%;\n box-sizing: border-box;\n }\n [flex-gt-md=\"70\"] {\n -webkit-flex: 1 1 70%;\n -ms-flex: 1 1 70%;\n flex: 1 1 70%;\n max-width: 70%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-md=\"70\"],\n [layout-gt-md=\"row\"] > [flex-gt-md=\"70\"] {\n -webkit-flex: 1 1 70%;\n -ms-flex: 1 1 70%;\n flex: 1 1 70%;\n max-width: 70%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-md=\"70\"],\n [layout-gt-md=\"column\"] > [flex-gt-md=\"70\"] {\n -webkit-flex: 1 1 70%;\n -ms-flex: 1 1 70%;\n flex: 1 1 70%;\n max-width: 100%;\n max-height: 70%;\n box-sizing: border-box;\n }\n [flex-gt-md=\"75\"] {\n -webkit-flex: 1 1 75%;\n -ms-flex: 1 1 75%;\n flex: 1 1 75%;\n max-width: 75%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-md=\"75\"],\n [layout-gt-md=\"row\"] > [flex-gt-md=\"75\"] {\n -webkit-flex: 1 1 75%;\n -ms-flex: 1 1 75%;\n flex: 1 1 75%;\n max-width: 75%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-md=\"75\"],\n [layout-gt-md=\"column\"] > [flex-gt-md=\"75\"] {\n -webkit-flex: 1 1 75%;\n -ms-flex: 1 1 75%;\n flex: 1 1 75%;\n max-width: 100%;\n max-height: 75%;\n box-sizing: border-box;\n }\n [flex-gt-md=\"80\"] {\n -webkit-flex: 1 1 80%;\n -ms-flex: 1 1 80%;\n flex: 1 1 80%;\n max-width: 80%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-md=\"80\"],\n [layout-gt-md=\"row\"] > [flex-gt-md=\"80\"] {\n -webkit-flex: 1 1 80%;\n -ms-flex: 1 1 80%;\n flex: 1 1 80%;\n max-width: 80%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-md=\"80\"],\n [layout-gt-md=\"column\"] > [flex-gt-md=\"80\"] {\n -webkit-flex: 1 1 80%;\n -ms-flex: 1 1 80%;\n flex: 1 1 80%;\n max-width: 100%;\n max-height: 80%;\n box-sizing: border-box;\n }\n [flex-gt-md=\"85\"] {\n -webkit-flex: 1 1 85%;\n -ms-flex: 1 1 85%;\n flex: 1 1 85%;\n max-width: 85%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-md=\"85\"],\n [layout-gt-md=\"row\"] > [flex-gt-md=\"85\"] {\n -webkit-flex: 1 1 85%;\n -ms-flex: 1 1 85%;\n flex: 1 1 85%;\n max-width: 85%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-md=\"85\"],\n [layout-gt-md=\"column\"] > [flex-gt-md=\"85\"] {\n -webkit-flex: 1 1 85%;\n -ms-flex: 1 1 85%;\n flex: 1 1 85%;\n max-width: 100%;\n max-height: 85%;\n box-sizing: border-box;\n }\n [flex-gt-md=\"90\"] {\n -webkit-flex: 1 1 90%;\n -ms-flex: 1 1 90%;\n flex: 1 1 90%;\n max-width: 90%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-md=\"90\"],\n [layout-gt-md=\"row\"] > [flex-gt-md=\"90\"] {\n -webkit-flex: 1 1 90%;\n -ms-flex: 1 1 90%;\n flex: 1 1 90%;\n max-width: 90%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-md=\"90\"],\n [layout-gt-md=\"column\"] > [flex-gt-md=\"90\"] {\n -webkit-flex: 1 1 90%;\n -ms-flex: 1 1 90%;\n flex: 1 1 90%;\n max-width: 100%;\n max-height: 90%;\n box-sizing: border-box;\n }\n [flex-gt-md=\"95\"] {\n -webkit-flex: 1 1 95%;\n -ms-flex: 1 1 95%;\n flex: 1 1 95%;\n max-width: 95%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-md=\"95\"],\n [layout-gt-md=\"row\"] > [flex-gt-md=\"95\"] {\n -webkit-flex: 1 1 95%;\n -ms-flex: 1 1 95%;\n flex: 1 1 95%;\n max-width: 95%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-md=\"95\"],\n [layout-gt-md=\"column\"] > [flex-gt-md=\"95\"] {\n -webkit-flex: 1 1 95%;\n -ms-flex: 1 1 95%;\n flex: 1 1 95%;\n max-width: 100%;\n max-height: 95%;\n box-sizing: border-box;\n }\n [flex-gt-md=\"100\"] {\n -webkit-flex: 1 1 100%;\n -ms-flex: 1 1 100%;\n flex: 1 1 100%;\n max-width: 100%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-md=\"100\"],\n [layout-gt-md=\"row\"] > [flex-gt-md=\"100\"] {\n -webkit-flex: 1 1 100%;\n -ms-flex: 1 1 100%;\n flex: 1 1 100%;\n max-width: 100%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-md=\"100\"],\n [layout-gt-md=\"column\"] > [flex-gt-md=\"100\"] {\n -webkit-flex: 1 1 100%;\n -ms-flex: 1 1 100%;\n flex: 1 1 100%;\n max-width: 100%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-md=\"33\"],\n [layout=\"row\"] > [flex-gt-md=\"33\"],\n [layout-gt-md=\"row\"] > [flex-gt-md=\"33\"],\n [layout-gt-md=\"row\"] > [flex-gt-md=\"33\"] {\n -webkit-flex: 1 1 33%;\n -ms-flex: 1 1 33%;\n flex: 1 1 33%;\n max-width: calc(100% / 3);\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-md=\"34\"],\n [layout=\"row\"] > [flex-gt-md=\"34\"],\n [layout-gt-md=\"row\"] > [flex-gt-md=\"34\"],\n [layout-gt-md=\"row\"] > [flex-gt-md=\"34\"] {\n -webkit-flex: 1 1 34%;\n -ms-flex: 1 1 34%;\n flex: 1 1 34%;\n max-width: 34%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-md=\"66\"],\n [layout=\"row\"] > [flex-gt-md=\"66\"],\n [layout-gt-md=\"row\"] > [flex-gt-md=\"66\"],\n [layout-gt-md=\"row\"] > [flex-gt-md=\"66\"] {\n -webkit-flex: 1 1 66%;\n -ms-flex: 1 1 66%;\n flex: 1 1 66%;\n max-width: calc(200% / 3);\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-md=\"67\"],\n [layout=\"row\"] > [flex-gt-md=\"67\"],\n [layout-gt-md=\"row\"] > [flex-gt-md=\"67\"],\n [layout-gt-md=\"row\"] > [flex-gt-md=\"67\"] {\n -webkit-flex: 1 1 67%;\n -ms-flex: 1 1 67%;\n flex: 1 1 67%;\n max-width: 67%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-md=\"33\"],\n [layout=\"column\"] > [flex-gt-md=\"33\"],\n [layout-gt-md=\"column\"] > [flex-gt-md=\"33\"],\n [layout-gt-md=\"column\"] > [flex-gt-md=\"33\"] {\n -webkit-flex: 1 1 33%;\n -ms-flex: 1 1 33%;\n flex: 1 1 33%;\n max-width: 100%;\n max-height: calc(100% / 3);\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-md=\"34\"],\n [layout=\"column\"] > [flex-gt-md=\"34\"],\n [layout-gt-md=\"column\"] > [flex-gt-md=\"34\"],\n [layout-gt-md=\"column\"] > [flex-gt-md=\"34\"] {\n -webkit-flex: 1 1 34%;\n -ms-flex: 1 1 34%;\n flex: 1 1 34%;\n max-width: 100%;\n max-height: 34%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-md=\"66\"],\n [layout=\"column\"] > [flex-gt-md=\"66\"],\n [layout-gt-md=\"column\"] > [flex-gt-md=\"66\"],\n [layout-gt-md=\"column\"] > [flex-gt-md=\"66\"] {\n -webkit-flex: 1 1 66%;\n -ms-flex: 1 1 66%;\n flex: 1 1 66%;\n max-width: 100%;\n max-height: calc(200% / 3);\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-md=\"67\"],\n [layout=\"column\"] > [flex-gt-md=\"67\"],\n [layout-gt-md=\"column\"] > [flex-gt-md=\"67\"],\n [layout-gt-md=\"column\"] > [flex-gt-md=\"67\"] {\n -webkit-flex: 1 1 67%;\n -ms-flex: 1 1 67%;\n flex: 1 1 67%;\n max-width: 100%;\n max-height: 67%;\n box-sizing: border-box;\n }\n [layout-gt-md],\n [layout-gt-md=\"column\"],\n [layout-gt-md=\"row\"] {\n box-sizing: border-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n }\n [layout-gt-md=\"column\"] {\n -webkit-flex-direction: column;\n -ms-flex-direction: column;\n flex-direction: column;\n }\n [layout-gt-md=\"row\"] {\n -webkit-flex-direction: row;\n -ms-flex-direction: row;\n flex-direction: row;\n }\n}\n\n@media (min-width: 1280px) and (max-width: 1919px) {\n [hide]:not([show-gt-xs]):not([show-gt-sm]):not([show-gt-md]):not([show-lg]):not([show]),\n [hide-gt-xs]:not([show-gt-xs]):not([show-gt-sm]):not([show-gt-md]):not([show-lg]):not([show]),\n [hide-gt-sm]:not([show-gt-xs]):not([show-gt-sm]):not([show-gt-md]):not([show-lg]):not([show]),\n [hide-gt-md]:not([show-gt-xs]):not([show-gt-sm]):not([show-gt-md]):not([show-lg]):not([show]) {\n display: none;\n }\n [hide-lg]:not([show-lg]):not([show]) {\n display: none;\n }\n [flex-order-lg=\"-20\"] {\n -webkit-order: -20;\n -ms-flex-order: -20;\n order: -20;\n }\n [flex-order-lg=\"-19\"] {\n -webkit-order: -19;\n -ms-flex-order: -19;\n order: -19;\n }\n [flex-order-lg=\"-18\"] {\n -webkit-order: -18;\n -ms-flex-order: -18;\n order: -18;\n }\n [flex-order-lg=\"-17\"] {\n -webkit-order: -17;\n -ms-flex-order: -17;\n order: -17;\n }\n [flex-order-lg=\"-16\"] {\n -webkit-order: -16;\n -ms-flex-order: -16;\n order: -16;\n }\n [flex-order-lg=\"-15\"] {\n -webkit-order: -15;\n -ms-flex-order: -15;\n order: -15;\n }\n [flex-order-lg=\"-14\"] {\n -webkit-order: -14;\n -ms-flex-order: -14;\n order: -14;\n }\n [flex-order-lg=\"-13\"] {\n -webkit-order: -13;\n -ms-flex-order: -13;\n order: -13;\n }\n [flex-order-lg=\"-12\"] {\n -webkit-order: -12;\n -ms-flex-order: -12;\n order: -12;\n }\n [flex-order-lg=\"-11\"] {\n -webkit-order: -11;\n -ms-flex-order: -11;\n order: -11;\n }\n [flex-order-lg=\"-10\"] {\n -webkit-order: -10;\n -ms-flex-order: -10;\n order: -10;\n }\n [flex-order-lg=\"-9\"] {\n -webkit-order: -9;\n -ms-flex-order: -9;\n order: -9;\n }\n [flex-order-lg=\"-8\"] {\n -webkit-order: -8;\n -ms-flex-order: -8;\n order: -8;\n }\n [flex-order-lg=\"-7\"] {\n -webkit-order: -7;\n -ms-flex-order: -7;\n order: -7;\n }\n [flex-order-lg=\"-6\"] {\n -webkit-order: -6;\n -ms-flex-order: -6;\n order: -6;\n }\n [flex-order-lg=\"-5\"] {\n -webkit-order: -5;\n -ms-flex-order: -5;\n order: -5;\n }\n [flex-order-lg=\"-4\"] {\n -webkit-order: -4;\n -ms-flex-order: -4;\n order: -4;\n }\n [flex-order-lg=\"-3\"] {\n -webkit-order: -3;\n -ms-flex-order: -3;\n order: -3;\n }\n [flex-order-lg=\"-2\"] {\n -webkit-order: -2;\n -ms-flex-order: -2;\n order: -2;\n }\n [flex-order-lg=\"-1\"] {\n -webkit-order: -1;\n -ms-flex-order: -1;\n order: -1;\n }\n [flex-order-lg=\"0\"] {\n -webkit-order: 0;\n -ms-flex-order: 0;\n order: 0;\n }\n [flex-order-lg=\"1\"] {\n -webkit-order: 1;\n -ms-flex-order: 1;\n order: 1;\n }\n [flex-order-lg=\"2\"] {\n -webkit-order: 2;\n -ms-flex-order: 2;\n order: 2;\n }\n [flex-order-lg=\"3\"] {\n -webkit-order: 3;\n -ms-flex-order: 3;\n order: 3;\n }\n [flex-order-lg=\"4\"] {\n -webkit-order: 4;\n -ms-flex-order: 4;\n order: 4;\n }\n [flex-order-lg=\"5\"] {\n -webkit-order: 5;\n -ms-flex-order: 5;\n order: 5;\n }\n [flex-order-lg=\"6\"] {\n -webkit-order: 6;\n -ms-flex-order: 6;\n order: 6;\n }\n [flex-order-lg=\"7\"] {\n -webkit-order: 7;\n -ms-flex-order: 7;\n order: 7;\n }\n [flex-order-lg=\"8\"] {\n -webkit-order: 8;\n -ms-flex-order: 8;\n order: 8;\n }\n [flex-order-lg=\"9\"] {\n -webkit-order: 9;\n -ms-flex-order: 9;\n order: 9;\n }\n [flex-order-lg=\"10\"] {\n -webkit-order: 10;\n -ms-flex-order: 10;\n order: 10;\n }\n [flex-order-lg=\"11\"] {\n -webkit-order: 11;\n -ms-flex-order: 11;\n order: 11;\n }\n [flex-order-lg=\"12\"] {\n -webkit-order: 12;\n -ms-flex-order: 12;\n order: 12;\n }\n [flex-order-lg=\"13\"] {\n -webkit-order: 13;\n -ms-flex-order: 13;\n order: 13;\n }\n [flex-order-lg=\"14\"] {\n -webkit-order: 14;\n -ms-flex-order: 14;\n order: 14;\n }\n [flex-order-lg=\"15\"] {\n -webkit-order: 15;\n -ms-flex-order: 15;\n order: 15;\n }\n [flex-order-lg=\"16\"] {\n -webkit-order: 16;\n -ms-flex-order: 16;\n order: 16;\n }\n [flex-order-lg=\"17\"] {\n -webkit-order: 17;\n -ms-flex-order: 17;\n order: 17;\n }\n [flex-order-lg=\"18\"] {\n -webkit-order: 18;\n -ms-flex-order: 18;\n order: 18;\n }\n [flex-order-lg=\"19\"] {\n -webkit-order: 19;\n -ms-flex-order: 19;\n order: 19;\n }\n [flex-order-lg=\"20\"] {\n -webkit-order: 20;\n -ms-flex-order: 20;\n order: 20;\n }\n [flex-offset-lg=\"0\"] {\n margin-left: 0%;\n }\n [flex-offset-lg=\"5\"] {\n margin-left: 5%;\n }\n [flex-offset-lg=\"10\"] {\n margin-left: 10%;\n }\n [flex-offset-lg=\"15\"] {\n margin-left: 15%;\n }\n [flex-offset-lg=\"20\"] {\n margin-left: 20%;\n }\n [flex-offset-lg=\"25\"] {\n margin-left: 25%;\n }\n [flex-offset-lg=\"30\"] {\n margin-left: 30%;\n }\n [flex-offset-lg=\"35\"] {\n margin-left: 35%;\n }\n [flex-offset-lg=\"40\"] {\n margin-left: 40%;\n }\n [flex-offset-lg=\"45\"] {\n margin-left: 45%;\n }\n [flex-offset-lg=\"50\"] {\n margin-left: 50%;\n }\n [flex-offset-lg=\"55\"] {\n margin-left: 55%;\n }\n [flex-offset-lg=\"60\"] {\n margin-left: 60%;\n }\n [flex-offset-lg=\"65\"] {\n margin-left: 65%;\n }\n [flex-offset-lg=\"70\"] {\n margin-left: 70%;\n }\n [flex-offset-lg=\"75\"] {\n margin-left: 75%;\n }\n [flex-offset-lg=\"80\"] {\n margin-left: 80%;\n }\n [flex-offset-lg=\"85\"] {\n margin-left: 85%;\n }\n [flex-offset-lg=\"90\"] {\n margin-left: 90%;\n }\n [flex-offset-lg=\"95\"] {\n margin-left: 95%;\n }\n [flex-offset-lg=\"33\"] {\n margin-left: calc(100% / 3);\n }\n [flex-offset-lg=\"66\"] {\n margin-left: calc(200% / 3);\n }\n [layout-align-lg] {\n -webkit-justify-content: flex-start;\n -ms-flex-pack: start;\n justify-content: flex-start;\n -webkit-align-content: stretch;\n -ms-flex-line-pack: stretch;\n align-content: stretch;\n -webkit-align-items: stretch;\n -ms-flex-align: stretch;\n align-items: stretch;\n }\n [layout-align-lg=\"start\"],\n [layout-align-lg=\"start start\"],\n [layout-align-lg=\"start center\"],\n [layout-align-lg=\"start end\"],\n [layout-align-lg=\"start stretch\"] {\n -webkit-justify-content: start;\n -ms-flex-pack: start;\n justify-content: start;\n }\n [layout-align-lg=\"center\"],\n [layout-align-lg=\"center start\"],\n [layout-align-lg=\"center center\"],\n [layout-align-lg=\"center end\"],\n [layout-align-lg=\"center stretch\"] {\n -webkit-justify-content: center;\n -ms-flex-pack: center;\n justify-content: center;\n }\n [layout-align-lg=\"end\"],\n [layout-align-lg=\"end center\"],\n [layout-align-lg=\"end start\"],\n [layout-align-lg=\"end end\"],\n [layout-align-lg=\"end stretch\"] {\n -webkit-justify-content: flex-end;\n -ms-flex-pack: end;\n justify-content: flex-end;\n }\n [layout-align-lg=\"space-around\"],\n [layout-align-lg=\"space-around center\"],\n [layout-align-lg=\"space-around start\"],\n [layout-align-lg=\"space-around end\"],\n [layout-align-lg=\"space-around stretch\"] {\n -webkit-justify-content: space-around;\n -ms-flex-pack: distribute;\n justify-content: space-around;\n }\n [layout-align-lg=\"space-between\"],\n [layout-align-lg=\"space-between center\"],\n [layout-align-lg=\"space-between start\"],\n [layout-align-lg=\"space-between end\"],\n [layout-align-lg=\"space-between stretch\"] {\n -webkit-justify-content: space-between;\n -ms-flex-pack: justify;\n justify-content: space-between;\n }\n [layout-align-lg=\"start start\"],\n [layout-align-lg=\"center start\"],\n [layout-align-lg=\"end start\"],\n [layout-align-lg=\"space-between start\"],\n [layout-align-lg=\"space-around start\"] {\n -webkit-align-items: flex-start;\n -ms-flex-align: start;\n align-items: flex-start;\n -webkit-align-content: flex-start;\n -ms-flex-line-pack: start;\n align-content: flex-start;\n }\n [layout-align-lg=\"start center\"],\n [layout-align-lg=\"center center\"],\n [layout-align-lg=\"end center\"],\n [layout-align-lg=\"space-between center\"],\n [layout-align-lg=\"space-around center\"] {\n -webkit-align-items: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-align-content: center;\n -ms-flex-line-pack: center;\n align-content: center;\n max-width: 100%;\n }\n [layout-align-lg=\"start center\"] > *,\n [layout-align-lg=\"center center\"] > *,\n [layout-align-lg=\"end center\"] > *,\n [layout-align-lg=\"space-between center\"] > *,\n [layout-align-lg=\"space-around center\"] > * {\n max-width: 100%;\n box-sizing: border-box;\n }\n [layout-align-lg=\"start end\"],\n [layout-align-lg=\"center end\"],\n [layout-align-lg=\"end end\"],\n [layout-align-lg=\"space-between end\"],\n [layout-align-lg=\"space-around end\"] {\n -webkit-align-items: flex-end;\n -ms-flex-align: end;\n align-items: flex-end;\n -webkit-align-content: flex-end;\n -ms-flex-line-pack: end;\n align-content: flex-end;\n }\n [layout-align-lg=\"start stretch\"],\n [layout-align-lg=\"center stretch\"],\n [layout-align-lg=\"end stretch\"],\n [layout-align-lg=\"space-between stretch\"],\n [layout-align-lg=\"space-around stretch\"] {\n -webkit-align-items: stretch;\n -ms-flex-align: stretch;\n align-items: stretch;\n -webkit-align-content: stretch;\n -ms-flex-line-pack: stretch;\n align-content: stretch;\n }\n [flex-lg] {\n -webkit-flex: 1;\n -ms-flex: 1;\n flex: 1;\n box-sizing: border-box;\n }\n}\n\n@media screen and (min-width: 1280px) and (max-width: 1919px) {\n [flex-lg] {\n -webkit-flex: 1 1 0%;\n -ms-flex: 1 1 0%;\n flex: 1 1 0%;\n }\n}\n\n@media (min-width: 1280px) and (max-width: 1919px) {\n [flex-lg-grow] {\n -webkit-flex: 1 1 100%;\n -ms-flex: 1 1 100%;\n flex: 1 1 100%;\n box-sizing: border-box;\n }\n [flex-lg-initial] {\n -webkit-flex: 0 1 auto;\n -ms-flex: 0 1 auto;\n flex: 0 1 auto;\n box-sizing: border-box;\n }\n [flex-lg-auto] {\n -webkit-flex: 1 1 auto;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n box-sizing: border-box;\n }\n [flex-lg-none] {\n -webkit-flex: 0 0 auto;\n -ms-flex: 0 0 auto;\n flex: 0 0 auto;\n box-sizing: border-box;\n }\n [flex-lg=\"0\"] {\n -webkit-flex: 1 1 0%;\n -ms-flex: 1 1 0%;\n flex: 1 1 0%;\n max-width: 0%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-lg=\"0\"],\n [layout-lg=\"row\"] > [flex-lg=\"0\"] {\n -webkit-flex: 1 1 0%;\n -ms-flex: 1 1 0%;\n flex: 1 1 0%;\n max-width: 0%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-lg=\"0\"],\n [layout-lg=\"column\"] > [flex-lg=\"0\"] {\n -webkit-flex: 1 1 0%;\n -ms-flex: 1 1 0%;\n flex: 1 1 0%;\n max-width: 100%;\n max-height: 0%;\n box-sizing: border-box;\n }\n [flex-lg=\"5\"] {\n -webkit-flex: 1 1 5%;\n -ms-flex: 1 1 5%;\n flex: 1 1 5%;\n max-width: 5%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-lg=\"5\"],\n [layout-lg=\"row\"] > [flex-lg=\"5\"] {\n -webkit-flex: 1 1 5%;\n -ms-flex: 1 1 5%;\n flex: 1 1 5%;\n max-width: 5%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-lg=\"5\"],\n [layout-lg=\"column\"] > [flex-lg=\"5\"] {\n -webkit-flex: 1 1 5%;\n -ms-flex: 1 1 5%;\n flex: 1 1 5%;\n max-width: 100%;\n max-height: 5%;\n box-sizing: border-box;\n }\n [flex-lg=\"10\"] {\n -webkit-flex: 1 1 10%;\n -ms-flex: 1 1 10%;\n flex: 1 1 10%;\n max-width: 10%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-lg=\"10\"],\n [layout-lg=\"row\"] > [flex-lg=\"10\"] {\n -webkit-flex: 1 1 10%;\n -ms-flex: 1 1 10%;\n flex: 1 1 10%;\n max-width: 10%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-lg=\"10\"],\n [layout-lg=\"column\"] > [flex-lg=\"10\"] {\n -webkit-flex: 1 1 10%;\n -ms-flex: 1 1 10%;\n flex: 1 1 10%;\n max-width: 100%;\n max-height: 10%;\n box-sizing: border-box;\n }\n [flex-lg=\"15\"] {\n -webkit-flex: 1 1 15%;\n -ms-flex: 1 1 15%;\n flex: 1 1 15%;\n max-width: 15%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-lg=\"15\"],\n [layout-lg=\"row\"] > [flex-lg=\"15\"] {\n -webkit-flex: 1 1 15%;\n -ms-flex: 1 1 15%;\n flex: 1 1 15%;\n max-width: 15%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-lg=\"15\"],\n [layout-lg=\"column\"] > [flex-lg=\"15\"] {\n -webkit-flex: 1 1 15%;\n -ms-flex: 1 1 15%;\n flex: 1 1 15%;\n max-width: 100%;\n max-height: 15%;\n box-sizing: border-box;\n }\n [flex-lg=\"20\"] {\n -webkit-flex: 1 1 20%;\n -ms-flex: 1 1 20%;\n flex: 1 1 20%;\n max-width: 20%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-lg=\"20\"],\n [layout-lg=\"row\"] > [flex-lg=\"20\"] {\n -webkit-flex: 1 1 20%;\n -ms-flex: 1 1 20%;\n flex: 1 1 20%;\n max-width: 20%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-lg=\"20\"],\n [layout-lg=\"column\"] > [flex-lg=\"20\"] {\n -webkit-flex: 1 1 20%;\n -ms-flex: 1 1 20%;\n flex: 1 1 20%;\n max-width: 100%;\n max-height: 20%;\n box-sizing: border-box;\n }\n [flex-lg=\"25\"] {\n -webkit-flex: 1 1 25%;\n -ms-flex: 1 1 25%;\n flex: 1 1 25%;\n max-width: 25%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-lg=\"25\"],\n [layout-lg=\"row\"] > [flex-lg=\"25\"] {\n -webkit-flex: 1 1 25%;\n -ms-flex: 1 1 25%;\n flex: 1 1 25%;\n max-width: 25%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-lg=\"25\"],\n [layout-lg=\"column\"] > [flex-lg=\"25\"] {\n -webkit-flex: 1 1 25%;\n -ms-flex: 1 1 25%;\n flex: 1 1 25%;\n max-width: 100%;\n max-height: 25%;\n box-sizing: border-box;\n }\n [flex-lg=\"30\"] {\n -webkit-flex: 1 1 30%;\n -ms-flex: 1 1 30%;\n flex: 1 1 30%;\n max-width: 30%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-lg=\"30\"],\n [layout-lg=\"row\"] > [flex-lg=\"30\"] {\n -webkit-flex: 1 1 30%;\n -ms-flex: 1 1 30%;\n flex: 1 1 30%;\n max-width: 30%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-lg=\"30\"],\n [layout-lg=\"column\"] > [flex-lg=\"30\"] {\n -webkit-flex: 1 1 30%;\n -ms-flex: 1 1 30%;\n flex: 1 1 30%;\n max-width: 100%;\n max-height: 30%;\n box-sizing: border-box;\n }\n [flex-lg=\"35\"] {\n -webkit-flex: 1 1 35%;\n -ms-flex: 1 1 35%;\n flex: 1 1 35%;\n max-width: 35%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-lg=\"35\"],\n [layout-lg=\"row\"] > [flex-lg=\"35\"] {\n -webkit-flex: 1 1 35%;\n -ms-flex: 1 1 35%;\n flex: 1 1 35%;\n max-width: 35%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-lg=\"35\"],\n [layout-lg=\"column\"] > [flex-lg=\"35\"] {\n -webkit-flex: 1 1 35%;\n -ms-flex: 1 1 35%;\n flex: 1 1 35%;\n max-width: 100%;\n max-height: 35%;\n box-sizing: border-box;\n }\n [flex-lg=\"40\"] {\n -webkit-flex: 1 1 40%;\n -ms-flex: 1 1 40%;\n flex: 1 1 40%;\n max-width: 40%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-lg=\"40\"],\n [layout-lg=\"row\"] > [flex-lg=\"40\"] {\n -webkit-flex: 1 1 40%;\n -ms-flex: 1 1 40%;\n flex: 1 1 40%;\n max-width: 40%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-lg=\"40\"],\n [layout-lg=\"column\"] > [flex-lg=\"40\"] {\n -webkit-flex: 1 1 40%;\n -ms-flex: 1 1 40%;\n flex: 1 1 40%;\n max-width: 100%;\n max-height: 40%;\n box-sizing: border-box;\n }\n [flex-lg=\"45\"] {\n -webkit-flex: 1 1 45%;\n -ms-flex: 1 1 45%;\n flex: 1 1 45%;\n max-width: 45%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-lg=\"45\"],\n [layout-lg=\"row\"] > [flex-lg=\"45\"] {\n -webkit-flex: 1 1 45%;\n -ms-flex: 1 1 45%;\n flex: 1 1 45%;\n max-width: 45%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-lg=\"45\"],\n [layout-lg=\"column\"] > [flex-lg=\"45\"] {\n -webkit-flex: 1 1 45%;\n -ms-flex: 1 1 45%;\n flex: 1 1 45%;\n max-width: 100%;\n max-height: 45%;\n box-sizing: border-box;\n }\n [flex-lg=\"50\"] {\n -webkit-flex: 1 1 50%;\n -ms-flex: 1 1 50%;\n flex: 1 1 50%;\n max-width: 50%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-lg=\"50\"],\n [layout-lg=\"row\"] > [flex-lg=\"50\"] {\n -webkit-flex: 1 1 50%;\n -ms-flex: 1 1 50%;\n flex: 1 1 50%;\n max-width: 50%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-lg=\"50\"],\n [layout-lg=\"column\"] > [flex-lg=\"50\"] {\n -webkit-flex: 1 1 50%;\n -ms-flex: 1 1 50%;\n flex: 1 1 50%;\n max-width: 100%;\n max-height: 50%;\n box-sizing: border-box;\n }\n [flex-lg=\"55\"] {\n -webkit-flex: 1 1 55%;\n -ms-flex: 1 1 55%;\n flex: 1 1 55%;\n max-width: 55%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-lg=\"55\"],\n [layout-lg=\"row\"] > [flex-lg=\"55\"] {\n -webkit-flex: 1 1 55%;\n -ms-flex: 1 1 55%;\n flex: 1 1 55%;\n max-width: 55%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-lg=\"55\"],\n [layout-lg=\"column\"] > [flex-lg=\"55\"] {\n -webkit-flex: 1 1 55%;\n -ms-flex: 1 1 55%;\n flex: 1 1 55%;\n max-width: 100%;\n max-height: 55%;\n box-sizing: border-box;\n }\n [flex-lg=\"60\"] {\n -webkit-flex: 1 1 60%;\n -ms-flex: 1 1 60%;\n flex: 1 1 60%;\n max-width: 60%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-lg=\"60\"],\n [layout-lg=\"row\"] > [flex-lg=\"60\"] {\n -webkit-flex: 1 1 60%;\n -ms-flex: 1 1 60%;\n flex: 1 1 60%;\n max-width: 60%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-lg=\"60\"],\n [layout-lg=\"column\"] > [flex-lg=\"60\"] {\n -webkit-flex: 1 1 60%;\n -ms-flex: 1 1 60%;\n flex: 1 1 60%;\n max-width: 100%;\n max-height: 60%;\n box-sizing: border-box;\n }\n [flex-lg=\"65\"] {\n -webkit-flex: 1 1 65%;\n -ms-flex: 1 1 65%;\n flex: 1 1 65%;\n max-width: 65%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-lg=\"65\"],\n [layout-lg=\"row\"] > [flex-lg=\"65\"] {\n -webkit-flex: 1 1 65%;\n -ms-flex: 1 1 65%;\n flex: 1 1 65%;\n max-width: 65%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-lg=\"65\"],\n [layout-lg=\"column\"] > [flex-lg=\"65\"] {\n -webkit-flex: 1 1 65%;\n -ms-flex: 1 1 65%;\n flex: 1 1 65%;\n max-width: 100%;\n max-height: 65%;\n box-sizing: border-box;\n }\n [flex-lg=\"70\"] {\n -webkit-flex: 1 1 70%;\n -ms-flex: 1 1 70%;\n flex: 1 1 70%;\n max-width: 70%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-lg=\"70\"],\n [layout-lg=\"row\"] > [flex-lg=\"70\"] {\n -webkit-flex: 1 1 70%;\n -ms-flex: 1 1 70%;\n flex: 1 1 70%;\n max-width: 70%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-lg=\"70\"],\n [layout-lg=\"column\"] > [flex-lg=\"70\"] {\n -webkit-flex: 1 1 70%;\n -ms-flex: 1 1 70%;\n flex: 1 1 70%;\n max-width: 100%;\n max-height: 70%;\n box-sizing: border-box;\n }\n [flex-lg=\"75\"] {\n -webkit-flex: 1 1 75%;\n -ms-flex: 1 1 75%;\n flex: 1 1 75%;\n max-width: 75%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-lg=\"75\"],\n [layout-lg=\"row\"] > [flex-lg=\"75\"] {\n -webkit-flex: 1 1 75%;\n -ms-flex: 1 1 75%;\n flex: 1 1 75%;\n max-width: 75%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-lg=\"75\"],\n [layout-lg=\"column\"] > [flex-lg=\"75\"] {\n -webkit-flex: 1 1 75%;\n -ms-flex: 1 1 75%;\n flex: 1 1 75%;\n max-width: 100%;\n max-height: 75%;\n box-sizing: border-box;\n }\n [flex-lg=\"80\"] {\n -webkit-flex: 1 1 80%;\n -ms-flex: 1 1 80%;\n flex: 1 1 80%;\n max-width: 80%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-lg=\"80\"],\n [layout-lg=\"row\"] > [flex-lg=\"80\"] {\n -webkit-flex: 1 1 80%;\n -ms-flex: 1 1 80%;\n flex: 1 1 80%;\n max-width: 80%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-lg=\"80\"],\n [layout-lg=\"column\"] > [flex-lg=\"80\"] {\n -webkit-flex: 1 1 80%;\n -ms-flex: 1 1 80%;\n flex: 1 1 80%;\n max-width: 100%;\n max-height: 80%;\n box-sizing: border-box;\n }\n [flex-lg=\"85\"] {\n -webkit-flex: 1 1 85%;\n -ms-flex: 1 1 85%;\n flex: 1 1 85%;\n max-width: 85%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-lg=\"85\"],\n [layout-lg=\"row\"] > [flex-lg=\"85\"] {\n -webkit-flex: 1 1 85%;\n -ms-flex: 1 1 85%;\n flex: 1 1 85%;\n max-width: 85%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-lg=\"85\"],\n [layout-lg=\"column\"] > [flex-lg=\"85\"] {\n -webkit-flex: 1 1 85%;\n -ms-flex: 1 1 85%;\n flex: 1 1 85%;\n max-width: 100%;\n max-height: 85%;\n box-sizing: border-box;\n }\n [flex-lg=\"90\"] {\n -webkit-flex: 1 1 90%;\n -ms-flex: 1 1 90%;\n flex: 1 1 90%;\n max-width: 90%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-lg=\"90\"],\n [layout-lg=\"row\"] > [flex-lg=\"90\"] {\n -webkit-flex: 1 1 90%;\n -ms-flex: 1 1 90%;\n flex: 1 1 90%;\n max-width: 90%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-lg=\"90\"],\n [layout-lg=\"column\"] > [flex-lg=\"90\"] {\n -webkit-flex: 1 1 90%;\n -ms-flex: 1 1 90%;\n flex: 1 1 90%;\n max-width: 100%;\n max-height: 90%;\n box-sizing: border-box;\n }\n [flex-lg=\"95\"] {\n -webkit-flex: 1 1 95%;\n -ms-flex: 1 1 95%;\n flex: 1 1 95%;\n max-width: 95%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-lg=\"95\"],\n [layout-lg=\"row\"] > [flex-lg=\"95\"] {\n -webkit-flex: 1 1 95%;\n -ms-flex: 1 1 95%;\n flex: 1 1 95%;\n max-width: 95%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-lg=\"95\"],\n [layout-lg=\"column\"] > [flex-lg=\"95\"] {\n -webkit-flex: 1 1 95%;\n -ms-flex: 1 1 95%;\n flex: 1 1 95%;\n max-width: 100%;\n max-height: 95%;\n box-sizing: border-box;\n }\n [flex-lg=\"100\"] {\n -webkit-flex: 1 1 100%;\n -ms-flex: 1 1 100%;\n flex: 1 1 100%;\n max-width: 100%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-lg=\"100\"],\n [layout-lg=\"row\"] > [flex-lg=\"100\"] {\n -webkit-flex: 1 1 100%;\n -ms-flex: 1 1 100%;\n flex: 1 1 100%;\n max-width: 100%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-lg=\"100\"],\n [layout-lg=\"column\"] > [flex-lg=\"100\"] {\n -webkit-flex: 1 1 100%;\n -ms-flex: 1 1 100%;\n flex: 1 1 100%;\n max-width: 100%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-lg=\"33\"],\n [layout=\"row\"] > [flex-lg=\"33\"],\n [layout-lg=\"row\"] > [flex-lg=\"33\"],\n [layout-lg=\"row\"] > [flex-lg=\"33\"] {\n -webkit-flex: 1 1 33%;\n -ms-flex: 1 1 33%;\n flex: 1 1 33%;\n max-width: calc(100% / 3);\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-lg=\"34\"],\n [layout=\"row\"] > [flex-lg=\"34\"],\n [layout-lg=\"row\"] > [flex-lg=\"34\"],\n [layout-lg=\"row\"] > [flex-lg=\"34\"] {\n -webkit-flex: 1 1 34%;\n -ms-flex: 1 1 34%;\n flex: 1 1 34%;\n max-width: 34%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-lg=\"66\"],\n [layout=\"row\"] > [flex-lg=\"66\"],\n [layout-lg=\"row\"] > [flex-lg=\"66\"],\n [layout-lg=\"row\"] > [flex-lg=\"66\"] {\n -webkit-flex: 1 1 66%;\n -ms-flex: 1 1 66%;\n flex: 1 1 66%;\n max-width: calc(200% / 3);\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-lg=\"67\"],\n [layout=\"row\"] > [flex-lg=\"67\"],\n [layout-lg=\"row\"] > [flex-lg=\"67\"],\n [layout-lg=\"row\"] > [flex-lg=\"67\"] {\n -webkit-flex: 1 1 67%;\n -ms-flex: 1 1 67%;\n flex: 1 1 67%;\n max-width: 67%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-lg=\"33\"],\n [layout=\"column\"] > [flex-lg=\"33\"],\n [layout-lg=\"column\"] > [flex-lg=\"33\"],\n [layout-lg=\"column\"] > [flex-lg=\"33\"] {\n -webkit-flex: 1 1 33%;\n -ms-flex: 1 1 33%;\n flex: 1 1 33%;\n max-width: 100%;\n max-height: calc(100% / 3);\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-lg=\"34\"],\n [layout=\"column\"] > [flex-lg=\"34\"],\n [layout-lg=\"column\"] > [flex-lg=\"34\"],\n [layout-lg=\"column\"] > [flex-lg=\"34\"] {\n -webkit-flex: 1 1 34%;\n -ms-flex: 1 1 34%;\n flex: 1 1 34%;\n max-width: 100%;\n max-height: 34%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-lg=\"66\"],\n [layout=\"column\"] > [flex-lg=\"66\"],\n [layout-lg=\"column\"] > [flex-lg=\"66\"],\n [layout-lg=\"column\"] > [flex-lg=\"66\"] {\n -webkit-flex: 1 1 66%;\n -ms-flex: 1 1 66%;\n flex: 1 1 66%;\n max-width: 100%;\n max-height: calc(200% / 3);\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-lg=\"67\"],\n [layout=\"column\"] > [flex-lg=\"67\"],\n [layout-lg=\"column\"] > [flex-lg=\"67\"],\n [layout-lg=\"column\"] > [flex-lg=\"67\"] {\n -webkit-flex: 1 1 67%;\n -ms-flex: 1 1 67%;\n flex: 1 1 67%;\n max-width: 100%;\n max-height: 67%;\n box-sizing: border-box;\n }\n [layout-lg],\n [layout-lg=\"column\"],\n [layout-lg=\"row\"] {\n box-sizing: border-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n }\n [layout-lg=\"column\"] {\n -webkit-flex-direction: column;\n -ms-flex-direction: column;\n flex-direction: column;\n }\n [layout-lg=\"row\"] {\n -webkit-flex-direction: row;\n -ms-flex-direction: row;\n flex-direction: row;\n }\n}\n\n@media (min-width: 1920px) {\n [flex-order-gt-lg=\"-20\"] {\n -webkit-order: -20;\n -ms-flex-order: -20;\n order: -20;\n }\n [flex-order-gt-lg=\"-19\"] {\n -webkit-order: -19;\n -ms-flex-order: -19;\n order: -19;\n }\n [flex-order-gt-lg=\"-18\"] {\n -webkit-order: -18;\n -ms-flex-order: -18;\n order: -18;\n }\n [flex-order-gt-lg=\"-17\"] {\n -webkit-order: -17;\n -ms-flex-order: -17;\n order: -17;\n }\n [flex-order-gt-lg=\"-16\"] {\n -webkit-order: -16;\n -ms-flex-order: -16;\n order: -16;\n }\n [flex-order-gt-lg=\"-15\"] {\n -webkit-order: -15;\n -ms-flex-order: -15;\n order: -15;\n }\n [flex-order-gt-lg=\"-14\"] {\n -webkit-order: -14;\n -ms-flex-order: -14;\n order: -14;\n }\n [flex-order-gt-lg=\"-13\"] {\n -webkit-order: -13;\n -ms-flex-order: -13;\n order: -13;\n }\n [flex-order-gt-lg=\"-12\"] {\n -webkit-order: -12;\n -ms-flex-order: -12;\n order: -12;\n }\n [flex-order-gt-lg=\"-11\"] {\n -webkit-order: -11;\n -ms-flex-order: -11;\n order: -11;\n }\n [flex-order-gt-lg=\"-10\"] {\n -webkit-order: -10;\n -ms-flex-order: -10;\n order: -10;\n }\n [flex-order-gt-lg=\"-9\"] {\n -webkit-order: -9;\n -ms-flex-order: -9;\n order: -9;\n }\n [flex-order-gt-lg=\"-8\"] {\n -webkit-order: -8;\n -ms-flex-order: -8;\n order: -8;\n }\n [flex-order-gt-lg=\"-7\"] {\n -webkit-order: -7;\n -ms-flex-order: -7;\n order: -7;\n }\n [flex-order-gt-lg=\"-6\"] {\n -webkit-order: -6;\n -ms-flex-order: -6;\n order: -6;\n }\n [flex-order-gt-lg=\"-5\"] {\n -webkit-order: -5;\n -ms-flex-order: -5;\n order: -5;\n }\n [flex-order-gt-lg=\"-4\"] {\n -webkit-order: -4;\n -ms-flex-order: -4;\n order: -4;\n }\n [flex-order-gt-lg=\"-3\"] {\n -webkit-order: -3;\n -ms-flex-order: -3;\n order: -3;\n }\n [flex-order-gt-lg=\"-2\"] {\n -webkit-order: -2;\n -ms-flex-order: -2;\n order: -2;\n }\n [flex-order-gt-lg=\"-1\"] {\n -webkit-order: -1;\n -ms-flex-order: -1;\n order: -1;\n }\n [flex-order-gt-lg=\"0\"] {\n -webkit-order: 0;\n -ms-flex-order: 0;\n order: 0;\n }\n [flex-order-gt-lg=\"1\"] {\n -webkit-order: 1;\n -ms-flex-order: 1;\n order: 1;\n }\n [flex-order-gt-lg=\"2\"] {\n -webkit-order: 2;\n -ms-flex-order: 2;\n order: 2;\n }\n [flex-order-gt-lg=\"3\"] {\n -webkit-order: 3;\n -ms-flex-order: 3;\n order: 3;\n }\n [flex-order-gt-lg=\"4\"] {\n -webkit-order: 4;\n -ms-flex-order: 4;\n order: 4;\n }\n [flex-order-gt-lg=\"5\"] {\n -webkit-order: 5;\n -ms-flex-order: 5;\n order: 5;\n }\n [flex-order-gt-lg=\"6\"] {\n -webkit-order: 6;\n -ms-flex-order: 6;\n order: 6;\n }\n [flex-order-gt-lg=\"7\"] {\n -webkit-order: 7;\n -ms-flex-order: 7;\n order: 7;\n }\n [flex-order-gt-lg=\"8\"] {\n -webkit-order: 8;\n -ms-flex-order: 8;\n order: 8;\n }\n [flex-order-gt-lg=\"9\"] {\n -webkit-order: 9;\n -ms-flex-order: 9;\n order: 9;\n }\n [flex-order-gt-lg=\"10\"] {\n -webkit-order: 10;\n -ms-flex-order: 10;\n order: 10;\n }\n [flex-order-gt-lg=\"11\"] {\n -webkit-order: 11;\n -ms-flex-order: 11;\n order: 11;\n }\n [flex-order-gt-lg=\"12\"] {\n -webkit-order: 12;\n -ms-flex-order: 12;\n order: 12;\n }\n [flex-order-gt-lg=\"13\"] {\n -webkit-order: 13;\n -ms-flex-order: 13;\n order: 13;\n }\n [flex-order-gt-lg=\"14\"] {\n -webkit-order: 14;\n -ms-flex-order: 14;\n order: 14;\n }\n [flex-order-gt-lg=\"15\"] {\n -webkit-order: 15;\n -ms-flex-order: 15;\n order: 15;\n }\n [flex-order-gt-lg=\"16\"] {\n -webkit-order: 16;\n -ms-flex-order: 16;\n order: 16;\n }\n [flex-order-gt-lg=\"17\"] {\n -webkit-order: 17;\n -ms-flex-order: 17;\n order: 17;\n }\n [flex-order-gt-lg=\"18\"] {\n -webkit-order: 18;\n -ms-flex-order: 18;\n order: 18;\n }\n [flex-order-gt-lg=\"19\"] {\n -webkit-order: 19;\n -ms-flex-order: 19;\n order: 19;\n }\n [flex-order-gt-lg=\"20\"] {\n -webkit-order: 20;\n -ms-flex-order: 20;\n order: 20;\n }\n [flex-offset-gt-lg=\"0\"] {\n margin-left: 0%;\n }\n [flex-offset-gt-lg=\"5\"] {\n margin-left: 5%;\n }\n [flex-offset-gt-lg=\"10\"] {\n margin-left: 10%;\n }\n [flex-offset-gt-lg=\"15\"] {\n margin-left: 15%;\n }\n [flex-offset-gt-lg=\"20\"] {\n margin-left: 20%;\n }\n [flex-offset-gt-lg=\"25\"] {\n margin-left: 25%;\n }\n [flex-offset-gt-lg=\"30\"] {\n margin-left: 30%;\n }\n [flex-offset-gt-lg=\"35\"] {\n margin-left: 35%;\n }\n [flex-offset-gt-lg=\"40\"] {\n margin-left: 40%;\n }\n [flex-offset-gt-lg=\"45\"] {\n margin-left: 45%;\n }\n [flex-offset-gt-lg=\"50\"] {\n margin-left: 50%;\n }\n [flex-offset-gt-lg=\"55\"] {\n margin-left: 55%;\n }\n [flex-offset-gt-lg=\"60\"] {\n margin-left: 60%;\n }\n [flex-offset-gt-lg=\"65\"] {\n margin-left: 65%;\n }\n [flex-offset-gt-lg=\"70\"] {\n margin-left: 70%;\n }\n [flex-offset-gt-lg=\"75\"] {\n margin-left: 75%;\n }\n [flex-offset-gt-lg=\"80\"] {\n margin-left: 80%;\n }\n [flex-offset-gt-lg=\"85\"] {\n margin-left: 85%;\n }\n [flex-offset-gt-lg=\"90\"] {\n margin-left: 90%;\n }\n [flex-offset-gt-lg=\"95\"] {\n margin-left: 95%;\n }\n [flex-offset-gt-lg=\"33\"] {\n margin-left: calc(100% / 3);\n }\n [flex-offset-gt-lg=\"66\"] {\n margin-left: calc(200% / 3);\n }\n [layout-align-gt-lg] {\n -webkit-justify-content: flex-start;\n -ms-flex-pack: start;\n justify-content: flex-start;\n -webkit-align-content: stretch;\n -ms-flex-line-pack: stretch;\n align-content: stretch;\n -webkit-align-items: stretch;\n -ms-flex-align: stretch;\n align-items: stretch;\n }\n [layout-align-gt-lg=\"start\"],\n [layout-align-gt-lg=\"start start\"],\n [layout-align-gt-lg=\"start center\"],\n [layout-align-gt-lg=\"start end\"],\n [layout-align-gt-lg=\"start stretch\"] {\n -webkit-justify-content: start;\n -ms-flex-pack: start;\n justify-content: start;\n }\n [layout-align-gt-lg=\"center\"],\n [layout-align-gt-lg=\"center start\"],\n [layout-align-gt-lg=\"center center\"],\n [layout-align-gt-lg=\"center end\"],\n [layout-align-gt-lg=\"center stretch\"] {\n -webkit-justify-content: center;\n -ms-flex-pack: center;\n justify-content: center;\n }\n [layout-align-gt-lg=\"end\"],\n [layout-align-gt-lg=\"end center\"],\n [layout-align-gt-lg=\"end start\"],\n [layout-align-gt-lg=\"end end\"],\n [layout-align-gt-lg=\"end stretch\"] {\n -webkit-justify-content: flex-end;\n -ms-flex-pack: end;\n justify-content: flex-end;\n }\n [layout-align-gt-lg=\"space-around\"],\n [layout-align-gt-lg=\"space-around center\"],\n [layout-align-gt-lg=\"space-around start\"],\n [layout-align-gt-lg=\"space-around end\"],\n [layout-align-gt-lg=\"space-around stretch\"] {\n -webkit-justify-content: space-around;\n -ms-flex-pack: distribute;\n justify-content: space-around;\n }\n [layout-align-gt-lg=\"space-between\"],\n [layout-align-gt-lg=\"space-between center\"],\n [layout-align-gt-lg=\"space-between start\"],\n [layout-align-gt-lg=\"space-between end\"],\n [layout-align-gt-lg=\"space-between stretch\"] {\n -webkit-justify-content: space-between;\n -ms-flex-pack: justify;\n justify-content: space-between;\n }\n [layout-align-gt-lg=\"start start\"],\n [layout-align-gt-lg=\"center start\"],\n [layout-align-gt-lg=\"end start\"],\n [layout-align-gt-lg=\"space-between start\"],\n [layout-align-gt-lg=\"space-around start\"] {\n -webkit-align-items: flex-start;\n -ms-flex-align: start;\n align-items: flex-start;\n -webkit-align-content: flex-start;\n -ms-flex-line-pack: start;\n align-content: flex-start;\n }\n [layout-align-gt-lg=\"start center\"],\n [layout-align-gt-lg=\"center center\"],\n [layout-align-gt-lg=\"end center\"],\n [layout-align-gt-lg=\"space-between center\"],\n [layout-align-gt-lg=\"space-around center\"] {\n -webkit-align-items: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-align-content: center;\n -ms-flex-line-pack: center;\n align-content: center;\n max-width: 100%;\n }\n [layout-align-gt-lg=\"start center\"] > *,\n [layout-align-gt-lg=\"center center\"] > *,\n [layout-align-gt-lg=\"end center\"] > *,\n [layout-align-gt-lg=\"space-between center\"] > *,\n [layout-align-gt-lg=\"space-around center\"] > * {\n max-width: 100%;\n box-sizing: border-box;\n }\n [layout-align-gt-lg=\"start end\"],\n [layout-align-gt-lg=\"center end\"],\n [layout-align-gt-lg=\"end end\"],\n [layout-align-gt-lg=\"space-between end\"],\n [layout-align-gt-lg=\"space-around end\"] {\n -webkit-align-items: flex-end;\n -ms-flex-align: end;\n align-items: flex-end;\n -webkit-align-content: flex-end;\n -ms-flex-line-pack: end;\n align-content: flex-end;\n }\n [layout-align-gt-lg=\"start stretch\"],\n [layout-align-gt-lg=\"center stretch\"],\n [layout-align-gt-lg=\"end stretch\"],\n [layout-align-gt-lg=\"space-between stretch\"],\n [layout-align-gt-lg=\"space-around stretch\"] {\n -webkit-align-items: stretch;\n -ms-flex-align: stretch;\n align-items: stretch;\n -webkit-align-content: stretch;\n -ms-flex-line-pack: stretch;\n align-content: stretch;\n }\n [flex-gt-lg] {\n -webkit-flex: 1;\n -ms-flex: 1;\n flex: 1;\n box-sizing: border-box;\n }\n}\n\n@media screen and (min-width: 1920px) {\n [flex-gt-lg] {\n -webkit-flex: 1 1 0%;\n -ms-flex: 1 1 0%;\n flex: 1 1 0%;\n }\n}\n\n@media (min-width: 1920px) {\n [flex-gt-lg-grow] {\n -webkit-flex: 1 1 100%;\n -ms-flex: 1 1 100%;\n flex: 1 1 100%;\n box-sizing: border-box;\n }\n [flex-gt-lg-initial] {\n -webkit-flex: 0 1 auto;\n -ms-flex: 0 1 auto;\n flex: 0 1 auto;\n box-sizing: border-box;\n }\n [flex-gt-lg-auto] {\n -webkit-flex: 1 1 auto;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n box-sizing: border-box;\n }\n [flex-gt-lg-none] {\n -webkit-flex: 0 0 auto;\n -ms-flex: 0 0 auto;\n flex: 0 0 auto;\n box-sizing: border-box;\n }\n [flex-gt-lg=\"0\"] {\n -webkit-flex: 1 1 0%;\n -ms-flex: 1 1 0%;\n flex: 1 1 0%;\n max-width: 0%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-lg=\"0\"],\n [layout-gt-lg=\"row\"] > [flex-gt-lg=\"0\"] {\n -webkit-flex: 1 1 0%;\n -ms-flex: 1 1 0%;\n flex: 1 1 0%;\n max-width: 0%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-lg=\"0\"],\n [layout-gt-lg=\"column\"] > [flex-gt-lg=\"0\"] {\n -webkit-flex: 1 1 0%;\n -ms-flex: 1 1 0%;\n flex: 1 1 0%;\n max-width: 100%;\n max-height: 0%;\n box-sizing: border-box;\n }\n [flex-gt-lg=\"5\"] {\n -webkit-flex: 1 1 5%;\n -ms-flex: 1 1 5%;\n flex: 1 1 5%;\n max-width: 5%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-lg=\"5\"],\n [layout-gt-lg=\"row\"] > [flex-gt-lg=\"5\"] {\n -webkit-flex: 1 1 5%;\n -ms-flex: 1 1 5%;\n flex: 1 1 5%;\n max-width: 5%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-lg=\"5\"],\n [layout-gt-lg=\"column\"] > [flex-gt-lg=\"5\"] {\n -webkit-flex: 1 1 5%;\n -ms-flex: 1 1 5%;\n flex: 1 1 5%;\n max-width: 100%;\n max-height: 5%;\n box-sizing: border-box;\n }\n [flex-gt-lg=\"10\"] {\n -webkit-flex: 1 1 10%;\n -ms-flex: 1 1 10%;\n flex: 1 1 10%;\n max-width: 10%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-lg=\"10\"],\n [layout-gt-lg=\"row\"] > [flex-gt-lg=\"10\"] {\n -webkit-flex: 1 1 10%;\n -ms-flex: 1 1 10%;\n flex: 1 1 10%;\n max-width: 10%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-lg=\"10\"],\n [layout-gt-lg=\"column\"] > [flex-gt-lg=\"10\"] {\n -webkit-flex: 1 1 10%;\n -ms-flex: 1 1 10%;\n flex: 1 1 10%;\n max-width: 100%;\n max-height: 10%;\n box-sizing: border-box;\n }\n [flex-gt-lg=\"15\"] {\n -webkit-flex: 1 1 15%;\n -ms-flex: 1 1 15%;\n flex: 1 1 15%;\n max-width: 15%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-lg=\"15\"],\n [layout-gt-lg=\"row\"] > [flex-gt-lg=\"15\"] {\n -webkit-flex: 1 1 15%;\n -ms-flex: 1 1 15%;\n flex: 1 1 15%;\n max-width: 15%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-lg=\"15\"],\n [layout-gt-lg=\"column\"] > [flex-gt-lg=\"15\"] {\n -webkit-flex: 1 1 15%;\n -ms-flex: 1 1 15%;\n flex: 1 1 15%;\n max-width: 100%;\n max-height: 15%;\n box-sizing: border-box;\n }\n [flex-gt-lg=\"20\"] {\n -webkit-flex: 1 1 20%;\n -ms-flex: 1 1 20%;\n flex: 1 1 20%;\n max-width: 20%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-lg=\"20\"],\n [layout-gt-lg=\"row\"] > [flex-gt-lg=\"20\"] {\n -webkit-flex: 1 1 20%;\n -ms-flex: 1 1 20%;\n flex: 1 1 20%;\n max-width: 20%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-lg=\"20\"],\n [layout-gt-lg=\"column\"] > [flex-gt-lg=\"20\"] {\n -webkit-flex: 1 1 20%;\n -ms-flex: 1 1 20%;\n flex: 1 1 20%;\n max-width: 100%;\n max-height: 20%;\n box-sizing: border-box;\n }\n [flex-gt-lg=\"25\"] {\n -webkit-flex: 1 1 25%;\n -ms-flex: 1 1 25%;\n flex: 1 1 25%;\n max-width: 25%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-lg=\"25\"],\n [layout-gt-lg=\"row\"] > [flex-gt-lg=\"25\"] {\n -webkit-flex: 1 1 25%;\n -ms-flex: 1 1 25%;\n flex: 1 1 25%;\n max-width: 25%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-lg=\"25\"],\n [layout-gt-lg=\"column\"] > [flex-gt-lg=\"25\"] {\n -webkit-flex: 1 1 25%;\n -ms-flex: 1 1 25%;\n flex: 1 1 25%;\n max-width: 100%;\n max-height: 25%;\n box-sizing: border-box;\n }\n [flex-gt-lg=\"30\"] {\n -webkit-flex: 1 1 30%;\n -ms-flex: 1 1 30%;\n flex: 1 1 30%;\n max-width: 30%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-lg=\"30\"],\n [layout-gt-lg=\"row\"] > [flex-gt-lg=\"30\"] {\n -webkit-flex: 1 1 30%;\n -ms-flex: 1 1 30%;\n flex: 1 1 30%;\n max-width: 30%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-lg=\"30\"],\n [layout-gt-lg=\"column\"] > [flex-gt-lg=\"30\"] {\n -webkit-flex: 1 1 30%;\n -ms-flex: 1 1 30%;\n flex: 1 1 30%;\n max-width: 100%;\n max-height: 30%;\n box-sizing: border-box;\n }\n [flex-gt-lg=\"35\"] {\n -webkit-flex: 1 1 35%;\n -ms-flex: 1 1 35%;\n flex: 1 1 35%;\n max-width: 35%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-lg=\"35\"],\n [layout-gt-lg=\"row\"] > [flex-gt-lg=\"35\"] {\n -webkit-flex: 1 1 35%;\n -ms-flex: 1 1 35%;\n flex: 1 1 35%;\n max-width: 35%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-lg=\"35\"],\n [layout-gt-lg=\"column\"] > [flex-gt-lg=\"35\"] {\n -webkit-flex: 1 1 35%;\n -ms-flex: 1 1 35%;\n flex: 1 1 35%;\n max-width: 100%;\n max-height: 35%;\n box-sizing: border-box;\n }\n [flex-gt-lg=\"40\"] {\n -webkit-flex: 1 1 40%;\n -ms-flex: 1 1 40%;\n flex: 1 1 40%;\n max-width: 40%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-lg=\"40\"],\n [layout-gt-lg=\"row\"] > [flex-gt-lg=\"40\"] {\n -webkit-flex: 1 1 40%;\n -ms-flex: 1 1 40%;\n flex: 1 1 40%;\n max-width: 40%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-lg=\"40\"],\n [layout-gt-lg=\"column\"] > [flex-gt-lg=\"40\"] {\n -webkit-flex: 1 1 40%;\n -ms-flex: 1 1 40%;\n flex: 1 1 40%;\n max-width: 100%;\n max-height: 40%;\n box-sizing: border-box;\n }\n [flex-gt-lg=\"45\"] {\n -webkit-flex: 1 1 45%;\n -ms-flex: 1 1 45%;\n flex: 1 1 45%;\n max-width: 45%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-lg=\"45\"],\n [layout-gt-lg=\"row\"] > [flex-gt-lg=\"45\"] {\n -webkit-flex: 1 1 45%;\n -ms-flex: 1 1 45%;\n flex: 1 1 45%;\n max-width: 45%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-lg=\"45\"],\n [layout-gt-lg=\"column\"] > [flex-gt-lg=\"45\"] {\n -webkit-flex: 1 1 45%;\n -ms-flex: 1 1 45%;\n flex: 1 1 45%;\n max-width: 100%;\n max-height: 45%;\n box-sizing: border-box;\n }\n [flex-gt-lg=\"50\"] {\n -webkit-flex: 1 1 50%;\n -ms-flex: 1 1 50%;\n flex: 1 1 50%;\n max-width: 50%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-lg=\"50\"],\n [layout-gt-lg=\"row\"] > [flex-gt-lg=\"50\"] {\n -webkit-flex: 1 1 50%;\n -ms-flex: 1 1 50%;\n flex: 1 1 50%;\n max-width: 50%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-lg=\"50\"],\n [layout-gt-lg=\"column\"] > [flex-gt-lg=\"50\"] {\n -webkit-flex: 1 1 50%;\n -ms-flex: 1 1 50%;\n flex: 1 1 50%;\n max-width: 100%;\n max-height: 50%;\n box-sizing: border-box;\n }\n [flex-gt-lg=\"55\"] {\n -webkit-flex: 1 1 55%;\n -ms-flex: 1 1 55%;\n flex: 1 1 55%;\n max-width: 55%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-lg=\"55\"],\n [layout-gt-lg=\"row\"] > [flex-gt-lg=\"55\"] {\n -webkit-flex: 1 1 55%;\n -ms-flex: 1 1 55%;\n flex: 1 1 55%;\n max-width: 55%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-lg=\"55\"],\n [layout-gt-lg=\"column\"] > [flex-gt-lg=\"55\"] {\n -webkit-flex: 1 1 55%;\n -ms-flex: 1 1 55%;\n flex: 1 1 55%;\n max-width: 100%;\n max-height: 55%;\n box-sizing: border-box;\n }\n [flex-gt-lg=\"60\"] {\n -webkit-flex: 1 1 60%;\n -ms-flex: 1 1 60%;\n flex: 1 1 60%;\n max-width: 60%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-lg=\"60\"],\n [layout-gt-lg=\"row\"] > [flex-gt-lg=\"60\"] {\n -webkit-flex: 1 1 60%;\n -ms-flex: 1 1 60%;\n flex: 1 1 60%;\n max-width: 60%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-lg=\"60\"],\n [layout-gt-lg=\"column\"] > [flex-gt-lg=\"60\"] {\n -webkit-flex: 1 1 60%;\n -ms-flex: 1 1 60%;\n flex: 1 1 60%;\n max-width: 100%;\n max-height: 60%;\n box-sizing: border-box;\n }\n [flex-gt-lg=\"65\"] {\n -webkit-flex: 1 1 65%;\n -ms-flex: 1 1 65%;\n flex: 1 1 65%;\n max-width: 65%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-lg=\"65\"],\n [layout-gt-lg=\"row\"] > [flex-gt-lg=\"65\"] {\n -webkit-flex: 1 1 65%;\n -ms-flex: 1 1 65%;\n flex: 1 1 65%;\n max-width: 65%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-lg=\"65\"],\n [layout-gt-lg=\"column\"] > [flex-gt-lg=\"65\"] {\n -webkit-flex: 1 1 65%;\n -ms-flex: 1 1 65%;\n flex: 1 1 65%;\n max-width: 100%;\n max-height: 65%;\n box-sizing: border-box;\n }\n [flex-gt-lg=\"70\"] {\n -webkit-flex: 1 1 70%;\n -ms-flex: 1 1 70%;\n flex: 1 1 70%;\n max-width: 70%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-lg=\"70\"],\n [layout-gt-lg=\"row\"] > [flex-gt-lg=\"70\"] {\n -webkit-flex: 1 1 70%;\n -ms-flex: 1 1 70%;\n flex: 1 1 70%;\n max-width: 70%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-lg=\"70\"],\n [layout-gt-lg=\"column\"] > [flex-gt-lg=\"70\"] {\n -webkit-flex: 1 1 70%;\n -ms-flex: 1 1 70%;\n flex: 1 1 70%;\n max-width: 100%;\n max-height: 70%;\n box-sizing: border-box;\n }\n [flex-gt-lg=\"75\"] {\n -webkit-flex: 1 1 75%;\n -ms-flex: 1 1 75%;\n flex: 1 1 75%;\n max-width: 75%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-lg=\"75\"],\n [layout-gt-lg=\"row\"] > [flex-gt-lg=\"75\"] {\n -webkit-flex: 1 1 75%;\n -ms-flex: 1 1 75%;\n flex: 1 1 75%;\n max-width: 75%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-lg=\"75\"],\n [layout-gt-lg=\"column\"] > [flex-gt-lg=\"75\"] {\n -webkit-flex: 1 1 75%;\n -ms-flex: 1 1 75%;\n flex: 1 1 75%;\n max-width: 100%;\n max-height: 75%;\n box-sizing: border-box;\n }\n [flex-gt-lg=\"80\"] {\n -webkit-flex: 1 1 80%;\n -ms-flex: 1 1 80%;\n flex: 1 1 80%;\n max-width: 80%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-lg=\"80\"],\n [layout-gt-lg=\"row\"] > [flex-gt-lg=\"80\"] {\n -webkit-flex: 1 1 80%;\n -ms-flex: 1 1 80%;\n flex: 1 1 80%;\n max-width: 80%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-lg=\"80\"],\n [layout-gt-lg=\"column\"] > [flex-gt-lg=\"80\"] {\n -webkit-flex: 1 1 80%;\n -ms-flex: 1 1 80%;\n flex: 1 1 80%;\n max-width: 100%;\n max-height: 80%;\n box-sizing: border-box;\n }\n [flex-gt-lg=\"85\"] {\n -webkit-flex: 1 1 85%;\n -ms-flex: 1 1 85%;\n flex: 1 1 85%;\n max-width: 85%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-lg=\"85\"],\n [layout-gt-lg=\"row\"] > [flex-gt-lg=\"85\"] {\n -webkit-flex: 1 1 85%;\n -ms-flex: 1 1 85%;\n flex: 1 1 85%;\n max-width: 85%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-lg=\"85\"],\n [layout-gt-lg=\"column\"] > [flex-gt-lg=\"85\"] {\n -webkit-flex: 1 1 85%;\n -ms-flex: 1 1 85%;\n flex: 1 1 85%;\n max-width: 100%;\n max-height: 85%;\n box-sizing: border-box;\n }\n [flex-gt-lg=\"90\"] {\n -webkit-flex: 1 1 90%;\n -ms-flex: 1 1 90%;\n flex: 1 1 90%;\n max-width: 90%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-lg=\"90\"],\n [layout-gt-lg=\"row\"] > [flex-gt-lg=\"90\"] {\n -webkit-flex: 1 1 90%;\n -ms-flex: 1 1 90%;\n flex: 1 1 90%;\n max-width: 90%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-lg=\"90\"],\n [layout-gt-lg=\"column\"] > [flex-gt-lg=\"90\"] {\n -webkit-flex: 1 1 90%;\n -ms-flex: 1 1 90%;\n flex: 1 1 90%;\n max-width: 100%;\n max-height: 90%;\n box-sizing: border-box;\n }\n [flex-gt-lg=\"95\"] {\n -webkit-flex: 1 1 95%;\n -ms-flex: 1 1 95%;\n flex: 1 1 95%;\n max-width: 95%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-lg=\"95\"],\n [layout-gt-lg=\"row\"] > [flex-gt-lg=\"95\"] {\n -webkit-flex: 1 1 95%;\n -ms-flex: 1 1 95%;\n flex: 1 1 95%;\n max-width: 95%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-lg=\"95\"],\n [layout-gt-lg=\"column\"] > [flex-gt-lg=\"95\"] {\n -webkit-flex: 1 1 95%;\n -ms-flex: 1 1 95%;\n flex: 1 1 95%;\n max-width: 100%;\n max-height: 95%;\n box-sizing: border-box;\n }\n [flex-gt-lg=\"100\"] {\n -webkit-flex: 1 1 100%;\n -ms-flex: 1 1 100%;\n flex: 1 1 100%;\n max-width: 100%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-lg=\"100\"],\n [layout-gt-lg=\"row\"] > [flex-gt-lg=\"100\"] {\n -webkit-flex: 1 1 100%;\n -ms-flex: 1 1 100%;\n flex: 1 1 100%;\n max-width: 100%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-lg=\"100\"],\n [layout-gt-lg=\"column\"] > [flex-gt-lg=\"100\"] {\n -webkit-flex: 1 1 100%;\n -ms-flex: 1 1 100%;\n flex: 1 1 100%;\n max-width: 100%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-lg=\"33\"],\n [layout=\"row\"] > [flex-gt-lg=\"33\"],\n [layout-gt-lg=\"row\"] > [flex-gt-lg=\"33\"],\n [layout-gt-lg=\"row\"] > [flex-gt-lg=\"33\"] {\n -webkit-flex: 1 1 33%;\n -ms-flex: 1 1 33%;\n flex: 1 1 33%;\n max-width: calc(100% / 3);\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-lg=\"34\"],\n [layout=\"row\"] > [flex-gt-lg=\"34\"],\n [layout-gt-lg=\"row\"] > [flex-gt-lg=\"34\"],\n [layout-gt-lg=\"row\"] > [flex-gt-lg=\"34\"] {\n -webkit-flex: 1 1 34%;\n -ms-flex: 1 1 34%;\n flex: 1 1 34%;\n max-width: 34%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-lg=\"66\"],\n [layout=\"row\"] > [flex-gt-lg=\"66\"],\n [layout-gt-lg=\"row\"] > [flex-gt-lg=\"66\"],\n [layout-gt-lg=\"row\"] > [flex-gt-lg=\"66\"] {\n -webkit-flex: 1 1 66%;\n -ms-flex: 1 1 66%;\n flex: 1 1 66%;\n max-width: calc(200% / 3);\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-gt-lg=\"67\"],\n [layout=\"row\"] > [flex-gt-lg=\"67\"],\n [layout-gt-lg=\"row\"] > [flex-gt-lg=\"67\"],\n [layout-gt-lg=\"row\"] > [flex-gt-lg=\"67\"] {\n -webkit-flex: 1 1 67%;\n -ms-flex: 1 1 67%;\n flex: 1 1 67%;\n max-width: 67%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-lg=\"33\"],\n [layout=\"column\"] > [flex-gt-lg=\"33\"],\n [layout-gt-lg=\"column\"] > [flex-gt-lg=\"33\"],\n [layout-gt-lg=\"column\"] > [flex-gt-lg=\"33\"] {\n -webkit-flex: 1 1 33%;\n -ms-flex: 1 1 33%;\n flex: 1 1 33%;\n max-width: 100%;\n max-height: calc(100% / 3);\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-lg=\"34\"],\n [layout=\"column\"] > [flex-gt-lg=\"34\"],\n [layout-gt-lg=\"column\"] > [flex-gt-lg=\"34\"],\n [layout-gt-lg=\"column\"] > [flex-gt-lg=\"34\"] {\n -webkit-flex: 1 1 34%;\n -ms-flex: 1 1 34%;\n flex: 1 1 34%;\n max-width: 100%;\n max-height: 34%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-lg=\"66\"],\n [layout=\"column\"] > [flex-gt-lg=\"66\"],\n [layout-gt-lg=\"column\"] > [flex-gt-lg=\"66\"],\n [layout-gt-lg=\"column\"] > [flex-gt-lg=\"66\"] {\n -webkit-flex: 1 1 66%;\n -ms-flex: 1 1 66%;\n flex: 1 1 66%;\n max-width: 100%;\n max-height: calc(200% / 3);\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-gt-lg=\"67\"],\n [layout=\"column\"] > [flex-gt-lg=\"67\"],\n [layout-gt-lg=\"column\"] > [flex-gt-lg=\"67\"],\n [layout-gt-lg=\"column\"] > [flex-gt-lg=\"67\"] {\n -webkit-flex: 1 1 67%;\n -ms-flex: 1 1 67%;\n flex: 1 1 67%;\n max-width: 100%;\n max-height: 67%;\n box-sizing: border-box;\n }\n [layout-gt-lg],\n [layout-gt-lg=\"column\"],\n [layout-gt-lg=\"row\"] {\n box-sizing: border-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n }\n [layout-gt-lg=\"column\"] {\n -webkit-flex-direction: column;\n -ms-flex-direction: column;\n flex-direction: column;\n }\n [layout-gt-lg=\"row\"] {\n -webkit-flex-direction: row;\n -ms-flex-direction: row;\n flex-direction: row;\n }\n [flex-order-xl=\"-20\"] {\n -webkit-order: -20;\n -ms-flex-order: -20;\n order: -20;\n }\n [flex-order-xl=\"-19\"] {\n -webkit-order: -19;\n -ms-flex-order: -19;\n order: -19;\n }\n [flex-order-xl=\"-18\"] {\n -webkit-order: -18;\n -ms-flex-order: -18;\n order: -18;\n }\n [flex-order-xl=\"-17\"] {\n -webkit-order: -17;\n -ms-flex-order: -17;\n order: -17;\n }\n [flex-order-xl=\"-16\"] {\n -webkit-order: -16;\n -ms-flex-order: -16;\n order: -16;\n }\n [flex-order-xl=\"-15\"] {\n -webkit-order: -15;\n -ms-flex-order: -15;\n order: -15;\n }\n [flex-order-xl=\"-14\"] {\n -webkit-order: -14;\n -ms-flex-order: -14;\n order: -14;\n }\n [flex-order-xl=\"-13\"] {\n -webkit-order: -13;\n -ms-flex-order: -13;\n order: -13;\n }\n [flex-order-xl=\"-12\"] {\n -webkit-order: -12;\n -ms-flex-order: -12;\n order: -12;\n }\n [flex-order-xl=\"-11\"] {\n -webkit-order: -11;\n -ms-flex-order: -11;\n order: -11;\n }\n [flex-order-xl=\"-10\"] {\n -webkit-order: -10;\n -ms-flex-order: -10;\n order: -10;\n }\n [flex-order-xl=\"-9\"] {\n -webkit-order: -9;\n -ms-flex-order: -9;\n order: -9;\n }\n [flex-order-xl=\"-8\"] {\n -webkit-order: -8;\n -ms-flex-order: -8;\n order: -8;\n }\n [flex-order-xl=\"-7\"] {\n -webkit-order: -7;\n -ms-flex-order: -7;\n order: -7;\n }\n [flex-order-xl=\"-6\"] {\n -webkit-order: -6;\n -ms-flex-order: -6;\n order: -6;\n }\n [flex-order-xl=\"-5\"] {\n -webkit-order: -5;\n -ms-flex-order: -5;\n order: -5;\n }\n [flex-order-xl=\"-4\"] {\n -webkit-order: -4;\n -ms-flex-order: -4;\n order: -4;\n }\n [flex-order-xl=\"-3\"] {\n -webkit-order: -3;\n -ms-flex-order: -3;\n order: -3;\n }\n [flex-order-xl=\"-2\"] {\n -webkit-order: -2;\n -ms-flex-order: -2;\n order: -2;\n }\n [flex-order-xl=\"-1\"] {\n -webkit-order: -1;\n -ms-flex-order: -1;\n order: -1;\n }\n [flex-order-xl=\"0\"] {\n -webkit-order: 0;\n -ms-flex-order: 0;\n order: 0;\n }\n [flex-order-xl=\"1\"] {\n -webkit-order: 1;\n -ms-flex-order: 1;\n order: 1;\n }\n [flex-order-xl=\"2\"] {\n -webkit-order: 2;\n -ms-flex-order: 2;\n order: 2;\n }\n [flex-order-xl=\"3\"] {\n -webkit-order: 3;\n -ms-flex-order: 3;\n order: 3;\n }\n [flex-order-xl=\"4\"] {\n -webkit-order: 4;\n -ms-flex-order: 4;\n order: 4;\n }\n [flex-order-xl=\"5\"] {\n -webkit-order: 5;\n -ms-flex-order: 5;\n order: 5;\n }\n [flex-order-xl=\"6\"] {\n -webkit-order: 6;\n -ms-flex-order: 6;\n order: 6;\n }\n [flex-order-xl=\"7\"] {\n -webkit-order: 7;\n -ms-flex-order: 7;\n order: 7;\n }\n [flex-order-xl=\"8\"] {\n -webkit-order: 8;\n -ms-flex-order: 8;\n order: 8;\n }\n [flex-order-xl=\"9\"] {\n -webkit-order: 9;\n -ms-flex-order: 9;\n order: 9;\n }\n [flex-order-xl=\"10\"] {\n -webkit-order: 10;\n -ms-flex-order: 10;\n order: 10;\n }\n [flex-order-xl=\"11\"] {\n -webkit-order: 11;\n -ms-flex-order: 11;\n order: 11;\n }\n [flex-order-xl=\"12\"] {\n -webkit-order: 12;\n -ms-flex-order: 12;\n order: 12;\n }\n [flex-order-xl=\"13\"] {\n -webkit-order: 13;\n -ms-flex-order: 13;\n order: 13;\n }\n [flex-order-xl=\"14\"] {\n -webkit-order: 14;\n -ms-flex-order: 14;\n order: 14;\n }\n [flex-order-xl=\"15\"] {\n -webkit-order: 15;\n -ms-flex-order: 15;\n order: 15;\n }\n [flex-order-xl=\"16\"] {\n -webkit-order: 16;\n -ms-flex-order: 16;\n order: 16;\n }\n [flex-order-xl=\"17\"] {\n -webkit-order: 17;\n -ms-flex-order: 17;\n order: 17;\n }\n [flex-order-xl=\"18\"] {\n -webkit-order: 18;\n -ms-flex-order: 18;\n order: 18;\n }\n [flex-order-xl=\"19\"] {\n -webkit-order: 19;\n -ms-flex-order: 19;\n order: 19;\n }\n [flex-order-xl=\"20\"] {\n -webkit-order: 20;\n -ms-flex-order: 20;\n order: 20;\n }\n [flex-offset-xl=\"0\"] {\n margin-left: 0%;\n }\n [flex-offset-xl=\"5\"] {\n margin-left: 5%;\n }\n [flex-offset-xl=\"10\"] {\n margin-left: 10%;\n }\n [flex-offset-xl=\"15\"] {\n margin-left: 15%;\n }\n [flex-offset-xl=\"20\"] {\n margin-left: 20%;\n }\n [flex-offset-xl=\"25\"] {\n margin-left: 25%;\n }\n [flex-offset-xl=\"30\"] {\n margin-left: 30%;\n }\n [flex-offset-xl=\"35\"] {\n margin-left: 35%;\n }\n [flex-offset-xl=\"40\"] {\n margin-left: 40%;\n }\n [flex-offset-xl=\"45\"] {\n margin-left: 45%;\n }\n [flex-offset-xl=\"50\"] {\n margin-left: 50%;\n }\n [flex-offset-xl=\"55\"] {\n margin-left: 55%;\n }\n [flex-offset-xl=\"60\"] {\n margin-left: 60%;\n }\n [flex-offset-xl=\"65\"] {\n margin-left: 65%;\n }\n [flex-offset-xl=\"70\"] {\n margin-left: 70%;\n }\n [flex-offset-xl=\"75\"] {\n margin-left: 75%;\n }\n [flex-offset-xl=\"80\"] {\n margin-left: 80%;\n }\n [flex-offset-xl=\"85\"] {\n margin-left: 85%;\n }\n [flex-offset-xl=\"90\"] {\n margin-left: 90%;\n }\n [flex-offset-xl=\"95\"] {\n margin-left: 95%;\n }\n [flex-offset-xl=\"33\"] {\n margin-left: calc(100% / 3);\n }\n [flex-offset-xl=\"66\"] {\n margin-left: calc(200% / 3);\n }\n [layout-align-xl] {\n -webkit-justify-content: flex-start;\n -ms-flex-pack: start;\n justify-content: flex-start;\n -webkit-align-content: stretch;\n -ms-flex-line-pack: stretch;\n align-content: stretch;\n -webkit-align-items: stretch;\n -ms-flex-align: stretch;\n align-items: stretch;\n }\n [layout-align-xl=\"start\"],\n [layout-align-xl=\"start start\"],\n [layout-align-xl=\"start center\"],\n [layout-align-xl=\"start end\"],\n [layout-align-xl=\"start stretch\"] {\n -webkit-justify-content: start;\n -ms-flex-pack: start;\n justify-content: start;\n }\n [layout-align-xl=\"center\"],\n [layout-align-xl=\"center start\"],\n [layout-align-xl=\"center center\"],\n [layout-align-xl=\"center end\"],\n [layout-align-xl=\"center stretch\"] {\n -webkit-justify-content: center;\n -ms-flex-pack: center;\n justify-content: center;\n }\n [layout-align-xl=\"end\"],\n [layout-align-xl=\"end center\"],\n [layout-align-xl=\"end start\"],\n [layout-align-xl=\"end end\"],\n [layout-align-xl=\"end stretch\"] {\n -webkit-justify-content: flex-end;\n -ms-flex-pack: end;\n justify-content: flex-end;\n }\n [layout-align-xl=\"space-around\"],\n [layout-align-xl=\"space-around center\"],\n [layout-align-xl=\"space-around start\"],\n [layout-align-xl=\"space-around end\"],\n [layout-align-xl=\"space-around stretch\"] {\n -webkit-justify-content: space-around;\n -ms-flex-pack: distribute;\n justify-content: space-around;\n }\n [layout-align-xl=\"space-between\"],\n [layout-align-xl=\"space-between center\"],\n [layout-align-xl=\"space-between start\"],\n [layout-align-xl=\"space-between end\"],\n [layout-align-xl=\"space-between stretch\"] {\n -webkit-justify-content: space-between;\n -ms-flex-pack: justify;\n justify-content: space-between;\n }\n [layout-align-xl=\"start start\"],\n [layout-align-xl=\"center start\"],\n [layout-align-xl=\"end start\"],\n [layout-align-xl=\"space-between start\"],\n [layout-align-xl=\"space-around start\"] {\n -webkit-align-items: flex-start;\n -ms-flex-align: start;\n align-items: flex-start;\n -webkit-align-content: flex-start;\n -ms-flex-line-pack: start;\n align-content: flex-start;\n }\n [layout-align-xl=\"start center\"],\n [layout-align-xl=\"center center\"],\n [layout-align-xl=\"end center\"],\n [layout-align-xl=\"space-between center\"],\n [layout-align-xl=\"space-around center\"] {\n -webkit-align-items: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-align-content: center;\n -ms-flex-line-pack: center;\n align-content: center;\n max-width: 100%;\n }\n [layout-align-xl=\"start center\"] > *,\n [layout-align-xl=\"center center\"] > *,\n [layout-align-xl=\"end center\"] > *,\n [layout-align-xl=\"space-between center\"] > *,\n [layout-align-xl=\"space-around center\"] > * {\n max-width: 100%;\n box-sizing: border-box;\n }\n [layout-align-xl=\"start end\"],\n [layout-align-xl=\"center end\"],\n [layout-align-xl=\"end end\"],\n [layout-align-xl=\"space-between end\"],\n [layout-align-xl=\"space-around end\"] {\n -webkit-align-items: flex-end;\n -ms-flex-align: end;\n align-items: flex-end;\n -webkit-align-content: flex-end;\n -ms-flex-line-pack: end;\n align-content: flex-end;\n }\n [layout-align-xl=\"start stretch\"],\n [layout-align-xl=\"center stretch\"],\n [layout-align-xl=\"end stretch\"],\n [layout-align-xl=\"space-between stretch\"],\n [layout-align-xl=\"space-around stretch\"] {\n -webkit-align-items: stretch;\n -ms-flex-align: stretch;\n align-items: stretch;\n -webkit-align-content: stretch;\n -ms-flex-line-pack: stretch;\n align-content: stretch;\n }\n [flex-xl] {\n -webkit-flex: 1;\n -ms-flex: 1;\n flex: 1;\n box-sizing: border-box;\n }\n}\n\n@media screen and (min-width: 1920px) {\n [flex-xl] {\n -webkit-flex: 1 1 0%;\n -ms-flex: 1 1 0%;\n flex: 1 1 0%;\n }\n}\n\n@media (min-width: 1920px) {\n [flex-xl-grow] {\n -webkit-flex: 1 1 100%;\n -ms-flex: 1 1 100%;\n flex: 1 1 100%;\n box-sizing: border-box;\n }\n [flex-xl-initial] {\n -webkit-flex: 0 1 auto;\n -ms-flex: 0 1 auto;\n flex: 0 1 auto;\n box-sizing: border-box;\n }\n [flex-xl-auto] {\n -webkit-flex: 1 1 auto;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n box-sizing: border-box;\n }\n [flex-xl-none] {\n -webkit-flex: 0 0 auto;\n -ms-flex: 0 0 auto;\n flex: 0 0 auto;\n box-sizing: border-box;\n }\n [flex-xl=\"0\"] {\n -webkit-flex: 1 1 0%;\n -ms-flex: 1 1 0%;\n flex: 1 1 0%;\n max-width: 0%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-xl=\"0\"],\n [layout-xl=\"row\"] > [flex-xl=\"0\"] {\n -webkit-flex: 1 1 0%;\n -ms-flex: 1 1 0%;\n flex: 1 1 0%;\n max-width: 0%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-xl=\"0\"],\n [layout-xl=\"column\"] > [flex-xl=\"0\"] {\n -webkit-flex: 1 1 0%;\n -ms-flex: 1 1 0%;\n flex: 1 1 0%;\n max-width: 100%;\n max-height: 0%;\n box-sizing: border-box;\n }\n [flex-xl=\"5\"] {\n -webkit-flex: 1 1 5%;\n -ms-flex: 1 1 5%;\n flex: 1 1 5%;\n max-width: 5%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-xl=\"5\"],\n [layout-xl=\"row\"] > [flex-xl=\"5\"] {\n -webkit-flex: 1 1 5%;\n -ms-flex: 1 1 5%;\n flex: 1 1 5%;\n max-width: 5%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-xl=\"5\"],\n [layout-xl=\"column\"] > [flex-xl=\"5\"] {\n -webkit-flex: 1 1 5%;\n -ms-flex: 1 1 5%;\n flex: 1 1 5%;\n max-width: 100%;\n max-height: 5%;\n box-sizing: border-box;\n }\n [flex-xl=\"10\"] {\n -webkit-flex: 1 1 10%;\n -ms-flex: 1 1 10%;\n flex: 1 1 10%;\n max-width: 10%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-xl=\"10\"],\n [layout-xl=\"row\"] > [flex-xl=\"10\"] {\n -webkit-flex: 1 1 10%;\n -ms-flex: 1 1 10%;\n flex: 1 1 10%;\n max-width: 10%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-xl=\"10\"],\n [layout-xl=\"column\"] > [flex-xl=\"10\"] {\n -webkit-flex: 1 1 10%;\n -ms-flex: 1 1 10%;\n flex: 1 1 10%;\n max-width: 100%;\n max-height: 10%;\n box-sizing: border-box;\n }\n [flex-xl=\"15\"] {\n -webkit-flex: 1 1 15%;\n -ms-flex: 1 1 15%;\n flex: 1 1 15%;\n max-width: 15%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-xl=\"15\"],\n [layout-xl=\"row\"] > [flex-xl=\"15\"] {\n -webkit-flex: 1 1 15%;\n -ms-flex: 1 1 15%;\n flex: 1 1 15%;\n max-width: 15%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-xl=\"15\"],\n [layout-xl=\"column\"] > [flex-xl=\"15\"] {\n -webkit-flex: 1 1 15%;\n -ms-flex: 1 1 15%;\n flex: 1 1 15%;\n max-width: 100%;\n max-height: 15%;\n box-sizing: border-box;\n }\n [flex-xl=\"20\"] {\n -webkit-flex: 1 1 20%;\n -ms-flex: 1 1 20%;\n flex: 1 1 20%;\n max-width: 20%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-xl=\"20\"],\n [layout-xl=\"row\"] > [flex-xl=\"20\"] {\n -webkit-flex: 1 1 20%;\n -ms-flex: 1 1 20%;\n flex: 1 1 20%;\n max-width: 20%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-xl=\"20\"],\n [layout-xl=\"column\"] > [flex-xl=\"20\"] {\n -webkit-flex: 1 1 20%;\n -ms-flex: 1 1 20%;\n flex: 1 1 20%;\n max-width: 100%;\n max-height: 20%;\n box-sizing: border-box;\n }\n [flex-xl=\"25\"] {\n -webkit-flex: 1 1 25%;\n -ms-flex: 1 1 25%;\n flex: 1 1 25%;\n max-width: 25%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-xl=\"25\"],\n [layout-xl=\"row\"] > [flex-xl=\"25\"] {\n -webkit-flex: 1 1 25%;\n -ms-flex: 1 1 25%;\n flex: 1 1 25%;\n max-width: 25%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-xl=\"25\"],\n [layout-xl=\"column\"] > [flex-xl=\"25\"] {\n -webkit-flex: 1 1 25%;\n -ms-flex: 1 1 25%;\n flex: 1 1 25%;\n max-width: 100%;\n max-height: 25%;\n box-sizing: border-box;\n }\n [flex-xl=\"30\"] {\n -webkit-flex: 1 1 30%;\n -ms-flex: 1 1 30%;\n flex: 1 1 30%;\n max-width: 30%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-xl=\"30\"],\n [layout-xl=\"row\"] > [flex-xl=\"30\"] {\n -webkit-flex: 1 1 30%;\n -ms-flex: 1 1 30%;\n flex: 1 1 30%;\n max-width: 30%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-xl=\"30\"],\n [layout-xl=\"column\"] > [flex-xl=\"30\"] {\n -webkit-flex: 1 1 30%;\n -ms-flex: 1 1 30%;\n flex: 1 1 30%;\n max-width: 100%;\n max-height: 30%;\n box-sizing: border-box;\n }\n [flex-xl=\"35\"] {\n -webkit-flex: 1 1 35%;\n -ms-flex: 1 1 35%;\n flex: 1 1 35%;\n max-width: 35%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-xl=\"35\"],\n [layout-xl=\"row\"] > [flex-xl=\"35\"] {\n -webkit-flex: 1 1 35%;\n -ms-flex: 1 1 35%;\n flex: 1 1 35%;\n max-width: 35%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-xl=\"35\"],\n [layout-xl=\"column\"] > [flex-xl=\"35\"] {\n -webkit-flex: 1 1 35%;\n -ms-flex: 1 1 35%;\n flex: 1 1 35%;\n max-width: 100%;\n max-height: 35%;\n box-sizing: border-box;\n }\n [flex-xl=\"40\"] {\n -webkit-flex: 1 1 40%;\n -ms-flex: 1 1 40%;\n flex: 1 1 40%;\n max-width: 40%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-xl=\"40\"],\n [layout-xl=\"row\"] > [flex-xl=\"40\"] {\n -webkit-flex: 1 1 40%;\n -ms-flex: 1 1 40%;\n flex: 1 1 40%;\n max-width: 40%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-xl=\"40\"],\n [layout-xl=\"column\"] > [flex-xl=\"40\"] {\n -webkit-flex: 1 1 40%;\n -ms-flex: 1 1 40%;\n flex: 1 1 40%;\n max-width: 100%;\n max-height: 40%;\n box-sizing: border-box;\n }\n [flex-xl=\"45\"] {\n -webkit-flex: 1 1 45%;\n -ms-flex: 1 1 45%;\n flex: 1 1 45%;\n max-width: 45%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-xl=\"45\"],\n [layout-xl=\"row\"] > [flex-xl=\"45\"] {\n -webkit-flex: 1 1 45%;\n -ms-flex: 1 1 45%;\n flex: 1 1 45%;\n max-width: 45%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-xl=\"45\"],\n [layout-xl=\"column\"] > [flex-xl=\"45\"] {\n -webkit-flex: 1 1 45%;\n -ms-flex: 1 1 45%;\n flex: 1 1 45%;\n max-width: 100%;\n max-height: 45%;\n box-sizing: border-box;\n }\n [flex-xl=\"50\"] {\n -webkit-flex: 1 1 50%;\n -ms-flex: 1 1 50%;\n flex: 1 1 50%;\n max-width: 50%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-xl=\"50\"],\n [layout-xl=\"row\"] > [flex-xl=\"50\"] {\n -webkit-flex: 1 1 50%;\n -ms-flex: 1 1 50%;\n flex: 1 1 50%;\n max-width: 50%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-xl=\"50\"],\n [layout-xl=\"column\"] > [flex-xl=\"50\"] {\n -webkit-flex: 1 1 50%;\n -ms-flex: 1 1 50%;\n flex: 1 1 50%;\n max-width: 100%;\n max-height: 50%;\n box-sizing: border-box;\n }\n [flex-xl=\"55\"] {\n -webkit-flex: 1 1 55%;\n -ms-flex: 1 1 55%;\n flex: 1 1 55%;\n max-width: 55%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-xl=\"55\"],\n [layout-xl=\"row\"] > [flex-xl=\"55\"] {\n -webkit-flex: 1 1 55%;\n -ms-flex: 1 1 55%;\n flex: 1 1 55%;\n max-width: 55%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-xl=\"55\"],\n [layout-xl=\"column\"] > [flex-xl=\"55\"] {\n -webkit-flex: 1 1 55%;\n -ms-flex: 1 1 55%;\n flex: 1 1 55%;\n max-width: 100%;\n max-height: 55%;\n box-sizing: border-box;\n }\n [flex-xl=\"60\"] {\n -webkit-flex: 1 1 60%;\n -ms-flex: 1 1 60%;\n flex: 1 1 60%;\n max-width: 60%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-xl=\"60\"],\n [layout-xl=\"row\"] > [flex-xl=\"60\"] {\n -webkit-flex: 1 1 60%;\n -ms-flex: 1 1 60%;\n flex: 1 1 60%;\n max-width: 60%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-xl=\"60\"],\n [layout-xl=\"column\"] > [flex-xl=\"60\"] {\n -webkit-flex: 1 1 60%;\n -ms-flex: 1 1 60%;\n flex: 1 1 60%;\n max-width: 100%;\n max-height: 60%;\n box-sizing: border-box;\n }\n [flex-xl=\"65\"] {\n -webkit-flex: 1 1 65%;\n -ms-flex: 1 1 65%;\n flex: 1 1 65%;\n max-width: 65%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-xl=\"65\"],\n [layout-xl=\"row\"] > [flex-xl=\"65\"] {\n -webkit-flex: 1 1 65%;\n -ms-flex: 1 1 65%;\n flex: 1 1 65%;\n max-width: 65%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-xl=\"65\"],\n [layout-xl=\"column\"] > [flex-xl=\"65\"] {\n -webkit-flex: 1 1 65%;\n -ms-flex: 1 1 65%;\n flex: 1 1 65%;\n max-width: 100%;\n max-height: 65%;\n box-sizing: border-box;\n }\n [flex-xl=\"70\"] {\n -webkit-flex: 1 1 70%;\n -ms-flex: 1 1 70%;\n flex: 1 1 70%;\n max-width: 70%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-xl=\"70\"],\n [layout-xl=\"row\"] > [flex-xl=\"70\"] {\n -webkit-flex: 1 1 70%;\n -ms-flex: 1 1 70%;\n flex: 1 1 70%;\n max-width: 70%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-xl=\"70\"],\n [layout-xl=\"column\"] > [flex-xl=\"70\"] {\n -webkit-flex: 1 1 70%;\n -ms-flex: 1 1 70%;\n flex: 1 1 70%;\n max-width: 100%;\n max-height: 70%;\n box-sizing: border-box;\n }\n [flex-xl=\"75\"] {\n -webkit-flex: 1 1 75%;\n -ms-flex: 1 1 75%;\n flex: 1 1 75%;\n max-width: 75%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-xl=\"75\"],\n [layout-xl=\"row\"] > [flex-xl=\"75\"] {\n -webkit-flex: 1 1 75%;\n -ms-flex: 1 1 75%;\n flex: 1 1 75%;\n max-width: 75%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-xl=\"75\"],\n [layout-xl=\"column\"] > [flex-xl=\"75\"] {\n -webkit-flex: 1 1 75%;\n -ms-flex: 1 1 75%;\n flex: 1 1 75%;\n max-width: 100%;\n max-height: 75%;\n box-sizing: border-box;\n }\n [flex-xl=\"80\"] {\n -webkit-flex: 1 1 80%;\n -ms-flex: 1 1 80%;\n flex: 1 1 80%;\n max-width: 80%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-xl=\"80\"],\n [layout-xl=\"row\"] > [flex-xl=\"80\"] {\n -webkit-flex: 1 1 80%;\n -ms-flex: 1 1 80%;\n flex: 1 1 80%;\n max-width: 80%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-xl=\"80\"],\n [layout-xl=\"column\"] > [flex-xl=\"80\"] {\n -webkit-flex: 1 1 80%;\n -ms-flex: 1 1 80%;\n flex: 1 1 80%;\n max-width: 100%;\n max-height: 80%;\n box-sizing: border-box;\n }\n [flex-xl=\"85\"] {\n -webkit-flex: 1 1 85%;\n -ms-flex: 1 1 85%;\n flex: 1 1 85%;\n max-width: 85%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-xl=\"85\"],\n [layout-xl=\"row\"] > [flex-xl=\"85\"] {\n -webkit-flex: 1 1 85%;\n -ms-flex: 1 1 85%;\n flex: 1 1 85%;\n max-width: 85%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-xl=\"85\"],\n [layout-xl=\"column\"] > [flex-xl=\"85\"] {\n -webkit-flex: 1 1 85%;\n -ms-flex: 1 1 85%;\n flex: 1 1 85%;\n max-width: 100%;\n max-height: 85%;\n box-sizing: border-box;\n }\n [flex-xl=\"90\"] {\n -webkit-flex: 1 1 90%;\n -ms-flex: 1 1 90%;\n flex: 1 1 90%;\n max-width: 90%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-xl=\"90\"],\n [layout-xl=\"row\"] > [flex-xl=\"90\"] {\n -webkit-flex: 1 1 90%;\n -ms-flex: 1 1 90%;\n flex: 1 1 90%;\n max-width: 90%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-xl=\"90\"],\n [layout-xl=\"column\"] > [flex-xl=\"90\"] {\n -webkit-flex: 1 1 90%;\n -ms-flex: 1 1 90%;\n flex: 1 1 90%;\n max-width: 100%;\n max-height: 90%;\n box-sizing: border-box;\n }\n [flex-xl=\"95\"] {\n -webkit-flex: 1 1 95%;\n -ms-flex: 1 1 95%;\n flex: 1 1 95%;\n max-width: 95%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-xl=\"95\"],\n [layout-xl=\"row\"] > [flex-xl=\"95\"] {\n -webkit-flex: 1 1 95%;\n -ms-flex: 1 1 95%;\n flex: 1 1 95%;\n max-width: 95%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-xl=\"95\"],\n [layout-xl=\"column\"] > [flex-xl=\"95\"] {\n -webkit-flex: 1 1 95%;\n -ms-flex: 1 1 95%;\n flex: 1 1 95%;\n max-width: 100%;\n max-height: 95%;\n box-sizing: border-box;\n }\n [flex-xl=\"100\"] {\n -webkit-flex: 1 1 100%;\n -ms-flex: 1 1 100%;\n flex: 1 1 100%;\n max-width: 100%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-xl=\"100\"],\n [layout-xl=\"row\"] > [flex-xl=\"100\"] {\n -webkit-flex: 1 1 100%;\n -ms-flex: 1 1 100%;\n flex: 1 1 100%;\n max-width: 100%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-xl=\"100\"],\n [layout-xl=\"column\"] > [flex-xl=\"100\"] {\n -webkit-flex: 1 1 100%;\n -ms-flex: 1 1 100%;\n flex: 1 1 100%;\n max-width: 100%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-xl=\"33\"],\n [layout=\"row\"] > [flex-xl=\"33\"],\n [layout-xl=\"row\"] > [flex-xl=\"33\"],\n [layout-xl=\"row\"] > [flex-xl=\"33\"] {\n -webkit-flex: 1 1 33%;\n -ms-flex: 1 1 33%;\n flex: 1 1 33%;\n max-width: calc(100% / 3);\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-xl=\"34\"],\n [layout=\"row\"] > [flex-xl=\"34\"],\n [layout-xl=\"row\"] > [flex-xl=\"34\"],\n [layout-xl=\"row\"] > [flex-xl=\"34\"] {\n -webkit-flex: 1 1 34%;\n -ms-flex: 1 1 34%;\n flex: 1 1 34%;\n max-width: 34%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-xl=\"66\"],\n [layout=\"row\"] > [flex-xl=\"66\"],\n [layout-xl=\"row\"] > [flex-xl=\"66\"],\n [layout-xl=\"row\"] > [flex-xl=\"66\"] {\n -webkit-flex: 1 1 66%;\n -ms-flex: 1 1 66%;\n flex: 1 1 66%;\n max-width: calc(200% / 3);\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"row\"] > [flex-xl=\"67\"],\n [layout=\"row\"] > [flex-xl=\"67\"],\n [layout-xl=\"row\"] > [flex-xl=\"67\"],\n [layout-xl=\"row\"] > [flex-xl=\"67\"] {\n -webkit-flex: 1 1 67%;\n -ms-flex: 1 1 67%;\n flex: 1 1 67%;\n max-width: 67%;\n max-height: 100%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-xl=\"33\"],\n [layout=\"column\"] > [flex-xl=\"33\"],\n [layout-xl=\"column\"] > [flex-xl=\"33\"],\n [layout-xl=\"column\"] > [flex-xl=\"33\"] {\n -webkit-flex: 1 1 33%;\n -ms-flex: 1 1 33%;\n flex: 1 1 33%;\n max-width: 100%;\n max-height: calc(100% / 3);\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-xl=\"34\"],\n [layout=\"column\"] > [flex-xl=\"34\"],\n [layout-xl=\"column\"] > [flex-xl=\"34\"],\n [layout-xl=\"column\"] > [flex-xl=\"34\"] {\n -webkit-flex: 1 1 34%;\n -ms-flex: 1 1 34%;\n flex: 1 1 34%;\n max-width: 100%;\n max-height: 34%;\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-xl=\"66\"],\n [layout=\"column\"] > [flex-xl=\"66\"],\n [layout-xl=\"column\"] > [flex-xl=\"66\"],\n [layout-xl=\"column\"] > [flex-xl=\"66\"] {\n -webkit-flex: 1 1 66%;\n -ms-flex: 1 1 66%;\n flex: 1 1 66%;\n max-width: 100%;\n max-height: calc(200% / 3);\n box-sizing: border-box;\n }\n [layout=\"column\"] > [flex-xl=\"67\"],\n [layout=\"column\"] > [flex-xl=\"67\"],\n [layout-xl=\"column\"] > [flex-xl=\"67\"],\n [layout-xl=\"column\"] > [flex-xl=\"67\"] {\n -webkit-flex: 1 1 67%;\n -ms-flex: 1 1 67%;\n flex: 1 1 67%;\n max-width: 100%;\n max-height: 67%;\n box-sizing: border-box;\n }\n [layout-xl],\n [layout-xl=\"column\"],\n [layout-xl=\"row\"] {\n box-sizing: border-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n }\n [layout-xl=\"column\"] {\n -webkit-flex-direction: column;\n -ms-flex-direction: column;\n flex-direction: column;\n }\n [layout-xl=\"row\"] {\n -webkit-flex-direction: row;\n -ms-flex-direction: row;\n flex-direction: row;\n }\n [hide]:not([show-gt-xs]):not([show-gt-sm]):not([show-gt-md]):not([show-gt-lg]):not([show-xl]):not([show]),\n [hide-gt-xs]:not([show-gt-xs]):not([show-gt-sm]):not([show-gt-md]):not([show-gt-lg]):not([show-xl]):not([show]),\n [hide-gt-sm]:not([show-gt-xs]):not([show-gt-sm]):not([show-gt-md]):not([show-gt-lg]):not([show-xl]):not([show]),\n [hide-gt-md]:not([show-gt-xs]):not([show-gt-sm]):not([show-gt-md]):not([show-gt-lg]):not([show-xl]):not([show]),\n [hide-gt-lg]:not([show-gt-xs]):not([show-gt-sm]):not([show-gt-md]):not([show-gt-lg]):not([show-xl]):not([show]) {\n display: none;\n }\n [hide-xl]:not([show-xl]):not([show-gt-lg]):not([show]) {\n display: none;\n }\n}\n", + "styleUrl": "./styles/angular-material.layouts.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "_ruleService", + "type": "RuleService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "_ruleActionService", + "type": "ActionService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "_conditionGroupService", + "type": "ConditionGroupService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "_conditionService", + "type": "ConditionService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "bundleService", + "type": "BundleService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "route", + "type": "ActivatedRoute", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "loggerService", + "type": "LoggerService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "ruleViewService", + "type": "RuleViewService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 126, + "jsdoctags": [ + { + "name": "_ruleService", + "type": "RuleService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "_ruleActionService", + "type": "ActionService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "_conditionGroupService", + "type": "ConditionGroupService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "_conditionService", + "type": "ConditionService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "bundleService", + "type": "BundleService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "route", + "type": "ActivatedRoute", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "loggerService", + "type": "LoggerService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "ruleViewService", + "type": "RuleViewService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": ["OnDestroy"] + }, + { + "name": "SearchableDropdownComponent", + "id": "component-SearchableDropdownComponent-fd26d0015e6d1a6b98015d16fc29dd6fe994e040a6a60d56043c783dbb619b4efd11b2aee5b6deaf3ea792a83082caad43cb58f79b2f7ba2abec9ddedd4c759d", + "file": "apps/dotcms-ui/src/app/view/components/_common/searchable-dropdown/component/searchable-dropdown.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [ + { + "name": "{\n multi: true, provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SearchableDropdownComponent)\n}", + "type": "component" + } + ], + "selector": "dot-searchable-dropdown", + "styleUrls": ["./searchable-dropdown.component.scss"], + "styles": [], + "templateUrl": ["./searchable-dropdown.component.html"], + "viewProviders": [], + "inputsClass": [ + { + "name": "action", + "deprecated": false, + "deprecationMessage": "", + "line": 51, + "type": "function", + "decorators": [] + }, + { + "name": "cssClass", + "deprecated": false, + "deprecationMessage": "", + "line": 66, + "type": "string", + "decorators": [] + }, + { + "name": "data", + "deprecated": false, + "deprecationMessage": "", + "line": 49, + "type": "any[]", + "decorators": [] + }, + { + "name": "disabled", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "line": 99, + "type": "boolean", + "decorators": [] + }, + { + "name": "externalFilterTemplate", + "deprecated": false, + "deprecationMessage": "", + "line": 105, + "type": "TemplateRef", + "decorators": [] + }, + { + "name": "externalItemListTemplate", + "deprecated": false, + "deprecationMessage": "", + "line": 102, + "type": "TemplateRef", + "decorators": [] + }, + { + "name": "labelPropertyName", + "deprecated": false, + "deprecationMessage": "", + "line": 54, + "type": "string | string[]", + "decorators": [] + }, + { + "name": "multiple", + "deprecated": false, + "deprecationMessage": "", + "line": 96, + "type": "boolean", + "decorators": [] + }, + { + "name": "overlayWidth", + "defaultValue": "'300px'", + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "pos": 1985, + "end": 2028, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 325, + "tagName": { + "pos": 1986, + "end": 1994, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "memberof" + }, + "comment": "

    SearchableDropdownComponent

    \n" + } + ], + "rawdescription": "\n\nSets the width of the searchable-dropdown overlay\n\nThe CSS unit is **required**.\n", + "description": "

    Sets the width of the searchable-dropdown overlay

    \n

    The CSS unit is required.

    \n", + "line": 93, + "type": "string", + "decorators": [] + }, + { + "name": "pageLinkSize", + "defaultValue": "3", + "deprecated": false, + "deprecationMessage": "", + "line": 60, + "type": "number", + "decorators": [] + }, + { + "name": "persistentPlaceholder", + "deprecated": false, + "deprecationMessage": "", + "line": 75, + "type": "boolean", + "decorators": [] + }, + { + "name": "placeholder", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "line": 72, + "type": "string", + "decorators": [] + }, + { + "name": "rows", + "deprecated": false, + "deprecationMessage": "", + "line": 63, + "type": "number", + "decorators": [] + }, + { + "name": "totalRecords", + "deprecated": false, + "deprecationMessage": "", + "line": 69, + "type": "number", + "decorators": [] + }, + { + "name": "valuePropertyName", + "deprecated": false, + "deprecationMessage": "", + "line": 57, + "type": "string", + "decorators": [] + }, + { + "name": "width", + "defaultValue": "'300px'", + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "pos": 1788, + "end": 1831, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 325, + "tagName": { + "pos": 1789, + "end": 1797, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "memberof" + }, + "comment": "

    SearchableDropdownComponent

    \n" + } + ], + "rawdescription": "\n\nSets the width of the searchable-dropdown button\n\nThe CSS unit is **required**.\n", + "description": "

    Sets the width of the searchable-dropdown button

    \n

    The CSS unit is required.

    \n", + "line": 84, + "type": "string", + "decorators": [] + } + ], + "outputsClass": [ + { + "name": "change", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 108, + "type": "EventEmitter" + }, + { + "name": "filterChange", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 111, + "type": "EventEmitter" + }, + { + "name": "hide", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 114, + "type": "EventEmitter" + }, + { + "name": "pageChange", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 117, + "type": "EventEmitter" + }, + { + "name": "show", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 120, + "type": "EventEmitter" + } + ], + "propertiesClass": [ + { + "name": "button", + "deprecated": false, + "deprecationMessage": "", + "type": "ElementRef", + "optional": false, + "description": "", + "line": 132, + "decorators": [ + { + "name": "ViewChild", + "stringifiedArguments": "'button'" + } + ] + }, + { + "name": "dataViewRef", + "deprecated": false, + "deprecationMessage": "", + "type": "DataView", + "optional": false, + "description": "", + "line": 129, + "decorators": [ + { + "name": "ViewChild", + "stringifiedArguments": "'dataView', {static: true}" + } + ] + }, + { + "name": "externalSelectTemplate", + "deprecated": false, + "deprecationMessage": "", + "type": "TemplateRef", + "optional": false, + "description": "", + "line": 141 + }, + { + "name": "keyMap", + "defaultValue": "[\n 'Shift',\n 'Alt',\n 'Control',\n 'Meta',\n 'ArrowUp',\n 'ArrowDown',\n 'ArrowLeft',\n 'ArrowRight'\n ]", + "deprecated": false, + "deprecationMessage": "", + "type": "string[]", + "optional": false, + "description": "", + "line": 143 + }, + { + "name": "label", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 140 + }, + { + "name": "options", + "deprecated": false, + "deprecationMessage": "", + "type": "any[]", + "optional": false, + "description": "", + "line": 139 + }, + { + "name": "overlayPanelMinHeight", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 138 + }, + { + "name": "propagateChange", + "defaultValue": "() => {...}", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 156 + }, + { + "name": "searchInput", + "deprecated": false, + "deprecationMessage": "", + "type": "ElementRef", + "optional": false, + "description": "", + "line": 123, + "decorators": [ + { + "name": "ViewChild", + "stringifiedArguments": "'searchInput', {static: false}" + } + ] + }, + { + "name": "searchPanelRef", + "deprecated": false, + "deprecationMessage": "", + "type": "OverlayPanel", + "optional": false, + "description": "", + "line": 126, + "decorators": [ + { + "name": "ViewChild", + "stringifiedArguments": "'searchPanel', {static: true}" + } + ] + }, + { + "name": "templates", + "deprecated": false, + "deprecationMessage": "", + "type": "QueryList", + "optional": false, + "description": "", + "line": 134, + "decorators": [ + { + "name": "ContentChildren", + "stringifiedArguments": "PrimeTemplate" + } + ] + }, + { + "name": "value", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": false, + "description": "", + "line": 137 + }, + { + "name": "valueString", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 136 + } + ], + "methodsClass": [ + { + "name": "getItemLabel", + "args": [ + { + "name": "dropDownItem", + "type": "any", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 277, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nGet labels from container, if labelPropertyName is an array then loop through it and returns\na string containing the labels joining by \"-\" if is not just returns a label\n\n", + "description": "

    Get labels from container, if labelPropertyName is an array then loop through it and returns\na string containing the labels joining by "-" if is not just returns a label

    \n", + "jsdoctags": [ + { + "name": { + "pos": 6957, + "end": 6969, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "dropDownItem" + }, + "type": "any", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 6947, + "end": 6952, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 6953, + "end": 6956, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 6954, + "end": 6955, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 310 + } + } + }, + { + "tagName": { + "pos": 6978, + "end": 6985, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "returns" + }, + "comment": "", + "returnType": "string" + } + ] + }, + { + "name": "getValueLabelPropertyName", + "args": [], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 378, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "getValueToPropagate", + "args": [], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 384, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "handleClick", + "args": [ + { + "name": "item", + "type": "any", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 307, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nCall when a option is clicked, if this option is not the same of the current value then the\nchange events is emitted. If multiple is true allow to emit the same value.\n\n", + "description": "

    Call when a option is clicked, if this option is not the same of the current value then the\nchange events is emitted. If multiple is true allow to emit the same value.

    \n", + "jsdoctags": [ + { + "name": { + "pos": 7974, + "end": 7978, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "item" + }, + "type": "any", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 7964, + "end": 7969, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 7970, + "end": 7973, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 7971, + "end": 7972, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 310 + } + } + } + ] + }, + { + "name": "hideOverlayHandler", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 196, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nEmits hide event and clears any value on filter's input\n\n", + "description": "

    Emits hide event and clears any value on filter's input

    \n", + "jsdoctags": [] + }, + { + "name": "isModifierKey", + "args": [ + { + "name": "key", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 364, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "key", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "ngAfterContentInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 180, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "ngAfterViewInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 168, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "ngOnChanges", + "args": [ + { + "name": "changes", + "type": "SimpleChanges", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 158, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "changes", + "type": "SimpleChanges", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 166, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "paginate", + "args": [ + { + "name": "event", + "type": "PaginationEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 240, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nCall when the current page is changed\n\n", + "description": "

    Call when the current page is changed

    \n", + "jsdoctags": [ + { + "name": { + "pos": 5935, + "end": 5940, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "event" + }, + "type": "PaginationEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 5911, + "end": 5916, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 5917, + "end": 5934, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 5918, + "end": 5933, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 177, + "typeName": { + "pos": 5918, + "end": 5933, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "PaginationEvent" + } + } + } + } + ] + }, + { + "name": "registerOnChange", + "args": [ + { + "name": "fn", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 263, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nSet the function to be called when the control receives a change event.\n\n", + "description": "

    Set the function to be called when the control receives a change event.

    \n", + "jsdoctags": [ + { + "name": { + "pos": 6575, + "end": 6577, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "fn" + }, + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 6565, + "end": 6570, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 6571, + "end": 6574, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 6572, + "end": 6573, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 310 + } + } + } + ] + }, + { + "name": "registerOnTouched", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 267, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "resetPanelMinHeight", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 343, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nResets height value from Overlay Panel\n\n", + "description": "

    Resets height value from Overlay Panel

    \n", + "jsdoctags": [] + }, + { + "name": "setDisabledState", + "args": [ + { + "name": "isDisabled", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 334, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nDisabled the component, for more information see:\n{@link https://angular.io/api/forms/ControlValueAccessor#setdisabledstate}\n\n", + "description": "

    Disabled the component, for more information see:\n{@link https://angular.io/api/forms/ControlValueAccessor#setdisabledstate}

    \n", + "jsdoctags": [ + { + "name": { + "pos": 8793, + "end": 8803, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "isDisabled" + }, + "type": "boolean", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 8777, + "end": 8782, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "

    if it is true the component is disabled

    \n", + "typeExpression": { + "pos": 8783, + "end": 8792, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 8784, + "end": 8791, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 133 + } + } + } + ] + }, + { + "name": "setLabel", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 347, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "setOptions", + "args": [ + { + "name": "change", + "type": "SimpleChanges", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 355, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "change", + "type": "SimpleChanges", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "setValue", + "args": [ + { + "name": "newValue", + "type": "any", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 372, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "newValue", + "type": "any", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "showOverlayHandler", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 210, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nEmits show event, sets height of overlay panel based on content\nand add css class if paginator present\n\n", + "description": "

    Emits show event, sets height of overlay panel based on content\nand add css class if paginator present

    \n", + "jsdoctags": [] + }, + { + "name": "toggleOverlayPanel", + "args": [ + { + "name": "$event", + "type": "MouseEvent", + "deprecated": false, + "deprecationMessage": "", + "optional": true + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 323, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nShows or hide the list of options.\n\n", + "description": "

    Shows or hide the list of options.

    \n", + "jsdoctags": [ + { + "name": { + "pos": 8413, + "end": 8419, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "$event" + }, + "type": "MouseEvent", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "tagName": { + "pos": 8393, + "end": 8398, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 8399, + "end": 8411, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 8400, + "end": 8410, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 177, + "typeName": { + "pos": 8400, + "end": 8410, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "MouseEvent" + } + } + } + } + ] + }, + { + "name": "usePlaceholder", + "args": [ + { + "name": "placeholderChange", + "type": "SimpleChange", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 368, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "placeholderChange", + "type": "SimpleChange", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "writeValue", + "args": [ + { + "name": "value", + "type": "any", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 253, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nWrite a new value to the element\n", + "description": "

    Write a new value to the element

    \n", + "jsdoctags": [ + { + "name": "value", + "type": "any", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "

    Dropdown with pagination and global search

    \n", + "rawdescription": "\n\nDropdown with pagination and global search\n", + "type": "component", + "sourceCode": "import { debounceTime } from 'rxjs/operators';\nimport {\n Component,\n ElementRef,\n EventEmitter,\n Input,\n Output,\n ViewChild,\n forwardRef,\n SimpleChanges,\n OnChanges,\n OnInit,\n SimpleChange,\n TemplateRef,\n ContentChildren,\n QueryList,\n AfterContentInit,\n AfterViewInit,\n ChangeDetectorRef\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { fromEvent } from 'rxjs';\nimport * as _ from 'lodash';\nimport { OverlayPanel } from 'primeng/overlaypanel';\nimport { DataView } from 'primeng/dataview';\nimport { PrimeTemplate } from 'primeng/api';\n\n/**\n * Dropdown with pagination and global search\n * @export\n * @class SearchableDropdownComponent\n * @implements {ControlValueAccessor}\n */\n@Component({\n providers: [\n {\n multi: true,\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SearchableDropdownComponent)\n }\n ],\n selector: 'dot-searchable-dropdown',\n styleUrls: ['./searchable-dropdown.component.scss'],\n templateUrl: './searchable-dropdown.component.html'\n})\nexport class SearchableDropdownComponent\n implements ControlValueAccessor, OnChanges, OnInit, AfterContentInit, AfterViewInit {\n @Input()\n data: any[];\n\n @Input() action: (action: any) => void;\n\n @Input()\n labelPropertyName: string | string[];\n\n @Input()\n valuePropertyName: string;\n\n @Input()\n pageLinkSize = 3;\n\n @Input()\n rows: number;\n\n @Input()\n cssClass: string;\n\n @Input()\n totalRecords: number;\n\n @Input()\n placeholder = '';\n\n @Input()\n persistentPlaceholder: boolean;\n\n /**\n * Sets the width of the searchable-dropdown button\n *\n * The CSS unit is **required**.\n * @memberof SearchableDropdownComponent\n */\n @Input()\n width = '300px';\n\n /**\n * Sets the width of the searchable-dropdown overlay\n *\n * The CSS unit is **required**.\n * @memberof SearchableDropdownComponent\n */\n @Input()\n overlayWidth = '300px';\n\n @Input()\n multiple: boolean;\n\n @Input()\n disabled = false;\n\n @Input()\n externalItemListTemplate: TemplateRef;\n\n @Input()\n externalFilterTemplate: TemplateRef;\n\n @Output()\n change: EventEmitter = new EventEmitter();\n\n @Output()\n filterChange: EventEmitter = new EventEmitter();\n\n @Output()\n hide: EventEmitter = new EventEmitter();\n\n @Output()\n pageChange: EventEmitter = new EventEmitter();\n\n @Output()\n show: EventEmitter = new EventEmitter();\n\n @ViewChild('searchInput', { static: false })\n searchInput: ElementRef;\n\n @ViewChild('searchPanel', { static: true })\n searchPanelRef: OverlayPanel;\n\n @ViewChild('dataView', { static: true })\n dataViewRef: DataView;\n\n @ViewChild('button')\n button: ElementRef;\n\n @ContentChildren(PrimeTemplate) templates: QueryList;\n\n valueString = '';\n value: any;\n overlayPanelMinHeight: string;\n options: any[];\n label: string;\n externalSelectTemplate: TemplateRef;\n\n keyMap: string[] = [\n 'Shift',\n 'Alt',\n 'Control',\n 'Meta',\n 'ArrowUp',\n 'ArrowDown',\n 'ArrowLeft',\n 'ArrowRight'\n ];\n\n constructor(private cd: ChangeDetectorRef) {}\n\n propagateChange = (_: any) => {};\n\n ngOnChanges(changes: SimpleChanges): void {\n if (this.usePlaceholder(changes.placeholder) || changes.persistentPlaceholder) {\n this.setLabel();\n }\n this.setOptions(changes);\n this.totalRecords = this.totalRecords || this.data?.length;\n }\n\n ngOnInit(): void {}\n\n ngAfterViewInit(): void {\n if (this.searchInput) {\n fromEvent(this.searchInput.nativeElement, 'keyup')\n .pipe(debounceTime(500))\n .subscribe((keyboardEvent: KeyboardEvent) => {\n if (!this.isModifierKey(keyboardEvent.key)) {\n this.filterChange.emit(keyboardEvent.target['value']);\n }\n });\n }\n }\n\n ngAfterContentInit() {\n this.totalRecords = this.totalRecords || this.data?.length;\n this.templates.forEach((item: PrimeTemplate) => {\n if (item.getType() === 'listItem') {\n this.externalItemListTemplate = item.template;\n } else if (item.getType() === 'select') {\n this.externalSelectTemplate = item.template;\n }\n });\n }\n\n /**\n * Emits hide event and clears any value on filter's input\n *\n * @memberof SearchableDropdownComponent\n */\n hideOverlayHandler(): void {\n if (this.searchInput?.nativeElement.value.length) {\n this.searchInput.nativeElement.value = '';\n this.paginate(null);\n }\n this.hide.emit();\n }\n\n /**\n * Emits show event, sets height of overlay panel based on content\n * and add css class if paginator present\n *\n * @memberof SearchableDropdownComponent\n */\n showOverlayHandler(): void {\n const cssClass =\n this.totalRecords > this.rows\n ? ' searchable-dropdown paginator'\n : ' searchable-dropdown';\n if (typeof this.cssClass === 'undefined') {\n this.cssClass = cssClass;\n } else {\n this.cssClass += cssClass;\n }\n setTimeout(() => {\n if (!this.overlayPanelMinHeight) {\n this.overlayPanelMinHeight = this.searchPanelRef.container\n .getBoundingClientRect()\n .height.toString();\n }\n }, 0);\n this.show.emit();\n this.dataViewRef.paginate({\n first: 0,\n rows: this.rows\n });\n }\n\n /**\n * Call when the current page is changed\n *\n * @param {PaginationEvent} event\n * @memberof SearchableDropdownComponent\n */\n paginate(event: PaginationEvent): void {\n const paginationEvent = Object.assign({}, event);\n if (this.searchInput) {\n paginationEvent.filter = this.searchInput.nativeElement.value;\n }\n this.pageChange.emit(paginationEvent);\n }\n\n /**\n * Write a new value to the element\n * @param * value\n * @memberof SearchableDropdownComponent\n */\n writeValue(value: any): void {\n this.setValue(value);\n }\n\n /**\n * Set the function to be called when the control receives a change event.\n *\n * @param {*} fn\n * @memberof SearchableDropdownComponent\n */\n registerOnChange(fn): void {\n this.propagateChange = fn;\n }\n\n registerOnTouched(): void {}\n\n /**\n * Get labels from container, if labelPropertyName is an array then loop through it and returns\n * a string containing the labels joining by \"-\" if is not just returns a label\n *\n * @param {*} dropDownItem\n * @returns {string}\n * @memberof SearchableDropdownComponent\n */\n getItemLabel(dropDownItem: any): string {\n let resultProps;\n\n if (Array.isArray(this.labelPropertyName)) {\n resultProps = this.labelPropertyName.map((item) => {\n if (item.indexOf('.') > -1) {\n let propertyName;\n item.split('.').forEach((nested) => {\n propertyName = propertyName ? propertyName[nested] : dropDownItem[nested];\n });\n\n return propertyName;\n }\n\n return dropDownItem[item];\n });\n\n return resultProps.join(' - ');\n } else {\n return dropDownItem[this.labelPropertyName];\n }\n }\n\n /**\n * Call when a option is clicked, if this option is not the same of the current value then the\n * change events is emitted. If multiple is true allow to emit the same value.\n *\n * @param {*} item\n * @memberof SearchableDropdownComponent\n */\n handleClick(item: any): void {\n if (this.value !== item || this.multiple) {\n this.setValue(item);\n this.propagateChange(this.getValueToPropagate());\n this.change.emit(Object.assign({}, this.value));\n }\n\n this.toggleOverlayPanel();\n }\n\n /**\n * Shows or hide the list of options.\n *\n * @param {MouseEvent} [$event]\n * @memberof SearchableDropdownComponent\n */\n toggleOverlayPanel($event?: MouseEvent): void {\n $event ? this.searchPanelRef.toggle($event) : this.searchPanelRef.hide();\n }\n\n /**\n * Disabled the component, for more information see:\n * {@link https://angular.io/api/forms/ControlValueAccessor#setdisabledstate}\n *\n * @param {boolean} isDisabled if it is true the component is disabled\n * @memberof SearchableDropdownComponent\n */\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n /**\n * Resets height value from Overlay Panel\n *\n * @memberof SearchableDropdownComponent\n */\n resetPanelMinHeight(): void {\n this.overlayPanelMinHeight = '';\n }\n\n private setLabel(): void {\n this.valueString = this.value\n ? this.value[this.getValueLabelPropertyName()]\n : this.placeholder;\n this.label = this.persistentPlaceholder ? this.placeholder : this.valueString;\n this.cd.markForCheck();\n }\n\n private setOptions(change: SimpleChanges): void {\n if (change.data && change.data.currentValue) {\n this.options = _.cloneDeep(change.data.currentValue).map((item) => {\n item.label = this.getItemLabel(item);\n return item;\n });\n }\n }\n\n private isModifierKey(key: string): boolean {\n return this.keyMap.includes(key);\n }\n\n private usePlaceholder(placeholderChange: SimpleChange): boolean {\n return placeholderChange && placeholderChange.currentValue && !this.value;\n }\n\n private setValue(newValue: any): void {\n this.value = newValue;\n\n this.setLabel();\n }\n\n private getValueLabelPropertyName(): string {\n return Array.isArray(this.labelPropertyName)\n ? this.labelPropertyName[0]\n : this.labelPropertyName;\n }\n\n private getValueToPropagate(): string {\n return !this.valuePropertyName ? this.value : this.value[this.valuePropertyName];\n }\n}\n\nexport interface PaginationEvent {\n first: number; // Index of the first record\n filter: string;\n page: number; // Index of the new page\n pageCount: number; // Total number of pages\n rows: number; // Number of rows to display in new page\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"variables\" as *;\n\n@import \"dotcms-theme/utils/theme-variables\";\n@import \"mixins\";\n\n:host {\n position: relative;\n\n &.d-secondary {\n .p-button {\n border: none;\n\n &:hover,\n &:active,\n &:focus {\n border: none;\n box-shadow: none;\n background: $bg-hover;\n }\n\n &::ng-deep {\n .p-button-label {\n margin-right: 0;\n }\n }\n }\n }\n\n .p-button {\n border: 1px solid $input-border-color;\n padding-left: $spacing-2;\n padding-right: $spacing-2;\n border-radius: 2px;\n background: none;\n text-align: left;\n\n .p-fluid & {\n /*\n We have to use important because in the component we have a 300px default value for\n the element as inline styles, but when the parent have .fluid we need to enforce 100%\n */\n width: 100% !important;\n }\n\n &:hover,\n &:focus,\n &:active {\n border-color: $input-border-color-hover;\n background: none;\n }\n\n &:focus,\n &:active {\n box-shadow: $input-inset-shadow;\n }\n\n &::ng-deep {\n .p-button-label {\n margin-right: 2rem;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .p-button-label,\n .p-button-icon {\n font-weight: normal;\n color: $black;\n text-transform: none;\n }\n }\n }\n}\n\n::ng-deep {\n .p-overlaypanel.paginator {\n .p-dataview-content {\n margin-bottom: $spacing-9;\n }\n\n .p-paginator-bottom {\n @include paginator-bottom-absolute;\n }\n }\n\n .searchable-dropdown .p-overlaypanel-content {\n padding: $spacing-3 0;\n }\n}\n\n.searchable-dropdown__data-list ::ng-deep {\n .p-dataview {\n position: unset;\n }\n\n .p-dataview-content {\n width: 100%;\n\n .searchable-dropdown__data-list-item {\n cursor: pointer;\n display: block;\n line-height: normal;\n padding: $spacing-1 $spacing-3;\n transition: background-color $basic-speed ease-in;\n width: 100%;\n\n @include truncate-text;\n\n &.selected {\n font-weight: bold;\n }\n\n &:hover {\n background-color: $bg-hover;\n }\n }\n }\n\n .p-dataview-emptymessage {\n padding: 1em;\n }\n}\n\n.searchable-dropdown__search-section {\n flex-grow: 1;\n position: relative;\n\n input.searchable-dropdown__search-inputfield {\n width: 100%;\n }\n}\n\n.searchable-dropdown__search {\n display: flex;\n margin: 0 $spacing-3;\n position: relative;\n}\n\n.searchable-dropdown__search-icon {\n color: $gray;\n position: absolute;\n right: $spacing-1;\n top: 9px;\n}\n\n.searchable-dropdown__search-action {\n margin-left: $spacing-3;\n}\n", + "styleUrl": "./searchable-dropdown.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "cd", + "type": "ChangeDetectorRef", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 152, + "jsdoctags": [ + { + "name": "cd", + "type": "ChangeDetectorRef", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": [ + "ControlValueAccessor", + "OnChanges", + "OnInit", + "AfterContentInit", + "AfterViewInit" + ], + "templateData": "\n {{ item.label }}\n\n\n\n \n \n\n\n\n \n\n\n\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n rows\"\n [rows]=\"rows\"\n [totalRecords]=\"totalRecords\"\n [value]=\"options\"\n class=\"searchable-dropdown__data-list\"\n >\n \n \n \n \n\n\n\n" + }, + { + "name": "ServersideCondition", + "id": "component-ServersideCondition-b2e0a98ad916c81f193a8ec4f9b12149eefbf1c5b25b28a613fe5a0c66f3df4d7c752362bb0c4283f3d2793df1060e1940e6f7dc005b13706d5f73b5bafcd449", + "file": "libs/dot-rules/src/lib/condition-types/serverside-condition/serverside-condition.ts", + "changeDetection": "ChangeDetectionStrategy.OnPush", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "cw-serverside-condition", + "styleUrls": [], + "styles": [], + "template": "
    \n \n
    \n  \n
    \n = _rhArgCount\"\n [required]=\"input.required\"\n [value]=\"input.value\"\n [placeholder]=\"input.placeholder | async\"\n [options]=\"input.options\"\n >\n \n\n \n = _rhArgCount\"\n placeholder=\"{{ input.placeholder | async }}\"\n [minSelections]=\"input.minSelections\"\n [maxSelections]=\"input.maxSelections\"\n optionUrl=\"{{ input.optionUrl }}\"\n optionValueField=\"{{ input.optionValueField }}\"\n optionLabelField=\"{{ input.optionLabelField }}\"\n [required]=\"input.required\"\n [allowAdditions]=\"input.allowAdditions\"\n [class.cw-comparator-selector]=\"input.name == 'comparison'\"\n [class.cw-last]=\"islast\"\n (touch)=\"onBlur(input)\"\n #rdInput=\"ngForm\"\n >\n \n \n {{ getErrorMessage(input) }}\n
    \n \n\n \n = _rhArgCount\"\n (blur)=\"onBlur(input)\"\n #fInput=\"ngForm\"\n />\n \n {{ getErrorMessage(input) }}\n \n \n\n = _rhArgCount\"\n [value]=\"input.value\"\n (blur)=\"onBlur(input)\"\n #gInput=\"ngForm\"\n >\n \n \n ", + "templateUrl": [], + "viewProviders": [], + "inputsClass": [ + { + "name": "componentInstance", + "deprecated": false, + "deprecationMessage": "", + "line": 129, + "type": "ServerSideFieldModel", + "decorators": [] + } + ], + "outputsClass": [ + { + "name": "parameterValueChange", + "defaultValue": "new EventEmitter(false)", + "deprecated": false, + "deprecationMessage": "", + "line": 131, + "type": "EventEmitter" + } + ], + "propertiesClass": [ + { + "name": "_errorMessageFormatters", + "defaultValue": "{\n minLength: 'Input must be at least ${len} characters long.',\n noQuotes: 'Input cannot contain quote [\" or \\'] characters.',\n noDoubleQuotes: 'Input cannot contain quote [\"] characters.',\n required: 'Required'\n }", + "deprecated": false, + "deprecationMessage": "", + "type": "object", + "optional": false, + "description": "", + "line": 138, + "modifierKind": [121] + }, + { + "name": "_inputs", + "deprecated": false, + "deprecationMessage": "", + "type": "Array", + "optional": false, + "description": "", + "line": 134 + }, + { + "name": "_resources", + "deprecated": false, + "deprecationMessage": "", + "type": "I18nService", + "optional": false, + "description": "", + "line": 136, + "modifierKind": [121] + }, + { + "name": "_rhArgCount", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 135 + }, + { + "name": "islast", + "defaultValue": "null", + "deprecated": false, + "deprecationMessage": "", + "type": "null", + "optional": false, + "description": "", + "line": 132 + } + ], + "methodsClass": [ + { + "name": "applyRhsCount", + "args": [ + { + "name": "selectedComparison", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 384, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "selectedComparison", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getDateTimeInput", + "args": [ + { + "name": "param", + "type": "", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "paramDef", + "type": "", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "_i18nBaseKey", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "any", + "typeParameters": [], + "line": 280, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "param", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "paramDef", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "_i18nBaseKey", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getDropdownInput", + "args": [ + { + "name": "param", + "type": "ParameterModel", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "paramDef", + "type": "ParameterDefinition", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "i18nBaseKey", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "CwComponent", + "typeParameters": [], + "line": 323, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "param", + "type": "ParameterModel", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "paramDef", + "type": "ParameterDefinition", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "i18nBaseKey", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getErrorMessage", + "args": [ + { + "name": "input", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 222, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nBrute force error messages from lookup table for now.\nand pre-cache them, so that we can retrieve them synchronously.\n", + "description": "

    Brute force error messages from lookup table for now.\nand pre-cache them, so that we can retrieve them synchronously.

    \n", + "jsdoctags": [ + { + "name": "input", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getInputFor", + "args": [ + { + "name": "type", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "param", + "type": "", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "paramDef", + "type": "ParameterDefinition", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "any", + "typeParameters": [], + "line": 248, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "type", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "param", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "paramDef", + "type": "ParameterDefinition", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getRestDropdownInput", + "args": [ + { + "name": "param", + "type": "", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "paramDef", + "type": "", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "i18nBaseKey", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "any", + "typeParameters": [], + "line": 290, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "param", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "paramDef", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "i18nBaseKey", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getRightHandArgCount", + "args": [ + { + "name": "selectedComparison", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 150, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121, 124], + "jsdoctags": [ + { + "name": "selectedComparison", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getTextInput", + "args": [ + { + "name": "param", + "type": "", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "paramDef", + "type": "", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "i18nBaseKey", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "any", + "typeParameters": [], + "line": 268, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "param", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "paramDef", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "i18nBaseKey", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "isComparisonParameter", + "args": [ + { + "name": "input", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 160, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121, 124], + "jsdoctags": [ + { + "name": "input", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "isConditionalFieldWithLessThanThreeFields", + "args": [ + { + "name": "size", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "field", + "type": "any", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 164, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "size", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "field", + "type": "any", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "ngOnChanges", + "args": [ + { + "name": "change", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 168, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "change", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "onBlur", + "args": [ + { + "name": "input", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 235, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "input", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "setParameterValue", + "args": [ + { + "name": "name", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "value", + "type": "any", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "_valid", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "_isBlur", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "false" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 241, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "name", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "value", + "type": "any", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "_valid", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "_isBlur", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "false", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy } from '@angular/core';\nimport { FormBuilder } from '@angular/forms';\nimport { ParameterDefinition } from '../../services/util/CwInputModel';\nimport { CwDropdownInputModel } from '../../services/util/CwInputModel';\nimport { CwComponent } from '../../services/util/CwComponent';\nimport { ServerSideFieldModel } from '../../services/ServerSideFieldModel';\nimport { I18nService } from '../../services/system/locale/I18n';\nimport { ObservableHack } from '../../services/util/ObservableHack';\nimport { CwRestDropdownInputModel } from '../../services/util/CwInputModel';\nimport { Verify } from '../../services/validation/Verify';\nimport { ConditionModel, ParameterModel } from '../../services/Rule';\nimport { LoggerService } from '@dotcms/dotcms-js';\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'cw-serverside-condition',\n template: `
    \n
    \n \n
    \n  \n
    \n = _rhArgCount\"\n [required]=\"input.required\"\n [value]=\"input.value\"\n [placeholder]=\"input.placeholder | async\"\n [options]=\"input.options\"\n >\n \n\n \n = _rhArgCount\"\n placeholder=\"{{ input.placeholder | async }}\"\n [minSelections]=\"input.minSelections\"\n [maxSelections]=\"input.maxSelections\"\n optionUrl=\"{{ input.optionUrl }}\"\n optionValueField=\"{{ input.optionValueField }}\"\n optionLabelField=\"{{ input.optionLabelField }}\"\n [required]=\"input.required\"\n [allowAdditions]=\"input.allowAdditions\"\n [class.cw-comparator-selector]=\"input.name == 'comparison'\"\n [class.cw-last]=\"islast\"\n (touch)=\"onBlur(input)\"\n #rdInput=\"ngForm\"\n >\n \n \n {{ getErrorMessage(input) }}\n
    \n \n\n \n = _rhArgCount\"\n (blur)=\"onBlur(input)\"\n #fInput=\"ngForm\"\n />\n \n {{ getErrorMessage(input) }}\n \n \n\n = _rhArgCount\"\n [value]=\"input.value\"\n (blur)=\"onBlur(input)\"\n #gInput=\"ngForm\"\n >\n \n \n `\n})\nexport class ServersideCondition {\n @Input() componentInstance: ServerSideFieldModel;\n @Output()\n parameterValueChange: EventEmitter<{ name: string; value: string }> = new EventEmitter(false);\n islast = null;\n\n _inputs: Array;\n _rhArgCount: boolean;\n private _resources: I18nService;\n\n private _errorMessageFormatters = {\n minLength: 'Input must be at least ${len} characters long.',\n noQuotes: 'Input cannot contain quote [\" or \\'] characters.',\n noDoubleQuotes: 'Input cannot contain quote [\"] characters.',\n required: 'Required'\n };\n\n constructor(_fb: FormBuilder, resources: I18nService, private loggerService: LoggerService) {\n this._resources = resources;\n this._inputs = [];\n }\n\n private static getRightHandArgCount(selectedComparison): boolean {\n let argCount = null;\n if (selectedComparison) {\n argCount = Verify.isNumber(selectedComparison.rightHandArgCount)\n ? selectedComparison.rightHandArgCount\n : 1;\n }\n return argCount;\n }\n\n private static isComparisonParameter(input): boolean {\n return input && input.name === 'comparison';\n }\n\n private isConditionalFieldWithLessThanThreeFields(size: number, field: any): boolean {\n return size <= 2 && field instanceof ConditionModel;\n }\n\n ngOnChanges(change): void {\n let paramDefs = null;\n if (change.componentInstance) {\n this._rhArgCount = null;\n paramDefs = this.componentInstance.type.parameters;\n }\n if (paramDefs) {\n let prevPriority = 0;\n this._inputs = [];\n Object.keys(paramDefs).forEach((key) => {\n const paramDef = this.componentInstance.getParameterDef(key);\n const param = this.componentInstance.getParameter(key);\n prevPriority = paramDef.priority;\n\n const input = this.getInputFor(paramDef.inputType.type, param, paramDef);\n this._inputs[paramDef.priority] = input;\n });\n\n // Cleans _inputs array from empty(undefined) elements\n this._inputs = this._inputs.filter((i) => i);\n\n if (\n this.isConditionalFieldWithLessThanThreeFields(\n this._inputs.length,\n change.componentInstance.currentValue\n )\n ) {\n this._inputs = [{ flex: 40, type: 'spacer' }, ...this._inputs];\n }\n\n let comparison;\n let comparisonIdx = null;\n this._inputs.forEach((input: any, idx) => {\n if (ServersideCondition.isComparisonParameter(input)) {\n comparison = input;\n this.applyRhsCount(comparison.value);\n comparisonIdx = idx;\n } else if (comparisonIdx !== null) {\n if (this._rhArgCount !== null) {\n input.argIndex = idx - comparisonIdx - 1;\n }\n }\n });\n if (comparison) {\n this.applyRhsCount(comparison.value);\n }\n }\n }\n\n /**\n * Brute force error messages from lookup table for now.\n * @todo look up the known error formatters by key ('required', 'minLength', etc) from the I18NResource endpoint\n * and pre-cache them, so that we can retrieve them synchronously.\n */\n getErrorMessage(input): string {\n const control = input.control;\n let message = '';\n Object.keys(control.errors || {}).forEach((key) => {\n const err = control.errors[key];\n message += this._errorMessageFormatters[key];\n if (Object.keys(err).length) {\n // tslint:disable-next-line:no-debugger\n }\n });\n return message;\n }\n\n onBlur(input): void {\n if (input.control.dirty) {\n this.setParameterValue(input.name, input.control.value, input.control.valid, true);\n }\n }\n\n setParameterValue(name: string, value: any, _valid: boolean, _isBlur = false): void {\n this.parameterValueChange.emit({ name, value });\n if (name === 'comparison') {\n this.applyRhsCount(value);\n }\n }\n\n getInputFor(type: string, param, paramDef: ParameterDefinition): any {\n const i18nBaseKey = paramDef.i18nBaseKey || this.componentInstance.type.i18nKey;\n /* Save a potentially large number of requests by loading parent key: */\n this._resources.get(i18nBaseKey).subscribe(() => {});\n\n let input;\n if (type === 'text' || type === 'number') {\n input = this.getTextInput(param, paramDef, i18nBaseKey);\n this.loggerService.info('ServersideCondition', 'getInputFor', type, paramDef);\n } else if (type === 'datetime') {\n input = this.getDateTimeInput(param, paramDef, i18nBaseKey);\n } else if (type === 'restDropdown') {\n input = this.getRestDropdownInput(param, paramDef, i18nBaseKey);\n } else if (type === 'dropdown') {\n input = this.getDropdownInput(param, paramDef, i18nBaseKey);\n }\n input.type = type;\n return input;\n }\n\n private getTextInput(param, paramDef, i18nBaseKey: string): any {\n const rsrcKey = i18nBaseKey + '.inputs.' + paramDef.key;\n const placeholderKey = rsrcKey + '.placeholder';\n const control = ServerSideFieldModel.createNgControl(this.componentInstance, param.key);\n return {\n control: control,\n name: param.key,\n placeholder: this._resources.get(placeholderKey, paramDef.key),\n required: paramDef.inputType.dataType['minLength'] > 0\n };\n }\n\n private getDateTimeInput(param, paramDef, _i18nBaseKey: string): any {\n return {\n control: ServerSideFieldModel.createNgControl(this.componentInstance, param.key),\n name: param.key,\n required: paramDef.inputType.dataType['minLength'] > 0,\n value: this.componentInstance.getParameterValue(param.key),\n visible: true\n };\n }\n\n private getRestDropdownInput(param, paramDef, i18nBaseKey: string): any {\n const inputType: CwRestDropdownInputModel = paramDef.inputType;\n const rsrcKey = i18nBaseKey + '.inputs.' + paramDef.key;\n const placeholderKey = rsrcKey + '.placeholder';\n\n let currentValue = this.componentInstance.getParameterValue(param.key);\n if (\n currentValue &&\n (currentValue.indexOf('\"') !== -1 || currentValue.indexOf(\"'\") !== -1)\n ) {\n currentValue = currentValue.replace(/[\"']/g, '');\n this.componentInstance.setParameter(param.key, currentValue);\n }\n const control = ServerSideFieldModel.createNgControl(this.componentInstance, param.key);\n const input: any = {\n allowAdditions: inputType.allowAdditions,\n control: control,\n maxSelections: inputType.maxSelections,\n minSelections: inputType.minSelections,\n name: param.key,\n optionLabelField: inputType.optionLabelField,\n optionUrl: inputType.optionUrl,\n optionValueField: inputType.optionValueField,\n placeholder: this._resources.get(placeholderKey, paramDef.key),\n required: inputType.minSelections > 0,\n value: currentValue\n };\n if (!input.value) {\n input.value = inputType.selected != null ? inputType.selected : '';\n }\n return input;\n }\n\n private getDropdownInput(\n param: ParameterModel,\n paramDef: ParameterDefinition,\n i18nBaseKey: string\n ): CwComponent {\n const inputType: CwDropdownInputModel = paramDef.inputType;\n const opts = [];\n const options = inputType.options;\n let rsrcKey = i18nBaseKey + '.inputs.' + paramDef.key;\n const placeholderKey = rsrcKey + '.placeholder';\n if (param.key === 'comparison') {\n rsrcKey = 'api.sites.ruleengine.rules.inputs.comparison';\n } else {\n rsrcKey = rsrcKey + '.options';\n }\n\n const currentValue = this.componentInstance.getParameterValue(param.key);\n let needsCustomAttribute = currentValue != null;\n\n Object.keys(options).forEach((key: any) => {\n const option = options[key];\n if (needsCustomAttribute && key === currentValue) {\n needsCustomAttribute = false;\n }\n let labelKey = rsrcKey + '.' + option.i18nKey;\n // hack for country - @todo ggranum: kill 'name' on locale?\n if (param.key === 'country') {\n labelKey = i18nBaseKey + '.' + option.i18nKey + '.name';\n }\n\n opts.push({\n icon: option.icon,\n label: this._resources.get(labelKey, option.i18nKey),\n rightHandArgCount: option.rightHandArgCount,\n value: key\n });\n });\n\n if (needsCustomAttribute) {\n opts.push({\n label: ObservableHack.of(currentValue),\n value: currentValue\n });\n }\n const input: any = {\n allowAdditions: inputType.allowAdditions,\n control: ServerSideFieldModel.createNgControl(this.componentInstance, param.key),\n maxSelections: inputType.maxSelections,\n minSelections: inputType.minSelections,\n name: param.key,\n options: opts,\n placeholder: this._resources.get(placeholderKey, paramDef.key),\n required: inputType.minSelections > 0,\n value: currentValue\n };\n if (!input.value) {\n input.value = inputType.selected != null ? inputType.selected : '';\n }\n return input;\n }\n\n private applyRhsCount(selectedComparison: string): void {\n const comparisonDef = this.componentInstance.getParameterDef('comparison');\n const comparisonType: CwDropdownInputModel = comparisonDef.inputType;\n const selectedComparisonDef = comparisonType.options[selectedComparison];\n this._rhArgCount = ServersideCondition.getRightHandArgCount(selectedComparisonDef);\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "_fb", + "type": "FormBuilder", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "resources", + "type": "I18nService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "loggerService", + "type": "LoggerService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 143, + "jsdoctags": [ + { + "name": "_fb", + "type": "FormBuilder", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "resources", + "type": "I18nService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "loggerService", + "type": "LoggerService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + }, + { + "name": "SuggestionListComponent", + "id": "component-SuggestionListComponent-747c79292cc8eaf361059f7c9e9171fce6e1c31be76cf461574c87d8ff9d495481f7939608f54de6f9867e1f73b2fd0987cb00853cfe375cdf6f80e4f06e9d3e", + "file": "libs/block-editor/src/lib/extensions/components/suggestion-list/suggestion-list.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dotcms-suggestion-list", + "styleUrls": ["./suggestion-list.component.scss"], + "styles": [], + "templateUrl": ["./suggestion-list.component.html"], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "items", + "deprecated": false, + "deprecationMessage": "", + "type": "QueryList", + "optional": false, + "description": "", + "line": 13, + "decorators": [ + { + "name": "ContentChildren", + "stringifiedArguments": "SuggestionsListItemComponent" + } + ] + }, + { + "name": "keyManager", + "deprecated": false, + "deprecationMessage": "", + "type": "FocusKeyManager", + "optional": false, + "description": "", + "line": 11 + } + ], + "methodsClass": [ + { + "name": "execCommand", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 39, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nExecute the command function in the list item component\n\n", + "description": "

    Execute the command function in the list item component

    \n", + "jsdoctags": [] + }, + { + "name": "ngAfterContentInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 15, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "resetKeyManager", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 59, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nReset the key manager with the new options\n\n", + "description": "

    Reset the key manager with the new options

    \n", + "jsdoctags": [] + }, + { + "name": "setFirstItemActive", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 48, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nSet the first item of the list active\n\n", + "description": "

    Set the first item of the list active

    \n", + "jsdoctags": [] + }, + { + "name": "updateActiveItem", + "args": [ + { + "name": "index", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 74, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nSet an active item manually\n\n", + "description": "

    Set an active item manually

    \n", + "jsdoctags": [ + { + "name": { + "pos": 2043, + "end": 2048, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "index" + }, + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 2028, + "end": 2033, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 2034, + "end": 2042, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 2035, + "end": 2041, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 146 + } + } + } + ] + }, + { + "name": "updateSelection", + "args": [ + { + "name": "event", + "type": "KeyboardEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 25, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nUpdate the selected item in the list\n\n", + "description": "

    Update the selected item in the list

    \n", + "jsdoctags": [ + { + "name": { + "pos": 833, + "end": 838, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "event" + }, + "type": "KeyboardEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 811, + "end": 816, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 817, + "end": 832, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 818, + "end": 831, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 177, + "typeName": { + "pos": 818, + "end": 831, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "KeyboardEvent" + } + } + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { FocusKeyManager } from '@angular/cdk/a11y';\nimport { AfterContentInit, Component, ContentChildren, QueryList } from '@angular/core';\nimport { SuggestionsListItemComponent } from '../suggestions-list-item/suggestions-list-item.component';\n\n@Component({\n selector: 'dotcms-suggestion-list',\n templateUrl: './suggestion-list.component.html',\n styleUrls: ['./suggestion-list.component.scss']\n})\nexport class SuggestionListComponent implements AfterContentInit {\n keyManager: FocusKeyManager;\n\n @ContentChildren(SuggestionsListItemComponent) items: QueryList;\n\n ngAfterContentInit() {\n this.keyManager = new FocusKeyManager(this.items).withWrap();\n }\n\n /**\n * Update the selected item in the list\n *\n * @param {KeyboardEvent} event\n * @memberof SuggestionListComponent\n */\n updateSelection(event: KeyboardEvent) {\n if (this.keyManager.activeItem) {\n this.keyManager.activeItem.unfocus();\n }\n\n this.keyManager.onKeydown(event);\n this.keyManager.activeItem.scrollIntoView();\n }\n\n /**\n * Execute the command function in the list item component\n *\n * @memberof SuggestionListComponent\n */\n execCommand() {\n this.keyManager.activeItem.command()\n }\n\n /**\n * Set the first item of the list active\n *\n * @memberof SuggestionListComponent\n */\n setFirstItemActive() {\n this.keyManager.activeItem?.unfocus();\n this.keyManager.setFirstItemActive();\n this.keyManager.activeItem.focus();\n }\n\n /**\n * Reset the key manager with the new options\n *\n * @memberof SuggestionListComponent\n */\n resetKeyManager() {\n this.keyManager = new FocusKeyManager(this.items).withWrap();\n\n // Needs to wait until the new items are rendered\n setTimeout(() => {\n this.setFirstItemActive();\n }, 0)\n }\n\n /**\n * Set an active item manually\n *\n * @param {number} index\n * @memberof SuggestionListComponent\n */\n updateActiveItem(index: number): void {\n this.keyManager.activeItem?.unfocus();\n this.keyManager.setActiveItem(index)\n }\n\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "", + "styleUrl": "./suggestion-list.component.scss" + } + ], + "stylesData": "", + "implements": ["AfterContentInit"], + "templateData": "\n" + }, + { + "name": "SuggestionsComponent", + "id": "component-SuggestionsComponent-e8f9260ec171b52ea7b5d2dbc65fe2b5de85fbc9e601f74d5b3dd9abae68d4c95781d28251a2032245d480976d11031ee222e21eef39692887c9de170616440e", + "file": "libs/block-editor/src/lib/extensions/components/suggestions/suggestions.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dotcms-suggestions", + "styleUrls": ["./suggestions.component.scss"], + "styles": [], + "templateUrl": ["./suggestions.component.html"], + "viewProviders": [], + "inputsClass": [ + { + "name": "onSelection", + "deprecated": false, + "deprecationMessage": "", + "line": 29, + "type": "function", + "decorators": [] + } + ], + "outputsClass": [], + "propertiesClass": [ + { + "name": "items", + "defaultValue": "[]", + "deprecated": false, + "deprecationMessage": "", + "type": "DotMenuItem[]", + "optional": false, + "description": "", + "line": 30 + }, + { + "name": "list", + "deprecated": false, + "deprecationMessage": "", + "type": "SuggestionListComponent", + "optional": false, + "description": "", + "line": 27, + "decorators": [ + { + "name": "ViewChild", + "stringifiedArguments": "'list', {static: true}" + } + ] + }, + { + "name": "selectionUpdated", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 33 + }, + { + "name": "title", + "defaultValue": "'Select a block'", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 32 + } + ], + "methodsClass": [ + { + "name": "execCommand", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 153, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nExecute the item command\n\n", + "description": "

    Execute the item command

    \n", + "jsdoctags": [] + }, + { + "name": "initContentletSelection", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 227, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121] + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 41, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "onMouseDown", + "args": [ + { + "name": "e", + "type": "MouseEvent", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "item", + "type": "MenuItem", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 222, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nExecute the item command on mouse down\n\n", + "description": "

    Execute the item command on mouse down

    \n", + "jsdoctags": [ + { + "name": { + "pos": 6058, + "end": 6059, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "e" + }, + "type": "MouseEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 6039, + "end": 6044, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 6045, + "end": 6057, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 6046, + "end": 6056, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 177, + "typeName": { + "pos": 6046, + "end": 6056, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "MouseEvent" + } + } + } + }, + { + "name": { + "pos": 6085, + "end": 6089, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "item" + }, + "type": "MenuItem", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 6068, + "end": 6073, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 6074, + "end": 6084, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 6075, + "end": 6083, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 177, + "typeName": { + "pos": 6075, + "end": 6083, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "MenuItem" + } + } + } + } + ] + }, + { + "name": "onMouseDownHandler", + "args": [ + { + "name": "e", + "type": "MouseEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 195, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nAvoid closing the suggestions on manual scroll\n\n", + "description": "

    Avoid closing the suggestions on manual scroll

    \n", + "jsdoctags": [ + { + "name": { + "pos": 5381, + "end": 5382, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "e" + }, + "type": "MouseEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 5362, + "end": 5367, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 5368, + "end": 5380, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 5369, + "end": 5379, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 177, + "typeName": { + "pos": 5369, + "end": 5379, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "MouseEvent" + } + } + } + } + ] + }, + { + "name": "onMouseEnter", + "args": [ + { + "name": "e", + "type": "MouseEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 205, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nHandle the active item on menu events\n\n", + "description": "

    Handle the active item on menu events

    \n", + "jsdoctags": [ + { + "name": { + "pos": 5591, + "end": 5592, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "e" + }, + "type": "MouseEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 5572, + "end": 5577, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 5578, + "end": 5590, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 5579, + "end": 5589, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 177, + "typeName": { + "pos": 5579, + "end": 5589, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "MouseEvent" + } + } + } + } + ] + }, + { + "name": "resetKeyManager", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 181, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nReset the key manager after we add new elements to the list\n\n", + "description": "

    Reset the key manager after we add new elements to the list

    \n", + "jsdoctags": [] + }, + { + "name": "sanitizeUrl", + "args": [ + { + "name": "url", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "SafeUrl", + "typeParameters": [], + "line": 274, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [121], + "jsdoctags": [ + { + "name": "url", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "setFirstItemActive", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 172, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nSet the first item active\n\n", + "description": "

    Set the first item active

    \n", + "jsdoctags": [] + }, + { + "name": "updateSelection", + "args": [ + { + "name": "e", + "type": "KeyboardEvent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 163, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nUpdate the current item selected\n\n", + "description": "

    Update the current item selected

    \n", + "jsdoctags": [ + { + "name": { + "pos": 4632, + "end": 4633, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "e" + }, + "type": "KeyboardEvent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 4610, + "end": 4615, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "", + "typeExpression": { + "pos": 4616, + "end": 4631, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 307, + "type": { + "pos": 4617, + "end": 4630, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 1, + "kind": 177, + "typeName": { + "pos": 4617, + "end": 4630, + "flags": 4194304, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "KeyboardEvent" + } + } + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { ChangeDetectorRef, Component, Input, OnInit, ViewChild } from '@angular/core';\n\nimport { map, take } from 'rxjs/operators';\nimport { MenuItem } from 'primeng/api';\n\nimport { SuggestionsService } from '../../services/suggestions/suggestions.service';\nimport { DotCMSContentlet } from '@dotcms/dotcms-models';\nimport { SuggestionListComponent } from '../suggestion-list/suggestion-list.component';\nimport { DomSanitizer, SafeUrl } from '@angular/platform-browser';\nimport { headerIcons, pIcon, ulIcon, olIcon, quoteIcon, codeIcon, lineIcon } from './suggestion-icons';\n\nexport interface SuggestionsCommandProps {\n payload?: DotCMSContentlet;\n type: { name: string; level?: number };\n}\n\nexport interface DotMenuItem extends Omit {\n icon: string | SafeUrl;\n}\n\n@Component({\n selector: 'dotcms-suggestions',\n templateUrl: './suggestions.component.html',\n styleUrls: ['./suggestions.component.scss']\n})\nexport class SuggestionsComponent implements OnInit {\n @ViewChild('list', { static: true }) list: SuggestionListComponent;\n\n @Input() onSelection: (props: SuggestionsCommandProps) => void;\n items: DotMenuItem[] = [];\n\n title = 'Select a block';\n selectionUpdated = false;\n\n constructor(\n private suggestionsService: SuggestionsService,\n private cd: ChangeDetectorRef,\n private domSanitizer: DomSanitizer\n ) {}\n\n ngOnInit(): void {\n const headings = [...Array(3).keys()].map((level) => {\n const size = level + 1;\n return {\n label: `Heading ${size}`,\n icon: this.sanitizeUrl(headerIcons[level]),\n command: () => {\n this.onSelection({\n type: {\n name: 'heading',\n level: level + 1\n }\n });\n }\n };\n });\n\n const paragraph = [\n {\n label: 'Paragraph',\n icon: this.sanitizeUrl(pIcon),\n command: () => {\n this.onSelection({\n type: {\n name: 'paragraph'\n }\n });\n }\n }\n ];\n\n const list = [\n {\n label: 'List Ordered',\n icon: this.sanitizeUrl(olIcon),\n command: () => {\n this.onSelection({\n type: {\n name: 'listOrdered'\n }\n });\n }\n },\n {\n label: 'List Unordered',\n icon: this.sanitizeUrl(ulIcon),\n command: () => {\n this.onSelection({\n type: {\n name: 'listUnordered'\n }\n });\n }\n }\n ];\n\n const block = [\n {\n label: 'Blockquote',\n icon: this.sanitizeUrl(quoteIcon),\n command: () => {\n this.onSelection({\n type: {\n name: 'blockQuote'\n }\n });\n }\n },\n {\n label: 'Code Block',\n icon: this.sanitizeUrl(codeIcon),\n command: () => {\n this.onSelection({\n type: {\n name: 'codeBlock'\n }\n });\n }\n },\n {\n label: 'Horizontal Line',\n icon: this.sanitizeUrl(lineIcon),\n command: () => {\n this.onSelection({\n type: {\n name: 'horizontalLine'\n }\n });\n }\n }\n ];\n\n this.items = [\n {\n label: 'Contentlets',\n icon: 'receipt',\n command: () => {\n this.initContentletSelection();\n }\n },\n ...headings,\n ...paragraph,\n ...list,\n ...block\n ];\n }\n\n /**\n * Execute the item command\n *\n * @memberof SuggestionsComponent\n */\n execCommand() {\n this.list.execCommand();\n }\n\n /**\n * Update the current item selected\n *\n * @param {KeyboardEvent} e\n * @memberof SuggestionsComponent\n */\n updateSelection(e: KeyboardEvent) {\n this.list.updateSelection(e);\n }\n\n /**\n * Set the first item active\n *\n * @memberof SuggestionsComponent\n */\n setFirstItemActive() {\n this.list.setFirstItemActive();\n }\n\n /**\n * Reset the key manager after we add new elements to the list\n *\n * @memberof SuggestionsComponent\n */\n resetKeyManager() {\n this.list.resetKeyManager();\n this.selectionUpdated = true;\n // Needs to wait until the item has been updated\n setTimeout(() => this.selectionUpdated = false, 0);\n }\n\n\n /**\n * Avoid closing the suggestions on manual scroll\n *\n * @param {MouseEvent} e\n * @memberof SuggestionsComponent\n */\n onMouseDownHandler(e: MouseEvent) {\n e.preventDefault();\n }\n\n /**\n * Handle the active item on menu events\n *\n * @param {MouseEvent} e\n * @memberof SuggestionsComponent\n */\n onMouseEnter(e: MouseEvent) {\n // If it's called right after updateSelection, do not update active Item\n if (this.selectionUpdated) {\n return;\n }\n e.preventDefault();\n const index = Number((e.target as HTMLElement).dataset.index);\n this.list.updateActiveItem(index);\n }\n\n /**\n * Execute the item command on mouse down\n *\n * @param {MouseEvent} e\n * @param {MenuItem} item\n * @memberof SuggestionsComponent\n */\n onMouseDown(e: MouseEvent, item: MenuItem) {\n e.preventDefault();\n item.command();\n }\n\n private initContentletSelection() {\n this.suggestionsService\n .getContentTypes()\n .pipe(\n map((items) => {\n return items.map((item) => {\n return {\n label: item.name,\n icon: item.icon,\n command: () => {\n this.suggestionsService\n .getContentlets(item.variable)\n .pipe(take(1))\n .subscribe((contentlets) => {\n this.items = contentlets.map((contentlet) => {\n return {\n label: contentlet.title,\n icon: 'image',\n command: () => {\n this.onSelection({\n payload: contentlet,\n type: {\n name: 'dotContent'\n }\n });\n }\n };\n });\n\n this.title = 'Select a contentlet';\n this.cd.detectChanges();\n this.resetKeyManager();\n });\n }\n };\n });\n }),\n take(1)\n )\n .subscribe((items) => {\n this.title = 'Select a content type';\n this.items = items;\n this.cd.detectChanges();\n this.resetKeyManager();\n });\n }\n\n private sanitizeUrl(url: string): SafeUrl {\n return this.domSanitizer.bypassSecurityTrustUrl(url);\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": ":host {\n display: block;\n min-width: 240px;\n box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.1);\n padding: 0.5rem 0;\n background: #ffffff;\n font-family: 'Roboto', Helvetica, sans-serif, Arial;\n}\n\nh3 {\n text-transform: uppercase;\n font-size: 1rem;\n margin: 0.5rem 1rem;\n color: #999999\n}\n\n.suggestion-list-container {\n width: 100%;\n height: 100%;\n max-height: 400px;\n overflow: auto;\n display: block;\n}\n\n.material-icons {\n font-family: 'Material Icons';\n font-weight: normal;\n font-style: normal;\n font-size: 24px;\n line-height: 1;\n letter-spacing: normal;\n text-transform: none;\n display: inline-block;\n white-space: nowrap;\n word-wrap: normal;\n direction: ltr;\n -webkit-font-feature-settings: 'liga';\n -webkit-font-smoothing: antialiased;\n}", + "styleUrl": "./suggestions.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "suggestionsService", + "type": "SuggestionsService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "cd", + "type": "ChangeDetectorRef", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "domSanitizer", + "type": "DomSanitizer", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 33, + "jsdoctags": [ + { + "name": "suggestionsService", + "type": "SuggestionsService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "cd", + "type": "ChangeDetectorRef", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "domSanitizer", + "type": "DomSanitizer", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": ["OnInit"], + "templateData": "

    {{title}}

    \n\n\n \n \n\n" + }, + { + "name": "SuggestionsListItemComponent", + "id": "component-SuggestionsListItemComponent-282c026954c1b876c736ba21b8887d9298d7bcb55120bf27d39d18fcdce64669d13d9c80c1dd01817d86a3b5355ea8264ded033d101ab1c2e170988268ebe16b", + "file": "libs/block-editor/src/lib/extensions/components/suggestions-list-item/suggestions-list-item.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dotcms-suggestions-list-item", + "styleUrls": ["./suggestions-list-item.component.scss"], + "styles": [], + "templateUrl": ["./suggestions-list-item.component.html"], + "viewProviders": [], + "inputsClass": [ + { + "name": "command", + "deprecated": false, + "deprecationMessage": "", + "line": 17, + "type": "function", + "decorators": [] + }, + { + "name": "index", + "deprecated": false, + "deprecationMessage": "", + "line": 15, + "type": "number", + "decorators": [] + }, + { + "name": "label", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "line": 18, + "type": "string", + "decorators": [] + }, + { + "name": "url", + "defaultValue": "''", + "deprecated": false, + "deprecationMessage": "", + "line": 19, + "type": "string", + "decorators": [] + } + ], + "outputsClass": [], + "propertiesClass": [ + { + "name": "icon", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 21 + }, + { + "name": "role", + "defaultValue": "'list-item'", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 11, + "decorators": [ + { + "name": "HostBinding", + "stringifiedArguments": "'attr.role'" + } + ] + }, + { + "name": "tabindex", + "defaultValue": "'-1'", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 12, + "decorators": [ + { + "name": "HostBinding", + "stringifiedArguments": "'attr.tabindex'" + } + ] + } + ], + "methodsClass": [ + { + "name": "alignToTop", + "args": [], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 71, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\n\nIf true, the top of the element will be aligned to the top of the visible area\nof the scrollable ancestorIf true, the top of the element will be aligned to\nthe top of the visible area of the scrollable ancestor.\n\n", + "description": "

    If true, the top of the element will be aligned to the top of the visible area\nof the scrollable ancestorIf true, the top of the element will be aligned to\nthe top of the visible area of the scrollable ancestor.

    \n", + "modifierKind": [121], + "jsdoctags": [ + { + "tagName": { + "pos": 1959, + "end": 1966, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "originalKeywordKind": 121, + "escapedText": "private" + }, + "comment": "" + }, + { + "tagName": { + "pos": 1975, + "end": 1981, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "originalKeywordKind": 105, + "escapedText": "return" + }, + "comment": "

    {boolean}

    \n", + "returnType": "" + } + ] + }, + { + "name": "focus", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 33, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "getLabel", + "args": [], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 29, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "isIntoView", + "args": [], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 55, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\n\nCheck if the element is a visible area\n\n", + "description": "

    Check if the element is a visible area

    \n", + "modifierKind": [121], + "jsdoctags": [ + { + "tagName": { + "pos": 1305, + "end": 1312, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "originalKeywordKind": 121, + "escapedText": "private" + }, + "comment": "" + }, + { + "tagName": { + "pos": 1321, + "end": 1327, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "originalKeywordKind": 105, + "escapedText": "return" + }, + "comment": "

    {boolean}

    \n", + "returnType": "" + } + ] + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 25, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "scrollIntoView", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 41, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "unfocus", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 37, + "deprecated": false, + "deprecationMessage": "" + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [ + { + "name": "attr.role", + "defaultValue": "'list-item'", + "deprecated": false, + "deprecationMessage": "", + "line": 11, + "type": "string", + "decorators": [] + }, + { + "name": "attr.tabindex", + "defaultValue": "'-1'", + "deprecated": false, + "deprecationMessage": "", + "line": 12, + "type": "string", + "decorators": [] + } + ], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, ElementRef, HostBinding, Input, OnInit } from '@angular/core';\n\nimport { FocusableOption } from '@angular/cdk/a11y';\n\n@Component({\n selector: 'dotcms-suggestions-list-item',\n templateUrl: './suggestions-list-item.component.html',\n styleUrls: ['./suggestions-list-item.component.scss'],\n})\nexport class SuggestionsListItemComponent implements FocusableOption, OnInit {\n @HostBinding('attr.role') role = 'list-item'\n @HostBinding('attr.tabindex') tabindex = '-1'\n\n @HostBinding('attr.data-index')\n @Input() index: number;\n\n @Input() command: () => void;\n @Input() label = '';\n @Input() url = '';\n\n icon = false;\n\n constructor(private element: ElementRef) { }\n\n ngOnInit() {\n this.icon = this.icon = typeof( this.url ) === 'string' && !(this.url.split('/').length > 1);\n }\n\n getLabel(): string {\n return this.element.nativeElement.innerText;\n }\n\n focus() {\n this.element.nativeElement.style = 'background: #eee';\n }\n\n unfocus() {\n this.element.nativeElement.style = '';\n }\n\n scrollIntoView() {\n if (!this.isIntoView()) {\n this.element.nativeElement.scrollIntoView(this.alignToTop());\n }\n }\n\n /**\n *\n * Check if the element is a visible area \n * \n * @private\n * @return {*} {boolean}\n * @memberof SuggestionsListItemComponent\n */\n private isIntoView(): boolean {\n const { bottom, top } = this.element.nativeElement.getBoundingClientRect();\n const containerRect = this.element.nativeElement.parentElement.getBoundingClientRect();\n return top >= containerRect.top && bottom <= containerRect.bottom;\n }\n\n /**\n *\n * If true, the top of the element will be aligned to the top of the visible area\n * of the scrollable ancestorIf true, the top of the element will be aligned to \n * the top of the visible area of the scrollable ancestor.\n *\n * @private\n * @return {*} {boolean}\n * @memberof SuggestionsListItemComponent\n */\n private alignToTop(): boolean {\n const { top } = this.element.nativeElement.getBoundingClientRect();\n const { top: containerTop} = this.element.nativeElement.parentElement.getBoundingClientRect();\n return top < containerTop;\n }\n\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"libs/dot-primeng-theme-styles/src/scss/variables\" as *;\n\n:host {\n box-sizing: border-box;\n display: flex;\n gap: $spacing-3;\n padding: 0.25rem 0.5rem;\n background-color: $white;\n cursor: pointer;\n align-items: center;\n &:hover {\n background: var($gray-hover, #eee) ;\n }\n}\n\n.icon-wrapper {\n align-items: center;\n border: solid 1px lightgrey;\n display: flex;\n flex-basis: 32px;\n flex-shrink: 0;\n height: 32px;\n justify-content: center;\n width: 32px;\n}\n", + "styleUrl": "./suggestions-list-item.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "element", + "type": "ElementRef", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 21, + "jsdoctags": [ + { + "name": "element", + "type": "ElementRef", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": ["FocusableOption", "OnInit"], + "templateData": "
    \n {{ url }}\n\n \n \"\"\n \n
    \n\n{{ label }}\n" + }, + { + "name": "ToastComponent", + "id": "component-ToastComponent-bdd5ea76a7dd6a461101c761f0edf906210789a3f624cc8927e120b97ee65f6403cafdf3464fb9952689b941423bc4907b3b5119794284b4cbe9b60e9106bae3", + "file": "apps/dotcms-ui/src/stories/primeng/messages/Toast.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "app-p-toast", + "styleUrls": [], + "styles": [], + "template": "\n\n\n\n

    \n \n

    \n

    \n \n

    \n

    \n \n

    \n

    \n \n

    \n", + "templateUrl": [], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [], + "methodsClass": [ + { + "name": "clear", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 120, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 28, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "onConfirm", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 112, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "onReject", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 116, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "showBottomCenter", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 76, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "showConfirm", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 84, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "showError", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 53, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "showInfo", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 39, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "showMultiple", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 95, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "showSticky", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 103, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "showSuccess", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 32, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "showTopCenter", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 68, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "showTopLeft", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 60, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "showWarn", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 46, + "deprecated": false, + "deprecationMessage": "" + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component } from '@angular/core';\nimport { MessageService } from 'primeng/api';\n\n@Component({\n selector: 'app-p-toast',\n template: `\n \n \n \n \n

    \n \n

    \n

    \n \n

    \n

    \n \n

    \n

    \n \n

    \n `\n})\nexport class ToastComponent {\n constructor(private messageService: MessageService) {}\n\n ngOnInit() {\n console.log('object');\n }\n\n showSuccess() {\n this.messageService.add({\n severity: 'success',\n detail: 'The action \"Publish\" was executed succesfully'\n });\n }\n\n showInfo() {\n this.messageService.add({\n severity: 'info',\n detail: 'Make sure you add the width of the element'\n });\n }\n\n showWarn() {\n this.messageService.add({\n severity: 'warn',\n detail: 'Make sure you add the width of the element'\n });\n }\n\n showError() {\n this.messageService.add({\n severity: 'error',\n detail: 'Something went wrong, please try again.'\n });\n }\n\n showTopLeft() {\n this.messageService.add({\n key: 'tl',\n severity: 'info',\n detail: 'Message Content'\n });\n }\n\n showTopCenter() {\n this.messageService.add({\n key: 'tc',\n severity: 'info',\n detail: 'Message Content'\n });\n }\n\n showBottomCenter() {\n this.messageService.add({\n key: 'bc',\n severity: 'info',\n detail: 'Message Content'\n });\n }\n\n showConfirm() {\n this.messageService.clear();\n this.messageService.add({\n key: 'c',\n sticky: true,\n severity: 'warn',\n summary: 'Are you sure?',\n detail: 'Confirm to proceed'\n });\n }\n\n showMultiple() {\n this.messageService.addAll([\n { severity: 'info', summary: 'Message 1', detail: 'Message Content' },\n { severity: 'info', summary: 'Message 2', detail: 'Message Content' },\n { severity: 'info', summary: 'Message 3', detail: 'Message Content' }\n ]);\n }\n\n showSticky() {\n this.messageService.add({\n severity: 'info',\n summary: 'Sticky',\n detail: 'Message Content',\n sticky: true\n });\n }\n\n onConfirm() {\n this.messageService.clear('c');\n }\n\n onReject() {\n this.messageService.clear('c');\n }\n\n clear() {\n this.messageService.clear();\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "messageService", + "type": "MessageService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 25, + "jsdoctags": [ + { + "name": "messageService", + "type": "MessageService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + }, + { + "name": "UiDotIconButtonComponent", + "id": "component-UiDotIconButtonComponent-d86923a4af08c7dd41de43fff638d6d457f0ae53772a7916302729ffd84b9edd88307acf04f021004e59617b369e9faabd8f4909c89984f9bcdb19fc41ec97ff", + "file": "apps/dotcms-ui/src/app/view/components/_common/dot-icon-button/dot-icon-button.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-icon-button", + "styleUrls": ["./dot-icon-button.component.scss"], + "styles": [], + "templateUrl": ["./dot-icon-button.component.html"], + "viewProviders": [], + "inputsClass": [ + { + "name": "disabled", + "deprecated": false, + "deprecationMessage": "", + "line": 16, + "type": "boolean", + "decorators": [] + }, + { + "name": "icon", + "deprecated": false, + "deprecationMessage": "", + "line": 19, + "type": "string", + "decorators": [] + }, + { + "name": "size", + "deprecated": false, + "deprecationMessage": "", + "line": 22, + "type": "number", + "decorators": [] + } + ], + "outputsClass": [], + "propertiesClass": [], + "methodsClass": [], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "

    The UiDotIconButtonComponent is a round button which\nreuses the dot-icon component

    \n", + "rawdescription": "\n\nThe UiDotIconButtonComponent is a round button which\nreuses the dot-icon component\n", + "type": "component", + "sourceCode": "import { Component, Input } from '@angular/core';\n\n/**\n * The UiDotIconButtonComponent is a round button which\n * reuses the dot-icon component\n * @export\n * @class UiDotIconButtonComponent\n */\n@Component({\n selector: 'dot-icon-button',\n styleUrls: ['./dot-icon-button.component.scss'],\n templateUrl: './dot-icon-button.component.html'\n})\nexport class UiDotIconButtonComponent {\n @Input()\n disabled?: boolean;\n\n @Input()\n icon: string;\n\n @Input()\n size: number;\n\n constructor() {}\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "@use \"variables\" as *;\n@import \"dotcms-theme/utils/theme-variables\";\n@import \"dotcms-theme/utils/mixins\";\n@import \"mixins\";\n\n#icon-button-tiny {\n height: 24px;\n width: 24px;\n\n ::ng-deep i {\n font-size: $md-icon-size-tiny;\n }\n}\n\n[tiny] :host {\n button {\n @extend #icon-button-tiny;\n }\n}\n\n:host {\n display: inline-block;\n\n &[float] {\n button {\n background-color: $brand-primary;\n border-radius: 50%;\n box-shadow: $md-shadow-1;\n\n &:hover {\n background-color: $brand-primary_mod;\n }\n }\n\n dot-icon {\n color: $white;\n }\n }\n\n &[big] button {\n ::ng-deep i {\n font-size: $md-icon-size-big;\n }\n }\n\n &[tiny] button {\n @extend #icon-button-tiny;\n }\n\n &[inverted] button {\n background-color: transparent;\n\n &:hover {\n background-color: rgba($white_rgb, 0.3);\n }\n\n ::ng-deep i {\n @include dot_icon_inverted;\n }\n }\n\n &[secondary] {\n button {\n @each $label, $props in $button-sec {\n @include button-properties($label, $props);\n }\n\n &:active ::ng-deep i {\n color: $brand-primary;\n }\n\n &:hover ::ng-deep i {\n color: $brand-primary;\n }\n\n ::ng-deep i {\n font-size: $md-icon-size-big;\n }\n }\n\n &[disabled=\"true\"] {\n button {\n border-color: $field-disabled-bgcolor;\n\n ::ng-deep i {\n color: $field-disabled-bgcolor;\n }\n }\n }\n }\n\n &[square] button {\n border-radius: $border-radius;\n }\n\n &[disabled=\"true\"] {\n pointer-events: none;\n\n button {\n pointer-events: none;\n background-color: transparent;\n\n &:hover {\n background-color: transparent;\n cursor: not-allowed;\n }\n\n ::ng-deep i {\n color: $field-disabled-bgcolor;\n }\n }\n }\n\n button {\n align-items: center;\n background: transparent;\n border-radius: 50%;\n border: none;\n color: $gray;\n cursor: pointer;\n display: inline-flex;\n justify-content: center;\n padding: 0.608rem; // 39x39 the defauld field height\n transition: background-color $field-animation-speed ease-in,\n box-shadow $field-animation-speed ease-in;\n\n &:focus {\n outline: 0;\n }\n\n &:hover {\n background-color: rgba($black, 0.07);\n }\n }\n}\n", + "styleUrl": "./dot-icon-button.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [], + "line": 22 + }, + "templateData": "\n" + }, + { + "name": "UiDotIconButtonTooltipComponent", + "id": "component-UiDotIconButtonTooltipComponent-121cbb63329abfde8b8b81830dc9df2628008b2c2dfca916c53c61f32bb06d483a6e1adced173ec6024602fc82dcc30596f1be0ea95c5df6a3b131ff7daddf04", + "file": "apps/dotcms-ui/src/app/view/components/_common/dot-icon-button-tooltip/dot-icon-button-tooltip.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-icon-button-tooltip", + "styleUrls": [], + "styles": [], + "template": "", + "templateUrl": [], + "viewProviders": [], + "inputsClass": [ + { + "name": "icon", + "deprecated": false, + "deprecationMessage": "", + "line": 13, + "type": "string", + "decorators": [] + }, + { + "name": "tooltipPosition", + "defaultValue": "'bottom'", + "deprecated": false, + "deprecationMessage": "", + "line": 19, + "type": "string", + "decorators": [] + }, + { + "name": "tooltipText", + "deprecated": false, + "deprecationMessage": "", + "line": 16, + "type": "string", + "decorators": [] + } + ], + "outputsClass": [], + "propertiesClass": [], + "methodsClass": [], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, Input } from '@angular/core';\n\n@Component({\n selector: 'dot-icon-button-tooltip',\n template: ``\n})\nexport class UiDotIconButtonTooltipComponent {\n @Input()\n icon: string;\n\n @Input()\n tooltipText: string;\n\n @Input()\n tooltipPosition = 'bottom';\n\n constructor() {}\n}\n", + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [], + "line": 19 + } + }, + { + "name": "ValuesPropertyComponent", + "id": "component-ValuesPropertyComponent-fc5885c4ebd9d3d5cb69d5a6c3ce809dc59edb3ad030570172b34d45aff14ddcd9900fb8ca06fa48ef14c8896fff9de299a5391e48eca67021f7536a3a685dbc", + "file": "apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/components/fields/content-type-fields-properties-form/field-properties/values-property/values-property.component.ts", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "dot-values-property", + "styleUrls": ["./values-property.component.scss"], + "styles": [], + "templateUrl": ["./values-property.component.html"], + "viewProviders": [], + "inputsClass": [], + "outputsClass": [], + "propertiesClass": [ + { + "name": "group", + "deprecated": false, + "deprecationMessage": "", + "type": "FormGroup", + "optional": false, + "description": "", + "line": 14 + }, + { + "name": "helpText", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 15 + }, + { + "name": "property", + "deprecated": false, + "deprecationMessage": "", + "type": "FieldProperty", + "optional": false, + "description": "", + "line": 13 + }, + { + "name": "validTextHelperClazz", + "defaultValue": "[\n 'com.dotcms.contenttype.model.field.ImmutableRadioField',\n 'com.dotcms.contenttype.model.field.ImmutableCheckboxField',\n 'com.dotcms.contenttype.model.field.ImmutableMultiSelectField',\n 'com.dotcms.contenttype.model.field.ImmutableSelectField'\n ]", + "deprecated": false, + "deprecationMessage": "", + "type": "[]", + "optional": false, + "description": "", + "line": 17, + "modifierKind": [121] + }, + { + "name": "value", + "deprecated": false, + "deprecationMessage": "", + "type": "DotTextareaContentComponent", + "optional": false, + "description": "", + "line": 12, + "decorators": [ + { + "name": "ViewChild", + "stringifiedArguments": "'value'" + } + ] + } + ], + "methodsClass": [ + { + "name": "isValidHelperClass", + "args": [], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 32, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nChecks if helper should show, based on the clazz property.\n\n", + "description": "

    Checks if helper should show, based on the clazz property.

    \n", + "jsdoctags": [ + { + "tagName": { + "pos": 1037, + "end": 1044, + "flags": 4227072, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "returns" + }, + "comment": "", + "returnType": "" + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, ViewChild } from '@angular/core';\nimport { FieldProperty } from '../field-properties.model';\nimport { FormGroup } from '@angular/forms';\nimport { DotTextareaContentComponent } from '@components/_common/dot-textarea-content/dot-textarea-content.component';\n\n@Component({\n selector: 'dot-values-property',\n templateUrl: './values-property.component.html',\n styleUrls: ['./values-property.component.scss']\n})\nexport class ValuesPropertyComponent {\n @ViewChild('value') value: DotTextareaContentComponent;\n property: FieldProperty;\n group: FormGroup;\n helpText: string;\n\n private validTextHelperClazz = [\n 'com.dotcms.contenttype.model.field.ImmutableRadioField',\n 'com.dotcms.contenttype.model.field.ImmutableCheckboxField',\n 'com.dotcms.contenttype.model.field.ImmutableMultiSelectField',\n 'com.dotcms.contenttype.model.field.ImmutableSelectField'\n ];\n\n constructor() {}\n\n /**\n * Checks if helper should show, based on the clazz property.\n *\n * @returns {Boolean}\n * @memberof ValuesPropertyComponent\n */\n isValidHelperClass(): boolean {\n return this.validTextHelperClazz.includes(this.property.field.clazz);\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": "dot-field-helper {\n position: absolute;\n top: -12px;\n right: 0;\n}\n", + "styleUrl": "./values-property.component.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [], + "line": 22 + }, + "templateData": "
    \n \n \n \n \n \n
    \n" + }, + { + "name": "VisitorsLocationComponent", + "id": "component-VisitorsLocationComponent-a2a42b77cd882f0adf6091b38f12948d18cbd0efc97900040839410141df176030d35d26cd0108cfd78d370718e74cf3afebc9e0a9e2c48c3905e06ad044825b", + "file": "libs/dot-rules/src/lib/custom-types/visitors-location/visitors-location.component.ts", + "changeDetection": "ChangeDetectionStrategy.OnPush", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [ + { + "name": "DecimalPipe", + "type": "pipe" + } + ], + "selector": "cw-visitors-location-component", + "styleUrls": [], + "styles": [], + "template": "
    \n \n \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n \n
    \n
    \n ", + "templateUrl": [], + "viewProviders": [], + "inputsClass": [ + { + "name": "changedHook", + "defaultValue": "0", + "deprecated": false, + "deprecationMessage": "", + "line": 84, + "type": "number", + "decorators": [] + }, + { + "name": "circle", + "defaultValue": "{ center: { lat: 38.89, lng: -77.04 }, radius: 10000 }", + "deprecated": false, + "deprecationMessage": "", + "line": 79, + "type": "GCircle", + "decorators": [] + }, + { + "name": "comparisonControl", + "deprecated": false, + "deprecationMessage": "", + "line": 81, + "type": "FormControl", + "decorators": [] + }, + { + "name": "comparisonOptions", + "deprecated": false, + "deprecationMessage": "", + "line": 82, + "type": "literal type[]", + "decorators": [] + }, + { + "name": "comparisonValue", + "deprecated": false, + "deprecationMessage": "", + "line": 80, + "type": "string", + "decorators": [] + }, + { + "name": "fromLabel", + "defaultValue": "'of'", + "deprecated": false, + "deprecationMessage": "", + "line": 83, + "type": "string", + "decorators": [] + }, + { + "name": "preferredUnit", + "defaultValue": "'m'", + "deprecated": false, + "deprecationMessage": "", + "line": 85, + "type": "string", + "decorators": [] + } + ], + "outputsClass": [ + { + "name": "areaChange", + "defaultValue": "new EventEmitter(false)", + "deprecated": false, + "deprecationMessage": "", + "line": 87, + "type": "EventEmitter" + }, + { + "name": "comparisonChange", + "defaultValue": "new EventEmitter(false)", + "deprecated": false, + "deprecationMessage": "", + "line": 88, + "type": "EventEmitter" + } + ], + "propertiesClass": [ + { + "name": "comparisonDropdown", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": false, + "description": "", + "line": 91 + }, + { + "name": "decimalPipe", + "deprecated": false, + "deprecationMessage": "", + "type": "DecimalPipe", + "optional": false, + "description": "", + "line": 93, + "modifierKind": [123] + }, + { + "name": "showingMap", + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 90 + } + ], + "methodsClass": [ + { + "name": "getLatLong", + "args": [], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 111, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "getRadiusInPreferredUnit", + "args": [], + "optional": false, + "returnType": "number", + "typeParameters": [], + "line": 119, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "ngOnChanges", + "args": [ + { + "name": "change", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 97, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "change", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "onUpdate", + "args": [ + { + "name": "circle", + "type": "GCircle", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 129, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "circle", + "type": "GCircle", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "toggleMap", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 125, + "deprecated": false, + "deprecationMessage": "" + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy } from '@angular/core';\nimport { DecimalPipe } from '@angular/common';\nimport { FormControl } from '@angular/forms';\nimport { LoggerService } from '@dotcms/dotcms-js';\nimport { GCircle } from '../../models/gcircle.model';\n\nconst UNITS = {\n km: {\n km: (len) => len,\n m: (len) => len * 1000,\n mi: (len) => len / 1.60934\n },\n m: {\n km: (len) => len / 1000,\n m: (len) => len,\n mi: (len) => len / 1609.34\n },\n mi: {\n km: (len) => len / 1.60934,\n m: (len) => len * 1609.34,\n mi: (len) => len\n }\n};\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [DecimalPipe],\n selector: 'cw-visitors-location-component',\n template: `\n \n \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n \n
    \n \n `\n})\nexport class VisitorsLocationComponent {\n @Input() circle: GCircle = { center: { lat: 38.89, lng: -77.04 }, radius: 10000 };\n @Input() comparisonValue: string;\n @Input() comparisonControl: FormControl;\n @Input() comparisonOptions: {}[];\n @Input() fromLabel = 'of';\n @Input() changedHook = 0;\n @Input() preferredUnit = 'm';\n\n @Output() areaChange: EventEmitter = new EventEmitter(false);\n @Output() comparisonChange: EventEmitter = new EventEmitter(false);\n\n showingMap = false;\n comparisonDropdown: any;\n\n constructor(public decimalPipe: DecimalPipe, private loggerService: LoggerService) {\n loggerService.info('VisitorsLocationComponent', 'constructor');\n }\n\n ngOnChanges(change): void {\n this.loggerService.info('VisitorsLocationComponent', 'ngOnChanges', change);\n\n if (change.comparisonOptions) {\n this.comparisonDropdown = {\n control: this.comparisonControl,\n name: 'comparison',\n options: this.comparisonOptions,\n placeholder: '',\n value: this.comparisonValue\n };\n }\n }\n\n getLatLong(): string {\n const lat = this.circle.center.lat;\n const lng = this.circle.center.lng;\n const latStr = this.decimalPipe.transform(parseFloat(lat + ''), '1.6-6');\n const lngStr = this.decimalPipe.transform(parseFloat(lng + ''), '1.6-6');\n return latStr + ', ' + lngStr;\n }\n\n getRadiusInPreferredUnit(): number {\n const r = this.circle.radius;\n this.loggerService.info('VisitorsLocationComponent', 'getRadiusInPreferredUnit', r);\n return UNITS.m[this.preferredUnit](r);\n }\n\n toggleMap(): void {\n this.showingMap = !this.showingMap;\n }\n\n onUpdate(circle: GCircle): void {\n this.showingMap = false;\n this.areaChange.emit(circle);\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "decimalPipe", + "type": "DecimalPipe", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "loggerService", + "type": "LoggerService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 91, + "jsdoctags": [ + { + "name": "decimalPipe", + "type": "DecimalPipe", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "loggerService", + "type": "LoggerService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + }, + { + "name": "VisitorsLocationContainer", + "id": "component-VisitorsLocationContainer-07d750ccd8e423821996f4b14b8fa93aca2f6dbb7ff7ea2b5dcf82bbbfec5c5d287490ce137fcf2d08b05a6e61172dc1ccfaac4f2051f2f171f9402f60857d10", + "file": "libs/dot-rules/src/lib/custom-types/visitors-location/visitors-location.container.ts", + "changeDetection": "ChangeDetectionStrategy.OnPush", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [ + { + "name": "DecimalPipe", + "type": "pipe" + } + ], + "selector": "cw-visitors-location-container", + "styleUrls": [], + "styles": [], + "template": "", + "templateUrl": [], + "viewProviders": [], + "inputsClass": [ + { + "name": "componentInstance", + "deprecated": false, + "deprecationMessage": "", + "line": 41, + "type": "ServerSideFieldModel", + "decorators": [] + } + ], + "outputsClass": [ + { + "name": "parameterValuesChange", + "defaultValue": "new EventEmitter(\n false\n )", + "deprecated": false, + "deprecationMessage": "", + "line": 44, + "type": "EventEmitter" + } + ], + "propertiesClass": [ + { + "name": "_rsrcCache", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type", + "optional": false, + "description": "", + "line": 63, + "modifierKind": [121] + }, + { + "name": "apiKey", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 52 + }, + { + "name": "circle$", + "defaultValue": "new BehaviorSubject({\n center: { lat: 38.89, lng: -77.04 },\n radius: 10000\n })", + "deprecated": false, + "deprecationMessage": "", + "type": "BehaviorSubject", + "optional": false, + "description": "", + "line": 48 + }, + { + "name": "comparisonControl", + "deprecated": false, + "deprecationMessage": "", + "type": "FormControl", + "optional": false, + "description": "", + "line": 59 + }, + { + "name": "comparisonOptions", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type[]", + "optional": false, + "description": "", + "line": 60 + }, + { + "name": "comparisonValue", + "defaultValue": "'within'", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 58 + }, + { + "name": "decimalPipe", + "deprecated": false, + "deprecationMessage": "", + "type": "DecimalPipe", + "optional": false, + "description": "", + "line": 67, + "modifierKind": [123] + }, + { + "name": "fromLabel", + "defaultValue": "'of'", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 61 + }, + { + "name": "lat", + "defaultValue": "0", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 55 + }, + { + "name": "lng", + "defaultValue": "0", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 56 + }, + { + "name": "preferredUnit", + "defaultValue": "'m'", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 53 + }, + { + "name": "radius", + "defaultValue": "50000", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 57 + }, + { + "name": "resources", + "deprecated": false, + "deprecationMessage": "", + "type": "I18nService", + "optional": false, + "description": "", + "line": 66, + "modifierKind": [123] + } + ], + "methodsClass": [ + { + "name": "ngOnChanges", + "args": [ + { + "name": "change", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 91, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "change", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "onComparisonChange", + "args": [ + { + "name": "value", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 127, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "value", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "onUpdate", + "args": [ + { + "name": "circle", + "type": "GCircle", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 131, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "circle", + "type": "GCircle", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "rsrc", + "args": [ + { + "name": "subkey", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 82, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "subkey", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy } from '@angular/core';\nimport { DecimalPipe } from '@angular/common';\nimport { FormControl } from '@angular/forms';\nimport { ServerSideFieldModel } from '../../services/ServerSideFieldModel';\nimport { Observable, BehaviorSubject } from 'rxjs';\nimport { I18nService } from '../.././services/system/locale/I18n';\nimport { LoggerService } from '@dotcms/dotcms-js';\nimport { GCircle } from '../../models/gcircle.model';\n\ninterface Param {\n key: string;\n priority?: number;\n value: T;\n}\n\ninterface VisitorsLocationParams {\n comparison: Param;\n latitude: Param;\n longitude: Param;\n radius: Param;\n preferredDisplayUnits: Param;\n}\n\nconst I8N_BASE = 'api.sites.ruleengine';\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [DecimalPipe],\n selector: 'cw-visitors-location-container',\n template: ` `\n})\nexport class VisitorsLocationContainer {\n @Input() componentInstance: ServerSideFieldModel;\n\n @Output()\n parameterValuesChange: EventEmitter<{ name: string; value: string }[]> = new EventEmitter(\n false\n );\n\n circle$: BehaviorSubject = new BehaviorSubject({\n center: { lat: 38.89, lng: -77.04 },\n radius: 10000\n });\n apiKey: string;\n preferredUnit = 'm';\n\n lat = 0;\n lng = 0;\n radius = 50000;\n comparisonValue = 'within';\n comparisonControl: FormControl;\n comparisonOptions: { value: string; label: Observable; icon: string }[];\n fromLabel = 'of';\n\n private _rsrcCache: { [key: string]: Observable };\n\n constructor(\n public resources: I18nService,\n public decimalPipe: DecimalPipe,\n private loggerService: LoggerService\n ) {\n resources.get(I8N_BASE).subscribe((_rsrc) => {});\n this._rsrcCache = {};\n\n this.circle$.subscribe(\n (_e) => {},\n (e) => {\n loggerService.error('VisitorsLocationContainer', 'Error updating area', e);\n },\n () => {}\n );\n }\n\n rsrc(subkey: string): Observable {\n let x = this._rsrcCache[subkey];\n if (!x) {\n x = this.resources.get(subkey);\n this._rsrcCache[subkey] = x;\n }\n return x;\n }\n\n ngOnChanges(change): void {\n if (change.componentInstance && this.componentInstance != null) {\n const temp: any = this.componentInstance.parameters;\n const params: VisitorsLocationParams = temp as VisitorsLocationParams;\n const comparisonDef = this.componentInstance.parameterDefs['comparison'];\n\n const opts = comparisonDef.inputType['options'];\n const i18nBaseKey = comparisonDef.i18nBaseKey || this.componentInstance.type.i18nKey;\n const rsrcKey = i18nBaseKey + '.inputs.comparison.';\n const optsAry = Object.keys(opts).map((key) => {\n const sOpt = opts[key];\n return {\n value: sOpt.value,\n label: this.rsrc(rsrcKey + sOpt.i18nKey),\n icon: sOpt.icon\n };\n });\n\n this.comparisonValue = params.comparison.value || comparisonDef.defaultValue;\n this.comparisonOptions = optsAry;\n this.comparisonControl = ServerSideFieldModel.createNgControl(\n this.componentInstance,\n 'comparison'\n );\n\n this.lat = parseFloat(params.latitude.value) || this.lat;\n this.lng = parseFloat(params.longitude.value) || this.lng;\n this.radius = parseFloat(params.radius.value) || 50000;\n this.preferredUnit =\n params.preferredDisplayUnits.value ||\n this.componentInstance.parameterDefs['preferredDisplayUnits'].defaultValue;\n\n this.circle$.next({ center: { lat: this.lat, lng: this.lng }, radius: this.radius });\n }\n }\n\n onComparisonChange(value: string): void {\n this.parameterValuesChange.emit([{ name: 'comparison', value }]);\n }\n\n onUpdate(circle: GCircle): void {\n this.loggerService.info('App', 'onUpdate', circle);\n this.parameterValuesChange.emit([\n { name: 'latitude', value: circle.center.lat + '' },\n { name: 'longitude', value: circle.center.lng + '' },\n { name: 'radius', value: circle.radius + '' }\n ]);\n\n this.lat = circle.center.lat;\n this.lng = circle.center.lng;\n this.radius = circle.radius;\n this.circle$.next(circle);\n }\n}\n", + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "resources", + "type": "I18nService", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "decimalPipe", + "type": "DecimalPipe", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "loggerService", + "type": "LoggerService", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 63, + "jsdoctags": [ + { + "name": "resources", + "type": "I18nService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "decimalPipe", + "type": "DecimalPipe", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "loggerService", + "type": "LoggerService", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + } + ], + "modules": [ + { + "name": "ActionHeaderModule", + "id": "module-ActionHeaderModule-be21f251452499e2af303fde67d8a5370880c2641a9de8c4f4f439b7bacfe0c5499dcc5f6b1d920792af12823d4167cf39576287fd7d26b11b59675951db77dd", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/dot-listing-data-table/action-header/action-header.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotActionButtonModule } from '../../_common/dot-action-button/dot-action-button.module';\nimport { ActionHeaderComponent } from './action-header.component';\nimport { SplitButtonModule } from 'primeng/splitbutton';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\n\n@NgModule({\n bootstrap: [],\n declarations: [ActionHeaderComponent],\n exports: [ActionHeaderComponent],\n imports: [CommonModule, DotActionButtonModule, SplitButtonModule, DotPipesModule],\n providers: []\n})\nexport class ActionHeaderModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "ActionHeaderComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotActionButtonModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "ActionHeaderComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "AppModule", + "id": "module-AppModule-a8629bf473fa47b0f924f73a855cc09ac2327708087a18f40b347f8dfd64c4b305d4028290e9f7162e749ef415d07d8de99cc0d5c1bdb03a2c02e6bb96a11df6", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcdn/src/app/app.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { BrowserAnimationsModule } from '@angular/platform-browser/animations';\nimport { BrowserModule } from '@angular/platform-browser';\nimport { InputTextModule } from 'primeng/inputtext';\nimport { DropdownModule } from 'primeng/dropdown';\nimport { AppComponent } from './app.component';\nimport {\n CoreWebService,\n DotcmsConfigService,\n DotcmsEventsService,\n DotEventsSocket,\n DotEventsSocketURL,\n LoggerService,\n LoginService,\n SiteService,\n StringUtils\n} from '@dotcms/dotcms-js';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { RouterModule } from '@angular/router';\nimport { HttpClientModule } from '@angular/common/http';\nimport { SkeletonModule } from 'primeng/skeleton';\nimport { TabViewModule } from 'primeng/tabview';\nimport { ChartModule } from 'primeng/chart';\nimport { InputTextareaModule } from 'primeng/inputtextarea';\nimport { ButtonModule } from 'primeng/button';\nimport { FormsModule } from '@angular/forms';\nimport { DotSpinnerModule, DotIconModule } from '@dotcms/ui';\nimport { DotCDNStore } from './dotcdn.component.store';\n\nconst dotEventSocketURLFactory = () => {\n return new DotEventsSocketURL(\n `${window.location.hostname}:${window.location.port}/api/ws/v1/system/events`,\n window.location.protocol === 'https:'\n );\n};\n\n@NgModule({\n declarations: [AppComponent],\n imports: [\n BrowserModule,\n InputTextModule,\n DropdownModule,\n BrowserAnimationsModule,\n HttpClientModule,\n RouterModule.forRoot([]),\n TabViewModule,\n ChartModule,\n InputTextareaModule,\n ButtonModule,\n DotIconModule,\n FormsModule,\n SkeletonModule,\n DotSpinnerModule,\n ReactiveFormsModule\n ],\n providers: [\n CoreWebService,\n LoggerService,\n StringUtils,\n SiteService,\n LoginService,\n DotEventsSocket,\n DotcmsEventsService,\n { provide: DotEventsSocketURL, useFactory: dotEventSocketURLFactory },\n DotcmsConfigService,\n DotCDNStore\n ],\n bootstrap: [AppComponent]\n})\nexport class AppModule {}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "CoreWebService" + }, + { + "name": "DotCDNStore" + }, + { + "name": "DotEventsSocket" + }, + { + "name": "DotcmsConfigService" + }, + { + "name": "DotcmsEventsService" + }, + { + "name": "LoggerService" + }, + { + "name": "LoginService" + }, + { + "name": "SiteService" + }, + { + "name": "StringUtils" + } + ] + }, + { + "type": "declarations", + "elements": [ + { + "name": "AppComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotIconModule" + }, + { + "name": "DotSpinnerModule" + } + ] + }, + { + "type": "exports", + "elements": [] + }, + { + "type": "bootstrap", + "elements": [ + { + "name": "AppComponent" + } + ] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "AppModule", + "id": "module-AppModule-811e934067e2f2709080480406efcb856a750101c7f5776adf4e7aec0b1b0716145a5ceeffd89c513e4194856a8908a5000eb7a8e133a677a023496754cbf7d7-1", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-block-editor/src/app/app.module.ts", + "methods": [ + { + "name": "ngDoBootstrap", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 34, + "deprecated": false, + "deprecationMessage": "" + } + ], + "sourceCode": "import { NgModule, Injector } from '@angular/core';\nimport { BrowserModule } from '@angular/platform-browser';\n\nimport { FormsModule } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\n\nimport { OrderListModule } from 'primeng/orderlist';\nimport { ListboxModule } from 'primeng/listbox';\n\nimport { DotBlockEditorComponent } from './dot-block-editor/dot-block-editor.component';\n\nimport { createCustomElement } from '@angular/elements';\nimport { AppComponent } from './app.component';\nimport { NgxTiptapModule } from '@dotcms/block-editor';\nimport { HttpClientModule } from '@angular/common/http';\n\n@NgModule({\n declarations: [AppComponent, DotBlockEditorComponent],\n imports: [\n BrowserModule,\n CommonModule,\n FormsModule,\n NgxTiptapModule,\n OrderListModule,\n ListboxModule,\n HttpClientModule\n ],\n providers: [],\n entryComponents: [DotBlockEditorComponent]\n})\nexport class AppModule {\n constructor(private injector: Injector) {}\n\n ngDoBootstrap() {\n const element = createCustomElement(DotBlockEditorComponent, {\n injector: this.injector\n });\n\n customElements.define('dotcms-block-editor', element);\n }\n}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "AppComponent" + }, + { + "name": "DotBlockEditorComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "NgxTiptapModule" + } + ] + }, + { + "type": "exports", + "elements": [] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "AppModule", + "id": "module-AppModule-47f30a73a0542fe2de92882f97da6114244801110403532c69e61cd34b4425723209986986d381c28bca366f7aed3a3de01420c2ec878c3a4089707b91f101d1-2", + "description": "

    AppModule is the main entry point into Angular2's bootstraping process

    \n", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/app.module.ts", + "methods": [], + "sourceCode": "import { CommonModule } from '@angular/common';\nimport { BrowserAnimationsModule } from '@angular/platform-browser/animations';\nimport { BrowserModule } from '@angular/platform-browser';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';\nimport { HttpClientModule } from '@angular/common/http';\n\n// App is our top level component\nimport { AppComponent } from './app.component';\nimport { AppRoutingModule } from './app-routing.module';\n\n/*\n * Custom Components\n */\nimport { COMPONENTS } from './components';\nimport { ENV_PROVIDERS } from './providers';\nimport { CUSTOM_MODULES, NGFACES_MODULES } from './modules';\nimport { SharedModule } from './shared/shared.module';\n\nimport { DotDirectivesModule } from './shared/dot-directives.module';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\nimport { MonacoEditorModule } from 'ngx-monaco-editor';\nimport { MarkdownModule } from 'ngx-markdown';\n\n/**\n * `AppModule` is the main entry point into Angular2's bootstraping process\n */\n@NgModule({\n bootstrap: [AppComponent],\n declarations: [AppComponent, ...COMPONENTS],\n imports: [\n ...CUSTOM_MODULES,\n ...NGFACES_MODULES,\n CommonModule,\n BrowserAnimationsModule,\n BrowserModule,\n FormsModule,\n HttpClientModule,\n ReactiveFormsModule,\n AppRoutingModule,\n DotDirectivesModule,\n DotPipesModule,\n SharedModule.forRoot(),\n MonacoEditorModule.forRoot(),\n MarkdownModule.forRoot()\n ],\n providers: [ENV_PROVIDERS],\n schemas: [CUSTOM_ELEMENTS_SCHEMA]\n})\nexport class AppModule {}\n\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "AppComponent" + }, + { + "name": "DotAlertConfirmComponent" + }, + { + "name": "DotLogOutContainerComponent" + }, + { + "name": "DotLoginPageComponent" + }, + { + "name": "GlobalSearchComponent" + }, + { + "name": "MainComponentLegacyComponent" + }, + { + "name": "MainCoreLegacyComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "AppRoutingModule" + }, + { + "name": "DotActionButtonModule" + }, + { + "name": "DotContentletEditorModule" + }, + { + "name": "DotDialogModule" + }, + { + "name": "DotDirectivesModule" + }, + { + "name": "DotDownloadBundleDialogModule" + }, + { + "name": "DotFieldValidationMessageModule" + }, + { + "name": "DotGenerateSecurePasswordModule" + }, + { + "name": "DotIconModule" + }, + { + "name": "DotLargeMessageDisplayModule" + }, + { + "name": "DotListingDataTableModule" + }, + { + "name": "DotMessageDisplayModule" + }, + { + "name": "DotPushPublishDialogModule" + }, + { + "name": "DotSiteSelectorModule" + }, + { + "name": "DotTextareaContentModule" + }, + { + "name": "DotToolbarModule" + }, + { + "name": "DotWizardModule" + }, + { + "name": "DotWorkflowTaskDetailModule" + }, + { + "name": "IFrameModule" + }, + { + "name": "SearchableDropDownModule" + }, + { + "name": "SharedModule" + }, + { + "name": "UiDotIconButtonModule" + } + ] + }, + { + "type": "exports", + "elements": [] + }, + { + "type": "bootstrap", + "elements": [ + { + "name": "AppComponent" + } + ] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "AppRoutingModule", + "id": "module-AppRoutingModule-8838d9bc0c8d3bbb20c4ea93b0c5e4cd498202c3c925dfa841e36d1fc524a345145889157e0404842b96ee28a2618a6984021aa6a25afe46306efd8c0357db13", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/app-routing.module.ts", + "methods": [], + "sourceCode": "import { Routes, RouterModule, RouteReuseStrategy } from '@angular/router';\nimport { NgModule } from '@angular/core';\nimport { MainCoreLegacyComponent } from '@components/main-core-legacy/main-core-legacy-component';\nimport { MainComponentLegacyComponent } from '@components/main-legacy/main-legacy.component';\n\nimport { DotLogOutContainerComponent } from '@components/login/dot-logout-container-component/dot-log-out-container';\nimport { IframePortletLegacyComponent } from '@components/_common/iframe/iframe-porlet-legacy/index';\nimport { AuthGuardService } from '@services/guards/auth-guard.service';\nimport { ContentletGuardService } from '@services/guards/contentlet-guard.service';\nimport { DefaultGuardService } from '@services/guards/default-guard.service';\nimport { MenuGuardService } from '@services/guards/menu-guard.service';\nimport { PublicAuthGuardService } from '@services/guards/public-auth-guard.service';\nimport { DotLoginPageComponent } from '@components/login/main/dot-login-page.component';\nimport { DotLoginPageResolver } from '@components/login/dot-login-page-resolver.service';\nimport { DotIframePortletLegacyResolver } from '@components/_common/iframe/service/dot-iframe-porlet-legacy-resolver.service';\nimport { DotCustomReuseStrategyService } from '@shared/dot-custom-reuse-strategy/dot-custom-reuse-strategy.service';\n\nconst PORTLETS_ANGULAR = [\n {\n canActivate: [MenuGuardService],\n canActivateChild: [MenuGuardService],\n path: 'templates',\n loadChildren: () =>\n import('@portlets/dot-templates/dot-templates.module').then((m) => m.DotTemplatesModule)\n },\n {\n canActivate: [MenuGuardService],\n canActivateChild: [MenuGuardService],\n path: 'content-types-angular',\n data: {\n reuseRoute: false\n },\n loadChildren: () =>\n import('@portlets/dot-content-types/dot-content-types.module').then(\n (m) => m.DotContentTypesModule\n )\n },\n {\n canActivate: [MenuGuardService],\n canActivateChild: [MenuGuardService],\n path: 'forms',\n loadChildren: () =>\n import('@portlets/dot-form-builder/dot-form-builder.module').then(\n (m) => m.DotFormBuilderModule\n ),\n data: {\n filterBy: 'FORM'\n }\n },\n {\n canActivate: [MenuGuardService],\n canActivateChild: [MenuGuardService],\n path: 'rules',\n loadChildren: () =>\n import('@portlets/dot-rules/dot-rules.module').then((m) => m.DotRulesModule)\n },\n {\n canActivate: [MenuGuardService],\n canActivateChild: [MenuGuardService],\n path: 'dot-browser',\n loadChildren: () =>\n import('@portlets/dot-site-browser/dot-site-browser.module').then(\n (m) => m.DotSiteBrowserModule\n )\n },\n {\n // canActivate: [MenuGuardService],\n // canActivateChild: [MenuGuardService],\n path: 'starter',\n loadChildren: () =>\n import('@portlets/dot-starter/dot-starter.module').then((m) => m.DotStarterModule)\n },\n {\n canActivate: [MenuGuardService],\n canActivateChild: [MenuGuardService],\n path: 'apps',\n loadChildren: () =>\n import('@portlets/dot-apps/dot-apps.module').then((m) => m.DotAppsModule)\n },\n {\n path: 'notLicensed',\n loadChildren: () =>\n import('@components/not-licensed/not-licensed.module').then((m) => m.NotLicensedModule)\n },\n {\n path: 'edit-page',\n loadChildren: () =>\n import('@portlets/dot-edit-page/dot-edit-page.module').then((m) => m.DotEditPageModule)\n },\n {\n canActivate: [MenuGuardService],\n path: '',\n children: []\n }\n];\nconst PORTLETS_IFRAME = [\n {\n canActivateChild: [MenuGuardService],\n path: 'c',\n children: [\n {\n component: IframePortletLegacyComponent,\n path: ':id',\n children: [\n {\n loadChildren: () =>\n import(\n '@components/dot-contentlet-editor/dot-contentlet-editor.routing.module'\n ).then((m) => m.DotContentletEditorRoutingModule),\n path: 'new'\n },\n {\n loadChildren: () =>\n import('@portlets/dot-porlet-detail/dot-portlet-detail.module').then(\n (m) => m.DotPortletDetailModule\n ),\n path: ':asset'\n }\n ],\n resolve: {\n canAccessPortlet: DotIframePortletLegacyResolver\n }\n },\n {\n path: '',\n children: []\n }\n ]\n },\n {\n canActivateChild: [ContentletGuardService],\n path: 'add',\n children: [\n {\n component: IframePortletLegacyComponent,\n path: ':id'\n },\n {\n path: '',\n children: []\n }\n ]\n }\n];\n\nconst appRoutes: Routes = [\n {\n canActivate: [PublicAuthGuardService],\n path: 'public',\n component: DotLoginPageComponent,\n resolve: {\n loginFormInfo: DotLoginPageResolver\n },\n loadChildren: () =>\n \"import('@components/login/dot-login-page.module').then((m) => m.DotLoginPageModule)\"\n },\n {\n canActivate: [AuthGuardService],\n children: [\n {\n path: 'rules',\n loadChildren: () =>\n \"import('@portlets/dot-rules/dot-rules.module').then((m) => m.DotRulesModule)\",\n canActivate: [AuthGuardService]\n }\n ],\n component: MainCoreLegacyComponent,\n path: 'fromCore'\n },\n {\n component: DotLogOutContainerComponent,\n path: 'logout'\n },\n {\n canActivate: [AuthGuardService],\n component: MainComponentLegacyComponent,\n children: [{\n canActivateChild: [MenuGuardService],\n path: 'c',\n children: [\n {\n component: IframePortletLegacyComponent,\n path: ':id',\n children: [\n {\n loadChildren: () =>\n \"import(\\\n '@components/dot-contentlet-editor/dot-contentlet-editor.routing.module'\\\n ).then((m) => m.DotContentletEditorRoutingModule)\",\n path: 'new'\n },\n {\n loadChildren: () =>\n \"import('@portlets/dot-porlet-detail/dot-portlet-detail.module').then(\\\n (m) => m.DotPortletDetailModule\\\n )\",\n path: ':asset'\n }\n ],\n resolve: {\n canAccessPortlet: DotIframePortletLegacyResolver\n }\n },\n {\n path: '',\n children: []\n }\n ]\n }, {\n canActivateChild: [ContentletGuardService],\n path: 'add',\n children: [\n {\n component: IframePortletLegacyComponent,\n path: ':id'\n },\n {\n path: '',\n children: []\n }\n ]\n },\n {\n canActivate: [MenuGuardService],\n canActivateChild: [MenuGuardService],\n path: 'templates',\n loadChildren: () =>\n \"import('@portlets/dot-templates/dot-templates.module').then((m) => m.DotTemplatesModule)\"\n },\n {\n canActivate: [MenuGuardService],\n canActivateChild: [MenuGuardService],\n path: 'content-types-angular',\n data: {\n reuseRoute: false\n },\n loadChildren: () =>\n \"import('@portlets/dot-content-types/dot-content-types.module').then(\\\n (m) => m.DotContentTypesModule\\\n )\"\n },\n {\n canActivate: [MenuGuardService],\n canActivateChild: [MenuGuardService],\n path: 'forms',\n loadChildren: () =>\n \"import('@portlets/dot-form-builder/dot-form-builder.module').then(\\\n (m) => m.DotFormBuilderModule\\\n )\",\n data: {\n filterBy: 'FORM'\n }\n },\n {\n canActivate: [MenuGuardService],\n canActivateChild: [MenuGuardService],\n path: 'rules',\n loadChildren: () =>\n \"import('@portlets/dot-rules/dot-rules.module').then((m) => m.DotRulesModule)\"\n },\n {\n canActivate: [MenuGuardService],\n canActivateChild: [MenuGuardService],\n path: 'dot-browser',\n loadChildren: () =>\n \"import('@portlets/dot-site-browser/dot-site-browser.module').then(\\\n (m) => m.DotSiteBrowserModule\\\n )\"\n },\n {\n // canActivate: [MenuGuardService],\n // canActivateChild: [MenuGuardService],\n path: 'starter',\n loadChildren: () =>\n \"import('@portlets/dot-starter/dot-starter.module').then((m) => m.DotStarterModule)\"\n },\n {\n canActivate: [MenuGuardService],\n canActivateChild: [MenuGuardService],\n path: 'apps',\n loadChildren: () =>\n \"import('@portlets/dot-apps/dot-apps.module').then((m) => m.DotAppsModule)\"\n },\n {\n path: 'notLicensed',\n loadChildren: () =>\n \"import('@components/not-licensed/not-licensed.module').then((m) => m.NotLicensedModule)\"\n },\n {\n path: 'edit-page',\n loadChildren: () =>\n \"import('@portlets/dot-edit-page/dot-edit-page.module').then((m) => m.DotEditPageModule)\"\n },\n {\n canActivate: [MenuGuardService],\n path: '',\n children: []\n }\n ],\n path: ''\n },\n {\n canActivate: [DefaultGuardService],\n path: '**',\n children: []\n }\n];\n\n@NgModule({\n exports: [RouterModule],\n imports: [\n RouterModule.forRoot(appRoutes, {\n useHash: true,\n onSameUrlNavigation: 'reload'\n })\n ],\n providers: [{ provide: RouteReuseStrategy, useClass: DotCustomReuseStrategyService }]\n})\nexport class AppRoutingModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "AppRulesModule", + "id": "module-AppRulesModule-bb9ca01d8ab390fbf5b11d5c50a7afa0cdec13edc109ddd308422acbc5f093ae58f8ef2e2f1f8ca1dc50c70a3735055bec93d0ecb7894f8bd16b785a615fcc8f", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "libs/dot-rules/src/lib/app.module.ts", + "methods": [], + "sourceCode": "import { BrowserModule } from '@angular/platform-browser';\nimport { NgModule } from '@angular/core';\nimport { RouterModule } from '@angular/router';\n\nimport { RuleEngineModule } from './rule-engine.module';\n\n@NgModule({\n declarations: [],\n imports: [\n BrowserModule,\n RuleEngineModule,\n RouterModule.forRoot([], {\n useHash: true\n })\n ],\n providers: [],\n exports: [],\n bootstrap: []\n})\nexport class AppRulesModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [] + }, + { + "type": "imports", + "elements": [ + { + "name": "RuleEngineModule" + } + ] + }, + { + "type": "exports", + "elements": [] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "ContentTypeFieldsAddRowModule", + "id": "module-ContentTypeFieldsAddRowModule-39952ed5942580ac416ca57f2dbc5c342d16efd8fc76a03bfe617aa8357974c811a9be6fea493ae7ebafca77e3d43ca7658c882dcc6ef2df576554cc23ef93f2", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/components/fields/content-type-fields-add-row/content-type-fields-add-row.module.ts", + "methods": [], + "sourceCode": "import { SplitButtonModule } from 'primeng/splitbutton';\nimport { ContentTypeFieldsAddRowComponent } from './content-type-fields-add-row.component';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { UiDotIconButtonModule } from '@components/_common/dot-icon-button/dot-icon-button.module';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\nimport { ButtonModule } from 'primeng/button';\nimport { TooltipModule } from 'primeng/tooltip';\n\n@NgModule({\n declarations: [ContentTypeFieldsAddRowComponent],\n exports: [ContentTypeFieldsAddRowComponent],\n imports: [\n CommonModule,\n ButtonModule,\n TooltipModule,\n UiDotIconButtonModule,\n SplitButtonModule,\n DotPipesModule\n ]\n})\nexport class ContentTypeFieldsAddRowModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "ContentTypeFieldsAddRowComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "UiDotIconButtonModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "ContentTypeFieldsAddRowComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotActionButtonModule", + "id": "module-DotActionButtonModule-64610cda31b08e62e4b6f06ce132eff867f10e71e56f0af592933734da660505b741a6c0019be2826d49e4ab2a1a830696a19656ba495a3c8697656327305085", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/_common/dot-action-button/dot-action-button.module.ts", + "methods": [], + "sourceCode": "import { DotActionButtonComponent } from './dot-action-button.component';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { UiDotIconButtonModule } from '../dot-icon-button/dot-icon-button.module';\nimport { ButtonModule } from 'primeng/button';\nimport { MenuModule } from 'primeng/menu';\n\n@NgModule({\n declarations: [DotActionButtonComponent],\n exports: [DotActionButtonComponent],\n imports: [CommonModule, ButtonModule, MenuModule, UiDotIconButtonModule]\n})\nexport class DotActionButtonModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotActionButtonComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "UiDotIconButtonModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotActionButtonComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotActionMenuButtonModule", + "id": "module-DotActionMenuButtonModule-2478e4108fbda1ba9c4b86a34a422d856edfba789d9166815d58c6e237c6f5a87c29b5c970c300961d69a01dea47f47f439a2547bec8cba14d69604ba1c95946", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/_common/dot-action-menu-button/dot-action-menu-button.module.ts", + "methods": [], + "sourceCode": "import { DotActionMenuButtonComponent } from './dot-action-menu-button.component';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { SplitButtonModule } from 'primeng/splitbutton';\nimport { DotMenuModule } from '../dot-menu/dot-menu.module';\nimport { UiDotIconButtonTooltipModule } from '../dot-icon-button-tooltip/dot-icon-button-tooltip.module';\n\n@NgModule({\n declarations: [DotActionMenuButtonComponent],\n exports: [DotActionMenuButtonComponent],\n imports: [CommonModule, SplitButtonModule, UiDotIconButtonTooltipModule, DotMenuModule]\n})\nexport class DotActionMenuButtonModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotActionMenuButtonComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotMenuModule" + }, + { + "name": "UiDotIconButtonTooltipModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotActionMenuButtonComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotAddPersonaDialogModule", + "id": "module-DotAddPersonaDialogModule-48646b46a3c633fb6aa82cd1c0ed19d307cff900a46a78225c9b5551e19145f172425e32ef4f08f2b3a57f28f78a3a574c3a01ffa7737c8de6a38df2dbfe5ac2", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/dot-add-persona-dialog/dot-add-persona-dialog.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotAddPersonaDialogComponent } from '@components/dot-add-persona-dialog/dot-add-persona-dialog.component';\nimport { DotCreatePersonaFormModule } from '@components/dot-add-persona-dialog/dot-create-persona-form/dot-create-persona-form.module';\nimport { DotDialogModule } from '@components/dot-dialog/dot-dialog.module';\nimport { DotWorkflowActionsFireService } from '@services/dot-workflow-actions-fire/dot-workflow-actions-fire.service';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\n\n@NgModule({\n imports: [CommonModule, DotCreatePersonaFormModule, DotDialogModule, DotPipesModule],\n providers: [DotWorkflowActionsFireService],\n declarations: [DotAddPersonaDialogComponent],\n exports: [DotAddPersonaDialogComponent]\n})\nexport class DotAddPersonaDialogModule {}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "DotWorkflowActionsFireService" + } + ] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotAddPersonaDialogComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotCreatePersonaFormModule" + }, + { + "name": "DotDialogModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotAddPersonaDialogComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotAddToBundleModule", + "id": "module-DotAddToBundleModule-602bde789c28b2801845352254ceb83bf2ae4057258502cae58a2733ce889da10ae2b784f1e9b01855a46d7f617b944c32c0b5acbff9b103d97ecea41324667a", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/_common/dot-add-to-bundle/dot-add-to-bundle.module.ts", + "methods": [], + "sourceCode": "import { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { DotFieldValidationMessageModule } from '../dot-field-validation-message/dot-file-validation-message.module';\nimport { DotAddToBundleComponent } from './dot-add-to-bundle.component';\nimport { AddToBundleService } from '@services/add-to-bundle/add-to-bundle.service';\nimport { DotCurrentUserService } from '@services/dot-current-user/dot-current-user.service';\nimport { DotDialogModule } from '@components/dot-dialog/dot-dialog.module';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\nimport { ButtonModule } from 'primeng/button';\nimport { DropdownModule } from 'primeng/dropdown';\n\n@NgModule({\n declarations: [DotAddToBundleComponent],\n exports: [DotAddToBundleComponent],\n imports: [\n CommonModule,\n ButtonModule,\n FormsModule,\n DotDialogModule,\n ReactiveFormsModule,\n DropdownModule,\n DotFieldValidationMessageModule,\n DotPipesModule\n ],\n providers: [AddToBundleService, DotCurrentUserService]\n})\nexport class DotAddToBundleModule {}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "AddToBundleService" + }, + { + "name": "DotCurrentUserService" + } + ] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotAddToBundleComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotDialogModule" + }, + { + "name": "DotFieldValidationMessageModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotAddToBundleComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotApiLinkModule", + "id": "module-DotApiLinkModule-7eff866e616f04fc3d85ad16f18ad65a969499e7453b325919bc81d7240a6f644dbec67c4fd767705a3e1356bc2612942c2dcc585cb3455207ebbefbf607ad67", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/dot-api-link/dot-api-link.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotApiLinkComponent } from './dot-api-link.component';\n\n@NgModule({\n imports: [CommonModule],\n declarations: [DotApiLinkComponent],\n exports: [DotApiLinkComponent]\n})\nexport class DotApiLinkModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotApiLinkComponent" + } + ] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotApiLinkComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotAppsCardModule", + "id": "module-DotAppsCardModule-80fc2c85097b5b6561e886d46b79aa96d1a55a6842fe77b59c52b578676e3848453ac3de911ffd5d5d4520da42890574eaa56156a258cef0aa60d5fba70b7d08", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-list/dot-apps-card/dot-apps-card.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { DotAppsCardComponent } from './dot-apps-card.component';\nimport { DotAvatarModule } from '@components/_common/dot-avatar/dot-avatar.module';\nimport { DotIconModule } from '@dotcms/ui';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\n\nimport { CardModule } from 'primeng/card';\nimport { TooltipModule } from 'primeng/tooltip';\nimport { MarkdownModule } from 'ngx-markdown';\n\n@NgModule({\n imports: [\n CommonModule,\n CardModule,\n DotAvatarModule,\n DotIconModule,\n MarkdownModule.forChild(),\n TooltipModule,\n DotPipesModule\n ],\n declarations: [DotAppsCardComponent],\n exports: [DotAppsCardComponent]\n})\nexport class DotAppsCardModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotAppsCardComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotAvatarModule" + }, + { + "name": "DotIconModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotAppsCardComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotAppsConfigurationDetailFormModule", + "id": "module-DotAppsConfigurationDetailFormModule-04024c220cdc88700a25141657ca12a14f95f9ac805b9a9af3095fe62bc3402340054c787409a45ea4fac3d512ad70303457eebee15b7127367c69165e263b50", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration-detail/dot-apps-configuration-detail-form/dot-apps-configuration-detail-form.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { DotAppsConfigurationDetailFormComponent } from './dot-apps-configuration-detail-form.component';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { DotIconModule } from '@dotcms/ui';\n\nimport { CheckboxModule } from 'primeng/checkbox';\nimport { DropdownModule } from 'primeng/dropdown';\nimport { InputTextareaModule } from 'primeng/inputtextarea';\nimport { InputTextModule } from 'primeng/inputtext';\nimport { TooltipModule } from 'primeng/tooltip';\nimport { MarkdownModule } from 'ngx-markdown';\nimport { ButtonModule } from 'primeng/button';\n\n@NgModule({\n imports: [\n ButtonModule,\n CheckboxModule,\n CommonModule,\n DotIconModule,\n DropdownModule,\n InputTextareaModule,\n InputTextModule,\n ReactiveFormsModule,\n TooltipModule,\n MarkdownModule.forChild()\n ],\n declarations: [DotAppsConfigurationDetailFormComponent],\n exports: [DotAppsConfigurationDetailFormComponent],\n providers: []\n})\nexport class DotAppsConfigurationDetailFormModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotAppsConfigurationDetailFormComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotIconModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotAppsConfigurationDetailFormComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotAppsConfigurationDetailModule", + "id": "module-DotAppsConfigurationDetailModule-32537061b0ccc4de3d231ec3fdd5f72ed9374a21f8fe0b91468afbda2eca3e735580c28cbbbe577dedef14bdd14f5fd50804cf87a9354a9e4b0895e4f20cbbc3", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration-detail/dot-apps-configuration-detail.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ButtonModule } from 'primeng/button';\n\nimport { DotAppsConfigurationDetailComponent } from './dot-apps-configuration-detail.component';\nimport { DotAppsService } from '@services/dot-apps/dot-apps.service';\nimport { DotAppsConfigurationDetailResolver } from './dot-apps-configuration-detail-resolver.service';\nimport { DotCopyButtonModule } from '@components/dot-copy-button/dot-copy-button.module';\nimport { DotAppsConfigurationDetailFormModule } from './dot-apps-configuration-detail-form/dot-apps-configuration-detail-form.module';\nimport { DotKeyValueModule } from '@components/dot-key-value-ng/dot-key-value-ng.module';\nimport { DotAppsConfigurationHeaderModule } from '../dot-apps-configuration-header/dot-apps-configuration-header.module';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\n\n@NgModule({\n imports: [\n ButtonModule,\n CommonModule,\n DotKeyValueModule,\n DotCopyButtonModule,\n DotAppsConfigurationHeaderModule,\n DotAppsConfigurationDetailFormModule,\n DotPipesModule\n ],\n declarations: [DotAppsConfigurationDetailComponent],\n exports: [DotAppsConfigurationDetailComponent],\n providers: [DotAppsService, DotAppsConfigurationDetailResolver]\n})\nexport class DotAppsConfigurationDetailModule {}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "DotAppsService" + } + ] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotAppsConfigurationDetailComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotAppsConfigurationDetailFormModule" + }, + { + "name": "DotAppsConfigurationHeaderModule" + }, + { + "name": "DotCopyButtonModule" + }, + { + "name": "DotKeyValueModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotAppsConfigurationDetailComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotAppsConfigurationHeaderModule", + "id": "module-DotAppsConfigurationHeaderModule-63b7a00c4a6058dc3be66f0c0b6ed245104d974e7bea17d380e42d26591eef94a36d9bf1d7dda52c01f9a1cb82808d954e0dd6ce983c01c253133cdf087d94cd", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration-header/dot-apps-configuration-header.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { DotAppsConfigurationHeaderComponent } from './dot-apps-configuration-header.component';\nimport { DotCopyLinkModule } from '@components/dot-copy-link/dot-copy-link.module';\nimport { DotAvatarModule } from '@components/_common/dot-avatar/dot-avatar.module';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\nimport { MarkdownModule } from 'ngx-markdown';\n\n@NgModule({\n imports: [\n CommonModule,\n DotAvatarModule,\n DotCopyLinkModule,\n DotPipesModule,\n MarkdownModule.forChild()\n ],\n declarations: [DotAppsConfigurationHeaderComponent],\n exports: [DotAppsConfigurationHeaderComponent]\n})\nexport class DotAppsConfigurationHeaderModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotAppsConfigurationHeaderComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotAvatarModule" + }, + { + "name": "DotCopyLinkModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotAppsConfigurationHeaderComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotAppsConfigurationItemModule", + "id": "module-DotAppsConfigurationItemModule-8801306b120afc4c5482cab6ba5d5c6ab4291d1ef2d7bb3ba920530becf07b62f4f7e344c4c2c20454d1bef1133dfe7b3aa1a9e6cd47af5397bf51dfb323974e", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration/dot-apps-configuration-list/dot-apps-configuration-item/dot-apps-configuration-item.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { DotAppsConfigurationItemComponent } from './dot-apps-configuration-item.component';\nimport { UiDotIconButtonModule } from '@components/_common/dot-icon-button/dot-icon-button.module';\nimport { DotIconModule } from '@dotcms/ui';\nimport { TooltipModule } from 'primeng/tooltip';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\nimport { DotCopyLinkModule } from '@dotcms/app/view/components/dot-copy-link/dot-copy-link.module';\n\n@NgModule({\n imports: [\n CommonModule,\n UiDotIconButtonModule,\n DotCopyLinkModule,\n DotIconModule,\n TooltipModule,\n DotPipesModule\n ],\n declarations: [DotAppsConfigurationItemComponent],\n exports: [DotAppsConfigurationItemComponent]\n})\nexport class DotAppsConfigurationItemModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotAppsConfigurationItemComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotCopyLinkModule" + }, + { + "name": "DotIconModule" + }, + { + "name": "UiDotIconButtonModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotAppsConfigurationItemComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotAppsConfigurationListModule", + "id": "module-DotAppsConfigurationListModule-587bf9b92dfccff3cb9573e153d46fe7afc62fc6d52fec4adce5472ce5c16bd9c3363401c35cff3ca9ec1bc582e821f2d0ba03404950fc7f427252fbcc62d7b9", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration/dot-apps-configuration-list/dot-apps-configuration-list.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ButtonModule } from 'primeng/button';\n\nimport { DotAppsConfigurationListComponent } from './dot-apps-configuration-list.component';\nimport { DotAppsConfigurationItemModule } from './dot-apps-configuration-item/dot-apps-configuration-item.module';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\n\n@NgModule({\n imports: [ButtonModule, CommonModule, DotAppsConfigurationItemModule, DotPipesModule],\n declarations: [DotAppsConfigurationListComponent],\n exports: [DotAppsConfigurationListComponent]\n})\nexport class DotAppsConfigurationListModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotAppsConfigurationListComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotAppsConfigurationItemModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotAppsConfigurationListComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotAppsConfigurationModule", + "id": "module-DotAppsConfigurationModule-ceff9f3b5a611f4c83680918dc6405c630290adc450adb486e7915d53a5ad46962a25f3efad6230285888cd8a81a8bec4e638b4b4684718c0ad13e9a1e6b3991", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration/dot-apps-configuration.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { DotAppsConfigurationComponent } from './dot-apps-configuration.component';\nimport { DotAppsService } from '@services/dot-apps/dot-apps.service';\nimport { DotAppsConfigurationResolver } from './dot-apps-configuration-resolver.service';\nimport { DotAvatarModule } from '@components/_common/dot-avatar/dot-avatar.module';\nimport { DotActionButtonModule } from '@components/_common/dot-action-button/dot-action-button.module';\nimport { DotCopyButtonModule } from '@components/dot-copy-button/dot-copy-button.module';\nimport { DotAppsConfigurationListModule } from './dot-apps-configuration-list/dot-apps-configuration-list.module';\nimport { DotAppsConfigurationHeaderModule } from '../dot-apps-configuration-header/dot-apps-configuration-header.module';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\n\nimport { InputTextModule } from 'primeng/inputtext';\nimport { ButtonModule } from 'primeng/button';\nimport { MarkdownModule } from 'ngx-markdown';\nimport { DotDialogModule } from '@components/dot-dialog/dot-dialog.module';\nimport { DotAppsImportExportDialogModule } from '../dot-apps-import-export-dialog/dot-apps-import-export-dialog.module';\n\n@NgModule({\n imports: [\n InputTextModule,\n ButtonModule,\n CommonModule,\n DotAvatarModule,\n DotActionButtonModule,\n DotCopyButtonModule,\n DotAppsConfigurationHeaderModule,\n DotAppsConfigurationListModule,\n DotAppsImportExportDialogModule,\n DotDialogModule,\n DotPipesModule,\n MarkdownModule.forChild()\n ],\n declarations: [DotAppsConfigurationComponent],\n exports: [DotAppsConfigurationComponent],\n providers: [DotAppsService, DotAppsConfigurationResolver]\n})\nexport class DotAppsConfigurationModule {}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "DotAppsService" + } + ] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotAppsConfigurationComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotActionButtonModule" + }, + { + "name": "DotAppsConfigurationHeaderModule" + }, + { + "name": "DotAppsConfigurationListModule" + }, + { + "name": "DotAppsImportExportDialogModule" + }, + { + "name": "DotAvatarModule" + }, + { + "name": "DotCopyButtonModule" + }, + { + "name": "DotDialogModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotAppsConfigurationComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotAppsImportExportDialogModule", + "id": "module-DotAppsImportExportDialogModule-ec5c3ab9a88451594c293c61ef8ea6baba46236fb576effcac3bc398f653336e090c90c262b89a9dc931ab13a8cb391eae27062b7d08d507f5eae2f9ba7400fd", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-import-export-dialog/dot-apps-import-export-dialog.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { DotAppsService } from '@services/dot-apps/dot-apps.service';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\n\nimport { InputTextModule } from 'primeng/inputtext';\nimport { DotDialogModule } from '@components/dot-dialog/dot-dialog.module';\nimport { DotAutofocusModule } from '@directives/dot-autofocus/dot-autofocus.module';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { DotAppsImportExportDialogComponent } from './dot-apps-import-export-dialog.component';\nimport { PasswordModule } from 'primeng/password';\n\n@NgModule({\n imports: [\n InputTextModule,\n CommonModule,\n PasswordModule,\n DotDialogModule,\n DotAutofocusModule,\n ReactiveFormsModule,\n DotPipesModule\n ],\n declarations: [DotAppsImportExportDialogComponent],\n exports: [DotAppsImportExportDialogComponent],\n providers: [DotAppsService]\n})\nexport class DotAppsImportExportDialogModule {}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "DotAppsService" + } + ] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotAppsImportExportDialogComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotAutofocusModule" + }, + { + "name": "DotDialogModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotAppsImportExportDialogComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotAppsListModule", + "id": "module-DotAppsListModule-a7b91bbb748ca52cc1d50b34b41db84cacdece6a00bb88275ad676d7a93b35f04d5efab9cf9d771409f64e9e229e3f051ce7177c91b6fb9c9b1f9b217eed2c3b", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-list/dot-apps-list.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { InputTextModule } from 'primeng/inputtext';\n\nimport { DotAppsListComponent } from './dot-apps-list.component';\nimport { DotAppsCardModule } from './dot-apps-card/dot-apps-card.module';\nimport { DotAppsService } from '@services/dot-apps/dot-apps.service';\nimport { DotAppsListResolver } from './dot-apps-list-resolver.service';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\nimport { NotLicensedModule } from '@components/not-licensed/not-licensed.module';\nimport { ButtonModule } from 'primeng/button';\nimport { DotAppsImportExportDialogModule } from '../dot-apps-import-export-dialog/dot-apps-import-export-dialog.module';\nimport { DotIconModule } from '@dotcms/ui';\n\n@NgModule({\n imports: [\n InputTextModule,\n CommonModule,\n ButtonModule,\n DotAppsCardModule,\n DotPipesModule,\n DotAppsImportExportDialogModule,\n NotLicensedModule,\n DotIconModule\n ],\n declarations: [DotAppsListComponent],\n exports: [DotAppsListComponent],\n providers: [DotAppsService, DotAppsListResolver]\n})\nexport class DotAppsListModule {}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "DotAppsService" + } + ] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotAppsListComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotAppsCardModule" + }, + { + "name": "DotAppsImportExportDialogModule" + }, + { + "name": "DotIconModule" + }, + { + "name": "NotLicensedModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotAppsListComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotAppsModule", + "id": "module-DotAppsModule-5b90addc0bb605fb4b9dd80a868b97f9fe8b0007a6aad999ee16ff97b82c772f2a6be90e95afd9c33d30d9bb015a1c70dfbeca968ca1423b5da22ee6ef58c3a2", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\n\nimport { DotAppsRoutingModule } from './dot-apps-routing.module';\nimport { DotAppsListModule } from './dot-apps-list/dot-apps-list.module';\nimport { DotAppsConfigurationModule } from './dot-apps-configuration/dot-apps-configuration.module';\nimport { DotAppsConfigurationDetailModule } from '@portlets/dot-apps/dot-apps-configuration-detail/dot-apps-configuration-detail.module';\n\n@NgModule({\n imports: [\n DotAppsListModule,\n DotAppsConfigurationModule,\n DotAppsConfigurationDetailModule,\n DotAppsRoutingModule\n ]\n})\nexport class DotAppsModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotAppsConfigurationDetailModule" + }, + { + "name": "DotAppsConfigurationModule" + }, + { + "name": "DotAppsListModule" + }, + { + "name": "DotAppsRoutingModule" + } + ] + }, + { + "type": "exports", + "elements": [] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotAppsRoutingModule", + "id": "module-DotAppsRoutingModule-6f06ab114808a910c5d66d08e8a51eca756ea6db3da6ff7ea0318c38f9766a8f9953f57248fd47310dfffec9af71f0495c7d79f81dbe5822650ec5f7018e444d", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-routing.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\nimport { DotAppsListComponent } from './dot-apps-list/dot-apps-list.component';\nimport { DotAppsListResolver } from './dot-apps-list/dot-apps-list-resolver.service';\nimport { DotAppsConfigurationComponent } from './dot-apps-configuration/dot-apps-configuration.component';\nimport { DotAppsConfigurationResolver } from './dot-apps-configuration/dot-apps-configuration-resolver.service';\nimport { DotAppsConfigurationDetailComponent } from '@portlets/dot-apps/dot-apps-configuration-detail/dot-apps-configuration-detail.component';\nimport { DotAppsConfigurationDetailResolver } from '@portlets/dot-apps/dot-apps-configuration-detail/dot-apps-configuration-detail-resolver.service';\n\nconst routes: Routes = [\n {\n component: DotAppsConfigurationDetailComponent,\n path: ':appKey/create/:id',\n resolve: {\n data: DotAppsConfigurationDetailResolver\n }\n },\n {\n component: DotAppsConfigurationDetailComponent,\n path: ':appKey/edit/:id',\n resolve: {\n data: DotAppsConfigurationDetailResolver\n }\n },\n {\n component: DotAppsConfigurationComponent,\n path: ':appKey',\n resolve: {\n data: DotAppsConfigurationResolver\n }\n },\n {\n path: '',\n component: DotAppsListComponent,\n resolve: {\n dotAppsListResolverData: DotAppsListResolver\n }\n }\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class DotAppsRoutingModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotAutocompleteTagsModule", + "id": "module-DotAutocompleteTagsModule-9f5c0a98f45ba3249c1eb7068bce89c5fd6247ba076d413396e7a8ea77dd35d4e7000a83f00ef48e3d6ec14c1929aa2bd0bd83d5cea49300da0cddf28dca4ff1", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "libs/dot-rules/src/lib/components/dot-autocomplete-tags/dot-autocomplete-tags.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotAutocompleteTagsComponent } from './dot-autocomplete-tags.component';\nimport { FormsModule } from '@angular/forms';\n\nimport { AutoCompleteModule } from 'primeng/autocomplete';\nimport { ChipsModule } from 'primeng/chips';\n\n@NgModule({\n imports: [CommonModule, ChipsModule, AutoCompleteModule, FormsModule],\n declarations: [DotAutocompleteTagsComponent],\n exports: [DotAutocompleteTagsComponent, ChipsModule]\n})\nexport class DotAutocompleteTagsModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotAutocompleteTagsComponent" + } + ] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotAutocompleteTagsComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotAutocompleteTagsModule", + "id": "module-DotAutocompleteTagsModule-c89f4802ec8fb1f7208919b7e40bb8d5ebe1e5179813b038867461dba777df64225a48663f5338936f7ee70b2d257595381633dd7c339638e33d731432ce7007-1", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/_common/dot-autocomplete-tags/dot-autocomplete-tags.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotAutocompleteTagsComponent } from './dot-autocomplete-tags.component';\nimport { FormsModule } from '@angular/forms';\nimport { DotTagsService } from '@services/dot-tags/dot-tags.service';\nimport { DotIconModule } from '@dotcms/ui';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\nimport { ChipsModule } from 'primeng/chips';\nimport { AutoCompleteModule } from 'primeng/autocomplete';\n\n@NgModule({\n imports: [\n CommonModule,\n ChipsModule,\n AutoCompleteModule,\n FormsModule,\n DotIconModule,\n DotPipesModule\n ],\n declarations: [DotAutocompleteTagsComponent],\n providers: [DotTagsService],\n exports: [DotAutocompleteTagsComponent, ChipsModule]\n})\nexport class DotAutocompleteTagsModule {}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "DotTagsService" + } + ] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotAutocompleteTagsComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotIconModule" + } + ] + }, + { + "type": "exports", + "elements": [] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotAutofocusModule", + "id": "module-DotAutofocusModule-1c717962e3f729b3c4ec2e247e0abc2d3836d3c8d8662346021431e6d025ad3fb8946b9fd50465b0226e3b6d53d22ebc7657f5111ef93bca3b315df81fc91e35", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "libs/dot-rules/src/lib/directives/dot-autofocus/dot-autofocus.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotAutofocusDirective } from './dot-autofocus.directive';\n\n@NgModule({\n imports: [CommonModule],\n declarations: [DotAutofocusDirective],\n exports: [DotAutofocusDirective]\n})\nexport class DotAutofocusModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotAutofocusDirective" + } + ] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotAutofocusDirective" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotAutofocusModule", + "id": "module-DotAutofocusModule-75b218519f682f3e6b3a2bc0db65cbb28f4515a2a89b1fd82b58460d2750abd3bac83be2ac366b78f59203c56b1e9373fcee443abad5cc3624b6e71f3eb57855-1", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/directives/dot-autofocus/dot-autofocus.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotAutofocusDirective } from '@directives/dot-autofocus/dot-autofocus.directive';\n\n@NgModule({\n imports: [CommonModule],\n declarations: [DotAutofocusDirective],\n exports: [DotAutofocusDirective]\n})\nexport class DotAutofocusModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotAutofocusDirective" + } + ] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotAutofocusDirective" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotAvatarModule", + "id": "module-DotAvatarModule-3471a77a9fe0b1ed38df93f87eb91e31fc2a407462863810a2b5998b12e6f2aa3dc1890de6860fdf77209338f7cda93258753e80d9cb4f5c1bf629647d9da489", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/_common/dot-avatar/dot-avatar.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotAvatarComponent } from './dot-avatar.component';\n\n@NgModule({\n imports: [CommonModule],\n declarations: [DotAvatarComponent],\n exports: [DotAvatarComponent]\n})\nexport class DotAvatarModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotAvatarComponent" + } + ] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotAvatarComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotBaseTypeSelectorModule", + "id": "module-DotBaseTypeSelectorModule-56bf5d4e323041723867009819e37fe1716a914d9d183afb64c67abbf228b2933d8e725f18609611f1c80b9c026c7068dc9841fbaeb9e712fb8791266bff53e3", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/dot-base-type-selector/dot-base-type-selector.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DropdownModule } from 'primeng/dropdown';\nimport { FormsModule } from '@angular/forms';\nimport { DotBaseTypeSelectorComponent } from './dot-base-type-selector.component';\n\n@NgModule({\n imports: [CommonModule, DropdownModule, FormsModule],\n declarations: [DotBaseTypeSelectorComponent],\n exports: [DotBaseTypeSelectorComponent]\n})\nexport class DotBaseTypeSelectorModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotBaseTypeSelectorComponent" + } + ] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotBaseTypeSelectorComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotBulkInformationModule", + "id": "module-DotBulkInformationModule-60c7e7cd0d191a67ef25cad99c0a8fedaa2d3cd2bd9a058c2d5fd84a4952a1ce8be7c5e589e714eefe297560259d3cb826300e03dc1f03d9263cb1c9fad67afd", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/_common/dot-bulk-information/dot-bulk-information.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotBulkInformationComponent } from '@components/_common/dot-bulk-information/dot-bulk-information.component';\nimport { DotMessagePipeModule } from '@pipes/dot-message/dot-message-pipe.module';\n\n@NgModule({\n imports: [CommonModule, DotMessagePipeModule],\n exports: [DotBulkInformationComponent],\n declarations: [DotBulkInformationComponent]\n})\nexport class DotBulkInformationModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotBulkInformationComponent" + } + ] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotBulkInformationComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotCommentAndAssignFormModule", + "id": "module-DotCommentAndAssignFormModule-1a5ad37dfe143d2ae2f6eb3d2d6fd2610dc03b034a1656e34bcd243ed8032f339d1a1eaf845c45ec72a07c9f423a7c6cb7acfd4d0ad10f50cd42e3617165ed6c", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/_common/forms/dot-comment-and-assign-form/dot-comment-and-assign-form.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotCommentAndAssignFormComponent } from '@components/_common/forms/dot-comment-and-assign-form/dot-comment-and-assign-form.component';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\nimport { DropdownModule } from 'primeng/dropdown';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { DotRolesService } from '@services/dot-roles/dot-roles.service';\nimport { InputTextareaModule } from 'primeng/inputtextarea';\nimport { DotPageSelectorModule } from '@components/_common/dot-page-selector/dot-page-selector.module';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n DotPipesModule,\n InputTextareaModule,\n DropdownModule,\n DotPageSelectorModule\n ],\n declarations: [DotCommentAndAssignFormComponent],\n exports: [DotCommentAndAssignFormComponent],\n providers: [DotRolesService]\n})\nexport class DotCommentAndAssignFormModule {}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "DotRolesService" + } + ] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotCommentAndAssignFormComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotPageSelectorModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotCommentAndAssignFormComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotContainerReferenceModule", + "id": "module-DotContainerReferenceModule-60f48cb563d03c41ad22f891ae12ca4657d6d61783c88b32b78e9e2d82a010735514296a99934f5fb6766419ede04538c159a401801872173c18efd40a6d35d1", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/directives/dot-container-reference/dot-container-reference.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotContainerReferenceDirective } from '@directives/dot-container-reference/dot-container-reference.directive';\n\n@NgModule({\n imports: [CommonModule],\n declarations: [DotContainerReferenceDirective],\n exports: [DotContainerReferenceDirective]\n})\nexport class DotContainerReferenceModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotContainerReferenceDirective" + } + ] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotContainerReferenceDirective" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotContainerSelectorLayoutModule", + "id": "module-DotContainerSelectorLayoutModule-f3e55e4117257b2cf2a05cf52dbc6327b67a8247abc2b2bce6aa8fc0a2ed3c190d4b7a77ab36b0052d96adfbc9e75d22da665699008dd2bdd655333bd203af9f", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/dot-container-selector-layout/dot-container-selector-layout.module.ts", + "methods": [], + "sourceCode": "import { ButtonModule } from 'primeng/button';\nimport { SearchableDropDownModule } from '../_common/searchable-dropdown/searchable-dropdown.module';\nimport { FormsModule } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\nimport { DotContainerSelectorLayoutComponent } from './dot-container-selector-layout.component';\nimport { NgModule } from '@angular/core';\nimport { PaginatorService } from '@services/paginator';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\nimport { UiDotIconButtonModule } from '@components/_common/dot-icon-button/dot-icon-button.module';\nimport { DotContainerSelectorModule } from '@components/dot-container-selector/dot-container-selector.module';\n\n@NgModule({\n declarations: [DotContainerSelectorLayoutComponent],\n exports: [DotContainerSelectorLayoutComponent],\n imports: [\n CommonModule,\n FormsModule,\n ButtonModule,\n SearchableDropDownModule,\n DotPipesModule,\n UiDotIconButtonModule,\n DotContainerSelectorModule\n ],\n providers: [PaginatorService]\n})\nexport class DotContainerSelectorLayoutModule {}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "PaginatorService" + } + ] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotContainerSelectorLayoutComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotContainerSelectorModule" + }, + { + "name": "SearchableDropDownModule" + }, + { + "name": "UiDotIconButtonModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotContainerSelectorLayoutComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotContainerSelectorModule", + "id": "module-DotContainerSelectorModule-044338478ccf13d27f52be698f85811e6c93d66fe3efe4a3f6ed256047a98cf1af46d1f74457fee6add013b4f18ae816119114ff0a9c355183d07f64b85071f7", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/dot-container-selector/dot-container-selector.module.ts", + "methods": [], + "sourceCode": "import { ButtonModule } from 'primeng/button';\nimport { SearchableDropDownModule } from '../_common/searchable-dropdown/searchable-dropdown.module';\nimport { FormsModule } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\nimport { DotContainerSelectorComponent } from './dot-container-selector.component';\nimport { NgModule } from '@angular/core';\nimport { PaginatorService } from '@services/paginator';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\nimport { UiDotIconButtonModule } from '@components/_common/dot-icon-button/dot-icon-button.module';\n\n@NgModule({\n declarations: [DotContainerSelectorComponent],\n exports: [DotContainerSelectorComponent],\n imports: [\n CommonModule,\n FormsModule,\n ButtonModule,\n SearchableDropDownModule,\n DotPipesModule,\n UiDotIconButtonModule\n ],\n providers: [PaginatorService]\n})\nexport class DotContainerSelectorModule {}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "PaginatorService" + } + ] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotContainerSelectorComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "SearchableDropDownModule" + }, + { + "name": "UiDotIconButtonModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotContainerSelectorComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotContentletEditorModule", + "id": "module-DotContentletEditorModule-d81270ba8fc2c04ee22d655b8e83ed2df0e23cde09d4fe4d52433adefd511ed13e2e3e024f14598cf69ff5f338fd625d799966b82945d80f5153bb5b8454b1a4", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/dot-contentlet-editor/dot-contentlet-editor.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotAddContentletComponent } from './components/dot-add-contentlet/dot-add-contentlet.component';\nimport { DotCreateContentletComponent } from './components/dot-create-contentlet/dot-create-contentlet.component';\nimport { DotEditContentletComponent } from './components/dot-edit-contentlet/dot-edit-contentlet.component';\nimport { DotIframeDialogModule } from '../dot-iframe-dialog/dot-iframe-dialog.module';\nimport { DotContentletEditorService } from './services/dot-contentlet-editor.service';\nimport { DotContentletWrapperComponent } from './components/dot-contentlet-wrapper/dot-contentlet-wrapper.component';\nimport { DotReorderMenuComponent } from './components/dot-reorder-menu/dot-reorder-menu.component';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\nimport { DotCreateContentletResolver } from './components/dot-create-contentlet/dot-create-contentlet.resolver.service';\n\n@NgModule({\n imports: [CommonModule, DotIframeDialogModule, DotPipesModule],\n declarations: [\n DotAddContentletComponent,\n DotContentletWrapperComponent,\n DotCreateContentletComponent,\n DotEditContentletComponent,\n DotReorderMenuComponent\n ],\n exports: [\n DotEditContentletComponent,\n DotAddContentletComponent,\n DotCreateContentletComponent,\n DotReorderMenuComponent\n ],\n providers: [DotContentletEditorService, DotCreateContentletResolver]\n})\nexport class DotContentletEditorModule {}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "DotContentletEditorService" + } + ] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotAddContentletComponent" + }, + { + "name": "DotContentletWrapperComponent" + }, + { + "name": "DotCreateContentletComponent" + }, + { + "name": "DotEditContentletComponent" + }, + { + "name": "DotReorderMenuComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotIframeDialogModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotAddContentletComponent" + }, + { + "name": "DotCreateContentletComponent" + }, + { + "name": "DotEditContentletComponent" + }, + { + "name": "DotReorderMenuComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotContentletEditorRoutingModule", + "id": "module-DotContentletEditorRoutingModule-64f18f543918caa488360bde66c00cb18c3f8babffabd0ef68482016b2b3c96ee7f7fe1427a9c21115f319e255885bb4e66ac1f72812fd92f116923945b51bde", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/dot-contentlet-editor/dot-contentlet-editor.routing.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\nimport { DotCreateContentletComponent } from './components/dot-create-contentlet/dot-create-contentlet.component';\nimport { DotCreateContentletResolver } from './components/dot-create-contentlet/dot-create-contentlet.resolver.service';\n\nconst routes: Routes = [\n {\n component: DotCreateContentletComponent,\n path: ':contentType',\n resolve: {\n url: DotCreateContentletResolver\n }\n },\n {\n path: '',\n redirectTo: '/c/content'\n }\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class DotContentletEditorRoutingModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotContentletsModule", + "id": "module-DotContentletsModule-c53b2ce2b3de1808eb85e5e9d24584bfce3cf7ce670bd6d4efe16031e05faf7660208bcb08e5dc8930fb0693a580ff4d18f0e6bcde11be817d4e7737d911c80e", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/dot-porlet-detail/dot-contentlets/dot-contentlets.module.ts", + "methods": [], + "sourceCode": "import { DotContentletsComponent } from './dot-contentlets.component';\nimport { NgModule } from '@angular/core';\nimport { DotContentletEditorModule } from '@components/dot-contentlet-editor/dot-contentlet-editor.module';\n\n@NgModule({\n declarations: [DotContentletsComponent],\n imports: [DotContentletEditorModule],\n exports: [DotContentletsComponent],\n providers: []\n})\nexport class DotContentletsModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotContentletsComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotContentletEditorModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotContentletsComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotContentTypeFieldsVariablesModule", + "id": "module-DotContentTypeFieldsVariablesModule-af53583ba39764543d35e7caad5e2208862a994549cb2e643b23b78d64c8e1aff1bd66de9942b3aac07ace70f154d434b498936b5f56662223578ca3883d9ac6", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/components/fields/dot-content-type-fields-variables/dot-content-type-fields-variables.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { DotFieldVariablesService } from './services/dot-field-variables.service';\nimport { DotContentTypeFieldsVariablesComponent } from './dot-content-type-fields-variables.component';\nimport { DotKeyValueModule } from '@components/dot-key-value-ng/dot-key-value-ng.module';\n\n@NgModule({\n imports: [DotKeyValueModule],\n exports: [DotContentTypeFieldsVariablesComponent],\n providers: [DotFieldVariablesService],\n declarations: [DotContentTypeFieldsVariablesComponent]\n})\nexport class DotContentTypeFieldsVariablesModule {}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "DotFieldVariablesService" + } + ] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotContentTypeFieldsVariablesComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotKeyValueModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotContentTypeFieldsVariablesComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotContentTypesEditModule", + "id": "module-DotContentTypesEditModule-31d41cd605e1f10dc5d1a1f37e8b2ea8f90061500153bebbd3a03a3222ff4dc8944a7f7567ee3a4786582bdee9bf1ceb4d1ecddced06083e24409ead3f2d2079", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/dot-content-types-edit.module.ts", + "methods": [], + "sourceCode": "import {\n CheckboxPropertyComponent,\n NamePropertyComponent,\n CategoriesPropertyComponent,\n DataTypePropertyComponent,\n DefaultValuePropertyComponent,\n HintPropertyComponent,\n RegexCheckPropertyComponent,\n ValuesPropertyComponent\n} from '@portlets/shared/dot-content-types-edit/components/fields/content-type-fields-properties-form/field-properties';\nimport {\n ContentTypeFieldsDropZoneComponent,\n ContentTypesFieldsListComponent,\n ContentTypeFieldsRowComponent,\n ContentTypeFieldsTabComponent,\n ContentTypeFieldsAddRowModule,\n ContentTypeFieldsPropertiesFormComponent,\n ContentTypesFieldDragabbleItemComponent\n} from '@portlets/shared/dot-content-types-edit/components/fields';\nimport {\n FieldDragDropService,\n FieldPropertyService,\n FieldService\n} from '@portlets/shared/dot-content-types-edit/components/fields/service';\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotContentTypesEditComponent } from './dot-content-types-edit.component';\nimport { ContentTypesLayoutComponent } from './components/layout/content-types-layout.component';\nimport { ContentTypesFormComponent } from './components/form/content-types-form.component';\nimport { DotApiLinkModule } from '@components/dot-api-link/dot-api-link.module';\nimport { DotCopyLinkModule } from '@components/dot-copy-link/dot-copy-link.module';\nimport { DotMenuModule } from '@components/_common/dot-menu/dot-menu.module';\nimport { DotDialogModule } from '@components/dot-dialog/dot-dialog.module';\nimport { IFrameModule } from '@components/_common/iframe';\nimport { DotFieldValidationMessageModule } from '@components/_common/dot-field-validation-message/dot-file-validation-message.module';\nimport { SiteSelectorFieldModule } from '@components/_common/dot-site-selector-field/dot-site-selector-field.module';\nimport { DotWorkflowsSelectorFieldModule } from '@components/_common/dot-workflows-selector-field/dot-workflows-selector-field.module';\nimport { DotWorkflowsActionsSelectorFieldModule } from '@components/_common/dot-workflows-actions-selector-field/dot-workflows-actions-selector-field.module';\nimport { DotPageSelectorModule } from '@components/_common/dot-page-selector/dot-page-selector.module';\nimport { DotFieldHelperModule } from '@components/dot-field-helper/dot-field-helper.module';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { DotContentTypeFieldsVariablesModule } from '@portlets/shared/dot-content-types-edit/components/fields/dot-content-type-fields-variables/dot-content-type-fields-variables.module';\nimport { DragulaModule, DragulaService } from 'ng2-dragula';\nimport { UiDotIconButtonTooltipModule } from '@components/_common/dot-icon-button-tooltip/dot-icon-button-tooltip.module';\nimport { DotIconModule } from '@dotcms/ui';\nimport { DynamicFieldPropertyDirective } from '@portlets/shared/dot-content-types-edit/components/fields/content-type-fields-properties-form/field-properties/dynamic-field-property-directive/dynamic-field-property.directive';\nimport { DotContentTypesEditRoutingModule } from './dot-content-types-edit-routing.module';\nimport { SearchableDropDownModule } from '@components/_common/searchable-dropdown';\nimport { DotTextareaContentModule } from '@components/_common/dot-textarea-content/dot-textarea-content.module';\nimport { DotAddToBundleModule } from '@components/_common/dot-add-to-bundle';\nimport { DotBaseTypeSelectorModule } from '@components/dot-base-type-selector';\nimport { DotDirectivesModule } from '@shared/dot-directives.module';\nimport { UiDotIconButtonModule } from '@components/_common/dot-icon-button/dot-icon-button.module';\nimport { DotRelationshipsModule } from '@portlets/shared/dot-content-types-edit/components/fields/content-type-fields-properties-form/field-properties/dot-relationships-property/dot-relationships.module';\nimport { DotMaxlengthModule } from '@directives/dot-maxlength/dot-maxlength.module';\nimport { DotAutofocusModule } from '@directives/dot-autofocus/dot-autofocus.module';\nimport { DotContentTypesInfoService } from '@services/dot-content-types-info';\nimport { DotWorkflowService } from '@services/dot-workflow/dot-workflow.service';\nimport { DotSecondaryToolbarModule } from '@components/dot-secondary-toolbar';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\nimport { ButtonModule } from 'primeng/button';\nimport { CheckboxModule } from 'primeng/checkbox';\nimport { ConfirmDialogModule } from 'primeng/confirmdialog';\nimport { DialogModule } from 'primeng/dialog';\nimport { DropdownModule } from 'primeng/dropdown';\nimport { InputTextModule } from 'primeng/inputtext';\nimport { MultiSelectModule } from 'primeng/multiselect';\nimport { OverlayPanelModule } from 'primeng/overlaypanel';\nimport { RadioButtonModule } from 'primeng/radiobutton';\nimport { SplitButtonModule } from 'primeng/splitbutton';\nimport { TabViewModule } from 'primeng/tabview';\nimport { DotRelationshipTreeModule } from '@components/dot-relationship-tree/dot-relationship-tree.module';\nimport { DotPortletBoxModule } from '@components/dot-portlet-base/components/dot-portlet-box/dot-portlet-box.module';\nimport { DotMdIconSelectorModule } from '@dotcms/app/view/components/_common/dot-md-icon-selector/dot-md-icon-selector.module';\n\n@NgModule({\n declarations: [\n CategoriesPropertyComponent,\n CheckboxPropertyComponent,\n ContentTypesFieldDragabbleItemComponent,\n ContentTypeFieldsDropZoneComponent,\n ContentTypeFieldsPropertiesFormComponent,\n ContentTypeFieldsRowComponent,\n ContentTypeFieldsTabComponent,\n ContentTypesFieldsListComponent,\n ContentTypesFormComponent,\n ContentTypesLayoutComponent,\n DataTypePropertyComponent,\n DefaultValuePropertyComponent,\n DotContentTypesEditComponent,\n DynamicFieldPropertyDirective,\n HintPropertyComponent,\n NamePropertyComponent,\n RegexCheckPropertyComponent,\n ValuesPropertyComponent\n ],\n exports: [DotContentTypesEditComponent],\n entryComponents: [\n CategoriesPropertyComponent,\n CheckboxPropertyComponent,\n DataTypePropertyComponent,\n DefaultValuePropertyComponent,\n HintPropertyComponent,\n NamePropertyComponent,\n RegexCheckPropertyComponent,\n ValuesPropertyComponent\n ],\n imports: [\n ButtonModule,\n CheckboxModule,\n ConfirmDialogModule,\n CommonModule,\n ContentTypeFieldsAddRowModule,\n DialogModule,\n DotAddToBundleModule,\n DotApiLinkModule,\n DotAutofocusModule,\n DotBaseTypeSelectorModule,\n DotContentTypeFieldsVariablesModule,\n DotContentTypesEditRoutingModule,\n DotCopyLinkModule,\n DotDialogModule,\n DotDirectivesModule,\n DotPipesModule,\n DotSecondaryToolbarModule,\n DotFieldHelperModule,\n DotFieldValidationMessageModule,\n UiDotIconButtonModule,\n UiDotIconButtonTooltipModule,\n DotIconModule,\n DotMaxlengthModule,\n DotMenuModule,\n DotPageSelectorModule,\n DotRelationshipsModule,\n DotTextareaContentModule,\n DotWorkflowsActionsSelectorFieldModule,\n DotWorkflowsSelectorFieldModule,\n DragulaModule,\n DropdownModule,\n FormsModule,\n IFrameModule,\n InputTextModule,\n MultiSelectModule,\n OverlayPanelModule,\n RadioButtonModule,\n ReactiveFormsModule,\n SearchableDropDownModule,\n SiteSelectorFieldModule,\n SplitButtonModule,\n TabViewModule,\n DotRelationshipTreeModule,\n DotPortletBoxModule,\n DotMdIconSelectorModule\n ],\n providers: [\n DotContentTypesInfoService,\n DotWorkflowService,\n DragulaService,\n FieldDragDropService,\n FieldPropertyService,\n FieldService,\n ],\n schemas: []\n})\nexport class DotContentTypesEditModule {}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "DotContentTypesInfoService" + }, + { + "name": "DotWorkflowService" + }, + { + "name": "FieldDragDropService" + }, + { + "name": "FieldPropertyService" + }, + { + "name": "FieldService" + } + ] + }, + { + "type": "declarations", + "elements": [ + { + "name": "CategoriesPropertyComponent" + }, + { + "name": "CheckboxPropertyComponent" + }, + { + "name": "ContentTypeFieldsDropZoneComponent" + }, + { + "name": "ContentTypeFieldsPropertiesFormComponent" + }, + { + "name": "ContentTypeFieldsRowComponent" + }, + { + "name": "ContentTypeFieldsTabComponent" + }, + { + "name": "ContentTypesFieldDragabbleItemComponent" + }, + { + "name": "ContentTypesFieldsListComponent" + }, + { + "name": "ContentTypesFormComponent" + }, + { + "name": "ContentTypesLayoutComponent" + }, + { + "name": "DataTypePropertyComponent" + }, + { + "name": "DefaultValuePropertyComponent" + }, + { + "name": "DotContentTypesEditComponent" + }, + { + "name": "DynamicFieldPropertyDirective" + }, + { + "name": "HintPropertyComponent" + }, + { + "name": "NamePropertyComponent" + }, + { + "name": "RegexCheckPropertyComponent" + }, + { + "name": "ValuesPropertyComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "ContentTypeFieldsAddRowModule" + }, + { + "name": "DotAddToBundleModule" + }, + { + "name": "DotApiLinkModule" + }, + { + "name": "DotAutofocusModule" + }, + { + "name": "DotBaseTypeSelectorModule" + }, + { + "name": "DotContentTypeFieldsVariablesModule" + }, + { + "name": "DotContentTypesEditRoutingModule" + }, + { + "name": "DotCopyLinkModule" + }, + { + "name": "DotDialogModule" + }, + { + "name": "DotDirectivesModule" + }, + { + "name": "DotFieldHelperModule" + }, + { + "name": "DotFieldValidationMessageModule" + }, + { + "name": "DotIconModule" + }, + { + "name": "DotMaxlengthModule" + }, + { + "name": "DotMdIconSelectorModule" + }, + { + "name": "DotMenuModule" + }, + { + "name": "DotPageSelectorModule" + }, + { + "name": "DotPortletBoxModule" + }, + { + "name": "DotRelationshipTreeModule" + }, + { + "name": "DotRelationshipsModule" + }, + { + "name": "DotSecondaryToolbarModule" + }, + { + "name": "DotTextareaContentModule" + }, + { + "name": "DotWorkflowsActionsSelectorFieldModule" + }, + { + "name": "DotWorkflowsSelectorFieldModule" + }, + { + "name": "IFrameModule" + }, + { + "name": "SearchableDropDownModule" + }, + { + "name": "SiteSelectorFieldModule" + }, + { + "name": "UiDotIconButtonModule" + }, + { + "name": "UiDotIconButtonTooltipModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotContentTypesEditComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotContentTypesEditRoutingModule", + "id": "module-DotContentTypesEditRoutingModule-f60b20cb8e64b2873c995d20fd005354beaecaa8dd2201303648703f0838bd7107e5c96a34952f3a41ae516de0fd7770d70b80dc5ba7f4a071b478aebb84a1ac", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/dot-content-types-edit-routing.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { RouterModule, Routes } from '@angular/router';\nimport { DotContentTypesEditComponent } from '.';\n\nconst routes: Routes = [\n {\n component: DotContentTypesEditComponent,\n path: ''\n }\n];\n\n@NgModule({\n exports: [RouterModule],\n imports: [RouterModule.forChild(routes)]\n})\nexport class DotContentTypesEditRoutingModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotContentTypesListingModule", + "id": "module-DotContentTypesListingModule-40521540a3535582f6a21fc6fe590e95ed739e961850ee14e833072f649b3edd8371f46c2c141e9ed5b9af6182bb95309942754be589b61d637f630d090afbe4", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/shared/dot-content-types-listing/dot-content-types-listing.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotContentTypesInfoService } from '@services/dot-content-types-info';\nimport { DotContentTypesPortletComponent } from './dot-content-types.component';\nimport { DotCrudService } from '@services/dot-crud';\nimport { DotContentTypeService } from '@services/dot-content-type';\nimport { DotListingDataTableModule } from '@components/dot-listing-data-table';\nimport { DotBaseTypeSelectorModule } from '@components/dot-base-type-selector';\nimport { DotAddToBundleModule } from '@components/_common/dot-add-to-bundle';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\n\n@NgModule({\n imports: [\n CommonModule,\n DotListingDataTableModule,\n DotBaseTypeSelectorModule,\n DotAddToBundleModule,\n DotPipesModule\n ],\n declarations: [DotContentTypesPortletComponent],\n exports: [DotContentTypesPortletComponent],\n providers: [DotContentTypesInfoService, DotCrudService, DotContentTypeService]\n})\nexport class DotContentTypesListingModule {}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "DotContentTypeService" + }, + { + "name": "DotContentTypesInfoService" + }, + { + "name": "DotCrudService" + } + ] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotContentTypesPortletComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotAddToBundleModule" + }, + { + "name": "DotBaseTypeSelectorModule" + }, + { + "name": "DotListingDataTableModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotContentTypesPortletComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotContentTypesModule", + "id": "module-DotContentTypesModule-5db738bbde4d34b562d71cf92ed4648ff0fad11c6f67eb2f4ee9831e1029337b6ae5bc8cf6043ac07a7ab4bad83aebe3fa416fdf7364f45f6a008bf70699050e", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/dot-content-types/dot-content-types.module.ts", + "methods": [], + "sourceCode": "import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { DotContentTypesRoutingModule } from './dot-content-types-routing.module';\n\n@NgModule({\n imports: [CommonModule, DotContentTypesRoutingModule]\n})\nexport class DotContentTypesModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotContentTypesRoutingModule" + } + ] + }, + { + "type": "exports", + "elements": [] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotContentTypesRoutingModule", + "id": "module-DotContentTypesRoutingModule-41bbf2f4f379bf89a737c5099a13d56e5989c5152167f074b32188f738b90c2a39bfb41369881ab87c47ab204ebc6245f3eaa0484495bb6691e5e4e02086351d", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/dot-content-types/dot-content-types-routing.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { RouterModule, Routes } from '@angular/router';\nimport { DotContentTypeEditResolver } from '../shared/dot-content-types-edit/dot-content-types-edit-resolver.service';\nimport {\n DotContentTypesPortletComponent,\n DotContentTypesListingModule\n} from '@portlets/shared/dot-content-types-listing';\n\nconst contentTypesRoutes: Routes = [\n {\n component: DotContentTypesPortletComponent,\n path: ''\n },\n {\n path: 'create',\n redirectTo: ''\n },\n {\n loadChildren: () =>\n \"import('@portlets/shared/dot-content-types-edit/dot-content-types-edit.module').then(\\\n (m) => m.DotContentTypesEditModule\\\n )\",\n path: 'create/:type',\n resolve: {\n contentType: DotContentTypeEditResolver\n }\n },\n {\n path: 'edit',\n redirectTo: ''\n },\n {\n loadChildren: () =>\n \"import('@portlets/shared/dot-content-types-edit/dot-content-types-edit.module').then(\\\n (m) => m.DotContentTypesEditModule\\\n )\",\n path: 'edit/:id',\n resolve: {\n contentType: DotContentTypeEditResolver\n }\n }\n];\n\n@NgModule({\n exports: [RouterModule],\n imports: [DotContentTypesListingModule, RouterModule.forChild(contentTypesRoutes)],\n providers: [DotContentTypeEditResolver]\n})\nexport class DotContentTypesRoutingModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotContentTypesListingModule" + } + ] + }, + { + "type": "exports", + "elements": [] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotCopyButtonModule", + "id": "module-DotCopyButtonModule-bcfb0722123cdaebab53cba1dec638584939b96bf8b4f1e56ceaa901c72123be166a675f6cb3b6389a781b1ef8c63bcf0b24f9d73ab29bba7383fe87f46308c5", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/dot-copy-button/dot-copy-button.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotCopyButtonComponent } from './dot-copy-button.component';\nimport { UiDotIconButtonModule } from '@components/_common/dot-icon-button/dot-icon-button.module';\nimport { DotClipboardUtil } from '@dotcms/app/api/util/clipboard/ClipboardUtil';\nimport { TooltipModule } from 'primeng/tooltip';\n\n@NgModule({\n imports: [CommonModule, UiDotIconButtonModule, TooltipModule],\n declarations: [DotCopyButtonComponent],\n exports: [DotCopyButtonComponent],\n providers: [DotClipboardUtil]\n})\nexport class DotCopyButtonModule {}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "DotClipboardUtil" + } + ] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotCopyButtonComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "UiDotIconButtonModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotCopyButtonComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotCopyLinkModule", + "id": "module-DotCopyLinkModule-1d640fb1b60b89fb0b4af9f977b7b31e2addcdabed6093457f071e51b5e723766464a9e3fc88fd491eec64a6aa9a382f2b5ace2300fea4f7ac71a85dcaf078a7", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/dot-copy-link/dot-copy-link.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotCopyLinkComponent } from './dot-copy-link.component';\nimport { UiDotIconButtonModule } from '@components/_common/dot-icon-button/dot-icon-button.module';\nimport { DotClipboardUtil } from '@dotcms/app/api/util/clipboard/ClipboardUtil';\nimport { TooltipModule } from 'primeng/tooltip';\nimport { DotIconModule } from '@dotcms/ui';\n\n@NgModule({\n imports: [CommonModule, UiDotIconButtonModule, TooltipModule, DotIconModule],\n declarations: [DotCopyLinkComponent],\n exports: [DotCopyLinkComponent],\n providers: [DotClipboardUtil]\n})\nexport class DotCopyLinkModule {}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "DotClipboardUtil" + } + ] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotCopyLinkComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotIconModule" + }, + { + "name": "UiDotIconButtonModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotCopyLinkComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotCreatePersonaFormModule", + "id": "module-DotCreatePersonaFormModule-3f879db6ff8d1ed468d792616586779ef02acea290cae7f56cacf7a7588b2c5694b3311f48d2661641bd9b3b4783156f534a2fd9caea4c72dee308228584e8b3", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/dot-add-persona-dialog/dot-create-persona-form/dot-create-persona-form.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotCreatePersonaFormComponent } from '@components/dot-add-persona-dialog/dot-create-persona-form/dot-create-persona-form.component';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { DotFieldValidationMessageModule } from '@components/_common/dot-field-validation-message/dot-file-validation-message.module';\nimport { DotAutofocusModule } from '@directives/dot-autofocus/dot-autofocus.module';\nimport { SiteSelectorFieldModule } from '@components/_common/dot-site-selector-field/dot-site-selector-field.module';\nimport { DotAutocompleteTagsModule } from '@components/_common/dot-autocomplete-tags/dot-autocomplete-tags.module';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\nimport { FileUploadModule } from 'primeng/fileupload';\nimport { InputTextModule } from 'primeng/inputtext';\nimport { ButtonModule } from 'primeng/button';\nimport { AutoCompleteModule } from 'primeng/autocomplete';\n\n@NgModule({\n imports: [\n CommonModule,\n FileUploadModule,\n InputTextModule,\n ReactiveFormsModule,\n SiteSelectorFieldModule,\n DotFieldValidationMessageModule,\n DotAutofocusModule,\n ButtonModule,\n AutoCompleteModule,\n DotAutocompleteTagsModule,\n DotPipesModule\n ],\n declarations: [DotCreatePersonaFormComponent],\n exports: [DotCreatePersonaFormComponent]\n})\nexport class DotCreatePersonaFormModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotCreatePersonaFormComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotAutocompleteTagsModule" + }, + { + "name": "DotAutofocusModule" + }, + { + "name": "DotFieldValidationMessageModule" + }, + { + "name": "SiteSelectorFieldModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotCreatePersonaFormComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotCrumbtrailModule", + "id": "module-DotCrumbtrailModule-53c7c96cb8dbee4f45527bc58c3bcd721c3c126db870308b7ce4e5988a553a475cc05f0e719f9617eefb79d32028c52e7392ad17af3acaea75596e85f3f80f92", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/dot-crumbtrail/dot-crumbtrail.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotCrumbtrailComponent } from './dot-crumbtrail.component';\nimport { DotCrumbtrailService } from './service/dot-crumbtrail.service';\nimport { BreadcrumbModule } from 'primeng/breadcrumb';\n\n@NgModule({\n imports: [CommonModule, BreadcrumbModule],\n declarations: [DotCrumbtrailComponent],\n exports: [DotCrumbtrailComponent],\n providers: [DotCrumbtrailService]\n})\nexport class DotCrumbtrailModule {}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "DotCrumbtrailService" + } + ] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotCrumbtrailComponent" + } + ] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotCrumbtrailComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotCustomTimeModule", + "id": "module-DotCustomTimeModule-8670b71bd360b10060376ecef43e60ebfeaf2795b015acc001430e34a94dd513bf4b970ac5cc67f71680b21456eb9b7f6535c3ea6e2e76d02f542d0fda2dc660", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/_common/dot-custom-time.component/dot-custom-time.module.ts", + "methods": [], + "sourceCode": "import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { CustomTimeComponent } from './dot-custom-time.component';\n\n@NgModule({\n imports: [CommonModule],\n exports: [CustomTimeComponent],\n declarations: [CustomTimeComponent]\n})\nexport class DotCustomTimeModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "CustomTimeComponent" + } + ] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [ + { + "name": "CustomTimeComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotDeviceSelectorModule", + "id": "module-DotDeviceSelectorModule-a5b1af31a77584c8b4162e330bf6902375ed3c8fe295ec4af23c3cb192c27f8e505e1ad6ea5de46b0d2cf2c4646d2f8689c2e20184c940c0fdb1e0726aa72329", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/dot-device-selector/dot-device-selector.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DropdownModule } from 'primeng/dropdown';\nimport { FormsModule } from '@angular/forms';\nimport { DotDeviceSelectorComponent } from './dot-device-selector.component';\nimport { DotIconModule } from '@dotcms/ui';\nimport { DotDevicesService } from '@services/dot-devices/dot-devices.service';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\n\n@NgModule({\n imports: [CommonModule, DropdownModule, FormsModule, DotIconModule, DotPipesModule],\n declarations: [DotDeviceSelectorComponent],\n exports: [DotDeviceSelectorComponent],\n providers: [DotDevicesService]\n})\nexport class DotDeviceSelectorModule {}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "DotDevicesService" + } + ] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotDeviceSelectorComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotIconModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotDeviceSelectorComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotDialogModule", + "id": "module-DotDialogModule-1abfc250186aaaba5d62b9258d3f023eaba0ea4c8520c8d32b236552e5cd072efb6f216144011f0e492888ee2d6173a4ba623d065174d160e13ef6eb4a56adc6", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/dot-dialog/dot-dialog.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotDialogComponent } from './dot-dialog.component';\nimport { UiDotIconButtonModule } from '../_common/dot-icon-button/dot-icon-button.module';\nimport { ButtonModule } from 'primeng/button';\nimport { DialogModule } from 'primeng/dialog';\n\n@NgModule({\n imports: [CommonModule, ButtonModule, CommonModule, DialogModule, UiDotIconButtonModule],\n declarations: [DotDialogComponent],\n exports: [DotDialogComponent]\n})\nexport class DotDialogModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotDialogComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "UiDotIconButtonModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotDialogComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotDirectivesModule", + "id": "module-DotDirectivesModule-2317032e5f862eb6fc0e8ee80bff0f6d71c17ada87940b144aa9ef713a2672db00aabe4c5c81aa27a66de51b7094142afc84fbaa9181747cbdbc2b9ce28c825b", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/shared/dot-directives.module.ts", + "methods": [], + "sourceCode": "import { CommonModule } from '@angular/common';\nimport { RippleEffectModule } from '@directives/ripple/ripple-effect.module';\nimport { NgModule } from '@angular/core';\n\n@NgModule({\n declarations: [],\n imports: [CommonModule, RippleEffectModule],\n exports: []\n})\nexport class DotDirectivesModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [] + }, + { + "type": "imports", + "elements": [ + { + "name": "RippleEffectModule" + } + ] + }, + { + "type": "exports", + "elements": [] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotDownloadBundleDialogModule", + "id": "module-DotDownloadBundleDialogModule-7f203de96f62744a23ecac06bd2d1577c47cf9716afc19033df0044ee283879ac7ff88f4be4f4d931b584c04b40b5482ee92c2d88ea8faf145d3ba8a1fd882cc", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/_common/dot-download-bundle-dialog/dot-download-bundle-dialog.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { DotPushPublishFiltersService } from '@services/dot-push-publish-filters/dot-push-publish-filters.service';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { DotDialogModule } from '@components/dot-dialog/dot-dialog.module';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\nimport { DotDownloadBundleDialogComponent } from '@components/_common/dot-download-bundle-dialog/dot-download-bundle-dialog.component';\nimport { DotDownloadBundleDialogService } from '@services/dot-download-bundle-dialog/dot-download-bundle-dialog.service';\nimport { DropdownModule } from 'primeng/dropdown';\nimport { SelectButtonModule } from 'primeng/selectbutton';\n\n@NgModule({\n declarations: [DotDownloadBundleDialogComponent],\n exports: [DotDownloadBundleDialogComponent],\n providers: [DotPushPublishFiltersService, DotDownloadBundleDialogService],\n imports: [\n CommonModule,\n FormsModule,\n DotDialogModule,\n ReactiveFormsModule,\n DropdownModule,\n SelectButtonModule,\n DotPipesModule\n ]\n})\nexport class DotDownloadBundleDialogModule {}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "DotDownloadBundleDialogService" + }, + { + "name": "DotPushPublishFiltersService" + } + ] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotDownloadBundleDialogComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotDialogModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotDownloadBundleDialogComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotDropdownModule", + "id": "module-DotDropdownModule-ff2c5996a0c63f5a49a166bbbe0c18e0f6f4eb8a43941cc0570c26902c8d517f561b71cd7248b014a0ca0e444dfc8739154579bdbf69c0e1aa4ab3fb985ce947", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/_common/dot-dropdown-component/dot-dropdown.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ButtonModule } from 'primeng/button';\nimport { DotDropdownComponent } from './dot-dropdown.component';\nimport { DotGravatarModule } from '../../dot-toolbar/components/dot-gravatar/dot-gravatar.module';\nimport { UiDotIconButtonModule } from '@components/_common/dot-icon-button/dot-icon-button.module';\n\n@NgModule({\n imports: [CommonModule, ButtonModule, DotGravatarModule, UiDotIconButtonModule],\n declarations: [DotDropdownComponent],\n exports: [DotDropdownComponent]\n})\nexport class DotDropdownModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotDropdownComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotGravatarModule" + }, + { + "name": "UiDotIconButtonModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotDropdownComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotEditContentModule", + "id": "module-DotEditContentModule-1d17105c20447243995437805111fa16adc1cc72b86bebb17ffb1b61fefa185e3d60efa93eb6cc0dd5ed9288cb39a601a7ed62bee185d55766546bded0968b1d", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/content/dot-edit-content.module.ts", + "methods": [], + "sourceCode": "import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\n\nimport { DotContainerContentletService } from './services/dot-container-contentlet.service';\nimport { DotDOMHtmlUtilService } from './services/html/dot-dom-html-util.service';\nimport { DotDirectivesModule } from '@shared/dot-directives.module';\nimport { DotDragDropAPIHtmlService } from './services/html/dot-drag-drop-api-html.service';\nimport { DotEditContentComponent } from './dot-edit-content.component';\nimport { DotEditContentHtmlService } from './services/dot-edit-content-html/dot-edit-content-html.service';\nimport { DotEditContentToolbarHtmlService } from './services/html/dot-edit-content-toolbar-html.service';\nimport { DotLoadingIndicatorModule } from '@components/_common/iframe/dot-loading-indicator/dot-loading-indicator.module';\nimport { DotPageRenderService } from '@services/dot-page-render/dot-page-render.service';\nimport { DotWorkflowService } from '@services/dot-workflow/dot-workflow.service';\nimport { DotEditPageService } from '@services/dot-edit-page/dot-edit-page.service';\nimport { DotWhatsChangedModule } from './components/dot-whats-changed/dot-whats-changed.module';\n\nimport { DotFormSelectorModule } from './components/dot-form-selector/dot-form-selector.module';\nimport { DotContentletEditorModule } from '@components/dot-contentlet-editor/dot-contentlet-editor.module';\nimport { DotEditPageViewAsControllerModule } from './components/dot-edit-page-view-as-controller/dot-edit-page-view-as-controller.module';\nimport { DotEditPageStateControllerModule } from './components/dot-edit-page-state-controller/dot-edit-page-state-controller.module';\nimport { DotEditPageToolbarModule } from './components/dot-edit-page-toolbar/dot-edit-page-toolbar.module';\nimport { IframeOverlayService } from '@components/_common/iframe/service/iframe-overlay.service';\nimport { DotOverlayMaskModule } from '@components/_common/dot-overlay-mask/dot-overlay-mask.module';\nimport { DotCustomEventHandlerService } from '@services/dot-custom-event-handler/dot-custom-event-handler.service';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\nimport { ButtonModule } from 'primeng/button';\nimport { DialogModule } from 'primeng/dialog';\nimport { CheckboxModule } from 'primeng/checkbox';\nimport { TooltipModule } from 'primeng/tooltip';\nimport { DotWorkflowActionsFireService } from '@services/dot-workflow-actions-fire/dot-workflow-actions-fire.service';\nimport { DotLicenseService } from '@services/dot-license/dot-license.service';\nimport { DotPaletteModule } from '@dotcms/app/portlets/dot-edit-page/components/dot-palette/dot-palette.module';\nimport { DotIconModule } from '@dotcms/ui';\n\nconst routes: Routes = [\n {\n component: DotEditContentComponent,\n path: ''\n }\n];\n\n@NgModule({\n declarations: [DotEditContentComponent],\n imports: [\n CommonModule,\n ButtonModule,\n DialogModule,\n CheckboxModule,\n RouterModule.forChild(routes),\n DotContentletEditorModule,\n DotDirectivesModule,\n DotPipesModule,\n DotWhatsChangedModule,\n DotFormSelectorModule,\n TooltipModule,\n DotContentletEditorModule,\n DotLoadingIndicatorModule,\n DotEditPageToolbarModule,\n DotEditPageViewAsControllerModule,\n DotEditPageStateControllerModule,\n DotOverlayMaskModule,\n DotPaletteModule,\n DotIconModule\n ],\n exports: [DotEditContentComponent],\n providers: [\n DotContainerContentletService,\n DotDOMHtmlUtilService,\n DotDragDropAPIHtmlService,\n DotEditContentHtmlService,\n DotEditContentToolbarHtmlService,\n DotEditPageService,\n DotPageRenderService,\n DotWorkflowService,\n IframeOverlayService,\n DotCustomEventHandlerService,\n DotWorkflowActionsFireService,\n DotLicenseService\n ]\n})\nexport class DotEditContentModule {}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "DotContainerContentletService" + }, + { + "name": "DotCustomEventHandlerService" + }, + { + "name": "DotDOMHtmlUtilService" + }, + { + "name": "DotDragDropAPIHtmlService" + }, + { + "name": "DotEditContentHtmlService" + }, + { + "name": "DotEditContentToolbarHtmlService" + }, + { + "name": "DotEditPageService" + }, + { + "name": "DotLicenseService" + }, + { + "name": "DotPageRenderService" + }, + { + "name": "DotWorkflowActionsFireService" + }, + { + "name": "DotWorkflowService" + }, + { + "name": "IframeOverlayService" + } + ] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotEditContentComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotContentletEditorModule" + }, + { + "name": "DotContentletEditorModule" + }, + { + "name": "DotDirectivesModule" + }, + { + "name": "DotEditPageToolbarModule" + }, + { + "name": "DotFormSelectorModule" + }, + { + "name": "DotIconModule" + }, + { + "name": "DotLoadingIndicatorModule" + }, + { + "name": "DotOverlayMaskModule" + }, + { + "name": "DotPaletteModule" + }, + { + "name": "DotWhatsChangedModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotEditContentComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotEditLayoutDesignerModule", + "id": "module-DotEditLayoutDesignerModule-418c922f516662a346521b0ee21cd74e17f90b3854a152979def28b51f4c289f9dfeb23602ee75a9effc5bb8d2c92d3f045dae2b9fe75926008d914fec25e773", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/dot-edit-layout-designer/dot-edit-layout-designer.module.ts", + "methods": [], + "sourceCode": "import { UiDotIconButtonModule } from '../_common/dot-icon-button/dot-icon-button.module';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { NgModule } from '@angular/core';\n\nimport { ButtonModule } from 'primeng/button';\nimport { CheckboxModule } from 'primeng/checkbox';\nimport { DialogModule } from 'primeng/dialog';\nimport { InputTextModule } from 'primeng/inputtext';\nimport { ToolbarModule } from 'primeng/toolbar';\nimport { TooltipModule } from 'primeng/tooltip';\n\nimport { DotEditLayoutDesignerComponent } from './dot-edit-layout-designer.component';\nimport { DotLayoutDesignerModule } from './components/dot-layout-designer/dot-layout-designer.module';\nimport { DotLayoutPropertiesModule } from './components/dot-layout-properties/dot-layout-properties.module';\nimport { DotSidebarPropertiesModule } from './components/dot-sidebar-properties/dot-sidebar-properties.module';\nimport { DotThemeSelectorModule } from './components/dot-theme-selector/dot-theme-selector.module';\n\n// @components\nimport { DotContainerSelectorModule } from '@components/dot-container-selector/dot-container-selector.module';\nimport { DotActionButtonModule } from '@components/_common/dot-action-button/dot-action-button.module';\nimport { DotGlobalMessageModule } from '@components/_common/dot-global-message/dot-global-message.module';\nimport { DotSecondaryToolbarModule } from '@components/dot-secondary-toolbar';\n\n// @pipes\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\n\n// @services\nimport { DotPageLayoutService } from '@services/dot-page-layout/dot-page-layout.service';\n\n// @portlets\nimport { DotEditPageInfoModule } from '@portlets/dot-edit-page/components/dot-edit-page-info/dot-edit-page-info.module';\nimport { DotDialogModule } from '../dot-dialog/dot-dialog.module';\n\n@NgModule({\n declarations: [DotEditLayoutDesignerComponent],\n imports: [\n ButtonModule,\n CheckboxModule,\n CommonModule,\n DialogModule,\n DotActionButtonModule,\n DotContainerSelectorModule,\n DotEditPageInfoModule,\n DotGlobalMessageModule,\n UiDotIconButtonModule,\n DotLayoutPropertiesModule,\n DotSidebarPropertiesModule,\n DotThemeSelectorModule,\n FormsModule,\n InputTextModule,\n ReactiveFormsModule,\n ToolbarModule,\n TooltipModule,\n DotSecondaryToolbarModule,\n DotPipesModule,\n DotLayoutDesignerModule,\n DotDialogModule\n ],\n exports: [DotEditLayoutDesignerComponent],\n providers: [DotPageLayoutService]\n})\nexport class DotEditLayoutDesignerModule {}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "DotPageLayoutService" + } + ] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotEditLayoutDesignerComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotActionButtonModule" + }, + { + "name": "DotContainerSelectorModule" + }, + { + "name": "DotDialogModule" + }, + { + "name": "DotEditPageInfoModule" + }, + { + "name": "DotGlobalMessageModule" + }, + { + "name": "DotLayoutDesignerModule" + }, + { + "name": "DotLayoutPropertiesModule" + }, + { + "name": "DotSecondaryToolbarModule" + }, + { + "name": "DotSidebarPropertiesModule" + }, + { + "name": "DotThemeSelectorModule" + }, + { + "name": "UiDotIconButtonModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotEditLayoutDesignerComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotEditLayoutGridModule", + "id": "module-DotEditLayoutGridModule-7a465b085fcec1caaecf3bddea389062d84cf5793c797f8695f956520a7a7e6cbb49c6711ab8ea71852bd11d877a0726b3cc3575a3f63cc77065179b9a82fc41", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/dot-edit-layout-designer/components/dot-edit-layout-grid/dot-edit-layout-grid.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotEditLayoutGridComponent } from './dot-edit-layout-grid.component';\nimport { DotActionButtonModule } from '@components/_common/dot-action-button/dot-action-button.module';\nimport { DotContainerSelectorLayoutModule } from '@components/dot-container-selector-layout/dot-container-selector-layout.module';\nimport { NgGridModule } from '@dotcms/dot-layout-grid';\nimport { DotDialogModule } from '@components/dot-dialog/dot-dialog.module';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { UiDotIconButtonTooltipModule } from '@components/_common/dot-icon-button-tooltip/dot-icon-button-tooltip.module';\nimport { DotAutofocusModule } from '@directives/dot-autofocus/dot-autofocus.module';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\nimport { ButtonModule } from 'primeng/button';\nimport { InputTextModule } from 'primeng/inputtext';\n\n@NgModule({\n declarations: [DotEditLayoutGridComponent],\n imports: [\n CommonModule,\n NgGridModule,\n DotActionButtonModule,\n DotContainerSelectorLayoutModule,\n ButtonModule,\n DotDialogModule,\n InputTextModule,\n FormsModule,\n ReactiveFormsModule,\n UiDotIconButtonTooltipModule,\n DotAutofocusModule,\n DotPipesModule\n ],\n exports: [DotEditLayoutGridComponent],\n providers: []\n})\nexport class DotEditLayoutGridModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotEditLayoutGridComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotActionButtonModule" + }, + { + "name": "DotAutofocusModule" + }, + { + "name": "DotContainerSelectorLayoutModule" + }, + { + "name": "DotDialogModule" + }, + { + "name": "NgGridModule" + }, + { + "name": "UiDotIconButtonTooltipModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotEditLayoutGridComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotEditLayoutModule", + "id": "module-DotEditLayoutModule-fb71b3175efa55b7d70e0f848ea7a30f96c104edbf11b35289e7622612b9a4d65f3901575daa0ce630dca90da3ca5032ca86043055fd07991675270c21b958d6", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/layout/dot-edit-layout.module.ts", + "methods": [], + "sourceCode": "import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { RouterModule, Routes } from '@angular/router';\nimport { DotEditLayoutComponent } from './dot-edit-layout/dot-edit-layout.component';\nimport { DotEditLayoutDesignerModule } from '@components/dot-edit-layout-designer/dot-edit-layout-designer.module';\n\nconst routes: Routes = [\n {\n component: DotEditLayoutComponent,\n path: ''\n }\n];\n\n@NgModule({\n declarations: [DotEditLayoutComponent],\n imports: [CommonModule, RouterModule.forChild(routes), DotEditLayoutDesignerModule],\n exports: [DotEditLayoutComponent]\n})\nexport class DotEditLayoutModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotEditLayoutComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotEditLayoutDesignerModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotEditLayoutComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotEditLayoutSidebarModule", + "id": "module-DotEditLayoutSidebarModule-84c242fe6ab13571fcecc4a42def6c05945cb45c02d48c6e6d96ea29767ca46593551d39f768215b05786cb987f745a0e58d51d06ee79bcfa49f0f211cbfe94d", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/dot-edit-layout-designer/components/dot-edit-layout-sidebar/dot-edit-layout-sidebar.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotEditLayoutSidebarComponent } from './dot-edit-layout-sidebar.component';\nimport { DotActionButtonModule } from '@components/_common/dot-action-button/dot-action-button.module';\nimport { DotContainerSelectorLayoutModule } from '@components/dot-container-selector-layout/dot-container-selector-layout.module';\nimport { ButtonModule } from 'primeng/button';\nimport { DotSidebarPropertiesModule } from '../dot-sidebar-properties/dot-sidebar-properties.module';\nimport { FormsModule } from '@angular/forms';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\n\n@NgModule({\n declarations: [DotEditLayoutSidebarComponent],\n imports: [\n CommonModule,\n DotActionButtonModule,\n FormsModule,\n DotContainerSelectorLayoutModule,\n ButtonModule,\n DotSidebarPropertiesModule,\n DotPipesModule\n ],\n exports: [DotEditLayoutSidebarComponent],\n providers: []\n})\nexport class DotEditLayoutSidebarModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotEditLayoutSidebarComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotActionButtonModule" + }, + { + "name": "DotContainerSelectorLayoutModule" + }, + { + "name": "DotSidebarPropertiesModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotEditLayoutSidebarComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotEditPageInfoModule", + "id": "module-DotEditPageInfoModule-a8841622921478a47051b497b2d20285f83cfccdf034259bbd3b1db366d5a8033b0c4e3bb8343c8cbe14f36446f391f59ffbeb85976ff2aa8e0d1d679c13c15c", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-edit-page-info/dot-edit-page-info.module.ts", + "methods": [], + "sourceCode": "import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { DotEditPageInfoComponent } from './dot-edit-page-info.component';\nimport { ButtonModule } from 'primeng/button';\nimport { DotCopyButtonModule } from '@components/dot-copy-button/dot-copy-button.module';\nimport { DotApiLinkModule } from '@components/dot-api-link/dot-api-link.module';\nimport { LOCATION_TOKEN } from '@dotcms/app/providers';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\n\n@NgModule({\n imports: [CommonModule, ButtonModule, DotCopyButtonModule, DotApiLinkModule, DotPipesModule],\n exports: [DotEditPageInfoComponent],\n declarations: [DotEditPageInfoComponent],\n providers: [{ provide: LOCATION_TOKEN, useValue: window.location }]\n})\nexport class DotEditPageInfoModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotEditPageInfoComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotApiLinkModule" + }, + { + "name": "DotCopyButtonModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotEditPageInfoComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotEditPageMainModule", + "id": "module-DotEditPageMainModule-365c858aa7dee3921fe229c261050e94f87af90d63ce9c9a0ddb0f4f43047ae7f439c1792ec81072925e792a961688ea2ff9baf6a83a2a20096963042c1f3f13", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/main/dot-edit-page-main/dot-edit-page-main.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotEditPageMainComponent } from './dot-edit-page-main.component';\nimport { RouterModule } from '@angular/router';\nimport { DotEditPageNavModule } from '../dot-edit-page-nav/dot-edit-page-nav.module';\nimport { DotContentletEditorModule } from '@components/dot-contentlet-editor/dot-contentlet-editor.module';\nimport { DotRouterService } from '@dotcms/dotcms-js';\nimport { DotCustomEventHandlerService } from '@services/dot-custom-event-handler/dot-custom-event-handler.service';\n\n@NgModule({\n imports: [CommonModule, RouterModule, DotEditPageNavModule, DotContentletEditorModule],\n providers: [DotRouterService, DotCustomEventHandlerService],\n declarations: [DotEditPageMainComponent]\n})\nexport class DotEditPageMainModule {}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "DotCustomEventHandlerService" + }, + { + "name": "DotRouterService" + } + ] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotEditPageMainComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotContentletEditorModule" + }, + { + "name": "DotEditPageNavModule" + } + ] + }, + { + "type": "exports", + "elements": [] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotEditPageModule", + "id": "module-DotEditPageModule-47b7af5b5f53f340f2f03952293792d1e9b7daf7e734e14b2d0390daa37a10764a4b27482f0d790e15c67176bc3056d26a1763f9d07fab9375576adb98726733", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/dot-edit-page.module.ts", + "methods": [], + "sourceCode": "import { DotContentletLockerService } from '@services/dot-contentlet-locker/dot-contentlet-locker.service';\nimport { DotPageLayoutService } from '@services/dot-page-layout/dot-page-layout.service';\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotEditPageRoutingModule } from './dot-edit-page-routing.module';\nimport { DotEditLayoutModule } from './layout/dot-edit-layout.module';\nimport { DotEditPageMainModule } from './main/dot-edit-page-main/dot-edit-page-main.module';\nimport { DotPageRenderService } from '@services/dot-page-render/dot-page-render.service';\nimport { DotDirectivesModule } from '@shared/dot-directives.module';\nimport { DotPageStateService } from './content/services/dot-page-state/dot-page-state.service';\nimport { DotEditPageResolver } from './shared/services/dot-edit-page-resolver/dot-edit-page-resolver.service';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\n\n@NgModule({\n imports: [\n CommonModule,\n DotEditLayoutModule,\n DotEditPageMainModule,\n DotEditPageRoutingModule,\n DotDirectivesModule,\n DotPipesModule\n ],\n declarations: [],\n providers: [\n DotContentletLockerService,\n DotEditPageResolver,\n DotPageStateService,\n DotPageRenderService,\n DotPageLayoutService\n ]\n})\nexport class DotEditPageModule {}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "DotContentletLockerService" + }, + { + "name": "DotPageLayoutService" + }, + { + "name": "DotPageRenderService" + }, + { + "name": "DotPageStateService" + } + ] + }, + { + "type": "declarations", + "elements": [] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotDirectivesModule" + }, + { + "name": "DotEditLayoutModule" + }, + { + "name": "DotEditPageMainModule" + }, + { + "name": "DotEditPageRoutingModule" + } + ] + }, + { + "type": "exports", + "elements": [] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotEditPageNavModule", + "id": "module-DotEditPageNavModule-4455c7cb4730908b97a0cc368b27961804db926917d359e4cf41994a26987aae729e70b38ce1d4d9520fafbdb312621432d81d53086ae344bfc8593479064b58", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/main/dot-edit-page-nav/dot-edit-page-nav.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotEditPageNavComponent } from './dot-edit-page-nav.component';\nimport { RouterModule } from '@angular/router';\nimport { TooltipModule } from 'primeng/tooltip';\nimport { DotIconModule } from '@dotcms/ui';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\n\n@NgModule({\n imports: [CommonModule, RouterModule, TooltipModule, DotIconModule, DotPipesModule],\n declarations: [DotEditPageNavComponent],\n exports: [DotEditPageNavComponent],\n providers: []\n})\nexport class DotEditPageNavModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotEditPageNavComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotIconModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotEditPageNavComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotEditPageRoutingModule", + "id": "module-DotEditPageRoutingModule-4a15dbcd7ec707a06e435b746c666631bd9e68cd2cf192b35d907cfa3646ec74fb91f76d26f731e60f46b2524db697ca8412b7d4548435be9939728dc653196d", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/dot-edit-page-routing.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { RouterModule, Routes } from '@angular/router';\n\nimport { DotEditPageMainComponent } from './main/dot-edit-page-main/dot-edit-page-main.component';\nimport { DotEditPageResolver } from './shared/services/dot-edit-page-resolver/dot-edit-page-resolver.service';\nimport { LayoutEditorCanDeactivateGuardService } from '@services/guards/layout-editor-can-deactivate-guard.service';\n\nconst dotEditPage: Routes = [\n {\n component: DotEditPageMainComponent,\n path: '',\n resolve: {\n content: DotEditPageResolver\n },\n runGuardsAndResolvers: 'always',\n children: [\n {\n path: '',\n redirectTo: './content'\n },\n {\n loadChildren: () =>\n \"import('@portlets/dot-edit-page/content/dot-edit-content.module').then(\\\n (m) => m.DotEditContentModule\\\n )\",\n path: 'content'\n },\n {\n loadChildren: () =>\n \"import('@portlets/dot-edit-page/layout/dot-edit-layout.module').then(\\\n (m) => m.DotEditLayoutModule\\\n )\",\n canDeactivate: [LayoutEditorCanDeactivateGuardService],\n path: 'layout'\n },\n {\n loadChildren: () =>\n \"import('@portlets/dot-rules/dot-rules.module').then((m) => m.DotRulesModule)\",\n path: 'rules/:pageId'\n }\n ]\n },\n {\n loadChildren: () =>\n \"import(\\\n '@portlets/dot-edit-page/layout/components/dot-template-additional-actions/dot-template-additional-actions.module'\\\n ).then((m) => m.DotTemplateAdditionalActionsModule)\",\n path: 'layout/template/:id/:tabName'\n }\n];\n\n@NgModule({\n exports: [RouterModule],\n imports: [RouterModule.forChild(dotEditPage)]\n})\nexport class DotEditPageRoutingModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotEditPageStateControllerModule", + "id": "module-DotEditPageStateControllerModule-b3866d47811409b6a892ca01203de98dcfb031a42a68dd0b984aaf1db5d9941012b55ff6c50bba51fcc6007a03d8604bcef1d6fa24e3a8d1fea9f70d2037b6df", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-state-controller/dot-edit-page-state-controller.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\n\nimport { InputSwitchModule } from 'primeng/inputswitch';\nimport { SelectButtonModule } from 'primeng/selectbutton';\nimport { TooltipModule } from 'primeng/tooltip';\n\nimport { DotEditPageStateControllerComponent } from './dot-edit-page-state-controller.component';\nimport { DotEditPageLockInfoComponent } from './components/dot-edit-page-lock-info/dot-edit-page-lock-info.component';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\n\n@NgModule({\n declarations: [DotEditPageStateControllerComponent, DotEditPageLockInfoComponent],\n exports: [DotEditPageStateControllerComponent],\n imports: [\n CommonModule,\n FormsModule,\n InputSwitchModule,\n SelectButtonModule,\n DotPipesModule,\n TooltipModule\n ]\n})\nexport class DotEditPageStateControllerModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotEditPageLockInfoComponent" + }, + { + "name": "DotEditPageStateControllerComponent" + } + ] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotEditPageStateControllerComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotEditPageToolbarModule", + "id": "module-DotEditPageToolbarModule-0dda812e8bd4cabbd7eccbfc6c0b2d0984479203ede1d3ec2c599cd231d43edcd6eddcb490a278343bf0681804cdee06abd6b1165a86301103535b10da4fc4dd", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-toolbar/dot-edit-page-toolbar.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotEditPageToolbarComponent } from './dot-edit-page-toolbar.component';\nimport { FormsModule } from '@angular/forms';\nimport { DotEditPageViewAsControllerModule } from '../dot-edit-page-view-as-controller/dot-edit-page-view-as-controller.module';\nimport { DotEditPageStateControllerModule } from '../dot-edit-page-state-controller/dot-edit-page-state-controller.module';\nimport { DotEditPageInfoModule } from '@portlets/dot-edit-page/components/dot-edit-page-info/dot-edit-page-info.module';\nimport { DotEditPageWorkflowsActionsModule } from '../dot-edit-page-workflows-actions/dot-edit-page-workflows-actions.module';\nimport { DotSecondaryToolbarModule } from '@components/dot-secondary-toolbar';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\nimport { ButtonModule } from 'primeng/button';\nimport { CheckboxModule } from 'primeng/checkbox';\nimport { ToolbarModule } from 'primeng/toolbar';\nimport { DotGlobalMessageModule } from '@dotcms/app/view/components/_common/dot-global-message/dot-global-message.module';\n\n@NgModule({\n imports: [\n ButtonModule,\n CommonModule,\n CheckboxModule,\n DotEditPageWorkflowsActionsModule,\n DotEditPageInfoModule,\n DotEditPageViewAsControllerModule,\n DotEditPageStateControllerModule,\n DotSecondaryToolbarModule,\n FormsModule,\n ToolbarModule,\n DotPipesModule,\n DotGlobalMessageModule\n ],\n exports: [DotEditPageToolbarComponent],\n declarations: [DotEditPageToolbarComponent]\n})\nexport class DotEditPageToolbarModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotEditPageToolbarComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotEditPageInfoModule" + }, + { + "name": "DotEditPageWorkflowsActionsModule" + }, + { + "name": "DotGlobalMessageModule" + }, + { + "name": "DotSecondaryToolbarModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotEditPageToolbarComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotEditPageViewAsControllerModule", + "id": "module-DotEditPageViewAsControllerModule-5740dbce13e7690d741b2bd4b576adc236c897b6716d456416a65aea7c5ece8d005a01a3065273b689801e3606e5b0bdc177bb610ba89104bee0e90f4633b2ae", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-view-as-controller/dot-edit-page-view-as-controller.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotEditPageViewAsControllerComponent } from './dot-edit-page-view-as-controller.component';\nimport { FormsModule } from '@angular/forms';\nimport { DotLanguageSelectorModule } from '@components/dot-language-selector/dot-language-selector.module';\nimport { DotDeviceSelectorModule } from '@components/dot-device-selector/dot-device-selector.module';\nimport { DotPersonaSelectorModule } from '@components/dot-persona-selector/dot-persona.selector.module';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\nimport { DropdownModule } from 'primeng/dropdown';\nimport { TooltipModule } from 'primeng/tooltip';\n\n@NgModule({\n imports: [\n CommonModule,\n DropdownModule,\n FormsModule,\n TooltipModule,\n DotPersonaSelectorModule,\n DotLanguageSelectorModule,\n DotDeviceSelectorModule,\n DotPipesModule\n ],\n declarations: [DotEditPageViewAsControllerComponent],\n exports: [DotEditPageViewAsControllerComponent]\n})\nexport class DotEditPageViewAsControllerModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotEditPageViewAsControllerComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotDeviceSelectorModule" + }, + { + "name": "DotLanguageSelectorModule" + }, + { + "name": "DotPersonaSelectorModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotEditPageViewAsControllerComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotEditPageWorkflowsActionsModule", + "id": "module-DotEditPageWorkflowsActionsModule-e6b57178a87956b7009dca7d3f12f02c60c5f9d17e85a11920e84dc5ced0084b09f3cf9491bb78f738209571c40990b99bb75844814e3fbe5869d69961f43345", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-edit-page-workflows-actions/dot-edit-page-workflows-actions.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotEditPageWorkflowsActionsComponent } from './dot-edit-page-workflows-actions.component';\nimport { DotWorkflowsActionsService } from '@services/dot-workflows-actions/dot-workflows-actions.service';\nimport { DotWorkflowService } from '@services/dot-workflow/dot-workflow.service';\nimport { DotWorkflowEventHandlerService } from '@services/dot-workflow-event-handler/dot-workflow-event-handler.service';\nimport { MenuModule } from 'primeng/menu';\nimport { UiDotIconButtonModule } from '@components/_common/dot-icon-button/dot-icon-button.module';\n\n@NgModule({\n imports: [CommonModule, UiDotIconButtonModule, MenuModule],\n exports: [DotEditPageWorkflowsActionsComponent],\n declarations: [DotEditPageWorkflowsActionsComponent],\n providers: [DotWorkflowsActionsService, DotWorkflowService, DotWorkflowEventHandlerService]\n})\nexport class DotEditPageWorkflowsActionsModule {}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "DotWorkflowEventHandlerService" + }, + { + "name": "DotWorkflowService" + }, + { + "name": "DotWorkflowsActionsService" + } + ] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotEditPageWorkflowsActionsComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "UiDotIconButtonModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotEditPageWorkflowsActionsComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotEmptyStateModule", + "id": "module-DotEmptyStateModule-19ca42e58f65594478ee3ae119319931d559e1849659db7c0e04506f53c5ccc2df984a3cf3d802069e2a106376ab1eb32f8a6b3493134d1b0ca76e986155f3c4", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/_common/dot-empty-state/dot-empty-state.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotEmptyStateComponent } from './dot-empty-state.component';\nimport { ButtonModule } from 'primeng/button';\n\n@NgModule({\n declarations: [DotEmptyStateComponent],\n imports: [CommonModule, ButtonModule],\n exports: [DotEmptyStateComponent]\n})\nexport class DotEmptyStateModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotEmptyStateComponent" + } + ] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotEmptyStateComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotFieldHelperModule", + "id": "module-DotFieldHelperModule-5e1a2ae7a7ed93a8d546c358dce01d09df4165a8f955f5206bff6675c271ea3fedcfd2efaabac399cd4f8a3a14f1b0d5a6a6f71344e9aec593ad602b790408b8", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/dot-field-helper/dot-field-helper.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotFieldHelperComponent } from '@components/dot-field-helper/dot-field-helper.component';\nimport { UiDotIconButtonModule } from '@components/_common/dot-icon-button/dot-icon-button.module';\nimport { OverlayPanelModule } from 'primeng/overlaypanel';\n\n@NgModule({\n imports: [CommonModule, UiDotIconButtonModule, OverlayPanelModule],\n declarations: [DotFieldHelperComponent],\n exports: [DotFieldHelperComponent]\n})\nexport class DotFieldHelperModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotFieldHelperComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "UiDotIconButtonModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotFieldHelperComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotFieldValidationMessageModule", + "id": "module-DotFieldValidationMessageModule-3c41ee228e47a434739f55a2f5df0901dd0f7b12be5df1699835e0762ce7857d93f29421267aa32c45bccb4673e45bbd610629139eb4657f065df4c7ce95f0d2", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/_common/dot-field-validation-message/dot-file-validation-message.module.ts", + "methods": [], + "sourceCode": "import { CommonModule } from '@angular/common';\nimport { DotFieldValidationMessageComponent } from './dot-field-validation-message';\nimport { NgModule } from '@angular/core';\nimport { DotMessagePipeModule } from '@pipes/dot-message/dot-message-pipe.module';\n\n@NgModule({\n bootstrap: [],\n declarations: [DotFieldValidationMessageComponent],\n exports: [DotFieldValidationMessageComponent],\n imports: [CommonModule, DotMessagePipeModule],\n providers: []\n})\nexport class DotFieldValidationMessageModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotFieldValidationMessageComponent" + } + ] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotFieldValidationMessageComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotFilterPipeModule", + "id": "module-DotFilterPipeModule-1c6a613af16535703f24a6a6ce772f4a41d790bcf756d4ab74b7d958a8d2c38546932f7d1db796bbece98a6f0a5faa00ba60bd252e2e93778858267aa28ef819", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/pipes/dot-filter/dot-filter-pipe.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotFilterPipe } from '@pipes/dot-filter/dot-filter.pipe';\n\n@NgModule({\n imports: [CommonModule],\n declarations: [DotFilterPipe],\n exports: [DotFilterPipe]\n})\nexport class DotFilterPipeModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotFilterPipe" + } + ] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotFilterPipe" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotFormBuilderModule", + "id": "module-DotFormBuilderModule-1d45211afee39801c822897c2932ee0c7c7c31cf8ae89f63ce320896571321e6d2010f66922e24465ac341c4ff90cb8c3440df843123f246aeb1e389aad9988c", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/dot-form-builder/dot-form-builder.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotFormBuilderRoutingModule } from './dot-form-builder-routing.module';\nimport { DotContentTypesListingModule } from '@portlets/shared/dot-content-types-listing/dot-content-types-listing.module';\nimport { DotFormBuilderComponent } from './dot-form-builder.component';\nimport { DotFormResolver } from './resolvers/dot-form-resolver.service';\nimport { DotUnlicensedPorletModule } from '@portlets/shared/dot-unlicensed-porlet';\n\n@NgModule({\n declarations: [DotFormBuilderComponent],\n imports: [\n CommonModule,\n DotContentTypesListingModule,\n DotFormBuilderRoutingModule,\n DotUnlicensedPorletModule\n ],\n providers: [DotFormResolver]\n})\nexport class DotFormBuilderModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotFormBuilderComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotContentTypesListingModule" + }, + { + "name": "DotFormBuilderRoutingModule" + }, + { + "name": "DotUnlicensedPorletModule" + } + ] + }, + { + "type": "exports", + "elements": [] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotFormBuilderRoutingModule", + "id": "module-DotFormBuilderRoutingModule-b7c9e354f0825b1dadf461398182312387acc0fa2ca7b44bd26b355a92d720c0256986cca1da6d61f6385142b89896ac7547a01a7c1efe262f6773103ae339c7", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/dot-form-builder/dot-form-builder-routing.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { RouterModule, Routes } from '@angular/router';\nimport { DotContentTypeEditResolver } from '@portlets/shared/dot-content-types-edit/dot-content-types-edit-resolver.service';\nimport { DotFormResolver } from './resolvers/dot-form-resolver.service';\nimport { DotFormBuilderComponent } from './dot-form-builder.component';\n\nconst routes: Routes = [\n {\n component: DotFormBuilderComponent,\n path: '',\n resolve: {\n unlicensed: DotFormResolver\n },\n data: {\n filterBy: 'FORM'\n }\n },\n {\n loadChildren: () =>\n \"import('@portlets/shared/dot-content-types-edit/dot-content-types-edit.module').then(\\\n (m) => m.DotContentTypesEditModule\\\n )\",\n path: 'create',\n resolve: {\n contentType: DotContentTypeEditResolver\n }\n },\n {\n path: 'edit',\n redirectTo: ''\n },\n {\n loadChildren: () =>\n \"import('@portlets/shared/dot-content-types-edit/dot-content-types-edit.module').then(\\\n (m) => m.DotContentTypesEditModule\\\n )\",\n path: 'edit/:id',\n resolve: {\n contentType: DotContentTypeEditResolver\n }\n }\n];\n\n@NgModule({\n exports: [RouterModule],\n imports: [RouterModule.forChild(routes)],\n providers: [DotContentTypeEditResolver]\n})\nexport class DotFormBuilderRoutingModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotFormDialogModule", + "id": "module-DotFormDialogModule-4c2dad51f7a72aaf33b4f933486d3a3c747104dca4629728862832e8a27fb183cca74e2459e4f3f87811c6a64c6a0d226d7c6f204ee62ee012957123ab43e568", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/dot-form-dialog/dot-form-dialog.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ButtonModule } from 'primeng/button';\nimport { DotFormDialogComponent } from './dot-form-dialog.component';\nimport { FocusTrapModule } from 'primeng/focustrap';\nimport { DotMessagePipeModule } from '@pipes/dot-message/dot-message-pipe.module';\n\n@NgModule({\n declarations: [DotFormDialogComponent],\n exports: [DotFormDialogComponent],\n imports: [CommonModule, ButtonModule, FocusTrapModule, DotMessagePipeModule]\n})\nexport class DotFormDialogModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotFormDialogComponent" + } + ] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotFormDialogComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotFormSelectorModule", + "id": "module-DotFormSelectorModule-f2bce0570b4d4e3cfb9cf34bcac1bc034e279fb951265059c497d7ea5000b18d467c14012890374c7ef33ec403dc773a227aea410d3efdca335f3067b38cbe20", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-form-selector/dot-form-selector.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { ButtonModule } from 'primeng/button';\nimport { TableModule } from 'primeng/table';\n\nimport { DotFormSelectorComponent } from './dot-form-selector.component';\nimport { DotDialogModule } from '@components/dot-dialog/dot-dialog.module';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\n\n@NgModule({\n imports: [CommonModule, TableModule, DotDialogModule, ButtonModule, DotPipesModule],\n declarations: [DotFormSelectorComponent],\n exports: [DotFormSelectorComponent]\n})\nexport class DotFormSelectorModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotFormSelectorComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotDialogModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotFormSelectorComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotGenerateSecurePasswordModule", + "id": "module-DotGenerateSecurePasswordModule-1f1806e38d7ef1fd9c26a9ae8a12b78c8a9d35ef946ac317822f3e55a419f109e0263b201914249e9a9ff66ce64949049fcd4c6626fae094dc1eb34b8e6bc0af", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/_common/dot-generate-secure-password/dot-generate-secure-password.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotDialogModule } from '@components/dot-dialog/dot-dialog.module';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\nimport { DotGenerateSecurePasswordService } from '@services/dot-generate-secure-password/dot-generate-secure-password.service';\nimport { DotGenerateSecurePasswordComponent } from './dot-generate-secure-password.component';\nimport { ButtonModule } from 'primeng/button';\nimport { DotClipboardUtil } from '@dotcms/app/api/util/clipboard/ClipboardUtil';\n\n@NgModule({\n declarations: [DotGenerateSecurePasswordComponent],\n exports: [DotGenerateSecurePasswordComponent],\n providers: [DotGenerateSecurePasswordService, DotClipboardUtil],\n imports: [\n ButtonModule,\n CommonModule,\n DotDialogModule,\n DotPipesModule\n ]\n})\nexport class DotGenerateSecurePasswordModule {}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "DotClipboardUtil" + }, + { + "name": "DotGenerateSecurePasswordService" + } + ] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotGenerateSecurePasswordComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotDialogModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotGenerateSecurePasswordComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotGlobalMessageModule", + "id": "module-DotGlobalMessageModule-42e0bb83d42d4c6f221a5fbcbe84e47066a8384781eff0762a20a68002ae41551fae2ccb5dc15cce72b5e9fcd48cacb7cb8ca5736d85dfb30594ecb0906dc49e", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/_common/dot-global-message/dot-global-message.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotGlobalMessageService } from './dot-global-message.service';\nimport { DotGlobalMessageComponent } from './dot-global-message.component';\nimport { DotIconModule } from '@dotcms/ui';\nimport { DotSpinnerModule } from '@dotcms/ui';\n\n@NgModule({\n imports: [CommonModule, DotIconModule, DotSpinnerModule],\n declarations: [DotGlobalMessageComponent],\n exports: [DotGlobalMessageComponent],\n providers: [DotGlobalMessageService]\n})\nexport class DotGlobalMessageModule {}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "DotGlobalMessageService" + } + ] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotGlobalMessageComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotIconModule" + }, + { + "name": "DotSpinnerModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotGlobalMessageComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotGravatarModule", + "id": "module-DotGravatarModule-18652f004b1ebc048376e861bac1661cdd2a95a4387d55b3886bc234badc16f627425e6a692297c127d8ef246f6d3ec1fed328aded160a7f1c170501f224be23", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/dot-toolbar/components/dot-gravatar/dot-gravatar.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { DotGravatarComponent } from './dot-gravatar.component';\nimport { DotAvatarModule } from '@components/_common/dot-avatar/dot-avatar.module';\nimport { DotGravatarService } from '@services/dot-gravatar-service';\n\n@NgModule({\n imports: [CommonModule, DotAvatarModule],\n declarations: [DotGravatarComponent],\n exports: [DotGravatarComponent],\n providers: [DotGravatarService]\n})\nexport class DotGravatarModule {}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "DotGravatarService" + } + ] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotGravatarComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotAvatarModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotGravatarComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotIconModule", + "id": "module-DotIconModule-e8e8491c17ccda652c7648a7199a377caf966a2149ae090775311e98a404832b6bacad1c42608244f465a7719afb874d1928be57041f7127f98112f0187a46bf", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "libs/ui/src/lib/dot-icon/dot-icon.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotIconComponent } from './dot-icon.component';\n\n@NgModule({\n declarations: [DotIconComponent],\n exports: [DotIconComponent],\n imports: [CommonModule]\n})\nexport class DotIconModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotIconComponent" + } + ] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotIconComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotIframeDialogModule", + "id": "module-DotIframeDialogModule-126f21119c1c25d92447313e2aca431ee33ea873a69ee7eb2c2b46baef7d54252ace38dc0f21be0e11d237735ba57f8c3d6331c299f6efe43f352a2847f81476", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/dot-iframe-dialog/dot-iframe-dialog.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotIframeDialogComponent } from './dot-iframe-dialog.component';\nimport { IFrameModule } from '../_common/iframe';\nimport { UiDotIconButtonModule } from '@components/_common/dot-icon-button/dot-icon-button.module';\nimport { DotDialogModule } from '@components/dot-dialog/dot-dialog.module';\n\n@NgModule({\n imports: [CommonModule, DotDialogModule, IFrameModule, UiDotIconButtonModule],\n declarations: [DotIframeDialogComponent],\n exports: [DotIframeDialogComponent]\n})\nexport class DotIframeDialogModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotIframeDialogComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotDialogModule" + }, + { + "name": "IFrameModule" + }, + { + "name": "UiDotIconButtonModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotIframeDialogComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotKeyValueModule", + "id": "module-DotKeyValueModule-f110348bef6b48f21991ff8e572fbad5b8d4a3cf2fc78b45fc21514c86312b9186fbcb37ee43d38eda7039c2116f722ce12eef8dd069028adcb4ac55db329e2a", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/dot-key-value-ng/dot-key-value-ng.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { TableModule } from 'primeng/table';\nimport { DotKeyValueComponent } from './dot-key-value-ng.component';\nimport { DotKeyValueTableRowModule } from '@components/dot-key-value-ng/dot-key-value-table-row/dot-key-value-table-row.module';\nimport { DotKeyValueTableInputRowModule } from './dot-key-value-table-input-row/dot-key-value-table-input-row.module';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\n\n@NgModule({\n imports: [\n CommonModule,\n TableModule,\n DotKeyValueTableInputRowModule,\n DotKeyValueTableRowModule,\n DotPipesModule\n ],\n exports: [DotKeyValueComponent],\n providers: [],\n declarations: [DotKeyValueComponent]\n})\nexport class DotKeyValueModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotKeyValueComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotKeyValueTableInputRowModule" + }, + { + "name": "DotKeyValueTableRowModule" + } + ] + }, + { + "type": "exports", + "elements": [] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotKeyValueTableInputRowModule", + "id": "module-DotKeyValueTableInputRowModule-059c2b7463f34a80b3205fafd6406c4048d5ddbf0782f9195b5d1a8c835d1fe2a7a15d2e640774e2cb2f23ef142d16105523bc256c30717030e44918e256be97", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/dot-key-value-ng/dot-key-value-table-input-row/dot-key-value-table-input-row.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { DotKeyValueTableInputRowComponent } from './dot-key-value-table-input-row.component';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\nimport { ButtonModule } from 'primeng/button';\nimport { InputSwitchModule } from 'primeng/inputswitch';\nimport { InputTextModule } from 'primeng/inputtext';\n\n@NgModule({\n imports: [\n CommonModule,\n ButtonModule,\n InputSwitchModule,\n InputTextModule,\n FormsModule,\n DotPipesModule\n ],\n exports: [DotKeyValueTableInputRowComponent],\n declarations: [DotKeyValueTableInputRowComponent]\n})\nexport class DotKeyValueTableInputRowModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotKeyValueTableInputRowComponent" + } + ] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotKeyValueTableInputRowComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotKeyValueTableRowModule", + "id": "module-DotKeyValueTableRowModule-4c86d6eef54e9e25bf355861f4ee86f073d4e30c9a092cbfb9f64f9693cd3b0f3df8cd89c7a18ec852d4edfc940b1392c49f96b61274fa319ffb5dcb2879d560", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/dot-key-value-ng/dot-key-value-table-row/dot-key-value-table-row.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { TableModule } from 'primeng/table';\nimport { FormsModule } from '@angular/forms';\nimport { UiDotIconButtonModule } from '@components/_common/dot-icon-button/dot-icon-button.module';\nimport { DotKeyValueTableRowComponent } from './dot-key-value-table-row.component';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\nimport { ButtonModule } from 'primeng/button';\nimport { InputSwitchModule } from 'primeng/inputswitch';\nimport { InputTextModule } from 'primeng/inputtext';\n\n@NgModule({\n imports: [\n CommonModule,\n ButtonModule,\n InputSwitchModule,\n InputTextModule,\n FormsModule,\n TableModule,\n UiDotIconButtonModule,\n DotPipesModule\n ],\n exports: [DotKeyValueTableRowComponent],\n declarations: [DotKeyValueTableRowComponent]\n})\nexport class DotKeyValueTableRowModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotKeyValueTableRowComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "UiDotIconButtonModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotKeyValueTableRowComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotLanguageSelectorModule", + "id": "module-DotLanguageSelectorModule-41eba1af0e4ece7eb4b196175c11bc348d8991511d39c8ad0c615eec3643a2107d02fd60d041caf732292eb02a58505aec81f0006b3c9d12de89eef1fb3f57a1", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/dot-language-selector/dot-language-selector.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DropdownModule } from 'primeng/dropdown';\nimport { FormsModule } from '@angular/forms';\nimport { DotLanguageSelectorComponent } from './dot-language-selector.component';\nimport { DotIconModule } from '@dotcms/ui';\nimport { DotLanguagesService } from '@services/dot-languages/dot-languages.service';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\n\n@NgModule({\n imports: [CommonModule, DropdownModule, FormsModule, DotIconModule, DotPipesModule],\n declarations: [DotLanguageSelectorComponent],\n exports: [DotLanguageSelectorComponent],\n providers: [DotLanguagesService]\n})\nexport class DotLanguageSelectorModule {}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "DotLanguagesService" + } + ] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotLanguageSelectorComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotIconModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotLanguageSelectorComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotLargeMessageDisplayModule", + "id": "module-DotLargeMessageDisplayModule-6a724fea5ad98c20167f8a2e19d3856b93115cb1035325437efcbc5f6fabd73f7302b191f7005016adedd8d8245d49324858b455337c8aeb8d47d1147090c6bc", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/dot-large-message-display/dot-large-message-display.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotLargeMessageDisplayComponent } from './dot-large-message-display.component';\nimport { DotDialogModule } from '@components/dot-dialog/dot-dialog.module';\n\n@NgModule({\n declarations: [DotLargeMessageDisplayComponent],\n imports: [CommonModule, DotDialogModule],\n exports: [DotLargeMessageDisplayComponent]\n})\nexport class DotLargeMessageDisplayModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotLargeMessageDisplayComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotDialogModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotLargeMessageDisplayComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotLayoutDesignerModule", + "id": "module-DotLayoutDesignerModule-489fd1652f51af97c6c254b645ae76fdf675cabcb34147dda9b0f4ddf89759d8d1b0fa6718f00a4acedee322f1f6f27a99a2b662684532e64d3bb0f3d5afcba9", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/dot-edit-layout-designer/components/dot-layout-designer/dot-layout-designer.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\n\nimport { DotLayoutDesignerComponent } from './dot-layout-designer.component';\nimport { DotEditLayoutSidebarModule } from '@components/dot-edit-layout-designer/components/dot-edit-layout-sidebar/dot-edit-layout-sidebar.module';\nimport { DotEditLayoutGridModule } from '@components/dot-edit-layout-designer/components/dot-edit-layout-grid/dot-edit-layout-grid.module';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\n\n@NgModule({\n imports: [\n CommonModule,\n DotEditLayoutSidebarModule,\n DotEditLayoutGridModule,\n DotPipesModule,\n FormsModule,\n ReactiveFormsModule\n ],\n declarations: [DotLayoutDesignerComponent],\n exports: [DotLayoutDesignerComponent]\n})\nexport class DotLayoutDesignerModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotLayoutDesignerComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotEditLayoutGridModule" + }, + { + "name": "DotEditLayoutSidebarModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotLayoutDesignerComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotLayoutPropertiesItemModule", + "id": "module-DotLayoutPropertiesItemModule-b0fe958c6de3234dc5cd6ba16db5de57f3d7a960b9dcb3c4eb59a4a7f2b34f79689f4f1fb05637fe0daf4c67e03c988f51cc025a9104a750882ea659a62f82c6", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/dot-edit-layout-designer/components/dot-layout-properties/dot-layout-properties-item/dot-layout-properties-item.module.ts", + "methods": [], + "sourceCode": "import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { DotLayoutPropertiesItemComponent } from './dot-layout-properties-item.component';\n\n@NgModule({\n declarations: [DotLayoutPropertiesItemComponent],\n imports: [CommonModule],\n exports: [DotLayoutPropertiesItemComponent],\n providers: []\n})\nexport class DotLayoutPropertiesItemModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotLayoutPropertiesItemComponent" + } + ] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotLayoutPropertiesItemComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotLayoutPropertiesModule", + "id": "module-DotLayoutPropertiesModule-77877c335480394390ecc1dd7dce150624997fbd72490a4321c61a362d92c482ad936f31773b55e5315e252ec25ab8553d8a8869a5d9dc8770d004dba6458ccb", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/dot-edit-layout-designer/components/dot-layout-properties/dot-layout-properties.module.ts", + "methods": [], + "sourceCode": "import { UiDotIconButtonModule } from '@components/_common/dot-icon-button/dot-icon-button.module';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { DotLayoutSidebarModule } from './dot-layout-property-sidebar/dot-layout-property-sidebar.module';\nimport { DotLayoutPropertiesItemModule } from './dot-layout-properties-item/dot-layout-properties-item.module';\nimport { DotLayoutPropertiesComponent } from './dot-layout-properties.component';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\nimport { ButtonModule } from 'primeng/button';\nimport { OverlayPanelModule } from 'primeng/overlaypanel';\n\n@NgModule({\n declarations: [DotLayoutPropertiesComponent],\n imports: [\n CommonModule,\n DotLayoutPropertiesItemModule,\n DotLayoutSidebarModule,\n OverlayPanelModule,\n ButtonModule,\n ReactiveFormsModule,\n UiDotIconButtonModule,\n DotPipesModule\n ],\n exports: [DotLayoutPropertiesComponent],\n providers: []\n})\nexport class DotLayoutPropertiesModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotLayoutPropertiesComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotLayoutPropertiesItemModule" + }, + { + "name": "DotLayoutSidebarModule" + }, + { + "name": "UiDotIconButtonModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotLayoutPropertiesComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotLayoutSidebarModule", + "id": "module-DotLayoutSidebarModule-b11b53d571bd84bc38948a04d194de45db0cb943121af553d745abaa731f4f8697460ab0a7c6e0d396e73b362ee0811a942cdb6fc51408d8b095dde143c37134", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/dot-edit-layout-designer/components/dot-layout-properties/dot-layout-property-sidebar/dot-layout-property-sidebar.module.ts", + "methods": [], + "sourceCode": "import { DotLayoutSidebarComponent } from './dot-layout-property-sidebar.component';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { DotLayoutPropertiesItemModule } from '../dot-layout-properties-item/dot-layout-properties-item.module';\nimport { FormsModule } from '@angular/forms';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\n\n@NgModule({\n declarations: [DotLayoutSidebarComponent],\n imports: [CommonModule, DotLayoutPropertiesItemModule, FormsModule, DotPipesModule],\n exports: [DotLayoutSidebarComponent],\n providers: []\n})\nexport class DotLayoutSidebarModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotLayoutSidebarComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotLayoutPropertiesItemModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotLayoutSidebarComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotListingDataTableModule", + "id": "module-DotListingDataTableModule-1c54c4a0b55ffebecaa18e98f7b49e3128c897c86646ee87ebe346f7bc81a0c8e635ac6512b7184a56959b88a70a7ee44258acc93bf1b4fea3e44a97f84d8c4a", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/dot-listing-data-table/dot-listing-data-table.module.ts", + "methods": [], + "sourceCode": "import { ActionHeaderModule } from './action-header/action-header.module';\nimport { CommonModule } from '@angular/common';\nimport { DotCrudService } from '@services/dot-crud/dot-crud.service';\nimport { DotcmsConfigService, LoggerService } from '@dotcms/dotcms-js';\nimport { FormsModule } from '@angular/forms';\nimport { DotListingDataTableComponent } from './dot-listing-data-table.component';\nimport { NgModule } from '@angular/core';\nimport { InputTextModule } from 'primeng/inputtext';\nimport { TableModule } from 'primeng/table';\nimport { DotActionMenuButtonModule } from '../_common/dot-action-menu-button/dot-action-menu-button.module';\nimport { DotIconModule } from '@dotcms/ui';\nimport { RouterModule } from '@angular/router';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\nimport { CheckboxModule } from 'primeng/checkbox';\nimport { ContextMenuModule } from 'primeng/contextmenu';\n\n@NgModule({\n declarations: [DotListingDataTableComponent],\n exports: [DotListingDataTableComponent],\n imports: [\n ActionHeaderModule,\n CommonModule,\n TableModule,\n FormsModule,\n InputTextModule,\n DotActionMenuButtonModule,\n DotIconModule,\n RouterModule,\n DotPipesModule,\n CheckboxModule,\n ContextMenuModule\n ],\n providers: [DotCrudService, DotcmsConfigService, LoggerService]\n})\nexport class DotListingDataTableModule {}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "DotCrudService" + }, + { + "name": "DotcmsConfigService" + }, + { + "name": "LoggerService" + } + ] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotListingDataTableComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "ActionHeaderModule" + }, + { + "name": "DotActionMenuButtonModule" + }, + { + "name": "DotIconModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotListingDataTableComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotLoadingIndicatorModule", + "id": "module-DotLoadingIndicatorModule-94c67c2992f04a2a189b8fe6c607f814e9e1e428d305f60ec47bc7a7863984ab5753bd04ba7cf345bd8228672b61f60d2fa3d9ff17c545ce8eff7a69a04e7e75", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/_common/iframe/dot-loading-indicator/dot-loading-indicator.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotLoadingIndicatorComponent } from './dot-loading-indicator.component';\nimport { DotLoadingIndicatorService } from './dot-loading-indicator.service';\nimport { DotSpinnerModule } from '@dotcms/ui';\n\n@NgModule({\n imports: [CommonModule, DotSpinnerModule],\n declarations: [DotLoadingIndicatorComponent],\n exports: [DotLoadingIndicatorComponent],\n providers: [DotLoadingIndicatorService]\n})\nexport class DotLoadingIndicatorModule {}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "DotLoadingIndicatorService" + } + ] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotLoadingIndicatorComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotSpinnerModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotLoadingIndicatorComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotLocalStoreModule", + "id": "module-DotLocalStoreModule-f3c7c55ca05a970828c9547aee1f7a88c554b68fe76023110d3f51825d0dc3436cf6091b6566f551e25626e1fec2d7d054f77498e0da738c9a8751c5851ab092", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "libs/dotcms-js/src/lib/core/util/local-store.service.ts", + "methods": [], + "sourceCode": "import { Injectable, NgModule } from '@angular/core';\n\n/**\n * LocalStoreService. Basic wraper for localStorage\n */\n@Injectable()\nexport class LocalStoreService {\n /**\n * Stores Value in localstorage\n * @param key\n * @param value\n */\n storeValue(key: string, value: any): void {\n localStorage.setItem(key, value);\n // storage.set(key, value, callback);\n }\n\n /**\n * Gets a value from localstorage\n * @param key\n * @returns any\n */\n getValue(key: string): any {\n return localStorage.getItem(key);\n // return storage.get(key, callback);\n }\n\n /**\n * Clears a value from localstorage\n * @param key\n */\n clearValue(key: string): void {\n localStorage.removeItem(key);\n }\n\n /**\n * Clears all localstorage\n */\n clear(): void {\n localStorage.clear();\n }\n}\n\n@NgModule({\n providers: [LocalStoreService]\n})\nexport class DotLocalStoreModule {}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "LocalStoreService" + } + ] + }, + { + "type": "declarations", + "elements": [] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotLoginAsModule", + "id": "module-DotLoginAsModule-cdc8adb51b6f32fd9d718173672445ad6fe1250518b617a30f1d76030c662a545c9229ea10383794fb433071040dea1d039ace06598ecbb0dfbe637521f5b07f", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/dot-toolbar/components/dot-login-as/dot-login-as.module.ts", + "methods": [], + "sourceCode": "import { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { NgModule } from '@angular/core';\n\nimport { DotLoginAsComponent } from './dot-login-as.component';\nimport { DotDialogModule } from '@components/dot-dialog/dot-dialog.module';\nimport { SearchableDropDownModule } from '@components/_common/searchable-dropdown';\nimport { PasswordModule } from 'primeng/password';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\n\n@NgModule({\n imports: [\n CommonModule,\n DotDialogModule,\n PasswordModule,\n ReactiveFormsModule,\n SearchableDropDownModule,\n DotPipesModule\n ],\n exports: [DotLoginAsComponent],\n declarations: [DotLoginAsComponent],\n providers: []\n})\nexport class DotLoginAsModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotLoginAsComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotDialogModule" + }, + { + "name": "SearchableDropDownModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotLoginAsComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotLoginModule", + "id": "module-DotLoginModule-d5d93779a581f7badd2987d1955a7d79e3fe5e39ddd16a5839db5f317cc3a66895767447605d68c1345039373fa42237471dcfe0f2b8dd74c4f1dd70481223fd", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/login/dot-login-component/dot-login.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { RouterModule, Routes } from '@angular/router';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { DotLoadingIndicatorModule } from '../../_common/iframe/dot-loading-indicator/dot-loading-indicator.module';\nimport { DotLoginComponent } from '@components/login/dot-login-component/dot-login.component';\nimport { SharedModule } from '@shared/shared.module';\nimport { DotDirectivesModule } from '@shared/dot-directives.module';\nimport { DotFieldValidationMessageModule } from '@components/_common/dot-field-validation-message/dot-file-validation-message.module';\nimport { DotAutofocusModule } from '@directives/dot-autofocus/dot-autofocus.module';\nimport { ButtonModule } from 'primeng/button';\nimport { CheckboxModule } from 'primeng/checkbox';\nimport { DropdownModule } from 'primeng/dropdown';\nimport { InputTextModule } from 'primeng/inputtext';\n\nconst routes: Routes = [\n {\n component: DotLoginComponent,\n path: ''\n }\n];\n\n@NgModule({\n imports: [\n CommonModule,\n RouterModule.forChild(routes),\n FormsModule,\n ButtonModule,\n CheckboxModule,\n DropdownModule,\n InputTextModule,\n SharedModule,\n DotLoadingIndicatorModule,\n DotDirectivesModule,\n ReactiveFormsModule,\n DotFieldValidationMessageModule,\n DotAutofocusModule\n ],\n declarations: [DotLoginComponent]\n})\nexport class DotLoginModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotLoginComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotAutofocusModule" + }, + { + "name": "DotDirectivesModule" + }, + { + "name": "DotFieldValidationMessageModule" + }, + { + "name": "DotLoadingIndicatorModule" + }, + { + "name": "SharedModule" + } + ] + }, + { + "type": "exports", + "elements": [] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotLoginPageModule", + "id": "module-DotLoginPageModule-53e9c8544e3bac3b30adf9efebb383c66420d85242ded14d381fc0a58bccf72ddafa3c3ec04fd8c454becc0020b26f4b4b5add4a215093a1d952f0f26a2f091c", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/login/dot-login-page.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotLoginPageRoutingModule } from '@components/login/dot-login-page-routing.module';\nimport { DotLoginPageResolver } from '@components/login/dot-login-page-resolver.service';\n\n@NgModule({\n imports: [CommonModule, DotLoginPageRoutingModule],\n providers: [DotLoginPageResolver]\n})\nexport class DotLoginPageModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotLoginPageRoutingModule" + } + ] + }, + { + "type": "exports", + "elements": [] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotLoginPageRoutingModule", + "id": "module-DotLoginPageRoutingModule-d3d81a767ea792f5e091d6c073f1b386c415242c8866d94b8dbc3c9bb67f183f5abb700a20f269c332429152dca02c86001abc5a0772945643e5eaef779a5e5f", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/login/dot-login-page-routing.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\n\nconst routes: Routes = [\n {\n path: 'forgotPassword',\n loadChildren: () =>\n \"import('@components/login/forgot-password-component/forgot-password.module').then(\\\n (m) => m.ForgotPasswordModule\\\n )\"\n },\n {\n path: 'login',\n loadChildren: () =>\n \"import('@components/login/dot-login-component/dot-login.module').then(\\\n (m) => m.DotLoginModule\\\n )\"\n },\n {\n path: 'resetPassword/:token',\n loadChildren: () =>\n \"import('@components/login/reset-password-component/reset-password.module').then(\\\n (m) => m.ResetPasswordModule\\\n )\"\n },\n {\n path: '',\n redirectTo: '/login'\n }\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class DotLoginPageRoutingModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotMaxlengthModule", + "id": "module-DotMaxlengthModule-fc958e3b5a1c54d1578fb37dd6fdff7bace8c28a457f4d294b83120fbc485b1e9dfac6e7ddee4bc2241f9269ac428d95418fd8df68c4be3470ac612ddfb3c612", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/directives/dot-maxlength/dot-maxlength.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotMaxlengthDirective } from '@directives/dot-maxlength/dot-maxlength.directive';\n\n@NgModule({\n imports: [CommonModule],\n declarations: [DotMaxlengthDirective],\n exports: [DotMaxlengthDirective]\n})\nexport class DotMaxlengthModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotMaxlengthDirective" + } + ] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotMaxlengthDirective" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotMdIconSelectorModule", + "id": "module-DotMdIconSelectorModule-9bda6e416298edfa92a87c4b7ad2b1eec21e84611dc1082978b7d355c996cbb3ad3bd4c4e3b1e6c8f0d69e8fea2cda5054706bd011aebafb2d47dd81234b97d0", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/_common/dot-md-icon-selector/dot-md-icon-selector.module.ts", + "methods": [], + "sourceCode": "import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotMdIconSelectorComponent } from './dot-md-icon-selector.component';\n\n\n\n@NgModule({\n declarations: [DotMdIconSelectorComponent],\n exports: [DotMdIconSelectorComponent],\n imports: [\n CommonModule\n ],\n schemas: [CUSTOM_ELEMENTS_SCHEMA]\n})\nexport class DotMdIconSelectorModule { }\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotMdIconSelectorComponent" + } + ] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotMdIconSelectorComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotMenuModule", + "id": "module-DotMenuModule-a47a90abbb7be07aa24d1191e24b0c4cda55535d73bbea75e0538b43052b1c10d5a41172976f1e63cb0e4f48b6fcdcb424198932b6e98ddeb8c5d7c96cd416de", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/_common/dot-menu/dot-menu.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { DotMenuComponent } from './dot-menu.component';\nimport { CommonModule } from '@angular/common';\nimport { UiDotIconButtonModule } from '@components/_common/dot-icon-button/dot-icon-button.module';\n\n@NgModule({\n declarations: [DotMenuComponent],\n exports: [DotMenuComponent],\n imports: [CommonModule, UiDotIconButtonModule]\n})\nexport class DotMenuModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotMenuComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "UiDotIconButtonModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotMenuComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotMessageDisplayModule", + "id": "module-DotMessageDisplayModule-82954b79c547601a22dd3845035ca389b9d11d22c3ba16606fa800a22b1707b80712de05e547bd227f22cac1d0a969d265a13ce7b0ac75307ec2115f148212cd", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/dot-message-display/dot-message-display.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotMessageDisplayComponent } from './dot-message-display.component';\nimport { DotMessageDisplayService } from './services';\nimport { ToastModule } from 'primeng/toast';\nimport { DotIconModule } from '@dotcms/ui';\nimport { UiDotIconButtonModule } from '@components/_common/dot-icon-button/dot-icon-button.module';\n\n@NgModule({\n imports: [CommonModule, ToastModule, DotIconModule, UiDotIconButtonModule],\n declarations: [DotMessageDisplayComponent],\n providers: [DotMessageDisplayService],\n exports: [DotMessageDisplayComponent]\n})\nexport class DotMessageDisplayModule {}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "DotMessageDisplayService" + } + ] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotMessageDisplayComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotIconModule" + }, + { + "name": "UiDotIconButtonModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotMessageDisplayComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotMessagePipeModule", + "id": "module-DotMessagePipeModule-8ad1b4438c61d80d123a57064d13d38e8db910e0297e5a53418f8782d2fa719d96227fb801f10abaf989016e189025a9f9c75b96645bd7e5bdf3dccd910151dd", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/pipes/dot-message/dot-message-pipe.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotMessagePipe } from './dot-message.pipe';\n\n@NgModule({\n imports: [CommonModule],\n declarations: [DotMessagePipe],\n exports: [DotMessagePipe]\n})\nexport class DotMessagePipeModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotMessagePipe" + } + ] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotMessagePipe" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotMyAccountModule", + "id": "module-DotMyAccountModule-b89e913b3cd9bb46f7c6431bca0f0ba072f35c4d58ec50170060184505cebbf45f5b2f8de448164e78ac7472ffcfe69db37e79de8f4e4364f1a9467b0a7ddbdc", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/dot-toolbar/components/dot-my-account/dot-my-account.module.ts", + "methods": [], + "sourceCode": "import { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { NgModule } from '@angular/core';\n\nimport { DotMyAccountComponent } from './dot-my-account.component';\nimport { DotDialogModule } from '@components/dot-dialog/dot-dialog.module';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\nimport { PasswordModule } from 'primeng/password';\nimport { InputTextModule } from 'primeng/inputtext';\nimport { CheckboxModule } from 'primeng/checkbox';\n\n@NgModule({\n imports: [\n PasswordModule,\n InputTextModule,\n FormsModule,\n DotDialogModule,\n CommonModule,\n CheckboxModule,\n DotPipesModule\n ],\n exports: [DotMyAccountComponent],\n declarations: [DotMyAccountComponent],\n providers: []\n})\nexport class DotMyAccountModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotMyAccountComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotDialogModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotMyAccountComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotNavIconModule", + "id": "module-DotNavIconModule-461824c81922e59d7560cef4191db949323ccc0474576b2d68ef88a3a5ab2c624695cbb53c23ed8f005e4ec6772eaba514443e6e9ac64d0d20a590e8469694ee", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/dot-navigation/components/dot-nav-icon/dot-nav-icon.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotNavIconComponent } from './dot-nav-icon.component';\nimport { DotIconModule } from '@dotcms/ui';\n\n@NgModule({\n imports: [CommonModule, DotIconModule],\n declarations: [DotNavIconComponent],\n exports: [DotNavIconComponent]\n})\nexport class DotNavIconModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotNavIconComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotIconModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotNavIconComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotNotificationModule", + "id": "module-DotNotificationModule-47fe4e25d74ab77187e4c4d4ca118d6bb8d0e605817670f4af71829a6ec3b7956cc9ab41cc3ab2f1e65d612f2ee97e5c7fc3237993db909a25c31a7ae4d76a7b", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "libs/dotcms-js/src/lib/core/util/notification.service.ts", + "methods": [], + "sourceCode": "import { AppConfig } from './app.config';\nimport { Inject, Injectable, NgModule } from '@angular/core';\n\n/**\n * Used by the NotificationService to set Desktop Notifications\n */\ndeclare class Notification {\n constructor(title: string, options?: Object);\n}\n\n/**\n * NotificationService will notify using Desktop Notifications\n * https://developer.mozilla.org/en-US/docs/Web/API/notification\n * Can change icons by setting iconPath in the AppConfig if needed\n */\n@Injectable()\n@Inject('config')\nexport class NotificationService {\n iconPath: string;\n\n constructor(config: AppConfig) {\n this.iconPath = config.iconPath;\n }\n\n /**\n * Displays an error message\n * @param body\n */\n displayErrorMessage(body: string): void {\n this.displayMessage('Error', body, 'error');\n }\n\n /**\n * Displays a success message\n * @param body\n */\n displaySuccessMessage(body: string): void {\n this.displayMessage('Success', body, 'success');\n }\n\n /**\n * Displays an Info message\n * @param body\n */\n displayInfoMessage(body: string): void {\n this.displayMessage('Info', body, 'info');\n }\n\n /**\n * Display message for passed in type\n * @param title\n * @param body\n * @param type\n */\n displayMessage(_title: string, body: string, type: string): Notification {\n let myNotification: Notification;\n myNotification = new Notification(type, {\n body: body,\n icon: this.iconPath + '/' + type + '.png'\n });\n\n return myNotification;\n }\n}\n\n@NgModule({\n providers: [AppConfig, NotificationService]\n})\nexport class DotNotificationModule {}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "AppConfig" + }, + { + "name": "NotificationService" + } + ] + }, + { + "type": "declarations", + "elements": [] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotOverlayMaskModule", + "id": "module-DotOverlayMaskModule-a17f17c574c6140ff556e9916d4185582ef3d243ece02f997daadbc70b5b688392d83864efc78b0204a3475b886421a1594c2bc0bf95f7c78c26f0027cf286f0", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/_common/dot-overlay-mask/dot-overlay-mask.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotOverlayMaskComponent } from '@components/_common/dot-overlay-mask/dot-overlay-mask.component';\n\n@NgModule({\n declarations: [DotOverlayMaskComponent],\n exports: [DotOverlayMaskComponent],\n imports: [CommonModule]\n})\nexport class DotOverlayMaskModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotOverlayMaskComponent" + } + ] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotOverlayMaskComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotPageSelectorModule", + "id": "module-DotPageSelectorModule-446dfdec6773ee1d408e41015c0ff9f45ee43f26d43913bb0c4c2fcbe3a059a7748602dc3df7bdab7d9fa161a6c83d51a1346c71f51646a293cf36030f2b6710", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/_common/dot-page-selector/dot-page-selector.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotPageSelectorComponent } from './dot-page-selector.component';\nimport { DotPageSelectorService } from './service/dot-page-selector.service';\nimport { AutoCompleteModule } from 'primeng/autocomplete';\nimport { FormsModule } from '@angular/forms';\nimport { DotDirectivesModule } from '@shared/dot-directives.module';\nimport { DotFieldHelperModule } from '@components/dot-field-helper/dot-field-helper.module';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\n\n@NgModule({\n imports: [\n CommonModule,\n AutoCompleteModule,\n FormsModule,\n DotDirectivesModule,\n DotFieldHelperModule,\n DotPipesModule\n ],\n declarations: [DotPageSelectorComponent],\n providers: [DotPageSelectorService],\n exports: [DotPageSelectorComponent]\n})\nexport class DotPageSelectorModule {}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "DotPageSelectorService" + } + ] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotPageSelectorComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotDirectivesModule" + }, + { + "name": "DotFieldHelperModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotPageSelectorComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotPaletteContentletsModule", + "id": "module-DotPaletteContentletsModule-12bce3f9203f4dd2108fa820bec705ca4891d7848b2af183c3aba7bb187da9241b8c5695a04a95f18236b97d324b518f69dc4b7f231e49f92887c05673ea60b7", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette-contentlets/dot-palette-contentlets.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { DotPaletteContentletsComponent } from '@dotcms/app/portlets/dot-edit-page/components/dot-palette/dot-palette-contentlets/dot-palette-contentlets.component';\nimport { CommonModule } from '@angular/common';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\nimport {PaginatorModule} from 'primeng/paginator';\nimport { DotSpinnerModule } from '@dotcms/ui';\nimport { DotPaletteInputFilterModule } from '../dot-palette-input-filter/dot-palette-input-filter.module';\nimport { DotESContentService } from '@services/dot-es-content/dot-es-content.service';\n\n@NgModule({\n imports: [\n CommonModule,\n DotPipesModule,\n DotPaletteInputFilterModule,\n PaginatorModule,\n DotSpinnerModule\n ],\n declarations: [DotPaletteContentletsComponent],\n exports: [DotPaletteContentletsComponent],\n providers: [DotESContentService]\n})\nexport class DotPaletteContentletsModule {}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "DotESContentService" + } + ] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotPaletteContentletsComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotPaletteInputFilterModule" + }, + { + "name": "DotSpinnerModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotPaletteContentletsComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotPaletteContentTypeModule", + "id": "module-DotPaletteContentTypeModule-55ed4642d85f1f8c0ae864d1d09ed1f0edf39d70145589d0482b1f05cecf7e60a3d4e9c2a1d402fc12427a3cbdc5069f8fc8f1f67a00d05ad19976dc26cb758a", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette-content-type/dot-palette-content-type.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { DotPaletteContentTypeComponent } from '@dotcms/app/portlets/dot-edit-page/components/dot-palette/dot-palette-content-type/dot-palette-content-type.component';\nimport { CommonModule } from '@angular/common';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\nimport { DotIconModule } from '@dotcms/ui';\nimport { DotPaletteInputFilterModule } from '../dot-palette-input-filter/dot-palette-input-filter.module';\n\n@NgModule({\n imports: [\n CommonModule,\n DotPipesModule,\n DotIconModule,\n DotPaletteInputFilterModule,\n ],\n declarations: [DotPaletteContentTypeComponent],\n exports: [DotPaletteContentTypeComponent]\n})\nexport class DotPaletteContentTypeModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotPaletteContentTypeComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotIconModule" + }, + { + "name": "DotPaletteInputFilterModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotPaletteContentTypeComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotPaletteInputFilterModule", + "id": "module-DotPaletteInputFilterModule-4d8ce8c4c5b7a6b6f3466c30200aabb05932d67ac897bd8c4f243f8cc34a52c58bfc5c6d1d893379a7d305e10fb952afb24c2a43b362bf46debfbe8d21c5dfd4", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette-input-filter/dot-palette-input-filter.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { InputTextModule } from 'primeng/inputtext';\n\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\nimport { DotIconModule } from '@dotcms/ui';\nimport { DotPaletteInputFilterComponent } from './dot-palette-input-filter.component';\n\n@NgModule({\n imports: [CommonModule, DotPipesModule, DotIconModule, FormsModule, InputTextModule],\n declarations: [DotPaletteInputFilterComponent],\n exports: [DotPaletteInputFilterComponent]\n})\nexport class DotPaletteInputFilterModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotPaletteInputFilterComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotIconModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotPaletteInputFilterComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotPaletteModule", + "id": "module-DotPaletteModule-a897019d6fe247fa6f502efc5ecf71109240472468cb224096db6d972bdc487dd3811026e0ecc787dfd54b035056a9f335887419b90f893f1ed8e659d608c535", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { DotPaletteComponent } from '@dotcms/app/portlets/dot-edit-page/components/dot-palette/dot-palette.component';\nimport { DotPaletteContentTypeModule } from './dot-palette-content-type/dot-palette-content-type.module';\nimport { DotPaletteContentletsModule } from './dot-palette-contentlets/dot-palette-contentlets.module';\n\n@NgModule({\n imports: [\n DotPaletteContentTypeModule,\n DotPaletteContentletsModule\n ],\n declarations: [DotPaletteComponent],\n exports: [DotPaletteComponent]\n})\nexport class DotPaletteModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotPaletteComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotPaletteContentTypeModule" + }, + { + "name": "DotPaletteContentletsModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotPaletteComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotPersonaSelectedItemModule", + "id": "module-DotPersonaSelectedItemModule-d2af6c76fe761588d66f223a85b05f4433d8d18b6e21e5acdf57e8835814279682cc94f4b6bc953ab0d501f0c2832ee88f4a8a7e9fc065a6913e10fbdaab3f21", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/dot-persona-selected-item/dot-persona-selected-item.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { DotPersonaSelectedItemComponent } from './dot-persona-selected-item.component';\nimport { DotIconModule } from '@dotcms/ui';\nimport { DotAvatarModule } from '@components/_common/dot-avatar/dot-avatar.module';\nimport { ButtonModule } from 'primeng/button';\nimport { TooltipModule } from 'primeng/tooltip';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n DotIconModule,\n DotAvatarModule,\n ButtonModule,\n TooltipModule,\n DotPipesModule\n ],\n declarations: [DotPersonaSelectedItemComponent],\n exports: [DotPersonaSelectedItemComponent]\n})\nexport class DotPersonaSelectedItemModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotPersonaSelectedItemComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotAvatarModule" + }, + { + "name": "DotIconModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotPersonaSelectedItemComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotPersonaSelectorModule", + "id": "module-DotPersonaSelectorModule-4cd59d232148a7e9d4d842bec52a6d8418e84da111d911bfdaf20dcb8409ddbf32774f8197b11db1859dad6df8c31139161d18435bc30d5c8347b07515dc45eb", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/dot-persona-selector/dot-persona.selector.module.ts", + "methods": [], + "sourceCode": "import { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { NgModule } from '@angular/core';\nimport { SearchableDropDownModule } from '@components/_common/searchable-dropdown';\nimport { DotPersonaSelectorComponent } from './dot-persona-selector.component';\nimport { DotPersonaSelectorOptionModule } from '@components/dot-persona-selector-option/dot-persona-selector-option.module';\nimport { DotIconModule } from '@dotcms/ui';\nimport { DotAvatarModule } from '@components/_common/dot-avatar/dot-avatar.module';\nimport { DotPersonaSelectedItemModule } from '@components/dot-persona-selected-item/dot-persona-selected-item.module';\nimport { PaginatorService } from '@services/paginator';\nimport { DotPersonasService } from '@services/dot-personas/dot-personas.service';\nimport { DotPersonalizeService } from '@services/dot-personalize/dot-personalize.service';\nimport { DotAddPersonaDialogModule } from '@components/dot-add-persona-dialog/dot-add-persona-dialog.module';\nimport { IframeOverlayService } from '@components/_common/iframe/service/iframe-overlay.service';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\nimport { ButtonModule } from 'primeng/button';\nimport { TooltipModule } from 'primeng/tooltip';\nimport { SharedModule } from 'primeng/api';\n\n@NgModule({\n declarations: [DotPersonaSelectorComponent],\n exports: [DotPersonaSelectorComponent],\n imports: [\n CommonModule,\n FormsModule,\n SearchableDropDownModule,\n DotPersonaSelectedItemModule,\n DotPersonaSelectorOptionModule,\n DotPipesModule,\n DotIconModule,\n DotAvatarModule,\n ButtonModule,\n TooltipModule,\n SharedModule,\n DotAddPersonaDialogModule\n ],\n providers: [PaginatorService, DotPersonasService, DotPersonalizeService, IframeOverlayService]\n})\nexport class DotPersonaSelectorModule {}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "DotPersonalizeService" + }, + { + "name": "DotPersonasService" + }, + { + "name": "IframeOverlayService" + }, + { + "name": "PaginatorService" + } + ] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotPersonaSelectorComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotAddPersonaDialogModule" + }, + { + "name": "DotAvatarModule" + }, + { + "name": "DotIconModule" + }, + { + "name": "DotPersonaSelectedItemModule" + }, + { + "name": "DotPersonaSelectorOptionModule" + }, + { + "name": "SearchableDropDownModule" + }, + { + "name": "SharedModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotPersonaSelectorComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotPersonaSelectorOptionModule", + "id": "module-DotPersonaSelectorOptionModule-97cc75f3d05fe31ecd7a851cb8d02282cf42bea231f3eb959b67e1c22a904894b220cd13636afbdc70c08303c1a6cf37cd421098babb122a8e8eeb443574cb3c", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/dot-persona-selector-option/dot-persona-selector-option.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { DotPersonaSelectorOptionComponent } from './dot-persona-selector-option.component';\nimport { DotAvatarModule } from '@components/_common/dot-avatar/dot-avatar.module';\nimport { ButtonModule } from 'primeng/button';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\n\n@NgModule({\n imports: [CommonModule, FormsModule, DotAvatarModule, ButtonModule, DotPipesModule],\n declarations: [DotPersonaSelectorOptionComponent],\n exports: [DotPersonaSelectorOptionComponent]\n})\nexport class DotPersonaSelectorOptionModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotPersonaSelectorOptionComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotAvatarModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotPersonaSelectorOptionComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotPipesModule", + "id": "module-DotPipesModule-dc751572265ef33c8aa4e1bab8b8d946f6086f17e6aac075d292af6f567768b200335edf844c53f305e0290e2eef83d0c46719130f567ea5ee858c333cccf110", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/pipes/dot-pipes.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { DotMessagePipe, DotSafeUrlPipe, DotStringFormatPipe } from '@pipes/index';\nimport { DotMessagePipeModule } from './dot-message/dot-message-pipe.module';\n\n@NgModule({\n declarations: [DotStringFormatPipe, DotSafeUrlPipe],\n exports: [DotMessagePipe, DotStringFormatPipe, DotSafeUrlPipe],\n imports: [DotMessagePipeModule]\n})\nexport class DotPipesModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotSafeUrlPipe" + }, + { + "name": "DotStringFormatPipe" + } + ] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotMessagePipe" + }, + { + "name": "DotSafeUrlPipe" + }, + { + "name": "DotStringFormatPipe" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotPortletBaseModule", + "id": "module-DotPortletBaseModule-b6d3125be545d0d0124fe292901dcb4df08411ec830f66a4e96fddc61d0f18f2511ed35f468568064b508024607a67ea0ffd5bcf4a22eb4e3971ce2a0b45aa7a", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/dot-portlet-base/dot-portlet-base.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotPortletBaseComponent } from './dot-portlet-base.component';\nimport { DotPortletToolbarModule } from './components/dot-portlet-toolbar/dot-portlet-toolbar.module';\nimport { DotPortletToolbarComponent } from './components/dot-portlet-toolbar/dot-portlet-toolbar.component';\nimport { DotPortletBoxModule } from './components/dot-portlet-box/dot-portlet-box.module';\n\n@NgModule({\n declarations: [DotPortletBaseComponent],\n exports: [DotPortletBaseComponent, DotPortletToolbarComponent],\n imports: [CommonModule, DotPortletToolbarModule, DotPortletBoxModule]\n})\nexport class DotPortletBaseModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotPortletBaseComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotPortletBoxModule" + }, + { + "name": "DotPortletToolbarModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotPortletBaseComponent" + }, + { + "name": "DotPortletToolbarComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotPortletBoxModule", + "id": "module-DotPortletBoxModule-168feafea227b5b71bc3a47a0777dc1f2254049d68a735c19c1eca7434dab54a7940338f80728200d4f951b447a3cc3a77c1b43bb0dd471404f871a9c9cc4f45", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/dot-portlet-base/components/dot-portlet-box/dot-portlet-box.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotPortletBoxComponent } from './dot-portlet-box.component';\n\n@NgModule({\n imports: [CommonModule],\n declarations: [DotPortletBoxComponent],\n exports: [DotPortletBoxComponent]\n})\nexport class DotPortletBoxModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotPortletBoxComponent" + } + ] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotPortletBoxComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotPortletDetailModule", + "id": "module-DotPortletDetailModule-0d2486b67bf7a27afa5f701ee4f5b29af146165212defb5c83bdd7ddbee9ebe86afe1514cb6b5fb0e65c033dfcb0d3d41dd6a93e23945d536e355233ef33f3ef", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/dot-porlet-detail/dot-portlet-detail.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotPortletDetailComponent } from './dot-portlet-detail.component';\nimport { Routes, RouterModule } from '@angular/router';\nimport { DotWorkflowTaskModule } from './dot-workflow-task/dot-workflow-task.module';\nimport { DotContentletsModule } from './dot-contentlets/dot-contentlets.module';\n\nconst routes: Routes = [\n {\n component: DotPortletDetailComponent,\n path: ''\n }\n];\n\n@NgModule({\n imports: [\n CommonModule,\n DotWorkflowTaskModule,\n DotContentletsModule,\n RouterModule.forChild(routes)\n ],\n declarations: [DotPortletDetailComponent]\n})\nexport class DotPortletDetailModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotPortletDetailComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotContentletsModule" + }, + { + "name": "DotWorkflowTaskModule" + } + ] + }, + { + "type": "exports", + "elements": [] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotPortletToolbarModule", + "id": "module-DotPortletToolbarModule-ecbdfbfc67e0e55bd491494cac784be56f898478086738dcdfad2fce43e06b49e96d72c8a96e03617adc9663c4c47623ce9d1651376d1b2c3ab7c4e7d58e483b", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/dot-portlet-base/components/dot-portlet-toolbar/dot-portlet-toolbar.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotPortletToolbarComponent } from './dot-portlet-toolbar.component';\nimport { ToolbarModule } from 'primeng/toolbar';\nimport { ButtonModule } from 'primeng/button';\nimport { DotMessagePipeModule } from '@pipes/dot-message/dot-message-pipe.module';\nimport { MenuModule } from 'primeng/menu';\n\n@NgModule({\n declarations: [DotPortletToolbarComponent],\n imports: [CommonModule, ToolbarModule, ButtonModule, DotMessagePipeModule, MenuModule],\n exports: [DotPortletToolbarComponent]\n})\nexport class DotPortletToolbarModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotPortletToolbarComponent" + } + ] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotPortletToolbarComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotPushPublishDialogModule", + "id": "module-DotPushPublishDialogModule-2a956446242e4a58a24827f1f97b8b399196cd8a5a01c8e275319f6e1acb1a80a885a28a50e978c79219db1184365d50d4f5c5950a179f3f22db945393de4969", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/_common/dot-push-publish-dialog/dot-push-publish-dialog.module.ts", + "methods": [], + "sourceCode": "import { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { PushPublishEnvSelectorModule } from '../dot-push-publish-env-selector/dot-push-publish-env-selector.module';\nimport { DotFieldValidationMessageModule } from '../dot-field-validation-message/dot-file-validation-message.module';\nimport { DotDialogModule } from '@components/dot-dialog/dot-dialog.module';\nimport { DotPushPublishFiltersService } from '@services/dot-push-publish-filters/dot-push-publish-filters.service';\nimport { DotPushPublishDialogComponent } from '@components/_common/dot-push-publish-dialog/dot-push-publish-dialog.component';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\nimport { DotPushPublishFormModule } from '@components/_common/forms/dot-push-publish-form/dot-push-publish-form.module';\nimport { CalendarModule } from 'primeng/calendar';\nimport { DropdownModule } from 'primeng/dropdown';\nimport { SelectButtonModule } from 'primeng/selectbutton';\n\n@NgModule({\n declarations: [DotPushPublishDialogComponent],\n exports: [DotPushPublishDialogComponent],\n providers: [DotPushPublishFiltersService],\n imports: [\n CommonModule,\n FormsModule,\n CalendarModule,\n DotDialogModule,\n PushPublishEnvSelectorModule,\n ReactiveFormsModule,\n DropdownModule,\n DotFieldValidationMessageModule,\n SelectButtonModule,\n DotPipesModule,\n DotPushPublishFormModule\n ]\n})\nexport class DotPushPublishDialogModule {}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "DotPushPublishFiltersService" + } + ] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotPushPublishDialogComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotDialogModule" + }, + { + "name": "DotFieldValidationMessageModule" + }, + { + "name": "DotPushPublishFormModule" + }, + { + "name": "PushPublishEnvSelectorModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotPushPublishDialogComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotPushPublishFormModule", + "id": "module-DotPushPublishFormModule-428f1fcc88247202c23e8a07c579627f23a931de179b27b52bc6ca2e2d5e161bdf0d7bb9e048478e035d2370f94d4250791c690e2d6642288ec4120fb483cf61", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/_common/forms/dot-push-publish-form/dot-push-publish-form.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\nimport { PushPublishService } from '@services/push-publish/push-publish.service';\nimport { DotPushPublishFormComponent } from '@components/_common/forms/dot-push-publish-form/dot-push-publish-form.component';\nimport { DotDialogModule } from '@components/dot-dialog/dot-dialog.module';\nimport { PushPublishEnvSelectorModule } from '@components/_common/dot-push-publish-env-selector/dot-push-publish-env-selector.module';\nimport { DotFieldValidationMessageModule } from '@components/_common/dot-field-validation-message/dot-file-validation-message.module';\nimport { DotParseHtmlService } from '@services/dot-parse-html/dot-parse-html.service';\nimport { CalendarModule } from 'primeng/calendar';\nimport { DropdownModule } from 'primeng/dropdown';\nimport { SelectButtonModule } from 'primeng/selectbutton';\nimport { DotcmsConfigService } from '@dotcms/dotcms-js';\n\n@NgModule({\n declarations: [DotPushPublishFormComponent],\n exports: [DotPushPublishFormComponent],\n imports: [\n CommonModule,\n FormsModule,\n CalendarModule,\n DotDialogModule,\n PushPublishEnvSelectorModule,\n ReactiveFormsModule,\n DropdownModule,\n DotFieldValidationMessageModule,\n SelectButtonModule,\n DotPipesModule\n ],\n providers: [PushPublishService, DotParseHtmlService, DotcmsConfigService]\n})\nexport class DotPushPublishFormModule {}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "DotParseHtmlService" + }, + { + "name": "DotcmsConfigService" + }, + { + "name": "PushPublishService" + } + ] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotPushPublishFormComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotDialogModule" + }, + { + "name": "DotFieldValidationMessageModule" + }, + { + "name": "PushPublishEnvSelectorModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotPushPublishFormComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotRelationshipsModule", + "id": "module-DotRelationshipsModule-8ecd0642309c2ed2bffd4fea0877419b2d22110abe5df55624937a54a89b0dcd30abe524045cd4246329ad8369ae7781e21207b9d3133b788b9db0425af13691", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/components/fields/content-type-fields-properties-form/field-properties/dot-relationships-property/dot-relationships.module.ts", + "methods": [], + "sourceCode": "import { DotRelationshipsPropertyComponent } from './dot-relationships-property.component';\nimport { DotCardinalitySelectorComponent } from './dot-cardinality-selector/dot-cardinality-selector.component';\nimport { DotRelationshipService } from './services/dot-relationship.service';\nimport { DotEditContentTypeCacheService } from './services/dot-edit-content-type-cache.service';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { DotFieldValidationMessageModule } from '@components/_common/dot-field-validation-message/dot-file-validation-message.module';\nimport { SearchableDropDownModule } from '@components/_common/searchable-dropdown';\nimport { DotNewRelationshipsComponent } from './dot-new-relationships/dot-new-relationships.component';\nimport { DotEditRelationshipsComponent } from './dot-edit-relationship/dot-edit-relationships.component';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\nimport { DropdownModule } from 'primeng/dropdown';\nimport { RadioButtonModule } from 'primeng/radiobutton';\n\n@NgModule({\n declarations: [\n DotRelationshipsPropertyComponent,\n DotNewRelationshipsComponent,\n DotCardinalitySelectorComponent,\n DotEditRelationshipsComponent\n ],\n entryComponents: [DotRelationshipsPropertyComponent],\n exports: [DotRelationshipsPropertyComponent],\n imports: [\n CommonModule,\n DropdownModule,\n DotFieldValidationMessageModule,\n FormsModule,\n RadioButtonModule,\n SearchableDropDownModule,\n DotPipesModule\n ],\n providers: [DotRelationshipService, DotEditContentTypeCacheService]\n})\nexport class DotRelationshipsModule {}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "DotEditContentTypeCacheService" + }, + { + "name": "DotRelationshipService" + } + ] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotCardinalitySelectorComponent" + }, + { + "name": "DotEditRelationshipsComponent" + }, + { + "name": "DotNewRelationshipsComponent" + }, + { + "name": "DotRelationshipsPropertyComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotFieldValidationMessageModule" + }, + { + "name": "SearchableDropDownModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotRelationshipsPropertyComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotRelationshipTreeModule", + "id": "module-DotRelationshipTreeModule-f8ce1876e9b9e50db7cd48cf600094c27d9d997dbb711ce83c3d12edfe7fa4f3a67577128574dfd04eb2d0ab1f67aeffc88e24c6e38f08e1cfe01a2d1bc5c0cb", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/dot-relationship-tree/dot-relationship-tree.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotRelationshipTreeComponent } from './dot-relationship-tree.component';\nimport { DotCopyButtonModule } from '@components/dot-copy-button/dot-copy-button.module';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\nimport { DotIconModule } from '@dotcms/ui';\n\n@NgModule({\n declarations: [DotRelationshipTreeComponent],\n exports: [DotRelationshipTreeComponent],\n imports: [CommonModule, DotCopyButtonModule, DotPipesModule, DotIconModule]\n})\nexport class DotRelationshipTreeModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotRelationshipTreeComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotCopyButtonModule" + }, + { + "name": "DotIconModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotRelationshipTreeComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotRulesModule", + "id": "module-DotRulesModule-967e177240af53092ef1d6d8e68a99aaf052191733f40fb48edad117253557baf9dc2dd45e7317e0f2f61f6777aa0c7a35cc3dc3fc1d280b67c0dc274407c7e8", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/dot-rules/dot-rules.module.ts", + "methods": [], + "sourceCode": "import { RouterModule, Routes } from '@angular/router';\nimport { NgModule } from '@angular/core';\nimport { RuleEngineModule } from '@dotcms/dot-rules';\nimport { AppRulesComponent } from '@dotcms/dot-rules';\nimport { ApiRoot } from '@dotcms/dotcms-js'\n\nconst routes: Routes = [\n {\n component: AppRulesComponent,\n path: ''\n }\n];\n\n@NgModule({\n imports: [RuleEngineModule, RouterModule.forChild(routes)],\n declarations: [],\n providers: [ApiRoot],\n exports: [AppRulesComponent],\n})\nexport class DotRulesModule {}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "ApiRoot" + } + ] + }, + { + "type": "declarations", + "elements": [] + }, + { + "type": "imports", + "elements": [ + { + "name": "RuleEngineModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "AppRulesComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotSecondaryToolbarModule", + "id": "module-DotSecondaryToolbarModule-f1bcfd1c79cbba2a5a2f91443b9478e6d9bba6497f763b7a9cbcbb1934b4ae50812de35cbc1276ab7eb34c7b052977cdf05320e187df4b2ff3289a3d65fa99ba", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/dot-secondary-toolbar/dot-secondary-toolbar.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotSecondaryToolbarComponent } from '@components/dot-secondary-toolbar/dot-secondary-toolbar.component';\n\n@NgModule({\n imports: [CommonModule],\n declarations: [DotSecondaryToolbarComponent],\n exports: [DotSecondaryToolbarComponent],\n providers: []\n})\nexport class DotSecondaryToolbarModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotSecondaryToolbarComponent" + } + ] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotSecondaryToolbarComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotSidebarPropertiesModule", + "id": "module-DotSidebarPropertiesModule-a685f8abd03494e65de571bae858fca3308d5c87a6e65373c72c7d9c5488d2791fd7c8188e4e6a453ad60e19f75c865accb5b83b35c8b3f80fe370b12ea46ad2", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/dot-edit-layout-designer/components/dot-sidebar-properties/dot-sidebar-properties.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotSidebarPropertiesComponent } from './dot-sidebar-properties.component';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\nimport { ButtonModule } from 'primeng/button';\nimport { RadioButtonModule } from 'primeng/radiobutton';\nimport { OverlayPanelModule } from 'primeng/overlaypanel';\n\n@NgModule({\n declarations: [DotSidebarPropertiesComponent],\n imports: [\n ButtonModule,\n CommonModule,\n FormsModule,\n RadioButtonModule,\n OverlayPanelModule,\n ReactiveFormsModule,\n DotPipesModule\n ],\n exports: [DotSidebarPropertiesComponent]\n})\nexport class DotSidebarPropertiesModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotSidebarPropertiesComponent" + } + ] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotSidebarPropertiesComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotSiteBrowserModule", + "id": "module-DotSiteBrowserModule-9adb5d98096ab692962aa52267d55cb6e824c816020ab611afc53882e1eaefa673da6ea911033bf5900c5435ed3681a14a47da31052a2604710de242e205c3c9", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/dot-site-browser/dot-site-browser.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { DotSiteBrowserRoutingModule } from './dot-site-browser-routing.module';\nimport { DotSiteBrowserComponent } from './dot-site-browser.component';\nimport { DotDndFilesFoldersDirective } from './directives/dot-dnd-files-folders.directive';\n\n@NgModule({\n imports: [CommonModule, DotSiteBrowserRoutingModule],\n declarations: [DotSiteBrowserComponent, DotDndFilesFoldersDirective]\n})\nexport class DotSiteBrowserModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotDndFilesFoldersDirective" + }, + { + "name": "DotSiteBrowserComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotSiteBrowserRoutingModule" + } + ] + }, + { + "type": "exports", + "elements": [] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotSiteBrowserRoutingModule", + "id": "module-DotSiteBrowserRoutingModule-cc778665190408f0e69e054311a12bb28e2716b6926e86f396f40d358443bd943412e1d7613be58d9e718748d9bee00b22d1b8d4f5ec485edaf6e82739175f16", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/dot-site-browser/dot-site-browser-routing.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\nimport { DotSiteBrowserComponent } from './dot-site-browser.component';\n\nconst routes: Routes = [\n {\n path: '',\n component: DotSiteBrowserComponent\n }\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class DotSiteBrowserRoutingModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotSiteSelectorModule", + "id": "module-DotSiteSelectorModule-52901b8de2fb10e7e61c7859671758e96c5050be336ea81db1920516f485ff15c320348de82d7fd0e216ef2aab6662ca84115a6a0106ec85b6d3d66ba3d573f6", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/_common/dot-site-selector/dot-site-selector.module.ts", + "methods": [], + "sourceCode": "import { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { NgModule } from '@angular/core';\nimport { SearchableDropDownModule } from '../searchable-dropdown/searchable-dropdown.module';\nimport { DotSiteSelectorComponent } from './dot-site-selector.component';\n\n@NgModule({\n declarations: [DotSiteSelectorComponent],\n exports: [DotSiteSelectorComponent],\n imports: [CommonModule, FormsModule, SearchableDropDownModule]\n})\nexport class DotSiteSelectorModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotSiteSelectorComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "SearchableDropDownModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotSiteSelectorComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotSpinnerModule", + "id": "module-DotSpinnerModule-2738d9263eb7e36139c6e5778c01e73cf38b090583d11f19eed9cf671b54fdf846d10eb355b406859e977823ce9b19ebfbccee9fc5a23eac6cf24febbe96f907", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "libs/ui/src/lib/dot-spinner/dot-spinner.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotSpinnerComponent } from './dot-spinner.component';\n\n@NgModule({\n declarations: [DotSpinnerComponent],\n imports: [CommonModule],\n exports: [DotSpinnerComponent],\n providers: []\n})\nexport class DotSpinnerModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotSpinnerComponent" + } + ] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotSpinnerComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotStarterModule", + "id": "module-DotStarterModule-4d5d935898c694cd0482af629d253e99b959045912b9dc99dab3ec2da6846d4a6d28d781aa30aa1253670ad540010adac4e416bef275c94061482b25e88cbbf1", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/dot-starter/dot-starter.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { DotMessagePipeModule } from '@pipes/dot-message/dot-message-pipe.module';\nimport { DotStarterResolver } from './dot-starter-resolver.service';\nimport { DotStarterRoutingModule } from './dot-starter-routing.module';\nimport { DotStarterComponent } from './dot-starter.component';\nimport { CheckboxModule } from 'primeng/checkbox';\nimport { CommonModule } from '@angular/common';\n\n@NgModule({\n declarations: [DotStarterComponent],\n imports: [CommonModule, DotStarterRoutingModule, DotMessagePipeModule, CheckboxModule],\n providers: [DotStarterResolver]\n})\nexport class DotStarterModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotStarterComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotStarterRoutingModule" + } + ] + }, + { + "type": "exports", + "elements": [] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotStarterRoutingModule", + "id": "module-DotStarterRoutingModule-e8356306f0f8856ba7f00fe10cb7a6337157777e46a9341b3cd490e8b3b32901483c09276a0634400192e97f356c99802862582d8cdf8ffe996aadf9e6b214c0", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/dot-starter/dot-starter-routing.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\nimport { DotStarterResolver } from './dot-starter-resolver.service';\nimport { DotStarterComponent } from './dot-starter.component';\n\nconst routes: Routes = [\n {\n component: DotStarterComponent,\n path: '',\n resolve: {\n userData: DotStarterResolver\n }\n }\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class DotStarterRoutingModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotTemplateAdditionalActionsIframeModule", + "id": "module-DotTemplateAdditionalActionsIframeModule-3034da81965ee8e22a7b5201282f557eec1aaa656fa2ec0284c8b58ae99f218d3563f403407d4e08c0202cf809ca1e60ddfe74d8fb08c7dfe47a82991145084d", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/layout/components/dot-template-additional-actions/dot-legacy-template-additional-actions-iframe/dot-legacy-template-additional-actions-iframe.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { DotMenuService } from '@services/dot-menu.service';\nimport { IFrameModule } from '@components/_common/iframe/iframe.module';\nimport { DotLegacyTemplateAdditionalActionsComponent } from './dot-legacy-template-additional-actions-iframe.component';\nimport { CommonModule } from '@angular/common';\n\n@NgModule({\n declarations: [DotLegacyTemplateAdditionalActionsComponent],\n imports: [IFrameModule, CommonModule],\n exports: [DotLegacyTemplateAdditionalActionsComponent],\n providers: [DotMenuService]\n})\nexport class DotTemplateAdditionalActionsIframeModule {}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "DotMenuService" + } + ] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotLegacyTemplateAdditionalActionsComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "IFrameModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotLegacyTemplateAdditionalActionsComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotTemplateAdditionalActionsModule", + "id": "module-DotTemplateAdditionalActionsModule-2304fc8bc8def0285a12cec501cd40e3e3116ef4efe7bdd0d23a3882f8586c6192164d2f09f3f3d4a15b8fe90c05167213138569a0bcadfee9129a26b331b0e9", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/layout/components/dot-template-additional-actions/dot-template-additional-actions.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\n\nimport { DotTemplateAdditionalActionsIframeModule } from './dot-legacy-template-additional-actions-iframe/dot-legacy-template-additional-actions-iframe.module';\nimport { DotLegacyTemplateAdditionalActionsComponent } from './dot-legacy-template-additional-actions-iframe/dot-legacy-template-additional-actions-iframe.component';\nimport { IFrameModule } from '@components/_common/iframe';\n\n@NgModule({\n declarations: [],\n imports: [DotTemplateAdditionalActionsIframeModule, IFrameModule],\n exports: [DotLegacyTemplateAdditionalActionsComponent],\n providers: []\n})\nexport class DotTemplateAdditionalActionsModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotTemplateAdditionalActionsIframeModule" + }, + { + "name": "IFrameModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotLegacyTemplateAdditionalActionsComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotTemplateAdditionalActionsRoutingModule", + "id": "module-DotTemplateAdditionalActionsRoutingModule-782e9f029cf10df66d6b195ce90a92b4b8ea0f30240462e5d7bd61481972731b2cc12f5cecee01c419e662400519533e31040a164a116288ac7109f6046310ae", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/layout/components/dot-template-additional-actions/dot-template-additional-actions-routing.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\nimport { DotLegacyTemplateAdditionalActionsComponent } from './dot-legacy-template-additional-actions-iframe/dot-legacy-template-additional-actions-iframe.component';\n\nconst routes: Routes = [\n {\n path: '',\n component: DotLegacyTemplateAdditionalActionsComponent\n }\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class DotTemplateAdditionalActionsRoutingModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotTemplateAdvancedModule", + "id": "module-DotTemplateAdvancedModule-74180a68b91fd307735a2836496ebf32f6211887f873435183a4abcc3740633b74c5abe8340259c45ae7185594b6de5875c8e537c4e0e4a9ac396940372c6865", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/dot-templates/dot-template-create-edit/dot-template-advanced/dot-template-advanced.module.ts", + "methods": [], + "sourceCode": "import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { DotTemplateAdvancedComponent } from './dot-template-advanced.component';\nimport { DotTextareaContentModule } from '@components/_common/dot-textarea-content/dot-textarea-content.module';\nimport { DotContainerSelectorModule } from '@components/dot-container-selector/dot-container-selector.module';\nimport { DotPortletBaseModule } from '@components/dot-portlet-base/dot-portlet-base.module';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { DotGlobalMessageModule } from '@components/_common/dot-global-message/dot-global-message.module';\n\n@NgModule({\n declarations: [DotTemplateAdvancedComponent],\n exports: [DotTemplateAdvancedComponent],\n imports: [\n CommonModule,\n DotContainerSelectorModule,\n DotTextareaContentModule,\n DotPortletBaseModule,\n ReactiveFormsModule,\n DotGlobalMessageModule\n ],\n providers: []\n})\nexport class DotTemplateAdvancedModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotTemplateAdvancedComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotContainerSelectorModule" + }, + { + "name": "DotGlobalMessageModule" + }, + { + "name": "DotPortletBaseModule" + }, + { + "name": "DotTextareaContentModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotTemplateAdvancedComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotTemplateBuilderModule", + "id": "module-DotTemplateBuilderModule-ce86fa54dc6e5348adba7c314cf2591f9dff2e22c1dbc245762ad673ecc7fdb4384ea0369c51022f0dba77be658851db4ea66af4568615fd2aabfcebd0305577", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/dot-templates/dot-template-create-edit/dot-template-builder/dot-template-builder.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotTemplateBuilderComponent } from './dot-template-builder.component';\nimport { DotEditLayoutDesignerModule } from '@components/dot-edit-layout-designer/dot-edit-layout-designer.module';\nimport { TabViewModule } from 'primeng/tabview';\nimport { DotTemplateAdvancedModule } from '../dot-template-advanced/dot-template-advanced.module';\nimport { DotMessagePipeModule } from '@pipes/dot-message/dot-message-pipe.module';\nimport { IFrameModule } from '@components/_common/iframe';\nimport { DotPortletBoxModule } from '@components/dot-portlet-base/components/dot-portlet-box/dot-portlet-box.module';\n\n@NgModule({\n imports: [\n CommonModule,\n DotEditLayoutDesignerModule,\n DotMessagePipeModule,\n DotTemplateAdvancedModule,\n TabViewModule,\n IFrameModule,\n DotPortletBoxModule\n ],\n declarations: [DotTemplateBuilderComponent],\n exports: [DotTemplateBuilderComponent]\n})\nexport class DotTemplateBuilderModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotTemplateBuilderComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotEditLayoutDesignerModule" + }, + { + "name": "DotPortletBoxModule" + }, + { + "name": "DotTemplateAdvancedModule" + }, + { + "name": "IFrameModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotTemplateBuilderComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotTemplateCreateEditModule", + "id": "module-DotTemplateCreateEditModule-b6ac4ef1ef9b30968ca41a4fbb39aba37b1f18a3cc44161fa9194630934dc8ab2834c6ad06683cb19b274a4cfd160a1398f84de4f4b3979a35937f2f1bf09bde", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/dot-templates/dot-template-create-edit/dot-template-create-edit.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { DialogService, DynamicDialogModule } from 'primeng/dynamicdialog';\nimport { ButtonModule } from 'primeng/button';\n\nimport { DotTemplateCreateEditComponent } from './dot-template-create-edit.component';\nimport { DotTemplateCreateEditRoutingModule } from './dot-template-create-edit-routing.module';\nimport { DotPortletBaseModule } from '@components/dot-portlet-base/dot-portlet-base.module';\nimport { DotApiLinkModule } from '@components/dot-api-link/dot-api-link.module';\nimport { DotTemplatePropsModule } from './dot-template-props/dot-template-props.module';\nimport { DotTemplateBuilderModule } from './dot-template-builder/dot-template-builder.module';\nimport { DotMessagePipeModule } from '@pipes/dot-message/dot-message-pipe.module';\n\n@NgModule({\n imports: [\n ButtonModule,\n CommonModule,\n DotApiLinkModule,\n DotPortletBaseModule,\n DotTemplateCreateEditRoutingModule,\n DotTemplatePropsModule,\n DynamicDialogModule,\n DotTemplateBuilderModule,\n DotMessagePipeModule\n ],\n declarations: [DotTemplateCreateEditComponent],\n providers: [DialogService]\n})\nexport class DotTemplateCreateEditModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotTemplateCreateEditComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotApiLinkModule" + }, + { + "name": "DotPortletBaseModule" + }, + { + "name": "DotTemplateBuilderModule" + }, + { + "name": "DotTemplateCreateEditRoutingModule" + }, + { + "name": "DotTemplatePropsModule" + } + ] + }, + { + "type": "exports", + "elements": [] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotTemplateCreateEditRoutingModule", + "id": "module-DotTemplateCreateEditRoutingModule-3fc95563908b80b848e1b04a3693b80169aad7d4cb0526f411c112098ceb35450d19135d30f3f6c188accf9f93cb8063bc5824e8eb3e4707479030049376e3aa", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/dot-templates/dot-template-create-edit/dot-template-create-edit-routing.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\nimport { DotTemplateCreateEditComponent } from './dot-template-create-edit.component';\n\nconst routes: Routes = [\n {\n path: '',\n component: DotTemplateCreateEditComponent\n }\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class DotTemplateCreateEditRoutingModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotTemplateListModule", + "id": "module-DotTemplateListModule-a9ce9f0b8906123857d9709895f34fdd6834dce51a8ddf3c156342103d4a7573a350cf56145dfc3976638e2d78188b1173ad122568891e48b534d9d9e0f4c773", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/dot-templates/dot-template-list/dot-template-list.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotTemplateListComponent } from './dot-template-list.component';\nimport { DotTemplateListResolver } from '@portlets/dot-templates/dot-template-list/dot-template-list-resolver.service';\nimport { DotTemplatesService } from '@services/dot-templates/dot-templates.service';\nimport { DotListingDataTableModule } from '@components/dot-listing-data-table';\nimport { SharedModule } from 'primeng/api';\nimport { CheckboxModule } from 'primeng/checkbox';\nimport { MenuModule } from 'primeng/menu';\nimport { ButtonModule } from 'primeng/button';\nimport { DotActionButtonModule } from '@components/_common/dot-action-button/dot-action-button.module';\nimport { DotActionMenuButtonModule } from '@components/_common/dot-action-menu-button/dot-action-menu-button.module';\nimport { DotAddToBundleModule } from '@components/_common/dot-add-to-bundle';\nimport { DotBulkInformationModule } from '@components/_common/dot-bulk-information/dot-bulk-information.module';\nimport { DialogService, DynamicDialogModule } from 'primeng/dynamicdialog';\nimport { DotMessagePipeModule } from '@pipes/dot-message/dot-message-pipe.module';\nimport { DotTemplateSelectorModule } from './components/dot-template-selector/dot-template-selector.module';\nimport { DotEmptyStateModule } from '@components/_common/dot-empty-state/dot-empty-state.module';\nimport { DotSiteBrowserService } from '@services/dot-site-browser/dot-site-browser.service';\n\n@NgModule({\n declarations: [DotTemplateListComponent],\n imports: [\n CommonModule,\n DotListingDataTableModule,\n DotMessagePipeModule,\n SharedModule,\n CheckboxModule,\n MenuModule,\n ButtonModule,\n DotActionButtonModule,\n DotActionMenuButtonModule,\n DotAddToBundleModule,\n DynamicDialogModule,\n DotBulkInformationModule,\n DotTemplateSelectorModule,\n DotEmptyStateModule\n ],\n providers: [DotTemplateListResolver, DotTemplatesService, DialogService, DotSiteBrowserService]\n})\nexport class DotTemplateListModule {}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "DotSiteBrowserService" + }, + { + "name": "DotTemplatesService" + } + ] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotTemplateListComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotActionButtonModule" + }, + { + "name": "DotActionMenuButtonModule" + }, + { + "name": "DotAddToBundleModule" + }, + { + "name": "DotBulkInformationModule" + }, + { + "name": "DotEmptyStateModule" + }, + { + "name": "DotListingDataTableModule" + }, + { + "name": "DotTemplateSelectorModule" + }, + { + "name": "SharedModule" + } + ] + }, + { + "type": "exports", + "elements": [] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotTemplateNewModule", + "id": "module-DotTemplateNewModule-81a7ba3275daf7b528abb4d02edfda5040dd83b35fec6bf29ebcd27c968aa882fc1d661606a0731284f9f7c689b0272b7e4b5532b38e7396cb7fd301456aadac", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/dot-templates/dot-template-create-edit/dot-template-new/dot-template-new.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotTemplateNewComponent } from './dot-template-new.component';\nimport { DotTemplateNewRoutingModule } from './dot-template-new-routing.module';\nimport { DotTemplateGuard } from './guards/dot-template.guard';\n\n@NgModule({\n declarations: [DotTemplateNewComponent],\n imports: [CommonModule, DotTemplateNewRoutingModule],\n providers: [DotTemplateGuard]\n})\nexport class DotTemplateNewModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotTemplateNewComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotTemplateNewRoutingModule" + } + ] + }, + { + "type": "exports", + "elements": [] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotTemplateNewRoutingModule", + "id": "module-DotTemplateNewRoutingModule-2a830216e2e0c5f9ab28799b618dfff1851c2c3d6a17192b1814eccdf9b4139e6ba659458bdae5cfece6ac5af485e0edc40f4bd59377f68688977185ac0f2c0f", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/dot-templates/dot-template-create-edit/dot-template-new/dot-template-new-routing.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\nimport { DotTemplateGuard } from '@portlets/dot-templates/dot-template-create-edit/dot-template-new/guards/dot-template.guard';\nimport { DotTemplateNewComponent } from './dot-template-new.component';\n\nconst routes: Routes = [\n {\n path: '',\n component: DotTemplateNewComponent\n },\n {\n path: ':type',\n loadChildren: () =>\n \"import(\\\n '@portlets/dot-templates/dot-template-create-edit/dot-template-create-edit.module.ts'\\\n ).then((m) => m.DotTemplateCreateEditModule)\",\n canLoad: [DotTemplateGuard]\n }\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class DotTemplateNewRoutingModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotTemplatePropsModule", + "id": "module-DotTemplatePropsModule-ebd7b1f0a147603c57b8e8843ce5333a37f9cb283b533f09bf27e8dd58630e7a3e8939d2fea05e491b71f3005c5ceb13e311fff9111acb13ae66503047d1ec6f", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/dot-templates/dot-template-create-edit/dot-template-props/dot-template-props.module.ts", + "methods": [], + "sourceCode": "import { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { InputTextModule } from 'primeng/inputtext';\nimport { InputTextareaModule } from 'primeng/inputtextarea';\n\nimport { DotTemplatePropsComponent } from './dot-template-props.component';\nimport { DotFormDialogModule } from '@components/dot-form-dialog/dot-form-dialog.module';\nimport { DotFieldValidationMessageModule } from '@components/_common/dot-field-validation-message/dot-file-validation-message.module';\nimport { DotMessagePipeModule } from '@pipes/dot-message/dot-message-pipe.module';\nimport { DotTemplateThumbnailFieldModule } from './dot-template-thumbnail-field/dot-template-thumbnail-field.module';\nimport { DotThemeSelectorDropdownModule } from '@components/dot-theme-selector-dropdown/dot-theme-selector-dropdown.module';\n\n@NgModule({\n declarations: [DotTemplatePropsComponent],\n imports: [\n CommonModule,\n DotFieldValidationMessageModule,\n DotFormDialogModule,\n FormsModule,\n InputTextModule,\n InputTextareaModule,\n ReactiveFormsModule,\n DotMessagePipeModule,\n DotTemplateThumbnailFieldModule,\n DotThemeSelectorDropdownModule\n ]\n})\nexport class DotTemplatePropsModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotTemplatePropsComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotFieldValidationMessageModule" + }, + { + "name": "DotFormDialogModule" + }, + { + "name": "DotTemplateThumbnailFieldModule" + }, + { + "name": "DotThemeSelectorDropdownModule" + } + ] + }, + { + "type": "exports", + "elements": [] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotTemplateSelectorModule", + "id": "module-DotTemplateSelectorModule-73c9b71c7ca976d3553ecf71ee3b14d449b82b29611d078d5d8ae45e219d4271d79bbb6da9a0d074a0e5647adce0655b0600b24eecd8c1772560ace875f799c7", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/dot-templates/dot-template-list/components/dot-template-selector/dot-template-selector.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotTemplateSelectorComponent } from './dot-template-selector.component';\nimport { DotIconModule } from '@dotcms/ui';\nimport { FormsModule } from '@angular/forms';\nimport { ButtonModule } from 'primeng/button';\nimport { DotMessagePipeModule } from '@pipes/dot-message/dot-message-pipe.module';\n\n@NgModule({\n declarations: [DotTemplateSelectorComponent],\n imports: [CommonModule, DotIconModule, FormsModule, ButtonModule, DotMessagePipeModule]\n})\nexport class DotTemplateSelectorModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotTemplateSelectorComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotIconModule" + } + ] + }, + { + "type": "exports", + "elements": [] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotTemplatesModule", + "id": "module-DotTemplatesModule-7ef2a8c6ff7e67bc5746f486de78486e7dff61e01399faff3b52ef2d905727dbd11720fa04cf8d71adbd28e9bf3cd07af46678d9b0279dccd6ec8ad8022917cd", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/dot-templates/dot-templates.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { DotTemplatesRoutingModule } from './dot-templates-routing.module';\nimport { DotTemplatesService } from '@services/dot-templates/dot-templates.service';\nimport { DotTemplateListModule } from '@portlets/dot-templates/dot-template-list/dot-template-list.module';\nimport { DotTemplateCreateEditResolver } from './dot-template-create-edit/resolvers/dot-template-create-edit.resolver';\nimport { LayoutEditorCanDeactivateGuardService } from '@services/guards/layout-editor-can-deactivate-guard.service';\n\n@NgModule({\n declarations: [],\n imports: [CommonModule, DotTemplatesRoutingModule, DotTemplateListModule],\n providers: [DotTemplatesService, DotTemplateCreateEditResolver, LayoutEditorCanDeactivateGuardService]\n})\nexport class DotTemplatesModule {}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "DotTemplatesService" + } + ] + }, + { + "type": "declarations", + "elements": [] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotTemplateListModule" + }, + { + "name": "DotTemplatesRoutingModule" + } + ] + }, + { + "type": "exports", + "elements": [] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotTemplatesRoutingModule", + "id": "module-DotTemplatesRoutingModule-d5b9506776dccffacc08b980a559763709a120283f6c13b54b7adad811b8046a210cd74bde724557235c71bf669fa99b6f576a807721b9d5daa138534fbfd3a7", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/dot-templates/dot-templates-routing.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\nimport { DotTemplateListComponent } from '@portlets/dot-templates/dot-template-list/dot-template-list.component';\nimport { DotTemplateListResolver } from '@portlets/dot-templates/dot-template-list/dot-template-list-resolver.service';\nimport { DotTemplateCreateEditResolver } from './dot-template-create-edit/resolvers/dot-template-create-edit.resolver';\nimport { LayoutEditorCanDeactivateGuardService } from '@services/guards/layout-editor-can-deactivate-guard.service';\n \nconst routes: Routes = [\n {\n path: '',\n component: DotTemplateListComponent,\n resolve: {\n dotTemplateListResolverData: DotTemplateListResolver\n },\n data: {\n reuseRoute: false\n }\n },\n {\n path: 'new',\n loadChildren: () =>\n \"import(\\\n '@portlets/dot-templates/dot-template-create-edit/dot-template-new/dot-template-new.module.ts'\\\n ).then((m) => m.DotTemplateNewModule)\"\n },\n {\n path: 'edit/:id',\n canDeactivate: [LayoutEditorCanDeactivateGuardService],\n loadChildren: () =>\n \"import(\\\n '@portlets/dot-templates/dot-template-create-edit/dot-template-create-edit.module.ts'\\\n ).then((m) => m.DotTemplateCreateEditModule)\",\n resolve: {\n template: DotTemplateCreateEditResolver\n }\n },\n {\n path: 'edit/:id/inode/:inode',\n loadChildren: () =>\n \"import(\\\n '@portlets/dot-templates/dot-template-create-edit/dot-template-create-edit.module.ts'\\\n ).then((m) => m.DotTemplateCreateEditModule)\",\n data: {\n reuseRoute: false\n },\n resolve: {\n template: DotTemplateCreateEditResolver\n }\n }\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class DotTemplatesRoutingModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotTemplateThumbnailFieldModule", + "id": "module-DotTemplateThumbnailFieldModule-3d43b13a993f496dc75477ff10a8a0aa0709ba28a1d483261c08a6b6470b4ac094b163ed20248ef1ad4e40c883a1101ae8240bd795384ccacd172067488974c5", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/dot-templates/dot-template-create-edit/dot-template-props/dot-template-thumbnail-field/dot-template-thumbnail-field.module.ts", + "methods": [], + "sourceCode": "import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { DotTempFileUploadService } from '@services/dot-temp-file-upload/dot-temp-file-upload.service';\nimport { DotWorkflowActionsFireService } from '@services/dot-workflow-actions-fire/dot-workflow-actions-fire.service';\nimport { DotTemplateThumbnailFieldComponent } from './dot-template-thumbnail-field.component';\n\n@NgModule({\n imports: [CommonModule],\n declarations: [DotTemplateThumbnailFieldComponent],\n exports: [DotTemplateThumbnailFieldComponent],\n providers: [DotTempFileUploadService, DotWorkflowActionsFireService],\n schemas: [CUSTOM_ELEMENTS_SCHEMA]\n})\nexport class DotTemplateThumbnailFieldModule {}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "DotTempFileUploadService" + }, + { + "name": "DotWorkflowActionsFireService" + } + ] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotTemplateThumbnailFieldComponent" + } + ] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotTemplateThumbnailFieldComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotTextareaContentModule", + "id": "module-DotTextareaContentModule-8fa0f47d77959fe15ff6751070c93fea16112f7796686585e933dfce0907dcd3fd502e1c0a503485c5129a8a578a5455dcc05794b01761d5688626ff205af7d8", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/_common/dot-textarea-content/dot-textarea-content.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotTextareaContentComponent } from './dot-textarea-content.component';\nimport { SelectButtonModule } from 'primeng/selectbutton';\nimport { FormsModule } from '@angular/forms';\nimport { MonacoEditorModule } from 'ngx-monaco-editor';\n\n@NgModule({\n imports: [CommonModule, SelectButtonModule, FormsModule, MonacoEditorModule],\n declarations: [DotTextareaContentComponent],\n exports: [DotTextareaContentComponent]\n})\nexport class DotTextareaContentModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotTextareaContentComponent" + } + ] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotTextareaContentComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotThemeSelectorDropdownModule", + "id": "module-DotThemeSelectorDropdownModule-89a338a06489d9d0fef88edf0f4ce338e367344395882a5074b88202021dd2372ffcd6f73f6c1b6e8d1f5f69abde788ed2b04b10d3ad720cd9d677c9a856f1c3", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/dot-theme-selector-dropdown/dot-theme-selector-dropdown.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotThemeSelectorDropdownComponent } from './dot-theme-selector-dropdown.component';\nimport { PaginatorService } from '@services/paginator';\nimport { SearchableDropDownModule } from '@components/_common/searchable-dropdown';\nimport { FormsModule } from '@angular/forms';\nimport { DotThemesService } from '@services/dot-themes/dot-themes.service';\nimport { DotMessagePipeModule } from '@pipes/dot-message/dot-message-pipe.module';\nimport { DotSiteSelectorModule } from '@components/_common/dot-site-selector/dot-site-selector.module';\nimport { InputTextModule } from 'primeng/inputtext';\nimport { DotIconModule } from '@dotcms/ui';\n\n@NgModule({\n declarations: [DotThemeSelectorDropdownComponent],\n exports: [DotThemeSelectorDropdownComponent],\n providers: [PaginatorService, DotThemesService],\n imports: [\n CommonModule,\n SearchableDropDownModule,\n FormsModule,\n DotMessagePipeModule,\n DotSiteSelectorModule,\n InputTextModule,\n DotIconModule\n ]\n})\nexport class DotThemeSelectorDropdownModule {}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "DotThemesService" + }, + { + "name": "PaginatorService" + } + ] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotThemeSelectorDropdownComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotIconModule" + }, + { + "name": "DotSiteSelectorModule" + }, + { + "name": "SearchableDropDownModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotThemeSelectorDropdownComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotThemeSelectorModule", + "id": "module-DotThemeSelectorModule-7c9236ea22962dd36d99be08d3d086e7c855b49ed56f49c9023bd9278629f8877d14c58e79184fe52700973e96f2f59069c33370ae701c5ba30a09246e08d65c", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/dot-edit-layout-designer/components/dot-theme-selector/dot-theme-selector.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotThemeSelectorComponent } from './dot-theme-selector.component';\nimport { DotThemesService } from '@services/dot-themes/dot-themes.service';\n\nimport { FormsModule } from '@angular/forms';\nimport { DotSiteSelectorModule } from '@components/_common/dot-site-selector/dot-site-selector.module';\nimport { DotIconModule } from '@dotcms/ui';\nimport { DotDialogModule } from '@components/dot-dialog/dot-dialog.module';\nimport { PaginatorService } from '@services/paginator';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\nimport { DropdownModule } from 'primeng/dropdown';\nimport { ButtonModule } from 'primeng/button';\nimport { DialogModule } from 'primeng/dialog';\nimport { InputTextModule } from 'primeng/inputtext';\nimport { DataViewModule } from 'primeng/dataview';\n\n@NgModule({\n declarations: [DotThemeSelectorComponent],\n imports: [\n CommonModule,\n DropdownModule,\n ButtonModule,\n FormsModule,\n DialogModule,\n DotSiteSelectorModule,\n InputTextModule,\n DataViewModule,\n DotDialogModule,\n DotIconModule,\n DotPipesModule\n ],\n exports: [DotThemeSelectorComponent],\n providers: [DotThemesService, PaginatorService]\n})\nexport class DotThemeSelectorModule {}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "DotThemesService" + }, + { + "name": "PaginatorService" + } + ] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotThemeSelectorComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotDialogModule" + }, + { + "name": "DotIconModule" + }, + { + "name": "DotSiteSelectorModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotThemeSelectorComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotToolbarModule", + "id": "module-DotToolbarModule-96d1dc8249a094a78397b13f177367f800d5bf2b0d2b08e2546e11803931fc57fc997e9eda7d6dc2205af299a8fa6c67ebaf53e6d43e1f79058a4438df7f28c3", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/dot-toolbar/dot-toolbar.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { DotCrumbtrailModule } from '@components/dot-crumbtrail/dot-crumbtrail.module';\nimport { UiDotIconButtonModule } from '@components/_common/dot-icon-button/dot-icon-button.module';\nimport { DotSiteSelectorModule } from '@components/_common/dot-site-selector/dot-site-selector.module';\nimport { DotToolbarComponent } from './dot-toolbar.component';\nimport { DotToolbarNotificationModule } from './components/dot-toolbar-notifications/dot-toolbar-notifications.module';\nimport { DotToolbarUserModule } from './components/dot-toolbar-user/dot-toolbar-user.module';\nimport { ButtonModule } from 'primeng/button';\nimport { ToolbarModule } from 'primeng/toolbar';\n\n@NgModule({\n imports: [\n ButtonModule,\n CommonModule,\n DotCrumbtrailModule,\n UiDotIconButtonModule,\n DotSiteSelectorModule,\n DotToolbarNotificationModule,\n DotToolbarUserModule,\n ToolbarModule\n ],\n declarations: [DotToolbarComponent],\n exports: [DotToolbarComponent]\n})\nexport class DotToolbarModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotToolbarComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotCrumbtrailModule" + }, + { + "name": "DotSiteSelectorModule" + }, + { + "name": "DotToolbarNotificationModule" + }, + { + "name": "DotToolbarUserModule" + }, + { + "name": "UiDotIconButtonModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotToolbarComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotToolbarNotificationModule", + "id": "module-DotToolbarNotificationModule-033e0aafe26fa0a2a0679e71b9a034fb6ab8e3fd35ff1e47eed8a763304fc791e67d48b3c0b7cea6a56b9a2da92ce1ad7f92658d3b88dc3aab208e378d459d01", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/dot-toolbar/components/dot-toolbar-notifications/dot-toolbar-notifications.module.ts", + "methods": [], + "sourceCode": "import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { ButtonModule } from 'primeng/button';\n\nimport { DotToolbarNotificationsComponent } from './dot-toolbar-notifications.component';\nimport {\n DotNotificationsItemComponent,\n DotNotificationsListComponent\n} from './components/dot-notifications/dot-notifications.component';\nimport { DotDropdownModule } from '@components/_common/dot-dropdown-component/dot-dropdown.module';\nimport { DotCustomTimeModule } from '@components/_common/dot-custom-time.component/dot-custom-time.module';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\nimport { UiDotIconButtonModule } from '@components/_common/dot-icon-button/dot-icon-button.module';\n\n@NgModule({\n imports: [\n CommonModule,\n DotDropdownModule,\n ButtonModule,\n DotCustomTimeModule,\n DotPipesModule,\n UiDotIconButtonModule\n ],\n exports: [DotToolbarNotificationsComponent],\n declarations: [\n DotToolbarNotificationsComponent,\n DotNotificationsItemComponent,\n DotNotificationsListComponent\n ],\n providers: []\n})\nexport class DotToolbarNotificationModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotNotificationsItemComponent" + }, + { + "name": "DotNotificationsListComponent" + }, + { + "name": "DotToolbarNotificationsComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotCustomTimeModule" + }, + { + "name": "DotDropdownModule" + }, + { + "name": "UiDotIconButtonModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotToolbarNotificationsComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotToolbarUserModule", + "id": "module-DotToolbarUserModule-78d0adaa0030c4e363fcf786034ce80fe8f4395c9819c59bc1d15a09c4c9c987232de0523ea6e0f5507eb4e5d93f908ef647f65fae84139da053fc6ba9d148df", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/dot-toolbar/components/dot-toolbar-user/dot-toolbar-user.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { DotDropdownModule } from '@components/_common/dot-dropdown-component/dot-dropdown.module';\nimport { DotGravatarModule } from '../dot-gravatar/dot-gravatar.module';\nimport { DotLoginAsModule } from '../dot-login-as/dot-login-as.module';\nimport { DotMyAccountModule } from '../dot-my-account/dot-my-account.module';\nimport { DotToolbarUserComponent } from './dot-toolbar-user.component';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\n\n@NgModule({\n imports: [\n CommonModule,\n DotDropdownModule,\n DotGravatarModule,\n DotLoginAsModule,\n DotMyAccountModule,\n DotPipesModule\n ],\n declarations: [DotToolbarUserComponent],\n exports: [DotToolbarUserComponent]\n})\nexport class DotToolbarUserModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotToolbarUserComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotDropdownModule" + }, + { + "name": "DotGravatarModule" + }, + { + "name": "DotLoginAsModule" + }, + { + "name": "DotMyAccountModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotToolbarUserComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotUnlicensedPorletModule", + "id": "module-DotUnlicensedPorletModule-dc8a800f2e62f138db62981e1a6ff723134d1403b78f15608111a365dcf28977289fe664192234f25d27df4cf511c649c65a9a7fcbbf9427133d1a9ad1c15064", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/shared/dot-unlicensed-porlet/dot-unlicensed-porlet.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotUnlicensedPorletComponent } from './dot-unlicensed-porlet.component';\nimport { ButtonModule } from 'primeng/button';\nimport { DotIconModule } from '@dotcms/ui';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\n\n@NgModule({\n imports: [CommonModule, ButtonModule, DotIconModule, DotPipesModule],\n declarations: [DotUnlicensedPorletComponent],\n exports: [DotUnlicensedPorletComponent]\n})\nexport class DotUnlicensedPorletModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotUnlicensedPorletComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotIconModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotUnlicensedPorletComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotUnlicenseModule", + "id": "module-DotUnlicenseModule-4abd5fae741a790a586f6e1a539ecbd3a70091beec21f565d65eff80aa906b963afdeceaabf7cf0ba270c65cc233fb8215d6955d90a977a83f40a05ae13535f5", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "libs/dot-rules/src/lib/components/dot-unlicense/dot-unlicense.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { DotUnlicenseComponent } from './dot-unlicense.component';\nimport { I18nService } from '../../services/system/locale/I18n';\n\n@NgModule({\n imports: [],\n declarations: [DotUnlicenseComponent],\n providers: [I18nService],\n exports: [DotUnlicenseComponent]\n})\nexport class DotUnlicenseModule {}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "I18nService" + } + ] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotUnlicenseComponent" + } + ] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotUnlicenseComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotWhatsChangedModule", + "id": "module-DotWhatsChangedModule-bd1ba82908d07131bcc647298f0a66615100a4147b49121e85a2cc129c3828db03007d7b537cd3b8a5dd95e38361a203b7a88cda7833a22e5f0532c7596f3961", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/content/components/dot-whats-changed/dot-whats-changed.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotWhatsChangedComponent } from './dot-whats-changed.component';\nimport { IFrameModule } from '@components/_common/iframe';\n\n@NgModule({\n imports: [CommonModule, IFrameModule],\n declarations: [DotWhatsChangedComponent],\n exports: [DotWhatsChangedComponent]\n})\nexport class DotWhatsChangedModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotWhatsChangedComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "IFrameModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotWhatsChangedComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotWizardModule", + "id": "module-DotWizardModule-f4541e4fc74840013b48ca34ca24e23a1eed7e55b076ad3dc30a1eaf86477b15ba6f622b9c8c82d0a242b7f7aeb63473aacb964586fa061fd522fe65f86ab9b5", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/_common/dot-wizard/dot-wizard.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\nimport { DotWizardComponent } from '@components/_common/dot-wizard/dot-wizard.component';\nimport { DotCommentAndAssignFormModule } from '@components/_common/forms/dot-comment-and-assign-form/dot-comment-and-assign-form.module';\nimport { DotPushPublishFormModule } from '@components/_common/forms/dot-push-publish-form/dot-push-publish-form.module';\nimport { DotDialogModule } from '@components/dot-dialog/dot-dialog.module';\nimport { DotContainerReferenceModule } from '@directives/dot-container-reference/dot-container-reference.module';\nimport { DotCommentAndAssignFormComponent } from '@components/_common/forms/dot-comment-and-assign-form/dot-comment-and-assign-form.component';\nimport { DotPushPublishFormComponent } from '@components/_common/forms/dot-push-publish-form/dot-push-publish-form.component';\nimport { DotWizardService } from '@services/dot-wizard/dot-wizard.service';\n\n@NgModule({\n imports: [\n CommonModule,\n DotPipesModule,\n DotCommentAndAssignFormModule,\n DotPushPublishFormModule,\n DotDialogModule,\n DotContainerReferenceModule\n ],\n declarations: [DotWizardComponent],\n exports: [DotWizardComponent],\n entryComponents: [DotCommentAndAssignFormComponent, DotPushPublishFormComponent],\n providers: [DotWizardService]\n})\nexport class DotWizardModule {}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "DotWizardService" + } + ] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotWizardComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotCommentAndAssignFormModule" + }, + { + "name": "DotContainerReferenceModule" + }, + { + "name": "DotDialogModule" + }, + { + "name": "DotPushPublishFormModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotWizardComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotWorkflowsActionsSelectorFieldModule", + "id": "module-DotWorkflowsActionsSelectorFieldModule-72c3d6d900c19ed87ed4c3519b8536e38e5cf5389bc6532f3653cf4ffce0bde625445029e7a4dd9b8791825065ef4ecc528177b2d35c719f87de95741ff6ff36", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/_common/dot-workflows-actions-selector-field/dot-workflows-actions-selector-field.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\n\nimport { DropdownModule } from 'primeng/dropdown';\n\nimport { DotWorkflowsActionsSelectorFieldComponent } from './dot-workflows-actions-selector-field.component';\nimport { DotWorkflowsActionsService } from '@services/dot-workflows-actions/dot-workflows-actions.service';\nimport { DotWorkflowsActionsSelectorFieldService } from './services/dot-workflows-actions-selector-field.service';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\n\n@NgModule({\n providers: [DotWorkflowsActionsService, DotWorkflowsActionsSelectorFieldService],\n declarations: [DotWorkflowsActionsSelectorFieldComponent],\n exports: [DotWorkflowsActionsSelectorFieldComponent],\n imports: [CommonModule, DropdownModule, FormsModule, DotPipesModule]\n})\nexport class DotWorkflowsActionsSelectorFieldModule {}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "DotWorkflowsActionsSelectorFieldService" + }, + { + "name": "DotWorkflowsActionsService" + } + ] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotWorkflowsActionsSelectorFieldComponent" + } + ] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotWorkflowsActionsSelectorFieldComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotWorkflowsSelectorFieldModule", + "id": "module-DotWorkflowsSelectorFieldModule-8df027412f5c23de2e00ce0c9eafd8b870a55d4a992c54445b06137f5f786fc1439d658e9a1dc950377ff59d41c76c6edae5ff5e23865e4c226287515fe883fc", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/_common/dot-workflows-selector-field/dot-workflows-selector-field.module.ts", + "methods": [], + "sourceCode": "import { MultiSelectModule } from 'primeng/multiselect';\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotWorkflowsSelectorFieldComponent } from './dot-workflows-selector-field.component';\nimport { FormsModule } from '@angular/forms';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\n\n@NgModule({\n imports: [CommonModule, MultiSelectModule, FormsModule, DotPipesModule],\n declarations: [DotWorkflowsSelectorFieldComponent],\n exports: [DotWorkflowsSelectorFieldComponent]\n})\nexport class DotWorkflowsSelectorFieldModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotWorkflowsSelectorFieldComponent" + } + ] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotWorkflowsSelectorFieldComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotWorkflowTaskDetailModule", + "id": "module-DotWorkflowTaskDetailModule-e64bb2f671719ca5f2f1d70eb89fc32e2cf77809069e3a6992f8e182eacff587adf6fef3b0e46982ce589f3eee3d3582c5c71cf3aa7feccef99bb328f4be5c34", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/dot-workflow-task-detail/dot-workflow-task-detail.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotIframeDialogModule } from '../dot-iframe-dialog/dot-iframe-dialog.module';\nimport { DotWorkflowTaskDetailService } from './services/dot-workflow-task-detail.service';\nimport { DotWorkflowTaskDetailComponent } from './dot-workflow-task-detail.component';\n\n@NgModule({\n imports: [CommonModule, DotIframeDialogModule],\n declarations: [DotWorkflowTaskDetailComponent],\n exports: [DotWorkflowTaskDetailComponent],\n providers: [DotWorkflowTaskDetailService]\n})\nexport class DotWorkflowTaskDetailModule {}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "DotWorkflowTaskDetailService" + } + ] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotWorkflowTaskDetailComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotIframeDialogModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotWorkflowTaskDetailComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "DotWorkflowTaskModule", + "id": "module-DotWorkflowTaskModule-68811b29a2b8563bfab2aa79f032934300e2e3c06b324be44824113683fe6fb555cc76dfcc9f010e724f623054272d39d4d7f511a3bae595518862bc8846d8b1", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/portlets/dot-porlet-detail/dot-workflow-task/dot-workflow-task.module.ts", + "methods": [], + "sourceCode": "import { CommonModule } from '@angular/common';\nimport { DotWorkflowTaskComponent } from './dot-workflow-task.component';\nimport { NgModule } from '@angular/core';\nimport { DotWorkflowTaskDetailModule } from '@components/dot-workflow-task-detail/dot-workflow-task-detail.module';\n\n@NgModule({\n declarations: [DotWorkflowTaskComponent],\n imports: [CommonModule, DotWorkflowTaskDetailModule],\n exports: [DotWorkflowTaskComponent],\n providers: []\n})\nexport class DotWorkflowTaskModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotWorkflowTaskComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotWorkflowTaskDetailModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotWorkflowTaskComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "ForgotPasswordModule", + "id": "module-ForgotPasswordModule-57776e74652704611e3dab5c740221e1b812a70af3349dd7d83b08f39356efb2656a72effdc8a787791e7e6c6acfc72a94c6ca1abe9fce34bec7c3121fcb977c", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/login/forgot-password-component/forgot-password.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { RouterModule, Routes } from '@angular/router';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { ForgotPasswordComponent } from './forgot-password.component';\nimport { DotFieldValidationMessageModule } from '@components/_common/dot-field-validation-message/dot-file-validation-message.module';\nimport { DotAutofocusModule } from '@directives/dot-autofocus/dot-autofocus.module';\nimport { ButtonModule } from 'primeng/button';\nimport { InputTextModule } from 'primeng/inputtext';\n\nconst routes: Routes = [\n {\n component: ForgotPasswordComponent,\n path: ''\n }\n];\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n ButtonModule,\n InputTextModule,\n ReactiveFormsModule,\n DotFieldValidationMessageModule,\n DotAutofocusModule,\n RouterModule.forChild(routes)\n ],\n declarations: [ForgotPasswordComponent]\n})\nexport class ForgotPasswordModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "ForgotPasswordComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotAutofocusModule" + }, + { + "name": "DotFieldValidationMessageModule" + } + ] + }, + { + "type": "exports", + "elements": [] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "IFrameModule", + "id": "module-IFrameModule-dc1a3db0aa343c7ff54c7546579e258a46a1534c42ae63fa67fa610279934f9881255b146005cb51f997b4e917c2902bab24ddc3b944127be55827d637377a0f", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/_common/iframe/iframe.module.ts", + "methods": [], + "sourceCode": "import { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { NgModule } from '@angular/core';\nimport { SearchableDropDownModule } from '../searchable-dropdown/searchable-dropdown.module';\nimport { IframeComponent } from './iframe-component';\nimport { DotLoadingIndicatorModule } from './dot-loading-indicator/dot-loading-indicator.module';\nimport { IframePortletLegacyComponent } from './iframe-porlet-legacy';\nimport { IframeOverlayService } from './service/iframe-overlay.service';\nimport { DotCustomEventHandlerService } from '@services/dot-custom-event-handler/dot-custom-event-handler.service';\nimport { RouterModule } from '@angular/router';\nimport { DotOverlayMaskModule } from '@components/_common/dot-overlay-mask/dot-overlay-mask.module';\nimport { DotIframePortletLegacyResolver } from './service/dot-iframe-porlet-legacy-resolver.service';\nimport { NotLicensedModule } from '@components/not-licensed/not-licensed.module';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\n\n@NgModule({\n declarations: [IframeComponent, IframePortletLegacyComponent],\n exports: [DotLoadingIndicatorModule, IframeComponent, IframePortletLegacyComponent],\n imports: [\n CommonModule,\n FormsModule,\n SearchableDropDownModule,\n DotLoadingIndicatorModule,\n RouterModule,\n DotOverlayMaskModule,\n NotLicensedModule,\n DotPipesModule\n ],\n providers: [IframeOverlayService, DotCustomEventHandlerService, DotIframePortletLegacyResolver]\n})\nexport class IFrameModule {}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "DotCustomEventHandlerService" + }, + { + "name": "IframeOverlayService" + } + ] + }, + { + "type": "declarations", + "elements": [ + { + "name": "IframeComponent" + }, + { + "name": "IframePortletLegacyComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotLoadingIndicatorModule" + }, + { + "name": "DotOverlayMaskModule" + }, + { + "name": "NotLicensedModule" + }, + { + "name": "SearchableDropDownModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotLoadingIndicatorModule" + }, + { + "name": "IframeComponent" + }, + { + "name": "IframePortletLegacyComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "MainNavigationModule", + "id": "module-MainNavigationModule-8e2eb66656f6544dcec5e02a0bdcc9d8b5458c00a2576bfac4bb7036b8f3b61e695a427298b48c853e39315c995919401e6055384f438df5e0f90b05748582f8", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/dot-navigation/dot-navigation.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { RouterModule } from '@angular/router';\n\nimport { DotNavigationComponent } from './dot-navigation.component';\nimport { DotNavigationService } from './services/dot-navigation.service';\nimport { DotNavIconModule } from './components/dot-nav-icon/dot-nav-icon.module';\nimport { DotIconModule } from '@dotcms/ui';\nimport { DotSubNavComponent } from './components/dot-sub-nav/dot-sub-nav.component';\nimport { DotNavItemComponent } from './components/dot-nav-item/dot-nav-item.component';\nimport { TooltipModule } from 'primeng/tooltip';\nimport { DotOverlayMaskModule } from '@components/_common/dot-overlay-mask/dot-overlay-mask.module';\n\n@NgModule({\n imports: [\n CommonModule,\n RouterModule,\n DotNavIconModule,\n DotIconModule,\n TooltipModule,\n DotOverlayMaskModule\n ],\n declarations: [DotNavigationComponent, DotSubNavComponent, DotNavItemComponent],\n providers: [DotNavigationService],\n exports: [DotNavigationComponent]\n})\nexport class MainNavigationModule {}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "DotNavigationService" + } + ] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotNavItemComponent" + }, + { + "name": "DotNavigationComponent" + }, + { + "name": "DotSubNavComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotIconModule" + }, + { + "name": "DotNavIconModule" + }, + { + "name": "DotOverlayMaskModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotNavigationComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "NgGridModule", + "id": "module-NgGridModule-4dda68b860670f87043adf0b310270e5b1934ee3cb6f87fdc7b99a3ecda1c86cbdf5b1aa4ecbe8face77d1cc9a43260b2c8be403ee397d143e2d871d70932e22", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "libs/dot-layout-grid/src/lib/modules/NgGrid.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\n\nimport { NgGridPlaceholder } from './../components/NgGridPlaceholder';\nimport { NgGridItem } from './../directives/NgGridItem';\nimport { NgGrid } from './../directives/NgGrid';\n\n@NgModule({\n declarations: [NgGrid, NgGridItem, NgGridPlaceholder],\n entryComponents: [NgGridPlaceholder],\n exports: [NgGrid, NgGridItem]\n})\nexport class NgGridModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "NgGrid" + }, + { + "name": "NgGridItem" + }, + { + "name": "NgGridPlaceholder" + } + ] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [ + { + "name": "NgGrid" + }, + { + "name": "NgGridItem" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "NgxTiptapModule", + "id": "module-NgxTiptapModule-bda7da0aca3e56d3482799f4451498e3587490d660531fc319cf6c4cb0ce0e8ce1022dcff1bdfcb6436c1660c1666b7f6e765f19f6051c9f74d1a7549390bc94", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "libs/block-editor/src/lib/ngx-tiptap.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\n\nimport { EditorDirective } from './editor.directive';\nimport { BubbleMenuDirective } from './bubble-menu.directive';\nimport { DraggableDirective } from './draggable.directive';\nimport { NodeViewContentDirective } from './node-view-content.directive';\n\nimport { MenuModule } from 'primeng/menu';\nimport { CommonModule } from '@angular/common';\nimport { CardModule } from 'primeng/card';\nimport { ContentletBlockComponent } from './extensions/blocks/contentlet-block/contentlet-block.component';\n\nimport { SuggestionsService } from './extensions/services/suggestions/suggestions.service';\nimport { SuggestionsComponent } from './extensions/components/suggestions/suggestions.component';\nimport { SuggestionListComponent } from './extensions/components/suggestion-list/suggestion-list.component';\nimport { ActionButtonComponent } from './extensions/components/action-button/action-button.component';\nimport { SuggestionsListItemComponent } from './extensions/components/suggestions-list-item/suggestions-list-item.component';\nimport { LoggerService } from '@dotcms/dotcms-js';\nimport { StringUtils } from '@dotcms/dotcms-js';\nimport { DragHandlerComponent } from './extensions/components/drag-handler/drag-handler.component';\nimport { ImageBlockComponent } from './extensions/blocks/image-block/image-block.component';\nimport { LoaderComponent } from './extensions/components/loader/loader.component';\nimport { DotImageService } from './extensions/services/dot-image/dot-image.service';\nimport { BubbleMenuComponent } from './extensions/components/bubble-menu/bubble-menu.component';\nimport { BubbleMenuButtonComponent } from './extensions/components/bubble-menu-button/bubble-menu-button.component';\nimport { BubbleMenuLinkFormComponent } from './extensions/components/bubble-menu-link-form/bubble-menu-link-form.component';\n\n@NgModule({\n imports: [CommonModule, FormsModule, CardModule, MenuModule],\n declarations: [\n EditorDirective,\n BubbleMenuDirective,\n DraggableDirective,\n NodeViewContentDirective,\n SuggestionsComponent,\n SuggestionListComponent,\n SuggestionsListItemComponent,\n ContentletBlockComponent,\n ActionButtonComponent,\n DragHandlerComponent,\n ImageBlockComponent,\n LoaderComponent,\n BubbleMenuComponent,\n BubbleMenuButtonComponent,\n BubbleMenuLinkFormComponent\n ],\n providers: [SuggestionsService, DotImageService, LoggerService, StringUtils],\n exports: [\n SuggestionsComponent,\n EditorDirective,\n BubbleMenuDirective,\n DraggableDirective,\n NodeViewContentDirective,\n ActionButtonComponent,\n BubbleMenuComponent,\n BubbleMenuLinkFormComponent\n ]\n})\nexport class NgxTiptapModule {}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "DotImageService" + }, + { + "name": "LoggerService" + }, + { + "name": "StringUtils" + }, + { + "name": "SuggestionsService" + } + ] + }, + { + "type": "declarations", + "elements": [ + { + "name": "ActionButtonComponent" + }, + { + "name": "BubbleMenuButtonComponent" + }, + { + "name": "BubbleMenuComponent" + }, + { + "name": "BubbleMenuDirective" + }, + { + "name": "BubbleMenuLinkFormComponent" + }, + { + "name": "ContentletBlockComponent" + }, + { + "name": "DragHandlerComponent" + }, + { + "name": "DraggableDirective" + }, + { + "name": "EditorDirective" + }, + { + "name": "ImageBlockComponent" + }, + { + "name": "LoaderComponent" + }, + { + "name": "NodeViewContentDirective" + }, + { + "name": "SuggestionListComponent" + }, + { + "name": "SuggestionsComponent" + }, + { + "name": "SuggestionsListItemComponent" + } + ] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [ + { + "name": "ActionButtonComponent" + }, + { + "name": "BubbleMenuComponent" + }, + { + "name": "BubbleMenuDirective" + }, + { + "name": "BubbleMenuLinkFormComponent" + }, + { + "name": "DraggableDirective" + }, + { + "name": "EditorDirective" + }, + { + "name": "NodeViewContentDirective" + }, + { + "name": "SuggestionsComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "NotLicensedModule", + "id": "module-NotLicensedModule-6361b3edf800a26aee48f348aabd6901cccd05124632cf47216049bf00488187ee8f3787d4ea7680d43dcca4991af8037ba57436746e50673882fbcb5cfcc840", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/not-licensed/not-licensed.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { NotLicensedComponent } from './not-licensed.component';\nimport { ButtonModule } from 'primeng/button';\nimport { DotIconModule } from '@dotcms/ui';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\n\n@NgModule({\n imports: [CommonModule, ButtonModule, DotIconModule, DotPipesModule],\n declarations: [NotLicensedComponent],\n exports: [NotLicensedComponent]\n})\nexport class NotLicensedModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "NotLicensedComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotIconModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "NotLicensedComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "PushPublishEnvSelectorModule", + "id": "module-PushPublishEnvSelectorModule-5c1b2122d2be4b77f6f5e2dad91fc08dda9ae0408c04c43f2bb046b0332f62665557deafc379ac690e2bb47b68b4d14898df9024e54ea5d9fa2c7525410ec10c", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/_common/dot-push-publish-env-selector/dot-push-publish-env-selector.module.ts", + "methods": [], + "sourceCode": "import { FormsModule } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\nimport { ButtonModule } from 'primeng/button';\nimport { NgModule } from '@angular/core';\nimport { PushPublishEnvSelectorComponent } from './dot-push-publish-env-selector.component';\nimport { PushPublishService } from '@services/push-publish/push-publish.service';\nimport { DotCurrentUserService } from '@services/dot-current-user/dot-current-user.service';\nimport { DotPipesModule } from '@pipes/dot-pipes.module';\nimport { MultiSelectModule } from 'primeng/multiselect';\n\n@NgModule({\n declarations: [PushPublishEnvSelectorComponent],\n exports: [PushPublishEnvSelectorComponent],\n imports: [CommonModule, ButtonModule, FormsModule, MultiSelectModule, DotPipesModule],\n providers: [PushPublishService, DotCurrentUserService]\n})\nexport class PushPublishEnvSelectorModule {}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "DotCurrentUserService" + }, + { + "name": "PushPublishService" + } + ] + }, + { + "type": "declarations", + "elements": [ + { + "name": "PushPublishEnvSelectorComponent" + } + ] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [ + { + "name": "PushPublishEnvSelectorComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "ResetPasswordModule", + "id": "module-ResetPasswordModule-f3ecfe23263a5db7e9a1d1530e6babc75fcce513cfacb72041cad8f2e69573f65bf37c01ab4172b308875e89ca27ed42b3bd2380b29abe120502ca099c6b9c8b", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/login/reset-password-component/reset-password.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { RouterModule, Routes } from '@angular/router';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { ResetPasswordComponent } from './reset-password.component';\nimport { DotFieldValidationMessageModule } from '@components/_common/dot-field-validation-message/dot-file-validation-message.module';\nimport { DotAutofocusModule } from '@directives/dot-autofocus/dot-autofocus.module';\nimport { InputTextModule } from 'primeng/inputtext';\nimport { ButtonModule } from 'primeng/button';\n\nconst routes: Routes = [\n {\n component: ResetPasswordComponent,\n path: ''\n }\n];\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n InputTextModule,\n ButtonModule,\n ReactiveFormsModule,\n DotFieldValidationMessageModule,\n DotAutofocusModule,\n RouterModule.forChild(routes)\n ],\n declarations: [ResetPasswordComponent]\n})\nexport class ResetPasswordModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "ResetPasswordComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotAutofocusModule" + }, + { + "name": "DotFieldValidationMessageModule" + } + ] + }, + { + "type": "exports", + "elements": [] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "RippleEffectModule", + "id": "module-RippleEffectModule-da5f4e26ec18122d6d69554916e17b9628213589fc8c66af66b2b7a0744bcede6ab9a2749b85444ba6033111e83121cec418a9bdf02e5b2838471866e7023b27", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/directives/ripple/ripple-effect.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { DotRippleEffectDirective } from './ripple-effect.directive';\n\n@NgModule({\n imports: [CommonModule],\n declarations: [DotRippleEffectDirective],\n exports: [DotRippleEffectDirective]\n})\nexport class RippleEffectModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotRippleEffectDirective" + } + ] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotRippleEffectDirective" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "RuleEngineModule", + "id": "module-RuleEngineModule-fc7544fbb0f0d8ec95435d3d210f319abd63ae73e06f2a86e16bd6b7ae25fd56f102d7b24ed25771adcf7e18caea0e29a489988b115bbcb4bd9b03777c4ca67e", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "libs/dot-rules/src/lib/rule-engine.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { HttpClientModule } from '@angular/common/http';\n\nimport { ActionService } from './services/Action';\nimport { AddToBundleDialogComponent } from './push-publish/add-to-bundle-dialog-component';\nimport { AddToBundleDialogContainer } from './push-publish/add-to-bundle-dialog-container';\nimport { AreaPickerDialogComponent } from './google-map/area-picker-dialog.component';\nimport { BundleService } from './services/bundle-service';\nimport { ConditionComponent } from './rule-condition-component';\nimport { ConditionGroupComponent } from './rule-condition-group-component';\nimport { ConditionGroupService } from './services/ConditionGroup';\nimport { ConditionService } from './services/Condition';\nimport { Dropdown } from './components/dropdown/dropdown';\nimport { GoogleMapService } from './services/GoogleMapService';\nimport { I18nService } from './services/system/locale/I18n';\nimport { InputDate } from './components/input-date/input-date';\nimport { ModalDialogComponent } from './modal-dialog/dialog-component';\nimport { RestDropdown } from './components/restdropdown/RestDropdown';\nimport { RuleActionComponent } from './rule-action-component';\nimport { RuleComponent } from './rule-component';\nimport { RuleEngineComponent } from './rule-engine';\nimport { RuleEngineContainer } from './rule-engine.container';\nimport { RuleService } from './services/Rule';\nimport { ServersideCondition } from './condition-types/serverside-condition/serverside-condition';\nimport { VisitorsLocationComponent } from './custom-types/visitors-location/visitors-location.component';\nimport { VisitorsLocationContainer } from './custom-types/visitors-location/visitors-location.container';\n\nimport {\n ApiRoot,\n CoreWebService,\n DotcmsConfigService,\n DotcmsEventsService,\n LoggerService,\n StringUtils,\n UserModel,\n BrowserUtil\n} from '@dotcms/dotcms-js';\n\nimport { DotAutocompleteTagsModule } from './components/dot-autocomplete-tags/dot-autocomplete-tags.module';\nimport { AppRulesComponent } from './app.component';\nimport { DotAutofocusModule } from './directives/dot-autofocus/dot-autofocus.module';\nimport { RuleViewService } from './services/dot-view-rule-service';\nimport { DotUnlicenseModule } from './components/dot-unlicense/dot-unlicense.module';\n\nimport { AutoCompleteModule } from 'primeng/autocomplete';\nimport { ButtonModule } from 'primeng/button';\nimport { CalendarModule } from 'primeng/calendar';\nimport { DialogModule } from 'primeng/dialog';\nimport { DropdownModule } from 'primeng/dropdown';\nimport { InputSwitchModule } from 'primeng/inputswitch';\nimport { InputTextModule } from 'primeng/inputtext';\nimport { MessageModule } from 'primeng/message';\nimport { MessagesModule } from 'primeng/messages';\nimport { MultiSelectModule } from 'primeng/multiselect';\nimport { MenuModule } from 'primeng/menu';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n DropdownModule,\n MultiSelectModule,\n InputTextModule,\n InputSwitchModule,\n AutoCompleteModule,\n DialogModule,\n ButtonModule,\n MessagesModule,\n MessageModule,\n CalendarModule,\n DotAutocompleteTagsModule,\n HttpClientModule,\n DotAutofocusModule,\n DotUnlicenseModule,\n MenuModule\n ],\n declarations: [\n AddToBundleDialogComponent,\n AddToBundleDialogContainer,\n AreaPickerDialogComponent,\n ConditionComponent,\n ConditionGroupComponent,\n Dropdown,\n InputDate,\n ModalDialogComponent,\n RestDropdown,\n RuleActionComponent,\n RuleComponent,\n RuleEngineComponent,\n RuleEngineContainer,\n ServersideCondition,\n VisitorsLocationComponent,\n VisitorsLocationContainer,\n AppRulesComponent\n ],\n providers: [\n ApiRoot,\n BrowserUtil,\n CoreWebService,\n DotcmsConfigService,\n DotcmsEventsService,\n LoggerService,\n StringUtils,\n UserModel,\n\n ActionService,\n BundleService,\n ConditionGroupService,\n ConditionService,\n GoogleMapService,\n I18nService,\n RuleService,\n RuleViewService\n ],\n exports: [RuleEngineContainer, AppRulesComponent]\n})\nexport class RuleEngineModule {}\n", + "children": [ + { + "type": "providers", + "elements": [ + { + "name": "ActionService" + }, + { + "name": "ApiRoot" + }, + { + "name": "BrowserUtil" + }, + { + "name": "BundleService" + }, + { + "name": "ConditionGroupService" + }, + { + "name": "ConditionService" + }, + { + "name": "CoreWebService" + }, + { + "name": "DotcmsConfigService" + }, + { + "name": "DotcmsEventsService" + }, + { + "name": "GoogleMapService" + }, + { + "name": "I18nService" + }, + { + "name": "LoggerService" + }, + { + "name": "RuleService" + }, + { + "name": "RuleViewService" + }, + { + "name": "StringUtils" + }, + { + "name": "UserModel" + } + ] + }, + { + "type": "declarations", + "elements": [ + { + "name": "AddToBundleDialogComponent" + }, + { + "name": "AddToBundleDialogContainer" + }, + { + "name": "AppRulesComponent" + }, + { + "name": "AreaPickerDialogComponent" + }, + { + "name": "ConditionComponent" + }, + { + "name": "ConditionGroupComponent" + }, + { + "name": "Dropdown" + }, + { + "name": "InputDate" + }, + { + "name": "ModalDialogComponent" + }, + { + "name": "RestDropdown" + }, + { + "name": "RuleActionComponent" + }, + { + "name": "RuleComponent" + }, + { + "name": "RuleEngineComponent" + }, + { + "name": "RuleEngineContainer" + }, + { + "name": "ServersideCondition" + }, + { + "name": "VisitorsLocationComponent" + }, + { + "name": "VisitorsLocationContainer" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotAutocompleteTagsModule" + }, + { + "name": "DotAutofocusModule" + }, + { + "name": "DotUnlicenseModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "AppRulesComponent" + }, + { + "name": "RuleEngineContainer" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "SearchableDropDownModule", + "id": "module-SearchableDropDownModule-c8989f8480ecdae146f64a766f6ae55f9a0f550a0b2236daf4acf6627d1f58a97e51eda74db93b9d3ca155b5a7cacef6240e3298a1460248342cc42990915c94", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/_common/searchable-dropdown/searchable-dropdown.module.ts", + "methods": [], + "sourceCode": "import { SearchableDropdownComponent } from './component';\nimport { NgModule } from '@angular/core';\nimport { DataViewModule } from 'primeng/dataview';\nimport { FormsModule } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\nimport { DotIconModule } from '@dotcms/ui';\nimport { UiDotIconButtonModule } from '../dot-icon-button/dot-icon-button.module';\nimport { DotMessagePipeModule } from '@pipes/dot-message/dot-message-pipe.module';\nimport { ButtonModule } from 'primeng/button';\nimport { InputTextModule } from 'primeng/inputtext';\nimport { OverlayPanelModule } from 'primeng/overlaypanel';\n\nexport const SEARCHABLE_NGFACES_MODULES = [\n ButtonModule,\n CommonModule,\n DataViewModule,\n FormsModule,\n InputTextModule,\n OverlayPanelModule\n];\n\n@NgModule({\n declarations: [SearchableDropdownComponent],\n exports: [SearchableDropdownComponent],\n imports: [\n CommonModule,\n FormsModule,\n ...SEARCHABLE_NGFACES_MODULES,\n DotIconModule,\n UiDotIconButtonModule,\n DotMessagePipeModule\n ],\n providers: []\n})\nexport class SearchableDropDownModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "SearchableDropdownComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotIconModule" + }, + { + "name": "UiDotIconButtonModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "SearchableDropdownComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "SharedModule", + "id": "module-SharedModule-a2f888289a62f5c9976b0ae37c690e81f6678264d08d2530c3cfe8a5dfe9c2a634a1bed24bda5b4c61868ad787f103bc0066d4dfc1f6392d3e75efef8ace1a80", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/shared/shared.module.ts", + "methods": [ + { + "name": "forRoot", + "args": [], + "optional": false, + "returnType": "ModuleWithProviders", + "typeParameters": [], + "line": 42, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [124] + } + ], + "sourceCode": "import { NgModule, ModuleWithProviders } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport {\n ApiRoot,\n BrowserUtil,\n CoreWebService,\n DotcmsConfigService,\n DotcmsEventsService,\n LoggerService,\n LoginService,\n SiteService,\n StringUtils,\n UserModel,\n DotEventsSocket,\n DotEventsSocketURL\n} from '@dotcms/dotcms-js';\n\n// Common Modules\nimport { DotDropdownModule } from '@components/_common/dot-dropdown-component/dot-dropdown.module';\nimport { MainNavigationModule } from '@components/dot-navigation/dot-navigation.module';\nimport { DotEventsService } from '../api/services/dot-events/dot-events.service';\nimport { DotNavigationService } from '@components/dot-navigation/services/dot-navigation.service';\n\nconst dotEventSocketURLFactory = () => {\n return new DotEventsSocketURL(\n `${window.location.hostname}:${window.location.port}/api/ws/v1/system/events`,\n window.location.protocol === 'https:'\n );\n};\n\n@NgModule({\n declarations: [],\n imports: [CommonModule, DotDropdownModule, MainNavigationModule],\n exports: [\n CommonModule,\n // Common Modules\n DotDropdownModule,\n MainNavigationModule\n ]\n})\nexport class SharedModule {\n static forRoot(): ModuleWithProviders {\n return {\n ngModule: SharedModule,\n providers: [\n ApiRoot,\n BrowserUtil,\n CoreWebService,\n DotEventsService,\n DotNavigationService,\n DotcmsConfigService,\n DotcmsEventsService,\n LoggerService,\n LoginService,\n SiteService,\n { provide: DotEventsSocketURL, useFactory: dotEventSocketURLFactory },\n DotEventsSocket,\n StringUtils,\n UserModel\n ]\n };\n }\n}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotDropdownModule" + }, + { + "name": "MainNavigationModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotDropdownModule" + }, + { + "name": "MainNavigationModule" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "SiteSelectorFieldModule", + "id": "module-SiteSelectorFieldModule-4d0e2f13955d6ab330be8b275571b1c7a975bf39d3e1a136e7ba99784aa17ce29c327442b17f8b14fc18b6cb1c05bb0a614eb547b0d99fa17515e73afb14130f", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/_common/dot-site-selector-field/dot-site-selector-field.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotSiteSelectorFieldComponent } from './dot-site-selector-field.component';\nimport { DotSiteSelectorModule } from '../dot-site-selector/dot-site-selector.module';\n\n@NgModule({\n declarations: [DotSiteSelectorFieldComponent],\n imports: [CommonModule, DotSiteSelectorModule],\n exports: [DotSiteSelectorFieldComponent],\n providers: []\n})\nexport class SiteSelectorFieldModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "DotSiteSelectorFieldComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotSiteSelectorModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "DotSiteSelectorFieldComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "StylesModule", + "id": "module-StylesModule-719beba12f01d82abcb0c21dbb25508e58dea6dbf8ca6cce4ee0c415139b19f1761ee02cfb8d0a33865933603a8b1bfe2a583998d58d50c1b3e7f46ebe63e490", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "libs/dot-primeng-theme-styles/src/lib/styles.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n@NgModule({\n imports: [CommonModule]\n})\nexport class StylesModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "UiDotIconButtonModule", + "id": "module-UiDotIconButtonModule-090f64c542700217e7b44f5e11756ac35224870d2bad5e0ffe5a85ff9d2cede8941c1afe16694e8a19bb2fc01bb32da5f214e3a6f3e8e7b5d7911ebc93d38623", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/_common/dot-icon-button/dot-icon-button.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DotIconModule } from '@dotcms/ui';\nimport { UiDotIconButtonComponent } from './dot-icon-button.component';\n\n@NgModule({\n declarations: [UiDotIconButtonComponent],\n exports: [UiDotIconButtonComponent],\n imports: [CommonModule, DotIconModule]\n})\nexport class UiDotIconButtonModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "UiDotIconButtonComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "DotIconModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "UiDotIconButtonComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "UiDotIconButtonTooltipModule", + "id": "module-UiDotIconButtonTooltipModule-b9eb8b9421f177a516d1eb8ed3f04dd19b0479747f4fa11ff3920aaf71d1ced7bddb5933ccf6ac5055469352d23f6856a552e8a26cb94db32b7577956fd0921e", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "apps/dotcms-ui/src/app/view/components/_common/dot-icon-button-tooltip/dot-icon-button-tooltip.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { UiDotIconButtonTooltipComponent } from './dot-icon-button-tooltip.component';\nimport { TooltipModule } from 'primeng/tooltip';\nimport { UiDotIconButtonModule } from '../dot-icon-button/dot-icon-button.module';\n\n@NgModule({\n declarations: [UiDotIconButtonTooltipComponent],\n exports: [UiDotIconButtonTooltipComponent],\n imports: [CommonModule, TooltipModule, UiDotIconButtonModule]\n})\nexport class UiDotIconButtonTooltipModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [ + { + "name": "UiDotIconButtonTooltipComponent" + } + ] + }, + { + "type": "imports", + "elements": [ + { + "name": "UiDotIconButtonModule" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "UiDotIconButtonTooltipComponent" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "UiModule", + "id": "module-UiModule-8bd551665b8b49e7a8120e19fab8361e8ad0f0e3f96c84ed36dafd97f4e3ba011b092ab6c6f1f823525d1db8d74813943073093b347522872278a882b3169267", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "libs/ui/src/lib/ui.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n@NgModule({\n imports: [CommonModule]\n})\nexport class UiModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + }, + { + "name": "UtilsModule", + "id": "module-UtilsModule-41850a586635dc27f3f7f72cb72aea2eccc268e2a65f43546faf4ff90f3722a8e99c9d1c74d2835c5496cf98fa522af4218635aa22b5c83eca8e5fa8be4d2715", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "libs/utils/src/lib/utils.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n@NgModule({\n imports: [CommonModule]\n})\nexport class UtilsModule {}\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [] + }, + { + "type": "imports", + "elements": [] + }, + { + "type": "exports", + "elements": [] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + } + ], + "miscellaneous": { + "variables": [ + { + "name": "ActionsMenu", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/block-editor/src/lib/extensions/actions-menu.extension.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "(injector: Injector, resolver: ComponentFactoryResolver) => {\n let myTippy;\n let suggestionsComponent: ComponentRef;\n\n /**\n * Get's called on button click or suggestion char\n *\n * @param {(SuggestionProps | FloatingActionsProps)} { editor, range, clientRect }\n */\n function onStart({ editor, range, clientRect }: SuggestionProps | FloatingActionsProps): void {\n suggestionsComponent = getSuggestionComponent(injector, resolver);\n suggestionsComponent.instance.onSelection = (item) => {\n execCommand({ editor: editor, range: range, props: item });\n };\n suggestionsComponent.instance.setFirstItemActive();\n\n myTippy = getTippyInstance({\n element: editor.view.dom,\n content: suggestionsComponent.location.nativeElement,\n rect: clientRect,\n onHide: () => {\n const transaction = editor.state.tr.setMeta(FLOATING_ACTIONS_MENU_KEYBOARD, {\n open: false\n });\n editor.view.dispatch(transaction);\n }\n });\n }\n\n /**\n * Handle the keyboard events when the suggestion are opened\n *\n * @param {FloatingActionsKeydownProps} { event }\n * @return {*} {boolean}\n */\n function onKeyDown({ event }: FloatingActionsKeydownProps): boolean {\n const { key } = event;\n\n if (key === 'Escape') {\n myTippy.hide();\n return true;\n }\n\n if (key === 'Enter') {\n suggestionsComponent.instance.execCommand();\n return true;\n }\n\n if (key === 'ArrowDown' || key === 'ArrowUp') {\n suggestionsComponent.instance.updateSelection(event);\n return true;\n }\n\n return false;\n }\n\n function onExit() {\n myTippy?.destroy();\n }\n\n return Extension.create({\n name: 'actionsMenu',\n defaultOptions: {\n pluginKey: 'actionsMenu',\n element: null,\n suggestion: {\n char: '/',\n allowSpaces: false,\n startOfLine: true,\n render: () => {\n return {\n onStart,\n onKeyDown,\n onExit\n };\n }\n }\n },\n\n addCommands() {\n return {\n addHeading: ({ range, type }) => ({ chain }) => {\n return chain()\n .focus()\n .deleteRange(range)\n .toggleHeading({ level: type.level })\n .focus()\n .run();\n },\n addContentletBlock: ({ range, payload }) => ({ chain }) => {\n return chain()\n .deleteRange(range)\n .command((data) => {\n const node = data.editor.schema.nodes.dotContent.create({\n data: payload\n });\n data.tr.replaceSelectionWith(node);\n return true;\n })\n .focus()\n .run();\n }\n };\n },\n\n addProseMirrorPlugins() {\n const factoryButton = resolver.resolveComponentFactory(ActionButtonComponent);\n const button = factoryButton.create(injector);\n\n return [\n FloatingActionsPlugin({\n command: execCommand,\n editor: this.editor,\n element: button.location.nativeElement,\n render: () => {\n return {\n onStart,\n onKeyDown,\n onExit\n };\n }\n }),\n Suggestion({\n editor: this.editor,\n ...this.options.suggestion\n })\n ];\n }\n });\n}" + }, + { + "name": "AngularNodeViewRenderer", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/block-editor/src/lib/NodeViewRenderer.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "(\n component: Type,\n options: Partial\n): NodeViewRenderer => {\n return (props: NodeViewRendererProps) => {\n return new AngularNodeView(component, props, options);\n };\n}" + }, + { + "name": "animation", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/html/libraries/iframe-edit-mode.css.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "defaultValue": "'100ms ease-in'" + }, + { + "name": "appsUrl", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/api/services/dot-apps/dot-apps.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "`v1/apps`" + }, + { + "name": "areRangeDatesValid", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-field-elements/src/utils/props/validators/props.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "(start: Date, end: Date, propInfo: PropValidationInfo): void => {\n if (start > end) {\n throw new DotFieldPropError(propInfo, 'Date');\n }\n}" + }, + { + "name": "areRangeDatesValid", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-webcomponents/src/utils/props/validators/props.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "(start: Date, end: Date, propInfo: PropValidationInfo): void => {\n if (start > end) {\n throw new DotFieldPropError(propInfo, 'Date');\n }\n}" + }, + { + "name": "audio", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-webcomponents/src/elements/dot-contentlet-icon/dot-contentlet-icon.tsx", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "defaultValue": "'audiotrack'" + }, + { + "name": "AutocompleteTemplate", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/stories/primeng/form/AutoComplete.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "`\n\n`" + }, + { + "name": "AutoRezise", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/stories/primeng/form/InputTextArea.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "Template.bind({})" + }, + { + "name": "AUTOSCROLLER_JS", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/html/libraries/autoscroller.js.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "`var autoScroll=function(){\"use strict\";function e(e,n){return void 0===e?void 0===n?e:n:e}function n(n,t){return n=e(n,t),\"function\"==typeof n?function(){for(var e=arguments,t=arguments.length,r=Array(t),o=0;o0;)t[r]=n[r+1];return t=t.map(u),o(e,t)}function a(e){for(var n=arguments,r=[],o=arguments.length-1;o-- >0;)r[o]=n[o+1];return r.map(u).reduce(function(n,r){var o=t(e,r);return-1!==o?n.concat(e.splice(o,1)):n},[])}function u(e,n){if(\"string\"==typeof e)try{return document.querySelector(e)}catch(e){throw e}if(!x(e)&&!n)throw new TypeError(e+\" is not a DOM element.\");return e}function c(e,t){t=t||{};var r=n(t.allowUpdate,!0);return function(n){if(n=n||window.event,e.target=n.target||n.srcElement||n.originalTarget,e.element=this,e.type=n.type,r(n)){if(n.targetTouches)e.x=n.targetTouches[0].clientX,e.y=n.targetTouches[0].clientY,e.pageX=n.targetTouches[0].pageX,e.pageY=n.targetTouches[0].pageY,e.screenX=n.targetTouches[0].screenX,e.screenY=n.targetTouches[0].screenY;else{if(null===n.pageX&&null!==n.clientX){var t=n.target&&n.target.ownerDocument||document,o=t.documentElement,i=t.body;e.pageX=n.clientX+(o&&o.scrollLeft||i&&i.scrollLeft||0)-(o&&o.clientLeft||i&&i.clientLeft||0),e.pageY=n.clientY+(o&&o.scrollTop||i&&i.scrollTop||0)-(o&&o.clientTop||i&&i.clientTop||0)}else e.pageX=n.pageX,e.pageY=n.pageY;e.x=n.clientX,e.y=n.clientY,e.screenX=n.screenX,e.screenY=n.screenY}e.clientX=e.x,e.clientY=e.y}}}function l(){var e={top:{value:0,enumerable:!0},left:{value:0,enumerable:!0},right:{value:window.innerWidth,enumerable:!0},bottom:{value:window.innerHeight,enumerable:!0},width:{value:window.innerWidth,enumerable:!0},height:{value:window.innerHeight,enumerable:!0},x:{value:0,enumerable:!0},y:{value:0,enumerable:!0}};if(Object.create)return Object.create({},e);var n={};return Object.defineProperties(n,e),n}function f(e){if(e===window)return l();try{var n=e.getBoundingClientRect();return void 0===n.x&&(n.x=n.left,n.y=n.top),n}catch(n){throw new TypeError(\"Can't call getBoundingClientRect on \"+e)}}function d(e,n){var t=f(n);return e.y>t.top&&e.yt.left&&e.xr.right-X.margin?Math.ceil(Math.min(1,(O.x-r.right)/X.margin+1)*X.maxSpeed):0,t=O.yr.bottom-X.margin?Math.ceil(Math.min(1,(O.y-r.bottom)/X.margin+1)*X.maxSpeed):0,X.syncMove()&&j.dispatch(e,{pageX:O.pageX+n,pageY:O.pageY+t,clientX:O.x+n,clientY:O.y+t}),setTimeout(function(){t&&x(e,t),n&&L(e,n)})}function x(e,n){e===window?window.scrollTo(e.pageXOffset,e.pageYOffset+n):e.scrollTop+=n}function L(e,n){e===window?window.scrollTo(e.pageXOffset+n,e.pageYOffset):e.scrollLeft+=n}void 0===t&&(t={});var X=this,Y=4,A=!1;this.margin=t.margin||-1,this.scrollWhenOutside=t.scrollWhenOutside||!1;var O={},S=c(O),j=s(),M=!1;window.addEventListener(\"mousemove\",S,!1),window.addEventListener(\"touchmove\",S,!1),isNaN(t.maxSpeed)||(Y=t.maxSpeed),this.autoScroll=n(t.autoScroll),this.syncMove=n(t.syncMove,!1),this.destroy=function(n){window.removeEventListener(\"mousemove\",S,!1),window.removeEventListener(\"touchmove\",S,!1),window.removeEventListener(\"mousedown\",u,!1),window.removeEventListener(\"touchstart\",u,!1),window.removeEventListener(\"mouseup\",l,!1),window.removeEventListener(\"touchend\",l,!1),window.removeEventListener(\"pointerup\",l,!1),window.removeEventListener(\"mouseleave\",m,!1),window.removeEventListener(\"mousemove\",p,!1),window.removeEventListener(\"touchmove\",p,!1),window.removeEventListener(\"scroll\",o,!0),e=[],n&&d()},this.add=function(){for(var n=[],t=arguments.length;t--;)n[t]=arguments[t];return i.apply(void 0,[e].concat(n)),this},this.remove=function(){for(var n=[],t=arguments.length;t--;)n[t]=arguments[t];return a.apply(void 0,[e].concat(n))};var F,K=null;\"[object Array]\"!==Object.prototype.toString.call(e)&&(e=[e]),function(n){e=[],n.forEach(function(e){e===window?K=window:X.add(e)})}(e),Object.defineProperties(this,{down:{get:function(){return M}},maxSpeed:{get:function(){return Y}},point:{get:function(){return O}},scrolling:{get:function(){return A}}});var q,N=null;window.addEventListener(\"mousedown\",u,!1),window.addEventListener(\"touchstart\",u,!1),window.addEventListener(\"mouseup\",l,!1),window.addEventListener(\"touchend\",l,!1),window.addEventListener(\"pointerup\",l,!1),window.addEventListener(\"mousemove\",p,!1),window.addEventListener(\"touchmove\",p,!1),window.addEventListener(\"mouseleave\",m,!1),window.addEventListener(\"scroll\",o,!0)}function p(e,n){return new w(e,n)}function h(e,n,t){return t?e.y>t.top&&e.yt.left&&e.x0?1:-1)*Math.floor(Math.abs(n)):n},t=Math.pow(2,53)-1,r=function(e){var r=n(e);return Math.min(Math.max(r,0),t)},o=function(e){if(null!=e){if([\"string\",\"number\",\"boolean\",\"symbol\"].indexOf(typeof e)>-1)return Symbol.iterator;if(\"undefined\"!=typeof Symbol&&\"iterator\"in Symbol&&Symbol.iterator in e)return Symbol.iterator;if(\"@@iterator\"in e)return\"@@iterator\"}},i=function(n,t){if(null!=n&&null!=t){var r=n[t];if(null==r)return;if(!e(r))throw new TypeError(r+\" is not a function\");return r}},a=function(e){var n=e.next();return!Boolean(n.done)&&n};return function(n){var t,u=this,c=arguments.length>1?arguments[1]:void 0;if(void 0!==c){if(!e(c))throw new TypeError(\"Array.from: when provided, the second argument must be a function\");arguments.length>2&&(t=arguments[2])}var l,f,d=i(n,o(n));if(void 0!==d){l=e(u)?Object(new u):[];var s=d.call(n);if(null==s)throw new TypeError(\"Array.from requires an array-like or iterable object\");f=0;for(var m,v;;){if(!(m=a(s)))return l.length=f,l;v=m.value,l[f]=c?c.call(t,v,f):v,f++}}else{var w=Object(n);if(null==n)throw new TypeError(\"Array.from requires an array-like object - not null or undefined\");var p=r(w.length);l=e(u)?Object(new u(p)):new Array(p),f=0;for(var h;f {\n return {\n props: {\n items\n },\n moduleMetadata: {\n imports: [MenuModule, BrowserAnimationsModule]\n },\n template: ``\n };\n}" + }, + { + "name": "Basic", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/stories/primeng/data/Paginator.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "() => {\n return {\n template: BasicTemplate\n };\n}" + }, + { + "name": "Basic", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/stories/primeng/data/Tree.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "() => {\n return {\n template: BasicTemplate,\n props: {\n files\n }\n };\n}" + }, + { + "name": "Basic", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/stories/primeng/messages/Messages.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "Template.bind({})" + }, + { + "name": "Basic", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/stories/primeng/overlay/ConfirmDialog.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "() => ({\n component: ConfirmDialogComponent,\n moduleMetadata: {\n imports: [\n ConfirmDialogModule,\n ButtonModule,\n MessagesModule,\n BrowserAnimationsModule,\n ToastModule\n ],\n providers: [ConfirmationService],\n declarations: [ToastComponent],\n entryComponents: [ToastComponent]\n }\n})" + }, + { + "name": "Basic", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/stories/primeng/overlay/Dialog.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "Template.bind({})" + }, + { + "name": "Basic", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/stories/primeng/overlay/DynamicDialog.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "() => ({\n component: DynamicDialogButtonComponent,\n moduleMetadata: {\n imports: [\n BrowserModule,\n BrowserAnimationsModule,\n DynamicDialogModule,\n ToastModule,\n TableModule,\n ButtonModule,\n HttpClientModule\n ],\n providers: [ProductService, DynamicDialogRef, DynamicDialogConfig],\n declarations: [DynamicDialogProductsComponent],\n entryComponents: [DynamicDialogProductsComponent]\n }\n})" + }, + { + "name": "Basic", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/stories/primeng/overlay/OverlayPanel.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "() => {\n return {\n template: OverlayPanelTemplate,\n props: {\n on: () => {\n console.log('asas');\n },\n products: [\n {\n id: '1000',\n code: 'f230fh0g3',\n name: 'Bamboo Watch',\n description: 'Product Description',\n image: 'bamboo-watch.jpg',\n price: 65,\n category: 'Accessories',\n quantity: 24,\n inventoryStatus: 'INSTOCK',\n rating: 5\n },\n {\n id: '1001',\n code: 'nvklal433',\n name: 'Black Watch',\n description: 'Product Description',\n image: 'black-watch.jpg',\n price: 72,\n category: 'Accessories',\n quantity: 61,\n inventoryStatus: 'INSTOCK',\n rating: 4\n },\n {\n id: '1002',\n code: 'zz21cz3c1',\n name: 'Blue Band',\n description: 'Product Description',\n image: 'blue-band.jpg',\n price: 79,\n category: 'Fitness',\n quantity: 2,\n inventoryStatus: 'LOWSTOCK',\n rating: 3\n },\n {\n id: '1003',\n code: '244wgerg2',\n name: 'Blue T-Shirt',\n description: 'Product Description',\n image: 'blue-t-shirt.jpg',\n price: 29,\n category: 'Clothing',\n quantity: 25,\n inventoryStatus: 'INSTOCK',\n rating: 5\n },\n {\n id: '1004',\n code: 'h456wer53',\n name: 'Bracelet',\n description: 'Product Description',\n image: 'bracelet.jpg',\n price: 15,\n category: 'Accessories',\n quantity: 73,\n inventoryStatus: 'INSTOCK',\n rating: 4\n },\n {\n id: '1005',\n code: 'av2231fwg',\n name: 'Brown Purse',\n description: 'Product Description',\n image: 'brown-purse.jpg',\n price: 120,\n category: 'Accessories',\n quantity: 0,\n inventoryStatus: 'OUTOFSTOCK',\n rating: 4\n },\n {\n id: '1006',\n code: 'bib36pfvm',\n name: 'Chakra Bracelet',\n description: 'Product Description',\n image: 'chakra-bracelet.jpg',\n price: 32,\n category: 'Accessories',\n quantity: 5,\n inventoryStatus: 'LOWSTOCK',\n rating: 3\n },\n {\n id: '1007',\n code: 'mbvjkgip5',\n name: 'Galaxy Earrings',\n description: 'Product Description',\n image: 'galaxy-earrings.jpg',\n price: 34,\n category: 'Accessories',\n quantity: 23,\n inventoryStatus: 'INSTOCK',\n rating: 5\n },\n {\n id: '1008',\n code: 'vbb124btr',\n name: 'Game Controller',\n description: 'Product Description',\n image: 'game-controller.jpg',\n price: 99,\n category: 'Electronics',\n quantity: 2,\n inventoryStatus: 'LOWSTOCK',\n rating: 4\n },\n {\n id: '1009',\n code: 'cm230f032',\n name: 'Gaming Set',\n description: 'Product Description',\n image: 'gaming-set.jpg',\n price: 299,\n category: 'Electronics',\n quantity: 63,\n inventoryStatus: 'INSTOCK',\n rating: 3\n }\n ]\n }\n };\n}" + }, + { + "name": "Basic", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/stories/primeng/overlay/Tooltip.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "Template.bind({})" + }, + { + "name": "Basic", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/stories/primeng/panel/TabView.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "(_args: Menu) => {\n return {\n props: {\n activeIndex: 0\n },\n moduleMetadata: {\n imports: [TabViewModule, ButtonModule, BrowserAnimationsModule]\n },\n template: BasicTemplate\n };\n}" + }, + { + "name": "Basic", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/view/components/dot-theme-selector-dropdown/dot-theme-selector-dropdown.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "(props) => {\n return {\n template: ThemeSelectorTemplate,\n props\n };\n}" + }, + { + "name": "Basic", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/view/components/_common/dot-bulk-information/dot-bulk-information.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "(props) => {\n return {\n template: `\n ${container(``)}\n `,\n props\n };\n}" + }, + { + "name": "BasicActions", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/view/components/dot-portlet-base/dot-portlet-base.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "() => ({\n props: {\n title: 'Adding Save and Cancel Button',\n portletActions: {\n primary: [\n {\n label: 'Save',\n command: (e) => {\n console.log(e);\n }\n }\n ],\n cancel: () => {\n console.log('cancel');\n }\n }\n },\n template: BasicActionsTemplate\n})" + }, + { + "name": "BasicActionsTemplate", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/view/components/dot-portlet-base/dot-portlet-base.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "`\n\n \n ${portletContent()}\n\n`" + }, + { + "name": "basicField", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-field-elements/src/test/mocks.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSContentTypeField", + "defaultValue": "{\n clazz: '',\n contentTypeId: '',\n dataType: '',\n defaultValue: '',\n fieldType: '',\n fieldTypeLabel: '',\n fieldVariables: [],\n fixed: true,\n hint: '',\n iDate: 100,\n id: '',\n indexed: true,\n listed: true,\n modDate: 100,\n name: '',\n readOnly: true,\n regexCheck: '',\n required: true,\n searchable: true,\n sortOrder: 100,\n unique: true,\n values: '',\n variable: ''\n}" + }, + { + "name": "basicField", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-webcomponents/src/test/mocks.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSContentTypeField", + "defaultValue": "{\n clazz: '',\n contentTypeId: '',\n dataType: '',\n defaultValue: '',\n fieldType: '',\n fieldTypeLabel: '',\n fieldVariables: [],\n fixed: true,\n hint: '',\n iDate: 100,\n id: '',\n indexed: true,\n listed: true,\n modDate: 100,\n name: '',\n readOnly: true,\n regexCheck: '',\n required: true,\n searchable: true,\n sortOrder: 100,\n unique: true,\n values: '',\n variable: ''\n}" + }, + { + "name": "BasicTemplate", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/stories/primeng/data/Paginator.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "``" + }, + { + "name": "BasicTemplate", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/stories/primeng/data/Tree.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "``" + }, + { + "name": "BasicTemplate", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/stories/primeng/panel/TabView.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "`\n \n \n

    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation\n ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.\n Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

    \n
    \n \n

    Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi\n architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione\n voluptatem sequi nesciunt. Consectetur, adipisci velit, sed quia non numquam eius modi.

    \n
    \n \n

    At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati\n cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio.\n Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus.

    \n
    \n
    \n`" + }, + { + "name": "BreadcrumbTemplate", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/stories/primeng/menu/Breadcrumb.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "``" + }, + { + "name": "BubbleLinkFormExtension", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/block-editor/src/lib/extensions/bubble-link-form.extension.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "(injector: Injector, resolver: ComponentFactoryResolver) => {\n\n return Extension.create({\n name: 'bubbleLinkForm',\n defaultOptions: {\n element: null,\n tippyOptions: {},\n pluginKey: LINK_FORM_PLUGIN_KEY,\n },\n\n addStorage() {\n return {\n show: true\n }\n },\n\n addCommands() {\n return {\n toogleLinkForm: () => ({ commands }) => {\n this.storage.show = !this.storage.show;\n return commands.setHighlight();\n }\n }\n },\n\n addProseMirrorPlugins() {\n const factory = resolver.resolveComponentFactory(BubbleMenuLinkFormComponent);\n const component = factory.create(injector);\n component.changeDetectorRef.detectChanges();\n \n return [\n bubbleLinkFormPlugin({\n pluginKey: this.options.pluginKey,\n editor: this.editor,\n element: component.location.nativeElement,\n tippyOptions: this.options.tippyOptions,\n storage: this.storage,\n component: component\n }) \n ]\n },\n })\n}" + }, + { + "name": "bubbleLinkFormPlugin", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/block-editor/src/lib/plugins/bubble-link-form.plugin.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "(options: BubbleLinkFormProps) => {\n return new Plugin({\n key: options.pluginKey as PluginKey,\n view: (view) => new BubbleLinkFormView({ view, ...options }),\n state: {\n init(): PluginState {\n return {\n toggle: true\n };\n },\n\n apply(transaction: Transaction): PluginState {\n const transactionMeta = transaction.getMeta(options.pluginKey);\n if (transactionMeta) {\n return {\n toggle: options.storage.show\n };\n }\n\n return {\n toggle: options.storage.show\n };\n }\n }\n });\n}" + }, + { + "name": "CalendarTemplate", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/stories/primeng/form/Calendar.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "``" + }, + { + "name": "cars", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/stories/primeng/data/Table.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "[]", + "defaultValue": "[\n {\n vin: '123',\n year: '2020',\n brand: 'Hyundai',\n color: 'Red'\n },\n {\n vin: '456',\n year: '2010',\n brand: 'Kia',\n color: 'Blue'\n },\n {\n vin: '789',\n year: '2008',\n brand: 'Ford',\n color: 'Gray'\n },\n {\n vin: '987',\n year: '2018',\n brand: 'Fiat',\n color: 'Green'\n },\n {\n vin: '213',\n year: '2020',\n brand: 'Hyundai',\n color: 'Red'\n },\n {\n vin: '343',\n year: '2010',\n brand: 'Kia',\n color: 'Blue'\n },\n {\n vin: '454',\n year: '2008',\n brand: 'Ford',\n color: 'Gray'\n },\n {\n vin: '897',\n year: '2018',\n brand: 'Fiat',\n color: 'Green'\n },\n {\n vin: '234',\n year: '2020',\n brand: 'Hyundai',\n color: 'Red'\n },\n {\n vin: '892',\n year: '2010',\n brand: 'Kia',\n color: 'Blue'\n },\n {\n vin: '092',\n year: '2008',\n brand: 'Ford',\n color: 'Gray'\n },\n {\n vin: '567',\n year: '2018',\n brand: 'Fiat',\n color: 'Green'\n }\n]" + }, + { + "name": "Check", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dot-rules/src/lib/services/validation/Check.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "object", + "defaultValue": "{\n exists(value, message = 'Value does not exist'): any {\n if (!Verify.exists(value)) {\n throw createCheckError('exists', value, message);\n }\n return value;\n },\n\n isString(value, message = 'Value is not a string'): string {\n if (!Verify.isString(value)) {\n throw createCheckError('isString', value, message);\n }\n return value;\n },\n\n notEmpty(value, message = 'The value is empty'): string {\n if (!Verify.minLength(value, 1)) {\n throw createCheckError('notEmpty', value, message);\n }\n return value;\n }\n}" + }, + { + "name": "CheckboxTemplate", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/stories/primeng/form/Checkbox.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "`\n
    \n \n \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n`" + }, + { + "name": "ChipsTemplate", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/stories/primeng/form/Chips.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "``" + }, + { + "name": "CLIENTS_ONLY_MESSAGES", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-js/src/lib/core/util/http-response-util.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "object", + "defaultValue": "{\n 1: 'Could not connect to server.'\n}" + }, + { + "name": "code", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-webcomponents/src/elements/dot-contentlet-icon/dot-contentlet-icon.tsx", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "defaultValue": "'insert_drive_file'" + }, + { + "name": "codeIcon", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/block-editor/src/lib/extensions/components/suggestions/suggestion-icons.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "defaultValue": "'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEzLjQgMjAuNkw4LjggMTZMMTMuNCAxMS40TDEyIDEwTDYgMTZMMTIgMjJMMTMuNCAyMC42Wk0xOC42IDIwLjZMMjMuMiAxNkwxOC42IDExLjRMMjAgMTBMMjYgMTZMMjAgMjJMMTguNiAyMC42WiIgZmlsbD0iYmxhY2siLz4KPC9zdmc+Cg=='" + }, + { + "name": "COLUMN_BREAK", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/components/fields/content-types-fields-list/content-types-fields-icon-map.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "FieldUtil.createColumnBreak()" + }, + { + "name": "COLUMN_BREAK_FIELD", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/components/fields/util/field-util.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "object", + "defaultValue": "{\n clazz: 'contenttype.column.break',\n name: 'Column'\n}" + }, + { + "name": "COLUMN_FIELD", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/components/fields/util/field-util.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "object", + "defaultValue": "{\n ...EMPTY_FIELD,\n clazz: 'com.dotcms.contenttype.model.field.ImmutableColumnField'\n}" + }, + { + "name": "COMPONENTS", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/components.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "[]", + "defaultValue": "[\n MainCoreLegacyComponent,\n MainComponentLegacyComponent,\n DotLoginPageComponent,\n DotLogOutContainerComponent,\n GlobalSearchComponent,\n DotAlertConfirmComponent\n]" + }, + { + "name": "config", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-field-elements/stencil.config.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Config", + "defaultValue": "{\n namespace: 'dotcms-field-elements',\n taskQueue: 'async',\n\n outputTargets: [\n {\n type: 'dist',\n esmLoaderPath: '../loader',\n dir: '../../dist/libs/dotcms-field-elements/dist'\n },\n {\n type: 'docs-readme'\n },\n {\n type: 'www',\n dir: '../../dist/libs/dotcms-field-elements/www',\n serviceWorker: null // disable service workers\n },\n {\n type: 'dist',\n esmLoaderPath: '../loader',\n dir: '../../dist/libs/dotcms-field-elements/dist'\n },\n {\n type: 'docs-readme'\n },\n {\n type: 'www',\n dir: '../../dist/libs/dotcms-field-elements/www',\n serviceWorker: null\n }\n ],\n\n plugins: [sass()]\n}" + }, + { + "name": "config", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-webcomponents/stencil.config.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Config", + "defaultValue": "{\n namespace: 'dotcms-webcomponents',\n taskQueue: 'async',\n\n outputTargets: [\n {\n type: 'dist',\n esmLoaderPath: '../loader',\n dir: '../../dist/libs/dotcms-webcomponents/dist'\n },\n {\n type: 'docs-readme'\n },\n {\n type: 'www',\n dir: '../../dist/libs/dotcms-webcomponents/www',\n serviceWorker: null // disable service workers\n },\n {\n type: 'dist',\n esmLoaderPath: '../loader',\n dir: '../../dist/libs/dotcms-webcomponents/dist'\n },\n {\n type: 'docs-readme'\n },\n {\n type: 'www',\n dir: '../../dist/libs/dotcms-webcomponents/www',\n serviceWorker: null\n }\n ],\n\n plugins: [sass()]\n}" + }, + { + "name": "ConfirmDialogTemplate", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/stories/primeng/overlay/ConfirmDialog.component.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "`\n\n \n \n \n \n \n \n`" + }, + { + "name": "container", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/view/components/_common/dot-bulk-information/dot-bulk-information.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "(child) => {\n return `\n
    \n ${child}\n
    `;\n}" + }, + { + "name": "CONTENTLET_PLACEHOLDER_SELECTOR", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/dot-edit-content-html/dot-edit-content-html.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "defaultValue": "'#contentletPlaceholder'" + }, + { + "name": "ContentletBlock", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/block-editor/src/lib/extensions/blocks/contentlet-block/contentlet-block.extension.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "(injector: Injector): Node => {\n return Node.create({\n name: 'dotContent',\n group: 'block',\n inline: false,\n draggable: true,\n\n // ...configuration\n addAttributes() {\n return {\n data: {\n default: null,\n parseHTML: (element) => ({\n data: element.getAttribute('data')\n }),\n renderHTML: (attributes) => {\n return { data: attributes.data };\n }\n }\n };\n },\n\n parseHTML(): ParseRule[] {\n return [{ tag: 'dotcms-contentlet-block' }];\n },\n\n renderHTML({ HTMLAttributes }): DOMOutputSpec {\n return ['dotcms-contentlet-block', mergeAttributes(HTMLAttributes)];\n },\n\n addNodeView(): NodeViewRenderer {\n return AngularNodeViewRenderer(ContentletBlockComponent, { injector });\n }\n });\n}" + }, + { + "name": "contentletMock", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-webcomponents/src/test/mocks.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "DotContentletItem", + "defaultValue": "{\n typeVariable: 'Image',\n modDate: '2/5/2020 11:50AM',\n __wfstep__: 'Published',\n baseType: 'FILEASSET',\n inode: 'c68db8ec-b523-41b7-82bd-fcb7533d3cfa',\n __title__: 'pinos.jpg',\n Identifier: '10885ceb-7457-4571-bdbe-b2a2c0198bd1',\n permissions:\n 'P654b0931-1027-41f7-ad4d-173115ed8ec1.2P P654b0931-1027-41f7-ad4d-173115ed8ec1.1P ',\n contentStructureType: '4',\n working: 'true',\n locked: 'false',\n live: 'true',\n owner: 'dotcms.org.1',\n identifier: '10885ceb-7457-4571-bdbe-b2a2c0198bd1',\n wfActionMapList: '[]',\n languageId: '1',\n __icon__: 'jpgIcon',\n statusIcons: '',\n hasLiveVersion: 'false',\n deleted: 'false',\n structureInode: 'd5ea385d-32ee-4f35-8172-d37f58d9cd7a',\n __type__: '
    ',\n ownerCanRead: 'false',\n hasTitleImage: 'true',\n modUser: 'Admin User',\n ownerCanWrite: 'false',\n ownerCanPublish: 'false',\n title: '',\n sysPublishDate: '',\n mediaType: '',\n language: '',\n mimeType: '',\n titleImage: 'fileAsset'\n}" + }, + { + "name": "context", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-block-editor/src/test.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "require.context('./', true, /\\.spec\\.ts$/)" + }, + { + "name": "context", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/test.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "require.context('./', true, /\\.spec\\.ts$/)" + }, + { + "name": "context", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/block-editor/src/test.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "require.context('./', true, /\\.spec\\.ts$/)" + }, + { + "name": "context", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dot-rules/src/test.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "require.context('./', true, /\\.spec\\.ts$/)" + }, + { + "name": "context", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dot-layout-grid/src/test.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "require.context('./', true, /\\.spec\\.ts$/)" + }, + { + "name": "context", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-js/src/test.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "require.context('./', true, /\\.spec\\.ts$/)" + }, + { + "name": "context", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/ui/src/test.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "require.context('./', true, /\\.spec\\.ts$/)" + }, + { + "name": "context", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/utils/src/test.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "require.context('./', true, /\\.spec\\.ts$/)" + }, + { + "name": "ContextMenuTemplate", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/stories/primeng/menu/ContextMenu.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "`\n \"Logo\"\n \n`" + }, + { + "name": "CREATE_PAGE_BUTTON", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui-e2e/src/pages/DotSiteBrowser/DotSiteBrowser.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "defaultValue": "'#addNewDropDownButtonDiv span.dijitButtonNode'" + }, + { + "name": "CREATE_TEMPLATE_BUTTON", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui-e2e/src/pages/DotTemplates/DotTemplates.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "defaultValue": "'dot-action-button dot-icon i'" + }, + { + "name": "createCheckError", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dot-rules/src/lib/services/validation/Check.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "function (validation, value, message): Error {\n let e = new Error('Check.' + validation + \" failed: '\" + message + \"'.\");\n e['validation'] = validation;\n e['validatedValue'] = value;\n return e;\n}" + }, + { + "name": "CSS_MIME_TYPE", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/html/dot-dom-html-util.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "defaultValue": "'text/css'" + }, + { + "name": "CURRENT_USER_KEY", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/api/services/dot-roles/dot-roles.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "defaultValue": "'CMS Anonymous'" + }, + { + "name": "Custom", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/stories/primeng/misc/ProgressSpinner.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "() => {\n return {\n template: CustomTemplate,\n props: {\n value: 10,\n showValue: false\n }\n };\n}" + }, + { + "name": "CUSTOM_MODULES", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/modules.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "[]", + "defaultValue": "[\n DotToolbarModule,\n DotActionButtonModule,\n DotContentletEditorModule,\n DotDialogModule,\n UiDotIconButtonModule,\n DotIconModule,\n DotTextareaContentModule,\n DotWorkflowTaskDetailModule,\n DotMessageDisplayModule,\n DotFieldValidationMessageModule,\n IFrameModule,\n DotListingDataTableModule,\n SearchableDropDownModule,\n DotSiteSelectorModule,\n DotLargeMessageDisplayModule,\n DotPushPublishDialogModule,\n DotDownloadBundleDialogModule,\n DotWizardModule,\n DotGenerateSecurePasswordModule\n]" + }, + { + "name": "CustomTemplate", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/stories/primeng/misc/ProgressSpinner.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "`\n \n`" + }, + { + "name": "data", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette.component.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "[]", + "defaultValue": "[\n {\n baseType: 'CONTENT',\n clazz: 'com.dotcms.contenttype.model.type.ImmutableSimpleContentType',\n defaultType: false,\n detailPage: '1ef9be0e-7610-4c69-afdb-d304c8aabfac',\n fixed: false,\n folder: 'SYSTEM_FOLDER',\n host: '48190c8c-42c4-46af-8d1a-0cd5db894797',\n iDate: 1562940705000,\n icon: 'cloud',\n id: 'a1661fbc-9e84-4c00-bd62-76d633170da3',\n layout: [],\n modDate: 1626819743000,\n multilingualable: false,\n nEntries: 69,\n name: 'Product',\n sortOrder: 0,\n system: false,\n systemActionMappings: [],\n urlMapPattern: '/store/products/{urlTitle}',\n variable: 'Product',\n versionable: true,\n workflows: []\n },\n {\n baseType: 'CONTENT',\n clazz: 'com.dotcms.contenttype.model.type.ImmutableSimpleContentType',\n defaultType: false,\n description: 'Travel Blog',\n detailPage: '8a14180a-4144-4807-80c4-b7cad20ac57b',\n fixed: false,\n folder: 'SYSTEM_FOLDER',\n host: '48190c8c-42c4-46af-8d1a-0cd5db894797',\n iDate: 1543419364000,\n icon: 'alt_route',\n id: '799f176a-d32e-4844-a07c-1b5fcd107578',\n layout: [],\n modDate: 1626819718000,\n multilingualable: false,\n nEntries: 6,\n name: 'Blog',\n publishDateVar: 'postingDate',\n sortOrder: 0,\n system: false,\n urlMapPattern: '/blog/post/{urlTitle}',\n variable: 'Blog',\n versionable: true,\n workflows: []\n },\n {\n baseType: 'FORM',\n clazz: 'com.dotcms.contenttype.model.type.ImmutableFormContentType',\n defaultType: false,\n description: 'General Contact Form',\n fixed: false,\n folder: 'SYSTEM_FOLDER',\n host: '48190c8c-42c4-46af-8d1a-0cd5db894797',\n iDate: 1563384216000,\n icon: 'cloud',\n id: '897cf4a9-171a-4204-accb-c1b498c813fe',\n layout: [],\n modDate: 1626818557000,\n multilingualable: false,\n nEntries: 0,\n name: 'Contact',\n sortOrder: 0,\n system: false,\n variable: 'Contact',\n versionable: true,\n workflows: []\n },\n {\n baseType: 'CONTENT',\n clazz: 'com.dotcms.contenttype.model.type.ImmutableSimpleContentType',\n defaultType: false,\n fixed: false,\n folder: 'SYSTEM_FOLDER',\n host: '48190c8c-42c4-46af-8d1a-0cd5db894797',\n iDate: 1555017311000,\n icon: 'person',\n id: '6044a806-f462-4977-a353-57539eac2a2c',\n layout: [],\n modDate: 1626818557000,\n multilingualable: false,\n nEntries: 6,\n name: 'Long name Blog Comment',\n sortOrder: 0,\n system: false,\n variable: 'BlogComment',\n versionable: true,\n workflows: []\n }\n]" + }, + { + "name": "DATA_TYPE_PROPERTY_INFO", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/components/fields/service/data-type-property-info.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "object", + "defaultValue": "{\n // Radio inputs: binary, text, date, longText, bool, float, integer\n 'com.dotcms.contenttype.model.field.ImmutableRadioField': [\n {\n text: 'contenttypes.field.properties.data_type.values.text',\n value: 'TEXT'\n },\n {\n text: 'contenttypes.field.properties.data_type.values.boolean',\n value: 'BOOL'\n },\n {\n text: 'contenttypes.field.properties.data_type.values.decimal',\n value: 'FLOAT'\n },\n {\n text: 'contenttypes.field.properties.data_type.values.number',\n value: 'INTEGER'\n }\n ],\n 'com.dotcms.contenttype.model.field.ImmutableSelectField': [\n {\n text: 'contenttypes.field.properties.data_type.values.text',\n value: 'TEXT'\n },\n {\n text: 'contenttypes.field.properties.data_type.values.boolean',\n value: 'BOOL'\n },\n {\n text: 'contenttypes.field.properties.data_type.values.decimal',\n value: 'FLOAT'\n },\n {\n text: 'contenttypes.field.properties.data_type.values.number',\n value: 'INTEGER'\n }\n ],\n 'com.dotcms.contenttype.model.field.ImmutableTextField': [\n {\n text: 'contenttypes.field.properties.data_type.values.text',\n value: 'TEXT'\n },\n {\n text: 'contenttypes.field.properties.data_type.values.decimal',\n value: 'FLOAT'\n },\n {\n text: 'contenttypes.field.properties.data_type.values.number',\n value: 'INTEGER'\n }\n ]\n}" + }, + { + "name": "DATE_REGEX", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-field-elements/src/utils/props/validators/date.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "new RegExp('^\\\\d\\\\d\\\\d\\\\d-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])')" + }, + { + "name": "DATE_REGEX", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-webcomponents/src/utils/props/validators/date.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "new RegExp('^\\\\d\\\\d\\\\d\\\\d-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])')" + }, + { + "name": "DATE_SUFFIX", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-field-elements/src/components/dot-date-time/dot-date-time.tsx", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "defaultValue": "'-date'" + }, + { + "name": "DATE_SUFFIX", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-webcomponents/src/components/contenttypes-fields/dot-date-time/dot-date-time.tsx", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "defaultValue": "'-date'" + }, + { + "name": "Default", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/stories/primeng/messages/Toast.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "() => ({\n component: ToastComponent\n})" + }, + { + "name": "Default", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/stories/primeng/misc/Defer.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "() => ({\n component: DeferComponent,\n props: {\n cars: [\n { brand: 'VW', year: 2012, color: 'Orange', vin: 'dsad231ff' },\n { brand: 'Audi', year: 2011, color: 'Black', vin: 'gwregre345' },\n { brand: 'Renault', year: 2005, color: 'Gray', vin: 'h354htr' },\n { brand: 'BMW', year: 2003, color: 'Blue', vin: 'j6w54qgh' },\n {\n brand: 'Mercedes',\n year: 1995,\n color: 'Orange',\n vin: 'hrtwy34'\n },\n { brand: 'Volvo', year: 2005, color: 'Black', vin: 'jejtyj' },\n { brand: 'Honda', year: 2012, color: 'Yellow', vin: 'g43gr' },\n { brand: 'Jaguar', year: 2013, color: 'Orange', vin: 'greg34' },\n { brand: 'Ford', year: 2000, color: 'Black', vin: 'h54hw5' },\n { brand: 'Fiat', year: 2013, color: 'Red', vin: '245t2s' }\n ]\n }\n})" + }, + { + "name": "Default", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/stories/primeng/misc/Ripple.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "() => ({\n component: RippleComponent,\n props: {}\n})" + }, + { + "name": "Default", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette.component.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "(props) => {\n return {\n moduleMetadata: {\n declarations: [DotPaletteComponent]\n },\n component: DotPaletteComponent,\n props,\n template: ``\n };\n}" + }, + { + "name": "DEFAULT_CONFIG_FOR_NOT_EMPTY_GRID_TEMPLATE", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/shared/models/dot-edit-layout-designer/dot-layout-grid.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "defaultValue": "{\n fixed: true,\n sizex: 3,\n maxCols: 12,\n maxRows: 1\n}" + }, + { + "name": "DEFAULT_RULE", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dot-rules/src/lib/services/Rule.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "IRule", + "defaultValue": "{\n _conditionGroups: [],\n _expanded: false,\n _id: -1 + '',\n _ruleActions: [],\n conditionGroups: {},\n enabled: false,\n fireOn: 'EVERY_PAGE',\n name: null,\n priority: 1,\n ruleActions: {}\n}" + }, + { + "name": "DEFAULT_VALUE", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-field-elements/src/components/dot-key-value/key-value-form/key-value-form.tsx", + "deprecated": false, + "deprecationMessage": "", + "type": "object", + "defaultValue": "{ key: '', value: '' }" + }, + { + "name": "DEFAULT_VALUE", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-webcomponents/src/components/contenttypes-fields/dot-key-value/components/key-value-form/key-value-form.tsx", + "deprecated": false, + "deprecationMessage": "", + "type": "object", + "defaultValue": "{ key: '', value: '' }" + }, + { + "name": "DEV_MODE_PARAM", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-js/src/lib/core/logger.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "defaultValue": "'devMode'" + }, + { + "name": "DIALOG_IFRAME", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui-e2e/src/pages/DotSiteBrowser/DotEditPage.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "defaultValue": "'iframe#detailFrame'" + }, + { + "name": "DialogTemplate", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/stories/primeng/overlay/Dialog.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "`\n \n \n

    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\n Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\n Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat\n cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

    \n \n \n \n \n
    \n`" + }, + { + "name": "doc", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-webcomponents/src/elements/dot-contentlet-icon/dot-contentlet-icon.tsx", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "defaultValue": "'insert_drive_file'" + }, + { + "name": "DOT_ATTR_PREFIX", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-field-elements/src/components/dot-form/utils/index.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "defaultValue": "'dot'" + }, + { + "name": "DOT_ATTR_PREFIX", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-webcomponents/src/components/contenttypes-fields/dot-form/utils/index.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "defaultValue": "'dot'" + }, + { + "name": "DOT_LAYOUT_GRID_DEFAULT_EMPTY_GRID_ROWS", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/shared/models/dot-edit-layout-designer/dot-layout-grid.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "defaultValue": "{\n fixed: true,\n sizex: 12,\n maxCols: 12,\n maxRows: 1,\n col: 1,\n row: 1,\n payload: {\n styleClass: ''\n }\n}" + }, + { + "name": "DOT_LAYOUT_GRID_MAX_COLUMNS", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/shared/models/dot-edit-layout-designer/dot-layout-grid.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "defaultValue": "12" + }, + { + "name": "DOTCMS_DISABLE_WEBSOCKET_PROTOCOL", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-js/src/lib/core/dotcms-config.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "defaultValue": "'dotcms.websocket.disable'" + }, + { + "name": "DOTCMS_MENU_STATUS", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/view/components/dot-navigation/services/dot-navigation.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "defaultValue": "'dotcms.menu.status'" + }, + { + "name": "DOTCMS_PAGINATOR_LINKS", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-js/src/lib/core/dotcms-config.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "defaultValue": "'dotcms.paginator.links'" + }, + { + "name": "DOTCMS_PAGINATOR_ROWS", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-js/src/lib/core/dotcms-config.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "defaultValue": "'dotcms.paginator.rows'" + }, + { + "name": "DOTCMS_WEBSOCKET_RECONNECT_TIME", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-js/src/lib/core/dotcms-config.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "defaultValue": "'dotcms.websocket.reconnect.time'", + "rawdescription": "Created by josecastro on 7/29/16.\n\nWraps the configuration properties for dotCMS in order to provide an\neasier way to access the information.", + "description": "

    Created by josecastro on 7/29/16.

    \n

    Wraps the configuration properties for dotCMS in order to provide an\neasier way to access the information.

    \n" + }, + { + "name": "dotcmsContentletMock", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/test/dotcms-contentlet.mock.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSContentlet", + "defaultValue": "{\n archived: false,\n baseType: '',\n contentType: '',\n folder: '',\n hasTitleImage: false,\n host: '',\n hostName: '',\n identifier: '',\n inode: '',\n languageId: 1,\n live: false,\n locked: false,\n modDate: '',\n modUser: '',\n modUserName: '',\n owner: '',\n sortOrder: 1,\n stInode: '',\n title: '',\n titleImage: '',\n url: '',\n working: false\n}" + }, + { + "name": "dotcmsContentTypeBasicMock", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/test/dot-content-types.mock.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSContentType", + "defaultValue": "{\n baseType: null,\n clazz: null,\n defaultType: false,\n description: null,\n detailPage: null,\n expireDateVar: null,\n fields: [],\n fixed: false,\n folder: null,\n host: null,\n iDate: null,\n id: null,\n layout: [],\n modDate: null,\n multilingualable: false,\n nEntries: null,\n name: null,\n owner: null,\n publishDateVar: null,\n system: false,\n urlMapPattern: null,\n variable: null,\n versionable: false,\n workflows: []\n}" + }, + { + "name": "dotcmsContentTypeFieldBasicMock", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/test/dot-content-types.mock.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSContentTypeField", + "defaultValue": "{\n ...EMPTY_FIELD\n}" + }, + { + "name": "dotContainerMapMock", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/test/dot-containers.mock.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "(): DotContainerMap => {\n return {\n '5363c6c6-5ba0-4946-b7af-cf875188ac2e': {\n type: 'containers',\n identifier: '5363c6c6-5ba0-4946-b7af-cf875188ac2e',\n name: 'Medium Column (md-1)',\n categoryId: '9ab97328-e72f-4d7e-8be6-232f53218a93',\n source: CONTAINER_SOURCE.DB,\n parentPermissionable: {\n hostname: 'demo.dotcms.com'\n }\n },\n '56bd55ea-b04b-480d-9e37-5d6f9217dcc3': {\n type: 'containers',\n identifier: '56bd55ea-b04b-480d-9e37-5d6f9217dcc3',\n name: 'Large Column (lg-1)',\n categoryId: 'dde0b865-6cea-4ff0-8582-85e5974cf94f',\n source: CONTAINER_SOURCE.FILE,\n path: '/container/path',\n parentPermissionable: {\n hostname: 'demo.dotcms.com'\n }\n },\n '/container/path': {\n type: 'containers',\n identifier: '56bd55ea-b04b-480d-9e37-5d6f9217dcc3',\n name: 'Large Column (lg-1)',\n categoryId: 'dde0b865-6cea-4ff0-8582-85e5974cf94f',\n source: CONTAINER_SOURCE.FILE,\n path: '/container/path',\n parentPermissionable: {\n hostname: 'demo.dotcms.com'\n }\n },\n '6a12bbda-0ae2-4121-a98b-ad8069eaff3a': {\n type: 'containers',\n identifier: '6a12bbda-0ae2-4121-a98b-ad8069eaff3a',\n name: 'Banner Carousel ',\n categoryId: '427c47a4-c380-439f-a6d0-97d81deed57e',\n source: CONTAINER_SOURCE.DB,\n parentPermissionable: {\n hostname: 'demo.dotcms.com'\n }\n },\n 'a6e9652b-8183-4c09-b775-26196b09a300': {\n type: 'containers',\n identifier: 'a6e9652b-8183-4c09-b775-26196b09a300',\n name: 'Default 4 (Page Content)',\n categoryId: '8cbcb97e-8e04-4691-8555-da82c3dc4a91',\n source: CONTAINER_SOURCE.DB,\n parentPermissionable: {\n hostname: 'demo.dotcms.com'\n }\n },\n 'd71d56b4-0a8b-4bb2-be15-ffa5a23366ea': {\n type: 'containers',\n identifier: 'd71d56b4-0a8b-4bb2-be15-ffa5a23366ea',\n name: 'Blank Container',\n categoryId: '3ba890c5-670c-467d-890d-bd8e9b9bb5ef',\n source: CONTAINER_SOURCE.DB,\n parentPermissionable: {\n hostname: 'demo.dotcms.com'\n }\n }\n };\n}" + }, + { + "name": "dotEventSocketURLFactory", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcdn/src/app/app.module.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "() => {\n return new DotEventsSocketURL(\n `${window.location.hostname}:${window.location.port}/api/ws/v1/system/events`,\n window.location.protocol === 'https:'\n );\n}" + }, + { + "name": "dotEventSocketURLFactory", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/shared/shared.module.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "() => {\n return new DotEventsSocketURL(\n `${window.location.hostname}:${window.location.port}/api/ws/v1/system/events`,\n window.location.protocol === 'https:'\n );\n}" + }, + { + "name": "dotEventSocketURLFactory", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/test/dot-test-bed.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "() => {\n return new DotEventsSocketURL(\n `${window.location.hostname}:${window.location.port}/api/ws/v1/system/events`,\n window.location.protocol === 'https:'\n );\n}" + }, + { + "name": "DotFormFields", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-field-elements/src/components/dot-form/utils/fields.tsx", + "deprecated": false, + "deprecationMessage": "", + "type": "object", + "defaultValue": "{\n Text: (field: DotCMSContentTypeField) => (\n {\n setAttributesToTag(el, field.fieldVariables);\n }}\n regex-check={field.regexCheck}\n required={field.required}\n value={field.defaultValue}\n />\n ),\n\n Textarea: (field: DotCMSContentTypeField) => (\n {\n setAttributesToTag(el, field.fieldVariables);\n }}\n regex-check={field.regexCheck}\n required={field.required}\n value={field.defaultValue}\n />\n ),\n\n Checkbox: (field: DotCMSContentTypeField) => (\n {\n setAttributesToTag(el, field.fieldVariables);\n }}\n required={field.required}\n value={field.defaultValue}\n />\n ),\n\n 'Multi-Select': (field: DotCMSContentTypeField) => (\n {\n setAttributesToTag(el, field.fieldVariables);\n }}\n required={field.required}\n value={field.defaultValue}\n />\n ),\n\n 'Key-Value': (field: DotCMSContentTypeField) => (\n \n ),\n\n Select: (field: DotCMSContentTypeField) => (\n {\n setAttributesToTag(el, field.fieldVariables);\n }}\n required={field.required}\n value={field.defaultValue}\n />\n ),\n\n Radio: (field: DotCMSContentTypeField) => (\n {\n setAttributesToTag(el, field.fieldVariables);\n }}\n required={field.required}\n value={field.defaultValue}\n />\n ),\n\n Date: (field: DotCMSContentTypeField) => (\n {\n setAttributesToTag(el, field.fieldVariables);\n }}\n required={field.required}\n value={field.defaultValue}\n />\n ),\n\n Time: (field: DotCMSContentTypeField) => (\n {\n setAttributesToTag(el, field.fieldVariables);\n }}\n required={field.required}\n value={field.defaultValue}\n />\n ),\n\n 'Date-and-Time': (field: DotCMSContentTypeField) => (\n {\n setAttributesToTag(el, field.fieldVariables);\n }}\n required={field.required}\n value={field.defaultValue}\n />\n ),\n\n 'Date-Range': (field: DotCMSContentTypeField) => (\n \n ),\n\n Tag: (field: DotCMSContentTypeField) => (\n => {\n return fetch('/api/v1/tags')\n .then((data) => data.json())\n .then((items) => Object.keys(items))\n .catch(() => []);\n }}\n hint={field.hint}\n label={field.name}\n name={field.variable}\n required={field.required}\n value={field.defaultValue}\n />\n ),\n\n Binary: (field: DotCMSContentTypeField) => (\n {\n setAttributesToTag(el, field.fieldVariables);\n }}\n required={field.required}\n />\n )\n}" + }, + { + "name": "DotFormFields", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-webcomponents/src/components/contenttypes-fields/dot-form/utils/fields.tsx", + "deprecated": false, + "deprecationMessage": "", + "type": "object", + "defaultValue": "{\n Text: (field: DotCMSContentTypeField) => (\n {\n setAttributesToTag(el, field.fieldVariables);\n }}\n regex-check={field.regexCheck}\n required={field.required}\n value={field.defaultValue}\n />\n ),\n Textarea: (field: DotCMSContentTypeField) => (\n {\n setAttributesToTag(el, field.fieldVariables);\n }}\n regex-check={field.regexCheck}\n required={field.required}\n value={field.defaultValue}\n />\n ),\n Checkbox: (field: DotCMSContentTypeField) => (\n {\n setAttributesToTag(el, field.fieldVariables);\n }}\n required={field.required}\n value={field.defaultValue}\n />\n ),\n 'Multi-Select': (field: DotCMSContentTypeField) => (\n {\n setAttributesToTag(el, field.fieldVariables);\n }}\n required={field.required}\n value={field.defaultValue}\n />\n ),\n 'Key-Value': (field: DotCMSContentTypeField) => (\n \n ),\n Select: (field: DotCMSContentTypeField) => (\n {\n setAttributesToTag(el, field.fieldVariables);\n }}\n required={field.required}\n value={field.defaultValue}\n />\n ),\n Radio: (field: DotCMSContentTypeField) => (\n {\n setAttributesToTag(el, field.fieldVariables);\n }}\n required={field.required}\n value={field.defaultValue}\n />\n ),\n Date: (field: DotCMSContentTypeField) => (\n {\n setAttributesToTag(el, field.fieldVariables);\n }}\n required={field.required}\n value={field.defaultValue}\n />\n ),\n Time: (field: DotCMSContentTypeField) => (\n {\n setAttributesToTag(el, field.fieldVariables);\n }}\n required={field.required}\n value={field.defaultValue}\n />\n ),\n 'Date-and-Time': (field: DotCMSContentTypeField) => (\n {\n setAttributesToTag(el, field.fieldVariables);\n }}\n required={field.required}\n value={field.defaultValue}\n />\n ),\n 'Date-Range': (field: DotCMSContentTypeField) => (\n \n ),\n Tag: (field: DotCMSContentTypeField) => (\n => {\n return fetch('/api/v1/tags')\n .then((data) => data.json())\n .then((items) => Object.keys(items))\n .catch(() => []);\n }}\n hint={field.hint}\n label={field.name}\n name={field.variable}\n required={field.required}\n value={field.defaultValue}\n />\n ),\n Binary: (field: DotCMSContentTypeField) => (\n {\n setAttributesToTag(el, field.fieldVariables);\n }}\n required={field.required}\n />\n )\n}" + }, + { + "name": "dotFormLayoutMock", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-field-elements/src/test/mocks.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSContentTypeLayoutRow[]", + "defaultValue": "[\n {\n divider: {\n ...basicField\n },\n columns: [\n {\n columnDivider: {\n ...basicField\n },\n fields: [\n {\n ...basicField,\n variable: 'textfield1',\n required: true,\n name: 'TexField',\n fieldType: 'Text'\n }\n ]\n }\n ]\n },\n {\n divider: {\n ...basicField\n },\n columns: [\n {\n columnDivider: {\n ...basicField\n },\n fields: [\n {\n ...basicField,\n defaultValue: 'key|value,llave|valor',\n fieldType: 'Key-Value',\n name: 'Key Value:',\n required: false,\n variable: 'keyvalue2'\n }\n ]\n },\n {\n columnDivider: {\n ...basicField\n },\n fields: [\n {\n ...basicField,\n defaultValue: '2',\n fieldType: 'Select',\n name: 'Dropdwon',\n required: false,\n values: '|,labelA|1,labelB|2,labelC|3',\n variable: 'dropdown3'\n }\n ]\n }\n ]\n }\n]" + }, + { + "name": "dotFormLayoutMock", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-webcomponents/src/test/mocks.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSContentTypeLayoutRow[]", + "defaultValue": "[\n {\n divider: {\n ...basicField\n },\n columns: [\n {\n columnDivider: {\n ...basicField\n },\n fields: [\n {\n ...basicField,\n variable: 'textfield1',\n required: true,\n name: 'TexField',\n fieldType: 'Text'\n }\n ]\n }\n ]\n },\n {\n divider: {\n ...basicField\n },\n columns: [\n {\n columnDivider: {\n ...basicField\n },\n fields: [\n {\n ...basicField,\n defaultValue: 'key|value,llave|valor',\n fieldType: 'Key-Value',\n name: 'Key Value:',\n required: false,\n variable: 'keyvalue2'\n }\n ]\n },\n {\n columnDivider: {\n ...basicField\n },\n fields: [\n {\n ...basicField,\n defaultValue: '2',\n fieldType: 'Select',\n name: 'Dropdwon',\n required: false,\n values: '|,labelA|1,labelB|2,labelC|3',\n variable: 'dropdown3'\n }\n ]\n }\n ]\n }\n]" + }, + { + "name": "dotTestUtil", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-field-elements/src/test/utils.tsx", + "deprecated": false, + "deprecationMessage": "", + "type": "object", + "defaultValue": "{\n getDotLabel: (page: E2EPage) => page.find('dot-label'),\n getHint: (page: E2EPage) => page.find('.dot-field__hint'),\n getErrorMessage: (page: E2EPage) => page.find('.dot-field__error-message'),\n class: {\n empty: ['dot-valid', 'dot-untouched', 'dot-pristine'],\n emptyPristineInvalid: ['dot-pristine', 'dot-untouched', 'dot-invalid'],\n emptyRequired: ['dot-required', 'dot-invalid', 'dot-touched', 'dot-dirty'],\n emptyRequiredPristine: ['dot-required', 'dot-invalid', 'dot-untouched', 'dot-pristine'],\n filled: ['dot-valid', 'dot-touched', 'dot-dirty'],\n filledRequired: ['dot-required', 'dot-valid', 'dot-touched', 'dot-dirty'],\n filledRequiredPristine: ['dot-required', 'dot-valid', 'dot-untouched', 'dot-pristine'],\n touchedPristine: ['dot-valid', 'dot-pristine', 'dot-touched']\n },\n triggerStatusChange: (\n pristine: boolean,\n touched: boolean,\n valid: boolean,\n element: E2EElement,\n isValidRange?: boolean\n ) => {\n element.triggerEvent('_statusChange', {\n detail: {\n name: '',\n status: {\n dotPristine: pristine,\n dotTouched: touched,\n dotValid: valid\n },\n isValidRange: isValidRange\n }\n });\n }\n}" + }, + { + "name": "dotTestUtil", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-webcomponents/src/test/utils.tsx", + "deprecated": false, + "deprecationMessage": "", + "type": "object", + "defaultValue": "{\n getDotLabel: (page: E2EPage) => page.find('dot-label'),\n getHint: (page: E2EPage) => page.find('.dot-field__hint'),\n getErrorMessage: (page: E2EPage) => page.find('.dot-field__error-message'),\n class: {\n empty: ['dot-valid', 'dot-untouched', 'dot-pristine'],\n emptyPristineInvalid: ['dot-pristine', 'dot-untouched', 'dot-invalid'],\n emptyRequired: ['dot-required', 'dot-invalid', 'dot-touched', 'dot-dirty'],\n emptyRequiredPristine: ['dot-required', 'dot-invalid', 'dot-untouched', 'dot-pristine'],\n filled: ['dot-valid', 'dot-touched', 'dot-dirty'],\n filledRequired: ['dot-required', 'dot-valid', 'dot-touched', 'dot-dirty'],\n filledRequiredPristine: ['dot-required', 'dot-valid', 'dot-untouched', 'dot-pristine'],\n touchedPristine: ['dot-valid', 'dot-pristine', 'dot-touched']\n },\n triggerStatusChange: (\n pristine: boolean,\n touched: boolean,\n valid: boolean,\n element: E2EElement,\n isValidRange?: boolean\n ) => {\n element.triggerEvent('_dotStatusChange', {\n detail: {\n name: '',\n status: {\n dotPristine: pristine,\n dotTouched: touched,\n dotValid: valid\n },\n isValidRange: isValidRange\n }\n });\n }\n}" + }, + { + "name": "DOWNLOAD_URL", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/view/components/_common/dot-download-bundle-dialog/dot-download-bundle-dialog.component.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "defaultValue": "'/api/bundle/_generate'" + }, + { + "name": "DragHandler", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/block-editor/src/lib/extensions/dragHandler.extension.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "(injector: Injector, resolver: ComponentFactoryResolver) => {\n return Extension.create({\n name: 'dragHandler',\n\n addProseMirrorPlugins() {\n let nodeToBeDragged = null;\n const WIDTH = 24;\n const HANDLER_GAP = 50;\n const dragHandlerFactory = resolver.resolveComponentFactory(DragHandlerComponent);\n const dragHandler = dragHandlerFactory.create(injector).location.nativeElement;\n\n function createRect(rect) {\n if (rect == null) {\n return null;\n }\n let newRect = {\n left: rect.left + document.body.scrollLeft,\n top: rect.top + document.body.scrollTop,\n width: rect.width,\n height: rect.height,\n bottom: 0,\n right: 0\n };\n newRect.bottom = newRect.top + newRect.height;\n newRect.right = newRect.left + newRect.width;\n return newRect;\n }\n\n function removeNode(node) {\n if (node && node.parentNode) {\n node.parentNode.removeChild(node);\n }\n }\n\n function blockPosAtCoords(coords, view) {\n let pos = view.posAtCoords(coords);\n if (pos) {\n let node = getDirectChild(view.nodeDOM(pos.inside));\n if (node && node.nodeType === 1) {\n let desc = view.docView.nearestDesc(node, true);\n if (!(!desc || desc === view.docView)) {\n return desc.posBefore;\n }\n }\n }\n return null;\n }\n\n function dragStart(e, view: EditorView) {\n if (!e.dataTransfer) return;\n let coords = { left: e.clientX + HANDLER_GAP, top: e.clientY };\n let pos = blockPosAtCoords(coords, view);\n if (pos != null) {\n view.dispatch(\n view.state.tr.setSelection(NodeSelection.create(view.state.doc, pos))\n );\n let slice = view.state.selection.content();\n e.dataTransfer.clearData();\n e.dataTransfer.setDragImage(nodeToBeDragged, 10, 10);\n view.dragging = { slice, move: true };\n }\n }\n\n // Get the direct child of the Editor. To cover cases when the user is hovering nested nodes.\n function getDirectChild(node) {\n while (node && node.parentNode) {\n if (\n node.classList?.contains('ProseMirror') ||\n node.parentNode.classList?.contains('ProseMirror')\n ) {\n break;\n }\n node = node.parentNode;\n }\n return node;\n }\n\n // Check if node has content and is not an empty

    . To show the handler.\n function nodeHasContent(view: EditorView, positon: number): boolean {\n const node = view.nodeDOM(positon);\n\n return (\n !!node?.hasChildNodes() &&\n !(node.childNodes.length === 1 && node.childNodes[0].nodeName == 'BR')\n );\n }\n\n function bindEventsToDragHandler(editorView: EditorView) {\n dragHandler.setAttribute('draggable', 'true');\n dragHandler.addEventListener('dragstart', (e) => dragStart(e, editorView));\n document.body.appendChild(dragHandler);\n }\n\n return [\n new Plugin({\n key: new PluginKey('dragHandler'),\n view: (editorView) => {\n bindEventsToDragHandler(editorView);\n return {\n destroy() {\n removeNode(dragHandler);\n }\n };\n },\n props: {\n handleDOMEvents: {\n drop(view, event) {\n setTimeout(() => {\n let node = document.querySelector('.ProseMirror-hideselection');\n if (node) {\n node.classList.remove('ProseMirror-hideselection');\n }\n });\n return false;\n },\n mousemove(view, event) {\n let coords = {\n left: event.clientX + HANDLER_GAP,\n top: event.clientY\n };\n const position = view.posAtCoords(coords);\n if (position && nodeHasContent(view, position.inside)) {\n nodeToBeDragged = getDirectChild(view.nodeDOM(position.inside));\n if (\n nodeToBeDragged &&\n !nodeToBeDragged.classList?.contains('ProseMirror')\n ) {\n let rect = createRect(\n nodeToBeDragged.getBoundingClientRect()\n );\n let win = nodeToBeDragged.ownerDocument.defaultView;\n rect.top += win.pageYOffset;\n rect.left += win.pageXOffset;\n dragHandler.style.left = rect.left - WIDTH + 'px';\n dragHandler.style.top = rect.top - 4 + 'px';\n dragHandler.style.visibility = 'visible';\n } else {\n dragHandler.style.visibility = 'hidden';\n }\n } else {\n nodeToBeDragged = null;\n dragHandler.style.visibility = 'hidden';\n }\n return false;\n }\n }\n }\n })\n ];\n }\n });\n}" + }, + { + "name": "DRAGULA_CSS", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/html/libraries/dragula.css.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "`\n .gu-mirror {\n position: fixed !important;\n margin: 0 !important;\n z-index: 9999 !important;\n opacity: 1;\n transform-origin: right top;\n }\n\n .gu-hide {\n display: none !important;\n }\n .gu-unselectable {\n user-select: none !important;\n }\n`" + }, + { + "name": "DRAGULA_JS", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/html/libraries/dragula.min.js.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "`!function(e){if(\"object\"==typeof exports&&\"undefined\"!=typeof module)module.exports=e();else if(\"function\"==typeof define&&define.amd)define([],e);else{var n;n=\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:this,n.dragula=e()}}(function(){return function e(n,t,r){function o(u,c){if(!t[u]){if(!n[u]){var a=\"function\"==typeof require&&require;if(!c&&a)return a(u,!0);if(i)return i(u,!0);var f=new Error(\"Cannot find module '\"+u+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=t[u]={exports:{}};n[u][0].call(l.exports,function(e){var t=n[u][1][e];return o(t?t:e)},l,l.exports,e,n,t,r)}return t[u].exports}for(var i=\"function\"==typeof require&&require,u=0;u0?e:fe.revertOnSpill,t=ie||W,r=v(t),o=k(r);o===!1&&n&&(ie?r&&r.removeChild(ie):Q.insertBefore(t,re)),o||n?le.emit(\"cancel\",t,Q,Q):le.emit(\"drop\",t,r,Q,oe),j()}}function j(){var e=ie||W;I(),z(),e&&E.rm(e,\"gu-transit\"),ue&&clearTimeout(ue),le.dragging=!1,ae&&le.emit(\"out\",e,ae,Q),le.emit(\"dragend\",e),Q=W=ie=re=oe=ue=ae=null}function k(e,n){var t;return t=void 0!==n?n:J?oe:g(ie||W),e===Q&&t===re}function q(e,n,r){function o(){var o=t(i);if(o===!1)return!1;var u=H(i,e),c=V(i,u,n,r),a=k(i,c);return a?!0:fe.accepts(W,i,Q,c)}for(var i=e;i&&!o();)i=v(i);return i}function U(e){function n(e){le.emit(e,f,ae,Q)}function t(){s&&n(\"over\")}function r(){ae&&n(\"out\")}if(J){e.preventDefault();var o=y(\"clientX\",e),i=y(\"clientY\",e),u=o-Z,c=i-ee;J.style.left=u+\"px\",J.style.top=c+\"px\";var f=ie||W,l=a(J,o,i),d=q(l,o,i),s=null!==d&&d!==ae;(s||null===d)&&(r(),ae=d,t());var p=v(f);if(d===Q&&ie&&!fe.copySortSource)return void(p&&p.removeChild(f));var m,h=H(d,l);if(null!==h)m=V(d,h,o,i);else{if(fe.revertOnSpill!==!0||ie)return void(ie&&p&&p.removeChild(f));m=re,d=Q}(null===m&&s||m!==f&&m!==g(f))&&(oe=m,d.insertBefore(f,m),le.emit(\"shadow\",f,d,Q))}}function _(e){E.rm(e,\"gu-hide\")}function F(e){le.dragging&&E.add(e,\"gu-hide\")}function K(){if(!J){var e=W.getBoundingClientRect();J=W.cloneNode(!0),J.style.width=d(e)+\"px\",J.style.height=s(e)+\"px\",E.rm(J,\"gu-transit\"),E.add(J,\"gu-mirror\"),fe.mirrorContainer.appendChild(J),o(S,\"add\",\"mousemove\",U),E.add(fe.mirrorContainer,\"gu-unselectable\"),le.emit(\"cloned\",J,W,\"mirror\")}}function z(){J&&(E.rm(fe.mirrorContainer,\"gu-unselectable\"),o(S,\"remove\",\"mousemove\",U),v(J).removeChild(J),J=null)}function H(e,n){for(var t=n;t!==e&&v(t)!==e;)t=v(t);return t===S?null:t}function V(e,n,t,r){function o(){var n,o,i,u=e.children.length;for(n=0;u>n;n++){if(o=e.children[n],i=o.getBoundingClientRect(),c&&i.left+i.width/2>t)return o;if(!c&&i.top+i.height/2>r)return o}return null}function i(){var e=n.getBoundingClientRect();return u(c?t>e.left+d(e)/2:r>e.top+s(e)/2)}function u(e){return e?g(n):n}var c=\"horizontal\"===fe.direction,a=n!==e?i():o();return a}function $(e,n){return\"boolean\"==typeof fe.copy?fe.copy:fe.copy(e,n)}var G=arguments.length;1===G&&Array.isArray(e)===!1&&(n=e,e=[]);var J,Q,W,Z,ee,ne,te,re,oe,ie,ue,ce,ae=null,fe=n||{};void 0===fe.moves&&(fe.moves=l),void 0===fe.accepts&&(fe.accepts=l),void 0===fe.invalid&&(fe.invalid=P),void 0===fe.containers&&(fe.containers=e||[]),void 0===fe.isContainer&&(fe.isContainer=f),void 0===fe.copy&&(fe.copy=!1),void 0===fe.copySortSource&&(fe.copySortSource=!1),void 0===fe.revertOnSpill&&(fe.revertOnSpill=!1),void 0===fe.removeOnSpill&&(fe.removeOnSpill=!1),void 0===fe.direction&&(fe.direction=\"vertical\"),void 0===fe.ignoreInputTextSelection&&(fe.ignoreInputTextSelection=!0),void 0===fe.mirrorContainer&&(fe.mirrorContainer=x.body);var le=b({containers:fe.containers,start:Y,end:D,cancel:A,remove:R,destroy:h,canMove:X,dragging:!1});return fe.removeOnSpill===!0&&le.on(\"over\",_).on(\"out\",F),r(),le}function o(e,n,r,o){var i={mouseup:\"touchend\",mousedown:\"touchstart\",mousemove:\"touchmove\"},u={mouseup:\"pointerup\",mousedown:\"pointerdown\",mousemove:\"pointermove\"},c={mouseup:\"MSPointerUp\",mousedown:\"MSPointerDown\",mousemove:\"MSPointerMove\"};t.navigator.pointerEnabled?w[n](e,u[r],o):t.navigator.msPointerEnabled?w[n](e,c[r],o):(w[n](e,i[r],o),w[n](e,r,o))}function i(e){if(void 0!==e.touches)return e.touches.length;if(void 0!==e.which&&0!==e.which)return e.which;if(void 0!==e.buttons)return e.buttons;var n=e.button;return void 0!==n?1&n?1:2&n?3:4&n?2:0:void 0}function u(e){var n=e.getBoundingClientRect();return{left:n.left+c(\"scrollLeft\",\"pageXOffset\"),top:n.top+c(\"scrollTop\",\"pageYOffset\")}}function c(e,n){return\"undefined\"!=typeof t[n]?t[n]:S.clientHeight?S[e]:x.body[e]}function a(e,n,t){var r,o=e||{},i=o.className;return o.className+=\" gu-hide\",r=x.elementFromPoint(n,t),o.className=i,r}function f(){return!1}function l(){return!0}function d(e){return e.width||e.right-e.left}function s(e){return e.height||e.bottom-e.top}function v(e){return e.parentNode===x?null:e.parentNode}function p(e){return\"INPUT\"===e.tagName||\"TEXTAREA\"===e.tagName||\"SELECT\"===e.tagName||m(e)}function m(e){return e?\"false\"===e.contentEditable?!1:\"true\"===e.contentEditable?!0:m(v(e)):!1}function g(e){function n(){var n=e;do n=n.nextSibling;while(n&&1!==n.nodeType);return n}return e.nextElementSibling||n()}function h(e){return e.targetTouches&&e.targetTouches.length?e.targetTouches[0]:e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e}function y(e,n){var t=h(n),r={pageX:\"clientX\",pageY:\"clientY\"};return e in r&&!(e in t)&&r[e]in t&&(e=r[e]),t[e]}var b=e(\"contra/emitter\"),w=e(\"crossvent\"),E=e(\"./classes\"),x=document,S=x.documentElement;n.exports=r}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"./classes\":1,\"contra/emitter\":5,crossvent:6}],3:[function(e,n,t){n.exports=function(e,n){return Array.prototype.slice.call(e,n)}},{}],4:[function(e,n,t){\"use strict\";var r=e(\"ticky\");n.exports=function(e,n,t){e&&r(function(){e.apply(t||null,n||[])})}},{ticky:9}],5:[function(e,n,t){\"use strict\";var r=e(\"atoa\"),o=e(\"./debounce\");n.exports=function(e,n){var t=n||{},i={};return void 0===e&&(e={}),e.on=function(n,t){return i[n]?i[n].push(t):i[n]=[t],e},e.once=function(n,t){return t._once=!0,e.on(n,t),e},e.off=function(n,t){var r=arguments.length;if(1===r)delete i[n];else if(0===r)i={};else{var o=i[n];if(!o)return e;o.splice(o.indexOf(t),1)}return e},e.emit=function(){var n=r(arguments);return e.emitterSnapshot(n.shift()).apply(this,n)},e.emitterSnapshot=function(n){var u=(i[n]||[]).slice(0);return function(){var i=r(arguments),c=this||e;if(\"error\"===n&&t[\"throws\"]!==!1&&!u.length)throw 1===i.length?i[0]:i;return u.forEach(function(r){t.async?o(r,i,c):r.apply(c,i),r._once&&e.off(n,r)}),e}},e}},{\"./debounce\":4,atoa:3}],6:[function(e,n,t){(function(t){\"use strict\";function r(e,n,t,r){return e.addEventListener(n,t,r)}function o(e,n,t){return e.attachEvent(\"on\"+n,f(e,n,t))}function i(e,n,t,r){return e.removeEventListener(n,t,r)}function u(e,n,t){var r=l(e,n,t);return r?e.detachEvent(\"on\"+n,r):void 0}function c(e,n,t){function r(){var e;return p.createEvent?(e=p.createEvent(\"Event\"),e.initEvent(n,!0,!0)):p.createEventObject&&(e=p.createEventObject()),e}function o(){return new s(n,{detail:t})}var i=-1===v.indexOf(n)?o():r();e.dispatchEvent?e.dispatchEvent(i):e.fireEvent(\"on\"+n,i)}function a(e,n,r){return function(n){var o=n||t.event;o.target=o.target||o.srcElement,o.preventDefault=o.preventDefault||function(){o.returnValue=!1},o.stopPropagation=o.stopPropagation||function(){o.cancelBubble=!0},o.which=o.which||o.keyCode,r.call(e,o)}}function f(e,n,t){var r=l(e,n,t)||a(e,n,t);return h.push({wrapper:r,element:e,type:n,fn:t}),r}function l(e,n,t){var r=d(e,n,t);if(r){var o=h[r].wrapper;return h.splice(r,1),o}}function d(e,n,t){var r,o;for(r=0;r

    \n

    \n
    \n

    \n`" + }, + { + "name": "EDIT_CONTENT_CALLBACK_FUNCTION", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/api/services/dot-workflow-event-handler/dot-workflow-event-handler.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "defaultValue": "'saveAssignCallBackAngular'" + }, + { + "name": "EDIT_MODE_DRAG_DROP", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/html/libraries/index.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "`\n${DRAGULA_JS}\n${AUTOSCROLLER_JS}\n${EDIT_PAGE_JS}\n`" + }, + { + "name": "EDIT_PAGE_JS", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/html/libraries/iframe-edit-mode.js.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "`\n(function () {\n var forbiddenTarget;\n let currentModel;\n var executeScroll = 1;\n\nfunction initDragAndDrop () {\n function getContainers() {\n var containers = [];\n var containersNodeList = document.querySelectorAll('[data-dot-object=\"container\"]');\n\n for (var i = 0; i < containersNodeList.length; i++) {\n containers.push(containersNodeList[i]);\n };\n\n return containers;\n }\n\n function getDotNgModel() {\n var model = [];\n getContainers().forEach(function(container) {\n var contentlets = Array.from(container.querySelectorAll('[data-dot-object=\"contentlet\"]'));\n\n model.push({\n identifier: container.dataset.dotIdentifier,\n uuid: container.dataset.dotUuid,\n contentletsId: contentlets.map(function(contentlet) {\n return contentlet.dataset.dotIdentifier;\n })\n });\n });\n return model;\n }\n\n function checkIfContentletTypeIsAccepted(el, target) {\n return el.dataset.dotBasetype === 'WIDGET' ||\n el.dataset.dotBasetype === 'FORM' ||\n target.dataset.dotAcceptTypes.indexOf(el.dataset.dotType) > -1;\n }\n\n function checkIfMaxLimitNotReached(target) {\n return Array.from(\n target.querySelectorAll(\"[data-dot-object='contentlet']:not(.gu-transit)\")\n ).length < parseInt(target.dataset.maxContentlets, 10);\n }\n\n function checkIfContentletIsUnique(el, target) {\n return Array.from(target.querySelectorAll(\"[data-dot-object='contentlet']:not(.gu-transit)\"))\n .map(node => node.dataset.dotInode).indexOf(el.dataset.dotInode) === -1;\n }\n\n var drake = dragula(\n getContainers(), {\n accepts: function (el, target, source, sibling) {\n var canDrop = false;\n if (target.dataset.dotObject === 'container') {\n canDrop = checkIfContentletTypeIsAccepted(el, target)\n && checkIfMaxLimitNotReached(target)\n && checkIfContentletIsUnique(el, target);\n if (!canDrop && target !== source) {\n forbiddenTarget = target;\n forbiddenTarget.classList.add('no')\n }\n }\n return canDrop;\n },\n invalid: function(el, handle) {\n return !handle.classList.contains('dotedit-contentlet__drag');\n }\n });\n\n drake.on('drag', function() {\n window.requestAnimationFrame(function() {\n const el = document.querySelector('.gu-mirror');\n const rect = el.getBoundingClientRect();\n let transform = 'rotate(4deg)';\n\n if (rect.width > 500) {\n const scale = 500 / rect.width;\n transform = transform + ' scale(' + scale + ') '\n }\n\n el.style.transform = transform;\n });\n\n currentModel = getDotNgModel();\n\n })\n\n drake.on('over', function(el, container, source) {\n container.classList.add('over')\n })\n\n drake.on('out', function(el, container, source) {\n container.classList.remove('over')\n })\n\n drake.on('dragend', function(el) {\n if (forbiddenTarget && forbiddenTarget.classList.contains('no')) {\n forbiddenTarget.classList.remove('no');\n }\n\n currentModel = [];\n });\n\n drake.on('drop', function(el, target, source, sibling) {\n const updatedModel = getDotNgModel();\n if (JSON.stringify(updatedModel) !== JSON.stringify(currentModel)) {\n window.${MODEL_VAR_NAME}.next({\n model: getDotNgModel(),\n type: 'MOVE_CONTENT',\n });\n }\n\n if (target !== source) {\n window.contentletEvents.next({\n name: 'relocate',\n data: {\n container: {\n identifier: target.dataset.dotIdentifier,\n uuid: target.dataset.dotUuid\n },\n contentlet: {\n identifier: el.dataset.dotIdentifier,\n inode: el.dataset.dotInode\n }\n }\n });\n }\n })\n\n window.getDotNgModel = getDotNgModel;\n\n var myAutoScroll = autoScroll([\n window\n ],{\n margin: 100,\n maxSpeed: 60,\n scrollWhenOutside: true,\n autoScroll: function(){\n // Only scroll when the pointer is down, and there is a child being dragged.\n return this.down && drake.dragging;\n }\n });\n\n // D&D DotAsset - Start\n\n function dotAssetCreate(options) {\n const data = {\n contentlet: {\n baseType: 'dotAsset',\n asset: options.file.id,\n hostFolder: options.folder,\n indexPolicy: 'WAIT_FOR'\n }\n };\n\n return fetch(options.url, {\n method: 'PUT',\n headers: {\n 'Content-Type': 'application/json;charset=UTF-8'\n },\n body: JSON.stringify(data)\n })\n .then(async (res) => {\n const error = {};\n try {\n const data = await res.json();\n if (res.status !== 200) {\n let message = '';\n try {\n message = data.errors[0].message;\n } catch(e) {\n message = e.message;\n }\n error = {\n message: message,\n status: res.status\n };\n }\n\n if (!!error.message) {\n throw error;\n } else {\n return data.entity;\n }\n } catch(e) {\n throw res;\n }\n })\n }\n\n function uploadBinaryFile(file, maxSize) {\n let path = '/api/v1/temp';\n path += maxSize ? '?maxFileLength=' + maxSize : '';\n const formData = new FormData();\n formData.append('file', file);\n return fetch(path, {\n method: 'POST',\n body: formData\n }).then(async (response) => {\n if (response.status === 200) {\n return (await response.json()).tempFiles[0];\n } else {\n throw response;\n }\n }).catch(e => {\n throw e;\n })\n }\n\n function uploadFile(file, maxSize) {\n if (file instanceof File) {\n return uploadBinaryFile(file, maxSize);\n }\n }\n\n function setLoadingIndicator() {\n const currentContentlet = document.getElementById('contentletPlaceholder');\n currentContentlet.classList.remove('gu-transit');\n currentContentlet.innerHTML = '
    ';\n }\n\n function isCursorOnUpperSide(cursor, { top, bottom }) {\n return cursor.y - top < (bottom - top)/2\n }\n\n function isContentletPlaceholderInDOM() {\n return !!document.getElementById('contentletPlaceholder');\n }\n\n function isContainerValid(container) {\n return !container.classList.contains('no');\n }\n\n function isContainerAndContentletValid(container, contentlet) {\n return isContainerValid(container) && !contentlet.classList.contains('gu-transit');\n }\n\n function insertBeforeElement(newElem, element) {\n element.parentNode.insertBefore(newElem, element);\n }\n\n function insertAfterElement(newElem, element) {\n element.parentNode.insertBefore(newElem, element.nextSibling);\n }\n\n function removeElementById(elemId) {\n document.getElementById(elemId).remove()\n }\n\n function checkIfContainerAllowsDotAsset(event, container) {\n\n // Different than 1 file\n if (event.dataTransfer.items.length !== 1 ) {\n return false;\n }\n\n // File uploaded not an img\n if (!event.dataTransfer.items[0].type.match(/image/g) ) {\n return false;\n }\n\n // Container does NOT allow img\n if (!container.dataset.dotAcceptTypes.toLocaleLowerCase().match(/dotasset/g)) {\n return false;\n }\n\n // Container reached max contentlet's limit\n if (container.querySelectorAll('div:not(.gu-transit)[data-dot-object=\"contentlet\"]').length === parseInt(container.dataset.maxContentlets, 10)) {\n return false;\n }\n\n return true;\n }\n\n function checkIfContainerAllowContentType(container) {\n if (container.querySelectorAll('div:not(.gu-transit)[data-dot-object=\"contentlet\"]').length === parseInt(container.dataset.maxContentlets, 10)) {\n return false;\n }\n\n // draggedContent is set by dotContentletEditorService.draggedContentType$\n const dotAcceptTypes = container.dataset.dotAcceptTypes.toLocaleLowerCase();\n return (window.hasOwnProperty('draggedContent') && (draggedContent.baseType.toLocaleLowerCase() === 'widget') || \n dotAcceptTypes.includes(draggedContent.variable?.toLocaleLowerCase() || draggedContent.contentType?.toLocaleLowerCase() || draggedContent.baseType?.toLocaleLowerCase()))\n }\n\n function setPlaceholderContentlet() {\n const placeholder = document.createElement('div');\n placeholder.id = 'contentletPlaceholder';\n placeholder.setAttribute('data-dot-object', 'contentlet');\n placeholder.classList.add('gu-transit');\n return placeholder;\n }\n\n function handleHttpErrors(error) {\n window.contentletEvents.next({\n name: 'handle-http-error',\n data: error\n });\n }\n\n let currentContainer;\n\n window.addEventListener(\"dragenter\", dragEnterEvent, false);\n window.addEventListener(\"dragover\", dragOverEvent, false);\n window.addEventListener(\"dragleave\", dragLeaveEvent, false);\n window.addEventListener(\"drop\", dropEvent, false);\n window.addEventListener(\"beforeunload\", removeEvents, false);\n window.addEventListener(\"mousemove\", clearScroll, false );\n\n function clearScroll() {\n executeScroll = 0;\n }\n\n function dragEnterEvent(event) {\n event.preventDefault();\n event.stopPropagation();\n const container = event.target.closest('[data-dot-object=\"container\"]');\n currentContainer = container;\n if (container && !(checkIfContainerAllowsDotAsset(event, container) || checkIfContainerAllowContentType(container))) {\n container.classList.add('no');\n }\n }\n\n function dotWindowScroll(step){\n if (!!executeScroll ) {\n window.scrollBy({\n top: step,\n behaviour: 'smooth'\n });\n } else {\n clearInterval(scrollInterval);\n }\n }\n\n var scrollInterval;\n function dotCustomScroll (step) {\n if (executeScroll === 0) {\n executeScroll = step;\n scrollInterval = setInterval( ()=> {dotWindowScroll(step)}, 1);\n }\n }\n\n function dragOverEvent(event) {\n event.preventDefault();\n event.stopPropagation();\n const container = event.target.closest('[data-dot-object=\"container\"]');\n const contentlet = event.target.closest('[data-dot-object=\"contentlet\"]');\n\n if (event.clientY < 150) {\n dotCustomScroll(-5)\n } else if (event.clientY > (document.body.clientHeight - 150)) {\n dotCustomScroll(5)\n } else {\n clearScroll();\n }\n\n if (contentlet) {\n\n if (isContainerAndContentletValid(container, contentlet) && isContentletPlaceholderInDOM()) {\n removeElementById('contentletPlaceholder');\n }\n\n const contentletPlaceholder = setPlaceholderContentlet();\n if (isContainerAndContentletValid(container, contentlet)) {\n if (isCursorOnUpperSide(event, contentlet.getBoundingClientRect())) {\n insertBeforeElement(contentletPlaceholder, contentlet);\n } else {\n insertAfterElement(contentletPlaceholder, contentlet);\n }\n }\n\n } else if (\n container &&\n !container.querySelectorAll('[data-dot-object=\"contentlet\"]').length &&\n isContainerValid(container)\n ) { // Empty container\n\n if (isContentletPlaceholderInDOM()) {\n removeElementById('contentletPlaceholder');\n }\n container.appendChild(setPlaceholderContentlet());\n }\n }\n\n function dragLeaveEvent(event) {\n event.preventDefault();\n event.stopPropagation();\n const container = event.target.closest('[data-dot-object=\"container\"]');\n\n if (container && currentContainer !== container) {\n container.classList.remove('no');\n }\n\n if (isContentletPlaceholderInDOM()){\n removeElementById('contentletPlaceholder');\n }\n }\n\n function sendCreateContentletEvent(contentlet) {\n window.contentletEvents.next({\n name: 'add-contentlet',\n data: {\n contentlet\n }\n });\n }\n\n function dropEvent(event) {\n\n event.preventDefault();\n event.stopPropagation();\n const container = event.target.closest('[data-dot-object=\"container\"]');\n if (container && !container.classList.contains('no')) {\n setLoadingIndicator();\n if (event.dataTransfer.files[0]) { // trying to upload an image\n uploadFile(event.dataTransfer.files[0]).then((dotCMSTempFile) => {\n dotAssetCreate({\n file: dotCMSTempFile,\n url: '/api/v1/workflow/actions/default/fire/PUBLISH',\n folder: ''\n }).then((response) => {\n window.contentletEvents.next({\n name: 'add-uploaded-dotAsset',\n data: {\n contentlet: response\n }\n });\n }).catch(e => {\n handleHttpErrors(e);\n })\n }).catch(e => {\n handleHttpErrors(e);\n })\n } else { // Adding specific Content Type / Contentlet\n if (draggedContent.contentType) { // Contentlet\n\n if (draggedContent.contentType === 'FORM') {\n const requestForm = async () => {\n const url = 'api/v1/containers/form/' + draggedContent.id + '?containerId=' + container.dataset['dotIdentifier'];\n try {\n const response = await fetch(url);\n const json = await response.json();\n sendCreateContentletEvent({ \n baseType: 'FORM',\n identifier: json.entity.content.identifier,\n inode: json.entity.content.inode\n });\n } catch(e) {\n handleHttpErrors(e);\n }\n }\n requestForm();\n\n } else {\n sendCreateContentletEvent(draggedContent);\n }\n } else { // Content Type\n window.contentletEvents.next({\n name: 'add-content',\n data: {\n container: container.dataset,\n contentType: draggedContent\n }\n });\n }\n }\n }\n if (container) {\n setTimeout(()=>{\n container.classList.remove('no');\n }, 0);\n }\n\n }\n\n function removeEvents(e) {\n window.removeEventListener(\"dragenter\", dragEnterEvent, false);\n window.removeEventListener(\"dragover\", dragOverEvent, false);\n window.removeEventListener(\"dragleave\", dragLeaveEvent, false);\n window.removeEventListener(\"drop\", dropEvent, false);\n window.removeEventListener(\"beforeunload\", removeEvents, false);\n window.removeEventListener(\"mousemove\", clearScroll, false );\n }\n\n function disableDraggableHtmlElements() {\n var containerAnchorsList = document.querySelectorAll('[data-dot-object=\"container\"] a, [data-dot-object=\"container\"] a img');\n for (var i = 0; i < containerAnchorsList.length; i++) {\n containerAnchorsList[i].setAttribute(\"draggable\", \"false\")\n };\n }\n\n disableDraggableHtmlElements();\n\n // D&D Img - End\n}\n\n /*\n This setInterval is required because this script is running\n before the web component finishes rendering. Currently,\n we do not have a way to listen to the web component event,\n so this setInterval is used.\n */\n\n let attempts = 0;\n const initScript = setInterval(function() {\n const isContainer = document.querySelector('[data-dot-object=\"container\"]');\n attempts++;\n if(isContainer) {\n clearInterval(initScript);\n initDragAndDrop();\n } else if( attempts === 10) {\n clearInterval(initScript);\n }\n }, 500);\n\n})();\n\n`" + }, + { + "name": "EDIT_PAGE_JS_DOJO_REQUIRE", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/html/libraries/index.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "`\nrequire(['/html/js/dragula-3.7.2/dragula.min.js'], function(dragula) { \n ${EDIT_MODE_DRAG_DROP}\n});\n`" + }, + { + "name": "EMAIL_REGEX", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-js/src/lib/core/dotcms-config.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "defaultValue": "'emailRegex'" + }, + { + "name": "Empty", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/components/dot-palette/dot-palette.component.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "(props) => {\n return {\n moduleMetadata: {\n declarations: [DotPaletteComponent]\n },\n component: DotPaletteComponent,\n props,\n template: ``\n };\n}" + }, + { + "name": "EMPTY_FIELD", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/components/fields/util/field-util.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSContentTypeField", + "defaultValue": "{\n contentTypeId: null,\n dataType: null,\n fieldType: null,\n fieldTypeLabel: null,\n fieldVariables: [],\n fixed: null,\n iDate: null,\n id: null,\n indexed: null,\n listed: null,\n modDate: null,\n name: null,\n readOnly: null,\n required: null,\n searchable: null,\n sortOrder: null,\n unique: null,\n variable: null,\n clazz: null,\n defaultValue: null,\n hint: null,\n regexCheck: null,\n values: null\n}" + }, + { + "name": "EMPTY_TEMPLATE", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/portlets/dot-templates/dot-template-create-edit/store/dot-template.store.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "object", + "defaultValue": "{\n identifier: '',\n title: '',\n friendlyName: '',\n image: ''\n}" + }, + { + "name": "EMPTY_TEMPLATE_ADVANCED", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/portlets/dot-templates/dot-template-create-edit/store/dot-template.store.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "DotTemplateItemadvanced", + "defaultValue": "{\n ...EMPTY_TEMPLATE,\n type: 'advanced',\n body: '',\n drawed: false\n}" + }, + { + "name": "EMPTY_TEMPLATE_DESIGN", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/portlets/dot-templates/dot-template-create-edit/store/dot-template.store.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "DotTemplateItemDesign", + "defaultValue": "{\n ...EMPTY_TEMPLATE,\n type: 'design',\n layout: {\n header: true,\n footer: true,\n body: {\n rows: []\n },\n sidebar: null,\n title: '',\n width: null\n },\n theme: '',\n containers: {},\n drawed: true\n}" + }, + { + "name": "enterprisePorlets", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/api/services/dot-license/dot-license.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "DotUnlicensedPortletData[]", + "defaultValue": "[\n {\n icon: 'tune',\n titleKey: 'com.dotcms.repackage.javax.portlet.title.rules',\n url: '/rules'\n },\n {\n icon: 'cloud_upload',\n titleKey: 'com.dotcms.repackage.javax.portlet.title.publishing-queue',\n url: '/c/publishing-queue'\n },\n {\n icon: 'find_in_page',\n titleKey: 'com.dotcms.repackage.javax.portlet.title.site-search',\n url: '/c/site-search'\n },\n {\n icon: 'update',\n titleKey: 'com.dotcms.repackage.javax.portlet.title.time-machine',\n url: '/c/time-machine'\n },\n {\n icon: 'device_hub',\n titleKey: 'com.dotcms.repackage.javax.portlet.title.workflow-schemes',\n url: '/c/workflow-schemes'\n },\n {\n icon: 'find_in_page',\n titleKey: 'com.dotcms.repackage.javax.portlet.title.es-search',\n url: '/c/es-search'\n },\n {\n icon: 'business',\n titleKey: 'Forms-and-Form-Builder',\n url: '/forms'\n },\n {\n icon: 'apps',\n titleKey: 'com.dotcms.repackage.javax.portlet.title.apps',\n url: '/apps'\n }\n]" + }, + { + "name": "ENV_PROVIDERS", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/providers.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "[]", + "defaultValue": "[...PROVIDERS]" + }, + { + "name": "environment", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcdn/src/environments/environment.prod.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "object", + "defaultValue": "{\n production: true\n}" + }, + { + "name": "environment", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcdn/src/environments/environment.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "object", + "defaultValue": "{\n production: false\n}" + }, + { + "name": "environment", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-block-editor/src/environments/environment.prod.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "object", + "defaultValue": "{\n production: true\n}" + }, + { + "name": "environment", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-block-editor/src/environments/environment.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "object", + "defaultValue": "{\n production: false\n}" + }, + { + "name": "environment", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/environments/environment.prod.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "object", + "defaultValue": "{\n production: true\n}" + }, + { + "name": "environment", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/environments/environment.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "object", + "defaultValue": "{\n production: false\n}" + }, + { + "name": "environment", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dot-rules/src/environments/environment.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "object", + "defaultValue": "{\n production: false\n}" + }, + { + "name": "environment", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dot-rules/src/environments/environment.prod.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "object", + "defaultValue": "{\n production: true\n}" + }, + { + "name": "environment", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-js/src/lib/environments/environment.prod.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "object", + "defaultValue": "{\n production: true\n}" + }, + { + "name": "environment", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-js/src/lib/environments/environment.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "object", + "defaultValue": "{\n production: false\n}" + }, + { + "name": "ExtraActions", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/view/components/dot-portlet-base/dot-portlet-base.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "() => ({\n props: {\n title: 'Extra Actions',\n portletActions: {\n primary: [\n {\n label: 'Action',\n command: (e) => {\n console.log(e);\n }\n }\n ],\n cancel: () => {\n console.log('cancel');\n }\n }\n },\n template: ExtraActionsTemplate\n})" + }, + { + "name": "ExtraActionsTemplate", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/view/components/dot-portlet-base/dot-portlet-base.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "`\n\n \n \n \n \n \n \n \n \n \n \n ${portletContent()}\n\n`" + }, + { + "name": "fadeIn", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-webcomponents/src/elements/dot-tooltip/utils.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "(el: HTMLElement) => {\n el.style.opacity = '0';\n\n (function fade() {\n let val = parseFloat(el.style.opacity);\n if (!((val += 0.1) > 1)) {\n el.style.opacity = val.toString();\n requestAnimationFrame(fade);\n }\n })();\n}" + }, + { + "name": "fakePageView", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/test/page-view.mock.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "DotPageView", + "defaultValue": "{\n containers: mockDotContainers(),\n page: mockDotPage(),\n layout: mockDotLayout(),\n template: mockDotTemplate(),\n canEditTemplate: true\n}" + }, + { + "name": "fallbackErrorMessages", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-field-elements/src/components/dot-form/dot-form.tsx", + "deprecated": false, + "deprecationMessage": "", + "type": "object", + "defaultValue": "{\n 500: '500 Internal Server Error',\n 400: '400 Bad Request',\n 401: '401 Unauthorized Error'\n}" + }, + { + "name": "fallbackErrorMessages", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/utils/src/lib/services/dot-temp-file.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "object", + "defaultValue": "{\n 500: '500 Internal Server Error',\n 400: '400 Bad Request',\n 401: '401 Unauthorized Error'\n}" + }, + { + "name": "fallbackErrorMessages", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-webcomponents/src/components/contenttypes-fields/dot-form/services/dot-upload.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "object", + "defaultValue": "{\n 500: '500 Internal Server Error',\n 400: '400 Bad Request',\n 401: '401 Unauthorized Error'\n}" + }, + { + "name": "FIELD_ICONS", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/components/fields/content-types-fields-list/content-types-fields-icon-map.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "object", + "defaultValue": "{\n 'com.dotcms.contenttype.model.field.ImmutableBinaryField': 'note',\n 'com.dotcms.contenttype.model.field.ImmutableCategoryField': 'format_list_bulleted',\n 'com.dotcms.contenttype.model.field.ImmutableCheckboxField': 'check_box',\n 'com.dotcms.contenttype.model.field.ImmutableConstantField': 'check_box_outline_blank',\n 'com.dotcms.contenttype.model.field.ImmutableCustomField': 'code',\n 'com.dotcms.contenttype.model.field.ImmutableDateField': 'date_range',\n 'com.dotcms.contenttype.model.field.ImmutableDateTimeField': 'event_note',\n 'com.dotcms.contenttype.model.field.ImmutableFileField': 'insert_drive_file',\n 'com.dotcms.contenttype.model.field.ImmutableHiddenField': 'visibility_off',\n 'com.dotcms.contenttype.model.field.ImmutableHostFolderField': 'storage',\n 'com.dotcms.contenttype.model.field.ImmutableImageField': 'image',\n 'com.dotcms.contenttype.model.field.ImmutableKeyValueField': 'vpn_key',\n 'com.dotcms.contenttype.model.field.ImmutableMultiSelectField': 'menu',\n 'com.dotcms.contenttype.model.field.ImmutablePermissionTabField': 'lock',\n 'com.dotcms.contenttype.model.field.ImmutableRadioField': 'radio_button_checked',\n 'com.dotcms.contenttype.model.field.ImmutableRelationshipsTabField': 'filter_none',\n 'com.dotcms.contenttype.model.field.ImmutableSelectField': 'fiber_manual_record',\n 'com.dotcms.contenttype.model.field.ImmutableTagField': 'local_offer',\n 'com.dotcms.contenttype.model.field.ImmutableTextAreaField': 'format_textdirection_r_to_l',\n 'com.dotcms.contenttype.model.field.ImmutableTextField': 'title',\n 'com.dotcms.contenttype.model.field.ImmutableTimeField': 'access_time',\n 'com.dotcms.contenttype.model.field.ImmutableWysiwygField': 'visibility',\n 'com.dotcms.contenttype.model.field.ImmutableTabDividerField': 'folder',\n 'com.dotcms.contenttype.model.field.ImmutableLineDividerField': 'more_horiz',\n 'com.dotcms.contenttype.model.field.ImmutableRelationshipField': 'merge_type',\n 'com.dotcms.contenttype.model.field.ImmutableStoryBlockField': 'post_add',\n [COLUMN_BREAK.clazz]: 'view_column'\n}" + }, + { + "name": "fieldCustomProcess", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-field-elements/src/components/dot-form/utils/index.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "object", + "defaultValue": "{\n 'DOT-KEY-VALUE': pipedValuesToObject\n}" + }, + { + "name": "fieldCustomProcess", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-webcomponents/src/components/contenttypes-fields/dot-form/utils/index.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "object", + "defaultValue": "{\n 'DOT-KEY-VALUE': pipedValuesToObject\n}" + }, + { + "name": "fieldMap", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-field-elements/src/components/dot-form/utils/index.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "object", + "defaultValue": "{\n Time: DotFormFields.Time,\n Textarea: DotFormFields.Textarea,\n Text: DotFormFields.Text,\n Tag: DotFormFields.Tag,\n Select: DotFormFields.Select,\n Radio: DotFormFields.Radio,\n 'Multi-Select': DotFormFields['Multi-Select'],\n 'Key-Value': fieldParamsConversionFromBE['Key-Value'],\n 'Date-and-Time': DotFormFields['Date-and-Time'],\n 'Date-Range': DotFormFields['Date-Range'],\n Date: DotFormFields.Date,\n Checkbox: DotFormFields.Checkbox,\n Binary: DotFormFields.Binary\n}" + }, + { + "name": "fieldMap", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-webcomponents/src/components/contenttypes-fields/dot-form/utils/index.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "object", + "defaultValue": "{\n Time: DotFormFields.Time,\n Textarea: DotFormFields.Textarea,\n Text: DotFormFields.Text,\n Tag: DotFormFields.Tag,\n Select: DotFormFields.Select,\n Radio: DotFormFields.Radio,\n 'Multi-Select': DotFormFields['Multi-Select'],\n 'Key-Value': fieldParamsConversionFromBE['Key-Value'],\n 'Date-and-Time': DotFormFields['Date-and-Time'],\n 'Date-Range': DotFormFields['Date-Range'],\n Date: DotFormFields.Date,\n Checkbox: DotFormFields.Checkbox,\n Binary: DotFormFields.Binary\n}" + }, + { + "name": "fieldMockNotRequired", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-field-elements/src/test/mocks.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSContentTypeLayoutRow[]", + "defaultValue": "[\n {\n divider: {\n ...basicField\n },\n columns: [\n {\n columnDivider: {\n ...basicField\n },\n fields: [\n {\n ...basicField,\n defaultValue: 'key|value,llave|valor',\n fieldType: 'Key-Value',\n name: 'Key Value:',\n required: false,\n variable: 'keyvalue2'\n }\n ]\n }\n ]\n }\n]" + }, + { + "name": "fieldMockNotRequired", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-webcomponents/src/test/mocks.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSContentTypeLayoutRow[]", + "defaultValue": "[\n {\n divider: {\n ...basicField\n },\n columns: [\n {\n columnDivider: {\n ...basicField\n },\n fields: [\n {\n ...basicField,\n defaultValue: 'key|value,llave|valor',\n fieldType: 'Key-Value',\n name: 'Key Value:',\n required: false,\n variable: 'keyvalue2'\n }\n ]\n }\n ]\n }\n]" + }, + { + "name": "fieldParamsConversionFromBE", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-field-elements/src/components/dot-form/utils/index.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "object", + "defaultValue": "{\n 'Key-Value': (field: DotCMSContentTypeField) => {\n if (field.defaultValue && typeof field.defaultValue !== 'string') {\n const valuesArray = Object.keys(field.defaultValue).map((key: string) => {\n return { key: key, value: field.defaultValue[key] };\n });\n field.defaultValue = getStringFromDotKeyArray(valuesArray);\n }\n return DotFormFields['Key-Value'](field);\n }\n}" + }, + { + "name": "fieldParamsConversionFromBE", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-webcomponents/src/components/contenttypes-fields/dot-form/utils/index.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "object", + "defaultValue": "{\n 'Key-Value': (field: DotCMSContentTypeField) => {\n if (field.defaultValue && typeof field.defaultValue !== 'string') {\n const valuesArray = Object.keys(field.defaultValue).map((key: string) => {\n return { key: key, value: field.defaultValue[key] };\n });\n field.defaultValue = getStringFromDotKeyArray(valuesArray);\n }\n return DotFormFields['Key-Value'](field);\n }\n}" + }, + { + "name": "FIELDS_DEFAULT_VALUE", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-field-elements/src/utils/checkProp.tsx", + "deprecated": false, + "deprecationMessage": "", + "type": "object", + "defaultValue": "{\n options: '',\n regexCheck: '',\n value: '',\n min: '',\n max: '',\n step: '',\n type: 'text',\n accept: null\n}" + }, + { + "name": "FIELDS_DEFAULT_VALUE", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-webcomponents/src/utils/checkProp.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "object", + "defaultValue": "{\n options: '',\n regexCheck: '',\n value: '',\n min: '',\n max: '',\n step: '',\n type: 'text',\n accept: null\n}" + }, + { + "name": "fieldsBrokenWithColumns", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/test/dot-content-types.mock.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSContentTypeLayoutRow[]", + "defaultValue": "[\n {\n divider: {\n ...dotcmsContentTypeFieldBasicMock\n },\n columns: [\n {\n columnDivider: {\n ...dotcmsContentTypeFieldBasicMock,\n clazz: 'com.dotcms.contenttype.model.field.ImmutableColumnField'\n },\n fields: [\n {\n ...dotcmsContentTypeFieldBasicMock\n }\n ]\n },\n {\n columnDivider: {\n ...dotcmsContentTypeFieldBasicMock,\n clazz: 'com.dotcms.contenttype.model.field.ImmutableColumnField'\n },\n fields: [\n {\n ...dotcmsContentTypeFieldBasicMock\n }\n ]\n }\n ]\n }\n]" + }, + { + "name": "fieldsWithBreakColumn", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/test/dot-content-types.mock.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "DotCMSContentTypeLayoutRow[]", + "defaultValue": "[\n {\n divider: {\n ...dotcmsContentTypeFieldBasicMock\n },\n columns: [\n {\n columnDivider: {\n ...dotcmsContentTypeFieldBasicMock,\n clazz: 'com.dotcms.contenttype.model.field.ImmutableColumnField'\n },\n fields: [\n {\n ...dotcmsContentTypeFieldBasicMock\n },\n {\n ...dotcmsContentTypeFieldBasicMock,\n clazz: 'contenttype.column.break',\n name: 'Column'\n },\n {\n ...dotcmsContentTypeFieldBasicMock\n }\n ]\n }\n ]\n }\n]" + }, + { + "name": "FILE_MOCK", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-field-elements/src/components/dot-binary-file-preview/dot-binary-file-preview.e2e.tsx", + "deprecated": false, + "deprecationMessage": "", + "type": "object", + "defaultValue": "{\n id: 'temp_09ef3de32b',\n mimeType: 'image/jpeg',\n referenceUrl: '/dA/temp_09ef3de32b/tmp/002.jpg',\n thumbnailUrl: 'https://upload.002.jpg',\n fileName: '002.jpg',\n folder: '',\n image: true,\n length: 1606323\n}" + }, + { + "name": "FILE_MOCK", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-webcomponents/src/components/contenttypes-fields/dot-binary-file/components/dot-binary-file-preview/dot-binary-file-preview.e2e.tsx", + "deprecated": false, + "deprecationMessage": "", + "type": "object", + "defaultValue": "{\n id: 'temp_09ef3de32b',\n mimeType: 'image/jpeg',\n referenceUrl: '/dA/temp_09ef3de32b/tmp/002.jpg',\n thumbnailUrl: 'https://upload.002.jpg',\n fileName: '002.jpg',\n folder: '',\n image: true,\n length: 1606323\n}" + }, + { + "name": "files", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/stories/primeng/data/Tree.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "[]", + "defaultValue": "[\n {\n label: 'Documents',\n data: 'Documents Folder',\n expandedIcon: 'pi pi-folder-open',\n collapsedIcon: 'pi pi-folder',\n children: [\n {\n label: 'Work',\n data: 'Work Folder',\n expandedIcon: 'pi pi-folder-open',\n collapsedIcon: 'pi pi-folder',\n children: [\n {\n label: 'Expenses.doc',\n icon: 'pi pi-file',\n data: 'Expenses Document'\n },\n { label: 'Resume.doc', icon: 'pi pi-file', data: 'Resume Document' }\n ]\n },\n {\n label: 'Home',\n data: 'Home Folder',\n expandedIcon: 'pi pi-folder-open',\n collapsedIcon: 'pi pi-folder',\n children: [\n {\n label: 'Invoices.txt',\n icon: 'pi pi-file',\n data: 'Invoices for this month'\n }\n ]\n }\n ]\n },\n {\n label: 'Pictures',\n data: 'Pictures Folder',\n expandedIcon: 'pi pi-folder-open',\n collapsedIcon: 'pi pi-folder',\n children: [\n { label: 'barcelona.jpg', icon: 'pi pi-image', data: 'Barcelona Photo' },\n { label: 'logo.jpg', icon: 'pi pi-image', data: 'PrimeFaces Logo' },\n { label: 'primeui.png', icon: 'pi pi-image', data: 'PrimeUI Logo' }\n ]\n },\n {\n label: 'Movies',\n data: 'Movies Folder',\n expandedIcon: 'pi pi-folder-open',\n collapsedIcon: 'pi pi-folder',\n children: [\n {\n label: 'Al Pacino',\n data: 'Pacino Movies',\n children: [\n { label: 'Scarface', icon: 'pi pi-video', data: 'Scarface Movie' },\n { label: 'Serpico', icon: 'pi pi-video', data: 'Serpico Movie' }\n ]\n },\n {\n label: 'Robert De Niro',\n data: 'De Niro Movies',\n children: [\n {\n label: 'Goodfellas',\n icon: 'pi pi-video',\n data: 'Goodfellas Movie'\n },\n {\n label: 'Untouchables',\n icon: 'pi pi-video',\n data: 'Untouchables Movie'\n }\n ]\n }\n ]\n }\n]" + }, + { + "name": "FLOATING_ACTIONS_MENU_KEYBOARD", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/block-editor/src/lib/plugins/floating.plugin.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "defaultValue": "'menuFloating'" + }, + { + "name": "FloatingActionsPlugin", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/block-editor/src/lib/plugins/floating.plugin.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "(options: FloatingActionsPluginProps) => {\n return new Plugin({\n key: FloatingActionsPluginKey,\n view: (view) =>\n new FloatingActionsView({ key: FloatingActionsPluginKey, view, ...options }),\n state: {\n /**\n * Init the plugin state\n *\n * @return {*} {PluginState}\n */\n init(): PluginState {\n return {\n open: false\n };\n },\n /**\n * Update the plugin state base on meta information\n *\n * @param {Transaction} transaction\n * @return {*} {PluginState}\n */\n apply(transaction: Transaction): PluginState {\n const transactionMeta = transaction.getMeta(FLOATING_ACTIONS_MENU_KEYBOARD);\n\n if (transactionMeta?.open) {\n return {\n open: transactionMeta?.open\n };\n }\n\n return {\n open: false\n };\n }\n },\n props: {\n /**\n * Catch and handle the keydown in the plugin\n *\n * @param {EditorView} view\n * @param {KeyboardEvent} event\n * @return {*}\n */\n handleKeyDown(view: EditorView, event: KeyboardEvent) {\n const { open, range } = this.getState(view.state);\n if (!open) {\n return false;\n }\n return options.render().onKeyDown({ event, range, view });\n }\n }\n });\n}" + }, + { + "name": "FloatingActionsPluginKey", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/block-editor/src/lib/plugins/floating.plugin.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "new PluginKey(FLOATING_ACTIONS_MENU_KEYBOARD)" + }, + { + "name": "FloatingLabel", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/stories/dotcms/form/DotCMSForms.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "(props) => {\n return {\n template: InputTemplate(TextInputFloatingLabel),\n props\n };\n}" + }, + { + "name": "FloatLabelTemplate", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/stories/primeng/form/FloatLabel.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "`\n \n \n \n \n`" + }, + { + "name": "FocusTrapTemplate", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/stories/primeng/misc/FocusTrap.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "`\n
    \n
    Input
    \n \n\n
    Float Label
    \n \n \n \n \n\n
    Disabled Input
    \n \n\n
    Input with tabindex -1
    \n \n\n
    Button
    \n \n\n
    Disabled Button
    \n \n\n
    Button with tabindex -1
    \n \n\n
    Dropdown
    \n \n
    \n`" + }, + { + "name": "font", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-webcomponents/src/elements/dot-contentlet-icon/dot-contentlet-icon.tsx", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "defaultValue": "'font_download'" + }, + { + "name": "format", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/components/fields/service/validators/date.validator.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "object", + "defaultValue": "{\n 'com.dotcms.contenttype.model.field.ImmutableDateField': 'yyyy-MM-dd',\n 'com.dotcms.contenttype.model.field.ImmutableDateTimeField': 'yyyy-MM-dd HH:mm:ss',\n 'com.dotcms.contenttype.model.field.ImmutableTimeField': 'HH:mm:ss'\n}" + }, + { + "name": "getDays", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-field-elements/src/components/dot-date-range/dot-date-range.e2e.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "(page: E2EPage) => page.findAll('.flatpickr-day')" + }, + { + "name": "getDays", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-webcomponents/src/components/contenttypes-fields/dot-date-range/dot-date-range.e2e.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "(page: E2EPage) => page.findAll('.flatpickr-day')" + }, + { + "name": "getEditPageCss", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/html/libraries/iframe-edit-mode.css.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "(timestampId: string): string => {\n return `\n // Fonts\n // MATERIAL DESIGN ICONS\n /* fallback */\n @font-face {\n font-family: 'Material Icons';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url('/dotAdmin/assets/MaterialIcons-Regular.ttf') format('truetype');\n }\n\n .material-icons {\n font-family: 'Material Icons';\n font-weight: normal;\n font-style: normal;\n font-size: 24px;\n line-height: 1;\n letter-spacing: normal;\n text-transform: none;\n display: inline-block;\n white-space: nowrap;\n word-wrap: normal;\n direction: ltr;\n -webkit-font-feature-settings: 'liga';\n -webkit-font-smoothing: antialiased;\n }\n\n\n // GOOGLE FONTS\n /* roboto-regular - vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic */\n @font-face {\n font-family: 'Roboto';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: local(''),\n url('/dotAdmin/assets/roboto-v27-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */\n url('/dotAdmin/assets/roboto-v27-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-regular.woff') format('woff'), /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */\n }\n /* roboto-500 - vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic */\n @font-face {\n font-family: 'Roboto';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: local(''),\n url('/dotAdmin/assets/roboto-v27-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-500.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */\n url('/dotAdmin/assets/roboto-v27-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-500.woff') format('woff'), /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */\n }\n /* roboto-700 - vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic */\n @font-face {\n font-family: 'Roboto';\n font-style: normal;\n font-weight: 700;\n font-display: swap;\n src: local(''),\n url('/dotAdmin/assets/roboto-v27-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-700.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */\n url('/dotAdmin/assets/roboto-v27-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-700.woff') format('woff'), /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */\n }\n\n ${timestampId}:root {\n --color-background: #3A3847;\n --color-main: #C336E5;\n --color-main_mod: #D369EC;\n --color-main_rgb: 195, 54, 229;\n --color-sec: #54428E;\n --color-sec_rgb: 84, 66, 142;\n }\n\n ${timestampId} [data-dot-object=\"container\"] {\n border: solid 1px #53c2f9 !important;\n margin-bottom: 35px !important;\n min-height: 120px !important;\n display: flex !important;\n flex-direction: column !important;\n padding-bottom: 5px !important;\n padding-top: 5px !important;\n width: 100% !important;\n }\n\n ${timestampId} [data-dot-object=\"container\"].no {\n background-color: #ff00000f !important;\n border-color: red !important;\n border-radious: 2px !important;\n box-shadow: 0 0 20px red !important;\n }\n\n ${timestampId} [data-dot-object=\"container\"].disabled {\n border-color: ${grayLight} !important;\n }\n\n ${timestampId} [data-dot-object=\"contentlet\"] {\n background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAQElEQVQoU2NkIAIEH/6VxkhIHUjRWlu2WXgVwhSBDMOpEFkRToXoirAqxKYIQyEuRSgK8SmCKySkCKyQGEUghQCguSaB0AmkRwAAAABJRU5ErkJggg==\") !important;\n margin: 16px 16px 16px !important;\n min-height: 60px !important;\n position: relative;\n padding-top: 25px !important;\n transition: background ${animation} !important;\n }\n\n ${timestampId} [data-dot-object=\"contentlet\"]:first-child {\n margin-top: 35px !important;\n }\n\n ${timestampId} [data-dot-object=\"container\"].inline-editing [data-dot-object=\"contentlet\"] .dotedit-contentlet__toolbar {\n visibility: hidden;\n }\n\n /*\n When you start D&D in a contentlet dragula clones the elements and append it to the end\n the body and position to the mouse movement. This styles are for that element\n */\n ${timestampId} [data-dot-object=\"contentlet\"].gu-mirror {\n margin: 0 !important;\n border: solid 1px #53c2f9;\n padding: 1rem !important;\n background: #FFF !important;\n color: #444 !important;\n height: auto !important;\n min-height: auto !important;\n box-shadow: 0 0 40px 0 #00000038;\n z-index: 2147483648 !important;\n pointer-events: none !important;\n user-select: none !important;\n }\n\n /*\n .gu-transit is the element that dragula place is the possible drop area\n We change that to be a 10px line to indicate the user where is going to\n drop the element is dragging.\n */\n ${timestampId} [data-dot-object=\"contentlet\"].gu-transit:not(.gu-mirror) {\n min-height: 0 !important;\n background: rgba(83, 194, 249, 0.5) !important;\n overflow: hidden;\n padding: 0px !important;\n margin: 0px !important;\n height: 10px;\n margin: -5px 16px -5px !important;\n z-index: 100 !important;\n }\n\n ${timestampId} [data-dot-object=\"contentlet\"].gu-transit:not(.gu-mirror):first-child {\n margin-bottom: 14px !important;\n }\n\n /* Hide all the elements inside the contentlet while were relocating */\n ${timestampId} [data-dot-object=\"contentlet\"].gu-transit:not(.gu-mirror) * {\n display: none;\n }\n\n ${timestampId} [data-dot-object=\"contentlet\"].gu-mirror .dotedit-contentlet__toolbar {\n display: none !important;\n }\n\n ${timestampId} [data-dot-object=\"contentlet\"][data-dot-has-page-lang-version=\"false\"] {\n display: none !important;\n }\n\n ${timestampId} [data-dot-object=\"container\"]:hover [data-dot-object=\"contentlet\"]:not(.gu-transit) {\n background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAQElEQVQoU2NkIAIEH/r5n5GQOpCitXbsjHgVwhSBDMOpEFkRToXoirAqxKYIQyEuRSgK8SmCKySkCKyQGEUghQCQPycYlScX0wAAAABJRU5ErkJggg==\") !important;\n }\n\n ${timestampId} [data-dot-object=\"container\"].over [data-dot-object=\"contentlet\"] {\n pointer-events: none;\n user-select: none !important;\n }\n\n ${timestampId} .dotedit-container__toolbar {\n float: right !important;\n font-size: 0 !important;\n transform: translate(-8px, 17px) !important;\n z-index: 9999999 !important;\n position: relative !important;\n }\n\n ${timestampId} .dotedit-container__toolbar button,\n ${timestampId} .dotedit-contentlet__toolbar button {\n box-shadow: ${mdShadow1} !important;\n border: none !important;\n border-radius: 16px !important;\n cursor: pointer !important;\n font-size: 0 !important;\n height: 32px !important;\n outline: none !important;\n position: relative !important;\n width: 32px !important;\n z-index: 2147483646 !important;\n }\n\n ${timestampId} .dotedit-container__toolbar button:not([disabled]):hover,\n ${timestampId} .dotedit-contentlet__toolbar button:not([disabled]):hover {\n box-shadow: ${mdShadow3} !important;\n transform: scale(1.1) !important;\n }\n\n ${timestampId} .dotedit-container__toolbar button:active,\n ${timestampId} .dotedit-contentlet__toolbar button:active {\n box-shadow: ${mdShadow1} !important;\n }\n\n ${timestampId} .dotedit-container__toolbar button:disabled {\n background-color: ${grayLight} !important;\n }\n\n ${timestampId} .dotedit-contentlet__toolbar {\n display: flex !important;\n font-size: 0 !important;\n opacity: 0 !important;\n position: absolute !important;\n right: 0 !important;\n top: -16px !important;\n transition: opacity ${animation} !important;\n }\n\n ${timestampId} [data-dot-object=\"contentlet\"]:hover .dotedit-contentlet__toolbar {\n opacity: 1 !important;\n }\n\n ${timestampId} .dotedit-contentlet__toolbar button {\n background-color: ${white} !important;\n }\n\n ${timestampId} .dotedit-contentlet__toolbar > * {\n margin-right: 8px !important;\n }\n\n ${timestampId} .dotedit-contentlet__toolbar .dotedit-contentlet__disabled {\n opacity: 0.25 !important;\n pointer-events: none !important;\n }\n\n ${timestampId} .dotedit-contentlet__toolbar button:last-child {\n margin-right: 0 !important;\n }\n\n ${timestampId} .dotedit-container__add,\n ${timestampId} .dotedit-contentlet__drag,\n ${timestampId} .dotedit-contentlet__edit,\n ${timestampId} .dotedit-contentlet__remove,\n ${timestampId} .dotedit-contentlet__code {\n background-position: center !important;\n background-repeat: no-repeat !important;\n transition: background-color ${animation},\n box-shadow ${animation},\n transform ${animation},\n color ${animation} !important;\n }\n\n ${timestampId} .dotedit-container__add:focus,\n ${timestampId} .dotedit-contentlet__drag:focus,\n ${timestampId} .dotedit-contentlet__edit:focus,\n ${timestampId} .dotedit-contentlet__remove:focus,\n ${timestampId} .dotedit-contentlet__code:focus {\n outline: none !important;\n }\n\n ${timestampId} .dotedit-container__add {\n background-image: url(data:image/svg+xml;base64,PHN2ZyBmaWxsPSIjRkZGRkZGIiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHdpZHRoPSIyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4gICAgPHBhdGggZD0iTTE5IDEzaC02djZoLTJ2LTZINXYtMmg2VjVoMnY2aDZ2MnoiLz4gICAgPHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIvPjwvc3ZnPg==) !important;\n background-color: var(--color-main) !important;\n }\n\n ${timestampId} .dotedit-container__add:hover {\n background-color: var(--color-main_mod) !important;\n }\n\n ${timestampId} .dotedit-container__add:focus {\n background-color: var(--color-main_mod) !important;\n }\n\n ${timestampId} .dotedit-container__add:active {\n background-color: var(--color-main_mod) !important;\n }\n\n ${timestampId} button.dotedit-contentlet__drag {\n background-image: url(data:image/svg+xml;base64,PHN2ZyBmaWxsPSIjNDQ0NDQ0IiBoZWlnaHQ9IjE4IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHdpZHRoPSIxOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+ICAgIDxkZWZzPiAgICAgICAgPHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBpZD0iYSIvPiAgICA8L2RlZnM+ICAgIDxjbGlwUGF0aCBpZD0iYiI+ICAgICAgICA8dXNlIG92ZXJmbG93PSJ2aXNpYmxlIiB4bGluazpocmVmPSIjYSIvPiAgICA8L2NsaXBQYXRoPiAgICA8cGF0aCBjbGlwLXBhdGg9InVybCgjYikiIGQ9Ik0yMCA5SDR2MmgxNlY5ek00IDE1aDE2di0ySDR2MnoiLz48L3N2Zz4=) !important;\n cursor: move !important;\n touch-action: none !important;\n }\n\n ${timestampId} .dotedit-contentlet__edit {\n background-image: url(data:image/svg+xml;base64,PHN2ZyBmaWxsPSIjNDQ0NDQ0IiBoZWlnaHQ9IjE4IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHdpZHRoPSIxOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4gICAgPHBhdGggZD0iTTMgMTcuMjVWMjFoMy43NUwxNy44MSA5Ljk0bC0zLjc1LTMuNzVMMyAxNy4yNXpNMjAuNzEgNy4wNGMuMzktLjM5LjM5LTEuMDIgMC0xLjQxbC0yLjM0LTIuMzRjLS4zOS0uMzktMS4wMi0uMzktMS40MSAwbC0xLjgzIDEuODMgMy43NSAzLjc1IDEuODMtMS44M3oiLz4gICAgPHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIvPjwvc3ZnPg==) !important;\n }\n\n ${timestampId} .dotedit-contentlet__remove {\n background-image: url(data:image/svg+xml;base64,PHN2ZyBmaWxsPSIjNDQ0NDQ0IiBoZWlnaHQ9IjE4IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHdpZHRoPSIxOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4gICAgPHBhdGggZD0iTTE5IDYuNDFMMTcuNTkgNSAxMiAxMC41OSA2LjQxIDUgNSA2LjQxIDEwLjU5IDEyIDUgMTcuNTkgNi40MSAxOSAxMiAxMy40MSAxNy41OSAxOSAxOSAxNy41OSAxMy40MSAxMnoiLz4gICAgPHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIvPjwvc3ZnPg==) !important;\n }\n\n ${timestampId} .dotedit-contentlet__code {\n background-image: url(data:image/svg+xml;base64,PHN2ZyBmaWxsPSIjMDAwMDAwIiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHdpZHRoPSIyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4gICAgPHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+ICAgIDxwYXRoIGQ9Ik05LjQgMTYuNkw0LjggMTJsNC42LTQuNkw4IDZsLTYgNiA2IDYgMS40LTEuNHptNS4yIDBsNC42LTQuNi00LjYtNC42TDE2IDZsNiA2LTYgNi0xLjQtMS40eiIvPjwvc3ZnPg==) !important;\n }\n\n ${timestampId} .dotedit-menu {\n position: relative !important;\n }\n\n ${timestampId} .dotedit-menu__list {\n color: #000 !important;\n background-color: #ffffff !important;\n box-shadow: ${mdShadow1} !important;\n font-family: Roboto, \"Helvetica Neue\", Helvetica, Arial, \"Lucida Grande\", sans-serif !important;\n font-size: 13px !important;\n list-style: none !important;\n margin: 0 !important;\n min-width: 100px !important;\n opacity: 0 !important;\n padding: 8px 0 !important;\n position: absolute !important;\n right: 0 !important;\n transition: opacity ${animation} !important;\n visibility: hidden !important;\n z-index:1 !important;\n }\n\n ${timestampId} .dotedit-menu__list.active {\n opacity: 1 !important;\n visibility: visible !important;\n z-index: 2147483647 !important;\n }\n\n ${timestampId} .dotedit-menu__item {\n position: relative;\n }\n\n ${timestampId} .dotedit-menu__item a {\n cursor: pointer !important;\n display: block !important;\n line-height: 16px !important;\n padding: 8px !important;\n white-space: nowrap !important;\n }\n\n ${timestampId} .dotedit-menu__item a:hover {\n background-color: #e7e7e7 !important;\n text-decoration: none !important;\n }\n\n ${timestampId} .dotedit-menu__item[dot-title]:hover:after {\n content: attr(dot-title) !important;\n right: 100% !important;\n position: absolute !important;\n top: 4px !important;\n background: rgba(0,0,0,.7);\n font-size: 12px;\n color: #fff;\n padding: 4px;\n border-radius: 3px;\n margin-right: 4px;\n line-height: 14px;\n white-space: nowrap;\n }\n\n ${timestampId} .dotedit-menu__item a,\n ${timestampId} .dotedit-menu__item a:visited {\n color: inherit !important;\n text-decoration: none !important;\n }\n\n ${timestampId} .dotedit-menu__item--disabled a,\n ${timestampId} .dotedit-menu__item--disabled a:hover,\n ${timestampId} .dotedit-menu__item--disabled a:active,\n ${timestampId} .dotedit-menu__item--disabled a:focus,\n ${timestampId} .dotedit-menu__item--disabled a:visited {\n color: ${grayLight} !important;\n cursor: not-allowed !important;\n pointer-events: none !important;\n }\n\n ${timestampId} .loader,\n ${timestampId} .loader:after {\n border-radius: 50% !important;\n height: 32px !important;\n width: 32px !important;\n }\n\n ${timestampId} .loader {\n animation: load8 1.1s infinite linear !important;\n border-bottom: solid 5px rgba(var(--color-sec_rgb), 0.2) !important;\n border-left: solid 5px var(--color-sec) !important;\n border-right: solid 5px rgba(var(--color-sec_rgb), 0.2) !important;\n border-top: solid 5px rgba(var(--color-sec_rgb), 0.2) !important;\n display: inline-block !important;\n font-size: 10px !important;\n overflow: hidden !important;\n position: relative !important;\n text-indent: -9999em !important;\n vertical-align: middle !important;\n }\n\n ${timestampId} .loader__overlay {\n align-items: center !important;\n background-color: rgba(255, 255, 255, 0.8) !important;\n bottom: 0 !important;\n display: flex !important;\n justify-content: center !important;\n left: 0 !important;\n overflow: hidden !important;\n position: absolute !important;\n right: 0 !important;\n top: 0 !important;\n z-index: 1 !important;\n }\n\n ${timestampId} .inline-editing--saving::before {\n background: rgba(200,200,200, .6);\n position: absolute;\n width: 100%;\n height: 100%;\n content: \"\";\n left: 0;\n }\n\n ${timestampId} .inline-editing--error::before {\n background: rgba(255, 0, 0, 0.2);\n position: absolute;\n width: 100%;\n height: 100%;\n content: \"\";\n left: 0;\n }\n\n ${timestampId} [data-inode][data-field-name] > * {\n pointer-events: none;\n }\n\n ${timestampId} [data-inode][data-field-name].active > * {\n pointer-events: auto;\n }\n\n ${timestampId} .mce-edit-focus * {\n color: black !important;\n }\n\n ${timestampId} .mce-edit-focus {\n background: white;\n border: 1px solid black !important;\n outline: none;\n color: black !important;\n }\n\n ${timestampId} [data-inode][data-field-name].dotcms__inline-edit-field {\n cursor: text;\n border: 1px solid #53c2f9 !important;\n display: block;\n }\n \n ${timestampId} .dotcms__navbar-form {\n display: inline-block;\n }\n\n ${timestampId} .dotcms__navbar-form .reorder-menu-link {\n background-color: var(--color-main);\n border-radius: 3px;\n display: flex;\n flex-direction: row;\n }\n\n ${timestampId} .dotcms__navbar-form .reorder-menu-link .arrow-up {\n background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDgiIGhlaWdodD0iNDgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CgogPGc+CiAgPHRpdGxlPmJhY2tncm91bmQ8L3RpdGxlPgogIDxyZWN0IGZpbGw9Im5vbmUiIGlkPSJjYW52YXNfYmFja2dyb3VuZCIgaGVpZ2h0PSI0MDIiIHdpZHRoPSI1ODIiIHk9Ii0xIiB4PSItMSIvPgogPC9nPgogPGc+CiAgPHRpdGxlPkxheWVyIDE8L3RpdGxlPgogIDxwYXRoIGZpbGw9IiNmZmZmZmYiIGlkPSJzdmdfMSIgZD0ibTE0LjgzLDMwLjgzbDkuMTcsLTkuMTdsOS4xNyw5LjE3bDIuODMsLTIuODNsLTEyLC0xMmwtMTIsMTJsMi44MywyLjgzeiIvPgogIDxwYXRoIGlkPSJzdmdfMiIgZmlsbD0ibm9uZSIgZD0ibS0zMC42OTQ1NTcsOS40MjU4ODdsNDgsMGwwLDQ4bC00OCwwbDAsLTQ4eiIvPgogPC9nPgo8L3N2Zz4=);\n background-repeat: no-repeat;\n background-size: contain;\n display: block;\n height: 36px;\n width: 36px;\n }\n\n ${timestampId} .dotcms__navbar-form .reorder-menu-link .arrow-down {\n background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDgiIGhlaWdodD0iNDgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CgogPGc+CiAgPHRpdGxlPmJhY2tncm91bmQ8L3RpdGxlPgogIDxyZWN0IGZpbGw9Im5vbmUiIGlkPSJjYW52YXNfYmFja2dyb3VuZCIgaGVpZ2h0PSI0MDIiIHdpZHRoPSI1ODIiIHk9Ii0xIiB4PSItMSIvPgogPC9nPgogPGc+CiAgPHRpdGxlPkxheWVyIDE8L3RpdGxlPgogIDxwYXRoIGZpbGw9IiNmZmZmZmYiIGlkPSJzdmdfMSIgZD0ibTE0LjgzLDE2LjQybDkuMTcsOS4xN2w5LjE3LC05LjE3bDIuODMsMi44M2wtMTIsMTJsLTEyLC0xMmwyLjgzLC0yLjgzeiIvPgogIDxwYXRoIGlkPSJzdmdfMiIgZmlsbD0ibm9uZSIgZD0ibS0xOC4zOTk4OTksMTcuMDc4NDczbDQ4LDBsMCw0OGwtNDgsMGwwLC00OHoiLz4KIDwvZz4KPC9zdmc+);\n background-repeat: no-repeat;\n background-size: contain;\n display: block;\n height: 36px;\n width: 36px;\n }\n\n @keyframes load8 {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n`;\n}" + }, + { + "name": "getElement", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-webcomponents/src/elements/dot-tooltip/utils.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "(content: string): HTMLElement => {\n const el = document.createElement('span');\n el.style.padding = '2px 5px';\n el.style.backgroundColor = '#444';\n el.style.borderRadius = '2px';\n el.style.color = '#fff';\n el.style.position = 'absolute';\n el.style.opacity = '0';\n el.style.whiteSpace = 'nowrap';\n\n el.innerText = content;\n return el;\n}" + }, + { + "name": "getErrorMessage", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-field-elements/src/components/dot-form/utils/index.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "(message: string): string => {\n const messageObj = JSON.parse(message);\n return messageObj.errors.length && messageObj.errors[0].message\n ? messageObj.errors[0].message\n : message;\n}", + "rawdescription": "Parse a string to JSON and returns the message text", + "description": "

    Parse a string to JSON and returns the message text

    \n" + }, + { + "name": "getErrorMessage", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-webcomponents/src/components/contenttypes-fields/dot-form/utils/index.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "(message: string): string => {\n let messageObj;\n try {\n messageObj = JSON.parse(message);\n } catch (error) {\n messageObj = message;\n }\n return messageObj.errors && messageObj.errors.length && messageObj.errors[0].message\n ? messageObj.errors[0].message\n : message;\n}", + "rawdescription": "Parse a string to JSON and returns the message text", + "description": "

    Parse a string to JSON and returns the message text

    \n" + }, + { + "name": "getFieldsFromLayout", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-field-elements/src/components/dot-form/utils/index.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "(\n layout: DotCMSContentTypeLayoutRow[]\n): DotCMSContentTypeField[] => {\n return layout.reduce(\n (acc: DotCMSContentTypeField[], { columns }: DotCMSContentTypeLayoutRow) =>\n acc.concat(...columns.map((col: DotCMSContentTypeLayoutColumn) => col.fields)),\n []\n );\n}", + "rawdescription": "Given a layout Object of fields, it returns a flat list of fields", + "description": "

    Given a layout Object of fields, it returns a flat list of fields

    \n" + }, + { + "name": "getFieldsFromLayout", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-webcomponents/src/components/contenttypes-fields/dot-form/utils/index.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "(\n layout: DotCMSContentTypeLayoutRow[]\n): DotCMSContentTypeField[] => {\n return layout.reduce(\n (acc: DotCMSContentTypeField[], { columns }: DotCMSContentTypeLayoutRow) =>\n acc.concat(...columns.map((col: DotCMSContentTypeLayoutColumn) => col.fields)),\n []\n );\n}", + "rawdescription": "Given a layout Object of fields, it returns a flat list of fields", + "description": "

    Given a layout Object of fields, it returns a flat list of fields

    \n" + }, + { + "name": "getFieldValueFn", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/portlets/dot-apps/dot-apps-configuration-detail/dot-apps-configuration-detail-form/dot-apps-configuration-detail-form.component.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "object", + "defaultValue": "{\n BOOL: (field: DotAppsSecrets) => {\n return field.value ? JSON.parse(field.value) : field.value;\n },\n SELECT: (field: DotAppsSecrets) => {\n return field.value === '' ? field.options[0].value : field.value;\n }\n}" + }, + { + "name": "getFieldVariableValue", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-field-elements/src/components/dot-form/utils/index.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "(\n fieldVariables: DotCMSContentTypeFieldVariable[],\n key: string\n): string => {\n const variable = fieldVariables.filter(\n (item: DotCMSContentTypeFieldVariable) => item.key.toUpperCase() === key.toUpperCase()\n )[0];\n return variable && variable.value;\n}", + "rawdescription": "Returns value of a Field Variable from a given key", + "description": "

    Returns value of a Field Variable from a given key

    \n" + }, + { + "name": "getFieldVariableValue", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-webcomponents/src/components/contenttypes-fields/dot-form/utils/index.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "(\n fieldVariables: DotCMSContentTypeFieldVariable[],\n key: string\n): string => {\n if (fieldVariables && fieldVariables.length) {\n const [variable] = fieldVariables.filter(\n (item: DotCMSContentTypeFieldVariable) => item.key.toUpperCase() === key.toUpperCase()\n );\n return variable && variable.value;\n }\n return null;\n}", + "rawdescription": "Returns value of a Field Variable from a given key", + "description": "

    Returns value of a Field Variable from a given key

    \n" + }, + { + "name": "getGreeting", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcdn-e2e/src/support/app.po.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "() => cy.get('h1')" + }, + { + "name": "getGreeting", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-block-editor-e2e/src/support/app.po.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "() => cy.get('h1')" + }, + { + "name": "getInput", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-field-elements/src/components/dot-date-range/dot-date-range.e2e.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "(page: E2EPage) => page.find('input.flatpickr-input.form-control')" + }, + { + "name": "getInput", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-webcomponents/src/components/contenttypes-fields/dot-date-range/dot-date-range.e2e.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "(page: E2EPage) => page.find('input.flatpickr-input.form-control')" + }, + { + "name": "getOptions", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-field-elements/src/components/dot-checkbox/dot-checkbox.e2e.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "(page: E2EPage) => page.findAll('input')" + }, + { + "name": "getOptions", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-field-elements/src/components/dot-multi-select/dot-multi-select.e2e.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "(page: E2EPage) => page.findAll('option')" + }, + { + "name": "getOptions", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-field-elements/src/components/dot-radio/dot-radio.e2e.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "(page: E2EPage) => page.findAll('input')" + }, + { + "name": "getOptions", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-field-elements/src/components/dot-select/dot-select.e2e.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "(page: E2EPage) => page.findAll('option')" + }, + { + "name": "getOptions", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-webcomponents/src/components/contenttypes-fields/dot-checkbox/dot-checkbox.e2e.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "(page: E2EPage) => page.findAll('input')" + }, + { + "name": "getOptions", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-webcomponents/src/components/contenttypes-fields/dot-multi-select/dot-multi-select.e2e.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "(page: E2EPage) => page.findAll('option')" + }, + { + "name": "getOptions", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-webcomponents/src/components/contenttypes-fields/dot-radio/dot-radio.e2e.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "(page: E2EPage) => page.findAll('input')" + }, + { + "name": "getOptions", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-webcomponents/src/components/contenttypes-fields/dot-select/dot-select.e2e.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "(page: E2EPage) => page.findAll('option')" + }, + { + "name": "getPosition", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-webcomponents/src/elements/dot-tooltip/utils.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "(params: PositionParams): { top: number; left: number } => {\n let finalLeft = getPositionX(params);\n let finalTop = getPositionY(params);\n\n return {\n top: finalTop,\n left: finalLeft\n };\n}" + }, + { + "name": "getPositionX", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-webcomponents/src/elements/dot-tooltip/utils.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "({\n tooltipEl: tooltip,\n targetEl: target,\n position\n}: PositionParams): number => {\n const tooltipPos = tooltip.getBoundingClientRect();\n const targetPos = target.getBoundingClientRect();\n let result = targetPos.left; // default left positioned\n\n if (position.x === 'center') {\n const targetCenter = targetPos.width / 2 + targetPos.left;\n const toolTipHalf = tooltipPos.width / 2;\n result = targetCenter - toolTipHalf;\n } else if (position.x === 'right') {\n result = targetPos.right - tooltipPos.width;\n }\n\n // Fix if the tooltip is out of the window\n if (result + tooltipPos.width > window.innerWidth) {\n result = targetPos.right - tooltipPos.width;\n }\n\n return result;\n}" + }, + { + "name": "getPositionY", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-webcomponents/src/elements/dot-tooltip/utils.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "({\n tooltipEl: tooltip,\n targetEl: target,\n position\n}: PositionParams): number => {\n const MARGIN = 4; // this might be an attr in the future\n const tooltipPos = tooltip.getBoundingClientRect();\n const targetPos = target.getBoundingClientRect();\n let result = targetPos.bottom + MARGIN; // default bottom positioned\n\n if (position.y === 'top') {\n result = targetPos.top - tooltipPos.height - MARGIN;\n }\n\n return result;\n}" + }, + { + "name": "getSelect", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-field-elements/src/components/dot-multi-select/dot-multi-select.e2e.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "(page: E2EPage) => page.find('select')" + }, + { + "name": "getSelect", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-field-elements/src/components/dot-select/dot-select.e2e.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "(page: E2EPage) => page.find('select')" + }, + { + "name": "getSelect", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-webcomponents/src/components/contenttypes-fields/dot-multi-select/dot-multi-select.e2e.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "(page: E2EPage) => page.find('select')" + }, + { + "name": "getSelect", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-webcomponents/src/components/contenttypes-fields/dot-select/dot-select.e2e.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "(page: E2EPage) => page.find('select')" + }, + { + "name": "getSelecttion", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-webcomponents/src/collections/dot-card-view/dot-card-view.tsx", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "(items: DotCardContentletItem[], value: string): DotContentletItem[] => {\n if (items && items.length && value && typeof value === 'string') {\n return items\n .filter(({ data: { inode } }: DotCardContentletItem) =>\n value.split(',').includes(inode)\n )\n .map(({ data }: DotCardContentletItem) => data);\n }\n\n return [];\n}" + }, + { + "name": "getTemplate", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/view/components/_common/searchable-dropdown/component/searchable-dropdown.component.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "(extraAttr = '') => {\n const template = `\n \n \n `;\n return template;\n}" + }, + { + "name": "getValue", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/api/services/dot-localstorage/dot-localstorage.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "(item): T => {\n const isNumber = parseInt(item, 0) as unknown;\n\n if (isNumber) {\n return isNumber as T;\n }\n\n try {\n return JSON.parse(item);\n } catch {\n return (item as unknown) as T;\n }\n}" + }, + { + "name": "getValueAsArray", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-webcomponents/src/collections/dot-card-view/dot-card-view.tsx", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "(value: string): string[] => {\n return value && typeof value === 'string' ? value.split(',') : [];\n}" + }, + { + "name": "grayLight", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/html/libraries/iframe-edit-mode.css.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "defaultValue": "'#c5c5c5'" + }, + { + "name": "headerIcons", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/block-editor/src/lib/extensions/components/suggestions/suggestion-icons.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "[]", + "defaultValue": "['data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTYuNjMyODEgMjJWMjEuMDE1Nkw3LjkwNjI1IDIwLjc5NjlWMTEuODM1OUw2LjYzMjgxIDExLjYxNzJWMTAuNjI1SDEwLjcxODhWMTEuNjE3Mkw5LjQ0NTMxIDExLjgzNTlWMTUuNzY1NkgxNC44ODI4VjExLjgzNTlMMTMuNjA5NCAxMS42MTcyVjEwLjYyNUgxNy42OTUzVjExLjYxNzJMMTYuNDIxOSAxMS44MzU5VjIwLjc5NjlMMTcuNjk1MyAyMS4wMTU2VjIySDEzLjYwOTRWMjEuMDE1NkwxNC44ODI4IDIwLjc5NjlWMTYuOTc2Nkg5LjQ0NTMxVjIwLjc5NjlMMTAuNzE4OCAyMS4wMTU2VjIySDYuNjMyODFaTTE5LjI3MzQgMjJWMjEuMDE1NkwyMS4wMzEyIDIwLjc5NjlWMTIuMjczNEwxOS4yNDIyIDEyLjMwNDdWMTEuMzQzOEwyMi41NzAzIDEwLjYyNVYyMC43OTY5TDI0LjMyMDMgMjEuMDE1NlYyMkgxOS4yNzM0WiIgZmlsbD0iIzIyMjIyMiIvPgo8L3N2Zz4K', 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTUuNjMyODEgMjJWMjEuMDE1Nkw2LjkwNjI1IDIwLjc5NjlWMTEuODM1OUw1LjYzMjgxIDExLjYxNzJWMTAuNjI1SDkuNzE4NzVWMTEuNjE3Mkw4LjQ0NTMxIDExLjgzNTlWMTUuNzY1NkgxMy44ODI4VjExLjgzNTlMMTIuNjA5NCAxMS42MTcyVjEwLjYyNUgxNi42OTUzVjExLjYxNzJMMTUuNDIxOSAxMS44MzU5VjIwLjc5NjlMMTYuNjk1MyAyMS4wMTU2VjIySDEyLjYwOTRWMjEuMDE1NkwxMy44ODI4IDIwLjc5NjlWMTYuOTc2Nkg4LjQ0NTMxVjIwLjc5NjlMOS43MTg3NSAyMS4wMTU2VjIySDUuNjMyODFaTTE4LjA4NTkgMjJWMjAuOTQ1M0wyMS44MTI1IDE2LjgwNDdDMjIuMjU1MiAxNi4zMDk5IDIyLjYwMTYgMTUuODg4IDIyLjg1MTYgMTUuNTM5MUMyMy4xMDE2IDE1LjE4NDkgMjMuMjc2IDE0Ljg2NDYgMjMuMzc1IDE0LjU3ODFDMjMuNDc0IDE0LjI5MTcgMjMuNTIzNCAxMy45OTQ4IDIzLjUyMzQgMTMuNjg3NUMyMy41MjM0IDEzLjExOTggMjMuMzUxNiAxMi42NDMyIDIzLjAwNzggMTIuMjU3OEMyMi42NjQxIDExLjg2NzIgMjIuMTcxOSAxMS42NzE5IDIxLjUzMTIgMTEuNjcxOUMyMC44NjQ2IDExLjY3MTkgMjAuMzQzOCAxMS44NzI0IDE5Ljk2ODggMTIuMjczNEMxOS41OTkgMTIuNjc0NSAxOS40MTQxIDEzLjI0MjIgMTkuNDE0MSAxMy45NzY2SDE3LjkzNzVMMTcuOTIxOSAxMy45Mjk3QzE3LjkwNjIgMTMuMjczNCAxOC4wNDQzIDEyLjY4NDkgMTguMzM1OSAxMi4xNjQxQzE4LjYyNzYgMTEuNjM4IDE5LjA0OTUgMTEuMjI0IDE5LjYwMTYgMTAuOTIxOUMyMC4xNTg5IDEwLjYxNDYgMjAuODIwMyAxMC40NjA5IDIxLjU4NTkgMTAuNDYwOUMyMi4zMDQ3IDEwLjQ2MDkgMjIuOTIxOSAxMC41OTkgMjMuNDM3NSAxMC44NzVDMjMuOTU4MyAxMS4xNDU4IDI0LjM1OTQgMTEuNTE4MiAyNC42NDA2IDExLjk5MjJDMjQuOTIxOSAxMi40NjYxIDI1LjA2MjUgMTMuMDEwNCAyNS4wNjI1IDEzLjYyNUMyNS4wNjI1IDE0LjI1IDI0Ljg3NzYgMTQuODcyNCAyNC41MDc4IDE1LjQ5MjJDMjQuMTQzMiAxNi4xMTIgMjMuNjI3NiAxNi43ODEyIDIyLjk2MDkgMTcuNUwxOS45Njg4IDIwLjc1NzhMMTkuOTg0NCAyMC43OTY5SDI0LjAyMzRMMjQuMTQ4NCAxOS40OTIySDI1LjQ1MzFWMjJIMTguMDg1OVoiIGZpbGw9IiMyMjIyMjIiLz4KPC9zdmc+Cg==', 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTUuNjMyODEgMjJWMjEuMDE1Nkw2LjkwNjI1IDIwLjc5NjlWMTEuODM1OUw1LjYzMjgxIDExLjYxNzJWMTAuNjI1SDkuNzE4NzVWMTEuNjE3Mkw4LjQ0NTMxIDExLjgzNTlWMTUuNzY1NkgxMy44ODI4VjExLjgzNTlMMTIuNjA5NCAxMS42MTcyVjEwLjYyNUgxNi42OTUzVjExLjYxNzJMMTUuNDIxOSAxMS44MzU5VjIwLjc5NjlMMTYuNjk1MyAyMS4wMTU2VjIySDEyLjYwOTRWMjEuMDE1NkwxMy44ODI4IDIwLjc5NjlWMTYuOTc2Nkg4LjQ0NTMxVjIwLjc5NjlMOS43MTg3NSAyMS4wMTU2VjIySDUuNjMyODFaTTIxLjQ2ODggMjIuMTY0MUMyMC43NzYgMjIuMTY0MSAyMC4xNTg5IDIyLjAzOTEgMTkuNjE3MiAyMS43ODkxQzE5LjA3NTUgMjEuNTMzOSAxOC42NTEgMjEuMTc0NSAxOC4zNDM4IDIwLjcxMDlDMTguMDQxNyAyMC4yNDIyIDE3Ljg5ODQgMTkuNjg3NSAxNy45MTQxIDE5LjA0NjlMMTcuOTM3NSAxOUgxOS40MDYyQzE5LjQwNjIgMTkuNTk5IDE5LjU4ODUgMjAuMDc1NSAxOS45NTMxIDIwLjQyOTdDMjAuMzIyOSAyMC43ODM5IDIwLjgyODEgMjAuOTYwOSAyMS40Njg4IDIwLjk2MDlDMjIuMTE5OCAyMC45NjA5IDIyLjYzMDIgMjAuNzgzOSAyMyAyMC40Mjk3QzIzLjM2OTggMjAuMDc1NSAyMy41NTQ3IDE5LjU1MjEgMjMuNTU0NyAxOC44NTk0QzIzLjU1NDcgMTguMTU2MiAyMy4zOTA2IDE3LjYzOCAyMy4wNjI1IDE3LjMwNDdDMjIuNzM0NCAxNi45NzE0IDIyLjIxNjEgMTYuODA0NyAyMS41MDc4IDE2LjgwNDdIMjAuMTY0MVYxNS42MDE2SDIxLjUwNzhDMjIuMTkwMSAxNS42MDE2IDIyLjY3MTkgMTUuNDMyMyAyMi45NTMxIDE1LjA5MzhDMjMuMjM5NiAxNC43NSAyMy4zODI4IDE0LjI3MzQgMjMuMzgyOCAxMy42NjQxQzIzLjM4MjggMTIuMzM1OSAyMi43NDQ4IDExLjY3MTkgMjEuNDY4OCAxMS42NzE5QzIwLjg2OTggMTEuNjcxOSAyMC4zODggMTEuODQ5IDIwLjAyMzQgMTIuMjAzMUMxOS42NjQxIDEyLjU1MjEgMTkuNDg0NCAxMy4wMTgyIDE5LjQ4NDQgMTMuNjAxNkgxOC4wMDc4TDE3Ljk5MjIgMTMuNTU0N0MxNy45NzY2IDEyLjk4MTggMTguMTEyIDEyLjQ2MDkgMTguMzk4NCAxMS45OTIyQzE4LjY5MDEgMTEuNTIzNCAxOS4wOTkgMTEuMTUxIDE5LjYyNSAxMC44NzVDMjAuMTU2MiAxMC41OTkgMjAuNzcwOCAxMC40NjA5IDIxLjQ2ODggMTAuNDYwOUMyMi41MjA4IDEwLjQ2MDkgMjMuMzU5NCAxMC43NDIyIDIzLjk4NDQgMTEuMzA0N0MyNC42MDk0IDExLjg2MiAyNC45MjE5IDEyLjY1ODkgMjQuOTIxOSAxMy42OTUzQzI0LjkyMTkgMTQuMTY0MSAyNC43Nzg2IDE0LjYzMjggMjQuNDkyMiAxNS4xMDE2QzI0LjIxMDkgMTUuNTY1MSAyMy43ODY1IDE1LjkxOTMgMjMuMjE4OCAxNi4xNjQxQzIzLjkwMSAxNi4zODggMjQuMzgyOCAxNi43Mzk2IDI0LjY2NDEgMTcuMjE4OEMyNC45NTA1IDE3LjY5NzkgMjUuMDkzOCAxOC4yMzQ0IDI1LjA5MzggMTguODI4MUMyNS4wOTM4IDE5LjUyMDggMjQuOTM3NSAyMC4xMTcyIDI0LjYyNSAyMC42MTcyQzI0LjMxNzcgMjEuMTEyIDIzLjg5MDYgMjEuNDk0OCAyMy4zNDM4IDIxLjc2NTZDMjIuNzk2OSAyMi4wMzEyIDIyLjE3MTkgMjIuMTY0MSAyMS40Njg4IDIyLjE2NDFaIiBmaWxsPSIjMjIyMjIyIi8+Cjwvc3ZnPgo=']" + }, + { + "name": "Horizontal", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/stories/dotcms/form/DotCMSForms.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "(props) => {\n return {\n template: HorizontalTemplate,\n props\n };\n}" + }, + { + "name": "HorizontalTemplate", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/stories/dotcms/form/DotCMSForms.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "`\n

    Inline

    \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n \n
    \n\n\n

    Grid

    \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n\n

    Small

    \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n \n
    \n`" + }, + { + "name": "I8N_BASE", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dot-rules/src/lib/rule-component.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "defaultValue": "'api.sites.ruleengine'" + }, + { + "name": "I8N_BASE", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dot-rules/src/lib/rule-engine.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "defaultValue": "'api.sites.ruleengine'" + }, + { + "name": "I8N_BASE", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dot-rules/src/lib/custom-types/visitors-location/visitors-location.container.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "defaultValue": "'api.sites.ruleengine'" + }, + { + "name": "Icon", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/block-editor/src/lib/extensions/components/suggestions-list-item/suggestions-list-item.component.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "(args) => ({\n props: {\n ...args,\n item: iconItem\n },\n template: `\n \n `\n})" + }, + { + "name": "iconItem", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/block-editor/src/lib/extensions/components/suggestions-list-item/suggestions-list-item.component.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "defaultValue": "{\n title: 'An Icon',\n type: 'icon',\n icon: '+'\n}" + }, + { + "name": "Icons", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/stories/primeng/button/Button.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "() => {\n return {\n template: IconsTemplate\n };\n}" + }, + { + "name": "IconsTemplate", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/stories/primeng/button/Button.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "`\n

    \n

    \n

    \n`" + }, + { + "name": "idCounter", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dot-rules/src/lib/services/Rule.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "defaultValue": "1000" + }, + { + "name": "IFRAME", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui-e2e/src/pages/DotSiteBrowser/DotEditPage.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "defaultValue": "'iframe.dot-edit__iframe'" + }, + { + "name": "IFRAME", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui-e2e/src/pages/DotSiteBrowser/DotSiteBrowser.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "defaultValue": "'iframe#detailFrame'" + }, + { + "name": "image", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms-webcomponents/src/elements/dot-contentlet-icon/dot-contentlet-icon.tsx", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "defaultValue": "'image'" + }, + { + "name": "Image", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/block-editor/src/lib/extensions/components/suggestions-list-item/suggestions-list-item.component.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "(args) => ({\n props: {\n ...args,\n item: imageItem\n },\n template: `\n \n `\n})" + }, + { + "name": "ImageBlock", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/block-editor/src/lib/extensions/blocks/image-block/image-block.extention.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "(injector: Injector): Node => {\n return Node.create({\n name: 'dotImage',\n group: 'block',\n inline: false,\n draggable: true,\n\n addAttributes() {\n return {\n data: {\n default: null,\n parseHTML: (element) => {\n data: element.getAttribute('data');\n },\n renderHTML: (attributes) => {\n return { data: attributes.data };\n }\n }\n };\n },\n\n parseHTML(): ParseRule[] {\n return [{ tag: 'dotcms-image-block' }];\n },\n\n renderHTML({ HTMLAttributes }): DOMOutputSpec {\n return ['dotcms-image-block', mergeAttributes(HTMLAttributes)];\n },\n\n addNodeView(): NodeViewRenderer {\n return AngularNodeViewRenderer(ImageBlockComponent, { injector });\n }\n });\n}" + }, + { + "name": "imageItem", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/block-editor/src/lib/extensions/components/suggestions-list-item/suggestions-list-item.component.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "defaultValue": "{\n title: 'Landscape',\n type: 'image',\n url: 'https://images.unsplash.com/photo-1508162942367-e4dd4cd67513?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=1100&q=80'\n}" + }, + { + "name": "ImageUpload", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/block-editor/src/lib/extensions/imageUpload.extension.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "(injector: Injector, resolver: ComponentFactoryResolver) => {\n return Extension.create({\n name: 'imageUpload',\n\n addProseMirrorPlugins() {\n const dotImageService = injector.get(DotImageService);\n const loaderComponentFactory = resolver.resolveComponentFactory(LoaderComponent);\n\n function areImageFiles(event: ClipboardEvent | DragEvent): boolean {\n let files: FileList;\n if (event.type === 'drop') {\n files = (event as DragEvent).dataTransfer.files;\n } else {\n //paste\n files = (event as ClipboardEvent).clipboardData.files;\n }\n if (!!files.length) {\n for (let i = 0; i < files.length; i++) {\n if (!files[i].type.startsWith('image/')) {\n return false;\n }\n }\n }\n\n return !!files.length;\n }\n\n function findPlaceholder(state, id): number {\n let decorations = PlaceholderPlugin.getState(state);\n let found = decorations.find(null, null, (spec) => spec.id == id);\n return found.length ? found[0].from : null;\n }\n\n function setPlaceHolder(view: EditorView, position: number, id: string) {\n const loadingBlock: ComponentRef = loaderComponentFactory.create(\n injector\n );\n let tr = view.state.tr;\n loadingBlock.instance.data = {\n message: 'Uploading...',\n type: MessageType.INFO\n };\n loadingBlock.changeDetectorRef.detectChanges();\n\n tr.setMeta(PlaceholderPlugin, {\n add: {\n id: id,\n pos: position,\n element: loadingBlock.location.nativeElement\n }\n });\n\n view.dispatch(tr);\n }\n\n function uploadImages(view: EditorView, files: File[], position = 0) {\n const { schema } = view.state;\n\n setPlaceHolder(view, position, files[0].name);\n\n dotImageService\n .publishContent(files)\n .pipe(take(1))\n .subscribe(\n (dotAssets: DotCMSContentlet[]) => {\n const tr = view.state.tr;\n const data = dotAssets[0][Object.keys(dotAssets[0])[0]];\n let pos = findPlaceholder(view.state, data.name);\n const imageNode = schema.nodes.dotImage.create({\n data: data\n });\n view.dispatch(\n tr.replaceWith(pos, pos, imageNode).setMeta(PlaceholderPlugin, {\n remove: { id: data.name }\n })\n );\n },\n (error) => {\n alert(error.message);\n view.dispatch(\n view.state.tr.setMeta(PlaceholderPlugin, {\n remove: { id: files[0].name }\n })\n );\n }\n );\n }\n\n return [\n PlaceholderPlugin,\n new Plugin({\n key: new PluginKey('imageUpload'),\n view: (editorView) => {\n return {};\n },\n props: {\n handleDOMEvents: {\n paste(view, event) {\n if (areImageFiles(event)) {\n if (event.clipboardData.files.length !== 1) {\n alert('Can paste just one image at a time');\n return false;\n }\n event.preventDefault();\n uploadImages(\n view,\n Array.from(event.clipboardData.files),\n view.state.selection.to\n );\n }\n\n return false;\n },\n\n drop(view, event) {\n if (areImageFiles(event)) {\n event.preventDefault();\n if (event.dataTransfer.files.length !== 1) {\n alert('Can drop just one image at a time');\n return false;\n }\n const { pos } = view.posAtCoords({\n left: event.clientX,\n top: event.clientY\n });\n uploadImages(view, Array.from(event.dataTransfer.files), pos);\n }\n return false;\n }\n }\n }\n })\n ];\n }\n });\n}" + }, + { + "name": "Indeterminate", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/stories/primeng/misc/ProgressBar.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "() => {\n return {\n template: IndeterminateTemplate\n };\n}" + }, + { + "name": "IndeterminateTemplate", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/stories/primeng/misc/ProgressBar.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "`\n

    Indeterminate

    \n \n`" + }, + { + "name": "initDotCMS", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "libs/dotcms/src/index.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "(config: DotCMSConfigurationParams): DotCMSApp => {\n const httpClient = new DotCMSHttpClient(config);\n const apiConfig = new DotApiConfiguration(httpClient);\n const apiLanguage = new DotApiLanguage(apiConfig);\n const content = new DotApiContent(httpClient);\n const dotApiContentType = new DotApiContentType(httpClient);\n\n return {\n auth: new DotApiAuthorization(),\n config: apiConfig,\n content: content,\n contentType: new DotApiContentType(httpClient),\n esSearch: new DotApiElasticSearch(httpClient),\n event: new DotApiEvent(),\n form: (formConfig: DotCMSFormConfig) => new DotApiForm(dotApiContentType, formConfig),\n language: apiLanguage,\n nav: new DotApiNavigation(httpClient),\n page: new DotApiPage(httpClient, apiLanguage),\n site: new DotApiSite(httpClient),\n widget: new DotApiWidget(httpClient),\n httpClient\n };\n}" + }, + { + "name": "INLINE_TINYMCE_SCRIPTS", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/html/libraries/inline-edit-mode.js.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "`\n function handleInlineEditEvents(editor) {\n editor.on(\"focus blur\", (e) => {\n const { target: ed, type: eventType } = e;\n\n const content = ed.getContent();\n const dataset = ed.targetElm.dataset;\n const element = ed.targetElm;\n const container = ed.bodyElement.closest('[data-dot-object=\"container\"]');\n\n const data = {\n dataset,\n innerHTML: content,\n element,\n eventType,\n isNotDirty: ed.isNotDirty,\n }\n\n // For full editor we are adding pointer-events: none to all it children, \n // this is the way we can capture the click to init in the editor itself, after the editor \n // is initialized and clicked we set the pointer-events: auto so users can use the editor as intended.\n if (eventType === \"focus\" && dataset.mode) {\n container.classList.add(\"inline-editing\")\n ed.bodyElement.classList.add(\"active\");\n }\n\n if (eventType === \"blur\" && ed.bodyElement.classList.contains(\"active\")) {\n container.classList.remove(\"inline-editing\")\n ed.bodyElement.classList.remove(\"active\");\n }\n\n if (eventType === \"blur\") {\n e.stopImmediatePropagation();\n ed.destroy(false);\n }\n\n window.contentletEvents.next({\n name: \"inlineEdit\",\n data,\n });\n });\n }\n\n const defaultConfig = {\n menubar: false,\n inline: true,\n valid_styles: {\n \"*\": \"font-size,font-family,color,text-decoration,text-align\",\n },\n powerpaste_word_import: \"clean\",\n powerpaste_html_import: \"clean\",\n setup: (editor) => handleInlineEditEvents(editor)\n };\n\n const tinyMCEConfig = {\n minimal: {\n plugins: [\"link\", \"autolink\"],\n toolbar: \"bold italic underline | link\",\n valid_elements: \"strong,em,span[style],a[href]\",\n content_css: [\"//fonts.googleapis.com/css?family=Lato:300,300i,400,400i\"],\n ...defaultConfig,\n },\n full: {\n plugins: [\"link\", \"lists\", \"autolink\", \"hr\", \"charmap\"],\n style_formats: [\n { title: \"Paragraph\", format: \"p\" },\n { title: \"Header 1\", format: \"h1\" },\n { title: \"Header 2\", format: \"h2\" },\n { title: \"Header 3\", format: \"h3\" },\n { title: \"Header 4\", format: \"h4\" },\n { title: \"Header 5\", format: \"h5\" },\n { title: \"Header 6\", format: \"h6\" },\n { title: \"Pre\", format: \"pre\" },\n { title: \"Code\", format: \"code\" },\n ],\n toolbar: [\n \"styleselect | undo redo | bold italic underline | forecolor backcolor | alignleft aligncenter alignright alignfull | numlist bullist outdent indent | hr charmap removeformat | link\",\n ],\n ...defaultConfig,\n },\n };\n\n document.addEventListener(\"click\", function (event) {\n \n const { target: { dataset } } = event;\n\n const dataSelector =\n '[data-inode=\"' +\n dataset.inode +\n '\"][data-field-name=\"' +\n dataset.fieldName +\n '\"]';\n\n // if the mode is truthy we initialize tinymce\n if (dataset.mode) {\n\n event.stopPropagation();\n event.preventDefault();\n\n tinymce\n .init({\n ...tinyMCEConfig[dataset.mode || 'minimal'],\n selector: dataSelector,\n })\n .then(([ed]) => {\n ed?.editorCommands.execCommand(\"mceFocus\");\n });\n }\n });\n`" + }, + { + "name": "InPlaceTemplate", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/stories/primeng/misc/InPlace.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "`\n \n \n
    \n \n View Data\n
    \n
    \n \n \n \n \n Vin\n Year\n Brand\n Color\n \n \n \n \n {{car.vin}}\n {{car.year}}\n {{car.brand}}\n {{car.color}}\n \n \n \n \n
    \n`" + }, + { + "name": "InputGroupTemplate", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/stories/primeng/form/InputGroup.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "`\n
    \n
    \n
    \n \n \n
    \n
    \n\n
    \n
    \n $\n \n .00\n
    \n
    \n\n
    \n
    \n www\n \n
    \n
    \n
    \n
    \n
    \n
    \n \n \n \n $ \n .00 \n
    \n
    \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n\n
    \n
    \n \n \n
    \n
    \n\n
    \n
    \n \n \n \n
    \n
    \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n\n
    \n
    \n \n \n
    \n
    \n\n
    \n
    \n \n \n \n
    \n
    \n
    \n`" + }, + { + "name": "InputMaskTemplate", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/stories/primeng/form/InputMask.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "``" + }, + { + "name": "InputNumberTemplate", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/stories/primeng/form/InputNumber.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "`\n \n`" + }, + { + "name": "InputSwitchTemplate", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/stories/primeng/form/InputSwitch.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "``" + }, + { + "name": "InputTemplate", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/stories/dotcms/form/DotCMSForms.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "(input) => {\n return `\n
    \n ${input}\n
    \n \n \n
    \n\n
    \n \n \n
    \n\n
    \n \n \n
    \n\n
    \n \n \n
    \n\n
    \n \n \n
    \n\n
    \n \n \n
    \n\n
    \n \n\n
    \n \n \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n\n
    \n \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n\n
    \n \n \n
    \n
    \n `;\n}" + }, + { + "name": "InputTextAreaTemplate", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/stories/primeng/form/InputTextArea.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "`\n \n`" + }, + { + "name": "InputTextAreaTemplateAutoRezise", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/stories/primeng/form/InputTextArea.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "`\n \n`" + }, + { + "name": "InputTextTemplate", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/stories/primeng/form/InputText.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "`\n
    \n


    \n


    \n

    \n

    \n
    \n`" + }, + { + "name": "isIframeLoaded", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui-e2e/src/support/commands.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "($iframe) => {\n const contentWindow = $iframe.contentWindow;\n\n if (contentWindow.document.readyState === 'complete') {\n const src = $iframe.attributes.src;\n const href = contentWindow.location.href;\n return href !== 'about:blank' || src === 'about:blank' || src === '';\n }\n\n return false;\n}", + "rawdescription": "Will check if an iframe is ready for DOM manipulation. Just listening for the\nload event will only work if the iframe is not already loaded. If so, it is\nnecessary to observe the readyState. The issue here is that Chrome initialises\niframes with \"about:blank\" and sets their readyState to complete. So it is\nalso necessary to check if it's the readyState of the correct target document.\n\nSome hints taken and adapted from:\nhttps://stackoverflow.com/questions/17158932/how-to-detect-when-an-iframe-has-already-been-loaded/36155560", + "description": "

    Will check if an iframe is ready for DOM manipulation. Just listening for the\nload event will only work if the iframe is not already loaded. If so, it is\nnecessary to observe the readyState. The issue here is that Chrome initialises\niframes with "about:blank" and sets their readyState to complete. So it is\nalso necessary to check if it's the readyState of the correct target document.

    \n

    Some hints taken and adapted from:\nhttps://stackoverflow.com/questions/17158932/how-to-detect-when-an-iframe-has-already-been-loaded/36155560

    \n" + }, + { + "name": "items", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/stories/primeng/button/SplitButton.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "[]", + "defaultValue": "[\n {\n label: 'Update',\n icon: 'pi pi-refresh',\n command: () => {}\n },\n {\n label: 'Delete',\n icon: 'pi pi-times',\n command: () => {}\n },\n { label: 'Angular.io', icon: 'pi pi-info', command: () => {} },\n { separator: true },\n { label: 'Setup', icon: 'pi pi-cog', command: () => {} }\n]" + }, + { + "name": "items", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/stories/primeng/menu/Menu.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "[]", + "defaultValue": "[\n {\n label: 'Options',\n items: [\n {\n label: 'Update',\n icon: 'pi pi-refresh',\n command: () => {\n console.log('update');\n }\n },\n {\n label: 'Delete',\n icon: 'pi pi-times',\n command: () => {\n console.log('delete');\n }\n }\n ]\n }\n]" + }, + { + "name": "JS_MIME_TYPE", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/app/portlets/dot-edit-page/content/services/html/dot-dom-html-util.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "defaultValue": "'text/javascript'" + }, + { + "name": "KeyFilterTemplate", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "apps/dotcms-ui/src/stories/primeng/form/KeyFilter.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "`\n
    \n