Détail du package

@cocreate/element-prototype

CoCreate-app282AGPL-3.01.29.2

A simple element-prototype component in vanilla javascript. Easily configured using HTML5 data-attributes and/or JavaScript API.

element-prototype, cocreate, low-code-framework, no-code-framework

readme

CoCreate-element-prototype

A simple element-prototype component in vanilla javascript. Easily configured using HTML5 data-attributes and/or JavaScript API. Take it for a spin in our playground!

min file size in bytes gzip file size in bytes brotlifile size in bytes GitHub latest release GitHub GitHub

CoCreate-element-prototype

Docs & Demo

For a complete guide and working demo refer to the doumentation

CDN

<script src="https://cdn.cocreate.app/element-prototype/latest/CoCreate-element-prototype.min.js"></script>
<script src="https://cdn.cocreate.app/element-prototype/latest/CoCreate-element-prototype.min.css"></script>

NPM

$ npm i @cocreate/element-prototype

yarn

$ yarn install @cocreate/element-prototype

Table of Contents

Announcements

All updates to this library are documented in our CHANGELOG and releases. You may also subscribe to email for releases and breaking changes.

Roadmap

If you are interested in the future direction of this project, please take a look at our open issues and pull requests. We would love to hear your feedback.

About

CoCreate-element-prototype is guided and supported by the CoCreate Developer Experience Team.

Please Email the Developer Experience Team here in case of any queries.

CoCreate-element-prototype is maintained and funded by CoCreate. The names and logos for CoCreate are trademarks of CoCreate, LLC.

How to Contribute

We encourage contribution to our libraries (you might even score some nifty swag), please see our CONTRIBUTING guide for details.

We want this library to be community-driven, and CoCreate led. We need your help to realize this goal. To help make sure we are building the right things in the right order, we ask that you create issues and pull requests or merely upvote or comment on existing issues or pull requests.

We appreciate your continued support, thank you!

License

This software is dual-licensed under the GNU Affero General Public License version 3 (AGPLv3) and a commercial license.

  • Open Source Use: For open-source projects and non-commercial use, this software is available under the AGPLv3. The AGPLv3 allows you to freely use, modify, and distribute this software, provided that all modifications and derivative works are also licensed under the AGPLv3. For the full license text, see the LICENSE file.

  • Commercial Use: For-profit companies and individuals intending to use this software for commercial purposes must obtain a commercial license. The commercial license is available when you sign up for an API key on our website. This license permits proprietary use and modification of the software without the copyleft requirements of the AGPLv3. It is ideal for integrating this software into proprietary commercial products and applications.

If you have not purchased a commercial license and intend to use this software for commercial purposes, you are required to sign up for an API key on our website.

changelog

1.29.2 (2025-05-01)

Bug Fixes

1.29.1 (2025-04-30)

Bug Fixes

  • $relativePath (c8293d1)
  • added css-loader (240afa0)
  • export (47db21a)
  • getValue.js: resolve attribute handling issues and enhance value processing (d7fd518)
  • handling of tagName switch case (3521dd2)
  • renamed from utility to operators.js (60e1599)
  • revert to previous version (e91c567)
  • typo remove value = from getAttribute as its a set only method (c3042db)
  • update query attributes (a3f71d3)
  • updated cocreate modules versions (9047924)
  • webpack.config and devdependencies (7240cdf)

1.29.0 (2025-04-11)

Bug Fixes

  • default to string if value is falsy and not 0 (b8eadb1)
  • format dat and time to correct format to set on inputs (35dd407)
  • if value-type condition before switch case (066da57)
  • setAttribute value (afcc695)
  • update exports (19eb2ae)
  • utility import (1f3337a)

Features

  • $scrollWidth , $relativPath and $path operators (08844ba)
  • add @cocreate utils (d82ee9b)
  • added queryElements() to element prototype. wiil automatically use attibutes if found on element as well as options could be passed (70114a1)
  • improved operators to target element poperties and methods (2734187)
  • utility for operator handling (d76a0f6)

