Commit graph

5449 commits

Author SHA1 Message Date
SachaG
42dbb4fb57 Merge branch 'ErikDakoda-erikdakoda5' into devel 2018-05-11 09:43:50 +09:00
SachaG
9638e4a759 Merge branch 'erikdakoda5' of https://github.com/ErikDakoda/Vulcan into ErikDakoda-erikdakoda5
# Conflicts:
#	packages/vulcan-forms/lib/components/FormComponent.jsx
2018-05-11 09:40:45 +09:00
Erik Dakoda
2fe3b2cd28
Merge branch 'devel' into erikdakoda5 2018-05-10 10:10:27 -04:00
Erik Schannen
150d9392e7 Changes to SmartForm behaviour - refactoring
- Added new `FormComponent.isCustomInput` method
 - Pulled `renderComponent` up from `FormComponentInner` to `FormComponent`
 - Pulled some input-type-specific logic up when it was universal, or pushed it down when it should be handled by each ui library
2018-05-10 10:03:59 -04:00
SachaG
9ab1c0f808 Remove bio, karma, and website user fields 2018-05-10 17:49:32 +09:00
SachaG
5c43de929c Fix withEdit imports; fix dropdown bug 2018-05-10 17:48:22 +09:00
SachaG
f320b3363b Move registerSetting to index 2018-05-10 10:18:55 +09:00
SachaG
d60b16ea0d Merge branch 'erikdakoda5' of https://github.com/ErikDakoda/Vulcan into ErikDakoda-erikdakoda5
# Conflicts:
#	packages/vulcan-forms/lib/components/FormComponent.jsx
2018-05-10 09:44:50 +09:00
SachaG
47f21e4740 Eslint clean up 2018-05-10 09:39:35 +09:00
Sacha Greif
d80e76e616
Merge pull request #1982 from OrigenStudio/fix/multiple-datatypes
Restrict value altering to allow multiple datatypes in FormComponent
2018-05-10 08:32:40 +09:00
ochicf
d3cd373606 merge value only when is array or object and is an accepted type 2018-05-09 15:59:59 +02:00
SachaG
df66de5861 Merge branch 'devel' of https://github.com/VulcanJS/Vulcan into devel 2018-05-09 11:22:54 +09:00
SachaG
52256b2a60 Small fixes 2018-05-09 11:22:51 +09:00
Erik Schannen
c3f33cb7e0 Changes to SmartForm behaviour
- Moved UI portions of FormComponent to FormComponentInner.jsx in vulcan-ui-bootstrap

 - Added user alert when the user navigates to another route while there are unsaved changed in the form (disabled by default)

 - Added setting forms.warnUnsavedChanges and SmartForm property warnUnsavedChanges to enable user alert

 - Added optional Revert button in FormSubmits to allow the user to discard any changes to the form; this is activated by passing a "revertCallback" property to SmartForm (which can be empty: () => {})

 - Added two functions that form components can access in the child context: refetchForm() to refetch the document from the database (in case it was updated by a background process), isChanged() to determine if there are any unsaved changes

 - For any phrases I have added to en_US.js I also added it to es_ES.js and fr_FR.js with the comment // TODO: translate

 - Updated Form.clearForm and Form.mutationSuccessCallback so that the user can continue working on the document after submitting it

 - The form now scrolls the flash message into view when a submit results in errors

 - Fixed bugs in FormComponent.shouldComponentUpdate() and Form.getDocument()

 - Fixed bug in FormComponent.handleChange() - number fields could not be cleared, only set to 0

 - Fixed a bug in FormComponent.getValue() - it returned the initial value of a checkbox even after it was set to false, and a number even after it was set to 0
