From c7e7d448c43340c045da9956e7e51934536e42a6 Mon Sep 17 00:00:00 2001 From: dmh <5150636+dmh@users.noreply.github.com> Date: Tue, 25 Jun 2024 16:27:45 +0300 Subject: [PATCH] [TASK] general refactor, use fields types from hubspot react modules --- .gitignore | 1 + .husky/pre-commit | 4 - index.js | 70 +- lib/content-tab-fields.js | 703 +++-- lib/fields.js | 289 +- lib/group.js | 84 +- lib/init.js | 80 +- lib/style-tab-fields.js | 285 +- lib/types/namespaces.js | 6 +- lib/types/types.js | 654 +++- lib/utils/common-properties.js | 91 - lib/utils/initField.js | 57 - package-lock.json | 1587 +++++++--- package.json | 21 +- partials/all.js | 30 - partials/button.js | 56 - partials/heading.js | 190 -- partials/icon.js | 128 - partials/image.js | 65 - partials/link.js | 49 - partials/richtext.js | 61 - partials/secondary-button.js | 55 - partials/secondary-link.js | 51 - partials/subheading.js | 134 - partials/text.js | 90 - test/1content-js-simple.module/fields.js | 22 - test/1content-js-simple.module/fields.json | 184 -- test/1content-js.module/fields.js | 102 - test/1content-js.module/fields.json | 231 -- test/1content-js.module/meta.json | 6 - test/1content-js.module/module.css | 1 - test/1content-js.module/module.html | 0 test/1content-js.module/module.js | 0 test/1contentgroup-js-simple.module/fields.js | 17 - .../fields.json | 54 - test/1contentgroup-js-simple.module/meta.json | 6 - .../1contentgroup-js-simple.module/module.css | 1 - .../module.html | 0 test/1contentgroup-js-simple.module/module.js | 0 test/1partials-js.module/fields.js | 36 - test/1partials-js.module/fields.json | 2640 ----------------- test/1partials-js.module/meta.json | 6 - test/1partials-js.module/module.css | 1 - test/1partials-js.module/module.html | 0 test/1partials-js.module/module.js | 0 test/1style-js-simple.module/fields.js | 26 - test/1style-js-simple.module/fields.json | 192 -- test/1style-js-simple.module/meta.json | 6 - test/1style-js-simple.module/module.css | 1 - test/1style-js-simple.module/module.html | 0 test/1style-js-simple.module/module.js | 0 test/1style-js.module/fields.js | 140 - test/1style-js.module/fields.json | 283 -- test/1style-js.module/meta.json | 6 - test/1style-js.module/module.css | 1 - test/1style-js.module/module.html | 0 test/1style-js.module/module.js | 0 test/all-fields.module/fields.js | 63 + test/all-fields.module/fields.json | 226 ++ .../meta.json | 0 .../module.css | 0 .../module.html | 0 .../module.js | 0 .../2content-simple.module/fields.json | 135 - test/hubspot/2content-simple.module/meta.json | 6 - .../hubspot/2content-simple.module/module.css | 0 .../2content-simple.module/module.html | 0 test/hubspot/2content-simple.module/module.js | 0 test/hubspot/2content.module/fields.json | 184 -- test/hubspot/2content.module/meta.json | 6 - test/hubspot/2content.module/module.css | 1 - test/hubspot/2content.module/module.html | 0 test/hubspot/2content.module/module.js | 0 test/hubspot/2style-simple.module/fields.json | 169 -- test/hubspot/2style-simple.module/meta.json | 6 - test/hubspot/2style-simple.module/module.css | 0 test/hubspot/2style-simple.module/module.html | 0 test/hubspot/2style-simple.module/module.js | 0 test/hubspot/2style.module/fields.json | 392 --- test/hubspot/2style.module/meta.json | 6 - test/hubspot/2style.module/module.css | 1 - test/hubspot/2style.module/module.html | 0 test/hubspot/2style.module/module.js | 0 83 files changed, 2712 insertions(+), 7286 deletions(-) delete mode 100644 lib/utils/common-properties.js delete mode 100644 lib/utils/initField.js delete mode 100644 partials/all.js delete mode 100644 partials/button.js delete mode 100644 partials/heading.js delete mode 100644 partials/icon.js delete mode 100644 partials/image.js delete mode 100644 partials/link.js delete mode 100644 partials/richtext.js delete mode 100644 partials/secondary-button.js delete mode 100644 partials/secondary-link.js delete mode 100644 partials/subheading.js delete mode 100644 partials/text.js delete mode 100644 test/1content-js-simple.module/fields.js delete mode 100644 test/1content-js-simple.module/fields.json delete mode 100644 test/1content-js.module/fields.js delete mode 100644 test/1content-js.module/fields.json delete mode 100644 test/1content-js.module/meta.json delete mode 100644 test/1content-js.module/module.css delete mode 100644 test/1content-js.module/module.html delete mode 100644 test/1content-js.module/module.js delete mode 100644 test/1contentgroup-js-simple.module/fields.js delete mode 100644 test/1contentgroup-js-simple.module/fields.json delete mode 100644 test/1contentgroup-js-simple.module/meta.json delete mode 100644 test/1contentgroup-js-simple.module/module.css delete mode 100644 test/1contentgroup-js-simple.module/module.html delete mode 100644 test/1contentgroup-js-simple.module/module.js delete mode 100644 test/1partials-js.module/fields.js delete mode 100644 test/1partials-js.module/fields.json delete mode 100644 test/1partials-js.module/meta.json delete mode 100644 test/1partials-js.module/module.css delete mode 100644 test/1partials-js.module/module.html delete mode 100644 test/1partials-js.module/module.js delete mode 100644 test/1style-js-simple.module/fields.js delete mode 100644 test/1style-js-simple.module/fields.json delete mode 100644 test/1style-js-simple.module/meta.json delete mode 100644 test/1style-js-simple.module/module.css delete mode 100644 test/1style-js-simple.module/module.html delete mode 100644 test/1style-js-simple.module/module.js delete mode 100644 test/1style-js.module/fields.js delete mode 100644 test/1style-js.module/fields.json delete mode 100644 test/1style-js.module/meta.json delete mode 100644 test/1style-js.module/module.css delete mode 100644 test/1style-js.module/module.html delete mode 100644 test/1style-js.module/module.js create mode 100644 test/all-fields.module/fields.js create mode 100644 test/all-fields.module/fields.json rename test/{1content-js-simple.module => all-fields.module}/meta.json (100%) rename test/{1content-js-simple.module => all-fields.module}/module.css (100%) rename test/{1content-js-simple.module => all-fields.module}/module.html (100%) rename test/{1content-js-simple.module => all-fields.module}/module.js (100%) delete mode 100644 test/hubspot/2content-simple.module/fields.json delete mode 100644 test/hubspot/2content-simple.module/meta.json delete mode 100644 test/hubspot/2content-simple.module/module.css delete mode 100644 test/hubspot/2content-simple.module/module.html delete mode 100644 test/hubspot/2content-simple.module/module.js delete mode 100644 test/hubspot/2content.module/fields.json delete mode 100644 test/hubspot/2content.module/meta.json delete mode 100644 test/hubspot/2content.module/module.css delete mode 100644 test/hubspot/2content.module/module.html delete mode 100644 test/hubspot/2content.module/module.js delete mode 100644 test/hubspot/2style-simple.module/fields.json delete mode 100644 test/hubspot/2style-simple.module/meta.json delete mode 100644 test/hubspot/2style-simple.module/module.css delete mode 100644 test/hubspot/2style-simple.module/module.html delete mode 100644 test/hubspot/2style-simple.module/module.js delete mode 100644 test/hubspot/2style.module/fields.json delete mode 100644 test/hubspot/2style.module/meta.json delete mode 100644 test/hubspot/2style.module/module.css delete mode 100644 test/hubspot/2style.module/module.html delete mode 100644 test/hubspot/2style.module/module.js diff --git a/.gitignore b/.gitignore index c1a2ce8..63ae2de 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ node_modules .env* .idea .tmp +.DS_Store diff --git a/.husky/pre-commit b/.husky/pre-commit index 4536f86..72c4429 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,5 +1 @@ -#!/bin/sh -. "$(dirname "$0")/_/husky.sh" - npm test -npm run docs diff --git a/index.js b/index.js index 4da5152..92c5f6d 100644 --- a/index.js +++ b/index.js @@ -1,31 +1,8 @@ -import { init, writeJson } from './lib/init.js' +import { init } from './lib/init.js' import { group, styleGroup } from './lib/group.js' -import { - alignment, - spacing, - gradient, - backgroundimage, - border, - textalignment -} from './lib/style-tab-fields.js' -import { - boolean, - choice, - number, - color, - icon, - image, - font -} from './lib/fields.js' -import { - text, - link, - richtext, - url, - video, - embed, - cta -} from './lib/content-tab-fields.js' +import * as styleTabFields from './lib/style-tab-fields.js' +import * as fields from './lib/fields.js' +import * as contentTabFields from './lib/content-tab-fields.js' /** * #### Module fields entry point @@ -33,41 +10,20 @@ import { * @constant */ const moduleFields = { - text, - link, - richtext, - url, - boolean, - choice, - number, - color, - icon, - image, - font, - alignment, - spacing, - gradient, - backgroundimage, - border, - textalignment, - video, - embed, - cta + ...contentTabFields, + ...styleTabFields, + ...fields } + /** * #### Theme fields entry point * @ignore * @constant - */ +*/ const themeFields = { - boolean, - choice, - number, - color, - image, - font, - spacing, - border + ...fields, + ...styleTabFields.spacing, + ...styleTabFields.border } -export { moduleFields, themeFields, group, styleGroup, init, writeJson } +export { moduleFields, themeFields, group, styleGroup, init } diff --git a/lib/content-tab-fields.js b/lib/content-tab-fields.js index 3def760..636c5a7 100644 --- a/lib/content-tab-fields.js +++ b/lib/content-tab-fields.js @@ -1,15 +1,4 @@ -import * as TYPES from './types/types.js' // eslint-disable-line -import { initField } from './utils/initField.js' - -/** - * @ignore - * @typedef {TYPES.EDITOR_OPTIONS} EDITOR_OPTIONS {@link EDITOR_OPTIONS} - * @typedef {TYPES.DISPLAY_CONDITIONS} DISPLAY_CONDITIONS {@link DISPLAY_CONDITIONS} - * @typedef {TYPES.REPEATER_OPTIONS} REPEATER_OPTIONS {@link REPEATER_OPTIONS} - * @typedef {TYPES.REPEATER_OPTIONS_DEFAULT} REPEATER_OPTIONS_DEFAULT {@link REPEATER_OPTIONS_DEFAULT} - * @typedef {TYPES.COMMON_FIELDS} COMMON_FIELDS {@link COMMON_FIELDS} - */ - +/// // ************* // Only Content Tab fields // ************* @@ -17,256 +6,590 @@ import { initField } from './utils/initField.js' /** * #### Text fields provide content creators a simple text editing experience with no rich text functionality. Text fields initially show as a single line, but can actually expand to be textareas, supporting multiple lines. * `only_content_tab` - * - * Some parameters have `default` values, `OMIT` such parameters if you don't want to override them. * @example * fi.text('label', 'name', {...options if needed}) * @memberof Fields - * @param {string} label The text the content creator sees describing the field. May contain spaces. - * @param {string} name Field/HubL variable name, which you'll reference when incorporating the field and its values in the module or theme. `Cannot contain spaces or special characters!` - * @param {Object} [fields] - * @param {string} [fields.validation_regex] Regex pattern to validate the input - * @param {boolean} [fields.allow_new_line=false] `false` Allows new line - * @param {boolean} [fields.show_emoji_picker] `false` Shows emoji picker - * @param {string} [fields.placeholder] Placeholder text - * @param {string} [fields.default] Text string --> It's generally a good idea to skip setting the `default` object, as it should be configured by the editor, not the developer - * @param {EDITOR_OPTIONS} [fields.editor_options] Editor options group. - * @param {DISPLAY_CONDITIONS} [fields.display_conditions] Display conditions group. - * @param {REPEATER_OPTIONS} [fields.repeater_options] Repeater options. Keep `occurrence` object empty to just enable a feature. `repeater_options: {occurrence: {}}` - * @param {REPEATER_OPTIONS_DEFAULT} [fields.repeater_options_default] Repeater options with predefined repeated fields and `default` values for each field. + * @param {string} label Field label + * @param {string} name Field name (HubL variable name) + * @param {BASE_FIELDS|TEXT_FIELD} [fields] * @returns {COMMON_FIELDS} */ function text (label, name, fields) { - const contentOptions = {} - contentOptions.allow_new_line = fields?.allow_new_line ?? false - contentOptions.show_emoji_picker = fields?.show_emoji_picker ?? false - contentOptions.validation_regex = fields?.validation_regex ?? '' - if (typeof fields !== 'undefined' && fields !== null && typeof fields === 'object') { - if ('placeholder' in fields) contentOptions.placeholder = fields.placeholder - if ('default' in fields) contentOptions.default = fields.default + return { + label, + name, + ...fields, + ...{ type: 'text' } + } +} + +/** + * #### Audioplayer field + * `only_content_tab` + * @example + * fi.audioplayer('label', 'name', {...options if needed}) + * @memberof Fields + * @param {string} label Field label + * @param {string} name Field name (HubL variable name) + * @param {BASE_FIELDS|AUDIO_FIELD} [fields] + * @returns {COMMON_FIELDS} + */ +function audioplayer (label, name, fields) { + return { + label, + name, + ...fields, + ...{ type: 'audioplayer' } + } +} + +/** + * #### Blog field + * `only_content_tab` + * @example + * fi.blog('label', 'name', {...options if needed}) + * @memberof Fields + * @param {string} label Field label + * @param {string} name Field name (HubL variable name) + * @param {BASE_FIELDS|BLOG_FIELD} [fields] + * @returns {COMMON_FIELDS} + */ +function blog (label, name, fields) { + return { + label, + name, + ...fields, + ...{ type: 'blog' } + } +} + +/** + * #### crmobject field + * `only_content_tab` + * @example + * fi.crmobject('label', 'name', {...options if needed}) + * @memberof Fields + * @param {string} label Field label + * @param {string} name Field name (HubL variable name) + * @param {BASE_FIELDS|CRM_OBJECT_FIELD} [fields] + * @returns {COMMON_FIELDS} + */ +function crmobject (label, name, fields) { + return { + label, + name, + ...fields, + ...{ type: 'crmobject' } + } +} + +/** + * #### crmobjectproperty field + * `only_content_tab` + * @example + * fi.crmobjectproperty('label', 'name', {...options if needed}) + * @memberof Fields + * @param {string} label Field label + * @param {string} name Field name (HubL variable name) + * @param {BASE_FIELDS|CRM_OBJECT_PROPERTY_FIELD} [fields] + * @returns {COMMON_FIELDS} + */ +function crmobjectproperty (label, name, fields) { + return { + label, + name, + ...fields, + ...{ type: 'crmobjectproperty' } + } +} + +/** + * #### cta field + * `only_content_tab` + * @example + * fi.cta('label', 'name', {...options if needed}) + * @memberof Fields + * @param {string} label Field label + * @param {string} name Field name (HubL variable name) + * @param {BASE_FIELDS|CTA_FIELD} [fields] + * @returns {COMMON_FIELDS} + */ +function cta (label, name, fields) { + return { + label, + name, + ...fields, + ...{ type: 'cta' } + } +} + +/** + * #### date field + * `only_content_tab` + * @example + * fi.date('label', 'name', {...options if needed}) + * @memberof Fields + * @param {string} label Field label + * @param {string} name Field name (HubL variable name) + * @param {BASE_FIELDS|DATE_FIELD} [fields] + * @returns {COMMON_FIELDS} + */ +function date (label, name, fields) { + return { + label, + name, + ...fields, + ...{ type: 'date' } + } +} + +/** + * #### datetime field + * `only_content_tab` + * @example + * fi.datetime('label', 'name', {...options if needed}) + * @memberof Fields + * @param {string} label Field label + * @param {string} name Field name (HubL variable name) + * @param {BASE_FIELDS|DATA_AND_TIME_FIELD} [fields] + * @returns {COMMON_FIELDS} + */ +function datetime (label, name, fields) { + return { + label, + name, + ...fields, + ...{ type: 'datetime' } + } +} + +/** + * #### email field + * `only_content_tab` + * @example + * fi.email('label', 'name', {...options if needed}) + * @memberof Fields + * @param {string} label Field label + * @param {string} name Field name (HubL variable name) + * @param {BASE_FIELDS|EMAIL_ADDRESS_FIELD} [fields] + * @returns {COMMON_FIELDS} + */ +function email (label, name, fields) { + return { + label, + name, + ...fields, + ...{ type: 'email' } + } +} + +/** + * #### embed field + * `only_content_tab` + * @example + * fi.embed('label', 'name', {...options if needed}) + * @memberof Fields + * @param {string} label Field label + * @param {string} name Field name (HubL variable name) + * @param {BASE_FIELDS|EMBEDED_FIELD} [fields] + * @returns {COMMON_FIELDS} + */ +function embed (label, name, fields) { + return { + label, + name, + ...fields, + ...{ type: 'embed' } + } +} + +/** + * #### file field + * `only_content_tab` + * @example + * fi.file('label', 'name', {...options if needed}) + * @memberof Fields + * @param {string} label Field label + * @param {string} name Field name (HubL variable name) + * @param {BASE_FIELDS|FILE_FIELD} [fields] + * @returns {COMMON_FIELDS} + */ +function file (label, name, fields) { + return { + label, + name, + ...fields, + ...{ type: 'file' } + } +} + +/** + * #### form field + * `only_content_tab` + * @example + * fi.form('label', 'name', {...options if needed}) + * @memberof Fields + * @param {string} label Field label + * @param {string} name Field name (HubL variable name) + * @param {BASE_FIELDS|FORM_FIELD} [fields] + * @returns {COMMON_FIELDS} + */ +function form (label, name, fields) { + return { + label, + name, + ...fields, + ...{ type: 'form' } } +} - const otherOptions = initField(label, name, 'text', fields) - return { ...contentOptions, ...otherOptions } +/** + * #### html field + * `only_content_tab` + * @example + * fi.html('label', 'name', {...options if needed}) + * @memberof Fields + * @param {string} label Field label + * @param {string} name Field name (HubL variable name) + * @param {BASE_FIELDS|HTML_FIELD} [fields] + * @returns {COMMON_FIELDS} + */ +function html (label, name, fields) { + return { + label, + name, + ...fields, + ...{ type: 'html' } + } } /** - * @typedef {Object} LINK_DEFAULT - * @property {Object} [url] Default URL object - * @property {?string} [url.content_id] Default URL content ID - * @property {'EXTERNAL'|'CONTENT'|'FILE'|'EMAIL_ADDRESS'|'BLOG'|'CALL_TO_ACTION'|'PHONE_NUMBER'|'WHATSAPP_NUMBER'} [url.type] Default URL type - * @property {string} [url.href] Default URL href - * @property {boolean} [open_in_new_tab] Default open_in_new_tab value - * @property {boolean} [no_follow] Default no_follow value - * @property {boolean} [sponsored] Default sponsored value - * @property {boolean} [user_generated_content] Default user_generated_content value + * #### hubdbrow field + * `only_content_tab` + * @example + * fi.hubdbrow('label', 'name', {...options if needed}) + * @memberof Fields + * @param {string} label Field label + * @param {string} name Field name (HubL variable name) + * @param {BASE_FIELDS|HUBDB_ROW_FIELD} [fields] + * @returns {COMMON_FIELDS} */ +function hubdbrow (label, name, fields) { + return { + label, + name, + ...fields, + ...{ type: 'hubdbrow' } + } +} /** - * @typedef {'EXTERNAL'|'CONTENT'|'FILE'|'EMAIL_ADDRESS'|'BLOG'|'CALL_TO_ACTION'|'PHONE_NUMBER'|'WHATSAPP_NUMBER'} LINK_SUPPORTED_TYPES + * #### hubdbtable field + * `only_content_tab` + * @example + * fi.hubdbtable('label', 'name', {...options if needed}) + * @memberof Fields + * @param {string} label Field label + * @param {string} name Field name (HubL variable name) + * @param {BASE_FIELDS|HUBDB_TABLE_FIELD} [fields] + * @returns {COMMON_FIELDS} */ +function hubdbtable (label, name, fields) { + return { + label, + name, + ...fields, + ...{ type: 'hubdbtable' } + } +} /** - * #### Link fields provide an easy interface for content creators to provide links to URLs and email addresses. + * #### hubl field + * `only_content_tab` + * @example + * fi.hubl('label', 'name', {...options if needed}) + * @memberof Fields + * @param {string} label Field label + * @param {string} name Field name (HubL variable name) + * @param {BASE_FIELDS|HUBL_FIELD} [fields] + * @returns {COMMON_FIELDS} + */ +function hubl (label, name, fields) { + return { + label, + name, + ...fields, + ...{ type: 'hubl' } + } +} + +/** + * #### menu field + * `only_content_tab` + * @example + * fi.menu('label', 'name', {...options if needed}) + * @memberof Fields + * @param {string} label Field label + * @param {string} name Field name (HubL variable name) + * @param {BASE_FIELDS|MENU_FIELD} [fields] + * @returns {COMMON_FIELDS} + */ +function menu (label, name, fields) { + return { + label, + name, + ...fields, + ...{ type: 'menu' } + } +} + +/** + * #### meeting field + * `only_content_tab` + * @example + * fi.meeting('label', 'name', {...options if needed}) + * @memberof Fields + * @param {string} label Field label + * @param {string} name Field name (HubL variable name) + * @param {BASE_FIELDS|MEETING_FIELD} [fields] + * @returns {COMMON_FIELDS} + */ +function meeting (label, name, fields) { + return { + label, + name, + ...fields, + ...{ type: 'meeting' } + } +} + +/** + * #### logo field + * `only_content_tab` + * @example + * fi.logo('label', 'name', {...options if needed}) + * @memberof Fields + * @param {string} label Field label + * @param {string} name Field name (HubL variable name) + * @param {BASE_FIELDS|LOGO_FIELD} [fields] + * @returns {COMMON_FIELDS} + */ +function logo (label, name, fields) { + return { + label, + name, + ...fields, + ...{ type: 'logo' } + } +} + +/** + * #### link field * `only_content_tab` - * - * Some parameters have `default` values, `OMIT` such parameters if you don't want to override them. * @example * fi.link('label', 'name', {...options if needed}) * @memberof Fields - * @param {string} label The text the content creator sees describing the field. May contain spaces. - * @param {string} name Field/HubL variable name, which you'll reference when incorporating the field and its values in the module or theme. `Cannot contain spaces or special characters!` - * @param {Object} [fields] - * @param {Array} [fields.supported_types=all] `all` list of the types of links this field allows content creators to select - * @param {boolean} [fields.show_advanced_rel_options=false] `false` Whether content creators can see advanced rel options - * @param {LINK_DEFAULT} [fields.default] Default object --> It's generally a good idea to skip setting the `default` object, as it should be configured by the editor, not the developer - * @param {EDITOR_OPTIONS} [fields.editor_options] Editor options group. - * @param {DISPLAY_CONDITIONS} [fields.display_conditions] Display conditions group. - * @param {REPEATER_OPTIONS} [fields.repeater_options] Repeater options. Keep `occurrence` object empty to just enable a feature. `repeater_options: {occurrence: {}}` - * @param {REPEATER_OPTIONS_DEFAULT} [fields.repeater_options_default] Repeater options with predefined repeated fields and `default` values for each field. + * @param {string} label Field label + * @param {string} name Field name (HubL variable name) + * @param {BASE_FIELDS|LINK_FIELD} [fields] * @returns {COMMON_FIELDS} */ function link (label, name, fields) { - const contentOptions = {} - contentOptions.show_advanced_rel_options = fields?.show_advanced_rel_options ?? false - contentOptions.supported_types = fields?.supported_types ?? ['EXTERNAL', 'CONTENT', 'FILE', 'EMAIL_ADDRESS', 'BLOG', 'CALL_TO_ACTION', 'PHONE_NUMBER', 'WHATSAPP_NUMBER'] - /** - * @type {LINK_DEFAULT} - */ - const defaultObj = { - url: { - content_id: null, - type: 'EXTERNAL', - href: '' - }, - open_in_new_tab: false, - no_follow: false + return { + label, + name, + ...fields, + ...{ type: 'link' } } - contentOptions.default = { ...defaultObj, ...fields?.default } - contentOptions.default.url = { ...defaultObj.url, ...fields?.default?.url } - - const otherOptions = initField(label, name, 'link', fields) - return { ...contentOptions, ...otherOptions } } /** - * #### Rich Text fields provide content creators with a WYSIWYG text editor experience. + * #### richtext field * `only_content_tab` - * - * Some parameters have `default` values, `OMIT` such parameters if you don't want to override them. * @example * fi.richtext('label', 'name', {...options if needed}) * @memberof Fields - * @param {string} label The text the content creator sees describing the field. May contain spaces. - * @param {string} name Field/HubL variable name, which you'll reference when incorporating the field and its values in the module or theme. `Cannot contain spaces or special characters!` - * @param {Object} [fields] - * @param {Array} [fields.enabled_features] An array of items that allows you to configure the Rich Text Editor Toolbar and what options are available for content editors. - * @param {string} [fields.default] String of content to be displayed supports HTML --> It's generally a good idea to skip setting the `default` object, as it should be configured by the editor, not the developer - * @param {EDITOR_OPTIONS} [fields.editor_options] Editor options group. - * @param {DISPLAY_CONDITIONS} [fields.display_conditions] Display conditions group. - * @param {REPEATER_OPTIONS} [fields.repeater_options] Repeater options. Keep `occurrence` object empty to just enable a feature. `repeater_options: {occurrence: {}}` - * @param {REPEATER_OPTIONS_DEFAULT} [fields.repeater_options_default] Repeater options with predefined repeated fields and `default` values for each field. + * @param {string} label Field label + * @param {string} name Field name (HubL variable name) + * @param {BASE_FIELDS|RICHTEXT_FIELD} [fields] * @returns {COMMON_FIELDS} */ function richtext (label, name, fields) { - const contentOptions = {} - if (typeof fields !== 'undefined' && fields !== null && typeof fields === 'object') { - if ('enabled_features' in fields) contentOptions.enabled_features = fields.enabled_features - if ('default' in fields) contentOptions.default = fields.default + return { + label, + name, + ...fields, + ...{ type: 'richtext' } } - - const otherOptions = initField(label, name, 'richtext', fields) - return { ...contentOptions, ...otherOptions } } /** - * #### URL fields provide a similar experience to link fields. Providing a UI for content creators to add links. URL fields, however, do not show a UI for open in a new window, nor tell search engines not to follow. Use this field when you as a developer want to dictate the values for that. + * #### simplemenu field * `only_content_tab` - * - * Some parameters have `default` values, `OMIT` such parameters if you don't want to override them. * @example - * fi.url('label', 'name', {...options if needed}) + * fi.simplemenu('label', 'name', {...options if needed}) * @memberof Fields - * @param {string} label The text the content creator sees describing the field. May contain spaces. - * @param {string} name Field/HubL variable name, which you'll reference when incorporating the field and its values in the module or theme. `Cannot contain spaces or special characters!` - * @param {Object} [fields] - * @param {Array} [fields.supported_types=all] `all` list of the types of links this field allows content creators to select. - * @param {Object} [fields.default] Default object --> It's generally a good idea to skip setting the `default` object, as it should be configured by the editor, not the developer - * @param {string} [fields.default.content_id] Default content id - * @param {'EXTERNAL'|'CONTENT'|'FILE'|'EMAIL_ADDRESS'|'BLOG'|'CALL_TO_ACTION'|'PHONE_NUMBER'|'WHATSAPP_NUMBER'} fields.default.type Default URL type - * @param {string} [fields.default.href] Default href - * @param {EDITOR_OPTIONS} [fields.editor_options] Editor options group. - * @param {DISPLAY_CONDITIONS} [fields.display_conditions] Display conditions group. - * @param {REPEATER_OPTIONS} [fields.repeater_options] Repeater options. Keep `occurrence` object empty to just enable a feature. `repeater_options: {occurrence: {}}` - * @param {REPEATER_OPTIONS_DEFAULT} [fields.repeater_options_default] Repeater options with predefined repeated fields and `default` values for each field. + * @param {string} label Field label + * @param {string} name Field name (HubL variable name) + * @param {BASE_FIELDS|SIMPLE_MENU_FIELD} [fields] * @returns {COMMON_FIELDS} */ -function url (label, name, fields) { - const contentOptions = {} - contentOptions.supported_types = fields?.supported_types ?? ['EXTERNAL', 'CONTENT', 'FILE', 'EMAIL_ADDRESS', 'BLOG', 'CALL_TO_ACTION', 'PHONE_NUMBER', 'WHATSAPP_NUMBER'] - const defaultObj = { - content_id: null, - href: '', - type: 'EXTERNAL' +function simplemenu (label, name, fields) { + return { + label, + name, + ...fields, + ...{ type: 'simplemenu' } } - contentOptions.default = { ...defaultObj, ...fields?.default } +} - const otherOptions = initField(label, name, 'url', fields) - return { ...contentOptions, ...otherOptions } +/** + * #### podcast field + * `only_content_tab` + * @example + * fi.podcast('label', 'name', {...options if needed}) + * @memberof Fields + * @param {string} label Field label + * @param {string} name Field name (HubL variable name) + * @param {BASE_FIELDS|PODCAST_FIELD} [fields] + * @returns {COMMON_FIELDS} + */ +function podcast (label, name, fields) { + return { + label, + name, + ...fields, + ...{ type: 'podcast' } + } } /** - * #### Video fields provide content editors with a place to add HubSpot Video to their module content without the need of using rich text fields. + * #### payment field * `only_content_tab` - * - * Some parameters have `default` values, `OMIT` such parameters if you don't want to override them. * @example - * fi.video('label', 'name', {...options if needed}) + * fi.payment('label', 'name', {...options if needed}) * @memberof Fields - * @param {string} label The text the content creator sees describing the field. May contain spaces. - * @param {string} name Field/HubL variable name, which you'll reference when incorporating the field and its values in the module or theme. `Cannot contain spaces or special characters!` - * @param {Object} [fields] - * @param {boolean} [fields.resizable=true] `true` Whether the video is resizable - * @param {boolean} [fields.show_preview=true] `true` Whether the video is previewable - * @param {boolean} [fields.show_advanced_options=true] `true` Whether the video is advanced options - * @param {Object} [fields.default] Default object --> It's generally a good idea to skip setting the `default` object, as it should be configured by the editor, not the developer - * @param {EDITOR_OPTIONS} [fields.editor_options] Editor options group. - * @param {DISPLAY_CONDITIONS} [fields.display_conditions] Display conditions group. - * @param {REPEATER_OPTIONS} [fields.repeater_options] Repeater options. Keep `occurrence` object empty to just enable a feature. `repeater_options: {occurrence: {}}` - * @param {REPEATER_OPTIONS_DEFAULT} [fields.repeater_options_default] Repeater options with predefined repeated fields and `default` values for each field. + * @param {string} label Field label + * @param {string} name Field name (HubL variable name) + * @param {BASE_FIELDS|PAYMENT_FIELD} [fields] * @returns {COMMON_FIELDS} */ -function video (label, name, fields) { - const contentOptions = {} - contentOptions.resizable = fields?.resizable ?? true - contentOptions.show_preview = fields?.show_preview ?? true - contentOptions.show_advanced_options = fields?.show_advanced_options ?? true - contentOptions.default = fields?.default ?? {} +function payment (label, name, fields) { + return { + label, + name, + ...fields, + ...{ type: 'payment' } + } +} - const otherOptions = initField(label, name, 'videoplayer', fields) - return { ...contentOptions, ...otherOptions } +/** + * #### page field + * `only_content_tab` + * @example + * fi.page('label', 'name', {...options if needed}) + * @memberof Fields + * @param {string} label Field label + * @param {string} name Field name (HubL variable name) + * @param {BASE_FIELDS|PAGE_FIELD} [fields] + * @returns {COMMON_FIELDS} + */ +function page (label, name, fields) { + return { + label, + name, + ...fields, + ...{ type: 'page' } + } } /** - * #### Embed fields allow the user to add a URL from an oEmbed-enabled site or paste in an embed code from another site. + * #### tag field * `only_content_tab` - * - * Some parameters have `default` values, `OMIT` such parameters if you don't want to override them. * @example - * fi.embed('label', 'name', {...options if needed}) + * fi.tag('label', 'name', {...options if needed}) * @memberof Fields - * @param {string} label The text the content creator sees describing the field. May contain spaces. - * @param {string} name Field/HubL variable name, which you'll reference when incorporating the field and its values in the module or theme. `Cannot contain spaces or special characters!` - * @param {Object} [fields] - * @param {Array<'oembed'|'html'>} [fields.supported_source_types=all] `all` Array of source types that are supported by the field. - * @param {Array<'photo'|'video'|'link'|'rich'>} [fields.supported_oembed_types=all] `all` Array of oEmbed types that are supported by the field. - * @param {boolean} [fields.resizable=true] `true` Whether the embed is resizable - * @param {boolean} [fields.show_preview=true] `true` Whether the embed is previewable - * @param {Array} [fields.supported_media_bridge_providers] Array of provider IDs that determine which Media Bridge providers are available to select content from. - * @param {Object} [fields.default] Default object --> It's generally a good idea to skip setting the `default` object, as it should be configured by the editor, not the developer - * @param {EDITOR_OPTIONS} [fields.editor_options] Editor options group. - * @param {DISPLAY_CONDITIONS} [fields.display_conditions] Display conditions group. - * @param {REPEATER_OPTIONS} [fields.repeater_options] Repeater options. Keep `occurrence` object empty to just enable a feature. `repeater_options: {occurrence: {}}` - * @param {REPEATER_OPTIONS_DEFAULT} [fields.repeater_options_default] Repeater options with predefined repeated fields and `default` values for each field. + * @param {string} label Field label + * @param {string} name Field name (HubL variable name) + * @param {BASE_FIELDS|TAG_FIELD} [fields] * @returns {COMMON_FIELDS} */ -function embed (label, name, fields) { - const contentOptions = {} - contentOptions.supported_source_types = fields?.supported_source_types ?? ['oembed', 'html'] - contentOptions.supported_oembed_types = fields?.supported_oembed_types ?? ['photo', 'video', 'link', 'rich'] - contentOptions.resizable = fields?.resizable ?? true - contentOptions.show_preview = fields?.show_preview ?? true - contentOptions.supported_media_bridge_providers = fields?.supported_media_bridge_providers ?? [] - const defaultObj = { - source_type: 'oembed' +function tag (label, name, fields) { + return { + label, + name, + ...fields, + ...{ type: 'tag' } } - contentOptions.default = { ...defaultObj, ...fields?.default } +} - const otherOptions = initField(label, name, 'embed', fields) - return { ...contentOptions, ...otherOptions } +/** + * #### videoplayer field + * `only_content_tab` + * @example + * fi.videoplayer('label', 'name', {...options if needed}) + * @memberof Fields + * @param {string} label Field label + * @param {string} name Field name (HubL variable name) + * @param {BASE_FIELDS|VIDEO_FIELD} [fields] + * @returns {COMMON_FIELDS} + */ +function video (label, name, fields) { + return { + label, + name, + ...fields, + ...{ type: 'videoplayer' } + } } /** - * #### CTA fields allow the user to select a call-to-action from the HubSpot CTA tool. + * #### url field * `only_content_tab` - * - * Some parameters have `default` values, `OMIT` such parameters if you don't want to override them. * @example - * fi.cta('label', 'name', {...options if needed}) + * fi.url('label', 'name', {...options if needed}) * @memberof Fields - * @param {string} label The text the content creator sees describing the field. May contain spaces. - * @param {string} name Field/HubL variable name, which you'll reference when incorporating the field and its values in the module or theme. `Cannot contain spaces or special characters!` - * @param {Object} [fields] - * @param {EDITOR_OPTIONS} [fields.editor_options] Editor options group. - * @param {DISPLAY_CONDITIONS} [fields.display_conditions] Display conditions group. - * @param {REPEATER_OPTIONS} [fields.repeater_options] Repeater options. Keep `occurrence` object empty to just enable a feature. `repeater_options: {occurrence: {}}` - * @param {REPEATER_OPTIONS_DEFAULT} [fields.repeater_options_default] Repeater options with predefined repeated fields and `default` values for each field. + * @param {string} label Field label + * @param {string} name Field name (HubL variable name) + * @param {BASE_FIELDS|URL_FIELD} [fields] * @returns {COMMON_FIELDS} */ -function cta (label, name, fields) { - const contentOptions = {} - const otherOptions = initField(label, name, 'cta', fields) - return { ...contentOptions, ...otherOptions } +function url (label, name, fields) { + return { + label, + name, + ...fields, + ...{ type: 'url' } + } } -export { text, link, richtext, url, video, embed, cta } +export { + text, + link, + richtext, + url, + video, + cta, + audioplayer, + blog, + crmobject, + crmobjectproperty, + date, + datetime, + email, + embed, + file, + form, + html, + hubdbrow, + hubdbtable, + hubl, + menu, + meeting, + logo, + simplemenu, + podcast, + payment, + page, + tag +} diff --git a/lib/fields.js b/lib/fields.js index d9e6550..2f0abdb 100644 --- a/lib/fields.js +++ b/lib/fields.js @@ -1,265 +1,140 @@ -import * as TYPES from './types/types.js' // eslint-disable-line -import { initField } from './utils/initField.js' - -/** - * @ignore - * @typedef {TYPES.EDITOR_OPTIONS} EDITOR_OPTIONS {@link EDITOR_OPTIONS} - * @typedef {TYPES.DISPLAY_CONDITIONS} DISPLAY_CONDITIONS {@link DISPLAY_CONDITIONS} - * @typedef {TYPES.REPEATER_OPTIONS} REPEATER_OPTIONS {@link REPEATER_OPTIONS} - * @typedef {TYPES.REPEATER_OPTIONS_DEFAULT} REPEATER_OPTIONS_DEFAULT {@link REPEATER_OPTIONS_DEFAULT} - * @typedef {TYPES.COMMON_FIELDS} COMMON_FIELDS {@link COMMON_FIELDS} - */ - +/// // ************* // General fields. // Fields for content and style tab // ************* /** - * #### Number fields provide an easy interface for content creators to enter in or adjust numerical values and options. This can be used for creating percentage based items or anything where numbers are needed for input. - * Some parameters have `default` values, `OMIT` such parameters if you don't want to override them. + * #### Boolean field * @example - * fi.number('label', 'name', {...options if needed}) + * fi.boolean('label', 'name', {...options if needed}) * @memberof Fields - * @param {string} label The text the content creator sees describing the field. May contain spaces. - * @param {string} name Field/HubL variable name, which you'll reference when incorporating the field and its values in the module or theme. `Cannot contain spaces or special characters!` - * @param {Object} [fields] - * @param {'slider'|'text'} [fields.display=text] `text` The display type for the number field. - * @param {number} [fields.step=1] `1` The step value for the number field. - * @param {number} [fields.min] Minimum value for the number field. - * @param {number} [fields.max] Maximum value for the number field. - * @param {string} [fields.prefix] Added as a prefix to the number field. - * @param {string} [fields.suffix] Added as a suffix to the number field. - * @param {string} [fields.placeholder] Adds a placeholder value to the field. - * @param {?number} [fields.default] A default number to be used --> It's generally a good idea to skip setting the `default` object, as it should be configured by the editor, not the developer - * @param {EDITOR_OPTIONS} [fields.editor_options] Editor options group. - * @param {DISPLAY_CONDITIONS} [fields.display_conditions] Display conditions group. - * @param {REPEATER_OPTIONS} [fields.repeater_options] Repeater options. Keep `occurrence` object empty to just enable a feature. `repeater_options: {occurrence: {}}` - * @param {REPEATER_OPTIONS_DEFAULT} [fields.repeater_options_default] Repeater options with predefined repeated fields and `default` values for each field. + * @param {string} label Field label + * @param {string} name Field name (HubL variable name) + * @param {BASE_FIELDS|BOOLEAN_FIELD} [fields] * @returns {COMMON_FIELDS} */ -function number (label, name, fields) { - const contentOptions = {} - contentOptions.display = fields?.display ?? 'text' - contentOptions.step = fields?.step ?? 1 - if (typeof fields !== 'undefined' && fields !== null && typeof fields === 'object') { - if ('min' in fields) contentOptions.min = fields.min - if ('max' in fields) contentOptions.max = fields.max - if ('prefix' in fields) contentOptions.prefix = fields.prefix - if ('suffix' in fields) contentOptions.suffix = fields.suffix - if ('placeholder' in fields) contentOptions.placeholder = fields.placeholder - if ('default' in fields) contentOptions.default = fields.default +function boolean (label, name, fields) { + return { + label, + name, + ...fields, + ...{ type: 'boolean' } } - - const otherOptions = initField(label, name, 'number', fields) - return { ...contentOptions, ...otherOptions } } + /** - * #### This field provides a way for content editors to enable/disable functionality. - * Some parameters have `default` values, `OMIT` such parameters if you don't want to override them. + * #### Choice field * @example - * fi.boolean('label', 'name', {...options if needed}) + * fi.choice('label', 'name', {...options if needed}) * @memberof Fields - * @param {string} label The text the content creator sees describing the field. May contain spaces. - * @param {string} name Field/HubL variable name, which you'll reference when incorporating the field and its values in the module or theme. `Cannot contain spaces or special characters!` - * @param {Object} [fields] - * @param {'toggle'|'checkbox'} [fields.display=checkbox] `checkbox` Choose the visual display style for the field. Can appear as either a toggle or a checkbox. - * @param {boolean} [fields.default=false] `false` A default boolean value - * @param {EDITOR_OPTIONS} [fields.editor_options] Editor options group. - * @param {DISPLAY_CONDITIONS} [fields.display_conditions] Display conditions group. - * @param {REPEATER_OPTIONS} [fields.repeater_options] Repeater options. Keep `occurrence` object empty to just enable a feature. `repeater_options: {occurrence: {}}` - * @param {REPEATER_OPTIONS_DEFAULT} [fields.repeater_options_default] Repeater options with predefined repeated fields and `default` values for each field. + * @param {string} label Field label + * @param {string} name Field name (HubL variable name) + * @param {BASE_FIELDS|CHOICE_FIELD} [fields] * @returns {COMMON_FIELDS} */ -function boolean (label, name, fields) { - const contentOptions = {} - contentOptions.display = fields?.display ?? 'checkbox' - contentOptions.default = fields?.default ?? false - - const otherOptions = initField(label, name, 'boolean', fields) - return { ...contentOptions, ...otherOptions } +function choice (label, name, fields) { + return { + label, + name, + ...fields, + ...{ type: 'choice' } + } } /** - * #### Image fields provide an easy interface for content creators to add images to a module or theme. - * Some parameters have `default` values, `OMIT` such parameters if you don't want to override them. + * #### font field * @example - * fi.image('label', 'name', {...options if needed}) + * fi.font('label', 'name', {...options if needed}) * @memberof Fields - * @param {string} label The text the content creator sees describing the field. May contain spaces. - * @param {string} name Field/HubL variable name, which you'll reference when incorporating the field and its values in the module or theme. `Cannot contain spaces or special characters!` - * @param {Object} [fields] - * @param {boolean} [fields.responsive=true] `true` Determines if the image is to act responsively or have a fixed height and width. - * @param {boolean} [fields.show_loading=false] `false` Determines if the controls for choosing to lazy load the image are shown in the page editor. - * @param {boolean} [fields.resizable=true] `true` Determines if the image is resizable in the page editor. - * @param {Object} [fields.default] Default image properties --> It's generally a good idea to skip setting the `default` object, as it should be configured by the editor, not the developer - * @param {'auto'|'auto_custom_max'|'exact'} [fields.default.size_type=auto] `auto` Whether the image is automatically or manually sized. `auto`: HubSpot will automatically adjust the size of the image based on its original dimensions. `auto_custom_max`: HubSpot will automatically adjust the size of the image with maximum dimensions set using the `max_height` and `max_width` properties. `exact`: HubSpot will size the image based on the dimensions set using the `height` and `width` properties. - * @param {string} [fields.default.src] The URL of the default image. Must be an absolute path to an image - * @param {string} [fields.default.alt] The image's default alt-text. - * @param {string} [fields.default.loading=lazy] `lazy` The image's lazy loading options - * @param {number} [fields.default.width] The width of the image - * @param {number} [fields.default.height] The height of the image - * @param {number} [fields.default.max_width] The maximum width of the image - * @param {number} [fields.default.max_height] The maximum height of the image - * @param {EDITOR_OPTIONS} [fields.editor_options] Editor options group. - * @param {DISPLAY_CONDITIONS} [fields.display_conditions] Display conditions group. - * @param {REPEATER_OPTIONS} [fields.repeater_options] Repeater options. Keep `occurrence` object empty to just enable a feature. `repeater_options: {occurrence: {}}` - * @param {REPEATER_OPTIONS_DEFAULT} [fields.repeater_options_default] Repeater options with predefined repeated fields and `default` values for each field. + * @param {string} label Field label + * @param {string} name Field name (HubL variable name) + * @param {BASE_FIELDS|FONT_FIELD} [fields] * @returns {COMMON_FIELDS} */ -function image (label, name, fields) { - const contentOptions = {} - contentOptions.responsive = fields?.responsive ?? true - contentOptions.resizable = fields?.resizable ?? true - contentOptions.show_loading = fields?.show_loading ?? false - const defaultObj = { - size_type: 'auto', - src: '', - alt: null, - loading: 'lazy' +function font (label, name, fields) { + return { + label, + name, + ...fields, + ...{ type: 'font' } } - contentOptions.default = fields?.default ?? defaultObj - - const otherOptions = initField(label, name, 'image', fields) - return { ...contentOptions, ...otherOptions } } /** - * #### Icon fields provide an icon picker UI to make it easier for content creators to add icons to your modules. - * Some parameters have `default` values, `OMIT` such parameters if you don't want to override them. + * #### Color field * @example - * fi.icon('label', 'name', {...options if needed}) + * fi.color('label', 'name', {...options if needed}) * @memberof Fields - * @param {string} label The text the content creator sees describing the field. May contain spaces. - * @param {string} name Field/HubL variable name, which you'll reference when incorporating the field and its values in the module or theme. `Cannot contain spaces or special characters!` - * @param {Object} [fields] - * @param {'fontawesome-5.14.0'|'fontawesome-5.0.10'|'fontawesome-6.4.2'} [fields.icon_set='fontawesome-6.4.2'] `fontawesome-6.4.2` The FontAwesome icon set to use. - * @param {Object} [fields.default] Defaout icon object --> It's generally a good idea to skip setting the `default` object, as it should be configured by the editor, not the developer - * @param {string} [fields.default.name] The name of the icon - * @param {string} [fields.default.unicode] The unicode of the icon - * @param {'REGULAR'|'SOLID'} [fields.default.type] The type of the icon - * @param {EDITOR_OPTIONS} [fields.editor_options] Editor options group. - * @param {DISPLAY_CONDITIONS} [fields.display_conditions] Display conditions group. - * @param {REPEATER_OPTIONS} [fields.repeater_options] Repeater options. Keep `occurrence` object empty to just enable a feature. `repeater_options: {occurrence: {}}` - * @param {REPEATER_OPTIONS_DEFAULT} [fields.repeater_options_default] Repeater options with predefined repeated fields and `default` values for each field. + * @param {string} label Field label + * @param {string} name Field name (HubL variable name) + * @param {BASE_FIELDS|COLOR_FIELD} [fields] * @returns {COMMON_FIELDS} */ -function icon (label, name, fields) { - const contentOptions = {} - contentOptions.icon_set = fields?.icon_set ?? 'fontawesome-6.4.2' - contentOptions.default = fields?.default ?? {} - - const otherOptions = initField(label, name, 'icon', fields) - return { ...contentOptions, ...otherOptions } +function color (label, name, fields) { + return { + label, + name, + ...fields, + ...{ type: 'color' } + } } /** - * #### Choice fields allow a content creator to select one or more items from a list of options, either within a dropdown menu, radio select, or checkboxes. - * Some parameters have `default` values, `OMIT` such parameters if you don't want to override them. + * #### image field * @example - * fi.choice('label', 'name', {...options if needed}) + * fi.image('label', 'name', {...options if needed}) * @memberof Fields - * @param {string} label The text the content creator sees describing the field. May contain spaces. - * @param {string} name Field/HubL variable name, which you'll reference when incorporating the field and its values in the module or theme. `Cannot contain spaces or special characters!` - * @param {Object} [fields] - * @param {boolean} [fields.multiple=false] `false` Optional. To allow multiple options to be selected, set the value to true. - * @param {boolean} [fields.reordering_enabled=true] `true` Enables reordering of the choices in the editor. - * @param {'select'|'radio'|'checkbox'} [fields.display=select] `select` Set the field's appearance. When not including multiple, you can set this as either `radio` or `select`. When multiple is set to true, you can set this as either `checkbox` or `select`. - * @param {Array} [fields.choices] Array of value and label pairs. Values listed first. - * @param {string} [fields.placeholder] Placeholder text to display when no value is selected. - * @param {string} [fields.default] Sets the default selected value from the choice array. - * @param {EDITOR_OPTIONS} [fields.editor_options] Editor options group. - * @param {DISPLAY_CONDITIONS} [fields.display_conditions] Display conditions group. - * @param {REPEATER_OPTIONS} [fields.repeater_options] Repeater options. Keep `occurrence` object empty to just enable a feature. `repeater_options: {occurrence: {}}` - * @param {REPEATER_OPTIONS_DEFAULT} [fields.repeater_options_default] Repeater options with predefined repeated fields and `default` values for each field. + * @param {string} label Field label + * @param {string} name Field name (HubL variable name) + * @param {BASE_FIELDS|IMAGE_FIELD} [fields] * @returns {COMMON_FIELDS} */ -function choice (label, name, fields) { - const contentOptions = {} - contentOptions.multiple = fields?.multiple ?? false - contentOptions.reordering_enabled = fields?.reordering_enabled ?? true - contentOptions.display = fields?.display ?? 'select' - contentOptions.choices = fields?.choices ?? [['value 1', 'Label 1'], ['value 2', 'Label 2']] - if (typeof fields !== 'undefined' && fields !== null && typeof fields === 'object') { - if ('default' in fields) contentOptions.default = fields?.default - if ('placeholder' in fields) contentOptions.placeholder = fields?.placeholder +function image (label, name, fields) { + return { + label, + name, + ...fields, + ...{ type: 'image' } } - - const otherOptions = initField(label, name, 'choice', fields) - return { ...contentOptions, ...otherOptions } } /** - * #### Color fields provide a color picker interface for content creators. They support solid colors as well as transparency. - * Some parameters have `default` values, `OMIT` such parameters if you don't want to override them. + * #### icon field * @example - * fi.color('label', 'name', {...options if needed}) + * fi.icon('label', 'name', {...options if needed}) * @memberof Fields - * @param {string} label The text the content creator sees describing the field. May contain spaces. - * @param {string} name Field/HubL variable name, which you'll reference when incorporating the field and its values in the module or theme. `Cannot contain spaces or special characters!` - * @param {Object} [fields] - * @param {Boolean} [fields.show_opacity=true] `true` Sets whether opacity input is shown. true: the opacity input is shown. false: the opacity input is hidden. If left undefined, opacity input will not display in email modules, but will display in other module types. - * @param {Object} [fields.default] Sets the default selected color and opacity --> It's generally a good idea to skip setting the `default` object, as it should be configured by the editor, not the developer. - * @param {string?} [fields.default.color] The default color - * @param {number?} [fields.default.opacity] The default opacity - * @param {EDITOR_OPTIONS} [fields.editor_options] Editor options group. - * @param {DISPLAY_CONDITIONS} [fields.display_conditions] Display conditions group. - * @param {REPEATER_OPTIONS} [fields.repeater_options] Repeater options. Keep `occurrence` object empty to just enable a feature. `repeater_options: {occurrence: {}}` - * @param {REPEATER_OPTIONS_DEFAULT} [fields.repeater_options_default] Repeater options with predefined repeated fields and `default` values for each field. + * @param {string} label Field label + * @param {string} name Field name (HubL variable name) + * @param {BASE_FIELDS|ICON_FIELD} [fields] * @returns {COMMON_FIELDS} */ -function color (label, name, fields) { - const contentOptions = {} - contentOptions.show_opacity = fields?.show_opacity ?? undefined - const defaultObj = { - color: null, - opacity: null +function icon (label, name, fields) { + return { + label, + name, + ...fields, + ...{ type: 'icon' } } - contentOptions.default = { ...defaultObj, ...fields?.default } - - const otherOptions = initField(label, name, 'color', fields) - return { ...contentOptions, ...otherOptions } } /** - * @typedef {Object} TEXT_STYLES - * @property {'underline'|'none'} [`text-decoration`] - * @property {'italic'|'normal'} [`font-style`] - * @property {'bold'|'normal'} [`font-weight`] - */ - -/** - * #### Font fields provide content creators basic font styling controls. - * Some parameters have `default` values, `OMIT` such parameters if you don't want to override them. + * #### number field * @example - * fi.font('label', 'name', {...options if needed}) + * fi.number('label', 'name', {...options if needed}) * @memberof Fields - * @param {string} label The text the content creator sees describing the field. May contain spaces. - * @param {string} name Field/HubL variable name, which you'll reference when incorporating the field and its values in the module or theme. `Cannot contain spaces or special characters!` - * @param {Object} [fields] - * @param {Boolean} [fields.load_external_fonts=true] `true` HubSpot automatically loads the selected web font to the page if the font is selected and referenced by HubL in a stylesheet or in a module. Set this to false, if you are already loading the font to the page, that way the font won't load twice. - * @param {Object} [fields.default] Font default object --> It's generally a good idea to skip setting the `default` object, as it should be configured by the editor, not the developer - * @param {string} [fields.default.font] Default family name of the font - * @param {'sans-serif'|'serif'|null} [fields.default.fallback] Default fallback font - * @param {'100'|'200'|'300'|'regular'|'500'|'600'|'700'|'800'|'900'|'100italic'|'200italic'|'300italic'|'400italic'|'500italic'|'600italic'|'700italic'|'800italic'|'900italic'|null} [fields.default.variant] Font variant - * @param {'GOOGLE'|'DEFAULT'} [fields.default.font_set] Default font set - * @param {TEXT_STYLES} [fields.default.styles] Default text styles - * @param {number} [fields.default.size] Default font size - * @param {string?} [fields.default.color] Default font color - * @param {'rem'|'px'|'em'|'rem'|'%'|'ex'|'ch'} [fields.default.size_unit] Default font size unit - * @param {EDITOR_OPTIONS} [fields.editor_options] Editor options group. - * @param {DISPLAY_CONDITIONS} [fields.display_conditions] Display conditions group. - * @param {REPEATER_OPTIONS} [fields.repeater_options] Repeater options. Keep `occurrence` object empty to just enable a feature. `repeater_options: {occurrence: {}}` - * @param {REPEATER_OPTIONS_DEFAULT} [fields.repeater_options_default] Repeater options with predefined repeated fields and `default` values for each field. + * @param {string} label Field label + * @param {string} name Field name (HubL variable name) + * @param {BASE_FIELDS|NUMBER_FIELD} [fields] * @returns {COMMON_FIELDS} */ -function font (label, name, fields) { - const contentOptions = {} - contentOptions.load_external_fonts = fields?.load_external_fonts ?? true - contentOptions.default = fields?.default ?? {} - - const otherOptions = initField(label, name, 'font', fields) - return { ...contentOptions, ...otherOptions } +function number (label, name, fields) { + return { + label, + name, + ...fields, + ...{ type: 'number' } + } } export { boolean, choice, number, color, icon, image, font } diff --git a/lib/group.js b/lib/group.js index 42acdf8..2d7d3db 100644 --- a/lib/group.js +++ b/lib/group.js @@ -1,87 +1,41 @@ -import * as TYPES from './types/types.js' // eslint-disable-line -import { EditorOptions, DisplayConditions, RepeaterOptions, RepeaterOptionsDefault } from './utils/common-properties.js' - -/** - * @ignore - * @typedef {TYPES.EDITOR_OPTIONS} EDITOR_OPTIONS {@link EDITOR_OPTIONS} - * @typedef {TYPES.DISPLAY_CONDITIONS} DISPLAY_CONDITIONS {@link DISPLAY_CONDITIONS} - * @typedef {TYPES.REPEATER_OPTIONS} REPEATER_OPTIONS {@link REPEATER_OPTIONS} - * @typedef {TYPES.REPEATER_OPTIONS_DEFAULT} REPEATER_OPTIONS_DEFAULT {@link REPEATER_OPTIONS_DEFAULT} - * @typedef {TYPES.COMMON_FIELDS} COMMON_FIELDS {@link COMMON_FIELDS} - * @typedef {TYPES.NESTED_COMMON_FIELDS} NESTED_COMMON_FIELDS {@link NESTED_COMMON_FIELDS} - */ - -// ************* -// Group Fields -// ************* - +/// /** - * #### Fields group. When fields are related to each other often it makes sense for them to be displayed visually grouped. - * @example - * group('Group', 'group', {group_options}, - * fi.text('Text_label1', 'text__name1'), - * fi.text('Text_label2', 'text__name2'), - * group('Group2', 'group2', {group2_options}, - * fi.text('Text_label3', 'text_name3') - * ) - * ) - * @param {string} label The text the content creator sees describing the group. May contain spaces. - * @param {string} name Group field/HubL variable name, which you'll reference when incorporating the group field and its values in the module or theme. `Cannot contain spaces or special characters!` - * @param {Object} [fields] - * @param {boolean} [fields.expanded=false] `false` Field groups can be set to be expanded by default by setting the expanded boolean property to true - * @param {EDITOR_OPTIONS} [fields.editor_options] Editor options group. - * @param {DISPLAY_CONDITIONS} [fields.display_conditions] Display conditions group. - * @param {REPEATER_OPTIONS} [fields.repeater_options] Repeater options. Keep `occurrence` object empty to just enable a feature. `repeater_options: {occurrence: {}}` - * @param {REPEATER_OPTIONS_DEFAULT} [fields.repeater_options_default] Repeater options with predefined repeated fields and `default` values for each field. - * @param {Array} childrens + * #### Create a group with other fields inside. + * @param {string} label Group label + * @param {string} name Group name (HubL variable name) + * @param {BASE_FIELDS|GROUP_FIELD} fields Group settings + * @param {CHILDRENS} childrens Group children fields * @returns {COMMON_FIELDS} */ function group (label, name, fields, ...childrens) { - /** @type {COMMON_FIELDS} */ - const requiredFields = { type: 'group', id: '', name, label, children: [] } - const editorOptions = new EditorOptions({ ...fields?.editor_options }) - const displayConditions = new DisplayConditions({ ...fields?.display_conditions }) - const repeaterOptions = new RepeaterOptions({ ...fields?.repeater_options }) - let repeaterOptionsDefault - if (fields?.repeater_options_default) { - repeaterOptionsDefault = new RepeaterOptionsDefault({ ...fields.repeater_options_default }) - } - const groupOptions = {} - groupOptions.expanded = fields?.expanded ?? false + /** @type {Array} */ + const children = [] childrens.forEach(element => { if (Array.isArray(element)) { - requiredFields.children?.push(...element.flat(3)) + children.push(...element.flat(3)) } else { - requiredFields.children?.push(element) + children.push(element) } }) - return { - ...requiredFields, - ...groupOptions, - ...editorOptions, - ...displayConditions, - ...repeaterOptions, - ...repeaterOptionsDefault + label, + name, + ...{ type: 'group' }, + ...fields, + children } } /** - * #### Main high-level Style group wrapper. Use only once to wrap all style fields. - * @example - * styleGroup( - * fi.alignment('alignment', 'Alignment') - * ) - * @param {Array} childrens + * #### Create a group with other fields inside. + * @param {CHILDRENS} childrens Group children fields * @returns {COMMON_FIELDS} */ function styleGroup (...childrens) { /** @type {COMMON_FIELDS} */ const baseFields = { - id: 'style', name: 'style', label: 'Style', - locked: false, children: [], tab: 'STYLE', type: 'group' @@ -93,7 +47,9 @@ function styleGroup (...childrens) { baseFields.children?.push(element) } }) - return { ...baseFields } + return { + ...baseFields + } } export { group, styleGroup } diff --git a/lib/init.js b/lib/init.js index 26b23d1..67ac5ba 100644 --- a/lib/init.js +++ b/lib/init.js @@ -1,44 +1,14 @@ -import * as TYPES from './types/types.js' // eslint-disable-line import fsPromises from 'fs/promises' import path from 'node:path' /** - * @ignore - * @typedef {TYPES.COMMON_FIELDS} COMMON_FIELDS {@link COMMON_FIELDS} - * @typedef {TYPES.NESTED_COMMON_FIELDS} NESTED_COMMON_FIELDS {@link NESTED_COMMON_FIELDS} - */ - -/** - * @summary Add a real id to fields - * @private - * @param {Array} array array of objects - * @param {string} [prefix] prefix - * @returns {Array} portal name|names - */ -// function addIdToObjects (array, prefix = '') { -// array.forEach(obj => { -// const id = prefix ? `${prefix}.${obj.name}` : obj.name -// obj.id = id -// if ('children' in obj && Array.isArray(obj.children)) { -// addIdToObjects(obj.children, id) -// } -// }) -// return array -// } - -/** - * #### Initialize and return an array of fields object from fields.js - * Combine all the fields and groups objects into one array, and return it. - * @param {Array} fields - * @returns {COMMON_FIELDS[]} + * #### Initialize and write an array of fields object from fields.js to a fields.json file + * Combine all the fields and groups objects into one array and write it to fields.json file + * @param {CHILDRENS} fields + * @async + * @returns undefined * @example - * \/* eslint-disable no-unused-vars *\/ - * import { - * group, - * styleGroup, - * initModule, - * moduleFields as fi - * } from '@resultify/hubspot-fields-js' + * import { init, group, styleGroup, moduleFields as fi } from '@resultify/hubspot-fields-js' * * init( * styleGroup( @@ -50,8 +20,8 @@ import path from 'node:path' * fi.link('Link', 'link') * ) */ -function init (...fields) { - /** @type {COMMON_FIELDS[]} */ +async function init (...fields) { + /** @type {Array} */ const correctedFields = [] fields.forEach(element => { if (Array.isArray(element)) { @@ -60,38 +30,8 @@ function init (...fields) { correctedFields.push(element) } }) - // correctedFields = addIdToObjects(correctedFields) - return correctedFields -} - -/** - * #### Write fields data from fields.js to a fields.json - * @param {Array} data - * @returns undefined - * @async - * @example - * \/* eslint-disable no-unused-vars *\/ - * import { - * group, - * styleGroup, - * initModule, - * moduleFields as fi - * } from '@resultify/hubspot-fields-js' - * - * writeJson(JSON_DATA) - * - * // or - * - * writeJson(init( - * group( - * fi.number('Number', 'number') - * ), - * fi.number('Number', 'number') - * )) - */ -async function writeJson (data) { const filePath = path.parse(process.argv[1]) - await fsPromises.writeFile(`${filePath.dir}/${filePath.name}.json`, JSON.stringify(data, null, 2), { encoding: 'utf8' }) + await fsPromises.writeFile(`${filePath.dir}/${filePath.name}.json`, JSON.stringify(correctedFields, null, 2), { encoding: 'utf8' }) } -export { init, writeJson } +export { init } diff --git a/lib/style-tab-fields.js b/lib/style-tab-fields.js index e031021..08b6400 100644 --- a/lib/style-tab-fields.js +++ b/lib/style-tab-fields.js @@ -1,277 +1,126 @@ -import * as TYPES from './types/types.js' // eslint-disable-line -import { initField } from './utils/initField.js' - -/** - * @ignore - * @typedef {TYPES.EDITOR_OPTIONS} EDITOR_OPTIONS {@link EDITOR_OPTIONS} - * @typedef {TYPES.DISPLAY_CONDITIONS} DISPLAY_CONDITIONS {@link DISPLAY_CONDITIONS} - * @typedef {TYPES.REPEATER_OPTIONS} REPEATER_OPTIONS {@link REPEATER_OPTIONS} - * @typedef {TYPES.REPEATER_OPTIONS_DEFAULT} REPEATER_OPTIONS_DEFAULT {@link REPEATER_OPTIONS_DEFAULT} - * @typedef {TYPES.COMMON_FIELDS} COMMON_FIELDS {@link COMMON_FIELDS} - */ - +/// // ************* // Only Style Tab fields // ************* /** - * #### Enables content creators to position an element within a container. + * #### Alignment field * `only_style_tab` - * - * Some parameters have `default` values, `OMIT` such parameters if you don't want to override them. * @example * fi.alignment('label', 'name', {...options if needed}) * @memberof Fields - * @param {string} label The text the content creator sees describing the field. May contain spaces. - * @param {string} name Field/HubL variable name, which you'll reference when incorporating the field and its values in the module or theme. `Cannot contain spaces or special characters!` - * @param {Object} [fields] - * @param {'HORIZONTAL'|'VERTICAL'|'BOTH'} [fields.alignment_direction=HORIZONTAL] `HORIZONTAL` Determines if only horizontal, only vertical, or both alignment controls should be shown - * @param {Object} [fields.default] Default alignment values --> It's generally a good idea to skip setting the `default` object, as it should be configured by the editor, not the developer - * @param {'BOTTOM'|'MIDDLE'|'TOP'} [fields.default.vertical_align=MIDDLE] `MIDDLE` Default vertical alignment - * @param {'LEFT'|'CENTER'|'RIGHT'} [fields.default.horizontal_align=LEFT] `LEFT` Default horizontal alignment - * @param {EDITOR_OPTIONS} [fields.editor_options] Editor options group. - * @param {DISPLAY_CONDITIONS} [fields.display_conditions] Display conditions group. + * @param {string} label Field label + * @param {string} name Field name (HubL variable name) + * @param {BASE_FIELDS|ALIGNMENT_FIELD} [fields] * @returns {COMMON_FIELDS} */ function alignment (label, name, fields) { - const contentOptions = {} - contentOptions.alignment_direction = fields?.alignment_direction ?? 'HORIZONTAL' - if (contentOptions.alignment_direction === 'BOTH') { - contentOptions.default = fields?.default ?? { - horizontal_align: 'LEFT', - vertical_align: 'MIDDLE' - } - } else if (contentOptions.alignment_direction === 'HORIZONTAL') { - contentOptions.default = fields?.default ?? { - horizontal_align: 'LEFT' - } - } else if (contentOptions.alignment_direction === 'VERTICAL') { - contentOptions.default = fields?.default ?? { - vertical_align: 'MIDDLE' - } - } - if (typeof fields !== 'undefined' && fields !== null && typeof fields === 'object') { - if ('default' in fields) contentOptions.default = fields?.default + return { + label, + name, + ...fields, + ...{ type: 'alignment' } } - - const otherOptions = initField(label, name, 'alignment', fields) - return { ...contentOptions, ...otherOptions } } /** - * #### This field provides a user interface (UI) for content creators to set padding and margin. + * #### backgroundimage field * `only_style_tab` - * - * Some parameters have `default` values, `OMIT` such parameters if you don't want to override them. * @example - * fi.spacing('label', 'name', {...options if needed}) + * fi.backgroundimage('label', 'name', {...options if needed}) * @memberof Fields - * @param {string} label The text the content creator sees describing the field. May contain spaces. - * @param {string} name Field/HubL variable name, which you'll reference when incorporating the field and its values in the module or theme. `Cannot contain spaces or special characters!` - * @param {Object} [fields] - * @param {Object} [fields.limits] Sets the guidelines for min and max amount of spacing. - * @param {Object} [fields.limits.margin] Margin limits object - * @param {Object} [fields.limits.margin.top] Default top margin object - * @param {?number} [fields.limits.margin.top.min] min top margin value - * @param {?number} [fields.limits.margin.top.max] max top margin value - * @param {null|Array<'%'|'ch'|'em'|'ex'|'in'|'lh'|'pc'|'pt'|'px'|'Q'|'rem'|'vh'|'vmax'|'vmin'|'vw'>} [fields.limits.margin.top.units] top margin units - * @param {Object} [fields.limits.margin.bottom] Default bottom margin object - * @param {?number} [fields.limits.margin.bottom.min] min bottom margin value - * @param {?number} [fields.limits.margin.bottom.max] max bottom margin value - * @param {null|Array<'%'|'ch'|'em'|'ex'|'in'|'lh'|'pc'|'pt'|'px'|'Q'|'rem'|'vh'|'vmax'|'vmin'|'vw'>} [fields.limits.margin.bottom.units] top margin units - * @param {Object} [fields.limits.padding] Padding limits object - * @param {Object} [fields.limits.padding.top] Default top padding object - * @param {?number} [fields.limits.padding.top.min] min top padding value - * @param {?number} [fields.limits.padding.top.max] max top padding value - * @param {null|Array<'%'|'ch'|'em'|'ex'|'in'|'lh'|'pc'|'pt'|'px'|'Q'|'rem'|'vh'|'vmax'|'vmin'|'vw'>} [fields.limits.padding.top.units] top padding units - * @param {Object} [fields.limits.padding.bottom] Default top padding object - * @param {?number} [fields.limits.padding.bottom.min] min top padding value - * @param {?number} [fields.limits.padding.bottom.max] max top padding value - * @param {null|Array<'%'|'ch'|'em'|'ex'|'in'|'lh'|'pc'|'pt'|'px'|'Q'|'rem'|'vh'|'vmax'|'vmin'|'vw'>} [fields.limits.padding.bottom.units] top padding units - * @param {Object} [fields.limits.padding.left] Default top padding object - * @param {?number} [fields.limits.padding.left.min] min top padding value - * @param {?number} [fields.limits.padding.left.max] max top padding value - * @param {null|Array<'%'|'ch'|'em'|'ex'|'in'|'lh'|'pc'|'pt'|'px'|'Q'|'rem'|'vh'|'vmax'|'vmin'|'vw'>} [fields.limits.padding.left.units] top padding units - * @param {Object} [fields.limits.padding.right] Default top padding object - * @param {?number} [fields.limits.padding.right.min] min top padding value - * @param {?number} [fields.limits.padding.right.max] max top padding value - * @param {null|Array<'%'|'ch'|'em'|'ex'|'in'|'lh'|'pc'|'pt'|'px'|'Q'|'rem'|'vh'|'vmax'|'vmin'|'vw'>} [fields.limits.padding.right.units] top padding units - * @param {Object} [fields.default] Default spacing object --> It's generally a good idea to skip setting the `default` object, as it should be configured by the editor, not the developer - * @param {Object} [fields.default.margin] Default margin object - * @param {Object} [fields.default.margin.top] Default top margin object - * @param {?number} fields.default.margin.top.value Default top margin value - * @param {?string} fields.default.margin.top.units Default top margin units - * @param {Object} [fields.default.margin.bottom] Default bottom margin object - * @param {?number} fields.default.margin.bottom.value Default bottom margin value - * @param {?string} fields.default.margin.bottom.units Default bottom margin units - * @param {Object} [fields.default.padding] Default padding object - * @param {Object} [fields.default.padding.top] Default top padding object - * @param {?number} fields.default.padding.top.value Default top padding value - * @param {?string} fields.default.padding.top.units Default top padding units - * @param {Object} [fields.default.padding.bottom] Default bottom padding object - * @param {?number} fields.default.padding.bottom.value Default bottom padding value - * @param {?string} fields.default.padding.bottom.units Default bottom padding units - * @param {Object} [fields.default.padding.left] Default left padding object - * @param {?number} fields.default.padding.left.value Default left padding value - * @param {?string} fields.default.padding.left.units Default left padding units - * @param {Object} [fields.default.padding.right] Default right padding object - * @param {?number} fields.default.padding.right.value Default right padding value - * @param {?string} fields.default.padding.right.units Default right padding units - * @param {EDITOR_OPTIONS} [fields.editor_options] Editor options group. - * @param {DISPLAY_CONDITIONS} [fields.display_conditions] Display conditions group. + * @param {string} label Field label + * @param {string} name Field name (HubL variable name) + * @param {BASE_FIELDS|BACKGROUND_IMAGE_FIELD} [fields] * @returns {COMMON_FIELDS} */ -function spacing (label, name, fields) { - const contentOptions = {} - contentOptions.default = fields?.default ?? {} - if (typeof fields !== 'undefined' && fields !== null && typeof fields === 'object') { - if ('limits' in fields) contentOptions.limits = fields?.limits +function backgroundimage (label, name, fields) { + return { + label, + name, + ...fields, + ...{ type: 'backgroundimage' } } - - const otherOptions = initField(label, name, 'spacing', fields) - return { ...contentOptions, ...otherOptions } } /** - * @typedef {Object} RGBA_COLOR - * @property {number} r Red value - * @property {number} g Green value - * @property {number} b Blue value - * @property {number} a Alpha value `0-1` - */ - -/** - * #### This field provides a way for content creators to create and configure gradients. + * #### border field * `only_style_tab` - * - * Some parameters have `default` values, `OMIT` such parameters if you don't want to override them. * @example - * fi.gradient('label', 'name', {...options if needed}) + * fi.border('label', 'name', {...options if needed}) * @memberof Fields - * @param {string} label The text the content creator sees describing the field. May contain spaces. - * @param {string} name Field/HubL variable name, which you'll reference when incorporating the field and its values in the module or theme. `Cannot contain spaces or special characters!` - * @param {Object} [fields] - * @param {Object} [fields.default] Gradient default object --> It's generally a good idea to skip setting the `default` object, as it should be configured by the editor, not the developer - * @param {Object} [fields.default.side_or_corner] Default side or corner object - * @param {'TOP'|'BOTTOM'|null} fields.default.side_or_corner.verticalSide Default vertical side - * @param {'LEFT'|'RIGHT'|null} fields.default.side_or_corner.horizontalSide Default horizontal side - * @param {Array<{color: RGBA_COLOR}>} [fields.default.colors] Default colors array - * @param {EDITOR_OPTIONS} [fields.editor_options] Editor options group. - * @param {DISPLAY_CONDITIONS} [fields.display_conditions] Display conditions group. + * @param {string} label Field label + * @param {string} name Field name (HubL variable name) + * @param {BASE_FIELDS|BORDER_FIELD} [fields] * @returns {COMMON_FIELDS} */ -function gradient (label, name, fields) { - const contentOptions = {} - contentOptions.default = fields?.default ?? {} - - const otherOptions = initField(label, name, 'gradient', fields) - return { ...contentOptions, ...otherOptions } +function border (label, name, fields) { + return { + label, + name, + ...fields, + ...{ type: 'border' } + } } /** - * #### This field provides a background image field which has subfields for background position and background size. + * #### gradient field * `only_style_tab` - * - * Some parameters have `default` values, `OMIT` such parameters if you don't want to override them. * @example - * fi.backgroundimage('label', 'name', {...options if needed}) + * fi.gradient('label', 'name', {...options if needed}) * @memberof Fields - * @param {string} label The text the content creator sees describing the field. May contain spaces. - * @param {string} name Field/HubL variable name, which you'll reference when incorporating the field and its values in the module or theme. `Cannot contain spaces or special characters!` - * @param {Object} [fields] - * @param {Object} [fields.default] Background image default object --> It's generally a good idea to skip setting the `default` object, as it should be configured by the editor, not the developer - * @param {string} fields.default.src Default image source - * @param {'TOP_LEFT'|'TOP_CENTER'|'TOP_RIGHT'|'MIDDLE_LEFT'|'MIDDLE_CENTER'|'MIDDLE_RIGHT'|'BOTTOM_LEFT'|'BOTTOM_CENTER'|"BOTTOM_RIGHT"} [fields.default.background_position=MIDDLE_CENTER] `MIDDLE_CENTER` Default background position - * @param {'cover'|'contain'|'auto'} [fields.default.background_size=cover] `cover` Default background size - * @param {EDITOR_OPTIONS} [fields.editor_options] Editor options group. - * @param {DISPLAY_CONDITIONS} [fields.display_conditions] Display conditions group. + * @param {string} label Field label + * @param {string} name Field name (HubL variable name) + * @param {BASE_FIELDS|GRADIENT_FIELD} [fields] * @returns {COMMON_FIELDS} */ -function backgroundimage (label, name, fields) { - const contentOptions = {} - contentOptions.default = fields?.default ?? { src: '', background_position: 'MIDDLE_CENTER', background_size: 'cover' } - - const otherOptions = initField(label, name, 'backgroundimage', fields) - return { ...contentOptions, ...otherOptions } +function gradient (label, name, fields) { + return { + label, + name, + ...fields, + ...{ type: 'gradient' } + } } /** - * #### This field provides content creators a user interface for creating a border around an element. + * #### spacing field * `only_style_tab` - * - * Some parameters have `default` values, `OMIT` such parameters if you don't want to override them. * @example - * fi.border('label', 'name', {...options if needed}) + * fi.spacing('label', 'name', {...options if needed}) * @memberof Fields - * @param {string} label The text the content creator sees describing the field. May contain spaces. - * @param {string} name Field/HubL variable name, which you'll reference when incorporating the field and its values in the module or theme. `Cannot contain spaces or special characters!` - * @param {Object} [fields] - * @param {boolean} [fields.allow_custom_border_sides=false] `false` Allow custom border sides - * @param {Object} [fields.default] Border default object --> It's generally a good idea to skip setting the `default` object, as it should be configured by the editor, not the developer - * @param {Object} [fields.default.top] - * @param {Object} fields.default.top.width - * @param {number?} fields.default.top.width.value - * @param {'px'} fields.default.top.width.units - * @param {number} fields.default.top.opacity - * @param {'solid'|'double'|'dotted'|'dashed'} fields.default.top.style - * @param {string} fields.default.top.color - * @param {Object} [fields.default.bottom] - * @param {Object} fields.default.bottom.width - * @param {number?} fields.default.bottom.width.value - * @param {'px'} fields.default.bottom.width.units - * @param {number} fields.default.bottom.opacity - * @param {'solid'|'double'|'dotted'|'dashed'} fields.default.bottom.style - * @param {string} fields.default.bottom.color - * @param {Object} [fields.default.left] - * @param {Object} fields.default.left.width - * @param {number?} fields.default.left.width.value - * @param {'px'} fields.default.left.width.units - * @param {number} fields.default.left.opacity - * @param {'solid'|'double'|'dotted'|'dashed'} fields.default.left.style - * @param {string} fields.default.left.color - * @param {Object} [fields.default.right] - * @param {Object} fields.default.right.width - * @param {number?} fields.default.right.width.value - * @param {'px'} fields.default.right.width.units - * @param {number} fields.default.right.opacity - * @param {'solid'|'double'|'dotted'|'dashed'} fields.default.right.style - * @param {string} fields.default.right.color - * @param {EDITOR_OPTIONS} [fields.editor_options] Editor options group. - * @param {DISPLAY_CONDITIONS} [fields.display_conditions] Display conditions group. + * @param {string} label Field label + * @param {string} name Field name (HubL variable name) + * @param {BASE_FIELDS|SPACING_FIELD} [fields] * @returns {COMMON_FIELDS} */ -function border (label, name, fields) { - const contentOptions = {} - contentOptions.allow_custom_border_sides = fields?.allow_custom_border_sides ?? false - contentOptions.default = fields?.default ?? {} - - const otherOptions = initField(label, name, 'border', fields) - return { ...contentOptions, ...otherOptions } +function spacing (label, name, fields) { + return { + label, + name, + ...fields, + ...{ type: 'spacing' } + } } /** - * #### This field provides content creators a way to align text content within a container. + * #### textalignment field * `only_style_tab` - * - * Some parameters have `default` values, `OMIT` such parameters if you don't want to override them. * @example * fi.textalignment('label', 'name', {...options if needed}) * @memberof Fields - * @param {string} label The text the content creator sees describing the field. May contain spaces. - * @param {string} name Field/HubL variable name, which you'll reference when incorporating the field and its values in the module or theme. `Cannot contain spaces or special characters!` - * @param {Object} [fields] - * @param {Object} [fields.default] Text alignment default object --> It's generally a good idea to skip setting the `default` object, as it should be configured by the editor, not the developer - * @param {'LEFT'|'CENTER'|'RIGHT'|'JUSTIFY'} [fields.default.text_align=LEFT] `LEFT` Default text alignment - * @param {EDITOR_OPTIONS} [fields.editor_options] Editor options group. - * @param {DISPLAY_CONDITIONS} [fields.display_conditions] Display conditions group. + * @param {string} label Field label + * @param {string} name Field name (HubL variable name) + * @param {BASE_FIELDS|TEXT_ALIGNMENT_FIELD} [fields] * @returns {COMMON_FIELDS} */ function textalignment (label, name, fields) { - const contentOptions = {} - contentOptions.default = fields?.default ?? { text_align: 'LEFT' } - - const otherOptions = initField(label, name, 'textalignment', fields) - return { ...contentOptions, ...otherOptions } + return { + label, + name, + ...fields, + ...{ type: 'textalignment' } + } } export { alignment, spacing, gradient, backgroundimage, border, textalignment } diff --git a/lib/types/namespaces.js b/lib/types/namespaces.js index 0476a4f..28c6b93 100644 --- a/lib/types/namespaces.js +++ b/lib/types/namespaces.js @@ -5,7 +5,7 @@ */ /** - * ### Partials - * #### Exapmle of partials. Do not use in production! - * @namespace Partials + * ### Global Types + * #### This is a collection of `hubspot-fields-js` types that are used to generete fields (json) for HubSpot modules and themes. + * @namespace Types */ diff --git a/lib/types/types.js b/lib/types/types.js index e4b19d9..430f198 100644 --- a/lib/types/types.js +++ b/lib/types/types.js @@ -1,23 +1,21 @@ /** - * #### Inherited values - * @typedef {any} INHERITED_VALUES - * @property {string} [color] + * #### Required module/group fields + * @typedef {Object} COMMON_FIELDS + * @property {string} name + * @property {string} label + * @property {string} type + * @property {string} [tab] + * @property {Array} [children] */ /** - * #### HubSpot module editor options - * @typedef {Object} EDITOR_OPTIONS - * @property {boolean} [required=false] `false` Sets whether the field can be left blank in the editor. If true, content cannot be published without a value in the field. - * @property {boolean} [locked=false] `false` Sets whether the field is editable in the content editor. If true, the field will not appear in the content editor. - * @property {string} [help_text] Text that displays in the editor within a tooltip on hover to assist the content creator (limit 300 characters). Best used for information that is supplementary but not required to use the field. You can include the following HTML tags (other tags will be ignored on render): a, b, br, em, i, p, small, strong, span. - * @property {string} [inline_help_text] Text that displays inline below field's label (limit 400 characters). Best used for information required to use the field. You can include the following HTML tags (other tags will be ignored on render): a, b, br, em, i, p, small, strong, span. - * @property {null|'half_width'} [display_width=full_width] `full_width` By default, fields are full-width in the editor. - * @property {?Object} [inherited_value] - * @property {INHERITED_VALUES} [inherited_value.property_value_paths] + * #### CSS unit + * @typedef {'px'|'pt'|'em'|'rem'|'%'|'ex'|'ch'|'vh'|'vmax'|'vmin'|'vw'} CSS_UNIT */ /** * #### Hidden subfields properties + * @memberof Types * @typedef {Object} HIDDEN_SUBFIELDS * @property {boolean} [margin] * @property {boolean} [padding] @@ -30,71 +28,617 @@ /** * #### Advanced visibility criteria + * @memberof Types * @typedef {Object} ADVANCED_VISIBILITY_CRITERIA - * @property {string} [controlling_field_path] The path of the field that controls the display condition. - * @property {string} [controlling_value_regex] The value in the controlling field that needs to be met to display the field. - * @property {'NOT_EQUAL'|'EQUAL'|'EMPTY'|'NOT_EMPTY'|'MATCHES_REGEX'} [operator] The operator that defines how the `controlling_value_regex` value needs to be met. - * @property {?string} [property] Sets visibility based on a specific property of the target field. For example, you can enable visibility when an image field's src property is equal to a specific value. By default, if no value is provided for this field, visibility is based on the stringified value of `controlling_value_regex`. + * @property {string} [controlling_field_path] Path of the field that controls the display condition + * @property {'NOT_EQUAL'|'EQUAL'|'EMPTY'|'NOT_EMPTY'|'MATCHES_REGEX'} operator + * @property {string} [controlling_value_regex] The regular expression in the controlling field that needs to be present for the field to display. + * @property {string} [property] Sets visibility based on a specific property (`src`, `name`) */ /** * #### Advanced visibility + * @memberof Types * @typedef {Object} ADVANCED_VISIBILITY - * @property {'OR'|'AND'} [advanced_visibility.boolean_operator=OR] `OR` The boolean operator for the conditional criteria. Can be `AND` or `OR` + * @property {'AND'|'OR'} boolean_operator `OR` The boolean operator for the conditional criteria. Can be `AND` or `OR` * @property {Array} [advanced_visibility.criteria] An array of visibility objects that defines the conditional criteria that needs to be met for the field to display. + * @property {Array} [advanced_visibility.children] */ /** - * #### Display conditions - * @description Occasionally, you may want to show a field or field group, but only under specfic conditions. Examples might include: `Address fields that correspond to a specific country` or `An image description that is only entered after an image is selected` - * @typedef {Object} DISPLAY_CONDITIONS - * @property {Object} [visibility] Sets the field's display conditions. For example, you can set a field to only display when another checkbox field has been selected + * #### Base field properties + * @memberof Types + * @typedef {Object} BASE_FIELDS + * @property {'half_width'} [display_width] Side by side fields + * @property {string} [help_text] Display help text + * @property {?string} [inline_help_text] Display help text inline + * @property {boolean} [required] Make the field required + * @property {boolean} [locked] Hide the field from the user + * @property {Object} [inherited_value] Inherited value options + * @property {string} [inherited_value.default_value_path] + * @property {Object} [inherited_value.property_value_paths] + * @property {string} [inherited_value.property_value_paths.color] + * @property {Object} [occurrence] Repeated fields options + * @property {number} [occurrence.min] Minimum number of repeated fields + * @property {?number} [occurrence.max] Maximum number of repeated fields + * @property {string} [occurrence.sorting_label_field] Field to sort the repeated fields + * @property {?number} [occurrence.default] Default number of repeated fields + * @property {Object} [visibility] Display conditions + * @property {?string} [visibility.controlling_field_path] Path of the field that controls the display condition + * @property {?string} [visibility.controlling_value_regex] The regular expression in the controlling field that needs to be present for the field to display. + * @property {'NOT_EQUAL'|'EQUAL'|'EMPTY'|'NOT_EMPTY'|'MATCHES_REGEX'|null} [visibility.operator] + * @property {?string} [visibility.property] Sets visibility based on a specific property (`src`, `name`) * @property {HIDDEN_SUBFIELDS} [visibility.hidden_subfields] Hide subfields of a field. For example, you can hide the margin from spacing field and show only the padding. Ony works for Theme settings fields. - * @property {?string} [visibility.controlling_field_path] The path of the field that controls the display condition. If the field is not nested inside a field group, use the field's name (i.e. `field_name`). For fields nested in groups, the path should match its grouping structure, separated by a period. For example: `field_group_name.field_name` or `parent_group.child_group.field_name` - * @property {?string} [visibility.controlling_value_regex] The regular expression in the controlling field that needs to be present for the field to display. The regex must match the entire string (not a subset) and is run case-sensitively. - * @property {'NOT_EQUAL'|'EQUAL'|'EMPTY'|'NOT_EMPTY'|'MATCHES_REGEX'} [visibility.operator=EMPTY] `EMPTY` The operator that defines how the `controlling_value_regex` value needs to be met - * @property {?string} [visibility.property] Sets visibility based on a specific property of the target field. For example, you can enable visibility when an image field's src property is equal to a specific value. By default, if no value is provided for this field, visibility is based on the stringified value of `controlling_value_regex`. - * @property {Object} [advanced_visibility] To include multiple criteria with multiple operators, as well as order of operations, you can use advanced_visibility. - * @property {'OR'|'AND'} [advanced_visibility.boolean_operator=OR] `OR` The boolean operator for the conditional criteria. Can be `AND` or `OR` - * @property {Array} [advanced_visibility.criteria] An array of visibility objects that defines the conditional criteria that needs to be met for the field to display. - * @property {Array} [advanced_visibility.children] + * @property {'ADVANCED'} [visibility_rules] + * @property {ADVANCED_VISIBILITY} [advanced_visibility] To include multiple criteria with multiple operators, as well as order of operations, you can use advanced_visibility. */ /** - * #### Repeater options - * @description Repeaters are fields and groups that can create multiple objects and display them using a for loop. Examples might include: `A gallery of multiple slides`, `A collection of testimonials`, `A group of staff head shots` - * @typedef {Object} REPEATER_OPTIONS - * @property {Object} [occurrence] To make the editing experience better and prevent content editors from providing values that you have not programmatically accommodated for, we allow you to set minimum and maximum values for how many items content creators can add to a repeating field or repeating group. Keep `occurrence` object empty to just enable a feature - `repeater_options: {occurrence: {}}` - * @property {?number} [occurrence.min] Minimum number of occurrences of this field group. Prevents users from having less than this number of items in the UI. - * @property {?number} [occurrence.max] Maximum number of occurrences of this group. Prevents the content creator from adding more than this number of items in the UI. + * #### Group field properties + * @memberof Types + * @typedef {Object} GROUP_FIELD + * @property {boolean} [expanded] Show the group expanded + * @property {Array|Object} [default] */ +// ======================== +// General module fields +// ======================== /** - * #### Repeater options with defaults - * @description Repeaters are fields and groups that can create multiple objects and display them using a for loop. Examples might include: `A gallery of multiple slides`, `A collection of testimonials`, `A group of staff head shots` - * @typedef {Object} REPEATER_OPTIONS_DEFAULT - * @property {Object} occurrence To make the editing experience better and prevent content editors from providing values that you have not programmatically accommodated for, we allow you to set minimum and maximum values for how many items content creators can add to a repeating field or repeating group - * @property {?number} [occurrence.min] Minimum number of occurrences of this field group. Prevents users from having less than this number of items in the UI. - * @property {?number} [occurrence.max] Maximum number of occurrences of this group. Prevents the content creator from adding more than this number of items in the UI. - * @property {?number} occurrence.default The default number of items to show in the UI when the field is first added to the module. - * @property {Array} default default group values. If `occurrence.default` defined this should be an array of objects|strings|numbers + * #### boolean field properties + * @memberof Types + * @typedef {Object} BOOLEAN_FIELD + * @property {boolean} [default] + * @property {'toggle'|'checkbox'} [display] */ /** - * #### Required module fields - * @typedef {Object} COMMON_FIELDS - * @property {string} id - * @property {string} name - * @property {string} label - * @property {string} type - * @property {string} [tab] - * @property {boolean} [locked] - * @property {Array} [children] + * #### choice field properties + * @memberof Types + * @typedef {Object} CHOICE_FIELD + * @property {Array} choices + * @property {string|number|Array} [default] + * @property {'radio'|'select'|'checkbox'} [display] + * @property {boolean} [multiple] + * @property {boolean} [reordering_enabled] + * @property {string} [placeholder] + * @property {string} [preset] https://developers.hubspot.com/beta-docs/reference/cms/fields/module-theme-fields#choice-button-presets + */ + +/** + * #### number field properties + * @memberof Types + * @typedef {Object} NUMBER_FIELD + * @property {number|number[]|null} [default] + * @property {string} [prefix] + * @property {string} [suffix] + * @property {number} [min] + * @property {number} [max] + * @property {number} [step] + * @property {'text'|'slider'} [display] + * @property {'ANY'|'INTEGER'} [format] + * @property {string} [placeholder] +*/ + +/** + * #### color field properties + * @memberof Types + * @typedef {Object} COLOR_FIELD + * @property {boolean} [show_opacity] + * @property {Object|Array} [default] + * @property {string} [default.color] + * @property {string} [default.css] + * @property {string} [default.hex] + * @property {number} [default.opacity] + * @property {string} [default.rgb] + * @property {string} [default.rgba] + */ + +/** + * #### icon field properties + * @memberof Types + * @typedef {Object} ICON_FIELD + * @property {'fontawesome-5'|'fontawesome-5.0.10'|'fontawesome-5.14.0'|'fontawesome-6.4.2'} [set] + * @property {Object} [default] + * @property {string} [default.name] + * @property {'SOLID'|'REGULAR'} [default.type] + * @property {string} [default.unicode] + */ + +/** + * #### image field properties + * @memberof Types + * @typedef {Object} IMAGE_FIELD + * @property {boolean} [resizable] + * @property {boolean} [responsive] + * @property {boolean} [show_loading] + * @property {Object} [default] + * @property {string} [default.src] + * @property {string} [default.alt] + * @property {number} [default.width] + * @property {number} [default.height] + * @property {number} [default.max_width] + * @property {number} [default.max_height] + * @property {'auto'|'auto_custom_max'|'auto_full_width'|'exact'} [default.size_type] + * @property {'disabled'|'eager'|'lazy'} [default.loading] + */ + +/** + * #### FontVariants field properties + * @memberof Types + * @typedef {'100'|'100i'|'200'|'200i'|'300'|'300i'|'400'|'400i'|'500'|'500i'|'600'|'600i'|'700'|'700i'|'800'|'800i'|'900'|'900i'} FONT_VARIANTS_FIELD + */ + +/** + * @typedef {Object} TEXT_STYLES + * @property {'underline'|'none'} [`text-decoration`] + * @property {'italic'|'normal'} [`font-style`] + * @property {'bold'|'normal'} [`font-weight`] + */ + +/** + * #### font field properties + * @memberof Types + * @typedef {Object} FONT_FIELD + * @property {boolean} [load_external_fonts] + * @property {Object} [default] + * @property {string} default.font + * @property {'DEFAULT'|'GOOGLE'|'CUSTOM'} [default.font_set] + * @property {Array} [default.google_font_variants] + * @property {number} [default.size] + * @property {CSS_UNIT} [default.size_unit] + * @property {string} [default.color] + * @property {TEXT_STYLES} [default.styles] + * @property {string} [default.variant] + * @property {string} [default.fallback] + */ + +// ======================== +// Content module fields +// ======================== +/** + * #### Text field properties + * @memberof Types + * @typedef {Object} TEXT_FIELD + * @property {string} [default] + * @property {string} [validation_regex] Regular expression to validate the field + * @property {string} [validation_error_message] Error message to display when the field does not match the regular expression + * @property {string} [placeholder] Placeholder text + * @property {boolean} [allow_new_line] Allow new line + * @property {boolean} [show_emoji_picker] Show emoji picker + */ + +/** + * #### URL types + * @memberof Types + * @typedef {'EXTERNAL' | 'CONTENT' | 'FILE' | 'EMAIL_ADDRESS' | 'BLOG' | 'CALL_TO_ACTION' | 'WHATSAPP_NUMBER' | 'PHONE_NUMBER' | 'PAYMENT'} URL_TYPES + */ + +/** + * #### link field properties + * @memberof Types + * @typedef {Object} LINK_FIELD + * @property {string} [placeholder] + * @property {boolean} [show_advanced_rel_options] + * @property {Array} [supported_types] + * @property {Object} [default] + * @property {Object} [default.url] + * @property {URL_TYPES} [default.url.type] + * @property {number} [default.url.content_id] + * @property {string} [default.url.href] + * @property {boolean} [default.open_in_new_tab] + * @property {boolean} [default.no_follow] + * @property {boolean} [default.sponsored] + * @property {boolean} [default.user_generated_content] + */ + +/** + * #### RichTextFeatures field properties + * @memberof Types + * @typedef {'block'|'font_family'|'font_size'|'bold'|'italic'|'underline'|'text_color'|'background_color'|'alignment'|'bulleted_list'|'numbered_list'|'lineheight'|'outdent'|'indent'|'strikethrough'|'superscript'|'subscript'|'code_format'|'link'|'image'|'emoji'|'personalize'|'cta'|'embed'|'video'|'table'|'charmap'|'anchor'|'hr'|'nonbreaking_space'|'source_code'|'visual_blocks'|'colors'|'fonts'|'indents'|'lists'|'standard_emphasis'|'advanced_emphasis'} RICH_TEXT_FEATURES + */ + +/** + * #### richtext field properties + * @memberof Types + * @typedef {Object} RICHTEXT_FIELD + * @property {string} [default] + * @property {Array} [enabled_features] + */ + +/** + * #### url field properties + * @memberof Types + * @typedef {Object} URL_FIELD + * @property {Array} supportedTypes + * @property {Object} [default] + * @property {URL_TYPES} [default.type] + * @property {string} [default.href] + * @property {number} [default.content_id] + * @property {Array} [default.supported_types] + */ + +/** + * #### video field properties + * @memberof Types + * @typedef {Object} VIDEO_FIELD + * @property {boolean} [resizable] + * @property {boolean} [show_advanced_options] + * @property {boolean} [show_preview] + * @property {Object} [default] + * @property {number} [default.player_id] + * @property {number} [default.width] + * @property {number} [default.height] + * @property {number} [default.max_width] + * @property {number} [default.max_height] + * @property {'exact'|'auto'|'auto_custom_max'|'auto_full_width'} [default.size_type] + * @property {string} [default.player_type] + * @property {boolean} [default.loop_video] + * @property {boolean} [default.mute_by_default] + * @property {boolean} [default.autoplay] + * @property {boolean} [default.hide_controls] + * @property {any} [default.conversion_asset] + */ + +/** + * #### Date field properties + * @memberof Types + * @typedef {Object} DATE_FIELD + * @property {number} [default] + */ + +/** + * #### DataAndTime field properties + * @memberof Types + * @typedef {Object} DATA_AND_TIME_FIELD + * @property {number} [default] + * @property {number} [step] + */ + +/** + * #### Embeded field properties + * @memberof Types + * @typedef {Object} EMBEDED_FIELD + * @property {Array<'oembed'|'html'|'media_bridge'>} [supported_source_types] + * @property {Array<'photo'|'video'|'link'|'rich'>} [supported_oembed_types] + * @property {Array} [supported_media_bridge_providers] + * @property {boolean} [resizable] + * @property {boolean} [show_preview] + * @property {Object} [default] + * @property {'oembed'|'html'|'media_bridge'} [default.source_type] + * @property {string} [default.oembed_string] + * @property {Object} [default.oembed_response] + * @property {'auto'|'auto_custom_max'|'auto_full_width'|'exact'} [default.size_type] + * @property {number} [default.width] + * @property {number} [default.height] + * @property {number} [default.max_width] + * @property {number} [default.max_height] + * @property {string} [default.embed_type] + * @property {Object} [default.media_bridge_object] + */ + +/** + * #### Simple menu field properties + * @memberof Types + * @typedef {Object} SIMPLE_MENU_FIELD + * @property {Array<{}>} [default] + */ + +/** + * #### Blog field properties + * @memberof Types + * @typedef {Object} BLOG_FIELD + * @property {string} [placeholder] + * @property {number|Array} [default] + */ + +/** + * #### CRMobject field properties + * @memberof Types + * @typedef {Object} CRM_OBJECT_FIELD + * @property {'COMPANY'|'CONTACT'|'TICKET'|'QUOTE'|'PRODUCT'|'MARKETING EVENT'|'DEAL'} object_type + * @property {Array} [properties_to_fetch] + * @property {string} [displayFormat] + * @property {Array} [display_properties] + * @property {string} [placeholder] + * @property {Object} [default] + * @property {number} [default.id] +*/ + +/** + * #### CRMobjectProperty field properties + * @memberof Types + * @typedef {Object} CRM_OBJECT_PROPERTY_FIELD + * @property {'COMPANY'|'CONTACT'|'TICKET'|'QUOTE'|'PRODUCT'|'MARKETING EVENT'|'DEAL'} object_type + * @property {string} [placeholder] + * @property {Object} [default] + * @property {string} [default.property] + */ + +/** + * #### EmailAddress field properties + * @memberof Types + * @typedef {Object} EMAIL_ADDRESS_FIELD + * @property {Array} [default] + * @property {boolean} [allow_custom_email_addresses] + */ + +/** + * #### File field properties + * @memberof Types + * @typedef {Object} FILE_FIELD + * @property {'file'|'image'|'video'|'document'|'audio'} picker + * @property {string} [default] + */ + +/** + * #### Form field properties + * @memberof Types + * @typedef {Object} FORM_FIELD + * @property {boolean} [allow_inline_form_editing] + * @property {boolean} [disable_inline_form_editing] + * @property {Object} [default] + * @property {string} [default.form_id] + * @property {'HUBSPOT'|'TICKET_FORM'} [default.form_type] + * @property {'inline'|'redirect'} [default.response_type] + * @property {string} [default.message] + * @property {number} [default.redirect_id] + * @property {string} [default.redirect_url] + * @property {Array} [default.workflow_id] + */ + +/** + * #### HubDbRow field properties + * @memberof Types + * @typedef {Object} HUBDB_ROW_FIELD + * @property {string|number} table_name_or_id + * @property {Array} [columns_to_fetch] + * @property {string} [display_format] + * @property {Array} [display_columns] + * @property {string} [placeholder] + * @property {Object} [default] + * @property {number} [default.id] + */ + +/** + * #### HubDbTable field properties + * @memberof Types + * @typedef {Object} HUBDB_TABLE_FIELD + * @property {string} [placeholder] + * @property {string|number} [default] + */ + +/** + * #### Logo field properties + * @memberof Types + * @typedef {Object} LOGO_FIELD + * @property {Object} [default] + * @property {string} [default.src] + * @property {string} [default.alt] + * @property {number} [default.width] + * @property {number} [default.height] + * @property {boolean} [default.override_inherited_src] + * @property {string} [default.loading] + * @property {boolean} [default.suppress_company_name] + * @property {boolean} show_loading + */ + +/** + * #### Meeting field properties + * @memberof Types + * @typedef {Object} MEETING_FIELD + * @property {boolean} [embeddable] + * @property {string} [placeholder] + * @property {string} [default] + */ + +/** + * #### Menu field properties + * @memberof Types + * @typedef {Object} MENU_FIELD + * @property {string} [placeholder] + * @property {number|string} [default] + */ + +/** + * #### Page field properties + * @memberof Types + * @typedef {Object} PAGE_FIELD + * @property {string} [placeholder] + * @property {number|number[]} [default] + */ + +/** + * #### Payment field properties + * @memberof Types + * @typedef {Object} PAYMENT_FIELD + * @property {Object} [default] + * @property {number} [default.id] + */ + +/** + * #### podcast field properties + * @memberof Types + * @typedef {Object} PODCAST_FIELD + * @property {Object} [default] + * @property {number} [default.episode_id] + * @property {number} [default.show_id] + */ + +/** + * #### Product field properties + * @memberof Types + * @typedef {Object} PRODUCT_FIELD + */ + +/** + * #### Tag field properties + * @memberof Types + * @typedef {Object} TAG_FIELD + * @property {'SLUG'|'NAME'|'ID'|'ALL'} tagValue + * @property {string|number|{slug: string; id: string; name: string}} [default] + */ + +/** + * #### HUBL field properties + * @memberof Types + * @typedef {Object} HUBL_FIELD + * @property {string} [default] */ /** - * #### nested common fields - * @typedef { COMMON_FIELDS | COMMON_FIELDS[] | Array | Array> } NESTED_COMMON_FIELDS + * #### HTML field properties + * @memberof Types + * @typedef {Object} HTML_FIELD + * @property {string} [default] */ -export default {} +/** + * #### cta field properties + * @memberof Types + * @typedef {Object} CTA_FIELD + * @property {string} [default] + */ + +/** + * #### Audio field properties + * @memberof Types + * @typedef {Object} AUDIO_FIELD + * @property {Object} [default] + * @property {number} [default.file_id] + * @property {number} [default.file_duration] + * @property {string} [default.file_extension] + * @property {string} [default.file_url] + * @property {string} [default.title] + */ + +// ======================== +// Style module fields +// ======================== +/** + * #### alignment field properties + * @memberof Types + * @typedef {Object} ALIGNMENT_FIELD + * @property {'HORIZONTAL'|'VERTICAL'|'BOTH'} [alignment_direction] + * @property {Object} [default] + * @property {'LEFT'|'CENTER'|'RIGHT'} [default.horizontal_align] + * @property {'TOP'|'MIDDLE'|'BOTTOM'} [default.vertical_align] + */ + +/** + * #### SpacingValueType field properties + * @memberof Types + * @typedef {Object} SPACING_VALUE_TYPE + * @property {number} value + * @property {CSS_UNIT} units + */ + +/** + * #### SpacingLimitType field properties + * @memberof Types + * @typedef {Object} SPACING_LIMIT_TYPE + * @property {number} min + * @property {number} max + * @property {Array} units + */ + +/** + * #### spacing field properties + * @memberof Types + * @typedef {Object} SPACING_FIELD + * @property {Object} [limits] + * @property {Object} [limits.padding] + * @property {SPACING_LIMIT_TYPE} [limits.padding.top] + * @property {SPACING_LIMIT_TYPE} [limits.padding.right] + * @property {SPACING_LIMIT_TYPE} [limits.padding.bottom] + * @property {SPACING_LIMIT_TYPE} [limits.padding.left] + * @property {Object} [limits.margin] + * @property {SPACING_LIMIT_TYPE} [limits.margin.top] + * @property {SPACING_LIMIT_TYPE} [limits.margin.right] + * @property {SPACING_LIMIT_TYPE} [limits.margin.bottom] + * @property {SPACING_LIMIT_TYPE} [limits.margin.left] + * @property {Object} [default] + * @property {Object} [default.padding] + * @property {SPACING_LIMIT_TYPE} [default.padding.top] + * @property {SPACING_LIMIT_TYPE} [default.padding.right] + * @property {SPACING_LIMIT_TYPE} [default.padding.bottom] + * @property {SPACING_LIMIT_TYPE} [default.padding.left] + * @property {Object} [default.margin] + * @property {SPACING_LIMIT_TYPE} [default.margin.top] + * @property {SPACING_LIMIT_TYPE} [default.margin.right] + * @property {SPACING_LIMIT_TYPE} [default.margin.bottom] + * @property {SPACING_LIMIT_TYPE} [default.margin.left] + */ + +/** + * #### GradientColorType field properties + * @memberof Types + * @typedef {Object} GRADIENT_COLOR_TYPE + * @property {Object} color + * @property {string} color.r + * @property {string} color.g + * @property {string} color.b + * @property {number} color.a + */ + +/** + * #### gradient field properties + * @memberof Types + * @typedef {Object} GRADIENT_FIELD + * @property {Object} [default] + * @property {Object} [default.side_or_corner] + * @property {'TOP'|'BOTTOM'} [default.side_or_corner.verticalSide] + * @property {'LEFT'|'RIGHT'} [default.side_or_corner.horizontalSide] + * @property {Array} [default.colors] + */ + +/** + * #### backgroundimage field properties + * @memberof Types + * @typedef {Object} BACKGROUND_IMAGE_FIELD + * @property {Object} [default] + * @property {string} [default.src] + * @property {'TOP_LEFT'|'TOP_CENTER'|'TOP_RIGHT'|'MIDDLE_LEFT'|'MIDDLE_CENTER'|'MIDDLE_RIGHT'|'BOTTOM_LEFT'|'BOTTOM_CENTER'|'BOTTOM_RIGHT'} [default.background_position] + * @property {'COVER'|'CONTAIN'|'AUTO'} [default.background_size] + */ + +/** + * #### border field properties + * @memberof Types + * @typedef {Object} BORDER_SIDE_TYPE + * @property {Object} [width] + * @property {number} width.value + * @property {CSS_UNIT} width.units + * @property {number} [opacity] + * @property {'none'|'solid'|'dashed'|'double'|'groove'|'ridge'|'inset'|'outset'} [style] + * @property {string} [color] + */ + +/** + * #### border field properties + * @memberof Types + * @typedef {Object} BORDER_FIELD + * @property {boolean} [allow_custom_border_sides] + * @property {Object} [default] + * @property {Object} [default.border_radius] + * @property {number} default.border_radius.value + * @property {CSS_UNIT} default.border_radius.units + * @property {BORDER_SIDE_TYPE} [default.top] + * @property {BORDER_SIDE_TYPE} [default.right] + * @property {BORDER_SIDE_TYPE} [default.bottom] + * @property {BORDER_SIDE_TYPE} [default.left] + */ + +/** + * #### textalignment field properties + * @memberof Types + * @typedef {Object} TEXT_ALIGNMENT_FIELD + * @property {Object} [default] + * @property {'LEFT'|'CENTER'|'RIGHT'|'JUSTIFY'} [default.text_align] + */ + +/** + * #### textalignment field properties + * @memberof Types + * @typedef {Array} CHILDRENS + */ diff --git a/lib/utils/common-properties.js b/lib/utils/common-properties.js deleted file mode 100644 index addc3c1..0000000 --- a/lib/utils/common-properties.js +++ /dev/null @@ -1,91 +0,0 @@ -import * as TYPES from '../types/types.js' // eslint-disable-line - -/** - * @ignore - * @typedef {TYPES.EDITOR_OPTIONS} EDITOR_OPTIONS {@link EDITOR_OPTIONS} - * @typedef {TYPES.DISPLAY_CONDITIONS} DISPLAY_CONDITIONS {@link DISPLAY_CONDITIONS} - * @typedef {TYPES.REPEATER_OPTIONS} REPEATER_OPTIONS {@link REPEATER_OPTIONS} - * @typedef {TYPES.REPEATER_OPTIONS_DEFAULT} REPEATER_OPTIONS_DEFAULT {@link REPEATER_OPTIONS_DEFAULT} - */ - -// ************* -// HubSpot common field properties. Properties used by all fields -// ************* - -/** - * #### Editor options - * @ignore - * @param {EDITOR_OPTIONS} fields - * @returns {EDITOR_OPTIONS} - */ -function EditorOptions (fields) { - this.display_width = fields.display_width ?? null - this.required = fields.required ?? false - this.locked = fields.locked ?? false - if ('help_text' in fields) { - this.help_text = fields.help_text - } - if ('inline_help_text' in fields) { - this.inline_help_text = fields.inline_help_text - } - this.inherited_value = fields?.inherited_value ?? null - return this -} - -/** - * #### Display conditions - * @ignore - * @param {DISPLAY_CONDITIONS} fields - * @returns {DISPLAY_CONDITIONS} - */ -function DisplayConditions (fields) { - // visibility - if ('visibility' in fields) { - this.visibility = fields.visibility ?? {} - this.visibility.controlling_field_path = fields.visibility?.controlling_field_path ?? null - this.visibility.controlling_value_regex = fields.visibility?.controlling_value_regex ?? null - this.visibility.operator = fields.visibility?.operator ?? 'EMPTY' - this.visibility.property = fields.visibility?.property ?? null - this.visibility.hidden_subfields = fields.visibility?.hidden_subfields ?? {} - } - // advanced visibility - if ('advanced_visibility' in fields) { - this.visibility_rules = 'ADVANCED' - this.advanced_visibility = fields.advanced_visibility ?? {} - this.advanced_visibility.boolean_operator = fields.advanced_visibility?.boolean_operator ?? 'OR' - this.advanced_visibility.criteria = fields.advanced_visibility?.criteria ?? [] - } - return this -} - -/** - * #### Repeater options - * @ignore - * @param {REPEATER_OPTIONS} fields - * @returns {REPEATER_OPTIONS} - */ -function RepeaterOptions (fields) { - if ('occurrence' in fields) { - this.occurrence = fields.occurrence ?? {} - this.occurrence.min = fields.occurrence?.min ?? null - this.occurrence.max = fields.occurrence?.max ?? null - } - return this -} - -/** - * #### Repeater options with default - * @ignore - * @param {REPEATER_OPTIONS_DEFAULT} fields - * @returns {REPEATER_OPTIONS_DEFAULT} - */ -function RepeaterOptionsDefault (fields) { - this.occurrence = fields.occurrence - this.occurrence.min = fields.occurrence?.min ?? null - this.occurrence.max = fields.occurrence?.max ?? null - this.occurrence.default = fields.occurrence?.default ?? null - this.default = fields.default - return this -} - -export { EditorOptions, DisplayConditions, RepeaterOptions, RepeaterOptionsDefault } diff --git a/lib/utils/initField.js b/lib/utils/initField.js deleted file mode 100644 index d0d4e79..0000000 --- a/lib/utils/initField.js +++ /dev/null @@ -1,57 +0,0 @@ -import * as TYPES from '../types/types.js' // eslint-disable-line -import { EditorOptions, DisplayConditions, RepeaterOptions, RepeaterOptionsDefault } from './common-properties.js' - -/** - * @ignore - * @typedef {TYPES.EDITOR_OPTIONS} EDITOR_OPTIONS {@link EDITOR_OPTIONS} - * @typedef {TYPES.DISPLAY_CONDITIONS} DISPLAY_CONDITIONS {@link DISPLAY_CONDITIONS} - * @typedef {TYPES.REPEATER_OPTIONS} REPEATER_OPTIONS {@link REPEATER_OPTIONS} - * @typedef {TYPES.REPEATER_OPTIONS_DEFAULT} REPEATER_OPTIONS_DEFAULT {@link REPEATER_OPTIONS_DEFAULT} - * @typedef {TYPES.COMMON_FIELDS} COMMON_FIELDS {@link COMMON_FIELDS} - */ - -/** - * @ignore - * @summary Extra General module content fields structure - * @description This is an Extra structure to help developers distinguish between the different types of fields that can be used in a module. This is not a real HubSpot structure and should not be used in any way other than with `hubspot-fields-js`. - * @typedef {Object} EXTRA_FIELDS_MAP - * @property {EDITOR_OPTIONS} [editor_options] Editor options - * @property {DISPLAY_CONDITIONS} [display_conditions] Display conditions, keep `visibility` object empty to just enable a feature - `display_conditions: {visibility: {}}` - * @property {REPEATER_OPTIONS} [repeater_options] Repeater options, keep `occurrence` object empty to just enable a feature - `repeater_options: {occurrence: {}}` - * @property {REPEATER_OPTIONS_DEFAULT} [repeater_options_default] Repeater options with more than `0` repeated fields and `default` values for each field - */ - -/** - * Initialize a field with common properties - * @ignore - * @param {string} label - * @param {string} name - * @param {string} type - * @param {EXTRA_FIELDS_MAP} [fields] - * @returns {COMMON_FIELDS} - */ -function initField (label, name, type, fields) { - /** @type {COMMON_FIELDS} */ - const requiredFields = { - id: '', - name, - label, - type - } - const editorOptions = new EditorOptions({ ...fields?.editor_options }) - const displayConditions = new DisplayConditions({ ...fields?.display_conditions }) - const repeaterOptions = new RepeaterOptions({ ...fields?.repeater_options }) - let repeaterOptionsDefault - if (fields?.repeater_options_default) { - repeaterOptionsDefault = new RepeaterOptionsDefault({ ...fields.repeater_options_default }) - } - return { - ...requiredFields, - ...editorOptions, - ...displayConditions, - ...repeaterOptions, - ...repeaterOptionsDefault - } -} - -export { initField } diff --git a/package-lock.json b/package-lock.json index 3068dd1..69be076 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,24 +9,33 @@ "version": "0.0.2", "license": "MIT", "devDependencies": { - "@types/node": "~20.3.1", - "del": "~7.0.0", - "execa": "~7.1.1", - "husky": "~8.0.1", + "@types/node": "~20.12.7", + "del": "~7.1.0", + "execa": "~8.0.1", + "husky": "~9.0.11", "jsdoc": "~4.0.2", "modern-jsdoc-template": "~1.0.0", "standard": "~17.1.0", - "typescript": "~5.1.3" + "typescript": "~5.4.5" }, "engines": { "node": ">=16.20", "npm": ">=8.19" } }, + "node_modules/@aashutoshrathi/word-wrap": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", + "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/@babel/parser": { - "version": "7.21.8", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.21.8.tgz", - "integrity": "sha512-6zavDGdzG3gUqAdWvlLFfk+36RilI+Pwyuuh7HItyeScCWP3k6i8vKclAQ0bM/0y/Kz/xiwvxhMv9MgTJP5gmA==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.4.tgz", + "integrity": "sha512-zTvEBcghmeBma9QIGunWevvBAp4/Qu9Bdq+2k0Ot4fVMD6v3dsC9WOcRSKk7tRRyBM/53yKMJko9xOatGQAwSg==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -51,23 +60,23 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.5.1.tgz", - "integrity": "sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ==", + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", + "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", "dev": true, "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, "node_modules/@eslint/eslintrc": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.3.tgz", - "integrity": "sha512-+5gy6OQfk+xx3q0d6jGZZC3f3KzAkXc/IanVxd1is/VIIziRqqt3ongQz0FiTUXqTk0c7aDB3OaFuKnuSoJicQ==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.5.2", + "espree": "^9.6.0", "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", @@ -83,22 +92,22 @@ } }, "node_modules/@eslint/js": { - "version": "8.43.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.43.0.tgz", - "integrity": "sha512-s2UHCoiXfxMvmfzqoN+vrQ84ahUSYde9qNO1MdxmoEhyHWsfmwOpFlwYV+ePJEVc7gFnATGUi376WowX1N7tFg==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", + "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz", - "integrity": "sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==", + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", "dev": true, "dependencies": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", "minimatch": "^3.0.5" }, "engines": { @@ -119,15 +128,15 @@ } }, "node_modules/@humanwhocodes/object-schema": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", "dev": true }, "node_modules/@jsdoc/salty": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/@jsdoc/salty/-/salty-0.2.5.tgz", - "integrity": "sha512-TfRP53RqunNe2HBobVBJ0VLhK1HbfvBYeTC1ahnN64PWvyYyGebmMiPkuwvD9fpw2ZbkoPb8Q7mwy0aR8Z9rvw==", + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/@jsdoc/salty/-/salty-0.2.8.tgz", + "integrity": "sha512-5e+SFVavj1ORKlKaKr2BmTOekmXbelU7dC0cDkQLqag7xfuTPuGMUFx7KWJuv4bYZrTsoL2Z18VVCOKYxzoHcg==", "dev": true, "dependencies": { "lodash": "^4.17.21" @@ -178,9 +187,9 @@ "dev": true }, "node_modules/@types/linkify-it": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-3.0.2.tgz", - "integrity": "sha512-HZQYqbiFVWufzCwexrvh694SOim8z2d+xJl5UNamcvQFejLY/2YUtzXHYi3cHdI7PMlS8ejH2slRAOJQ32aNbA==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-3.0.5.tgz", + "integrity": "sha512-yg6E+u0/+Zjva+buc3EIb+29XEg4wltq7cSmd4Uc2EE/1nUVmxyzpX6gUXD0V8jIrG0r7YeOGVIbYRkxeooCtw==", "dev": true }, "node_modules/@types/markdown-it": { @@ -194,21 +203,30 @@ } }, "node_modules/@types/mdurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@types/mdurl/-/mdurl-1.0.2.tgz", - "integrity": "sha512-eC4U9MlIcu2q0KQmXszyn5Akca/0jrQmwDRgpAMJai7qBWq4amIQhZyNau4VYGtCeALvW1/NtjzJJ567aZxfKA==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/mdurl/-/mdurl-1.0.5.tgz", + "integrity": "sha512-6L6VymKTzYSrEf4Nev4Xa1LCHKrlTlYCBMTlQKFuddo1CvQcE52I0mwfOJayueUC7MJuXOeHTcIU683lzd0cUA==", "dev": true }, "node_modules/@types/node": { - "version": "20.3.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.3.1.tgz", - "integrity": "sha512-EhcH/wvidPy1WeML3TtYFGR83UzjxeWRen9V402T8aUGYsCHOmfoisV3ZSg03gAFIbLq8TnWOJ0f4cALtnSEUg==", + "version": "20.12.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.7.tgz", + "integrity": "sha512-wq0cICSkRLVaf3UGLMGItu/PtdY7oaXaI/RVU+xliKVOtRna3PRY57ZDfztpDL0n11vfymMUnXv8QwYCO7L1wg==", + "dev": true, + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", "dev": true }, "node_modules/acorn": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", - "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -289,28 +307,32 @@ "dev": true }, "node_modules/array-buffer-byte-length": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", - "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", + "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "is-array-buffer": "^3.0.1" + "call-bind": "^1.0.5", + "is-array-buffer": "^3.0.4" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/array-includes": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.6.tgz", - "integrity": "sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw==", + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.8.tgz", + "integrity": "sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4", - "get-intrinsic": "^1.1.3", + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.4", "is-string": "^1.0.7" }, "engines": { @@ -320,15 +342,55 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/array.prototype.findlast": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/array.prototype.findlast/-/array.prototype.findlast-1.2.5.tgz", + "integrity": "sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-shim-unscopables": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.findlastindex": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.5.tgz", + "integrity": "sha512-zfETvRFA8o7EiNn++N5f/kaCw221hrpGsDmcpndVupkPzEc1Wuf3VgC0qby1BbHs7f5DVYjgtEU2LLh5bqeGfQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-shim-unscopables": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/array.prototype.flat": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz", - "integrity": "sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz", + "integrity": "sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", "es-shim-unscopables": "^1.0.0" }, "engines": { @@ -339,14 +401,14 @@ } }, "node_modules/array.prototype.flatmap": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.1.tgz", - "integrity": "sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz", + "integrity": "sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", "es-shim-unscopables": "^1.0.0" }, "engines": { @@ -356,24 +418,61 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/array.prototype.tosorted": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.1.tgz", - "integrity": "sha512-pZYPXPRl2PqWcsUs6LOMn+1f1532nEoPTYowBtqLwAW+W8vSVhkIGnmOX1t/UQjD6YGI0vcD2B1U7ZFGQH9jnQ==", + "node_modules/array.prototype.toreversed": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/array.prototype.toreversed/-/array.prototype.toreversed-1.1.2.tgz", + "integrity": "sha512-wwDCoT4Ck4Cz7sLtgUmzR5UV3YF5mFHUlbChCzZBQZ+0m2cl/DH3tKgvphv1nKgFsJ48oCSg6p91q2Vm0I/ZMA==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4", - "es-shim-unscopables": "^1.0.0", - "get-intrinsic": "^1.1.3" + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0" + } + }, + "node_modules/array.prototype.tosorted": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.3.tgz", + "integrity": "sha512-/DdH4TiTmOKzyQbp/eadcCVexiCb36xJg7HshYOYJnNZFDj33GEv0P7GxsynpShhq4OLYJzbGcBDkLsDt7MnNg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "es-abstract": "^1.22.3", + "es-errors": "^1.1.0", + "es-shim-unscopables": "^1.0.2" + } + }, + "node_modules/arraybuffer.prototype.slice": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", + "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "es-abstract": "^1.22.3", + "es-errors": "^1.2.1", + "get-intrinsic": "^1.2.3", + "is-array-buffer": "^3.0.4", + "is-shared-array-buffer": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/available-typed-arrays": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", - "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", "dev": true, + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, "engines": { "node": ">= 0.4" }, @@ -416,18 +515,18 @@ } }, "node_modules/builtins": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.0.1.tgz", - "integrity": "sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.1.0.tgz", + "integrity": "sha512-SW9lzGTLvWTP1AY8xeAMZimqDrIaSdLQUcVr9DMef51niJ022Ri87SwRRKYm4A6iHfkPaiVUu/Duw2Wc4J7kKg==", "dev": true, "dependencies": { "semver": "^7.0.0" } }, "node_modules/builtins/node_modules/semver": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", - "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -440,13 +539,19 @@ } }, "node_modules/call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", "dev": true, "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -554,6 +659,57 @@ "node": ">= 8" } }, + "node_modules/data-view-buffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", + "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz", + "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz", + "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -577,12 +733,30 @@ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dev": true, + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/define-properties": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz", - "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", "dev": true, "dependencies": { + "define-data-property": "^1.0.1", "has-property-descriptors": "^1.0.0", "object-keys": "^1.1.1" }, @@ -594,9 +768,9 @@ } }, "node_modules/del": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/del/-/del-7.0.0.tgz", - "integrity": "sha512-tQbV/4u5WVB8HMJr08pgw0b6nG4RGt/tj+7Numvq+zqcvUFeMaIWWOUFltiU+6go8BSO2/ogsB4EasDaj0y68Q==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/del/-/del-7.1.0.tgz", + "integrity": "sha512-v2KyNk7efxhlyHpjEvfyxaAihKKK0nWCuf6ZtqZcFFpQRG0bJ12Qsr0RpvsICMjAAZ8DOVCxrlqpxISlMHC4Kg==", "dev": true, "dependencies": { "globby": "^13.1.2", @@ -615,18 +789,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/del/node_modules/is-path-inside": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-4.0.0.tgz", - "integrity": "sha512-lJJV/5dYS+RcL8uQdBDW9c9uWFLLBNRyFhnAKXw5tVqLlKZ4RMGZKv+YQ/IA3OhD+RpbJa1LLFM1FQPGyIXvOA==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/dir-glob": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", @@ -670,45 +832,57 @@ } }, "node_modules/es-abstract": { - "version": "1.21.2", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.21.2.tgz", - "integrity": "sha512-y/B5POM2iBnIxCiernH1G7rC9qQoM77lLIMQLuob0zhp8C56Po81+2Nj0WFKnd0pNReDTnkYryc+zhOzpEIROg==", - "dev": true, - "dependencies": { - "array-buffer-byte-length": "^1.0.0", - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "es-set-tostringtag": "^2.0.1", + "version": "1.23.3", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz", + "integrity": "sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "arraybuffer.prototype.slice": "^1.0.3", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "data-view-buffer": "^1.0.1", + "data-view-byte-length": "^1.0.1", + "data-view-byte-offset": "^1.0.0", + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-set-tostringtag": "^2.0.3", "es-to-primitive": "^1.2.1", - "function.prototype.name": "^1.1.5", - "get-intrinsic": "^1.2.0", - "get-symbol-description": "^1.0.0", + "function.prototype.name": "^1.1.6", + "get-intrinsic": "^1.2.4", + "get-symbol-description": "^1.0.2", "globalthis": "^1.0.3", "gopd": "^1.0.1", - "has": "^1.0.3", - "has-property-descriptors": "^1.0.0", - "has-proto": "^1.0.1", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.0.3", "has-symbols": "^1.0.3", - "internal-slot": "^1.0.5", - "is-array-buffer": "^3.0.2", + "hasown": "^2.0.2", + "internal-slot": "^1.0.7", + "is-array-buffer": "^3.0.4", "is-callable": "^1.2.7", - "is-negative-zero": "^2.0.2", + "is-data-view": "^1.0.1", + "is-negative-zero": "^2.0.3", "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.2", + "is-shared-array-buffer": "^1.0.3", "is-string": "^1.0.7", - "is-typed-array": "^1.1.10", + "is-typed-array": "^1.1.13", "is-weakref": "^1.0.2", - "object-inspect": "^1.12.3", + "object-inspect": "^1.13.1", "object-keys": "^1.1.1", - "object.assign": "^4.1.4", - "regexp.prototype.flags": "^1.4.3", - "safe-regex-test": "^1.0.0", - "string.prototype.trim": "^1.2.7", - "string.prototype.trimend": "^1.0.6", - "string.prototype.trimstart": "^1.0.6", - "typed-array-length": "^1.0.4", + "object.assign": "^4.1.5", + "regexp.prototype.flags": "^1.5.2", + "safe-array-concat": "^1.1.2", + "safe-regex-test": "^1.0.3", + "string.prototype.trim": "^1.2.9", + "string.prototype.trimend": "^1.0.8", + "string.prototype.trimstart": "^1.0.8", + "typed-array-buffer": "^1.0.2", + "typed-array-byte-length": "^1.0.1", + "typed-array-byte-offset": "^1.0.2", + "typed-array-length": "^1.0.6", "unbox-primitive": "^1.0.2", - "which-typed-array": "^1.1.9" + "which-typed-array": "^1.1.15" }, "engines": { "node": ">= 0.4" @@ -717,27 +891,85 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-iterator-helpers": { + "version": "1.0.18", + "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.18.tgz", + "integrity": "sha512-scxAJaewsahbqTYrGKJihhViaM6DDZDDoucfvzNbK0pOren1g/daDQ3IAhzn+1G14rBG7w+i5N+qul60++zlKA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.0", + "es-errors": "^1.3.0", + "es-set-tostringtag": "^2.0.3", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "globalthis": "^1.0.3", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.0.3", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.7", + "iterator.prototype": "^1.1.2", + "safe-array-concat": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", + "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", + "dev": true, + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/es-set-tostringtag": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz", - "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz", + "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==", "dev": true, "dependencies": { - "get-intrinsic": "^1.1.3", - "has": "^1.0.3", - "has-tostringtag": "^1.0.0" + "get-intrinsic": "^1.2.4", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.1" }, "engines": { "node": ">= 0.4" } }, "node_modules/es-shim-unscopables": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", - "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz", + "integrity": "sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==", "dev": true, "dependencies": { - "has": "^1.0.3" + "hasown": "^2.0.0" } }, "node_modules/es-to-primitive": { @@ -767,27 +999,28 @@ } }, "node_modules/eslint": { - "version": "8.43.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.43.0.tgz", - "integrity": "sha512-aaCpf2JqqKesMFGgmRPessmVKjcGXqdlAYLLC3THM8t5nBRZRQ+st5WM/hoJXkdioEXLLbXgclUpM0TXo5HX5Q==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", + "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.4.0", - "@eslint/eslintrc": "^2.0.3", - "@eslint/js": "8.43.0", - "@humanwhocodes/config-array": "^0.11.10", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", - "ajv": "^6.10.0", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", "debug": "^4.3.2", "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.0", - "eslint-visitor-keys": "^3.4.1", - "espree": "^9.5.2", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -797,7 +1030,6 @@ "globals": "^13.19.0", "graphemer": "^1.4.0", "ignore": "^5.2.0", - "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", "is-path-inside": "^3.0.3", @@ -807,9 +1039,8 @@ "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.1", + "optionator": "^0.9.3", "strip-ansi": "^6.0.1", - "strip-json-comments": "^3.1.0", "text-table": "^0.2.0" }, "bin": { @@ -876,14 +1107,14 @@ } }, "node_modules/eslint-import-resolver-node": { - "version": "0.3.7", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.7.tgz", - "integrity": "sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA==", + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", + "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==", "dev": true, "dependencies": { "debug": "^3.2.7", - "is-core-module": "^2.11.0", - "resolve": "^1.22.1" + "is-core-module": "^2.13.0", + "resolve": "^1.22.4" } }, "node_modules/eslint-import-resolver-node/node_modules/debug": { @@ -896,9 +1127,9 @@ } }, "node_modules/eslint-module-utils": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz", - "integrity": "sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.1.tgz", + "integrity": "sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q==", "dev": true, "dependencies": { "debug": "^3.2.7" @@ -965,26 +1196,28 @@ } }, "node_modules/eslint-plugin-import": { - "version": "2.27.5", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.27.5.tgz", - "integrity": "sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==", + "version": "2.29.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz", + "integrity": "sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==", "dev": true, "dependencies": { - "array-includes": "^3.1.6", - "array.prototype.flat": "^1.3.1", - "array.prototype.flatmap": "^1.3.1", + "array-includes": "^3.1.7", + "array.prototype.findlastindex": "^1.2.3", + "array.prototype.flat": "^1.3.2", + "array.prototype.flatmap": "^1.3.2", "debug": "^3.2.7", "doctrine": "^2.1.0", - "eslint-import-resolver-node": "^0.3.7", - "eslint-module-utils": "^2.7.4", - "has": "^1.0.3", - "is-core-module": "^2.11.0", + "eslint-import-resolver-node": "^0.3.9", + "eslint-module-utils": "^2.8.0", + "hasown": "^2.0.0", + "is-core-module": "^2.13.1", "is-glob": "^4.0.3", "minimatch": "^3.1.2", - "object.values": "^1.1.6", - "resolve": "^1.22.1", - "semver": "^6.3.0", - "tsconfig-paths": "^3.14.1" + "object.fromentries": "^2.0.7", + "object.groupby": "^1.0.1", + "object.values": "^1.1.7", + "semver": "^6.3.1", + "tsconfig-paths": "^3.15.0" }, "engines": { "node": ">=4" @@ -1040,9 +1273,9 @@ } }, "node_modules/eslint-plugin-n/node_modules/semver": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", - "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -1067,26 +1300,29 @@ } }, "node_modules/eslint-plugin-react": { - "version": "7.32.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.32.2.tgz", - "integrity": "sha512-t2fBMa+XzonrrNkyVirzKlvn5RXzzPwRHtMvLAtVZrt8oxgnTQaYbU6SXTOO1mwQgp1y5+toMSKInnzGr0Knqg==", + "version": "7.34.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.34.1.tgz", + "integrity": "sha512-N97CxlouPT1AHt8Jn0mhhN2RrADlUAsk1/atcT2KyA/l9Q/E6ll7OIGwNumFmWfZ9skV3XXccYS19h80rHtgkw==", "dev": true, "dependencies": { - "array-includes": "^3.1.6", - "array.prototype.flatmap": "^1.3.1", - "array.prototype.tosorted": "^1.1.1", + "array-includes": "^3.1.7", + "array.prototype.findlast": "^1.2.4", + "array.prototype.flatmap": "^1.3.2", + "array.prototype.toreversed": "^1.1.2", + "array.prototype.tosorted": "^1.1.3", "doctrine": "^2.1.0", + "es-iterator-helpers": "^1.0.17", "estraverse": "^5.3.0", "jsx-ast-utils": "^2.4.1 || ^3.0.0", "minimatch": "^3.1.2", - "object.entries": "^1.1.6", - "object.fromentries": "^2.0.6", - "object.hasown": "^1.1.2", - "object.values": "^1.1.6", + "object.entries": "^1.1.7", + "object.fromentries": "^2.0.7", + "object.hasown": "^1.1.3", + "object.values": "^1.1.7", "prop-types": "^15.8.1", - "resolve": "^2.0.0-next.4", - "semver": "^6.3.0", - "string.prototype.matchall": "^4.0.8" + "resolve": "^2.0.0-next.5", + "semver": "^6.3.1", + "string.prototype.matchall": "^4.0.10" }, "engines": { "node": ">=4" @@ -1108,12 +1344,12 @@ } }, "node_modules/eslint-plugin-react/node_modules/resolve": { - "version": "2.0.0-next.4", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.4.tgz", - "integrity": "sha512-iMDbmAWtfU+MHpxt/I5iWI7cY6YVEZUQ3MBgPQ++XD1PELuJHIl82xBmObyP2KyQmkNB2dsqF7seoQQiAn5yDQ==", + "version": "2.0.0-next.5", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.5.tgz", + "integrity": "sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==", "dev": true, "dependencies": { - "is-core-module": "^2.9.0", + "is-core-module": "^2.13.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, @@ -1125,9 +1361,9 @@ } }, "node_modules/eslint-scope": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.0.tgz", - "integrity": "sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw==", + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", "dev": true, "dependencies": { "esrecurse": "^4.3.0", @@ -1168,9 +1404,9 @@ } }, "node_modules/eslint-visitor-keys": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", - "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1191,13 +1427,34 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/eslint/node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/eslint/node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/espree": { - "version": "9.5.2", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.2.tgz", - "integrity": "sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw==", + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", "dev": true, "dependencies": { - "acorn": "^8.8.0", + "acorn": "^8.9.0", "acorn-jsx": "^5.3.2", "eslint-visitor-keys": "^3.4.1" }, @@ -1251,23 +1508,23 @@ } }, "node_modules/execa": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-7.1.1.tgz", - "integrity": "sha512-wH0eMf/UXckdUYnO21+HDztteVv05rq2GXksxT4fCGeHkBhw1DROXh40wcjMcRqDOWE7iPJ4n3M7e2+YFP+76Q==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", + "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", "dev": true, "dependencies": { "cross-spawn": "^7.0.3", - "get-stream": "^6.0.1", - "human-signals": "^4.3.0", + "get-stream": "^8.0.1", + "human-signals": "^5.0.0", "is-stream": "^3.0.0", "merge-stream": "^2.0.0", "npm-run-path": "^5.1.0", "onetime": "^6.0.0", - "signal-exit": "^3.0.7", + "signal-exit": "^4.1.0", "strip-final-newline": "^3.0.0" }, "engines": { - "node": "^14.18.0 || ^16.14.0 || >=18.0.0" + "node": ">=16.17" }, "funding": { "url": "https://github.com/sindresorhus/execa?sponsor=1" @@ -1280,9 +1537,9 @@ "dev": true }, "node_modules/fast-glob": { - "version": "3.2.12", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", - "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", "dev": true, "dependencies": { "@nodelib/fs.stat": "^2.0.2", @@ -1295,18 +1552,6 @@ "node": ">=8.6.0" } }, - "node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", @@ -1320,9 +1565,9 @@ "dev": true }, "node_modules/fastq": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", - "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", "dev": true, "dependencies": { "reusify": "^1.0.4" @@ -1369,12 +1614,13 @@ } }, "node_modules/flat-cache": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", "dev": true, "dependencies": { - "flatted": "^3.1.0", + "flatted": "^3.2.9", + "keyv": "^4.5.3", "rimraf": "^3.0.2" }, "engines": { @@ -1382,9 +1628,9 @@ } }, "node_modules/flatted": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", - "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", + "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", "dev": true }, "node_modules/for-each": { @@ -1403,21 +1649,24 @@ "dev": true }, "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/function.prototype.name": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", - "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", + "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.0", - "functions-have-names": "^1.2.2" + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "functions-have-names": "^1.2.3" }, "engines": { "node": ">= 0.4" @@ -1436,14 +1685,19 @@ } }, "node_modules/get-intrinsic": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz", - "integrity": "sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", "dev": true, "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.3" + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -1462,25 +1716,26 @@ } }, "node_modules/get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", + "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", "dev": true, "engines": { - "node": ">=10" + "node": ">=16" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/get-symbol-description": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", - "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", + "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" + "call-bind": "^1.0.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4" }, "engines": { "node": ">= 0.4" @@ -1510,21 +1765,21 @@ } }, "node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, "dependencies": { - "is-glob": "^4.0.3" + "is-glob": "^4.0.1" }, "engines": { - "node": ">=10.13.0" + "node": ">= 6" } }, "node_modules/globals": { - "version": "13.20.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", - "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -1552,14 +1807,14 @@ } }, "node_modules/globby": { - "version": "13.2.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-13.2.0.tgz", - "integrity": "sha512-jWsQfayf13NvqKUIL3Ta+CIqMnvlaIDFveWE/dpOZ9+3AMEJozsxDvKA02zync9UuvOM8rOXzsD5GqKP4OnWPQ==", + "version": "13.2.2", + "resolved": "https://registry.npmjs.org/globby/-/globby-13.2.2.tgz", + "integrity": "sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w==", "dev": true, "dependencies": { "dir-glob": "^3.0.1", - "fast-glob": "^3.2.11", - "ignore": "^5.2.0", + "fast-glob": "^3.3.0", + "ignore": "^5.2.4", "merge2": "^1.4.1", "slash": "^4.0.0" }, @@ -1594,18 +1849,6 @@ "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", "dev": true }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, "node_modules/has-bigints": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", @@ -1625,21 +1868,21 @@ } }, "node_modules/has-property-descriptors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", - "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", "dev": true, "dependencies": { - "get-intrinsic": "^1.1.1" + "es-define-property": "^1.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/has-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", - "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", "dev": true, "engines": { "node": ">= 0.4" @@ -1661,12 +1904,12 @@ } }, "node_modules/has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", "dev": true, "dependencies": { - "has-symbols": "^1.0.2" + "has-symbols": "^1.0.3" }, "engines": { "node": ">= 0.4" @@ -1675,34 +1918,46 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/human-signals": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-4.3.1.tgz", - "integrity": "sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", + "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", "dev": true, "engines": { - "node": ">=14.18.0" + "node": ">=16.17.0" } }, "node_modules/husky": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.3.tgz", - "integrity": "sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==", + "version": "9.0.11", + "resolved": "https://registry.npmjs.org/husky/-/husky-9.0.11.tgz", + "integrity": "sha512-AB6lFlbwwyIqMdHYhwPe+kjOC3Oc5P3nThEoW/AaO2BX3vJDjWPFxYLxokUZOo6RNX20He3AaT8sESs9NJcmEw==", "dev": true, "bin": { - "husky": "lib/bin.js" + "husky": "bin.mjs" }, "engines": { - "node": ">=14" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/typicode" } }, "node_modules/ignore": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", - "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", + "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", "dev": true, "engines": { "node": ">= 4" @@ -1762,13 +2017,13 @@ "dev": true }, "node_modules/internal-slot": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz", - "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", + "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", "dev": true, "dependencies": { - "get-intrinsic": "^1.2.0", - "has": "^1.0.3", + "es-errors": "^1.3.0", + "hasown": "^2.0.0", "side-channel": "^1.0.4" }, "engines": { @@ -1776,14 +2031,16 @@ } }, "node_modules/is-array-buffer": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", - "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", + "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.0", - "is-typed-array": "^1.1.10" + "get-intrinsic": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -1795,6 +2052,21 @@ "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", "dev": true }, + "node_modules/is-async-function": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.0.0.tgz", + "integrity": "sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-bigint": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", @@ -1836,12 +2108,27 @@ } }, "node_modules/is-core-module": { - "version": "2.12.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.0.tgz", - "integrity": "sha512-RECHCBCd/viahWmwj6enj19sKbHfJrddi/6cBDsNTKbNq0f7VeaUkBo60BqzvPqo/W54ChS62Z5qyun7cfOMqQ==", + "version": "2.13.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", + "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", "dev": true, "dependencies": { - "has": "^1.0.3" + "hasown": "^2.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-data-view": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz", + "integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==", + "dev": true, + "dependencies": { + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -1871,6 +2158,33 @@ "node": ">=0.10.0" } }, + "node_modules/is-finalizationregistry": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.0.2.tgz", + "integrity": "sha512-0by5vtUJs8iFQb5TYUHHPudOR+qXYIMKtiUzvLIZITZUjknFmziyBJuLhVRc+Ds0dREFlskDNJKYIdIzu/9pfw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-generator-function": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", + "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -1883,10 +2197,22 @@ "node": ">=0.10.0" } }, + "node_modules/is-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", + "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-negative-zero": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", - "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", + "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", "dev": true, "engines": { "node": ">= 0.4" @@ -1932,12 +2258,15 @@ } }, "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-4.0.0.tgz", + "integrity": "sha512-lJJV/5dYS+RcL8uQdBDW9c9uWFLLBNRyFhnAKXw5tVqLlKZ4RMGZKv+YQ/IA3OhD+RpbJa1LLFM1FQPGyIXvOA==", "dev": true, "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/is-regex": { @@ -1956,13 +2285,28 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-set": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz", + "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-shared-array-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", - "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", + "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2" + "call-bind": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -2011,16 +2355,12 @@ } }, "node_modules/is-typed-array": { - "version": "1.1.10", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz", - "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==", + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", + "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", "dev": true, "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-tostringtag": "^1.0.0" + "which-typed-array": "^1.1.14" }, "engines": { "node": ">= 0.4" @@ -2029,6 +2369,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-weakmap": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz", + "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-weakref": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", @@ -2041,12 +2393,47 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-weakset": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.3.tgz", + "integrity": "sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "dev": true }, + "node_modules/iterator.prototype": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/iterator.prototype/-/iterator.prototype-1.1.2.tgz", + "integrity": "sha512-DR33HMMr8EzwuRL8Y9D3u2BMj8+RqSE850jfGu59kS7tbmPLzGkZmVSfyCFSDxuZiEY6Rzt3T2NA/qU+NwVj1w==", + "dev": true, + "dependencies": { + "define-properties": "^1.2.1", + "get-intrinsic": "^1.2.1", + "has-symbols": "^1.0.3", + "reflect.getprototypeof": "^1.0.4", + "set-function-name": "^2.0.1" + } + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -2103,6 +2490,12 @@ "node": ">=12.0.0" } }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true + }, "node_modules/json-parse-better-errors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", @@ -2134,18 +2527,29 @@ } }, "node_modules/jsx-ast-utils": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.3.tgz", - "integrity": "sha512-fYQHZTZ8jSfmWZ0iyzfwiU4WDX4HpHbMCZ3gPlWYiCl3BoeOTsqKBqnTVfH2rYT7eP5c3sVbeSPHnnJOaTrWiw==", + "version": "3.3.5", + "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz", + "integrity": "sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==", "dev": true, "dependencies": { - "array-includes": "^3.1.5", - "object.assign": "^4.1.3" + "array-includes": "^3.1.6", + "array.prototype.flat": "^1.3.1", + "object.assign": "^4.1.4", + "object.values": "^1.1.6" }, "engines": { "node": ">=4.0" } }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "dependencies": { + "json-buffer": "3.0.1" + } + }, "node_modules/klaw": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/klaw/-/klaw-3.0.0.tgz", @@ -2396,9 +2800,9 @@ "dev": true }, "node_modules/npm-run-path": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz", - "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz", + "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==", "dev": true, "dependencies": { "path-key": "^4.0.0" @@ -2432,9 +2836,9 @@ } }, "node_modules/object-inspect": { - "version": "1.12.3", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", - "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", + "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -2450,13 +2854,13 @@ } }, "node_modules/object.assign": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", - "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", + "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", "has-symbols": "^1.0.3", "object-keys": "^1.1.1" }, @@ -2468,28 +2872,29 @@ } }, "node_modules/object.entries": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.6.tgz", - "integrity": "sha512-leTPzo4Zvg3pmbQ3rDK69Rl8GQvIqMWubrkxONG9/ojtFE2rD9fjMKfSI5BxW3osRH1m6VdzmqK8oAY9aT4x5w==", + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.8.tgz", + "integrity": "sha512-cmopxi8VwRIAw/fkijJohSfpef5PdN0pMQJN6VC/ZKvn0LIknWD8KtgY6KlQdEc4tIjcQ3HxSMmnvtzIscdaYQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" }, "engines": { "node": ">= 0.4" } }, "node_modules/object.fromentries": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.6.tgz", - "integrity": "sha512-VciD13dswC4j1Xt5394WR4MzmAQmlgN72phd/riNp9vtD7tp4QQWJ0R4wvclXcafgcYK8veHRed2W6XeGBvcfg==", + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz", + "integrity": "sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -2498,28 +2903,46 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/object.groupby": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.3.tgz", + "integrity": "sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/object.hasown": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/object.hasown/-/object.hasown-1.1.2.tgz", - "integrity": "sha512-B5UIT3J1W+WuWIU55h0mjlwaqxiE5vYENJXIXZ4VFe05pNYrkKuK0U/6aFcb0pKywYJh7IhfoqUfKVmrJJHZHw==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/object.hasown/-/object.hasown-1.1.4.tgz", + "integrity": "sha512-FZ9LZt9/RHzGySlBARE3VF+gE26TxR38SdmqOqliuTnl9wrKulaQs+4dee1V+Io8VfxqzAfHu6YuRgUy8OHoTg==", "dev": true, "dependencies": { - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/object.values": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.6.tgz", - "integrity": "sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.0.tgz", + "integrity": "sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -2553,17 +2976,17 @@ } }, "node_modules/optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", "dev": true, "dependencies": { + "@aashutoshrathi/word-wrap": "^1.2.3", "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", "levn": "^0.4.1", "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" + "type-check": "^0.4.0" }, "engines": { "node": ">= 0.8.0" @@ -2785,6 +3208,15 @@ "node": ">=4" } }, + "node_modules/possible-typed-array-names": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", + "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -2806,9 +3238,9 @@ } }, "node_modules/punycode": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", - "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "dev": true, "engines": { "node": ">=6" @@ -2840,15 +3272,37 @@ "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", "dev": true }, + "node_modules/reflect.getprototypeof": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.6.tgz", + "integrity": "sha512-fmfw4XgoDke3kdI6h4xcUz1dG8uaiv5q9gcEwLS4Pnth2kxT+GZ7YehS1JTMGBQmtV7Y4GFGbs2re2NqhdozUg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.1", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "globalthis": "^1.0.3", + "which-builtin-type": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/regexp.prototype.flags": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz", - "integrity": "sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==", + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", + "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "functions-have-names": "^1.2.3" + "call-bind": "^1.0.6", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "set-function-name": "^2.0.1" }, "engines": { "node": ">= 0.4" @@ -2879,12 +3333,12 @@ } }, "node_modules/resolve": { - "version": "1.22.2", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", - "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", "dev": true, "dependencies": { - "is-core-module": "^2.11.0", + "is-core-module": "^2.13.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, @@ -2952,29 +3406,82 @@ "queue-microtask": "^1.2.2" } }, + "node_modules/safe-array-concat": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", + "integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "get-intrinsic": "^1.2.4", + "has-symbols": "^1.0.3", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/safe-regex-test": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", - "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", + "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.3", + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", "is-regex": "^1.1.4" }, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, "bin": { "semver": "bin/semver.js" } }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dev": true, + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-function-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", + "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", + "dev": true, + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -2997,24 +3504,34 @@ } }, "node_modules/side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", "dev": true, "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } }, "node_modules/slash": { "version": "4.0.0", @@ -3066,9 +3583,9 @@ } }, "node_modules/standard-engine": { - "version": "15.0.0", - "resolved": "https://registry.npmjs.org/standard-engine/-/standard-engine-15.0.0.tgz", - "integrity": "sha512-4xwUhJNo1g/L2cleysUqUv7/btn7GEbYJvmgKrQ2vd/8pkTmN8cpqAZg+BT8Z1hNeEH787iWUdOpL8fmApLtxA==", + "version": "15.1.0", + "resolved": "https://registry.npmjs.org/standard-engine/-/standard-engine-15.1.0.tgz", + "integrity": "sha512-VHysfoyxFu/ukT+9v49d4BRXIokFRZuH3z1VRxzFArZdjSCFpro6rEIU3ji7e4AoAtuSfKBkiOmsrDqKW5ZSRw==", "dev": true, "funding": [ { @@ -3095,33 +3612,41 @@ } }, "node_modules/string.prototype.matchall": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.8.tgz", - "integrity": "sha512-6zOCOcJ+RJAQshcTvXPHoxoQGONa3e/Lqx90wUA+wEzX78sg5Bo+1tQo4N0pohS0erG9qtCqJDjNCQBjeWVxyg==", + "version": "4.0.11", + "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.11.tgz", + "integrity": "sha512-NUdh0aDavY2og7IbBPenWqR9exH+E26Sv8e0/eTe1tltDGZL+GtBkDAnnyBtmekfK6/Dq3MkcGtzXFEd1LQrtg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4", - "get-intrinsic": "^1.1.3", + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", "has-symbols": "^1.0.3", - "internal-slot": "^1.0.3", - "regexp.prototype.flags": "^1.4.3", - "side-channel": "^1.0.4" + "internal-slot": "^1.0.7", + "regexp.prototype.flags": "^1.5.2", + "set-function-name": "^2.0.2", + "side-channel": "^1.0.6" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/string.prototype.trim": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz", - "integrity": "sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", + "integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.0", + "es-object-atoms": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -3131,28 +3656,31 @@ } }, "node_modules/string.prototype.trimend": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz", - "integrity": "sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz", + "integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/string.prototype.trimstart": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz", - "integrity": "sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", + "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -3246,9 +3774,9 @@ } }, "node_modules/tsconfig-paths": { - "version": "3.14.2", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz", - "integrity": "sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==", + "version": "3.15.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", + "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==", "dev": true, "dependencies": { "@types/json5": "^0.0.29", @@ -3281,24 +3809,83 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/typed-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", + "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/typed-array-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz", + "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-byte-offset": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz", + "integrity": "sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/typed-array-length": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", - "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.6.tgz", + "integrity": "sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", + "call-bind": "^1.0.7", "for-each": "^0.3.3", - "is-typed-array": "^1.1.9" + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13", + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/typescript": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.3.tgz", - "integrity": "sha512-XH627E9vkeqhlZFQuL+UsyAXEnibT0kWR2FWONlr4sTjvxyJYnyefgrkyECLzM5NenmKzRAy2rR/OlYLA1HkZw==", + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", + "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -3335,6 +3922,12 @@ "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==", "dev": true }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true + }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -3345,9 +3938,9 @@ } }, "node_modules/version-guard": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/version-guard/-/version-guard-1.1.1.tgz", - "integrity": "sha512-MGQLX89UxmYHgDvcXyjBI0cbmoW+t/dANDppNPrno64rYr8nH4SHSuElQuSYdXGEs0mUzdQe1BY+FhVPNsAmJQ==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/version-guard/-/version-guard-1.1.2.tgz", + "integrity": "sha512-D8d+YxCUpoqtCnQzDxm6SF7DLU3gr2535T4khAtMq4osBahsQnmSxuwXFdrbAdDGG8Uokzfis/jvyeFPdmlc7w==", "dev": true, "engines": { "node": ">=0.10.48" @@ -3384,18 +3977,24 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/which-typed-array": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz", - "integrity": "sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==", + "node_modules/which-builtin-type": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.1.3.tgz", + "integrity": "sha512-YmjsSMDBYsM1CaFiayOVT06+KJeXf0o5M/CAd4o1lTadFAtacTUM49zoYxr/oroopFDfhvN6iEcBxUyc3gvKmw==", "dev": true, "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "for-each": "^0.3.3", - "gopd": "^1.0.1", + "function.prototype.name": "^1.1.5", "has-tostringtag": "^1.0.0", - "is-typed-array": "^1.1.10" + "is-async-function": "^2.0.0", + "is-date-object": "^1.0.5", + "is-finalizationregistry": "^1.0.2", + "is-generator-function": "^1.0.10", + "is-regex": "^1.1.4", + "is-weakref": "^1.0.2", + "isarray": "^2.0.5", + "which-boxed-primitive": "^1.0.2", + "which-collection": "^1.0.1", + "which-typed-array": "^1.1.9" }, "engines": { "node": ">= 0.4" @@ -3404,13 +4003,41 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "node_modules/which-collection": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", + "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==", "dev": true, + "dependencies": { + "is-map": "^2.0.3", + "is-set": "^2.0.3", + "is-weakmap": "^2.0.2", + "is-weakset": "^2.0.3" + }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-typed-array": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", + "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/wrappy": { diff --git a/package.json b/package.json index f5ca157..484bfbd 100644 --- a/package.json +++ b/package.json @@ -31,29 +31,24 @@ "url": "https://github.com/Resultify/hubspot-fields-js.git" }, "scripts": { - "prepare": "husky install", + "prepare": "husky", "standardJs": "standard -v 'lib/**/*.js'", "checkJs": "tsc -p jsconfig.json --maxNodeModuleJsDepth 0", - "test1": "node test/1content-js-simple.module/fields.js", - "test2": "node test/1content-js.module/fields.js", - "test3": "node test/1contentgroup-js-simple.module/fields.js", - "test4": "node test/1style-js-simple.module/fields.js", - "test5": "node test/1style-js.module/fields.js", - "test6": "node test/1partials-js.module/fields.js", + "test1": "node test/all-fields.module/fields.js", "testDiff": "git diff --exit-code -- test/**/*.json", - "testAllFiles": "npm run test1 && npm run test2 && npm run test3 && npm run test4 && npm run test5 && npm run test6", + "testAllFiles": "npm run test1", "test": "npm run standardJs && npm run checkJs && npm run testAllFiles && npm run testDiff", "docs": "node build/docs.exec.mjs" }, "devDependencies": { - "@types/node": "~20.3.1", - "del": "~7.0.0", - "execa": "~7.1.1", - "husky": "~8.0.1", + "@types/node": "~20.12.7", + "del": "~7.1.0", + "execa": "~8.0.1", + "husky": "~9.0.11", "jsdoc": "~4.0.2", "modern-jsdoc-template": "~1.0.0", "standard": "~17.1.0", - "typescript": "~5.1.3" + "typescript": "~5.4.5" }, "engines": { "node": ">=16.20", diff --git a/partials/all.js b/partials/all.js deleted file mode 100644 index c0abdbf..0000000 --- a/partials/all.js +++ /dev/null @@ -1,30 +0,0 @@ -import * as button from './button.js' -import * as secondaryButton from './secondary-button.js' -import * as heading from './heading.js' -import * as subheading from './subheading.js' -import * as icon from './icon.js' -import * as image from './image.js' -import * as link from './link.js' -import * as secondaryLink from './secondary-link.js' -import * as richtext from './richtext.js' -import * as text from './text.js' - -/** - * #### Partials entry point - * @ignore - * @constant - */ -const pa = { - ...image, - ...icon, - ...text, - ...heading, - ...subheading, - ...richtext, - ...link, - ...secondaryLink, - ...button, - ...secondaryButton -} - -export { pa } diff --git a/partials/button.js b/partials/button.js deleted file mode 100644 index bb2398f..0000000 --- a/partials/button.js +++ /dev/null @@ -1,56 +0,0 @@ -/* eslint-disable no-unused-vars */ -import { - group, - styleGroup, - moduleFields as fi -} from '../index.js' - -const buttonGroup = [ - group('Button', 'button', {}, - fi.text('Text', 'text'), - fi.link('Link', 'link'), - fi.text('Accessible link label', 'accessible_link_label', { - placeholder: 'Accessible link label', - editor_options: { - help_text: 'If the link title is added at the end of repeated blocks of text, for example “Read more” links at the end of short teasers for blog posts, then you can provide more descriptive link text specifically for screen reader users using Accessible link label. It will be visually hidden for a normal view.' - } - }), - fi.boolean('Accessible link', 'accessible_link', { - default: true, - editor_options: { - help_text: 'Accessible link. Inform when a link opens a new window.' - } - }), - group('Icon', 'icon', - { - display_conditions: { - visibility: { - controlling_field_path: 'button.text', - operator: 'NOT_EMPTY' - } - } - }, - fi.icon('Icon', 'icon'), - fi.choice('Icon position', 'icon_position', { - choices: [ - ['left', 'Left'], - ['right', 'Right'] - ], - default: 'left', - editor_options: { - required: true - }, - display_conditions: { - visibility: { - controlling_field_path: 'button.icon.icon', - operator: 'NOT_EMPTY', - property: 'name' - } - } - }) - ) - ) - -] - -export { buttonGroup } diff --git a/partials/heading.js b/partials/heading.js deleted file mode 100644 index 65acd27..0000000 --- a/partials/heading.js +++ /dev/null @@ -1,190 +0,0 @@ -/* eslint-disable no-unused-vars */ -import { - group, - styleGroup, - moduleFields as fi -} from '../index.js' - -const heading = [ - fi.text('Heading', 'heading', { - allow_new_line: true - }) -] - -const headingGroup = [ - group('Heading', 'heading', {}, - fi.text('Text', 'text', { - allow_new_line: true - }), - fi.choice('Tag', 'heading_tag', { - choices: [ - ['h1', 'Heading 1 (H1)'], - ['h2', 'Heading 2 (H2)'], - ['h3', 'Heading 3 (H3)'], - ['h4', 'Heading 4 (H4)'], - ['h5', 'Heading 5 (H5)'], - ['h6', 'Heading 6 (H6)'] - ], - default: 'h2', - editor_options: { - help_text: 'Semantic heading tag (h1-h6)' - } - }), - fi.choice('Display', 'display', { - choices: [ - ['h1', 'Heading 1'], - ['h2', 'Heading 2'], - ['h3', 'Heading 3'], - ['h4', 'Heading 4'], - ['h5', 'Heading 5'], - ['h6', 'Heading 6'], - ['display-1', 'Heading display 1'], - ['display-2', 'Heading display 2'], - ['display-3', 'Heading display 3'], - ['display-4', 'Heading display 4'], - ['display-5', 'Heading display 5'], - ['display-6', 'Heading display 6'] - ], - editor_options: { - inline_help_text: 'Display different heading style', - help_text: 'Display different heading styles not related to semantic heading type (tag h1-h6)' - } - }), - group('Link', 'link', - { - display_conditions: { - visibility: { - controlling_field_path: 'heading.text', - operator: 'NOT_EMPTY' - } - } - }, - fi.link('Link', 'link'), - fi.boolean('Accessible link', 'accessible_link', { - editor_options: { - help_text: 'Accessible link. Inform when a link opens a new window.' - } - }) - ), - group('Icon', 'icon', - { - display_conditions: { - visibility: { - controlling_field_path: 'heading.text', - operator: 'NOT_EMPTY' - } - } - }, - fi.icon('Icon', 'icon'), - fi.choice('Icon position', 'icon_position', { - choices: [ - ['left', 'Left'], - ['right', 'Right'] - ], - default: 'left', - editor_options: { - required: true - }, - display_conditions: { - visibility: { - controlling_field_path: 'heading.icon.icon', - operator: 'NOT_EMPTY', - property: 'name' - } - } - }), - group('Accessibility options', 'accessibility_options', - { - display_conditions: { - visibility: { - controlling_field_path: 'heading.icon.icon', - operator: 'NOT_EMPTY', - property: 'name' - } - } - }, - fi.choice('Purpose', 'purpose', { - choices: [ - ['decorative', 'Ignored by screen reader (Decorative images)'], - ['semantic', 'Read by screen reader (Informative images)'] - ], - default: 'decorative', - editor_options: { - required: true, - help_text: 'Categorize the purpose of this icon for screen readers. Learn More' - } - }), - fi.text('Title', 'title', { - editor_options: { - help_text: 'This text will be read by screen readers to describe the icon.' - }, - display_conditions: { - visibility: { - controlling_field_path: 'heading.icon.accessibility_options.purpose', - operator: 'EQUAL', - controlling_value_regex: 'semantic' - } - } - }) - ) - ) - ) -] - -const headingStyle = [ - group('Heading', 'heading', - { - display_conditions: { - visibility: { - controlling_field_path: 'heading.text', - operator: 'NOT_EMPTY' - } - } - }, - group('Alignment', 'alignment', {}, - fi.alignment('Alignment', 'alignment') - ), - group('Spacing', 'spacing', {}, - fi.spacing('Spacing', 'spacing') - ), - group('Background', 'background', {}, - fi.color('Color', 'color') - ), - group('Custom theme overrides', 'custom_theme_overrides', - { - editor_options: { - help_text: 'Override global theme settings for the current component' - } - }, - fi.spacing('Spacing', 'spacing'), - fi.color('Color', 'color') - ), - group('Icon', 'icon', {}, - group('Custom theme overrides', 'custom_theme_overrides', - { - editor_options: { - help_text: 'Override global theme settings for the current component' - } - }, - fi.spacing('Spacing', 'spacing'), - fi.color('Background', 'background'), - fi.color('Color', 'color'), - fi.border('Border', 'border'), - fi.number('Border radius', 'border_radius', { - step: 1, - min: 0, - max: 100, - prefix: '%' - }), - fi.number('Size', 'size', { - min: 0, - max: 400, - step: 1, - suffix: 'px' - }) - ) - ) - ) -] - -export { heading, headingGroup, headingStyle } diff --git a/partials/icon.js b/partials/icon.js deleted file mode 100644 index 0e7db8e..0000000 --- a/partials/icon.js +++ /dev/null @@ -1,128 +0,0 @@ -/* eslint-disable no-unused-vars */ -import { - group, - styleGroup, - moduleFields as fi -} from '../index.js' - -const icon = fi.icon('Icon', 'icon') - -const iconGroup = [ - group('Icon', 'icon', {}, - fi.icon('Icon', 'icon'), - group('Accessibility options', 'accessibility_options', - { - display_conditions: { - visibility: { - controlling_field_path: 'icon.icon', - operator: 'NOT_EMPTY', - property: 'name' - } - } - }, - fi.choice('Purpose', 'purpose', { - choices: [ - ['decorative', 'Ignored by screen reader (Decorative images)'], - ['semantic', 'Read by screen reader (Informative images)'] - ], - default: 'decorative', - editor_options: { - help_text: 'Categorize the purpose of this icon for screen readers. Learn More' - } - }), - fi.text('Title', 'title', { - editor_options: { - help_text: 'This text will be read by screen readers to describe the icon.' - }, - display_conditions: { - visibility: { - controlling_field_path: 'icon.accessibility_options.purpose', - operator: 'EQUAL', - controlling_value_regex: 'semantic' - } - } - }) - ) - ) -] - -const iconStyle = [ - group('Icon', 'icon', - { - display_conditions: { - visibility: { - controlling_field_path: 'icon.icon', - operator: 'NOT_EMPTY', - property: 'name' - } - } - }, - group('Presets', 'presets', {}, - fi.choice('Icon color', 'icon_color', { - default: 'primary', - choices: [ - ['primary', 'Primary'], - ['secondary', 'Secondary'] - ], - editor_options: { - required: true - } - }), - fi.choice('Icon size', 'icon_size', { - default: 'regular', - choices: [ - ['small', 'Small'], - ['regular', 'Regular'], - ['large', 'Large'] - ], - editor_options: { - required: true - } - }), - fi.choice('Icon shape', 'icon_shape', { - default: 'circle', - choices: [ - ['circle', 'Circle'], - ['square', 'Square'] - ], - editor_options: { - required: true - } - }) - ), - group('Alignment', 'alignment', {}, - fi.alignment('Alignment', 'alignment') - ), - group('Spacing', 'spacing', {}, - fi.spacing('Spacing', 'spacing') - ), - group('Background', 'background', {}, - fi.color('Color', 'color') - ), - group('Custom theme overrides', 'custom_theme_overrides', - { - editor_options: { - help_text: 'Override global theme settings for the current component' - } - }, - fi.spacing('Spacing', 'spacing'), - fi.color('Background', 'background'), - fi.color('Color', 'color'), - fi.border('Border', 'border'), - fi.number('Border radius', 'border_radius', { - min: 0, - max: 100, - step: 1, - suffix: '%' - }), - fi.number('Size', 'size', { - step: 1, - min: 0, - max: 100, - prefix: '%' - }) - ) - ) -] - -export { icon, iconGroup, iconStyle } diff --git a/partials/image.js b/partials/image.js deleted file mode 100644 index c7dfa64..0000000 --- a/partials/image.js +++ /dev/null @@ -1,65 +0,0 @@ -/* eslint-disable no-unused-vars */ -import { - group, - styleGroup, - moduleFields as fi -} from '../index.js' - -const image = fi.image('Image', 'image') - -const imageGroup = [ - group('Image', 'image', {}, - fi.image('Image', 'image'), - group('Caption', 'caption', - { - display_conditions: { - visibility: { - controlling_field_path: 'image.image', - operator: 'NOT_EMPTY', - property: 'src' - } - } - }, - fi.richtext('Rich text', 'rich_text', { - enabled_features: [ - 'code_format', - 'subscript', - 'emoji', - 'underline', - 'superscript', - 'font_size', - 'link', - 'visual_blocks', - 'hr', - 'bold', - 'charmap', - 'italic', - 'personalize', - 'cta', - 'background_color', - 'anchor', - 'nonbreaking_space', - 'font_family', - 'text_color', - 'strikethrough', - 'alignment', - 'source_code' - ] - }) - ), - group('Link', 'link', - { - display_conditions: { - visibility: { - controlling_field_path: 'image.image', - operator: 'NOT_EMPTY', - property: 'src' - } - } - }, - fi.link('Link', 'link') - ) - ) -] - -export { image, imageGroup } diff --git a/partials/link.js b/partials/link.js deleted file mode 100644 index eb1f363..0000000 --- a/partials/link.js +++ /dev/null @@ -1,49 +0,0 @@ -/* eslint-disable no-unused-vars */ -import { - group, - styleGroup, - moduleFields as fi -} from '../index.js' - -const linkGroup = [ - group('Link', 'link', {}, - fi.text('Text', 'text'), - fi.link('Link', 'link'), - fi.boolean('Accessible link', 'accessible_link', { - default: true, - editor_options: { - help_text: 'Accessible link. Inform when a link opens a new window.' - } - }), - group('Icon', 'icon', - { - display_conditions: { - visibility: { - controlling_field_path: 'link.text', - operator: 'NOT_EMPTY' - } - } - }, - fi.icon('Icon', 'icon'), - fi.choice('Icon position', 'icon_position', { - choices: [ - ['left', 'Left'], - ['right', 'Right'] - ], - default: 'left', - editor_options: { - required: true - }, - display_conditions: { - visibility: { - controlling_field_path: 'link.icon.icon', - operator: 'NOT_EMPTY', - property: 'name' - } - } - }) - ) - ) -] - -export { linkGroup } diff --git a/partials/richtext.js b/partials/richtext.js deleted file mode 100644 index ee75a16..0000000 --- a/partials/richtext.js +++ /dev/null @@ -1,61 +0,0 @@ -/* eslint-disable no-unused-vars */ -import { - group, - styleGroup, - moduleFields as fi -} from '../index.js' - -const richtextGroup = [ - group('Rich text', 'richtext', {}, - fi.richtext('Rich text', 'rich_text', { - enabled_features: [ - 'bulleted_list', - 'emoji', - 'underline', - 'indent', - 'superscript', - 'font_size', - 'lineheight', - 'link', - 'hr', - 'video', - 'charmap', - 'italic', - 'cta', - 'outdent', - 'nonbreaking_space', - 'block', 'strikethrough', - 'embed', - 'table', - 'image', - 'code_format', - 'subscript', - 'visual_blocks', - 'bold', - 'personalize', - 'numbered_list', - 'background_color', - 'anchor', - 'font_family', - 'text_color', - 'alignment', - 'source_code' - ] - }), - fi.number('Truncate', 'truncate', - { - editor_options: { - help_text: 'Number of characters to truncate the text' - }, - display_conditions: { - visibility: { - controlling_field_path: 'richtext.rich_text', - operator: 'NOT_EMPTY' - } - } - } - ) - ) -] - -export { richtextGroup } diff --git a/partials/secondary-button.js b/partials/secondary-button.js deleted file mode 100644 index 10d308a..0000000 --- a/partials/secondary-button.js +++ /dev/null @@ -1,55 +0,0 @@ -/* eslint-disable no-unused-vars */ -import { - group, - styleGroup, - moduleFields as fi -} from '../index.js' - -const secondaryButtonGroup = [ - group('Secondary button', 'secondary_button', {}, - fi.text('Text', 'text'), - fi.link('Link', 'link'), - fi.text('Accessible link label', 'accessible_link_label', { - placeholder: 'Accessible link label', - editor_options: { - help_text: 'If the link title is added at the end of repeated blocks of text, for example “Read more” links at the end of short teasers for blog posts, then you can provide more descriptive link text specifically for screen reader users using Accessible link label. It will be visually hidden for a normal view.' - } - }), - fi.boolean('Accessible link', 'accessible_link', { - default: true, - editor_options: { - help_text: 'Accessible link. Inform when a link opens a new window.' - } - }), - group('Icon', 'icon', - { - display_conditions: { - visibility: { - controlling_field_path: 'secondary_button.text', - operator: 'NOT_EMPTY' - } - } - }, - fi.icon('Icon', 'icon'), - fi.choice('Icon position', 'icon_position', { - choices: [ - ['left', 'Left'], - ['right', 'Right'] - ], - default: 'left', - editor_options: { - required: true - }, - display_conditions: { - visibility: { - controlling_field_path: 'secondary_button.icon.icon', - operator: 'NOT_EMPTY', - property: 'name' - } - } - }) - ) - ) -] - -export { secondaryButtonGroup } diff --git a/partials/secondary-link.js b/partials/secondary-link.js deleted file mode 100644 index 61c0df0..0000000 --- a/partials/secondary-link.js +++ /dev/null @@ -1,51 +0,0 @@ -/* eslint-disable no-unused-vars */ -import { - group, - styleGroup, - moduleFields as fi -} from '../index.js' - -// const secondaryLink = [] - -const secondaryLinkGroup = [ - group('Secondary link', 'secondary_link', {}, - fi.text('Text', 'text'), - fi.link('Link', 'link'), - fi.boolean('Accessible link', 'accessible_link', { - default: true, - editor_options: { - help_text: 'Accessible link. Inform when a link opens a new window.' - } - }), - group('Icon', 'icon', - { - display_conditions: { - visibility: { - controlling_field_path: 'secondary_link.text', - operator: 'NOT_EMPTY' - } - } - }, - fi.icon('Icon', 'icon'), - fi.choice('Icon position', 'icon_position', { - choices: [ - ['left', 'Left'], - ['right', 'Right'] - ], - default: 'left', - editor_options: { - required: true - }, - display_conditions: { - visibility: { - controlling_field_path: 'secondary_link.icon.icon', - operator: 'NOT_EMPTY', - property: 'name' - } - } - }) - ) - ) -] - -export { secondaryLinkGroup } diff --git a/partials/subheading.js b/partials/subheading.js deleted file mode 100644 index d80762e..0000000 --- a/partials/subheading.js +++ /dev/null @@ -1,134 +0,0 @@ -/* eslint-disable no-unused-vars */ -import { - group, - styleGroup, - moduleFields as fi -} from '../index.js' - -const subheading = [ - fi.text('Subheading', 'subheading', { - allow_new_line: true - }) -] - -const subheadingGroup = [ - group('Subheading', 'subheading', {}, - fi.text('Text', 'text', { - allow_new_line: true - }), - fi.choice('Tag', 'heading_tag', { - choices: [ - ['h1', 'Heading 1 (H1)'], - ['h2', 'Heading 2 (H2)'], - ['h3', 'Heading 3 (H3)'], - ['h4', 'Heading 4 (H4)'], - ['h5', 'Heading 5 (H5)'], - ['h6', 'Heading 6 (H6)'] - ], - default: 'h3', - editor_options: { - help_text: 'Semantic heading tag (h1-h6)' - } - }), - fi.choice('Display', 'display', { - choices: [ - ['h1', 'Heading 1'], - ['h2', 'Heading 2'], - ['h3', 'Heading 3'], - ['h4', 'Heading 4'], - ['h5', 'Heading 5'], - ['h6', 'Heading 6'], - ['display-1', 'Heading display 1'], - ['display-2', 'Heading display 2'], - ['display-3', 'Heading display 3'], - ['display-4', 'Heading display 4'], - ['display-5', 'Heading display 5'], - ['display-6', 'Heading display 6'] - ], - editor_options: { - inline_help_text: 'Display different heading style', - help_text: 'Display different heading styles not related to semantic heading type (tag h1-h6)' - } - }), - group('Link', 'link', - { - display_conditions: { - visibility: { - controlling_field_path: 'subheading.text', - operator: 'NOT_EMPTY' - } - } - }, - fi.link('Link', 'link'), - fi.boolean('Accessible link', 'accessible_link', { - editor_options: { - help_text: 'Accessible link. Inform when a link opens a new window.' - } - }) - ), - group('Icon', 'icon', - { - display_conditions: { - visibility: { - controlling_field_path: 'subheading.text', - operator: 'NOT_EMPTY' - } - } - }, - fi.icon('Icon', 'icon'), - fi.choice('Icon position', 'icon_position', { - choices: [ - ['left', 'Left'], - ['right', 'Right'] - ], - default: 'left', - editor_options: { - required: true - }, - display_conditions: { - visibility: { - controlling_field_path: 'subheading.icon.icon', - operator: 'NOT_EMPTY', - property: 'name' - } - } - }), - group('Accessibility options', 'accessibility_options', - { - display_conditions: { - visibility: { - controlling_field_path: 'subheading.icon.icon', - operator: 'NOT_EMPTY', - property: 'name' - } - } - }, - fi.choice('Purpose', 'purpose', { - choices: [ - ['decorative', 'Ignored by screen reader (Decorative images)'], - ['semantic', 'Read by screen reader (Informative images)'] - ], - default: 'decorative', - editor_options: { - required: true, - help_text: 'Categorize the purpose of this icon for screen readers. Learn More' - } - }), - fi.text('Title', 'title', { - editor_options: { - help_text: 'This text will be read by screen readers to describe the icon.' - }, - display_conditions: { - visibility: { - controlling_field_path: 'heading.icon.accessibility_options.purpose', - operator: 'EQUAL', - controlling_value_regex: 'semantic' - } - } - }) - ) - ) - ) -] - -export { subheading, subheadingGroup } diff --git a/partials/text.js b/partials/text.js deleted file mode 100644 index eaebc18..0000000 --- a/partials/text.js +++ /dev/null @@ -1,90 +0,0 @@ -/* eslint-disable no-unused-vars */ -import { - group, - styleGroup, - moduleFields as fi -} from '../index.js' - -const text = fi.text('Text', 'text', { allow_new_line: true }) - -const textGroup = [ - group('Text', 'text', {}, - fi.text('Text', 'text', { - allow_new_line: true - }) - ) -] - -const textStyle = [ - group('Presets', 'presets', {}, - fi.choice('Custom_preset', 'custom preset', - { - choices: [ - ['Preset1', 'preset 1'], - ['Preset2', 'preset 2'], - ['Preset3', 'preset 3'] - ], - editor_options: { - help_text: 'Custom presets to globally restyle module' - } - } - ) - ), - group('Alignment', 'alignment', {}, - fi.alignment('Alignment', 'alignment', - { - alignment_direction: 'HORIZONTAL' - } - ) - ), - group('Spacing', 'spacing', {}, - fi.spacing('Spacing', 'spacing') - ), - group('Background', 'background', {}, - fi.color('Color', 'color') - ), - group('Custom_theme_overrides', 'custom theme overrides', - { - editor_options: { - help_text: 'Override global theme settings for the current component' - } - }, - fi.spacing('Spacing', 'spacing'), - fi.color('Background', 'background'), - fi.font('Font', 'font') - ) -] - -const textStyle2 = [ - group('Text', 'text', - { - display_conditions: { - visibility: { - controlling_field_path: 'text.text', - operator: 'NOT_EMPTY' - } - } - }, - group('Alignment', 'alignment', {}, - fi.alignment('Alignment', 'alignment') - ), - group('Spacing', 'spacing', {}, - fi.spacing('Spacing', 'spacing') - ), - group('Background', 'background', {}, - fi.color('Color', 'color') - ), - group('Custom theme overrides', 'custom_theme_overrides', - { - editor_options: { - help_text: 'Override global theme settings for the current component' - } - }, - fi.spacing('Spacing', 'spacing'), - fi.color('Background', 'background'), - fi.font('Font', 'font') - ) - ) -] - -export { text, textGroup, textStyle, textStyle2 } diff --git a/test/1content-js-simple.module/fields.js b/test/1content-js-simple.module/fields.js deleted file mode 100644 index 71905d1..0000000 --- a/test/1content-js-simple.module/fields.js +++ /dev/null @@ -1,22 +0,0 @@ -/* eslint-disable no-unused-vars */ -import { - group, - styleGroup, - init, - moduleFields as fi, - writeJson -} from '../../index.js' - -writeJson(init( - fi.boolean('Boolean', 'boolean_field'), - fi.choice('Choice', 'choice_field'), - fi.color('Color', 'color_field'), - fi.font('Font', 'font_field'), - fi.icon('Icon', 'icon_field'), - fi.image('Image', 'image_field'), - fi.link('Link', 'link_field'), - fi.number('Number', 'number_field'), - fi.richtext('Rich text', 'richtext_field'), - fi.text('Text', 'text_field'), - fi.url('URL', 'url_field') -)) diff --git a/test/1content-js-simple.module/fields.json b/test/1content-js-simple.module/fields.json deleted file mode 100644 index 93313e4..0000000 --- a/test/1content-js-simple.module/fields.json +++ /dev/null @@ -1,184 +0,0 @@ -[ - { - "display": "checkbox", - "default": false, - "id": "", - "name": "boolean_field", - "label": "Boolean", - "type": "boolean", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "multiple": false, - "reordering_enabled": true, - "display": "select", - "choices": [ - [ - "value 1", - "Label 1" - ], - [ - "value 2", - "Label 2" - ] - ], - "id": "", - "name": "choice_field", - "label": "Choice", - "type": "choice", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "default": { - "color": null, - "opacity": null - }, - "id": "", - "name": "color_field", - "label": "Color", - "type": "color", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "load_external_fonts": true, - "default": {}, - "id": "", - "name": "font_field", - "label": "Font", - "type": "font", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "icon_set": "fontawesome-6.4.2", - "default": {}, - "id": "", - "name": "icon_field", - "label": "Icon", - "type": "icon", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "responsive": true, - "resizable": true, - "show_loading": false, - "default": { - "size_type": "auto", - "src": "", - "alt": null, - "loading": "lazy" - }, - "id": "", - "name": "image_field", - "label": "Image", - "type": "image", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "show_advanced_rel_options": false, - "supported_types": [ - "EXTERNAL", - "CONTENT", - "FILE", - "EMAIL_ADDRESS", - "BLOG", - "CALL_TO_ACTION", - "PHONE_NUMBER", - "WHATSAPP_NUMBER" - ], - "default": { - "url": { - "content_id": null, - "type": "EXTERNAL", - "href": "" - }, - "open_in_new_tab": false, - "no_follow": false - }, - "id": "", - "name": "link_field", - "label": "Link", - "type": "link", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "display": "text", - "step": 1, - "id": "", - "name": "number_field", - "label": "Number", - "type": "number", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "id": "", - "name": "richtext_field", - "label": "Rich text", - "type": "richtext", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "allow_new_line": false, - "show_emoji_picker": false, - "validation_regex": "", - "id": "", - "name": "text_field", - "label": "Text", - "type": "text", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "supported_types": [ - "EXTERNAL", - "CONTENT", - "FILE", - "EMAIL_ADDRESS", - "BLOG", - "CALL_TO_ACTION", - "PHONE_NUMBER", - "WHATSAPP_NUMBER" - ], - "default": { - "content_id": null, - "href": "", - "type": "EXTERNAL" - }, - "id": "", - "name": "url_field", - "label": "URL", - "type": "url", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - } -] \ No newline at end of file diff --git a/test/1content-js.module/fields.js b/test/1content-js.module/fields.js deleted file mode 100644 index be71627..0000000 --- a/test/1content-js.module/fields.js +++ /dev/null @@ -1,102 +0,0 @@ -/* eslint-disable no-unused-vars */ -import { - group, - styleGroup, - init, - moduleFields as fi, - writeJson -} from '../../index.js' - -writeJson(init( - fi.boolean('Boolean', 'boolean_field', { - display: 'toggle', - default: true, - editor_options: { - help_text: 'tooltip', - required: true - } - }), - fi.choice('Choice', 'choice_field', { - default: 'value 1', - display: 'radio', - editor_options: { - locked: true, - inline_help_text: 'Inline' - } - }), - fi.color('Color', 'color_field', { - show_opacity: false, - default: { - color: '#FF0201' - }, - display_conditions: { - visibility: { - controlling_field_path: 'boolean_field', - operator: 'EQUAL', - controlling_value_regex: 'true' - } - } - }), - fi.font('Font', 'font_field', { - default: { - font: 'Open Sans', - fallback: 'sans-serif', - font_set: 'GOOGLE', - color: '#FF00FF', - variant: '600' - } - }), - fi.icon('Icon', 'icon_field'), - fi.image('Image', 'image_field', { - repeater_options: { - occurrence: { - max: 10 - } - } - }), - fi.link('Link', 'link_field', { - default: { - url: { - type: 'CONTENT' - } - }, - editor_options: { - required: true - }, - repeater_options: { - occurrence: {} - } - }), - fi.number('Number', 'number_field', { - suffix: '%', - max: 1000, - step: 1, - repeater_options_default: { - occurrence: { - min: 2, - default: 4 - }, - default: [] - } - - }), - fi.richtext('Rich text', 'richtext_field', { - default: '

