ariadne_view_components 0.0.51-x86_64-linux → 0.0.52-x86_64-linux
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +2 -0
- data/app/assets/javascripts/ariadne_view_components.js +1 -1
- data/app/assets/javascripts/ariadne_view_components.js.map +1 -1
- data/app/assets/javascripts/components/ariadne/options_controller/options_controller.d.ts +2 -3
- data/app/components/ariadne/options_controller/options_controller.d.ts +2 -3
- data/app/components/ariadne/options_controller/options_controller.js +1 -5
- data/app/components/ariadne/options_controller/options_controller.ts +1 -7
- data/app/components/ariadne/string_match_controller/string_match_controller.ts +1 -0
- data/app/lib/ariadne/fetch_or_fallback_helper.rb +2 -2
- data/lib/ariadne/view_components/linters/autocorrectable.rb +1 -1
- data/lib/ariadne/view_components/linters/base_linter.rb +2 -2
- data/lib/ariadne/view_components/version.rb +1 -1
- data/lib/rubocop/cop/ariadne/base_cop.rb +1 -1
- metadata +2 -2
@@ -30,10 +30,9 @@ export default class OptionsController extends SyncedBooleanAttributesController
|
|
30
30
|
activeOptionsValue: TActiveOptions;
|
31
31
|
readonly isMultiValue: boolean;
|
32
32
|
readonly toggleableValue: boolean;
|
33
|
-
optionTargetLookup: Map<Element, TOptionKey>;
|
34
33
|
select(event: Event, updateTo?: TOutletChangeData<TActiveOptions>): void;
|
35
|
-
|
36
|
-
getValueForElement(element: Element): boolean
|
34
|
+
optionTargetConnected(element: Element): void;
|
35
|
+
getValueForElement(element: Element): boolean;
|
37
36
|
getState(): TActiveOptions;
|
38
37
|
outletUpdate: (event: Event, updateTo?: TOutletChangeData<TActiveOptions>) => void;
|
39
38
|
}
|
@@ -30,10 +30,9 @@ export default class OptionsController extends SyncedBooleanAttributesController
|
|
30
30
|
activeOptionsValue: TActiveOptions;
|
31
31
|
readonly isMultiValue: boolean;
|
32
32
|
readonly toggleableValue: boolean;
|
33
|
-
optionTargetLookup: Map<Element, TOptionKey>;
|
34
33
|
select(event: Event, updateTo?: TOutletChangeData<TActiveOptions>): void;
|
35
|
-
|
36
|
-
getValueForElement(element: Element): boolean
|
34
|
+
optionTargetConnected(element: Element): void;
|
35
|
+
getValueForElement(element: Element): boolean;
|
37
36
|
getState(): TActiveOptions;
|
38
37
|
outletUpdate: (event: Event, updateTo?: TOutletChangeData<TActiveOptions>) => void;
|
39
38
|
}
|
@@ -9,7 +9,6 @@ class OptionsController extends SyncedBooleanAttributesController {
|
|
9
9
|
constructor() {
|
10
10
|
super(...arguments);
|
11
11
|
_OptionsController_instances.add(this);
|
12
|
-
this.optionTargetLookup = new Map();
|
13
12
|
this.outletUpdate = this.select;
|
14
13
|
}
|
15
14
|
select(event, updateTo = {}) {
|
@@ -31,7 +30,7 @@ class OptionsController extends SyncedBooleanAttributesController {
|
|
31
30
|
}
|
32
31
|
this.sendToOutlets(event, Object.assign(Object.assign({}, updateTo), { data: this.activeOptionsValue }));
|
33
32
|
}
|
34
|
-
|
33
|
+
optionTargetConnected(element) {
|
35
34
|
const key = __classPrivateFieldGet(this, _OptionsController_instances, "m", _OptionsController_getElementKey).call(this, element);
|
36
35
|
if (this.doesElementHaveOnAttrs(element)) {
|
37
36
|
__classPrivateFieldGet(this, _OptionsController_instances, "m", _OptionsController_activateKey).call(this, key);
|
@@ -42,9 +41,6 @@ class OptionsController extends SyncedBooleanAttributesController {
|
|
42
41
|
}
|
43
42
|
getValueForElement(element) {
|
44
43
|
var _a;
|
45
|
-
if (!this.optionTargetLookup.has(element)) {
|
46
|
-
return null;
|
47
|
-
}
|
48
44
|
const optionKey = __classPrivateFieldGet(this, _OptionsController_instances, "m", _OptionsController_getElementKey).call(this, element);
|
49
45
|
return (_a = this.activeOptionsValue[optionKey]) !== null && _a !== void 0 ? _a : false;
|
50
46
|
}
|
@@ -29,8 +29,6 @@ export default class OptionsController
|
|
29
29
|
declare readonly isMultiValue: boolean
|
30
30
|
declare readonly toggleableValue: boolean
|
31
31
|
|
32
|
-
optionTargetLookup: Map<Element, TOptionKey> = new Map()
|
33
|
-
|
34
32
|
select(event: Event, updateTo: TOutletChangeData<TActiveOptions> = {}) {
|
35
33
|
const activeOptions = updateTo.data
|
36
34
|
for (let index in this.optionTargets) {
|
@@ -53,7 +51,7 @@ export default class OptionsController
|
|
53
51
|
this.sendToOutlets(event, {...updateTo, data: this.activeOptionsValue})
|
54
52
|
}
|
55
53
|
|
56
|
-
|
54
|
+
optionTargetConnected(element: Element) {
|
57
55
|
const key = this.#getElementKey(element)
|
58
56
|
if (this.doesElementHaveOnAttrs(element)) {
|
59
57
|
this.#activateKey(key)
|
@@ -104,10 +102,6 @@ export default class OptionsController
|
|
104
102
|
}
|
105
103
|
|
106
104
|
getValueForElement(element: Element) {
|
107
|
-
if (!this.optionTargetLookup.has(element)) {
|
108
|
-
return null
|
109
|
-
}
|
110
|
-
|
111
105
|
const optionKey = this.#getElementKey(element)
|
112
106
|
return this.activeOptionsValue[optionKey] ?? false
|
113
107
|
}
|
@@ -59,7 +59,7 @@ module Ariadne
|
|
59
59
|
|
60
60
|
unless silence_warnings?
|
61
61
|
message = <<~MSG
|
62
|
-
Ariadne: note that `#{preferred_tag}` is the preferred tag
|
62
|
+
Ariadne: note that `#{preferred_tag}` is the preferred tag for `#{self.class.name}`;
|
63
63
|
you passed `#{given_tag}` (which will still be used)
|
64
64
|
MSG
|
65
65
|
|
@@ -75,7 +75,7 @@ module Ariadne
|
|
75
75
|
|
76
76
|
unless silence_warnings?
|
77
77
|
message = <<~MSG
|
78
|
-
Ariadne: note that `#{preferred_attribute}` is the preferred attribute
|
78
|
+
Ariadne: note that `#{preferred_attribute}` is the preferred attribute for `#{self.class.name}`;
|
79
79
|
you passed `#{given_attribute}` (which will still be used)
|
80
80
|
MSG
|
81
81
|
|
@@ -159,13 +159,13 @@ module ERBLint
|
|
159
159
|
# Unless explicitly set, we don't want to mark correctable offenses if the counter is correct.
|
160
160
|
if !@config.override_ignores_if_correctable? && expected_count == @total_offenses
|
161
161
|
clear_offenses
|
162
|
-
return
|
162
|
+
return false
|
163
163
|
end
|
164
164
|
|
165
165
|
if @offenses_not_corrected.zero?
|
166
166
|
# have to adjust to get `\n` so we delete the whole line
|
167
167
|
add_offense(processed_source.to_source_range(comment_node.loc.adjust(end_pos: 1)), "Unused erblint:count comment for #{rule_name}", "") if comment_node
|
168
|
-
return
|
168
|
+
return false
|
169
169
|
end
|
170
170
|
|
171
171
|
first_offense = @offenses[0]
|
@@ -12,7 +12,7 @@ module RuboCop
|
|
12
12
|
# We only verify SystemArguments if it's a `.new` call on a component or
|
13
13
|
# a ViewHeleper call.
|
14
14
|
def valid_node?(node)
|
15
|
-
return if node.nil?
|
15
|
+
return false if node.nil?
|
16
16
|
|
17
17
|
view_helpers.include?(node.method_name) || (node.method_name == :new && !node.receiver.nil? && ::Ariadne::ViewComponents::STATUSES.key?(node.receiver.const_name))
|
18
18
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ariadne_view_components
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.52
|
5
5
|
platform: x86_64-linux
|
6
6
|
authors:
|
7
7
|
- Garen J. Torikian
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-07-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tailwind_merge
|