@pap-it/templates-form-element
Advanced tools
Comparing version 1.0.16 to 1.0.17
@@ -1,1 +0,1 @@ | ||
"use strict";import{jsx as m}from"react/jsx-runtime";import n from"react";import{papHOC as p}from"@pap-it/system-react";import"../src/register.js";export{FormElement as FormElementElement}from"../src";const a=n.forwardRef((e,r)=>{const{children:t,...o}=e;return m("pap-form-element-template",{...o,ref:r,children:t})});export const FormElement=p(a); | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.FormElement=exports.FormElementElement=void 0;const jsx_runtime_1=require("react/jsx-runtime"),react_1=require("react"),system_react_1=require("@pap-it/system-react");require("../src/register.js");var src_1=require("../src");Object.defineProperty(exports,"FormElementElement",{enumerable:!0,get:function(){return src_1.FormElement}});const Component=react_1.default.forwardRef((e,r)=>{const{children:t,...n}=e;return(0,jsx_runtime_1.jsx)("pap-form-element-template",{...n,ref:r,children:t})});exports.FormElement=(0,system_react_1.papHOC)(Component); |
@@ -1,1 +0,1 @@ | ||
"use strict";export*from"./FormElement"; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const tslib_1=require("tslib");tslib_1.__exportStar(require("./FormElement"),exports); |
@@ -1,3 +0,3 @@ | ||
import { Base, Config } from "@pap-it/system-base"; | ||
export declare class FormElement extends Base { | ||
import { CustomElement, CustomElementSetting } from "@pap-it/system-utils"; | ||
export declare class FormElement extends CustomElement { | ||
static formAssociated: boolean; | ||
@@ -11,4 +11,4 @@ protected _internals: ElementInternals; | ||
value?: string; | ||
constructor(config?: Partial<Config>); | ||
firstUpdate(): void; | ||
constructor(setting?: Partial<CustomElementSetting>); | ||
firstRender(): void; | ||
formDisabledCallback(disabled: boolean): void; | ||
@@ -15,0 +15,0 @@ formStateRestoreCallback(state: any, mode: any): void; |
@@ -1,1 +0,1 @@ | ||
"use strict";import{__decorate as i}from"tslib";import{property as a,debounce as l}from"@pap-it/system-utils";import{Base as r}from"@pap-it/system-base";export class FormElement extends r{constructor(e){super(e),this.defaultinternal=!1,this.name="missing-name",this._internals=this.attachInternals(),this.debouncedchange=l(this.debouncedchange,120)}firstUpdate(){super.firstUpdate(),this.defaultValue===void 0&&(this.defaultinternal=!0,this.defaultValue=this.value)}formDisabledCallback(e){this.disabled=e}formStateRestoreCallback(e,n){console.log("[field]: formStateRestoreCallback",{state:e,mode:n})}checkValidity(){var e;return this._internals===void 0?!0:(e=this._internals)===null||e===void 0?void 0:e.checkValidity()}reportValidity(){var e;return this._internals===void 0?!0:(e=this._internals)===null||e===void 0?void 0:e.reportValidity()}get validity(){return this.element&&"validity"in this.element?this.element.validity:this._internals===void 0?{valid:!0}:this._internals.validity}get validationMessage(){return this.element&&"validationMessage"in this.element?this.element.validationMessage:this._internals===void 0?"":this._internals.validationMessage}setValidity(e,n,s){!this._internals!==void 0&&this._internals.setValidity(e,n,s||void 0)}formResetCallback(){this.value=this.defaultValue,this.element&&"value"in this.element&&(this.element.value=this.value||"")}connectElement(e){this.element||(this.element=e)}updateform(e){this._internals!==void 0&&this._internals.setFormValue(e)}validateElement(){}debouncedchange(){this.dispatchEvent(new Event("change")),this.validateElement()}}FormElement.formAssociated=!0,i([a({attribute:"default-value",after:function(t){this.defaultinternal||(this.value=t),this.defaultinternal=!1}})],FormElement.prototype,"defaultValue",void 0),i([a({type:Boolean,after:function(t){t?this.setAttribute("aria-disabled","true"):this.setAttribute("aria-disabled","false")}})],FormElement.prototype,"disabled",void 0),i([a({rerender:!1})],FormElement.prototype,"name",void 0),i([a({after:function(t){this.updateform(t),this.debouncedchange()}})],FormElement.prototype,"value",void 0); | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.FormElement=void 0;const tslib_1=require("tslib"),system_utils_1=require("@pap-it/system-utils");class FormElement extends system_utils_1.CustomElement{constructor(e){super(e),this.defaultinternal=!1,this.name="missing-name",this._internals=this.attachInternals(),this.debouncedchange=(0,system_utils_1.debounce)(this.debouncedchange,120)}firstRender(){super.firstRender(),this.defaultValue===void 0&&(this.defaultinternal=!0,this.defaultValue=this.value)}formDisabledCallback(e){this.disabled=e}formStateRestoreCallback(e,i){console.log("[field]: formStateRestoreCallback",{state:e,mode:i})}checkValidity(){var e;return this._internals===void 0?!0:(e=this._internals)===null||e===void 0?void 0:e.checkValidity()}reportValidity(){var e;return this._internals===void 0?!0:(e=this._internals)===null||e===void 0?void 0:e.reportValidity()}get validity(){return this.element&&"validity"in this.element?this.element.validity:this._internals===void 0?{valid:!0}:this._internals.validity}get validationMessage(){return this.element&&"validationMessage"in this.element?this.element.validationMessage:this._internals===void 0?"":this._internals.validationMessage}setValidity(e,i,n){!this._internals!==void 0&&this._internals.setValidity(e,i,n||void 0)}formResetCallback(){this.value=this.defaultValue,this.element&&"value"in this.element&&(this.element.value=this.value||"")}connectElement(e){this.element||(this.element=e)}updateform(e){this._internals!==void 0&&this._internals.setFormValue(e)}validateElement(){}debouncedchange(){this.dispatchEvent(new Event("change")),this.validateElement()}}exports.FormElement=FormElement,FormElement.formAssociated=!0,tslib_1.__decorate([(0,system_utils_1.property)({attribute:"default-value",after:function(t){this.defaultinternal||(this.value=t),this.defaultinternal=!1}})],FormElement.prototype,"defaultValue",void 0),tslib_1.__decorate([(0,system_utils_1.property)({type:Boolean,after:function(t){t?this.setAttribute("aria-disabled","true"):this.setAttribute("aria-disabled","false")}})],FormElement.prototype,"disabled",void 0),tslib_1.__decorate([(0,system_utils_1.property)({rerender:!1})],FormElement.prototype,"name",void 0),tslib_1.__decorate([(0,system_utils_1.property)({after:function(t){this.updateform(t),this.debouncedchange()}})],FormElement.prototype,"value",void 0); |
@@ -1,1 +0,1 @@ | ||
"use strict";export*from"./component";export*from"./types"; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const tslib_1=require("tslib");tslib_1.__exportStar(require("./component"),exports),tslib_1.__exportStar(require("./types"),exports); |
@@ -1,1 +0,1 @@ | ||
"use strict";import{FormElement as t}from"./component.js";const e=customElements!=null?customElements:window==null?void 0:window.customElements;if(!e)throw new Error("Custom Elements not supported");e.get("pap-form-element-template")||e.define("pap-form-element-template",t); | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const component_js_1=require("./component.js"),cElements=customElements!=null?customElements:window==null?void 0:window.customElements;if(!cElements)throw new Error("Custom Elements not supported");cElements.get("pap-form-element-template")||cElements.define("pap-form-element-template",component_js_1.FormElement); |
@@ -1,1 +0,1 @@ | ||
"use strict";export{}; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}); |
{ | ||
"name": "@pap-it/templates-form-element", | ||
"version": "1.0.16", | ||
"version": "1.0.17", | ||
"scripts": { | ||
@@ -43,8 +43,7 @@ "init": "sh .scripts/init.sh", | ||
"dependencies": { | ||
"@pap-it/system-utils": "1.0.10", | ||
"@pap-it/system-react": "0.0.8", | ||
"@pap-it/system-base": "1.0.16" | ||
"@pap-it/system-utils": "1.0.11", | ||
"@pap-it/system-react": "0.0.8" | ||
}, | ||
"devDependencies": { | ||
"@pap-it/system-doc": "1.0.22", | ||
"@pap-it/system-doc": "1.0.24", | ||
"esbuild": "^0.17.18", | ||
@@ -62,2 +61,2 @@ "tslib": "^2.5.0", | ||
"description": "" | ||
} | ||
} |
@@ -5,6 +5,7 @@ # FormElement | ||
Version: Version: Version: 1.0.16 | ||
Version: Version: Version: 1.0.17 | ||
## Development | ||
@@ -11,0 +12,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 3 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8426
2
96
15
4
+ Added@pap-it/system-utils@1.0.11(transitive)
- Removed@pap-it/system-base@1.0.16
- Removed@pap-it/system-base@1.0.16(transitive)
- Removed@pap-it/system-utils@1.0.10(transitive)
Updated@pap-it/system-utils@1.0.11