Default rich text

' - }), - fi.text('Text', 'text_field', { - show_emoji_picker: true, - default: 'Default text', - placeholder: 'Placeholder', - repeater_options_default: { - occurrence: { - default: 5 - }, - default: ['Default text', 'Default text', 'Default text', 'Default text', 'Default text'] - } - }), - fi.url('URL', 'url_field', { - default: { - type: 'BLOG' - } - }) -)) diff --git a/test/1content-js.module/fields.json b/test/1content-js.module/fields.json deleted file mode 100644 index c3ec30e..0000000 --- a/test/1content-js.module/fields.json +++ /dev/null @@ -1,231 +0,0 @@ -[ - { - "display": "toggle", - "default": true, - "id": "", - "name": "boolean_field", - "label": "Boolean", - "type": "boolean", - "display_width": null, - "required": true, - "locked": false, - "help_text": "tooltip", - "inherited_value": null - }, - { - "multiple": false, - "reordering_enabled": true, - "display": "radio", - "choices": [ - [ - "value 1", - "Label 1" - ], - [ - "value 2", - "Label 2" - ] - ], - "default": "value 1", - "id": "", - "name": "choice_field", - "label": "Choice", - "type": "choice", - "display_width": null, - "required": false, - "locked": true, - "inline_help_text": "Inline", - "inherited_value": null - }, - { - "show_opacity": false, - "default": { - "color": "#FF0201", - "opacity": null - }, - "id": "", - "name": "color_field", - "label": "Color", - "type": "color", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null, - "visibility": { - "controlling_field_path": "boolean_field", - "operator": "EQUAL", - "controlling_value_regex": "true", - "property": null, - "hidden_subfields": {} - } - }, - { - "load_external_fonts": true, - "default": { - "font": "Open Sans", - "fallback": "sans-serif", - "font_set": "GOOGLE", - "color": "#FF00FF", - "variant": "600" - }, - "id": "", - "name": "font_field", - "label": "Font", - "type": "font", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "icon_set": "fontawesome-6.4.2", - "default": {}, - "id": "", - "name": "icon_field", - "label": "Icon", - "type": "icon", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "responsive": true, - "resizable": true, - "show_loading": false, - "default": { - "size_type": "auto", - "src": "", - "alt": null, - "loading": "lazy" - }, - "id": "", - "name": "image_field", - "label": "Image", - "type": "image", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null, - "occurrence": { - "max": 10, - "min": null - } - }, - { - "show_advanced_rel_options": false, - "supported_types": [ - "EXTERNAL", - "CONTENT", - "FILE", - "EMAIL_ADDRESS", - "BLOG", - "CALL_TO_ACTION", - "PHONE_NUMBER", - "WHATSAPP_NUMBER" - ], - "default": { - "url": { - "content_id": null, - "type": "CONTENT", - "href": "" - }, - "open_in_new_tab": false, - "no_follow": false - }, - "id": "", - "name": "link_field", - "label": "Link", - "type": "link", - "display_width": null, - "required": true, - "locked": false, - "inherited_value": null, - "occurrence": { - "min": null, - "max": null - } - }, - { - "display": "text", - "step": 1, - "max": 1000, - "suffix": "%", - "id": "", - "name": "number_field", - "label": "Number", - "type": "number", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null, - "occurrence": { - "min": 2, - "default": 4, - "max": null - }, - "default": [] - }, - { - "default": "