1.28.1 (2025-01-18)

Bug Fixes

  • comment new regex and reinstate previous regex (dfe7354)
  • range input returns a single number if if min not defiened (07afdc4)

1.28.0 (2024-12-14)

Bug Fixes

  • comment test regex (bde8534)
  • dat yype inputs set to empty string if value does not exist (14069f9)
  • dynamically generate regex (afb8c89)
  • handling type="checkbox" (e567ff5)
  • if dispatchEvent dispatch if value empty or oldValue = newValue (66cc576)
  • removed redundant prtotype, HTMLElement can handle all elements (876d2c0)

Features

  • attribute value-bubbles to define whether input event bubbles on element value is set on (93a9d0e)
  • utility to handle operators accross all prototypes (7eb7a5e)

1.27.0 (2024-11-04)

Bug Fixes

  • pretier.config.js and file formating (1428fd9)
  • removed exec returning null (240543b)

Features

  • add prettier.config.js and format files (0acda3c)
  • loop through regex improved value handling (3ac5f8d)
  • value-dispatch attribute to dispatch event even if value is null or undefined (7f2ca4b)

1.26.0 (2024-09-21)

Bug Fixes

  • removed commented code (67b9cb4)
  • valueType default empty string to support startsWith (4515bc2)

Features

  • if value-type object and parse fails snitizze to remove any string outside of object and attempt parse again (9344106)
  • value-type array.$keys array.$value and array.$entries will return an array from object (25df40d)

1.25.0 (2024-08-24)

Bug Fixes

  • init getAttribute before getValue and setValue (e0cc56a)
  • removed element.value as already exist (280b1c6)
  • use hasOwnProperty to avoid prototype (b7736db)

Features

  • Add support for various regex operations in getValue function (b87b1a2)
  • encode and decode value (4550990)
  • support toLocaleString and locale atttribute (8ebfbd6)
  • supports regex parsing of value (b2e1a81)

1.24.1 (2024-06-19)

Bug Fixes

1.24.0 (2024-06-12)

Bug Fixes

Features

  • improved handling of valueType outerHtml (de39d50)

1.23.0 (2024-05-08)

Bug Fixes

Features

  • update attibutes using keyObperators on storage change or event updateAttributes (5a33bbd)
  • valueType boolean (7f6777f)

1.22.3 (2024-04-29)

Bug Fixes

  • bump cocreate dependencies (a2bc71e)

1.22.2 (2024-04-27)

Bug Fixes

  • try catch block for script insert (eff2887)

1.22.1 (2024-03-18)

Bug Fixes

1.22.0 (2024-02-20)

Features

  • $innerWidth and $innerHeight operators (c731aab)

1.21.0 (2024-02-13)

Bug Fixes

Features

  • getAttribute prototype to handle operator values (fa3c83f)

1.20.1 (2024-02-05)

Bug Fixes

1.20.0 (2024-02-03)

Bug Fixes

Features

  • value-types to handle date and time (3a72fbc)

1.19.0 (2024-01-30)

Bug Fixes

  • improved input true and false value (b788abb)
  • value must be a string to test for url operators (de1ed9d)

Features

  • handle url search params (2bc548e)
  • special values and regex support (083d56a)

1.18.0 (2024-01-17)

Bug Fixes

  • handle checkbox value true (ec73ce0)
  • handling checkbox defualt values (635f262)

Features

  • if value matches operators $user_id, $organization_id, $clientId will return from localStorage (e4bb41a)

1.17.0 (2023-12-18)

Bug Fixes

  • password value or empty string (acd9f55)

Features

  • skip param to dispatch event with sip false (c5816b1)

1.16.0 (2023-11-25)

Bug Fixes

  • update licensing details (4aeb6f8)

Features

  • upgrade dependencies for latest features and fixes (0a04fc1)

