payload 0.20.7-beta.0 → 0.20.10-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/CHANGELOG.md +18 -37
  2. package/components/styles.css +1 -1
  3. package/dist/admin/components/elements/ColumnSelector/index.js +1 -1
  4. package/dist/admin/components/elements/ColumnSelector/index.scss +4 -7
  5. package/dist/admin/components/elements/Eyebrow/index.scss +4 -0
  6. package/dist/admin/components/elements/Pill/index.scss +1 -0
  7. package/dist/admin/components/elements/ReactSelect/index.js +2 -2
  8. package/dist/admin/components/elements/ReactSelect/types.d.ts +1 -0
  9. package/dist/admin/components/elements/WhereBuilder/index.js +1 -1
  10. package/dist/admin/components/forms/field-types/Array/Array.js +1 -1
  11. package/dist/admin/components/forms/field-types/Array/index.scss +1 -1
  12. package/dist/admin/components/forms/field-types/Blocks/Blocks.js +1 -1
  13. package/dist/admin/components/forms/field-types/Blocks/index.scss +1 -1
  14. package/dist/admin/components/forms/field-types/Group/index.js +3 -0
  15. package/dist/admin/components/forms/field-types/Group/index.scss +12 -0
  16. package/dist/admin/components/forms/field-types/RichText/elements/upload/Element/EditModal/index.js +3 -3
  17. package/dist/admin/components/forms/field-types/RichText/elements/upload/Element/EditModal/index.scss +1 -15
  18. package/dist/admin/components/forms/field-types/Select/Input.d.ts +1 -0
  19. package/dist/admin/components/forms/field-types/Select/Input.js +2 -2
  20. package/dist/admin/components/forms/field-types/Select/index.js +6 -3
  21. package/dist/admin/components/forms/field-types/Tabs/index.js +17 -15
  22. package/dist/admin/components/forms/field-types/Tabs/index.scss +3 -4
  23. package/dist/admin/components/forms/field-types/Tabs/provider.d.ts +8 -0
  24. package/dist/admin/components/forms/field-types/Tabs/provider.js +7 -0
  25. package/dist/admin/components/forms/field-types/Upload/index.scss +1 -1
  26. package/dist/admin/components/views/Version/RenderFieldsToDiff/fields/Iterable/index.js +2 -2
  27. package/dist/admin/components/views/Version/RenderFieldsToDiff/fields/styles.d.ts +1 -0
  28. package/dist/admin/components/views/Version/RenderFieldsToDiff/fields/styles.js +1 -0
  29. package/dist/admin/components/views/Version/Version.js +1 -1
  30. package/dist/admin/components/views/collections/List/buildColumns.js +1 -1
  31. package/dist/collections/operations/local/restoreVersion.d.ts +0 -1
  32. package/dist/collections/operations/local/restoreVersion.js +2 -3
  33. package/dist/fields/config/schema.js +4 -1
  34. package/dist/fields/config/types.d.ts +3 -0
  35. package/dist/fields/config/types.js +1 -1
  36. package/dist/fields/hooks/beforeChange/promise.js +3 -3
  37. package/dist/globals/operations/local/restoreVersion.d.ts +2 -0
  38. package/dist/globals/operations/local/restoreVersion.js +6 -3
  39. package/dist/index.js +1 -1
  40. package/dist/mongoose/buildSchema.js +4 -4
  41. package/dist/{admin/utilities → utilities}/flattenTopLevelFields.d.ts +1 -1
  42. package/dist/utilities/flattenTopLevelFields.js +33 -0
  43. package/dist/webpack/getBaseConfig.js +2 -6
  44. package/docs/fields/select.mdx +40 -22
  45. package/docs/fields/tabs.mdx +64 -2
  46. package/package.json +1 -1
  47. package/dist/admin/utilities/flattenTopLevelFields.js +0 -30
  48. package/dist/auth/auth.spec.d.ts +0 -1
  49. package/dist/auth/auth.spec.js +0 -198
  50. package/dist/versions/tests/collections-graphql.spec.d.ts +0 -1
  51. package/dist/versions/tests/collections-graphql.spec.js +0 -141
  52. package/dist/versions/tests/collections-rest.spec.d.ts +0 -1
  53. package/dist/versions/tests/collections-rest.spec.js +0 -148
  54. package/dist/versions/tests/globals-graphql.spec.d.ts +0 -1
  55. package/dist/versions/tests/globals-graphql.spec.js +0 -157
  56. package/dist/versions/tests/globals-rest.spec.d.ts +0 -1
  57. package/dist/versions/tests/globals-rest.spec.js +0 -151
package/CHANGELOG.md CHANGED
@@ -1,10 +1,18 @@
1
- ## [0.20.7-beta.0](https://github.com/payloadcms/payload/compare/v0.19.2...v0.20.7-beta.0) (2022-07-16)
1
+ ## [0.20.10-beta.0](https://github.com/payloadcms/payload/compare/v0.20.1...v0.20.10-beta.0) (2022-07-17)
2
2
 
3
3
 
4
4
  ### Bug Fixes
5
5
 
