@umbraco/playwright-testhelpers 15.0.35 → 15.0.37

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.
@@ -21,4 +21,107 @@ export declare class ConstantHelper {
21
21
  general: string;
22
22
  tipTap: string;
23
23
  };
24
+ static readonly approvedColorSettings: {
25
+ 0: string[];
26
+ 1: string[];
27
+ };
28
+ static readonly checkboxListSettings: {
29
+ 0: string[];
30
+ };
31
+ static readonly contentPickerSettings: {
32
+ 0: string[];
33
+ 1: string[];
34
+ 2: string[];
35
+ };
36
+ static readonly datePickerSettings: {
37
+ 0: string[];
38
+ };
39
+ static readonly dropdownSettings: {
40
+ 0: string[];
41
+ 1: string[];
42
+ };
43
+ static readonly imageCropperSettings: {
44
+ 0: string[];
45
+ };
46
+ static readonly mediaPickerSettings: {
47
+ 0: string[];
48
+ 1: string[];
49
+ 2: string[];
50
+ 3: string[];
51
+ 4: string[];
52
+ 5: string[];
53
+ 6: string[];
54
+ };
55
+ static readonly labelSettings: {
56
+ 0: string[];
57
+ };
58
+ static readonly listViewSettings: {
59
+ 0: string[];
60
+ 1: string[];
61
+ 2: string[];
62
+ 3: string[];
63
+ 4: string[];
64
+ 5: string[];
65
+ 6: string[];
66
+ 7: string[];
67
+ };
68
+ static readonly multiURLPickerSettings: {
69
+ 0: string[];
70
+ 1: string[];
71
+ 2: string[];
72
+ 3: string[];
73
+ 4: string[];
74
+ };
75
+ static readonly numericSettings: {
76
+ 0: string[];
77
+ 1: string[];
78
+ 2: string[];
79
+ };
80
+ static readonly radioboxSettings: {
81
+ 0: string[];
82
+ };
83
+ static readonly tagsSettings: {
84
+ 0: string[];
85
+ 1: string[];
86
+ };
87
+ static readonly textareaSettings: {
88
+ 0: string[];
89
+ 1: string[];
90
+ };
91
+ static readonly textstringSettings: {
92
+ 0: string[];
93
+ };
94
+ static readonly trueFalseSettings: {
95
+ 0: string[];
96
+ 1: string[];
97
+ 2: string[];
98
+ 3: string[];
99
+ 4: string[];
100
+ };
101
+ static readonly uploadSettings: {
102
+ 0: string[];
103
+ };
104
+ static readonly tipTapSettings: {
105
+ 0: string[];
106
+ 1: string[];
107
+ 2: string[];
108
+ 3: string[];
109
+ 4: string[];
110
+ 5: string[];
111
+ 6: string[];
112
+ 7: string[];
113
+ 8: string[];
114
+ };
115
+ static readonly tinyMCESettings: {
116
+ 0: string[];
117
+ 1: string[];
118
+ 2: string[];
119
+ 3: string[];
120
+ 4: string[];
121
+ 5: string[];
122
+ 6: string[];
123
+ 7: string[];
124
+ 8: string[];
125
+ 9: string[];
126
+ };
24
127
  }
@@ -24,6 +24,110 @@ class ConstantHelper {
24
24
  general: 'input',
25
25
  tipTap: 'umb-input-tiptap'
26
26
  };
