tpmkms_4wp 9.2.0-beta.9 → 9.3.0-beta.0

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/common/avatar.js CHANGED
@@ -3,20 +3,12 @@ const { defaultContextCheck } = require('./helpers')
3
3
  const dialogues = require('./dialogues')
4
4
  const hierarchy = require('./hierarchy')
5
5
  const emotions = require('./emotions')
6
+ const selfKM = require('./self')
6
7
  const avatar_tests = require('./avatar.test.json')
7
8
 
8
9
  const config = {
9
10
  name: 'avatar',
10
11
 
11
- // TODO make different response for answerNotKnown based on emotions
12
- operators: [
13
- "([self])",
14
- ],
15
-
16
- bridges: [
17
- { id: 'self', level: 0, bridge: "{ ...next(operator) }" },
18
- ],
19
-
20
12
  hierarchy: [
21
13
  ['self', 'queryable'],
22
14
  ],
@@ -70,7 +62,7 @@ const config = {
70
62
 
71
63
  knowledgeModule( {
72
64
  config,
73
- includes: [hierarchy, emotions],
65
+ includes: [selfKM, hierarchy, emotions],
74
66
 
75
67
  module,
76
68
  description: 'avatar for dialogues',
@@ -3601,20 +3601,6 @@
3601
3601
  0
3602
3602
  ]
3603
3603
  ],
3604
- [
3605
- [
3606
- "is",
3607
- 0
3608
- ],
3609
- [
3610
- "list",
3611
- 1
3612
- ],
3613
- [
3614
- "unknown",
3615
- 0
3616
- ]
3617
- ],
3618
3604
  [
3619
3605
  [
3620
3606
  "is",
@@ -36119,20 +36105,6 @@
36119
36105
  0
36120
36106
  ]
36121
36107
  ],
36122
- [
36123
- [
36124
- "is",
36125
- 0
36126
- ],
36127
- [
36128
- "list",
36129
- 1
36130
- ],
36131
- [
36132
- "unknown",
36133
- 0
36134
- ]
36135
- ],
36136
36108
  [
36137
36109
  [
36138
36110
  "is",
@@ -13,9 +13,33 @@
13
13
  "([era_dates|])",
14
14
  "([date_dates|])",
15
15
  "([dateEra_dates] (date_dates/*) (era_dates/*))",
16
+ "([monthYear_dates] (month_dates/*) (yearNumber_dates/*))",
16
17
  "([monthDayYear_dates] (month_dates/*) (dayNumber_dates/*) (yearNumber_dates/*))",
17
18
  "([monthDayYearWithSlashes_dates] (monthNumber_dates/*) (dateSeparator_dates/*) (dayNumber_dates/*) (dateSeparator_dates/*) (yearNumber_dates/*))"
18
19
  ],
20
+ "associations": {
21
+ "positive": [
22
+ {
23
+ "context": [
24
+ [
25
+ "every",
26
+ 0
27
+ ],
28
+ [
29
+ "monday_dates",
30
+ 0
31
+ ]
32
+ ],
33
+ "choose": 1
34
+ }
35
+ ]
36
+ },
37
+ "hierarchy": [
38
+ [
39
+ "monday_dates",
40
+ "distributable"
41
+ ]
42
+ ],
19
43
  "bridges": [
20
44
  {
21
45
  "id": "era_dates",
@@ -27,7 +51,8 @@
27
51
  {
28
52
  "id": "date_dates",
29
53
  "words": [
30
- "date"
54
+ "date",
55
+ "distributable"
31
56
  ],
32
57
  "bridge": "{ ...next(operator) }"
33
58
  },
@@ -59,9 +84,6 @@
59
84
  "isA": [
60
85
  "integer"
61
86
  ],
62
- "associations": [
63
- "dates"
64
- ],
65
87
  "bridge": "{ ...next(operator) }"
66
88
  },
67
89
  {
@@ -78,6 +100,14 @@
78
100
  ],
79
101
  "bridge": "{ ...next(operator) }"
80
102
  },
103
+ {
104
+ "id": "monthYear_dates",
105
+ "convolution": true,
106
+ "isA": [
107
+ "date_dates"
108
+ ],
109
+ "bridge": "{ ...next(operator), month: after[0], year: after[1], interpolate: '${month} ${year}' }"
110
+ },
81
111
  {
82
112
  "id": "monthDayYear_dates",
83
113
  "convolution": true,
@@ -3195,20 +3225,6 @@
3195
3225
  0
3196
3226
  ]
3197
3227
  ],
3198
- [
3199
- [
3200
- "is",
3201
- 0
3202
- ],
3203
- [
3204
- "list",
3205
- 1
3206
- ],
3207
- [
3208
- "unknown",
3209
- 0
3210
- ]
3211
- ],
3212
3228
  [
3213
3229
  [
3214
3230
  "is",
@@ -11561,20 +11577,6 @@
11561
11577
  0
11562
11578
  ]
11563
11579
  ],
11564
- [
11565
- [
11566
- "is",
11567
- 0
11568
- ],
11569
- [
11570
- "list",
11571
- 1
11572
- ],
11573
- [
11574
- "unknown",
11575
- 0
11576
- ]
11577
- ],
11578
11580
  [
11579
11581
  [
11580
11582
  "is",
@@ -15669,20 +15671,6 @@
15669
15671
  0
15670
15672
  ]
15671
15673
  ],
15672
- [
15673
- [
15674
- "is",
15675
- 0
15676
- ],
15677
- [
15678
- "list",
15679
- 1
15680
- ],
15681
- [
15682
- "unknown",
15683
- 0
15684
- ]
15685
- ],
15686
15674
  [
15687
15675
  [
15688
15676
  "is",
@@ -16597,9 +16585,33 @@
16597
16585
  "([era_dates|])",
16598
16586
  "([date_dates|])",
16599
16587
  "([dateEra_dates] (date_dates/*) (era_dates/*))",
16588
+ "([monthYear_dates] (month_dates/*) (yearNumber_dates/*))",
16600
16589
  "([monthDayYear_dates] (month_dates/*) (dayNumber_dates/*) (yearNumber_dates/*))",
16601
16590
  "([monthDayYearWithSlashes_dates] (monthNumber_dates/*) (dateSeparator_dates/*) (dayNumber_dates/*) (dateSeparator_dates/*) (yearNumber_dates/*))"
16602
16591
  ],
16592
+ "associations": {
16593
+ "positive": [
16594
+ {
16595
+ "context": [
16596
+ [
16597
+ "every",
16598
+ 0
16599
+ ],
16600
+ [
16601
+ "monday_dates",
16602
+ 0
16603
+ ]
16604
+ ],
16605
+ "choose": 1
16606
+ }
16607
+ ]
16608
+ },
16609
+ "hierarchy": [
16610
+ [
16611
+ "monday_dates",
16612
+ "distributable"
16613
+ ]
16614
+ ],
16603
16615
  "bridges": [
16604
16616
  {
16605
16617
  "id": "era_dates",
@@ -16611,7 +16623,8 @@
16611
16623
  {
16612
16624
  "id": "date_dates",
16613
16625
  "words": [
16614
- "date"
16626
+ "date",
16627
+ "distributable"
16615
16628
  ],
16616
16629
  "bridge": "{ ...next(operator) }"
16617
16630
  },
@@ -16643,9 +16656,6 @@
16643
16656
  "isA": [
16644
16657
  "integer"
16645
16658
  ],
16646
- "associations": [
16647
- "dates"
16648
- ],
16649
16659
  "bridge": "{ ...next(operator) }"
16650
16660
  },
16651
16661
  {
@@ -16662,6 +16672,14 @@
16662
16672
  ],
16663
16673
  "bridge": "{ ...next(operator) }"
16664
16674
  },
16675
+ {
16676
+ "id": "monthYear_dates",
16677
+ "convolution": true,
16678
+ "isA": [
16679
+ "date_dates"
16680
+ ],
16681
+ "bridge": "{ ...next(operator), month: after[0], year: after[1], interpolate: '${month} ${year}' }"
16682
+ },
16665
16683
  {
16666
16684
  "id": "monthDayYear_dates",
16667
16685
  "convolution": true,
@@ -17861,6 +17879,11 @@
17861
17879
  "day_dates",
17862
17880
  false
17863
17881
  ],
17882
+ [
17883
+ "monday_dates",
17884
+ "distributable",
17885
+ false
17886
+ ],
17864
17887
  [
17865
17888
  "monday_dates",
17866
17889
  "hierarchyAble",
@@ -17911,6 +17934,11 @@
17911
17934
  "integer",
17912
17935
  false
17913
17936
  ],
17937
+ [
17938
+ "monthYear_dates",
17939
+ "date_dates",
17940
+ false
17941
+ ],
17914
17942
  [
17915
17943
  "month_dates",
17916
17944
  "hierarchyAble",
@@ -18823,48 +18851,6 @@
18823
18851
  0
18824
18852
  ]
18825
18853
  ],
18826
- [
18827
- [
18828
- "is",
18829
- 0
18830
- ],
18831
- [
18832
- "list",
18833
- 1
18834
- ],
18835
- [
18836
- "unknown",
18837
- 0
18838
- ]
18839
- ],
18840
- [
18841
- [
18842
- "is",
18843
- 0
18844
- ],
18845
- [
18846
- "list",
18847
- 1
18848
- ],
18849
- [
18850
- "unknown",
18851
- 0
18852
- ]
18853
- ],
18854
- [
18855
- [
18856
- "is",
18857
- 0
18858
- ],
18859
- [
18860
- "list",
18861
- 1
18862
- ],
18863
- [
18864
- "unknown",
18865
- 0
18866
- ]
18867
- ],
18868
18854
  [
18869
18855
  [
18870
18856
  "setIdSuffix",
package/common/dates.js CHANGED
@@ -37,9 +37,18 @@ const template = {
37
37
  "([era_dates|])",
38
38
  "([date_dates|])",
39
39
  "([dateEra_dates] (date_dates/*) (era_dates/*))",
40
+ "([monthYear_dates] (month_dates/*) (yearNumber_dates/*))",
40
41
  "([monthDayYear_dates] (month_dates/*) (dayNumber_dates/*) (yearNumber_dates/*))",
41
42
  "([monthDayYearWithSlashes_dates] (monthNumber_dates/*) (dateSeparator_dates/*) (dayNumber_dates/*) (dateSeparator_dates/*) (yearNumber_dates/*))",
42
43
  ],
44
+ associations: {
45
+ positive: [
46
+ { context: [['every', 0], ['monday_dates', 0]], choose: 1 },
47
+ ]
48
+ },
49
+ hierarchy: [
50
+ ['monday_dates', 'distributable'],
51
+ ],
43
52
  bridges: [
44
53
  {
45
54
  id: 'era_dates',
@@ -48,7 +57,7 @@ const template = {
48
57
  },
49
58
  {
50
59
  id: 'date_dates',
51
- words: ['date'],
60
+ words: ['date', 'distributable'],
52
61
  bridge: "{ ...next(operator) }"
53
62
  },
54
63
  {
@@ -71,7 +80,7 @@ const template = {
71
80
  {
72
81
  id: 'dayNumber_dates',
73
82
  isA: ['integer'],
74
- associations: ['dates'],
83
+ //associations: ['dates'],
75
84
  bridge: "{ ...next(operator) }"
76
85
  },
77
86
  {
@@ -84,6 +93,12 @@ const template = {
84
93
  isA: ['integer'],
85
94
  bridge: "{ ...next(operator) }"
86
95
  },
96
+ {
97
+ id: 'monthYear_dates',
98
+ convolution: true,
99
+ isA: ['date_dates'],
100
+ bridge: "{ ...next(operator), month: after[0], year: after[1], interpolate: '${month} ${year}' }"
101
+ },
87
102
  {
88
103
  id: 'monthDayYear_dates',
89
104
  convolution: true,