Default rich text

", - "id": "", - "name": "richtext_field", - "label": "Rich text", - "type": "richtext", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "allow_new_line": false, - "show_emoji_picker": true, - "validation_regex": "", - "placeholder": "Placeholder", - "default": [ - "Default text", - "Default text", - "Default text", - "Default text", - "Default text" - ], - "id": "", - "name": "text_field", - "label": "Text", - "type": "text", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null, - "occurrence": { - "default": 5, - "min": null, - "max": null - } - }, - { - "supported_types": [ - "EXTERNAL", - "CONTENT", - "FILE", - "EMAIL_ADDRESS", - "BLOG", - "CALL_TO_ACTION", - "PHONE_NUMBER", - "WHATSAPP_NUMBER" - ], - "default": { - "content_id": null, - "href": "", - "type": "BLOG" - }, - "id": "", - "name": "url_field", - "label": "URL", - "type": "url", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - } -] \ No newline at end of file diff --git a/test/1content-js.module/meta.json b/test/1content-js.module/meta.json deleted file mode 100644 index 38bc9a9..0000000 --- a/test/1content-js.module/meta.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "global" : false, - "host_template_types" : [ "PAGE", "BLOG_POST", "BLOG_LISTING" ], - "module_id" : 66611582142, - "is_available_for_new_content" : true -} \ No newline at end of file diff --git a/test/1content-js.module/module.css b/test/1content-js.module/module.css deleted file mode 100644 index a90fb5c..0000000 --- a/test/1content-js.module/module.css +++ /dev/null @@ -1 +0,0 @@ -/* module css / no hubl variables */ diff --git a/test/1content-js.module/module.html b/test/1content-js.module/module.html deleted file mode 100644 index e69de29..0000000 diff --git a/test/1content-js.module/module.js b/test/1content-js.module/module.js deleted file mode 100644 index e69de29..0000000 diff --git a/test/1contentgroup-js-simple.module/fields.js b/test/1contentgroup-js-simple.module/fields.js deleted file mode 100644 index db700c7..0000000 --- a/test/1contentgroup-js-simple.module/fields.js +++ /dev/null @@ -1,17 +0,0 @@ -/* eslint-disable no-unused-vars */ -import { - group, - styleGroup, - init, - moduleFields as fi, - writeJson -} from '../../index.js' - -writeJson(init( - group('Group', 'group', {}, - fi.text('Text', 'text_field'), - group('Group2', 'group2', {}, - fi.text('Text', 'text_field') - ) - ) -)) diff --git a/test/1contentgroup-js-simple.module/fields.json b/test/1contentgroup-js-simple.module/fields.json deleted file mode 100644 index 0782172..0000000 --- a/test/1contentgroup-js-simple.module/fields.json +++ /dev/null @@ -1,54 +0,0 @@ -[ - { - "type": "group", - "id": "", - "name": "group", - "label": "Group", - "children": [ - { - "allow_new_line": false, - "show_emoji_picker": false, - "validation_regex": "", - "id": "", - "name": "text_field", - "label": "Text", - "type": "text", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "type": "group", - "id": "", - "name": "group2", - "label": "Group2", - "children": [ - { - "allow_new_line": false, - "show_emoji_picker": false, - "validation_regex": "", - "id": "", - "name": "text_field", - "label": "Text", - "type": "text", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - } - ], - "expanded": false, - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - } - ], - "expanded": false, - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - } -] \ No newline at end of file diff --git a/test/1contentgroup-js-simple.module/meta.json b/test/1contentgroup-js-simple.module/meta.json deleted file mode 100644 index 080cf24..0000000 --- a/test/1contentgroup-js-simple.module/meta.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "global" : false, - "host_template_types" : [ "PAGE", "BLOG_POST", "BLOG_LISTING" ], - "module_id" : 66547932897, - "is_available_for_new_content" : true -} \ No newline at end of file diff --git a/test/1contentgroup-js-simple.module/module.css b/test/1contentgroup-js-simple.module/module.css deleted file mode 100644 index a90fb5c..0000000 --- a/test/1contentgroup-js-simple.module/module.css +++ /dev/null @@ -1 +0,0 @@ -/* module css / no hubl variables */ diff --git a/test/1contentgroup-js-simple.module/module.html b/test/1contentgroup-js-simple.module/module.html deleted file mode 100644 index e69de29..0000000 diff --git a/test/1contentgroup-js-simple.module/module.js b/test/1contentgroup-js-simple.module/module.js deleted file mode 100644 index e69de29..0000000 diff --git a/test/1partials-js.module/fields.js b/test/1partials-js.module/fields.js deleted file mode 100644 index 4b2ad0f..0000000 --- a/test/1partials-js.module/fields.js +++ /dev/null @@ -1,36 +0,0 @@ -/* eslint-disable no-unused-vars */ -import { - group, - styleGroup, - init, - moduleFields as fi, - writeJson -} from '../../index.js' -import { pa } from '../../partials/all.js' - -writeJson(init( - fi.text('Text', 'text', { allow_new_line: true }), - group('Group2', 'group2', {}, - pa.buttonGroup, - fi.text('Text', 'text_field') - ), - pa.buttonGroup, - pa.heading, - pa.headingGroup, - pa.headingStyle, - pa.icon, - pa.iconGroup, - pa.iconStyle, - pa.image, - pa.imageGroup, - pa.linkGroup, - pa.richtextGroup, - pa.secondaryButtonGroup, - pa.secondaryLinkGroup, - pa.subheading, - pa.subheadingGroup, - pa.text, - pa.textGroup, - pa.textStyle, - pa.textStyle2 -)) diff --git a/test/1partials-js.module/fields.json b/test/1partials-js.module/fields.json deleted file mode 100644 index 5ea5a3b..0000000 --- a/test/1partials-js.module/fields.json +++ /dev/null @@ -1,2640 +0,0 @@ -[ - { - "allow_new_line": true, - "show_emoji_picker": false, - "validation_regex": "", - "id": "", - "name": "text", - "label": "Text", - "type": "text", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "type": "group", - "id": "", - "name": "group2", - "label": "Group2", - "children": [ - { - "type": "group", - "id": "", - "name": "button", - "label": "Button", - "children": [ - { - "allow_new_line": false, - "show_emoji_picker": false, - "validation_regex": "", - "id": "", - "name": "text", - "label": "Text", - "type": "text", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "show_advanced_rel_options": false, - "supported_types": [ - "EXTERNAL", - "CONTENT", - "FILE", - "EMAIL_ADDRESS", - "BLOG", - "CALL_TO_ACTION", - "PHONE_NUMBER", - "WHATSAPP_NUMBER" - ], - "default": { - "url": { - "content_id": null, - "type": "EXTERNAL", - "href": "" - }, - "open_in_new_tab": false, - "no_follow": false - }, - "id": "", - "name": "link", - "label": "Link", - "type": "link", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "allow_new_line": false, - "show_emoji_picker": false, - "validation_regex": "", - "placeholder": "Accessible link label", - "id": "", - "name": "accessible_link_label", - "label": "Accessible link label", - "type": "text", - "display_width": null, - "required": false, - "locked": false, - "help_text": "If the link title is added at the end of repeated blocks of text, for example “Read more” links at the end of short teasers for blog posts, then you can provide more descriptive link text specifically for screen reader users using Accessible link label. It will be visually hidden for a normal view.", - "inherited_value": null - }, - { - "display": "checkbox", - "default": true, - "id": "", - "name": "accessible_link", - "label": "Accessible link", - "type": "boolean", - "display_width": null, - "required": false, - "locked": false, - "help_text": "Accessible link. Inform when a link opens a new window.", - "inherited_value": null - }, - { - "type": "group", - "id": "", - "name": "icon", - "label": "Icon", - "children": [ - { - "icon_set": "fontawesome-6.4.2", - "default": {}, - "id": "", - "name": "icon", - "label": "Icon", - "type": "icon", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "multiple": false, - "reordering_enabled": true, - "display": "select", - "choices": [ - [ - "left", - "Left" - ], - [ - "right", - "Right" - ] - ], - "default": "left", - "id": "", - "name": "icon_position", - "label": "Icon position", - "type": "choice", - "display_width": null, - "required": true, - "locked": false, - "inherited_value": null, - "visibility": { - "controlling_field_path": "button.icon.icon", - "operator": "NOT_EMPTY", - "property": "name", - "controlling_value_regex": null, - "hidden_subfields": {} - } - } - ], - "expanded": false, - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null, - "visibility": { - "controlling_field_path": "button.text", - "operator": "NOT_EMPTY", - "controlling_value_regex": null, - "property": null, - "hidden_subfields": {} - } - } - ], - "expanded": false, - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "allow_new_line": false, - "show_emoji_picker": false, - "validation_regex": "", - "id": "", - "name": "text_field", - "label": "Text", - "type": "text", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - } - ], - "expanded": false, - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "type": "group", - "id": "", - "name": "button", - "label": "Button", - "children": [ - { - "allow_new_line": false, - "show_emoji_picker": false, - "validation_regex": "", - "id": "", - "name": "text", - "label": "Text", - "type": "text", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "show_advanced_rel_options": false, - "supported_types": [ - "EXTERNAL", - "CONTENT", - "FILE", - "EMAIL_ADDRESS", - "BLOG", - "CALL_TO_ACTION", - "PHONE_NUMBER", - "WHATSAPP_NUMBER" - ], - "default": { - "url": { - "content_id": null, - "type": "EXTERNAL", - "href": "" - }, - "open_in_new_tab": false, - "no_follow": false - }, - "id": "", - "name": "link", - "label": "Link", - "type": "link", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "allow_new_line": false, - "show_emoji_picker": false, - "validation_regex": "", - "placeholder": "Accessible link label", - "id": "", - "name": "accessible_link_label", - "label": "Accessible link label", - "type": "text", - "display_width": null, - "required": false, - "locked": false, - "help_text": "If the link title is added at the end of repeated blocks of text, for example “Read more” links at the end of short teasers for blog posts, then you can provide more descriptive link text specifically for screen reader users using Accessible link label. It will be visually hidden for a normal view.", - "inherited_value": null - }, - { - "display": "checkbox", - "default": true, - "id": "", - "name": "accessible_link", - "label": "Accessible link", - "type": "boolean", - "display_width": null, - "required": false, - "locked": false, - "help_text": "Accessible link. Inform when a link opens a new window.", - "inherited_value": null - }, - { - "type": "group", - "id": "", - "name": "icon", - "label": "Icon", - "children": [ - { - "icon_set": "fontawesome-6.4.2", - "default": {}, - "id": "", - "name": "icon", - "label": "Icon", - "type": "icon", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "multiple": false, - "reordering_enabled": true, - "display": "select", - "choices": [ - [ - "left", - "Left" - ], - [ - "right", - "Right" - ] - ], - "default": "left", - "id": "", - "name": "icon_position", - "label": "Icon position", - "type": "choice", - "display_width": null, - "required": true, - "locked": false, - "inherited_value": null, - "visibility": { - "controlling_field_path": "button.icon.icon", - "operator": "NOT_EMPTY", - "property": "name", - "controlling_value_regex": null, - "hidden_subfields": {} - } - } - ], - "expanded": false, - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null, - "visibility": { - "controlling_field_path": "button.text", - "operator": "NOT_EMPTY", - "controlling_value_regex": null, - "property": null, - "hidden_subfields": {} - } - } - ], - "expanded": false, - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "allow_new_line": true, - "show_emoji_picker": false, - "validation_regex": "", - "id": "", - "name": "heading", - "label": "Heading", - "type": "text", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "type": "group", - "id": "", - "name": "heading", - "label": "Heading", - "children": [ - { - "allow_new_line": true, - "show_emoji_picker": false, - "validation_regex": "", - "id": "", - "name": "text", - "label": "Text", - "type": "text", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "multiple": false, - "reordering_enabled": true, - "display": "select", - "choices": [ - [ - "h1", - "Heading 1 (H1)" - ], - [ - "h2", - "Heading 2 (H2)" - ], - [ - "h3", - "Heading 3 (H3)" - ], - [ - "h4", - "Heading 4 (H4)" - ], - [ - "h5", - "Heading 5 (H5)" - ], - [ - "h6", - "Heading 6 (H6)" - ] - ], - "default": "h2", - "id": "", - "name": "heading_tag", - "label": "Tag", - "type": "choice", - "display_width": null, - "required": false, - "locked": false, - "help_text": "Semantic heading tag (h1-h6)", - "inherited_value": null - }, - { - "multiple": false, - "reordering_enabled": true, - "display": "select", - "choices": [ - [ - "h1", - "Heading 1" - ], - [ - "h2", - "Heading 2" - ], - [ - "h3", - "Heading 3" - ], - [ - "h4", - "Heading 4" - ], - [ - "h5", - "Heading 5" - ], - [ - "h6", - "Heading 6" - ], - [ - "display-1", - "Heading display 1" - ], - [ - "display-2", - "Heading display 2" - ], - [ - "display-3", - "Heading display 3" - ], - [ - "display-4", - "Heading display 4" - ], - [ - "display-5", - "Heading display 5" - ], - [ - "display-6", - "Heading display 6" - ] - ], - "id": "", - "name": "display", - "label": "Display", - "type": "choice", - "display_width": null, - "required": false, - "locked": false, - "help_text": "Display different heading styles not related to semantic heading type (tag h1-h6)", - "inline_help_text": "Display different heading style", - "inherited_value": null - }, - { - "type": "group", - "id": "", - "name": "link", - "label": "Link", - "children": [ - { - "show_advanced_rel_options": false, - "supported_types": [ - "EXTERNAL", - "CONTENT", - "FILE", - "EMAIL_ADDRESS", - "BLOG", - "CALL_TO_ACTION", - "PHONE_NUMBER", - "WHATSAPP_NUMBER" - ], - "default": { - "url": { - "content_id": null, - "type": "EXTERNAL", - "href": "" - }, - "open_in_new_tab": false, - "no_follow": false - }, - "id": "", - "name": "link", - "label": "Link", - "type": "link", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "display": "checkbox", - "default": false, - "id": "", - "name": "accessible_link", - "label": "Accessible link", - "type": "boolean", - "display_width": null, - "required": false, - "locked": false, - "help_text": "Accessible link. Inform when a link opens a new window.", - "inherited_value": null - } - ], - "expanded": false, - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null, - "visibility": { - "controlling_field_path": "heading.text", - "operator": "NOT_EMPTY", - "controlling_value_regex": null, - "property": null, - "hidden_subfields": {} - } - }, - { - "type": "group", - "id": "", - "name": "icon", - "label": "Icon", - "children": [ - { - "icon_set": "fontawesome-6.4.2", - "default": {}, - "id": "", - "name": "icon", - "label": "Icon", - "type": "icon", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "multiple": false, - "reordering_enabled": true, - "display": "select", - "choices": [ - [ - "left", - "Left" - ], - [ - "right", - "Right" - ] - ], - "default": "left", - "id": "", - "name": "icon_position", - "label": "Icon position", - "type": "choice", - "display_width": null, - "required": true, - "locked": false, - "inherited_value": null, - "visibility": { - "controlling_field_path": "heading.icon.icon", - "operator": "NOT_EMPTY", - "property": "name", - "controlling_value_regex": null, - "hidden_subfields": {} - } - }, - { - "type": "group", - "id": "", - "name": "accessibility_options", - "label": "Accessibility options", - "children": [ - { - "multiple": false, - "reordering_enabled": true, - "display": "select", - "choices": [ - [ - "decorative", - "Ignored by screen reader (Decorative images)" - ], - [ - "semantic", - "Read by screen reader (Informative images)" - ] - ], - "default": "decorative", - "id": "", - "name": "purpose", - "label": "Purpose", - "type": "choice", - "display_width": null, - "required": true, - "locked": false, - "help_text": "Categorize the purpose of this icon for screen readers. Learn More", - "inherited_value": null - }, - { - "allow_new_line": false, - "show_emoji_picker": false, - "validation_regex": "", - "id": "", - "name": "title", - "label": "Title", - "type": "text", - "display_width": null, - "required": false, - "locked": false, - "help_text": "This text will be read by screen readers to describe the icon.", - "inherited_value": null, - "visibility": { - "controlling_field_path": "heading.icon.accessibility_options.purpose", - "operator": "EQUAL", - "controlling_value_regex": "semantic", - "property": null, - "hidden_subfields": {} - } - } - ], - "expanded": false, - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null, - "visibility": { - "controlling_field_path": "heading.icon.icon", - "operator": "NOT_EMPTY", - "property": "name", - "controlling_value_regex": null, - "hidden_subfields": {} - } - } - ], - "expanded": false, - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null, - "visibility": { - "controlling_field_path": "heading.text", - "operator": "NOT_EMPTY", - "controlling_value_regex": null, - "property": null, - "hidden_subfields": {} - } - } - ], - "expanded": false, - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "type": "group", - "id": "", - "name": "heading", - "label": "Heading", - "children": [ - { - "type": "group", - "id": "", - "name": "alignment", - "label": "Alignment", - "children": [ - { - "alignment_direction": "HORIZONTAL", - "default": { - "horizontal_align": "LEFT" - }, - "id": "", - "name": "alignment", - "label": "Alignment", - "type": "alignment", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - } - ], - "expanded": false, - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "type": "group", - "id": "", - "name": "spacing", - "label": "Spacing", - "children": [ - { - "default": {}, - "id": "", - "name": "spacing", - "label": "Spacing", - "type": "spacing", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - } - ], - "expanded": false, - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "type": "group", - "id": "", - "name": "background", - "label": "Background", - "children": [ - { - "default": { - "color": null, - "opacity": null - }, - "id": "", - "name": "color", - "label": "Color", - "type": "color", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - } - ], - "expanded": false, - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "type": "group", - "id": "", - "name": "custom_theme_overrides", - "label": "Custom theme overrides", - "children": [ - { - "default": {}, - "id": "", - "name": "spacing", - "label": "Spacing", - "type": "spacing", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "default": { - "color": null, - "opacity": null - }, - "id": "", - "name": "color", - "label": "Color", - "type": "color", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - } - ], - "expanded": false, - "display_width": null, - "required": false, - "locked": false, - "help_text": "Override global theme settings for the current component", - "inherited_value": null - }, - { - "type": "group", - "id": "", - "name": "icon", - "label": "Icon", - "children": [ - { - "type": "group", - "id": "", - "name": "custom_theme_overrides", - "label": "Custom theme overrides", - "children": [ - { - "default": {}, - "id": "", - "name": "spacing", - "label": "Spacing", - "type": "spacing", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "default": { - "color": null, - "opacity": null - }, - "id": "", - "name": "background", - "label": "Background", - "type": "color", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "default": { - "color": null, - "opacity": null - }, - "id": "", - "name": "color", - "label": "Color", - "type": "color", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "allow_custom_border_sides": false, - "default": {}, - "id": "", - "name": "border", - "label": "Border", - "type": "border", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "display": "text", - "step": 1, - "min": 0, - "max": 100, - "prefix": "%", - "id": "", - "name": "border_radius", - "label": "Border radius", - "type": "number", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "display": "text", - "step": 1, - "min": 0, - "max": 400, - "suffix": "px", - "id": "", - "name": "size", - "label": "Size", - "type": "number", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - } - ], - "expanded": false, - "display_width": null, - "required": false, - "locked": false, - "help_text": "Override global theme settings for the current component", - "inherited_value": null - } - ], - "expanded": false, - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - } - ], - "expanded": false, - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null, - "visibility": { - "controlling_field_path": "heading.text", - "operator": "NOT_EMPTY", - "controlling_value_regex": null, - "property": null, - "hidden_subfields": {} - } - }, - { - "icon_set": "fontawesome-6.4.2", - "default": {}, - "id": "", - "name": "icon", - "label": "Icon", - "type": "icon", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "type": "group", - "id": "", - "name": "icon", - "label": "Icon", - "children": [ - { - "icon_set": "fontawesome-6.4.2", - "default": {}, - "id": "", - "name": "icon", - "label": "Icon", - "type": "icon", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "type": "group", - "id": "", - "name": "accessibility_options", - "label": "Accessibility options", - "children": [ - { - "multiple": false, - "reordering_enabled": true, - "display": "select", - "choices": [ - [ - "decorative", - "Ignored by screen reader (Decorative images)" - ], - [ - "semantic", - "Read by screen reader (Informative images)" - ] - ], - "default": "decorative", - "id": "", - "name": "purpose", - "label": "Purpose", - "type": "choice", - "display_width": null, - "required": false, - "locked": false, - "help_text": "Categorize the purpose of this icon for screen readers. Learn More", - "inherited_value": null - }, - { - "allow_new_line": false, - "show_emoji_picker": false, - "validation_regex": "", - "id": "", - "name": "title", - "label": "Title", - "type": "text", - "display_width": null, - "required": false, - "locked": false, - "help_text": "This text will be read by screen readers to describe the icon.", - "inherited_value": null, - "visibility": { - "controlling_field_path": "icon.accessibility_options.purpose", - "operator": "EQUAL", - "controlling_value_regex": "semantic", - "property": null, - "hidden_subfields": {} - } - } - ], - "expanded": false, - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null, - "visibility": { - "controlling_field_path": "icon.icon", - "operator": "NOT_EMPTY", - "property": "name", - "controlling_value_regex": null, - "hidden_subfields": {} - } - } - ], - "expanded": false, - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "type": "group", - "id": "", - "name": "icon", - "label": "Icon", - "children": [ - { - "type": "group", - "id": "", - "name": "presets", - "label": "Presets", - "children": [ - { - "multiple": false, - "reordering_enabled": true, - "display": "select", - "choices": [ - [ - "primary", - "Primary" - ], - [ - "secondary", - "Secondary" - ] - ], - "default": "primary", - "id": "", - "name": "icon_color", - "label": "Icon color", - "type": "choice", - "display_width": null, - "required": true, - "locked": false, - "inherited_value": null - }, - { - "multiple": false, - "reordering_enabled": true, - "display": "select", - "choices": [ - [ - "small", - "Small" - ], - [ - "regular", - "Regular" - ], - [ - "large", - "Large" - ] - ], - "default": "regular", - "id": "", - "name": "icon_size", - "label": "Icon size", - "type": "choice", - "display_width": null, - "required": true, - "locked": false, - "inherited_value": null - }, - { - "multiple": false, - "reordering_enabled": true, - "display": "select", - "choices": [ - [ - "circle", - "Circle" - ], - [ - "square", - "Square" - ] - ], - "default": "circle", - "id": "", - "name": "icon_shape", - "label": "Icon shape", - "type": "choice", - "display_width": null, - "required": true, - "locked": false, - "inherited_value": null - } - ], - "expanded": false, - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "type": "group", - "id": "", - "name": "alignment", - "label": "Alignment", - "children": [ - { - "alignment_direction": "HORIZONTAL", - "default": { - "horizontal_align": "LEFT" - }, - "id": "", - "name": "alignment", - "label": "Alignment", - "type": "alignment", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - } - ], - "expanded": false, - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "type": "group", - "id": "", - "name": "spacing", - "label": "Spacing", - "children": [ - { - "default": {}, - "id": "", - "name": "spacing", - "label": "Spacing", - "type": "spacing", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - } - ], - "expanded": false, - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "type": "group", - "id": "", - "name": "background", - "label": "Background", - "children": [ - { - "default": { - "color": null, - "opacity": null - }, - "id": "", - "name": "color", - "label": "Color", - "type": "color", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - } - ], - "expanded": false, - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "type": "group", - "id": "", - "name": "custom_theme_overrides", - "label": "Custom theme overrides", - "children": [ - { - "default": {}, - "id": "", - "name": "spacing", - "label": "Spacing", - "type": "spacing", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "default": { - "color": null, - "opacity": null - }, - "id": "", - "name": "background", - "label": "Background", - "type": "color", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "default": { - "color": null, - "opacity": null - }, - "id": "", - "name": "color", - "label": "Color", - "type": "color", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "allow_custom_border_sides": false, - "default": {}, - "id": "", - "name": "border", - "label": "Border", - "type": "border", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "display": "text", - "step": 1, - "min": 0, - "max": 100, - "suffix": "%", - "id": "", - "name": "border_radius", - "label": "Border radius", - "type": "number", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "display": "text", - "step": 1, - "min": 0, - "max": 100, - "prefix": "%", - "id": "", - "name": "size", - "label": "Size", - "type": "number", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - } - ], - "expanded": false, - "display_width": null, - "required": false, - "locked": false, - "help_text": "Override global theme settings for the current component", - "inherited_value": null - } - ], - "expanded": false, - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null, - "visibility": { - "controlling_field_path": "icon.icon", - "operator": "NOT_EMPTY", - "property": "name", - "controlling_value_regex": null, - "hidden_subfields": {} - } - }, - { - "responsive": true, - "resizable": true, - "show_loading": false, - "default": { - "size_type": "auto", - "src": "", - "alt": null, - "loading": "lazy" - }, - "id": "", - "name": "image", - "label": "Image", - "type": "image", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "type": "group", - "id": "", - "name": "image", - "label": "Image", - "children": [ - { - "responsive": true, - "resizable": true, - "show_loading": false, - "default": { - "size_type": "auto", - "src": "", - "alt": null, - "loading": "lazy" - }, - "id": "", - "name": "image", - "label": "Image", - "type": "image", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "type": "group", - "id": "", - "name": "caption", - "label": "Caption", - "children": [ - { - "enabled_features": [ - "code_format", - "subscript", - "emoji", - "underline", - "superscript", - "font_size", - "link", - "visual_blocks", - "hr", - "bold", - "charmap", - "italic", - "personalize", - "cta", - "background_color", - "anchor", - "nonbreaking_space", - "font_family", - "text_color", - "strikethrough", - "alignment", - "source_code" - ], - "id": "", - "name": "rich_text", - "label": "Rich text", - "type": "richtext", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - } - ], - "expanded": false, - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null, - "visibility": { - "controlling_field_path": "image.image", - "operator": "NOT_EMPTY", - "property": "src", - "controlling_value_regex": null, - "hidden_subfields": {} - } - }, - { - "type": "group", - "id": "", - "name": "link", - "label": "Link", - "children": [ - { - "show_advanced_rel_options": false, - "supported_types": [ - "EXTERNAL", - "CONTENT", - "FILE", - "EMAIL_ADDRESS", - "BLOG", - "CALL_TO_ACTION", - "PHONE_NUMBER", - "WHATSAPP_NUMBER" - ], - "default": { - "url": { - "content_id": null, - "type": "EXTERNAL", - "href": "" - }, - "open_in_new_tab": false, - "no_follow": false - }, - "id": "", - "name": "link", - "label": "Link", - "type": "link", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - } - ], - "expanded": false, - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null, - "visibility": { - "controlling_field_path": "image.image", - "operator": "NOT_EMPTY", - "property": "src", - "controlling_value_regex": null, - "hidden_subfields": {} - } - } - ], - "expanded": false, - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "type": "group", - "id": "", - "name": "link", - "label": "Link", - "children": [ - { - "allow_new_line": false, - "show_emoji_picker": false, - "validation_regex": "", - "id": "", - "name": "text", - "label": "Text", - "type": "text", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "show_advanced_rel_options": false, - "supported_types": [ - "EXTERNAL", - "CONTENT", - "FILE", - "EMAIL_ADDRESS", - "BLOG", - "CALL_TO_ACTION", - "PHONE_NUMBER", - "WHATSAPP_NUMBER" - ], - "default": { - "url": { - "content_id": null, - "type": "EXTERNAL", - "href": "" - }, - "open_in_new_tab": false, - "no_follow": false - }, - "id": "", - "name": "link", - "label": "Link", - "type": "link", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "display": "checkbox", - "default": true, - "id": "", - "name": "accessible_link", - "label": "Accessible link", - "type": "boolean", - "display_width": null, - "required": false, - "locked": false, - "help_text": "Accessible link. Inform when a link opens a new window.", - "inherited_value": null - }, - { - "type": "group", - "id": "", - "name": "icon", - "label": "Icon", - "children": [ - { - "icon_set": "fontawesome-6.4.2", - "default": {}, - "id": "", - "name": "icon", - "label": "Icon", - "type": "icon", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "multiple": false, - "reordering_enabled": true, - "display": "select", - "choices": [ - [ - "left", - "Left" - ], - [ - "right", - "Right" - ] - ], - "default": "left", - "id": "", - "name": "icon_position", - "label": "Icon position", - "type": "choice", - "display_width": null, - "required": true, - "locked": false, - "inherited_value": null, - "visibility": { - "controlling_field_path": "link.icon.icon", - "operator": "NOT_EMPTY", - "property": "name", - "controlling_value_regex": null, - "hidden_subfields": {} - } - } - ], - "expanded": false, - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null, - "visibility": { - "controlling_field_path": "link.text", - "operator": "NOT_EMPTY", - "controlling_value_regex": null, - "property": null, - "hidden_subfields": {} - } - } - ], - "expanded": false, - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "type": "group", - "id": "", - "name": "richtext", - "label": "Rich text", - "children": [ - { - "enabled_features": [ - "bulleted_list", - "emoji", - "underline", - "indent", - "superscript", - "font_size", - "lineheight", - "link", - "hr", - "video", - "charmap", - "italic", - "cta", - "outdent", - "nonbreaking_space", - "block", - "strikethrough", - "embed", - "table", - "image", - "code_format", - "subscript", - "visual_blocks", - "bold", - "personalize", - "numbered_list", - "background_color", - "anchor", - "font_family", - "text_color", - "alignment", - "source_code" - ], - "id": "", - "name": "rich_text", - "label": "Rich text", - "type": "richtext", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "display": "text", - "step": 1, - "id": "", - "name": "truncate", - "label": "Truncate", - "type": "number", - "display_width": null, - "required": false, - "locked": false, - "help_text": "Number of characters to truncate the text", - "inherited_value": null, - "visibility": { - "controlling_field_path": "richtext.rich_text", - "operator": "NOT_EMPTY", - "controlling_value_regex": null, - "property": null, - "hidden_subfields": {} - } - } - ], - "expanded": false, - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "type": "group", - "id": "", - "name": "secondary_button", - "label": "Secondary button", - "children": [ - { - "allow_new_line": false, - "show_emoji_picker": false, - "validation_regex": "", - "id": "", - "name": "text", - "label": "Text", - "type": "text", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "show_advanced_rel_options": false, - "supported_types": [ - "EXTERNAL", - "CONTENT", - "FILE", - "EMAIL_ADDRESS", - "BLOG", - "CALL_TO_ACTION", - "PHONE_NUMBER", - "WHATSAPP_NUMBER" - ], - "default": { - "url": { - "content_id": null, - "type": "EXTERNAL", - "href": "" - }, - "open_in_new_tab": false, - "no_follow": false - }, - "id": "", - "name": "link", - "label": "Link", - "type": "link", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "allow_new_line": false, - "show_emoji_picker": false, - "validation_regex": "", - "placeholder": "Accessible link label", - "id": "", - "name": "accessible_link_label", - "label": "Accessible link label", - "type": "text", - "display_width": null, - "required": false, - "locked": false, - "help_text": "If the link title is added at the end of repeated blocks of text, for example “Read more” links at the end of short teasers for blog posts, then you can provide more descriptive link text specifically for screen reader users using Accessible link label. It will be visually hidden for a normal view.", - "inherited_value": null - }, - { - "display": "checkbox", - "default": true, - "id": "", - "name": "accessible_link", - "label": "Accessible link", - "type": "boolean", - "display_width": null, - "required": false, - "locked": false, - "help_text": "Accessible link. Inform when a link opens a new window.", - "inherited_value": null - }, - { - "type": "group", - "id": "", - "name": "icon", - "label": "Icon", - "children": [ - { - "icon_set": "fontawesome-6.4.2", - "default": {}, - "id": "", - "name": "icon", - "label": "Icon", - "type": "icon", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "multiple": false, - "reordering_enabled": true, - "display": "select", - "choices": [ - [ - "left", - "Left" - ], - [ - "right", - "Right" - ] - ], - "default": "left", - "id": "", - "name": "icon_position", - "label": "Icon position", - "type": "choice", - "display_width": null, - "required": true, - "locked": false, - "inherited_value": null, - "visibility": { - "controlling_field_path": "secondary_button.icon.icon", - "operator": "NOT_EMPTY", - "property": "name", - "controlling_value_regex": null, - "hidden_subfields": {} - } - } - ], - "expanded": false, - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null, - "visibility": { - "controlling_field_path": "secondary_button.text", - "operator": "NOT_EMPTY", - "controlling_value_regex": null, - "property": null, - "hidden_subfields": {} - } - } - ], - "expanded": false, - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "type": "group", - "id": "", - "name": "secondary_link", - "label": "Secondary link", - "children": [ - { - "allow_new_line": false, - "show_emoji_picker": false, - "validation_regex": "", - "id": "", - "name": "text", - "label": "Text", - "type": "text", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "show_advanced_rel_options": false, - "supported_types": [ - "EXTERNAL", - "CONTENT", - "FILE", - "EMAIL_ADDRESS", - "BLOG", - "CALL_TO_ACTION", - "PHONE_NUMBER", - "WHATSAPP_NUMBER" - ], - "default": { - "url": { - "content_id": null, - "type": "EXTERNAL", - "href": "" - }, - "open_in_new_tab": false, - "no_follow": false - }, - "id": "", - "name": "link", - "label": "Link", - "type": "link", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "display": "checkbox", - "default": true, - "id": "", - "name": "accessible_link", - "label": "Accessible link", - "type": "boolean", - "display_width": null, - "required": false, - "locked": false, - "help_text": "Accessible link. Inform when a link opens a new window.", - "inherited_value": null - }, - { - "type": "group", - "id": "", - "name": "icon", - "label": "Icon", - "children": [ - { - "icon_set": "fontawesome-6.4.2", - "default": {}, - "id": "", - "name": "icon", - "label": "Icon", - "type": "icon", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "multiple": false, - "reordering_enabled": true, - "display": "select", - "choices": [ - [ - "left", - "Left" - ], - [ - "right", - "Right" - ] - ], - "default": "left", - "id": "", - "name": "icon_position", - "label": "Icon position", - "type": "choice", - "display_width": null, - "required": true, - "locked": false, - "inherited_value": null, - "visibility": { - "controlling_field_path": "secondary_link.icon.icon", - "operator": "NOT_EMPTY", - "property": "name", - "controlling_value_regex": null, - "hidden_subfields": {} - } - } - ], - "expanded": false, - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null, - "visibility": { - "controlling_field_path": "secondary_link.text", - "operator": "NOT_EMPTY", - "controlling_value_regex": null, - "property": null, - "hidden_subfields": {} - } - } - ], - "expanded": false, - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "allow_new_line": true, - "show_emoji_picker": false, - "validation_regex": "", - "id": "", - "name": "subheading", - "label": "Subheading", - "type": "text", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "type": "group", - "id": "", - "name": "subheading", - "label": "Subheading", - "children": [ - { - "allow_new_line": true, - "show_emoji_picker": false, - "validation_regex": "", - "id": "", - "name": "text", - "label": "Text", - "type": "text", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "multiple": false, - "reordering_enabled": true, - "display": "select", - "choices": [ - [ - "h1", - "Heading 1 (H1)" - ], - [ - "h2", - "Heading 2 (H2)" - ], - [ - "h3", - "Heading 3 (H3)" - ], - [ - "h4", - "Heading 4 (H4)" - ], - [ - "h5", - "Heading 5 (H5)" - ], - [ - "h6", - "Heading 6 (H6)" - ] - ], - "default": "h3", - "id": "", - "name": "heading_tag", - "label": "Tag", - "type": "choice", - "display_width": null, - "required": false, - "locked": false, - "help_text": "Semantic heading tag (h1-h6)", - "inherited_value": null - }, - { - "multiple": false, - "reordering_enabled": true, - "display": "select", - "choices": [ - [ - "h1", - "Heading 1" - ], - [ - "h2", - "Heading 2" - ], - [ - "h3", - "Heading 3" - ], - [ - "h4", - "Heading 4" - ], - [ - "h5", - "Heading 5" - ], - [ - "h6", - "Heading 6" - ], - [ - "display-1", - "Heading display 1" - ], - [ - "display-2", - "Heading display 2" - ], - [ - "display-3", - "Heading display 3" - ], - [ - "display-4", - "Heading display 4" - ], - [ - "display-5", - "Heading display 5" - ], - [ - "display-6", - "Heading display 6" - ] - ], - "id": "", - "name": "display", - "label": "Display", - "type": "choice", - "display_width": null, - "required": false, - "locked": false, - "help_text": "Display different heading styles not related to semantic heading type (tag h1-h6)", - "inline_help_text": "Display different heading style", - "inherited_value": null - }, - { - "type": "group", - "id": "", - "name": "link", - "label": "Link", - "children": [ - { - "show_advanced_rel_options": false, - "supported_types": [ - "EXTERNAL", - "CONTENT", - "FILE", - "EMAIL_ADDRESS", - "BLOG", - "CALL_TO_ACTION", - "PHONE_NUMBER", - "WHATSAPP_NUMBER" - ], - "default": { - "url": { - "content_id": null, - "type": "EXTERNAL", - "href": "" - }, - "open_in_new_tab": false, - "no_follow": false - }, - "id": "", - "name": "link", - "label": "Link", - "type": "link", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "display": "checkbox", - "default": false, - "id": "", - "name": "accessible_link", - "label": "Accessible link", - "type": "boolean", - "display_width": null, - "required": false, - "locked": false, - "help_text": "Accessible link. Inform when a link opens a new window.", - "inherited_value": null - } - ], - "expanded": false, - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null, - "visibility": { - "controlling_field_path": "subheading.text", - "operator": "NOT_EMPTY", - "controlling_value_regex": null, - "property": null, - "hidden_subfields": {} - } - }, - { - "type": "group", - "id": "", - "name": "icon", - "label": "Icon", - "children": [ - { - "icon_set": "fontawesome-6.4.2", - "default": {}, - "id": "", - "name": "icon", - "label": "Icon", - "type": "icon", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "multiple": false, - "reordering_enabled": true, - "display": "select", - "choices": [ - [ - "left", - "Left" - ], - [ - "right", - "Right" - ] - ], - "default": "left", - "id": "", - "name": "icon_position", - "label": "Icon position", - "type": "choice", - "display_width": null, - "required": true, - "locked": false, - "inherited_value": null, - "visibility": { - "controlling_field_path": "subheading.icon.icon", - "operator": "NOT_EMPTY", - "property": "name", - "controlling_value_regex": null, - "hidden_subfields": {} - } - }, - { - "type": "group", - "id": "", - "name": "accessibility_options", - "label": "Accessibility options", - "children": [ - { - "multiple": false, - "reordering_enabled": true, - "display": "select", - "choices": [ - [ - "decorative", - "Ignored by screen reader (Decorative images)" - ], - [ - "semantic", - "Read by screen reader (Informative images)" - ] - ], - "default": "decorative", - "id": "", - "name": "purpose", - "label": "Purpose", - "type": "choice", - "display_width": null, - "required": true, - "locked": false, - "help_text": "Categorize the purpose of this icon for screen readers. Learn More", - "inherited_value": null - }, - { - "allow_new_line": false, - "show_emoji_picker": false, - "validation_regex": "", - "id": "", - "name": "title", - "label": "Title", - "type": "text", - "display_width": null, - "required": false, - "locked": false, - "help_text": "This text will be read by screen readers to describe the icon.", - "inherited_value": null, - "visibility": { - "controlling_field_path": "heading.icon.accessibility_options.purpose", - "operator": "EQUAL", - "controlling_value_regex": "semantic", - "property": null, - "hidden_subfields": {} - } - } - ], - "expanded": false, - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null, - "visibility": { - "controlling_field_path": "subheading.icon.icon", - "operator": "NOT_EMPTY", - "property": "name", - "controlling_value_regex": null, - "hidden_subfields": {} - } - } - ], - "expanded": false, - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null, - "visibility": { - "controlling_field_path": "subheading.text", - "operator": "NOT_EMPTY", - "controlling_value_regex": null, - "property": null, - "hidden_subfields": {} - } - } - ], - "expanded": false, - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "allow_new_line": true, - "show_emoji_picker": false, - "validation_regex": "", - "id": "", - "name": "text", - "label": "Text", - "type": "text", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "type": "group", - "id": "", - "name": "text", - "label": "Text", - "children": [ - { - "allow_new_line": true, - "show_emoji_picker": false, - "validation_regex": "", - "id": "", - "name": "text", - "label": "Text", - "type": "text", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - } - ], - "expanded": false, - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "type": "group", - "id": "", - "name": "presets", - "label": "Presets", - "children": [ - { - "multiple": false, - "reordering_enabled": true, - "display": "select", - "choices": [ - [ - "Preset1", - "preset 1" - ], - [ - "Preset2", - "preset 2" - ], - [ - "Preset3", - "preset 3" - ] - ], - "id": "", - "name": "custom preset", - "label": "Custom_preset", - "type": "choice", - "display_width": null, - "required": false, - "locked": false, - "help_text": "Custom presets to globally restyle module", - "inherited_value": null - } - ], - "expanded": false, - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "type": "group", - "id": "", - "name": "alignment", - "label": "Alignment", - "children": [ - { - "alignment_direction": "HORIZONTAL", - "default": { - "horizontal_align": "LEFT" - }, - "id": "", - "name": "alignment", - "label": "Alignment", - "type": "alignment", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - } - ], - "expanded": false, - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "type": "group", - "id": "", - "name": "spacing", - "label": "Spacing", - "children": [ - { - "default": {}, - "id": "", - "name": "spacing", - "label": "Spacing", - "type": "spacing", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - } - ], - "expanded": false, - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "type": "group", - "id": "", - "name": "background", - "label": "Background", - "children": [ - { - "default": { - "color": null, - "opacity": null - }, - "id": "", - "name": "color", - "label": "Color", - "type": "color", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - } - ], - "expanded": false, - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "type": "group", - "id": "", - "name": "custom theme overrides", - "label": "Custom_theme_overrides", - "children": [ - { - "default": {}, - "id": "", - "name": "spacing", - "label": "Spacing", - "type": "spacing", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "default": { - "color": null, - "opacity": null - }, - "id": "", - "name": "background", - "label": "Background", - "type": "color", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "load_external_fonts": true, - "default": {}, - "id": "", - "name": "font", - "label": "Font", - "type": "font", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - } - ], - "expanded": false, - "display_width": null, - "required": false, - "locked": false, - "help_text": "Override global theme settings for the current component", - "inherited_value": null - }, - { - "type": "group", - "id": "", - "name": "text", - "label": "Text", - "children": [ - { - "type": "group", - "id": "", - "name": "alignment", - "label": "Alignment", - "children": [ - { - "alignment_direction": "HORIZONTAL", - "default": { - "horizontal_align": "LEFT" - }, - "id": "", - "name": "alignment", - "label": "Alignment", - "type": "alignment", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - } - ], - "expanded": false, - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "type": "group", - "id": "", - "name": "spacing", - "label": "Spacing", - "children": [ - { - "default": {}, - "id": "", - "name": "spacing", - "label": "Spacing", - "type": "spacing", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - } - ], - "expanded": false, - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "type": "group", - "id": "", - "name": "background", - "label": "Background", - "children": [ - { - "default": { - "color": null, - "opacity": null - }, - "id": "", - "name": "color", - "label": "Color", - "type": "color", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - } - ], - "expanded": false, - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "type": "group", - "id": "", - "name": "custom_theme_overrides", - "label": "Custom theme overrides", - "children": [ - { - "default": {}, - "id": "", - "name": "spacing", - "label": "Spacing", - "type": "spacing", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "default": { - "color": null, - "opacity": null - }, - "id": "", - "name": "background", - "label": "Background", - "type": "color", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "load_external_fonts": true, - "default": {}, - "id": "", - "name": "font", - "label": "Font", - "type": "font", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - } - ], - "expanded": false, - "display_width": null, - "required": false, - "locked": false, - "help_text": "Override global theme settings for the current component", - "inherited_value": null - } - ], - "expanded": false, - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null, - "visibility": { - "controlling_field_path": "text.text", - "operator": "NOT_EMPTY", - "controlling_value_regex": null, - "property": null, - "hidden_subfields": {} - } - } -] \ No newline at end of file diff --git a/test/1partials-js.module/meta.json b/test/1partials-js.module/meta.json deleted file mode 100644 index b87ae56..0000000 --- a/test/1partials-js.module/meta.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "global" : false, - "host_template_types" : [ "PAGE", "BLOG_POST", "BLOG_LISTING" ], - "module_id" : 66611389121, - "is_available_for_new_content" : true -} \ No newline at end of file diff --git a/test/1partials-js.module/module.css b/test/1partials-js.module/module.css deleted file mode 100644 index a90fb5c..0000000 --- a/test/1partials-js.module/module.css +++ /dev/null @@ -1 +0,0 @@ -/* module css / no hubl variables */ diff --git a/test/1partials-js.module/module.html b/test/1partials-js.module/module.html deleted file mode 100644 index e69de29..0000000 diff --git a/test/1partials-js.module/module.js b/test/1partials-js.module/module.js deleted file mode 100644 index e69de29..0000000 diff --git a/test/1style-js-simple.module/fields.js b/test/1style-js-simple.module/fields.js deleted file mode 100644 index 4486055..0000000 --- a/test/1style-js-simple.module/fields.js +++ /dev/null @@ -1,26 +0,0 @@ -/* eslint-disable no-unused-vars */ -import { - group, - styleGroup, - init, - moduleFields as fi, - writeJson -} from '../../index.js' - -writeJson(init( - styleGroup( - fi.alignment('Alignment', 'alignment_field'), - fi.backgroundimage('Background image', 'backgroundimage_field'), - fi.boolean('Boolean', 'boolean_field'), - fi.border('Border', 'border_field'), - fi.choice('Choice', 'choice_field'), - fi.color('Color', 'color_field'), - fi.font('Font', 'font_field'), - fi.gradient('Gradient', 'gradient_field'), - fi.icon('Icon', 'icon_field'), - fi.image('Image', 'image_field'), - fi.number('Number', 'number_field'), - fi.spacing('Spacing', 'spacing_field'), - fi.textalignment('Text alignment', 'textalignment_field') - ) -)) diff --git a/test/1style-js-simple.module/fields.json b/test/1style-js-simple.module/fields.json deleted file mode 100644 index 4660b76..0000000 --- a/test/1style-js-simple.module/fields.json +++ /dev/null @@ -1,192 +0,0 @@ -[ - { - "id": "style", - "name": "style", - "label": "Style", - "locked": false, - "children": [ - { - "alignment_direction": "HORIZONTAL", - "default": { - "horizontal_align": "LEFT" - }, - "id": "", - "name": "alignment_field", - "label": "Alignment", - "type": "alignment", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "default": { - "src": "", - "background_position": "MIDDLE_CENTER", - "background_size": "cover" - }, - "id": "", - "name": "backgroundimage_field", - "label": "Background image", - "type": "backgroundimage", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "display": "checkbox", - "default": false, - "id": "", - "name": "boolean_field", - "label": "Boolean", - "type": "boolean", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "allow_custom_border_sides": false, - "default": {}, - "id": "", - "name": "border_field", - "label": "Border", - "type": "border", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "multiple": false, - "reordering_enabled": true, - "display": "select", - "choices": [ - [ - "value 1", - "Label 1" - ], - [ - "value 2", - "Label 2" - ] - ], - "id": "", - "name": "choice_field", - "label": "Choice", - "type": "choice", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "default": { - "color": null, - "opacity": null - }, - "id": "", - "name": "color_field", - "label": "Color", - "type": "color", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "load_external_fonts": true, - "default": {}, - "id": "", - "name": "font_field", - "label": "Font", - "type": "font", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "default": {}, - "id": "", - "name": "gradient_field", - "label": "Gradient", - "type": "gradient", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "icon_set": "fontawesome-6.4.2", - "default": {}, - "id": "", - "name": "icon_field", - "label": "Icon", - "type": "icon", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "responsive": true, - "resizable": true, - "show_loading": false, - "default": { - "size_type": "auto", - "src": "", - "alt": null, - "loading": "lazy" - }, - "id": "", - "name": "image_field", - "label": "Image", - "type": "image", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "display": "text", - "step": 1, - "id": "", - "name": "number_field", - "label": "Number", - "type": "number", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "default": {}, - "id": "", - "name": "spacing_field", - "label": "Spacing", - "type": "spacing", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "default": { - "text_align": "LEFT" - }, - "id": "", - "name": "textalignment_field", - "label": "Text alignment", - "type": "textalignment", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - } - ], - "tab": "STYLE", - "type": "group" - } -] \ No newline at end of file diff --git a/test/1style-js-simple.module/meta.json b/test/1style-js-simple.module/meta.json deleted file mode 100644 index 0981671..0000000 --- a/test/1style-js-simple.module/meta.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "global" : false, - "host_template_types" : [ "PAGE", "BLOG_POST", "BLOG_LISTING" ], - "module_id" : 66547990764, - "is_available_for_new_content" : true -} \ No newline at end of file diff --git a/test/1style-js-simple.module/module.css b/test/1style-js-simple.module/module.css deleted file mode 100644 index a90fb5c..0000000 --- a/test/1style-js-simple.module/module.css +++ /dev/null @@ -1 +0,0 @@ -/* module css / no hubl variables */ diff --git a/test/1style-js-simple.module/module.html b/test/1style-js-simple.module/module.html deleted file mode 100644 index e69de29..0000000 diff --git a/test/1style-js-simple.module/module.js b/test/1style-js-simple.module/module.js deleted file mode 100644 index e69de29..0000000 diff --git a/test/1style-js.module/fields.js b/test/1style-js.module/fields.js deleted file mode 100644 index da8205f..0000000 --- a/test/1style-js.module/fields.js +++ /dev/null @@ -1,140 +0,0 @@ -/* eslint-disable no-unused-vars */ -import { - group, - styleGroup, - init, - moduleFields as fi, - writeJson -} from '../../index.js' - -writeJson(init( - styleGroup( - fi.alignment('Alignment', 'alignment_field', { - alignment_direction: 'BOTH', - default: { - horizontal_align: 'RIGHT', - vertical_align: 'BOTTOM' - }, - editor_options: { - required: true - } - }), - fi.backgroundimage('Background image', 'backgroundimage_field', { - editor_options: { - inline_help_text: 'Inline' - } - }), - fi.boolean('Boolean', 'boolean_field', { - default: true - }), - fi.border('Border', 'border_field', { - allow_custom_border_sides: true, - default: { - bottom: { - color: '#FF0201', - opacity: 100, - style: 'solid', - width: { - units: 'px', - value: 4 - } - }, - left: { - color: '#FF0201', - opacity: 100, - style: 'solid', - width: { - units: 'px', - value: 4 - } - }, - right: { - color: '#FF0201', - opacity: 100, - style: 'solid', - width: { - units: 'px', - value: 4 - } - } - } - }), - fi.choice('Choice', 'choice_field'), - fi.color('Color', 'color_field', { - display_conditions: { - visibility: { - controlling_field_path: 'style.number_field', - operator: 'NOT_EMPTY' - } - } - }), - fi.font('Font', 'font_field', { - default: { - font: 'arial', - size: 30, - font_set: 'DEFAULT', - styles: { - 'font-style': 'italic' - } - } - }), - fi.gradient('Gradient', 'gradient_field', { - default: { - side_or_corner: { - verticalSide: 'TOP', - horizontalSide: null - }, - colors: [ - { color: { r: 0, g: 255, b: 255, a: 1 } }, - { color: { r: 105, g: 168, b: 79, a: 0.8 } } - ] - } - }), - fi.icon('Icon', 'icon_field', { - editor_options: { - locked: true, - help_text: 'Tooltip' - } - }), - fi.image('Image', 'image_field', { - show_loading: true, - editor_options: { - inline_help_text: 'Inline' - } - }), - fi.number('Number', 'number_field', { - suffix: 'px', - step: 5, - max: 100 - }), - fi.spacing('Spacing', 'spacing_field', { - default: { - margin: { - top: { - value: 38, - units: 'px' - } - }, - padding: { - top: { - units: 'px', - value: 20 - } - } - } - }), - fi.textalignment('Text alignment', 'textalignment_field', { - default: { - text_align: 'JUSTIFY' - }, - display_conditions: { - visibility: { - controlling_field_path: 'style.color_field', - operator: 'EQUAL', - property: 'color', - controlling_value_regex: '#FFFFFF' - } - } - }) - ) -)) diff --git a/test/1style-js.module/fields.json b/test/1style-js.module/fields.json deleted file mode 100644 index 0ada616..0000000 --- a/test/1style-js.module/fields.json +++ /dev/null @@ -1,283 +0,0 @@ -[ - { - "id": "style", - "name": "style", - "label": "Style", - "locked": false, - "children": [ - { - "alignment_direction": "BOTH", - "default": { - "horizontal_align": "RIGHT", - "vertical_align": "BOTTOM" - }, - "id": "", - "name": "alignment_field", - "label": "Alignment", - "type": "alignment", - "display_width": null, - "required": true, - "locked": false, - "inherited_value": null - }, - { - "default": { - "src": "", - "background_position": "MIDDLE_CENTER", - "background_size": "cover" - }, - "id": "", - "name": "backgroundimage_field", - "label": "Background image", - "type": "backgroundimage", - "display_width": null, - "required": false, - "locked": false, - "inline_help_text": "Inline", - "inherited_value": null - }, - { - "display": "checkbox", - "default": true, - "id": "", - "name": "boolean_field", - "label": "Boolean", - "type": "boolean", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "allow_custom_border_sides": true, - "default": { - "bottom": { - "color": "#FF0201", - "opacity": 100, - "style": "solid", - "width": { - "units": "px", - "value": 4 - } - }, - "left": { - "color": "#FF0201", - "opacity": 100, - "style": "solid", - "width": { - "units": "px", - "value": 4 - } - }, - "right": { - "color": "#FF0201", - "opacity": 100, - "style": "solid", - "width": { - "units": "px", - "value": 4 - } - } - }, - "id": "", - "name": "border_field", - "label": "Border", - "type": "border", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "multiple": false, - "reordering_enabled": true, - "display": "select", - "choices": [ - [ - "value 1", - "Label 1" - ], - [ - "value 2", - "Label 2" - ] - ], - "id": "", - "name": "choice_field", - "label": "Choice", - "type": "choice", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "default": { - "color": null, - "opacity": null - }, - "id": "", - "name": "color_field", - "label": "Color", - "type": "color", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null, - "visibility": { - "controlling_field_path": "style.number_field", - "operator": "NOT_EMPTY", - "controlling_value_regex": null, - "property": null, - "hidden_subfields": {} - } - }, - { - "load_external_fonts": true, - "default": { - "font": "arial", - "size": 30, - "font_set": "DEFAULT", - "styles": { - "font-style": "italic" - } - }, - "id": "", - "name": "font_field", - "label": "Font", - "type": "font", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "default": { - "side_or_corner": { - "verticalSide": "TOP", - "horizontalSide": null - }, - "colors": [ - { - "color": { - "r": 0, - "g": 255, - "b": 255, - "a": 1 - } - }, - { - "color": { - "r": 105, - "g": 168, - "b": 79, - "a": 0.8 - } - } - ] - }, - "id": "", - "name": "gradient_field", - "label": "Gradient", - "type": "gradient", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "icon_set": "fontawesome-6.4.2", - "default": {}, - "id": "", - "name": "icon_field", - "label": "Icon", - "type": "icon", - "display_width": null, - "required": false, - "locked": true, - "help_text": "Tooltip", - "inherited_value": null - }, - { - "responsive": true, - "resizable": true, - "show_loading": true, - "default": { - "size_type": "auto", - "src": "", - "alt": null, - "loading": "lazy" - }, - "id": "", - "name": "image_field", - "label": "Image", - "type": "image", - "display_width": null, - "required": false, - "locked": false, - "inline_help_text": "Inline", - "inherited_value": null - }, - { - "display": "text", - "step": 5, - "max": 100, - "suffix": "px", - "id": "", - "name": "number_field", - "label": "Number", - "type": "number", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "default": { - "margin": { - "top": { - "value": 38, - "units": "px" - } - }, - "padding": { - "top": { - "units": "px", - "value": 20 - } - } - }, - "id": "", - "name": "spacing_field", - "label": "Spacing", - "type": "spacing", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null - }, - { - "default": { - "text_align": "JUSTIFY" - }, - "id": "", - "name": "textalignment_field", - "label": "Text alignment", - "type": "textalignment", - "display_width": null, - "required": false, - "locked": false, - "inherited_value": null, - "visibility": { - "controlling_field_path": "style.color_field", - "operator": "EQUAL", - "property": "color", - "controlling_value_regex": "#FFFFFF", - "hidden_subfields": {} - } - } - ], - "tab": "STYLE", - "type": "group" - } -] \ No newline at end of file diff --git a/test/1style-js.module/meta.json b/test/1style-js.module/meta.json deleted file mode 100644 index b87ae56..0000000 --- a/test/1style-js.module/meta.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "global" : false, - "host_template_types" : [ "PAGE", "BLOG_POST", "BLOG_LISTING" ], - "module_id" : 66611389121, - "is_available_for_new_content" : true -} \ No newline at end of file diff --git a/test/1style-js.module/module.css b/test/1style-js.module/module.css deleted file mode 100644 index a90fb5c..0000000 --- a/test/1style-js.module/module.css +++ /dev/null @@ -1 +0,0 @@ -/* module css / no hubl variables */ diff --git a/test/1style-js.module/module.html b/test/1style-js.module/module.html deleted file mode 100644 index e69de29..0000000 diff --git a/test/1style-js.module/module.js b/test/1style-js.module/module.js deleted file mode 100644 index e69de29..0000000 diff --git a/test/all-fields.module/fields.js b/test/all-fields.module/fields.js new file mode 100644 index 0000000..f6fc128 --- /dev/null +++ b/test/all-fields.module/fields.js @@ -0,0 +1,63 @@ +/* eslint-disable no-unused-vars */ +import { + group, + styleGroup, + init, + moduleFields as fi +} from '../../index.js' + +init( + fi.audioplayer('Audio Player', 'audioplayer'), + fi.blog('Blog', 'blog'), + fi.boolean('Boolean', 'boolean'), + fi.choice('Choices', 'choices'), + fi.date('Date', 'date'), + fi.datetime('Datetime', 'datetime'), + fi.email('Email', 'email'), + fi.embed('Embed', 'embed'), + fi.file('File', 'file'), + fi.font('Font', 'font'), + fi.form('Form', 'form'), + fi.html('HTML', 'html'), + fi.crmobject('CRM Object', 'crmobject', { + object_type: 'COMPANY' + }), + fi.crmobjectproperty('CRM Object Property', 'crmobjectproperty', { + object_type: 'COMPANY' + }), + fi.cta('CTA', 'cta'), + fi.hubl('HubL', 'hubl'), + // fi.hubdbrow('HubDB Row', 'hubdbrow', { + // table_name_or_id: 'test' + // }), + fi.hubdbtable('HubDB Table', 'hubdbtable'), + fi.icon('Icon', 'icon'), + fi.image('Image', 'image'), + fi.link('Link', 'link'), + fi.logo('Logo', 'logo'), + fi.meeting('Meeting', 'meeting'), + fi.menu('Menu', 'menu'), + fi.number('Number', 'number'), + fi.page('Page', 'page'), + fi.payment('Payment', 'payment'), + fi.podcast('Podcast', 'podcast'), + fi.richtext('Rich Text', 'richtext'), + fi.simplemenu('Simple Menu', 'simplemenu'), + group('Group', 'group', {}, + fi.tag('Tag', 'tag'), + fi.text('Text', 'text'), + fi.url('URL', 'url') + ), + group('Group2', 'group2', {}, + fi.video('Video', 'video') + ), + styleGroup( + fi.alignment('Aligment', 'alignment'), + fi.color('Color', 'color'), + fi.backgroundimage('Background Image', 'backgroundimage'), + fi.border('Border', 'border'), + fi.gradient('Gradient', 'gradient'), + fi.spacing('Spacing', 'spacing'), + fi.textalignment('Text Alignment', 'textalignment') + ) +) diff --git a/test/all-fields.module/fields.json b/test/all-fields.module/fields.json new file mode 100644 index 0000000..d0ea498 --- /dev/null +++ b/test/all-fields.module/fields.json @@ -0,0 +1,226 @@ +[ + { + "label": "Audio Player", + "name": "audioplayer", + "type": "audioplayer" + }, + { + "label": "Blog", + "name": "blog", + "type": "blog" + }, + { + "label": "Boolean", + "name": "boolean", + "type": "boolean" + }, + { + "label": "Choices", + "name": "choices", + "type": "choice" + }, + { + "label": "Date", + "name": "date", + "type": "date" + }, + { + "label": "Datetime", + "name": "datetime", + "type": "datetime" + }, + { + "label": "Email", + "name": "email", + "type": "email" + }, + { + "label": "Embed", + "name": "embed", + "type": "embed" + }, + { + "label": "File", + "name": "file", + "type": "file" + }, + { + "label": "Font", + "name": "font", + "type": "font" + }, + { + "label": "Form", + "name": "form", + "type": "form" + }, + { + "label": "HTML", + "name": "html", + "type": "html" + }, + { + "label": "CRM Object", + "name": "crmobject", + "object_type": "COMPANY", + "type": "crmobject" + }, + { + "label": "CRM Object Property", + "name": "crmobjectproperty", + "object_type": "COMPANY", + "type": "crmobjectproperty" + }, + { + "label": "CTA", + "name": "cta", + "type": "cta" + }, + { + "label": "HubL", + "name": "hubl", + "type": "hubl" + }, + { + "label": "HubDB Table", + "name": "hubdbtable", + "type": "hubdbtable" + }, + { + "label": "Icon", + "name": "icon", + "type": "icon" + }, + { + "label": "Image", + "name": "image", + "type": "image" + }, + { + "label": "Link", + "name": "link", + "type": "link" + }, + { + "label": "Logo", + "name": "logo", + "type": "logo" + }, + { + "label": "Meeting", + "name": "meeting", + "type": "meeting" + }, + { + "label": "Menu", + "name": "menu", + "type": "menu" + }, + { + "label": "Number", + "name": "number", + "type": "number" + }, + { + "label": "Page", + "name": "page", + "type": "page" + }, + { + "label": "Payment", + "name": "payment", + "type": "payment" + }, + { + "label": "Podcast", + "name": "podcast", + "type": "podcast" + }, + { + "label": "Rich Text", + "name": "richtext", + "type": "richtext" + }, + { + "label": "Simple Menu", + "name": "simplemenu", + "type": "simplemenu" + }, + { + "label": "Group", + "name": "group", + "type": "group", + "children": [ + { + "label": "Tag", + "name": "tag", + "type": "tag" + }, + { + "label": "Text", + "name": "text", + "type": "text" + }, + { + "label": "URL", + "name": "url", + "type": "url" + } + ] + }, + { + "label": "Group2", + "name": "group2", + "type": "group", + "children": [ + { + "label": "Video", + "name": "video", + "type": "videoplayer" + } + ] + }, + { + "name": "style", + "label": "Style", + "children": [ + { + "label": "Aligment", + "name": "alignment", + "type": "alignment" + }, + { + "label": "Color", + "name": "color", + "type": "color" + }, + { + "label": "Background Image", + "name": "backgroundimage", + "type": "backgroundimage" + }, + { + "label": "Border", + "name": "border", + "type": "border" + }, + { + "label": "Gradient", + "name": "gradient", + "type": "gradient" + }, + { + "label": "Spacing", + "name": "spacing", + "type": "spacing" + }, + { + "label": "Text Alignment", + "name": "textalignment", + "type": "textalignment" + } + ], + "tab": "STYLE", + "type": "group" + } +] \ No newline at end of file diff --git a/test/1content-js-simple.module/meta.json b/test/all-fields.module/meta.json similarity index 100% rename from test/1content-js-simple.module/meta.json rename to test/all-fields.module/meta.json diff --git a/test/1content-js-simple.module/module.css b/test/all-fields.module/module.css similarity index 100% rename from test/1content-js-simple.module/module.css rename to test/all-fields.module/module.css diff --git a/test/1content-js-simple.module/module.html b/test/all-fields.module/module.html similarity index 100% rename from test/1content-js-simple.module/module.html rename to test/all-fields.module/module.html diff --git a/test/1content-js-simple.module/module.js b/test/all-fields.module/module.js similarity index 100% rename from test/1content-js-simple.module/module.js rename to test/all-fields.module/module.js diff --git a/test/hubspot/2content-simple.module/fields.json b/test/hubspot/2content-simple.module/fields.json deleted file mode 100644 index 27baf7d..0000000 --- a/test/hubspot/2content-simple.module/fields.json +++ /dev/null @@ -1,135 +0,0 @@ -[ { - "id" : "67065a28-c72f-0206-5f2d-5adf985200b2", - "name" : "boolean_field", - "display_width" : null, - "label" : "Boolean", - "required" : false, - "locked" : false, - "display" : "checkbox", - "type" : "boolean", - "default" : false -}, { - "id" : "d9a9ccd2-0aa1-bd1d-b16a-be3e2026fb5a", - "name" : "choice_field", - "display_width" : null, - "label" : "Choice", - "required" : false, - "locked" : false, - "display" : "select", - "choices" : [ [ "value 1", "Label 1" ], [ "value 2", "Label 2" ] ], - "multiple" : false, - "reordering_enabled" : true, - "preset" : null, - "type" : "choice" -}, { - "id" : "c66b9d6f-2a9a-b6a3-05de-5cefa01a6edb", - "name" : "color_field", - "display_width" : null, - "label" : "Color", - "required" : false, - "locked" : false, - "type" : "color", - "default" : { - "color" : null, - "opacity" : null - } -}, { - "id" : "4519be9a-c5b2-ea1f-fb27-f31ffbbfcb6a", - "name" : "font_field", - "display_width" : null, - "label" : "Font", - "required" : false, - "locked" : false, - "load_external_fonts" : true, - "type" : "font", - "default" : { } -}, { - "id" : "4aeb0831-751d-5ea6-38d0-561e1d68ebb0", - "name" : "icon_field", - "display_width" : null, - "label" : "Icon", - "required" : false, - "locked" : false, - "icon_set" : "fontawesome-5.14.0", - "type" : "icon", - "default" : { } -}, { - "id" : "671cef31-b934-5f51-7658-8954dc49496d", - "name" : "image_field", - "display_width" : null, - "label" : "Image", - "required" : false, - "locked" : false, - "responsive" : true, - "resizable" : true, - "show_loading" : false, - "type" : "image", - "default" : { - "size_type" : "auto", - "src" : "", - "alt" : null, - "loading" : "lazy" - } -}, { - "id" : "1b9d2c17-2bb1-03fb-34e9-36b57bda276f", - "name" : "link_field", - "display_width" : null, - "label" : "Link", - "required" : false, - "locked" : false, - "supported_types" : [ "EXTERNAL", "CONTENT", "FILE", "EMAIL_ADDRESS", "BLOG", "CALL_TO_ACTION", "PHONE_NUMBER", "WHATSAPP_NUMBER" ], - "show_advanced_rel_options" : false, - "type" : "link", - "default" : { - "url" : { - "content_id" : null, - "type" : "EXTERNAL", - "href" : "" - }, - "open_in_new_tab" : false, - "no_follow" : false - } -}, { - "id" : "f9831153-edee-5eff-2bb3-dcdef9033189", - "name" : "number_field", - "display_width" : null, - "label" : "Number", - "required" : false, - "locked" : false, - "display" : "text", - "step" : 1, - "type" : "number" -}, { - "id" : "b004047b-7e31-6508-b855-48a95f937ea4", - "name" : "richtext_field", - "display_width" : null, - "label" : "Rich text", - "required" : false, - "locked" : false, - "type" : "richtext" -}, { - "id" : "9b7f9588-2181-1443-2cad-daa9be819935", - "name" : "text_field", - "display_width" : null, - "label" : "Text", - "required" : false, - "locked" : false, - "validation_regex" : "", - "allow_new_line" : false, - "show_emoji_picker" : false, - "type" : "text" -}, { - "id" : "41ce49bb-7b3a-ce50-40ba-791490bfd824", - "name" : "url_field", - "display_width" : null, - "label" : "URL", - "required" : false, - "locked" : false, - "supported_types" : [ "EXTERNAL", "CONTENT", "FILE", "EMAIL_ADDRESS", "BLOG", "CALL_TO_ACTION", "PHONE_NUMBER", "WHATSAPP_NUMBER" ], - "type" : "url", - "default" : { - "content_id" : null, - "href" : "", - "type" : "EXTERNAL" - } -} ] \ No newline at end of file diff --git a/test/hubspot/2content-simple.module/meta.json b/test/hubspot/2content-simple.module/meta.json deleted file mode 100644 index 3131461..0000000 --- a/test/hubspot/2content-simple.module/meta.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "global" : false, - "host_template_types" : [ "PAGE", "BLOG_POST", "BLOG_LISTING" ], - "module_id" : 66547651564, - "is_available_for_new_content" : true -} \ No newline at end of file diff --git a/test/hubspot/2content-simple.module/module.css b/test/hubspot/2content-simple.module/module.css deleted file mode 100644 index e69de29..0000000 diff --git a/test/hubspot/2content-simple.module/module.html b/test/hubspot/2content-simple.module/module.html deleted file mode 100644 index e69de29..0000000 diff --git a/test/hubspot/2content-simple.module/module.js b/test/hubspot/2content-simple.module/module.js deleted file mode 100644 index e69de29..0000000 diff --git a/test/hubspot/2content.module/fields.json b/test/hubspot/2content.module/fields.json deleted file mode 100644 index 6881064..0000000 --- a/test/hubspot/2content.module/fields.json +++ /dev/null @@ -1,184 +0,0 @@ -[ { - "id" : "67065a28-c72f-0206-5f2d-5adf985200b2", - "name" : "boolean_field", - "display_width" : null, - "label" : "Boolean", - "help_text" : "tooltip", - "required" : true, - "locked" : false, - "display" : "toggle", - "type" : "boolean", - "default" : true -}, { - "id" : "d9a9ccd2-0aa1-bd1d-b16a-be3e2026fb5a", - "name" : "choice_field", - "display_width" : null, - "label" : "Choice", - "inline_help_text" : "Inline", - "required" : false, - "locked" : true, - "display" : "radio", - "choices" : [ [ "value 1", "Label 1" ], [ "value 2", "Label 2" ] ], - "multiple" : false, - "reordering_enabled" : true, - "preset" : null, - "type" : "choice", - "default" : "value 1" -}, { - "id" : "c66b9d6f-2a9a-b6a3-05de-5cefa01a6edb", - "name" : "color_field", - "display_width" : null, - "label" : "Color", - "required" : false, - "locked" : false, - "visibility" : { - "controlling_field" : null, - "controlling_field_path" : "boolean_field", - "controlling_value_regex" : "true", - "property" : null, - "operator" : "EQUAL", - "access" : null, - "hidden_subfields" : null - }, - "show_opacity" : false, - "type" : "color", - "default" : { - "color" : "#FF0201", - "opacity" : 100 - } -}, { - "id" : "4519be9a-c5b2-ea1f-fb27-f31ffbbfcb6a", - "name" : "font_field", - "display_width" : null, - "label" : "Font", - "required" : false, - "locked" : false, - "load_external_fonts" : true, - "type" : "font", - "default" : { - "styles" : { }, - "variant" : "600", - "font" : "Open Sans", - "fallback" : "sans-serif", - "font_set" : "GOOGLE", - "color" : "#FF00FF" - } -}, { - "id" : "4aeb0831-751d-5ea6-38d0-561e1d68ebb0", - "name" : "icon_field", - "display_width" : null, - "label" : "Icon", - "required" : false, - "locked" : false, - "icon_set" : "fontawesome-5.14.0", - "type" : "icon", - "default" : { } -}, { - "id" : "671cef31-b934-5f51-7658-8954dc49496d", - "name" : "image_field", - "display_width" : null, - "label" : "Image", - "required" : false, - "locked" : false, - "occurrence" : { - "min" : null, - "max" : 10, - "sorting_label_field" : null, - "default" : null - }, - "responsive" : true, - "resizable" : true, - "show_loading" : false, - "type" : "image", - "default" : { - "size_type" : "auto", - "src" : "", - "alt" : null, - "loading" : "lazy" - } -}, { - "id" : "1b9d2c17-2bb1-03fb-34e9-36b57bda276f", - "name" : "link_field", - "display_width" : null, - "label" : "Link", - "required" : true, - "locked" : false, - "occurrence" : { - "min" : null, - "max" : null, - "sorting_label_field" : null, - "default" : null - }, - "supported_types" : [ "EXTERNAL", "CONTENT", "FILE", "EMAIL_ADDRESS", "BLOG", "CALL_TO_ACTION", "PHONE_NUMBER", "WHATSAPP_NUMBER" ], - "show_advanced_rel_options" : false, - "type" : "link", - "default" : { - "url" : { - "content_id" : null, - "href" : "", - "type" : "CONTENT" - }, - "open_in_new_tab" : false, - "no_follow" : false - } -}, { - "id" : "f9831153-edee-5eff-2bb3-dcdef9033189", - "name" : "number_field", - "display_width" : null, - "label" : "Number", - "required" : false, - "locked" : false, - "occurrence" : { - "min" : 2, - "max" : null, - "sorting_label_field" : null, - "default" : 4 - }, - "display" : "text", - "max" : 1000, - "step" : 1, - "suffix" : "%", - "type" : "number" -}, { - "id" : "b004047b-7e31-6508-b855-48a95f937ea4", - "name" : "richtext_field", - "display_width" : null, - "label" : "Rich text", - "required" : false, - "locked" : false, - "type" : "richtext", - "default" : "

