govuk_publishing_components 17.12.0 → 17.12.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 15100114c1d1e54a605b3aed4a62725da43ed817ebd42581d2174e635e60ef56
4
- data.tar.gz: 9c89d095e3633459ac68b5b4c9676fa0cb393f6faeeb45169b9c32c03da2a789
3
+ metadata.gz: a3e3fd312d691aced37cb5668da7a7df0e6019f971fe538912141be0012d7710
4
+ data.tar.gz: b2fcc3200857cbad3ef71e8a5a489e5383e4103fe33392aa2f1d666dc0340ec6
5
5
  SHA512:
6
- metadata.gz: ad896747c06e59bddd353da4f45630605663a7aea58e75357d3d147b0fd2bd942d7918c4eb5eff4a7af99e44f478f2478fa89f2ee26f7de9c78a3c9047bd5d00
7
- data.tar.gz: bf5d42a5187c6c65216a92018dcc7f1259a3207d8d3caf2a159ed7ddbae427b9497da5f2a71a89ff393faf1ac81755f09764b8f3620e117b84ddace25dcf7354
6
+ metadata.gz: 4f980b7c1c2561f9de4fdf53e6c090c7dd775c0351beb6b141f91ddf6859c1bebe420a48aea5b229624fc5a54cae6a990176a2d2d2df06cf67c14e2442b576b9
7
+ data.tar.gz: 0dcbfa96af5efa822418e39a2c268836abeeddc81c485f970a05c6cb0ef0ea91129e05c4bf3e99b8cc6dcd6dc1d05b92ba41764bb1560ee0174290f6d23a9557
@@ -42,6 +42,8 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
42
42
  trackEvent(getTrackEventParams($(this)))
43
43
  setInitialAriaAttributes()
44
44
  revealInitialPrompt()
45
+ var refocusClass = '.js-' + $(e.target).attr('aria-controls')
46
+ $element.find(refocusClass).focus()
45
47
  })
46
48
 
