actiontext 7.0.0 → 7.0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5c3bc8decbe98ba953865720f5f520adc3c027006945c8ff12c5e117d288cfaf
4
- data.tar.gz: bb4f6cd53d84555f07f19ecc5a0e66e86ec1083daca743111301a62ff72851ae
3
+ metadata.gz: 32502b1c0aad6a2d504e410a6497600c2b8d661087299dc3a068d9986f7dbeb6
4
+ data.tar.gz: a8d571ecf55cfd56b5649f088207cb25ca37492477162c3adaff63ced131dbec
5
5
  SHA512:
6
- metadata.gz: 6019b83a82205dbb9351b4d7e79fc5d30d84de0031d25ebe5887772ca99b3280c6258262512eac47cff36f4fdaa673de35f2777135438fbc58874a920248856f
7
- data.tar.gz: 36f3e55d315bb31e865057589fd95320fa95a4994a3c619285f532000f193089a4e93e8ed71699432979391f486e133bb73d1361dc5f0b7eadefd56e6d832362
6
+ metadata.gz: 1337319d88d1b2c04efe0673e5fd5c3451975d6532e72b5cd82d9ff26becee32cb28d3c97fb1e93149cd9872611bf907785bead692dd02aba83e2fe6404fe733
7
+ data.tar.gz: c11b4e75fb01183dfd59092c532321fc1eae9bb2806639fd1a274646f5fb81e1fc4fb095d1a635426aa3582e1243676f3176cbb3a714cd1c0315e0539fa2000a
data/CHANGELOG.md CHANGED
@@ -1,3 +1,23 @@
1
+ ## Rails 7.0.2.2 (February 11, 2022) ##
2
+
3
+ * No changes.
4
+
5
+
6
+ ## Rails 7.0.2.1 (February 11, 2022) ##
7
+
8
+ * No changes.
9
+
10
+
11
+ ## Rails 7.0.2 (February 08, 2022) ##
12
+
13
+ * No changes.
14
+
15
+
16
+ ## Rails 7.0.1 (January 06, 2022) ##
17
+
18
+ * No changes.
19
+
20
+
1
21
  ## Rails 7.0.0 (December 15, 2021) ##
2
22
 
3
23
  * No changes.
data/MIT-LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2020-2021 Basecamp, LLC
3
+ Copyright (c) 2020-2022 Basecamp, LLC
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -506,16 +506,14 @@ var activestorage = {exports: {}};
506
506
  }
507
507
  }
508
508
  class BlobRecord {
509
- constructor(file, checksum, url, directUploadToken, attachmentName) {
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, directUploadToken, attachmentName, delegate) {
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, this.directUploadToken, this.attachmentName);
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.directUploadToken, this.attachmentName, 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.directUploadToken, this.directUploadAttachmentName, 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.directUploadToken, this.attachmentName, 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
  }
@@ -9,8 +9,8 @@ module ActionText
9
9
  module VERSION
10
10
  MAJOR = 7
11
11
  MINOR = 0
12
- TINY = 0
13
- PRE = nil
12
+ TINY = 2
13
+ PRE = "2"
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
16
16
  end
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rails/actiontext",
3
- "version": "7.0.0",
3
+ "version": "7.0.2-2",
4
4
  "description": "Edit and display rich text in Rails applications",
5
5
  "main": "app/javascript/actiontext/index.js",
6
6
  "type": "module",
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.0
4
+ version: 7.0.2.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: 2021-12-15 00:00:00.000000000 Z
13
+ date: 2022-02-11 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.0
21
+ version: 7.0.2.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.0
28
+ version: 7.0.2.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.0
35
+ version: 7.0.2.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.0
42
+ version: 7.0.2.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.0
49
+ version: 7.0.2.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.0
56
+ version: 7.0.2.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.0
63
+ version: 7.0.2.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.0
70
+ version: 7.0.2.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.0/actiontext/CHANGELOG.md
164
- documentation_uri: https://api.rubyonrails.org/v7.0.0/
163
+ changelog_uri: https://github.com/rails/rails/blob/v7.0.2.2/actiontext/CHANGELOG.md
164
+ documentation_uri: https://api.rubyonrails.org/v7.0.2.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.0/actiontext
166
+ source_code_uri: https://github.com/rails/rails/tree/v7.0.2.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
@@ -180,8 +180,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
180
180
  - !ruby/object:Gem::Version
181
181
  version: '0'
182
182
  requirements: []
183
- rubygems_version: 3.2.32
184
- signing_key:
183
+ rubygems_version: 3.2.22
184
+ signing_key:
185
185
  specification_version: 4
186
186
  summary: Rich text framework.
187
187
  test_files: []