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

@@ -6,25 +6,30 @@
var loaderUtils = require('loader-utils')
var path = require('path')
var hash = require('hash-sum')
var qs = require('querystring')
module.exports = function () {}
module.exports.pitch = function (remainingRequest) {
if (this.cacheable) this.cacheable()
var isServer = this.target === 'node'
var isProduction = this.minimize || process.env.NODE_ENV === 'production'
var addStylesClientPath = loaderUtils.stringifyRequest(this, '!' + path.join(__dirname, 'lib/addStylesClient.js'))
var addStylesServerPath = loaderUtils.stringifyRequest(this, '!' + path.join(__dirname, 'lib/addStylesServer.js'))
var addStylesShadowPath = loaderUtils.stringifyRequest(this, '!' + path.join(__dirname, 'lib/addStylesShadow.js'))
var request = loaderUtils.stringifyRequest(this, '!!' + remainingRequest)
var id = JSON.stringify(hash(request + path.relative(__dirname, this.resourcePath)))
var relPath = path.relative(__dirname, this.resourcePath).replace(/\\/g, '/')
var id = JSON.stringify(hash(request + relPath))
var options = loaderUtils.getOptions(this) || {}
// direct css import from js --> direct, or manually call `styles.__inject__(ssrContext)` with `manualInject` option
// css import from vue file --> component lifecycle linked
// style embedded in vue file --> component lifecycle linked
var isVue = /"vue":true/.test(remainingRequest) || options.manualInject
var isVue = (
/"vue":true/.test(remainingRequest) ||
options.manualInject ||
qs.parse(this.resourceQuery.slice(1)).vue != null
)
var shared = [
'// style-loader: Adds some css to the DOM by adding a <style> tag',
@@ -36,11 +41,22 @@ module.exports.pitch = function (remainingRequest) {
'if(content.locals) module.exports = content.locals;'
]
if (!isServer) {
// shadowMode is enabled in vue-cli with vue build --target web-component.
// exposes the same __inject__ method like SSR
if (options.shadowMode) {
return shared.concat([
'// add CSS to Shadow Root',
'var add = require(' + addStylesShadowPath + ').default',
'module.exports.__inject__ = function (shadowRoot) {',
' add(' + id + ', content, shadowRoot)',
'};'
]).join('\n')
} else if (!isServer) {
// on the client: dynamic inject + hot-reload
var code = [
'// add the styles to the DOM',
'var update = require(' + addStylesClientPath + ')(' + id + ', content, ' + isProduction + ', ' + JSON.stringify(options) + ');'
'var add = require(' + addStylesClientPath + ').default',
'var update = add(' + id + ', content, ' + isProduction + ', ' + JSON.stringify(options) + ');'
]
if (!isProduction) {
code = code.concat([
@@ -67,7 +83,7 @@ module.exports.pitch = function (remainingRequest) {
// component's lifecycle hooks
return shared.concat([
'// add CSS to SSR context',
'var add = require(' + addStylesServerPath + ')',
'var add = require(' + addStylesServerPath + ').default',
'module.exports.__inject__ = function (context) {',
' add(' + id + ', content, ' + isProduction + ', context)',
'};'
@@ -75,7 +91,7 @@ module.exports.pitch = function (remainingRequest) {
} else {
// normal import
return shared.concat([
'require(' + addStylesServerPath + ')(' + id + ', content, ' + isProduction + ')'
'require(' + addStylesServerPath + ').default(' + id + ', content, ' + isProduction + ')'
]).join('\n')
}
}

View File

@@ -4,6 +4,8 @@
Modified by Evan You @yyx990803
*/
import listToStyles from './listToStyles'
var hasDocument = typeof document !== 'undefined'
if (typeof DEBUG !== 'undefined' && DEBUG) {
@@ -14,8 +16,6 @@ if (typeof DEBUG !== 'undefined' && DEBUG) {
) }
}
var listToStyles = require('./listToStyles')
/*
type StyleObject = {
id: number;
@@ -49,7 +49,7 @@ var ssrIdKey = 'data-vue-ssr-id'
// tags it will allow on a page
var isOldIE = typeof navigator !== 'undefined' && /msie [6-9]\b/.test(navigator.userAgent.toLowerCase())
module.exports = function (parentId, list, _isProduction, _options) {
export default function addStylesClient (parentId, list, _isProduction, _options) {
isProduction = _isProduction
options = _options || {}

View File

@@ -1,6 +1,6 @@
var listToStyles = require('./listToStyles')
import listToStyles from './listToStyles'
module.exports = function (parentId, list, isProduction, context) {
export default function addStylesServer (parentId, list, isProduction, context) {
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
context = __VUE_SSR_CONTEXT__
}

View File

@@ -2,7 +2,7 @@
* Translates the list format produced by css-loader into something
* easier to manipulate.
*/
module.exports = function listToStyles (parentId, list) {
export default function listToStyles (parentId, list) {
var styles = []
var newStyles = {}
for (var i = 0; i < list.length; i++) {

View File

@@ -1,26 +1,26 @@
{
"_from": "vue-style-loader@^3.0.0",
"_id": "vue-style-loader@3.1.2",
"_from": "vue-style-loader@^4.1.0",
"_id": "vue-style-loader@4.1.2",
"_inBundle": false,
"_integrity": "sha512-ICtVdK/p+qXWpdSs2alWtsXt9YnDoYjQe0w5616j9+/EhjoxZkbun34uWgsMFnC1MhrMMwaWiImz3K2jK1Yp2Q==",
"_integrity": "sha512-0ip8ge6Gzz/Bk0iHovU9XAUQaFt/G2B61bnWa2tCcqqdgfHs1lF9xXorFbE55Gmy92okFT+8bfmySuUOu13vxQ==",
"_location": "/vue-style-loader",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "vue-style-loader@^3.0.0",
"raw": "vue-style-loader@^4.1.0",
"name": "vue-style-loader",
"escapedName": "vue-style-loader",
"rawSpec": "^3.0.0",
"rawSpec": "^4.1.0",
"saveSpec": null,
"fetchSpec": "^3.0.0"
"fetchSpec": "^4.1.0"
},
"_requiredBy": [
"/vue-loader"
],
"_resolved": "https://registry.npmjs.org/vue-style-loader/-/vue-style-loader-3.1.2.tgz",
"_shasum": "6b66ad34998fc9520c2f1e4d5fa4091641c1597a",
"_spec": "vue-style-loader@^3.0.0",
"_resolved": "https://registry.npmjs.org/vue-style-loader/-/vue-style-loader-4.1.2.tgz",
"_shasum": "dedf349806f25ceb4e64f3ad7c0a44fba735fcf8",
"_spec": "vue-style-loader@^4.1.0",
"_where": "C:\\xampp\\htdocs\\w4rpservices\\node_modules\\vue-loader",
"author": {
"name": "Evan You"
@@ -36,7 +36,11 @@
"deprecated": false,
"description": "Vue.js style loader module for webpack",
"devDependencies": {
"jest": "^18.1.0"
"babel-core": "^6.26.0",
"babel-jest": "^22.1.0",
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.0",
"conventional-changelog-cli": "^2.0.1",
"jest": "^22.1.4"
},
"homepage": "https://github.com/vuejs/vue-style-loader#readme",
"license": "MIT",
@@ -46,7 +50,8 @@
"url": "git+ssh://git@github.com/vuejs/vue-style-loader.git"
},
"scripts": {
"prepublishOnly": "conventional-changelog -p angular -r 2 -i CHANGELOG.md -s",
"test": "jest"
},
"version": "3.1.2"
"version": "4.1.2"
}

View File

@@ -1,5 +1,5 @@
const addStylesClient = require('../lib/addStylesClient')
const addStylesServer = require('../lib/addStylesServer')
import addStylesClient from '../lib/addStylesClient'
import addStylesServer from '../lib/addStylesServer'
const mockedList = [
[1, 'h1 { color: red; }', ''],