mirror of
https://gitlab.com/bmcgonag/get_my.git
synced 2026-03-26 15:58:50 +00:00
My big initial commit to this repo and project.
This commit is contained in:
parent
750811a81f
commit
8636f8cf9b
2433 changed files with 199488 additions and 1042 deletions
19
.meteor/.finished-upgraders
Normal file
19
.meteor/.finished-upgraders
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# This file contains information which helps Meteor properly upgrade your
|
||||
# app when you run 'meteor update'. You should check it into version control
|
||||
# with your project.
|
||||
|
||||
notices-for-0.9.0
|
||||
notices-for-0.9.1
|
||||
0.9.4-platform-file
|
||||
notices-for-facebook-graph-api-2
|
||||
1.2.0-standard-minifiers-package
|
||||
1.2.0-meteor-platform-split
|
||||
1.2.0-cordova-changes
|
||||
1.2.0-breaking-changes
|
||||
1.3.0-split-minifiers-package
|
||||
1.4.0-remove-old-dev-bundle-link
|
||||
1.4.1-add-shell-server-package
|
||||
1.4.3-split-account-service-packages
|
||||
1.5-add-dynamic-import-package
|
||||
1.7-split-underscore-from-meteor-base
|
||||
1.8.3-split-jquery-from-blaze
|
||||
1
.meteor/.gitignore
vendored
Normal file
1
.meteor/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
local
|
||||
7
.meteor/.id
Normal file
7
.meteor/.id
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# This file contains a token that is unique to your project.
|
||||
# Check it into your repository along with the rest of this directory.
|
||||
# It can be used for purposes such as:
|
||||
# - ensuring you don't accidentally deploy one app on top of another
|
||||
# - providing package authors with aggregated statistics
|
||||
|
||||
q4aom8afjliw.rczlfvqw1fqs
|
||||
33
.meteor/packages
Normal file
33
.meteor/packages
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
# Meteor packages used by this project, one per line.
|
||||
# Check this file (and the other files in this directory) into your repository.
|
||||
#
|
||||
# 'meteor add' and 'meteor remove' will edit this file for you,
|
||||
# but you can also edit it by hand.
|
||||
|
||||
meteor-base@1.5.1 # Packages every Meteor app needs to have
|
||||
mobile-experience@1.1.0 # Packages for a great mobile UX
|
||||
mongo@1.15.0 # The database Meteor supports right now
|
||||
blaze-html-templates # Compile .html files into Meteor Blaze views
|
||||
jquery # Wrapper package for npm-installed jquery
|
||||
reactive-var@1.0.11 # Reactive variable for tracker
|
||||
tracker@1.2.0 # Meteor's client-side reactive programming library
|
||||
|
||||
standard-minifier-css@1.8.1 # CSS minifier run for production mode
|
||||
standard-minifier-js@2.8.0 # JS minifier run for production mode
|
||||
es5-shim@4.8.0 # ECMAScript 5 compatibility for older browsers
|
||||
ecmascript@0.16.2 # Enable ECMAScript2015+ syntax in app code
|
||||
typescript@4.5.4 # Enable TypeScript syntax in .ts and .tsx modules
|
||||
shell-server@0.5.0 # Server-side component of the `meteor shell` command
|
||||
|
||||
hot-module-replacement@0.5.1 # Update code in development without reloading the page
|
||||
blaze-hot # Update files using Blaze's API with HMR
|
||||
|
||||
alanning:roles@2.2.0
|
||||
email@2.2.1
|
||||
session@1.2.0
|
||||
|
||||
raix:handlebar-helpers
|
||||
kadira:flow-router
|
||||
kadira:blaze-layout
|
||||
accounts-password@2.3.1
|
||||
# mizzao:autocomplete # for the @mentions functionality
|
||||
2
.meteor/platforms
Normal file
2
.meteor/platforms
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
server
|
||||
browser
|
||||
1
.meteor/release
Normal file
1
.meteor/release
Normal file
|
|
@ -0,0 +1 @@
|
|||
METEOR@2.7.3
|
||||
95
.meteor/versions
Normal file
95
.meteor/versions
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
accounts-base@2.2.3
|
||||
accounts-password@2.3.1
|
||||
alanning:roles@2.2.0
|
||||
allow-deny@1.1.1
|
||||
autoupdate@1.8.0
|
||||
babel-compiler@7.9.0
|
||||
babel-runtime@1.5.1
|
||||
base64@1.0.12
|
||||
binary-heap@1.0.11
|
||||
blaze@2.6.0
|
||||
blaze-hot@1.1.1
|
||||
blaze-html-templates@1.2.1
|
||||
blaze-tools@1.1.3
|
||||
boilerplate-generator@1.7.1
|
||||
caching-compiler@1.2.2
|
||||
caching-html-compiler@1.2.1
|
||||
callback-hook@1.4.0
|
||||
check@1.3.1
|
||||
ddp@1.4.0
|
||||
ddp-client@2.5.0
|
||||
ddp-common@1.4.0
|
||||
ddp-rate-limiter@1.1.0
|
||||
ddp-server@2.5.0
|
||||
deps@1.0.12
|
||||
diff-sequence@1.1.1
|
||||
dynamic-import@0.7.2
|
||||
ecmascript@0.16.2
|
||||
ecmascript-runtime@0.8.0
|
||||
ecmascript-runtime-client@0.12.1
|
||||
ecmascript-runtime-server@0.11.0
|
||||
ejson@1.1.2
|
||||
email@2.2.1
|
||||
es5-shim@4.8.0
|
||||
fetch@0.1.1
|
||||
geojson-utils@1.0.10
|
||||
hot-code-push@1.0.4
|
||||
hot-module-replacement@0.5.1
|
||||
html-tools@1.1.3
|
||||
htmljs@1.1.1
|
||||
id-map@1.1.1
|
||||
inter-process-messaging@0.1.1
|
||||
jquery@3.0.0
|
||||
kadira:blaze-layout@2.0.1
|
||||
kadira:flow-router@2.12.1
|
||||
launch-screen@1.3.0
|
||||
localstorage@1.2.0
|
||||
logging@1.3.1
|
||||
meteor@1.10.0
|
||||
meteor-base@1.5.1
|
||||
minifier-css@1.6.0
|
||||
minifier-js@2.7.4
|
||||
minimongo@1.8.0
|
||||
mobile-experience@1.1.0
|
||||
mobile-status-bar@1.1.0
|
||||
modern-browsers@0.1.8
|
||||
modules@0.18.0
|
||||
modules-runtime@0.13.0
|
||||
modules-runtime-hot@0.14.0
|
||||
mongo@1.15.0
|
||||
mongo-decimal@0.1.3
|
||||
mongo-dev-server@1.1.0
|
||||
mongo-id@1.0.8
|
||||
npm-mongo@4.3.1
|
||||
observe-sequence@1.0.20
|
||||
ordered-dict@1.1.0
|
||||
promise@0.12.0
|
||||
raix:handlebar-helpers@0.2.5
|
||||
random@1.2.0
|
||||
rate-limit@1.0.9
|
||||
react-fast-refresh@0.2.3
|
||||
reactive-dict@1.3.0
|
||||
reactive-var@1.0.11
|
||||
reload@1.3.1
|
||||
retry@1.1.0
|
||||
routepolicy@1.1.1
|
||||
service-configuration@1.3.0
|
||||
session@1.2.0
|
||||
sha@1.0.9
|
||||
shell-server@0.5.0
|
||||
socket-stream-client@0.5.0
|
||||
spacebars@1.3.0
|
||||
spacebars-compiler@1.3.1
|
||||
standard-minifier-css@1.8.1
|
||||
standard-minifier-js@2.8.0
|
||||
templating@1.4.2
|
||||
templating-compiler@1.4.1
|
||||
templating-runtime@1.6.0
|
||||
templating-tools@1.2.2
|
||||
tracker@1.2.0
|
||||
typescript@4.5.4
|
||||
ui@1.0.13
|
||||
underscore@1.0.10
|
||||
url@1.3.2
|
||||
webapp@1.13.1
|
||||
webapp-hashing@1.1.0
|
||||
|
|
@ -1,9 +1,8 @@
|
|||
<template name="teacherLogin">
|
||||
<template name="login">
|
||||
{{#if $not currentUser}}
|
||||
<div id="signInForm">
|
||||
<div class="container">
|
||||
<h3>Teacher Login</h3>
|
||||
<p>It is very important to the safety of all children that you do not share your login credentials with anyone.</p>
|
||||
<h4>Login</h4>
|
||||
<div class="card">
|
||||
<div class="card-content">
|
||||
<form class="login">
|
||||
|
|
@ -34,7 +33,7 @@
|
|||
</form>
|
||||
</div>
|
||||
<div class="card-action">
|
||||
<a href="#" id="teacherReg">Register</a>
|
||||
<a href="#" id="reg">Register</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1,18 +1,18 @@
|
|||
Template.parentLogin.onCreated(function() {
|
||||
Template.login.onCreated(function() {
|
||||
|
||||
});
|
||||
|
||||
Template.parentLogin.onRendered(function() {
|
||||
Template.login.onRendered(function() {
|
||||
|
||||
});
|
||||
|
||||
Template.parentLogin.helpers({
|
||||
Template.login.helpers({
|
||||
areFilled: function() {
|
||||
return Session.get("filledFields");
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
Template.parentLogin.events({
|
||||
Template.login.events({
|
||||
'click #logmein' (event) {
|
||||
event.preventDefault();
|
||||
console.log("clicked login");
|
||||
|
|
@ -26,8 +26,8 @@ Template.parentLogin.events({
|
|||
Meteor.loginWithPassword(email, pass);
|
||||
}
|
||||
},
|
||||
'click #parentReg' (event) {
|
||||
'click #reg' (event) {
|
||||
event.preventDefault();
|
||||
FlowRouter.go('/parentReg');
|
||||
FlowRouter.go('/reg');
|
||||
},
|
||||
});
|
||||
|
|
@ -1,9 +1,8 @@
|
|||
<template name="teacherRegistration">
|
||||
<template name="reg">
|
||||
{{#if $not currentUser}}
|
||||
<div id="registrationForm">
|
||||
<div class="container">
|
||||
<h3>Teacher Registration</h3>
|
||||
<p>It is very important to the safety of all children that you do not share your login credentials with anyone.</p>
|
||||
<h4>Register</h4>
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<div class="card">
|
||||
|
|
@ -14,10 +13,6 @@
|
|||
<input type="text" name="name" class="name {{#if $eq misName true}}red lighten-3{{/if}}" id="name" />
|
||||
<label for="name">Your Full Name *</label>
|
||||
</div>
|
||||
<div class="col s12 input-field">
|
||||
<input type="tel" name="phone" class="phone {{#if $eq misPhone true}}red lighten-3{{/if}}" id="phone" />
|
||||
<label for="phone">Best Phone Number *</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col s12 input-field">
|
||||
|
|
@ -45,7 +40,7 @@
|
|||
</form>
|
||||
</div>
|
||||
<div class="card-action">
|
||||
<a href="#" id="teachLogin">Sign In</a>
|
||||
<a href="#" id="login">Sign In</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
Template.teacherRegistration.onCreated(function() {
|
||||
Template.reg.onCreated(function() {
|
||||
|
||||
});
|
||||
|
||||
Template.teacherRegistration.onRendered(function() {
|
||||
Template.reg.onRendered(function() {
|
||||
Session.set("canreg", false);
|
||||
Session.set("missingReq", false);
|
||||
Session.set("missingName", false);
|
||||
|
|
@ -12,16 +12,13 @@ Template.teacherRegistration.onRendered(function() {
|
|||
Session.set("missingPassword", false);
|
||||
});
|
||||
|
||||
Template.teacherRegistration.helpers({
|
||||
Template.reg.helpers({
|
||||
canReg: function() {
|
||||
return Session.get("canreg");
|
||||
},
|
||||
misName: function() {
|
||||
return Session.get("missingName");
|
||||
},
|
||||
misPhone: function() {
|
||||
return Session.get("missingPhone");
|
||||
},
|
||||
misEmail: function() {
|
||||
return Session.get("missingEmail");
|
||||
},
|
||||
|
|
@ -33,7 +30,7 @@ Template.teacherRegistration.helpers({
|
|||
}
|
||||
});
|
||||
|
||||
Template.teacherRegistration.events({
|
||||
Template.reg.events({
|
||||
'click #registerMe' (event) {
|
||||
event.preventDefault();
|
||||
if (Session.get("canreg") == false) {
|
||||
|
|
@ -41,7 +38,6 @@ Template.teacherRegistration.events({
|
|||
} else {
|
||||
// console.log("Clicked");
|
||||
let missingName = false;
|
||||
let missingPhone = false;
|
||||
let missingEmail = false;
|
||||
let missingPassword = false;
|
||||
|
||||
|
|
@ -55,11 +51,6 @@ Template.teacherRegistration.events({
|
|||
Session.set("missingName", true);
|
||||
}
|
||||
|
||||
if (phone == "" || phone == null) {
|
||||
missingPhone = true;
|
||||
Session.set("missingPhone", true);
|
||||
}
|
||||
|
||||
if (email == "" || email == null) {
|
||||
missingEmail = true;
|
||||
Session.set("missingEmail", true);
|
||||
|
|
@ -72,7 +63,7 @@ Template.teacherRegistration.events({
|
|||
|
||||
let userId;
|
||||
|
||||
if (missingName == true || missingPhone == true || missingEmail == true || missingPassword == true) {
|
||||
if (missingName == true || missingEmail == true || missingPassword == true) {
|
||||
Session.set("missingReq", true);
|
||||
} else {
|
||||
Session.set("missingReq", false);
|
||||
|
|
@ -81,13 +72,12 @@ Template.teacherRegistration.events({
|
|||
password: password,
|
||||
profile: {
|
||||
fullname: name,
|
||||
phone: phone,
|
||||
}
|
||||
});
|
||||
|
||||
let userId = Meteor.userId();
|
||||
console.log("User ID: " + userId);
|
||||
Meteor.call("addToRole", "teacher", function(err, result) {
|
||||
Meteor.call("addToRole", "user", function(err, result) {
|
||||
if (err) {
|
||||
console.log(" ERROR: ROLES - Error adding user to role: " + err);
|
||||
} else {
|
||||
|
|
@ -120,8 +110,8 @@ Template.teacherRegistration.events({
|
|||
Session.set("missingEmail", false);
|
||||
}
|
||||
},
|
||||
'click #teachLogin' (event) {
|
||||
'click #login' (event) {
|
||||
event.preventDefault();
|
||||
FlowRouter.go('/teachlogin');
|
||||
FlowRouter.go('/login');
|
||||
},
|
||||
});
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
<template name="parentLogin">
|
||||
{{#if $not currentUser}}
|
||||
<div id="signInForm">
|
||||
<div class="container">
|
||||
<h3>Parent / Guardian Login</h3>
|
||||
<p>It is very important to the safety of all children that you do not share your login credentials with anyone.</p>
|
||||
<div class="card">
|
||||
<div class="card-content">
|
||||
<form class="login">
|
||||
<div class="row">
|
||||
<div class="col s12 input-field">
|
||||
<input type="email" name="email" id="email" class="email {{#if $eq misEmail true}}red lighten-3{{/if}}" />
|
||||
<label for="email">Email *</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col s12 input-field">
|
||||
<input type="password" name="password" id="password" class="password {{#if $eq misPass true}}red lighten-3{{/if}}" />
|
||||
<label for="password">Password *</label>
|
||||
</div>
|
||||
</div>
|
||||
{{#if $eq areFilled false}}
|
||||
<div class="row">
|
||||
<div class="col s12 red lighten-3 white-text">
|
||||
<span>You must fill all fields to login.</span>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<a id="logmein" class="waves-effect waves-light btn logmein green darken-1">Log In</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="card-action">
|
||||
<a href="#" id="parentReg">Register</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
</template>
|
||||
|
|
@ -1,123 +0,0 @@
|
|||
|
||||
Template.parentsRegistration.onRendered(function() {
|
||||
Session.set("canreg", false);
|
||||
Session.set("missingReq", false);
|
||||
Session.set("missingName", false);
|
||||
Session.set("missingPhone", false);
|
||||
Session.set("missingEmail", false);
|
||||
Session.set("missingPassword", false);
|
||||
});
|
||||
|
||||
Template.parentsRegistration.helpers({
|
||||
canReg: function() {
|
||||
return Session.get("canreg");
|
||||
},
|
||||
misName: function() {
|
||||
return Session.get("missingName");
|
||||
},
|
||||
misPhone: function() {
|
||||
return Session.get("missingPhone");
|
||||
},
|
||||
misEmail: function() {
|
||||
return Session.get("missingEmail");
|
||||
},
|
||||
misPass: function() {
|
||||
return Session.get("missingPassword");
|
||||
},
|
||||
misReq: function() {
|
||||
return Session.get("missingReq");
|
||||
}
|
||||
});
|
||||
|
||||
Template.parentsRegistration.events({
|
||||
'click #registerMe' (event) {
|
||||
event.preventDefault();
|
||||
if (Session.get("canreg") == false) {
|
||||
console.log("reg disabled.");
|
||||
} else {
|
||||
console.log("Clicked");
|
||||
let missingName = false;
|
||||
let missingPhone = false;
|
||||
let missingEmail = false;
|
||||
let missingPassword = false;
|
||||
|
||||
let email = $("#email").val();
|
||||
let password = $("#password").val();
|
||||
let name = $("#name").val();
|
||||
let phone = $("#phone").val();
|
||||
|
||||
if (name == "" || name == null) {
|
||||
missingName = true;
|
||||
Session.set("missingName", true);
|
||||
}
|
||||
|
||||
if (phone == "" || phone == null) {
|
||||
missingPhone = true;
|
||||
Session.set("missingPhone", true);
|
||||
}
|
||||
|
||||
if (email == "" || email == null) {
|
||||
missingEmail = true;
|
||||
Session.set("missingEmail", true);
|
||||
}
|
||||
|
||||
if (password == "" || password == null) {
|
||||
missingPassword = true;
|
||||
Session.set("missingPassword", true);
|
||||
}
|
||||
|
||||
let userId;
|
||||
|
||||
if (missingName == true || missingPhone == true || missingEmail == true || missingPassword == true) {
|
||||
Session.set("missingReq", true);
|
||||
} else {
|
||||
Session.set("missingReq", false);
|
||||
Accounts.createUser({
|
||||
email: email,
|
||||
password: password,
|
||||
profile: {
|
||||
fullname: name,
|
||||
phone: phone,
|
||||
}
|
||||
});
|
||||
|
||||
let userId = Meteor.userId();
|
||||
console.log("User ID: " + userId);
|
||||
Meteor.call("addToRole", "parent", function(err, result) {
|
||||
if (err) {
|
||||
console.log(" ERROR: ROLES - Error adding user to role: " + err);
|
||||
} else {
|
||||
// console.log("User should be added to role - parent.");
|
||||
FlowRouter.go('/dashboard');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
'keyup #passwordConfirm' (event) {
|
||||
let pwd = $("#password").val();
|
||||
let pwdconf = $("#passwordConfirm").val();
|
||||
|
||||
if (pwd == pwdconf) {
|
||||
// console.log("passwords match");
|
||||
Session.set("canreg", true);
|
||||
} else {
|
||||
// console.log("passwords don't match");
|
||||
Session.set("canreg", false);
|
||||
}
|
||||
},
|
||||
'change #email' (event) {
|
||||
let email = $("#email").val();
|
||||
var regex = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;
|
||||
let isEmail = regex.test(email);
|
||||
if (isEmail == false) {
|
||||
Session.set("missingEmail", true);
|
||||
} else {
|
||||
Session.set("missingEmail", false);
|
||||
}
|
||||
},
|
||||
'click #parguarlogin' (event) {
|
||||
event.preventDefault();
|
||||
FlowRouter.go('/parguarlogin');
|
||||
},
|
||||
});
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
<template name="parentsRegistration">
|
||||
{{#if $not currentUser}}
|
||||
<div id="registrationForm">
|
||||
<div class="container">
|
||||
<h3>Parent / Guardian Registration</h3>
|
||||
<p>It is very important to the safety of all children that you do not share your login credentials with anyone.</p>
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<div class="card">
|
||||
<div class="card-content">
|
||||
<form class="register">
|
||||
<div class="row">
|
||||
<div class="col s12 input-field">
|
||||
<input type="text" name="name" class="name {{#if $eq misName true}}red lighten-3{{/if}}" id="name" />
|
||||
<label for="name">Your Full Name *</label>
|
||||
</div>
|
||||
<div class="col s12 input-field">
|
||||
<input type="tel" name="phone" class="phone {{#if $eq misPhone true}}red lighten-3{{/if}}" id="phone" />
|
||||
<label for="phone">Best Phone Number *</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col s12 input-field">
|
||||
<input type="email" name="email" id="email" class="email {{#if $eq misEmail true}}red lighten-3{{/if}}" />
|
||||
<label for="email">Email *</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col s12 input-field">
|
||||
<input type="password" name="password" id="password" class="password {{#if $eq misPass true}}red lighten-3{{/if}}" />
|
||||
<label for="password">Password *</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col s12 input-field {{#if $eq canReg false}}orange lighten-1{{/if}}">
|
||||
<input type="password" name="passwordConfirm" id="passwordConfirm" class="passwordConfirm" />
|
||||
<label for="passwordConfirm">Confirm Password *</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<a id="registerMe" class="waves-effect waves-light btn registerMe {{#if $eq canReg false}}grey{{else}}green darken-1{{/if}}">Register</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="card-action">
|
||||
<a href="#" id="parguarlogin">Sign In</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
</template>
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
<template name="systemAdminLogin">
|
||||
{{#if $not currentUser}}
|
||||
<div id="signInForm">
|
||||
<div class="container">
|
||||
<h3>System Administrator Login</h3>
|
||||
<p>It is very important to the safety of all children that you do not share your login credentials with anyone.</p>
|
||||
<div class="card">
|
||||
<div class="card-content">
|
||||
<form class="login">
|
||||
<div class="row">
|
||||
<div class="col s12 input-field">
|
||||
<input type="email" name="email" id="email" class="email {{#if $eq misEmail true}}red lighten-3{{/if}}" />
|
||||
<label for="email">Email *</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col s12 input-field">
|
||||
<input type="password" name="password" id="password" class="password {{#if $eq misPass true}}red lighten-3{{/if}}" />
|
||||
<label for="password">Password *</label>
|
||||
</div>
|
||||
</div>
|
||||
{{#if $eq areFilled false}}
|
||||
<div class="row">
|
||||
<div class="col s12 red lighten-3 white-text">
|
||||
<span>You must fill all fields to login.</span>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if $eq loginError true}}
|
||||
<div class="row">
|
||||
<div class="col s12 red lighten-2 white-text">
|
||||
<span>Username or Password is incorrect. Please check your credentials and try again, or click 'Register' to create a new account.</span>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<a id="logmein" class="waves-effect waves-light btn logmein green darken-1">Log In</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="card-action">
|
||||
<a href="#" id="sysAdminReg">Register</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
</template>
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
Template.systemAdminLogin.onCreated(function() {
|
||||
|
||||
});
|
||||
|
||||
Template.systemAdminLogin.onRendered(function() {
|
||||
|
||||
});
|
||||
|
||||
Template.systemAdminLogin.helpers({
|
||||
areFilled: function() {
|
||||
return Session.get("filledFields");
|
||||
},
|
||||
loginError: function() {
|
||||
return Session.get("loginError");
|
||||
},
|
||||
});
|
||||
|
||||
Template.systemAdminLogin.events({
|
||||
'click #logmein' (event) {
|
||||
event.preventDefault();
|
||||
console.log("clicked login");
|
||||
let email = $("#email").val();
|
||||
let pass = $("#password").val();
|
||||
|
||||
if (email == null || email == "" || pass == "" || pass == null) {
|
||||
Session.set("filledFields", false);
|
||||
return;
|
||||
} else {
|
||||
return Meteor.loginWithPassword(email, pass, function(err, result) {
|
||||
if (err) {
|
||||
console.log("Error logging in: " + err);
|
||||
Session.set("loginError", true);
|
||||
} else {
|
||||
console.log("login result: " + result);
|
||||
Session.set("loginError", false);
|
||||
FlowRouter.go('/dashboard');
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
'click #sysAdminReg' (event) {
|
||||
event.preventDefault();
|
||||
FlowRouter.go('/systemAdminReg');
|
||||
},
|
||||
});
|
||||
|
|
@ -1,69 +0,0 @@
|
|||
<template name="systemAdminReg">
|
||||
{{#if Template.subscriptionsReady}}
|
||||
{{#if $not currentUser}}
|
||||
<div id="registrationForm">
|
||||
<div class="container">
|
||||
{{#if $eq allowedReg true}}
|
||||
<h3>System Admin Registration</h3>
|
||||
<p>If you want to disable System Admin registration after creating this account, please check the box.</p>
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<div class="card">
|
||||
<div class="card-content">
|
||||
<form class="register">
|
||||
<div class="row">
|
||||
<div class="col s12 input-field">
|
||||
<input type="text" name="name" class="name {{#if $eq misName true}}red lighten-3{{/if}}" id="name" />
|
||||
<label for="name">Your Full Name *</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col s12 input-field">
|
||||
<input type="email" name="email" id="email" class="email {{#if $eq misEmail true}}red lighten-3{{/if}}" />
|
||||
<label for="email">Email *</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col s12 input-field">
|
||||
<input type="password" name="password" id="password" class="password {{#if $eq misPass true}}red lighten-3{{/if}}" />
|
||||
<label for="password">Password *</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col s12 input-field {{#if $eq canReg false}}orange lighten-1{{/if}}">
|
||||
<input type="password" name="passwordConfirm" id="passwordConfirm" class="passwordConfirm" />
|
||||
<label for="passwordConfirm">Confirm Password *</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<p>
|
||||
<label>
|
||||
<input type="checkbox" id="disableSysAdminReg" />
|
||||
<span>Disable Future System Admin Registrations</span>
|
||||
</label>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<a id="registerMe" class="waves-effect waves-light btn registerMe {{#if $eq canReg false}}grey{{else}}green darken-1{{/if}}">Register</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="card-action">
|
||||
<a href="#" id="sysAdminLogin">Sign In</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{else}}
|
||||
<h3>System Admin Registration Disabled</h3>
|
||||
<p>A system administrator has disabled the ability to register as a new system admin. If you believe this was done mistakenly, contact a current system administrator for this system, and have them change this setting.</p>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</template>
|
||||
|
|
@ -1,118 +0,0 @@
|
|||
import { SysConfig } from '../../../imports/api/systemConfig.js';
|
||||
|
||||
Template.systemAdminReg.onCreated(function() {
|
||||
this.subscribe("SystemConfig");
|
||||
});
|
||||
|
||||
Template.systemAdminReg.onRendered(function() {
|
||||
Session.set("canReg", false);
|
||||
Session.set("misName", false);
|
||||
Session.set("misEmail", false);
|
||||
Session.set("misPass", false);
|
||||
});
|
||||
|
||||
Template.systemAdminReg.helpers({
|
||||
allowedReg: function() {
|
||||
let sysconf = SysConfig.findOne();
|
||||
if (typeof sysconf == 'undefined') {
|
||||
return true;
|
||||
} else {
|
||||
console.dir(sysconf);
|
||||
return sysconf.canReg;
|
||||
}
|
||||
},
|
||||
canReg: function() {
|
||||
return Session.get("canReg");
|
||||
},
|
||||
misName: function() {
|
||||
return Session.get("misName");
|
||||
},
|
||||
misEmail: function() {
|
||||
return Session.get("misEmail");
|
||||
},
|
||||
misPass: function() {
|
||||
return Session.get("misPass");
|
||||
},
|
||||
});
|
||||
|
||||
Template.systemAdminReg.events({
|
||||
'click #registerMe' (event) {
|
||||
event.preventDefault();
|
||||
if (Session.get("canReg") == false) {
|
||||
// console.log("reg disabled.");
|
||||
} else {
|
||||
let name = $("#name").val();
|
||||
let email = $("#email").val();
|
||||
let pass = $("#password").val();
|
||||
let disableSysAdReg = $("#disableSysAdminReg").prop("checked");
|
||||
|
||||
|
||||
if (name == "" || name == null) {
|
||||
Session.set("misName", true);
|
||||
}
|
||||
|
||||
if (email == "" || email == null) {
|
||||
Session.set("misEmail", true);
|
||||
}
|
||||
|
||||
if (pass == "" || pass == null) {
|
||||
Session.set("misPass", true);
|
||||
}
|
||||
|
||||
if (name == "" || name == null || email == "" || email == null || pass == "" || pass == null) {
|
||||
console.log("required info missing.");
|
||||
} else {
|
||||
// call meteor method to create user and add them to sys admin role.
|
||||
Accounts.createUser({
|
||||
email: email,
|
||||
password: pass,
|
||||
profile: {
|
||||
fullname: name,
|
||||
}
|
||||
});
|
||||
|
||||
let userId = Meteor.userId();
|
||||
console.log("User ID: " + userId);
|
||||
Meteor.call("addToRole", "systemadmin", function(err, result) {
|
||||
if (err) {
|
||||
console.log(" ERROR: ROLES - Error adding user to role: " + err);
|
||||
} else {
|
||||
Meteor.call('add.noSysAdminReg', function(err, result) {
|
||||
if (err) {
|
||||
console.log(" ERROR: SYS ADMIN REG - Error setting system admin registration as disabled: " + err);
|
||||
} else {
|
||||
FlowRouter.go('/dashboard');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
'keyup #passwordConfirm' (event) {
|
||||
let pwd = $("#password").val();
|
||||
let pwdconf = $("#passwordConfirm").val();
|
||||
|
||||
if (pwd == pwdconf) {
|
||||
// console.log("passwords match");
|
||||
Session.set("canReg", true);
|
||||
} else {
|
||||
// console.log("passwords don't match");
|
||||
Session.set("canReg", false);
|
||||
}
|
||||
},
|
||||
'change #email' (event) {
|
||||
let email = $("#email").val();
|
||||
var regex = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;
|
||||
let isEmail = regex.test(email);
|
||||
if (isEmail == false) {
|
||||
Session.set("misEmail", true);
|
||||
} else {
|
||||
Session.set("misEmail", false);
|
||||
}
|
||||
},
|
||||
'click #sysAdminLogin' (event) {
|
||||
event.preventDefault();
|
||||
FlowRouter.go('/sysAdminlogin');
|
||||
},
|
||||
});
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
Template.teacherLogin.onCreated(function() {
|
||||
|
||||
});
|
||||
|
||||
Template.teacherLogin.onRendered(function() {
|
||||
|
||||
});
|
||||
|
||||
Template.teacherLogin.helpers({
|
||||
areFilled: function() {
|
||||
return Session.get("filledFields");
|
||||
},
|
||||
});
|
||||
|
||||
Template.teacherLogin.events({
|
||||
'click #logmein' (event) {
|
||||
event.preventDefault();
|
||||
console.log("clicked login");
|
||||
let email = $("#email").val();
|
||||
let pass = $("#password").val();
|
||||
|
||||
if (email == null || email == "" || pass == "" || pass == null) {
|
||||
Session.set("filledFields", false);
|
||||
return;
|
||||
} else {
|
||||
Meteor.loginWithPassword(email, pass);
|
||||
}
|
||||
},
|
||||
'click #teacherReg' (event) {
|
||||
event.preventDefault();
|
||||
FlowRouter.go('/teachReg');
|
||||
},
|
||||
});
|
||||
|
|
@ -2,14 +2,32 @@
|
|||
{{#if isInRole 'systemadmin'}}
|
||||
<h3>User Management</h3>
|
||||
<div class="row">
|
||||
<div class="col s12 m6 l4 input-field" id="usersListCol">
|
||||
|
||||
</div>
|
||||
<div class="col s12 m6 l4 input-field" id="userAssignedRoleCol">
|
||||
|
||||
</div>
|
||||
<div class="col s12 m6 l4" id="assignRoleBtnCol">
|
||||
|
||||
<div class="col s12 m12 l12">
|
||||
<table class="striped highlight responsive-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Email</th>
|
||||
<th>Role</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#each userInfo}}
|
||||
<tr>
|
||||
<td>{{userName}}</td>
|
||||
<td>{{userEmail}}</td>
|
||||
<td>{{userRole}}</td>
|
||||
<td>
|
||||
<div class="input-field">
|
||||
<i class="material-icons clickable deleteUser">delete</i>
|
||||
<i class="material-icons clickable editUser">edit</i>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
|
|
|||
|
|
@ -5,13 +5,37 @@ Template.userMgmt.onCreated(function() {
|
|||
});
|
||||
|
||||
Template.userMgmt.onRendered(function() {
|
||||
|
||||
$('select').formSelect();
|
||||
});
|
||||
|
||||
Template.userMgmt.helpers({
|
||||
|
||||
userInfo: function() {
|
||||
return Meteor.users.find({});
|
||||
},
|
||||
userName: function() {
|
||||
return this.profile.fullname;
|
||||
},
|
||||
userEmail: function() {
|
||||
return this.emails[0].address;
|
||||
},
|
||||
userRole: function() {
|
||||
return Roles.getRolesForUser( this._id );
|
||||
}
|
||||
});
|
||||
|
||||
Template.userMgmt.events({
|
||||
"click .editUser" (event) {
|
||||
event.preventDefault();
|
||||
|
||||
let userId = this._id;
|
||||
// take action
|
||||
console.log("Edit called on: " + userId);
|
||||
},
|
||||
"click .deleteUser" (event) {
|
||||
event.preventDefault();
|
||||
|
||||
let userId = this._id;
|
||||
// take action
|
||||
console.log("Delete called on : " + userId);
|
||||
}
|
||||
});
|
||||
|
|
@ -1,83 +0,0 @@
|
|||
<template name="createServiceEntity">
|
||||
<div class="container">
|
||||
<h3>Create a Service Entity</h3>
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<div class="card">
|
||||
<div class="card-content">
|
||||
<span class="card-title">New Service Entity</span>
|
||||
<div class="row">
|
||||
<div class="col s12 input-field">
|
||||
<input type="text" class="entityName" id="entityName">
|
||||
<label for="entityName">Entity Name</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col s12 input-field">
|
||||
<input type="text" class="entityAddress" id="entityAddress">
|
||||
<label for="entityAddress">Address</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col s12 m6 l6 input-field">
|
||||
<input type="text" class="entityCity" id="entityCity" />
|
||||
<label for="entityCity">City</label>
|
||||
</div>
|
||||
<div class="col s12 m3 l3 input-field">
|
||||
<input type="text" class="entityState" id="entityState">
|
||||
<label for="entityState">State</label>
|
||||
</div>
|
||||
<div class="col s12 m3 l3 input-field">
|
||||
<input type="text" class="entityZip" id="entityZip" />
|
||||
<label for="entityZip">Postal / Zip Code</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col s12 m6 l6 input-field">
|
||||
<input type="tel" class="entityPhone" id="entityPhone" />
|
||||
<label for="entityPhone">Primary Phone</label>
|
||||
</div>
|
||||
<div class="col s12 m6 l6 input-field">
|
||||
<input type="email" class="entityEmail" id="entityEmail" />
|
||||
<label for="entityEmail">Primary Email</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col s12 m6 l6 input-field">
|
||||
<select name="entityType" id="entityType" class="entityType">
|
||||
<option value="" disabled selected>Choose One...</option>
|
||||
<option value="School">School</option>
|
||||
<option value="Church">Church</option>
|
||||
<option value="Daycare">Daycare</option>
|
||||
<option value="Hospital">Hospital</option>
|
||||
<option value="Elder Care">Elder Care</option>
|
||||
<option value="Group Home">Group Home</option>
|
||||
<option value="After School">After School</option>
|
||||
<option value="Sports Program">Sports Program</option>
|
||||
<option value="Private School">Private School</option>
|
||||
</select>
|
||||
<label for="entityType">Entity Type</label>
|
||||
</div>
|
||||
<div class="col s12 m4 l4 input-field">
|
||||
<input type="text" class="entityCode" id="entityCode" value="{{#if $eq useCodeGen true}}{{codeGen}}{{/if}}"/>
|
||||
<label for="entityCode">Entity Code</label>
|
||||
</div>
|
||||
<div class="col s12 m2 l2">
|
||||
<a class="waves-effect waves-light btn tooltipped generateEntityCode" data-position="bottom" data-tooltip="Generate Entity Code" id="generateEntityCode"><i class="material-icons">refresh</i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col s6 m6 l6">
|
||||
<a class="waves-effect waves-light btn-large orange cancelNewEntity" id="cancelNewEntity">Cancel</a>
|
||||
</div>
|
||||
<div class="col s6 m6 l6">
|
||||
<a class="waves-effect waves-light btn-large green right saveNewEntity" id="saveNewEntity">Save</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{> snackbar}}
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -1,73 +0,0 @@
|
|||
import { ServiceEntities } from '../../imports/api/serviceentities.js';
|
||||
|
||||
Template.createServiceEntity.onCreated(function() {
|
||||
this.subscribe("ServiceEntities");
|
||||
});
|
||||
|
||||
Template.createServiceEntity.onRendered(function() {
|
||||
$('select').formSelect();
|
||||
$('.tooltipped').tooltip();
|
||||
});
|
||||
|
||||
Template.createServiceEntity.helpers({
|
||||
codeGen: function() {
|
||||
return Session.get("codeGen");
|
||||
},
|
||||
useCodeGen: function() {
|
||||
return Session.get("useCodeGen");
|
||||
},
|
||||
});
|
||||
|
||||
Template.createServiceEntity.events({
|
||||
'click #saveNewEntity' (event) {
|
||||
event.preventDefault();
|
||||
|
||||
let name = $("#entityName").val();
|
||||
let code = $("#entityCode").val();
|
||||
let address = $("#entityAddress").val();
|
||||
let city = $("#entityCity").val();
|
||||
let state = $("#entityState").val();
|
||||
let zip = $("#entityZip").val();
|
||||
let phone = $("#entityPhone").val();
|
||||
let email = $("#entityEmail").val();
|
||||
let type = $("#entityType").val();
|
||||
|
||||
if (name == "" || name == null || code == "" || code == null) {
|
||||
Session.set("misReqEnt", true);
|
||||
} else {
|
||||
Session.set("misReqEnt", false);
|
||||
Meteor.call("add.serviceEntity", name, code, address, city, state, zip, phone, email, type, function(err, result) {
|
||||
if (err) {
|
||||
console.log(" ERROR adding service entity: " + err);
|
||||
showSnackbar("Error Adding Service Entity", "red");
|
||||
} else {
|
||||
console.log(" SUCCESS: Added Entity Succesfully!");
|
||||
showSnackbar("Entity Added Successfully", "green");
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
'click #cancelNewEntity' (event) {
|
||||
event.preventDefault();
|
||||
|
||||
$("#entityName").val("");
|
||||
$("#entityCode").val("");
|
||||
$("#entityAddress").val("");
|
||||
$("#entityCity").val("");
|
||||
$("#entityState").val("");
|
||||
$("#entityZip").val("");
|
||||
$("#entityPhone").val("");
|
||||
$("#entityEmail").val("");
|
||||
$("#entityType").val("");
|
||||
},
|
||||
'click #generateEntityCode' (event) {
|
||||
event.preventDefault();
|
||||
let length = 6;
|
||||
let chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
||||
let result = '';
|
||||
for (let i = length; i > 0; --i) result += chars[Math.floor(Math.random() * chars.length)];
|
||||
Session.set("codeGen", result);
|
||||
Session.set("useCodeGen", true);
|
||||
|
||||
}
|
||||
});
|
||||
|
|
@ -1,29 +1,22 @@
|
|||
<template name="dashboard">
|
||||
<h2>My Dashboard</h2>
|
||||
|
||||
<h4>My Dashboard</h4>
|
||||
<div class="row">
|
||||
<div class="col s12 m6">
|
||||
<div class="card blue-grey darken-1">
|
||||
<div class="card-content white-text">
|
||||
<span class="card-title"><h4>My Entities</h4></span>
|
||||
<div class="row">
|
||||
<div class="col s8"><i class="large material-icons">business</i></div>
|
||||
<div class="col s4"><h2>{{entityCount}}</h2></div>
|
||||
{{#if isInRole 'systemadmin'}}
|
||||
<div class="col s12 m6 l4">
|
||||
<div class="card blue-grey darken-1">
|
||||
<div class="card-content white-text">
|
||||
<span class="card-title"><h4>Users</h4></span>
|
||||
<div class="row">
|
||||
<div class="col s8"><i class="medium material-icons">person</i></div>
|
||||
<div class="col s4"><h2>{{userCount}}</h2></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-action">
|
||||
<a href="#" id="usermgmtlink">User Management</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-action">
|
||||
<a href="#">This is a link</a>
|
||||
<a href="#">This is a link</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
</div>
|
||||
<h4>My Children</h4>
|
||||
<h4>My Messages</h4>
|
||||
<h4>My Approved Persons</h4>
|
||||
<h4>My Denied Persons</h4>
|
||||
<h4>My Approved Vehicles</h4>
|
||||
<h4>My Denied Vehicles</h4>
|
||||
<h4>My Parents</h4>
|
||||
</template>
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
import { ServiceEntities } from "../../imports/api/serviceentities";
|
||||
|
||||
|
||||
Template.dashboard.onCreated(function() {
|
||||
this.subscribe("ServiceEntities");
|
||||
|
||||
});
|
||||
|
||||
Template.dashboard.onRendered(function() {
|
||||
|
|
@ -9,11 +9,14 @@ Template.dashboard.onRendered(function() {
|
|||
});
|
||||
|
||||
Template.dashboard.helpers({
|
||||
entityCount: function() {
|
||||
return ServiceEntities.find().count();
|
||||
},
|
||||
userCount: function() {
|
||||
return Meteor.users.find().count();
|
||||
}
|
||||
});
|
||||
|
||||
Template.dashboard.events({
|
||||
|
||||
"click #usermgmtlink" (event) {
|
||||
event.preventDefault();
|
||||
FlowRouter.go('/userMgmt');
|
||||
},
|
||||
});
|
||||
|
|
@ -1,28 +1,6 @@
|
|||
<template name="home">
|
||||
<div class="container">
|
||||
<h1>Welcome to Parent Pickup</h1>
|
||||
<h3>Goals</h3>
|
||||
<ul class="collapsible">
|
||||
<li>
|
||||
<div class="collapsible-header"><h5><i class="material-icons">child_care</i>Child Safety</h5></div>
|
||||
<div class="collapsible-body"><span>The safety of our children.</span></div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="collapsible-header"><h5><i class="material-icons">people_outline</i>Identify Safe Pickup People</h5></div>
|
||||
<div class="collapsible-body"><span>Identify safe persons allowed to pick up your child(ren) from school.</span></div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="collapsible-header"><h5><i class="material-icons">person_outline</i>Identify Safe Visitors</h5></div>
|
||||
<div class="collapsible-body"><span>Idntify safe persons allowed to visit / interact with your child(ren) at school functions / events.</span></div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="collapsible-header"><h5><i class="material-icons">directions_car</i>Identify Safe Vehicles</h5></div>
|
||||
<div class="collapsible-body"><span>Identify safe vehicles used to pick up your child(ren) from school.</span></div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="collapsible-header"><h5><i class="material-icons">mood_bad</i>Identify Potential Threats</h5></div>
|
||||
<div class="collapsible-body"><span>No one likes to talk about threats to our children's safety, but identification of a potential threat can help law enforcement, Staff, and Parents / Guardians remove a threat more effectively.</span></div>
|
||||
</li>
|
||||
</ul>
|
||||
<h4>Welcome to Get My!</h4>
|
||||
<p class="flow-text">Please login to start using Get My. An open source, self hostable, free to use, modify, re-distribute lit system. Created to make having lists easily available with workflows that you define.</p>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -3,7 +3,7 @@ Template.home.onCreated(function() {
|
|||
});
|
||||
|
||||
Template.home.onRendered(function() {
|
||||
$('.collapsible').collapsible();
|
||||
|
||||
});
|
||||
|
||||
Template.home.helpers({
|
||||
|
|
|
|||
|
|
@ -1,4 +0,0 @@
|
|||
<template name="messageView">
|
||||
<h2>Messages</h2>
|
||||
<p>This is where messages will go once it's built out.</p>
|
||||
</template>
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
|
||||
|
||||
Template.messageView.onCreated(function() {
|
||||
|
||||
});
|
||||
|
||||
Template.messageView.onRendered(function() {
|
||||
|
||||
});
|
||||
|
||||
Template.messageView.helpers({
|
||||
|
||||
});
|
||||
|
||||
Template.messageView.events({
|
||||
|
||||
});
|
||||
|
|
@ -1,57 +1,66 @@
|
|||
<template name="headerBar">
|
||||
<ul id="dropLogin" class="dropdown-content">
|
||||
<li><a href="#!" id="adminmainlogin" class="navBtn">Admin</a></li>
|
||||
<li><a href="#!" id="teachlogin" class="navBtn">Teacher</a></li>
|
||||
<li><a href="#!" id="parguarlogin" class="navBtn">Parent / Guardian</a></li>
|
||||
<li><a href="#!" id="monlogin" class="navBtn">Monitor</a></li>
|
||||
<ul id="drop-manage" class="dropdown-content">
|
||||
{{#if isInRole "systemadmin"}}
|
||||
<li><a href="#!" id="userMgmt" class="navBtn">User Management</a></li>
|
||||
{{/if}}
|
||||
<li><a href="#!" id="manageList" class="navBtn">List</a></li>
|
||||
<li><a href="#!" id="manageCategory" class="navBtn">Category</a></li>
|
||||
<li><a href="#!" id="manageProduct" class="navBtn">Product</a></li>
|
||||
<li><a href="#!" id="manageLocation" class="navBtn">Location</a></li>
|
||||
<li><a href="#!" id="manageStore" class="navBtn">Store</a></li>
|
||||
<li><a href="#!" id="manageCabinet" class="navBtn">Cabinet</a></li>
|
||||
<li><a href="#!" id="manageShelf" class="navBtn">Shelf</a></li>
|
||||
<li><a href="#!" id="manageBin" class="navBtn">Bin</a></li>
|
||||
</ul>
|
||||
<nav>
|
||||
<div class="nav-wrapper blue darken-4">
|
||||
<a href="#" class="brand-logo" id="brandLogo">Parent Pickup</a>
|
||||
<a href="#" class="brand-logo" id="brandLogo">Get My</a>
|
||||
<a href="#" data-target="mobile-demo" class="sidenav-trigger"><i class="material-icons">menu</i></a>
|
||||
<ul class="right hide-on-med-and-down">
|
||||
{{#if currentUser}}
|
||||
<!-- System Admins -->
|
||||
|
||||
{{#if isInRole "systemadmin"}}
|
||||
<li><a href="#" id="createServiceEntity" class="navBtn">Create New Service Entity</a></li>
|
||||
<li><a href="#" id="mylists" class="navBtn">My Lists</a></li>
|
||||
{{#if isInRole "admin,systemadmin"}}
|
||||
<li><a class="dropdown-trigger" href="#!" data-target="drop-manage">Manage<i class="material-icons right">arrow_drop_down</i></a></li>
|
||||
{{/if}}
|
||||
|
||||
<!-- For Parents / Guardians -->
|
||||
|
||||
{{#if isInRole "parent"}}
|
||||
<li><a href="#">Add Trusted People</a></li>
|
||||
<li><a href="#">Add Trusted Vehicles</a></li>
|
||||
<li><a href="#">Add Cautions</a></li>
|
||||
{{/if}}
|
||||
<li class="signOut"><a href="#" class="signOut">Log Out</a></li>
|
||||
<li class="signOut"><a href="#" class="signOut">Log Out</a></li>
|
||||
{{else}}
|
||||
<li><a class="dropdown-trigger" href="#!" data-target="dropLogin">Login Options<i class="material-icons right">arrow_drop_down</i></a></li>
|
||||
<li><a href="#!" id="login" class="navBtn">Login</a></li>
|
||||
{{/if}}
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
<ul class="sidenav" id="mobile-demo">
|
||||
{{#if currentUser}}
|
||||
<!-- System Admins -->
|
||||
|
||||
{{#if isInRole "systemadmin"}}
|
||||
<li><a href="#" id="createServiceEntity" class="navBtn">Create New Service Entity</a></li>
|
||||
{{/if}}
|
||||
|
||||
<!-- For Parents / Guardians -->
|
||||
|
||||
{{#if isInRole "parent"}}
|
||||
<li><a href="#">Add Trusted People</a></li>
|
||||
<li><a href="#">Add Trusted Vehicles</a></li>
|
||||
<li><a href="#">Add Cautions</a></li>
|
||||
{{/if}}
|
||||
<li class="signOut"><a href="#" class="signOut">Log Out</a></li>
|
||||
{{else}}
|
||||
<li><a href="#!" id="adminmainlogin" class="navBtn">Admin</a></li>
|
||||
<li><a href="#!" id="teachlogin" class="navBtn">Teacher</a></li>
|
||||
<li><a href="#!" id="parguarlogin" class="navBtn">Parent / Guardian</a></li>
|
||||
<li><a href="#!" id="monlogin" class="navBtn">Monitor</a></li>
|
||||
{{/if}}
|
||||
<ul class="collapsible">
|
||||
<li>
|
||||
<div class="collapsible-header" id="mylists">My Lists</div>
|
||||
</li>
|
||||
{{#if isInRole "admin,systemadmin"}}
|
||||
<li>
|
||||
<div class="collapsible-header">Manage<i class="material-icons">down-arrow</i></div>
|
||||
<div class="collapsible-body">
|
||||
<ul>
|
||||
{{#if isInRole "systemadmin"}}
|
||||
<li><a href="#" id="userMgmt">User Management</a></li>
|
||||
{{/if}}
|
||||
<li><a href="#" id="manageList">List</a></li>
|
||||
<li><a href="#" id="manageCategory">Category</a></li>
|
||||
<li><a href="#" id="manageProduct">Product</a></li>
|
||||
<li><a href="#" id="manageLocation">Location</a></li>
|
||||
<li><a href="#" id="manageStore">Store</a></li>
|
||||
<li><a href="#" id="manageCabinet">Cabinet</a></li>
|
||||
<li><a href="#" id="manageShelf">Shelf</a></li>
|
||||
<li><a href="#" id="manageBin">Bin</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
{{/if}}
|
||||
<li>
|
||||
<div class="collapsible-header signOut">Sign Out</div>
|
||||
</li>
|
||||
</ul>
|
||||
{{else}}
|
||||
<li><a href="#!" id="login" class="navBtn">Login</a></li>
|
||||
{{/if}}
|
||||
</ul>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -8,8 +8,10 @@ Template.headerBar.onRendered(function() {
|
|||
setTimeout(function() {
|
||||
$('.sidenav').sidenav();
|
||||
$(".dropdown-trigger").dropdown();
|
||||
}, 100)
|
||||
$('.collapsible').collapsible();
|
||||
}, 200)
|
||||
$(".dropdown-trigger").dropdown();
|
||||
$('.collapsible').collapsible();
|
||||
});
|
||||
|
||||
Template.headerBar.helpers({
|
||||
|
|
|
|||
|
|
@ -3,3 +3,8 @@ body {
|
|||
font-family: sans-serif;
|
||||
background-color: #F9FBFC;
|
||||
}
|
||||
|
||||
.clickable, .closeIcon, .dispo {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
|
|
|||
57
imports/api/category.js
Normal file
57
imports/api/category.js
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
import { Meteor } from 'meteor/meteor';
|
||||
import { Mongo } from 'meteor/mongo';
|
||||
import { check } from 'meteor/check';
|
||||
|
||||
export const Categories = new Mongo.Collection('categories');
|
||||
|
||||
Categories.allow({
|
||||
insert: function(userId, doc){
|
||||
// if use id exists, allow insert
|
||||
return !!userId;
|
||||
},
|
||||
});
|
||||
|
||||
Meteor.methods({
|
||||
'add.category' (name) {
|
||||
check(name, String);
|
||||
|
||||
if (!this.userId) {
|
||||
throw new Meteor.Error('You are not allowed to add categories. Make sure you are logged in with valid user credentials.');
|
||||
}
|
||||
|
||||
return Categories.insert({
|
||||
categoryName: name,
|
||||
categroyOwner: this.userid,
|
||||
});
|
||||
},
|
||||
'edit.category' (categoryId, categoryName,) {
|
||||
check(categoryId, String);
|
||||
check(categoryName, String);
|
||||
|
||||
if (!this.userId) {
|
||||
throw new Meteor.Error('You are not allowed to edit categories. Make sure you are logged in with valid user credentials.');
|
||||
}
|
||||
|
||||
return Categories.update({ _id: categoryId }, {
|
||||
$set: {
|
||||
categoryName: categoryName,
|
||||
}
|
||||
});
|
||||
},
|
||||
'delete.category' (categoryId) {
|
||||
check(categoryId, String);
|
||||
|
||||
if (!this.userId) {
|
||||
throw new Meteor.Error('You are not allowed to delete categories. Make sure you are logged in with valid user credentials.');
|
||||
}
|
||||
|
||||
let categoryInfo = Categories.findOne({ _id: categoryId });
|
||||
let myId = this.userId;
|
||||
if (myId == categoryInfo.owner) {
|
||||
return Categories.remove({ _id: categoryId });
|
||||
} else {
|
||||
console.log("User not allowed to delete this Category. Not the owner!");
|
||||
return("Not Allowed!");
|
||||
}
|
||||
},
|
||||
});
|
||||
158
imports/api/listItems.js
Normal file
158
imports/api/listItems.js
Normal file
|
|
@ -0,0 +1,158 @@
|
|||
import { Meteor } from 'meteor/meteor';
|
||||
import { Mongo } from 'meteor/mongo';
|
||||
import { check } from 'meteor/check';
|
||||
import { Products } from './products';
|
||||
import { ShopLists } from './shopList';
|
||||
|
||||
export const ListItems = new Mongo.Collection('listitems');
|
||||
|
||||
ListItems.allow({
|
||||
insert: function(userId, doc){
|
||||
// if use id exists, allow insert
|
||||
return !!userId;
|
||||
},
|
||||
});
|
||||
|
||||
Meteor.methods({
|
||||
'add.listItem' (itemName, prodId, itemQty, shopListId) {
|
||||
check(itemName, String);
|
||||
check(prodId, String);
|
||||
check(itemQty, String);
|
||||
check(shopListId, String);
|
||||
|
||||
if (!this.userId) {
|
||||
throw new Meteor.Error('You are not allowed to add items. Make sure you are logged in with valid user credentials.');
|
||||
}
|
||||
|
||||
// look up the item from the Products collection
|
||||
let prodInfo = Products.findOne({ _id: prodId });
|
||||
|
||||
// look up the shopList by shopListId
|
||||
let shopListInfo = ShopLists.findOne({ _id: shopListId });
|
||||
|
||||
return ListItems.insert({
|
||||
itemName: itemName,
|
||||
prodId: prodId,
|
||||
itemQty: itemQty,
|
||||
itemOwner: shopListInfo.ownerId,
|
||||
addedBy: this.userId,
|
||||
itemCategory: prodInfo.prodCategory,
|
||||
itemStore: prodInfo.prodStore,
|
||||
itemLocation: prodInfo.prodLocation,
|
||||
itemOrdered: false,
|
||||
itemReceived: false,
|
||||
dateAddedToList: new Date(),
|
||||
});
|
||||
},
|
||||
'setOrdered.listItem' (itemId) {
|
||||
check(itemId, String);
|
||||
|
||||
if (!this.userId) {
|
||||
throw new Meteor.Error('You are not allowed to set items as ordered. Make sure you are logged in with valid user credentials.');
|
||||
}
|
||||
|
||||
return ListItems.update({ _id: itemId }, {
|
||||
$set: {
|
||||
itemOrdered: true,
|
||||
dateOrdered: new Date(),
|
||||
}
|
||||
});
|
||||
},
|
||||
'setAllOrdered.listItem' (shopListId) {
|
||||
// set all items that are not already set as ordered, or set as received to ordered on this list
|
||||
|
||||
},
|
||||
'setNotOrdered.listItem' (itemId) {
|
||||
check(itemId, String);
|
||||
|
||||
if (!this.userId) {
|
||||
throw new Meteor.Error('You are not allowed to set items as not ordered. Make sure you are logged in with valid user credentials.');
|
||||
}
|
||||
|
||||
return ListItems.update({ _id: itemId }, {
|
||||
$set: {
|
||||
itemOrdered: false,
|
||||
dateUnOrdered: new Date(),
|
||||
}
|
||||
});
|
||||
},
|
||||
'setReceived.listItem' (itemId) {
|
||||
check(itemId, String);
|
||||
|
||||
if (!this.userId) {
|
||||
throw new Meteor.Error('You are not allowed to set items as received. Make sure you are logged in with valid user credentials.');
|
||||
}
|
||||
|
||||
return ListItems.update({ _id: itemId }, {
|
||||
$set: {
|
||||
itemReceived: true,
|
||||
dateReceived: new Date(),
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
'setNotReceived.listItem' (shopListId) {
|
||||
check(itemId, String);
|
||||
|
||||
if (!this.userId) {
|
||||
throw new Meteor.Error('You are not allowed to set items as not received. Make sure you are logged in with valid user credentials.');
|
||||
}
|
||||
|
||||
return ListItems.update({ _id: itemId }, {
|
||||
$set: {
|
||||
itemReceived: false,
|
||||
dateNotReceived: new Date(),
|
||||
}
|
||||
});
|
||||
},
|
||||
'setAllReceived.listItem' () {
|
||||
// set all items that are not already listed as received to received on this list
|
||||
|
||||
},
|
||||
'edit.listItem' (itemId, itemName, prodId, itemQty, shopListId) {
|
||||
check(itemId, String);
|
||||
check(itemName, String);
|
||||
check(prodId, String);
|
||||
check(itemQty, String);
|
||||
check(shopListId, String);
|
||||
|
||||
if (!this.userId) {
|
||||
throw new Meteor.Error('You are not allowed to add items. Make sure you are logged in with valid user credentials.');
|
||||
}
|
||||
|
||||
// look up the item from the Products collection
|
||||
let prodInfo = Products.findOne({ _id: prodId });
|
||||
|
||||
// look up the shopList by shopListId
|
||||
let shopListInfo = ShopLists.findOne({ _id: shopListId });
|
||||
|
||||
return ListItems.update({ _id: itemId }, {
|
||||
$set: {
|
||||
itemName: itemName,
|
||||
prodId: prodId,
|
||||
itemQty: itemQty,
|
||||
itemOwner: shopListInfo.ownerId,
|
||||
editedBy: this.userId,
|
||||
itemCategory: prodInfo.prodCategory,
|
||||
itemStore: prodInfo.prodStore,
|
||||
itemLocation: prodInfo.prodLocation,
|
||||
}
|
||||
});
|
||||
},
|
||||
'delete.listItem' (itemId) {
|
||||
check(itemId, String);
|
||||
|
||||
if (!this.userId) {
|
||||
throw new Meteor.Error('You are not allowed to delete list items. Make sure you are logged in with valid user credentials.');
|
||||
}
|
||||
|
||||
let itemInfo = ListItems.findOne({ _id: itemId });
|
||||
let myId = this.userId;
|
||||
if (myId == itemInfo.owner) {
|
||||
return ListItems.remove({ _id: itemId });
|
||||
} else {
|
||||
console.log("User not allowed to delete this list item. Not the owner!");
|
||||
return("Not Allowed!");
|
||||
}
|
||||
}
|
||||
});
|
||||
57
imports/api/lists.js
Normal file
57
imports/api/lists.js
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
import { Meteor } from 'meteor/meteor';
|
||||
import { Mongo } from 'meteor/mongo';
|
||||
import { check } from 'meteor/check';
|
||||
|
||||
export const Lists = new Mongo.Collection('lists');
|
||||
|
||||
Lists.allow({
|
||||
insert: function(userId, doc){
|
||||
// if use id exists, allow insert
|
||||
return !!userId;
|
||||
},
|
||||
});
|
||||
|
||||
Meteor.methods({
|
||||
'add.list' (listName) {
|
||||
check(listName, String);
|
||||
|
||||
if (!this.userId) {
|
||||
throw new Meteor.Error('You are not allowed to add lists. Make sure you are logged in with valid user credentials.');
|
||||
}
|
||||
|
||||
return Lists.insert({
|
||||
listName: listName,
|
||||
listOwner: this.userId;
|
||||
});
|
||||
},
|
||||
'edit.list' (listId, listName) {
|
||||
check(listId, String);
|
||||
check(listName, String);
|
||||
|
||||
if (!this.userId) {
|
||||
throw new Meteor.Error('You are not allowed to edit lists. Make sure you are logged in with valid user credentials.');
|
||||
}
|
||||
|
||||
return Lists.update({ _id: listId }, {
|
||||
$set: {
|
||||
listName: listName,
|
||||
}
|
||||
});
|
||||
},
|
||||
'delete.list' (listId) {
|
||||
check(listId, String);
|
||||
|
||||
if (!this.userId) {
|
||||
throw new Meteor.Error('You are not allowed to delete lists. Make sure you are logged in with valid user credentials.');
|
||||
}
|
||||
|
||||
let listInfo = Lists.findOne({ _id: listId });
|
||||
let myId = this.userId;
|
||||
if (myId == listInfo.owner) {
|
||||
return Lists.remove({ _id: listId });
|
||||
} else {
|
||||
console.log("User not allowed to delete this list. Not the owner!");
|
||||
return("Not Allowed!");
|
||||
}
|
||||
}
|
||||
});
|
||||
61
imports/api/location.js
Normal file
61
imports/api/location.js
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
import { Meteor } from 'meteor/meteor';
|
||||
import { Mongo } from 'meteor/mongo';
|
||||
import { check } from 'meteor/check';
|
||||
|
||||
export const Locations = new Mongo.Collection('locations');
|
||||
|
||||
Locations.allow({
|
||||
insert: function(userId, doc){
|
||||
// if use id exists, allow insert
|
||||
return !!userId;
|
||||
},
|
||||
});
|
||||
|
||||
Meteor.methods({
|
||||
'add.location' (name, type) {
|
||||
check(name, String);
|
||||
check(type, String);
|
||||
|
||||
if (!this.userId) {
|
||||
throw new Meteor.Error('You are not allowed to add locations. Make sure you are logged in with valid user credentials.');
|
||||
}
|
||||
|
||||
return Locations.insert({
|
||||
locationName: name,
|
||||
locationType: type,
|
||||
owner: this.userid,
|
||||
});
|
||||
},
|
||||
'edit.location' (locationId, locationName, locationType) {
|
||||
check(locationId, String);
|
||||
check(locationName, String);
|
||||
check(locationType, String);
|
||||
|
||||
if (!this.userId) {
|
||||
throw new Meteor.Error('You are not allowed to edit locations. Make sure you are logged in with valid user credentials.');
|
||||
}
|
||||
|
||||
return Locations.update({ _id: locationId }, {
|
||||
$set: {
|
||||
locationName: locationName,
|
||||
locationType: locationType,
|
||||
}
|
||||
});
|
||||
},
|
||||
'delete.location' (locationId) {
|
||||
check(locationId, String);
|
||||
|
||||
if (!this.userId) {
|
||||
throw new Meteor.Error('You are not allowed to delete locations. Make sure you are logged in with valid user credentials.');
|
||||
}
|
||||
|
||||
let locationInfo = Locations.findOne({ _id: locationId });
|
||||
let myId = this.userId;
|
||||
if (myId == locationInfo.owner) {
|
||||
return Locations.remove({ _id: locationId });
|
||||
} else {
|
||||
console.log("User not allowed to delete this location. Not the owner!");
|
||||
return("Not Allowed!");
|
||||
}
|
||||
},
|
||||
});
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
import { Meteor } from 'meteor/meteor';
|
||||
import { Mongo } from 'meteor/mongo';
|
||||
import { check } from 'meteor/check';
|
||||
|
||||
export const Messages = new Mongo.Collection('messages');
|
||||
|
||||
Messages.allow({
|
||||
insert: function(userId, doc){
|
||||
// if use id exists, allow insert
|
||||
return !!userId;
|
||||
},
|
||||
});
|
||||
|
||||
Meteor.methods({
|
||||
'add.message' (entityId, messageText, imageData, intendedRecipient, isGroupRecipient) {
|
||||
check(entityId, String);
|
||||
check(messageText, String);
|
||||
check(imageData, String);
|
||||
check(intendedRecipient, String);
|
||||
check(isGroupRecipient, Boolean);
|
||||
|
||||
if (!this.userId) {
|
||||
throw new Meteor.Error('User is not allowed to add new messages in the system, make sure you are logged in.');
|
||||
}
|
||||
|
||||
// need to get the userId and role, and ensure the message is sent properly to the appropriate person / people
|
||||
|
||||
},
|
||||
'delete.message' (messageId) {
|
||||
check(messageId, String);
|
||||
|
||||
if (!this.userId) {
|
||||
throw new Meteor.Error('User is not allowed to add new messages in the system, make sure you are logged in.');
|
||||
}
|
||||
|
||||
return Messages.update({ _id: messageId }, {
|
||||
$set: {
|
||||
isDeleted: true,
|
||||
}
|
||||
});
|
||||
},
|
||||
});
|
||||
69
imports/api/products.js
Normal file
69
imports/api/products.js
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
import { Meteor } from 'meteor/meteor';
|
||||
import { Mongo } from 'meteor/mongo';
|
||||
import { check } from 'meteor/check';
|
||||
|
||||
export const Products = new Mongo.Collection('products');
|
||||
|
||||
Products.allow({
|
||||
insert: function(userId, doc){
|
||||
// if use id exists, allow insert
|
||||
return !!userId;
|
||||
},
|
||||
});
|
||||
|
||||
Meteor.methods({
|
||||
'add.product' (prodName, prodCategory, prodStore, prodLocation) {
|
||||
check(prodName, String);
|
||||
check(prodCategory, String);
|
||||
check(prodStore, String);
|
||||
check(prodLocation, String);
|
||||
|
||||
if (!this.userId) {
|
||||
throw new Meteor.Error('You are not allowed to add products. Make sure you are logged in with valid user credentials.');
|
||||
}
|
||||
|
||||
return Products.insert({
|
||||
prodName: prodName,
|
||||
prodOwner: this.userId,
|
||||
prodCategory: prodCategory,
|
||||
prodStore: prodStore,
|
||||
prodLocation: prodLocation,
|
||||
});
|
||||
},
|
||||
'edit.product' (prodId, prodName, prodCategory, prodStore, prodLocation) {
|
||||
check(prodId, String);
|
||||
check(prodName, String);
|
||||
check(prodCategory, String);
|
||||
check(prodStore, String);
|
||||
check(prodLocation, String);
|
||||
|
||||
if (!this.userId) {
|
||||
throw new Meteor.Error('You are not allowed to edit products. Make sure you are logged in with valid user credentials.');
|
||||
}
|
||||
|
||||
return Products.update({ _id: itemId }, {
|
||||
$set: {
|
||||
prodName: prodName,
|
||||
prodCategory: prodCategory,
|
||||
prodStore: prodStore,
|
||||
prodLocation: prodLocation,
|
||||
}
|
||||
});
|
||||
},
|
||||
'delete.product' (prodId) {
|
||||
check(prodId, String);
|
||||
|
||||
if (!this.userId) {
|
||||
throw new Meteor.Error('You are not allowed to delete products. Make sure you are logged in with valid user credentials.');
|
||||
}
|
||||
|
||||
let prodInfo = Products.findOne({ _id: prodId });
|
||||
let myId = this.userId;
|
||||
if (myId == prodInfo.owner) {
|
||||
return Products.remove({ _id: prodId });
|
||||
} else {
|
||||
console.log("User not allowed to delete this product. Not the owner!");
|
||||
return("Not Allowed!");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
@ -1,79 +0,0 @@
|
|||
import { Meteor } from 'meteor/meteor';
|
||||
import { Mongo } from 'meteor/mongo';
|
||||
import { check } from 'meteor/check';
|
||||
|
||||
export const ServiceEntities = new Mongo.Collection('serviceEntities');
|
||||
|
||||
ServiceEntities.allow({
|
||||
insert: function(userId, doc){
|
||||
// if use id exists, allow insert
|
||||
return !!userId;
|
||||
},
|
||||
});
|
||||
|
||||
Meteor.methods({
|
||||
'add.serviceEntity' (name, code, address, city, state, zip, phone, email, type) {
|
||||
check(name, String);
|
||||
check(code, String);
|
||||
check(address, String);
|
||||
check(city, String);
|
||||
check(state, String);
|
||||
check(zip, String);
|
||||
check(phone, String);
|
||||
check(email, String);
|
||||
check(type, String);
|
||||
|
||||
if (!this.userId) {
|
||||
throw new Meteor.Error('User is not allowed to add new Service Entities, make sure you are logged in.');
|
||||
}
|
||||
|
||||
return ServiceEntities.insert({
|
||||
name: name,
|
||||
code: code,
|
||||
address: address,
|
||||
city: city,
|
||||
state: state,
|
||||
zip: zip,
|
||||
phone: phone,
|
||||
email: email,
|
||||
type: type,
|
||||
isActive: true,
|
||||
addedOn: new Date(),
|
||||
addedBy: Meteor.user().emails[0].address,
|
||||
});
|
||||
},
|
||||
'edit.serviceEntities' (entityId, name, code, address, city, state, zip, phone, email, type, isActive) {
|
||||
check(entityId, String);
|
||||
check(name, String);
|
||||
check(code, String);
|
||||
check(address, String);
|
||||
check(city, String);
|
||||
check(state, String);
|
||||
check(zip, String);
|
||||
check(phone, String);
|
||||
check(email, String);
|
||||
check(type, String);
|
||||
check(isActive, Boolean);
|
||||
|
||||
if (!this.userId) {
|
||||
throw new Meteor.Error('User is not allowed to add new Service Entities, make sure you are logged in.');
|
||||
}
|
||||
|
||||
return ServiceEntities.update({ _id: entityId }, {
|
||||
$set: {
|
||||
name: name,
|
||||
code: code,
|
||||
address: address,
|
||||
city: city,
|
||||
state: state,
|
||||
zip: zip,
|
||||
phone: phone,
|
||||
email: email,
|
||||
type: type,
|
||||
isActive: isActive,
|
||||
updatedOn: new Date(),
|
||||
updatedBy: Meteor.user().emails[0].address,
|
||||
}
|
||||
});
|
||||
},
|
||||
});
|
||||
63
imports/api/shopList.js
Normal file
63
imports/api/shopList.js
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
import { Meteor } from 'meteor/meteor';
|
||||
import { Mongo } from 'meteor/mongo';
|
||||
import { check } from 'meteor/check';
|
||||
|
||||
export const ShopLists = new Mongo.Collection('shoplists');
|
||||
|
||||
ShopLists.allow({
|
||||
insert: function(userId, doc){
|
||||
// if use id exists, allow insert
|
||||
return !!userId;
|
||||
},
|
||||
});
|
||||
|
||||
Meteor.methods({
|
||||
'add.shopList' (shopName) {
|
||||
check(shopName, Sring);
|
||||
|
||||
if (!this.userId) {
|
||||
throw new Meteor.Error('You are not allowed to add shopping lists. Make sure you are logged in with valid user credentials.');
|
||||
}
|
||||
|
||||
return ShopLists.insert({
|
||||
shopName: shopName,
|
||||
shopOwner: this.userId,
|
||||
});
|
||||
},
|
||||
'add.shopListUsers' (userIds) {
|
||||
|
||||
},
|
||||
'edit.shopList' (shopId, shopName) {
|
||||
check(shopId, String);
|
||||
check(shopName, String);
|
||||
|
||||
if (!this.userId) {
|
||||
throw new Meteor.Error('You are not allowed to edit shopping lists. Make sure you are logged in with valid user credentials.');
|
||||
}
|
||||
|
||||
return ShopLists.update({ _id: shopId }, {
|
||||
$set: {
|
||||
shopName: shopName,
|
||||
}
|
||||
});
|
||||
},
|
||||
'edit.shopListUsers' (shopId, userIds) {
|
||||
|
||||
},
|
||||
'delete.shopList' (shopId) {
|
||||
check(shopId, String);
|
||||
|
||||
if (!this.userId) {
|
||||
throw new Meteor.Error('You are not allowed to delete shopping lists. Make sure you are logged in with valid user credentials.');
|
||||
}
|
||||
|
||||
let shopInfo = ShopLists.findOne({ _id: shopId });
|
||||
let myId = this.userId;
|
||||
if (myId == shopInfo.owner) {
|
||||
return ShopLists.remove({ _id: shopId });
|
||||
} else {
|
||||
console.log("User not allowed to delete this shopping list. Not the owner!");
|
||||
return("Not Allowed!");
|
||||
}
|
||||
},
|
||||
});
|
||||
61
imports/api/stores.js
Normal file
61
imports/api/stores.js
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
import { Meteor } from 'meteor/meteor';
|
||||
import { Mongo } from 'meteor/mongo';
|
||||
import { check } from 'meteor/check';
|
||||
|
||||
export const Stores = new Mongo.Collection('stores');
|
||||
|
||||
Stores.allow({
|
||||
insert: function(userId, doc){
|
||||
// if use id exists, allow insert
|
||||
return !!userId;
|
||||
},
|
||||
});
|
||||
|
||||
Meteor.methods({
|
||||
'add.store' (storeName, storeType) {
|
||||
check(storeName, String);
|
||||
check(storeType, String);
|
||||
|
||||
if (!this.userId) {
|
||||
throw new Meteor.Error('You are not allowed to add stores. Make sure you are logged in with valid user credentials.');
|
||||
}
|
||||
|
||||
return Stores.insert({
|
||||
storeName: storeName,
|
||||
storeType: storeType,
|
||||
owner: this.userid,
|
||||
});
|
||||
},
|
||||
'edit.store' (storeId, storeName, storeType) {
|
||||
check(storeId, String);
|
||||
check(storeName, String);
|
||||
check(storeType, String);
|
||||
|
||||
if (!this.userId) {
|
||||
throw new Meteor.Error('You are not allowed to edit stores. Make sure you are logged in with valid user credentials.');
|
||||
}
|
||||
|
||||
return Stores.update({ _id: storeId }, {
|
||||
$set: {
|
||||
storeName: storeName,
|
||||
storeType: storeType,
|
||||
}
|
||||
});
|
||||
},
|
||||
'delete.store' (storeId) {
|
||||
check(storeId, String);
|
||||
|
||||
if (!this.userId) {
|
||||
throw new Meteor.Error('You are not allowed to delete stores. Make sure you are logged in with valid user credentials.');
|
||||
}
|
||||
|
||||
let storeInfo = Stores.findOne({ _id: storeId });
|
||||
let myId = this.userId;
|
||||
if (myId == storeInfo.owner) {
|
||||
return Stores.remove({ _id: storeId });
|
||||
} else {
|
||||
console.log("User not allowed to delete this store. Not the owner!");
|
||||
return("Not Allowed!");
|
||||
}
|
||||
},
|
||||
});
|
||||
|
|
@ -5,38 +5,6 @@ FlowRouter.route('/', {
|
|||
}
|
||||
});
|
||||
|
||||
// ------- System Admin flows -----------
|
||||
|
||||
FlowRouter.route('/systemAdminReg', {
|
||||
name: 'sysAdminReg',
|
||||
action() {
|
||||
BlazeLayout.render('MainLayout', { notLoggedIn: "systemAdminReg" });
|
||||
}
|
||||
});
|
||||
|
||||
FlowRouter.route('/sysAdminLogin', {
|
||||
name: 'sysAdminLogin',
|
||||
action() {
|
||||
BlazeLayout.render('MainLayout', { notLoggedIn: "systemAdminLogin" });
|
||||
}
|
||||
});
|
||||
|
||||
FlowRouter.route('/adminMainLogin', {
|
||||
name: 'sysAdminLogin',
|
||||
action() {
|
||||
BlazeLayout.render('MainLayout', { notLoggedIn: "systemAdminLogin" });
|
||||
}
|
||||
});
|
||||
|
||||
FlowRouter.route('/createServiceEntity', {
|
||||
name: 'createServiceEntity',
|
||||
action() {
|
||||
BlazeLayout.render('MainLayout', { main: "createServiceEntity" });
|
||||
}
|
||||
});
|
||||
|
||||
// ------- General User Flows --------
|
||||
|
||||
FlowRouter.route('/dashboard', {
|
||||
name: 'home',
|
||||
action() {
|
||||
|
|
@ -44,30 +12,23 @@ FlowRouter.route('/dashboard', {
|
|||
}
|
||||
});
|
||||
|
||||
FlowRouter.route('/parguarlogin', {
|
||||
name: 'parentLogin',
|
||||
FlowRouter.route('/login', {
|
||||
name: 'login',
|
||||
action() {
|
||||
BlazeLayout.render('MainLayout', { notLoggedIn: "parentLogin" });
|
||||
BlazeLayout.render('MainLayout', { notLoggedIn: "login" });
|
||||
}
|
||||
});
|
||||
|
||||
FlowRouter.route('/parentReg', {
|
||||
name: 'parentReg',
|
||||
FlowRouter.route('/reg', {
|
||||
name: 'reg',
|
||||
action() {
|
||||
BlazeLayout.render('MainLayout', { notLoggedIn: "parentsRegistration" });
|
||||
BlazeLayout.render('MainLayout', { notLoggedIn: "reg" });
|
||||
}
|
||||
});
|
||||
|
||||
FlowRouter.route('/teachlogin', {
|
||||
name: 'teachLogin',
|
||||
FlowRouter.route('/userMgmt', {
|
||||
name: 'userMgmt',
|
||||
action() {
|
||||
BlazeLayout.render('MainLayout', { notLoggedIn: "teacherLogin" });
|
||||
}
|
||||
});
|
||||
|
||||
FlowRouter.route('/teachReg', {
|
||||
name: 'teachReg',
|
||||
action() {
|
||||
BlazeLayout.render('MainLayout', { notLoggedIn: "teacherRegistration" });
|
||||
BlazeLayout.render('MainLayout', { main: 'userMgmt' });
|
||||
}
|
||||
});
|
||||
22
node_modules/@babel/runtime/LICENSE
generated
vendored
Normal file
22
node_modules/@babel/runtime/LICENSE
generated
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2014-present Sebastian McKenzie and other contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
19
node_modules/@babel/runtime/README.md
generated
vendored
Normal file
19
node_modules/@babel/runtime/README.md
generated
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# @babel/runtime
|
||||
|
||||
> babel's modular runtime helpers
|
||||
|
||||
See our website [@babel/runtime](https://babeljs.io/docs/en/babel-runtime) for more information.
|
||||
|
||||
## Install
|
||||
|
||||
Using npm:
|
||||
|
||||
```sh
|
||||
npm install --save @babel/runtime
|
||||
```
|
||||
|
||||
or using yarn:
|
||||
|
||||
```sh
|
||||
yarn add @babel/runtime
|
||||
```
|
||||
99
node_modules/@babel/runtime/helpers/AsyncGenerator.js
generated
vendored
Normal file
99
node_modules/@babel/runtime/helpers/AsyncGenerator.js
generated
vendored
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
var AwaitValue = require("./AwaitValue.js");
|
||||
|
||||
function AsyncGenerator(gen) {
|
||||
var front, back;
|
||||
|
||||
function send(key, arg) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
var request = {
|
||||
key: key,
|
||||
arg: arg,
|
||||
resolve: resolve,
|
||||
reject: reject,
|
||||
next: null
|
||||
};
|
||||
|
||||
if (back) {
|
||||
back = back.next = request;
|
||||
} else {
|
||||
front = back = request;
|
||||
resume(key, arg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function resume(key, arg) {
|
||||
try {
|
||||
var result = gen[key](arg);
|
||||
var value = result.value;
|
||||
var wrappedAwait = value instanceof AwaitValue;
|
||||
Promise.resolve(wrappedAwait ? value.wrapped : value).then(function (arg) {
|
||||
if (wrappedAwait) {
|
||||
resume(key === "return" ? "return" : "next", arg);
|
||||
return;
|
||||
}
|
||||
|
||||
settle(result.done ? "return" : "normal", arg);
|
||||
}, function (err) {
|
||||
resume("throw", err);
|
||||
});
|
||||
} catch (err) {
|
||||
settle("throw", err);
|
||||
}
|
||||
}
|
||||
|
||||
function settle(type, value) {
|
||||
switch (type) {
|
||||
case "return":
|
||||
front.resolve({
|
||||
value: value,
|
||||
done: true
|
||||
});
|
||||
break;
|
||||
|
||||
case "throw":
|
||||
front.reject(value);
|
||||
break;
|
||||
|
||||
default:
|
||||
front.resolve({
|
||||
value: value,
|
||||
done: false
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
||||
front = front.next;
|
||||
|
||||
if (front) {
|
||||
resume(front.key, front.arg);
|
||||
} else {
|
||||
back = null;
|
||||
}
|
||||
}
|
||||
|
||||
this._invoke = send;
|
||||
|
||||
if (typeof gen["return"] !== "function") {
|
||||
this["return"] = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
AsyncGenerator.prototype[typeof Symbol === "function" && Symbol.asyncIterator || "@@asyncIterator"] = function () {
|
||||
return this;
|
||||
};
|
||||
|
||||
AsyncGenerator.prototype.next = function (arg) {
|
||||
return this._invoke("next", arg);
|
||||
};
|
||||
|
||||
AsyncGenerator.prototype["throw"] = function (arg) {
|
||||
return this._invoke("throw", arg);
|
||||
};
|
||||
|
||||
AsyncGenerator.prototype["return"] = function (arg) {
|
||||
return this._invoke("return", arg);
|
||||
};
|
||||
|
||||
module.exports = AsyncGenerator;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
6
node_modules/@babel/runtime/helpers/AwaitValue.js
generated
vendored
Normal file
6
node_modules/@babel/runtime/helpers/AwaitValue.js
generated
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
function _AwaitValue(value) {
|
||||
this.wrapped = value;
|
||||
}
|
||||
|
||||
module.exports = _AwaitValue;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
31
node_modules/@babel/runtime/helpers/applyDecoratedDescriptor.js
generated
vendored
Normal file
31
node_modules/@babel/runtime/helpers/applyDecoratedDescriptor.js
generated
vendored
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
|
||||
var desc = {};
|
||||
Object.keys(descriptor).forEach(function (key) {
|
||||
desc[key] = descriptor[key];
|
||||
});
|
||||
desc.enumerable = !!desc.enumerable;
|
||||
desc.configurable = !!desc.configurable;
|
||||
|
||||
if ('value' in desc || desc.initializer) {
|
||||
desc.writable = true;
|
||||
}
|
||||
|
||||
desc = decorators.slice().reverse().reduce(function (desc, decorator) {
|
||||
return decorator(target, property, desc) || desc;
|
||||
}, desc);
|
||||
|
||||
if (context && desc.initializer !== void 0) {
|
||||
desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
|
||||
desc.initializer = undefined;
|
||||
}
|
||||
|
||||
if (desc.initializer === void 0) {
|
||||
Object.defineProperty(target, property, desc);
|
||||
desc = null;
|
||||
}
|
||||
|
||||
return desc;
|
||||
}
|
||||
|
||||
module.exports = _applyDecoratedDescriptor;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
12
node_modules/@babel/runtime/helpers/arrayLikeToArray.js
generated
vendored
Normal file
12
node_modules/@babel/runtime/helpers/arrayLikeToArray.js
generated
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
function _arrayLikeToArray(arr, len) {
|
||||
if (len == null || len > arr.length) len = arr.length;
|
||||
|
||||
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
||||
arr2[i] = arr[i];
|
||||
}
|
||||
|
||||
return arr2;
|
||||
}
|
||||
|
||||
module.exports = _arrayLikeToArray;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
6
node_modules/@babel/runtime/helpers/arrayWithHoles.js
generated
vendored
Normal file
6
node_modules/@babel/runtime/helpers/arrayWithHoles.js
generated
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
function _arrayWithHoles(arr) {
|
||||
if (Array.isArray(arr)) return arr;
|
||||
}
|
||||
|
||||
module.exports = _arrayWithHoles;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
8
node_modules/@babel/runtime/helpers/arrayWithoutHoles.js
generated
vendored
Normal file
8
node_modules/@babel/runtime/helpers/arrayWithoutHoles.js
generated
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
var arrayLikeToArray = require("./arrayLikeToArray.js");
|
||||
|
||||
function _arrayWithoutHoles(arr) {
|
||||
if (Array.isArray(arr)) return arrayLikeToArray(arr);
|
||||
}
|
||||
|
||||
module.exports = _arrayWithoutHoles;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
10
node_modules/@babel/runtime/helpers/assertThisInitialized.js
generated
vendored
Normal file
10
node_modules/@babel/runtime/helpers/assertThisInitialized.js
generated
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
function _assertThisInitialized(self) {
|
||||
if (self === void 0) {
|
||||
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
module.exports = _assertThisInitialized;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
57
node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js
generated
vendored
Normal file
57
node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js
generated
vendored
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
function _asyncGeneratorDelegate(inner, awaitWrap) {
|
||||
var iter = {},
|
||||
waiting = false;
|
||||
|
||||
function pump(key, value) {
|
||||
waiting = true;
|
||||
value = new Promise(function (resolve) {
|
||||
resolve(inner[key](value));
|
||||
});
|
||||
return {
|
||||
done: false,
|
||||
value: awaitWrap(value)
|
||||
};
|
||||
}
|
||||
|
||||
;
|
||||
|
||||
iter[typeof Symbol !== "undefined" && Symbol.iterator || "@@iterator"] = function () {
|
||||
return this;
|
||||
};
|
||||
|
||||
iter.next = function (value) {
|
||||
if (waiting) {
|
||||
waiting = false;
|
||||
return value;
|
||||
}
|
||||
|
||||
return pump("next", value);
|
||||
};
|
||||
|
||||
if (typeof inner["throw"] === "function") {
|
||||
iter["throw"] = function (value) {
|
||||
if (waiting) {
|
||||
waiting = false;
|
||||
throw value;
|
||||
}
|
||||
|
||||
return pump("throw", value);
|
||||
};
|
||||
}
|
||||
|
||||
if (typeof inner["return"] === "function") {
|
||||
iter["return"] = function (value) {
|
||||
if (waiting) {
|
||||
waiting = false;
|
||||
return value;
|
||||
}
|
||||
|
||||
return pump("return", value);
|
||||
};
|
||||
}
|
||||
|
||||
return iter;
|
||||
}
|
||||
|
||||
module.exports = _asyncGeneratorDelegate;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
16
node_modules/@babel/runtime/helpers/asyncIterator.js
generated
vendored
Normal file
16
node_modules/@babel/runtime/helpers/asyncIterator.js
generated
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
function _asyncIterator(iterable) {
|
||||
var method;
|
||||
|
||||
if (typeof Symbol !== "undefined") {
|
||||
if (Symbol.asyncIterator) method = iterable[Symbol.asyncIterator];
|
||||
if (method == null && Symbol.iterator) method = iterable[Symbol.iterator];
|
||||
}
|
||||
|
||||
if (method == null) method = iterable["@@asyncIterator"];
|
||||
if (method == null) method = iterable["@@iterator"];
|
||||
if (method == null) throw new TypeError("Object is not async iterable");
|
||||
return method.call(iterable);
|
||||
}
|
||||
|
||||
module.exports = _asyncIterator;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
38
node_modules/@babel/runtime/helpers/asyncToGenerator.js
generated
vendored
Normal file
38
node_modules/@babel/runtime/helpers/asyncToGenerator.js
generated
vendored
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
||||
try {
|
||||
var info = gen[key](arg);
|
||||
var value = info.value;
|
||||
} catch (error) {
|
||||
reject(error);
|
||||
return;
|
||||
}
|
||||
|
||||
if (info.done) {
|
||||
resolve(value);
|
||||
} else {
|
||||
Promise.resolve(value).then(_next, _throw);
|
||||
}
|
||||
}
|
||||
|
||||
function _asyncToGenerator(fn) {
|
||||
return function () {
|
||||
var self = this,
|
||||
args = arguments;
|
||||
return new Promise(function (resolve, reject) {
|
||||
var gen = fn.apply(self, args);
|
||||
|
||||
function _next(value) {
|
||||
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
||||
}
|
||||
|
||||
function _throw(err) {
|
||||
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
||||
}
|
||||
|
||||
_next(undefined);
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = _asyncToGenerator;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
8
node_modules/@babel/runtime/helpers/awaitAsyncGenerator.js
generated
vendored
Normal file
8
node_modules/@babel/runtime/helpers/awaitAsyncGenerator.js
generated
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
var AwaitValue = require("./AwaitValue.js");
|
||||
|
||||
function _awaitAsyncGenerator(value) {
|
||||
return new AwaitValue(value);
|
||||
}
|
||||
|
||||
module.exports = _awaitAsyncGenerator;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
8
node_modules/@babel/runtime/helpers/checkPrivateRedeclaration.js
generated
vendored
Normal file
8
node_modules/@babel/runtime/helpers/checkPrivateRedeclaration.js
generated
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
function _checkPrivateRedeclaration(obj, privateCollection) {
|
||||
if (privateCollection.has(obj)) {
|
||||
throw new TypeError("Cannot initialize the same private elements twice on an object");
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = _checkPrivateRedeclaration;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
23
node_modules/@babel/runtime/helpers/classApplyDescriptorDestructureSet.js
generated
vendored
Normal file
23
node_modules/@babel/runtime/helpers/classApplyDescriptorDestructureSet.js
generated
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
function _classApplyDescriptorDestructureSet(receiver, descriptor) {
|
||||
if (descriptor.set) {
|
||||
if (!("__destrObj" in descriptor)) {
|
||||
descriptor.__destrObj = {
|
||||
set value(v) {
|
||||
descriptor.set.call(receiver, v);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
return descriptor.__destrObj;
|
||||
} else {
|
||||
if (!descriptor.writable) {
|
||||
throw new TypeError("attempted to set read only private field");
|
||||
}
|
||||
|
||||
return descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = _classApplyDescriptorDestructureSet;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
10
node_modules/@babel/runtime/helpers/classApplyDescriptorGet.js
generated
vendored
Normal file
10
node_modules/@babel/runtime/helpers/classApplyDescriptorGet.js
generated
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
function _classApplyDescriptorGet(receiver, descriptor) {
|
||||
if (descriptor.get) {
|
||||
return descriptor.get.call(receiver);
|
||||
}
|
||||
|
||||
return descriptor.value;
|
||||
}
|
||||
|
||||
module.exports = _classApplyDescriptorGet;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
14
node_modules/@babel/runtime/helpers/classApplyDescriptorSet.js
generated
vendored
Normal file
14
node_modules/@babel/runtime/helpers/classApplyDescriptorSet.js
generated
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
function _classApplyDescriptorSet(receiver, descriptor, value) {
|
||||
if (descriptor.set) {
|
||||
descriptor.set.call(receiver, value);
|
||||
} else {
|
||||
if (!descriptor.writable) {
|
||||
throw new TypeError("attempted to set read only private field");
|
||||
}
|
||||
|
||||
descriptor.value = value;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = _classApplyDescriptorSet;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
8
node_modules/@babel/runtime/helpers/classCallCheck.js
generated
vendored
Normal file
8
node_modules/@babel/runtime/helpers/classCallCheck.js
generated
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
function _classCallCheck(instance, Constructor) {
|
||||
if (!(instance instanceof Constructor)) {
|
||||
throw new TypeError("Cannot call a class as a function");
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = _classCallCheck;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
8
node_modules/@babel/runtime/helpers/classCheckPrivateStaticAccess.js
generated
vendored
Normal file
8
node_modules/@babel/runtime/helpers/classCheckPrivateStaticAccess.js
generated
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
function _classCheckPrivateStaticAccess(receiver, classConstructor) {
|
||||
if (receiver !== classConstructor) {
|
||||
throw new TypeError("Private static access of wrong provenance");
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = _classCheckPrivateStaticAccess;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
8
node_modules/@babel/runtime/helpers/classCheckPrivateStaticFieldDescriptor.js
generated
vendored
Normal file
8
node_modules/@babel/runtime/helpers/classCheckPrivateStaticFieldDescriptor.js
generated
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
function _classCheckPrivateStaticFieldDescriptor(descriptor, action) {
|
||||
if (descriptor === undefined) {
|
||||
throw new TypeError("attempted to " + action + " private static field before its declaration");
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = _classCheckPrivateStaticFieldDescriptor;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
10
node_modules/@babel/runtime/helpers/classExtractFieldDescriptor.js
generated
vendored
Normal file
10
node_modules/@babel/runtime/helpers/classExtractFieldDescriptor.js
generated
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
function _classExtractFieldDescriptor(receiver, privateMap, action) {
|
||||
if (!privateMap.has(receiver)) {
|
||||
throw new TypeError("attempted to " + action + " private field on non-instance");
|
||||
}
|
||||
|
||||
return privateMap.get(receiver);
|
||||
}
|
||||
|
||||
module.exports = _classExtractFieldDescriptor;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
6
node_modules/@babel/runtime/helpers/classNameTDZError.js
generated
vendored
Normal file
6
node_modules/@babel/runtime/helpers/classNameTDZError.js
generated
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
function _classNameTDZError(name) {
|
||||
throw new Error("Class \"" + name + "\" cannot be referenced in computed property keys.");
|
||||
}
|
||||
|
||||
module.exports = _classNameTDZError;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
11
node_modules/@babel/runtime/helpers/classPrivateFieldDestructureSet.js
generated
vendored
Normal file
11
node_modules/@babel/runtime/helpers/classPrivateFieldDestructureSet.js
generated
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
var classApplyDescriptorDestructureSet = require("./classApplyDescriptorDestructureSet.js");
|
||||
|
||||
var classExtractFieldDescriptor = require("./classExtractFieldDescriptor.js");
|
||||
|
||||
function _classPrivateFieldDestructureSet(receiver, privateMap) {
|
||||
var descriptor = classExtractFieldDescriptor(receiver, privateMap, "set");
|
||||
return classApplyDescriptorDestructureSet(receiver, descriptor);
|
||||
}
|
||||
|
||||
module.exports = _classPrivateFieldDestructureSet;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
11
node_modules/@babel/runtime/helpers/classPrivateFieldGet.js
generated
vendored
Normal file
11
node_modules/@babel/runtime/helpers/classPrivateFieldGet.js
generated
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
var classApplyDescriptorGet = require("./classApplyDescriptorGet.js");
|
||||
|
||||
var classExtractFieldDescriptor = require("./classExtractFieldDescriptor.js");
|
||||
|
||||
function _classPrivateFieldGet(receiver, privateMap) {
|
||||
var descriptor = classExtractFieldDescriptor(receiver, privateMap, "get");
|
||||
return classApplyDescriptorGet(receiver, descriptor);
|
||||
}
|
||||
|
||||
module.exports = _classPrivateFieldGet;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
9
node_modules/@babel/runtime/helpers/classPrivateFieldInitSpec.js
generated
vendored
Normal file
9
node_modules/@babel/runtime/helpers/classPrivateFieldInitSpec.js
generated
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
var checkPrivateRedeclaration = require("./checkPrivateRedeclaration.js");
|
||||
|
||||
function _classPrivateFieldInitSpec(obj, privateMap, value) {
|
||||
checkPrivateRedeclaration(obj, privateMap);
|
||||
privateMap.set(obj, value);
|
||||
}
|
||||
|
||||
module.exports = _classPrivateFieldInitSpec;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
10
node_modules/@babel/runtime/helpers/classPrivateFieldLooseBase.js
generated
vendored
Normal file
10
node_modules/@babel/runtime/helpers/classPrivateFieldLooseBase.js
generated
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
function _classPrivateFieldBase(receiver, privateKey) {
|
||||
if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) {
|
||||
throw new TypeError("attempted to use private field on non-instance");
|
||||
}
|
||||
|
||||
return receiver;
|
||||
}
|
||||
|
||||
module.exports = _classPrivateFieldBase;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
8
node_modules/@babel/runtime/helpers/classPrivateFieldLooseKey.js
generated
vendored
Normal file
8
node_modules/@babel/runtime/helpers/classPrivateFieldLooseKey.js
generated
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
var id = 0;
|
||||
|
||||
function _classPrivateFieldKey(name) {
|
||||
return "__private_" + id++ + "_" + name;
|
||||
}
|
||||
|
||||
module.exports = _classPrivateFieldKey;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
12
node_modules/@babel/runtime/helpers/classPrivateFieldSet.js
generated
vendored
Normal file
12
node_modules/@babel/runtime/helpers/classPrivateFieldSet.js
generated
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
var classApplyDescriptorSet = require("./classApplyDescriptorSet.js");
|
||||
|
||||
var classExtractFieldDescriptor = require("./classExtractFieldDescriptor.js");
|
||||
|
||||
function _classPrivateFieldSet(receiver, privateMap, value) {
|
||||
var descriptor = classExtractFieldDescriptor(receiver, privateMap, "set");
|
||||
classApplyDescriptorSet(receiver, descriptor, value);
|
||||
return value;
|
||||
}
|
||||
|
||||
module.exports = _classPrivateFieldSet;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
10
node_modules/@babel/runtime/helpers/classPrivateMethodGet.js
generated
vendored
Normal file
10
node_modules/@babel/runtime/helpers/classPrivateMethodGet.js
generated
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
function _classPrivateMethodGet(receiver, privateSet, fn) {
|
||||
if (!privateSet.has(receiver)) {
|
||||
throw new TypeError("attempted to get private field on non-instance");
|
||||
}
|
||||
|
||||
return fn;
|
||||
}
|
||||
|
||||
module.exports = _classPrivateMethodGet;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
9
node_modules/@babel/runtime/helpers/classPrivateMethodInitSpec.js
generated
vendored
Normal file
9
node_modules/@babel/runtime/helpers/classPrivateMethodInitSpec.js
generated
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
var checkPrivateRedeclaration = require("./checkPrivateRedeclaration.js");
|
||||
|
||||
function _classPrivateMethodInitSpec(obj, privateSet) {
|
||||
checkPrivateRedeclaration(obj, privateSet);
|
||||
privateSet.add(obj);
|
||||
}
|
||||
|
||||
module.exports = _classPrivateMethodInitSpec;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
6
node_modules/@babel/runtime/helpers/classPrivateMethodSet.js
generated
vendored
Normal file
6
node_modules/@babel/runtime/helpers/classPrivateMethodSet.js
generated
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
function _classPrivateMethodSet() {
|
||||
throw new TypeError("attempted to reassign private method");
|
||||
}
|
||||
|
||||
module.exports = _classPrivateMethodSet;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
14
node_modules/@babel/runtime/helpers/classStaticPrivateFieldDestructureSet.js
generated
vendored
Normal file
14
node_modules/@babel/runtime/helpers/classStaticPrivateFieldDestructureSet.js
generated
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
var classApplyDescriptorDestructureSet = require("./classApplyDescriptorDestructureSet.js");
|
||||
|
||||
var classCheckPrivateStaticAccess = require("./classCheckPrivateStaticAccess.js");
|
||||
|
||||
var classCheckPrivateStaticFieldDescriptor = require("./classCheckPrivateStaticFieldDescriptor.js");
|
||||
|
||||
function _classStaticPrivateFieldDestructureSet(receiver, classConstructor, descriptor) {
|
||||
classCheckPrivateStaticAccess(receiver, classConstructor);
|
||||
classCheckPrivateStaticFieldDescriptor(descriptor, "set");
|
||||
return classApplyDescriptorDestructureSet(receiver, descriptor);
|
||||
}
|
||||
|
||||
module.exports = _classStaticPrivateFieldDestructureSet;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
14
node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecGet.js
generated
vendored
Normal file
14
node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecGet.js
generated
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
var classApplyDescriptorGet = require("./classApplyDescriptorGet.js");
|
||||
|
||||
var classCheckPrivateStaticAccess = require("./classCheckPrivateStaticAccess.js");
|
||||
|
||||
var classCheckPrivateStaticFieldDescriptor = require("./classCheckPrivateStaticFieldDescriptor.js");
|
||||
|
||||
function _classStaticPrivateFieldSpecGet(receiver, classConstructor, descriptor) {
|
||||
classCheckPrivateStaticAccess(receiver, classConstructor);
|
||||
classCheckPrivateStaticFieldDescriptor(descriptor, "get");
|
||||
return classApplyDescriptorGet(receiver, descriptor);
|
||||
}
|
||||
|
||||
module.exports = _classStaticPrivateFieldSpecGet;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
15
node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecSet.js
generated
vendored
Normal file
15
node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecSet.js
generated
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
var classApplyDescriptorSet = require("./classApplyDescriptorSet.js");
|
||||
|
||||
var classCheckPrivateStaticAccess = require("./classCheckPrivateStaticAccess.js");
|
||||
|
||||
var classCheckPrivateStaticFieldDescriptor = require("./classCheckPrivateStaticFieldDescriptor.js");
|
||||
|
||||
function _classStaticPrivateFieldSpecSet(receiver, classConstructor, descriptor, value) {
|
||||
classCheckPrivateStaticAccess(receiver, classConstructor);
|
||||
classCheckPrivateStaticFieldDescriptor(descriptor, "set");
|
||||
classApplyDescriptorSet(receiver, descriptor, value);
|
||||
return value;
|
||||
}
|
||||
|
||||
module.exports = _classStaticPrivateFieldSpecSet;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
9
node_modules/@babel/runtime/helpers/classStaticPrivateMethodGet.js
generated
vendored
Normal file
9
node_modules/@babel/runtime/helpers/classStaticPrivateMethodGet.js
generated
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
var classCheckPrivateStaticAccess = require("./classCheckPrivateStaticAccess.js");
|
||||
|
||||
function _classStaticPrivateMethodGet(receiver, classConstructor, method) {
|
||||
classCheckPrivateStaticAccess(receiver, classConstructor);
|
||||
return method;
|
||||
}
|
||||
|
||||
module.exports = _classStaticPrivateMethodGet;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
6
node_modules/@babel/runtime/helpers/classStaticPrivateMethodSet.js
generated
vendored
Normal file
6
node_modules/@babel/runtime/helpers/classStaticPrivateMethodSet.js
generated
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
function _classStaticPrivateMethodSet() {
|
||||
throw new TypeError("attempted to set read only static private field");
|
||||
}
|
||||
|
||||
module.exports = _classStaticPrivateMethodSet;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
26
node_modules/@babel/runtime/helpers/construct.js
generated
vendored
Normal file
26
node_modules/@babel/runtime/helpers/construct.js
generated
vendored
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
var setPrototypeOf = require("./setPrototypeOf.js");
|
||||
|
||||
var isNativeReflectConstruct = require("./isNativeReflectConstruct.js");
|
||||
|
||||
function _construct(Parent, args, Class) {
|
||||
if (isNativeReflectConstruct()) {
|
||||
module.exports = _construct = Reflect.construct;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
} else {
|
||||
module.exports = _construct = function _construct(Parent, args, Class) {
|
||||
var a = [null];
|
||||
a.push.apply(a, args);
|
||||
var Constructor = Function.bind.apply(Parent, a);
|
||||
var instance = new Constructor();
|
||||
if (Class) setPrototypeOf(instance, Class.prototype);
|
||||
return instance;
|
||||
};
|
||||
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
}
|
||||
|
||||
return _construct.apply(null, arguments);
|
||||
}
|
||||
|
||||
module.exports = _construct;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
18
node_modules/@babel/runtime/helpers/createClass.js
generated
vendored
Normal file
18
node_modules/@babel/runtime/helpers/createClass.js
generated
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
function _defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
var descriptor = props[i];
|
||||
descriptor.enumerable = descriptor.enumerable || false;
|
||||
descriptor.configurable = true;
|
||||
if ("value" in descriptor) descriptor.writable = true;
|
||||
Object.defineProperty(target, descriptor.key, descriptor);
|
||||
}
|
||||
}
|
||||
|
||||
function _createClass(Constructor, protoProps, staticProps) {
|
||||
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
||||
if (staticProps) _defineProperties(Constructor, staticProps);
|
||||
return Constructor;
|
||||
}
|
||||
|
||||
module.exports = _createClass;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
61
node_modules/@babel/runtime/helpers/createForOfIteratorHelper.js
generated
vendored
Normal file
61
node_modules/@babel/runtime/helpers/createForOfIteratorHelper.js
generated
vendored
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
var unsupportedIterableToArray = require("./unsupportedIterableToArray.js");
|
||||
|
||||
function _createForOfIteratorHelper(o, allowArrayLike) {
|
||||
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
||||
|
||||
if (!it) {
|
||||
if (Array.isArray(o) || (it = unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
|
||||
if (it) o = it;
|
||||
var i = 0;
|
||||
|
||||
var F = function F() {};
|
||||
|
||||
return {
|
||||
s: F,
|
||||
n: function n() {
|
||||
if (i >= o.length) return {
|
||||
done: true
|
||||
};
|
||||
return {
|
||||
done: false,
|
||||
value: o[i++]
|
||||
};
|
||||
},
|
||||
e: function e(_e) {
|
||||
throw _e;
|
||||
},
|
||||
f: F
|
||||
};
|
||||
}
|
||||
|
||||
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
||||
}
|
||||
|
||||
var normalCompletion = true,
|
||||
didErr = false,
|
||||
err;
|
||||
return {
|
||||
s: function s() {
|
||||
it = it.call(o);
|
||||
},
|
||||
n: function n() {
|
||||
var step = it.next();
|
||||
normalCompletion = step.done;
|
||||
return step;
|
||||
},
|
||||
e: function e(_e2) {
|
||||
didErr = true;
|
||||
err = _e2;
|
||||
},
|
||||
f: function f() {
|
||||
try {
|
||||
if (!normalCompletion && it["return"] != null) it["return"]();
|
||||
} finally {
|
||||
if (didErr) throw err;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = _createForOfIteratorHelper;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
25
node_modules/@babel/runtime/helpers/createForOfIteratorHelperLoose.js
generated
vendored
Normal file
25
node_modules/@babel/runtime/helpers/createForOfIteratorHelperLoose.js
generated
vendored
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
var unsupportedIterableToArray = require("./unsupportedIterableToArray.js");
|
||||
|
||||
function _createForOfIteratorHelperLoose(o, allowArrayLike) {
|
||||
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
||||
if (it) return (it = it.call(o)).next.bind(it);
|
||||
|
||||
if (Array.isArray(o) || (it = unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
|
||||
if (it) o = it;
|
||||
var i = 0;
|
||||
return function () {
|
||||
if (i >= o.length) return {
|
||||
done: true
|
||||
};
|
||||
return {
|
||||
done: false,
|
||||
value: o[i++]
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
||||
}
|
||||
|
||||
module.exports = _createForOfIteratorHelperLoose;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
25
node_modules/@babel/runtime/helpers/createSuper.js
generated
vendored
Normal file
25
node_modules/@babel/runtime/helpers/createSuper.js
generated
vendored
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
var getPrototypeOf = require("./getPrototypeOf.js");
|
||||
|
||||
var isNativeReflectConstruct = require("./isNativeReflectConstruct.js");
|
||||
|
||||
var possibleConstructorReturn = require("./possibleConstructorReturn.js");
|
||||
|
||||
function _createSuper(Derived) {
|
||||
var hasNativeReflectConstruct = isNativeReflectConstruct();
|
||||
return function _createSuperInternal() {
|
||||
var Super = getPrototypeOf(Derived),
|
||||
result;
|
||||
|
||||
if (hasNativeReflectConstruct) {
|
||||
var NewTarget = getPrototypeOf(this).constructor;
|
||||
result = Reflect.construct(Super, arguments, NewTarget);
|
||||
} else {
|
||||
result = Super.apply(this, arguments);
|
||||
}
|
||||
|
||||
return possibleConstructorReturn(this, result);
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = _createSuper;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
401
node_modules/@babel/runtime/helpers/decorate.js
generated
vendored
Normal file
401
node_modules/@babel/runtime/helpers/decorate.js
generated
vendored
Normal file
|
|
@ -0,0 +1,401 @@
|
|||
var toArray = require("./toArray.js");
|
||||
|
||||
var toPropertyKey = require("./toPropertyKey.js");
|
||||
|
||||
function _decorate(decorators, factory, superClass, mixins) {
|
||||
var api = _getDecoratorsApi();
|
||||
|
||||
if (mixins) {
|
||||
for (var i = 0; i < mixins.length; i++) {
|
||||
api = mixins[i](api);
|
||||
}
|
||||
}
|
||||
|
||||
var r = factory(function initialize(O) {
|
||||
api.initializeInstanceElements(O, decorated.elements);
|
||||
}, superClass);
|
||||
var decorated = api.decorateClass(_coalesceClassElements(r.d.map(_createElementDescriptor)), decorators);
|
||||
api.initializeClassElements(r.F, decorated.elements);
|
||||
return api.runClassFinishers(r.F, decorated.finishers);
|
||||
}
|
||||
|
||||
function _getDecoratorsApi() {
|
||||
_getDecoratorsApi = function _getDecoratorsApi() {
|
||||
return api;
|
||||
};
|
||||
|
||||
var api = {
|
||||
elementsDefinitionOrder: [["method"], ["field"]],
|
||||
initializeInstanceElements: function initializeInstanceElements(O, elements) {
|
||||
["method", "field"].forEach(function (kind) {
|
||||
elements.forEach(function (element) {
|
||||
if (element.kind === kind && element.placement === "own") {
|
||||
this.defineClassElement(O, element);
|
||||
}
|
||||
}, this);
|
||||
}, this);
|
||||
},
|
||||
initializeClassElements: function initializeClassElements(F, elements) {
|
||||
var proto = F.prototype;
|
||||
["method", "field"].forEach(function (kind) {
|
||||
elements.forEach(function (element) {
|
||||
var placement = element.placement;
|
||||
|
||||
if (element.kind === kind && (placement === "static" || placement === "prototype")) {
|
||||
var receiver = placement === "static" ? F : proto;
|
||||
this.defineClassElement(receiver, element);
|
||||
}
|
||||
}, this);
|
||||
}, this);
|
||||
},
|
||||
defineClassElement: function defineClassElement(receiver, element) {
|
||||
var descriptor = element.descriptor;
|
||||
|
||||
if (element.kind === "field") {
|
||||
var initializer = element.initializer;
|
||||
descriptor = {
|
||||
enumerable: descriptor.enumerable,
|
||||
writable: descriptor.writable,
|
||||
configurable: descriptor.configurable,
|
||||
value: initializer === void 0 ? void 0 : initializer.call(receiver)
|
||||
};
|
||||
}
|
||||
|
||||
Object.defineProperty(receiver, element.key, descriptor);
|
||||
},
|
||||
decorateClass: function decorateClass(elements, decorators) {
|
||||
var newElements = [];
|
||||
var finishers = [];
|
||||
var placements = {
|
||||
"static": [],
|
||||
prototype: [],
|
||||
own: []
|
||||
};
|
||||
elements.forEach(function (element) {
|
||||
this.addElementPlacement(element, placements);
|
||||
}, this);
|
||||
elements.forEach(function (element) {
|
||||
if (!_hasDecorators(element)) return newElements.push(element);
|
||||
var elementFinishersExtras = this.decorateElement(element, placements);
|
||||
newElements.push(elementFinishersExtras.element);
|
||||
newElements.push.apply(newElements, elementFinishersExtras.extras);
|
||||
finishers.push.apply(finishers, elementFinishersExtras.finishers);
|
||||
}, this);
|
||||
|
||||
if (!decorators) {
|
||||
return {
|
||||
elements: newElements,
|
||||
finishers: finishers
|
||||
};
|
||||
}
|
||||
|
||||
var result = this.decorateConstructor(newElements, decorators);
|
||||
finishers.push.apply(finishers, result.finishers);
|
||||
result.finishers = finishers;
|
||||
return result;
|
||||
},
|
||||
addElementPlacement: function addElementPlacement(element, placements, silent) {
|
||||
var keys = placements[element.placement];
|
||||
|
||||
if (!silent && keys.indexOf(element.key) !== -1) {
|
||||
throw new TypeError("Duplicated element (" + element.key + ")");
|
||||
}
|
||||
|
||||
keys.push(element.key);
|
||||
},
|
||||
decorateElement: function decorateElement(element, placements) {
|
||||
var extras = [];
|
||||
var finishers = [];
|
||||
|
||||
for (var decorators = element.decorators, i = decorators.length - 1; i >= 0; i--) {
|
||||
var keys = placements[element.placement];
|
||||
keys.splice(keys.indexOf(element.key), 1);
|
||||
var elementObject = this.fromElementDescriptor(element);
|
||||
var elementFinisherExtras = this.toElementFinisherExtras((0, decorators[i])(elementObject) || elementObject);
|
||||
element = elementFinisherExtras.element;
|
||||
this.addElementPlacement(element, placements);
|
||||
|
||||
if (elementFinisherExtras.finisher) {
|
||||
finishers.push(elementFinisherExtras.finisher);
|
||||
}
|
||||
|
||||
var newExtras = elementFinisherExtras.extras;
|
||||
|
||||
if (newExtras) {
|
||||
for (var j = 0; j < newExtras.length; j++) {
|
||||
this.addElementPlacement(newExtras[j], placements);
|
||||
}
|
||||
|
||||
extras.push.apply(extras, newExtras);
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
element: element,
|
||||
finishers: finishers,
|
||||
extras: extras
|
||||
};
|
||||
},
|
||||
decorateConstructor: function decorateConstructor(elements, decorators) {
|
||||
var finishers = [];
|
||||
|
||||
for (var i = decorators.length - 1; i >= 0; i--) {
|
||||
var obj = this.fromClassDescriptor(elements);
|
||||
var elementsAndFinisher = this.toClassDescriptor((0, decorators[i])(obj) || obj);
|
||||
|
||||
if (elementsAndFinisher.finisher !== undefined) {
|
||||
finishers.push(elementsAndFinisher.finisher);
|
||||
}
|
||||
|
||||
if (elementsAndFinisher.elements !== undefined) {
|
||||
elements = elementsAndFinisher.elements;
|
||||
|
||||
for (var j = 0; j < elements.length - 1; j++) {
|
||||
for (var k = j + 1; k < elements.length; k++) {
|
||||
if (elements[j].key === elements[k].key && elements[j].placement === elements[k].placement) {
|
||||
throw new TypeError("Duplicated element (" + elements[j].key + ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
elements: elements,
|
||||
finishers: finishers
|
||||
};
|
||||
},
|
||||
fromElementDescriptor: function fromElementDescriptor(element) {
|
||||
var obj = {
|
||||
kind: element.kind,
|
||||
key: element.key,
|
||||
placement: element.placement,
|
||||
descriptor: element.descriptor
|
||||
};
|
||||
var desc = {
|
||||
value: "Descriptor",
|
||||
configurable: true
|
||||
};
|
||||
Object.defineProperty(obj, Symbol.toStringTag, desc);
|
||||
if (element.kind === "field") obj.initializer = element.initializer;
|
||||
return obj;
|
||||
},
|
||||
toElementDescriptors: function toElementDescriptors(elementObjects) {
|
||||
if (elementObjects === undefined) return;
|
||||
return toArray(elementObjects).map(function (elementObject) {
|
||||
var element = this.toElementDescriptor(elementObject);
|
||||
this.disallowProperty(elementObject, "finisher", "An element descriptor");
|
||||
this.disallowProperty(elementObject, "extras", "An element descriptor");
|
||||
return element;
|
||||
}, this);
|
||||
},
|
||||
toElementDescriptor: function toElementDescriptor(elementObject) {
|
||||
var kind = String(elementObject.kind);
|
||||
|
||||
if (kind !== "method" && kind !== "field") {
|
||||
throw new TypeError('An element descriptor\'s .kind property must be either "method" or' + ' "field", but a decorator created an element descriptor with' + ' .kind "' + kind + '"');
|
||||
}
|
||||
|
||||
var key = toPropertyKey(elementObject.key);
|
||||
var placement = String(elementObject.placement);
|
||||
|
||||
if (placement !== "static" && placement !== "prototype" && placement !== "own") {
|
||||
throw new TypeError('An element descriptor\'s .placement property must be one of "static",' + ' "prototype" or "own", but a decorator created an element descriptor' + ' with .placement "' + placement + '"');
|
||||
}
|
||||
|
||||
var descriptor = elementObject.descriptor;
|
||||
this.disallowProperty(elementObject, "elements", "An element descriptor");
|
||||
var element = {
|
||||
kind: kind,
|
||||
key: key,
|
||||
placement: placement,
|
||||
descriptor: Object.assign({}, descriptor)
|
||||
};
|
||||
|
||||
if (kind !== "field") {
|
||||
this.disallowProperty(elementObject, "initializer", "A method descriptor");
|
||||
} else {
|
||||
this.disallowProperty(descriptor, "get", "The property descriptor of a field descriptor");
|
||||
this.disallowProperty(descriptor, "set", "The property descriptor of a field descriptor");
|
||||
this.disallowProperty(descriptor, "value", "The property descriptor of a field descriptor");
|
||||
element.initializer = elementObject.initializer;
|
||||
}
|
||||
|
||||
return element;
|
||||
},
|
||||
toElementFinisherExtras: function toElementFinisherExtras(elementObject) {
|
||||
var element = this.toElementDescriptor(elementObject);
|
||||
|
||||
var finisher = _optionalCallableProperty(elementObject, "finisher");
|
||||
|
||||
var extras = this.toElementDescriptors(elementObject.extras);
|
||||
return {
|
||||
element: element,
|
||||
finisher: finisher,
|
||||
extras: extras
|
||||
};
|
||||
},
|
||||
fromClassDescriptor: function fromClassDescriptor(elements) {
|
||||
var obj = {
|
||||
kind: "class",
|
||||
elements: elements.map(this.fromElementDescriptor, this)
|
||||
};
|
||||
var desc = {
|
||||
value: "Descriptor",
|
||||
configurable: true
|
||||
};
|
||||
Object.defineProperty(obj, Symbol.toStringTag, desc);
|
||||
return obj;
|
||||
},
|
||||
toClassDescriptor: function toClassDescriptor(obj) {
|
||||
var kind = String(obj.kind);
|
||||
|
||||
if (kind !== "class") {
|
||||
throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator' + ' created a class descriptor with .kind "' + kind + '"');
|
||||
}
|
||||
|
||||
this.disallowProperty(obj, "key", "A class descriptor");
|
||||
this.disallowProperty(obj, "placement", "A class descriptor");
|
||||
this.disallowProperty(obj, "descriptor", "A class descriptor");
|
||||
this.disallowProperty(obj, "initializer", "A class descriptor");
|
||||
this.disallowProperty(obj, "extras", "A class descriptor");
|
||||
|
||||
var finisher = _optionalCallableProperty(obj, "finisher");
|
||||
|
||||
var elements = this.toElementDescriptors(obj.elements);
|
||||
return {
|
||||
elements: elements,
|
||||
finisher: finisher
|
||||
};
|
||||
},
|
||||
runClassFinishers: function runClassFinishers(constructor, finishers) {
|
||||
for (var i = 0; i < finishers.length; i++) {
|
||||
var newConstructor = (0, finishers[i])(constructor);
|
||||
|
||||
if (newConstructor !== undefined) {
|
||||
if (typeof newConstructor !== "function") {
|
||||
throw new TypeError("Finishers must return a constructor.");
|
||||
}
|
||||
|
||||
constructor = newConstructor;
|
||||
}
|
||||
}
|
||||
|
||||
return constructor;
|
||||
},
|
||||
disallowProperty: function disallowProperty(obj, name, objectType) {
|
||||
if (obj[name] !== undefined) {
|
||||
throw new TypeError(objectType + " can't have a ." + name + " property.");
|
||||
}
|
||||
}
|
||||
};
|
||||
return api;
|
||||
}
|
||||
|
||||
function _createElementDescriptor(def) {
|
||||
var key = toPropertyKey(def.key);
|
||||
var descriptor;
|
||||
|
||||
if (def.kind === "method") {
|
||||
descriptor = {
|
||||
value: def.value,
|
||||
writable: true,
|
||||
configurable: true,
|
||||
enumerable: false
|
||||
};
|
||||
} else if (def.kind === "get") {
|
||||
descriptor = {
|
||||
get: def.value,
|
||||
configurable: true,
|
||||
enumerable: false
|
||||
};
|
||||
} else if (def.kind === "set") {
|
||||
descriptor = {
|
||||
set: def.value,
|
||||
configurable: true,
|
||||
enumerable: false
|
||||
};
|
||||
} else if (def.kind === "field") {
|
||||
descriptor = {
|
||||
configurable: true,
|
||||
writable: true,
|
||||
enumerable: true
|
||||
};
|
||||
}
|
||||
|
||||
var element = {
|
||||
kind: def.kind === "field" ? "field" : "method",
|
||||
key: key,
|
||||
placement: def["static"] ? "static" : def.kind === "field" ? "own" : "prototype",
|
||||
descriptor: descriptor
|
||||
};
|
||||
if (def.decorators) element.decorators = def.decorators;
|
||||
if (def.kind === "field") element.initializer = def.value;
|
||||
return element;
|
||||
}
|
||||
|
||||
function _coalesceGetterSetter(element, other) {
|
||||
if (element.descriptor.get !== undefined) {
|
||||
other.descriptor.get = element.descriptor.get;
|
||||
} else {
|
||||
other.descriptor.set = element.descriptor.set;
|
||||
}
|
||||
}
|
||||
|
||||
function _coalesceClassElements(elements) {
|
||||
var newElements = [];
|
||||
|
||||
var isSameElement = function isSameElement(other) {
|
||||
return other.kind === "method" && other.key === element.key && other.placement === element.placement;
|
||||
};
|
||||
|
||||
for (var i = 0; i < elements.length; i++) {
|
||||
var element = elements[i];
|
||||
var other;
|
||||
|
||||
if (element.kind === "method" && (other = newElements.find(isSameElement))) {
|
||||
if (_isDataDescriptor(element.descriptor) || _isDataDescriptor(other.descriptor)) {
|
||||
if (_hasDecorators(element) || _hasDecorators(other)) {
|
||||
throw new ReferenceError("Duplicated methods (" + element.key + ") can't be decorated.");
|
||||
}
|
||||
|
||||
other.descriptor = element.descriptor;
|
||||
} else {
|
||||
if (_hasDecorators(element)) {
|
||||
if (_hasDecorators(other)) {
|
||||
throw new ReferenceError("Decorators can't be placed on different accessors with for " + "the same property (" + element.key + ").");
|
||||
}
|
||||
|
||||
other.decorators = element.decorators;
|
||||
}
|
||||
|
||||
_coalesceGetterSetter(element, other);
|
||||
}
|
||||
} else {
|
||||
newElements.push(element);
|
||||
}
|
||||
}
|
||||
|
||||
return newElements;
|
||||
}
|
||||
|
||||
function _hasDecorators(element) {
|
||||
return element.decorators && element.decorators.length;
|
||||
}
|
||||
|
||||
function _isDataDescriptor(desc) {
|
||||
return desc !== undefined && !(desc.value === undefined && desc.writable === undefined);
|
||||
}
|
||||
|
||||
function _optionalCallableProperty(obj, name) {
|
||||
var value = obj[name];
|
||||
|
||||
if (value !== undefined && typeof value !== "function") {
|
||||
throw new TypeError("Expected '" + name + "' to be a function");
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
module.exports = _decorate;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
17
node_modules/@babel/runtime/helpers/defaults.js
generated
vendored
Normal file
17
node_modules/@babel/runtime/helpers/defaults.js
generated
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
function _defaults(obj, defaults) {
|
||||
var keys = Object.getOwnPropertyNames(defaults);
|
||||
|
||||
for (var i = 0; i < keys.length; i++) {
|
||||
var key = keys[i];
|
||||
var value = Object.getOwnPropertyDescriptor(defaults, key);
|
||||
|
||||
if (value && value.configurable && obj[key] === undefined) {
|
||||
Object.defineProperty(obj, key, value);
|
||||
}
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
module.exports = _defaults;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
25
node_modules/@babel/runtime/helpers/defineEnumerableProperties.js
generated
vendored
Normal file
25
node_modules/@babel/runtime/helpers/defineEnumerableProperties.js
generated
vendored
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
function _defineEnumerableProperties(obj, descs) {
|
||||
for (var key in descs) {
|
||||
var desc = descs[key];
|
||||
desc.configurable = desc.enumerable = true;
|
||||
if ("value" in desc) desc.writable = true;
|
||||
Object.defineProperty(obj, key, desc);
|
||||
}
|
||||
|
||||
if (Object.getOwnPropertySymbols) {
|
||||
var objectSymbols = Object.getOwnPropertySymbols(descs);
|
||||
|
||||
for (var i = 0; i < objectSymbols.length; i++) {
|
||||
var sym = objectSymbols[i];
|
||||
var desc = descs[sym];
|
||||
desc.configurable = desc.enumerable = true;
|
||||
if ("value" in desc) desc.writable = true;
|
||||
Object.defineProperty(obj, sym, desc);
|
||||
}
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
module.exports = _defineEnumerableProperties;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
17
node_modules/@babel/runtime/helpers/defineProperty.js
generated
vendored
Normal file
17
node_modules/@babel/runtime/helpers/defineProperty.js
generated
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
function _defineProperty(obj, key, value) {
|
||||
if (key in obj) {
|
||||
Object.defineProperty(obj, key, {
|
||||
value: value,
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true
|
||||
});
|
||||
} else {
|
||||
obj[key] = value;
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
module.exports = _defineProperty;
|
||||
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
||||
95
node_modules/@babel/runtime/helpers/esm/AsyncGenerator.js
generated
vendored
Normal file
95
node_modules/@babel/runtime/helpers/esm/AsyncGenerator.js
generated
vendored
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
import AwaitValue from "./AwaitValue.js";
|
||||
export default function AsyncGenerator(gen) {
|
||||
var front, back;
|
||||
|
||||
function send(key, arg) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
var request = {
|
||||
key: key,
|
||||
arg: arg,
|
||||
resolve: resolve,
|
||||
reject: reject,
|
||||
next: null
|
||||
};
|
||||
|
||||
if (back) {
|
||||
back = back.next = request;
|
||||
} else {
|
||||
front = back = request;
|
||||
resume(key, arg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function resume(key, arg) {
|
||||
try {
|
||||
var result = gen[key](arg);
|
||||
var value = result.value;
|
||||
var wrappedAwait = value instanceof AwaitValue;
|
||||
Promise.resolve(wrappedAwait ? value.wrapped : value).then(function (arg) {
|
||||
if (wrappedAwait) {
|
||||
resume(key === "return" ? "return" : "next", arg);
|
||||
return;
|
||||
}
|
||||
|
||||
settle(result.done ? "return" : "normal", arg);
|
||||
}, function (err) {
|
||||
resume("throw", err);
|
||||
});
|
||||
} catch (err) {
|
||||
settle("throw", err);
|
||||
}
|
||||
}
|
||||
|
||||
function settle(type, value) {
|
||||
switch (type) {
|
||||
case "return":
|
||||
front.resolve({
|
||||
value: value,
|
||||
done: true
|
||||
});
|
||||
break;
|
||||
|
||||
case "throw":
|
||||
front.reject(value);
|
||||
break;
|
||||
|
||||
default:
|
||||
front.resolve({
|
||||
value: value,
|
||||
done: false
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
||||
front = front.next;
|
||||
|
||||
if (front) {
|
||||
resume(front.key, front.arg);
|
||||
} else {
|
||||
back = null;
|
||||
}
|
||||
}
|
||||
|
||||
this._invoke = send;
|
||||
|
||||
if (typeof gen["return"] !== "function") {
|
||||
this["return"] = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
AsyncGenerator.prototype[typeof Symbol === "function" && Symbol.asyncIterator || "@@asyncIterator"] = function () {
|
||||
return this;
|
||||
};
|
||||
|
||||
AsyncGenerator.prototype.next = function (arg) {
|
||||
return this._invoke("next", arg);
|
||||
};
|
||||
|
||||
AsyncGenerator.prototype["throw"] = function (arg) {
|
||||
return this._invoke("throw", arg);
|
||||
};
|
||||
|
||||
AsyncGenerator.prototype["return"] = function (arg) {
|
||||
return this._invoke("return", arg);
|
||||
};
|
||||
3
node_modules/@babel/runtime/helpers/esm/AwaitValue.js
generated
vendored
Normal file
3
node_modules/@babel/runtime/helpers/esm/AwaitValue.js
generated
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
export default function _AwaitValue(value) {
|
||||
this.wrapped = value;
|
||||
}
|
||||
28
node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js
generated
vendored
Normal file
28
node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js
generated
vendored
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
export default function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
|
||||
var desc = {};
|
||||
Object.keys(descriptor).forEach(function (key) {
|
||||
desc[key] = descriptor[key];
|
||||
});
|
||||
desc.enumerable = !!desc.enumerable;
|
||||
desc.configurable = !!desc.configurable;
|
||||
|
||||
if ('value' in desc || desc.initializer) {
|
||||
desc.writable = true;
|
||||
}
|
||||
|
||||
desc = decorators.slice().reverse().reduce(function (desc, decorator) {
|
||||
return decorator(target, property, desc) || desc;
|
||||
}, desc);
|
||||
|
||||
if (context && desc.initializer !== void 0) {
|
||||
desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
|
||||
desc.initializer = undefined;
|
||||
}
|
||||
|
||||
if (desc.initializer === void 0) {
|
||||
Object.defineProperty(target, property, desc);
|
||||
desc = null;
|
||||
}
|
||||
|
||||
return desc;
|
||||
}
|
||||
9
node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
generated
vendored
Normal file
9
node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
generated
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
export default function _arrayLikeToArray(arr, len) {
|
||||
if (len == null || len > arr.length) len = arr.length;
|
||||
|
||||
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
||||
arr2[i] = arr[i];
|
||||
}
|
||||
|
||||
return arr2;
|
||||
}
|
||||
3
node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
generated
vendored
Normal file
3
node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
generated
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
export default function _arrayWithHoles(arr) {
|
||||
if (Array.isArray(arr)) return arr;
|
||||
}
|
||||
4
node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
generated
vendored
Normal file
4
node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
generated
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
import arrayLikeToArray from "./arrayLikeToArray.js";
|
||||
export default function _arrayWithoutHoles(arr) {
|
||||
if (Array.isArray(arr)) return arrayLikeToArray(arr);
|
||||
}
|
||||
7
node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
generated
vendored
Normal file
7
node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
generated
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
export default function _assertThisInitialized(self) {
|
||||
if (self === void 0) {
|
||||
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
54
node_modules/@babel/runtime/helpers/esm/asyncGeneratorDelegate.js
generated
vendored
Normal file
54
node_modules/@babel/runtime/helpers/esm/asyncGeneratorDelegate.js
generated
vendored
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
export default function _asyncGeneratorDelegate(inner, awaitWrap) {
|
||||
var iter = {},
|
||||
waiting = false;
|
||||
|
||||
function pump(key, value) {
|
||||
waiting = true;
|
||||
value = new Promise(function (resolve) {
|
||||
resolve(inner[key](value));
|
||||
});
|
||||
return {
|
||||
done: false,
|
||||
value: awaitWrap(value)
|
||||
};
|
||||
}
|
||||
|
||||
;
|
||||
|
||||
iter[typeof Symbol !== "undefined" && Symbol.iterator || "@@iterator"] = function () {
|
||||
return this;
|
||||
};
|
||||
|
||||
iter.next = function (value) {
|
||||
if (waiting) {
|
||||
waiting = false;
|
||||
return value;
|
||||
}
|
||||
|
||||
return pump("next", value);
|
||||
};
|
||||
|
||||
if (typeof inner["throw"] === "function") {
|
||||
iter["throw"] = function (value) {
|
||||
if (waiting) {
|
||||
waiting = false;
|
||||
throw value;
|
||||
}
|
||||
|
||||
return pump("throw", value);
|
||||
};
|
||||
}
|
||||
|
||||
if (typeof inner["return"] === "function") {
|
||||
iter["return"] = function (value) {
|
||||
if (waiting) {
|
||||
waiting = false;
|
||||
return value;
|
||||
}
|
||||
|
||||
return pump("return", value);
|
||||
};
|
||||
}
|
||||
|
||||
return iter;
|
||||
}
|
||||
13
node_modules/@babel/runtime/helpers/esm/asyncIterator.js
generated
vendored
Normal file
13
node_modules/@babel/runtime/helpers/esm/asyncIterator.js
generated
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
export default function _asyncIterator(iterable) {
|
||||
var method;
|
||||
|
||||
if (typeof Symbol !== "undefined") {
|
||||
if (Symbol.asyncIterator) method = iterable[Symbol.asyncIterator];
|
||||
if (method == null && Symbol.iterator) method = iterable[Symbol.iterator];
|
||||
}
|
||||
|
||||
if (method == null) method = iterable["@@asyncIterator"];
|
||||
if (method == null) method = iterable["@@iterator"];
|
||||
if (method == null) throw new TypeError("Object is not async iterable");
|
||||
return method.call(iterable);
|
||||
}
|
||||
35
node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
generated
vendored
Normal file
35
node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
generated
vendored
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
||||
try {
|
||||
var info = gen[key](arg);
|
||||
var value = info.value;
|
||||
} catch (error) {
|
||||
reject(error);
|
||||
return;
|
||||
}
|
||||
|
||||
if (info.done) {
|
||||
resolve(value);
|
||||
} else {
|
||||
Promise.resolve(value).then(_next, _throw);
|
||||
}
|
||||
}
|
||||
|
||||
export default function _asyncToGenerator(fn) {
|
||||
return function () {
|
||||
var self = this,
|
||||
args = arguments;
|
||||
return new Promise(function (resolve, reject) {
|
||||
var gen = fn.apply(self, args);
|
||||
|
||||
function _next(value) {
|
||||
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
||||
}
|
||||
|
||||
function _throw(err) {
|
||||
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
||||
}
|
||||
|
||||
_next(undefined);
|
||||
});
|
||||
};
|
||||
}
|
||||
4
node_modules/@babel/runtime/helpers/esm/awaitAsyncGenerator.js
generated
vendored
Normal file
4
node_modules/@babel/runtime/helpers/esm/awaitAsyncGenerator.js
generated
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
import AwaitValue from "./AwaitValue.js";
|
||||
export default function _awaitAsyncGenerator(value) {
|
||||
return new AwaitValue(value);
|
||||
}
|
||||
5
node_modules/@babel/runtime/helpers/esm/checkPrivateRedeclaration.js
generated
vendored
Normal file
5
node_modules/@babel/runtime/helpers/esm/checkPrivateRedeclaration.js
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
export default function _checkPrivateRedeclaration(obj, privateCollection) {
|
||||
if (privateCollection.has(obj)) {
|
||||
throw new TypeError("Cannot initialize the same private elements twice on an object");
|
||||
}
|
||||
}
|
||||
20
node_modules/@babel/runtime/helpers/esm/classApplyDescriptorDestructureSet.js
generated
vendored
Normal file
20
node_modules/@babel/runtime/helpers/esm/classApplyDescriptorDestructureSet.js
generated
vendored
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
export default function _classApplyDescriptorDestructureSet(receiver, descriptor) {
|
||||
if (descriptor.set) {
|
||||
if (!("__destrObj" in descriptor)) {
|
||||
descriptor.__destrObj = {
|
||||
set value(v) {
|
||||
descriptor.set.call(receiver, v);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
return descriptor.__destrObj;
|
||||
} else {
|
||||
if (!descriptor.writable) {
|
||||
throw new TypeError("attempted to set read only private field");
|
||||
}
|
||||
|
||||
return descriptor;
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue