Socket
Socket
Sign inDemoInstall

@blockly/field-grid-dropdown

Package Overview
Dependencies
156
Maintainers
2
Versions
79
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.40 to 1.0.41

2

dist/index.js
/*! For license information please see index.js.LICENSE.txt */
!function(e,o){if("object"==typeof exports&&"object"==typeof module)module.exports=o(require("blockly/core"));else if("function"==typeof define&&define.amd)define(["blockly/core"],o);else{var t="object"==typeof exports?o(require("blockly/core")):o(e.Blockly);for(var r in t)("object"==typeof exports?exports:e)[r]=t[r]}}(this,(function(e){return(()=>{"use strict";var o={573:o=>{o.exports=e}},t={};function r(e){var n=t[e];if(void 0!==n)return n.exports;var i=t[e]={exports:{}};return o[e](i,i.exports,r),i.exports}r.n=e=>{var o=e&&e.__esModule?()=>e.default:()=>e;return r.d(o,{a:o}),o},r.d=(e,o)=>{for(var t in o)r.o(o,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:o[t]})},r.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{r.r(n),r.d(n,{FieldGridDropdown:()=>d});var e=r(573),o=r.n(e);function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function i(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}function l(e,o){for(var t=0;t<o.length;t++){var r=o[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(){return u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,o,t){var r=c(e,o);if(r){var n=Object.getOwnPropertyDescriptor(r,o);return n.get?n.get.call(arguments.length<3?e:t):n.value}},u.apply(this,arguments)}function c(e,o){for(;!Object.prototype.hasOwnProperty.call(e,o)&&null!==(e=f(e)););return e}function s(e,o){return s=Object.setPrototypeOf||function(e,o){return e.__proto__=o,e},s(e,o)}function a(e,o){if(o&&("object"===t(o)||"function"==typeof o))return o;if(void 0!==o)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}var d=function(e){!function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(o&&o.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),o&&s(e,o)}(y,e);var t,r,n,c,d,p=(c=y,d=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,o=f(c);if(d){var t=f(this).constructor;e=Reflect.construct(o,arguments,t)}else e=o.apply(this,arguments);return a(this,e)});function y(e){var o,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;return i(this,y),(o=p.call(this,e,t,r)).columns_=3,r&&r.columns&&o.setColumnsInternal_(r.columns),r&&r.primaryColour&&(o.primaryColour=r.primaryColour),r&&r.borderColour&&(o.borderColour=r.borderColour),o}return t=y,r=[{key:"setColumns",value:function(e){this.setColumnsInternal_(e),this.updateColumnsStyling_()}},{key:"setColumnsInternal_",value:function(e){e=parseInt(e),!isNaN(e)&&e>=1&&(this.columns_=e)}},{key:"showEditor_",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;u(f(y.prototype),"showEditor_",this).call(this,e);var t=this.sourceBlock_.isShadow()?this.sourceBlock_.getParent().getColour():this.sourceBlock_.getColour(),r=this.sourceBlock_.isShadow()?this.sourceBlock_.getParent().style.colourTertiary:this.sourceBlock_.style.colourTertiary,n=this.primaryColour||t,i=this.borderColour||r;o().DropDownDiv.setColour(n,i),o().utils.dom.addClass(this.menu_.getElement(),"fieldGridDropDownContainer"),this.updateColumnsStyling_(),o().DropDownDiv.showPositionedByField(this,this.dropdownDispose_.bind(this))}},{key:"updateColumnsStyling_",value:function(){var e=this.menu_?this.menu_.getElement():null;e&&(e.style.gridTemplateColumns="repeat(".concat(this.columns_,", min-content)"))}}],n=[{key:"fromJson",value:function(e){return new y(e.options,void 0,e)}}],r&&l(t.prototype,r),n&&l(t,n),Object.defineProperty(t,"prototype",{writable:!1}),y}(o().FieldDropdown);o().fieldRegistry.register("field_grid_dropdown",d),o().Css.register(["/** Setup grid layout of DropDown */\n .fieldGridDropDownContainer.blocklyMenu {\n display: grid;\n grid-gap: 7px;\n }\n /* Change look of cells (add border, sizing, padding, and text color) */\n .fieldGridDropDownContainer.blocklyMenu .blocklyMenuItem {\n border: 1px solid rgba(1, 1, 1, 0.5);\n border-radius: 4px;\n color: white;\n min-width: auto;\n padding-left: 15px; /* override padding-left now that checkmark is hidden */\n }\n /* Change look of selected cell */\n .fieldGridDropDownContainer .blocklyMenuItem .blocklyMenuItemCheckbox {\n display: none; /* Hide checkmark */\n }\n .fieldGridDropDownContainer .blocklyMenuItem.blocklyMenuItemSelected {\n background-color: rgba(1, 1, 1, 0.25);\n }\n /* Change look of focus/highlighted cell */\n .fieldGridDropDownContainer .blocklyMenuItem.blocklyMenuItemHighlight {\n box-shadow: 0 0 0 4px hsla(0, 0%, 100%, .2);\n }\n .fieldGridDropDownContainer .blocklyMenuItemHighlight {\n /* Uses less selectors so as to not affect blocklyMenuItemSelected */\n background-color: inherit;\n }\n .fieldGridDropDownContainer {\n margin: 7px; /* needed for highlight */\n }"])})(),n})()}));
!function(e,o){if("object"==typeof exports&&"object"==typeof module)module.exports=o(require("blockly/core"));else if("function"==typeof define&&define.amd)define(["blockly/core"],o);else{var t="object"==typeof exports?o(require("blockly/core")):o(e.Blockly);for(var r in t)("object"==typeof exports?exports:e)[r]=t[r]}}(this,(function(e){return(()=>{"use strict";var o={573:o=>{o.exports=e}},t={};function r(e){var n=t[e];if(void 0!==n)return n.exports;var i=t[e]={exports:{}};return o[e](i,i.exports,r),i.exports}r.n=e=>{var o=e&&e.__esModule?()=>e.default:()=>e;return r.d(o,{a:o}),o},r.d=(e,o)=>{for(var t in o)r.o(o,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:o[t]})},r.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{r.r(n),r.d(n,{FieldGridDropdown:()=>d});var e=r(573),o=r.n(e);function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function i(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}function l(e,o){for(var t=0;t<o.length;t++){var r=o[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(){return u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,o,t){var r=c(e,o);if(r){var n=Object.getOwnPropertyDescriptor(r,o);return n.get?n.get.call(arguments.length<3?e:t):n.value}},u.apply(this,arguments)}function c(e,o){for(;!Object.prototype.hasOwnProperty.call(e,o)&&null!==(e=f(e)););return e}function s(e,o){return s=Object.setPrototypeOf||function(e,o){return e.__proto__=o,e},s(e,o)}function a(e,o){if(o&&("object"===t(o)||"function"==typeof o))return o;if(void 0!==o)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}var d=function(e){!function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(o&&o.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),o&&s(e,o)}(y,e);var t,r,n,c,d,p=(c=y,d=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,o=f(c);if(d){var t=f(this).constructor;e=Reflect.construct(o,arguments,t)}else e=o.apply(this,arguments);return a(this,e)});function y(e){var o,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;return i(this,y),(o=p.call(this,e,t,r)).columns_=3,r&&r.columns&&o.setColumnsInternal_(r.columns),r&&r.primaryColour&&(o.primaryColour=r.primaryColour),r&&r.borderColour&&(o.borderColour=r.borderColour),o}return t=y,r=[{key:"setColumns",value:function(e){this.setColumnsInternal_(e),this.updateColumnsStyling_()}},{key:"setColumnsInternal_",value:function(e){e=parseInt(e),!isNaN(e)&&e>=1&&(this.columns_=e)}},{key:"showEditor_",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;u(f(y.prototype),"showEditor_",this).call(this,e);var t=this.sourceBlock_.isShadow()?this.sourceBlock_.getParent().getColour():this.sourceBlock_.getColour(),r=this.sourceBlock_.isShadow()?this.sourceBlock_.getParent().style.colourTertiary:this.sourceBlock_.style.colourTertiary,n=this.primaryColour||t,i=this.borderColour||r;o().DropDownDiv.setColour(n,i),o().utils.dom.addClass(this.menu_.getElement(),"fieldGridDropDownContainer"),this.updateColumnsStyling_(),o().DropDownDiv.showPositionedByField(this,this.dropdownDispose_.bind(this))}},{key:"updateColumnsStyling_",value:function(){var e=this.menu_?this.menu_.getElement():null;e&&(e.style.gridTemplateColumns="repeat(".concat(this.columns_,", min-content)"))}}],n=[{key:"fromJson",value:function(e){return new y(e.options,void 0,e)}}],r&&l(t.prototype,r),n&&l(t,n),Object.defineProperty(t,"prototype",{writable:!1}),y}(o().FieldDropdown);o().fieldRegistry.register("field_grid_dropdown",d),o().Css.register("/** Setup grid layout of DropDown */\n .fieldGridDropDownContainer.blocklyMenu {\n display: grid;\n grid-gap: 7px;\n }\n /* Change look of cells (add border, sizing, padding, and text color) */\n .fieldGridDropDownContainer.blocklyMenu .blocklyMenuItem {\n border: 1px solid rgba(1, 1, 1, 0.5);\n border-radius: 4px;\n color: white;\n min-width: auto;\n padding-left: 15px; /* override padding-left now that checkmark is hidden */\n }\n /* Change look of selected cell */\n .fieldGridDropDownContainer .blocklyMenuItem .blocklyMenuItemCheckbox {\n display: none; /* Hide checkmark */\n }\n .fieldGridDropDownContainer .blocklyMenuItem.blocklyMenuItemSelected {\n background-color: rgba(1, 1, 1, 0.25);\n }\n /* Change look of focus/highlighted cell */\n .fieldGridDropDownContainer .blocklyMenuItem.blocklyMenuItemHighlight {\n box-shadow: 0 0 0 4px hsla(0, 0%, 100%, .2);\n }\n .fieldGridDropDownContainer .blocklyMenuItemHighlight {\n /* Uses less selectors so as to not affect blocklyMenuItemSelected */\n background-color: inherit;\n }\n .fieldGridDropDownContainer {\n margin: 7px; /* needed for highlight */\n }")})(),n})()}));
//# sourceMappingURL=index.js.map
{
"name": "@blockly/field-grid-dropdown",
"version": "1.0.40",
"version": "1.0.41",
"description": "A Blockly dropdown field with grid layout.",

@@ -43,8 +43,8 @@ "scripts": {

"devDependencies": {
"@blockly/dev-scripts": "^1.2.20",
"@blockly/dev-tools": "^3.1.5",
"@blockly/dev-scripts": "^1.2.21",
"@blockly/dev-tools": "^3.1.6",
"blockly": "^8.0.0"
},
"peerDependencies": {
"blockly": ">=4.20201217.0 <9"
"blockly": ">=7 <9"
},

@@ -66,3 +66,3 @@ "publishConfig": {

],
"gitHead": "1fd6cbfb7c7253b60c3190312a0d907b15f3bd60"
"gitHead": "2cdea536d1a8009301f61fddb7cb83558e7da988"
}

@@ -142,5 +142,4 @@ /**

*/
Blockly.Css.register([
/* eslint-disable indent */
`/** Setup grid layout of DropDown */
Blockly.Css.register(
`/** Setup grid layout of DropDown */
.fieldGridDropDownContainer.blocklyMenu {

@@ -175,4 +174,3 @@ display: grid;

margin: 7px; /* needed for highlight */
}`,
/* eslint-enable indent */
]);
}`
);

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc