@quenty/chatproviderservice 9.25.2 → 9.25.3
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/CHANGELOG.md +8 -0
- package/package.json +25 -25
- package/src/Server/Binders/HasChatTags.lua +11 -2
- package/src/Shared/Binders/ChatTagBase.lua +28 -10
- package/src/Shared/Binders/HasChatTagsBase.lua +40 -21
- package/src/Shared/ChatTagConstants.lua +1 -0
- package/src/Shared/Commands/ChatTagCmdrUtils.lua +1 -0
- package/src/Shared/Data/ChatTagDataUtils.lua +1 -0
- package/src/Shared/HasChatTagsConstants.lua +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [9.25.3](https://github.com/Quenty/NevermoreEngine/compare/@quenty/chatproviderservice@9.25.2...@quenty/chatproviderservice@9.25.3) (2025-04-10)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @quenty/chatproviderservice
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [9.25.2](https://github.com/Quenty/NevermoreEngine/compare/@quenty/chatproviderservice@9.25.0...@quenty/chatproviderservice@9.25.2) (2025-04-07)
|
|
7
15
|
|
|
8
16
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/chatproviderservice",
|
|
3
|
-
"version": "9.25.
|
|
3
|
+
"version": "9.25.3",
|
|
4
4
|
"description": "Provide wrapper around chat system to allow tags to be set",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -25,35 +25,35 @@
|
|
|
25
25
|
"Quenty"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@quenty/attributeutils": "^14.17.
|
|
29
|
-
"@quenty/baseobject": "^10.8.
|
|
30
|
-
"@quenty/binder": "^14.19.
|
|
31
|
-
"@quenty/brio": "^14.17.
|
|
32
|
-
"@quenty/clienttranslator": "^14.19.
|
|
33
|
-
"@quenty/cmdrservice": "^13.22.
|
|
34
|
-
"@quenty/color3utils": "^11.18.
|
|
35
|
-
"@quenty/datastore": "^13.20.
|
|
36
|
-
"@quenty/instanceutils": "^13.17.
|
|
37
|
-
"@quenty/loader": "^10.8.
|
|
38
|
-
"@quenty/localizedtextutils": "^12.17.
|
|
39
|
-
"@quenty/maid": "^3.4.
|
|
40
|
-
"@quenty/permissionprovider": "^14.19.
|
|
41
|
-
"@quenty/playerbinder": "^14.19.
|
|
42
|
-
"@quenty/playerutils": "^8.17.
|
|
28
|
+
"@quenty/attributeutils": "^14.17.3",
|
|
29
|
+
"@quenty/baseobject": "^10.8.3",
|
|
30
|
+
"@quenty/binder": "^14.19.3",
|
|
31
|
+
"@quenty/brio": "^14.17.3",
|
|
32
|
+
"@quenty/clienttranslator": "^14.19.3",
|
|
33
|
+
"@quenty/cmdrservice": "^13.22.3",
|
|
34
|
+
"@quenty/color3utils": "^11.18.3",
|
|
35
|
+
"@quenty/datastore": "^13.20.3",
|
|
36
|
+
"@quenty/instanceutils": "^13.17.3",
|
|
37
|
+
"@quenty/loader": "^10.8.3",
|
|
38
|
+
"@quenty/localizedtextutils": "^12.17.3",
|
|
39
|
+
"@quenty/maid": "^3.4.3",
|
|
40
|
+
"@quenty/permissionprovider": "^14.19.3",
|
|
41
|
+
"@quenty/playerbinder": "^14.19.3",
|
|
42
|
+
"@quenty/playerutils": "^8.17.3",
|
|
43
43
|
"@quenty/preferredparentutils": "^4.3.2",
|
|
44
|
-
"@quenty/promise": "^10.10.
|
|
45
|
-
"@quenty/remoting": "^12.18.
|
|
44
|
+
"@quenty/promise": "^10.10.4",
|
|
45
|
+
"@quenty/remoting": "^12.18.3",
|
|
46
46
|
"@quenty/richtext": "^1.3.2",
|
|
47
|
-
"@quenty/rx": "^13.17.
|
|
48
|
-
"@quenty/rxbinderutils": "^14.19.
|
|
49
|
-
"@quenty/servicebag": "^11.11.
|
|
50
|
-
"@quenty/signal": "^7.10.
|
|
47
|
+
"@quenty/rx": "^13.17.3",
|
|
48
|
+
"@quenty/rxbinderutils": "^14.19.3",
|
|
49
|
+
"@quenty/servicebag": "^11.11.4",
|
|
50
|
+
"@quenty/signal": "^7.10.3",
|
|
51
51
|
"@quenty/string": "^3.3.3",
|
|
52
|
-
"@quenty/table": "^3.7.
|
|
53
|
-
"@quenty/valueobject": "^13.17.
|
|
52
|
+
"@quenty/table": "^3.7.4",
|
|
53
|
+
"@quenty/valueobject": "^13.17.3"
|
|
54
54
|
},
|
|
55
55
|
"publishConfig": {
|
|
56
56
|
"access": "public"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "b06c070ae91d5dab7bd8de6e290ad2caabb15d8f"
|
|
59
59
|
}
|
|
@@ -12,13 +12,22 @@ local LocalizedTextUtils = require("LocalizedTextUtils")
|
|
|
12
12
|
local PlayerBinder = require("PlayerBinder")
|
|
13
13
|
local String = require("String")
|
|
14
14
|
local BinderUtils = require("BinderUtils")
|
|
15
|
+
local _ServiceBag = require("ServiceBag")
|
|
15
16
|
|
|
16
17
|
local HasChatTags = setmetatable({}, HasChatTagsBase)
|
|
17
18
|
HasChatTags.ClassName = "HasChatTags"
|
|
18
19
|
HasChatTags.__index = HasChatTags
|
|
19
20
|
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
export type HasChatTags = typeof(setmetatable(
|
|
22
|
+
{} :: {
|
|
23
|
+
_chatTagsContainer: Folder,
|
|
24
|
+
_chatTagBinder: any,
|
|
25
|
+
},
|
|
26
|
+
{} :: typeof({ __index = HasChatTags })
|
|
27
|
+
)) & HasChatTagsBase.HasChatTagsBase
|
|
28
|
+
|
|
29
|
+
function HasChatTags.new(player: Player, serviceBag: _ServiceBag.ServiceBag): HasChatTags
|
|
30
|
+
local self: HasChatTags = setmetatable(HasChatTagsBase.new(player) :: any, HasChatTags)
|
|
22
31
|
|
|
23
32
|
self._serviceBag = assert(serviceBag, "No serviceBag")
|
|
24
33
|
self._chatProviderService = self._serviceBag:GetService((require :: any)("ChatProviderService"))
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
--!strict
|
|
1
2
|
--[=[
|
|
2
3
|
@class ChatTagBase
|
|
3
4
|
]=]
|
|
@@ -9,13 +10,30 @@ local BaseObject = require("BaseObject")
|
|
|
9
10
|
local ChatTagConstants = require("ChatTagConstants")
|
|
10
11
|
local LocalizedTextUtils = require("LocalizedTextUtils")
|
|
11
12
|
local Rx = require("Rx")
|
|
13
|
+
local _ChatTagDataUtils = require("ChatTagDataUtils")
|
|
14
|
+
local _Observable = require("Observable")
|
|
12
15
|
|
|
13
16
|
local ChatTagBase = setmetatable({}, BaseObject)
|
|
14
17
|
ChatTagBase.ClassName = "ChatTagBase"
|
|
15
18
|
ChatTagBase.__index = ChatTagBase
|
|
16
19
|
|
|
17
|
-
|
|
18
|
-
|
|
20
|
+
export type ChatTagBase = typeof(setmetatable(
|
|
21
|
+
{} :: {
|
|
22
|
+
_obj: Folder,
|
|
23
|
+
_chatTagText: AttributeValue.AttributeValue<string>,
|
|
24
|
+
_chatTagLocalizedTextData: AttributeValue.AttributeValue<LocalizedTextUtils.LocalizedTextData?>,
|
|
25
|
+
_chatTagColor: AttributeValue.AttributeValue<Color3>,
|
|
26
|
+
_chatTagPriority: AttributeValue.AttributeValue<number>,
|
|
27
|
+
|
|
28
|
+
-- Public
|
|
29
|
+
UserDisabled: AttributeValue.AttributeValue<boolean>,
|
|
30
|
+
ChatTagKey: AttributeValue.AttributeValue<boolean>,
|
|
31
|
+
},
|
|
32
|
+
{} :: typeof({ __index = ChatTagBase })
|
|
33
|
+
)) & BaseObject.BaseObject
|
|
34
|
+
|
|
35
|
+
function ChatTagBase.new(obj: Folder): ChatTagBase
|
|
36
|
+
local self: ChatTagBase = setmetatable(BaseObject.new(obj) :: any, ChatTagBase)
|
|
19
37
|
|
|
20
38
|
self._chatTagText = AttributeValue.new(self._obj, ChatTagConstants.TAG_TEXT_ATTRIBUTE, "")
|
|
21
39
|
self._chatTagLocalizedTextData = AttributeValue.new(self._obj, ChatTagConstants.TAG_LOCALIZED_TEXT_ATTRIBUTE, nil)
|
|
@@ -28,10 +46,10 @@ function ChatTagBase.new(obj: Folder)
|
|
|
28
46
|
return self
|
|
29
47
|
end
|
|
30
48
|
|
|
31
|
-
function ChatTagBase
|
|
49
|
+
function ChatTagBase.ObserveChatTagData(self: ChatTagBase): _Observable.Observable<_ChatTagDataUtils.ChatTagData>
|
|
32
50
|
return Rx.combineLatest({
|
|
33
|
-
UserDisabled = self.UserDisabled:Observe()
|
|
34
|
-
TagText = self._chatTagText:Observe()
|
|
51
|
+
UserDisabled = self.UserDisabled:Observe(),
|
|
52
|
+
TagText = self._chatTagText:Observe(),
|
|
35
53
|
TagLocalizedText = self._chatTagLocalizedTextData:Observe():Pipe({
|
|
36
54
|
Rx.map(function(text)
|
|
37
55
|
if type(text) == "string" then
|
|
@@ -39,11 +57,11 @@ function ChatTagBase:ObserveChatTagData()
|
|
|
39
57
|
else
|
|
40
58
|
return nil
|
|
41
59
|
end
|
|
42
|
-
end)
|
|
43
|
-
})
|
|
44
|
-
TagColor = self._chatTagColor:Observe()
|
|
45
|
-
TagPriority = self._chatTagPriority:Observe()
|
|
46
|
-
})
|
|
60
|
+
end) :: any,
|
|
61
|
+
}),
|
|
62
|
+
TagColor = self._chatTagColor:Observe(),
|
|
63
|
+
TagPriority = self._chatTagPriority:Observe(),
|
|
64
|
+
}) :: any
|
|
47
65
|
end
|
|
48
66
|
|
|
49
67
|
return ChatTagBase
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
--!strict
|
|
1
2
|
--[=[
|
|
2
3
|
@class HasChatTagsBase
|
|
3
4
|
]=]
|
|
@@ -10,13 +11,24 @@ local RxBrioUtils = require("RxBrioUtils")
|
|
|
10
11
|
local RxInstanceUtils = require("RxInstanceUtils")
|
|
11
12
|
local ValueObject = require("ValueObject")
|
|
12
13
|
local HasChatTagsConstants = require("HasChatTagsConstants")
|
|
14
|
+
local _ChatTagDataUtils = require("ChatTagDataUtils")
|
|
15
|
+
local _Observable = require("Observable")
|
|
16
|
+
local _Brio = require("Brio")
|
|
13
17
|
|
|
14
18
|
local HasChatTagsBase = setmetatable({}, BaseObject)
|
|
15
19
|
HasChatTagsBase.ClassName = "HasChatTagsBase"
|
|
16
20
|
HasChatTagsBase.__index = HasChatTagsBase
|
|
17
21
|
|
|
18
|
-
|
|
19
|
-
|
|
22
|
+
export type HasChatTagsBase = typeof(setmetatable(
|
|
23
|
+
{} :: {
|
|
24
|
+
_obj: Player,
|
|
25
|
+
_lastChatTags: ValueObject.ValueObject<{ _ChatTagDataUtils.ChatTagData }?>,
|
|
26
|
+
},
|
|
27
|
+
{} :: typeof({ __index = HasChatTagsBase })
|
|
28
|
+
)) & BaseObject.BaseObject
|
|
29
|
+
|
|
30
|
+
function HasChatTagsBase.new(player: Player): HasChatTagsBase
|
|
31
|
+
local self: HasChatTagsBase = setmetatable(BaseObject.new(player) :: any, HasChatTagsBase)
|
|
20
32
|
|
|
21
33
|
self._lastChatTags = self._maid:Add(ValueObject.new(nil))
|
|
22
34
|
|
|
@@ -48,36 +60,43 @@ function HasChatTagsBase.new(player: Player)
|
|
|
48
60
|
return self
|
|
49
61
|
end
|
|
50
62
|
|
|
51
|
-
function HasChatTagsBase
|
|
63
|
+
function HasChatTagsBase.GetLastChatTags(self: HasChatTagsBase): { _ChatTagDataUtils.ChatTagData }?
|
|
52
64
|
return self._lastChatTags.Value
|
|
53
65
|
end
|
|
54
66
|
|
|
55
|
-
function HasChatTagsBase
|
|
67
|
+
function HasChatTagsBase.ObserveLastChatTags(
|
|
68
|
+
self: HasChatTagsBase
|
|
69
|
+
): _Observable.Observable<{ _ChatTagDataUtils.ChatTagData }?>
|
|
56
70
|
return self._lastChatTags:Observe()
|
|
57
71
|
end
|
|
58
72
|
|
|
59
|
-
function HasChatTagsBase
|
|
73
|
+
function HasChatTagsBase.GetChatTagBinder(_self: HasChatTagsBase)
|
|
60
74
|
error("Not implemented")
|
|
61
75
|
end
|
|
62
76
|
|
|
63
|
-
function HasChatTagsBase
|
|
77
|
+
function HasChatTagsBase._observeTagDataListBrio(self: HasChatTagsBase): _Observable.Observable<_Brio.Brio<{ _ChatTagDataUtils.ChatTagData }>>
|
|
64
78
|
local chatTagBinder = self:GetChatTagBinder()
|
|
65
79
|
|
|
66
|
-
return RxInstanceUtils.observeLastNamedChildBrio(
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
RxBrioUtils.
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
80
|
+
return RxInstanceUtils.observeLastNamedChildBrio(
|
|
81
|
+
self._obj,
|
|
82
|
+
"Folder",
|
|
83
|
+
HasChatTagsConstants.TAG_CONTAINER_NAME
|
|
84
|
+
)
|
|
85
|
+
:Pipe({
|
|
86
|
+
RxBrioUtils.switchMapBrio(function(child)
|
|
87
|
+
return RxBinderUtils.observeChildrenBrio(chatTagBinder, child)
|
|
88
|
+
end),
|
|
89
|
+
RxBrioUtils.flatMapBrio(function(chatTag)
|
|
90
|
+
return chatTag:ObserveChatTagData():Pipe({
|
|
91
|
+
RxBrioUtils.toBrio(),
|
|
92
|
+
RxBrioUtils.onlyLastBrioSurvives(),
|
|
93
|
+
})
|
|
94
|
+
end),
|
|
95
|
+
RxBrioUtils.where(function(chatTagData)
|
|
96
|
+
return not chatTagData.UserDisabled
|
|
97
|
+
end),
|
|
98
|
+
RxBrioUtils.reduceToAliveList(),
|
|
99
|
+
}) :: any
|
|
81
100
|
end
|
|
82
101
|
|
|
83
102
|
return HasChatTagsBase
|