rails_accordion 0.1.12.pre.beta → 0.2.1.pre.beta
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +15 -18
- data/README.md +60 -10
- data/app/assets/builds/rails_accordion.css +1 -1
- data/app/assets/builds/rails_accordion.js +41 -20
- data/app/assets/builds/rails_accordion.js.map +3 -3
- data/app/components/accordion_component.rb +5 -2
- data/app/javascript/controllers/accordion_controller.js +25 -1
- data/lib/generators/rails_accordion/templates/rails_accordion.tt +1 -0
- data/lib/rails_accordion/configuration.rb +3 -2
- data/lib/rails_accordion/version.rb +1 -1
- data/rails_accordion.gemspec +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5eb59844a72b37143480b3d381e0d0ee13ea92bbac68355a1766f3a651424ccc
|
4
|
+
data.tar.gz: e26a6c6147137db853e55b19a182bfbc16dcfcce2c2dbdeadd55ce0da8f4684e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e6698a157058150b399aba32c57d801d32a43d778a7cf11c5fd182fa9dfee1fa7fe13220c52adc8f741ee47804cdc6508300b0c06921825d02fcac70f543cea
|
7
|
+
data.tar.gz: 0fb7e046dcf8e61c062ddf1d2a2f5eb1d4cdf3c41aeb24a67b6868575180c4aca1e20b14f95f580aa67c3bc01d7fcc2b8195285a743409e61f39726b30f24dbd
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rails_accordion (0.1.
|
4
|
+
rails_accordion (0.1.11.pre.beta)
|
5
5
|
stimulus-rails (~> 1.2)
|
6
6
|
view_component (~> 2.52)
|
7
7
|
zeitwerk (~> 2.6)
|
@@ -9,25 +9,24 @@ PATH
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
|
-
actionpack (
|
13
|
-
actionview (=
|
14
|
-
activesupport (=
|
15
|
-
rack (~> 2.0, >= 2.0
|
12
|
+
actionpack (7.0.4.3)
|
13
|
+
actionview (= 7.0.4.3)
|
14
|
+
activesupport (= 7.0.4.3)
|
15
|
+
rack (~> 2.0, >= 2.2.0)
|
16
16
|
rack-test (>= 0.6.3)
|
17
17
|
rails-dom-testing (~> 2.0)
|
18
18
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
19
|
-
actionview (
|
20
|
-
activesupport (=
|
19
|
+
actionview (7.0.4.3)
|
20
|
+
activesupport (= 7.0.4.3)
|
21
21
|
builder (~> 3.1)
|
22
22
|
erubi (~> 1.4)
|
23
23
|
rails-dom-testing (~> 2.0)
|
24
24
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
25
|
-
activesupport (
|
25
|
+
activesupport (7.0.4.3)
|
26
26
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
27
27
|
i18n (>= 1.6, < 2)
|
28
28
|
minitest (>= 5.1)
|
29
29
|
tzinfo (~> 2.0)
|
30
|
-
zeitwerk (~> 2.3)
|
31
30
|
ast (2.4.2)
|
32
31
|
builder (3.2.4)
|
33
32
|
concurrent-ruby (1.2.2)
|
@@ -42,11 +41,9 @@ GEM
|
|
42
41
|
nokogiri (>= 1.12.0)
|
43
42
|
method_source (1.0.0)
|
44
43
|
minitest (5.18.0)
|
45
|
-
nokogiri (1.
|
44
|
+
nokogiri (1.14.4-arm64-darwin)
|
46
45
|
racc (~> 1.4)
|
47
|
-
nokogiri (1.
|
48
|
-
racc (~> 1.4)
|
49
|
-
nokogiri (1.13.10-x86_64-linux)
|
46
|
+
nokogiri (1.14.4-x86_64-darwin)
|
50
47
|
racc (~> 1.4)
|
51
48
|
parallel (1.23.0)
|
52
49
|
parser (3.2.2.1)
|
@@ -60,12 +57,13 @@ GEM
|
|
60
57
|
nokogiri (>= 1.6)
|
61
58
|
rails-html-sanitizer (1.5.0)
|
62
59
|
loofah (~> 2.19, >= 2.19.1)
|
63
|
-
railties (
|
64
|
-
actionpack (=
|
65
|
-
activesupport (=
|
60
|
+
railties (7.0.4.3)
|
61
|
+
actionpack (= 7.0.4.3)
|
62
|
+
activesupport (= 7.0.4.3)
|
66
63
|
method_source
|
67
64
|
rake (>= 12.2)
|
68
65
|
thor (~> 1.0)
|
66
|
+
zeitwerk (~> 2.5)
|
69
67
|
rainbow (3.1.1)
|
70
68
|
rake (13.0.6)
|
71
69
|
regexp_parser (2.8.0)
|
@@ -111,7 +109,6 @@ GEM
|
|
111
109
|
PLATFORMS
|
112
110
|
arm64-darwin-22
|
113
111
|
x86_64-darwin-20
|
114
|
-
x86_64-linux
|
115
112
|
|
116
113
|
DEPENDENCIES
|
117
114
|
rails_accordion!
|
@@ -123,4 +120,4 @@ DEPENDENCIES
|
|
123
120
|
zeitwerk (~> 2.6)
|
124
121
|
|
125
122
|
BUNDLED WITH
|
126
|
-
2.4.
|
123
|
+
2.4.8
|
data/README.md
CHANGED
@@ -5,7 +5,7 @@ rails_accordion is a Ruby gem that provides an easy-to-use accordion component f
|
|
5
5
|
## Installation
|
6
6
|
|
7
7
|
```rb
|
8
|
-
gem 'rails_accordion', '~> 0.
|
8
|
+
gem 'rails_accordion', '~> 0.2.0.pre.beta'
|
9
9
|
```
|
10
10
|
|
11
11
|
```shell
|
@@ -16,26 +16,69 @@ bundle install
|
|
16
16
|
rails generate rails_accordion:install
|
17
17
|
```
|
18
18
|
|
19
|
-
|
19
|
+
Then follow the instructions for your JavaScript setup:
|
20
20
|
|
21
|
-
|
21
|
+
- [Importmap](#importmap) (Rails 7 default)
|
22
|
+
- [esbuild, rollup.js, or Webpack](#esbuild-rollupjs-or-webpack)
|
23
|
+
- [Webpacker](#webpacker) (Rails 6 default)
|
24
|
+
- [Sprockets](#sprockets)
|
25
|
+
|
26
|
+
### Importmap
|
27
|
+
|
28
|
+
In `config/importmap.rb`, add:
|
29
|
+
|
30
|
+
```ruby
|
22
31
|
pin "rails_accordion", to: "rails_accordion.js"
|
23
32
|
```
|
24
33
|
|
25
|
-
And in app/javascript/application.js
|
34
|
+
And in `app/javascript/application.js`, add:
|
35
|
+
|
36
|
+
```js
|
37
|
+
import "rails_accordion"
|
38
|
+
```
|
39
|
+
|
40
|
+
### esbuild, rollup.js, or Webpack
|
41
|
+
|
42
|
+
Run:
|
43
|
+
|
44
|
+
```sh
|
45
|
+
yarn add rails_accordion rails_accordion.js
|
46
|
+
```
|
47
|
+
|
48
|
+
And in `app/javascript/application.js`, add:
|
49
|
+
|
50
|
+
```js
|
51
|
+
import "rails_accordion/rails_accordion.js"
|
52
|
+
```
|
53
|
+
|
54
|
+
Note: For rollup.js, this requires `format: "iife"` in `rollup.config.js`.
|
55
|
+
|
56
|
+
### Webpacker
|
57
|
+
|
58
|
+
Run:
|
59
|
+
|
60
|
+
```sh
|
61
|
+
yarn add rails_accordion rails_accordion.js
|
62
|
+
```
|
63
|
+
|
64
|
+
And in `app/javascript/packs/application.js`, add:
|
65
|
+
|
26
66
|
```js
|
27
|
-
import
|
67
|
+
import "rails_accordion/rails_accordion.js"
|
28
68
|
```
|
29
69
|
|
30
|
-
|
31
|
-
|
32
|
-
|
70
|
+
### Sprockets
|
71
|
+
|
72
|
+
In `app/assets/javascripts/application.js`, add:
|
73
|
+
|
74
|
+
```js
|
75
|
+
//= require rails_accordion
|
33
76
|
```
|
34
77
|
|
35
78
|
## Usage
|
36
79
|
|
37
80
|
```erb
|
38
|
-
<%= accordion class: "bg-white rounded-xl overflow-auto"
|
81
|
+
<%= accordion class: "bg-white rounded-xl overflow-auto" do %>
|
39
82
|
<%= accordion_item do |item| %>
|
40
83
|
<% item.header do %>
|
41
84
|
Hello world
|
@@ -47,6 +90,13 @@ in application.scss, add:
|
|
47
90
|
<% end %>
|
48
91
|
```
|
49
92
|
|
93
|
+
### Options
|
94
|
+
|
95
|
+
multiple_open: [true, false]
|
96
|
+
default_state: 1. all_closed: All items are closed on page load. 2. all_opened: All items are opened. 3. first_opened: First item is opened by default
|
97
|
+
|
98
|
+
<%= accordion class: "bg-white rounded-xl overflow-auto", default_state: :all_opened do %>
|
99
|
+
|
50
100
|
## Development
|
51
101
|
|
52
102
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
@@ -55,7 +105,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
55
105
|
|
56
106
|
## Contributing
|
57
107
|
|
58
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/rails_accordion. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/
|
108
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/rails_accordion. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/Tajbrains/rails_accordion/blob/master/CODE_OF_CONDUCT.md).
|
59
109
|
|
60
110
|
## License
|
61
111
|
|
@@ -368,7 +368,7 @@
|
|
368
368
|
return r2.path = "/v4/" + r2.authority + ".json", r2.params.push("secure"), this._makeAPIURL(r2, this._customAccessToken || e2);
|
369
369
|
}, G.prototype.normalizeSpriteURL = function(t2, e2, r2, n2) {
|
370
370
|
var i2 = Y(t2);
|
371
|
-
return Z(t2) ? (i2.path = "/styles/v1" + i2.path + "/sprite" + e2 + r2, this._makeAPIURL(i2, this._customAccessToken || n2)) : (i2.path += "" + e2 + r2, $(i2));
|
371
|
+
return Z(t2) ? (i2.path = "/styles/v1" + i2.path + "/sprite" + e2 + r2, this._makeAPIURL(i2, this._customAccessToken || n2)) : (i2.path += "" + e2 + r2, $2(i2));
|
372
372
|
}, G.prototype.normalizeTileURL = function(t2, e2) {
|
373
373
|
if (this._isSkuTokenExpired() && this._createSkuToken(), t2 && !Z(t2)) {
|
374
374
|
return t2;
|
@@ -409,7 +409,7 @@
|
|
409
409
|
i2 >= 0 && t2.params.splice(i2, 1);
|
410
410
|
}
|
411
411
|
if ("/" !== n2.path && (t2.path = "" + n2.path + t2.path), !R.REQUIRE_ACCESS_TOKEN) {
|
412
|
-
return $(t2);
|
412
|
+
return $2(t2);
|
413
413
|
}
|
414
414
|
if (!(e2 = e2 || R.ACCESS_TOKEN)) {
|
415
415
|
throw new Error("An API access token is required to use Mapbox GL. " + r2);
|
@@ -419,7 +419,7 @@
|
|
419
419
|
}
|
420
420
|
return t2.params = t2.params.filter(function(t3) {
|
421
421
|
return -1 === t3.indexOf("access_token");
|
422
|
-
}), t2.params.push("access_token=" + e2), $(t2);
|
422
|
+
}), t2.params.push("access_token=" + e2), $2(t2);
|
423
423
|
};
|
424
424
|
var X = /^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;
|
425
425
|
function J(t2) {
|
@@ -433,7 +433,7 @@
|
|
433
433
|
}
|
434
434
|
return { protocol: e2[1], authority: e2[2], path: e2[3] || "/", params: e2[4] ? e2[4].split("&") : [] };
|
435
435
|
}
|
436
|
-
function $(t2) {
|
436
|
+
function $2(t2) {
|
437
437
|
var e2 = t2.params.length ? "?" + t2.params.join("&") : "";
|
438
438
|
return t2.protocol + "://" + t2.authority + t2.path + e2;
|
439
439
|
}
|
@@ -488,7 +488,7 @@
|
|
488
488
|
if (R.EVENTS_URL) {
|
489
489
|
var a2 = Y(R.EVENTS_URL);
|
490
490
|
a2.params.push("access_token=" + (n2 || R.ACCESS_TOKEN || ""));
|
491
|
-
var o2 = { event: this.type, created: new Date(t2).toISOString(), sdkIdentifier: "mapbox-gl-js", sdkVersion: "1.13.3", skuId: K, userId: this.anonId }, s2 = e2 ? h(o2, e2) : o2, u2 = { url: $(a2), headers: { "Content-Type": "text/plain" }, body: JSON.stringify([s2]) };
|
491
|
+
var o2 = { event: this.type, created: new Date(t2).toISOString(), sdkIdentifier: "mapbox-gl-js", sdkVersion: "1.13.3", skuId: K, userId: this.anonId }, s2 = e2 ? h(o2, e2) : o2, u2 = { url: $2(a2), headers: { "Content-Type": "text/plain" }, body: JSON.stringify([s2]) };
|
492
492
|
this.pendingRequest = wt(u2, function(t3) {
|
493
493
|
i2.pendingRequest = null, r2(t3), i2.saveEventData(), i2.processRequests(n2);
|
494
494
|
});
|
@@ -8832,8 +8832,8 @@
|
|
8832
8832
|
var Y3 = n4.horizontal[H3];
|
8833
8833
|
if (!z4) {
|
8834
8834
|
R4 = ha(Y3.text);
|
8835
|
-
var $
|
8836
|
-
z4 = new Wu(u5, e4, l4, p5, c6, Y3, h5, f5, y4, $
|
8835
|
+
var $4 = s5.layout.get("text-rotate").evaluate(b4, {}, S4);
|
8836
|
+
z4 = new Wu(u5, e4, l4, p5, c6, Y3, h5, f5, y4, $4);
|
8837
8837
|
}
|
8838
8838
|
var W3 = 1 === Y3.positionedLines.length;
|
8839
8839
|
if (V4 += sl(t4, e4, Y3, a5, s5, y4, b4, d4, M4, n4.vertical ? wu.horizontal : wu.horizontalOnly, W3 ? Object.keys(n4.horizontal) : [H3], O4, D4, w4, S4), W3) {
|
@@ -8876,8 +8876,8 @@
|
|
8876
8876
|
}
|
8877
8877
|
} else if ("Point" === e3.type) {
|
8878
8878
|
for (var J2 = 0, H2 = e3.geometry; J2 < H2.length; J2 += 1) {
|
8879
|
-
for (var Y2 = 0, $
|
8880
|
-
var W2 = $
|
8879
|
+
for (var Y2 = 0, $3 = H2[J2]; Y2 < $3.length; Y2 += 1) {
|
8880
|
+
var W2 = $3[Y2];
|
8881
8881
|
P3([W2], new Fu(W2.x, W2.y, 0));
|
8882
8882
|
}
|
8883
8883
|
}
|
@@ -9453,7 +9453,7 @@
|
|
9453
9453
|
e2.minX = Math.min(e2.minX, t2[r2]), e2.minY = Math.min(e2.minY, t2[r2 + 1]), e2.maxX = Math.max(e2.maxX, t2[r2]), e2.maxY = Math.max(e2.maxY, t2[r2 + 1]);
|
9454
9454
|
}
|
9455
9455
|
}
|
9456
|
-
function $(e2, t2, r2, i2) {
|
9456
|
+
function $2(e2, t2, r2, i2) {
|
9457
9457
|
if (t2.geometry) {
|
9458
9458
|
var o2 = t2.geometry.coordinates, n2 = t2.geometry.type, a2 = Math.pow(r2.tolerance / ((1 << r2.maxZoom) * r2.extent), 2), s2 = [], l2 = t2.id;
|
9459
9459
|
if (r2.promoteId ? l2 = t2.properties[r2.promoteId] : r2.generateId && (l2 = i2 || 0), "Point" === n2) {
|
@@ -9478,7 +9478,7 @@
|
|
9478
9478
|
if ("MultiPolygon" !== n2) {
|
9479
9479
|
if ("GeometryCollection" === n2) {
|
9480
9480
|
for (u2 = 0; u2 < t2.geometry.geometries.length; u2++) {
|
9481
|
-
$(e2, { id: l2, geometry: t2.geometry.geometries[u2], properties: t2.properties }, r2, i2);
|
9481
|
+
$2(e2, { id: l2, geometry: t2.geometry.geometries[u2], properties: t2.properties }, r2, i2);
|
9482
9482
|
}
|
9483
9483
|
return;
|
9484
9484
|
}
|
@@ -9735,10 +9735,10 @@
|
|
9735
9735
|
var r3 = [];
|
9736
9736
|
if ("FeatureCollection" === e3.type) {
|
9737
9737
|
for (var i3 = 0; i3 < e3.features.length; i3++) {
|
9738
|
-
$(r3, e3.features[i3], t3, i3);
|
9738
|
+
$2(r3, e3.features[i3], t3, i3);
|
9739
9739
|
}
|
9740
9740
|
} else {
|
9741
|
-
$(r3, "Feature" === e3.type ? e3 : { geometry: e3 }, t3);
|
9741
|
+
$2(r3, "Feature" === e3.type ? e3 : { geometry: e3 }, t3);
|
9742
9742
|
}
|
9743
9743
|
return r3;
|
9744
9744
|
}(e2, t2);
|
@@ -11155,7 +11155,7 @@
|
|
11155
11155
|
t3 ? e3.enable(e3.STENCIL_TEST) : e3.disable(e3.STENCIL_TEST), this.current = t3, this.dirty = false;
|
11156
11156
|
}
|
11157
11157
|
}, e2;
|
11158
|
-
}(j), $ = function(t2) {
|
11158
|
+
}(j), $2 = function(t2) {
|
11159
11159
|
function e2() {
|
11160
11160
|
t2.apply(this, arguments);
|
11161
11161
|
}
|
@@ -11451,7 +11451,7 @@
|
|
11451
11451
|
};
|
11452
11452
|
Ct.disabled = new Ct(false, 1029, 2305), Ct.backCCW = new Ct(true, 1029, 2305);
|
11453
11453
|
var zt = function(t2) {
|
11454
|
-
this.gl = t2, this.extVertexArrayObject = this.gl.getExtension("OES_vertex_array_object"), this.clearColor = new V(this), this.clearDepth = new G(this), this.clearStencil = new W(this), this.colorMask = new X(this), this.depthMask = new H(this), this.stencilMask = new K(this), this.stencilFunc = new Y(this), this.stencilOp = new J(this), this.stencilTest = new Q(this), this.depthRange = new $(this), this.depthTest = new tt(this), this.depthFunc = new et(this), this.blend = new it(this), this.blendFunc = new ot(this), this.blendColor = new rt(this), this.blendEquation = new at(this), this.cullFace = new nt(this), this.cullFaceSide = new st(this), this.frontFace = new lt(this), this.program = new ct(this), this.activeTexture = new ut(this), this.viewport = new ht(this), this.bindFramebuffer = new pt(this), this.bindRenderbuffer = new dt(this), this.bindTexture = new _t(this), this.bindVertexBuffer = new ft(this), this.bindElementBuffer = new mt(this), this.bindVertexArrayOES = this.extVertexArrayObject && new gt(this), this.pixelStoreUnpack = new vt(this), this.pixelStoreUnpackPremultiplyAlpha = new yt(this), this.pixelStoreUnpackFlipY = new xt(this), this.extTextureFilterAnisotropic = t2.getExtension("EXT_texture_filter_anisotropic") || t2.getExtension("MOZ_EXT_texture_filter_anisotropic") || t2.getExtension("WEBKIT_EXT_texture_filter_anisotropic"), this.extTextureFilterAnisotropic && (this.extTextureFilterAnisotropicMax = t2.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)), this.extTextureHalfFloat = t2.getExtension("OES_texture_half_float"), this.extTextureHalfFloat && (t2.getExtension("OES_texture_half_float_linear"), this.extRenderToTextureHalfFloat = t2.getExtension("EXT_color_buffer_half_float")), this.extTimerQuery = t2.getExtension("EXT_disjoint_timer_query"), this.maxTextureSize = t2.getParameter(t2.MAX_TEXTURE_SIZE);
|
11454
|
+
this.gl = t2, this.extVertexArrayObject = this.gl.getExtension("OES_vertex_array_object"), this.clearColor = new V(this), this.clearDepth = new G(this), this.clearStencil = new W(this), this.colorMask = new X(this), this.depthMask = new H(this), this.stencilMask = new K(this), this.stencilFunc = new Y(this), this.stencilOp = new J(this), this.stencilTest = new Q(this), this.depthRange = new $2(this), this.depthTest = new tt(this), this.depthFunc = new et(this), this.blend = new it(this), this.blendFunc = new ot(this), this.blendColor = new rt(this), this.blendEquation = new at(this), this.cullFace = new nt(this), this.cullFaceSide = new st(this), this.frontFace = new lt(this), this.program = new ct(this), this.activeTexture = new ut(this), this.viewport = new ht(this), this.bindFramebuffer = new pt(this), this.bindRenderbuffer = new dt(this), this.bindTexture = new _t(this), this.bindVertexBuffer = new ft(this), this.bindElementBuffer = new mt(this), this.bindVertexArrayOES = this.extVertexArrayObject && new gt(this), this.pixelStoreUnpack = new vt(this), this.pixelStoreUnpackPremultiplyAlpha = new yt(this), this.pixelStoreUnpackFlipY = new xt(this), this.extTextureFilterAnisotropic = t2.getExtension("EXT_texture_filter_anisotropic") || t2.getExtension("MOZ_EXT_texture_filter_anisotropic") || t2.getExtension("WEBKIT_EXT_texture_filter_anisotropic"), this.extTextureFilterAnisotropic && (this.extTextureFilterAnisotropicMax = t2.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)), this.extTextureHalfFloat = t2.getExtension("OES_texture_half_float"), this.extTextureHalfFloat && (t2.getExtension("OES_texture_half_float_linear"), this.extRenderToTextureHalfFloat = t2.getExtension("EXT_color_buffer_half_float")), this.extTimerQuery = t2.getExtension("EXT_disjoint_timer_query"), this.maxTextureSize = t2.getParameter(t2.MAX_TEXTURE_SIZE);
|
11455
11455
|
};
|
11456
11456
|
zt.prototype.setDefault = function() {
|
11457
11457
|
this.unbindVAO(), this.clearColor.setDefault(), this.clearDepth.setDefault(), this.clearStencil.setDefault(), this.colorMask.setDefault(), this.depthMask.setDefault(), this.stencilMask.setDefault(), this.stencilFunc.setDefault(), this.stencilOp.setDefault(), this.stencilTest.setDefault(), this.depthRange.setDefault(), this.depthTest.setDefault(), this.depthFunc.setDefault(), this.blend.setDefault(), this.blendFunc.setDefault(), this.blendColor.setDefault(), this.blendEquation.setDefault(), this.cullFace.setDefault(), this.cullFaceSide.setDefault(), this.frontFace.setDefault(), this.program.setDefault(), this.activeTexture.setDefault(), this.bindFramebuffer.setDefault(), this.pixelStoreUnpack.setDefault(), this.pixelStoreUnpackPremultiplyAlpha.setDefault(), this.pixelStoreUnpackFlipY.setDefault();
|
@@ -12452,8 +12452,8 @@
|
|
12452
12452
|
if (K2 || Y2 ? Y2 ? K2 || (P3 = P3 && T3) : T3 = P3 && T3 : P3 = T3 = P3 && T3, T3 && d3 && d3.box && r2.collisionIndex.insertCollisionBox(d3.box, s2.get("text-ignore-placement"), n2.bucketInstanceId, D3 && D3.box && R2 ? R2 : L2, f2.ID), P3 && M2 && r2.collisionIndex.insertCollisionBox(M2.box, s2.get("icon-ignore-placement"), n2.bucketInstanceId, k2, f2.ID), A3 && (T3 && r2.collisionIndex.insertCollisionCircles(A3.circles, s2.get("text-ignore-placement"), n2.bucketInstanceId, L2, f2.ID), o2)) {
|
12453
12453
|
var J2 = n2.bucketInstanceId, Q2 = r2.collisionCircleArrays[J2];
|
12454
12454
|
void 0 === Q2 && (Q2 = r2.collisionCircleArrays[J2] = new me());
|
12455
|
-
for (var $
|
12456
|
-
Q2.circles.push(A3.circles[$
|
12455
|
+
for (var $3 = 0; $3 < A3.circles.length; $3 += 4) {
|
12456
|
+
Q2.circles.push(A3.circles[$3 + 0]), Q2.circles.push(A3.circles[$3 + 1]), Q2.circles.push(A3.circles[$3 + 2]), Q2.circles.push(A3.collisionDetected ? 1 : 0);
|
12457
12457
|
}
|
12458
12458
|
}
|
12459
12459
|
r2.placements[e3.crossTileID] = new fe(T3 || E2, P3 || I2, S3 || n2.justReloaded), i2[e3.crossTileID] = true;
|
@@ -13710,15 +13710,15 @@
|
|
13710
13710
|
}
|
13711
13711
|
var V2 = pe(C2, 1, e2.transform.zoom), G2 = Jt(S2.posMatrix, g2, m2, e2.transform, V2), W2 = Qt(S2.posMatrix, g2, m2, e2.transform, V2), X2 = T2 && z2.hasTextData(), H2 = "none" !== o2.layout.get("icon-text-fit") && X2 && z2.hasIconData();
|
13712
13712
|
v2 && ie(z2, S2.posMatrix, e2, a2, G2, W2, g2, u2);
|
13713
|
-
var K2 = e2.translatePosMatrix(S2.posMatrix, C2, n2, s2), Y2 = v2 || a2 && T2 || H2 ? Ji : G2, J2 = e2.translatePosMatrix(W2, C2, n2, s2, true), Q2 = M2 && 0 !== o2.paint.get(a2 ? "text-halo-width" : "icon-halo-width").constantOr(1), $
|
13713
|
+
var K2 = e2.translatePosMatrix(S2.posMatrix, C2, n2, s2), Y2 = v2 || a2 && T2 || H2 ? Ji : G2, J2 = e2.translatePosMatrix(W2, C2, n2, s2, true), Q2 = M2 && 0 !== o2.paint.get(a2 ? "text-halo-width" : "icon-halo-width").constantOr(1), $3 = { program: k2, buffers: D2, uniformValues: M2 ? z2.iconsInText ? Wi(L2.kind, B2, y2, g2, e2, K2, Y2, J2, O2, F2) : Gi(L2.kind, B2, y2, g2, e2, K2, Y2, J2, a2, O2, true) : Vi(L2.kind, B2, y2, g2, e2, K2, Y2, J2, a2, O2), atlasTexture: U2, atlasTextureIcon: Z2, atlasInterpolation: N2, atlasInterpolationIcon: q2, isSDF: M2, hasHalo: Q2 };
|
13714
13714
|
if (x2 && z2.canOverlap) {
|
13715
13715
|
b2 = true;
|
13716
13716
|
for (var tt2 = 0, et2 = D2.segments.get(); tt2 < et2.length; tt2 += 1) {
|
13717
13717
|
var it2 = et2[tt2];
|
13718
|
-
E2.push({ segments: new t.SegmentVector([it2]), sortKey: it2.sortKey, state: $
|
13718
|
+
E2.push({ segments: new t.SegmentVector([it2]), sortKey: it2.sortKey, state: $3 });
|
13719
13719
|
}
|
13720
13720
|
} else {
|
13721
|
-
E2.push({ segments: D2.segments, sortKey: 0, state: $
|
13721
|
+
E2.push({ segments: D2.segments, sortKey: 0, state: $3 });
|
13722
13722
|
}
|
13723
13723
|
}
|
13724
13724
|
}
|
@@ -19667,6 +19667,21 @@
|
|
19667
19667
|
var accordion_controller_default = class extends Controller {
|
19668
19668
|
connect() {
|
19669
19669
|
this.initAccordion();
|
19670
|
+
this.initDefaultState();
|
19671
|
+
}
|
19672
|
+
initDefaultState() {
|
19673
|
+
const items = this.element.querySelectorAll(".accordion_item");
|
19674
|
+
switch ($(this.element).data("default-state")) {
|
19675
|
+
case "all_closed":
|
19676
|
+
this.hideAll(items);
|
19677
|
+
break;
|
19678
|
+
case "all_opened":
|
19679
|
+
this.showAll(items);
|
19680
|
+
break;
|
19681
|
+
case "first_opened":
|
19682
|
+
this.hideAll(items);
|
19683
|
+
this.open(items[0].querySelector(".accordion_content"));
|
19684
|
+
}
|
19670
19685
|
}
|
19671
19686
|
initAccordion() {
|
19672
19687
|
const items = this.element.querySelectorAll(".accordion_item");
|
@@ -19677,6 +19692,9 @@
|
|
19677
19692
|
if (content.classList.contains("accordion_active")) {
|
19678
19693
|
this.hide(content);
|
19679
19694
|
} else {
|
19695
|
+
if ($(this.element).data("multiple-open") != true) {
|
19696
|
+
this.hideAll(items);
|
19697
|
+
}
|
19680
19698
|
this.open(content);
|
19681
19699
|
}
|
19682
19700
|
});
|
@@ -19685,6 +19703,9 @@
|
|
19685
19703
|
hideAll(items) {
|
19686
19704
|
items.forEach((item) => this.hide(item.querySelector(".accordion_content")));
|
19687
19705
|
}
|
19706
|
+
showAll(items) {
|
19707
|
+
items.forEach((item) => this.open(item.querySelector(".accordion_content")));
|
19708
|
+
}
|
19688
19709
|
hide(item) {
|
19689
19710
|
item.classList.remove("accordion_active");
|
19690
19711
|
item.style.height = 0;
|