@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.cjs
CHANGED
|
@@ -2626,6 +2626,7 @@ Builder.prototype.j2x = function(jObj, level) {
|
|
|
2626
2626
|
} else if (Array.isArray(jObj[key])) {
|
|
2627
2627
|
const arrLen = jObj[key].length;
|
|
2628
2628
|
let listTagVal = "";
|
|
2629
|
+
let listTagAttr = "";
|
|
2629
2630
|
for (let j = 0; j < arrLen; j++) {
|
|
2630
2631
|
const item = jObj[key][j];
|
|
2631
2632
|
if (typeof item === "undefined") ;
|
|
@@ -2634,16 +2635,26 @@ Builder.prototype.j2x = function(jObj, level) {
|
|
|
2634
2635
|
else val2 += this.indentate(level) + "<" + key + "/" + this.tagEndChar;
|
|
2635
2636
|
} else if (typeof item === "object") {
|
|
2636
2637
|
if (this.options.oneListGroup) {
|
|
2637
|
-
|
|
2638
|
+
const result = this.j2x(item, level + 1);
|
|
2639
|
+
listTagVal += result.val;
|
|
2640
|
+
if (this.options.attributesGroupName && item.hasOwnProperty(this.options.attributesGroupName)) {
|
|
2641
|
+
listTagAttr += result.attrStr;
|
|
2642
|
+
}
|
|
2638
2643
|
} else {
|
|
2639
2644
|
listTagVal += this.processTextOrObjNode(item, key, level);
|
|
2640
2645
|
}
|
|
2641
2646
|
} else {
|
|
2642
|
-
|
|
2647
|
+
if (this.options.oneListGroup) {
|
|
2648
|
+
let textValue = this.options.tagValueProcessor(key, item);
|
|
2649
|
+
textValue = this.replaceEntitiesValue(textValue);
|
|
2650
|
+
listTagVal += textValue;
|
|
2651
|
+
} else {
|
|
2652
|
+
listTagVal += this.buildTextValNode(item, key, "", level);
|
|
2653
|
+
}
|
|
2643
2654
|
}
|
|
2644
2655
|
}
|
|
2645
2656
|
if (this.options.oneListGroup) {
|
|
2646
|
-
listTagVal = this.buildObjectNode(listTagVal, key,
|
|
2657
|
+
listTagVal = this.buildObjectNode(listTagVal, key, listTagAttr, level);
|
|
2647
2658
|
}
|
|
2648
2659
|
val2 += listTagVal;
|
|
2649
2660
|
} else {
|
|
@@ -2842,6 +2853,9 @@ class View {
|
|
|
2842
2853
|
get defaultSortKey() {
|
|
2843
2854
|
return this._view.defaultSortKey;
|
|
2844
2855
|
}
|
|
2856
|
+
get loadChildViews() {
|
|
2857
|
+
return this._view.loadChildViews;
|
|
2858
|
+
}
|
|
2845
2859
|
}
|
|
2846
2860
|
const isValidView = function(view) {
|
|
2847
2861
|
if (!view.id || typeof view.id !== "string") {
|
|
@@ -2884,6 +2898,9 @@ const isValidView = function(view) {
|
|
|
2884
2898
|
if (view.defaultSortKey && typeof view.defaultSortKey !== "string") {
|
|
2885
2899
|
throw new Error("View defaultSortKey must be a string");
|
|
2886
2900
|
}
|
|
2901
|
+
if (view.loadChildViews && typeof view.loadChildViews !== "function") {
|
|
2902
|
+
throw new Error("View loadChildViews must be a function");
|
|
2903
|
+
}
|
|
2887
2904
|
return true;
|
|
2888
2905
|
};
|
|
2889
2906
|
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) : () => {
|