How to use the css.escape function in css

To help you get started, we’ve selected a few css examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bpmn-io / bpmn-js / lib / features / replace-preview / BpmnReplacePreview.js View on Github external
// if the visual of the element is already replaced
      if (context.visualReplacements[id]) {
        return;
      }

      var element = elementRegistry.get(id);

      assign(newElement, { x: element.x, y: element.y });

      // create a temporary shape
      var tempShape = elementFactory.createShape(newElement);

      canvas.addShape(tempShape, element.parent);

      // select the original SVG element related to the element and hide it
      var gfx = domQuery('[data-element-id="' + cssEscape(element.id) + '"]', context.dragGroup);

      if (gfx) {
        svgAttr(gfx, { display: 'none' });
      }

      // clone the gfx of the temporary shape and add it to the drag group
      var dragger = previewSupport.addDragger(tempShape, context.dragGroup);

      context.visualReplacements[id] = dragger;

      canvas.removeShape(tempShape);
    });
  }
github medialize / ally.js / test / helper / test-iframe-browser-data.js View on Github external
BrowserDataFrame.prototype._getElement = function(label, _document) {
    return _document && _document.querySelector('[data-label="' + cssEscape(label) + '"]');
  };
github thelounge / thelounge / client / js / utils.js View on Github external
function hasRoleInChannel(channel, roles, nick) {
	if (!channel || !roles) {
		return false;
	}

	const channelID = channel.attr("data-id");
	const network = $("#sidebar .network").has(`.chan[data-id="${channelID}"]`);
	const target = nick || network.attr("data-nick");
	const user = channel.find(`.names .user[data-name="${escape(target)}"]`).first();
	return user.parent().is("." + roles.join(", ."));
}
github qgrid / ng2 / src / core / services / css.js View on Github external
export function escape(name) {
	return cssEscape(escapeAttr(name));
}
github bpmn-io / bpmn-js / lib / features / replace-preview / BpmnReplacePreview.js View on Github external
forEach(visualReplacements, function(dragger, id) {

      var originalGfx = domQuery('[data-element-id="' + cssEscape(id) + '"]', context.dragGroup);

      if (originalGfx) {
        svgAttr(originalGfx, { display: 'inline' });
      }

      dragger.remove();

      if (visualReplacements[id]) {
        delete visualReplacements[id];
      }
    });
  }
github bpmn-io / cmmn-js / lib / features / replace-preview / CmmnReplacePreview.js View on Github external
var getGfx = function(shape) {
      var selector,
          gfx;

      if (dragGroup) {
        selector = '[data-element-id="' + cssEscape(shape.id) + '"]';
        gfx = dragGroup;
      }
      else if (visual) {
        selector = '.djs-dragger';
        gfx = visual;
      }

      return gfx && domQuery(selector, gfx);
    };
github swagger-api / swagger-ui / src / core / utils.js View on Github external
export const escapeDeepLinkPath = (str) => cssEscape( createDeepLinkPath(str).replace(/%20/g, "_") )
github bpmn-io / dmn-js / packages / dmn-js-decision-table / src / features / cell-selection / CellSelectionUtil.js View on Github external
export function getNodeById(elementId, container) {
  return query(`[data-element-id="${ cssEscape(elementId) }"]`, container);
}