0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-09-18 23:01:11 +02:00
discourse-custom-wizard/test/javascripts/fixtures/wizard.js.es6
2024-06-28 15:08:57 +02:00

492 Zeilen
13 KiB
JavaScript

Diese Datei enthält mehrdeutige Unicode-Zeichen

Diese Datei enthält Unicode-Zeichen, die mit anderen Zeichen verwechselt werden können. Wenn du glaubst, dass das absichtlich so ist, kannst du diese Warnung ignorieren. Benutze den „Escapen“-Button, um versteckte Zeichen anzuzeigen.

export default {
id: "wizard",
name: "Wizard",
start: "step_1",
background: "#333333",
submission_last_updated_at: "2022-03-15T21:11:01+01:00",
theme_id: 2,
required: false,
permitted: false,
uncategorized_category_id: 1,
categories: [],
subscribed: false,
resume_on_revisit: false,
steps: [
{
id: "step_1",
index: 0,
next: "step_2",
description: "<p>Text inputs!</p>",
title: "Text",
permitted: true,
permitted_message: null,
final: false,
fields: [
{
id: "step_1_field_1",
index: 0,
type: "text",
required: false,
value: "I am prefilled",
label: "<p>Text</p>",
description: "Text field description.",
file_types: null,
format: null,
limit: null,
property: null,
content: null,
validations: {},
max_length: null,
char_counter: null,
preview_template: null,
tabindex: 1,
wizardId: "super_mega_fun_wizard",
stepId: "step_1",
_validState: 0,
},
{
id: "step_1_field_2",
index: 0,
type: "textarea",
required: false,
value: "",
label: "<p>Textarea</p>",
file_types: null,
format: null,
limit: null,
property: null,
content: null,
validations: {},
max_length: null,
char_counter: null,
preview_template: null,
tabindex: 2,
wizardId: "super_mega_fun_wizard",
stepId: "step_1",
_validState: 0,
},
{
id: "step_1_field_3",
index: 2,
type: "composer",
required: false,
value: "",
label: "<p>Composer</p>",
file_types: null,
format: null,
limit: null,
property: null,
content: null,
validations: {},
max_length: null,
char_counter: null,
preview_template: null,
tabindex: 3,
wizardId: "super_mega_fun_wizard",
stepId: "step_1",
_validState: 0,
},
{
id: "step_1_field_4",
index: 3,
type: "text_only",
required: false,
value: null,
label: "<p>Im only text</p>",
file_types: null,
format: null,
limit: null,
property: null,
content: null,
validations: {},
max_length: null,
char_counter: null,
preview_template: null,
tabindex: 4,
wizardId: "super_mega_fun_wizard",
stepId: "step_1",
_validState: 0,
},
{
id: "step_1_field_5",
index: 4,
type: "composer_preview",
required: false,
value: "",
label: "<p>Im a preview</p>",
file_types: null,
format: null,
limit: null,
property: null,
content: null,
validations: {},
max_length: null,
char_counter: null,
preview_template: "<p>I am prefilled</p>",
tabindex: 5,
wizardId: "super_mega_fun_wizard",
stepId: "step_1",
_validState: 0,
},
{
id: "step_1_field_6",
index: 5,
type: "composer_preview",
required: false,
value: "",
file_types: null,
format: null,
limit: null,
property: null,
content: null,
validations: {},
max_length: null,
char_counter: null,
preview_template: "<p>This is the preview of the composer</p>",
tabindex: 6,
wizardId: "super_mega_fun_wizard",
stepId: "step_1",
_validState: 0,
},
],
_validState: 0,
wizardId: "super_mega_fun_wizard",
},
{
id: "step_2",
index: 1,
next: "step_3",
previous: "step_1",
description:
'<p>Because I couldnt think of another name for this step <img src="/images/emoji/twitter/slight_smile.png?v=12" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p>',
title: "Values",
permitted: true,
permitted_message: null,
final: false,
fields: [
{
id: "step_2_field_1",
index: 0,
type: "date",
required: false,
value: "",
label: "<p>Date</p>",
file_types: null,
format: "YYYY-MM-DD",
limit: null,
property: null,
content: null,
validations: {},
max_length: null,
char_counter: null,
preview_template: null,
tabindex: 1,
wizardId: "super_mega_fun_wizard",
stepId: "step_2",
_validState: 0,
},
{
id: "step_2_field_2",
index: 0,
type: "time",
required: false,
value: "",
label: "<p>Time</p>",
file_types: null,
format: "HH:mm",
limit: null,
property: null,
content: null,
validations: {},
max_length: null,
char_counter: null,
preview_template: null,
tabindex: 2,
wizardId: "super_mega_fun_wizard",
stepId: "step_2",
_validState: 0,
},
{
id: "step_2_field_3",
index: 2,
type: "date_time",
required: false,
value: "",
label: "<p>Date &amp; Time</p>",
file_types: null,
format: "",
limit: null,
property: null,
content: null,
validations: {},
max_length: null,
char_counter: null,
preview_template: null,
tabindex: 3,
wizardId: "super_mega_fun_wizard",
stepId: "step_2",
_validState: 0,
},
{
id: "step_2_field_4",
index: 3,
type: "number",
required: false,
value: "",
label: "<p>Number</p>",
file_types: null,
format: null,
limit: null,
property: null,
content: null,
validations: {},
max_length: null,
char_counter: null,
preview_template: null,
tabindex: 5,
wizardId: "super_mega_fun_wizard",
stepId: "step_2",
_validState: 0,
},
{
id: "step_2_field_5",
index: 4,
type: "checkbox",
required: false,
value: false,
label: "<p>Checkbox</p>",
file_types: null,
format: null,
limit: null,
property: null,
content: null,
validations: {},
max_length: null,
char_counter: null,
preview_template: null,
tabindex: 6,
wizardId: "super_mega_fun_wizard",
stepId: "step_2",
_validState: 0,
},
{
id: "step_2_field_6",
index: 5,
type: "url",
required: false,
value: "",
label: "<p>Url</p>",
file_types: null,
format: null,
limit: null,
property: null,
content: null,
validations: {},
max_length: null,
char_counter: null,
preview_template: null,
tabindex: 7,
wizardId: "super_mega_fun_wizard",
stepId: "step_2",
_validState: 0,
},
{
id: "step_2_field_7",
index: 6,
type: "upload",
required: false,
value: "",
label: "<p>Upload</p>",
file_types: ".jpg,.jpeg,.png",
format: null,
limit: null,
property: null,
content: null,
validations: {},
max_length: null,
char_counter: null,
preview_template: null,
tabindex: 8,
wizardId: "super_mega_fun_wizard",
stepId: "step_2",
_validState: 0,
},
],
_validState: 0,
wizardId: "super_mega_fun_wizard",
},
{
id: "step_3",
index: 2,
previous: "step_2",
description:
'<p>Unfortunately not the edible type <img src="/images/emoji/twitter/sushi.png?v=12" title=":sushi:" class="emoji" alt=":sushi:" loading="lazy" width="20" height="20"></p>',
title: "Combo-boxes",
permitted: true,
permitted_message: null,
final: true,
fields: [
{
id: "step_3_field_1",
index: 0,
type: "dropdown",
required: false,
value: "choice1",
label: "<p>Custom Dropdown</p>",
file_types: null,
format: null,
limit: null,
property: null,
content: [
{
id: "one",
name: "One",
},
{
id: "two",
name: "Two",
},
],
validations: {},
max_length: null,
char_counter: null,
preview_template: null,
tabindex: 1,
wizardId: "super_mega_fun_wizard",
stepId: "step_3",
_validState: 0,
},
{
id: "step_3_field_2",
index: 0,
type: "tag",
required: false,
value: null,
label: "<p>Tag</p>",
file_types: null,
format: null,
limit: null,
property: null,
content: null,
validations: {},
max_length: null,
char_counter: null,
preview_template: null,
tabindex: 2,
wizardId: "super_mega_fun_wizard",
stepId: "step_3",
_validState: 0,
},
{
id: "step_3_field_3",
index: 2,
type: "category",
required: false,
value: null,
label: "<p>Category</p>",
file_types: null,
format: null,
limit: 1,
property: "id",
content: null,
validations: {},
max_length: null,
char_counter: null,
preview_template: null,
tabindex: 3,
wizardId: "super_mega_fun_wizard",
stepId: "step_3",
_validState: 0,
},
{
id: "step_3_field_4",
index: 3,
type: "group",
required: false,
value: null,
label: "<p>Group</p>",
file_types: null,
format: null,
limit: null,
property: null,
content: null,
validations: {},
max_length: null,
char_counter: null,
preview_template: null,
tabindex: 4,
wizardId: "super_mega_fun_wizard",
stepId: "step_3",
_validState: 0,
},
{
id: "step_3_field_5",
index: 4,
type: "user_selector",
required: false,
value: null,
label: "<p>User Selector</p>",
file_types: null,
format: null,
limit: null,
property: null,
content: null,
validations: {},
max_length: null,
char_counter: null,
preview_template: null,
tabindex: 5,
wizardId: "super_mega_fun_wizard",
stepId: "step_3",
_validState: 0,
},
{
id: "step_3_field_6",
index: 5,
type: "user_selector",
required: false,
value: null,
label: "<p>Conditional User Selector</p>",
description: "Shown when checkbox in step_2_field_5 is true",
file_types: null,
format: null,
limit: null,
property: null,
content: null,
validations: {},
max_length: null,
char_counter: null,
preview_template: null,
tabindex: 6,
wizardId: "super_mega_fun_wizard",
stepId: "step_3",
_validState: 0,
},
{
id: "step_3_field_7",
index: 6,
type: "topic",
required: false,
value: null,
label: "<p>Topic</p>",
file_types: null,
format: null,
limit: null,
property: null,
content: null,
validations: {},
max_length: null,
char_counter: null,
preview_template: null,
tabindex: 7,
wizardId: "super_mega_fun_wizard",
stepId: "step_3",
_validState: 0,
},
],
_validState: 0,
wizardId: "super_mega_fun_wizard",
},
],
groups: [],
};