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

@@ -2,6 +2,16 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
<a name="1.0.0"></a>
# [1.0.0](https://github.com/webpack-contrib/schema-utils/compare/v0.4.7...v1.0.0) (2018-08-07)
### Features
* **src:** add support for custom error messages ([#33](https://github.com/webpack-contrib/schema-utils/issues/33)) ([1cbe4ef](https://github.com/webpack-contrib/schema-utils/commit/1cbe4ef))
<a name="0.4.7"></a>
## [0.4.7](https://github.com/webpack-contrib/schema-utils/compare/v0.4.6...v0.4.7) (2018-08-07)

View File

@@ -27,7 +27,7 @@ npm i schema-utils
### `validateOptions`
**schema.json**
**`schema.json`**
```js
{
"type": "object",
@@ -38,6 +38,25 @@ npm i schema-utils
}
```
#### Error Messages (Custom)
**`schema.json`**
```js
{
"type": "object",
"properties": {
"option": {
"type": [ "boolean" ]
}
},
// Overrides the default err.message for option
"errorMessage": {
"option": "should be {Boolean} (https:/github.com/org/repo#anchor)"
}
"additionalProperties": false
}
```
```js
import schema from 'path/to/schema.json'
import validateOptions from 'schema-utils'

View File

@@ -1,26 +1,26 @@
{
"_from": "schema-utils@^0.4.0",
"_id": "schema-utils@0.4.7",
"_from": "schema-utils@^1.0.0",
"_id": "schema-utils@1.0.0",
"_inBundle": false,
"_integrity": "sha512-v/iwU6wvwGK8HbU9yi3/nhGzP0yGSuhQMzL6ySiec1FSrZZDkhm4noOSWzrNFo/jEc+SJY6jRTwuwbSXJPDUnQ==",
"_integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==",
"_location": "/postcss-loader/schema-utils",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "schema-utils@^0.4.0",
"raw": "schema-utils@^1.0.0",
"name": "schema-utils",
"escapedName": "schema-utils",
"rawSpec": "^0.4.0",
"rawSpec": "^1.0.0",
"saveSpec": null,
"fetchSpec": "^0.4.0"
"fetchSpec": "^1.0.0"
},
"_requiredBy": [
"/postcss-loader"
],
"_resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.7.tgz",
"_shasum": "ba74f597d2be2ea880131746ee17d0a093c68187",
"_spec": "schema-utils@^0.4.0",
"_resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz",
"_shasum": "0b79a93204d7b600d4b2850d1f66c2a34951c770",
"_spec": "schema-utils@^1.0.0",
"_where": "C:\\xampp\\htdocs\\w4rpservices\\node_modules\\postcss-loader",
"author": {
"name": "webpack Contrib",
@@ -32,6 +32,7 @@
"bundleDependencies": false,
"dependencies": {
"ajv": "^6.1.0",
"ajv-errors": "^1.0.0",
"ajv-keywords": "^3.1.0"
},
"deprecated": false,
@@ -69,5 +70,5 @@
"release": "npm run commits && standard-version",
"test": "jest --env node --verbose --coverage"
},
"version": "0.4.7"
"version": "1.0.0"
}

View File

@@ -1,5 +1,6 @@
/* eslint-disable
strict
strict,
no-param-reassign
*/
'use strict';
@@ -12,11 +13,15 @@ class ValidationError extends Error {
this.message = `${name || ''} Invalid Options\n\n`;
errors.forEach((err) => {
this.message += `options${err.dataPath} ${err.message}\n`;
this.errors = errors.map((err) => {
err.dataPath = err.dataPath.replace(/\//g, '.');
return err;
});
this.errors = errors;
this.errors.forEach((err) => {
this.message += `options${err.dataPath} ${err.message}\n`;
});
Error.captureStackTrace(this, this.constructor);
}

View File

@@ -9,17 +9,18 @@ const fs = require('fs');
const path = require('path');
const Ajv = require('ajv');
const ajvKeywords = require('ajv-keywords');
const errors = require('ajv-errors');
const keywords = require('ajv-keywords');
const ValidationError = require('./ValidationError');
const ajv = new Ajv({
allErrors: true,
useDefaults: true,
errorDataPath: 'property',
jsonPointers: true,
});
ajvKeywords(ajv, ['instanceof', 'typeof']);
errors(ajv);
keywords(ajv, ['instanceof', 'typeof']);
const validateOptions = (schema, options, name) => {
if (typeof schema === 'string') {