formstrap 0.4.7 → 0.4.8

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7b83b9b5c0b00d0d5b3d84a26ca44c16335321c28c6c3e183a84d51fd3c2c45b
4
- data.tar.gz: 11d2ec48abdc5ffaaf223d8c3401f3e47a3e6e8d4de813590b8f2543a902ef4e
3
+ metadata.gz: e389e7cf84a407fab16ee8a1b2e44d6f3c5219a4d2dda9256ebf33628075933d
4
+ data.tar.gz: 403dabdc1b847bb03fed251052c772044692efe38f25add66802e5552f04a2ac
5
5
  SHA512:
6
- metadata.gz: 5cdfdd6829349c2e8e3821bfc3d7ab80b7414f125126d20e9158475e337a1bc7e974a83a0209f6f56e4e45cf115599498f25976a23b616cd9006e54be16a9042
7
- data.tar.gz: 22c288a45528576ff1c91c76775003fb0ebeead2bb051c492e3923390e876b49fab4b936924e29b46b5484efd1fa43cfd15f3194fab63bf4e97ea59242d585c0
6
+ metadata.gz: 6464a8b35fa692f8105babccfa93971bce0af7b18b2b65b9b2792a8951acfc1931697cf2b7c46bc32c86a34d52ed223dbd27368f8ce8f0110fe0a1412830391e
7
+ data.tar.gz: 42bd6c1c1027b06b7c651b05d2b789baf5a01ad451dcf2354f18911f49ead5099a4074cc9ae21d469855121594b6e484fb901121e106f747f9c4c50db567fe5f
@@ -71,7 +71,7 @@ export default class extends Controller {
71
71
 
72
72
  firstUrl () {
73
73
  return (query) => {
74
- let url = `${this.remoteUrlValue}.json`
74
+ let url = this.remoteUrlValue
75
75
  url = this.setQueryParam(url, this.remoteQueryParamValue, query)
76
76
  url = this.setQueryParam(url, 'per_page', this.perPage)
77
77
  url = this.setQueryParam(url, 'page', 1)
@@ -83,7 +83,12 @@ export default class extends Controller {
83
83
  return (query, callback) => {
84
84
  let url = this.tomSelect.getUrl(query)
85
85
 
86
- fetch(url)
86
+ fetch(url, {
87
+ headers: {
88
+ Accept: 'application/json',
89
+ 'Conent-Type': 'application/json'
90
+ }
91
+ })
87
92
  .then(response => response.json())
88
93
  .then(json => {
89
94
  if (json.length === this.perPage) {
@@ -13461,7 +13461,7 @@ var select_controller_default = class extends Controller {
13461
13461
  }
13462
13462
  firstUrl() {
13463
13463
  return (query) => {
13464
- let url = `${this.remoteUrlValue}.json`;
13464
+ let url = this.remoteUrlValue;
13465
13465
  url = this.setQueryParam(url, this.remoteQueryParamValue, query);
13466
13466
  url = this.setQueryParam(url, "per_page", this.perPage);
13467
13467
  url = this.setQueryParam(url, "page", 1);
@@ -13471,7 +13471,12 @@ var select_controller_default = class extends Controller {
13471
13471
  load() {
13472
13472
  return (query, callback) => {
13473
13473
  let url = this.tomSelect.getUrl(query);
13474
- fetch(url).then((response) => response.json()).then((json) => {
13474
+ fetch(url, {
13475
+ headers: {
13476
+ Accept: "application/json",
13477
+ "Conent-Type": "application/json"
13478
+ }
13479
+ }).then((response) => response.json()).then((json) => {
13475
13480
  if (json.length === this.perPage) {
13476
13481
  const currentPage = parseInt(this.getQueryParam(url, "page")) || 1;
13477
13482
  url = this.setQueryParam(url, "page", currentPage + 1);
@@ -48,5 +48,6 @@
48
48
  plaintext: association.plaintext,
49
49
  prepend: association.prepend,
50
50
  append: association.append,
51
- remote: association.remote
51
+ remote: association.remote,
52
+ label: association.label,
52
53
  ) %>
@@ -1,3 +1,3 @@
1
1
  module Formstrap
2
- VERSION = "0.4.7"
2
+ VERSION = "0.4.8"
3
3
  end
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frontierdotbe/formstrap",
3
- "version": "0.4.7",
3
+ "version": "0.4.8",
4
4
  "description": "Bootstrap-powered Form Helpers",
5
5
  "module": "app/assets/javascripts/formstrap.js",
6
6
  "main": "app/assets/javascripts/formstrap.js",
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: formstrap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.7
4
+ version: 0.4.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jef Vlamings
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-02-10 00:00:00.000000000 Z
11
+ date: 2025-02-13 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: An extensive Bootstrap form library to power your Ruby On Rails application.
14
14
  email: