@player-ui/types 0.4.0-next.8 → 0.4.0-next.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -307,6 +307,14 @@ declare namespace Validation {
307
307
  dataTarget?: 'formatted' | 'deformatted';
308
308
  /** Where the error should be displayed */
309
309
  displayTarget?: DisplayTarget;
310
+ /**
311
+ * If the validation blocks navigation
312
+ * true/false - always/never block navigation
313
+ * once - only block navigation if the validation has not been triggered before
314
+ *
315
+ * @default - true for errors, 'once' for warnings
316
+ */
317
+ blocking?: boolean | 'once';
310
318
  /** Additional props to send down to a Validator */
311
319
  [key: string]: unknown;
312
320
  }
@@ -137,6 +137,25 @@
137
137
  "description": "Where the error should be displayed"
138
138
  }
139
139
  },
140
+ "blocking": {
141
+ "required": false,
142
+ "node": {
143
+ "type": "or",
144
+ "or": [
145
+ {
146
+ "type": "boolean",
147
+ "title": "Reference.blocking"
148
+ },
149
+ {
150
+ "type": "string",
151
+ "const": "once"
152
+ }
153
+ ],
154
+ "title": "Reference.blocking",
155
+ "description": "If the validation blocks navigation\ntrue/false - always/never block navigation\nonce - only block navigation if the validation has not been triggered before",
156
+ "default": "- true for errors, 'once' for warnings"
157
+ }
158
+ },
140
159
  "ref": {
141
160
  "required": false,
142
161
  "node": {
@@ -319,6 +338,25 @@
319
338
  "title": "Reference.displayTarget",
320
339
  "description": "Where the error should be displayed"
321
340
  }
341
+ },
342
+ "blocking": {
343
+ "required": false,
344
+ "node": {
345
+ "type": "or",
346
+ "or": [
347
+ {
348
+ "type": "boolean",
349
+ "title": "Reference.blocking"
350
+ },
351
+ {
352
+ "type": "string",
353
+ "const": "once"
354
+ }
355
+ ],
356
+ "title": "Reference.blocking",
357
+ "description": "If the validation blocks navigation\ntrue/false - always/never block navigation\nonce - only block navigation if the validation has not been triggered before",
358
+ "default": "- true for errors, 'once' for warnings"
359
+ }
322
360
  }
323
361
  },
324
362
  "additionalProperties": {
@@ -498,6 +536,25 @@
498
536
  "title": "Reference.displayTarget",
499
537
  "description": "Where the error should be displayed"
500
538
  }
539
+ },
540
+ "blocking": {
541
+ "required": false,
542
+ "node": {
543
+ "type": "or",
544
+ "or": [
545
+ {
546
+ "type": "boolean",
547
+ "title": "Reference.blocking"
548
+ },
549
+ {
550
+ "type": "string",
551
+ "const": "once"
552
+ }
553
+ ],
554
+ "title": "Reference.blocking",
555
+ "description": "If the validation blocks navigation\ntrue/false - always/never block navigation\nonce - only block navigation if the validation has not been triggered before",
556
+ "default": "- true for errors, 'once' for warnings"
557
+ }
501
558
  }
502
559
  },
503
560
  "additionalProperties": {
@@ -682,6 +739,25 @@
682
739
  "title": "Reference.displayTarget",
683
740
  "description": "Where the error should be displayed"
684
741
  }
742
+ },
743
+ "blocking": {
744
+ "required": false,
745
+ "node": {
746
+ "type": "or",
747
+ "or": [
748
+ {
749
+ "type": "boolean",
750
+ "title": "Reference.blocking"
751
+ },
752
+ {
753
+ "type": "string",
754
+ "const": "once"
755
+ }
756
+ ],
757
+ "title": "Reference.blocking",
758
+ "description": "If the validation blocks navigation\ntrue/false - always/never block navigation\nonce - only block navigation if the validation has not been triggered before",
759
+ "default": "- true for errors, 'once' for warnings"
760
+ }
685
761
  }
686
762
  },
687
763
  "additionalProperties": {
@@ -882,6 +958,25 @@
882
958
  "title": "Reference.displayTarget",
883
959
  "description": "Where the error should be displayed"
884
960
  }
