formstrap 0.4.6 → 0.4.7

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: e4b8936b5898f98f1ec48da9e055b734a5869c3a06878c91c94b3db0511d3412
4
- data.tar.gz: c7b810c58dd0b5245c41a4a085d744f9daa301d536875c0a4110c36afafa903b
3
+ metadata.gz: 7b83b9b5c0b00d0d5b3d84a26ca44c16335321c28c6c3e183a84d51fd3c2c45b
4
+ data.tar.gz: 11d2ec48abdc5ffaaf223d8c3401f3e47a3e6e8d4de813590b8f2543a902ef4e
5
5
  SHA512:
6
- metadata.gz: e64b6a8e8817a5770b17b6a420ae9d5d0f3a12263625088a05775a30035c7076999f99c9ce913d68cf1e70183ac9a237e1d905e54b854fe38017e01db3e8b73d
7
- data.tar.gz: 364f70b46af019753bd9c0b371d5848bf86828007ebb9066fe37dc7d18f8bf99445ae29003aded25ceb497c2364a3d56790044375ca0b1b0b19c26b7ba5ffa98
6
+ metadata.gz: 5cdfdd6829349c2e8e3821bfc3d7ab80b7414f125126d20e9158475e337a1bc7e974a83a0209f6f56e4e45cf115599498f25976a23b616cd9006e54be16a9042
7
+ data.tar.gz: 22c288a45528576ff1c91c76775003fb0ebeead2bb051c492e3923390e876b49fab4b936924e29b46b5484efd1fa43cfd15f3194fab63bf4e97ea59242d585c0
@@ -12,7 +12,10 @@ export default class extends Controller {
12
12
 
13
13
  connect () {
14
14
  this.validate()
15
- this.updateCount()
15
+
16
+ if (this.maxSelectedItems() !== 1) {
17
+ this.updateCount()
18
+ }
16
19
  }
17
20
 
18
21
  // Actions
@@ -27,11 +30,29 @@ export default class extends Controller {
27
30
  }
28
31
 
29
32
  inputChange (event) {
30
- this.handleIdsUpdate(event.target)
31
- this.updateCount()
33
+ if (this.maxSelectedItems() === 1) {
34
+ this.selectOneItem(event.target)
35
+ } else {
36
+ this.selectMultipleItems(event.target)
37
+ }
32
38
  }
33
39
 
34
40
  // Methods
41
+ selectOneItem (element) {
42
+ this.idsValue = []
43
+
44
+ for (const checkbox of this.idCheckboxTargets.filter(e => e.value !== element.value)) {
45
+ checkbox.checked = false
46
+ }
47
+
48
+ this.handleIdsUpdate(element)
49
+ }
50
+
51
+ selectMultipleItems (element) {
52
+ this.handleIdsUpdate(element)
53
+ this.updateCount()
54
+ }
55
+
35
56
  hidePlaceholder () {
36
57
  this.placeholderTarget.classList.add('d-none')
37
58
  }
@@ -54,7 +75,7 @@ export default class extends Controller {
54
75
  })
55
76
  }
56
77
 
57
- this.handleSearchdIdsUpdate()
78
+ this.handleSearchIdsUpdate()
58
79
  }
59
80
 
