@pap-it/templates-form-element
Advanced tools
Comparing version 1.0.17 to 1.0.18
@@ -1,1 +0,1 @@ | ||
"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); | ||
"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); |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const tslib_1=require("tslib");tslib_1.__exportStar(require("./FormElement"),exports); | ||
"use strict";export*from"./FormElement"; |
@@ -1,1 +0,1 @@ | ||
"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); | ||
"use strict";import{__decorate as i}from"tslib";import{property as n,debounce as l,CustomElement as r}from"@pap-it/system-utils";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)}firstRender(){super.firstRender(),this.defaultValue===void 0&&(this.defaultinternal=!0,this.defaultValue=this.value)}formDisabledCallback(e){this.disabled=e}formStateRestoreCallback(e,a){console.log("[field]: formStateRestoreCallback",{state:e,mode:a})}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,a,s){!this._internals!==void 0&&this._internals.setValidity(e,a,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([n({attribute:"default-value",after:function(t){this.defaultinternal||(this.value=t),this.defaultinternal=!1}})],FormElement.prototype,"defaultValue",void 0),i([n({type:Boolean,after:function(t){t?this.setAttribute("aria-disabled","true"):this.setAttribute("aria-disabled","false")}})],FormElement.prototype,"disabled",void 0),i([n({rerender:!1})],FormElement.prototype,"name",void 0),i([n({after:function(t){this.updateform(t),this.debouncedchange()}})],FormElement.prototype,"value",void 0); |
@@ -1,1 +0,1 @@ | ||
"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); | ||
"use strict";export*from"./component";export*from"./types"; |
@@ -1,1 +0,1 @@ | ||
"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); | ||
"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); |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}); | ||
"use strict";export{}; |
{ | ||
"name": "@pap-it/templates-form-element", | ||
"version": "1.0.17", | ||
"version": "1.0.18", | ||
"scripts": { | ||
@@ -43,7 +43,7 @@ "init": "sh .scripts/init.sh", | ||
"dependencies": { | ||
"@pap-it/system-utils": "1.0.11", | ||
"@pap-it/system-utils": "1.0.12", | ||
"@pap-it/system-react": "0.0.8" | ||
}, | ||
"devDependencies": { | ||
"@pap-it/system-doc": "1.0.24", | ||
"@pap-it/system-doc": "1.0.26", | ||
"esbuild": "^0.17.18", | ||
@@ -50,0 +50,0 @@ "tslib": "^2.5.0", |
@@ -5,3 +5,3 @@ # FormElement | ||
Version: Version: Version: 1.0.17 | ||
Version: Version: Version: 1.0.18 | ||
@@ -11,2 +11,3 @@ | ||
## Development | ||
@@ -13,0 +14,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
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
1
16
7446
94
+ Added@pap-it/system-utils@1.0.12(transitive)
- Removed@pap-it/system-utils@1.0.11(transitive)
Updated@pap-it/system-utils@1.0.12