Commit graph

425 commits

Author SHA1 Message Date
SachaG
f3ba2cc59f Working on GraphQL template system for GraphQL schema generation 2018-06-04 11:22:49 +09:00
SachaG
96eab44309 Start CRUD renaming 2018-06-02 18:49:53 +09:00
SachaG
d3b6591f63 v1.11.0 2018-06-02 08:35:42 +09:00
SachaG
1f389dbf0a Intl fields should not appear in forms 2018-05-29 18:02:15 +09:00
Erik Schannen
373857131a SubSchema Fields
- Added support for fields that have their own subschema
- The code flattens the subschema fields, so the path for `address: { street }`` becomes `'address.street'`
- Several places needed to be changed to properly support paths, so `currentValues[path]` becomes `get(currentValues, path)`
- In Form.getData(), replaced underscore's `pick` with lodash's `pick` which properly supports paths and returns a new object
- Fixed a bug in collection.getParameters that made it impossible to specify a `limit` with addView or addDefaultView
2018-05-23 16:02:36 -04:00
SachaG
1951000118 Merge branch 'master' into devel
# Conflicts:
#	README.md
2018-05-23 15:12:33 +09:00
SachaG
1fd3db05ae Merge branch 'devel' of https://github.com/VulcanJS/Vulcan into devel 2018-05-22 08:43:38 +09:00
SachaG
d378cd9654 Small migration improvements 2018-05-22 08:43:27 +09:00
SachaG
b066ee5b60 Bug fixes 2018-05-21 10:02:43 +09:00
SachaG
2b0f8cdd88 Change data structure of translations in db to match MongoDB standards 2018-05-21 09:42:08 +09:00
Sacha Greif
ff7fd0edcd
Merge pull request #1984 from OrigenStudio/run-callbacks-await-between-hooks
Await between hooks in runCallbacks
2018-05-19 20:48:38 +09:00
ochicf
3d190b5394 revert last commits
For the moment only fix the await between callbacks issue (as discussed [here](https://github.com/VulcanJS/Vulcan/issues/1949)), so reverts the following commits:

1078943c1a
b2c8c52bc6
2534dde6d2
87e3721f34
83022a9e6d
22d7f80ab4
3f780f8511
822f73a0b6
2018-05-19 12:27:03 +02:00
SachaG
640a52d3c2 v1.10.1 2018-05-18 08:27:41 +09:00
SachaG
93bb3fd1ef Update cookies to use universal-cookie 2018-05-18 08:26:25 +09:00
SachaG
f298aca5ae Handle empty modifiers better 2018-05-17 09:53:16 +09:00
SachaG
fc67471a38 working on cookies+locale support 2018-05-16 11:43:19 +09:00
ochicf
4bbf5fc8c4 Merge remote-tracking branch 'upstream/devel' into run-callbacks-await-between-hooks 2018-05-14 20:34:40 +02:00
ochicf
87e3721f34 return results on runCallbacksAsync, update its documentation 2018-05-14 20:28:47 +02:00
ochicf
83022a9e6d update documentation 2018-05-14 20:26:40 +02:00
ochicf
22d7f80ab4 check for async context start after callback is run 2018-05-14 20:26:19 +02:00
ochicf
3f780f8511 skip returned promises by callbacks added to sync hooks 2018-05-14 20:25:46 +02:00
ochicf
822f73a0b6 wrap item in promise for async hooks 2018-05-14 20:24:12 +02:00
SachaG
55d34bd328 Working on locale cookie support for SSR 2018-05-14 17:28:04 +09:00
SachaG
ab674a1163 Merge branch 'devel' into i18n2
# Conflicts:
#	packages/vulcan-forms/lib/components/Form.jsx
#	packages/vulcan-forms/lib/components/FormComponent.jsx
2018-05-11 09:48:34 +09:00
ochicf
0b701a736b await between callbacks 2018-05-10 13:13:49 +02:00
ochicf
b517896a22 add isPromise function 2018-05-10 13:11:21 +02:00
SachaG
422b413f98 Enable context.locale in emails 2018-05-10 18:34:59 +09:00
SachaG
c6b1611e98 Add fallback to default locale for content 2018-05-10 18:00:37 +09:00
SachaG
a5a43d2f89 Get locale from user 2018-05-10 17:57:12 +09:00
SachaG
c78cf47e85 Merge branch 'devel' into i18n2 2018-05-10 17:49:46 +09:00
SachaG
6979ac8bee addLocale -> registerLocale 2018-05-10 17:17:44 +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
SachaG
e2cba32b15 Clean up 2018-05-10 09:38:25 +09:00
SachaG
eca6cd14b3 Add locale to context for server queries too 2018-05-09 11:22:19 +09:00
SachaG
e8936b590b Add migration script; fix input prop bug 2018-05-09 10:38:21 +09:00
SachaG
4950f10b20 Get locale from GraphQL header 2018-05-09 09:46:47 +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
SachaG
cf31e8f918 Use function to get IntlString type 2018-05-08 12:29:51 +09:00
SachaG
5b5884d33c Move intl logic to vulcan:lib (keep vulcan:i18n with same API as react-i18n); add isIntlField helper; add IntlString type 2018-05-08 12:23:42 +09:00
SachaG
ede0fb48e4 Intl field need a JSON input type 2018-05-08 11:55:45 +09:00
SachaG
9700c4bbaf Not using IntlString scalar anymore 2018-05-08 11:06:31 +09:00
SachaG
2c03bd352a Use two-field strategy for getting all locale strings 2018-05-08 11:05:24 +09:00
SachaG
2dadce31e7 Merge branch 'devel' into i18n2 2018-05-07 17:46:14 +09:00
SachaG
55800a9b30 Add support for intl fields to API and SmartForm 2018-05-07 17:41:22 +09:00
SachaG
1ab36a7e3c Add support for custom directives 2018-05-07 17:40:21 +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
Sacha Greif
5d13fd1416
Merge pull request #1961 from Sebi55/patch-1
Add MongoDB aggregation to Collections
2018-05-05 18:57:34 +09:00
SachaG
18bde83fbc v1.10.1 2018-05-04 12:04:10 +09:00