@nextcloud/files 3.7.0 → 3.8.0
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/index.cjs +20 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +20 -3
- package/dist/index.mjs.map +1 -1
- package/dist/navigation/view.d.ts +5 -0
- package/dist/vendor.LICENSE.txt +1 -1
- package/package.json +11 -11
package/dist/index.mjs
CHANGED
|
@@ -2624,6 +2624,7 @@ Builder.prototype.j2x = function(jObj, level) {
|
|
|
2624
2624
|
} else if (Array.isArray(jObj[key])) {
|
|
2625
2625
|
const arrLen = jObj[key].length;
|
|
2626
2626
|
let listTagVal = "";
|
|
2627
|
+
let listTagAttr = "";
|
|
2627
2628
|
for (let j = 0; j < arrLen; j++) {
|
|
2628
2629
|
const item = jObj[key][j];
|
|
2629
2630
|
if (typeof item === "undefined") ;
|
|
@@ -2632,16 +2633,26 @@ Builder.prototype.j2x = function(jObj, level) {
|
|
|
2632
2633
|
else val2 += this.indentate(level) + "<" + key + "/" + this.tagEndChar;
|
|
2633
2634
|
} else if (typeof item === "object") {
|
|
2634
2635
|
if (this.options.oneListGroup) {
|
|
2635
|
-
|
|
2636
|
+
const result = this.j2x(item, level + 1);
|
|
2637
|
+
listTagVal += result.val;
|
|
2638
|
+
if (this.options.attributesGroupName && item.hasOwnProperty(this.options.attributesGroupName)) {
|
|
2639
|
+
listTagAttr += result.attrStr;
|
|
2640
|
+
}
|
|
2636
2641
|
} else {
|
|
2637
2642
|
listTagVal += this.processTextOrObjNode(item, key, level);
|
|
2638
2643
|
}
|
|
2639
2644
|
} else {
|
|
2640
|
-
|
|
2645
|
+
if (this.options.oneListGroup) {
|
|
2646
|
+
let textValue = this.options.tagValueProcessor(key, item);
|
|
2647
|
+
textValue = this.replaceEntitiesValue(textValue);
|
|
2648
|
+
listTagVal += textValue;
|
|
2649
|
+
} else {
|
|
2650
|
+
listTagVal += this.buildTextValNode(item, key, "", level);
|
|
2651
|
+
}
|
|
2641
2652
|
}
|
|
2642
2653
|
}
|
|
2643
2654
|
if (this.options.oneListGroup) {
|
|
2644
|
-
listTagVal = this.buildObjectNode(listTagVal, key,
|
|
2655
|
+
listTagVal = this.buildObjectNode(listTagVal, key, listTagAttr, level);
|
|
2645
2656
|
}
|
|
2646
2657
|
val2 += listTagVal;
|
|
2647
2658
|
} else {
|
|
@@ -2840,6 +2851,9 @@ class View {
|
|
|
2840
2851
|
get defaultSortKey() {
|
|
2841
2852
|
return this._view.defaultSortKey;
|
|
2842
2853
|
}
|
|
2854
|
+
get loadChildViews() {
|
|
2855
|
+
return this._view.loadChildViews;
|
|
2856
|
+
}
|
|
2843
2857
|
}
|
|
2844
2858
|
const isValidView = function(view) {
|
|
2845
2859
|
if (!view.id || typeof view.id !== "string") {
|
|
@@ -2882,6 +2896,9 @@ const isValidView = function(view) {
|
|
|
2882
2896
|
if (view.defaultSortKey && typeof view.defaultSortKey !== "string") {
|
|
2883
2897
|
throw new Error("View defaultSortKey must be a string");
|
|
2884
2898
|
}
|
|
2899
|
+
if (view.loadChildViews && typeof view.loadChildViews !== "function") {
|
|
2900
|
+
throw new Error("View loadChildViews must be a function");
|
|
2901
|
+
}
|
|
2885
2902
|
return true;
|
|
2886
2903
|
};
|
|
2887
2904
|
const debug$1 = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {
|