source: frontend/node_modules/postcss-selector-parser/dist/selectors/namespace.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 3.0 KB
Line 
1"use strict";
2
3exports.__esModule = true;
4exports["default"] = void 0;
5var _cssesc = _interopRequireDefault(require("cssesc"));
6var _util = require("../util");
7var _node = _interopRequireDefault(require("./node"));
8function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
9function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
10function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
11function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
12function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
13var Namespace = /*#__PURE__*/function (_Node) {
14 _inheritsLoose(Namespace, _Node);
15 function Namespace() {
16 return _Node.apply(this, arguments) || this;
17 }
18 var _proto = Namespace.prototype;
19 _proto.qualifiedName = function qualifiedName(value) {
20 if (this.namespace) {
21 return this.namespaceString + "|" + value;
22 } else {
23 return value;
24 }
25 };
26 _proto.valueToString = function valueToString() {
27 return this.qualifiedName(_Node.prototype.valueToString.call(this));
28 };
29 _createClass(Namespace, [{
30 key: "namespace",
31 get: function get() {
32 return this._namespace;
33 },
34 set: function set(namespace) {
35 if (namespace === true || namespace === "*" || namespace === "&") {
36 this._namespace = namespace;
37 if (this.raws) {
38 delete this.raws.namespace;
39 }
40 return;
41 }
42 var escaped = (0, _cssesc["default"])(namespace, {
43 isIdentifier: true
44 });
45 this._namespace = namespace;
46 if (escaped !== namespace) {
47 (0, _util.ensureObject)(this, "raws");
48 this.raws.namespace = escaped;
49 } else if (this.raws) {
50 delete this.raws.namespace;
51 }
52 }
53 }, {
54 key: "ns",
55 get: function get() {
56 return this._namespace;
57 },
58 set: function set(namespace) {
59 this.namespace = namespace;
60 }
61 }, {
62 key: "namespaceString",
63 get: function get() {
64 if (this.namespace) {
65 var ns = this.stringifyProperty("namespace");
66 if (ns === true) {
67 return '';
68 } else {
69 return ns;
70 }
71 } else {
72 return '';
73 }
74 }
75 }]);
76 return Namespace;
77}(_node["default"]);
78exports["default"] = Namespace;
79;
80module.exports = exports.default;
Note: See TracBrowser for help on using the repository browser.