27
+ static approvedColorSettings = {
28
+ 0: ['Include labels?', 'Stores colors as a JSON object containing both the color hex string and label, rather than just the hex string.'],
29
+ 1: ['Colors', 'Add, remove or sort colors'],
30
+ };
31
+ static checkboxListSettings = {
32
+ 0: ['Add option', 'Add, remove or sort options for the list.']
33
+ };
34
+ static contentPickerSettings = {
35
+ 0: ['Ignore user start nodes', 'Selecting this option allows a user to choose nodes that they normally dont have access to.'],
36
+ 1: ['Start node', ''],
37
+ 2: ['Show open button', 'Opens the node in a dialog']
38
+ };
39
+ static datePickerSettings = {
40
+ 0: ['Date format', 'If left empty then the format is YYYY-MM-DD'],
41
+ //1: ['Offset time', "When enabled the time displayed will be offset with the server's timezone, this is useful for scenarios like scheduled publishing when an editor is in a different timezone than the hosted server"]
42
+ };
43
+ static dropdownSettings = {
44
+ 0: ['Enable multiple choice', ''],
45
+ 1: ['Add options', '']
46
+ };
47
+ static imageCropperSettings = {
48
+ 0: ['Define Crops', ''],
49
+ };
50
+ static mediaPickerSettings = {
51
+ 0: ['Accepted types', 'Limit to specific types'],
52
+ 1: ['Pick multiple items', 'Outputs a IEnumerable'],
53
+ 2: ['Amount', 'Set a required range of medias'],
54
+ 3: ['Start node', ''],
55
+ 4: ['Enable Focal Point', ''],
56
+ 5: ['Image Crops', 'Local crops, stored on document'],
57
+ 6: ['Ignore User Start Nodes', 'Selecting this option allows a user to choose nodes that they normally dont have access to.'],
58
+ };
59
+ static labelSettings = {
60
+ 0: ['Value type', 'The type of value to store'],
61
+ };
62
+ static listViewSettings = {
63
+ 0: ['Columns Displayed', 'The properties that will be displayed for each column.'],
64
+ 1: ['Layouts', 'The properties that will be displayed for each column.'],
65
+ 2: ['Order By', 'The default sort order for the Collection.'],
66
+ 3: ['Order Direction', ''],
67
+ 4: ['Page Size', 'Number of items per page.'],
68
+ 5: ['Workspace View icon', "The icon for the Collection's Workspace View."],
69
+ 6: ['Workspace View name', "The name of the Collection's Workspace View (default if empty: Child Items)."],
70
+ 7: ['Show Content Workspace View First', "Enable this to show the Content Workspace View by default instead of the Collection's."],
71
+ };
72
+ static multiURLPickerSettings = {
73
+ 0: ['Minimum number of items', ''],
74
+ 1: ['Maximum number of items', ''],
75
+ 2: ['Ignore user start nodes', 'Selecting this option allows a user to choose nodes that they normally dont have access to.'],
76
+ 3: ['Overlay Size', 'Select the width of the overlay.'],
77
+ 4: ['Hide anchor/query string input', 'Selecting this hides the anchor/query string input field in the link picker overlay.'],
78
+ };
79
+ static numericSettings = {
80
+ 0: ['Minimum', 'Enter the minimum amount of number to be entered'],
81
+ 1: ['Maximum', 'Enter the maximum amount of number to be entered'],
82
+ 2: ['Step size', 'Enter the intervals amount between each step of number to be entered']
83
+ };
84
+ static radioboxSettings = {
85
+ 0: ['Add option', 'Add, remove or sort options for the list.'],
86
+ };
87
+ static tagsSettings = {
88
+ 0: ['Tag group', ''],
89
+ 1: ['Storage Type', 'Select whether to store the tags in cache as JSON (default) or CSV format. Notice that CSV does not support commas in the tag value.']
90
+ };
91
+ static textareaSettings = {
92
+ 0: ['Maximum allowed characters', 'If empty - no character limit'],
93
+ 1: ['Number of rows', 'If empty or zero, the textarea is set to auto-height']
94
+ };
95
+ static textstringSettings = {
96
+ 0: ['Maximum allowed characters', 'If empty, 512 character limit'],
97
+ };
98
+ static trueFalseSettings = {
99
+ 0: ['Preset value', ''],
100
+ 1: ['Show on/off labels', ''],
101
+ 2: ['Label On', 'Displays text when enabled.'],
102
+ 3: ['Label Off', 'Displays text when disabled.'],
103
+ 4: ['Screen Reader Label', ''],
104
+ };
105
+ static uploadSettings = {
106
+ 0: ['Accepted file extensions', ''],
107
+ };
108
+ static tipTapSettings = {
109
+ 0: ['Capabilities', 'Choose which Tiptap extensions to enable\nOnce enabled, the related actions will be available for the toolbar.'],
110
+ 1: ['Toolbar', 'Design the available actions\nDrag and drop the available actions onto the toolbar.'],
111
+ 2: ['Stylesheets', 'Pick the stylesheets whose editor styles should be available when editing!!!'],
112
+ 3: ['Dimensions', 'Set the maximum width and height of the editor. This excludes the toolbar height.'],
113
+ 4: ['Maximum size for inserted images', 'Maximum width or height - enter 0 to disable resizing.'],
114
+ 5: ['Overlay size', 'Select the width of the overlay (link picker).'],
115
+ 6: ['Available Blocks', 'Define the available blocks.'],
116
+ 7: ['Image Upload Folder', 'Choose the upload location of pasted images.'],
117
+ 8: ['Ignore User Start Nodes', ''],
118
+ };
119
+ static tinyMCESettings = {
120
+ 0: ['Toolbar', 'Pick the toolbar options that should be available when editing'],
121
+ 1: ['Stylesheets', 'Pick the stylesheets whose editor styles should be available when editing'],
122
+ 2: ['Dimensions', 'Set the editor dimensions'],
123
+ 3: ['Maximum size for inserted images', 'Maximum width or height - enter 0 to disable resizing.'],
124
+ 4: ['Mode', 'Select the mode for the editor'],
125
+ 5: ['Available Blocks', 'Define the available blocks.'],
126
+ 6: ['Overlay size', 'Select the width of the overlay (link picker).'],
127
+ 7: ['Hide Label', ''],
128
+ 8: ['Image Upload Folder', 'Choose the upload location of pasted images.'],
129
+ 9: ['Ignore User Start Nodes', ''],
130
+ };
27
131
  }
28
132
  exports.ConstantHelper = ConstantHelper;
29
133
  //# sourceMappingURL=ConstantHelper.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ConstantHelper.js","sourceRoot":"","sources":["../../../lib/helpers/ConstantHelper.ts"],"names":[],"mappings":";;;AAAA,MAAa,cAAc;IAElB,MAAM,CAAU,QAAQ,GAAG;QAChC,OAAO,EAAE,SAAS;QAClB,KAAK,EAAE,OAAO;QACd,QAAQ,EAAE,UAAU;QACpB,QAAQ,EAAE,UAAU;QACpB,OAAO,EAAE,SAAS;QAClB,UAAU,EAAE,aAAa;QACzB,KAAK,EAAE,OAAO;KACf,CAAA;IAEM,MAAM,CAAU,mBAAmB,GAAG;QAC3C,IAAI,EAAE,WAAW;QACjB,KAAK,EAAE,0BAA0B;QACjC,QAAQ,EAAE,uBAAuB;KAClC,CAAA;IAEM,MAAM,CAAU,kBAAkB,GAAG;QAC1C,eAAe,EAAE,oHAAoH;QACrI,YAAY,EAAE,yDAAyD;KACxE,CAAA;IAEM,MAAM,CAAU,UAAU,GAAG;QAClC,OAAO,EAAE,OAAO;QAChB,MAAM,EAAE,kBAAkB;KAC3B,CAAA;;AA1BH,wCA2BC","sourcesContent":["export class ConstantHelper {\n\n public static readonly sections = {\n content: \"Content\",\n media: \"Media\",\n settings: \"Settings\",\n packages: \"Packages\",\n members: \"Members\",\n dictionary: \"Translation\",\n users: \"Users\"\n }\n\n public static readonly testUserCredentials = {\n name: 'Test User',\n email: 'verySecureEmail@123.test',\n password: 'verySecurePassword123'\n }\n\n public static readonly validationMessages = {\n emptyLinkPicker: 'Please enter an anchor or querystring, or select a published document or media item, or manually configure the URL',\n invalidValue: 'Value is invalid, it does not match the correct pattern'\n }\n\n public static readonly inputTypes = {\n general: 'input',\n tipTap: 'umb-input-tiptap'\n }\n}"]}
