actiontext 7.0.0.rc3 → 7.0.2.1

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: d2c66aac7b1ea1c36539ab957abb912869259919475431e061e6fdc6ed78c3aa
4
- data.tar.gz: 3079059759accd5007aea3d712273a7a39f1fc62645244a6a5dad8affee700e4
3
+ metadata.gz: 933af844db7ed84866798cffd76980cb97fb6bb9b41caa22de82b6c5000f8bfb
4
+ data.tar.gz: 84adf4c4081c693987fb3fb5d875cd820499553360ba6b9bb2294ba134f147e7
5
5
  SHA512:
6
- metadata.gz: 3e2bb9163a03021d5551144f8b631143e62dcbdf6c97e54a996f499ab8f9e3103049ea252fbfe531acf9382014502c8962448d9f1aeb728b587fc2584351d081
7
- data.tar.gz: 7e29faedc27507dd79bcbccab77e7f3314f6d0b3633090a47dd9c65b665a412846a94193278894edf0ba3295f4fefb54d635816ade17f3c651265efd762d7934
6
+ metadata.gz: 2916fbbba410339715c5872fe92dcc02fb2de2d273ab0376614f22a62631549071bbfee7beb964831df6d09783d75bc09c04a51eb6921c8920d9b171bc4eee07
7
+ data.tar.gz: af22c9af3bf680742b30ab283fb8e8fd0f6641bed2839a48b2445287edca60c71a99dd632a06312639e84dca70822eb587f48e88633ea2f2e3f533a5f5c36242
data/CHANGELOG.md CHANGED
@@ -1,3 +1,23 @@
1
+ ## Rails 7.0.2.1 (February 11, 2022) ##
2
+
3
+ * No changes.
4
+
5
+
6
+ ## Rails 7.0.2 (February 08, 2022) ##
7
+
8
+ * No changes.
9
+
10
+
11
+ ## Rails 7.0.1 (January 06, 2022) ##
12
+
13
+ * No changes.
14
+
15
+
16
+ ## Rails 7.0.0 (December 15, 2021) ##
17
+
18
+ * No changes.
19
+
20
+
1
21
  ## Rails 7.0.0.rc3 (December 14, 2021) ##
2
22
 
3
23
  * No changes.
@@ -5,6 +25,10 @@
5
25
 
6
26
  ## Rails 7.0.0.rc2 (December 14, 2021) ##
7
27
 
28
+ * No changes.
29
+
30
+ ## Rails 7.0.0.rc1 (December 06, 2021) ##
31
+
8
32
  * Fix an issue with how nested lists were displayed when converting to plain text
9
33
 
10
34
  *Matt Swanson*
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 = "rc3"
12
+ TINY = 2
13
+ PRE = "1"
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-rc3",
3
+ "version": "7.0.2-1",
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,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: actiontext
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.0.rc3
4
+ version: 7.0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Javan Makhmali
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2021-12-14 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.rc3
21
+ version: 7.0.2.1
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.rc3
28
+ version: 7.0.2.1
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.rc3
35
+ version: 7.0.2.1
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.rc3
42
+ version: 7.0.2.1
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.rc3
49
+ version: 7.0.2.1
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.rc3
56
+ version: 7.0.2.1
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.rc3
63
+ version: 7.0.2.1
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.rc3
70
+ version: 7.0.2.1
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: nokogiri
73
73
  requirement: !ruby/object:Gem::Requirement
@@ -160,10 +160,10 @@ 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.rc3/actiontext/CHANGELOG.md
164
- documentation_uri: https://api.rubyonrails.org/v7.0.0.rc3/
163
+ changelog_uri: https://github.com/rails/rails/blob/v7.0.2.1/actiontext/CHANGELOG.md
164
+ documentation_uri: https://api.rubyonrails.org/v7.0.2.1/
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.rc3/actiontext
166
+ source_code_uri: https://github.com/rails/rails/tree/v7.0.2.1/actiontext
167
167
  rubygems_mfa_required: 'true'
168
168
  post_install_message:
169
169
  rdoc_options: []
@@ -176,11 +176,11 @@ 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: 1.3.1
181
+ version: '0'
182
182
  requirements: []
183
- rubygems_version: 3.2.15
183
+ rubygems_version: 3.2.22
184
184
  signing_key:
185
185
  specification_version: 4
186
186
  summary: Rich text framework.