@player-ui/common-types-plugin 0.4.0-next.5 → 0.4.0-next.7

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
@@ -1,4 +1,4 @@
1
- import { ValidatorFunction, FormatType, PlayerPlugin, Player } from '@player-ui/player';
1
+ import { ValidatorFunction, FormatType, ExtendedPlayerPlugin, Player } from '@player-ui/player';
2
2
  import { Expression, Schema, Language } from '@player-ui/types';
3
3
 
4
4
  /** Checks to see if the data-type is a string */
@@ -240,7 +240,19 @@ declare const createMaskedNumericFormatter: (name: string, mask: string) => Form
240
240
  /**
241
241
  * Exposes a lot of common DataTypes, validations, and formats to Player instance.
242
242
  */
243
- declare class CommonTypesPlugin implements PlayerPlugin {
243
+ declare class CommonTypesPlugin implements ExtendedPlayerPlugin<[
244
+ ], [
245
+ ], [
246
+ ], [
247
+ typeof BooleanType,
248
+ typeof IntegerType,
249
+ typeof IntegerPosType,
250
+ typeof IntegerNNType,
251
+ typeof StringType,
252
+ typeof CollectionType,
253
+ typeof DateType,
254
+ typeof PhoneType
255
+ ]> {
244
256
  name: string;
245
257
  apply(player: Player): void;
246
258
  }
@@ -0,0 +1,72 @@
1
+ {
2
+ "source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/2654/execroot/player/plugins/common-types/core/src/data-types/types.ts",
3
+ "name": "BooleanType",
4
+ "type": "object",
5
+ "properties": {
6
+ "type": {
7
+ "required": true,
8
+ "node": {
9
+ "type": "string",
10
+ "const": "BooleanType"
11
+ }
12
+ },
13
+ "default": {
14
+ "required": true,
15
+ "node": {
16
+ "type": "boolean",
17
+ "const": false
18
+ }
19
+ },
20
+ "validation": {
21
+ "required": true,
22
+ "node": {
23
+ "type": "array",
24
+ "elementType": {
25
+ "type": "any"
26
+ },
27
+ "const": [
28
+ {
29
+ "type": "object",
30
+ "properties": {
31
+ "type": {
32
+ "required": true,
33
+ "node": {
34
+ "type": "string",
35
+ "const": "oneOf"
36
+ }
37
+ },
38
+ "message": {
39
+ "required": true,
40
+ "node": {
41
+ "type": "string",
42
+ "const": "Value must be true or false"
43
+ }
44
+ },
45
+ "options": {
46
+ "required": true,
47
+ "node": {
48
+ "type": "array",
49
+ "elementType": {
50
+ "type": "any"
51
+ },
52
+ "const": [
53
+ {
54
+ "type": "boolean",
55
+ "const": true
56
+ },
57
+ {
58
+ "type": "boolean",
59
+ "const": false
60
+ }
61
+ ]
62
+ }
63
+ }
64
+ },
65
+ "additionalProperties": false
66
+ }
67
+ ]
68
+ }
69
+ }
70
+ },
71
+ "additionalProperties": false
72
+ }
@@ -0,0 +1,39 @@
1
+ {
2
+ "source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/2654/execroot/player/plugins/common-types/core/src/data-types/types.ts",
3
+ "name": "CollectionType",
4
+ "type": "object",
5
+ "properties": {
6
+ "type": {
7
+ "required": true,
8
+ "node": {
9
+ "type": "string",
10
+ "const": "CollectionType"
11
+ }
12
+ },
13
+ "validation": {
14
+ "required": true,
15
+ "node": {
16
+ "type": "array",
17
+ "elementType": {
18
+ "type": "any"
19
+ },
20
+ "const": [
21
+ {
22
+ "type": "object",
23
+ "properties": {
24
+ "type": {
25
+ "required": true,
26
+ "node": {
27
+ "type": "string",
28
+ "const": "collection"
29
+ }
30
+ }
31
+ },
32
+ "additionalProperties": false
33
+ }
34
+ ]
35
+ }
36
+ }
37
+ },
38
+ "additionalProperties": false
39
+ }
@@ -0,0 +1,55 @@
1
+ {
2
+ "source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/2654/execroot/player/plugins/common-types/core/src/data-types/types.ts",
3
+ "name": "DateType",
4
+ "type": "object",
5
+ "properties": {
6
+ "type": {
7
+ "required": true,
8
+ "node": {
9
+ "type": "string",
10
+ "const": "DateType"
11
+ }
12
+ },
13
+ "validation": {
14
+ "required": true,
15
+ "node": {
16
+ "type": "array",
17
+ "elementType": {
18
+ "type": "any"
19
+ },
20
+ "const": [
21
+ {
22
+ "type": "object",
23
+ "properties": {
24
+ "type": {
25
+ "required": true,
26
+ "node": {
27
+ "type": "string",
28
+ "const": "string"
29
+ }
30
+ }
31
+ },
32
+ "additionalProperties": false
33
+ }
34
+ ]
35
+ }
36
+ },
37
+ "format": {
38
+ "required": true,
39
+ "node": {
40
+ "type": "object",
41
+ "properties": {
42
+ "type": {
43
+ "required": true,
44
+ "node": {
45
+ "type": "string",
46
+ "const": "date"
47
+ }
48
+ }
49
+ },
50
+ "additionalProperties": false
51
+ }
52
+ }
53
+ },
54
+ "additionalProperties": false
55
+ }
@@ -0,0 +1,75 @@
1
+ {
2
+ "source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/2654/execroot/player/plugins/common-types/core/src/data-types/types.ts",
3
+ "name": "IntegerNNType",
4
+ "type": "object",
5
+ "properties": {
6
+ "type": {
7
+ "required": true,
8
+ "node": {
9
+ "type": "string",
10
+ "const": "IntegerNNType"
11
+ }
12
+ },
13
+ "validation": {
14
+ "required": true,
15
+ "node": {
16
+ "type": "array",
17
+ "elementType": {
18
+ "type": "any"
19
+ },
20
+ "const": [
21
+ {
22
+ "type": "object",
23
+ "properties": {
24
+ "type": {
25
+ "required": true,
26
+ "node": {
27
+ "type": "string",
28
+ "const": "integer"
29
+ }
30
+ }
31
+ },
32
+ "additionalProperties": false
33
+ },
34
+ {
35
+ "type": "object",
36
+ "properties": {
37
+ "type": {
38
+ "required": true,
39
+ "node": {
40
+ "type": "string",
41
+ "const": "min"
42
+ }
43
+ },
44
+ "value": {
45
+ "required": true,
46
+ "node": {
47
+ "type": "number",
48
+ "const": 0
49
+ }
50
+ }
51
+ },
52
+ "additionalProperties": false
53
+ }
54
+ ]
55
+ }
56
+ },
57
+ "format": {
58
+ "required": true,
59
+ "node": {
60
+ "type": "object",
61
+ "properties": {
62
+ "type": {
63
+ "required": true,
64
+ "node": {
65
+ "type": "string",
66
+ "const": "integer"
67
+ }
68
+ }
69
+ },
70
+ "additionalProperties": false
71
+ }
72
+ }
73
+ },
74
+ "additionalProperties": false
75
+ }
@@ -0,0 +1,75 @@
1
+ {
2
+ "source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/2654/execroot/player/plugins/common-types/core/src/data-types/types.ts",
3
+ "name": "IntegerPosType",
4
+ "type": "object",
5
+ "properties": {
6
+ "type": {
7
+ "required": true,
8
+ "node": {
9
+ "type": "string",
10
+ "const": "IntegerPosType"
11
+ }
12
+ },
13
+ "validation": {
14
+ "required": true,
15
+ "node": {
16
+ "type": "array",
17
+ "elementType": {
18
+ "type": "any"
19
+ },
20
+ "const": [
21
+ {
22
+ "type": "object",
23
+ "properties": {
24
+ "type": {
25
+ "required": true,
26
+ "node": {
27
+ "type": "string",
28
+ "const": "integer"
29
+ }
30
+ }
31
+ },
32
+ "additionalProperties": false
33
+ },
34
+ {
35
+ "type": "object",
36
+ "properties": {
37
+ "type": {
38
+ "required": true,
39
+ "node": {
40
+ "type": "string",
41
+ "const": "min"
42
+ }
43
+ },
44
+ "value": {
45
+ "required": true,
46
+ "node": {
47
+ "type": "number",
48
+ "const": 1
49
+ }
50
+ }
51
+ },
52
+ "additionalProperties": false
53
+ }
54
+ ]
55
+ }
56
+ },
57
+ "format": {
58
+ "required": true,
59
+ "node": {
60
+ "type": "object",
61
+ "properties": {
62
+ "type": {
63
+ "required": true,
64
+ "node": {
65
+ "type": "string",
66
+ "const": "integer"
67
+ }
68
+ }
69
+ },
70
+ "additionalProperties": false
71
+ }
72
+ }
73
+ },
74
+ "additionalProperties": false
75
+ }
@@ -0,0 +1,55 @@
1
+ {
2
+ "source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/2654/execroot/player/plugins/common-types/core/src/data-types/types.ts",
3
+ "name": "IntegerType",
4
+ "type": "object",
5
+ "properties": {
6
+ "type": {
7
+ "required": true,
8
+ "node": {
9
+ "type": "string",
10
+ "const": "IntegerType"
11
+ }
12
+ },
13
+ "validation": {
14
+ "required": true,
15
+ "node": {
16
+ "type": "array",
17
+ "elementType": {
18
+ "type": "any"
19
+ },
20
+ "const": [
21
+ {
22
+ "type": "object",
23
+ "properties": {
24
+ "type": {
25
+ "required": true,
26
+ "node": {
27
+ "type": "string",
28
+ "const": "integer"
29
+ }
30
+ }
31
+ },
32
+ "additionalProperties": false
33
+ }
34
+ ]
35
+ }
36
+ },
37
+ "format": {
38
+ "required": true,
39
+ "node": {
40
+ "type": "object",
41
+ "properties": {
42
+ "type": {
43
+ "required": true,
44
+ "node": {
45
+ "type": "string",
46
+ "const": "integer"
47
+ }
48
+ }
49
+ },
50
+ "additionalProperties": false
51
+ }
52
+ }
53
+ },
54
+ "additionalProperties": false
55
+ }
@@ -0,0 +1,55 @@
1
+ {
2
+ "source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/2654/execroot/player/plugins/common-types/core/src/data-types/types.ts",
3
+ "name": "PhoneType",
4
+ "type": "object",
5
+ "properties": {
6
+ "type": {
7
+ "required": true,
8
+ "node": {
9
+ "type": "string",
10
+ "const": "PhoneType"
11
+ }
12
+ },
13
+ "validation": {
14
+ "required": true,
15
+ "node": {
16
+ "type": "array",
17
+ "elementType": {
18
+ "type": "any"
19
+ },
20
+ "const": [
21
+ {
22
+ "type": "object",
23
+ "properties": {
24
+ "type": {
25
+ "required": true,
26
+ "node": {
27
+ "type": "string",
28
+ "const": "phone"
29
+ }
30
+ }
31
+ },
32
+ "additionalProperties": false
33
+ }
34
+ ]
35
+ }
36
+ },
37
+ "format": {
38
+ "required": true,
39
+ "node": {
40
+ "type": "object",
41
+ "properties": {
42
+ "type": {
43
+ "required": true,
44
+ "node": {
45
+ "type": "string",
46
+ "const": "phone"
47
+ }
48
+ }
49
+ },
50
+ "additionalProperties": false
51
+ }
52
+ }
53
+ },
54
+ "additionalProperties": false
55
+ }
@@ -0,0 +1,62 @@
1
+ {
2
+ "source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/2654/execroot/player/plugins/common-types/core/src/data-types/types.ts",
3
+ "name": "StringType",
4
+ "type": "object",
5
+ "properties": {
6
+ "type": {
7
+ "required": true,
8
+ "node": {
9
+ "type": "string",
10
+ "const": "StringType"
11
+ }
12
+ },
13
+ "default": {
14
+ "required": true,
15
+ "node": {
16
+ "type": "string",
17
+ "const": ""
18
+ }
19
+ },
20
+ "validation": {
21
+ "required": true,
22
+ "node": {
23
+ "type": "array",
24
+ "elementType": {
25
+ "type": "any"
26
+ },
27
+ "const": [
28
+ {
29
+ "type": "object",
30
+ "properties": {
31
+ "type": {
32
+ "required": true,
33
+ "node": {
34
+ "type": "string",
35
+ "const": "string"
36
+ }
37
+ }
38
+ },
39
+ "additionalProperties": false
40
+ }
41
+ ]
42
+ }
43
+ },
44
+ "format": {
45
+ "required": true,
46
+ "node": {
47
+ "type": "object",
48
+ "properties": {
49
+ "type": {
50
+ "required": true,
51
+ "node": {
52
+ "type": "string",
53
+ "const": "string"
54
+ }
55
+ }
56
+ },
57
+ "additionalProperties": false
58
+ }
59
+ }
60
+ },
61
+ "additionalProperties": false
62
+ }
@@ -0,0 +1,18 @@
1
+ const BooleanType = require('./BooleanType.json')
2
+ const IntegerType = require('./IntegerType.json')
3
+ const IntegerPosType = require('./IntegerPosType.json')
4
+ const IntegerNNType = require('./IntegerNNType.json')
5
+ const StringType = require('./StringType.json')
6
+ const CollectionType = require('./CollectionType.json')
7
+ const DateType = require('./DateType.json')
8
+ const PhoneType = require('./PhoneType.json')
9
+
10
+ module.exports = {
11
+ "pluginName": "CommonTypes",
12
+ "capabilities": {
13
+ "Assets":[],
14
+ "Views":[],
15
+ "Expressions":[],
16
+ "DataTypes":[BooleanType,IntegerType,IntegerPosType,IntegerNNType,StringType,CollectionType,DateType,PhoneType],
17
+ }
18
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "pluginName": "CommonTypes",
3
+ "capabilities": {
4
+ "Assets": [],
5
+ "Views": [],
6
+ "Expressions": [],
7
+ "DataTypes": [
8
+ "BooleanType",
9
+ "IntegerType",
10
+ "IntegerPosType",
11
+ "IntegerNNType",
12
+ "StringType",
13
+ "CollectionType",
14
+ "DateType",
15
+ "PhoneType"
16
+ ]
17
+ }
18
+ }
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@player-ui/common-types-plugin",
3
- "version": "0.4.0-next.5",
3
+ "version": "0.4.0-next.7",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org"
7
7
  },