60
81
  itemTargetConnected (element) {
@@ -155,7 +176,7 @@ export default class extends Controller {
155
176
  this.countTarget.innerHTML = this.selectedItemsCount()
156
177
  }
157
178
 
158
- handleSearchdIdsUpdate () {
179
+ handleSearchIdsUpdate () {
159
180
  this.deleteSearchIdInputs()
160
181
  this.createSearchIdInputs()
161
182
  }
@@ -10,19 +10,30 @@ export default class extends Controller {
10
10
  remoteQueryParam: String
11
11
  }
12
12
 
13
+ initialize () {
14
+ this.tomSelect = undefined
15
+ this.perPage = 24
16
+ }
17
+
13
18
  connect () {
14
19
  if (this.isMultiple() || this.isTomSelect() || this.isRemote()) {
15
- this.initTomSelect()
20
+ this.tomSelect = this.initTomSelect()
16
21
  }
17
22
  }
18
23
 
19
24
  disconnect () {
20
- this.element.tomselect.destroy()
25
+ if (this.element.tomselect) {
26
+ this.element.tomselect.destroy()
27
+ }
21
28
  }
22
29
 
23
30
  defaultOptions () {
24
31
  return {
25
- plugins: ['drag_drop', 'caret_position', 'input_autogrow'],
32
+ plugins: {
33
+ caret_position: {},
34
+ drag_drop: {},
35
+ input_autogrow: {}
36
+ },
26
37
  persist: false,
27
38
  create: true,
28
39
  render: this.renderOptions()[I18n.locale]
@@ -41,13 +52,51 @@ export default class extends Controller {
41
52
  return this.remoteUrlValue
42
53
  }
43
54
 
44
- defaultLoadOptions () {
55
+ setQueryParam (url, key, value) {
56
+ const urlObj = new URL(url)
57
+ const params = urlObj.searchParams
58
+
59
+ // Adds if not exists, updates if exists
60
+ params.set(key, value)
61
+
62
+ return urlObj.toString()
63
+ }
64
+
65
+ getQueryParam (url, key) {
66
+ const urlObj = new URL(url)
67
+ const params = urlObj.searchParams
68
+
69
+ return params.get(key)
70
+ }
71
+
72
+ firstUrl () {
73
+ return (query) => {
74
+ let url = `${this.remoteUrlValue}.json`
75
+ url = this.setQueryParam(url, this.remoteQueryParamValue, query)
76
+ url = this.setQueryParam(url, 'per_page', this.perPage)
77
+ url = this.setQueryParam(url, 'page', 1)
78
+ return url
79
+ }
80
+ }
81
+
82
+ load () {
45
83
  return (query, callback) => {
46
- if (!query.length) return callback()
84
+ let url = this.tomSelect.getUrl(query)
47
85
 
48
- fetch(`${this.remoteUrlValue}.json?${this.remoteQueryParamValue}=${encodeURIComponent(query)}`)
86
+ fetch(url)
49
87
  .then(response => response.json())
50
- .then(data => { callback(data) })
88
+ .then(json => {
89
+ if (json.length === this.perPage) {
90
+ // Update page param for next call
91
+ const currentPage = parseInt(this.getQueryParam(url, 'page')) || 1
92
+ url = this.setQueryParam(url, 'page', currentPage + 1)
93
+ this.tomSelect.setNextUrl(query, url)
94
+ } else {
95
+ this.tomSelect.setNextUrl(query, undefined)
96
+ }
97
+
98
+ callback(json)
99
+ })
51
100
  .catch(() => { callback() })
52
101
  }
53
102
  }
@@ -56,18 +105,58 @@ export default class extends Controller {
56
105
  return {
57
106
  en: {
58
107
  option_create: function (data, escape) {
59
- return '<div class="create">Add <strong>' + escape(data.input) + '</strong>&hellip;</div>'
108
+ return `<div class="create">Add <strong>${escape(data.input)}</strong>&hellip;</div>`
60
109
  },
61
110
  no_results: function (data, escape) {
62
111
  return '<div class="no-results">No results found</div>'
112
+ },
113
+ loading_more: function (data, escape) {
114
+ return '<div class="loading-more-results">Loading more results ... </div>'
115
+ },
116
+ no_more_results: function (data, escape) {
117
+ return '<div class="no-more-results">No more results</div>'
63
118
  }
64
119
  },
65
120
  nl: {
66
121
  option_create: function (data, escape) {
67
- return '<div class="create">Voeg <strong>' + escape(data.input) + '</strong> toe &hellip;</div>'
122
+ return `<div class="create">Voeg <strong>${escape(data.input)}</strong> toe &hellip;</div>`
68
123
  },
69
124
  no_results: function (data, escape) {
70
125
  return '<div class="no-results">Geen resultaten gevonden</div>'
126
+ },
127
+ loading_more: function (data, escape) {
128
+ return '<div class="loading-more-results">Laad meer resultaten ... </div>'
129
+ },
130
+ no_more_results: function (data, escape) {
131
+ return '<div class="no-more-results">Geen resultaten meer</div>'
132
+ }
133
+ },
134
+ fr: {
135
+ option_create: function (data, escape) {
136
+ return `<div class="create">Ajouter <strong>${escape(data.input)}</strong>&hellip;</div>`
137
+ },
138
+ no_results: function (data, escape) {
139
+ return '<div class="no-results">Aucun résultat trouvé</div>'
140
+ },
141
+ loading_more: function (data, escape) {
142
+ return '<div class="loading-more-results">Chargement de plus de résultats ... </div>'
143
+ },
144
+ no_more_results: function (data, escape) {
145
+ return '<div class="no-more-results">Plus de résultats</div>'
146
+ }
147
+ },
148
+ de: {
149
+ option_create: function (data, escape) {
150
+ return `<div class="create">Hinzufügen <strong>${escape(data.input)}</strong>&hellip;</div>`
151
+ },
152
+ no_results: function (data, escape) {
153
+ return '<div class="no-results">Keine Ergebnisse gefunden</div>'
154
+ },
155
+ loading_more: function (data, escape) {
156
+ return '<div class="loading-more-results">Lade weitere Ergebnisse ... </div>'
157
+ },
158
+ no_more_results: function (data, escape) {
159
+ return '<div class="no-more-results">Keine weiteren Ergebnisse</div>'
71
160
  }
72
161
  }
73
162
  }
@@ -82,15 +171,28 @@ export default class extends Controller {
82
171
  const options = {
83
172
  create: this.hasTags(),
84
173
  ...(this.isRemote() && {
174
+ plugins: {
175
+ caret_position: {},
176
+ drag_drop: {},
177
+ input_autogrow: {},
178
+ virtual_scroll: {}
179
+ },
85
180
  valueField: this.remoteValueValue,
86
181
  labelField: this.remoteLabelValue,
87
182
  searchField: this.remoteLabelValue,
88
- load: this.defaultLoadOptions()
89
- }
90
- )
183
+ firstUrl: this.firstUrl(),
184
+ load: this.load(),
185
+ // Infinite options
186
+ maxOptions: null,
187
+ // Fetch first items when focused
188
+ onFocus: () => {
189
+ this.tomSelect.clearOptions()
190
+ this.tomSelect.setNextUrl('', this.firstUrl()(''))
191
+ this.tomSelect.load('')
192
+ }
193
+ })
91
194
  }
92
195
 
93
- /* eslint-disable no-new */
94
- new TomSelect(this.element, { ...defaultOptions, ...options })
196
+ return new TomSelect(this.element, { ...defaultOptions, ...options })
95
197
  }
96
198
  }
@@ -11289,7 +11289,9 @@ var media_modal_controller_default = class extends Controller {
11289
11289
  }
11290
11290
  connect() {
11291
11291
  this.validate();
11292
- this.updateCount();
11292
+ if (this.maxSelectedItems() !== 1) {
11293
+ this.updateCount();
11294
+ }
11293
11295
  }
11294
11296
  select() {
11295
11297
  this.dispatchSelectionEvent();
@@ -11300,7 +11302,21 @@ var media_modal_controller_default = class extends Controller {
11300
11302
  this.triggerFormSubmission();
11301
11303
  }
11302
11304
  inputChange(event) {
11303
- this.handleIdsUpdate(event.target);
11305
+ if (this.maxSelectedItems() === 1) {
11306
+ this.selectOneItem(event.target);
11307
+ } else {
11308
+ this.selectMultipleItems(event.target);
11309
+ }
11310
+ }
11311
+ selectOneItem(element) {
11312
+ this.idsValue = [];
11313
+ for (const checkbox of this.idCheckboxTargets.filter((e) => e.value !== element.value)) {
11314
+ checkbox.checked = false;
11315
+ }
11316
+ this.handleIdsUpdate(element);
11317
+ }
11318
+ selectMultipleItems(element) {
11319
+ this.handleIdsUpdate(element);
11304
11320
  this.updateCount();
11305
11321
  }
11306
11322
  hidePlaceholder() {
@@ -11321,7 +11337,7 @@ var media_modal_controller_default = class extends Controller {
11321
11337
  return element.value !== value;
11322
11338
  });
11323
11339
  }
11324
- this.handleSearchdIdsUpdate();
11340
+ this.handleSearchIdsUpdate();
11325
11341
  }
11326
11342
  itemTargetConnected(element) {
11327
11343
  this.updateItem(element.querySelector("input"));
@@ -11405,7 +11421,7 @@ var media_modal_controller_default = class extends Controller {
11405
11421
  updateCount() {
11406
11422
  this.countTarget.innerHTML = this.selectedItemsCount();
11407
11423
  }
11408
- handleSearchdIdsUpdate() {
11424
+ handleSearchIdsUpdate() {
11409
11425
  this.deleteSearchIdInputs();
11410
11426
  this.createSearchIdInputs();
11411
11427
  }
@@ -13397,17 +13413,27 @@ var repeater_controller_default = class extends Controller {
13397
13413
  // app/assets/javascripts/formstrap/controllers/select_controller.js
13398
13414
  var import_tom_select = __toESM(require_tom_select_complete());
13399
13415
  var select_controller_default = class extends Controller {
13416
+ initialize() {
13417
+ this.tomSelect = void 0;
13418
+ this.perPage = 24;
13419
+ }
13400
13420
  connect() {
13401
13421
  if (this.isMultiple() || this.isTomSelect() || this.isRemote()) {
13402
- this.initTomSelect();
13422
+ this.tomSelect = this.initTomSelect();
13403
13423
  }
13404
13424
  }
13405
13425
  disconnect() {
13406
- this.element.tomselect.destroy();
13426
+ if (this.element.tomselect) {
13427
+ this.element.tomselect.destroy();
13428
+ }
13407
13429
  }
13408
13430
  defaultOptions() {
13409
13431
  return {
13410
- plugins: ["drag_drop", "caret_position", "input_autogrow"],
13432
+ plugins: {
13433
+ caret_position: {},
13434
+ drag_drop: {},
13435
+ input_autogrow: {}
13436
+ },
13411
13437
  persist: false,
13412
13438
  create: true,
13413
13439
  render: this.renderOptions()[i18n_default.locale]
@@ -13422,12 +13448,38 @@ var select_controller_default = class extends Controller {
13422
13448
  isRemote() {
13423
13449
  return this.remoteUrlValue;
13424
13450
  }
13425
- defaultLoadOptions() {
13451
+ setQueryParam(url, key, value) {
13452
+ const urlObj = new URL(url);
13453
+ const params = urlObj.searchParams;
13454
+ params.set(key, value);
13455
+ return urlObj.toString();
13456
+ }
13457
+ getQueryParam(url, key) {
13458
+ const urlObj = new URL(url);
13459
+ const params = urlObj.searchParams;
13460
+ return params.get(key);
13461
+ }
13462
+ firstUrl() {
13463
+ return (query) => {
13464
+ let url = `${this.remoteUrlValue}.json`;
13465
+ url = this.setQueryParam(url, this.remoteQueryParamValue, query);
13466
+ url = this.setQueryParam(url, "per_page", this.perPage);
13467
+ url = this.setQueryParam(url, "page", 1);
13468
+ return url;
13469
+ };
13470
+ }
13471
+ load() {
13426
13472
  return (query, callback) => {
13427
- if (!query.length)
13428
- return callback();
13429
- fetch(`${this.remoteUrlValue}.json?${this.remoteQueryParamValue}=${encodeURIComponent(query)}`).then((response) => response.json()).then((data) => {
13430
- callback(data);
13473
+ let url = this.tomSelect.getUrl(query);
13474
+ fetch(url).then((response) => response.json()).then((json) => {
13475
+ if (json.length === this.perPage) {
13476
+ const currentPage = parseInt(this.getQueryParam(url, "page")) || 1;
13477
+ url = this.setQueryParam(url, "page", currentPage + 1);
13478
+ this.tomSelect.setNextUrl(query, url);
13479
+ } else {
13480
+ this.tomSelect.setNextUrl(query, void 0);
13481
+ }
13482
+ callback(json);
13431
13483
  }).catch(() => {
13432
13484
  callback();
13433
13485
  });
@@ -13437,18 +13489,58 @@ var select_controller_default = class extends Controller {
13437
13489
  return {
13438
13490
  en: {
13439
13491
  option_create: function(data, escape) {
13440
- return '<div class="create">Add <strong>' + escape(data.input) + "</strong>&hellip;</div>";
13492
+ return `<div class="create">Add <strong>${escape(data.input)}</strong>&hellip;</div>`;
13441
13493
  },
13442
13494
  no_results: function(data, escape) {
13443
13495
  return '<div class="no-results">No results found</div>';
13496
+ },
13497
+ loading_more: function(data, escape) {
13498
+ return '<div class="loading-more-results">Loading more results ... </div>';
13499
+ },
13500
+ no_more_results: function(data, escape) {
13501
+ return '<div class="no-more-results">No more results</div>';
13444
13502
  }
13445
13503
  },
13446
13504
  nl: {
13447
13505
  option_create: function(data, escape) {
13448
- return '<div class="create">Voeg <strong>' + escape(data.input) + "</strong> toe &hellip;</div>";
13506
+ return `<div class="create">Voeg <strong>${escape(data.input)}</strong> toe &hellip;</div>`;
13449
13507
  },
13450
13508
  no_results: function(data, escape) {
13451
13509
  return '<div class="no-results">Geen resultaten gevonden</div>';
13510
+ },
13511
+ loading_more: function(data, escape) {
13512
+ return '<div class="loading-more-results">Laad meer resultaten ... </div>';
13513
+ },
13514
+ no_more_results: function(data, escape) {
13515
+ return '<div class="no-more-results">Geen resultaten meer</div>';
13516
+ }
13517
+ },
13518
+ fr: {
13519
+ option_create: function(data, escape) {
13520
+ return `<div class="create">Ajouter <strong>${escape(data.input)}</strong>&hellip;</div>`;
13521
+ },
13522
+ no_results: function(data, escape) {
13523
+ return '<div class="no-results">Aucun r\xE9sultat trouv\xE9</div>';
13524
+ },
13525
+ loading_more: function(data, escape) {
13526
+ return '<div class="loading-more-results">Chargement de plus de r\xE9sultats ... </div>';
13527
+ },
13528
+ no_more_results: function(data, escape) {
13529
+ return '<div class="no-more-results">Plus de r\xE9sultats</div>';
13530
+ }
13531
+ },
13532
+ de: {
13533
+ option_create: function(data, escape) {
13534
+ return `<div class="create">Hinzuf\xFCgen <strong>${escape(data.input)}</strong>&hellip;</div>`;
13535
+ },
13536
+ no_results: function(data, escape) {
13537
+ return '<div class="no-results">Keine Ergebnisse gefunden</div>';
13538
+ },
13539
+ loading_more: function(data, escape) {
13540
+ return '<div class="loading-more-results">Lade weitere Ergebnisse ... </div>';
13541
+ },
13542
+ no_more_results: function(data, escape) {
13543
+ return '<div class="no-more-results">Keine weiteren Ergebnisse</div>';
13452
13544
  }
13453
13545
  }
13454
13546
  };
@@ -13461,13 +13553,26 @@ var select_controller_default = class extends Controller {
13461
13553
  const options = {
13462
13554
  create: this.hasTags(),
13463
13555
  ...this.isRemote() && {
13556
+ plugins: {
13557
+ caret_position: {},
13558
+ drag_drop: {},
13559
+ input_autogrow: {},
13560
+ virtual_scroll: {}
13561
+ },
13464
13562
  valueField: this.remoteValueValue,
13465
13563
  labelField: this.remoteLabelValue,
13466
13564
  searchField: this.remoteLabelValue,
13467
- load: this.defaultLoadOptions()
13565
+ firstUrl: this.firstUrl(),
13566
+ load: this.load(),
13567
+ maxOptions: null,
13568
+ onFocus: () => {
13569
+ this.tomSelect.clearOptions();
13570
+ this.tomSelect.setNextUrl("", this.firstUrl()(""));
13571
+ this.tomSelect.load("");
13572
+ }
13468
13573
  }
13469
13574
  };
13470
- new import_tom_select.default(this.element, { ...defaultOptions, ...options });
13575
+ return new import_tom_select.default(this.element, { ...defaultOptions, ...options });
13471
13576
  }
13472
13577
  };
13473
13578
  __publicField(select_controller_default, "values", {
@@ -59,7 +59,10 @@
59
59
  <% end %>
60
60
  <button type="button" class="btn btn-secondary" data-bs-dismiss="modal"><%= t(".close") %></button>
61
61
  <button type="button" class="btn btn-primary" data-bs-dismiss="modal" data-action="click->media-modal#select" data-media-modal-target="selectButton">
62
- <%= t(".select") %> (<span data-media-modal-target="count">0</span><%= t(".maximum", count: max.to_i) if max.present? %>)
62
+ <%= t(".select") %>
63
+ <% unless max.present? && max.to_i == 1 %>
64
+ (<span data-media-modal-target="count">0</span><%= t(".maximum", count: max.to_i) if max.present? %>)
65
+ <% end %>
63
66
  </button>
64
67
  </div>
65
68
  </div>
@@ -1,6 +1,17 @@
1
- <div data-controller="nested-preview" data-nested-preview-url-value="<%= url %>">
1
+ <div
2
+ data-controller="nested-preview"
3
+ data-nested-preview-url-value="<%= url %>"
4
+ >
2
5
  <!-- Preview placeholder -->
3
- <div class="nested-preview-iframe-wrapper position-relative" role="button" data-nested-preview-target="iframeWrapper" data-bs-toggle="offcanvas" data-bs-target="#offcanvas-<%= form.options[:child_index] %>" aria-controls="offcanvasRight" data-turbo-cache="false">
6
+ <div
7
+ class="nested-preview-iframe-wrapper position-relative"
8
+ role="button"
9
+ data-nested-preview-target="iframeWrapper"
10
+ data-bs-toggle="offcanvas"
11
+ data-bs-target="#offcanvas-<%= form.options[:child_index] %>"
12
+ aria-controls="offcanvasRight"
13
+ data-turbo-temporary
14
+ >
4
15
  <iframe src="<%= url %>" class="pe-none" data-nested-preview-target="iframe"></iframe>
5
16
  <div data-nested-preview-target="loader" class="nested-preview-loader">
6
17
  <div class="spinner-grow text-secondary" role="status">
@@ -8,27 +19,36 @@
8
19
  </div>
9
20
  </div>
10
21
  </div>
11
-
12
22
  <!-- Preview fields wrapper -->
13
- <div class="offcanvas offcanvas-end nested-preview-offcanvas" tabindex="-1" id="offcanvas-<%= form.options[:child_index] %>" aria-labelledby="offcanvasRightLabel" data-nested-preview-target="offcanvas">
23
+ <div
24
+ class="offcanvas offcanvas-end nested-preview-offcanvas"
25
+ tabindex="-1"
26
+ id="offcanvas-<%= form.options[:child_index] %>"
27
+ aria-labelledby="offcanvasRightLabel"
28
+ data-nested-preview-target="offcanvas"
29
+ >
14
30
  <div class="offcanvas-header">
15
- <h5 class="offcanvas-title" id="offcanvasRightLabel"><%= t('.title', model: form.object.model_name.human) %></h5>
16
- <button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></button>
31
+ <h5 class="offcanvas-title" id="offcanvasRightLabel"><%= t(".title", model: form.object.model_name.human) %></h5>
32
+ <button
33
+ type="button"
34
+ class="btn-close"
35
+ data-bs-dismiss="offcanvas"
36
+ aria-label="Close"
37
+ ></button>
17
38
  </div>
18
39
  <div class="offcanvas-body">
19
40
 
20
41
  <div class="alert alert-danger d-none" data-nested-preview-target="error">
21
42
  <%= t(".error") %>
22
43
  </div>
23
-
24
44
  <!-- Row content -->
25
45
  <div data-nested-preview-target="fields">
26
46
  <%= yield %>
27
47
  </div>
28
-
29
48
  <!-- Preview sync button -->
30
49
  <div class="btn btn-primary" data-action="click->nested-preview#update">
31
- <%= bootstrap_icon("arrow-repeat") %> <%= t('.button') %>
50
+ <%= bootstrap_icon("arrow-repeat") %>
51
+ <%= t(".button") %>
32
52
  </div>
33
53
  </div>
34
54
  </div>
@@ -11,7 +11,7 @@ module Formstrap
11
11
  render_input(:association, attribute, options)
12
12
  end
13
13
 
14
- def preview_button(url = nil, options = {}, &block)
14
+ def preview_button(url = nil, options = {}, &)
15
15
  default_options = {
16
16
  data: {
17
17
  controller: "preview",
@@ -19,7 +19,7 @@ module Formstrap
19
19
  }
20
20
  }
21
21
 
22
- @template.render("formstrap/link", form: self, url: url, options: default_options.deep_merge(options), &block)
22
+ @template.render("formstrap/link", form: self, url: url, options: default_options.deep_merge(options), &)
23
23
  end
24
24
 
25
25
  def checkbox(attribute, formstrap: true, **options)
@@ -1,3 +1,3 @@
1
1
  module Formstrap
2
- VERSION = "0.4.6"
2
+ VERSION = "0.4.7"
3
3
  end
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frontierdotbe/formstrap",
3
- "version": "0.4.5",
3
+ "version": "0.4.7",
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.6
4
+ version: 0.4.7
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-01-16 00:00:00.000000000 Z
11
+ date: 2025-02-10 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: