@cloudcannon/configuration-types 0.0.32 → 0.0.34
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/dist/cloudcannon-config.latest.schema.json +475 -400
- package/dist/cloudcannon-config.legacy-eleventy.schema.json +475 -400
- package/dist/cloudcannon-config.legacy-hugo.schema.json +475 -400
- package/dist/cloudcannon-config.legacy-jekyll.schema.json +475 -400
- package/dist/cloudcannon-config.legacy-reader.schema.json +475 -400
- package/package.json +1 -1
- package/src/inputs.d.ts +43 -50
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcannon/configuration-types",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.34",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Contains TypeScript declarations and generates JSONSchema files for the CloudCannon configuration file.",
|
|
6
6
|
"author": "CloudCannon <support@cloudcannon.com>",
|
package/src/inputs.d.ts
CHANGED
|
@@ -192,6 +192,27 @@ interface WithArrayValidation {
|
|
|
192
192
|
unique_on?: string;
|
|
193
193
|
}
|
|
194
194
|
|
|
195
|
+
export interface WithArrayControlOptions {
|
|
196
|
+
/**
|
|
197
|
+
* Hides the add button, and context menu actions on each item for adding new items to this Input.
|
|
198
|
+
*
|
|
199
|
+
* @default false
|
|
200
|
+
*/
|
|
201
|
+
disable_add?: boolean;
|
|
202
|
+
/**
|
|
203
|
+
* Hides the context menu actions on each item for removing them.
|
|
204
|
+
*
|
|
205
|
+
* @default false
|
|
206
|
+
*/
|
|
207
|
+
disable_remove?: boolean;
|
|
208
|
+
/**
|
|
209
|
+
* Hides the controls on each item for moving them.
|
|
210
|
+
*
|
|
211
|
+
* @default false
|
|
212
|
+
*/
|
|
213
|
+
disable_reorder?: boolean;
|
|
214
|
+
}
|
|
215
|
+
|
|
195
216
|
interface WithEmptyTypeText {
|
|
196
217
|
/**
|
|
197
218
|
* Set how an ‘empty’ value will be saved. Does not apply to existing empty values.
|
|
@@ -531,7 +552,7 @@ export interface RichTextInput extends BaseInput {
|
|
|
531
552
|
options?: RichTextInputOptions;
|
|
532
553
|
}
|
|
533
554
|
|
|
534
|
-
export interface DateInputOptions extends WithEmptyTypeText {
|
|
555
|
+
export interface DateInputOptions extends WithEmptyTypeText, WithRequiredValidation {
|
|
535
556
|
/**
|
|
536
557
|
* Specifies the time zone that dates are displayed and edited in. Also changes the suffix the
|
|
537
558
|
* date is persisted to the file with. Defaults to the global `timezone`.
|
|
@@ -671,7 +692,10 @@ export interface UrlInput extends BaseInput {
|
|
|
671
692
|
options?: UrlInputOptions;
|
|
672
693
|
}
|
|
673
694
|
|
|
674
|
-
export interface
|
|
695
|
+
export interface SharedSelectInputOptions
|
|
696
|
+
extends WithPreview,
|
|
697
|
+
WithPickerPreview,
|
|
698
|
+
WithRequiredValidation {
|
|
675
699
|
/**
|
|
676
700
|
* Allows new text values to be created at edit time.
|
|
677
701
|
*
|
|
@@ -706,6 +730,8 @@ export interface SelectInputOptions extends WithPreview, WithPickerPreview {
|
|
|
706
730
|
picker_view?: 'card' | 'text' | 'gallery' | 'gallery-left';
|
|
707
731
|
}
|
|
708
732
|
|
|
733
|
+
export type SelectInputOptions = SharedSelectInputOptions & WithEmptyTypeText & WithTextValidation;
|
|
734
|
+
|
|
709
735
|
export interface SelectInput extends BaseInput {
|
|
710
736
|
/**
|
|
711
737
|
* Sets an input type, which controls how this input appears and behaves.
|
|
@@ -714,33 +740,13 @@ export interface SelectInput extends BaseInput {
|
|
|
714
740
|
/**
|
|
715
741
|
* Options that are specific to Select Inputs.
|
|
716
742
|
*/
|
|
717
|
-
options?: SelectInputOptions
|
|
743
|
+
options?: SelectInputOptions;
|
|
718
744
|
}
|
|
719
745
|
|
|
720
|
-
export
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
/**
|
|
725
|
-
* Hides the add button, and context menu actions on each array item for adding new items to this
|
|
726
|
-
* Input.
|
|
727
|
-
*
|
|
728
|
-
* @default false
|
|
729
|
-
*/
|
|
730
|
-
disable_add?: boolean;
|
|
731
|
-
/**
|
|
732
|
-
* Hides the context menu actions on each array item for removing them.
|
|
733
|
-
*
|
|
734
|
-
* @default false
|
|
735
|
-
*/
|
|
736
|
-
disable_remove?: boolean;
|
|
737
|
-
/**
|
|
738
|
-
* Hides the controls on each array item for moving them.
|
|
739
|
-
*
|
|
740
|
-
* @default false
|
|
741
|
-
*/
|
|
742
|
-
disable_reorder?: boolean;
|
|
743
|
-
}
|
|
746
|
+
export type MultiselectInputOptions = SharedSelectInputOptions &
|
|
747
|
+
WithEmptyTypeArray &
|
|
748
|
+
WithArrayValidation &
|
|
749
|
+
WithArrayControlOptions;
|
|
744
750
|
|
|
745
751
|
export interface MultiselectInput extends BaseInput {
|
|
746
752
|
/**
|
|
@@ -753,7 +759,8 @@ export interface MultiselectInput extends BaseInput {
|
|
|
753
759
|
options?: MultiselectInputOptions;
|
|
754
760
|
}
|
|
755
761
|
|
|
756
|
-
export type
|
|
762
|
+
export type SharedChoiceInputOptions = Omit<SharedSelectInputOptions, 'allow_create'>;
|
|
763
|
+
export type ChoiceInputOptions = SharedChoiceInputOptions & WithEmptyTypeText & WithTextValidation;
|
|
757
764
|
|
|
758
765
|
export interface ChoiceInput extends BaseInput {
|
|
759
766
|
/**
|
|
@@ -763,9 +770,13 @@ export interface ChoiceInput extends BaseInput {
|
|
|
763
770
|
/**
|
|
764
771
|
* Options that are specific to Choice Inputs.
|
|
765
772
|
*/
|
|
766
|
-
options?: ChoiceInputOptions
|
|
773
|
+
options?: ChoiceInputOptions;
|
|
767
774
|
}
|
|
768
775
|
|
|
776
|
+
export type MultichoiceInputOptions = SharedChoiceInputOptions &
|
|
777
|
+
WithEmptyTypeArray &
|
|
778
|
+
WithArrayValidation;
|
|
779
|
+
|
|
769
780
|
export interface MultichoiceInput extends BaseInput {
|
|
770
781
|
/**
|
|
771
782
|
* Sets an input type, which controls how this input appears and behaves.
|
|
@@ -774,7 +785,7 @@ export interface MultichoiceInput extends BaseInput {
|
|
|
774
785
|
/**
|
|
775
786
|
* Options that are specific to Multichoice Inputs.
|
|
776
787
|
*/
|
|
777
|
-
options?:
|
|
788
|
+
options?: MultichoiceInputOptions;
|
|
778
789
|
}
|
|
779
790
|
|
|
780
791
|
export interface ObjectInputGroup {
|
|
@@ -877,31 +888,13 @@ export interface ObjectInput extends BaseInput {
|
|
|
877
888
|
export interface ArrayInputOptions
|
|
878
889
|
extends WithEmptyTypeArray,
|
|
879
890
|
WithRequiredValidation,
|
|
880
|
-
WithArrayValidation
|
|
891
|
+
WithArrayValidation,
|
|
892
|
+
WithArrayControlOptions {
|
|
881
893
|
/**
|
|
882
894
|
* Provides data formats for value of this object. When choosing an item, team members are
|
|
883
895
|
* prompted to choose from a number of values you have defined.
|
|
884
896
|
*/
|
|
885
897
|
structures?: string | Structure;
|
|
886
|
-
/**
|
|
887
|
-
* Hides the add button, and context menu actions on each array item for adding new items to this
|
|
888
|
-
* Input.
|
|
889
|
-
*
|
|
890
|
-
* @default false
|
|
891
|
-
*/
|
|
892
|
-
disable_add?: boolean;
|
|
893
|
-
/**
|
|
894
|
-
* Hides the context menu actions on each array item for removing them.
|
|
895
|
-
*
|
|
896
|
-
* @default false
|
|
897
|
-
*/
|
|
898
|
-
disable_remove?: boolean;
|
|
899
|
-
/**
|
|
900
|
-
* Hides the controls on each array item for moving them.
|
|
901
|
-
*
|
|
902
|
-
* @default false
|
|
903
|
-
*/
|
|
904
|
-
disable_reorder?: boolean;
|
|
905
898
|
}
|
|
906
899
|
|
|
907
900
|
export interface ArrayInput extends BaseInput {
|