!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/var/www/html/wincloud_gateway/node_modules/draft-js/lib/   drwxr-xr-x
Free 13.01 GB of 57.97 GB (22.45%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     getSampleSelectionMocksForTesting.js (3.57 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
/**
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 * @format
 * 
 * @emails oncall+draft_js
 */
'use strict';

var CharacterMetadata = require("./CharacterMetadata");

var ContentBlock = require("./ContentBlock");

var ContentState = require("./ContentState");

var EditorState = require("./EditorState");

var _require = require("./SampleDraftInlineStyle"),
    BOLD = _require.BOLD;

var Immutable = require("immutable");

var EMPTY = CharacterMetadata.EMPTY;

var getSampleSelectionMocksForTesting = function getSampleSelectionMocksForTesting() {
  var root = document.createElement('div');
  var contents = document.createElement('div');
  contents.setAttribute('data-contents', 'true');
  root.appendChild(contents);
  var text = ['Washington', 'Jefferson', 'Lincoln', 'Roosevelt', 'Kennedy', 'Obama'];
  var textA = text[0] + text[1];
  var textB = text[2] + text[3];
  var textC = text[4] + text[5];
  var boldChar = CharacterMetadata.create({
    style: BOLD
  });
  var aChars = Immutable.List(Immutable.Repeat(EMPTY, text[0].length).concat(Immutable.Repeat(boldChar, text[1].length)));
  var bChars = Immutable.List(Immutable.Repeat(EMPTY, text[2].length).concat(Immutable.Repeat(boldChar, text[3].length)));
  var cChars = Immutable.List(Immutable.Repeat(EMPTY, text[4].length).concat(Immutable.Repeat(boldChar, text[5].length)));
  var contentBlocks = [new ContentBlock({
    key: 'a',
    type: 'unstyled',
    text: textA,
    characterList: aChars
  }), new ContentBlock({
    key: 'b',
    type: 'unstyled',
    text: textB,
    characterList: bChars
  }), new ContentBlock({
    key: 'c',
    type: 'unstyled',
    text: textC,
    characterList: cChars
  })];
  var contentState = ContentState.createFromBlockArray(contentBlocks);
  var editorState = EditorState.createWithContent(contentState);
  var textNodes = text.map(function (text) {
    return document.createTextNode(text);
  });
  var leafChildren = textNodes.map(function (textNode) {
    var span = document.createElement('span');
    span.appendChild(textNode);
    return span;
  });
  var leafs = ['a-0-0', 'a-0-1', 'b-0-0', 'b-0-1', 'c-0-0', 'c-0-1'].map(function (blockKey, index) {
    var span = document.createElement('span');
    span.setAttribute('data-offset-key', '' + blockKey);
    span.appendChild(leafChildren[index]);
    return span;
  });
  var decorators = ['a-0-0', 'b-0-0', 'c-0-0'].map(function (decoratorKey, index) {
    var span = document.createElement('span');
    span.setAttribute('data-offset-key', '' + decoratorKey);
    span.appendChild(leafs[index * 2]);
    span.appendChild(leafs[index * 2 + 1]);
    return span;
  });
  var blocks = ['a-0-0', 'b-0-0', 'c-0-0'].map(function (blockKey, index) {
    var outerBlockElement = document.createElement('div');
    var innerBlockElement = document.createElement('div');
    innerBlockElement.setAttribute('data-offset-key', '' + blockKey);
    innerBlockElement.appendChild(decorators[index]);
    outerBlockElement.setAttribute('data-offset-key', '' + blockKey);
    outerBlockElement.setAttribute('data-block', 'true');
    outerBlockElement.appendChild(innerBlockElement);
    return outerBlockElement;
  });
  blocks.forEach(function (blockElem) {
    contents.appendChild(blockElem);
  });
  return {
    editorState: editorState,
    root: root,
    contents: contents,
    blocks: blocks,
    decorators: decorators,
    leafs: leafs,
    leafChildren: leafChildren,
    textNodes: textNodes
  };
};

module.exports = getSampleSelectionMocksForTesting;

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0155 ]--