anchor_view_components 0.1.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c15f2899d93f4759d405a23597df14d1a6835a29d9ffa74064d91d9e01ef484c
|
4
|
+
data.tar.gz: 6c4e9dacecc0017a83e2d990d4986edbd71e64c1ff910bca251bba8f4efce11a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 33d141efd9f61897daa5a13726e5daee08e104da433a05ae2f7d5871f5a8e9638930a862d49f5800badca7cc46e0bcf272f22e2b3d0170e03c67ddf164cc0582
|
7
|
+
data.tar.gz: bba7a3f69df667e9e6e0259ff48f6695e11b0fca4483d47e6b9fb0f7ce0e1d6b5bed69b470691cc847334e44d941a263cc375aefa549b44eed4e01b1d7d7c613
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,18 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.3.0 - 2023-07-31
|
4
|
+
|
5
|
+
### Added
|
6
|
+
|
7
|
+
- TypeScript configuration and fixes
|
8
|
+
|
9
|
+
## 0.2.0 - 2023-07-31
|
10
|
+
|
11
|
+
### Added
|
12
|
+
|
13
|
+
- Specified npm `main` field
|
14
|
+
- Specified npm `files` field
|
15
|
+
|
3
16
|
## 0.1.0 - 2023-07-27
|
4
17
|
|
5
18
|
- Initial release
|
@@ -4,8 +4,9 @@ import ActionMenuController from "./action_menu_controller";
|
|
4
4
|
import AutocompleteController from "./autocomplete_controller";
|
5
5
|
import DialogController from "./dialog_controller";
|
6
6
|
import ToastController from "./toast_controller";
|
7
|
+
import { Application } from "@hotwired/stimulus";
|
7
8
|
|
8
|
-
export function registerAnchorControllers(application) {
|
9
|
+
export function registerAnchorControllers(application: Application) {
|
9
10
|
application.register("action-menu", ActionMenuController);
|
10
11
|
application.register("autocomplete", AutocompleteController);
|
11
12
|
application.register("dialog", DialogController);
|
@@ -2,6 +2,10 @@ import type { ControllerConstructor } from "@hotwired/stimulus"
|
|
2
2
|
import BaseAutocompleteController from "stimulus-autocomplete"
|
3
3
|
|
4
4
|
class AutocompleteController extends BaseAutocompleteController {
|
5
|
+
declare readonly element: HTMLDivElement;
|
6
|
+
declare readonly inputTarget: HTMLInputElement;
|
7
|
+
declare readonly resultsTarget: HTMLUListElement;
|
8
|
+
|
5
9
|
connect(): void {
|
6
10
|
super.connect()
|
7
11
|
this.element.addEventListener("loadstart", this.onLoadStart)
|
@@ -25,12 +29,12 @@ class AutocompleteController extends BaseAutocompleteController {
|
|
25
29
|
}
|
26
30
|
|
27
31
|
onLoadStart = (): void => {
|
28
|
-
this.element.dataset.loading = true
|
32
|
+
this.element.dataset.loading = "true"
|
29
33
|
}
|
30
34
|
|
31
35
|
onLoadEnd = (): void => {
|
32
|
-
this.element.dataset.loading = false
|
33
|
-
this.element.dataset.empty = this.resultsTarget.childElementCount === 0
|
36
|
+
this.element.dataset.loading = "false"
|
37
|
+
this.element.dataset.empty = String(this.resultsTarget.childElementCount === 0)
|
34
38
|
}
|
35
39
|
}
|
36
40
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: anchor_view_components
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Buoy Software
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-07-
|
11
|
+
date: 2023-07-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: inline_svg
|