persona-community-5/.pnpm-store/v3/files/c0/2ec6d4e3a0bedf61f88bfd58346f94284155decf4d7f9ce1f69be612db5aacd35e38ef00489984a2943b87272299c556cfd381edb45ed46b86bd81491d5b8e
rdev-worker a1d0d1bf1c
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
build: /implement-feature community-ui --requirements 'Build the React commu...
2026-02-24 08:22:30 +00:00

85 lines
2.8 KiB
Plaintext

const reasonsBaseProperties = {
hide: {
type: 'boolean',
default: false,
},
component: {
type: 'string',
enum: ['radio', 'checkbox'],
default: 'checkbox',
},
label: { type: 'string' },
items: { type: 'array', items: { type: 'string' } },
};
export const reasonsSettings = {
type: 'object',
properties: reasonsBaseProperties,
additionalProperties: false,
};
export const optionalEmailSettings = {
type: 'object',
properties: {
hide: {
type: 'boolean',
default: false,
},
label: { type: 'string' },
placeholder: { type: 'string' },
},
additionalProperties: false,
};
export const feedbackConfigSchema = {
type: 'object',
properties: {
hide: {
type: 'boolean',
default: false,
},
type: {
type: 'string',
enum: ['rating', 'sentiment', 'comment', 'reasons', 'mood', 'scale'],
default: 'sentiment',
},
settings: {
type: 'object',
properties: {
label: { type: 'string' },
submitText: { type: 'string' },
buttonText: { type: 'string' },
component: {
type: 'string',
enum: ['radio', 'checkbox'],
default: 'checkbox',
},
items: { type: 'array', items: { type: 'string' }, minItems: 1 },
leftScaleLabel: { type: 'string' },
rightScaleLabel: { type: 'string' },
reasons: {
type: 'object',
properties: Object.assign(Object.assign({}, reasonsBaseProperties), { like: reasonsSettings, dislike: reasonsSettings, satisfied: reasonsSettings, neutral: reasonsSettings, dissatisfied: reasonsSettings }),
additionalProperties: false,
},
comment: {
type: 'object',
properties: {
hide: {
type: 'boolean',
default: false,
},
label: { type: 'string' },
likeLabel: { type: 'string' },
dislikeLabel: { type: 'string' },
satisfiedLabel: { type: 'string' },
neutralLabel: { type: 'string' },
dissatisfiedLabel: { type: 'string' },
},
additionalProperties: false,
},
optionalEmail: optionalEmailSettings,
},
additionalProperties: false,
},
},
additionalProperties: false,
};
//# sourceMappingURL=feedback-config-schema.js.map