mumuki-styles 3.0.2 → 3.0.3

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: df25ce32e60a6f262122561c4f76eb8619f3dae9e2f7760074241aa60987f7ab
4
- data.tar.gz: 906bb4417270e19ee0f6f565c09fe239101502ae7aa46976c6ca858337fe6985
3
+ metadata.gz: 6424e8be0dc093937eafa9e1286439cde0a847b54fbaec3b29a069c370935208
4
+ data.tar.gz: cfc5fc1572a9828f8c71a365bab92426af5b77c581c62c72052d02b0bbf158b8
5
5
  SHA512:
6
- metadata.gz: d9c7363fb8a2038d4c8796012af9a63d2adf068828cbf6b7c55c3fe1226756f5950441127e0669277bb470a670dbbf787d67cac138154f878993a152b636eaee
7
- data.tar.gz: f147753c6e913838dbf62bca4d5d89900bf04d1ea718a92af897574bae723a9eaccfb1473ce48441408896bf252d175a9123bcd6cbb9159ac92ddc08b772c57f
6
+ metadata.gz: c2d5e631d0b90e791a7a54ec4fe32db65b2df400cacd44fa109cacbf9f67695e1d51553f5c35fe918ce11eeb9dece9e2596b4800fd3853cd2e875eb0935f913f
7
+ data.tar.gz: 9a7951a97991f38f063b1de4c8ae43e9d6b1a23becbd7d033ed6871d74b132b88a9032bcd0ad30bc21b7e36cf0b13334c7796b73c19c19dbb0c09cef9319fc36
Binary file
Binary file
Binary file
Binary file
@@ -17580,22 +17580,22 @@ mumuki.load(function () {
17580
17580
  })
17581
17581
  }
17582
17582
 
17583
- function getBrowserMain($browser) {
17584
- return $([
17585
- '<main>',
17586
- ' <iframe srcdoc="', escapeHTML($browser.data('srcdoc')), '" frameborder="0"></iframe>',
17587
- '</main>'
17588
- ].join(''));
17583
+ function getBrowserMain($browser, options) {
17584
+ return $(`
17585
+ <main>
17586
+ <iframe srcdoc="${escapeHTML($browser.data('srcdoc'))}" frameborder="0" ${options.allowScript ? '' : 'sandbox'}></iframe>
17587
+ </main>
17588
+ `);
17589
17589
  }
17590
17590
 
17591
- $.fn.renderWebBrowser = function () {
17591
+ $.fn.renderWebBrowser = function (options = {}) {
17592
17592
  var self = this;
17593
17593
  self.empty();
17594
17594
  self.each(function (i) {
17595
17595
  var $browser = $(self[i]);
17596
17596
 
17597
17597
  var $header = getBrowserHeader($browser);
17598
- var $main = getBrowserMain($browser);
17598
+ var $main = getBrowserMain($browser, options);
17599
17599
 
17600
17600
  $browser.empty();
17601
17601
 
@@ -17827,10 +17827,10 @@ mumuki.load(function () {
17827
17827
 
17828
17828
  mumuki.load(function () {
17829
17829
 
17830
- $.fn.renderMuComponents = function () {
17830
+ $.fn.renderMuComponents = function (options = {}) {
17831
17831
  this.find('.mu-erd').renderERD();
17832
17832
  this.find('pre').renderCopyPaste();
17833
- this.find('.mu-browser').renderWebBrowser();
17833
+ this.find('.mu-browser').renderWebBrowser(options.webBrowser);
17834
17834
  this.find('.mu-sql-table').renderSqlTable();
17835
17835
  this.find('.mu-file-browser').renderFileBrowser();
17836
17836
  this.find('.mu-sql-table-rendered').renderPrerenderedSqlTable();
@@ -1,5 +1,5 @@
1
1
  module Mumuki
2
2
  module Styles
3
- VERSION = "3.0.2"
3
+ VERSION = "3.0.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mumuki-styles
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.2
4
+ version: 3.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Federico Scarpa
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-06 00:00:00.000000000 Z
11
+ date: 2021-05-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler