@react-stately/collections 3.0.0-alpha.1 → 3.0.0-nightly-4980928d3-240906
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/README.md +1 -1
- package/dist/CollectionBuilder.main.js +210 -0
- package/dist/CollectionBuilder.main.js.map +1 -0
- package/dist/CollectionBuilder.mjs +201 -0
- package/dist/CollectionBuilder.module.js +201 -0
- package/dist/CollectionBuilder.module.js.map +1 -0
- package/dist/Item.main.js +68 -0
- package/dist/Item.main.js.map +1 -0
- package/dist/Item.mjs +59 -0
- package/dist/Item.module.js +59 -0
- package/dist/Item.module.js.map +1 -0
- package/dist/Section.main.js +60 -0
- package/dist/Section.main.js.map +1 -0
- package/dist/Section.mjs +51 -0
- package/dist/Section.module.js +51 -0
- package/dist/Section.module.js.map +1 -0
- package/dist/getChildNodes.main.js +80 -0
- package/dist/getChildNodes.main.js.map +1 -0
- package/dist/getChildNodes.mjs +71 -0
- package/dist/getChildNodes.module.js +71 -0
- package/dist/getChildNodes.module.js.map +1 -0
- package/dist/getItemCount.main.js +35 -0
- package/dist/getItemCount.main.js.map +1 -0
- package/dist/getItemCount.mjs +30 -0
- package/dist/getItemCount.module.js +30 -0
- package/dist/getItemCount.module.js.map +1 -0
- package/dist/import.mjs +27 -0
- package/dist/main.js +24 -4427
- package/dist/main.js.map +1 -0
- package/dist/module.js +9 -2881
- package/dist/module.js.map +1 -0
- package/dist/types.d.ts +22 -577
- package/dist/types.d.ts.map +1 -1
- package/dist/useCollection.main.js +44 -0
- package/dist/useCollection.main.js.map +1 -0
- package/dist/useCollection.mjs +39 -0
- package/dist/useCollection.module.js +39 -0
- package/dist/useCollection.module.js.map +1 -0
- package/package.json +16 -8
- package/src/CollectionBuilder.ts +275 -0
- package/src/Item.ts +80 -0
- package/src/Section.ts +59 -0
- package/src/getChildNodes.ts +92 -0
- package/src/getItemCount.ts +38 -0
- package/src/index.ts +19 -0
- package/src/types.ts +31 -0
- package/src/useCollection.ts +34 -0
- package/LICENSE +0 -201
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/ function $c5a24bc478652b5f$export$1005530eda016c13(node, collection) {
|
|
12
|
+
// New API: call collection.getChildren with the node key.
|
|
13
|
+
if (typeof collection.getChildren === 'function') return collection.getChildren(node.key);
|
|
14
|
+
// Old API: access childNodes directly.
|
|
15
|
+
return node.childNodes;
|
|
16
|
+
}
|
|
17
|
+
function $c5a24bc478652b5f$export$fbdeaa6a76694f71(iterable) {
|
|
18
|
+
return $c5a24bc478652b5f$export$5f3398f8733f90e2(iterable, 0);
|
|
19
|
+
}
|
|
20
|
+
function $c5a24bc478652b5f$export$5f3398f8733f90e2(iterable, index) {
|
|
21
|
+
if (index < 0) return undefined;
|
|
22
|
+
let i = 0;
|
|
23
|
+
for (let item of iterable){
|
|
24
|
+
if (i === index) return item;
|
|
25
|
+
i++;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
function $c5a24bc478652b5f$export$7475b2c64539e4cf(iterable) {
|
|
29
|
+
let lastItem = undefined;
|
|
30
|
+
for (let value of iterable)lastItem = value;
|
|
31
|
+
return lastItem;
|
|
32
|
+
}
|
|
33
|
+
function $c5a24bc478652b5f$export$8c434b3a7a4dad6(collection, a, b) {
|
|
34
|
+
// If the two nodes have the same parent, compare their indices.
|
|
35
|
+
if (a.parentKey === b.parentKey) return a.index - b.index;
|
|
36
|
+
// Otherwise, collect all of the ancestors from each node, and find the first one that doesn't match starting from the root.
|
|
37
|
+
// Include the base nodes in case we are comparing nodes of different levels so that we can compare the higher node to the lower level node's
|
|
38
|
+
// ancestor of the same level
|
|
39
|
+
let aAncestors = [
|
|
40
|
+
...$c5a24bc478652b5f$var$getAncestors(collection, a),
|
|
41
|
+
a
|
|
42
|
+
];
|
|
43
|
+
let bAncestors = [
|
|
44
|
+
...$c5a24bc478652b5f$var$getAncestors(collection, b),
|
|
45
|
+
b
|
|
46
|
+
];
|
|
47
|
+
let firstNonMatchingAncestor = aAncestors.slice(0, bAncestors.length).findIndex((a, i)=>a !== bAncestors[i]);
|
|
48
|
+
if (firstNonMatchingAncestor !== -1) {
|
|
49
|
+
// Compare the indices of two children within the common ancestor.
|
|
50
|
+
a = aAncestors[firstNonMatchingAncestor];
|
|
51
|
+
b = bAncestors[firstNonMatchingAncestor];
|
|
52
|
+
return a.index - b.index;
|
|
53
|
+
}
|
|
54
|
+
// If there isn't a non matching ancestor, we might be in a case where one of the nodes is the ancestor of the other.
|
|
55
|
+
if (aAncestors.findIndex((node)=>node === b) >= 0) return 1;
|
|
56
|
+
else if (bAncestors.findIndex((node)=>node === a) >= 0) return -1;
|
|
57
|
+
// 🤷
|
|
58
|
+
return -1;
|
|
59
|
+
}
|
|
60
|
+
function $c5a24bc478652b5f$var$getAncestors(collection, node) {
|
|
61
|
+
let parents = [];
|
|
62
|
+
while((node === null || node === void 0 ? void 0 : node.parentKey) != null){
|
|
63
|
+
node = collection.getItem(node.parentKey);
|
|
64
|
+
parents.unshift(node);
|
|
65
|
+
}
|
|
66
|
+
return parents;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
export {$c5a24bc478652b5f$export$1005530eda016c13 as getChildNodes, $c5a24bc478652b5f$export$fbdeaa6a76694f71 as getFirstItem, $c5a24bc478652b5f$export$5f3398f8733f90e2 as getNthItem, $c5a24bc478652b5f$export$7475b2c64539e4cf as getLastItem, $c5a24bc478652b5f$export$8c434b3a7a4dad6 as compareNodeOrder};
|
|
71
|
+
//# sourceMappingURL=getChildNodes.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAAA;;;;;;;;;;CAUC,GAIM,SAAS,0CAAiB,IAAa,EAAE,UAA+B;IAC7E,0DAA0D;IAC1D,IAAI,OAAO,WAAW,WAAW,KAAK,YACpC,OAAO,WAAW,WAAW,CAAC,KAAK,GAAG;IAGxC,uCAAuC;IACvC,OAAO,KAAK,UAAU;AACxB;AAEO,SAAS,0CAAgB,QAAqB;IACnD,OAAO,0CAAW,UAAU;AAC9B;AAEO,SAAS,0CAAc,QAAqB,EAAE,KAAa;IAChE,IAAI,QAAQ,GACV,OAAO;IAGT,IAAI,IAAI;IACR,KAAK,IAAI,QAAQ,SAAU;QACzB,IAAI,MAAM,OACR,OAAO;QAGT;IACF;AACF;AAEO,SAAS,0CAAe,QAAqB;IAClD,IAAI,WAAW;IACf,KAAK,IAAI,SAAS,SAChB,WAAW;IAGb,OAAO;AACT;AAEO,SAAS,yCAAoB,UAA+B,EAAE,CAAU,EAAE,CAAU;IACzF,gEAAgE;IAChE,IAAI,EAAE,SAAS,KAAK,EAAE,SAAS,EAC7B,OAAO,EAAE,KAAK,GAAG,EAAE,KAAK;IAG1B,4HAA4H;IAC5H,6IAA6I;IAC7I,6BAA6B;IAC7B,IAAI,aAAa;WAAI,mCAAa,YAAY;QAAI;KAAE;IACpD,IAAI,aAAa;WAAI,mCAAa,YAAY;QAAI;KAAE;IACpD,IAAI,2BAA2B,WAAW,KAAK,CAAC,GAAG,WAAW,MAAM,EAAE,SAAS,CAAC,CAAC,GAAG,IAAM,MAAM,UAAU,CAAC,EAAE;IAC7G,IAAI,6BAA6B,IAAI;QACnC,kEAAkE;QAClE,IAAI,UAAU,CAAC,yBAAyB;QACxC,IAAI,UAAU,CAAC,yBAAyB;QACxC,OAAO,EAAE,KAAK,GAAG,EAAE,KAAK;IAC1B;IAEA,qHAAqH;IACrH,IAAI,WAAW,SAAS,CAAC,CAAA,OAAQ,SAAS,MAAM,GAC9C,OAAO;SACF,IAAI,WAAW,SAAS,CAAC,CAAA,OAAQ,SAAS,MAAM,GACrD,OAAO;IAGT,KAAK;IACL,OAAO;AACT;AAEA,SAAS,mCAAgB,UAA+B,EAAE,IAAa;IACrE,IAAI,UAAU,EAAE;IAEhB,MAAO,CAAA,iBAAA,2BAAA,KAAM,SAAS,KAAI,KAAM;QAC9B,OAAO,WAAW,OAAO,CAAC,KAAK,SAAS;QACxC,QAAQ,OAAO,CAAC;IAClB;IAEA,OAAO;AACT","sources":["packages/@react-stately/collections/src/getChildNodes.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport type {Collection, Node} from '@react-types/shared';\n\nexport function getChildNodes<T>(node: Node<T>, collection: Collection<Node<T>>): Iterable<Node<T>> {\n // New API: call collection.getChildren with the node key.\n if (typeof collection.getChildren === 'function') {\n return collection.getChildren(node.key);\n }\n\n // Old API: access childNodes directly.\n return node.childNodes;\n}\n\nexport function getFirstItem<T>(iterable: Iterable<T>): T | undefined {\n return getNthItem(iterable, 0);\n}\n\nexport function getNthItem<T>(iterable: Iterable<T>, index: number): T | undefined {\n if (index < 0) {\n return undefined;\n }\n\n let i = 0;\n for (let item of iterable) {\n if (i === index) {\n return item;\n }\n\n i++;\n }\n}\n\nexport function getLastItem<T>(iterable: Iterable<T>): T | undefined {\n let lastItem = undefined;\n for (let value of iterable) {\n lastItem = value;\n }\n\n return lastItem;\n}\n\nexport function compareNodeOrder<T>(collection: Collection<Node<T>>, a: Node<T>, b: Node<T>) {\n // If the two nodes have the same parent, compare their indices.\n if (a.parentKey === b.parentKey) {\n return a.index - b.index;\n }\n\n // Otherwise, collect all of the ancestors from each node, and find the first one that doesn't match starting from the root.\n // Include the base nodes in case we are comparing nodes of different levels so that we can compare the higher node to the lower level node's\n // ancestor of the same level\n let aAncestors = [...getAncestors(collection, a), a];\n let bAncestors = [...getAncestors(collection, b), b];\n let firstNonMatchingAncestor = aAncestors.slice(0, bAncestors.length).findIndex((a, i) => a !== bAncestors[i]);\n if (firstNonMatchingAncestor !== -1) {\n // Compare the indices of two children within the common ancestor.\n a = aAncestors[firstNonMatchingAncestor];\n b = bAncestors[firstNonMatchingAncestor];\n return a.index - b.index;\n }\n\n // If there isn't a non matching ancestor, we might be in a case where one of the nodes is the ancestor of the other.\n if (aAncestors.findIndex(node => node === b) >= 0) {\n return 1;\n } else if (bAncestors.findIndex(node => node === a) >= 0) {\n return -1;\n }\n\n // 🤷\n return -1;\n}\n\nfunction getAncestors<T>(collection: Collection<Node<T>>, node: Node<T>): Node<T>[] {\n let parents = [];\n\n while (node?.parentKey != null) {\n node = collection.getItem(node.parentKey);\n parents.unshift(node);\n }\n\n return parents;\n}\n"],"names":[],"version":3,"file":"getChildNodes.module.js.map"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
var $7a155683b0d79a6a$exports = require("./getChildNodes.main.js");
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
function $parcel$export(e, n, v, s) {
|
|
5
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
$parcel$export(module.exports, "getItemCount", () => $e749fe52977fe2c2$export$77d5aafae4e095b2);
|
|
9
|
+
/*
|
|
10
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
11
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
12
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
13
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
14
|
+
*
|
|
15
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
16
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
17
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
18
|
+
* governing permissions and limitations under the License.
|
|
19
|
+
*/
|
|
20
|
+
const $e749fe52977fe2c2$var$cache = new WeakMap();
|
|
21
|
+
function $e749fe52977fe2c2$export$77d5aafae4e095b2(collection) {
|
|
22
|
+
let count = $e749fe52977fe2c2$var$cache.get(collection);
|
|
23
|
+
if (count != null) return count;
|
|
24
|
+
count = 0;
|
|
25
|
+
let countItems = (items)=>{
|
|
26
|
+
for (let item of items)if (item.type === 'section') countItems((0, $7a155683b0d79a6a$exports.getChildNodes)(item, collection));
|
|
27
|
+
else count++;
|
|
28
|
+
};
|
|
29
|
+
countItems(collection);
|
|
30
|
+
$e749fe52977fe2c2$var$cache.set(collection, count);
|
|
31
|
+
return count;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
//# sourceMappingURL=getItemCount.main.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;;;;;AAAA;;;;;;;;;;CAUC;AAKD,MAAM,8BAAQ,IAAI;AAEX,SAAS,0CAAgB,UAA+B;IAC7D,IAAI,QAAQ,4BAAM,GAAG,CAAC;IACtB,IAAI,SAAS,MACX,OAAO;IAGT,QAAQ;IACR,IAAI,aAAa,CAAC;QAChB,KAAK,IAAI,QAAQ,MACf,IAAI,KAAK,IAAI,KAAK,WAChB,WAAW,CAAA,GAAA,uCAAY,EAAE,MAAM;aAE/B;IAGN;IAEA,WAAW;IACX,4BAAM,GAAG,CAAC,YAAY;IACtB,OAAO;AACT","sources":["packages/@react-stately/collections/src/getItemCount.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Collection, Node} from '@react-types/shared';\nimport {getChildNodes} from './getChildNodes';\n\nconst cache = new WeakMap<Iterable<unknown>, number>();\n\nexport function getItemCount<T>(collection: Collection<Node<T>>): number {\n let count = cache.get(collection);\n if (count != null) {\n return count;\n }\n\n count = 0;\n let countItems = (items: Iterable<Node<T>>) => {\n for (let item of items) {\n if (item.type === 'section') {\n countItems(getChildNodes(item, collection));\n } else {\n count++;\n }\n }\n };\n\n countItems(collection);\n cache.set(collection, count);\n return count;\n}\n"],"names":[],"version":3,"file":"getItemCount.main.js.map"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import {getChildNodes as $c5a24bc478652b5f$export$1005530eda016c13} from "./getChildNodes.mjs";
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
5
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
7
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
*
|
|
9
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
10
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
11
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
12
|
+
* governing permissions and limitations under the License.
|
|
13
|
+
*/
|
|
14
|
+
const $453cc9f0df89c0a5$var$cache = new WeakMap();
|
|
15
|
+
function $453cc9f0df89c0a5$export$77d5aafae4e095b2(collection) {
|
|
16
|
+
let count = $453cc9f0df89c0a5$var$cache.get(collection);
|
|
17
|
+
if (count != null) return count;
|
|
18
|
+
count = 0;
|
|
19
|
+
let countItems = (items)=>{
|
|
20
|
+
for (let item of items)if (item.type === 'section') countItems((0, $c5a24bc478652b5f$export$1005530eda016c13)(item, collection));
|
|
21
|
+
else count++;
|
|
22
|
+
};
|
|
23
|
+
countItems(collection);
|
|
24
|
+
$453cc9f0df89c0a5$var$cache.set(collection, count);
|
|
25
|
+
return count;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
export {$453cc9f0df89c0a5$export$77d5aafae4e095b2 as getItemCount};
|
|
30
|
+
//# sourceMappingURL=getItemCount.module.js.map
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import {getChildNodes as $c5a24bc478652b5f$export$1005530eda016c13} from "./getChildNodes.module.js";
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
5
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
7
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
*
|
|
9
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
10
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
11
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
12
|
+
* governing permissions and limitations under the License.
|
|
13
|
+
*/
|
|
14
|
+
const $453cc9f0df89c0a5$var$cache = new WeakMap();
|
|
15
|
+
function $453cc9f0df89c0a5$export$77d5aafae4e095b2(collection) {
|
|
16
|
+
let count = $453cc9f0df89c0a5$var$cache.get(collection);
|
|
17
|
+
if (count != null) return count;
|
|
18
|
+
count = 0;
|
|
19
|
+
let countItems = (items)=>{
|
|
20
|
+
for (let item of items)if (item.type === 'section') countItems((0, $c5a24bc478652b5f$export$1005530eda016c13)(item, collection));
|
|
21
|
+
else count++;
|
|
22
|
+
};
|
|
23
|
+
countItems(collection);
|
|
24
|
+
$453cc9f0df89c0a5$var$cache.set(collection, count);
|
|
25
|
+
return count;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
export {$453cc9f0df89c0a5$export$77d5aafae4e095b2 as getItemCount};
|
|
30
|
+
//# sourceMappingURL=getItemCount.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;AAAA;;;;;;;;;;CAUC;AAKD,MAAM,8BAAQ,IAAI;AAEX,SAAS,0CAAgB,UAA+B;IAC7D,IAAI,QAAQ,4BAAM,GAAG,CAAC;IACtB,IAAI,SAAS,MACX,OAAO;IAGT,QAAQ;IACR,IAAI,aAAa,CAAC;QAChB,KAAK,IAAI,QAAQ,MACf,IAAI,KAAK,IAAI,KAAK,WAChB,WAAW,CAAA,GAAA,yCAAY,EAAE,MAAM;aAE/B;IAGN;IAEA,WAAW;IACX,4BAAM,GAAG,CAAC,YAAY;IACtB,OAAO;AACT","sources":["packages/@react-stately/collections/src/getItemCount.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Collection, Node} from '@react-types/shared';\nimport {getChildNodes} from './getChildNodes';\n\nconst cache = new WeakMap<Iterable<unknown>, number>();\n\nexport function getItemCount<T>(collection: Collection<Node<T>>): number {\n let count = cache.get(collection);\n if (count != null) {\n return count;\n }\n\n count = 0;\n let countItems = (items: Iterable<Node<T>>) => {\n for (let item of items) {\n if (item.type === 'section') {\n countItems(getChildNodes(item, collection));\n } else {\n count++;\n }\n }\n };\n\n countItems(collection);\n cache.set(collection, count);\n return count;\n}\n"],"names":[],"version":3,"file":"getItemCount.module.js.map"}
|
package/dist/import.mjs
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import {Item as $c1d7fb2ec91bae71$export$6d08773d2e66f8f2} from "./Item.mjs";
|
|
2
|
+
import {Section as $9fc4852771d079eb$export$6e2c8f0811a474ce} from "./Section.mjs";
|
|
3
|
+
import {useCollection as $7613b1592d41b092$export$6cd28814d92fa9c9} from "./useCollection.mjs";
|
|
4
|
+
import {getItemCount as $453cc9f0df89c0a5$export$77d5aafae4e095b2} from "./getItemCount.mjs";
|
|
5
|
+
import {compareNodeOrder as $c5a24bc478652b5f$export$8c434b3a7a4dad6, getChildNodes as $c5a24bc478652b5f$export$1005530eda016c13, getFirstItem as $c5a24bc478652b5f$export$fbdeaa6a76694f71, getLastItem as $c5a24bc478652b5f$export$7475b2c64539e4cf, getNthItem as $c5a24bc478652b5f$export$5f3398f8733f90e2} from "./getChildNodes.mjs";
|
|
6
|
+
import {CollectionBuilder as $eb2240fc39a57fa5$export$bf788dd355e3a401} from "./CollectionBuilder.mjs";
|
|
7
|
+
|
|
8
|
+
/*
|
|
9
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
10
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
11
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
12
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
+
*
|
|
14
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
15
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
16
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
17
|
+
* governing permissions and limitations under the License.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
export {$c1d7fb2ec91bae71$export$6d08773d2e66f8f2 as Item, $9fc4852771d079eb$export$6e2c8f0811a474ce as Section, $7613b1592d41b092$export$6cd28814d92fa9c9 as useCollection, $453cc9f0df89c0a5$export$77d5aafae4e095b2 as getItemCount, $c5a24bc478652b5f$export$1005530eda016c13 as getChildNodes, $c5a24bc478652b5f$export$fbdeaa6a76694f71 as getFirstItem, $c5a24bc478652b5f$export$7475b2c64539e4cf as getLastItem, $c5a24bc478652b5f$export$5f3398f8733f90e2 as getNthItem, $c5a24bc478652b5f$export$8c434b3a7a4dad6 as compareNodeOrder, $eb2240fc39a57fa5$export$bf788dd355e3a401 as CollectionBuilder};
|
|
27
|
+
//# sourceMappingURL=module.js.map
|