47
49
  this.$pageIsUsefulButton.on('click', function (e) {
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = '17.12.0'.freeze
2
+ VERSION = '17.12.1'.freeze
3
3
  end
@@ -49,7 +49,7 @@
49
49
  "/"
50
50
  ],
51
51
  "_resolved": "git://github.com/alphagov/accessible-autocomplete.git#3523dd9fffc70cbd9f6f555f75863c33a709f49e",
52
- "_shasum": "ca9e9bfdc97d298a8c518d33a602f8f509b522ba",
52
+ "_shasum": "9cfe48c4062f9cd061d10824850f79c675b3bf68",
53
53
  "_shrinkwrap": null,
54
54
  "_spec": "accessible-autocomplete@git://github.com/alphagov/accessible-autocomplete.git#add-multiselect-support",
55
55
  "_where": "/var/lib/jenkins/workspace/ublishing_components_master-N4FWJIUY4CIFHKGZOAAEVVXODRY3YBORQOPIBBXWX72VUPSGJRRQ",
@@ -27,8 +27,9 @@ Custom JSON-Schema keywords for [Ajv](https://github.com/epoberezkin/ajv) valida
27
27
  - [Keywords for arrays](#keywords-for-arrays)
28
28
  - [uniqueItemProperties](#uniqueitemproperties)
29
29
  - [Keywords for objects](#keywords-for-objects)
30
- - [allRequired](allrequired)
31
- - [anyRequired](anyrequired)
30
+ - [allRequired](#allrequired)
31
+ - [anyRequired](#anyrequired)
32
+ - [oneRequired](#onerequired)
32
33
  - [patternRequired](#patternrequired)
33
34
  - [prohibited](#prohibited)
34
35
  - [deepProperties](#deepproperties)
@@ -293,7 +294,7 @@ var validData = [
293
294
 
294
295
  var invalidData1 = [
295
296
  { id: 1 },
296
- { id: 1 },
297
+ { id: 1 }, // duplicate "id"
297
298
  { id: 3 }
298
299
  ];
299
300
 
@@ -358,7 +359,25 @@ var alsoValidData = { foo: 1, bar: 2 };
358
359
  var invalidDataList = [ {}, { baz: 3 } ];
359
360
  ```
360
361
 
361
- __Please note__: By combining `anyRequired` with `maxProperties: 1` you can achieve that exactly one property from the list is required to be present for the data object to pass validation.
362
+
363
+ #### `oneRequired`
364
+
365
+ This keyword allows to require the presence of only one property from the list.
366
+
367
+ This keyword applies only to objects. If the data is not an object, the validation succeeds.
368
+
369
+ The value of this keyword must be an array of strings, each string being a property name. For data object to be valid exactly one of the properties in this array should be present in the object.
370
+
371
+ ```javascript
372
+ var schema = {
373
+ oneRequired: ['foo', 'bar']
374
+ };
375
+
376
+ var validData = { foo: 1 };
377
+ var alsoValidData = { bar: 2, baz: 3 };
378
+
379
+ var invalidDataList = [ {}, { baz: 3 }, { foo: 1, bar: 2 } ];
380
+ ```
362
381
 
363
382
 
364
383
  #### `patternRequired`
@@ -4,7 +4,7 @@ module.exports = {
4
4
  metaSchemaRef: metaSchemaRef
5
5
  };
6
6
 
7
- var META_SCHEMA_ID = 'http://json-schema.org/draft-06/schema';
7
+ var META_SCHEMA_ID = 'http://json-schema.org/draft-07/schema';
8
8
 
9
9
  function metaSchemaRef(ajv) {
10
10
  var defaultMeta = ajv._opts.defaultMeta;
@@ -8,6 +8,7 @@ module.exports = {
8
8
  dynamicDefaults: require('./dynamicDefaults'),
9
9
  allRequired: require('./allRequired'),
10
10
  anyRequired: require('./anyRequired'),
11
+ oneRequired: require('./oneRequired'),
11
12
  prohibited: require('./prohibited'),
12
13
  uniqueItemProperties: require('./uniqueItemProperties'),
13
14
  deepProperties: require('./deepProperties'),
@@ -0,0 +1,24 @@
1
+ 'use strict';
2
+
3
+ module.exports = function defFunc(ajv) {
4
+ defFunc.definition = {
5
+ type: 'object',
6
+ macro: function (schema) {
7
+ if (schema.length == 0) return true;
8
+ if (schema.length == 1) return {required: schema};
9
+ var schemas = schema.map(function (prop) {
10
+ return {required: [prop]};
11
+ });
12
+ return {oneOf: schemas};
13
+ },
14
+ metaSchema: {
15
+ type: 'array',
16
+ items: {
17
+ type: 'string'
18
+ }
19
+ }
20
+ };
21
+
22
+ ajv.addKeyword('oneRequired', defFunc.definition);
23
+ return ajv;
24
+ };
@@ -1,19 +1,35 @@
1
1
  'use strict';
2
2
 
3
+ var SCALAR_TYPES = ['number', 'integer', 'string', 'boolean', 'null'];
4
+
3
5
  module.exports = function defFunc(ajv) {
4
6
  defFunc.definition = {
5
7
  type: 'array',
6
8
  compile: function(keys, parentSchema, it) {
7
9
  var equal = it.util.equal;
10
+ var scalar = getScalarKeys(keys, parentSchema);
11
+
8
12
  return function(data) {
9
13
  if (data.length > 1) {
10
14
  for (var k=0; k < keys.length; k++) {
11
- var key = keys[k];
12
- for (var i = data.length; i--;) {
13
- if (typeof data[i] != 'object') continue;
14
- for (var j = i; j--;) {
15
- if (typeof data[j] == 'object' && equal(data[i][key], data[j][key]))
16
- return false;
15
+ var i, key = keys[k];
16
+ if (scalar[k]) {
17
+ var hash = {};
18
+ for (i = data.length; i--;) {
19
+ if (!data[i] || typeof data[i] != 'object') continue;
20
+ var prop = data[i][key];
21
+ if (prop && typeof prop == 'object') continue;
22
+ if (typeof prop == 'string') prop = '"' + prop;
23
+ if (hash[prop]) return false;
24
+ hash[prop] = true;
25
+ }
26
+ } else {
27
+ for (i = data.length; i--;) {
28
+ if (!data[i] || typeof data[i] != 'object') continue;
29
+ for (var j = i; j--;) {
30
+ if (data[j] && typeof data[j] == 'object' && equal(data[i][key], data[j][key]))
31
+ return false;
32
+ }
17
33
  }
18
34
  }
19
35
  }
@@ -30,3 +46,14 @@ module.exports = function defFunc(ajv) {
30
46
  ajv.addKeyword('uniqueItemProperties', defFunc.definition);
31
47
  return ajv;
32
48
  };
49
+
50
+
51
+ function getScalarKeys(keys, schema) {
52
+ return keys.map(function(key) {
53
+ var properties = schema.items && schema.items.properties;
54
+ var propType = properties && properties[key] && properties[key].type;
55
+ return Array.isArray(propType)
56
+ ? propType.indexOf('object') < 0 && propType.indexOf('array') < 0
57
+ : SCALAR_TYPES.indexOf(propType) >= 0;
58
+ });
59
+ }
@@ -15,13 +15,13 @@
15
15
  ],
16
16
  "_from": "ajv-keywords@>=3.0.0 <4.0.0",
17
17
  "_hasShrinkwrap": false,
18
- "_id": "ajv-keywords@3.4.0",
18
+ "_id": "ajv-keywords@3.4.1",
19
19
  "_inCache": true,
20
20
  "_location": "/standard/ajv-keywords",
21
21
  "_nodeVersion": "10.0.0",
22
22
  "_npmOperationalInternal": {
23
23
  "host": "s3://npm-registry-packages",
24
- "tmp": "tmp/ajv-keywords_3.4.0_1549813199872_0.8232900085799115"
24
+ "tmp": "tmp/ajv-keywords_3.4.1_1562442518740_0.9436686733094879"
25
25
  },
26
26
  "_npmUser": {
27
27
  "name": "esp",
@@ -41,8 +41,8 @@
41
41
  "_requiredBy": [
42
42
  "/standard/table"
43
43
  ],
44
- "_resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.4.0.tgz",
45
- "_shasum": "4b831e7b531415a7cc518cd404e73f6193c6349d",
44
+ "_resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.4.1.tgz",
45
+ "_shasum": "ef916e271c64ac12171fd8384eaae6b2345854da",
46
46
  "_shrinkwrap": null,
47
47
  "_spec": "ajv-keywords@^3.0.0",
48
48
  "_where": "/var/lib/jenkins/workspace/ublishing_components_master-N4FWJIUY4CIFHKGZOAAEVVXODRY3YBORQOPIBBXWX72VUPSGJRRQ/node_modules/standard/node_modules/table",
@@ -60,25 +60,25 @@
60
60
  "chai": "^4.2.0",
61
61
  "coveralls": "^3.0.2",
62
62
  "dot": "^1.1.1",
63
- "eslint": "^5.0.0",
63
+ "eslint": "^6.0.0",
64
64
  "glob": "^7.1.3",
65
65
  "istanbul": "^0.4.3",
66
66
  "js-beautify": "^1.8.9",
67
67
  "json-schema-test": "^2.0.0",
68
- "mocha": "^5.2.0",
68
+ "mocha": "^6.0.0",
69
69
  "pre-commit": "^1.1.3",
70
70
  "uuid": "^3.3.2"
71
71
  },
72
72
  "directories": {},
73
73
  "dist": {
74
- "integrity": "sha512-aUjdRFISbuFOl0EIZc+9e4FfZp0bDZgAdOOf30bJmw8VM9v84SHyVyxDfbWxpGYbdZD/9XoKxfHVNmxPkhwyGw==",
75
- "shasum": "4b831e7b531415a7cc518cd404e73f6193c6349d",
76
- "tarball": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.4.0.tgz",
77
- "fileCount": 31,
78
- "unpackedSize": 69839,
79
- "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcYEXQCRA9TVsSAnZWagAAQeAP/ja42ryFTjcfufvCZU6y\nviBfm5K7aGpfl1LbpWEwKHs3q8XwE0oqF1cs8Uummz15No2nuP/ZjzNJ9sn0\nAoH8m1JBlplPL8Md34FJJU22sch6mMSTeiVi24vr17jcc8ZE2ADshygMy3bQ\njXhXzw8JV4CoYwZFkuZtbJoOMpy8dB3IChu5QKNiTCu9vJx5sHoG1mvJeuOT\nDFH+beHbr9kmtet7afgB73IByfYsY/yvDkzwTGygVK/OUvun+GglrpieqD1k\n5FAhfEtnRCIcMsM1T8+IPv+Kt4org3zSppgIfAvr36sN1/sDyPTe5bfx5HlN\nTu4+oBMi4fqP4qiJfh0nnR4jRbNR9QG/8fcxI8GbIxHyauq50s/UuG+w8xSz\nJqrLXJjtJgyJf8bfc6k1jkH8TT6/c2c1vKYTdGYqs0Q2lIsjDw6W+zLhQf9W\nCBBu8AWpeAzvBOnWC9W8lE7DXKLAu/cncfBZygjL7EYmGCGJR8wdarYA22+I\n6N35T2CL0xZNrJ1joxSnTLZpy9YO6zA6WCrfo+zdZavsZKWHCXskElOaVLEf\n6w/gL9khv+o1WZGjCs2gDI/m9wl85ZOTm3JyHTwhVPzlvI8Lt6BXMAxokFkm\nTqcasLdYrHqaMYhJLHqGpixUGVm/nvVcjBkFbCg5t/rGArUHbxul9wC9us91\n/aZV\r\n=NIo5\r\n-----END PGP SIGNATURE-----\r\n"
74
+ "integrity": "sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ==",
75
+ "shasum": "ef916e271c64ac12171fd8384eaae6b2345854da",
76
+ "tarball": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.4.1.tgz",
77
+ "fileCount": 32,
78
+ "unpackedSize": 71883,
79
+ "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdIPsXCRA9TVsSAnZWagAAaBcQAIJ5ZqQTcNxoI0cVtkbT\n2Zj1e66mkfZ2Bm9k5fCwHcHMQNKqpl/aElfETYkzVZAwOlwQfI1XrxncNWqF\nxwRpYHZDOCLPnanfPOc7jF6wJkspQrN/iE4ghI8BxpGKqjVbYBOtSxd85WEL\nNbR8xXTepBK4A9Wd7SYot3M0rcxrUuMN920r4aAvYQ9WhCSMFtvhFlpFp4Sj\nknc06OKrmSyacSFgijUSYOfzuzumsw1h3GDFChDfKSbOw2lFw0pIEAaK+Pbt\nlK98HEQHrFGByATWSn4l4kmPcMU7gH3zAARJbye1BaIGSGB3ec6a6TMw2t++\nPkuvVK7813GDT1owgMOrsQvwLSAEBHTywLL3IKHFJHz+6Q4Y0x0etdgpXy9H\nETCGQHGyrkb3oEgNCFPNTeU9a0+vDWr8fmXfJI7Rhb3rv43Hu5UyO84gYNtA\n08LnqIG64XqDGen0M64lL11j5Dy1Fkg+H3OxGdUiWhKtj0mFzVi+W+XkVJdX\nv2HTtq543TOaoMrzoPP0H/OgMAiTOCuBzAPAcvRn3dtbDyOsh/LFgWdeeEdL\ny7xSnHlTqxEwHESSp2vDouBV0Xpx8pZGyADF9cbVWs4iE5qIjfyHyXoJTIvN\nGMrdlDrmH56MAiqlhK96Wv6hw3bZsaOVz/tg51fn0Kzy8nTEyDjavXJxrad+\noZ40\r\n=eDCH\r\n-----END PGP SIGNATURE-----\r\n"
80
80
  },
81
- "gitHead": "1ec78c7c01ad29d9ff650536b8a722f3cfa73229",
81
+ "gitHead": "daa7d9159fda5adf94b380a009b8d5ff09a21b10",
82
82
  "homepage": "https://github.com/epoberezkin/ajv-keywords#readme",
83
83
  "keywords": [
84
84
  "JSON-Schema",
@@ -111,5 +111,5 @@
111
111
  "test-cov": "istanbul cover -x 'spec/**' node_modules/mocha/bin/_mocha -- spec/*.spec.js -R spec",
112
112
  "test-spec": "mocha spec/*.spec.js -R spec"
113
113
  },
114
- "version": "3.4.0"
114
+ "version": "3.4.1"
115
115
  }
@@ -227,7 +227,7 @@ JSON Schema specification defines several annotation keywords that describe sche
227
227
  - `title` and `description`: information about the data represented by that schema
228
228
  - `$comment` (NEW in draft-07): information for developers. With option `$comment` Ajv logs or passes the comment string to the user-supplied function. See [Options](#options).
229
229
  - `default`: a default value of the data instance, see [Assigning defaults](#assigning-defaults).
230
- - `examples` (NEW in draft-07): an array of data instances. Ajv does not check the validity of these instances against the schema.
230
+ - `examples` (NEW in draft-06): an array of data instances. Ajv does not check the validity of these instances against the schema.
231
231
  - `readOnly` and `writeOnly` (NEW in draft-07): marks data-instance as read-only or write-only in relation to the source of the data (database, api, etc.).
232
232
  - `contentEncoding`: [RFC 2045](https://tools.ietf.org/html/rfc2045#section-6.1 ), e.g., "base64".
233
233
  - `contentMediaType`: [RFC 2046](https://tools.ietf.org/html/rfc2046), e.g., "image/png".
@@ -694,7 +694,7 @@ function vars(arr, statement) {
694
694
  return code;
695
695
  }
696
696
 
697
- },{"../dotjs/validate":37,"./error_classes":3,"./resolve":6,"./util":10,"fast-deep-equal":41,"fast-json-stable-stringify":42}],6:[function(require,module,exports){
697
+ },{"../dotjs/validate":38,"./error_classes":3,"./resolve":6,"./util":10,"fast-deep-equal":42,"fast-json-stable-stringify":43}],6:[function(require,module,exports){
698
698
  'use strict';
699
699
 
700
700
  var URI = require('uri-js')
@@ -966,7 +966,7 @@ function resolveIds(schema) {
966
966
  return localRefs;
967
967
  }
968
968
 
969
- },{"./schema_obj":8,"./util":10,"fast-deep-equal":41,"json-schema-traverse":43,"uri-js":44}],7:[function(require,module,exports){
969
+ },{"./schema_obj":8,"./util":10,"fast-deep-equal":42,"json-schema-traverse":44,"uri-js":45}],7:[function(require,module,exports){
970
970
  'use strict';
971
971
 
972
972
  var ruleModules = require('../dotjs')
@@ -1034,7 +1034,7 @@ module.exports = function rules() {
1034
1034
  return RULES;
1035
1035
  };
1036
1036
 
1037
- },{"../dotjs":26,"./util":10}],8:[function(require,module,exports){
1037
+ },{"../dotjs":27,"./util":10}],8:[function(require,module,exports){
1038
1038
  'use strict';
1039
1039
 
1040
1040
  var util = require('./util');
@@ -1343,7 +1343,7 @@ function unescapeJsonPointer(str) {
1343
1343
  return str.replace(/~1/g, '/').replace(/~0/g, '~');
1344
1344
  }
1345
1345
 
1346
- },{"./ucs2length":9,"fast-deep-equal":41}],11:[function(require,module,exports){
1346
+ },{"./ucs2length":9,"fast-deep-equal":42}],11:[function(require,module,exports){
1347
1347
  'use strict';
1348
1348
 
1349
1349
  var KEYWORDS = [
@@ -1396,6 +1396,45 @@ module.exports = function (metaSchema, keywordsJsonPointers) {
1396
1396
 
1397
1397
  },{}],12:[function(require,module,exports){
1398
1398
  'use strict';
1399
+
1400
+ var metaSchema = require('./refs/json-schema-draft-07.json');
1401
+
1402
+ module.exports = {
1403
+ $id: 'https://github.com/epoberezkin/ajv/blob/master/lib/definition_schema.js',
1404
+ definitions: {
1405
+ simpleTypes: metaSchema.definitions.simpleTypes
1406
+ },
1407
+ type: 'object',
1408
+ dependencies: {
1409
+ schema: ['validate'],
1410
+ $data: ['validate'],
1411
+ statements: ['inline'],
1412
+ valid: {not: {required: ['macro']}}
1413
+ },
1414
+ properties: {
1415
+ type: metaSchema.properties.type,
1416
+ schema: {type: 'boolean'},
1417
+ statements: {type: 'boolean'},
1418
+ dependencies: {
1419
+ type: 'array',
1420
+ items: {type: 'string'}
1421
+ },
1422
+ metaSchema: {type: 'object'},
1423
+ modifying: {type: 'boolean'},
1424
+ valid: {type: 'boolean'},
1425
+ $data: {type: 'boolean'},
1426
+ async: {type: 'boolean'},
1427
+ errors: {
1428
+ anyOf: [
1429
+ {type: 'boolean'},
1430
+ {const: 'full'}
1431
+ ]
1432
+ }
1433
+ }
1434
+ };
1435
+
1436
+ },{"./refs/json-schema-draft-07.json":41}],13:[function(require,module,exports){
1437
+ 'use strict';
1399
1438
  module.exports = function generate__limit(it, $keyword, $ruleType) {
1400
1439
  var out = ' ';
1401
1440
  var $lvl = it.level;
@@ -1553,7 +1592,7 @@ module.exports = function generate__limit(it, $keyword, $ruleType) {
1553
1592
  return out;
1554
1593
  }
1555
1594
 
1556
- },{}],13:[function(require,module,exports){
1595
+ },{}],14:[function(require,module,exports){
1557
1596
  'use strict';
1558
1597
  module.exports = function generate__limitItems(it, $keyword, $ruleType) {
1559
1598
  var out = ' ';
@@ -1632,7 +1671,7 @@ module.exports = function generate__limitItems(it, $keyword, $ruleType) {
1632
1671
  return out;
1633
1672
  }
1634
1673
 
1635
- },{}],14:[function(require,module,exports){
1674
+ },{}],15:[function(require,module,exports){
1636
1675
  'use strict';
1637
1676
  module.exports = function generate__limitLength(it, $keyword, $ruleType) {
1638
1677
  var out = ' ';
@@ -1716,7 +1755,7 @@ module.exports = function generate__limitLength(it, $keyword, $ruleType) {
1716
1755
  return out;
1717
1756
  }
1718
1757
 
1719
- },{}],15:[function(require,module,exports){
1758
+ },{}],16:[function(require,module,exports){
1720
1759
  'use strict';
1721
1760
  module.exports = function generate__limitProperties(it, $keyword, $ruleType) {
1722
1761
  var out = ' ';
@@ -1795,7 +1834,7 @@ module.exports = function generate__limitProperties(it, $keyword, $ruleType) {
1795
1834
  return out;
1796
1835
  }
1797
1836
 
1798
- },{}],16:[function(require,module,exports){
1837
+ },{}],17:[function(require,module,exports){
1799
1838
  'use strict';
1800
1839
  module.exports = function generate_allOf(it, $keyword, $ruleType) {
1801
1840
  var out = ' ';
@@ -1840,7 +1879,7 @@ module.exports = function generate_allOf(it, $keyword, $ruleType) {
1840
1879
  return out;
1841
1880
  }
1842
1881
 
1843
- },{}],17:[function(require,module,exports){
1882
+ },{}],18:[function(require,module,exports){
1844
1883
  'use strict';
1845
1884
  module.exports = function generate_anyOf(it, $keyword, $ruleType) {
1846
1885
  var out = ' ';
@@ -1916,7 +1955,7 @@ module.exports = function generate_anyOf(it, $keyword, $ruleType) {
1916
1955
  return out;
1917
1956
  }
1918
1957
 
1919
- },{}],18:[function(require,module,exports){
1958
+ },{}],19:[function(require,module,exports){
1920
1959
  'use strict';
1921
1960
  module.exports = function generate_comment(it, $keyword, $ruleType) {
1922
1961
  var out = ' ';
@@ -1932,7 +1971,7 @@ module.exports = function generate_comment(it, $keyword, $ruleType) {
1932
1971
  return out;
1933
1972
  }
1934
1973
 
1935
- },{}],19:[function(require,module,exports){
1974
+ },{}],20:[function(require,module,exports){
1936
1975
  'use strict';
1937
1976
  module.exports = function generate_const(it, $keyword, $ruleType) {
1938
1977
  var out = ' ';
@@ -1990,7 +2029,7 @@ module.exports = function generate_const(it, $keyword, $ruleType) {
1990
2029
  return out;
1991
2030
  }
1992
2031
 
1993
- },{}],20:[function(require,module,exports){
2032
+ },{}],21:[function(require,module,exports){
1994
2033
  'use strict';
1995
2034
  module.exports = function generate_contains(it, $keyword, $ruleType) {
1996
2035
  var out = ' ';
@@ -2074,7 +2113,7 @@ module.exports = function generate_contains(it, $keyword, $ruleType) {
2074
2113
  return out;
2075
2114
  }
2076
2115
 
2077
- },{}],21:[function(require,module,exports){
2116
+ },{}],22:[function(require,module,exports){
2078
2117
  'use strict';
2079
2118
  module.exports = function generate_custom(it, $keyword, $ruleType) {
2080
2119
  var out = ' ';
@@ -2304,7 +2343,7 @@ module.exports = function generate_custom(it, $keyword, $ruleType) {
2304
2343
  return out;
2305
2344
  }
2306
2345
 
2307
- },{}],22:[function(require,module,exports){
2346
+ },{}],23:[function(require,module,exports){
2308
2347
  'use strict';
2309
2348
  module.exports = function generate_dependencies(it, $keyword, $ruleType) {
2310
2349
  var out = ' ';
@@ -2474,7 +2513,7 @@ module.exports = function generate_dependencies(it, $keyword, $ruleType) {
2474
2513
  return out;
2475
2514
  }
2476
2515
 
2477
- },{}],23:[function(require,module,exports){
2516
+ },{}],24:[function(require,module,exports){
2478
2517
  'use strict';
2479
2518
  module.exports = function generate_enum(it, $keyword, $ruleType) {
2480
2519
  var out = ' ';
@@ -2542,7 +2581,7 @@ module.exports = function generate_enum(it, $keyword, $ruleType) {
2542
2581
  return out;
2543
2582
  }
2544
2583
 
2545
- },{}],24:[function(require,module,exports){
2584
+ },{}],25:[function(require,module,exports){
2546
2585
  'use strict';
2547
2586
  module.exports = function generate_format(it, $keyword, $ruleType) {
2548
2587
  var out = ' ';
@@ -2694,7 +2733,7 @@ module.exports = function generate_format(it, $keyword, $ruleType) {
2694
2733
  return out;
2695
2734
  }
2696
2735
 
2697
- },{}],25:[function(require,module,exports){
2736
+ },{}],26:[function(require,module,exports){
2698
2737
  'use strict';
2699
2738
  module.exports = function generate_if(it, $keyword, $ruleType) {
2700
2739
  var out = ' ';
@@ -2800,7 +2839,7 @@ module.exports = function generate_if(it, $keyword, $ruleType) {
2800
2839
  return out;
2801
2840
  }
2802
2841
 
2803
- },{}],26:[function(require,module,exports){
2842
+ },{}],27:[function(require,module,exports){
2804
2843
  'use strict';
2805
2844
 
2806
2845
  //all requires must be explicit because browserify won't work with dynamic requires
@@ -2835,7 +2874,7 @@ module.exports = {
2835
2874
  validate: require('./validate')
2836
2875
  };
2837
2876
 
2838
- },{"./_limit":12,"./_limitItems":13,"./_limitLength":14,"./_limitProperties":15,"./allOf":16,"./anyOf":17,"./comment":18,"./const":19,"./contains":20,"./dependencies":22,"./enum":23,"./format":24,"./if":25,"./items":27,"./multipleOf":28,"./not":29,"./oneOf":30,"./pattern":31,"./properties":32,"./propertyNames":33,"./ref":34,"./required":35,"./uniqueItems":36,"./validate":37}],27:[function(require,module,exports){
2877
+ },{"./_limit":13,"./_limitItems":14,"./_limitLength":15,"./_limitProperties":16,"./allOf":17,"./anyOf":18,"./comment":19,"./const":20,"./contains":21,"./dependencies":23,"./enum":24,"./format":25,"./if":26,"./items":28,"./multipleOf":29,"./not":30,"./oneOf":31,"./pattern":32,"./properties":33,"./propertyNames":34,"./ref":35,"./required":36,"./uniqueItems":37,"./validate":38}],28:[function(require,module,exports){
2839
2878
  'use strict';
2840
2879
  module.exports = function generate_items(it, $keyword, $ruleType) {
2841
2880
  var out = ' ';
@@ -2978,7 +3017,7 @@ module.exports = function generate_items(it, $keyword, $ruleType) {
2978
3017
  return out;
2979
3018
  }
2980
3019
 
2981
- },{}],28:[function(require,module,exports){
3020
+ },{}],29:[function(require,module,exports){
2982
3021
  'use strict';
2983
3022
  module.exports = function generate_multipleOf(it, $keyword, $ruleType) {
2984
3023
  var out = ' ';
@@ -3057,7 +3096,7 @@ module.exports = function generate_multipleOf(it, $keyword, $ruleType) {
3057
3096
  return out;
3058
3097
  }
3059
3098
 
3060
- },{}],29:[function(require,module,exports){
3099
+ },{}],30:[function(require,module,exports){
3061
3100
  'use strict';
3062
3101
  module.exports = function generate_not(it, $keyword, $ruleType) {
3063
3102
  var out = ' ';
@@ -3143,7 +3182,7 @@ module.exports = function generate_not(it, $keyword, $ruleType) {
3143
3182
  return out;
3144
3183
  }
3145
3184
 
3146
- },{}],30:[function(require,module,exports){
3185
+ },{}],31:[function(require,module,exports){
3147
3186
  'use strict';
3148
3187
  module.exports = function generate_oneOf(it, $keyword, $ruleType) {
3149
3188
  var out = ' ';
@@ -3218,7 +3257,7 @@ module.exports = function generate_oneOf(it, $keyword, $ruleType) {
3218
3257
  return out;
3219
3258
  }
3220
3259
 
3221
- },{}],31:[function(require,module,exports){
3260
+ },{}],32:[function(require,module,exports){
3222
3261
  'use strict';
3223
3262
  module.exports = function generate_pattern(it, $keyword, $ruleType) {
3224
3263
  var out = ' ';
@@ -3295,7 +3334,7 @@ module.exports = function generate_pattern(it, $keyword, $ruleType) {
3295
3334
  return out;
3296
3335
  }
3297
3336
 
3298
- },{}],32:[function(require,module,exports){
3337
+ },{}],33:[function(require,module,exports){
3299
3338
  'use strict';
3300
3339
  module.exports = function generate_properties(it, $keyword, $ruleType) {
3301
3340
  var out = ' ';
@@ -3627,7 +3666,7 @@ module.exports = function generate_properties(it, $keyword, $ruleType) {
3627
3666
  return out;
3628
3667
  }
3629
3668
 
3630
- },{}],33:[function(require,module,exports){
3669
+ },{}],34:[function(require,module,exports){
3631
3670
  'use strict';
3632
3671
  module.exports = function generate_propertyNames(it, $keyword, $ruleType) {
3633
3672
  var out = ' ';
@@ -3711,7 +3750,7 @@ module.exports = function generate_propertyNames(it, $keyword, $ruleType) {
3711
3750
  return out;
3712
3751
  }
3713
3752
 
3714
- },{}],34:[function(require,module,exports){
3753
+ },{}],35:[function(require,module,exports){
3715
3754
  'use strict';
3716
3755
  module.exports = function generate_ref(it, $keyword, $ruleType) {
3717
3756
  var out = ' ';
@@ -3837,7 +3876,7 @@ module.exports = function generate_ref(it, $keyword, $ruleType) {
3837
3876
  return out;
3838
3877
  }
3839
3878
 
3840
- },{}],35:[function(require,module,exports){
3879
+ },{}],36:[function(require,module,exports){
3841
3880
  'use strict';
3842
3881
  module.exports = function generate_required(it, $keyword, $ruleType) {
3843
3882
  var out = ' ';
@@ -4109,7 +4148,7 @@ module.exports = function generate_required(it, $keyword, $ruleType) {
4109
4148
  return out;
4110
4149
  }
4111
4150
 
4112
- },{}],36:[function(require,module,exports){
4151
+ },{}],37:[function(require,module,exports){
4113
4152
  'use strict';
4114
4153
  module.exports = function generate_uniqueItems(it, $keyword, $ruleType) {
4115
4154
  var out = ' ';
@@ -4197,7 +4236,7 @@ module.exports = function generate_uniqueItems(it, $keyword, $ruleType) {
4197
4236
  return out;
4198
4237
  }
4199
4238
 
4200
- },{}],37:[function(require,module,exports){
4239
+ },{}],38:[function(require,module,exports){
4201
4240
  'use strict';
4202
4241
  module.exports = function generate_validate(it, $keyword, $ruleType) {
4203
4242
  var out = '';
@@ -4693,12 +4732,12 @@ module.exports = function generate_validate(it, $keyword, $ruleType) {
4693
4732
  return out;
4694
4733
  }
4695
4734
 
4696
- },{}],38:[function(require,module,exports){
4735
+ },{}],39:[function(require,module,exports){
4697
4736
  'use strict';
4698
4737
 
4699
4738
  var IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i;
4700
4739
  var customRuleCode = require('./dotjs/custom');
4701
- var metaSchema = require('./refs/json-schema-draft-07.json');
4740
+ var definitionSchema = require('./definition_schema');
4702
4741
 
4703
4742
  module.exports = {
4704
4743
  add: addKeyword,
@@ -4707,38 +4746,6 @@ module.exports = {
4707
4746
  validate: validateKeyword
4708
4747
  };
4709
4748
 
4710
- var definitionSchema = {
4711
- definitions: {
4712
- simpleTypes: metaSchema.definitions.simpleTypes
4713
- },
4714
- type: 'object',
4715
- dependencies: {
4716
- schema: ['validate'],
4717
- $data: ['validate'],
4718
- statements: ['inline'],
4719
- valid: {not: {required: ['macro']}}
4720
- },
4721
- properties: {
4722
- type: metaSchema.properties.type,
4723
- schema: {type: 'boolean'},
4724
- statements: {type: 'boolean'},
4725
- dependencies: {
4726
- type: 'array',
4727
- items: {type: 'string'}
4728
- },
4729
- metaSchema: {type: 'object'},
4730
- modifying: {type: 'boolean'},
4731
- valid: {type: 'boolean'},
4732
- $data: {type: 'boolean'},
4733
- async: {type: 'boolean'},
4734
- errors: {
4735
- anyOf: [
4736
- {type: 'boolean'},
4737
- {const: 'full'}
4738
- ]
4739
- }
4740
- }
4741
- };
4742
4749
 
4743
4750
  /**
4744
4751
  * Define custom keyword
@@ -4873,7 +4880,7 @@ function validateKeyword(definition, throwError) {
4873
4880
  return false;
4874
4881
  }
4875
4882
 
4876
- },{"./dotjs/custom":21,"./refs/json-schema-draft-07.json":40}],39:[function(require,module,exports){
4883
+ },{"./definition_schema":12,"./dotjs/custom":22}],40:[function(require,module,exports){
4877
4884
  module.exports={
4878
4885
  "$schema": "http://json-schema.org/draft-07/schema#",
4879
4886
  "$id": "https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/data.json#",
@@ -4892,7 +4899,7 @@ module.exports={
4892
4899
  "additionalProperties": false
4893
4900
  }
4894
4901
 
4895
- },{}],40:[function(require,module,exports){
4902
+ },{}],41:[function(require,module,exports){
4896
4903
  module.exports={
4897
4904
  "$schema": "http://json-schema.org/draft-07/schema#",
4898
4905
  "$id": "http://json-schema.org/draft-07/schema#",
@@ -5062,7 +5069,7 @@ module.exports={
5062
5069
  "default": true
5063
5070
  }
5064
5071
 
5065
- },{}],41:[function(require,module,exports){
5072
+ },{}],42:[function(require,module,exports){
5066
5073
  'use strict';
5067
5074
 
5068
5075
  var isArray = Array.isArray;
@@ -5119,7 +5126,7 @@ module.exports = function equal(a, b) {
5119
5126
  return a!==a && b!==b;
5120
5127
  };
5121
5128
 
5122
- },{}],42:[function(require,module,exports){
5129
+ },{}],43:[function(require,module,exports){
5123
5130
  'use strict';
5124
5131
 
5125
5132
  module.exports = function (data, opts) {
@@ -5180,7 +5187,7 @@ module.exports = function (data, opts) {
5180
5187
  })(data);
5181
5188
  };
5182
5189
 
5183
- },{}],43:[function(require,module,exports){
5190
+ },{}],44:[function(require,module,exports){
5184
5191
  'use strict';
5185
5192
 
5186
5193
  var traverse = module.exports = function (schema, opts, cb) {
@@ -5271,7 +5278,7 @@ function escapeJsonPtr(str) {
5271
5278
  return str.replace(/~/g, '~0').replace(/\//g, '~1');
5272
5279
  }
5273
5280
 
5274
- },{}],44:[function(require,module,exports){
5281
+ },{}],45:[function(require,module,exports){
5275
5282
  /** @license URI.js v4.2.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */
5276
5283
  (function (global, factory) {
5277
5284
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
@@ -7161,5 +7168,5 @@ function setLogger(self) {
7161
7168
 
7162
7169
  function noop() {}
7163
7170
 
7164
- },{"./cache":1,"./compile":5,"./compile/async":2,"./compile/error_classes":3,"./compile/formats":4,"./compile/resolve":6,"./compile/rules":7,"./compile/schema_obj":8,"./compile/util":10,"./data":11,"./keyword":38,"./refs/data.json":39,"./refs/json-schema-draft-07.json":40,"fast-json-stable-stringify":42}]},{},[])("ajv")
7171
+ },{"./cache":1,"./compile":5,"./compile/async":2,"./compile/error_classes":3,"./compile/formats":4,"./compile/resolve":6,"./compile/rules":7,"./compile/schema_obj":8,"./compile/util":10,"./data":11,"./keyword":39,"./refs/data.json":40,"./refs/json-schema-draft-07.json":41,"fast-json-stable-stringify":43}]},{},[])("ajv")
7165
7172
  });