1
+ {"version":3,"file":"ConstantHelper.js","sourceRoot":"","sources":["../../../lib/helpers/ConstantHelper.ts"],"names":[],"mappings":";;;AAAA,MAAa,cAAc;IAElB,MAAM,CAAU,QAAQ,GAAG;QAChC,OAAO,EAAE,SAAS;QAClB,KAAK,EAAE,OAAO;QACd,QAAQ,EAAE,UAAU;QACpB,QAAQ,EAAE,UAAU;QACpB,O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Aa,EAAE,8EAA8E,CAAC;QAClG,CAAC,EAAE,CAAC,YAAY,EAAE,mFAAmF,CAAC;QACtG,CAAC,EAAE,CAAC,kCAAkC,EAAE,wDAAwD,CAAC;QACjG,CAAC,EAAE,CAAC,cAAc,EAAE,gDAAgD,CAAC;QACrE,CAAC,EAAE,CAAC,kBAAkB,EAAE,8BAA8B,CAAC;QACvD,CAAC,EAAE,CAAC,qBAAqB,EAAE,8CAA8C,CAAC;QAC1E,CAAC,EAAE,CAAC,yBAAyB,EAAE,EAAE,CAAC;KACnC,CAAA;IAEM,MAAM,CAAU,eAAe,GAAG;QACvC,CAAC,EAAE,CAAC,SAAS,EAAE,gEAAgE,CAAC;QAChF,CAAC,EAAE,CAAC,aAAa,EAAE,2EAA2E,CAAC;QAC/F,CAAC,EAAE,CAAC,YAAY,EAAE,2BAA2B,CAAC;QAC9C,CAAC,EAAE,CAAC,kCAAkC,EAAE,wDAAwD,CAAC;QACjG,CAAC,EAAE,CAAC,MAAM,EAAE,gCAAgC,CAAC;QAC7C,CAAC,EAAE,CAAC,kBAAkB,EAAE,8BAA8B,CAAC;QACvD,CAAC,EAAE,CAAC,cAAc,EAAE,gDAAgD,CAAC;QACrE,CAAC,EAAE,CAAC,YAAY,EAAE,EAAE,CAAC;QACrB,CAAC,EAAE,CAAC,qBAAqB,EAAE,8CAA8C,CAAC;QAC1E,CAAC,EAAE,CAAC,yBAAyB,EAAE,EAAE,CAAC;KACnC,CAAA;;AArJH,wCAsJC","sourcesContent":["export class ConstantHelper {\n\n public static readonly sections = {\n content: \"Content\",\n media: \"Media\",\n settings: \"Settings\",\n packages: \"Packages\",\n members: \"Members\",\n dictionary: \"Translation\",\n users: \"Users\"\n }\n\n public static readonly testUserCredentials = {\n name: 'Test User',\n email: 'verySecureEmail@123.test',\n password: 'verySecurePassword123'\n }\n\n public static readonly validationMessages = {\n emptyLinkPicker: 'Please enter an anchor or querystring, or select a published document or media item, or manually configure the URL',\n invalidValue: 'Value is invalid, it does not match the correct pattern'\n }\n\n public static readonly inputTypes = {\n general: 'input',\n tipTap: 'umb-input-tiptap'\n }\n\n public static readonly approvedColorSettings = {\n 0: ['Include labels?', 'Stores colors as a JSON object containing both the color hex string and label, rather than just the hex string.'],\n 1: ['Colors', 'Add, remove or sort colors'],\n }\n\n public static readonly checkboxListSettings = {\n 0: ['Add option', 'Add, remove or sort options for the list.']\n }\n\n public static readonly contentPickerSettings = {\n 0: ['Ignore user start nodes', 'Selecting this option allows a user to choose nodes that they normally dont have access to.'],\n 1: ['Start node', ''],\n 2: ['Show open button', 'Opens the node in a dialog']\n }\n\n public static readonly datePickerSettings = {\n 0: ['Date format', 'If left empty then the format is YYYY-MM-DD'],\n //1: ['Offset time', \"When enabled the time displayed will be offset with the server's timezone, this is useful for scenarios like scheduled publishing when an editor is in a different timezone than the hosted server\"]\n }\n\n public static readonly dropdownSettings = {\n 0: ['Enable multiple choice', ''],\n 1: ['Add options', '']\n }\n\n public static readonly imageCropperSettings = {\n 0: ['Define Crops', ''],\n }\n\n public static readonly mediaPickerSettings = {\n 0: ['Accepted types', 'Limit to specific types'],\n 1: ['Pick multiple items', 'Outputs a IEnumerable'],\n 2: ['Amount', 'Set a required range of medias'],\n 3: ['Start node', ''],\n 4: ['Enable Focal Point', ''],\n 5: ['Image Crops', 'Local crops, stored on document'],\n 6: ['Ignore User Start Nodes', 'Selecting this option allows a user to choose nodes that they normally dont have access to.'],\n }\n\n public static readonly labelSettings = {\n 0: ['Value type', 'The type of value to store'],\n }\n\n public static readonly listViewSettings = {\n 0: ['Columns Displayed', 'The properties that will be displayed for each column.'],\n 1: ['Layouts', 'The properties that will be displayed for each column.'],\n 2: ['Order By', 'The default sort order for the Collection.'],\n 3: ['Order Direction', ''],\n 4: ['Page Size', 'Number of items per page.'],\n 5: ['Workspace View icon', \"The icon for the Collection's Workspace View.\"],\n 6: ['Workspace View name', \"The name of the Collection's Workspace View (default if empty: Child Items).\"],\n 7: ['Show Content Workspace View First', \"Enable this to show the Content Workspace View by default instead of the Collection's.\"],\n }\n\n public static readonly multiURLPickerSettings = {\n 0: ['Minimum number of items', ''],\n 1: ['Maximum number of items', ''],\n 2: ['Ignore user start nodes', 'Selecting this option allows a user to choose nodes that they normally dont have access to.'],\n 3: ['Overlay Size', 'Select the width of the overlay.'],\n 4: ['Hide anchor/query string input', 'Selecting this hides the anchor/query string input field in the link picker overlay.'],\n }\n \n public static readonly numericSettings = {\n 0: ['Minimum', 'Enter the minimum amount of number to be entered'],\n 1: ['Maximum', 'Enter the maximum amount of number to be entered'],\n 2: ['Step size', 'Enter the intervals amount between each step of number to be entered']\n }\n\n public static readonly radioboxSettings = {\n 0: ['Add option', 'Add, remove or sort options for the list.'],\n }\n\n public static readonly tagsSettings = {\n 0: ['Tag group', ''],\n 1: ['Storage Type', 'Select whether to store the tags in cache as JSON (default) or CSV format. Notice that CSV does not support commas in the tag value.']\n }\n\n public static readonly textareaSettings = {\n 0: ['Maximum allowed characters', 'If empty - no character limit'],\n 1: ['Number of rows', 'If empty or zero, the textarea is set to auto-height']\n }\n\n public static readonly textstringSettings = {\n 0: ['Maximum allowed characters', 'If empty, 512 character limit'],\n }\n\n public static readonly trueFalseSettings = {\n 0: ['Preset value', ''],\n 1: ['Show on/off labels', ''],\n 2: ['Label On', 'Displays text when enabled.'],\n 3: ['Label Off', 'Displays text when disabled.'],\n 4: ['Screen Reader Label', ''],\n }\n\n public static readonly uploadSettings = {\n 0: ['Accepted file extensions', ''],\n }\n\n public static readonly tipTapSettings = {\n 0: ['Capabilities', 'Choose which Tiptap extensions to enable\\nOnce enabled, the related actions will be available for the toolbar.'],\n 1: ['Toolbar', 'Design the available actions\\nDrag and drop the available actions onto the toolbar.'],\n 2: ['Stylesheets', 'Pick the stylesheets whose editor styles should be available when editing!!!'],\n 3: ['Dimensions', 'Set the maximum width and height of the editor. This excludes the toolbar height.'],\n 4: ['Maximum size for inserted images', 'Maximum width or height - enter 0 to disable resizing.'],\n 5: ['Overlay size', 'Select the width of the overlay (link picker).'],\n 6: ['Available Blocks', 'Define the available blocks.'],\n 7: ['Image Upload Folder', 'Choose the upload location of pasted images.'],\n 8: ['Ignore User Start Nodes', ''],\n }\n\n public static readonly tinyMCESettings = {\n 0: ['Toolbar', 'Pick the toolbar options that should be available when editing'],\n 1: ['Stylesheets', 'Pick the stylesheets whose editor styles should be available when editing'],\n 2: ['Dimensions', 'Set the editor dimensions'],\n 3: ['Maximum size for inserted images', 'Maximum width or height - enter 0 to disable resizing.'],\n 4: ['Mode', 'Select the mode for the editor'],\n 5: ['Available Blocks', 'Define the available blocks.'],\n 6: ['Overlay size', 'Select the width of the overlay (link picker).'],\n 7: ['Hide Label', ''],\n 8: ['Image Upload Folder', 'Choose the upload location of pasted images.'],\n 9: ['Ignore User Start Nodes', ''],\n }\n}"]}
@@ -26,12 +26,12 @@ export declare class DataTypeApiHelper {
26
26
  private recurseDeleteChildren;
27
27
  private recurseChildren;
28
28
  save(dataType: any): Promise<string | undefined>;
29
- createDateTypeDataType(name: string): Promise<string | undefined>;
30
- createCheckboxListDataType(name: string, options: string[]): Promise<string | undefined>;
29
+ createDefaultDateTimeDataType(name: string): Promise<string | undefined>;
30
+ createCheckboxListDataType(name: string, options?: string[]): Promise<string | undefined>;
31
31
  createContentPickerDataTypeWithStartNode(name: string, startNodeId: string): Promise<string | undefined>;
32
32
  createContentPickerDataTypeWithShowOpenButton(name: string): Promise<string | undefined>;
33
33
  createContentPickerDataTypeWithIgnoreUserStartNodes(name: string, startNodeId: string): Promise<string | undefined>;
34
- createDatePickerDataType(name: string, dateFormat: string): Promise<string | undefined>;
34
+ createDateTimeDataTypeWithDateFormat(name: string, dateFormat: string): Promise<string | undefined>;
35
35
  createDropdownDataType(name: string, isMultiple: boolean, options: string[]): Promise<string | undefined>;
36
36
  createEmptyBlockListDataType(name: string): Promise<string | undefined>;
37
37
  createBlockListDataTypeWithABlock(name: string, contentElementTypeId: string): Promise<string | undefined>;
@@ -96,7 +96,7 @@ export declare class DataTypeApiHelper {
96
96
  getBlockWithContentElementTypeId(blockGridName: string, contentElementTypeKey: string): Promise<any>;
97
97
  createImageCropperDataTypeWithOneCrop(name: string, cropLabel: string, cropWidth: number, cropHeight: number): Promise<string | undefined>;
98
98
  createMediaPickerDataTypeWithStartNodeId(name: string, startNodeId: string): Promise<string | undefined>;
99
- createRadioboxDataType(name: string, options: string[]): Promise<string | undefined>;
99
+ createRadioboxDataType(name: string, options?: string[]): Promise<string | undefined>;
100
100
  createImageMediaPickerDataType(name: string, minValue?: number, maxValue?: number, enableLocalFocalPoint?: boolean, ignoreUserStartNodes?: boolean): Promise<string | undefined>;
101
101
  createImageMediaPickerDataTypeWithStartNodeId(name: string, startNodeId: string): Promise<string | undefined>;
102
102
  createImageMediaPickerDataTypeWithCrop(name: string, label: string, width: number, height: number): Promise<string | undefined>;
@@ -115,6 +115,7 @@ export declare class DataTypeApiHelper {
115
115
  createListViewContentDataTypeWithAllPermissions(name?: string): Promise<string | undefined>;
116
116
  updateListViewMediaDataType(alias: string, newValue: any): Promise<import("playwright-core").APIResponse>;
117
117
  createDefaultTiptapDataType(name: string): Promise<string | undefined>;
118
+ createTipTapDataTypeWithABlock(name: string, contentElementTypeKey: string): Promise<string | undefined>;
118
119
  createApprovedColorDataTypeWithOneItem(name: string, itemLabel: string, itemValue: string): Promise<string | undefined>;
119
120
  getTiptapExtensionsCount(tipTapName: string): Promise<any>;
120
121
  getTiptapToolbarGroupInRowCount(tipTapName: string, rowIndex?: number): Promise<any>;
@@ -142,4 +143,26 @@ export declare class DataTypeApiHelper {
142
143
  createRichTextEditorWithABlockWithBlockSettingThumbnail(richTextEditorName: string, contentElementTypeId: string, thumbnail: string): Promise<string | undefined>;
143
144
  createRichTextEditorWithABlockWithBlockSettingSettingsElementTypeKey(richTextEditorName: string, contentElementTypeId: string, settingsElementTypeId: string): Promise<string | undefined>;
144
145
  createRichTextEditorWithABlockWithBlockSettingDisplayInline(richTextEditorName: string, contentElementTypeId: string, displayInline: boolean): Promise<string | undefined>;
146
+ doesDataTypeHaveValue(dataTypeName: string, alias: string, value?: any, dataTypeData?: any): Promise<boolean>;
147
+ doesApprovedColorHaveColor(dataTypeName: string, color: string): Promise<any>;
148
+ createUploadDataType(name: string, fileExtensions?: string[]): Promise<string | undefined>;
149
+ createDefaultApprovedColorDataType(name: string): Promise<string | undefined>;
150
+ createDefaultContentPickerDataType(name: string): Promise<string | undefined>;
151
+ createDefaultDropdownDataType(name: string): Promise<string | undefined>;
152
+ createDefaultLabelDataType(name: string): Promise<string | undefined>;
153
+ createDefaultMediaPickerDataType(name: string): Promise<string | undefined>;
154
+ doesMediaPickerHaveMinAndMaxAmount(dataTypeName: string, min: number, max: number): Promise<boolean>;
155
+ doesDataTypeHaveCrops(dataTypeName: string, cropLabel: string, cropAlias: string, cropWidth: number, cropHeight: number): Promise<any>;
156
+ doesRTEHaveDimensions(dataTypeName: string, width: number, height: number): Promise<boolean>;
157
+ doesTiptapExtensionsItemsMatchCount(tiptapName: string, count: number): Promise<boolean>;
158
+ doesTiptapExtensionsHaveItems(tiptapName: string, items: string[]): Promise<boolean>;
159
+ doesTiptapToolbarHaveItems(tiptapName: string, items: any): Promise<boolean>;
160
+ doesRTEContainBlocks(dataTypeName: string, elementTypeIds: string[]): Promise<boolean>;
161
+ createDefaultImageCropperDataType(name: string): Promise<string | undefined>;
162
+ doesListViewHaveProperty(dataTypeName: string, header: string, alias: string, isSystem?: any): Promise<any>;
163
+ doesListViewHaveLayout(dataTypeName: string, name: string, icon: string, collectionView: string): Promise<any>;
164
+ createDefaultMultiUrlPickerDataType(name: string): Promise<string | undefined>;
165
+ createDefaultNumericDataType(name: string): Promise<string | undefined>;
166
+ createDefaultTagsDataType(name: string): Promise<string | undefined>;
167
+ createDefaultTrueFalseDataType(name: string): Promise<string | undefined>;
145
168
  }
@@ -177,14 +177,14 @@ class DataTypeApiHelper {
177
177
  const response = await this.api.post(this.api.baseUrl + '/umbraco/management/api/v1/data-type', dataType);
178
178
  return response.headers().location.split("v1/data-type/").pop();
179
179
  }
180
- async createDateTypeDataType(name) {
180
+ async createDefaultDateTimeDataType(name) {
181
181
  await this.ensureNameNotExists(name);
182
182
  const dataType = new json_models_builders_1.DatePickerDataTypeBuilder()
183
183
  .withName(name)
184
184
  .build();
185
185
  return await this.save(dataType);
186
186
  }
187
- async createCheckboxListDataType(name, options) {
187
+ async createCheckboxListDataType(name, options = []) {
188
188
  await this.ensureNameNotExists(name);
189
189
  const dataType = new json_models_builders_1.CheckboxListDataTypeBuilder()
190
190
  .withName(name)
@@ -217,7 +217,7 @@ class DataTypeApiHelper {
217
217
  .build();
218
218
  return await this.save(dataType);
219
219
  }
220
- async createDatePickerDataType(name, dateFormat) {
220
+ async createDateTimeDataTypeWithDateFormat(name, dateFormat) {
221
221
  await this.ensureNameNotExists(name);
222
222
  const dataType = new json_models_builders_1.DatePickerDataTypeBuilder()
223
223
  .withName(name)
@@ -773,7 +773,7 @@ class DataTypeApiHelper {
773
773
  .build();
774
774
  return await this.save(dataType);
775
775
  }
776
- async createRadioboxDataType(name, options) {
776
+ async createRadioboxDataType(name, options = []) {
777
777
  await this.ensureNameNotExists(name);
778
778
  const dataType = new json_models_builders_1.RadioboxDataTypeBuilder()
779
779
  .withName(name)
@@ -928,10 +928,12 @@ class DataTypeApiHelper {
928
928
  .addColumnDisplayedProperty()
929
929
  .withAlias('updateDate')
930
930
  .withHeader('Last edited')
931
+ .withIsSystem(true)
931
932
  .done()
932
933
  .addColumnDisplayedProperty()
933
934
  .withAlias('creator')
934
935
  .withHeader('Updated by')
936
+ .withIsSystem(true)
935
937
  .done()
936
938
  .build();
937
939
  return await this.save(dataType);
@@ -991,6 +993,25 @@ class DataTypeApiHelper {
991
993
  .build();
992
994
  return await this.save(dataType);
993
995
  }
996
+ async createTipTapDataTypeWithABlock(name, contentElementTypeKey) {
997
+ await this.ensureNameNotExists(name);
998
+ const dataType = new json_models_builders_1.TiptapDataTypeBuilder()
999
+ .withName(name)
1000
+ .addBlock()
1001
+ .withContentElementTypeKey(contentElementTypeKey)
1002
+ .done()
1003
+ .addToolbarRow()
1004
+ .addToolbarGroup()
1005
+ .withBlockPicker(true)
1006
+ .done()
1007
+ .done()
1008
+ .addExtension()
1009
+ .withBlock(true)
1010
+ .done()
1011
+ .build();
1012
+ return await this.save(dataType);
1013
+ }
1014
+ ;
994
1015
  async createApprovedColorDataTypeWithOneItem(name, itemLabel, itemValue) {
995
1016
  await this.ensureNameNotExists(name);
996
1017
  const dataType = new json_models_builders_1.ApprovedColorDataTypeBuilder()
@@ -1242,6 +1263,161 @@ class DataTypeApiHelper {
1242
1263
  async createRichTextEditorWithABlockWithBlockSettingDisplayInline(richTextEditorName, contentElementTypeId, displayInline) {
1243
1264
  return await this.createRichTextEditorWithABlockWithBlockSettings(richTextEditorName, contentElementTypeId, "", "", "", "", "", "", displayInline);
1244
1265
  }
1266
+ async doesDataTypeHaveValue(dataTypeName, alias, value, dataTypeData) {
1267
+ const dataType = dataTypeData || await this.getByName(dataTypeName);
1268
+ const valueData = dataType.values.find(item => item.alias === alias);
1269
+ if (!valueData) {
1270
+ return false;
1271
+ }
1272
+ if (Array.isArray(valueData?.value) && Array.isArray(value)) {
1273
+ return value.every(item => valueData.value.includes(item));
1274
+ }
1275
+ return valueData?.value === value;
1276
+ }
1277
+ async doesApprovedColorHaveColor(dataTypeName, color) {
1278
+ const dataTypeData = await this.getByName(dataTypeName);
1279
+ const valueData = dataTypeData.values.find(item => item.alias === 'items');
1280
+ return valueData?.value.find(item => item.value === color);
1281
+ }
1282
+ async createUploadDataType(name, fileExtensions = []) {
1283
+ await this.ensureNameNotExists(name);
1284
+ const dataType = new json_models_builders_1.UploadFieldDataTypeBuilder()
1285
+ .withName(name)
1286
+ .withFileExtensions(fileExtensions)
1287
+ .build();
1288
+ return await this.save(dataType);
1289
+ }
1290
+ async createDefaultApprovedColorDataType(name) {
1291
+ await this.ensureNameNotExists(name);
1292
+ const dataType = new json_models_builders_1.ApprovedColorDataTypeBuilder()
1293
+ .withName(name)
1294
+ .build();
1295
+ return await this.save(dataType);
1296
+ }
1297
+ async createDefaultContentPickerDataType(name) {
1298
+ await this.ensureNameNotExists(name);
1299
+ const dataType = new json_models_builders_1.ContentPickerDataTypeBuilder()
1300
+ .withName(name)
1301
+ .build();
1302
+ return await this.save(dataType);
1303
+ }
1304
+ async createDefaultDropdownDataType(name) {
1305
+ await this.ensureNameNotExists(name);
1306
+ const dataType = new json_models_builders_1.DropdownDataTypeBuilder()
1307
+ .withName(name)
1308
+ .build();
1309
+ return await this.save(dataType);
1310
+ }
1311
+ async createDefaultLabelDataType(name) {
1312
+ await this.ensureNameNotExists(name);
1313
+ const dataType = new json_models_builders_1.LabelDataTypeBuilder()
1314
+ .withName(name)
1315
+ .build();
1316
+ return await this.save(dataType);
1317
+ }
1318
+ async createDefaultMediaPickerDataType(name) {
1319
+ await this.ensureNameNotExists(name);
1320
+ const dataType = new json_models_builders_1.MediaPickerDataTypeBuilder()
1321
+ .withName(name)
1322
+ .build();
1323
+ return await this.save(dataType);
1324
+ }
1325
+ async doesMediaPickerHaveMinAndMaxAmount(dataTypeName, min, max) {
1326
+ const dataTypeData = await this.getByName(dataTypeName);
1327
+ const valueData = dataTypeData.values.find(item => item.alias === 'validationLimit');
1328
+ return valueData?.value.max === max && valueData?.value.min === min;
1329
+ }
1330
+ async doesDataTypeHaveCrops(dataTypeName, cropLabel, cropAlias, cropWidth, cropHeight) {
1331
+ const dataTypeData = await this.getByName(dataTypeName);
1332
+ const valueData = dataTypeData.values.find(item => item.alias === 'crops');
1333
+ return valueData?.value.find(item => item.label === cropLabel && item.alias === cropAlias && item.width === cropWidth && item.height === cropHeight);
1334
+ }
1335
+ async doesRTEHaveDimensions(dataTypeName, width, height) {
1336
+ const dataTypeData = await this.getByName(dataTypeName);
1337
+ const valueData = dataTypeData.values.find(item => item.alias === 'dimensions');
1338
+ return valueData?.value.width === width && valueData?.value.height === height;
1339
+ }
1340
+ async doesTiptapExtensionsItemsMatchCount(tiptapName, count) {
1341
+ const tiptapData = await this.getByName(tiptapName);
1342
+ const extensionsValue = tiptapData.values.find(value => value.alias === 'extensions');
1343
+ return extensionsValue?.value.length === count;
1344
+ }
1345
+ async doesTiptapExtensionsHaveItems(tiptapName, items) {
1346
+ const tiptapData = await this.getByName(tiptapName);
1347
+ const extensionsValue = tiptapData.values.find(value => value.alias === 'extensions');
1348
+ if (!extensionsValue || extensionsValue.value.length === 0) {
1349
+ return false;
1350
+ }
1351
+ return items.every(item => extensionsValue.value.includes(item));
1352
+ }
1353
+ async doesTiptapToolbarHaveItems(tiptapName, items) {
1354
+ const tiptapData = await this.getByName(tiptapName);
1355
+ const toolbarValue = tiptapData.values.find(value => value.alias === 'toolbar');
1356
+ if (!toolbarValue || toolbarValue.value.length === 0) {
1357
+ return false;
1358
+ }
1359
+ return JSON.stringify(toolbarValue.value) === JSON.stringify(items);
1360
+ }
1361
+ async doesRTEContainBlocks(dataTypeName, elementTypeIds) {
1362
+ const dataTypeData = await this.getByName(dataTypeName);
1363
+ const blocksValue = dataTypeData.values.find(value => value.alias === 'blocks');
1364
+ if (!blocksValue || blocksValue.value.length === 0) {
1365
+ return false;
1366
+ }
1367
+ const contentElementTypeKeys = blocksValue.value.map(block => block.contentElementTypeKey);
1368
+ return elementTypeIds.every(id => contentElementTypeKeys.includes(id));
1369
+ }
1370
+ async createDefaultImageCropperDataType(name) {
1371
+ await this.ensureNameNotExists(name);
1372
+ const dataType = new json_models_builders_1.ImageCropperDataTypeBuilder()
1373
+ .withName(name)
1374
+ .build();
1375
+ return await this.save(dataType);
1376
+ }
1377
+ async doesListViewHaveProperty(dataTypeName, header, alias, isSystem = true) {
1378
+ const dataTypeData = await this.getByName(dataTypeName);
1379
+ const valueData = dataTypeData.values.find(item => item.alias === 'includeProperties');
1380
+ if (!valueData || valueData.value.length === 0) {
1381
+ return false;
1382
+ }
1383
+ return valueData?.value.find(item => item.header === header && item.alias === alias && item.isSystem === isSystem);
1384
+ }
1385
+ async doesListViewHaveLayout(dataTypeName, name, icon, collectionView) {
1386
+ const dataTypeData = await this.getByName(dataTypeName);
1387
+ const valueData = dataTypeData.values.find(item => item.alias === 'layouts');
1388
+ if (!valueData || valueData.value.length === 0) {
1389
+ return false;
1390
+ }
1391
+ return valueData?.value.find(item => item.name === name && item.icon === icon && item.collectionView === collectionView);
1392
+ }
1393
+ async createDefaultMultiUrlPickerDataType(name) {
1394
+ await this.ensureNameNotExists(name);
1395
+ const dataType = new json_models_builders_1.MultiUrlPickerDataTypeBuilder()
1396
+ .withName(name)
1397
+ .build();
1398
+ return await this.save(dataType);
1399
+ }
1400
+ async createDefaultNumericDataType(name) {
1401
+ await this.ensureNameNotExists(name);
1402
+ const dataType = new json_models_builders_1.NumericDataTypeBuilder()
1403
+ .withName(name)
1404
+ .build();
1405
+ return await this.save(dataType);
1406
+ }
1407
+ async createDefaultTagsDataType(name) {
1408
+ await this.ensureNameNotExists(name);
1409
+ const dataType = new json_models_builders_1.TagsDataTypeBuilder()
1410
+ .withName(name)
1411
+ .build();
1412
+ return await this.save(dataType);
1413
+ }
1414
+ async createDefaultTrueFalseDataType(name) {
1415
+ await this.ensureNameNotExists(name);
1416
+ const dataType = new json_models_builders_1.TrueFalseDataTypeBuilder()
1417
+ .withName(name)
1418
+ .build();
1419
+ return await this.save(dataType);
1420
+ }
1245
1421
  }
1246
1422
  exports.DataTypeApiHelper = DataTypeApiHelper;
1247
1423
  //# sourceMappingURL=DataTypeApiHelper.js.map