mirror of
https://github.com/NovaGM/ModuleBuilder.git
synced 2024-08-15 00:23:33 +00:00
11 lines
6.7 KiB
JavaScript
11 lines
6.7 KiB
JavaScript
|
parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"../../../../moduleWrappers/settings.js":[function(require,module,exports) {
|
||
|
module.exports=goosemodScope.settings;
|
||
|
},{}],"../../../../moduleWrappers/toast.js":[function(require,module,exports) {
|
||
|
module.exports=goosemodScope.showToast;
|
||
|
},{}],"goosemodModule.json":[function(require,module,exports) {
|
||
|
module.exports={main:"index.js",name:"Module Settings Experiment",description:"Experiments with module settings",tags:["test"],authors:["186496078273708033"],version:"1.0.0"};
|
||
|
},{}],"custom-settings.js":[function(require,module,exports) {
|
||
|
"use strict";function e(e,t,a,d,l){var n=document.createElement("div");n.classList.add("marginBottom20-32qID7");var i=document.createElement("span");i.classList.add("titleDefault-a8-ZSr","title-31JmR4"),i.style.float="left",i.innerHTML=e;var r=document.createElement("div");r.classList.add("colorStandard-2KCXvj","size14-e6ZScH","description-3_Ncsb","formText-3fs7AJ","note-1V3kyJ","modeDefault-3a2Ph1"),r.innerHTML=t,r.style.clear="both";var c=document.createElement("div");c.classList.add("inputWrapper-31_8H8","codeRedemptionInput-3JOJea"),c.style.float="right";var o=document.createElement("input");o.classList.add("inputDefault-_djjkz","input-cIJ7To"),o.placeholder=a,o.type="text",o.value=l||"",c.appendChild(o);var s=document.createElement("div");s.classList.add("button-38aScr","lookFilled-1Gx00P","colorBrand-3pXr91","sizeSmall-2cSMqn","grow-q77ONN"),s.style.cursor="pointer",s.style.float="right",s.onclick=function(){d(o.value)};var p=document.createElement("div");p.classList.add("contents-18-Yxp"),p.textContent="Apply",s.appendChild(p);var u=document.createElement("div");return u.classList.add("divider-3573oO","dividerDefault-3rvLe-"),u.style.marginTop=t?"20px":"45px",n.appendChild(i),n.appendChild(s),n.appendChild(c),n.appendChild(r),n.appendChild(u),n}Object.defineProperty(exports,"__esModule",{value:!0}),exports.textInputField=e;
|
||
|
},{}],"index.js":[function(require,module,exports) {
|
||
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=require("@goosemod/settings"),e=u(require("@goosemod/toast")),n=require("./goosemodModule.json"),o=require("./custom-settings.js");function u(t){return t&&t.__esModule?t:{default:t}}function r(t,e){return d(t)||a(t,e)||l(t,e)||i()}function i(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function l(t,e){if(t){if("string"==typeof t)return c(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(t,e):void 0}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function a(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],o=!0,u=!1,r=void 0;try{for(var i,l=t[Symbol.iterator]();!(o=(i=l.next()).done)&&(n.push(i.value),!e||n.length!==e);o=!0);}catch(c){u=!0,r=c}finally{try{o||null==l.return||l.return()}finally{if(u)throw r}}return n}}function d(t){if(Array.isArray(t))return t}var g,s="Settings Experiment",f={},x={goosemodHandlers:{onImport:function(){},onLoadingFinished:function(){var u;(0,t.createItem)(s,["(".concat(n.version,")"),{type:"header",text:"Header text"},{type:"text",text:"Text without subtext"},{type:"text",text:"Text with subtext",subtext:"Subtext goes there"},{type:"button",text:"Simple button -> no divider",onclick:function(){(0,e.default)("Simple button: button clicked")}},{type:"button",text:"Simple button -> divider following",onclick:function(){(0,e.default)("Simple button: button clicked")}},{type:"divider"},{type:"text-and-button",text:"Button",subtext:"Subtext goes there",buttonText:"Button Text",onclick:function(){(0,e.default)("Button: button clicked")}},{type:"text-and-danger-button",text:"Button (danger)",subtext:"Subtext goes there",buttonText:"Button Text",onclick:function(){(0,e.default)("Button (danger): button clicked")}},{type:"toggle",text:"Simple toggle switch",subtext:"Subtext goes there",onToggle:function(t){(0,e.default)("Simple toggle: ".concat(t))},isToggled:function(){return!1}},{type:"toggle-text-button",text:"Toggle switch with button",subtext:"Subtext goes there",onToggle:function(t){(0,e.default)("Toggle+Button: ".concat(t))},isToggled:function(){return!1},buttonText:"Button text",onclick:function(){(0,e.default)("Toggle+Button: button clicked")}},{type:"toggle-text-danger-button",text:"Toggle switch with danger button",subtext:"Subtext goes there",onToggle:function(t){(0,e.default)("Toggle+Button (danger): ".concat(t))},isToggled:function(){return!1},buttonText:"Button (danger) text",onclick:function(){(0,e.default)("Toggle+Button (danger): button clicked")}},{type:"text-and-color",text:"Colour picker",subtext:"Doesn't support alpha for now",oninput:function(t){(0,e.default)("Colour picker: ".concat(t))},initialValue:function(){return"#000000"}},{type:"custom",element:(u=document.createElement("span"),u.innerText="Custom Element",u)},{type:"custom",element:(0,o.textInputField)("Text Input","Prototype","Placeholder",function(t){(0,e.default)("Text Input: ".concat(t))})},{type:"custom",element:(0,o.textInputField)("Text Input","Prototype","Placeholder",function(t){(0,e.default)("Text Input: ".concat(t))},"Preset value")}])},onRemove:function(){(0,t.removeItem)(s)},getSettings:function(){return[g]},loadSettings:function(t){var e=r(t,1)[0];g=e||f}}};exports.default=x;
|
||
|
},{"@goosemod/settings":"../../../../moduleWrappers/settings.js","@goosemod/toast":"../../../../moduleWrappers/toast.js","./goosemodModule.json":"goosemodModule.json","./custom-settings.js":"custom-settings.js"}]},{},["index.js"], null);parcelRequire('index.js').default
|