nav tabs on admin dashboard

This commit is contained in:
2019-03-07 00:20:34 -06:00
parent f73d6ae228
commit e4f473f376
11661 changed files with 216240 additions and 1544253 deletions

View File

@@ -1,30 +1,19 @@
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
var _slicedToArray = (function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i['return']) _i['return'](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError('Invalid attempt to destructure non-iterable instance'); } }; })();
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _postcss = require('postcss');
var _postcss2 = _interopRequireDefault(_postcss);
var _topologicalSort = require('./topologicalSort');
var _topologicalSort2 = _interopRequireDefault(_topologicalSort);
var postcss = require('postcss');
var topologicalSort = require('./topologicalSort');
var declWhitelist = ['composes'];
var declFilter = new RegExp('^(' + declWhitelist.join('|') + ')$');
var declFilter = new RegExp(`^(${declWhitelist.join('|')})$`);
var matchImports = /^(.+?)\s+from\s+(?:"([^"]+)"|'([^']+)'|(global))$/;
var icssImport = /^:import\((?:"([^"]+)"|'([^']+)')\)/;
var VISITED_MARKER = 1;
function createParentName(rule, root) {
return '__' + root.index(rule.parent) + '_' + rule.selector;
return `__${root.index(rule.parent)}_${rule.selector}`;
}
function serializeImports(imports) {
@@ -70,8 +59,8 @@ function addImportToGraph(importId, parentId, graph, visited) {
}
}
var processor = _postcss2['default'].plugin('modules-extract-imports', function () {
var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
module.exports = postcss.plugin('modules-extract-imports', function () {
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var failOnWrongOrder = options.failOnWrongOrder;
@@ -86,7 +75,7 @@ var processor = _postcss2['default'].plugin('modules-extract-imports', function
var importIndex = 0;
var createImportedName = typeof options.createImportedName !== 'function' ? function (importName /*, path*/) {
return 'i__imported_' + importName.replace(/\W/g, '_') + '_' + importIndex++;
return `i__imported_${importName.replace(/\W/g, '_')}_${importIndex++}`;
} : options.createImportedName;
// Check the existing imports order and save refs
@@ -94,10 +83,9 @@ var processor = _postcss2['default'].plugin('modules-extract-imports', function
var matches = icssImport.exec(rule.selector);
if (matches) {
var _matches = _slicedToArray(matches, 3);
var /*match*/doubleQuotePath = _matches[1];
var singleQuotePath = _matches[2];
var _matches = _slicedToArray(matches, 3),
/*match*/doubleQuotePath = _matches[1],
singleQuotePath = _matches[2];
var importPath = doubleQuotePath || singleQuotePath;
@@ -110,46 +98,44 @@ var processor = _postcss2['default'].plugin('modules-extract-imports', function
// Find any declaration that supports imports
css.walkDecls(declFilter, function (decl) {
var matches = decl.value.match(matchImports);
var tmpSymbols = undefined;
var tmpSymbols = void 0;
if (matches) {
var _matches2 = _slicedToArray(matches, 5);
var _matches2 = _slicedToArray(matches, 5),
var /*match*/symbols = _matches2[1];
var doubleQuotePath = _matches2[2];
var singleQuotePath = _matches2[3];
var _global = _matches2[4];
/*match*/symbols = _matches2[1],
doubleQuotePath = _matches2[2],
singleQuotePath = _matches2[3],
global = _matches2[4];
if (_global) {
if (global) {
// Composing globals simply means changing these classes to wrap them in global(name)
tmpSymbols = symbols.split(/\s+/).map(function (s) {
return 'global(' + s + ')';
return `global(${s})`;
});
} else {
(function () {
var importPath = doubleQuotePath || singleQuotePath;
var parentRule = createParentName(decl.parent, css);
var importPath = doubleQuotePath || singleQuotePath;
var parentRule = createParentName(decl.parent, css);
addImportToGraph(importPath, parentRule, graph, visited);
addImportToGraph(importPath, parentRule, graph, visited);
importDecls[importPath] = decl;
imports[importPath] = imports[importPath] || {};
importDecls[importPath] = decl;
imports[importPath] = imports[importPath] || {};
tmpSymbols = symbols.split(/\s+/).map(function (s) {
if (!imports[importPath][s]) {
imports[importPath][s] = createImportedName(s, importPath);
}
tmpSymbols = symbols.split(/\s+/).map(function (s) {
if (!imports[importPath][s]) {
imports[importPath][s] = createImportedName(s, importPath);
}
return imports[importPath][s];
});
})();
return imports[importPath][s];
});
}
decl.value = tmpSymbols.join(' ');
}
});
var importsOrder = (0, _topologicalSort2['default'])(graph, failOnWrongOrder);
var importsOrder = topologicalSort(graph, failOnWrongOrder);
if (importsOrder instanceof Error) {
var importPath = importsOrder.nodes.find(function (importPath) {
@@ -165,14 +151,14 @@ var processor = _postcss2['default'].plugin('modules-extract-imports', function
});
}
var lastImportRule = undefined;
var lastImportRule = void 0;
importsOrder.forEach(function (path) {
var importedSymbols = imports[path];
var rule = existingImports[path];
if (!rule && importedSymbols) {
rule = _postcss2['default'].rule({
selector: ':import("' + path + '")',
rule = postcss.rule({
selector: `:import("${path}")`,
raws: { after: '\n' }
});
@@ -184,7 +170,7 @@ var processor = _postcss2['default'].plugin('modules-extract-imports', function
if (!importedSymbols) return;
Object.keys(importedSymbols).forEach(function (importedSymbol) {
rule.append(_postcss2['default'].decl({
rule.append(postcss.decl({
value: importedSymbol,
prop: importedSymbols[importedSymbol],
raws: { before: '\n ' }
@@ -192,7 +178,4 @@ var processor = _postcss2['default'].plugin('modules-extract-imports', function
});
});
};
});
exports['default'] = processor;
module.exports = exports['default'];
});

View File

@@ -1,14 +1,10 @@
'use strict';
"use strict";
Object.defineProperty(exports, '__esModule', {
value: true
});
exports['default'] = topologicalSort;
var PERMANENT_MARKER = 2;
var TEMPORARY_MARKER = 1;
function createError(node, graph) {
var er = new Error('Nondeterministic import\'s order');
var er = new Error("Nondeterministic import's order");
var related = graph[node];
var relatedNode = related.find(function (relatedNode) {
@@ -57,4 +53,4 @@ function topologicalSort(graph, strict) {
return result;
}
module.exports = exports['default'];
module.exports = topologicalSort;

View File

@@ -1,10 +1,13 @@
{
"_from": "postcss-modules-extract-imports@^1.2.0",
"_id": "postcss-modules-extract-imports@1.2.0",
"_id": "postcss-modules-extract-imports@1.2.1",
"_inBundle": false,
"_integrity": "sha1-ZhQOzs447wa/DT41XWm/WdFB6oU=",
"_integrity": "sha512-6jt9XZwUhwmRUhb/CkyJY020PYaPJsCyt3UjbaWo6XEbH/94Hmv6MP7fG2C5NDU/BcHzyGYxNtHvM+LTf9HrYw==",
"_location": "/postcss-modules-extract-imports",
"_phantomChildren": {},
"_phantomChildren": {
"chalk": "2.4.2",
"supports-color": "5.5.0"
},
"_requested": {
"type": "range",
"registry": true,
@@ -18,13 +21,25 @@
"_requiredBy": [
"/css-loader"
],
"_resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-1.2.0.tgz",
"_shasum": "66140ecece38ef06bf0d3e355d69bf59d141ea85",
"_resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-1.2.1.tgz",
"_shasum": "dc87e34148ec7eab5f791f7cd5849833375b741a",
"_spec": "postcss-modules-extract-imports@^1.2.0",
"_where": "C:\\xampp\\htdocs\\w4rpservices\\node_modules\\css-loader",
"author": {
"name": "Glen Maddern"
},
"babel": {
"presets": [
[
"env",
{
"targets": {
"node": 4
}
}
]
]
},
"bugs": {
"url": "https://github.com/css-modules/postcss-modules-extract-imports/issues"
},
@@ -35,15 +50,16 @@
"deprecated": false,
"description": "A CSS Modules transform to extract local aliases for inline imports",
"devDependencies": {
"babel": "^5.4.7",
"babel-cli": "^6.24.1",
"babel-eslint": "^7.2.2",
"babel-istanbul": "^0.4.0",
"babelify": "^7.3.0",
"chokidar-cli": "^1.0.1",
"babel-jest": "^20.0.3",
"babel-preset-env": "^1.5.1",
"codecov.io": "^0.1.2",
"coveralls": "^2.11.2",
"eslint": "^1.5.0",
"mocha": "^3.1.2"
"husky": "^0.13.3",
"jest": "^20.0.3",
"lint-staged": "^3.4.2",
"prettier": "^1.3.1"
},
"files": [
"lib"
@@ -55,6 +71,12 @@
"plugin"
],
"license": "ISC",
"lint-staged": {
"*.js": [
"prettier --single-quote --no-semi --write",
"git add"
]
},
"main": "lib/index.js",
"name": "postcss-modules-extract-imports",
"repository": {
@@ -62,16 +84,10 @@
"url": "git+https://github.com/css-modules/postcss-modules-extract-imports.git"
},
"scripts": {
"autotest": "chokidar src test -c 'npm test'",
"build": "babel --out-dir lib src",
"cover": "babel-istanbul cover node_modules/.bin/_mocha",
"lint": "eslint src",
"posttest": "npm run lint && npm run build",
"precover": "npm run lint && npm run build",
"prepublish": "npm run build",
"test": "mocha --compilers js:babel/register",
"travis": "npm run cover -- --report lcovonly",
"watch": "chokidar src -c 'npm run build'"
"precommit": "lint-staged",
"prepublish": "yarn run test && yarn run build",
"test": "jest --coverage"
},
"version": "1.2.0"
"version": "1.2.1"
}