1.15.0 (2023-11-25)

Bug Fixes

  • pass attributes renamed to state (66fa12e)

Features

  • upgrade dependencies for latest features and fixes (0ddf814)

1.14.1 (2023-11-22)

Bug Fixes

  • if prefix, suffix value.toString() (a4d1cf1)

1.14.0 (2023-11-19)

Features

  • update dependecies for th latest features and bug fixes (0fecc37)

1.13.2 (2023-11-16)

Bug Fixes

  • if value is the same do not set (ee8538d)
  • try catch valueType object or json (bdc6e8a)

1.13.1 (2023-11-12)

Bug Fixes

  • bump dependencies for latest features (2a02917)

1.13.0 (2023-11-09)

Bug Fixes

Features

  • input date types are automatically converted to ISO format with UTC timezone Z and rendered in inputs in users local time (c628140)

1.12.0 (2023-11-03)

Bug Fixes

  • favicon.ico path (7570a08)
  • update dependencies to the lates versions (871484a)

Features

  • converts input type date to systems local date timezone (4235ceb)

1.11.8 (2023-10-25)

Bug Fixes

1.11.7 (2023-10-22)

Bug Fixes

  • initial getting of value was missing (1c549fd)

1.11.6 (2023-10-14)

Bug Fixes

1.11.5 (2023-10-09)

Bug Fixes

1.11.4 (2023-10-09)

Bug Fixes

1.11.3 (2023-10-09)

Bug Fixes

  • bump cocreate dependency versions (546fa28)

1.11.2 (2023-09-18)

Bug Fixes

  • Add path and pathname (fc0d1ae)
  • Update CoCreate depndencies to latest versions (abffa2e)

1.11.1 (2023-08-21)

Bug Fixes

1.11.0 (2023-08-21)

Features

  • Update cocreate dependencies for the latest features and bug fixes (96ddbda)

1.10.1 (2023-08-21)

Bug Fixes

1.10.0 (2023-08-17)

Features

  • bump cocreate dependencies for the latest updates and features (8ace910)

1.9.0 (2023-08-16)

Bug Fixes

  • crud attributes renamed (a8e28ab)
  • getValue function to correctly retrieve the value from the element and handle different value types. (ab8ba18)
  • replace -target -selector (b9ba7ad)
  • webpack.config and package.json make use of mode=production instead of process.env (1a54257)

Features

  • Add storage map (22d303a)
  • name attribute and variable renamed to key (912fd6b)
  • Refactor set value function and add temporary data storage for components and plugins (a99984c)
  • Update setValue.js to handle object values type and improved overall performance. (dd04a49)

1.8.30 (2023-06-14)

Bug Fixes

1.8.29 (2023-06-11)

Bug Fixes

1.8.28 (2023-06-11)

Bug Fixes

1.8.27 (2023-06-11)

Bug Fixes

1.8.26 (2023-06-11)

Bug Fixes

1.8.25 (2023-06-11)

Bug Fixes

1.8.24 (2023-06-11)

Bug Fixes

1.8.23 (2023-06-11)

Bug Fixes

1.8.22 (2023-06-11)

Bug Fixes

1.8.21 (2023-06-11)

Bug Fixes

  • @cocreate/cli moved to dependencies (c89ccf8)

1.8.20 (2023-06-11)

Bug Fixes

1.8.19 (2023-06-11)

Bug Fixes

  • renamed hosts to host. the value can be a string or an array of strings (672d250)

1.8.18 (2023-06-10)

Bug Fixes

1.8.17 (2023-06-10)

Bug Fixes

1.8.16 (2023-06-04)

Bug Fixes

  • Refactor CoCreate.config.js to remove hard-coded credentials (ad2a988)

1.8.15 (2023-06-04)

Bug Fixes

  • replaced secert GITHUB_TOKEN with GITHUB (14c48bd)
  • Update dependencies versions for @cocreate libraries (7eb5795)