961
+ },
962
+ "blocking": {
963
+ "required": false,
964
+ "node": {
965
+ "type": "or",
966
+ "or": [
967
+ {
968
+ "type": "boolean",
969
+ "title": "Reference.blocking"
970
+ },
971
+ {
972
+ "type": "string",
973
+ "const": "once"
974
+ }
975
+ ],
976
+ "title": "Reference.blocking",
977
+ "description": "If the validation blocks navigation\ntrue/false - always/never block navigation\nonce - only block navigation if the validation has not been triggered before",
978
+ "default": "- true for errors, 'once' for warnings"
979
+ }
885
980
  }
886
981
  },
887
982
  "additionalProperties": {
@@ -1061,6 +1156,25 @@
1061
1156
  "title": "Reference.displayTarget",
1062
1157
  "description": "Where the error should be displayed"
1063
1158
  }
1159
+ },
1160
+ "blocking": {
1161
+ "required": false,
1162
+ "node": {
1163
+ "type": "or",
1164
+ "or": [
1165
+ {
1166
+ "type": "boolean",
1167
+ "title": "Reference.blocking"
1168
+ },
1169
+ {
1170
+ "type": "string",
1171
+ "const": "once"
1172
+ }
1173
+ ],
1174
+ "title": "Reference.blocking",
1175
+ "description": "If the validation blocks navigation\ntrue/false - always/never block navigation\nonce - only block navigation if the validation has not been triggered before",
1176
+ "default": "- true for errors, 'once' for warnings"
1177
+ }
1064
1178
  }
1065
1179
  },
1066
1180
  "additionalProperties": {
@@ -1245,6 +1359,25 @@
1245
1359
  "title": "Reference.displayTarget",
1246
1360
  "description": "Where the error should be displayed"
1247
1361
  }
1362
+ },
1363
+ "blocking": {
1364
+ "required": false,
1365
+ "node": {
1366
+ "type": "or",
1367
+ "or": [
1368
+ {
1369
+ "type": "boolean",
1370
+ "title": "Reference.blocking"
1371
+ },
1372
+ {
1373
+ "type": "string",
1374
+ "const": "once"
1375
+ }
1376
+ ],
1377
+ "title": "Reference.blocking",
1378
+ "description": "If the validation blocks navigation\ntrue/false - always/never block navigation\nonce - only block navigation if the validation has not been triggered before",
1379
+ "default": "- true for errors, 'once' for warnings"
1380
+ }
1248
1381
  }
1249
1382
  },
1250
1383
  "additionalProperties": {
@@ -120,6 +120,25 @@
120
120
  "description": "Where the error should be displayed"
121
121
  }
122
122
  },
123
+ "blocking": {
124
+ "required": false,
125
+ "node": {
126
+ "type": "or",
127
+ "or": [
128
+ {
129
+ "type": "boolean",
130
+ "title": "Reference.blocking"
131
+ },
132
+ {
133
+ "type": "string",
134
+ "const": "once"
135
+ }
136
+ ],
137
+ "title": "Reference.blocking",
138
+ "description": "If the validation blocks navigation\ntrue/false - always/never block navigation\nonce - only block navigation if the validation has not been triggered before",
139
+ "default": "- true for errors, 'once' for warnings"
140
+ }
141
+ },
123
142
  "ref": {
124
143
  "required": false,
125
144
  "node": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@player-ui/types",
3
- "version": "0.4.0-next.8",
3
+ "version": "0.4.0-next.9",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org"
@@ -50,6 +50,14 @@
50
50
  {
51
51
  "name": "Kelly Harrop",
52
52
  "url": "https://github.com/kharrop"
53
+ },
54
+ {
55
+ "name": "Alejandro Fimbres",
56
+ "url": "https://github.com/lexfm"
57
+ },
58
+ {
59
+ "name": "Rafael Campos",
60
+ "url": "https://github.com/rafbcampos"
53
61
  }
54
62
  ]
55
63
  }
package/src/index.ts CHANGED
@@ -398,6 +398,15 @@ export declare namespace Validation {
398
398
  /** Where the error should be displayed */
399
399
  displayTarget?: DisplayTarget;
400
400
 
401
+ /**
402
+ * If the validation blocks navigation
403
+ * true/false - always/never block navigation
404
+ * once - only block navigation if the validation has not been triggered before
405
+ *
406
+ * @default - true for errors, 'once' for warnings
407
+ */
408
+ blocking?: boolean | 'once';
409
+
401
410
  /** Additional props to send down to a Validator */
402
411
  [key: string]: unknown;
403
412
  }