6
6
  * bug with base colors ([4bb0d39](https://github.com/payloadcms/payload/commit/4bb0d3994f630a6111f18ab6a1a2e9a9a83d2a98))
7
+ * bug with version diff screen when arrays have no labels ([6060e4c](https://github.com/payloadcms/payload/commit/6060e4cb274f68e56cfbc9ed434e8bdb8817c20b))
8
+ * ensures blocks can be nested within tabs / rows / collapsibles ([2707af1](https://github.com/payloadcms/payload/commit/2707af1d45d3234ba6e495bf9e0eb0d0f43f866a))
9
+ * ensures column selector renders active columns properly ([6347a2f](https://github.com/payloadcms/payload/commit/6347a2febfef5023004e39d799898748844b74e7))
7
10
  * ensures duplicated rows have properly created ids ([3ae1c26](https://github.com/payloadcms/payload/commit/3ae1c26a074c74585162a9938e67e3c7bcc087fa))
11
+ * ensures passing partial data to update works when fields are localized ([39d075b](https://github.com/payloadcms/payload/commit/39d075b9998e51d462b2207a1bbfc0326a7eb46a))
12
+ * ensures point field doesn't interrupt version creation ([2ef8a1e](https://github.com/payloadcms/payload/commit/2ef8a1e35a9ecd67d7d809fb446f3549a347a930))
13
+ * ensures success pills are properly colored ([7376246](https://github.com/payloadcms/payload/commit/73762465925ab27c8e0282d41760bfac6e52ce8e))
14
+ * styles empty version diff row for dark mode ([e7d2bdb](https://github.com/payloadcms/payload/commit/e7d2bdb45a042d69ef3adc40c1b10e065a0620ec))
15
+ * tabs top margin ([dd810a3](https://github.com/payloadcms/payload/commit/dd810a35933925f789712be2a805c90ae30f4cc0))
8
16
  * upload e2e file path ([a664b62](https://github.com/payloadcms/payload/commit/a664b627f67207f520b16b705017c72838039f64))
9
17
 
10
18
 
@@ -12,65 +20,38 @@
12
20
 
13
21
  * add card ids ([baf4664](https://github.com/payloadcms/payload/commit/baf46640737d8aca6fead1568ba15f11769a76f2))
14
22
  * adds collapsible field type ([98676be](https://github.com/payloadcms/payload/commit/98676bea69a37c6521dea1dfafa4c4a9967efc1e))
23
+ * adds uploads collection for testing to /fields tests ([1812be2](https://github.com/payloadcms/payload/commit/1812be2e161b31fd6021fdfc8343c78001b4de28))
24
+ * allow clear select value ([#735](https://github.com/payloadcms/payload/issues/735)) ([3132d35](https://github.com/payloadcms/payload/commit/3132d35e27f3c1037aeb3d1801e13df2e992e98b))
25
+ * avoids forcing fonts to be inline within webpack builds ([eac9823](https://github.com/payloadcms/payload/commit/eac982398e8f51d1e5aa9ba1eca0094450ac4210))
15
26
  * e2e test upload ([#755](https://github.com/payloadcms/payload/issues/755)) ([1160093](https://github.com/payloadcms/payload/commit/11600930b78dbae50fd093529b727101d83561fa))
27
+ * ensures groups within blocks render properly ([3a98c6a](https://github.com/payloadcms/payload/commit/3a98c6ad531c86ec7a3a4163650068a157d56746))
16
28
  * ensures nested fields not affecting data can be traversed properly ([3b9fdf3](https://github.com/payloadcms/payload/commit/3b9fdf3ffdc49ff9a2c0e56f5438810c5f397f86))
17
29
  * ensures tabs and collapsibles render in version diff ([54162b5](https://github.com/payloadcms/payload/commit/54162b52cc8211e100d4ad901339b7982666389c))
30
+ * expands rich text field config for better coverage ([d8a28ac](https://github.com/payloadcms/payload/commit/d8a28acfa8ee975f9ea662ed9ad4fe2bc22b423f))
18
31
  * finishes block field ([41a0ba5](https://github.com/payloadcms/payload/commit/41a0ba57805b4b06e5310659263ee59ae0828f34))
19
32
  * finishes collapsible field ([60bfb1c](https://github.com/payloadcms/payload/commit/60bfb1c3b801c89de055d11cee50a1b51e864b7b))
20
33
  * finishes tabs field ([68e7c41](https://github.com/payloadcms/payload/commit/68e7c41fdc07df04dcc3caaf486d2d596354039d))
21
34
  * initializes useField internalValue with incoming field value ([c995f79](https://github.com/payloadcms/payload/commit/c995f797fec76e78eafb323cdf4219caebdfa6c7))
35
+ * merges select isClearable ([a6a9ab1](https://github.com/payloadcms/payload/commit/a6a9ab15b72ca5f3ed107cfbc81638b5e35ea932))
22
36
  * more maintainable colors ([5fc4f3a](https://github.com/payloadcms/payload/commit/5fc4f3adadc8f7ec3eaf99021dccf7060926c7f1))
23
37
  * only renders arrays and blocks once they are initialized ([735e385](https://github.com/payloadcms/payload/commit/735e385537a505db00b21b2567f829bcb1718c3c))
24
38
  * point field int test ([c75c67e](https://github.com/payloadcms/payload/commit/c75c67ec86bc5ff42d4965631d7f7e80fb01cb1f))
25
39
  * refactors z index methodology ([2fa680c](https://github.com/payloadcms/payload/commit/2fa680cdf8daeff42ac0724d895e8c4130ade725))
26
40
  * remove duplication of config in tests ([40b6aff](https://github.com/payloadcms/payload/commit/40b6afff2d1a5f263eae4da5fe477a0fd738b701))
41
+ * remove files test helper ([bb9f28f](https://github.com/payloadcms/payload/commit/bb9f28fb0871a525e4b8cc24b14a71ac02d8996d))
27
42
  * reorganizes mongo connection ([8589fde](https://github.com/payloadcms/payload/commit/8589fdefdad4856f4d642c2d9ed8d6ca815c81f6))
28
43
  * restores built-in fields into table column builder ([7a6f239](https://github.com/payloadcms/payload/commit/7a6f2392fa63532a8556ec0dc0e1186057291fea))
29
44
  * retrofits array to new collapsible component ([aa89251](https://github.com/payloadcms/payload/commit/aa89251a3b6990460ac03e0a33d9aab3ceeadd9d))
30
45
  * revises e2e field testing ([31ca363](https://github.com/payloadcms/payload/commit/31ca3639828ddf572033023bd6a350f5b4a2eb9a))
31
46
  * scaffolds tabs field ([85b7a49](https://github.com/payloadcms/payload/commit/85b7a490eb6fa53424986d78b893284096c040d4))
32
47
  * styles nested groups and adds gutter back to richText ([3a17a8a](https://github.com/payloadcms/payload/commit/3a17a8a001a1aaaa52b119faf4740c50367b4049))
48
+ * test collections rest endpoints ([cf38e8d](https://github.com/payloadcms/payload/commit/cf38e8d520226e6370b3f55e26141408375b0610))
33
49
  * testing refactor (e2e/int) ([#748](https://github.com/payloadcms/payload/issues/748)) ([90ba15f](https://github.com/payloadcms/payload/commit/90ba15f9bdf834a55861551e43c4dc55ca81565b))
34
50
  * updates block field to use new collapsible ([49d09a3](https://github.com/payloadcms/payload/commit/49d09a349fe6cdc45c429b77e9d60943b7db851f))
35
51
  * updates styling of group field ([8c4e0fa](https://github.com/payloadcms/payload/commit/8c4e0fa7b28fd68be1b20374d5d8cfaff923db11))
36
52
  * upload integration tests ([#759](https://github.com/payloadcms/payload/issues/759)) ([e75cca4](https://github.com/payloadcms/payload/commit/e75cca4512e16647b6e0371706b33ad4f486c26d))
37
53
 
38
- ## [0.20.6-beta.0](https://github.com/payloadcms/payload/compare/v0.19.2...v0.20.6-beta.0) (2022-07-16)
39
-
40
-
41
- ### Bug Fixes
42
-
43
- * bug with base colors ([4bb0d39](https://github.com/payloadcms/payload/commit/4bb0d3994f630a6111f18ab6a1a2e9a9a83d2a98))
44
- * ensures duplicated rows have properly created ids ([3ae1c26](https://github.com/payloadcms/payload/commit/3ae1c26a074c74585162a9938e67e3c7bcc087fa))
45
- * upload e2e file path ([a664b62](https://github.com/payloadcms/payload/commit/a664b627f67207f520b16b705017c72838039f64))
46
-
47
-
48
- ### Features
49
-
50
- * add card ids ([baf4664](https://github.com/payloadcms/payload/commit/baf46640737d8aca6fead1568ba15f11769a76f2))
51
- * adds collapsible field type ([98676be](https://github.com/payloadcms/payload/commit/98676bea69a37c6521dea1dfafa4c4a9967efc1e))
52
- * e2e test upload ([#755](https://github.com/payloadcms/payload/issues/755)) ([1160093](https://github.com/payloadcms/payload/commit/11600930b78dbae50fd093529b727101d83561fa))
53
- * ensures nested fields not affecting data can be traversed properly ([3b9fdf3](https://github.com/payloadcms/payload/commit/3b9fdf3ffdc49ff9a2c0e56f5438810c5f397f86))
54
- * ensures tabs and collapsibles render in version diff ([54162b5](https://github.com/payloadcms/payload/commit/54162b52cc8211e100d4ad901339b7982666389c))
55
- * finishes block field ([41a0ba5](https://github.com/payloadcms/payload/commit/41a0ba57805b4b06e5310659263ee59ae0828f34))
56
- * finishes collapsible field ([60bfb1c](https://github.com/payloadcms/payload/commit/60bfb1c3b801c89de055d11cee50a1b51e864b7b))
57
- * finishes tabs field ([68e7c41](https://github.com/payloadcms/payload/commit/68e7c41fdc07df04dcc3caaf486d2d596354039d))
58
- * initializes useField internalValue with incoming field value ([c995f79](https://github.com/payloadcms/payload/commit/c995f797fec76e78eafb323cdf4219caebdfa6c7))
59
- * more maintainable colors ([5fc4f3a](https://github.com/payloadcms/payload/commit/5fc4f3adadc8f7ec3eaf99021dccf7060926c7f1))
60
- * only renders arrays and blocks once they are initialized ([735e385](https://github.com/payloadcms/payload/commit/735e385537a505db00b21b2567f829bcb1718c3c))
61
- * point field int test ([c75c67e](https://github.com/payloadcms/payload/commit/c75c67ec86bc5ff42d4965631d7f7e80fb01cb1f))
62
- * refactors z index methodology ([2fa680c](https://github.com/payloadcms/payload/commit/2fa680cdf8daeff42ac0724d895e8c4130ade725))
63
- * remove duplication of config in tests ([40b6aff](https://github.com/payloadcms/payload/commit/40b6afff2d1a5f263eae4da5fe477a0fd738b701))
64
- * reorganizes mongo connection ([8589fde](https://github.com/payloadcms/payload/commit/8589fdefdad4856f4d642c2d9ed8d6ca815c81f6))
65
- * restores built-in fields into table column builder ([7a6f239](https://github.com/payloadcms/payload/commit/7a6f2392fa63532a8556ec0dc0e1186057291fea))
66
- * retrofits array to new collapsible component ([aa89251](https://github.com/payloadcms/payload/commit/aa89251a3b6990460ac03e0a33d9aab3ceeadd9d))
67
- * revises e2e field testing ([31ca363](https://github.com/payloadcms/payload/commit/31ca3639828ddf572033023bd6a350f5b4a2eb9a))
68
- * scaffolds tabs field ([85b7a49](https://github.com/payloadcms/payload/commit/85b7a490eb6fa53424986d78b893284096c040d4))
69
- * styles nested groups and adds gutter back to richText ([3a17a8a](https://github.com/payloadcms/payload/commit/3a17a8a001a1aaaa52b119faf4740c50367b4049))
70
- * testing refactor (e2e/int) ([#748](https://github.com/payloadcms/payload/issues/748)) ([90ba15f](https://github.com/payloadcms/payload/commit/90ba15f9bdf834a55861551e43c4dc55ca81565b))
71
- * updates block field to use new collapsible ([49d09a3](https://github.com/payloadcms/payload/commit/49d09a349fe6cdc45c429b77e9d60943b7db851f))
72
- * updates styling of group field ([8c4e0fa](https://github.com/payloadcms/payload/commit/8c4e0fa7b28fd68be1b20374d5d8cfaff923db11))
73
- * upload integration tests ([#759](https://github.com/payloadcms/payload/issues/759)) ([e75cca4](https://github.com/payloadcms/payload/commit/e75cca4512e16647b6e0371706b33ad4f486c26d))
54
+ ## [0.20.1](https://github.com/payloadcms/payload/compare/v0.19.2...v0.20.1) (2022-07-16)
74
55
 
75
56
  ## [0.19.2](https://github.com/payloadcms/payload/compare/v0.19.1...v0.19.2) (2022-07-11)
76
57
 
@@ -1 +1 @@
1
- .btn{background:transparent;border:0;border-radius:4px;color:inherit;cursor:pointer;font-size:1rem;font-weight:400;line-height:1.9230769231rem;margin-bottom:1.9230769231rem;margin-top:1.9230769231rem;text-align:center;text-decoration:none}.btn .btn__icon{border:1px solid;border-radius:100%}.btn .btn__icon .stroke{stroke:currentColor;fill:none}.btn .btn__icon .fill{fill:currentColor}.btn--has-tooltip{position:relative}.btn .btn__tooltip{opacity:0;transform:translate(-50%,-10px);visibility:hidden}.btn .btn__content:hover .btn__tooltip{opacity:1;visibility:visible}.btn--icon-style-none .btn__icon,.btn--icon-style-without-border .btn__icon{border:none}.btn span{line-height:1.9230769231rem}.btn span,.btn svg{vertical-align:top}.btn--size-medium{padding:.9615384615rem 1.9230769231rem}.btn--size-small{padding:.4807692308rem .9615384615rem}.btn--style-primary{background-color:var(--theme-elevation-800);color:var(--theme-elevation-0)}.btn--style-primary.btn--disabled{background-color:var(--theme-elevation-400)}.btn--style-primary:not(.btn--disabled):hover{background:var(--theme-elevation-750)}.btn--style-primary:not(.btn--disabled):active{background:var(--theme-elevation-700)}.btn--style-primary:focus{box-shadow:0 0 0 2px var(--theme-success-500);outline:none}.btn--style-secondary{background:none;box-shadow:inset 0 0 0 1px var(--theme-elevation-800);color:var(--theme-elevation-800)}.btn--style-secondary:hover{background:var(--theme-elevation-100);box-shadow:inset 0 0 0 1px var(--theme-elevation-700)}.btn--style-secondary:active{background:var(--theme-elevation-200)}.btn--style-secondary.btn--disabled{background:none;box-shadow:inset 0 0 0 1px var(--theme-elevation-400);color:var(--theme-elevation-400)}.btn--style-secondary:focus{box-shadow:inset 0 0 0 1px var(--theme-elevation-700),0 0 0 2px var(--theme-success-500);outline:none}.btn--style-none{border-radius:0;margin:0;padding:0}.btn--style-none:focus{opacity:.8}.btn--style-none:active{opacity:.7}.btn--round{border-radius:100%}.btn--icon span{display:flex;justify-content:space-between}.btn--icon.btn--style-primary .icon .stroke{stroke:var(--theme-elevation-0);fill:none}.btn--icon.btn--style-primary .icon .fill{fill:var(--theme-elevation-0)}.btn--style-icon-label{font-weight:600;padding:0}.btn--style-light-gray{box-shadow:inset 0 0 0 1px var(--theme-elevation-800)}.btn--icon-position-left .btn__content{flex-direction:row-reverse}.btn--icon-position-left .btn__icon{margin-right:.9615384615rem}.btn--icon-position-right .btn__icon{margin-left:.9615384615rem}.btn--icon-only .btn__icon{margin:0;padding:0}.btn--disabled{cursor:default}.btn:hover .btn__icon{background:var(--theme-elevation-800)}.btn:hover .btn__icon .stroke{stroke:var(--theme-elevation-0);fill:none}.btn:hover .btn__icon .fill{fill:var(--theme-elevation-0)}.btn:focus{outline:none}.btn:focus .btn__icon{background:var(--theme-elevation-150)}.btn:focus .btn__icon .stroke{stroke:var(--theme-elevation-800);fill:none}.btn:focus .btn__icon .fill{fill:var(--theme-elevation-800)}.btn:active .btn__icon{background:var(--theme-elevation-700)}.btn:active .btn__icon .stroke{stroke:var(--theme-elevation-0);fill:none}.btn:active .btn__icon .fill{fill:var(--theme-elevation-0)}.icon--plus{height:1.9230769231rem;width:1.9230769231rem}.icon--plus .stroke,.icon--x line{stroke:var(--theme-elevation-800);stroke-width:1px}.icon--chevron{height:1.9230769231rem;width:1.9230769231rem}.icon--chevron .stroke{fill:none;stroke:var(--theme-elevation-800);stroke-width:2px}.icon--edit{shape-rendering:auto;height:1.9230769231rem;width:1.9230769231rem}.icon--edit .fill{fill:var(--theme-elevation-800);stroke:none}.icon--swap{height:1.9230769231rem;width:1.9230769231rem}.icon--swap .stroke{fill:none;stroke:var(--theme-elevation-800);stroke-width:2px}.tooltip{background-color:var(--theme-elevation-800);border-radius:2px;bottom:100%;color:var(--theme-elevation-0);font-weight:400;line-height:1.4423076923rem;padding:.3846153846rem .7692307692rem;transform:translate3d(-50%,-20%,0);white-space:nowrap;z-index:2}.tooltip,.tooltip span{left:50%;position:absolute}.tooltip span{border:10px solid transparent;border-top:10px solid var(--theme-elevation-800);height:0;top:calc(100% - .12019rem);transform:translateX(-50%);width:0}.popup{position:relative}.popup__content{background:var(--theme-input-bg);display:none;max-width:calc(100vw - 1.92308rem);position:absolute;z-index:var(--z-popup)}.popup__content:after{border:12px solid transparent;border-top:12px solid var(--theme-input-bg);content:" ";position:absolute;top:calc(100% - 1px)}.popup__wrap{overflow:hidden}.popup__scroll{overflow-y:auto;padding:1.9230769231rem;padding-right:calc(var(--scrollbar-width) + 1.92308rem);white-space:nowrap;width:calc(100% + var(--scrollbar-width))}.popup:active,.popup:focus{outline:none}.popup--size-small .popup__scroll{padding:1.4423076923rem calc(var(--scrollbar-width) + 1.44231rem) 1.4423076923rem 1.4423076923rem}.popup--size-small .popup__content{box-shadow:0 0 30px 0 rgba(0,2,4,.12),0 30px 25px -8px rgba(0,2,4,.1)}.popup--size-small.popup--h-align-left .popup__content{left:-.9615384615rem}.popup--size-small.popup--h-align-left .popup__content:after{left:.8173076923rem}.popup--size-large .popup__content{box-shadow:0 20px 35px -10px rgba(0,2,4,.2),0 6px 4px -4px rgba(0,2,4,.02)}.popup--size-large .popup__scroll{padding:2.8846153846rem calc(var(--scrollbar-width) + 2.88462rem) 1.9230769231rem 2.8846153846rem}.popup--size-wide .popup__content{box-shadow:0 0 30px 0 rgba(0,2,4,.12),0 30px 25px -8px rgba(0,2,4,.1)}.popup--size-wide .popup__content:after{border:12px solid transparent;border-top:12px solid var(--theme-input-bg)}.popup--size-wide .popup__scroll{padding:.4807692308rem .9615384615rem}.popup--size-wide.popup--align-left .popup__content{left:-.9615384615rem}.popup--size-wide.popup--align-left .popup__content:after{left:.8173076923rem}.popup--h-align-left .popup__content{left:-3.3653846154rem}.popup--h-align-left .popup__content:after{left:3.3653846154rem}.popup--h-align-center .popup__content,.popup--h-align-center .popup__content:after{left:50%;transform:translateX(-50%)}.popup--h-align-right .popup__content{right:-3.3653846154rem}.popup--h-align-right .popup__content:after{right:3.3653846154rem}.popup--v-align-top .popup__content{bottom:calc(100% + 1.92308rem)}.popup--v-align-bottom .popup__content{box-shadow:0 -2px 20px 7px rgba(0,2,4,.1),0 6px 4px -4px rgba(0,2,4,.02);top:calc(100% + .96154rem)}.popup--v-align-bottom .popup__content:after{border-bottom-color:var(--theme-input-bg);border-top-color:transparent!important;bottom:calc(100% - 1px);top:auto}.popup--v-align-bottom.popup--color-dark .popup__content:after{border-bottom-color:var(--theme-elevation-800)}.popup--color-dark .popup__content{background:var(--theme-elevation-800);color:var(--theme-input-bg)}.popup--color-dark .popup__content:after{border-top-color:var(--theme-elevation-800)}.popup--active .popup__content{display:block}@media(max-width:1024px){.popup--size-large .popup__scroll,.popup__scroll{padding:1.4423076923rem;padding-right:calc(var(--scrollbar-width) + 1.44231rem)}.popup--h-align-left .popup__content{left:-.9615384615rem}.popup--h-align-left .popup__content:after{left:.9615384615rem}.popup--h-align-center .popup__content,.popup--h-align-center .popup__content:after{left:50%;transform:translateX(0)}.popup--h-align-right .popup__content{right:-.9615384615rem}.popup--h-align-right .popup__content:after{right:.9615384615rem}.popup--force-h-align-left .popup__content{left:-.9615384615rem;right:auto;transform:none}.popup--force-h-align-left .popup__content:after{left:.9615384615rem;right:auto;transform:none}.popup--force-h-align-right .popup__content{left:auto;right:-.9615384615rem;transform:none}.popup--force-h-align-right .popup__content:after{left:auto;right:.9615384615rem;transform:none}}.popup-button{display:inline-flex}.banner{background:var(--theme-elevation-900);border:0;border-radius:3px;color:var(--theme-elevation-800);font-size:1rem;line-height:1.9230769231rem;margin-bottom:1.9230769231rem;padding:.9615384615rem;vertical-align:middle}.banner--has-action{cursor:pointer;text-decoration:none}.banner--has-icon{display:flex}.banner--has-icon svg{display:block}.banner--type-default.button--has-action:hover{background:var(--theme-elevation-900)}.banner--type-default.button--has-action:active{background:var(--theme-elevation-950)}.banner--type-error{background:var(--theme-error-100);color:var(--theme-error-500)}.banner--type-error svg .stroke{stroke:var(--theme-error-500);fill:none}.banner--type-error svg .fill{fill:var(--theme-error-500)}.banner--type-error.button--has-action:hover{background:var(--theme-error-200)}.banner--type-error.button--has-action:active{background:var(--theme-error-300)}.banner--type-success{background:var(--theme-success-500)}.banner--type-success.button--has-action:active,.banner--type-success.button--has-action:hover{background:var(--theme-success-200)}.template-minimal{align-items:center;display:flex;justify-content:center;margin-left:auto;margin-right:auto;min-height:100%;padding:5.7692307692rem 1.9230769231rem;width:100%}.template-minimal--width-normal .template-minimal__wrap{max-width:500px;width:100%}.template-minimal--width-wide .template-minimal__wrap{max-width:1024px;width:100%}.icon--check{height:1.9230769231rem;width:1.9230769231rem}.icon--check .stroke{fill:none;stroke:var(--theme-elevation-800);stroke-width:2px}.icon--search{height:1.9230769231rem;width:1.9230769231rem}.icon--search .stroke{stroke:var(--theme-elevation-800);stroke-width:1px}.icon--menu .fill{fill:var(--theme-text)}.pill{background:var(--theme-elevation-150);border:0;border-radius:3px;color:var(--theme-elevation-800);cursor:default;display:inline-flex;font-size:1rem;line-height:1.9230769231rem;overflow:hidden;padding:0 .4807692308rem 0 .6490384615rem;text-overflow:ellipsis;vertical-align:middle;white-space:nowrap}.pill:active,.pill:focus{outline:none}.pill--has-action{cursor:pointer;text-decoration:none}.pill--has-icon svg{display:block}.pill--align-icon-left{padding-left:.2403846154rem}.pill--align-icon-right{padding-right:.2403846154rem}.pill--style-white{background:var(--theme-elevation-0)}.pill--style-light-gray,.pill--style-light.pill--has-action:active,.pill--style-light.pill--has-action:hover,.pill--style-white.pill--has-action:active,.pill--style-white.pill--has-action:hover{background:var(--theme-elevation-100)}.pill--style-light-gray{color:var(--theme-elevation-800)}.pill--style-warning{background:var(--theme-warning-500)}.pill--style-success{background:var(--theme-success-500)}.pill--style-dark{background:var(--theme-elevation-800);color:var(--theme-elevation-0)}.pill--style-dark svg .stroke{stroke:var(--theme-elevation-0);fill:none}.pill--style-dark svg .fill{fill:var(--theme-elevation-0)}.pill--style-dark.pill--has-action:hover{background:var(--theme-elevation-750)}.pill--style-dark.pill--has-action:active{background:var(--theme-elevation-700)}
1
+ .btn{background:transparent;border:0;border-radius:4px;color:inherit;cursor:pointer;font-size:1rem;font-weight:400;line-height:1.9230769231rem;margin-bottom:1.9230769231rem;margin-top:1.9230769231rem;text-align:center;text-decoration:none}.btn .btn__icon{border:1px solid;border-radius:100%}.btn .btn__icon .stroke{stroke:currentColor;fill:none}.btn .btn__icon .fill{fill:currentColor}.btn--has-tooltip{position:relative}.btn .btn__tooltip{opacity:0;transform:translate(-50%,-10px);visibility:hidden}.btn .btn__content:hover .btn__tooltip{opacity:1;visibility:visible}.btn--icon-style-none .btn__icon,.btn--icon-style-without-border .btn__icon{border:none}.btn span{line-height:1.9230769231rem}.btn span,.btn svg{vertical-align:top}.btn--size-medium{padding:.9615384615rem 1.9230769231rem}.btn--size-small{padding:.4807692308rem .9615384615rem}.btn--style-primary{background-color:var(--theme-elevation-800);color:var(--theme-elevation-0)}.btn--style-primary.btn--disabled{background-color:var(--theme-elevation-400)}.btn--style-primary:not(.btn--disabled):hover{background:var(--theme-elevation-750)}.btn--style-primary:not(.btn--disabled):active{background:var(--theme-elevation-700)}.btn--style-primary:focus{box-shadow:0 0 0 2px var(--theme-success-500);outline:none}.btn--style-secondary{background:none;box-shadow:inset 0 0 0 1px var(--theme-elevation-800);color:var(--theme-elevation-800)}.btn--style-secondary:hover{background:var(--theme-elevation-100);box-shadow:inset 0 0 0 1px var(--theme-elevation-700)}.btn--style-secondary:active{background:var(--theme-elevation-200)}.btn--style-secondary.btn--disabled{background:none;box-shadow:inset 0 0 0 1px var(--theme-elevation-400);color:var(--theme-elevation-400)}.btn--style-secondary:focus{box-shadow:inset 0 0 0 1px var(--theme-elevation-700),0 0 0 2px var(--theme-success-500);outline:none}.btn--style-none{border-radius:0;margin:0;padding:0}.btn--style-none:focus{opacity:.8}.btn--style-none:active{opacity:.7}.btn--round{border-radius:100%}.btn--icon span{display:flex;justify-content:space-between}.btn--icon.btn--style-primary .icon .stroke{stroke:var(--theme-elevation-0);fill:none}.btn--icon.btn--style-primary .icon .fill{fill:var(--theme-elevation-0)}.btn--style-icon-label{font-weight:600;padding:0}.btn--style-light-gray{box-shadow:inset 0 0 0 1px var(--theme-elevation-800)}.btn--icon-position-left .btn__content{flex-direction:row-reverse}.btn--icon-position-left .btn__icon{margin-right:.9615384615rem}.btn--icon-position-right .btn__icon{margin-left:.9615384615rem}.btn--icon-only .btn__icon{margin:0;padding:0}.btn--disabled{cursor:default}.btn:hover .btn__icon{background:var(--theme-elevation-800)}.btn:hover .btn__icon .stroke{stroke:var(--theme-elevation-0);fill:none}.btn:hover .btn__icon .fill{fill:var(--theme-elevation-0)}.btn:focus{outline:none}.btn:focus .btn__icon{background:var(--theme-elevation-150)}.btn:focus .btn__icon .stroke{stroke:var(--theme-elevation-800);fill:none}.btn:focus .btn__icon .fill{fill:var(--theme-elevation-800)}.btn:active .btn__icon{background:var(--theme-elevation-700)}.btn:active .btn__icon .stroke{stroke:var(--theme-elevation-0);fill:none}.btn:active .btn__icon .fill{fill:var(--theme-elevation-0)}.icon--plus{height:1.9230769231rem;width:1.9230769231rem}.icon--plus .stroke,.icon--x line{stroke:var(--theme-elevation-800);stroke-width:1px}.icon--chevron{height:1.9230769231rem;width:1.9230769231rem}.icon--chevron .stroke{fill:none;stroke:var(--theme-elevation-800);stroke-width:2px}.icon--edit{shape-rendering:auto;height:1.9230769231rem;width:1.9230769231rem}.icon--edit .fill{fill:var(--theme-elevation-800);stroke:none}.icon--swap{height:1.9230769231rem;width:1.9230769231rem}.icon--swap .stroke{fill:none;stroke:var(--theme-elevation-800);stroke-width:2px}.tooltip{background-color:var(--theme-elevation-800);border-radius:2px;bottom:100%;color:var(--theme-elevation-0);font-weight:400;line-height:1.4423076923rem;padding:.3846153846rem .7692307692rem;transform:translate3d(-50%,-20%,0);white-space:nowrap;z-index:2}.tooltip,.tooltip span{left:50%;position:absolute}.tooltip span{border:10px solid transparent;border-top:10px solid var(--theme-elevation-800);height:0;top:calc(100% - .12019rem);transform:translateX(-50%);width:0}.popup{position:relative}.popup__content{background:var(--theme-input-bg);display:none;max-width:calc(100vw - 1.92308rem);position:absolute;z-index:var(--z-popup)}.popup__content:after{border:12px solid transparent;border-top:12px solid var(--theme-input-bg);content:" ";position:absolute;top:calc(100% - 1px)}.popup__wrap{overflow:hidden}.popup__scroll{overflow-y:auto;padding:1.9230769231rem;padding-right:calc(var(--scrollbar-width) + 1.92308rem);white-space:nowrap;width:calc(100% + var(--scrollbar-width))}.popup:active,.popup:focus{outline:none}.popup--size-small .popup__scroll{padding:1.4423076923rem calc(var(--scrollbar-width) + 1.44231rem) 1.4423076923rem 1.4423076923rem}.popup--size-small .popup__content{box-shadow:0 0 30px 0 rgba(0,2,4,.12),0 30px 25px -8px rgba(0,2,4,.1)}.popup--size-small.popup--h-align-left .popup__content{left:-.9615384615rem}.popup--size-small.popup--h-align-left .popup__content:after{left:.8173076923rem}.popup--size-large .popup__content{box-shadow:0 20px 35px -10px rgba(0,2,4,.2),0 6px 4px -4px rgba(0,2,4,.02)}.popup--size-large .popup__scroll{padding:2.8846153846rem calc(var(--scrollbar-width) + 2.88462rem) 1.9230769231rem 2.8846153846rem}.popup--size-wide .popup__content{box-shadow:0 0 30px 0 rgba(0,2,4,.12),0 30px 25px -8px rgba(0,2,4,.1)}.popup--size-wide .popup__content:after{border:12px solid transparent;border-top:12px solid var(--theme-input-bg)}.popup--size-wide .popup__scroll{padding:.4807692308rem .9615384615rem}.popup--size-wide.popup--align-left .popup__content{left:-.9615384615rem}.popup--size-wide.popup--align-left .popup__content:after{left:.8173076923rem}.popup--h-align-left .popup__content{left:-3.3653846154rem}.popup--h-align-left .popup__content:after{left:3.3653846154rem}.popup--h-align-center .popup__content,.popup--h-align-center .popup__content:after{left:50%;transform:translateX(-50%)}.popup--h-align-right .popup__content{right:-3.3653846154rem}.popup--h-align-right .popup__content:after{right:3.3653846154rem}.popup--v-align-top .popup__content{bottom:calc(100% + 1.92308rem)}.popup--v-align-bottom .popup__content{box-shadow:0 -2px 20px 7px rgba(0,2,4,.1),0 6px 4px -4px rgba(0,2,4,.02);top:calc(100% + .96154rem)}.popup--v-align-bottom .popup__content:after{border-bottom-color:var(--theme-input-bg);border-top-color:transparent!important;bottom:calc(100% - 1px);top:auto}.popup--v-align-bottom.popup--color-dark .popup__content:after{border-bottom-color:var(--theme-elevation-800)}.popup--color-dark .popup__content{background:var(--theme-elevation-800);color:var(--theme-input-bg)}.popup--color-dark .popup__content:after{border-top-color:var(--theme-elevation-800)}.popup--active .popup__content{display:block}@media(max-width:1024px){.popup--size-large .popup__scroll,.popup__scroll{padding:1.4423076923rem;padding-right:calc(var(--scrollbar-width) + 1.44231rem)}.popup--h-align-left .popup__content{left:-.9615384615rem}.popup--h-align-left .popup__content:after{left:.9615384615rem}.popup--h-align-center .popup__content,.popup--h-align-center .popup__content:after{left:50%;transform:translateX(0)}.popup--h-align-right .popup__content{right:-.9615384615rem}.popup--h-align-right .popup__content:after{right:.9615384615rem}.popup--force-h-align-left .popup__content{left:-.9615384615rem;right:auto;transform:none}.popup--force-h-align-left .popup__content:after{left:.9615384615rem;right:auto;transform:none}.popup--force-h-align-right .popup__content{left:auto;right:-.9615384615rem;transform:none}.popup--force-h-align-right .popup__content:after{left:auto;right:.9615384615rem;transform:none}}.popup-button{display:inline-flex}.banner{background:var(--theme-elevation-900);border:0;border-radius:3px;color:var(--theme-elevation-800);font-size:1rem;line-height:1.9230769231rem;margin-bottom:1.9230769231rem;padding:.9615384615rem;vertical-align:middle}.banner--has-action{cursor:pointer;text-decoration:none}.banner--has-icon{display:flex}.banner--has-icon svg{display:block}.banner--type-default.button--has-action:hover{background:var(--theme-elevation-900)}.banner--type-default.button--has-action:active{background:var(--theme-elevation-950)}.banner--type-error{background:var(--theme-error-100);color:var(--theme-error-500)}.banner--type-error svg .stroke{stroke:var(--theme-error-500);fill:none}.banner--type-error svg .fill{fill:var(--theme-error-500)}.banner--type-error.button--has-action:hover{background:var(--theme-error-200)}.banner--type-error.button--has-action:active{background:var(--theme-error-300)}.banner--type-success{background:var(--theme-success-500)}.banner--type-success.button--has-action:active,.banner--type-success.button--has-action:hover{background:var(--theme-success-200)}.template-minimal{align-items:center;display:flex;justify-content:center;margin-left:auto;margin-right:auto;min-height:100%;padding:5.7692307692rem 1.9230769231rem;width:100%}.template-minimal--width-normal .template-minimal__wrap{max-width:500px;width:100%}.template-minimal--width-wide .template-minimal__wrap{max-width:1024px;width:100%}.icon--check{height:1.9230769231rem;width:1.9230769231rem}.icon--check .stroke{fill:none;stroke:var(--theme-elevation-800);stroke-width:2px}.icon--search{height:1.9230769231rem;width:1.9230769231rem}.icon--search .stroke{stroke:var(--theme-elevation-800);stroke-width:1px}.icon--menu .fill{fill:var(--theme-text)}.pill{background:var(--theme-elevation-150);border:0;border-radius:3px;color:var(--theme-elevation-800);cursor:default;display:inline-flex;font-size:1rem;line-height:1.9230769231rem;overflow:hidden;padding:0 .4807692308rem 0 .6490384615rem;text-overflow:ellipsis;vertical-align:middle;white-space:nowrap}.pill:active,.pill:focus{outline:none}.pill--has-action{cursor:pointer;text-decoration:none}.pill--has-icon svg{display:block}.pill--align-icon-left{padding-left:.2403846154rem}.pill--align-icon-right{padding-right:.2403846154rem}.pill--style-white{background:var(--theme-elevation-0)}.pill--style-light-gray,.pill--style-light.pill--has-action:active,.pill--style-light.pill--has-action:hover,.pill--style-white.pill--has-action:active,.pill--style-white.pill--has-action:hover{background:var(--theme-elevation-100)}.pill--style-light-gray{color:var(--theme-elevation-800)}.pill--style-warning{background:var(--theme-warning-500)}.pill--style-success{background:var(--theme-success-500);color:var(--color-base-800)}.pill--style-dark{background:var(--theme-elevation-800);color:var(--theme-elevation-0)}.pill--style-dark svg .stroke{stroke:var(--theme-elevation-0);fill:none}.pill--style-dark svg .fill{fill:var(--theme-elevation-0)}.pill--style-dark.pill--has-action:hover{background:var(--theme-elevation-750)}.pill--style-dark.pill--has-action:active{background:var(--theme-elevation-700)}
@@ -1,5 +1,5 @@
1
1
  import React, { useState } from 'react';
2
- import flattenTopLevelFields from '../../../utilities/flattenTopLevelFields';
2
+ import flattenTopLevelFields from '../../../../utilities/flattenTopLevelFields';
3
3
  import Pill from '../Pill';
4
4
  import Plus from '../../icons/Plus';
5
5
  import X from '../../icons/X';
@@ -4,17 +4,14 @@
4
4
  background: var(--theme-elevation-50);
5
5
  padding: base(1) base(1) base(.5);
6
6
 
7
- .pill {
7
+ &__column {
8
8
  margin-right: base(.5);
9
9
  margin-bottom: base(.5);
10
- }
11
-
12
- &__column {
13
10
  background-color: transparent;
14
11
  box-shadow: 0 0 0 1px var(--theme-elevation-200);
15
- }
16
12
 
17
- &__column--active {
18
- background-color: var(--theme-elevation-150);
13
+ &.column-selector__column--active {
14
+ background-color: var(--theme-elevation-150);
15
+ }
19
16
  }
20
17
  }
@@ -20,4 +20,8 @@
20
20
  position: relative;
21
21
  display: block;
22
22
  }
23
+
24
+ @include small-break {
25
+ padding: 0 0 base(1);
26
+ }
23
27
  }
@@ -77,6 +77,7 @@
77
77
 
78
78
  &--style-success {
79
79
  background: var(--theme-success-500);
80
+ color: var(--color-base-800);
80
81
  }
81
82
 
82
83
  &--style-dark {
@@ -3,12 +3,12 @@ import Select from 'react-select';
3
3
  import Chevron from '../../icons/Chevron';
4
4
  import './index.scss';
5
5
  const ReactSelect = (props) => {
6
- const { className, showError = false, options, onChange, value, disabled = false, placeholder, isSearchable = true, } = props;
6
+ const { className, showError = false, options, onChange, value, disabled = false, placeholder, isSearchable = true, isClearable, } = props;
7
7
  const classes = [
8
8
  className,
9
9
  'react-select',
10
10
  showError && 'react-select--error',
11
11
  ].filter(Boolean).join(' ');
12
- return (React.createElement(Select, { placeholder: placeholder, ...props, value: value, onChange: onChange, disabled: disabled ? 'disabled' : undefined, components: { DropdownIndicator: Chevron }, className: classes, classNamePrefix: "rs", options: options, isSearchable: isSearchable }));
12
+ return (React.createElement(Select, { placeholder: placeholder, ...props, value: value, onChange: onChange, disabled: disabled ? 'disabled' : undefined, components: { DropdownIndicator: Chevron }, className: classes, classNamePrefix: "rs", options: options, isSearchable: isSearchable, isClearable: isClearable }));
13
13
  };
14
14
  export default ReactSelect;
@@ -18,4 +18,5 @@ export declare type Props = {
18
18
  onMenuScrollToBottom?: () => void;
19
19
  placeholder?: string;
20
20
  isSearchable?: boolean;
21
+ isClearable?: boolean;
21
22
  };
@@ -6,7 +6,7 @@ import Button from '../Button';
6
6
  import reducer from './reducer';
7
7
  import Condition from './Condition';
8
8
  import fieldTypes from './field-types';
9
- import flattenTopLevelFields from '../../../utilities/flattenTopLevelFields';
9
+ import flattenTopLevelFields from '../../../../utilities/flattenTopLevelFields';
10
10
  import { useSearchParams } from '../../utilities/SearchParams';
11
11
  import validateWhereQuery from './validateWhereQuery';
12
12
  import './index.scss';
@@ -174,7 +174,7 @@ const ArrayFieldType = (props) => {
174
174
  return (React.createElement(Draggable, { key: row.id, draggableId: row.id, index: i, isDragDisabled: readOnly }, (providedDrag) => (React.createElement("div", { id: `${path}-row-${i}`, ref: providedDrag.innerRef, ...providedDrag.draggableProps },
175
175
  React.createElement(Collapsible, { collapsed: row.collapsed, onToggle: (collapsed) => setCollapse(row.id, collapsed), className: `${baseClass}__row`, key: row.id, dragHandleProps: providedDrag.dragHandleProps, header: `${labels.singular} ${rowNumber >= 10 ? rowNumber : `0${rowNumber}`}`, actions: !readOnly ? (React.createElement(ArrayAction, { rowCount: rows.length, duplicateRow: duplicateRow, addRow: addRow, moveRow: moveRow, removeRow: removeRow, index: i })) : undefined },
176
176
  React.createElement(HiddenInput, { name: `${path}.${i}.id`, value: row.id }),
177
- React.createElement(RenderFields, { forceRender: true, readOnly: readOnly, fieldTypes: fieldTypes, permissions: permissions === null || permissions === void 0 ? void 0 : permissions.fields, fieldSchema: fields.map((field) => ({
177
+ React.createElement(RenderFields, { className: `${baseClass}__fields`, forceRender: true, readOnly: readOnly, fieldTypes: fieldTypes, permissions: permissions === null || permissions === void 0 ? void 0 : permissions.fields, fieldSchema: fields.map((field) => ({
178
178
  ...field,
179
179
  path: `${path}.${i}${fieldAffectsData(field) ? `.${field.name}` : ''}`,
180
180
  })) }))))));
@@ -55,7 +55,7 @@
55
55
  }
56
56
  }
57
57
 
58
- .field-type:last-child {
58
+ &__fields>.field-type:last-child {
59
59
  margin-bottom: 0;
60
60
  }
61
61
  }
@@ -185,7 +185,7 @@ const Blocks = (props) => {
185
185
  React.createElement(Popup, { key: `${blockType}-${i}`, forceOpen: selectorIndexOpen === i, onToggleOpen: onAddPopupToggle, buttonType: "none", size: "large", horizontalAlign: "right", render: ({ close }) => (React.createElement(BlockSelector, { blocks: blocks, addRow: addRow, addRowIndex: i, close: close })) }),
186
186
  React.createElement(ArrayAction, { rowCount: rows.length, duplicateRow: () => duplicateRow(i, blockType), addRow: () => setSelectorIndexOpen(i), moveRow: moveRow, removeRow: removeRow, index: i }))) : undefined },
187
187
  React.createElement(HiddenInput, { name: `${path}.${i}.id`, value: row.id }),
188
- React.createElement(RenderFields, { forceRender: true, readOnly: readOnly, fieldTypes: fieldTypes, permissions: permissions === null || permissions === void 0 ? void 0 : permissions.fields, fieldSchema: blockToRender.fields.map((field) => ({
188
+ React.createElement(RenderFields, { className: `${baseClass}__fields`, forceRender: true, readOnly: readOnly, fieldTypes: fieldTypes, permissions: permissions === null || permissions === void 0 ? void 0 : permissions.fields, fieldSchema: blockToRender.fields.map((field) => ({
189
189
  ...field,
190
190
  path: `${path}.${i}${fieldAffectsData(field) ? `.${field.name}` : ''}`,
191
191
  })) }))))));
@@ -74,7 +74,7 @@
74
74
  }
75
75
  }
76
76
 
77
- .field-type:last-child {
77
+ &__fields>.field-type:last-child {
78
78
  margin-bottom: 0;
79
79
  }
80
80
  }
@@ -6,17 +6,20 @@ import { fieldAffectsData } from '../../../../../fields/config/types';
6
6
  import { useCollapsible } from '../../../elements/Collapsible/provider';
7
7
  import './index.scss';
8
8
  import { GroupProvider, useGroup } from './provider';
9
+ import { useTabs } from '../Tabs/provider';
9
10
  const baseClass = 'group-field';
10
11
  const Group = (props) => {
11
12
  const { label, fields, name, path: pathFromProps, fieldTypes, admin: { readOnly, style, className, width, description, hideGutter = false, }, permissions, } = props;
12
13
  const isWithinCollapsible = useCollapsible();
13
14
  const isWithinGroup = useGroup();
15
+ const isWithinTab = useTabs();
14
16
  const path = pathFromProps || name;
15
17
  return (React.createElement("div", { id: `field-${path}`, className: [
16
18
  'field-type',
17
19
  baseClass,
18
20
  isWithinCollapsible && `${baseClass}--within-collapsible`,
19
21
  isWithinGroup && `${baseClass}--within-group`,
22
+ isWithinTab && `${baseClass}--within-tab`,
20
23
  (!hideGutter && isWithinGroup) && `${baseClass}--gutter`,
21
24
  className,
22
25
  ].filter(Boolean).join(' '), style: {
@@ -29,6 +29,18 @@
29
29
  border-bottom: 0;
30
30
  }
31
31
 
32
+ &--within-tab:first-child {
33
+ margin-top: 0;
34
+ border-top: 0;
35
+ padding-top: 0;
36
+ }
37
+
38
+ &--within-tab:last-child {
39
+ margin-bottom: 0;
40
+ border-bottom: 0;
41
+ padding-bottom: 0;
42
+ }
43
+
32
44
  &--gutter {
33
45
  border-left: 1px solid var(--theme-elevation-100);
34
46
  padding: 0 0 0 $baseline;
@@ -11,8 +11,8 @@ import fieldTypes from '../../../../..';
11
11
  import Form from '../../../../../../Form';
12
12
  import reduceFieldsToValues from '../../../../../../Form/reduceFieldsToValues';
13
13
  import Submit from '../../../../../../Submit';
14
- import './index.scss';
15
14
  import { useLocale } from '../../../../../../../utilities/Locale';
15
+ import './index.scss';
16
16
  const baseClass = 'edit-upload-modal';
17
17
  export const EditModal = ({ slug, closeModal, relatedCollectionConfig, fieldSchema, element }) => {
18
18
  const editor = useSlateStatic();
@@ -29,13 +29,13 @@ export const EditModal = ({ slug, closeModal, relatedCollectionConfig, fieldSche
29
29
  }, [closeModal, editor, element]);
30
30
  useEffect(() => {
31
31
  const awaitInitialState = async () => {
32
- const state = await buildStateFromSchema({ fieldSchema, data: element === null || element === void 0 ? void 0 : element.fields, user, operation: 'update', locale });
32
+ const state = await buildStateFromSchema({ fieldSchema, data: { ...(element === null || element === void 0 ? void 0 : element.fields) || {} }, user, operation: 'update', locale });
33
33
  setInitialState(state);
34
34
  };
35
35
  awaitInitialState();
36
36
  }, [fieldSchema, element.fields, user, locale]);
37
37
  return (React.createElement(Modal, { slug: slug, className: baseClass },
38
- React.createElement(MinimalTemplate, { width: "normal" },
38
+ React.createElement(MinimalTemplate, { width: "wide" },
39
39
  React.createElement("header", { className: `${baseClass}__header` },
40
40
  React.createElement("h1", null,
41
41
  "Edit",
@@ -25,21 +25,7 @@
25
25
  }
26
26
  }
27
27
 
28
- .rich-text__wrap {
29
- .field-type-gutter {
30
- display: none;
31
- }
32
- }
33
-
34
28
  .rich-text__toolbar {
35
- margin-bottom: 0;
36
- }
37
-
38
- .rich-text__editor {
39
- background-color: var(--theme-elevation-0);
40
- border: 1px solid var(--theme-elevation-150);
41
- border-top: none;
42
- min-height: base(5);
43
- padding: base(.35) base(.5);
29
+ top: base(1);
44
30
  }
45
31
  }
@@ -17,6 +17,7 @@ export declare type SelectInputProps = Omit<SelectField, 'type' | 'value' | 'opt
17
17
  width?: string;
18
18
  hasMany?: boolean;
19
19
  options?: OptionObject[];
20
+ isClearable?: boolean;
20
21
  };
21
22
  declare const SelectInput: React.FC<SelectInputProps>;
22
23
  export default SelectInput;
@@ -6,7 +6,7 @@ import ReactSelect from '../../../elements/ReactSelect';
6
6
  // import { FieldType } from '../../useField/types';
7
7
  import './index.scss';
8
8
  const SelectInput = (props) => {
9
- const { showError, errorMessage, readOnly, path, label, required, value, onChange, description, style, className, width, options, hasMany, } = props;
9
+ const { showError, errorMessage, readOnly, path, label, required, value, onChange, description, style, className, width, options, hasMany, isClearable, } = props;
10
10
  const classes = [
11
11
  'field-type',
12
12
  'select',
@@ -27,7 +27,7 @@ const SelectInput = (props) => {
27
27
  } },
28
28
  React.createElement(Error, { showError: showError, message: errorMessage }),
29
29
  React.createElement(Label, { htmlFor: path, label: label, required: required }),
30
- React.createElement(ReactSelect, { onChange: onChange, value: valueToRender, showError: showError, isDisabled: readOnly, options: options, isMulti: hasMany }),
30
+ React.createElement(ReactSelect, { onChange: onChange, value: valueToRender, showError: showError, isDisabled: readOnly, options: options, isMulti: hasMany, isClearable: isClearable }),
31
31
  React.createElement(FieldDescription, { value: value, description: description })));
32
32
  };
33
33
  export default SelectInput;
@@ -13,7 +13,7 @@ const formatOptions = (options) => options.map((option) => {
13
13
  };
14
14
  });
15
15
  const Select = (props) => {
16
- const { path: pathFromProps, name, validate = select, label, options: optionsFromProps, hasMany, required, admin: { readOnly, style, className, width, description, condition, } = {}, } = props;
16
+ const { path: pathFromProps, name, validate = select, label, options: optionsFromProps, hasMany, required, admin: { readOnly, style, className, width, description, isClearable, condition, } = {}, } = props;
17
17
  const path = pathFromProps || name;
18
18
  const [options, setOptions] = useState(formatOptions(optionsFromProps));
19
19
  useEffect(() => {
@@ -30,7 +30,10 @@ const Select = (props) => {
30
30
  const onChange = useCallback((selectedOption) => {
31
31
  if (!readOnly) {
32
32
  let newValue;
33
- if (hasMany) {
33
+ if (!selectedOption) {
34
+ newValue = null;
35
+ }
36
+ else if (hasMany) {
34
37
  if (Array.isArray(selectedOption)) {
35
38
  newValue = selectedOption.map((option) => option.value);
36
39
  }
@@ -48,6 +51,6 @@ const Select = (props) => {
48
51
  hasMany,
49
52
  setValue,
50
53
  ]);
51
- return (React.createElement(SelectInput, { path: path, onChange: onChange, value: value, name: name, options: options, label: label, showError: showError, errorMessage: errorMessage, required: required, description: description, style: style, className: className, width: width, hasMany: hasMany }));
54
+ return (React.createElement(SelectInput, { path: path, onChange: onChange, value: value, name: name, options: options, label: label, showError: showError, errorMessage: errorMessage, required: required, description: description, style: style, className: className, width: width, hasMany: hasMany, isClearable: isClearable }));
52
55
  };
53
56
  export default withCondition(Select);
@@ -5,6 +5,7 @@ import { fieldAffectsData } from '../../../../../fields/config/types';
5
5
  import FieldDescription from '../../FieldDescription';
6
6
  import toKebabCase from '../../../../../utilities/toKebabCase';
7
7
  import { useCollapsible } from '../../../elements/Collapsible/provider';
8
+ import { TabsProvider } from './provider';
8
9
  import './index.scss';
9
10
  const baseClass = 'tabs-field';
10
11
  const TabsField = (props) => {
@@ -17,20 +18,21 @@ const TabsField = (props) => {
17
18
  baseClass,
18
19
  isWithinCollapsible && `${baseClass}--within-collapsible`,
19
20
  ].filter(Boolean).join(' ') },
20
- React.createElement("div", { className: `${baseClass}__tabs` }, tabs.map((tab, i) => {
21
- return (React.createElement("button", { key: i, type: "button", className: [
22
- `${baseClass}__tab-button`,
23
- active === i && `${baseClass}__tab-button--active`,
24
- ].filter(Boolean).join(' '), onClick: () => setActive(i) }, tab.label));
25
- })),
26
- React.createElement("div", { className: `${baseClass}__content-wrap` }, activeTab && (React.createElement("div", { className: [
27
- `${baseClass}__tab`,
28
- `${baseClass}__tab-${toKebabCase(activeTab.label)}`,
29
- ].join(' ') },
30
- React.createElement(FieldDescription, { className: `${baseClass}__description`, description: activeTab.description }),
31
- React.createElement(RenderFields, { forceRender: true, readOnly: readOnly, permissions: permissions === null || permissions === void 0 ? void 0 : permissions.fields, fieldTypes: fieldTypes, fieldSchema: activeTab.fields.map((field) => ({
32
- ...field,
33
- path: `${path ? `${path}.` : ''}${fieldAffectsData(field) ? field.name : ''}`,
34
- })) }))))));
21
+ React.createElement(TabsProvider, null,
22
+ React.createElement("div", { className: `${baseClass}__tabs` }, tabs.map((tab, i) => {
23
+ return (React.createElement("button", { key: i, type: "button", className: [
24
+ `${baseClass}__tab-button`,
25
+ active === i && `${baseClass}__tab-button--active`,
26
+ ].filter(Boolean).join(' '), onClick: () => setActive(i) }, tab.label));
27
+ })),
28
+ React.createElement("div", { className: `${baseClass}__content-wrap` }, activeTab && (React.createElement("div", { className: [
29
+ `${baseClass}__tab`,
30
+ `${baseClass}__tab-${toKebabCase(activeTab.label)}`,
31
+ ].join(' ') },
32
+ React.createElement(FieldDescription, { className: `${baseClass}__description`, description: activeTab.description }),
33
+ React.createElement(RenderFields, { forceRender: true, readOnly: readOnly, permissions: permissions === null || permissions === void 0 ? void 0 : permissions.fields, fieldTypes: fieldTypes, fieldSchema: activeTab.fields.map((field) => ({
34
+ ...field,
35
+ path: `${path ? `${path}.` : ''}${fieldAffectsData(field) ? field.name : ''}`,
36
+ })) })))))));
35
37
  };
36
38
  export default withCondition(TabsField);
@@ -1,6 +1,7 @@
1
1
  @import '../../../../scss/styles.scss';
2
2
 
3
3
  .tabs-field {
4
+ margin-top: base(2);
4
5
  margin-left: calc(var(--gutter-h) * -1);
5
6
  margin-right: calc(var(--gutter-h) * -1);
6
7
  margin-bottom: base(2);
@@ -12,9 +13,7 @@
12
13
  }
13
14
 
14
15
  &--within-collapsible {
15
- margin-left: calc(#{$baseline} * -1);
16
- margin-right: calc(#{$baseline} * -1);
17
- margin-bottom: 0;
16
+ margin: 0 calc(#{$baseline} * -1);
18
17
 
19
18
  .tabs-field__tabs,
20
19
  .tabs-field__content-wrap {
@@ -31,7 +30,7 @@
31
30
  &__tab-button {
32
31
  @extend %btn-reset;
33
32
  @extend %h4;
34
- padding-bottom: base(.5);
33
+ padding-bottom: base(.75);
35
34
  margin: 0 $baseline 0 0;
36
35
  cursor: pointer;
37
36
  opacity: .5;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ declare const Context: React.Context<boolean>;
3
+ export declare const TabsProvider: React.FC<{
4
+ children?: React.ReactNode;
5
+ withinTab?: boolean;
6
+ }>;
7
+ export declare const useTabs: () => boolean;
8
+ export default Context;
@@ -0,0 +1,7 @@
1
+ import React, { createContext, useContext, } from 'react';
2
+ const Context = createContext(false);
3
+ export const TabsProvider = ({ children, withinTab = true }) => {
4
+ return (React.createElement(Context.Provider, { value: withinTab }, children));
5
+ };
6
+ export const useTabs = () => useContext(Context);
7
+ export default Context;
@@ -8,7 +8,7 @@
8
8
  &__wrap {
9
9
  display: flex;
10
10
  padding: base(1.5) base(1.5) $baseline;
11
- background: var(--theme-elevation-100);
11
+ background: var(--theme-elevation-50);
12
12
 
13
13
  .btn {
14
14
  margin: 0 $baseline base(.5) 0;
@@ -6,6 +6,7 @@ import getUniqueListBy from '../../../../../../../utilities/getUniqueListBy';
6
6
  import './index.scss';
7
7
  const baseClass = 'iterable-diff';
8
8
  const Iterable = ({ version, comparison, permissions, field, locale, locales, fieldComponents, }) => {
9
+ var _a, _b;
9
10
  const versionRowCount = Array.isArray(version) ? version.length : 0;
10
11
  const comparisonRowCount = Array.isArray(comparison) ? comparison.length : 0;
11
12
  const maxRows = Math.max(versionRowCount, comparisonRowCount);
@@ -49,8 +50,7 @@ const Iterable = ({ version, comparison, permissions, field, locale, locales, fi
49
50
  }))),
50
51
  maxRows === 0 && (React.createElement("div", { className: `${baseClass}__no-rows` },
51
52
  "No",
52
- ' ',
53
- field.labels.plural,
53
+ ' ', (_b = (_a = field.labels) === null || _a === void 0 ? void 0 : _a.plural) !== null && _b !== void 0 ? _b : 'rows',
54
54
  ' ',
55
55
  "found"))));
56
56
  };
@@ -8,6 +8,7 @@ export declare const diffStyles: {
8
8
  removedColor: string;
9
9
  wordAddedBackground: string;
10
10
  wordRemovedBackground: string;
11
+ emptyLineBackground: string;
11
12
  };
12
13
  };
13
14
  };
@@ -8,6 +8,7 @@ export const diffStyles = {
8
8
  removedColor: 'var(--theme-error-900)',
9
9
  wordAddedBackground: 'var(--theme-success-200)',
10
10
  wordRemovedBackground: 'var(--theme-error-200)',
11
+ emptyLineBackground: 'var(--theme-elevation-50)',
11
12
  },
12
13
  },
13
14
  };
@@ -155,6 +155,6 @@ const VersionView = ({ collection, global }) => {
155
155
  React.createElement(CompareVersion, { publishedDoc: publishedDoc, versionID: versionID, baseURL: compareBaseURL, parentID: parentID, value: compareValue, onChange: setCompareValue }),
156
156
  localization && (React.createElement(SelectLocales, { onChange: setLocales, options: localeOptions, value: locales }))),
157
157
  isLoading && (React.createElement(Loading, null)),
158
- (doc === null || doc === void 0 ? void 0 : doc.version) && (React.createElement(RenderFieldsToDiff, { locales: locales.map(({ value }) => value), fields: fields, fieldComponents: fieldComponents, fieldPermissions: fieldPermissions, version: doc === null || doc === void 0 ? void 0 : doc.version, comparison: comparison })))));
158
+ (doc === null || doc === void 0 ? void 0 : doc.version) && (React.createElement(RenderFieldsToDiff, { locales: locales ? locales.map(({ value }) => value) : [], fields: fields, fieldComponents: fieldComponents, fieldPermissions: fieldPermissions, version: doc === null || doc === void 0 ? void 0 : doc.version, comparison: comparison })))));
159
159
  };
160
160
  export default VersionView;
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import Cell from './Cell';
3
3
  import SortColumn from '../../../elements/SortColumn';
4
4
  import { fieldIsPresentationalOnly } from '../../../../../fields/config/types';
5
- import flattenFields from '../../../../utilities/flattenTopLevelFields';
5
+ import flattenFields from '../../../../../utilities/flattenTopLevelFields';
6
6
  const buildColumns = (collection, columns) => {
7
7
  const flattenedFields = flattenFields([
8
8
  ...collection.fields,
@@ -4,7 +4,6 @@ import { TypeWithVersion } from '../../../versions/types';
4
4
  export declare type Options = {
5
5
  collection: string;
6
6
  id: string;
7
- data: Record<string, unknown>;
8
7
  depth?: number;
9
8
  locale?: string;
10
9
  fallbackLocale?: string;