1.8.14 (2023-06-04)

Bug Fixes

  • semantic-release: worklow error solved by running node version 14 (ab65db0)

1.8.13 (2023-06-02)

Bug Fixes

1.8.12 (2023-05-21)

Bug Fixes

1.8.11 (2023-05-19)

Bug Fixes

  • update packages to latest version. This commit updates various packages in the dependencies section of the package.json file to their latest published versions, thereby fixing multiple bugs and improving overall performance. (c32fa5d)

1.8.10 (2023-05-18)

Bug Fixes

  • apikey renamed to key (5cdfd7a)
  • apikey renamed to key (4d7173c)
  • refactor: Format setValue.js and refactor setValue function (41814a6)

1.8.9 (2023-05-10)

Bug Fixes

  • removed __encryptPassword (115c4b4)

1.8.8 (2023-05-06)

Bug Fixes

1.8.7 (2023-05-01)

Bug Fixes

  • update manifest.json to manifest.webmanifest (ed79f5f)

1.8.6 (2023-05-01)

Bug Fixes

  • replace fontawesome with svg (cb05213)

1.8.5 (2023-04-30)

Bug Fixes

  • fullscreen target updated to fullscreen fullscreen-target (b9a90ab)
  • package-lock.json and pnpm-lock.yaml added to .gitignore (6ed1998)
  • removed toogle fullscreen icons. now using css content (29a976f)

1.8.4 (2023-04-24)

Bug Fixes

  • updated worrkflows to v3 and node version 16 (c86ec78)

1.8.3 (2023-04-24)

Bug Fixes

  • workflow node version updated 16 (bc9b4bf)

1.8.2 (2023-04-24)

Bug Fixes

1.8.1 (2023-04-24)

Bug Fixes

  • removed uglifyjs-webpack-plugin (806b1f6)

1.8.0 (2023-04-24)

Features

1.7.0 (2023-04-13)

Features

  • setValue checks for prefix and suffix and removes them from value prior to setting value (41cd87d)
  • support value-type array (05715a3)

1.6.6 (2023-04-11)

Bug Fixes

1.6.5 (2023-04-11)

Bug Fixes

1.6.4 (2023-04-11)

Bug Fixes

  • renamed domains to hosts (a177214)

1.6.3 (2023-03-30)

Bug Fixes

1.6.2 (2023-03-16)

Bug Fixes

1.6.1 (2023-03-16)

Bug Fixes

1.6.0 (2023-03-16)

Features

  • replaced get-value and set-value with a super charged version of CoCreate-events (05f9c1e)

1.5.0 (2023-03-15)

Features

  • ability to use one checkbox as a boolean (9dc3e5a)

1.4.11 (2023-02-01)

Bug Fixes

1.4.10 (2023-02-01)

Bug Fixes

1.4.9 (2023-01-31)

Bug Fixes

1.4.8 (2023-01-30)

Bug Fixes

1.4.7 (2023-01-29)

Bug Fixes

1.4.6 (2023-01-27)

Bug Fixes

1.4.5 (2023-01-27)

Bug Fixes

1.4.4 (2023-01-13)

Bug Fixes

1.4.3 (2023-01-13)

Bug Fixes

1.4.2 (2023-01-10)

Bug Fixes

  • div element return condtions (c7039a6)

1.4.1 (2023-01-10)

Bug Fixes

1.4.0 (2023-01-10)

Features

  • run CoCReate,pass on elementsprior t inserting. merge domEditor and alements together (d39f8ff)

1.3.0 (2023-01-09)

Features

  • improved handling of checkbox and radio (b7444f2)

1.2.28 (2023-01-09)

Bug Fixes

1.2.27 (2023-01-09)

Bug Fixes

1.2.26 (2023-01-06)

Bug Fixes

1.2.25 (2023-01-06)

Bug Fixes

1.2.24 (2023-01-05)

Bug Fixes

