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

@@ -3,24 +3,59 @@
Author Tobias Koppers @sokra
*/
"use strict";
const util = require("util");
const compareLocations = require("./compareLocations");
const DependencyReference = require("./dependencies/DependencyReference");
/** @typedef {import("./Module")} Module */
/** @typedef {import("webpack-sources").Source} Source */
/** @typedef {import("./RuntimeTemplate")} RuntimeTemplate */
/**
* @typedef {Object} DependencyTemplate
* @property {function(Dependency, Source, RuntimeTemplate, Map<Function, DependencyTemplate>): void} apply
*/
/** @typedef {Object} SourcePosition
* @property {number} line
* @property {number=} column
*/
/** @typedef {Object} RealDependencyLocation
* @property {SourcePosition} start
* @property {SourcePosition=} end
* @property {number=} index
*/
/** @typedef {Object} SynteticDependencyLocation
* @property {string} name
* @property {number=} index
*/
/** @typedef {SynteticDependencyLocation|RealDependencyLocation} DependencyLocation */
class Dependency {
constructor() {
/** @type {Module|null} */
this.module = null;
// TODO remove in webpack 5
/** @type {boolean} */
this.weak = false;
/** @type {boolean} */
this.optional = false;
/** @type {DependencyLocation} */
this.loc = undefined;
}
isEqualResource() {
return false;
getResourceIdentifier() {
return null;
}
// Returns the referenced module and export
getReference() {
if(!this.module) return null;
return {
module: this.module,
importedNames: true, // true: full object, false: only sideeffects/no export, array of strings: the exports with this names
};
if (!this.module) return null;
return new DependencyReference(this.module, true, this.weak);
}
// Returns the exported names
@@ -43,12 +78,12 @@ class Dependency {
disconnect() {
this.module = null;
}
// TODO: remove in webpack 3
compare(a, b) {
return compareLocations(a.loc, b.loc);
}
}
Dependency.compare = (a, b) => compareLocations(a.loc, b.loc);
// TODO remove in webpack 5
Dependency.compare = util.deprecate(
(a, b) => compareLocations(a.loc, b.loc),
"Dependency.compare is deprecated and will be removed in the next major version"
);
module.exports = Dependency;