actiontext 7.0.0.rc2 → 7.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +24 -0
- data/MIT-LICENSE +1 -1
- data/app/assets/javascripts/actiontext.js +7 -27
- data/app/helpers/action_text/tag_helper.rb +0 -8
- data/app/javascript/actiontext/attachment_upload.js +1 -8
- data/lib/action_text/gem_version.rb +2 -2
- data/package.json +1 -1
- metadata +19 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f56744d9d099b5b762e63296c602589aaf59a8a2dba676c15d6e36da0fb0aa2
|
4
|
+
data.tar.gz: ef34b150c59b4d0f7ad9e13eacf41f949fd10cd40d12e9a0ea2aecb4f7ef561e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 14573ba5cac1acb537ce33dfc61894ce918948000ffe455b46abbf862d5e6b6f490a33469db2e68c9e1f2b7af72e05a467ef17e777fd38c77d480a7395e3264b
|
7
|
+
data.tar.gz: f536a90a0a0877510b1d2c825cf55a21e73c8da02afc78b819c619fe32dc095656cef188ba46c6122b330bdf7e0f8889b75deb65c81847bb818ad6b467379258
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,29 @@
|
|
1
|
+
## Rails 7.0.2 (February 08, 2022) ##
|
2
|
+
|
3
|
+
* No changes.
|
4
|
+
|
5
|
+
|
6
|
+
## Rails 7.0.1 (January 06, 2022) ##
|
7
|
+
|
8
|
+
* No changes.
|
9
|
+
|
10
|
+
|
11
|
+
## Rails 7.0.0 (December 15, 2021) ##
|
12
|
+
|
13
|
+
* No changes.
|
14
|
+
|
15
|
+
|
16
|
+
## Rails 7.0.0.rc3 (December 14, 2021) ##
|
17
|
+
|
18
|
+
* No changes.
|
19
|
+
|
20
|
+
|
1
21
|
## Rails 7.0.0.rc2 (December 14, 2021) ##
|
2
22
|
|
23
|
+
* No changes.
|
24
|
+
|
25
|
+
## Rails 7.0.0.rc1 (December 06, 2021) ##
|
26
|
+
|
3
27
|
* Fix an issue with how nested lists were displayed when converting to plain text
|
4
28
|
|
5
29
|
*Matt Swanson*
|
data/MIT-LICENSE
CHANGED
@@ -506,16 +506,14 @@ var activestorage = {exports: {}};
|
|
506
506
|
}
|
507
507
|
}
|
508
508
|
class BlobRecord {
|
509
|
-
constructor(file, checksum, url
|
509
|
+
constructor(file, checksum, url) {
|
510
510
|
this.file = file;
|
511
511
|
this.attributes = {
|
512
512
|
filename: file.name,
|
513
513
|
content_type: file.type || "application/octet-stream",
|
514
514
|
byte_size: file.size,
|
515
|
-
checksum: checksum
|
515
|
+
checksum: checksum
|
516
516
|
};
|
517
|
-
this.directUploadToken = directUploadToken;
|
518
|
-
this.attachmentName = attachmentName;
|
519
517
|
this.xhr = new XMLHttpRequest;
|
520
518
|
this.xhr.open("POST", url, true);
|
521
519
|
this.xhr.responseType = "json";
|
@@ -543,9 +541,7 @@ var activestorage = {exports: {}};
|
|
543
541
|
create(callback) {
|
544
542
|
this.callback = callback;
|
545
543
|
this.xhr.send(JSON.stringify({
|
546
|
-
blob: this.attributes
|
547
|
-
direct_upload_token: this.directUploadToken,
|
548
|
-
attachment_name: this.attachmentName
|
544
|
+
blob: this.attributes
|
549
545
|
}));
|
550
546
|
}
|
551
547
|
requestDidLoad(event) {
|
@@ -603,12 +599,10 @@ var activestorage = {exports: {}};
|
|
603
599
|
}
|
604
600
|
let id = 0;
|
605
601
|
class DirectUpload {
|
606
|
-
constructor(file, url,
|
602
|
+
constructor(file, url, delegate) {
|
607
603
|
this.id = ++id;
|
608
604
|
this.file = file;
|
609
605
|
this.url = url;
|
610
|
-
this.directUploadToken = directUploadToken;
|
611
|
-
this.attachmentName = attachmentName;
|
612
606
|
this.delegate = delegate;
|
613
607
|
}
|
614
608
|
create(callback) {
|
@@ -617,7 +611,7 @@ var activestorage = {exports: {}};
|
|
617
611
|
callback(error);
|
618
612
|
return;
|
619
613
|
}
|
620
|
-
const blob = new BlobRecord(this.file, checksum, this.url
|
614
|
+
const blob = new BlobRecord(this.file, checksum, this.url);
|
621
615
|
notify(this.delegate, "directUploadWillCreateBlobWithXHR", blob.xhr);
|
622
616
|
blob.create((error => {
|
623
617
|
if (error) {
|
@@ -646,7 +640,7 @@ var activestorage = {exports: {}};
|
|
646
640
|
constructor(input, file) {
|
647
641
|
this.input = input;
|
648
642
|
this.file = file;
|
649
|
-
this.directUpload = new DirectUpload(this.file, this.url, this
|
643
|
+
this.directUpload = new DirectUpload(this.file, this.url, this);
|
650
644
|
this.dispatch("initialize");
|
651
645
|
}
|
652
646
|
start(callback) {
|
@@ -677,12 +671,6 @@ var activestorage = {exports: {}};
|
|
677
671
|
get url() {
|
678
672
|
return this.input.getAttribute("data-direct-upload-url");
|
679
673
|
}
|
680
|
-
get directUploadToken() {
|
681
|
-
return this.input.getAttribute("data-direct-upload-token");
|
682
|
-
}
|
683
|
-
get attachmentName() {
|
684
|
-
return this.input.getAttribute("data-direct-upload-attachment-name");
|
685
|
-
}
|
686
674
|
dispatch(name, detail = {}) {
|
687
675
|
detail.file = this.file;
|
688
676
|
detail.id = this.directUpload.id;
|
@@ -842,7 +830,7 @@ class AttachmentUpload {
|
|
842
830
|
constructor(attachment, element) {
|
843
831
|
this.attachment = attachment;
|
844
832
|
this.element = element;
|
845
|
-
this.directUpload = new activestorage.exports.DirectUpload(attachment.file, this.directUploadUrl, this
|
833
|
+
this.directUpload = new activestorage.exports.DirectUpload(attachment.file, this.directUploadUrl, this);
|
846
834
|
}
|
847
835
|
|
848
836
|
start() {
|
@@ -877,14 +865,6 @@ class AttachmentUpload {
|
|
877
865
|
return this.element.dataset.directUploadUrl
|
878
866
|
}
|
879
867
|
|
880
|
-
get directUploadToken() {
|
881
|
-
return this.element.dataset.directUploadToken
|
882
|
-
}
|
883
|
-
|
884
|
-
get directUploadAttachmentName() {
|
885
|
-
return this.element.dataset.directUploadAttachmentName
|
886
|
-
}
|
887
|
-
|
888
868
|
get blobUrlTemplate() {
|
889
869
|
return this.element.dataset.blobUrlTemplate
|
890
870
|
}
|
@@ -32,14 +32,6 @@ module ActionText
|
|
32
32
|
options[:data][:direct_upload_url] ||= main_app.rails_direct_uploads_url
|
33
33
|
options[:data][:blob_url_template] ||= main_app.rails_service_blob_url(":signed_id", ":filename")
|
34
34
|
|
35
|
-
class_with_attachment = "ActionText::RichText#embeds"
|
36
|
-
options[:data][:direct_upload_attachment_name] ||= class_with_attachment
|
37
|
-
options[:data][:direct_upload_token] = ActiveStorage::DirectUploadToken.generate_direct_upload_token(
|
38
|
-
class_with_attachment,
|
39
|
-
ActiveStorage::Blob.service.name,
|
40
|
-
session
|
41
|
-
)
|
42
|
-
|
43
35
|
editor_tag = content_tag("trix-editor", "", options)
|
44
36
|
input_tag = hidden_field_tag(name, value.try(:to_trix_html) || value, id: options[:input], form: form)
|
45
37
|
|
@@ -4,7 +4,7 @@ export class AttachmentUpload {
|
|
4
4
|
constructor(attachment, element) {
|
5
5
|
this.attachment = attachment
|
6
6
|
this.element = element
|
7
|
-
this.directUpload = new DirectUpload(attachment.file, this.directUploadUrl, this
|
7
|
+
this.directUpload = new DirectUpload(attachment.file, this.directUploadUrl, this)
|
8
8
|
}
|
9
9
|
|
10
10
|
start() {
|
@@ -42,11 +42,4 @@ export class AttachmentUpload {
|
|
42
42
|
get blobUrlTemplate() {
|
43
43
|
return this.element.dataset.blobUrlTemplate
|
44
44
|
}
|
45
|
-
|
46
|
-
get directUploadToken() {
|
47
|
-
return this.element.getAttribute("data-direct-upload-token");
|
48
|
-
}
|
49
|
-
get attachmentName() {
|
50
|
-
return this.element.getAttribute("data-direct-upload-attachment-name");
|
51
|
-
}
|
52
45
|
}
|
data/package.json
CHANGED
metadata
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: actiontext
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.0.
|
4
|
+
version: 7.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Javan Makhmali
|
8
8
|
- Sam Stephenson
|
9
9
|
- David Heinemeier Hansson
|
10
|
-
autorequire:
|
10
|
+
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2022-02-08 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|
@@ -18,56 +18,56 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - '='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 7.0.
|
21
|
+
version: 7.0.2
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
26
|
- - '='
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version: 7.0.
|
28
|
+
version: 7.0.2
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: activerecord
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
32
32
|
requirements:
|
33
33
|
- - '='
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version: 7.0.
|
35
|
+
version: 7.0.2
|
36
36
|
type: :runtime
|
37
37
|
prerelease: false
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
40
|
- - '='
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: 7.0.
|
42
|
+
version: 7.0.2
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: activestorage
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
47
|
- - '='
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version: 7.0.
|
49
|
+
version: 7.0.2
|
50
50
|
type: :runtime
|
51
51
|
prerelease: false
|
52
52
|
version_requirements: !ruby/object:Gem::Requirement
|
53
53
|
requirements:
|
54
54
|
- - '='
|
55
55
|
- !ruby/object:Gem::Version
|
56
|
-
version: 7.0.
|
56
|
+
version: 7.0.2
|
57
57
|
- !ruby/object:Gem::Dependency
|
58
58
|
name: actionpack
|
59
59
|
requirement: !ruby/object:Gem::Requirement
|
60
60
|
requirements:
|
61
61
|
- - '='
|
62
62
|
- !ruby/object:Gem::Version
|
63
|
-
version: 7.0.
|
63
|
+
version: 7.0.2
|
64
64
|
type: :runtime
|
65
65
|
prerelease: false
|
66
66
|
version_requirements: !ruby/object:Gem::Requirement
|
67
67
|
requirements:
|
68
68
|
- - '='
|
69
69
|
- !ruby/object:Gem::Version
|
70
|
-
version: 7.0.
|
70
|
+
version: 7.0.2
|
71
71
|
- !ruby/object:Gem::Dependency
|
72
72
|
name: nokogiri
|
73
73
|
requirement: !ruby/object:Gem::Requirement
|
@@ -160,12 +160,12 @@ licenses:
|
|
160
160
|
- MIT
|
161
161
|
metadata:
|
162
162
|
bug_tracker_uri: https://github.com/rails/rails/issues
|
163
|
-
changelog_uri: https://github.com/rails/rails/blob/v7.0.
|
164
|
-
documentation_uri: https://api.rubyonrails.org/v7.0.
|
163
|
+
changelog_uri: https://github.com/rails/rails/blob/v7.0.2/actiontext/CHANGELOG.md
|
164
|
+
documentation_uri: https://api.rubyonrails.org/v7.0.2/
|
165
165
|
mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
|
166
|
-
source_code_uri: https://github.com/rails/rails/tree/v7.0.
|
166
|
+
source_code_uri: https://github.com/rails/rails/tree/v7.0.2/actiontext
|
167
167
|
rubygems_mfa_required: 'true'
|
168
|
-
post_install_message:
|
168
|
+
post_install_message:
|
169
169
|
rdoc_options: []
|
170
170
|
require_paths:
|
171
171
|
- lib
|
@@ -176,12 +176,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
176
176
|
version: 2.7.0
|
177
177
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
178
178
|
requirements:
|
179
|
-
- - "
|
179
|
+
- - ">="
|
180
180
|
- !ruby/object:Gem::Version
|
181
|
-
version:
|
181
|
+
version: '0'
|
182
182
|
requirements: []
|
183
|
-
rubygems_version: 3.2.
|
184
|
-
signing_key:
|
183
|
+
rubygems_version: 3.2.32
|
184
|
+
signing_key:
|
185
185
|
specification_version: 4
|
186
186
|
summary: Rich text framework.
|
187
187
|
test_files: []
|