color picker
This commit is contained in:
parent
36cee43c74
commit
5d23221118
1542
js/admin.min.js
vendored
1542
js/admin.min.js
vendored
File diff suppressed because one or more lines are too long
187
src/package-lock.json
generated
187
src/package-lock.json
generated
@ -2179,6 +2179,14 @@
|
|||||||
"resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-6.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-6.2.0.tgz",
|
||||||
"integrity": "sha512-7evsyfH1cLOCdAzZAd43Cic04yKydNx0cF+7tiA19p1XnLLPU4dpCQOqpjqwokFe//vS0QqfqqjCS2JkiIs0cA=="
|
"integrity": "sha512-7evsyfH1cLOCdAzZAd43Cic04yKydNx0cF+7tiA19p1XnLLPU4dpCQOqpjqwokFe//vS0QqfqqjCS2JkiIs0cA=="
|
||||||
},
|
},
|
||||||
|
"add-dom-event-listener": {
|
||||||
|
"version": "1.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/add-dom-event-listener/-/add-dom-event-listener-1.1.0.tgz",
|
||||||
|
"integrity": "sha512-WCxx1ixHT0GQU9hb0KI/mhgRQhnU+U3GvwY6ZvVjYq8rsihIGoaIOUbY0yMPBxLH5MDtr0kz3fisWGNcbWW7Jw==",
|
||||||
|
"requires": {
|
||||||
|
"object-assign": "4.x"
|
||||||
|
}
|
||||||
|
},
|
||||||
"address": {
|
"address": {
|
||||||
"version": "1.1.2",
|
"version": "1.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/address/-/address-1.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/address/-/address-1.1.2.tgz",
|
||||||
@ -3674,6 +3682,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"classnames": {
|
||||||
|
"version": "2.2.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/classnames/-/classnames-2.2.6.tgz",
|
||||||
|
"integrity": "sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q=="
|
||||||
|
},
|
||||||
"clean-css": {
|
"clean-css": {
|
||||||
"version": "4.2.3",
|
"version": "4.2.3",
|
||||||
"resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.3.tgz",
|
"resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.3.tgz",
|
||||||
@ -3827,11 +3840,24 @@
|
|||||||
"resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz",
|
||||||
"integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs="
|
"integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs="
|
||||||
},
|
},
|
||||||
|
"component-classes": {
|
||||||
|
"version": "1.2.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/component-classes/-/component-classes-1.2.6.tgz",
|
||||||
|
"integrity": "sha1-xkI5TDYYpNiwuJGe/Mu9kw5c1pE=",
|
||||||
|
"requires": {
|
||||||
|
"component-indexof": "0.0.3"
|
||||||
|
}
|
||||||
|
},
|
||||||
"component-emitter": {
|
"component-emitter": {
|
||||||
"version": "1.3.0",
|
"version": "1.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz",
|
||||||
"integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg=="
|
"integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg=="
|
||||||
},
|
},
|
||||||
|
"component-indexof": {
|
||||||
|
"version": "0.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/component-indexof/-/component-indexof-0.0.3.tgz",
|
||||||
|
"integrity": "sha1-EdCRMSI5648yyPJa6csAL/6NPCQ="
|
||||||
|
},
|
||||||
"compose-function": {
|
"compose-function": {
|
||||||
"version": "3.0.3",
|
"version": "3.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/compose-function/-/compose-function-3.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/compose-function/-/compose-function-3.0.3.tgz",
|
||||||
@ -4074,6 +4100,16 @@
|
|||||||
"sha.js": "^2.4.8"
|
"sha.js": "^2.4.8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"create-react-class": {
|
||||||
|
"version": "15.6.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/create-react-class/-/create-react-class-15.6.3.tgz",
|
||||||
|
"integrity": "sha512-M+/3Q6E6DLO6Yx3OwrWjwHBnvfXXYA7W+dFjt/ZDBemHO1DDZhsalX/NUtnTYclN6GfnBDRh4qRHjcDHmlJBJg==",
|
||||||
|
"requires": {
|
||||||
|
"fbjs": "^0.8.9",
|
||||||
|
"loose-envify": "^1.3.1",
|
||||||
|
"object-assign": "^4.1.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"cross-spawn": {
|
"cross-spawn": {
|
||||||
"version": "6.0.5",
|
"version": "6.0.5",
|
||||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
|
||||||
@ -4122,6 +4158,15 @@
|
|||||||
"urix": "^0.1.0"
|
"urix": "^0.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"css-animation": {
|
||||||
|
"version": "1.6.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/css-animation/-/css-animation-1.6.1.tgz",
|
||||||
|
"integrity": "sha512-/48+/BaEaHRY6kNQ2OIPzKf9A6g8WjZYjhiNDNuIVbsm5tXCGIAsHDjB4Xu1C4vXJtUWZo26O68OQkDpNBaPog==",
|
||||||
|
"requires": {
|
||||||
|
"babel-runtime": "6.x",
|
||||||
|
"component-classes": "^1.2.5"
|
||||||
|
}
|
||||||
|
},
|
||||||
"css-blank-pseudo": {
|
"css-blank-pseudo": {
|
||||||
"version": "0.1.4",
|
"version": "0.1.4",
|
||||||
"resolved": "https://registry.npmjs.org/css-blank-pseudo/-/css-blank-pseudo-0.1.4.tgz",
|
"resolved": "https://registry.npmjs.org/css-blank-pseudo/-/css-blank-pseudo-0.1.4.tgz",
|
||||||
@ -4681,6 +4726,11 @@
|
|||||||
"resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.3.0.tgz",
|
||||||
"integrity": "sha512-PzwHEmsRP3IGY4gv/Ug+rMeaTIyTJvadCb+ujYXYeIylbHJezIyNToe8KfEgHTCEYyC+/bUghYOGg8yMGlZ6vA=="
|
"integrity": "sha512-PzwHEmsRP3IGY4gv/Ug+rMeaTIyTJvadCb+ujYXYeIylbHJezIyNToe8KfEgHTCEYyC+/bUghYOGg8yMGlZ6vA=="
|
||||||
},
|
},
|
||||||
|
"dom-align": {
|
||||||
|
"version": "1.12.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/dom-align/-/dom-align-1.12.0.tgz",
|
||||||
|
"integrity": "sha512-YkoezQuhp3SLFGdOlr5xkqZ640iXrnHAwVYcDg8ZKRUtO7mSzSC2BA5V0VuyAwPSJA4CLIc6EDDJh4bEsD2+zA=="
|
||||||
|
},
|
||||||
"dom-converter": {
|
"dom-converter": {
|
||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/dom-converter/-/dom-converter-0.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/dom-converter/-/dom-converter-0.2.0.tgz",
|
||||||
@ -4871,6 +4921,14 @@
|
|||||||
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
|
||||||
"integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k="
|
"integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k="
|
||||||
},
|
},
|
||||||
|
"encoding": {
|
||||||
|
"version": "0.1.12",
|
||||||
|
"resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz",
|
||||||
|
"integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=",
|
||||||
|
"requires": {
|
||||||
|
"iconv-lite": "~0.4.13"
|
||||||
|
}
|
||||||
|
},
|
||||||
"end-of-stream": {
|
"end-of-stream": {
|
||||||
"version": "1.4.4",
|
"version": "1.4.4",
|
||||||
"resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
|
"resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
|
||||||
@ -5793,6 +5851,35 @@
|
|||||||
"bser": "2.1.1"
|
"bser": "2.1.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"fbjs": {
|
||||||
|
"version": "0.8.17",
|
||||||
|
"resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.8.17.tgz",
|
||||||
|
"integrity": "sha1-xNWY6taUkRJlPWWIsBpc3Nn5D90=",
|
||||||
|
"requires": {
|
||||||
|
"core-js": "^1.0.0",
|
||||||
|
"isomorphic-fetch": "^2.1.1",
|
||||||
|
"loose-envify": "^1.0.0",
|
||||||
|
"object-assign": "^4.1.0",
|
||||||
|
"promise": "^7.1.1",
|
||||||
|
"setimmediate": "^1.0.5",
|
||||||
|
"ua-parser-js": "^0.7.18"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"core-js": {
|
||||||
|
"version": "1.2.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz",
|
||||||
|
"integrity": "sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY="
|
||||||
|
},
|
||||||
|
"promise": {
|
||||||
|
"version": "7.3.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz",
|
||||||
|
"integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==",
|
||||||
|
"requires": {
|
||||||
|
"asap": "~2.0.3"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"figgy-pudding": {
|
"figgy-pudding": {
|
||||||
"version": "3.5.2",
|
"version": "3.5.2",
|
||||||
"resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.2.tgz",
|
"resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.2.tgz",
|
||||||
@ -7173,6 +7260,15 @@
|
|||||||
"resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
|
||||||
"integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8="
|
"integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8="
|
||||||
},
|
},
|
||||||
|
"isomorphic-fetch": {
|
||||||
|
"version": "2.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz",
|
||||||
|
"integrity": "sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk=",
|
||||||
|
"requires": {
|
||||||
|
"node-fetch": "^1.0.1",
|
||||||
|
"whatwg-fetch": ">=0.10.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"isstream": {
|
"isstream": {
|
||||||
"version": "0.1.2",
|
"version": "0.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
|
||||||
@ -8615,6 +8711,15 @@
|
|||||||
"tslib": "^1.10.0"
|
"tslib": "^1.10.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node-fetch": {
|
||||||
|
"version": "1.7.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz",
|
||||||
|
"integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==",
|
||||||
|
"requires": {
|
||||||
|
"encoding": "^0.1.11",
|
||||||
|
"is-stream": "^1.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node-forge": {
|
"node-forge": {
|
||||||
"version": "0.9.0",
|
"version": "0.9.0",
|
||||||
"resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.9.0.tgz",
|
"resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.9.0.tgz",
|
||||||
@ -10579,6 +10684,68 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"rc-align": {
|
||||||
|
"version": "2.4.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/rc-align/-/rc-align-2.4.5.tgz",
|
||||||
|
"integrity": "sha512-nv9wYUYdfyfK+qskThf4BQUSIadeI/dCsfaMZfNEoxm9HwOIioQ+LyqmMK6jWHAZQgOzMLaqawhuBXlF63vgjw==",
|
||||||
|
"requires": {
|
||||||
|
"babel-runtime": "^6.26.0",
|
||||||
|
"dom-align": "^1.7.0",
|
||||||
|
"prop-types": "^15.5.8",
|
||||||
|
"rc-util": "^4.0.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"rc-animate": {
|
||||||
|
"version": "2.11.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/rc-animate/-/rc-animate-2.11.1.tgz",
|
||||||
|
"integrity": "sha512-1NyuCGFJG/0Y+9RKh5y/i/AalUCA51opyyS/jO2seELpgymZm2u9QV3xwODwEuzkmeQ1BDPxMLmYLcTJedPlkQ==",
|
||||||
|
"requires": {
|
||||||
|
"babel-runtime": "6.x",
|
||||||
|
"classnames": "^2.2.6",
|
||||||
|
"css-animation": "^1.3.2",
|
||||||
|
"prop-types": "15.x",
|
||||||
|
"raf": "^3.4.0",
|
||||||
|
"rc-util": "^4.15.3",
|
||||||
|
"react-lifecycles-compat": "^3.0.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"rc-color-picker": {
|
||||||
|
"version": "1.2.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/rc-color-picker/-/rc-color-picker-1.2.6.tgz",
|
||||||
|
"integrity": "sha512-AaC9Pg7qCHSy5M4eVbqDIaNb2FC4SEw82GOHB2C4R/+vF2FVa/r5XA+Igg5+zLPmAvBLhz9tL4MAfkRA8yWNJw==",
|
||||||
|
"requires": {
|
||||||
|
"classnames": "^2.2.5",
|
||||||
|
"prop-types": "^15.5.8",
|
||||||
|
"rc-trigger": "1.x",
|
||||||
|
"rc-util": "^4.0.2",
|
||||||
|
"tinycolor2": "^1.4.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"rc-trigger": {
|
||||||
|
"version": "1.11.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/rc-trigger/-/rc-trigger-1.11.5.tgz",
|
||||||
|
"integrity": "sha512-MBuUPw1nFzA4K7jQOwb7uvFaZFjXGd00EofUYiZ+l/fgKVq8wnLC0lkv36kwqM7vfKyftRo2sh7cWVpdPuNnnw==",
|
||||||
|
"requires": {
|
||||||
|
"babel-runtime": "6.x",
|
||||||
|
"create-react-class": "15.x",
|
||||||
|
"prop-types": "15.x",
|
||||||
|
"rc-align": "2.x",
|
||||||
|
"rc-animate": "2.x",
|
||||||
|
"rc-util": "4.x"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"rc-util": {
|
||||||
|
"version": "4.21.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/rc-util/-/rc-util-4.21.1.tgz",
|
||||||
|
"integrity": "sha512-Z+vlkSQVc1l8O2UjR3WQ+XdWlhj5q9BMQNLk2iOBch75CqPfrJyGtcWMcnhRlNuDu0Ndtt4kLVO8JI8BrABobg==",
|
||||||
|
"requires": {
|
||||||
|
"add-dom-event-listener": "^1.1.0",
|
||||||
|
"prop-types": "^15.5.10",
|
||||||
|
"react-is": "^16.12.0",
|
||||||
|
"react-lifecycles-compat": "^3.0.4",
|
||||||
|
"shallowequal": "^1.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"react": {
|
"react": {
|
||||||
"version": "16.13.1",
|
"version": "16.13.1",
|
||||||
"resolved": "https://registry.npmjs.org/react/-/react-16.13.1.tgz",
|
"resolved": "https://registry.npmjs.org/react/-/react-16.13.1.tgz",
|
||||||
@ -10886,6 +11053,11 @@
|
|||||||
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
|
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
|
||||||
"integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
|
"integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
|
||||||
},
|
},
|
||||||
|
"react-lifecycles-compat": {
|
||||||
|
"version": "3.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz",
|
||||||
|
"integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA=="
|
||||||
|
},
|
||||||
"react-router": {
|
"react-router": {
|
||||||
"version": "5.2.0",
|
"version": "5.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/react-router/-/react-router-5.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/react-router/-/react-router-5.2.0.tgz",
|
||||||
@ -12038,6 +12210,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"shallowequal": {
|
||||||
|
"version": "1.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz",
|
||||||
|
"integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ=="
|
||||||
|
},
|
||||||
"shebang-command": {
|
"shebang-command": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
|
||||||
@ -13006,6 +13183,11 @@
|
|||||||
"resolved": "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz",
|
||||||
"integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA=="
|
"integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA=="
|
||||||
},
|
},
|
||||||
|
"tinycolor2": {
|
||||||
|
"version": "1.4.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.4.1.tgz",
|
||||||
|
"integrity": "sha1-9PrTM0R7wLB9TcjpIJ2POaisd+g="
|
||||||
|
},
|
||||||
"tmp": {
|
"tmp": {
|
||||||
"version": "0.0.33",
|
"version": "0.0.33",
|
||||||
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz",
|
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz",
|
||||||
@ -13147,6 +13329,11 @@
|
|||||||
"resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
|
||||||
"integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c="
|
"integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c="
|
||||||
},
|
},
|
||||||
|
"ua-parser-js": {
|
||||||
|
"version": "0.7.21",
|
||||||
|
"resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.21.tgz",
|
||||||
|
"integrity": "sha512-+O8/qh/Qj8CgC6eYBVBykMrNtp5Gebn4dlGD/kKXVkJNDwyrAwSIqwz8CDf+tsAIWVycKcku6gIXJ0qwx/ZXaQ=="
|
||||||
|
},
|
||||||
"unicode-canonical-property-names-ecmascript": {
|
"unicode-canonical-property-names-ecmascript": {
|
||||||
"version": "1.0.4",
|
"version": "1.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz",
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
"chart.js": "^2.9.3",
|
"chart.js": "^2.9.3",
|
||||||
"moment": "^2.26.0",
|
"moment": "^2.26.0",
|
||||||
"porn": "0.0.1",
|
"porn": "0.0.1",
|
||||||
|
"rc-color-picker": "^1.2.6",
|
||||||
"react": "^16.13.1",
|
"react": "^16.13.1",
|
||||||
"react-chartjs-2": "^2.9.0",
|
"react-chartjs-2": "^2.9.0",
|
||||||
"react-collapse": "^5.0.1",
|
"react-collapse": "^5.0.1",
|
||||||
|
@ -3,6 +3,8 @@ import {Link} from "react-router-dom";
|
|||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import Icon from "../elements/icon";
|
import Icon from "../elements/icon";
|
||||||
import ReactTooltip from "react-tooltip";
|
import ReactTooltip from "react-tooltip";
|
||||||
|
import 'rc-color-picker/assets/index.css';
|
||||||
|
import ColorPicker from 'rc-color-picker';
|
||||||
|
|
||||||
export default class CreateGroup extends React.Component {
|
export default class CreateGroup extends React.Component {
|
||||||
|
|
||||||
@ -13,7 +15,7 @@ export default class CreateGroup extends React.Component {
|
|||||||
alerts: [],
|
alerts: [],
|
||||||
isSubmitting: false,
|
isSubmitting: false,
|
||||||
name: "",
|
name: "",
|
||||||
color: "#123456"
|
color: "#0F0"
|
||||||
};
|
};
|
||||||
|
|
||||||
this.parent = {
|
this.parent = {
|
||||||
@ -41,7 +43,7 @@ export default class CreateGroup extends React.Component {
|
|||||||
<div className="container-fluid">
|
<div className="container-fluid">
|
||||||
<div className="row mb-2">
|
<div className="row mb-2">
|
||||||
<div className="col-sm-6">
|
<div className="col-sm-6">
|
||||||
<h1 className="m-0 text-dark">Create a new user</h1>
|
<h1 className="m-0 text-dark">Create a new group</h1>
|
||||||
</div>
|
</div>
|
||||||
<div className="col-sm-6">
|
<div className="col-sm-6">
|
||||||
<ol className="breadcrumb float-sm-right">
|
<ol className="breadcrumb float-sm-right">
|
||||||
@ -65,20 +67,32 @@ export default class CreateGroup extends React.Component {
|
|||||||
onChange={this.onChangeInput.bind(this)}/>
|
onChange={this.onChangeInput.bind(this)}/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* TODO: add color picker */}
|
|
||||||
<div className={"form-group"}>
|
<div className={"form-group"}>
|
||||||
<label htmlFor={"color"}>Color</label>
|
<label htmlFor={"color"}>Color</label>
|
||||||
<input type={"text"} className={"form-control"} placeholder={"Color"}
|
<div className="input-group-prepend">
|
||||||
id={"color"} name={"color"} maxLength={64} value={this.state.color}
|
<span className="input-group-text" style={{ padding: "0.35rem 0.4rem 0 0.4rem" }}>
|
||||||
onChange={this.onChangeInput.bind(this)}/>
|
<ColorPicker
|
||||||
|
color={this.state.color}
|
||||||
|
alpha={100}
|
||||||
|
name={"color"}
|
||||||
|
onChange={this.onChangeColor.bind(this)}
|
||||||
|
placement="topLeft">
|
||||||
|
<span className="rc-color-picker-trigger"/>
|
||||||
|
</ColorPicker>
|
||||||
|
</span>
|
||||||
|
<input type={"text"} className={"form-control float-right"} readOnly={true}
|
||||||
|
value={this.state.color}/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Link to={"/admin/users"} className={"btn btn-info mt-2 mr-2"}>
|
<Link to={"/admin/users"} className={"btn btn-info mt-2 mr-2"}>
|
||||||
<Icon icon={"arrow-left"}/>
|
<Icon icon={"arrow-left"}/>
|
||||||
Back
|
Back
|
||||||
</Link>
|
</Link>
|
||||||
{ this.state.isSubmitting
|
{this.state.isSubmitting
|
||||||
? <button type={"submit"} className={"btn btn-primary mt-2"} disabled>Loading… <Icon icon={"circle-notch"} /></button>
|
?
|
||||||
|
<button type={"submit"} className={"btn btn-primary mt-2"} disabled>Loading… <Icon
|
||||||
|
icon={"circle-notch"}/></button>
|
||||||
: <button type={"submit"} className={"btn btn-primary mt-2"}>Submit</button>
|
: <button type={"submit"} className={"btn btn-primary mt-2"}>Submit</button>
|
||||||
}
|
}
|
||||||
</form>
|
</form>
|
||||||
@ -89,26 +103,30 @@ export default class CreateGroup extends React.Component {
|
|||||||
</>;
|
</>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onChangeColor(e) {
|
||||||
|
this.setState({...this.state, color: e.color});
|
||||||
|
}
|
||||||
|
|
||||||
onChangeInput(event) {
|
onChangeInput(event) {
|
||||||
const target = event.target;
|
const target = event.target;
|
||||||
const value = target.value;
|
const value = target.value;
|
||||||
const name = target.name;
|
const name = target.name;
|
||||||
this.setState({ ...this.state, [name]: value });
|
this.setState({...this.state, [name]: value});
|
||||||
}
|
}
|
||||||
|
|
||||||
submitForm(e) {
|
submitForm(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
const name = this.state.name;
|
const name = this.state.name;
|
||||||
const color = this.state.color;
|
const color = this.state.color;
|
||||||
this.setState({ ...this.state, isSubmitting: true });
|
this.setState({...this.state, isSubmitting: true});
|
||||||
this.parent.api.createGroup(name, color).then((res) => {
|
this.parent.api.createGroup(name, color).then((res) => {
|
||||||
let alerts = this.state.alerts.slice();
|
let alerts = this.state.alerts.slice();
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
alerts.push({message: "Group was successfully created", title: "Success!", type: "success"});
|
alerts.push({message: "Group was successfully created", title: "Success!", type: "success"});
|
||||||
this.setState({ ...this.state, name: "", color: "", alerts: alerts, isSubmitting: false });
|
this.setState({...this.state, name: "", color: "", alerts: alerts, isSubmitting: false});
|
||||||
} else {
|
} else {
|
||||||
alerts.push({message: res.msg, title: "Error creating Group", type: "danger"});
|
alerts.push({message: res.msg, title: "Error creating Group", type: "danger"});
|
||||||
this.setState({ ...this.state, name: "", color: "", alerts: alerts, isSubmitting: false });
|
this.setState({...this.state, name: "", color: "", alerts: alerts, isSubmitting: false});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user