css-zero 0.0.69 → 0.0.71
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.
- checksums.yaml +4 -4
- data/lib/css_zero/version.rb +1 -1
- data/lib/generators/css_zero/add/templates/app/javascript/controllers/autosave_controller.js +7 -12
- data/lib/generators/css_zero/add/templates/app/javascript/controllers/chart_controller.js +5 -7
- data/lib/generators/css_zero/add/templates/app/javascript/controllers/combobox_controller.js +2 -2
- data/lib/generators/css_zero/add/templates/app/javascript/controllers/copyable_input_controller.js +1 -11
- data/lib/generators/css_zero/add/templates/app/javascript/controllers/datepicker_controller.js +1 -1
- data/lib/generators/css_zero/add/templates/app/javascript/controllers/filter_controller.js +1 -11
- data/lib/generators/css_zero/add/templates/app/javascript/controllers/inputmask_controller.js +1 -1
- data/lib/generators/css_zero/add/templates/app/javascript/controllers/sortable_controller.js +2 -2
- data/lib/generators/css_zero/add/templates/app/javascript/controllers/tooltip_controller.js +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 828fb9236fba587ec77b60a34d11f536522368768281cb344a42fc4e94aa8f2c
|
4
|
+
data.tar.gz: d13c27d1d3f9859d84a0034f47eb7e64816ea0ecf17a3475f8f466d24a4539f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 95cc5a9307ff2823fd5afff994347f62e940e1f0fd2620de0a5a0f7841fc282096bd9e2a0f9bbd26bda070fe613497ed1313eee211cc0cb1e683e38ea7ddac6d
|
7
|
+
data.tar.gz: 7f46d8e507f2f2d842b30e2f9ae7930fbe29a6b654e34977ddf6dc3ea906f7601bddee2566d3ca38cf09087011117184ea99468a6d1415858da89ba1854f39bf
|
data/lib/css_zero/version.rb
CHANGED
data/lib/generators/css_zero/add/templates/app/javascript/controllers/autosave_controller.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Controller } from "@hotwired/stimulus"
|
2
|
-
import { FetchRequest } from "https://cdn.skypack.dev/@rails/request.js@0.0.11"
|
2
|
+
import { FetchRequest } from "https://cdn.skypack.dev/@rails/request.js@0.0.11?min"
|
3
3
|
|
4
4
|
const AUTOSAVE_INTERVAL = 3000
|
5
5
|
|
@@ -24,10 +24,15 @@ export default class extends Controller {
|
|
24
24
|
async #save() {
|
25
25
|
this.#updateAppearance(true)
|
26
26
|
this.#resetTimer()
|
27
|
-
await submitForm(this.element)
|
27
|
+
await this.#submitForm(this.element)
|
28
28
|
this.#updateAppearance()
|
29
29
|
}
|
30
30
|
|
31
|
+
async #submitForm(form) {
|
32
|
+
const request = new FetchRequest(form.method, form.action, { body: new FormData(form) })
|
33
|
+
return await request.perform()
|
34
|
+
}
|
35
|
+
|
31
36
|
#updateAppearance(saving = false) {
|
32
37
|
if (saving) {
|
33
38
|
this.element.setAttribute("aria-busy", true)
|
@@ -52,13 +57,3 @@ export default class extends Controller {
|
|
52
57
|
return !!this.#timer
|
53
58
|
}
|
54
59
|
}
|
55
|
-
|
56
|
-
// Helpers
|
57
|
-
|
58
|
-
async function submitForm(form) {
|
59
|
-
const request = new FetchRequest(form.method, form.action, {
|
60
|
-
body: new FormData(form)
|
61
|
-
})
|
62
|
-
|
63
|
-
return await request.perform()
|
64
|
-
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Controller } from "@hotwired/stimulus"
|
2
|
-
import { Chart, registerables } from "https://cdn.skypack.dev/chart.js@4.4.6"
|
2
|
+
import { Chart, registerables } from "https://cdn.skypack.dev/chart.js@4.4.6?min"
|
3
3
|
|
4
4
|
Chart.register(...registerables)
|
5
5
|
|
@@ -10,6 +10,10 @@ Chart.defaults.color = getCssVariableValue("--color-text")
|
|
10
10
|
Chart.defaults.font.family = getCssVariableValue("--font-system-ui")
|
11
11
|
Chart.defaults.font.size = 12
|
12
12
|
|
13
|
+
function getCssVariableValue(variableName) {
|
14
|
+
return getComputedStyle(document.documentElement).getPropertyValue(variableName).trim()
|
15
|
+
}
|
16
|
+
|
13
17
|
export default class extends Controller {
|
14
18
|
static values = { type: { type: String, default: "line" }, data: Object, options: Object }
|
15
19
|
|
@@ -25,9 +29,3 @@ export default class extends Controller {
|
|
25
29
|
return { type: this.typeValue, data: this.dataValue, options: this.optionsValue }
|
26
30
|
}
|
27
31
|
}
|
28
|
-
|
29
|
-
// Helpers
|
30
|
-
|
31
|
-
function getCssVariableValue(variableName) {
|
32
|
-
return getComputedStyle(document.documentElement).getPropertyValue(variableName).trim()
|
33
|
-
}
|
data/lib/generators/css_zero/add/templates/app/javascript/controllers/combobox_controller.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { Controller } from "@hotwired/stimulus"
|
2
|
-
import { get } from "https://cdn.skypack.dev/@rails/request.js@0.0.11"
|
3
|
-
import TomSelect from "https://cdn.skypack.dev/tom-select@2.3.1"
|
2
|
+
import { get } from "https://cdn.skypack.dev/@rails/request.js@0.0.11?min"
|
3
|
+
import TomSelect from "https://cdn.skypack.dev/tom-select@2.3.1?min"
|
4
4
|
|
5
5
|
export default class extends Controller {
|
6
6
|
static values = { url: String, optionCreate: { type: String, default: "Add" }, noResults: { type: String, default: "No results found" } }
|
data/lib/generators/css_zero/add/templates/app/javascript/controllers/copyable_input_controller.js
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import { Controller } from "@hotwired/stimulus"
|
2
|
+
import { debounce } from "https://cdn.skypack.dev/lodash-es@4.17.21?min"
|
2
3
|
|
3
4
|
export default class extends Controller {
|
4
5
|
static targets = [ "input", "copyIcon", "successIcon" ]
|
@@ -35,14 +36,3 @@ export default class extends Controller {
|
|
35
36
|
this.successIconTarget.hidden = !this.copiedValue
|
36
37
|
}
|
37
38
|
}
|
38
|
-
|
39
|
-
// Helpers
|
40
|
-
|
41
|
-
function debounce(fn, delay = 1000) {
|
42
|
-
let timeoutId = null
|
43
|
-
|
44
|
-
return (...args) => {
|
45
|
-
clearTimeout(timeoutId)
|
46
|
-
timeoutId = setTimeout(() => fn.apply(this, args), delay)
|
47
|
-
}
|
48
|
-
}
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { Controller } from "@hotwired/stimulus"
|
2
|
+
import { debounce } from "https://cdn.skypack.dev/lodash-es@4.17.21?min"
|
2
3
|
|
3
4
|
export default class extends Controller {
|
4
5
|
static targets = [ "list" ]
|
@@ -41,14 +42,3 @@ export default class extends Controller {
|
|
41
42
|
this.dispatch("after")
|
42
43
|
}
|
43
44
|
}
|
44
|
-
|
45
|
-
// Helpers
|
46
|
-
|
47
|
-
function debounce(fn, delay = 1000) {
|
48
|
-
let timeoutId = null
|
49
|
-
|
50
|
-
return (...args) => {
|
51
|
-
clearTimeout(timeoutId)
|
52
|
-
timeoutId = setTimeout(() => fn.apply(this, args), delay)
|
53
|
-
}
|
54
|
-
}
|
data/lib/generators/css_zero/add/templates/app/javascript/controllers/sortable_controller.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { Controller } from "@hotwired/stimulus"
|
2
|
-
import { put } from "https://cdn.skypack.dev/@rails/request.js@0.0.11"
|
3
|
-
import Sortable from "https://cdn.skypack.dev/sortablejs"
|
2
|
+
import { put } from "https://cdn.skypack.dev/@rails/request.js@0.0.11?min"
|
3
|
+
import Sortable from "https://cdn.skypack.dev/sortablejs?min"
|
4
4
|
|
5
5
|
export default class extends Controller {
|
6
6
|
static values = { url: String, group: String, handle: String }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: css-zero
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.71
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lázaro Nixon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-11-
|
11
|
+
date: 2024-11-28 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email: lazaronixon@hotmail.com
|