qcobjects 2.4.51 → 2.4.52
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/QCObjects.js +26 -2
- package/VERSION +1 -1
- package/package.json +1 -1
package/QCObjects.js
CHANGED
|
@@ -4649,8 +4649,8 @@
|
|
|
4649
4649
|
let listItems = "";
|
|
4650
4650
|
if (typeof list !== "undefined" && typeof list["map"] !== "undefined") {
|
|
4651
4651
|
listItems = list.map(function (element) {
|
|
4652
|
-
let dataItems = [...Object.keys(element)].map(k => ` data-${k}="${element[k].toString()}"`).join("");
|
|
4653
|
-
return `<component name="${componentName}" ${dataItems} ></component>`;
|
|
4652
|
+
let dataItems = [...Object.keys(element)].map(k => ` data-${k}="${(typeof element[k] !== "undefined" && element[k] !== null)?(element[k].toString()):("")}"`).join("");
|
|
4653
|
+
return `<quick-component name="${componentName}" ${dataItems} ></quick-component>`;
|
|
4654
4654
|
}).join("");
|
|
4655
4655
|
} else {
|
|
4656
4656
|
logger.debug(`${componentName}.${valueName} does not have a map property`);
|
|
@@ -4719,6 +4719,30 @@
|
|
|
4719
4719
|
|
|
4720
4720
|
ClassFactory("Processor").setProcessor(component);
|
|
4721
4721
|
|
|
4722
|
+
let quick_component = function () {
|
|
4723
|
+
/*
|
|
4724
|
+
* component processor
|
|
4725
|
+
* @usage
|
|
4726
|
+
* $quick_component(name=<name>, componentClass=<componentClass>, ...)
|
|
4727
|
+
* Returns a component tag declaration like:
|
|
4728
|
+
* <quick-component name=<name> ...></quick-component>
|
|
4729
|
+
*/
|
|
4730
|
+
let arg = [...arguments].slice(1).map(function (a) {
|
|
4731
|
+
return {
|
|
4732
|
+
[a.split("=")[0]]: a.split("=")[1]
|
|
4733
|
+
};
|
|
4734
|
+
}).reduce(function (k1, k2) {
|
|
4735
|
+
return Object.assign(k1, k2);
|
|
4736
|
+
});
|
|
4737
|
+
let attrs = [...Object.keys(arg)].map(function (a) {
|
|
4738
|
+
return `${a}=${arg[a]}`;
|
|
4739
|
+
}).join(" ");
|
|
4740
|
+
return `<quick-component ${attrs}></quick-component>`;
|
|
4741
|
+
};
|
|
4742
|
+
|
|
4743
|
+
ClassFactory("Processor").setProcessor(quick_component);
|
|
4744
|
+
|
|
4745
|
+
|
|
4722
4746
|
let repeat = function (componentInstance, length, text) {
|
|
4723
4747
|
/*
|
|
4724
4748
|
* Repeat processor
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.4.
|
|
1
|
+
2.4.52
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "qcobjects",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.52",
|
|
4
4
|
"description": "QCObjects is an Open-source framework that empowers full-stack developers to make micro-services and micro-frontends into an N-Tier architecture.",
|
|
5
5
|
"main": "QCObjects.js",
|
|
6
6
|
"license": "LGPL-3.0",
|