Initiated user admin

This commit is contained in:
weryques 2018-01-23 12:42:01 -02:00
parent 1d473b1b6c
commit 8e4ea8643a
14 changed files with 453 additions and 62 deletions

2
.gitignore vendored
View File

@ -11,7 +11,7 @@ vendor
src/vendor src/vendor
node_modules node_modules
npm-debug.log npm-debug.log
src/assets/web-components.js src/assets/*.js
last-js-build.md5 last-js-build.md5
src/admin/scss/.sass-cache src/admin/scss/.sass-cache
src/assets/css/tainacan-admin.css src/assets/css/tainacan-admin.css

294
package-lock.json generated
View File

@ -78,7 +78,6 @@
"version": "1.0.9", "version": "1.0.9",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.9.tgz", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.9.tgz",
"integrity": "sha1-c9g7wmP4bpf4zE9rrhsOkKfSLIY=", "integrity": "sha1-c9g7wmP4bpf4zE9rrhsOkKfSLIY=",
"dev": true,
"requires": { "requires": {
"sprintf-js": "1.0.3" "sprintf-js": "1.0.3"
} }
@ -143,10 +142,9 @@
"dev": true "dev": true
}, },
"async-validator": { "async-validator": {
"version": "1.8.1", "version": "1.8.2",
"resolved": "https://registry.npmjs.org/async-validator/-/async-validator-1.8.1.tgz", "resolved": "https://registry.npmjs.org/async-validator/-/async-validator-1.8.2.tgz",
"integrity": "sha1-ZmV4jKOSaa93Dl7gLw5VfyQ40so=", "integrity": "sha1-t3WXIm6WJC+NUxwNRq4pX2JCK6Q=",
"dev": true,
"requires": { "requires": {
"babel-runtime": "6.26.0" "babel-runtime": "6.26.0"
} }
@ -379,10 +377,9 @@
} }
}, },
"babel-helper-vue-jsx-merge-props": { "babel-helper-vue-jsx-merge-props": {
"version": "2.0.2", "version": "2.0.3",
"resolved": "https://registry.npmjs.org/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-2.0.2.tgz", "resolved": "https://registry.npmjs.org/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-2.0.3.tgz",
"integrity": "sha1-rOscNzWIJ54nVeoc/TXCI5T9M/g=", "integrity": "sha512-gsLiKK7Qrb7zYJNgiXKpXblxbV5ffSwR0f5whkPAaBAR4fhi6bwRZxX9wBlIc5M/v8CCkXUbXZL4N/nSE97cqg=="
"dev": true
}, },
"babel-helpers": { "babel-helpers": {
"version": "6.24.1", "version": "6.24.1",
@ -869,7 +866,6 @@
"version": "6.26.0", "version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz",
"integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=",
"dev": true,
"requires": { "requires": {
"core-js": "2.5.1", "core-js": "2.5.1",
"regenerator-runtime": "0.11.0" "regenerator-runtime": "0.11.0"
@ -944,8 +940,7 @@
"big.js": { "big.js": {
"version": "3.2.0", "version": "3.2.0",
"resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz", "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz",
"integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==", "integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q=="
"dev": true
}, },
"binary-extensions": { "binary-extensions": {
"version": "1.11.0", "version": "1.11.0",
@ -1245,8 +1240,7 @@
"co": { "co": {
"version": "4.6.0", "version": "4.6.0",
"resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz",
"integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ="
"dev": true
}, },
"coa": { "coa": {
"version": "1.0.4", "version": "1.0.4",
@ -1278,7 +1272,6 @@
"version": "1.9.1", "version": "1.9.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz",
"integrity": "sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ==", "integrity": "sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ==",
"dev": true,
"requires": { "requires": {
"color-name": "1.1.3" "color-name": "1.1.3"
} }
@ -1286,8 +1279,7 @@
"color-name": { "color-name": {
"version": "1.1.3", "version": "1.1.3",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
"dev": true
}, },
"color-string": { "color-string": {
"version": "0.3.0", "version": "0.3.0",
@ -1430,8 +1422,7 @@
"core-js": { "core-js": {
"version": "2.5.1", "version": "2.5.1",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.1.tgz", "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.1.tgz",
"integrity": "sha1-rmh03GaTd4m4B1T/VCjfZoGcpQs=", "integrity": "sha1-rmh03GaTd4m4B1T/VCjfZoGcpQs="
"dev": true
}, },
"core-util-is": { "core-util-is": {
"version": "1.0.2", "version": "1.0.2",
@ -1439,6 +1430,27 @@
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
"dev": true "dev": true
}, },
"cosmiconfig": {
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-2.2.2.tgz",
"integrity": "sha512-GiNXLwAFPYHy25XmTPpafYvn3CLAkJ8FLsscq78MQd1Kh0OU6Yzhn4eV2MVF4G9WEQZoWEGltatdR+ntGPMl5A==",
"requires": {
"is-directory": "0.3.1",
"js-yaml": "3.7.0",
"minimist": "1.2.0",
"object-assign": "4.1.1",
"os-homedir": "1.0.2",
"parse-json": "2.2.0",
"require-from-string": "1.2.1"
},
"dependencies": {
"minimist": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ="
}
}
},
"create-ecdh": { "create-ecdh": {
"version": "4.0.0", "version": "4.0.0",
"resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.0.tgz", "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.0.tgz",
@ -1651,8 +1663,7 @@
"deepmerge": { "deepmerge": {
"version": "1.5.2", "version": "1.5.2",
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-1.5.2.tgz", "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-1.5.2.tgz",
"integrity": "sha512-95k0GDqvBjZavkuvzx/YqVLv/6YYa17fz6ILMSf7neqQITCPbnfEnQvEgMPNjH4kgobe7+WIL0yJEHku+H3qtQ==", "integrity": "sha512-95k0GDqvBjZavkuvzx/YqVLv/6YYa17fz6ILMSf7neqQITCPbnfEnQvEgMPNjH4kgobe7+WIL0yJEHku+H3qtQ=="
"dev": true
}, },
"defined": { "defined": {
"version": "1.0.0", "version": "1.0.0",
@ -1757,14 +1768,19 @@
"integrity": "sha1-eOy4o5kGYYe7N07t412ccFZagD0=", "integrity": "sha1-eOy4o5kGYYe7N07t412ccFZagD0=",
"dev": true "dev": true
}, },
"element-theme-chalk": {
"version": "2.0.11",
"resolved": "https://registry.npmjs.org/element-theme-chalk/-/element-theme-chalk-2.0.11.tgz",
"integrity": "sha512-TVhvNXeWwdqrJdI7dsSf6BSU5SpGdG1XAwTz8plVpstVmVLWzt93DC+thR1wL2xY/dDbq/h4EaC7Now5Ah/WSw==",
"dev": true
},
"element-ui": { "element-ui": {
"version": "1.4.12", "version": "2.0.11",
"resolved": "https://registry.npmjs.org/element-ui/-/element-ui-1.4.12.tgz", "resolved": "https://registry.npmjs.org/element-ui/-/element-ui-2.0.11.tgz",
"integrity": "sha512-UtncvaLYHAPB2R77+fjND5ClikuCJdjbNkgMlQvR6tmPk5Xf2qwYenV4+EXZtBO5JaV+MaoVxpIlqXs88wZEsQ==", "integrity": "sha512-jrBIuoHTx07RmgrdpkPQTj9KCFP+BNewUaVB2kkbH+MSGdurzXw8MPzH+o/RZCGIh+ODNfLa71h5veYKJysIpA==",
"dev": true,
"requires": { "requires": {
"async-validator": "1.8.1", "async-validator": "1.8.2",
"babel-helper-vue-jsx-merge-props": "2.0.2", "babel-helper-vue-jsx-merge-props": "2.0.3",
"deepmerge": "1.5.2", "deepmerge": "1.5.2",
"throttle-debounce": "1.0.1" "throttle-debounce": "1.0.1"
} }
@ -1787,8 +1803,7 @@
"emojis-list": { "emojis-list": {
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz",
"integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=", "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k="
"dev": true
}, },
"encodeurl": { "encodeurl": {
"version": "1.0.1", "version": "1.0.1",
@ -1821,7 +1836,6 @@
"version": "1.3.1", "version": "1.3.1",
"resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz",
"integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=",
"dev": true,
"requires": { "requires": {
"is-arrayish": "0.2.1" "is-arrayish": "0.2.1"
} }
@ -1841,14 +1855,12 @@
"escape-string-regexp": { "escape-string-regexp": {
"version": "1.0.5", "version": "1.0.5",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ="
"dev": true
}, },
"esprima": { "esprima": {
"version": "2.7.3", "version": "2.7.3",
"resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz",
"integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE="
"dev": true
}, },
"esutils": { "esutils": {
"version": "2.0.2", "version": "2.0.2",
@ -1958,6 +1970,16 @@
"is-extglob": "1.0.0" "is-extglob": "1.0.0"
} }
}, },
"fast-deep-equal": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz",
"integrity": "sha1-liVqO8l1WV6zbYLpkp0GDYk0Of8="
},
"fast-json-stable-stringify": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz",
"integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I="
},
"fastparse": { "fastparse": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/fastparse/-/fastparse-1.1.1.tgz", "resolved": "https://registry.npmjs.org/fastparse/-/fastparse-1.1.1.tgz",
@ -3265,8 +3287,7 @@
"is-arrayish": { "is-arrayish": {
"version": "0.2.1", "version": "0.2.1",
"resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
"integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0="
"dev": true
}, },
"is-binary-path": { "is-binary-path": {
"version": "1.0.1", "version": "1.0.1",
@ -3291,6 +3312,11 @@
"builtin-modules": "1.1.1" "builtin-modules": "1.1.1"
} }
}, },
"is-directory": {
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz",
"integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE="
},
"is-dotfile": { "is-dotfile": {
"version": "1.0.3", "version": "1.0.3",
"resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz",
@ -3442,7 +3468,6 @@
"version": "3.7.0", "version": "3.7.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.7.0.tgz", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.7.0.tgz",
"integrity": "sha1-XJZ93YN6m/3KXy3oQlOr6KHAO4A=", "integrity": "sha1-XJZ93YN6m/3KXy3oQlOr6KHAO4A=",
"dev": true,
"requires": { "requires": {
"argparse": "1.0.9", "argparse": "1.0.9",
"esprima": "2.7.3" "esprima": "2.7.3"
@ -3454,6 +3479,11 @@
"integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=",
"dev": true "dev": true
}, },
"json-schema-traverse": {
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz",
"integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A="
},
"json-stable-stringify": { "json-stable-stringify": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz",
@ -3472,8 +3502,7 @@
"json5": { "json5": {
"version": "0.5.1", "version": "0.5.1",
"resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz",
"integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE="
"dev": true
}, },
"jsonify": { "jsonify": {
"version": "0.0.0", "version": "0.0.0",
@ -3898,8 +3927,7 @@
"object-assign": { "object-assign": {
"version": "4.1.1", "version": "4.1.1",
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
"dev": true
}, },
"object.omit": { "object.omit": {
"version": "2.0.1", "version": "2.0.1",
@ -3962,8 +3990,7 @@
"os-homedir": { "os-homedir": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
"integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M="
"dev": true
}, },
"os-locale": { "os-locale": {
"version": "1.4.0", "version": "1.4.0",
@ -4015,7 +4042,6 @@
"version": "2.2.0", "version": "2.2.0",
"resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz",
"integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=",
"dev": true,
"requires": { "requires": {
"error-ex": "1.3.1" "error-ex": "1.3.1"
} }
@ -4218,6 +4244,114 @@
"uniqid": "4.1.1" "uniqid": "4.1.1"
} }
}, },
"postcss-load-config": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-1.2.0.tgz",
"integrity": "sha1-U56a/J3chiASHr+djDZz4M5Q0oo=",
"requires": {
"cosmiconfig": "2.2.2",
"object-assign": "4.1.1",
"postcss-load-options": "1.2.0",
"postcss-load-plugins": "2.3.0"
}
},
"postcss-load-options": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/postcss-load-options/-/postcss-load-options-1.2.0.tgz",
"integrity": "sha1-sJixVZ3awt8EvAuzdfmaXP4rbYw=",
"requires": {
"cosmiconfig": "2.2.2",
"object-assign": "4.1.1"
}
},
"postcss-load-plugins": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/postcss-load-plugins/-/postcss-load-plugins-2.3.0.tgz",
"integrity": "sha1-dFdoEWWZrKLwCfrUJrABdQSdjZI=",
"requires": {
"cosmiconfig": "2.2.2",
"object-assign": "4.1.1"
}
},
"postcss-loader": {
"version": "2.0.10",
"resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-2.0.10.tgz",
"integrity": "sha512-xQaDcEgJ/2JqFY18zpFkik8vyYs7oS5ZRbrjvDqkP97k2wYWfPT4+qA0m4o3pTSCsz0u26PNqs8ZO9FRUWAqrA==",
"requires": {
"loader-utils": "1.1.0",
"postcss": "6.0.16",
"postcss-load-config": "1.2.0",
"schema-utils": "0.3.0"
},
"dependencies": {
"ansi-styles": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz",
"integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==",
"requires": {
"color-convert": "1.9.1"
}
},
"chalk": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz",
"integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==",
"requires": {
"ansi-styles": "3.2.0",
"escape-string-regexp": "1.0.5",
"supports-color": "4.5.0"
},
"dependencies": {
"supports-color": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz",
"integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=",
"requires": {
"has-flag": "2.0.0"
}
}
}
},
"has-flag": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz",
"integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE="
},
"loader-utils": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz",
"integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=",
"requires": {
"big.js": "3.2.0",
"emojis-list": "2.1.0",
"json5": "0.5.1"
}
},
"postcss": {
"version": "6.0.16",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.16.tgz",
"integrity": "sha512-m758RWPmSjFH/2MyyG3UOW1fgYbR9rtdzz5UNJnlm7OLtu4B2h9C6gi+bE4qFKghsBRFfZT8NzoQBs6JhLotoA==",
"requires": {
"chalk": "2.3.0",
"source-map": "0.6.1",
"supports-color": "5.1.0"
}
},
"source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="
},
"supports-color": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.1.0.tgz",
"integrity": "sha512-Ry0AwkoKjDpVKK4sV4h6o3UJmNRbjYm2uXhwfj3J56lMVdvnUNqzQVRztOOMGQ++w1K/TjNDFvpJk0F/LoeBCQ==",
"requires": {
"has-flag": "2.0.0"
}
}
}
},
"postcss-merge-idents": { "postcss-merge-idents": {
"version": "2.1.7", "version": "2.1.7",
"resolved": "https://registry.npmjs.org/postcss-merge-idents/-/postcss-merge-idents-2.1.7.tgz", "resolved": "https://registry.npmjs.org/postcss-merge-idents/-/postcss-merge-idents-2.1.7.tgz",
@ -5010,8 +5144,7 @@
"regenerator-runtime": { "regenerator-runtime": {
"version": "0.11.0", "version": "0.11.0",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.0.tgz", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.0.tgz",
"integrity": "sha512-/aA0kLeRb5N9K0d4fw7ooEbI+xDe+DKD499EQqygGqeS8N3xto15p09uY2xj7ixP81sNPXvRLnAQIqdVStgb1A==", "integrity": "sha512-/aA0kLeRb5N9K0d4fw7ooEbI+xDe+DKD499EQqygGqeS8N3xto15p09uY2xj7ixP81sNPXvRLnAQIqdVStgb1A=="
"dev": true
}, },
"regenerator-transform": { "regenerator-transform": {
"version": "0.10.1", "version": "0.10.1",
@ -5100,6 +5233,11 @@
"integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=",
"dev": true "dev": true
}, },
"require-from-string": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-1.2.1.tgz",
"integrity": "sha1-UpyczvJzgK3+yaL5ZbZJu+5jZBg="
},
"require-main-filename": { "require-main-filename": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz",
@ -5143,6 +5281,27 @@
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==",
"dev": true "dev": true
}, },
"schema-utils": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.3.0.tgz",
"integrity": "sha1-9YdyIs4+kx7a4DnxfrNxbnE3+M8=",
"requires": {
"ajv": "5.5.2"
},
"dependencies": {
"ajv": {
"version": "5.5.2",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz",
"integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=",
"requires": {
"co": "4.6.0",
"fast-deep-equal": "1.0.0",
"fast-json-stable-stringify": "2.0.0",
"json-schema-traverse": "0.3.1"
}
}
}
},
"select": { "select": {
"version": "1.1.2", "version": "1.1.2",
"resolved": "https://registry.npmjs.org/select/-/select-1.1.2.tgz", "resolved": "https://registry.npmjs.org/select/-/select-1.1.2.tgz",
@ -5354,8 +5513,7 @@
"sprintf-js": { "sprintf-js": {
"version": "1.0.3", "version": "1.0.3",
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
"integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw="
"dev": true
}, },
"statuses": { "statuses": {
"version": "1.3.1", "version": "1.3.1",
@ -5436,6 +5594,27 @@
"is-utf8": "0.2.1" "is-utf8": "0.2.1"
} }
}, },
"style-loader": {
"version": "0.19.1",
"resolved": "https://registry.npmjs.org/style-loader/-/style-loader-0.19.1.tgz",
"integrity": "sha512-IRE+ijgojrygQi3rsqT0U4dd+UcPCqcVvauZpCnQrGAlEe+FUIyrK93bUDScamesjP08JlQNsFJU+KmPedP5Og==",
"requires": {
"loader-utils": "1.1.0",
"schema-utils": "0.3.0"
},
"dependencies": {
"loader-utils": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz",
"integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=",
"requires": {
"big.js": "3.2.0",
"emojis-list": "2.1.0",
"json5": "0.5.1"
}
}
}
},
"supports-color": { "supports-color": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
@ -5466,8 +5645,7 @@
"throttle-debounce": { "throttle-debounce": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/throttle-debounce/-/throttle-debounce-1.0.1.tgz", "resolved": "https://registry.npmjs.org/throttle-debounce/-/throttle-debounce-1.0.1.tgz",
"integrity": "sha1-2tD+Ew+drzcZ/eoz3Dao5rp/MLU=", "integrity": "sha1-2tD+Ew+drzcZ/eoz3Dao5rp/MLU="
"dev": true
}, },
"time-stamp": { "time-stamp": {
"version": "2.0.0", "version": "2.0.0",
@ -5704,12 +5882,26 @@
"dev": true, "dev": true,
"requires": { "requires": {
"document-register-element": "1.7.0", "document-register-element": "1.7.0",
"element-ui": "1.4.12", "element-ui": "1.4.13",
"es6-promise": "4.1.1", "es6-promise": "4.1.1",
"prismjs": "1.8.4", "prismjs": "1.8.4",
"set-prototype-of": "1.0.0", "set-prototype-of": "1.0.0",
"vue": "2.5.9", "vue": "2.5.9",
"vue-router": "3.0.1" "vue-router": "3.0.1"
},
"dependencies": {
"element-ui": {
"version": "1.4.13",
"resolved": "https://registry.npmjs.org/element-ui/-/element-ui-1.4.13.tgz",
"integrity": "sha512-EGdw/qC2RUmCDzAy3X06LL+jDWmrMezMndviE5CnUDi2XcZz/uZUVVj6bJ6piY+Flw7HNO+Ed81LXrdZ2v+nXA==",
"dev": true,
"requires": {
"async-validator": "1.8.2",
"babel-helper-vue-jsx-merge-props": "2.0.3",
"deepmerge": "1.5.2",
"throttle-debounce": "1.0.1"
}
}
} }
}, },
"vue-hot-reload-api": { "vue-hot-reload-api": {

View File

@ -10,6 +10,7 @@
"dependencies": { "dependencies": {
"axios": "^0.17.1", "axios": "^0.17.1",
"bootstrap": "^3.3.7", "bootstrap": "^3.3.7",
"element-ui": "^2.0.11",
"vue": "^2.0.1", "vue": "^2.0.1",
"vuex": "^3.0.1" "vuex": "^3.0.1"
}, },
@ -20,6 +21,9 @@
"babel-preset-stage-2": "^6.24.1", "babel-preset-stage-2": "^6.24.1",
"cross-env": "^3.0.0", "cross-env": "^3.0.0",
"css-loader": "^0.25.0", "css-loader": "^0.25.0",
"postcss-loader": "^2.0.10",
"style-loader": "^0.19.1",
"element-theme-chalk": "^2.0.11",
"file-loader": "^0.9.0", "file-loader": "^0.9.0",
"vue-custom-element": "^1.0.13", "vue-custom-element": "^1.0.13",
"vue-loader": "^9.7.0", "vue-loader": "^9.7.0",

5
postcss.config.js Normal file
View File

@ -0,0 +1,5 @@
module.exports = {
plugins: [
require('autoprefixer')()
]
}

View File

@ -12,9 +12,9 @@ class Admin {
add_action( 'admin_menu', array(&$this, 'add_admin_menu') ); add_action( 'admin_menu', array(&$this, 'add_admin_menu') );
add_filter( 'admin_body_class', array(&$this, 'admin_body_class') ); add_filter( 'admin_body_class', array(&$this, 'admin_body_class') );
add_action('admin_enqueue_scripts', array(&$this, 'add_user_admin_js'));
} }
function add_admin_menu() { function add_admin_menu() {
@ -40,9 +40,30 @@ class Admin {
} }
function admin_page() { function admin_page() {
// TODO move it to a separate file and start the Vue project global $TAINACAN_BASE_URL;
echo "<div id='tainacan-admin-app'>Here we go!</div>";
// TODO move it to a separate file and start the Vue project
echo "<div id='tainacan-admin-app'></div>";
wp_enqueue_script( 'tainacan-user-admin', $TAINACAN_BASE_URL . '/assets/user_admin-components.js', [] , null, true);
} }
function add_user_admin_js() {
global $TAINACAN_BASE_URL;
$components = ( has_filter( 'tainacan_register_web_components' ) ) ? apply_filters('tainacan_register_web_components') : [];
wp_enqueue_script('wp-settings',$TAINACAN_BASE_URL . '/js/wp-settings.js');
$settings = [
'root' => esc_url_raw( rest_url() ).'tainacan/v2',
'nonce' => wp_create_nonce( 'wp_rest' ),
'components' => $components
];
wp_localize_script( 'wp-settings', 'wp_settings', $settings );
wp_enqueue_script( 'custom-elements', $TAINACAN_BASE_URL . '/assets/customelements.min.js');
}
} }

121
src/admin/html/admin.vue Normal file
View File

@ -0,0 +1,121 @@
<template>
<div id="tainacan-admin-app">
<el-container>
<el-header>
Header
</el-header>
<el-container>
<el-aside width="200px">
Aside
</el-aside>
<el-main>
<el-row>
<el-col :span="8" v-for="(collection, index) in collections" :key="collection.id" :offset="index > 0 ? 2 : 0">
<el-card :body-style="{ padding: '0px' }">
<img src="" class="image" :alt="collection.name">
<div style="padding: 14px;">
<span>{{ collection.name }}</span>
<div class="bottom clearfix">
<time class="time">{{collection.description}}</time>
<el-button type="text" class="button">Detalhes</el-button>
</div>
</div>
</el-card>
</el-col>
</el-row>
</el-main>
</el-container>
</el-container>
</div>
</template>
<script>
import { mapActions, mapGetters } from 'vuex'
export default {
name: "admin",
data(){
return {
}
},
methods: {
...mapActions('collection', [
'fetchCollections'
]),
...mapGetters('collection', [
'getCollections'
])
},
computed: {
collections(){
return this.getCollections();
}
},
created(){
this.fetchCollections();
}
}
</script>
<style scoped>
.el-header, .el-footer {
background-color: #B3C0D1;
color: #333;
line-height: 60px;
}
.el-aside {
background-color: #D3DCE6;
color: #333;
line-height: 200px;
}
.el-main {
background-color: #E9EEF3;
color: #333;
line-height: 160px;
}
body > .el-container {
margin-bottom: 40px;
}
.el-container:nth-child(5) .el-aside,
.el-container:nth-child(6) .el-aside {
line-height: 260px;
}
.el-container:nth-child(7) .el-aside {
line-height: 320px;
}
.time {
font-size: 13px;
color: #999;
}
.bottom {
margin-top: 13px;
line-height: 12px;
}
.button {
padding: 0;
float: right;
}
.image {
width: 100%;
display: block;
}
.clearfix:before,
.clearfix:after {
display: table;
content: "";
}
.clearfix:after {
clear: both
}
</style>

18
src/admin/js/main.js Normal file
View File

@ -0,0 +1,18 @@
import Vue from 'vue'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import AdminPage from '../html/admin.vue'
//import { eventBus } from '../../js/event-bus-web-components'
import store from '../../js/store/store'
Vue.use(ElementUI);
// eventBus.listener();
new Vue({
el: '#tainacan-admin-app',
store,
render: h => h(AdminPage)
});

View File

@ -138,6 +138,7 @@ class TAINACAN_REST_Collections_Controller extends WP_REST_Controller {
* @param WP_REST_Request $request * @param WP_REST_Request $request
* *
* @return bool|WP_Error * @return bool|WP_Error
* @throws Exception
*/ */
public function get_items_permissions_check($request){ public function get_items_permissions_check($request){
return $this->collections_repository->can_read($this->collection); return $this->collections_repository->can_read($this->collection);
@ -148,6 +149,7 @@ class TAINACAN_REST_Collections_Controller extends WP_REST_Controller {
* @param WP_REST_Request $request * @param WP_REST_Request $request
* *
* @return bool|WP_Error * @return bool|WP_Error
* @throws Exception
*/ */
public function get_item_permissions_check($request){ public function get_item_permissions_check($request){
$collection = $this->collections_repository->fetch($request['collection_id']); $collection = $this->collections_repository->fetch($request['collection_id']);
@ -197,6 +199,7 @@ class TAINACAN_REST_Collections_Controller extends WP_REST_Controller {
* @param WP_REST_Request $request * @param WP_REST_Request $request
* *
* @return bool|WP_Error * @return bool|WP_Error
* @throws Exception
*/ */
public function create_item_permissions_check( $request ) { public function create_item_permissions_check( $request ) {
return $this->collections_repository->can_edit($this->collection); return $this->collections_repository->can_edit($this->collection);
@ -245,6 +248,7 @@ class TAINACAN_REST_Collections_Controller extends WP_REST_Controller {
* @param WP_REST_Request $request * @param WP_REST_Request $request
* *
* @return bool|WP_Error * @return bool|WP_Error
* @throws Exception
*/ */
public function delete_item_permissions_check( $request ) { public function delete_item_permissions_check( $request ) {
$collection = $this->collections_repository->fetch($request['collection_id']); $collection = $this->collections_repository->fetch($request['collection_id']);
@ -288,6 +292,7 @@ class TAINACAN_REST_Collections_Controller extends WP_REST_Controller {
* @param WP_REST_Request $request * @param WP_REST_Request $request
* *
* @return bool|WP_Error * @return bool|WP_Error
* @throws Exception
*/ */
public function update_item_permissions_check( $request ) { public function update_item_permissions_check( $request ) {
$collection = $this->collections_repository->fetch($request['collection_id']); $collection = $this->collections_repository->fetch($request['collection_id']);

View File

@ -42,7 +42,7 @@ class DevInterface {
wp_localize_script( 'wp-settings', 'wp_settings', $settings ); wp_localize_script( 'wp-settings', 'wp_settings', $settings );
wp_enqueue_script( 'custom-elements', $TAINACAN_BASE_URL . '/assets/customelements.min.js'); wp_enqueue_script( 'custom-elements', $TAINACAN_BASE_URL . '/assets/customelements.min.js');
wp_enqueue_script( 'tainacan-dev-admin', $TAINACAN_BASE_URL . '/assets/web-components.js', [] , null, true); wp_enqueue_script( 'tainacan-dev-admin', $TAINACAN_BASE_URL . '/assets/dev_admin-components.js', [] , null, true);
} }
/** /**

View File

@ -4,4 +4,13 @@ export const fetchItems = ({ commit, state }) => {
axios.get('/') axios.get('/')
.then(res => {}) .then(res => {})
.catch(error => console.log( error )); .catch(error => console.log( error ));
}
export const fetchCollections = ({ commit }) => {
axios.get('/collections')
.then(res => {
let collections = res.data;
commit('setCollections', collections);
})
.catch(error => console.log(error));
} }

View File

@ -1,3 +1,7 @@
export const getItems = state => { export const getItems = state => {
return state.items; return state.items;
}
export const getCollections = state => {
return state.collections;
} }

View File

@ -3,7 +3,8 @@ import * as getters from './getters';
import * as mutations from './mutations'; import * as mutations from './mutations';
const state = { const state = {
items: [] items: [],
collections: []
}; };
export default { export default {

View File

@ -1,3 +1,7 @@
export const setItems = ( state, items ) => { export const setItems = ( state, items ) => {
state.item = items; state.item = items;
}
export const setCollections = (state, collections) => {
state.collections = collections;
} }

View File

@ -2,11 +2,14 @@ var path = require('path')
var webpack = require('webpack') var webpack = require('webpack')
module.exports = { module.exports = {
entry: './src/js/main.js', entry: {
dev_admin: './src/js/main.js',
user_admin: './src/admin/js/main.js'
},
output: { output: {
path: path.resolve(__dirname, './src/assets/'), path: path.resolve(__dirname, './src/assets/'),
publicPath: './src/assets/', publicPath: './src/assets/',
filename: 'web-components.js' filename: '[name]-components.js'
}, },
module: { module: {
rules: [ rules: [
@ -23,11 +26,15 @@ module.exports = {
exclude: /node_modules/ exclude: /node_modules/
}, },
{ {
test: /\.(png|jpg|gif|svg)$/, test: /\.(png|jpg|jpeg|gif|eot|ttf|woff|woff2|svg|svgz)(\?.+)?$/,
loader: 'file', loader: 'file',
options: { options: {
name: '[name].[ext]?[hash]' name: '[name].[ext]?[hash]'
} }
},
{
test: /\.css$/,
use: ['style-loader', 'css-loader', 'postcss-loader']
} }
] ]
}, },