8
8
  "peerDependencies": {
9
- "@player-ui/player": "0.4.0-next.5"
9
+ "@player-ui/player": "0.4.0-next.7"
10
10
  },
11
11
  "dependencies": {
12
- "@player-ui/types-provider-plugin": "0.4.0-next.5",
12
+ "@player-ui/types-provider-plugin": "0.4.0-next.7",
13
13
  "@babel/runtime": "7.15.4"
14
14
  },
15
15
  "main": "dist/index.cjs.js",
package/src/index.ts CHANGED
@@ -1,10 +1,20 @@
1
- import type { Player, PlayerPlugin } from '@player-ui/player';
1
+ import type { Player, ExtendedPlayerPlugin } from '@player-ui/player';
2
2
  import { TypesProviderPlugin } from '@player-ui/types-provider-plugin';
3
3
 
4
4
  import * as validators from './validators';
5
5
  import * as dataTypes from './data-types/types';
6
6
  import * as dataRefs from './data-types/refs';
7
7
  import * as formats from './formats';
8
+ import type {
9
+ BooleanType,
10
+ IntegerType,
11
+ IntegerPosType,
12
+ IntegerNNType,
13
+ StringType,
14
+ CollectionType,
15
+ DateType,
16
+ PhoneType,
17
+ } from './data-types/types';
8
18
 
9
19
  export { validators, dataTypes, dataRefs, formats };
10
20
  export * from './formats/utils';
@@ -12,7 +22,24 @@ export * from './formats/utils';
12
22
  /**
13
23
  * Exposes a lot of common DataTypes, validations, and formats to Player instance.
14
24
  */
15
- export class CommonTypesPlugin implements PlayerPlugin {
25
+ export class CommonTypesPlugin
26
+ implements
27
+ ExtendedPlayerPlugin<
28
+ [],
29
+ [],
30
+ [],
31
+ [
32
+ typeof BooleanType,
33
+ typeof IntegerType,
34
+ typeof IntegerPosType,
35
+ typeof IntegerNNType,
36
+ typeof StringType,
37
+ typeof CollectionType,
38
+ typeof DateType,
39
+ typeof PhoneType
40
+ ]
41
+ >
42
+ {
16
43
  name = 'CommonTypes';
17
44
 
18
45
  apply(player: Player) {