1.2.23 (2023-01-05)

Bug Fixes

1.2.22 (2023-01-01)

Bug Fixes

1.2.21 (2022-12-31)

Bug Fixes

1.2.20 (2022-12-31)

Bug Fixes

1.2.19 (2022-12-30)

Bug Fixes

  • update config sources to use template braces with entry on src (bd17115)

1.2.18 (2022-12-29)

Bug Fixes

1.2.17 (2022-12-29)

Bug Fixes

1.2.16 (2022-12-27)

Bug Fixes

1.2.15 (2022-12-27)

Bug Fixes

1.2.14 (2022-12-27)

Bug Fixes

1.2.13 (2022-12-25)

Bug Fixes

1.2.12 (2022-12-25)

Bug Fixes

1.2.11 (2022-12-23)

Bug Fixes

1.2.10 (2022-12-22)

Bug Fixes

1.2.9 (2022-12-22)

Bug Fixes

  • update demos and bump dependencies (57a35e9)

1.2.8 (2022-12-21)

Bug Fixes

1.2.7 (2022-12-21)

Bug Fixes

1.2.6 (2022-12-20)

Bug Fixes

1.2.5 (2022-12-15)

Bug Fixes

  • add missing dev dependency style-loader (dd3d228)

1.2.4 (2022-12-13)

Bug Fixes

  • removed un used devDependencies (29dd890)

1.2.3 (2022-12-13)

Bug Fixes

1.2.2 (2022-12-13)

Bug Fixes

1.2.1 (2022-12-12)

Bug Fixes

1.2.0 (2022-12-12)

Features

  • add @cocreate/utils for getAttributes (dc888aa)

1.1.24 (2022-12-11)

Bug Fixes

1.1.23 (2022-12-11)

Bug Fixes

1.1.22 (2022-12-09)

Bug Fixes

1.1.21 (2022-12-08)

Bug Fixes

1.1.20 (2022-12-08)

Bug Fixes

  • bump @cocreate/crud-client (387dc6d)

1.1.19 (2022-12-07)

Bug Fixes

1.1.18 (2022-12-07)

Bug Fixes

  • bump @cocreate/crud=client (71ac42a)

1.1.17 (2022-12-04)

Bug Fixes

1.1.16 (2022-12-02)

Bug Fixes

1.1.15 (2022-12-02)

Bug Fixes

  • bump @cocreate/crud-client (e150b5d)

1.1.14 (2022-11-28)

Bug Fixes

1.1.13 (2022-11-28)

Bug Fixes

1.1.12 (2022-11-28)

Bug Fixes

  • bump @cocreate/crud-client (9e9bc2b)

1.1.11 (2022-11-28)

Bug Fixes

  • bump @cocreate/crud-client (98af524)

1.1.10 (2022-11-27)

Bug Fixes

1.1.9 (2022-11-26)

Bug Fixes

1.1.8 (2022-11-25)

Bug Fixes

  • bump dependencies (3ac4433)
  • CoCreate.crud.default removed bug causing default object (ea85b0c)

1.1.7 (2022-11-24)

Bug Fixes

1.1.6 (2022-11-23)

Bug Fixes

1.1.5 (2022-11-22)

Bug Fixes

  • apply src: {{source}} to CoCreate.config (b46ca59)
  • workflow docs (bb782a5)

1.1.4 (2022-11-21)

Bug Fixes

1.1.3 (2022-11-21)

Bug Fixes

  • replaced document_id with document._id (7943260)

1.1.2 (2022-11-21)

Bug Fixes

1.1.1 (2022-11-21)

Bug Fixes

  • bump d@cocreate ependencies (623cf67)

1.1.0 (2022-11-21)

Bug Fixes

  • add @cocreate/crud-client (ffeeef3)
  • crud.getAttr renamed to crud.getAttributes (b51f672)

Features

  • textarea attribute value support (ce13d5a)

1.0.0 (2022-10-29)

Features