@foxy.io/elements 1.27.0-beta.2 → 1.27.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/elements/public/AttributeForm/AttributeForm.d.ts +1 -1
- package/dist/elements/public/AttributeForm/AttributeForm.js +1 -1
- package/dist/elements/public/AttributeForm/AttributeForm.js.map +1 -1
- package/dist/elements/public/CustomFieldForm/CustomFieldForm.d.ts +1 -1
- package/dist/elements/public/CustomFieldForm/CustomFieldForm.js +1 -1
- package/dist/elements/public/CustomFieldForm/CustomFieldForm.js.map +1 -1
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ import type { Data, Templates } from './types';
|
|
|
2
2
|
import type { TemplateResult } from 'lit-html';
|
|
3
3
|
import type { NucleonV8N } from '../NucleonElement/types';
|
|
4
4
|
import { BooleanSelector } from '@foxy.io/sdk/core';
|
|
5
|
-
import { InternalForm } from '../../internal/InternalForm';
|
|
5
|
+
import { InternalForm } from '../../internal/InternalForm/InternalForm';
|
|
6
6
|
declare const Base: typeof InternalForm & import("lit-element").Constructor<import("../../../mixins/translatable").TranslatableMixinHost> & {
|
|
7
7
|
defaultNS: string;
|
|
8
8
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TranslatableMixin } from "../../../mixins/translatable.js";
|
|
2
2
|
import { BooleanSelector } from '@foxy.io/sdk/core';
|
|
3
|
-
import { InternalForm } from "../../internal/InternalForm.js";
|
|
3
|
+
import { InternalForm } from "../../internal/InternalForm/InternalForm.js";
|
|
4
4
|
import { html } from 'lit-html';
|
|
5
5
|
const NS = 'attribute-form';
|
|
6
6
|
const Base = TranslatableMixin(InternalForm, NS);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttributeForm.js","sourceRoot":"","sources":["../../../../src/elements/public/AttributeForm/AttributeForm.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,wCAAqC;AACjE,OAAO,EAAE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IAAI,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,mBAAmB;YAC9D,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,IAAI,GAAG,IAAI,mBAAmB;SACjE,CAAC;IACJ,CAAC;IAcD,IAAI,gBAAgB;QAClB,MAAM,WAAW,GAAG,CAAC,KAAK,CAAC,gBAAgB,CAAC,QAAQ,EAAE,CAAC,CAAC;QACxD,IAAI,IAAI,CAAC,IAAI;YAAE,WAAW,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;QACjD,OAAO,IAAI,eAAe,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;IAC3D,CAAC;IAED,UAAU;QACR,OAAO,IAAI,CAAA;;;;;mBAKI,IAAI,CAAC,mBAAmB;oBACvB,IAAI,CAAC,oBAAoB;;;;QAIrC,KAAK,CAAC,UAAU,EAAE;KACrB,CAAC;IACJ,CAAC;CACF","sourcesContent":["import type { Data, Templates } from './types';\nimport type { TemplateResult } from 'lit-html';\nimport type { NucleonV8N } from '../NucleonElement/types';\n\nimport { TranslatableMixin } from '../../../mixins/translatable';\nimport { BooleanSelector } from '@foxy.io/sdk/core';\nimport { InternalForm } from '../../internal/InternalForm/InternalForm';\nimport { html } from 'lit-html';\n\nconst NS = 'attribute-form';\nconst Base = TranslatableMixin(InternalForm, NS);\n\n/**\n * Form element for creating or editing attributes.\n *\n * @slot name:before - **new in v1.4.0**\n * @slot name:after - **new in v1.4.0**\n *\n * @slot value:before - **new in v1.4.0**\n * @slot value:after - **new in v1.4.0**\n *\n * @slot visibility:before - **new in v1.4.0**\n * @slot visibility:after - **new in v1.4.0**\n *\n * @slot timestamps:before - **new in v1.4.0**\n * @slot timestamps:after - **new in v1.4.0**\n *\n * @slot create:before - **new in v1.4.0**\n * @slot create:after - **new in v1.4.0**\n *\n * @slot delete:before - **new in v1.4.0**\n * @slot delete:after - **new in v1.4.0**\n *\n * @element foxy-attribute-form\n * @since 1.2.0\n */\nexport class AttributeForm extends Base<Data> {\n static get v8n(): NucleonV8N<Data> {\n return [\n ({ value }) => (value && value.length > 0) || 'value:v8n_required',\n ({ value }) => !value || value.length <= 1000 || 'value:v8n_too_long',\n ({ name }) => (name && name.length > 0) || 'name:v8n_required',\n ({ name }) => !name || name.length <= 500 || 'name:v8n_too_long',\n ];\n }\n\n templates: Templates = {};\n\n private readonly __visibilityGetValue = () => {\n return this.form.visibility || 'private';\n };\n\n private readonly __visibilityOptions = [\n { label: 'option_public', value: 'public' },\n { label: 'option_restricted', value: 'restricted' },\n { label: 'option_private', value: 'private' },\n ];\n\n get readonlySelector(): BooleanSelector {\n const alwaysMatch = [super.readonlySelector.toString()];\n if (this.href) alwaysMatch.unshift('visibility');\n return new BooleanSelector(alwaysMatch.join(' ').trim());\n }\n\n renderBody(): TemplateResult {\n return html`\n <foxy-internal-source-control infer=\"name\"></foxy-internal-source-control>\n <foxy-internal-source-control infer=\"value\"></foxy-internal-source-control>\n <foxy-internal-radio-group-control\n infer=\"visibility\"\n .options=${this.__visibilityOptions}\n .getValue=${this.__visibilityGetValue}\n >\n </foxy-internal-radio-group-control>\n\n ${super.renderBody()}\n `;\n }\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Data, Templates } from './types';
|
|
2
2
|
import type { TemplateResult } from 'lit-html';
|
|
3
3
|
import type { NucleonV8N } from '../NucleonElement/types';
|
|
4
|
-
import { InternalForm } from '../../internal/InternalForm';
|
|
4
|
+
import { InternalForm } from '../../internal/InternalForm/InternalForm';
|
|
5
5
|
declare const Base: typeof InternalForm & import("lit-element").Constructor<import("../../../mixins/translatable").TranslatableMixinHost> & {
|
|
6
6
|
defaultNS: string;
|
|
7
7
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TranslatableMixin } from "../../../mixins/translatable.js";
|
|
2
|
-
import { InternalForm } from "../../internal/InternalForm.js";
|
|
2
|
+
import { InternalForm } from "../../internal/InternalForm/InternalForm.js";
|
|
3
3
|
import { html } from 'lit-html';
|
|
4
4
|
const NS = 'custom-field-form';
|
|
5
5
|
const Base = TranslatableMixin(InternalForm, NS);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomFieldForm.js","sourceRoot":"","sources":["../../../../src/elements/public/CustomFieldForm/CustomFieldForm.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,wCAAqC;AACjE,OAAO,EAAE,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"CustomFieldForm.js","sourceRoot":"","sources":["../../../../src/elements/public/CustomFieldForm/CustomFieldForm.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,wCAAqC;AACjE,OAAO,EAAE,YAAY,EAAE,oDAAiD;AACxE,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhC,MAAM,EAAE,GAAG,mBAAmB,CAAC;AAC/B,MAAM,IAAI,GAAG,iBAAiB,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;AAEjD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,OAAO,eAAgB,SAAQ,IAAU;IAA/C;;QAUE,cAAS,GAAc,EAAE,CAAC;QAET,yBAAoB,GAAG,GAAG,EAAE;YAC3C,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAC/C,CAAC,CAAC;QAEe,yBAAoB,GAAG,CAAC,QAAkB,EAAE,EAAE;YAC7D,IAAI,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QACxD,CAAC,CAAC;QAEe,wBAAmB,GAAG,CAAC,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;IAiBvF,CAAC;IApCC,MAAM,KAAK,GAAG;QACZ,OAAO;YACL,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,oBAAoB;YAC7D,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,IAAI,GAAG,IAAI,oBAAoB;YAC/D,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,mBAAmB;YAC3D,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,IAAI,GAAG,IAAI,mBAAmB;SAC9D,CAAC;IACJ,CAAC;IAcD,UAAU;QACR,OAAO,IAAI,CAAA;;;;;oBAKK,IAAI,CAAC,oBAAoB;oBACzB,IAAI,CAAC,oBAAoB;mBAC1B,IAAI,CAAC,mBAAmB;;;;QAInC,KAAK,CAAC,UAAU,EAAE;KACrB,CAAC;IACJ,CAAC;CACF","sourcesContent":["import type { Data, Templates } from './types';\nimport type { TemplateResult } from 'lit-html';\nimport type { NucleonV8N } from '../NucleonElement/types';\n\nimport { TranslatableMixin } from '../../../mixins/translatable';\nimport { InternalForm } from '../../internal/InternalForm/InternalForm';\nimport { html } from 'lit-html';\n\nconst NS = 'custom-field-form';\nconst Base = TranslatableMixin(InternalForm, NS);\n\n/**\n * Form element for creating or editing custom fields.\n *\n * @slot name:before - **new in v1.4.0**\n * @slot name:after - **new in v1.4.0**\n *\n * @slot value:before - **new in v1.4.0**\n * @slot value:after - **new in v1.4.0**\n *\n * @slot visibility:before - **new in v1.4.0**\n * @slot visibility:after - **new in v1.4.0**\n *\n * @slot timestamps:before - **new in v1.4.0**\n * @slot timestamps:after - **new in v1.4.0**\n *\n * @slot create:before - **new in v1.4.0**\n * @slot create:after - **new in v1.4.0**\n *\n * @slot delete:before - **new in v1.4.0**\n * @slot delete:after - **new in v1.4.0**\n *\n * @element foxy-custom-field-form\n * @since 1.2.0\n */\nexport class CustomFieldForm extends Base<Data> {\n static get v8n(): NucleonV8N<Data> {\n return [\n ({ value: v }) => (v && v.length > 0) || 'value:v8n_required',\n ({ value: v }) => !v || v.length <= 700 || 'value:v8n_too_long',\n ({ name: v }) => (v && v.length > 0) || 'name:v8n_required',\n ({ name: v }) => !v || v.length <= 100 || 'name:v8n_too_long',\n ];\n }\n\n templates: Templates = {};\n\n private readonly __visibilityGetValue = () => {\n return this.form.is_hidden ? ['hidden'] : [];\n };\n\n private readonly __visibilitySetValue = (newValue: string[]) => {\n this.edit({ is_hidden: newValue.includes('hidden') });\n };\n\n private readonly __visibilityOptions = [{ label: 'option_hidden', value: 'hidden' }];\n\n renderBody(): TemplateResult {\n return html`\n <foxy-internal-source-control infer=\"name\"></foxy-internal-source-control>\n <foxy-internal-source-control infer=\"value\"></foxy-internal-source-control>\n <foxy-internal-checkbox-group-control\n infer=\"visibility\"\n .getValue=${this.__visibilityGetValue}\n .setValue=${this.__visibilitySetValue}\n .options=${this.__visibilityOptions}\n >\n </foxy-internal-checkbox-group-control>\n\n ${super.renderBody()}\n `;\n }\n}\n"]}
|