@websolutespa/payload-plugin-bowl 0.3.1 → 0.4.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @websolutespa/payload-plugin-bowl
2
2
 
3
+ ## 0.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Removed: external dependency @websolutespa/payload-plugin-localization.
8
+
9
+ ## 0.3.2
10
+
11
+ ### Patch Changes
12
+
13
+ - Fixing: avoid categories circular reference.
14
+
3
15
  ## 0.3.1
4
16
 
5
17
  ### Patch Changes
package/dist/index.css CHANGED
@@ -1,249 +1,3 @@
1
- /* src/fields/ui-languages/styles.scss */
2
- .ui-languages {
3
- position: sticky;
4
- top: 90px;
5
- z-index: 1;
6
- padding: 10px 0;
7
- display: flex;
8
- align-items: center;
9
- justify-content: space-between;
10
- background: var(--theme-elevation-0);
11
- border-bottom: 1px solid var(--theme-elevation-150);
12
- margin-bottom: 1rem;
13
- }
14
- .ui-languages__head {
15
- display: flex;
16
- gap: 0.3rem;
17
- }
18
- .ui-languages__badge {
19
- padding: 0.3em 0.6em;
20
- border-radius: 3px;
21
- background: var(--theme-elevation-100);
22
- color: var(--theme-elevation-550);
23
- }
24
- .ui-languages__locales {
25
- display: flex;
26
- flex-wrap: wrap;
27
- gap: 1px;
28
- }
29
- .ui-languages .uppercase {
30
- text-transform: uppercase;
31
- }
32
- .ui-languages .btn {
33
- display: flex;
34
- align-items: center;
35
- gap: 0.4em;
36
- margin: 0;
37
- padding: 0 0.4em;
38
- line-height: 1;
39
- border: 1px solid transparent;
40
- border-radius: 4px;
41
- }
42
- .ui-languages .btn:hover {
43
- border-color: var(--theme-elevation-150);
44
- }
45
- .ui-languages .btn:not(:hover) {
46
- color: var(--theme-elevation-400);
47
- }
48
- .ui-languages .btn.active {
49
- color: var(--theme-success-550);
50
- }
51
- .ui-languages .btn.active:before {
52
- content: "";
53
- display: block;
54
- width: 5px;
55
- height: 5px;
56
- border-radius: 3px;
57
- background: var(--theme-success-550);
58
- }
59
- .ui-languages .btn.empty:after {
60
- content: "+";
61
- display: block;
62
- }
63
- .ui-languages .btn__label {
64
- text-transform: uppercase;
65
- }
66
- .collection-edit__sidebar::-webkit-scrollbar {
67
- width: 0;
68
- height: 0;
69
- border-radius: 0;
70
- }
71
- .collection-edit__sidebar::-webkit-scrollbar-button {
72
- display: none;
73
- }
74
- .collection-edit__sidebar::-webkit-scrollbar-button:hover {
75
- display: none;
76
- }
77
- .collection-edit__sidebar::-webkit-scrollbar-thumb {
78
- background-color: rgba(0, 0, 0, 0.4);
79
- box-shadow: none;
80
- border-radius: 0;
81
- }
82
- .collection-edit__sidebar::-webkit-scrollbar-thumb:hover {
83
- background-color: rgba(0, 0, 0, 0.4);
84
- }
85
- .collection-edit__sidebar::-webkit-scrollbar-track {
86
- background-color: transparent;
87
- border-radius: 0;
88
- }
89
- .collection-edit__sidebar::-webkit-scrollbar-track:hover {
90
- background-color: transparent;
91
- }
92
- .collection-edit__sidebar {
93
- overflow-y: auto;
94
- overflow-x: hidden;
95
- }
96
-
97
- /* src/fields/localized-field/styles.scss */
98
- .btn--localize {
99
- margin: 0;
100
- padding: 0 0.4em;
101
- line-height: 1;
102
- border: 1px solid transparent;
103
- border-radius: 4px;
104
- }
105
- .btn--localize:hover {
106
- border-color: var(--theme-elevation-150);
107
- }
108
- .btn--localize .localized-field__locale {
109
- display: none;
110
- }
111
- .btn--localize .btn__label {
112
- display: inline-flex;
113
- align-items: center;
114
- gap: 0.4rem;
115
- }
116
- .btn--localize .btn__label svg {
117
- fill: currentColor;
118
- width: 14px;
119
- height: 14px;
120
- }
121
- .localized-field {
122
- padding-top: 0.4807692308rem;
123
- padding-bottom: 0.4807692308rem;
124
- color: var(--theme-elevation-400);
125
- transform: translateY(-1.9230769231rem);
126
- }
127
- .localized-field__locale {
128
- text-transform: uppercase;
129
- }
130
- .localized-field__locales {
131
- display: flex;
132
- flex-wrap: wrap;
133
- gap: 1px;
134
- margin-bottom: 1rem;
135
- }
136
- .localized-field__locales .btn {
137
- display: flex;
138
- align-items: center;
139
- gap: 0.4em;
140
- margin: 0;
141
- padding: 0 0.4em;
142
- line-height: 1;
143
- border: 1px solid transparent;
144
- border-radius: 4px;
145
- }
146
- .localized-field__locales .btn:hover {
147
- border-color: var(--theme-elevation-150);
148
- }
149
- .localized-field__locales .btn:not(:hover) {
150
- color: var(--theme-elevation-400);
151
- }
152
- .localized-field__locales .btn.active {
153
- color: var(--theme-success-550);
154
- }
155
- .localized-field__locales .btn.active:before {
156
- content: "";
157
- display: block;
158
- width: 5px;
159
- height: 5px;
160
- border-radius: 3px;
161
- background: var(--theme-success-550);
162
- }
163
- .localized-field__locales .btn.empty:after {
164
- content: "+";
165
- display: block;
166
- }
167
- .localized-field__locales .btn__label {
168
- text-transform: uppercase;
169
- }
170
- .localized-field__modal:before,
171
- .localized-field__modal:after {
172
- content: " ";
173
- position: absolute;
174
- top: 0;
175
- right: 0;
176
- bottom: 0;
177
- left: 0;
178
- pointer-events: none;
179
- }
180
- .localized-field__modal:before {
181
- background: var(--theme-bg);
182
- opacity: 0.85;
183
- }
184
- .localized-field__modal:after {
185
- backdrop-filter: blur(5px);
186
- }
187
- .localized-field__modal .template-minimal {
188
- display: flex;
189
- width: 100%;
190
- justify-content: center;
191
- align-items: center;
192
- padding: 1.9230769231rem;
193
- margin-left: auto;
194
- margin-right: auto;
195
- min-height: 100%;
196
- min-height: 100vh;
197
- z-index: 1;
198
- position: relative;
199
- }
200
- .localized-field__header {
201
- width: 100%;
202
- display: flex;
203
- justify-content: space-between;
204
- margin: 0 0 0.6rem 0;
205
- }
206
- .localized-field__header h3 {
207
- display: flex;
208
- gap: 0.5em;
209
- margin: 0;
210
- }
211
- .localized-field__header h3 svg {
212
- width: 1em;
213
- height: 1em;
214
- fill: currentColor;
215
- }
216
- .localized-field__main .rich-text__editor {
217
- overflow-x: hidden;
218
- overflow-y: auto;
219
- max-height: max(160px, 100vh - 650px);
220
- }
221
- .localized-field__reference {
222
- color: var(--theme-elevation-400);
223
- }
224
- .localized-field__preview {
225
- margin: 0 0 0.6rem 0;
226
- padding: 1em;
227
- max-height: 150px;
228
- overflow-x: hidden;
229
- overflow-y: auto;
230
- border: 2px solid var(--theme-elevation-150);
231
- border-radius: 4px;
232
- color: var(--theme-elevation-400);
233
- }
234
- .localized-field__foot {
235
- display: flex;
236
- gap: 2rem;
237
- }
238
- .localized-field__foot > .btn,
239
- .localized-field__foot > .form-submit {
240
- flex: 1 1 calc(50% - 1rem);
241
- }
242
- .localized-field__foot > .btn > .btn,
243
- .localized-field__foot > .form-submit > .btn {
244
- width: 100%;
245
- }
246
-
247
1
  /* src/fields/color-picker/styles.scss */