2018-05-08 20:09:42 -04:00
Sacha Greif
cb0e8f5d5a
Merge pull request #1978 from Apollinaire/withAccess
check for redirect before trying to redirect
2018-05-09 07:59:33 +09:00
SachaG
e1eef813d4 Merge branch 'devel' of https://github.com/VulcanJS/Vulcan into devel 2018-05-07 11:41:06 +09:00
SachaG
3aa3a1679e Fix form error issue 2018-05-07 11:40:54 +09:00
Apollinaire
5c15120113 check for redirect before trying to redirect
using `withAccess` without setting redirect used to crash the client because there was no test on `redirect`.  Current behaviour is: if redirect is not a string then no redirection is done and the component simply is not displayed.
2018-05-05 16:12:40 +02:00
Sacha Greif
5d13fd1416
Merge pull request #1961 from Sebi55/patch-1
Add MongoDB aggregation to Collections
2018-05-05 18:57:34 +09:00
Sacha Greif
9118d8f8ad
Merge pull request #1975 from Apollinaire/devel
withList Loading prop adjustment
2018-05-04 16:14:53 +09:00
SachaG
18bde83fbc v1.10.1 2018-05-04 12:04:10 +09:00
SachaG
13609dd755 Various small improvements 2018-05-04 11:56:49 +09:00
SachaG
c811efaa47 Add support for nested dropdowns 2018-05-04 11:56:19 +09:00
Apollinaire
b6669a3f7e withList Loading improved
Follows the recommanded loading from Apollo. See the Apollo docs about `[data.networkstatus](https://www.apollographql.com/docs/react/api/react-apollo.html#graphql-query-data-networkStatus)` and `[data.loading](https://www.apollographql.com/docs/react/api/react-apollo.html#graphql-query-data-loading)`
2018-05-03 10:27:23 +02:00
Sacha Greif
49d4dcf1df
Merge pull request #1969 from bernardodiasc/issue-1958
Include document prop in mutationErrorCallback method
2018-05-03 09:27:20 +09:00
Sacha Greif
c67b7c1329
Merge pull request #1973 from bernardodiasc/flash-issue
Update Flash component and withMessages container
2018-05-03 09:26:38 +09:00
Bernardo Dias
5b9bb61688 Update Flash component and withMessages container 2018-05-02 15:02:52 -03:00
Bernardo Dias
087e5db923 Revert catch callback of removeMutation 2018-05-02 13:39:52 -03:00
Bernardo Dias
37200ec9ae Add document attributes to error catch of editMutation and removeMutation 2018-05-02 13:17:12 -03:00
Bernardo Dias
f099e6557d Include document prop in mutationErrorCallback method 2018-05-02 13:17:12 -03:00
SachaG
dd0ff54f9a Disable FormComponent shouldComponentUpdate callback for now 2018-05-02 18:14:15 +09:00
Sacha Greif
4537ea8017
Merge pull request #1972 from bernardodiasc/patch-1
Update FormSubmit.jsx
2018-05-02 11:27:00 +09:00
SachaG
942b9c955a Merge branch 'devel' of https://github.com/VulcanJS/Vulcan into devel 2018-05-02 11:06:07 +09:00
SachaG
5e0a6fd28c Do not use Proxy after all, because it makes even if (Components.Foo) statements trigger error 2018-05-02 11:00:58 +09:00
Bernardo Dias
aeef482e81
Update FormSubmit.jsx
`void` operator expects one argument, otherwise it throws `Uncaught SyntaxError: Unexpected token )`
2018-05-01 16:02:31 -03:00
Sacha Greif
e102e87f77
Merge pull request #1971 from espressolocator/ui-bootstrap-modal
ui-bootstrap: Add a separate Modal component and refactor ModalTrigger to use it.
2018-05-01 10:21:50 +09:00
Ruslan Kabalin
e78f307576 ui-bootstrap: Fix attributes spreading at TooltipTrigger. 2018-05-01 01:53:06 +01:00
Ruslan Kabalin
fc7a03e4e8 ui-bootstrap: Refactor ModalTrigger to use Modal component. 2018-05-01 01:53:06 +01:00
Ruslan Kabalin
290b3c7ed3 ui-bootstrap: Add Modal component. 2018-05-01 01:53:06 +01:00
SachaG
0bc0000cb9 Use Proxy to generate better errors when components are not defined 2018-05-01 09:31:31 +09:00
SachaG
94fc8fffe9 Only rerender FormComponent when necessary 2018-04-30 09:36:42 +09:00
SachaG
44452cbbc0 detect language/locale 2018-04-29 12:16:33 +09:00
SachaG
94cb478d72 Merge branch 'devel' of https://github.com/VulcanJS/Vulcan into devel 2018-04-29 11:15:30 +09:00
SachaG
a086e6e584 Update flash messages 2018-04-28 18:51:20 +09:00
SachaG
800784f3f9 Clean up newsletter package a bit 2018-04-28 12:22:41 +09:00
Sacha Greif
d94a568dd8
Merge pull request #1964 from Apollinaire/fieldErrors
Fix field errors display
2018-04-28 11:15:00 +09:00
Sacha Greif
237ddd7a96
Merge pull request #1965 from justinr1234/more-error-logging
More graphql error logging
2018-04-28 11:13:49 +09:00
Sacha Greif
148e07c8f3
Merge pull request #1966 from meteorplus/patch-13
change from telescope-newsletter to vulcan-newsletter
2018-04-28 11:13:14 +09:00
SachaG
18bec2b2c0 Small fixes 2018-04-28 10:54:24 +09:00
SachaG
7b1c66cb43 Factor out error handling code; clean up form props; pass currentUser down to FormComponent 2018-04-28 10:54:03 +09:00