Default rich text

" -}, { - "id" : "9b7f9588-2181-1443-2cad-daa9be819935", - "name" : "text_field", - "display_width" : null, - "label" : "Text", - "required" : false, - "locked" : false, - "occurrence" : { - "min" : null, - "max" : null, - "sorting_label_field" : null, - "default" : 5 - }, - "validation_regex" : "", - "placeholder" : "Placeholder", - "allow_new_line" : false, - "show_emoji_picker" : true, - "type" : "text", - "default" : [ "Default text", "Default text", "Default text", "Default text", "Default text" ] -}, { - "id" : "41ce49bb-7b3a-ce50-40ba-791490bfd824", - "name" : "url_field", - "display_width" : null, - "label" : "URL", - "required" : false, - "locked" : false, - "supported_types" : [ "EXTERNAL", "CONTENT", "FILE", "EMAIL_ADDRESS", "BLOG", "CALL_TO_ACTION", "PHONE_NUMBER", "WHATSAPP_NUMBER" ], - "type" : "url", - "default" : { - "content_id" : null, - "href" : "", - "type" : "BLOG" - } -} ] \ No newline at end of file diff --git a/test/hubspot/2content.module/meta.json b/test/hubspot/2content.module/meta.json deleted file mode 100644 index 676b21e..0000000 --- a/test/hubspot/2content.module/meta.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "global" : false, - "host_template_types" : [ "PAGE", "BLOG_POST", "BLOG_LISTING" ], - "module_id" : 66608841182, - "is_available_for_new_content" : true -} \ No newline at end of file diff --git a/test/hubspot/2content.module/module.css b/test/hubspot/2content.module/module.css deleted file mode 100644 index a90fb5c..0000000 --- a/test/hubspot/2content.module/module.css +++ /dev/null @@ -1 +0,0 @@ -/* module css / no hubl variables */ diff --git a/test/hubspot/2content.module/module.html b/test/hubspot/2content.module/module.html deleted file mode 100644 index e69de29..0000000 diff --git a/test/hubspot/2content.module/module.js b/test/hubspot/2content.module/module.js deleted file mode 100644 index e69de29..0000000 diff --git a/test/hubspot/2style-simple.module/fields.json b/test/hubspot/2style-simple.module/fields.json deleted file mode 100644 index d66fa53..0000000 --- a/test/hubspot/2style-simple.module/fields.json +++ /dev/null @@ -1,169 +0,0 @@ -[ { - "id" : "640dfd5b-3d6c-96d6-ac39-4ec972becc7a", - "name" : "style", - "display_width" : null, - "label" : "Style", - "required" : false, - "locked" : false, - "children" : [ { - "id" : "6e312ebe-4efc-66cd-285d-e6d027694aa7", - "name" : "alignment_field", - "display_width" : null, - "label" : "Alignment", - "required" : false, - "locked" : false, - "alignment_direction" : "BOTH", - "type" : "alignment", - "default" : { } - }, { - "id" : "d59378f2-78e7-4ef9-7ac1-81d0f61589a9", - "name" : "backgroundimage_field", - "display_width" : null, - "label" : "Background image", - "required" : false, - "locked" : false, - "type" : "backgroundimage", - "default" : { - "src" : "", - "background_position" : "MIDDLE_CENTER", - "background_size" : "cover" - } - }, { - "id" : "e6800232-f62f-48d9-8679-ce024cb038f4", - "name" : "boolean_field", - "display_width" : null, - "label" : "Boolean", - "required" : false, - "locked" : false, - "display" : "checkbox", - "type" : "boolean", - "default" : false - }, { - "id" : "20258e32-7667-0e2f-cb70-5281bb2c88ee", - "name" : "border_field", - "display_width" : null, - "label" : "Border", - "required" : false, - "locked" : false, - "allow_custom_border_sides" : false, - "type" : "border", - "default" : { } - }, { - "id" : "2cc20746-d6fe-1adf-5ff5-5195c6651ef5", - "name" : "choice_field", - "display_width" : null, - "label" : "Choice", - "required" : false, - "locked" : false, - "display" : "select", - "choices" : [ [ "value 1", "Label 1" ], [ "value 2", "Label 2" ] ], - "multiple" : false, - "reordering_enabled" : true, - "preset" : null, - "type" : "choice" - }, { - "id" : "3ddc77be-25fc-29c7-706b-c6e3b4640c04", - "name" : "color_field", - "display_width" : null, - "label" : "Color", - "required" : false, - "locked" : false, - "type" : "color", - "default" : { - "color" : null, - "opacity" : null - } - }, { - "id" : "aa7acb39-92a1-1e4b-03fc-f0920d276168", - "name" : "font_field", - "display_width" : null, - "label" : "Font", - "required" : false, - "locked" : false, - "load_external_fonts" : true, - "type" : "font", - "default" : { } - }, { - "id" : "21e98a43-b2c2-867d-c5ec-db762c0d6b7b", - "name" : "gradient_field", - "display_width" : null, - "label" : "Gradient", - "required" : false, - "locked" : false, - "type" : "gradient", - "default" : { } - }, { - "id" : "a06a90e7-e4aa-113f-3c68-1137a0ab49df", - "name" : "icon_field", - "display_width" : null, - "label" : "Icon", - "required" : false, - "locked" : false, - "icon_set" : "fontawesome-5.14.0", - "type" : "icon", - "default" : { } - }, { - "id" : "4001d7e5-398e-5c03-50fe-c14f5d77e28a", - "name" : "image_field", - "display_width" : null, - "label" : "Image", - "required" : false, - "locked" : false, - "responsive" : true, - "resizable" : true, - "show_loading" : false, - "type" : "image", - "default" : { - "size_type" : "auto", - "src" : "", - "alt" : null, - "loading" : "lazy" - } - }, { - "id" : "2d9b6c89-9540-89ee-3d91-387f94e6ec3e", - "name" : "number_field", - "display_width" : null, - "label" : "Number", - "required" : false, - "locked" : false, - "display" : "text", - "step" : 1, - "type" : "number" - }, { - "id" : "31bb69b7-66c4-cf8e-998f-140230419dca", - "name" : "spacing_field", - "display_width" : null, - "label" : "Spacing", - "required" : false, - "locked" : false, - "type" : "spacing", - "default" : { } - }, { - "id" : "9ddc786d-00b0-0f1b-c26d-4537ea21a2ef", - "name" : "textalignment_field", - "display_width" : null, - "label" : "Text alignment", - "required" : false, - "locked" : false, - "type" : "textalignment", - "default" : { } - } ], - "tab" : "STYLE", - "expanded" : false, - "type" : "group", - "default" : { - "boolean_field" : false, - "color_field" : { - "color" : null, - "opacity" : null - }, - "font_field" : { }, - "icon_field" : { }, - "image_field" : { - "size_type" : "auto", - "src" : "", - "alt" : null, - "loading" : "lazy" - } - } -} ] \ No newline at end of file diff --git a/test/hubspot/2style-simple.module/meta.json b/test/hubspot/2style-simple.module/meta.json deleted file mode 100644 index dba5a4d..0000000 --- a/test/hubspot/2style-simple.module/meta.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "global" : false, - "host_template_types" : [ "PAGE", "BLOG_POST", "BLOG_LISTING" ], - "module_id" : 66547651566, - "is_available_for_new_content" : true -} \ No newline at end of file diff --git a/test/hubspot/2style-simple.module/module.css b/test/hubspot/2style-simple.module/module.css deleted file mode 100644 index e69de29..0000000 diff --git a/test/hubspot/2style-simple.module/module.html b/test/hubspot/2style-simple.module/module.html deleted file mode 100644 index e69de29..0000000 diff --git a/test/hubspot/2style-simple.module/module.js b/test/hubspot/2style-simple.module/module.js deleted file mode 100644 index e69de29..0000000 diff --git a/test/hubspot/2style.module/fields.json b/test/hubspot/2style.module/fields.json deleted file mode 100644 index af851ce..0000000 --- a/test/hubspot/2style.module/fields.json +++ /dev/null @@ -1,392 +0,0 @@ -[ { - "id" : "640dfd5b-3d6c-96d6-ac39-4ec972becc7a", - "name" : "style", - "display_width" : null, - "label" : "Style", - "required" : false, - "locked" : false, - "children" : [ { - "id" : "6e312ebe-4efc-66cd-285d-e6d027694aa7", - "name" : "alignment_field", - "display_width" : null, - "label" : "Alignment", - "required" : true, - "locked" : false, - "alignment_direction" : "BOTH", - "type" : "alignment", - "default" : { - "horizontal_align" : "RIGHT", - "vertical_align" : "BOTTOM" - } - }, { - "id" : "d59378f2-78e7-4ef9-7ac1-81d0f61589a9", - "name" : "backgroundimage_field", - "display_width" : null, - "label" : "Background image", - "inline_help_text" : "Inline", - "required" : false, - "locked" : false, - "type" : "backgroundimage", - "default" : { - "src" : "", - "background_position" : "MIDDLE_CENTER", - "background_size" : "cover" - } - }, { - "id" : "e6800232-f62f-48d9-8679-ce024cb038f4", - "name" : "boolean_field", - "display_width" : null, - "label" : "Boolean", - "required" : false, - "locked" : false, - "display" : "checkbox", - "type" : "boolean", - "default" : true - }, { - "id" : "20258e32-7667-0e2f-cb70-5281bb2c88ee", - "name" : "border_field", - "display_width" : null, - "label" : "Border", - "required" : false, - "locked" : false, - "allow_custom_border_sides" : true, - "type" : "border", - "default" : { - "bottom" : { - "style" : "solid", - "color" : "#FF0201", - "opacity" : 100, - "width" : { - "value" : 4, - "units" : "px" - } - }, - "left" : { - "style" : "solid", - "color" : "#FF0201", - "opacity" : 100, - "width" : { - "value" : 4, - "units" : "px" - } - }, - "right" : { - "style" : "solid", - "color" : "#FF0201", - "opacity" : 100, - "width" : { - "value" : 4, - "units" : "px" - } - } - } - }, { - "id" : "2cc20746-d6fe-1adf-5ff5-5195c6651ef5", - "name" : "choice_field", - "display_width" : null, - "label" : "Choice", - "required" : false, - "locked" : false, - "display" : "select", - "choices" : [ [ "value 1", "Label 1" ], [ "value 2", "Label 2" ] ], - "multiple" : false, - "reordering_enabled" : true, - "preset" : null, - "type" : "choice" - }, { - "id" : "3ddc77be-25fc-29c7-706b-c6e3b4640c04", - "name" : "color_field", - "display_width" : null, - "label" : "Color", - "required" : false, - "locked" : false, - "visibility" : { - "controlling_field" : null, - "controlling_field_path" : "style.number_field", - "controlling_value_regex" : null, - "property" : null, - "operator" : "NOT_EMPTY", - "access" : null, - "hidden_subfields" : null - }, - "type" : "color", - "default" : { - "color" : null, - "opacity" : null - } - }, { - "id" : "aa7acb39-92a1-1e4b-03fc-f0920d276168", - "name" : "font_field", - "display_width" : null, - "label" : "Font", - "required" : false, - "locked" : false, - "load_external_fonts" : true, - "type" : "font", - "default" : { - "font" : "arial, helvetica, sans-serif", - "fallback" : null, - "variant" : null, - "font_set" : "DEFAULT", - "size" : 30, - "styles" : { - "text-decoration" : "none", - "font-weight" : "normal", - "font-style" : "italic" - } - } - }, { - "id" : "21e98a43-b2c2-867d-c5ec-db762c0d6b7b", - "name" : "gradient_field", - "display_width" : null, - "label" : "Gradient", - "required" : false, - "locked" : false, - "type" : "gradient", - "default" : { - "colors" : [ { - "color" : { - "r" : 0, - "g" : 255, - "b" : 255, - "a" : 1 - } - }, { - "color" : { - "r" : 105, - "g" : 168, - "b" : 79, - "a" : 0.8 - } - } ], - "side_or_corner" : { - "verticalSide" : "TOP", - "horizontalSide" : null - } - } - }, { - "id" : "a06a90e7-e4aa-113f-3c68-1137a0ab49df", - "name" : "icon_field", - "display_width" : null, - "label" : "Icon", - "help_text" : "Tooltip", - "required" : false, - "locked" : true, - "icon_set" : "fontawesome-5.14.0", - "type" : "icon", - "default" : { - "name" : "" - } - }, { - "id" : "4001d7e5-398e-5c03-50fe-c14f5d77e28a", - "name" : "image_field", - "display_width" : null, - "label" : "Image", - "inline_help_text" : "Inline", - "required" : false, - "locked" : false, - "responsive" : true, - "resizable" : true, - "show_loading" : true, - "type" : "image", - "default" : { - "size_type" : "auto", - "src" : "", - "alt" : null, - "loading" : "lazy" - } - }, { - "id" : "2d9b6c89-9540-89ee-3d91-387f94e6ec3e", - "name" : "number_field", - "display_width" : null, - "label" : "Number", - "required" : false, - "locked" : false, - "display" : "text", - "max" : 100, - "step" : 5, - "suffix" : "px", - "type" : "number" - }, { - "id" : "31bb69b7-66c4-cf8e-998f-140230419dca", - "name" : "spacing_field", - "display_width" : null, - "label" : "Spacing", - "required" : false, - "locked" : false, - "type" : "spacing", - "default" : { - "margin" : { - "top" : { - "value" : 38, - "units" : "px" - }, - "bottom" : { - "value" : null, - "units" : null - } - }, - "padding" : { - "top" : { - "value" : 20, - "units" : "px" - }, - "bottom" : { - "value" : null, - "units" : null - }, - "left" : { - "value" : null, - "units" : null - }, - "right" : { - "value" : null, - "units" : null - } - } - } - }, { - "id" : "9ddc786d-00b0-0f1b-c26d-4537ea21a2ef", - "name" : "textalignment_field", - "display_width" : null, - "label" : "Text alignment", - "required" : false, - "locked" : false, - "visibility" : { - "controlling_field" : null, - "controlling_field_path" : "style.color_field", - "controlling_value_regex" : "#FFFFFF", - "property" : "color", - "operator" : "EQUAL", - "access" : null, - "hidden_subfields" : null - }, - "type" : "textalignment", - "default" : { - "text_align" : "JUSTIFY" - } - } ], - "tab" : "STYLE", - "expanded" : false, - "type" : "group", - "default" : { - "alignment_field" : { - "horizontal_align" : "RIGHT", - "vertical_align" : "BOTTOM" - }, - "backgroundimage_field" : { - "src" : "", - "background_position" : "MIDDLE_CENTER", - "background_size" : "cover" - }, - "boolean_field" : true, - "border_field" : { - "bottom" : { - "style" : "solid", - "color" : "#FF0201", - "opacity" : 100, - "width" : { - "value" : 4, - "units" : "px" - } - }, - "left" : { - "style" : "solid", - "color" : "#FF0201", - "opacity" : 100, - "width" : { - "value" : 4, - "units" : "px" - } - }, - "right" : { - "style" : "solid", - "color" : "#FF0201", - "opacity" : 100, - "width" : { - "value" : 4, - "units" : "px" - } - } - }, - "color_field" : { - "color" : null, - "opacity" : null - }, - "font_field" : { - "font" : "arial, helvetica, sans-serif", - "fallback" : null, - "variant" : null, - "font_set" : "DEFAULT", - "size" : 30, - "styles" : { - "text-decoration" : "none", - "font-weight" : "normal", - "font-style" : "italic" - } - }, - "gradient_field" : { - "colors" : [ { - "color" : { - "r" : 0, - "g" : 255, - "b" : 255, - "a" : 1 - } - }, { - "color" : { - "r" : 105, - "g" : 168, - "b" : 79, - "a" : 0.8 - } - } ], - "side_or_corner" : { - "verticalSide" : "TOP", - "horizontalSide" : null - } - }, - "icon_field" : { - "name" : "" - }, - "image_field" : { - "size_type" : "auto", - "src" : "", - "alt" : null, - "loading" : "lazy" - }, - "spacing_field" : { - "margin" : { - "top" : { - "value" : 38, - "units" : "px" - }, - "bottom" : { - "value" : null, - "units" : null - } - }, - "padding" : { - "top" : { - "value" : 20, - "units" : "px" - }, - "bottom" : { - "value" : null, - "units" : null - }, - "left" : { - "value" : null, - "units" : null - }, - "right" : { - "value" : null, - "units" : null - } - } - }, - "textalignment_field" : { - "text_align" : "JUSTIFY" - } - } -} ] \ No newline at end of file diff --git a/test/hubspot/2style.module/meta.json b/test/hubspot/2style.module/meta.json deleted file mode 100644 index 72b09bc..0000000 --- a/test/hubspot/2style.module/meta.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "global" : false, - "host_template_types" : [ "PAGE", "BLOG_POST", "BLOG_LISTING" ], - "module_id" : 66609031653, - "is_available_for_new_content" : true -} \ No newline at end of file diff --git a/test/hubspot/2style.module/module.css b/test/hubspot/2style.module/module.css deleted file mode 100644 index a90fb5c..0000000 --- a/test/hubspot/2style.module/module.css +++ /dev/null @@ -1 +0,0 @@ -/* module css / no hubl variables */ diff --git a/test/hubspot/2style.module/module.html b/test/hubspot/2style.module/module.html deleted file mode 100644 index e69de29..0000000 diff --git a/test/hubspot/2style.module/module.js b/test/hubspot/2style.module/module.js deleted file mode 100644 index e69de29..0000000