248
2
  .add-color.btn {
249
3
  margin: 0;
package/dist/index.d.ts CHANGED
@@ -616,7 +616,7 @@ declare const ColorCell: React__default.FC<Props>;
616
616
 
617
617
  declare const ColorField: React__default.FC<Props$1>;
618
618
 
619
- type FieldPermissions$3 = {
619
+ type FieldPermissions$1 = {
620
620
  create: {
621
621
  permission: boolean;
622
622
  };
@@ -627,7 +627,7 @@ type FieldPermissions$3 = {
627
627
  permission: boolean;
628
628
  };
629
629
  fields?: {
630
- [field: string]: FieldPermissions$3;
630
+ [field: string]: FieldPermissions$1;
631
631
  };
632
632
  };
633
633
  type DebugFieldType = FieldBase & {
@@ -636,7 +636,7 @@ type DebugFieldType = FieldBase & {
636
636
  type DebugFieldProps = DebugFieldType & {
637
637
  path?: string;
638
638
  fieldTypes: FieldTypes;
639
- permissions: FieldPermissions$3;
639
+ permissions: FieldPermissions$1;
640
640
  detectLoop?: boolean;
641
641
  };
642
642
 
@@ -644,67 +644,6 @@ declare const debugField: (options?: Partial<DebugFieldType>) => DebugFieldType;
644
644
 
645
645
  declare const DebugField: React__default.FC<DebugFieldProps>;
646
646
 
647
- type FieldPermissions$2 = {
648
- create: {
649
- permission: boolean;
650
- };
651
- read: {
652
- permission: boolean;
653
- };
654
- update: {
655
- permission: boolean;
656
- };
657
- fields?: {
658
- [field: string]: FieldPermissions$2;
659
- };
660
- };
661
- type LocalizedFieldType = FieldBase & {
662
- type: keyof FieldTypes;
663
- };
664
- type LocalizedFieldProps = LocalizedFieldType & {
665
- path?: string;
666
- fieldTypes: FieldTypes;
667
- permissions: FieldPermissions$2;
668
- };
669
-
670
- declare const localizedField: (options: FieldAffectingData) => LocalizedFieldType;
671
- type FieldsConfig = {
672
- fields: Field[];
673
- };
674
- declare const withLocalized: <T extends Partial<FieldsConfig> = {}>(config: T, first?: boolean) => T;
675
-
676
- declare const LocalizedField: React__default.FC<LocalizedFieldProps>;
677
-
678
- type FieldPermissions$1 = {
679
- create: {
680
- permission: boolean;
681
- };
682
- read: {
683
- permission: boolean;
684
- };
685
- update: {
686
- permission: boolean;
687
- };
688
- fields?: {
689
- [field: string]: FieldPermissions$1;
690
- };
691
- };
692
- type ILanguages = FieldBase & {
693
- type: keyof FieldTypes;
694
- };
695
- type LanguagesProps = ILanguages & {
696
- path?: string;
697
- fieldTypes: FieldTypes;
698
- permissions: FieldPermissions$1;
699
- };
700
- type LanguagesField = UIField & {};
701
-
702
- declare const withUILanguages: (options?: Partial<UIField>) => LanguagesField;
703
-
704
- declare const UILanguagesCell: React__default.FC<Props>;
705
-
706
- declare const UILanguagesField: React__default.FC<LanguagesProps>;
707
-
708
647
  type FieldPermissions = {
709
648
  create: {
710
649
  permission: boolean;
@@ -829,4 +768,4 @@ declare const Icon: React__default.FC;
829
768
 
830
769
  declare const Logo: React__default.FC;
831
770
 
832
- export { BlockDefaults, BowlArrayField, BowlBlock, BowlBlockField, BowlCollapsibleField, BowlCollection, BowlConfig, BowlField, BowlGlobal, BowlGroup, BowlGroupField, BowlInitOptions, BowlOptions, BowlRowField, BowlSlug, BowlTab, BowlTabsField, CategoryDefaults, CheckboxDefaults, CollectionDefault, CollectionHelper, CollectionHook, CollectionHookName, CollectionHooks, ColorCell, ColorConfig, ColorField, ComponentsDefaults, DateDefaults, DebugField, FieldsConfig, GlobalDefault, GlobalHelper, GlobalHook, GlobalHookName, GlobalHooks, ICache, IPage, IPageFull, IPagination, IUndecoratedMenu, IUndecoratedMenuBase, IUndecoratedMenuCategory, IUndecoratedMenuCustom, IUndecoratedMenuGroup, IUndecoratedMenuItem, IUndecoratedMenuLink, IUndecoratedMenuPage, Icon, InMemoryCache, InMemoryCacheOptions, LocalizedField, Logo, MAX_INT, MarketDefaults, MediaDefaults, MediasDefaults, Option, OrderDefaults, PageDefault, RelatedDefaults, RichTextDefaults, SelectDefaults, StaticCollectionConfig, StaticCollectionDefault, TemplateDefaults, TextDefaults, UILanguagesCell, UILanguagesField, UIStaticCell, UIStaticField, WithAbstract, WithAbstractProps, WithBlock, WithBlockProps, WithCategory, WithCategoryProps, WithCheckbox, WithCheckboxProps, WithCollection, WithCollectionProps, WithColor, WithColorProps, WithComponents, WithComponentsProps, WithDate, WithDateProps, WithDescription, WithDescriptionProps, WithGlobal, WithGlobalProps, WithId, WithIdProps, WithIsActive, WithIsActiveProps, WithIsDefault, WithIsDefaultProps, WithLink, WithLinkOptions, WithLinkProps, WithMarkets, WithMarketsProps, WithMedia, WithMediaProps, WithMedias, WithMediasProps, WithMenu, WithMenuProps, WithName, WithNameProps, WithOrder, WithOrderProps, WithPage, WithPageProps, WithRelated, WithRelatedProps, WithRichText, WithRichTextProps, WithSelect, WithSelectProps, WithSlug, WithSlugProps, WithStatic, WithStaticProps, WithTemplate, WithTemplateProps, WithText, WithTextProps, WithTitle, WithTitleProps, afterPageChangeHook, afterPageDeleteHook, appearanceOptions, beforeValidate, bowl, collectionIndexGet, debugField, decorateHref, decorateHrefs, decorateMenu, decorateMenuCategory, decorateMenuGroup, decorateMenuItem, decorateMenuLink, decorateMenuPage, decorateMenuRoute, decorateMenus, deepMerge, bowl as default, defaultGroup, defaultLocale, defaultLocales, defaultSlug, fetchCollection, fetchCollectionItems, fetchEndpoint, fetchGlobal, fetchGlobalItems, formatSlug, getApiUrl, getCollectionItem, getCollectionItems, getLocale, getLocales, getMarkets, getNumericParam, getObjectParam, getPagination, getRoute, getRoutes, getSearchUrl, getStaticLoader, getStore, getStringParam, getTranslation, getTranslations, hasMarket, internalSlugs, isObject, keyWithRequest, localeGet, localizeCollection, localizedField, logMissingTranslations, menuDetailGet, menuIndexGet, options, pageDetailGet, pageIndexGet, parseDepth, populateStaticFields, richTextAfterReadHook, richTextSerialize, routeGet, slugToLabel, slugToLabels, storeGet, toBlock, toCollection, toField, toGlobal, toTab, translateBlock, translateBlocks, translateCollection, translateField, translateFields, translateGlobal, translateTab, translateTabs, validateHexColor, whereCollection, withAbstract, withAbstractRequired, withBlock, withCategory, withCategoryRequired, withCheckbox, withCheckboxRequired, withCollection, withCollectionHook, withColor, withColorRequired, withComponents, withDate, withDateRequired, withDescription, withDescriptionRequired, withFieldHook, withGlobal, withGlobalHook, withId, withIdRequired, withIsActive, withIsActiveRequired, withIsDefault, withIsDefaultRequired, withLink, withLocalized, withMarkets, withMarketsRequired, withMedia, withMediaRequired, withMedias, withMediasRequired, withMenu, withName, withNameRequired, withOrder, withOrderRequired, withPage, withRelated, withRichText, withRichTextRequired, withSelect, withSelectRequired, withSlug, withSlugRequired, withStaticCollection, withTemplate, withTemplateRequired, withText, withTextRequired, withTitle, withTitleRequired, withUILanguages, withUIStatic };
771
+ export { BlockDefaults, BowlArrayField, BowlBlock, BowlBlockField, BowlCollapsibleField, BowlCollection, BowlConfig, BowlField, BowlGlobal, BowlGroup, BowlGroupField, BowlInitOptions, BowlOptions, BowlRowField, BowlSlug, BowlTab, BowlTabsField, CategoryDefaults, CheckboxDefaults, CollectionDefault, CollectionHelper, CollectionHook, CollectionHookName, CollectionHooks, ColorCell, ColorConfig, ColorField, ComponentsDefaults, DateDefaults, DebugField, GlobalDefault, GlobalHelper, GlobalHook, GlobalHookName, GlobalHooks, ICache, IPage, IPageFull, IPagination, IUndecoratedMenu, IUndecoratedMenuBase, IUndecoratedMenuCategory, IUndecoratedMenuCustom, IUndecoratedMenuGroup, IUndecoratedMenuItem, IUndecoratedMenuLink, IUndecoratedMenuPage, Icon, InMemoryCache, InMemoryCacheOptions, Logo, MAX_INT, MarketDefaults, MediaDefaults, MediasDefaults, Option, OrderDefaults, PageDefault, RelatedDefaults, RichTextDefaults, SelectDefaults, StaticCollectionConfig, StaticCollectionDefault, TemplateDefaults, TextDefaults, UIStaticCell, UIStaticField, WithAbstract, WithAbstractProps, WithBlock, WithBlockProps, WithCategory, WithCategoryProps, WithCheckbox, WithCheckboxProps, WithCollection, WithCollectionProps, WithColor, WithColorProps, WithComponents, WithComponentsProps, WithDate, WithDateProps, WithDescription, WithDescriptionProps, WithGlobal, WithGlobalProps, WithId, WithIdProps, WithIsActive, WithIsActiveProps, WithIsDefault, WithIsDefaultProps, WithLink, WithLinkOptions, WithLinkProps, WithMarkets, WithMarketsProps, WithMedia, WithMediaProps, WithMedias, WithMediasProps, WithMenu, WithMenuProps, WithName, WithNameProps, WithOrder, WithOrderProps, WithPage, WithPageProps, WithRelated, WithRelatedProps, WithRichText, WithRichTextProps, WithSelect, WithSelectProps, WithSlug, WithSlugProps, WithStatic, WithStaticProps, WithTemplate, WithTemplateProps, WithText, WithTextProps, WithTitle, WithTitleProps, afterPageChangeHook, afterPageDeleteHook, appearanceOptions, beforeValidate, bowl, collectionIndexGet, debugField, decorateHref, decorateHrefs, decorateMenu, decorateMenuCategory, decorateMenuGroup, decorateMenuItem, decorateMenuLink, decorateMenuPage, decorateMenuRoute, decorateMenus, deepMerge, bowl as default, defaultGroup, defaultLocale, defaultLocales, defaultSlug, fetchCollection, fetchCollectionItems, fetchEndpoint, fetchGlobal, fetchGlobalItems, formatSlug, getApiUrl, getCollectionItem, getCollectionItems, getLocale, getLocales, getMarkets, getNumericParam, getObjectParam, getPagination, getRoute, getRoutes, getSearchUrl, getStaticLoader, getStore, getStringParam, getTranslation, getTranslations, hasMarket, internalSlugs, isObject, keyWithRequest, localeGet, localizeCollection, logMissingTranslations, menuDetailGet, menuIndexGet, options, pageDetailGet, pageIndexGet, parseDepth, populateStaticFields, richTextAfterReadHook, richTextSerialize, routeGet, slugToLabel, slugToLabels, storeGet, toBlock, toCollection, toField, toGlobal, toTab, translateBlock, translateBlocks, translateCollection, translateField, translateFields, translateGlobal, translateTab, translateTabs, validateHexColor, whereCollection, withAbstract, withAbstractRequired, withBlock, withCategory, withCategoryRequired, withCheckbox, withCheckboxRequired, withCollection, withCollectionHook, withColor, withColorRequired, withComponents, withDate, withDateRequired, withDescription, withDescriptionRequired, withFieldHook, withGlobal, withGlobalHook, withId, withIdRequired, withIsActive, withIsActiveRequired, withIsDefault, withIsDefaultRequired, withLink, withMarkets, withMarketsRequired, withMedia, withMediaRequired, withMedias, withMediasRequired, withMenu, withName, withNameRequired, withOrder, withOrderRequired, withPage, withRelated, withRichText, withRichTextRequired, withSelect, withSelectRequired, withSlug, withSlugRequired, withStaticCollection, withTemplate, withTemplateRequired, withText, withTextRequired, withTitle, withTitleRequired, withUIStatic };