bullet_train 1.0.53 → 1.0.56

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: 07f9ad294898254375ff48a5348d6eb1cc5e4a67b3916b67c2a9948951510a09
4
- data.tar.gz: 7b4b57ad229db84f180acabff26a21320891136bff644dfa38e9c44075da1514
3
+ metadata.gz: '050967e4734b7cf6e08bd50bc8d635f2e0ec1c8059e847efd1d9786b37ee86f1'
4
+ data.tar.gz: 574a852fe00ff37d765bbd0c20ce536500898008157edcea1006628724d1a0a3
5
5
  SHA512:
6
- metadata.gz: 2fc988b353bfd0b84f18e5506696402628e321f46ce1cfe0e2ab606c29e0c6a6f20e3be9f5f317ffadc82c8af4f0993fd9a2b1f12481b6eb804a161db3facdca
7
- data.tar.gz: a9b1fd87a1017b638b6c3a095cb8d3abbef7e86797f6023791e7f8af111b8889b7623df3f6ab8254adedbf42504967ebd9f72f03e4d12a7c7a8ddcf6515c2f85
6
+ metadata.gz: 409f086e28aaf12ec7747ec3491d7a46eef6164661f8ada07794a198a7e10b644ebe94bb2ef706900b36625a49b866a7a1df46effdaa5448ec279b08230673a1
7
+ data.tar.gz: 9ad4bf37185884ef87a175427e1b3ca8af2006ea693e932874fd0d1d788afc80fb29f16cdba703e7daf3f1ad251366af58054611b861e3109d59c949a81b6248
data/README.md CHANGED
@@ -22,7 +22,8 @@ gem install bullet_train
22
22
  ```
23
23
 
24
24
  ## Contributing
25
- Contribution directions go here.
25
+
26
+ See `RELEASE.md` for instructions on local development and for publishing both the gem and the npm package.
26
27
 
27
28
  ## License
28
29
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -43,7 +43,7 @@
43
43
 
44
44
  <% menu = capture do %>
45
45
  <div class="flex items-center flex-shrink-0 p-4 bg-blue-darker md:rounded-tl-lg">
46
- <%= image_tag image_path("light/logo/logo.png"), class: 'h-5 w-auto mx-auto' %>
46
+ <%= image_tag image_path("logo/logo.png"), class: 'h-5 w-auto mx-auto' %>
47
47
 
48
48
  <div class="lg:hidden absolute right-0">
49
49
  <button class="ml-1 flex items-center justify-center h-10 w-10 rounded-full focus:outline-none focus:ring-2 focus:ring-inset focus:ring-white"
@@ -376,7 +376,7 @@
376
376
  <tr>
377
377
  <td class="email-masthead">
378
378
  <a href="<%= root_url %>" class="email-masthead_name">
379
- <%= email_image_tag("light/logo/logo.png", width: image_width_for_height('light/logo/logo.png', 50), height: 50, style: "width: #{image_width_for_height('light/logo/logo.png', 50)}px; height: 50px;") %>
379
+ <%= email_image_tag("logo/logo.png", width: image_width_for_height("logo/logo.png", BulletTrain::Themes.logo_height), height: BulletTrain::Themes.logo_height, style: "width: #{image_width_for_height('logo/logo.png', BulletTrain::Themes.logo_height)}px; height: <%= BulletTrain::Themes.logo_height %>px;") %>
380
380
  </a>
381
381
  </td>
382
382
  </tr>
@@ -1,3 +1,3 @@
1
1
  module BulletTrain
2
- VERSION = "1.0.53"
2
+ VERSION = "1.0.56"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bullet_train
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.53
4
+ version: 1.0.56
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Culver
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-16 00:00:00.000000000 Z
11
+ date: 2022-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: standard
@@ -108,6 +108,20 @@ dependencies:
108
108
  - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: bullet_train-themes
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
111
125
  - !ruby/object:Gem::Dependency
112
126
  name: devise
113
127
  requirement: !ruby/object:Gem::Requirement
@@ -385,14 +399,6 @@ files:
385
399
  - README.md
386
400
  - Rakefile
387
401
  - app/assets/config/bullet_train_manifest.js
388
- - app/assets/javascripts/bullet-train.esm.js
389
- - app/assets/javascripts/bullet-train.esm.js.map
390
- - app/assets/javascripts/bullet-train.js
391
- - app/assets/javascripts/bullet-train.js.map
392
- - app/assets/javascripts/bullet-train.modern.js
393
- - app/assets/javascripts/bullet-train.modern.js.map
394
- - app/assets/javascripts/bullet-train.umd.js
395
- - app/assets/javascripts/bullet-train.umd.js.map
396
402
  - app/controllers/account/invitations_controller.rb
397
403
  - app/controllers/account/memberships_controller.rb
398
404
  - app/controllers/account/onboarding/user_details_controller.rb
@@ -606,7 +612,12 @@ licenses:
606
612
  metadata:
607
613
  homepage_uri: https://github.com/bullet-train-co/bullet_train
608
614
  source_code_uri: https://github.com/bullet-train-co/bullet_train
609
- post_install_message:
615
+ post_install_message: |2
616
+ If you're upgrading `bullet_train-*` Ruby gems and you run into any new
617
+ issues, you should probably also pull in updates from the Bullet Train
618
+ starter repository into your local application, just to make sure
619
+ everything is synced up. See https://bullettrain.co/docs/upgrades for
620
+ details.
610
621
  rdoc_options: []
611
622
  require_paths:
612
623
  - lib
@@ -1,2 +0,0 @@
1
- import{Controller as e}from"stimulus";function t(e){var t=(e.match(/^(?:\.\/)?(.+)(?:[_-]controller\..+?)$/)||[])[1];if(t)return t.replace(/_/g,"-").replace(/\//g,"--")}function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,n(e,t)}function n(e,t){return n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(e,t)}var i=function(e){function t(){return e.apply(this,arguments)||this}return r(t,e),t.prototype.copy=function(){this.inputTarget.value=this.sourceTarget.innerText,this.inputTarget.select(),document.execCommand("copy"),this.buttonTarget.innerHTML='<i id="copied" class="fas fa-check w-4 h-4 block text-green-600"></i>',setTimeout(function(){document.getElementById("copied").innerHTML='<i class="far fa-copy w-4 h-4 block text-gray-600"></i>'},1500)},t}(e);i.targets=["source","input","button"];var o=function(e){function t(){for(var t,r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return(t=e.call.apply(e,[this].concat(n))||this).removeTrailingNewlines=function(e){e.element.innerHTML.match(/<br><\/div>$/)&&(e.element.innerHTML=e.element.innerHTML.slice(0,-10)+"</div>",t.removeTrailingNewlines(e))},t.removeTrailingWhitespace=function(e){e.element.innerHTML.match(/&nbsp;<\/div>$/)?(e.element.innerHTML=e.element.innerHTML.slice(0,-12)+"</div>",t.removeTrailingWhitespace(e)):e.element.innerHTML.match(/&nbsp; <\/div>$/)&&(e.element.innerHTML=e.element.innerHTML.slice(0,-13)+"</div>",t.removeTrailingWhitespace(e))},t}r(t,e);var n=t.prototype;return n.resetOnSuccess=function(e){e.detail.success&&e.target.reset()},n.stripTrix=function(){var e=this;this.trixFieldTargets.forEach(function(t){e.removeTrailingNewlines(t.editor),e.removeTrailingWhitespace(t.editor),t.parentElement.querySelector("input").value=t.innerHTML})},n.submitOnReturn=function(e){if((e.metaKey||e.ctrlKey)&&13==e.keyCode){e.preventDefault();var t=e.target.closest("form");this.submitForm(t)}},n.submitForm=function(e){e.requestSubmit?e.requestSubmit():e.querySelector("[type=submit]").click()},t}(e);o.targets=["trixField","scroll"];var a=function(e){function t(){return e.apply(this,arguments)||this}r(t,e);var n,i,o=t.prototype;return o.toggle=function(){var e=this.isWrapperHidden?this.showEventNameValue:this.hideEventNameValue;this.isWrapperHidden&&this.showWrapper(),this.wrapperTarget.dispatchEvent(new CustomEvent(e))},o.showWrapper=function(){this.wrapperTarget.classList.remove(this.hiddenClass)},o.hideWrapper=function(){this.wrapperTarget.classList.add(this.hiddenClass)},n=t,(i=[{key:"isWrapperHidden",get:function(){return this.wrapperTarget.classList.contains(this.hiddenClass)}}])&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),t}(e);a.targets=["wrapper"],a.classes=["hidden"],a.values={showEventName:String,hideEventName:String};var s=[[i,"clipboard_controller.js"],[o,"form_controller.js"],[a,"mobile_menu_controller.js"]].map(function(e){var r=e[0];return{identifier:t(e[1]),controllerConstructor:r}});document.addEventListener("turbo:load",function(){navigator.userAgent.toLocaleLowerCase().includes("electron")&&document.body.classList.add("electron")});export{s as controllerDefinitions};
2
- //# sourceMappingURL=bullet-train.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bullet-train.esm.js","sources":["../../../node_modules/@stimulus/webpack-helpers/dist/index.js","../../javascript/controllers/clipboard_controller.js","../../javascript/controllers/form_controller.js","../../javascript/controllers/mobile_menu_controller.js","../../javascript/controllers/index.js","../../javascript/electron/index.js"],"sourcesContent":["export function definitionsFromContext(context) {\n return context.keys()\n .map(function (key) { return definitionForModuleWithContextAndKey(context, key); })\n .filter(function (value) { return value; });\n}\nfunction definitionForModuleWithContextAndKey(context, key) {\n var identifier = identifierForContextKey(key);\n if (identifier) {\n return definitionForModuleAndIdentifier(context(key), identifier);\n }\n}\nfunction definitionForModuleAndIdentifier(module, identifier) {\n var controllerConstructor = module.default;\n if (typeof controllerConstructor == \"function\") {\n return { identifier: identifier, controllerConstructor: controllerConstructor };\n }\n}\nexport function identifierForContextKey(key) {\n var logicalName = (key.match(/^(?:\\.\\/)?(.+)(?:[_-]controller\\..+?)$/) || [])[1];\n if (logicalName) {\n return logicalName.replace(/_/g, \"-\").replace(/\\//g, \"--\");\n }\n}\n//# sourceMappingURL=index.js.map","import { Controller } from 'stimulus'\n\nexport default class extends Controller {\n static targets = ['source', 'input', 'button']\n\n copy() {\n this.inputTarget.value = this.sourceTarget.innerText\n this.inputTarget.select()\n document.execCommand('copy')\n this.buttonTarget.innerHTML = '<i id=\"copied\" class=\"fas fa-check w-4 h-4 block text-green-600\"></i>'\n setTimeout(function () {\n document.getElementById('copied').innerHTML = '<i class=\"far fa-copy w-4 h-4 block text-gray-600\"></i>'\n }, 1500)\n }\n}\n","import { Controller } from 'stimulus'\n\n// TODO Some of this feels really specific to the conversation messages form. Should we rename this controller?\nexport default class extends Controller {\n static targets = ['trixField', 'scroll']\n\n resetOnSuccess(e){\n if(e.detail.success) {\n e.target.reset();\n }\n }\n\n stripTrix(){\n this.trixFieldTargets.forEach(element => {\n this.removeTrailingNewlines(element.editor)\n this.removeTrailingWhitespace(element.editor)\n // When doing this as part of the form submission, Trix does not update the input element's value attribute fast enough.\n // In order to submit the stripped value, we manually update it here to fix the race condition\n element.parentElement.querySelector(\"input\").value = element.innerHTML\n })\n }\n\n submitOnReturn(e) {\n if((e.metaKey || e.ctrlKey) && e.keyCode == 13) {\n e.preventDefault();\n let form = e.target.closest(\"form\")\n this.submitForm(form)\n }\n }\n\n removeTrailingNewlines = (trixEditor) => {\n if (trixEditor.element.innerHTML.match(/<br><\\/div>$/)) {\n trixEditor.element.innerHTML = trixEditor.element.innerHTML.slice(0, -10) + \"</div>\"\n this.removeTrailingNewlines(trixEditor)\n }\n }\n\n removeTrailingWhitespace = (trixEditor) => {\n if (trixEditor.element.innerHTML.match(/&nbsp;<\\/div>$/)) {\n trixEditor.element.innerHTML = trixEditor.element.innerHTML.slice(0, -12) + \"</div>\"\n this.removeTrailingWhitespace(trixEditor)\n } else if (trixEditor.element.innerHTML.match(/&nbsp; <\\/div>$/)) {\n trixEditor.element.innerHTML = trixEditor.element.innerHTML.slice(0, -13) + \"</div>\"\n this.removeTrailingWhitespace(trixEditor)\n }\n }\n\n submitForm(form) {\n // Right now, Safari and IE don't support the requestSubmit method which is required for Turbo\n // Doing form.submit() doesn't actually fire the submit event which Turbo needs\n if (form.requestSubmit) {\n form.requestSubmit()\n } else {\n form.querySelector(\"[type=submit]\").click()\n }\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [ \"wrapper\"]\n static classes = [ \"hidden\" ] // necessary because stimulus-reveal will mess with the [hidden] attribute on the wrapper\n static values = {\n showEventName: String,\n hideEventName: String,\n }\n\n toggle() {\n const eventName = this.isWrapperHidden? this.showEventNameValue: this.hideEventNameValue\n if (this.isWrapperHidden) {\n this.showWrapper()\n }\n \n this.wrapperTarget.dispatchEvent(new CustomEvent(eventName))\n }\n \n get isWrapperHidden() {\n return this.wrapperTarget.classList.contains(this.hiddenClass)\n }\n \n showWrapper() {\n this.wrapperTarget.classList.remove(this.hiddenClass)\n }\n \n hideWrapper() {\n this.wrapperTarget.classList.add(this.hiddenClass)\n }\n}","import { identifierForContextKey } from \"@stimulus/webpack-helpers\"\n\nimport ClipboardController from './clipboard_controller'\nimport FormController from './form_controller'\nimport MobileMenuController from './mobile_menu_controller'\n\nexport const controllerDefinitions = [\n [ClipboardController, 'clipboard_controller.js'],\n [FormController, 'form_controller.js'],\n [MobileMenuController, 'mobile_menu_controller.js'],\n].map(function(d) {\n const key = d[1]\n const controller = d[0]\n return {\n identifier: identifierForContextKey(key),\n controllerConstructor: controller\n }\n})\n","document.addEventListener(\"turbo:load\", () => {\n if (navigator.userAgent.toLocaleLowerCase().includes('electron')) {\n document.body.classList.add('electron')\n }\n})"],"names":["identifierForContextKey","key","logicalName","match","replace","copy","this","inputTarget","value","sourceTarget","innerText","select","document","execCommand","buttonTarget","innerHTML","setTimeout","getElementById","Controller","targets","removeTrailingNewlines","trixEditor","element","slice","_this","removeTrailingWhitespace","resetOnSuccess","e","detail","success","target","reset","stripTrix","trixFieldTargets","forEach","_this2","editor","parentElement","querySelector","submitOnReturn","metaKey","ctrlKey","keyCode","preventDefault","form","closest","submitForm","requestSubmit","click","toggle","eventName","isWrapperHidden","showEventNameValue","hideEventNameValue","showWrapper","wrapperTarget","dispatchEvent","CustomEvent","classList","remove","hiddenClass","hideWrapper","add","contains","classes","values","showEventName","String","hideEventName","controllerDefinitions","ClipboardController","FormController","MobileMenuController","map","d","controller","identifier","controllerConstructor","addEventListener","navigator","userAgent","toLocaleLowerCase","includes","body"],"mappings":"sCAiBO,SAASA,EAAwBC,GACpC,IAAIC,GAAeD,EAAIE,MAAM,2CAA6C,IAAI,GAC9E,GAAID,EACA,OAAOA,EAAYE,QAAQ,KAAM,KAAKA,QAAQ,MAAO,yRCf3DC,KAAA,WACEC,KAAKC,YAAYC,MAAQF,KAAKG,aAAaC,UAC3CJ,KAAKC,YAAYI,SACjBC,SAASC,YAAY,QACrBP,KAAKQ,aAAaC,UAAY,wEAC9BC,WAAW,WACTJ,SAASK,eAAe,UAAUF,UAAY,2DAC7C,UAVsBG,KACpBC,QAAU,CAAC,SAAU,QAAS,oKC2BrCC,uBAAyB,SAACC,GACpBA,EAAWC,QAAQP,UAAUZ,MAAM,kBACrCkB,EAAWC,QAAQP,UAAYM,EAAWC,QAAQP,UAAUQ,MAAM,GAAI,IAAM,SAC5EC,EAAKJ,uBAAuBC,OAIhCI,yBAA2B,SAACJ,GACtBA,EAAWC,QAAQP,UAAUZ,MAAM,mBACrCkB,EAAWC,QAAQP,UAAYM,EAAWC,QAAQP,UAAUQ,MAAM,GAAI,IAAM,SAC5EC,EAAKC,yBAAyBJ,IACrBA,EAAWC,QAAQP,UAAUZ,MAAM,qBAC5CkB,EAAWC,QAAQP,UAAYM,EAAWC,QAAQP,UAAUQ,MAAM,GAAI,IAAM,SAC5EC,EAAKC,yBAAyBJ,yCArClCK,eAAA,SAAeC,GACVA,EAAEC,OAAOC,SACVF,EAAEG,OAAOC,WAIbC,UAAA,sBACE1B,KAAK2B,iBAAiBC,QAAQ,SAAAZ,GAC5Ba,EAAKf,uBAAuBE,EAAQc,QACpCD,EAAKV,yBAAyBH,EAAQc,QAGtCd,EAAQe,cAAcC,cAAc,SAAS9B,MAAQc,EAAQP,eAIjEwB,eAAA,SAAeZ,GACb,IAAIA,EAAEa,SAAWb,EAAEc,UAA0B,IAAbd,EAAEe,QAAe,CAC/Cf,EAAEgB,iBACF,IAAIC,EAAOjB,EAAEG,OAAOe,QAAQ,QAC5BvC,KAAKwC,WAAWF,OAqBpBE,WAAA,SAAWF,GAGLA,EAAKG,cACPH,EAAKG,gBAELH,EAAKN,cAAc,iBAAiBU,YAlDb9B,KACpBC,QAAU,CAAC,YAAa,oHCM/B8B,OAAA,WACE,IAAMC,EAAY5C,KAAK6C,gBAAiB7C,KAAK8C,mBAAoB9C,KAAK+C,mBAClE/C,KAAK6C,iBACP7C,KAAKgD,cAGPhD,KAAKiD,cAAcC,cAAc,IAAIC,YAAYP,OAOnDI,YAAA,WACEhD,KAAKiD,cAAcG,UAAUC,OAAOrD,KAAKsD,gBAG3CC,YAAA,WACEvD,KAAKiD,cAAcG,UAAUI,IAAIxD,KAAKsD,iDATxC,WACE,YAAYL,cAAcG,UAAUK,SAASzD,KAAKsD,4PAlBzB1C,KACpBC,QAAU,CAAE,aACZ6C,QAAU,CAAE,YACZC,OAAS,CACdC,cAAeC,OACfC,cAAeD,QCDNE,IAAAA,EAAwB,CACnC,CAACC,EAAqB,2BACtB,CAACC,EAAgB,sBACjB,CAACC,EAAsB,8BACvBC,IAAI,SAASC,GACb,IACMC,EAAaD,EAAE,GACrB,MAAO,CACLE,WAAY5E,EAHF0E,EAAE,IAIZG,sBAAuBF,KCf3B/D,SAASkE,iBAAiB,aAAc,WAClCC,UAAUC,UAAUC,oBAAoBC,SAAS,aACnDtE,SAASuE,KAAKzB,UAAUI,IAAI"}
@@ -1,2 +0,0 @@
1
- var e=require("stimulus");function t(e){var t=(e.match(/^(?:\.\/)?(.+)(?:[_-]controller\..+?)$/)||[])[1];if(t)return t.replace(/_/g,"-").replace(/\//g,"--")}function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,n(e,t)}function n(e,t){return n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(e,t)}var i=function(e){function t(){return e.apply(this,arguments)||this}return r(t,e),t.prototype.copy=function(){this.inputTarget.value=this.sourceTarget.innerText,this.inputTarget.select(),document.execCommand("copy"),this.buttonTarget.innerHTML='<i id="copied" class="fas fa-check w-4 h-4 block text-green-600"></i>',setTimeout(function(){document.getElementById("copied").innerHTML='<i class="far fa-copy w-4 h-4 block text-gray-600"></i>'},1500)},t}(e.Controller);i.targets=["source","input","button"];var o=function(e){function t(){for(var t,r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return(t=e.call.apply(e,[this].concat(n))||this).removeTrailingNewlines=function(e){e.element.innerHTML.match(/<br><\/div>$/)&&(e.element.innerHTML=e.element.innerHTML.slice(0,-10)+"</div>",t.removeTrailingNewlines(e))},t.removeTrailingWhitespace=function(e){e.element.innerHTML.match(/&nbsp;<\/div>$/)?(e.element.innerHTML=e.element.innerHTML.slice(0,-12)+"</div>",t.removeTrailingWhitespace(e)):e.element.innerHTML.match(/&nbsp; <\/div>$/)&&(e.element.innerHTML=e.element.innerHTML.slice(0,-13)+"</div>",t.removeTrailingWhitespace(e))},t}r(t,e);var n=t.prototype;return n.resetOnSuccess=function(e){e.detail.success&&e.target.reset()},n.stripTrix=function(){var e=this;this.trixFieldTargets.forEach(function(t){e.removeTrailingNewlines(t.editor),e.removeTrailingWhitespace(t.editor),t.parentElement.querySelector("input").value=t.innerHTML})},n.submitOnReturn=function(e){if((e.metaKey||e.ctrlKey)&&13==e.keyCode){e.preventDefault();var t=e.target.closest("form");this.submitForm(t)}},n.submitForm=function(e){e.requestSubmit?e.requestSubmit():e.querySelector("[type=submit]").click()},t}(e.Controller);o.targets=["trixField","scroll"];var s=function(e){function t(){return e.apply(this,arguments)||this}r(t,e);var n,i,o=t.prototype;return o.toggle=function(){var e=this.isWrapperHidden?this.showEventNameValue:this.hideEventNameValue;this.isWrapperHidden&&this.showWrapper(),this.wrapperTarget.dispatchEvent(new CustomEvent(e))},o.showWrapper=function(){this.wrapperTarget.classList.remove(this.hiddenClass)},o.hideWrapper=function(){this.wrapperTarget.classList.add(this.hiddenClass)},n=t,(i=[{key:"isWrapperHidden",get:function(){return this.wrapperTarget.classList.contains(this.hiddenClass)}}])&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),t}(e.Controller);s.targets=["wrapper"],s.classes=["hidden"],s.values={showEventName:String,hideEventName:String};var a=[[i,"clipboard_controller.js"],[o,"form_controller.js"],[s,"mobile_menu_controller.js"]].map(function(e){var r=e[0];return{identifier:t(e[1]),controllerConstructor:r}});document.addEventListener("turbo:load",function(){navigator.userAgent.toLocaleLowerCase().includes("electron")&&document.body.classList.add("electron")}),exports.controllerDefinitions=a;
2
- //# sourceMappingURL=bullet-train.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bullet-train.js","sources":["../../../node_modules/@stimulus/webpack-helpers/dist/index.js","../../javascript/controllers/clipboard_controller.js","../../javascript/controllers/form_controller.js","../../javascript/controllers/mobile_menu_controller.js","../../javascript/controllers/index.js","../../javascript/electron/index.js"],"sourcesContent":["export function definitionsFromContext(context) {\n return context.keys()\n .map(function (key) { return definitionForModuleWithContextAndKey(context, key); })\n .filter(function (value) { return value; });\n}\nfunction definitionForModuleWithContextAndKey(context, key) {\n var identifier = identifierForContextKey(key);\n if (identifier) {\n return definitionForModuleAndIdentifier(context(key), identifier);\n }\n}\nfunction definitionForModuleAndIdentifier(module, identifier) {\n var controllerConstructor = module.default;\n if (typeof controllerConstructor == \"function\") {\n return { identifier: identifier, controllerConstructor: controllerConstructor };\n }\n}\nexport function identifierForContextKey(key) {\n var logicalName = (key.match(/^(?:\\.\\/)?(.+)(?:[_-]controller\\..+?)$/) || [])[1];\n if (logicalName) {\n return logicalName.replace(/_/g, \"-\").replace(/\\//g, \"--\");\n }\n}\n//# sourceMappingURL=index.js.map","import { Controller } from 'stimulus'\n\nexport default class extends Controller {\n static targets = ['source', 'input', 'button']\n\n copy() {\n this.inputTarget.value = this.sourceTarget.innerText\n this.inputTarget.select()\n document.execCommand('copy')\n this.buttonTarget.innerHTML = '<i id=\"copied\" class=\"fas fa-check w-4 h-4 block text-green-600\"></i>'\n setTimeout(function () {\n document.getElementById('copied').innerHTML = '<i class=\"far fa-copy w-4 h-4 block text-gray-600\"></i>'\n }, 1500)\n }\n}\n","import { Controller } from 'stimulus'\n\n// TODO Some of this feels really specific to the conversation messages form. Should we rename this controller?\nexport default class extends Controller {\n static targets = ['trixField', 'scroll']\n\n resetOnSuccess(e){\n if(e.detail.success) {\n e.target.reset();\n }\n }\n\n stripTrix(){\n this.trixFieldTargets.forEach(element => {\n this.removeTrailingNewlines(element.editor)\n this.removeTrailingWhitespace(element.editor)\n // When doing this as part of the form submission, Trix does not update the input element's value attribute fast enough.\n // In order to submit the stripped value, we manually update it here to fix the race condition\n element.parentElement.querySelector(\"input\").value = element.innerHTML\n })\n }\n\n submitOnReturn(e) {\n if((e.metaKey || e.ctrlKey) && e.keyCode == 13) {\n e.preventDefault();\n let form = e.target.closest(\"form\")\n this.submitForm(form)\n }\n }\n\n removeTrailingNewlines = (trixEditor) => {\n if (trixEditor.element.innerHTML.match(/<br><\\/div>$/)) {\n trixEditor.element.innerHTML = trixEditor.element.innerHTML.slice(0, -10) + \"</div>\"\n this.removeTrailingNewlines(trixEditor)\n }\n }\n\n removeTrailingWhitespace = (trixEditor) => {\n if (trixEditor.element.innerHTML.match(/&nbsp;<\\/div>$/)) {\n trixEditor.element.innerHTML = trixEditor.element.innerHTML.slice(0, -12) + \"</div>\"\n this.removeTrailingWhitespace(trixEditor)\n } else if (trixEditor.element.innerHTML.match(/&nbsp; <\\/div>$/)) {\n trixEditor.element.innerHTML = trixEditor.element.innerHTML.slice(0, -13) + \"</div>\"\n this.removeTrailingWhitespace(trixEditor)\n }\n }\n\n submitForm(form) {\n // Right now, Safari and IE don't support the requestSubmit method which is required for Turbo\n // Doing form.submit() doesn't actually fire the submit event which Turbo needs\n if (form.requestSubmit) {\n form.requestSubmit()\n } else {\n form.querySelector(\"[type=submit]\").click()\n }\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [ \"wrapper\"]\n static classes = [ \"hidden\" ] // necessary because stimulus-reveal will mess with the [hidden] attribute on the wrapper\n static values = {\n showEventName: String,\n hideEventName: String,\n }\n\n toggle() {\n const eventName = this.isWrapperHidden? this.showEventNameValue: this.hideEventNameValue\n if (this.isWrapperHidden) {\n this.showWrapper()\n }\n \n this.wrapperTarget.dispatchEvent(new CustomEvent(eventName))\n }\n \n get isWrapperHidden() {\n return this.wrapperTarget.classList.contains(this.hiddenClass)\n }\n \n showWrapper() {\n this.wrapperTarget.classList.remove(this.hiddenClass)\n }\n \n hideWrapper() {\n this.wrapperTarget.classList.add(this.hiddenClass)\n }\n}","import { identifierForContextKey } from \"@stimulus/webpack-helpers\"\n\nimport ClipboardController from './clipboard_controller'\nimport FormController from './form_controller'\nimport MobileMenuController from './mobile_menu_controller'\n\nexport const controllerDefinitions = [\n [ClipboardController, 'clipboard_controller.js'],\n [FormController, 'form_controller.js'],\n [MobileMenuController, 'mobile_menu_controller.js'],\n].map(function(d) {\n const key = d[1]\n const controller = d[0]\n return {\n identifier: identifierForContextKey(key),\n controllerConstructor: controller\n }\n})\n","document.addEventListener(\"turbo:load\", () => {\n if (navigator.userAgent.toLocaleLowerCase().includes('electron')) {\n document.body.classList.add('electron')\n }\n})"],"names":["identifierForContextKey","key","logicalName","match","replace","copy","this","inputTarget","value","sourceTarget","innerText","select","document","execCommand","buttonTarget","innerHTML","setTimeout","getElementById","Controller","targets","removeTrailingNewlines","trixEditor","element","slice","_this","removeTrailingWhitespace","resetOnSuccess","e","detail","success","target","reset","stripTrix","trixFieldTargets","forEach","_this2","editor","parentElement","querySelector","submitOnReturn","metaKey","ctrlKey","keyCode","preventDefault","form","closest","submitForm","requestSubmit","click","toggle","eventName","isWrapperHidden","showEventNameValue","hideEventNameValue","showWrapper","wrapperTarget","dispatchEvent","CustomEvent","classList","remove","hiddenClass","hideWrapper","add","contains","classes","values","showEventName","String","hideEventName","controllerDefinitions","ClipboardController","FormController","MobileMenuController","map","d","controller","identifier","controllerConstructor","addEventListener","navigator","userAgent","toLocaleLowerCase","includes","body"],"mappings":"0BAiBO,SAASA,EAAwBC,GACpC,IAAIC,GAAeD,EAAIE,MAAM,2CAA6C,IAAI,GAC9E,GAAID,EACA,OAAOA,EAAYE,QAAQ,KAAM,KAAKA,QAAQ,MAAO,yRCf3DC,KAAA,WACEC,KAAKC,YAAYC,MAAQF,KAAKG,aAAaC,UAC3CJ,KAAKC,YAAYI,SACjBC,SAASC,YAAY,QACrBP,KAAKQ,aAAaC,UAAY,wEAC9BC,WAAW,WACTJ,SAASK,eAAe,UAAUF,UAAY,2DAC7C,UAVsBG,gBACpBC,QAAU,CAAC,SAAU,QAAS,oKC2BrCC,uBAAyB,SAACC,GACpBA,EAAWC,QAAQP,UAAUZ,MAAM,kBACrCkB,EAAWC,QAAQP,UAAYM,EAAWC,QAAQP,UAAUQ,MAAM,GAAI,IAAM,SAC5EC,EAAKJ,uBAAuBC,OAIhCI,yBAA2B,SAACJ,GACtBA,EAAWC,QAAQP,UAAUZ,MAAM,mBACrCkB,EAAWC,QAAQP,UAAYM,EAAWC,QAAQP,UAAUQ,MAAM,GAAI,IAAM,SAC5EC,EAAKC,yBAAyBJ,IACrBA,EAAWC,QAAQP,UAAUZ,MAAM,qBAC5CkB,EAAWC,QAAQP,UAAYM,EAAWC,QAAQP,UAAUQ,MAAM,GAAI,IAAM,SAC5EC,EAAKC,yBAAyBJ,yCArClCK,eAAA,SAAeC,GACVA,EAAEC,OAAOC,SACVF,EAAEG,OAAOC,WAIbC,UAAA,sBACE1B,KAAK2B,iBAAiBC,QAAQ,SAAAZ,GAC5Ba,EAAKf,uBAAuBE,EAAQc,QACpCD,EAAKV,yBAAyBH,EAAQc,QAGtCd,EAAQe,cAAcC,cAAc,SAAS9B,MAAQc,EAAQP,eAIjEwB,eAAA,SAAeZ,GACb,IAAIA,EAAEa,SAAWb,EAAEc,UAA0B,IAAbd,EAAEe,QAAe,CAC/Cf,EAAEgB,iBACF,IAAIC,EAAOjB,EAAEG,OAAOe,QAAQ,QAC5BvC,KAAKwC,WAAWF,OAqBpBE,WAAA,SAAWF,GAGLA,EAAKG,cACPH,EAAKG,gBAELH,EAAKN,cAAc,iBAAiBU,YAlDb9B,gBACpBC,QAAU,CAAC,YAAa,oHCM/B8B,OAAA,WACE,IAAMC,EAAY5C,KAAK6C,gBAAiB7C,KAAK8C,mBAAoB9C,KAAK+C,mBAClE/C,KAAK6C,iBACP7C,KAAKgD,cAGPhD,KAAKiD,cAAcC,cAAc,IAAIC,YAAYP,OAOnDI,YAAA,WACEhD,KAAKiD,cAAcG,UAAUC,OAAOrD,KAAKsD,gBAG3CC,YAAA,WACEvD,KAAKiD,cAAcG,UAAUI,IAAIxD,KAAKsD,iDATxC,WACE,YAAYL,cAAcG,UAAUK,SAASzD,KAAKsD,4PAlBzB1C,gBACpBC,QAAU,CAAE,aACZ6C,QAAU,CAAE,YACZC,OAAS,CACdC,cAAeC,OACfC,cAAeD,QCDNE,IAAAA,EAAwB,CACnC,CAACC,EAAqB,2BACtB,CAACC,EAAgB,sBACjB,CAACC,EAAsB,8BACvBC,IAAI,SAASC,GACb,IACMC,EAAaD,EAAE,GACrB,MAAO,CACLE,WAAY5E,EAHF0E,EAAE,IAIZG,sBAAuBF,KCf3B/D,SAASkE,iBAAiB,aAAc,WAClCC,UAAUC,UAAUC,oBAAoBC,SAAS,aACnDtE,SAASuE,KAAKzB,UAAUI,IAAI"}
@@ -1,2 +0,0 @@
1
- import{Controller as e}from"stimulus";function t(e){var t=(e.match(/^(?:\.\/)?(.+)(?:[_-]controller\..+?)$/)||[])[1];if(t)return t.replace(/_/g,"-").replace(/\//g,"--")}class i extends e{copy(){this.inputTarget.value=this.sourceTarget.innerText,this.inputTarget.select(),document.execCommand("copy"),this.buttonTarget.innerHTML='<i id="copied" class="fas fa-check w-4 h-4 block text-green-600"></i>',setTimeout(function(){document.getElementById("copied").innerHTML='<i class="far fa-copy w-4 h-4 block text-gray-600"></i>'},1500)}}i.targets=["source","input","button"];class r extends e{constructor(...e){super(...e),this.removeTrailingNewlines=e=>{e.element.innerHTML.match(/<br><\/div>$/)&&(e.element.innerHTML=e.element.innerHTML.slice(0,-10)+"</div>",this.removeTrailingNewlines(e))},this.removeTrailingWhitespace=e=>{e.element.innerHTML.match(/&nbsp;<\/div>$/)?(e.element.innerHTML=e.element.innerHTML.slice(0,-12)+"</div>",this.removeTrailingWhitespace(e)):e.element.innerHTML.match(/&nbsp; <\/div>$/)&&(e.element.innerHTML=e.element.innerHTML.slice(0,-13)+"</div>",this.removeTrailingWhitespace(e))}}resetOnSuccess(e){e.detail.success&&e.target.reset()}stripTrix(){this.trixFieldTargets.forEach(e=>{this.removeTrailingNewlines(e.editor),this.removeTrailingWhitespace(e.editor),e.parentElement.querySelector("input").value=e.innerHTML})}submitOnReturn(e){if((e.metaKey||e.ctrlKey)&&13==e.keyCode){e.preventDefault();let t=e.target.closest("form");this.submitForm(t)}}submitForm(e){e.requestSubmit?e.requestSubmit():e.querySelector("[type=submit]").click()}}r.targets=["trixField","scroll"];class s extends e{toggle(){const e=this.isWrapperHidden?this.showEventNameValue:this.hideEventNameValue;this.isWrapperHidden&&this.showWrapper(),this.wrapperTarget.dispatchEvent(new CustomEvent(e))}get isWrapperHidden(){return this.wrapperTarget.classList.contains(this.hiddenClass)}showWrapper(){this.wrapperTarget.classList.remove(this.hiddenClass)}hideWrapper(){this.wrapperTarget.classList.add(this.hiddenClass)}}s.targets=["wrapper"],s.classes=["hidden"],s.values={showEventName:String,hideEventName:String};const n=[[i,"clipboard_controller.js"],[r,"form_controller.js"],[s,"mobile_menu_controller.js"]].map(function(e){const i=e[0];return{identifier:t(e[1]),controllerConstructor:i}});document.addEventListener("turbo:load",()=>{navigator.userAgent.toLocaleLowerCase().includes("electron")&&document.body.classList.add("electron")});export{n as controllerDefinitions};
2
- //# sourceMappingURL=bullet-train.modern.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bullet-train.modern.js","sources":["../../../node_modules/@stimulus/webpack-helpers/dist/index.js","../../javascript/controllers/clipboard_controller.js","../../javascript/controllers/form_controller.js","../../javascript/controllers/mobile_menu_controller.js","../../javascript/controllers/index.js","../../javascript/electron/index.js"],"sourcesContent":["export function definitionsFromContext(context) {\n return context.keys()\n .map(function (key) { return definitionForModuleWithContextAndKey(context, key); })\n .filter(function (value) { return value; });\n}\nfunction definitionForModuleWithContextAndKey(context, key) {\n var identifier = identifierForContextKey(key);\n if (identifier) {\n return definitionForModuleAndIdentifier(context(key), identifier);\n }\n}\nfunction definitionForModuleAndIdentifier(module, identifier) {\n var controllerConstructor = module.default;\n if (typeof controllerConstructor == \"function\") {\n return { identifier: identifier, controllerConstructor: controllerConstructor };\n }\n}\nexport function identifierForContextKey(key) {\n var logicalName = (key.match(/^(?:\\.\\/)?(.+)(?:[_-]controller\\..+?)$/) || [])[1];\n if (logicalName) {\n return logicalName.replace(/_/g, \"-\").replace(/\\//g, \"--\");\n }\n}\n//# sourceMappingURL=index.js.map","import { Controller } from 'stimulus'\n\nexport default class extends Controller {\n static targets = ['source', 'input', 'button']\n\n copy() {\n this.inputTarget.value = this.sourceTarget.innerText\n this.inputTarget.select()\n document.execCommand('copy')\n this.buttonTarget.innerHTML = '<i id=\"copied\" class=\"fas fa-check w-4 h-4 block text-green-600\"></i>'\n setTimeout(function () {\n document.getElementById('copied').innerHTML = '<i class=\"far fa-copy w-4 h-4 block text-gray-600\"></i>'\n }, 1500)\n }\n}\n","import { Controller } from 'stimulus'\n\n// TODO Some of this feels really specific to the conversation messages form. Should we rename this controller?\nexport default class extends Controller {\n static targets = ['trixField', 'scroll']\n\n resetOnSuccess(e){\n if(e.detail.success) {\n e.target.reset();\n }\n }\n\n stripTrix(){\n this.trixFieldTargets.forEach(element => {\n this.removeTrailingNewlines(element.editor)\n this.removeTrailingWhitespace(element.editor)\n // When doing this as part of the form submission, Trix does not update the input element's value attribute fast enough.\n // In order to submit the stripped value, we manually update it here to fix the race condition\n element.parentElement.querySelector(\"input\").value = element.innerHTML\n })\n }\n\n submitOnReturn(e) {\n if((e.metaKey || e.ctrlKey) && e.keyCode == 13) {\n e.preventDefault();\n let form = e.target.closest(\"form\")\n this.submitForm(form)\n }\n }\n\n removeTrailingNewlines = (trixEditor) => {\n if (trixEditor.element.innerHTML.match(/<br><\\/div>$/)) {\n trixEditor.element.innerHTML = trixEditor.element.innerHTML.slice(0, -10) + \"</div>\"\n this.removeTrailingNewlines(trixEditor)\n }\n }\n\n removeTrailingWhitespace = (trixEditor) => {\n if (trixEditor.element.innerHTML.match(/&nbsp;<\\/div>$/)) {\n trixEditor.element.innerHTML = trixEditor.element.innerHTML.slice(0, -12) + \"</div>\"\n this.removeTrailingWhitespace(trixEditor)\n } else if (trixEditor.element.innerHTML.match(/&nbsp; <\\/div>$/)) {\n trixEditor.element.innerHTML = trixEditor.element.innerHTML.slice(0, -13) + \"</div>\"\n this.removeTrailingWhitespace(trixEditor)\n }\n }\n\n submitForm(form) {\n // Right now, Safari and IE don't support the requestSubmit method which is required for Turbo\n // Doing form.submit() doesn't actually fire the submit event which Turbo needs\n if (form.requestSubmit) {\n form.requestSubmit()\n } else {\n form.querySelector(\"[type=submit]\").click()\n }\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [ \"wrapper\"]\n static classes = [ \"hidden\" ] // necessary because stimulus-reveal will mess with the [hidden] attribute on the wrapper\n static values = {\n showEventName: String,\n hideEventName: String,\n }\n\n toggle() {\n const eventName = this.isWrapperHidden? this.showEventNameValue: this.hideEventNameValue\n if (this.isWrapperHidden) {\n this.showWrapper()\n }\n \n this.wrapperTarget.dispatchEvent(new CustomEvent(eventName))\n }\n \n get isWrapperHidden() {\n return this.wrapperTarget.classList.contains(this.hiddenClass)\n }\n \n showWrapper() {\n this.wrapperTarget.classList.remove(this.hiddenClass)\n }\n \n hideWrapper() {\n this.wrapperTarget.classList.add(this.hiddenClass)\n }\n}","import { identifierForContextKey } from \"@stimulus/webpack-helpers\"\n\nimport ClipboardController from './clipboard_controller'\nimport FormController from './form_controller'\nimport MobileMenuController from './mobile_menu_controller'\n\nexport const controllerDefinitions = [\n [ClipboardController, 'clipboard_controller.js'],\n [FormController, 'form_controller.js'],\n [MobileMenuController, 'mobile_menu_controller.js'],\n].map(function(d) {\n const key = d[1]\n const controller = d[0]\n return {\n identifier: identifierForContextKey(key),\n controllerConstructor: controller\n }\n})\n","document.addEventListener(\"turbo:load\", () => {\n if (navigator.userAgent.toLocaleLowerCase().includes('electron')) {\n document.body.classList.add('electron')\n }\n})"],"names":["identifierForContextKey","key","logicalName","match","replace","Controller","copy","this","inputTarget","value","sourceTarget","innerText","select","document","execCommand","buttonTarget","innerHTML","setTimeout","getElementById","targets","removeTrailingNewlines","trixEditor","element","slice","removeTrailingWhitespace","resetOnSuccess","e","detail","success","target","reset","stripTrix","trixFieldTargets","forEach","editor","parentElement","querySelector","submitOnReturn","metaKey","ctrlKey","keyCode","preventDefault","form","closest","submitForm","requestSubmit","click","toggle","eventName","isWrapperHidden","showEventNameValue","hideEventNameValue","showWrapper","wrapperTarget","dispatchEvent","CustomEvent","classList","contains","hiddenClass","remove","hideWrapper","add","classes","values","showEventName","String","hideEventName","controllerDefinitions","ClipboardController","FormController","MobileMenuController","map","d","controller","identifier","controllerConstructor","addEventListener","navigator","userAgent","toLocaleLowerCase","includes","body"],"mappings":"sCAiBO,SAASA,EAAwBC,GACpC,IAAIC,GAAeD,EAAIE,MAAM,2CAA6C,IAAI,GAC9E,GAAID,EACA,OAAOA,EAAYE,QAAQ,KAAM,KAAKA,QAAQ,MAAO,sBClBhCC,EAG3BC,OACEC,KAAKC,YAAYC,MAAQF,KAAKG,aAAaC,UAC3CJ,KAAKC,YAAYI,SACjBC,SAASC,YAAY,QACrBP,KAAKQ,aAAaC,UAAY,wEAC9BC,WAAW,WACTJ,SAASK,eAAe,UAAUF,UAAY,2DAC7C,SATEG,QAAU,CAAC,SAAU,QAAS,0BCAVd,qCA2B3Be,uBAA0BC,IACpBA,EAAWC,QAAQN,UAAUb,MAAM,kBACrCkB,EAAWC,QAAQN,UAAYK,EAAWC,QAAQN,UAAUO,MAAM,GAAI,IAAM,SAC5EhB,KAAKa,uBAAuBC,UAIhCG,yBAA4BH,IACtBA,EAAWC,QAAQN,UAAUb,MAAM,mBACrCkB,EAAWC,QAAQN,UAAYK,EAAWC,QAAQN,UAAUO,MAAM,GAAI,IAAM,SAC5EhB,KAAKiB,yBAAyBH,IACrBA,EAAWC,QAAQN,UAAUb,MAAM,qBAC5CkB,EAAWC,QAAQN,UAAYK,EAAWC,QAAQN,UAAUO,MAAM,GAAI,IAAM,SAC5EhB,KAAKiB,yBAAyBH,KArClCI,eAAeC,GACVA,EAAEC,OAAOC,SACVF,EAAEG,OAAOC,QAIbC,YACExB,KAAKyB,iBAAiBC,QAAQX,IAC5Bf,KAAKa,uBAAuBE,EAAQY,QACpC3B,KAAKiB,yBAAyBF,EAAQY,QAGtCZ,EAAQa,cAAcC,cAAc,SAAS3B,MAAQa,EAAQN,YAIjEqB,eAAeX,GACb,IAAIA,EAAEY,SAAWZ,EAAEa,UAA0B,IAAbb,EAAEc,QAAe,CAC/Cd,EAAEe,iBACF,IAAIC,EAAOhB,EAAEG,OAAOc,QAAQ,QAC5BpC,KAAKqC,WAAWF,IAqBpBE,WAAWF,GAGLA,EAAKG,cACPH,EAAKG,gBAELH,EAAKN,cAAc,iBAAiBU,WAjDjC3B,QAAU,CAAC,YAAa,0BCFJd,EAQ3B0C,SACE,MAAMC,EAAYzC,KAAK0C,gBAAiB1C,KAAK2C,mBAAoB3C,KAAK4C,mBAClE5C,KAAK0C,iBACP1C,KAAK6C,cAGP7C,KAAK8C,cAAcC,cAAc,IAAIC,YAAYP,IAG/CC,sBACF,YAAYI,cAAcG,UAAUC,SAASlD,KAAKmD,aAGpDN,cACE7C,KAAK8C,cAAcG,UAAUG,OAAOpD,KAAKmD,aAG3CE,cACErD,KAAK8C,cAAcG,UAAUK,IAAItD,KAAKmD,gBAzBjCvC,QAAU,CAAE,aACZ2C,QAAU,CAAE,YACZC,OAAS,CACdC,cAAeC,OACfC,cAAeD,QCDNE,MAAAA,EAAwB,CACnC,CAACC,EAAqB,2BACtB,CAACC,EAAgB,sBACjB,CAACC,EAAsB,8BACvBC,IAAI,SAASC,GACb,MACMC,EAAaD,EAAE,GACrB,MAAO,CACLE,WAAY1E,EAHFwE,EAAE,IAIZG,sBAAuBF,KCf3B5D,SAAS+D,iBAAiB,aAAc,KAClCC,UAAUC,UAAUC,oBAAoBC,SAAS,aACnDnE,SAASoE,KAAKzB,UAAUK,IAAI"}
@@ -1,2 +0,0 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("stimulus")):"function"==typeof define&&define.amd?define(["exports","stimulus"],t):t((e||self).bulletTrain={},e.stimulus)}(this,function(e,t){function r(e){var t=(e.match(/^(?:\.\/)?(.+)(?:[_-]controller\..+?)$/)||[])[1];if(t)return t.replace(/_/g,"-").replace(/\//g,"--")}function n(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,i(e,t)}function i(e,t){return i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},i(e,t)}var o=function(e){function t(){return e.apply(this,arguments)||this}return n(t,e),t.prototype.copy=function(){this.inputTarget.value=this.sourceTarget.innerText,this.inputTarget.select(),document.execCommand("copy"),this.buttonTarget.innerHTML='<i id="copied" class="fas fa-check w-4 h-4 block text-green-600"></i>',setTimeout(function(){document.getElementById("copied").innerHTML='<i class="far fa-copy w-4 h-4 block text-gray-600"></i>'},1500)},t}(t.Controller);o.targets=["source","input","button"];var s=function(e){function t(){for(var t,r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return(t=e.call.apply(e,[this].concat(n))||this).removeTrailingNewlines=function(e){e.element.innerHTML.match(/<br><\/div>$/)&&(e.element.innerHTML=e.element.innerHTML.slice(0,-10)+"</div>",t.removeTrailingNewlines(e))},t.removeTrailingWhitespace=function(e){e.element.innerHTML.match(/&nbsp;<\/div>$/)?(e.element.innerHTML=e.element.innerHTML.slice(0,-12)+"</div>",t.removeTrailingWhitespace(e)):e.element.innerHTML.match(/&nbsp; <\/div>$/)&&(e.element.innerHTML=e.element.innerHTML.slice(0,-13)+"</div>",t.removeTrailingWhitespace(e))},t}n(t,e);var r=t.prototype;return r.resetOnSuccess=function(e){e.detail.success&&e.target.reset()},r.stripTrix=function(){var e=this;this.trixFieldTargets.forEach(function(t){e.removeTrailingNewlines(t.editor),e.removeTrailingWhitespace(t.editor),t.parentElement.querySelector("input").value=t.innerHTML})},r.submitOnReturn=function(e){if((e.metaKey||e.ctrlKey)&&13==e.keyCode){e.preventDefault();var t=e.target.closest("form");this.submitForm(t)}},r.submitForm=function(e){e.requestSubmit?e.requestSubmit():e.querySelector("[type=submit]").click()},t}(t.Controller);s.targets=["trixField","scroll"];var a=function(e){function t(){return e.apply(this,arguments)||this}n(t,e);var r,i,o=t.prototype;return o.toggle=function(){var e=this.isWrapperHidden?this.showEventNameValue:this.hideEventNameValue;this.isWrapperHidden&&this.showWrapper(),this.wrapperTarget.dispatchEvent(new CustomEvent(e))},o.showWrapper=function(){this.wrapperTarget.classList.remove(this.hiddenClass)},o.hideWrapper=function(){this.wrapperTarget.classList.add(this.hiddenClass)},r=t,(i=[{key:"isWrapperHidden",get:function(){return this.wrapperTarget.classList.contains(this.hiddenClass)}}])&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),t}(t.Controller);a.targets=["wrapper"],a.classes=["hidden"],a.values={showEventName:String,hideEventName:String};var l=[[o,"clipboard_controller.js"],[s,"form_controller.js"],[a,"mobile_menu_controller.js"]].map(function(e){var t=e[0];return{identifier:r(e[1]),controllerConstructor:t}});document.addEventListener("turbo:load",function(){navigator.userAgent.toLocaleLowerCase().includes("electron")&&document.body.classList.add("electron")}),e.controllerDefinitions=l});
2
- //# sourceMappingURL=bullet-train.umd.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bullet-train.umd.js","sources":["../../../node_modules/@stimulus/webpack-helpers/dist/index.js","../../javascript/controllers/clipboard_controller.js","../../javascript/controllers/form_controller.js","../../javascript/controllers/mobile_menu_controller.js","../../javascript/controllers/index.js","../../javascript/electron/index.js"],"sourcesContent":["export function definitionsFromContext(context) {\n return context.keys()\n .map(function (key) { return definitionForModuleWithContextAndKey(context, key); })\n .filter(function (value) { return value; });\n}\nfunction definitionForModuleWithContextAndKey(context, key) {\n var identifier = identifierForContextKey(key);\n if (identifier) {\n return definitionForModuleAndIdentifier(context(key), identifier);\n }\n}\nfunction definitionForModuleAndIdentifier(module, identifier) {\n var controllerConstructor = module.default;\n if (typeof controllerConstructor == \"function\") {\n return { identifier: identifier, controllerConstructor: controllerConstructor };\n }\n}\nexport function identifierForContextKey(key) {\n var logicalName = (key.match(/^(?:\\.\\/)?(.+)(?:[_-]controller\\..+?)$/) || [])[1];\n if (logicalName) {\n return logicalName.replace(/_/g, \"-\").replace(/\\//g, \"--\");\n }\n}\n//# sourceMappingURL=index.js.map","import { Controller } from 'stimulus'\n\nexport default class extends Controller {\n static targets = ['source', 'input', 'button']\n\n copy() {\n this.inputTarget.value = this.sourceTarget.innerText\n this.inputTarget.select()\n document.execCommand('copy')\n this.buttonTarget.innerHTML = '<i id=\"copied\" class=\"fas fa-check w-4 h-4 block text-green-600\"></i>'\n setTimeout(function () {\n document.getElementById('copied').innerHTML = '<i class=\"far fa-copy w-4 h-4 block text-gray-600\"></i>'\n }, 1500)\n }\n}\n","import { Controller } from 'stimulus'\n\n// TODO Some of this feels really specific to the conversation messages form. Should we rename this controller?\nexport default class extends Controller {\n static targets = ['trixField', 'scroll']\n\n resetOnSuccess(e){\n if(e.detail.success) {\n e.target.reset();\n }\n }\n\n stripTrix(){\n this.trixFieldTargets.forEach(element => {\n this.removeTrailingNewlines(element.editor)\n this.removeTrailingWhitespace(element.editor)\n // When doing this as part of the form submission, Trix does not update the input element's value attribute fast enough.\n // In order to submit the stripped value, we manually update it here to fix the race condition\n element.parentElement.querySelector(\"input\").value = element.innerHTML\n })\n }\n\n submitOnReturn(e) {\n if((e.metaKey || e.ctrlKey) && e.keyCode == 13) {\n e.preventDefault();\n let form = e.target.closest(\"form\")\n this.submitForm(form)\n }\n }\n\n removeTrailingNewlines = (trixEditor) => {\n if (trixEditor.element.innerHTML.match(/<br><\\/div>$/)) {\n trixEditor.element.innerHTML = trixEditor.element.innerHTML.slice(0, -10) + \"</div>\"\n this.removeTrailingNewlines(trixEditor)\n }\n }\n\n removeTrailingWhitespace = (trixEditor) => {\n if (trixEditor.element.innerHTML.match(/&nbsp;<\\/div>$/)) {\n trixEditor.element.innerHTML = trixEditor.element.innerHTML.slice(0, -12) + \"</div>\"\n this.removeTrailingWhitespace(trixEditor)\n } else if (trixEditor.element.innerHTML.match(/&nbsp; <\\/div>$/)) {\n trixEditor.element.innerHTML = trixEditor.element.innerHTML.slice(0, -13) + \"</div>\"\n this.removeTrailingWhitespace(trixEditor)\n }\n }\n\n submitForm(form) {\n // Right now, Safari and IE don't support the requestSubmit method which is required for Turbo\n // Doing form.submit() doesn't actually fire the submit event which Turbo needs\n if (form.requestSubmit) {\n form.requestSubmit()\n } else {\n form.querySelector(\"[type=submit]\").click()\n }\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [ \"wrapper\"]\n static classes = [ \"hidden\" ] // necessary because stimulus-reveal will mess with the [hidden] attribute on the wrapper\n static values = {\n showEventName: String,\n hideEventName: String,\n }\n\n toggle() {\n const eventName = this.isWrapperHidden? this.showEventNameValue: this.hideEventNameValue\n if (this.isWrapperHidden) {\n this.showWrapper()\n }\n \n this.wrapperTarget.dispatchEvent(new CustomEvent(eventName))\n }\n \n get isWrapperHidden() {\n return this.wrapperTarget.classList.contains(this.hiddenClass)\n }\n \n showWrapper() {\n this.wrapperTarget.classList.remove(this.hiddenClass)\n }\n \n hideWrapper() {\n this.wrapperTarget.classList.add(this.hiddenClass)\n }\n}","import { identifierForContextKey } from \"@stimulus/webpack-helpers\"\n\nimport ClipboardController from './clipboard_controller'\nimport FormController from './form_controller'\nimport MobileMenuController from './mobile_menu_controller'\n\nexport const controllerDefinitions = [\n [ClipboardController, 'clipboard_controller.js'],\n [FormController, 'form_controller.js'],\n [MobileMenuController, 'mobile_menu_controller.js'],\n].map(function(d) {\n const key = d[1]\n const controller = d[0]\n return {\n identifier: identifierForContextKey(key),\n controllerConstructor: controller\n }\n})\n","document.addEventListener(\"turbo:load\", () => {\n if (navigator.userAgent.toLocaleLowerCase().includes('electron')) {\n document.body.classList.add('electron')\n }\n})"],"names":["identifierForContextKey","key","logicalName","match","replace","copy","this","inputTarget","value","sourceTarget","innerText","select","document","execCommand","buttonTarget","innerHTML","setTimeout","getElementById","Controller","targets","removeTrailingNewlines","trixEditor","element","slice","_this","removeTrailingWhitespace","resetOnSuccess","e","detail","success","target","reset","stripTrix","trixFieldTargets","forEach","_this2","editor","parentElement","querySelector","submitOnReturn","metaKey","ctrlKey","keyCode","preventDefault","form","closest","submitForm","requestSubmit","click","toggle","eventName","isWrapperHidden","showEventNameValue","hideEventNameValue","showWrapper","wrapperTarget","dispatchEvent","CustomEvent","classList","remove","hiddenClass","hideWrapper","add","contains","classes","values","showEventName","String","hideEventName","controllerDefinitions","ClipboardController","FormController","MobileMenuController","map","d","controller","identifier","controllerConstructor","addEventListener","navigator","userAgent","toLocaleLowerCase","includes","body"],"mappings":"iRAiBO,SAASA,EAAwBC,GACpC,IAAIC,GAAeD,EAAIE,MAAM,2CAA6C,IAAI,GAC9E,GAAID,EACA,OAAOA,EAAYE,QAAQ,KAAM,KAAKA,QAAQ,MAAO,yRCf3DC,KAAA,WACEC,KAAKC,YAAYC,MAAQF,KAAKG,aAAaC,UAC3CJ,KAAKC,YAAYI,SACjBC,SAASC,YAAY,QACrBP,KAAKQ,aAAaC,UAAY,wEAC9BC,WAAW,WACTJ,SAASK,eAAe,UAAUF,UAAY,2DAC7C,UAVsBG,gBACpBC,QAAU,CAAC,SAAU,QAAS,oKC2BrCC,uBAAyB,SAACC,GACpBA,EAAWC,QAAQP,UAAUZ,MAAM,kBACrCkB,EAAWC,QAAQP,UAAYM,EAAWC,QAAQP,UAAUQ,MAAM,GAAI,IAAM,SAC5EC,EAAKJ,uBAAuBC,OAIhCI,yBAA2B,SAACJ,GACtBA,EAAWC,QAAQP,UAAUZ,MAAM,mBACrCkB,EAAWC,QAAQP,UAAYM,EAAWC,QAAQP,UAAUQ,MAAM,GAAI,IAAM,SAC5EC,EAAKC,yBAAyBJ,IACrBA,EAAWC,QAAQP,UAAUZ,MAAM,qBAC5CkB,EAAWC,QAAQP,UAAYM,EAAWC,QAAQP,UAAUQ,MAAM,GAAI,IAAM,SAC5EC,EAAKC,yBAAyBJ,yCArClCK,eAAA,SAAeC,GACVA,EAAEC,OAAOC,SACVF,EAAEG,OAAOC,WAIbC,UAAA,sBACE1B,KAAK2B,iBAAiBC,QAAQ,SAAAZ,GAC5Ba,EAAKf,uBAAuBE,EAAQc,QACpCD,EAAKV,yBAAyBH,EAAQc,QAGtCd,EAAQe,cAAcC,cAAc,SAAS9B,MAAQc,EAAQP,eAIjEwB,eAAA,SAAeZ,GACb,IAAIA,EAAEa,SAAWb,EAAEc,UAA0B,IAAbd,EAAEe,QAAe,CAC/Cf,EAAEgB,iBACF,IAAIC,EAAOjB,EAAEG,OAAOe,QAAQ,QAC5BvC,KAAKwC,WAAWF,OAqBpBE,WAAA,SAAWF,GAGLA,EAAKG,cACPH,EAAKG,gBAELH,EAAKN,cAAc,iBAAiBU,YAlDb9B,gBACpBC,QAAU,CAAC,YAAa,oHCM/B8B,OAAA,WACE,IAAMC,EAAY5C,KAAK6C,gBAAiB7C,KAAK8C,mBAAoB9C,KAAK+C,mBAClE/C,KAAK6C,iBACP7C,KAAKgD,cAGPhD,KAAKiD,cAAcC,cAAc,IAAIC,YAAYP,OAOnDI,YAAA,WACEhD,KAAKiD,cAAcG,UAAUC,OAAOrD,KAAKsD,gBAG3CC,YAAA,WACEvD,KAAKiD,cAAcG,UAAUI,IAAIxD,KAAKsD,iDATxC,WACE,YAAYL,cAAcG,UAAUK,SAASzD,KAAKsD,4PAlBzB1C,gBACpBC,QAAU,CAAE,aACZ6C,QAAU,CAAE,YACZC,OAAS,CACdC,cAAeC,OACfC,cAAeD,YCDNE,EAAwB,CACnC,CAACC,EAAqB,2BACtB,CAACC,EAAgB,sBACjB,CAACC,EAAsB,8BACvBC,IAAI,SAASC,GACb,IACMC,EAAaD,EAAE,GACrB,MAAO,CACLE,WAAY5E,EAHF0E,EAAE,IAIZG,sBAAuBF,KCf3B/D,SAASkE,iBAAiB,aAAc,WAClCC,UAAUC,UAAUC,oBAAoBC,SAAS,aACnDtE,SAASuE,KAAKzB,UAAUI,IAAI"}