@spectrum-web-components/table 0.1.15-overlay.17 → 0.30.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/custom-elements.json +1111 -0
- package/package.json +7 -7
- package/sp-table-body.dev.js +2 -1
- package/sp-table-body.dev.js.map +2 -2
- package/sp-table-body.js +1 -1
- package/sp-table-body.js.map +3 -3
- package/sp-table-cell.dev.js +2 -1
- package/sp-table-cell.dev.js.map +2 -2
- package/sp-table-cell.js +1 -1
- package/sp-table-cell.js.map +3 -3
- package/sp-table-checkbox-cell.dev.js +2 -1
- package/sp-table-checkbox-cell.dev.js.map +2 -2
- package/sp-table-checkbox-cell.js +1 -1
- package/sp-table-checkbox-cell.js.map +3 -3
- package/sp-table-head-cell.dev.js +2 -1
- package/sp-table-head-cell.dev.js.map +2 -2
- package/sp-table-head-cell.js +1 -1
- package/sp-table-head-cell.js.map +3 -3
- package/sp-table-head.dev.js +2 -1
- package/sp-table-head.dev.js.map +2 -2
- package/sp-table-head.js +1 -1
- package/sp-table-head.js.map +3 -3
- package/sp-table-row.dev.js +2 -1
- package/sp-table-row.dev.js.map +2 -2
- package/sp-table-row.js +1 -1
- package/sp-table-row.js.map +3 -3
- package/sp-table.dev.js +2 -1
- package/sp-table.dev.js.map +2 -2
- package/sp-table.js +1 -1
- package/sp-table.js.map +3 -3
- package/src/Table.js.map +1 -1
- package/src/TableBody.dev.js +1 -1
- package/src/TableBody.dev.js.map +1 -1
- package/src/TableBody.js +1 -1
- package/src/TableBody.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spectrum-web-components/table",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.30.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -116,13 +116,13 @@
|
|
|
116
116
|
],
|
|
117
117
|
"dependencies": {
|
|
118
118
|
"@lit-labs/virtualizer": "^1.0.1",
|
|
119
|
-
"@spectrum-web-components/base": "^0.
|
|
120
|
-
"@spectrum-web-components/checkbox": "^0.
|
|
121
|
-
"@spectrum-web-components/icon": "^0.
|
|
122
|
-
"@spectrum-web-components/icons-ui": "^0.
|
|
119
|
+
"@spectrum-web-components/base": "^0.30.0",
|
|
120
|
+
"@spectrum-web-components/checkbox": "^0.30.0",
|
|
121
|
+
"@spectrum-web-components/icon": "^0.30.0",
|
|
122
|
+
"@spectrum-web-components/icons-ui": "^0.30.0"
|
|
123
123
|
},
|
|
124
124
|
"devDependencies": {
|
|
125
|
-
"@spectrum-css/table": "^4.0.
|
|
125
|
+
"@spectrum-css/table": "^4.0.41"
|
|
126
126
|
},
|
|
127
127
|
"types": "./src/index.d.ts",
|
|
128
128
|
"customElements": "custom-elements.json",
|
|
@@ -131,5 +131,5 @@
|
|
|
131
131
|
"./elements.js",
|
|
132
132
|
"./**/*.dev.js"
|
|
133
133
|
],
|
|
134
|
-
"gitHead": "
|
|
134
|
+
"gitHead": "e34a26bf2bbea5f60a5e415e0f12c97654f0e20d"
|
|
135
135
|
}
|
package/sp-table-body.dev.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
import { TableBody } from "./src/TableBody.dev.js";
|
|
3
|
-
|
|
3
|
+
import { defineElement } from "@spectrum-web-components/base/src/define-element.js";
|
|
4
|
+
defineElement("sp-table-body", TableBody);
|
|
4
5
|
//# sourceMappingURL=sp-table-body.dev.js.map
|
package/sp-table-body.dev.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["sp-table-body.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2022 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { TableBody } from './src/TableBody.dev.js'\n\
|
|
5
|
-
"mappings": ";AAWA,SAAS,iBAAiB;
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2022 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { TableBody } from './src/TableBody.dev.js'\nimport { defineElement } from '@spectrum-web-components/base/src/define-element.js';\n\ndefineElement('sp-table-body', TableBody);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-table-body': TableBody;\n }\n}\n"],
|
|
5
|
+
"mappings": ";AAWA,SAAS,iBAAiB;AAC1B,SAAS,qBAAqB;AAE9B,cAAc,iBAAiB,SAAS;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/sp-table-body.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";import{TableBody as e}from"./src/TableBody.js";
|
|
1
|
+
"use strict";import{TableBody as e}from"./src/TableBody.js";import{defineElement as a}from"@spectrum-web-components/base/src/define-element.js";a("sp-table-body",e);
|
|
2
2
|
//# sourceMappingURL=sp-table-body.js.map
|
package/sp-table-body.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["sp-table-body.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2022 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { TableBody } from './src/TableBody.js';\n\
|
|
5
|
-
"mappings": "aAWA,OAAS,aAAAA,MAAiB,
|
|
6
|
-
"names": ["TableBody"]
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2022 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { TableBody } from './src/TableBody.js';\nimport { defineElement } from '@spectrum-web-components/base/src/define-element.js';\n\ndefineElement('sp-table-body', TableBody);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-table-body': TableBody;\n }\n}\n"],
|
|
5
|
+
"mappings": "aAWA,OAAS,aAAAA,MAAiB,qBAC1B,OAAS,iBAAAC,MAAqB,sDAE9BA,EAAc,gBAAiBD,CAAS",
|
|
6
|
+
"names": ["TableBody", "defineElement"]
|
|
7
7
|
}
|
package/sp-table-cell.dev.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
import { TableCell } from "./src/TableCell.dev.js";
|
|
3
|
-
|
|
3
|
+
import { defineElement } from "@spectrum-web-components/base/src/define-element.js";
|
|
4
|
+
defineElement("sp-table-cell", TableCell);
|
|
4
5
|
//# sourceMappingURL=sp-table-cell.dev.js.map
|
package/sp-table-cell.dev.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["sp-table-cell.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2022 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { TableCell } from './src/TableCell.dev.js'\n\
|
|
5
|
-
"mappings": ";AAWA,SAAS,iBAAiB;
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2022 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { TableCell } from './src/TableCell.dev.js'\nimport { defineElement } from '@spectrum-web-components/base/src/define-element.js';\n\ndefineElement('sp-table-cell', TableCell);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-table-cell': TableCell;\n }\n}\n"],
|
|
5
|
+
"mappings": ";AAWA,SAAS,iBAAiB;AAC1B,SAAS,qBAAqB;AAE9B,cAAc,iBAAiB,SAAS;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/sp-table-cell.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";import{TableCell as e}from"./src/TableCell.js";
|
|
1
|
+
"use strict";import{TableCell as e}from"./src/TableCell.js";import{defineElement as l}from"@spectrum-web-components/base/src/define-element.js";l("sp-table-cell",e);
|
|
2
2
|
//# sourceMappingURL=sp-table-cell.js.map
|
package/sp-table-cell.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["sp-table-cell.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2022 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { TableCell } from './src/TableCell.js';\n\
|
|
5
|
-
"mappings": "aAWA,OAAS,aAAAA,MAAiB,
|
|
6
|
-
"names": ["TableCell"]
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2022 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { TableCell } from './src/TableCell.js';\nimport { defineElement } from '@spectrum-web-components/base/src/define-element.js';\n\ndefineElement('sp-table-cell', TableCell);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-table-cell': TableCell;\n }\n}\n"],
|
|
5
|
+
"mappings": "aAWA,OAAS,aAAAA,MAAiB,qBAC1B,OAAS,iBAAAC,MAAqB,sDAE9BA,EAAc,gBAAiBD,CAAS",
|
|
6
|
+
"names": ["TableCell", "defineElement"]
|
|
7
7
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
import { TableCheckboxCell } from "./src/TableCheckboxCell.dev.js";
|
|
3
|
-
|
|
3
|
+
import { defineElement } from "@spectrum-web-components/base/src/define-element.js";
|
|
4
|
+
defineElement("sp-table-checkbox-cell", TableCheckboxCell);
|
|
4
5
|
//# sourceMappingURL=sp-table-checkbox-cell.dev.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["sp-table-checkbox-cell.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2022 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { TableCheckboxCell } from './src/TableCheckboxCell.dev.js'\n\
|
|
5
|
-
"mappings": ";AAWA,SAAS,yBAAyB;
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2022 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { TableCheckboxCell } from './src/TableCheckboxCell.dev.js'\nimport { defineElement } from '@spectrum-web-components/base/src/define-element.js';\n\ndefineElement('sp-table-checkbox-cell', TableCheckboxCell);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-table-checkbox-cell': TableCheckboxCell;\n }\n}\n"],
|
|
5
|
+
"mappings": ";AAWA,SAAS,yBAAyB;AAClC,SAAS,qBAAqB;AAE9B,cAAc,0BAA0B,iBAAiB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";import{TableCheckboxCell as e}from"./src/TableCheckboxCell.js";
|
|
1
|
+
"use strict";import{TableCheckboxCell as e}from"./src/TableCheckboxCell.js";import{defineElement as l}from"@spectrum-web-components/base/src/define-element.js";l("sp-table-checkbox-cell",e);
|
|
2
2
|
//# sourceMappingURL=sp-table-checkbox-cell.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["sp-table-checkbox-cell.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2022 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { TableCheckboxCell } from './src/TableCheckboxCell.js';\n\
|
|
5
|
-
"mappings": "aAWA,OAAS,qBAAAA,MAAyB,
|
|
6
|
-
"names": ["TableCheckboxCell"]
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2022 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { TableCheckboxCell } from './src/TableCheckboxCell.js';\nimport { defineElement } from '@spectrum-web-components/base/src/define-element.js';\n\ndefineElement('sp-table-checkbox-cell', TableCheckboxCell);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-table-checkbox-cell': TableCheckboxCell;\n }\n}\n"],
|
|
5
|
+
"mappings": "aAWA,OAAS,qBAAAA,MAAyB,6BAClC,OAAS,iBAAAC,MAAqB,sDAE9BA,EAAc,yBAA0BD,CAAiB",
|
|
6
|
+
"names": ["TableCheckboxCell", "defineElement"]
|
|
7
7
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
import { TableHeadCell } from "./src/TableHeadCell.dev.js";
|
|
3
|
-
|
|
3
|
+
import { defineElement } from "@spectrum-web-components/base/src/define-element.js";
|
|
4
|
+
defineElement("sp-table-head-cell", TableHeadCell);
|
|
4
5
|
//# sourceMappingURL=sp-table-head-cell.dev.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["sp-table-head-cell.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2022 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { TableHeadCell } from './src/TableHeadCell.dev.js'\n\
|
|
5
|
-
"mappings": ";AAWA,SAAS,qBAAqB;AAE9B,
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2022 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { TableHeadCell } from './src/TableHeadCell.dev.js'\nimport { defineElement } from '@spectrum-web-components/base/src/define-element.js';\n\ndefineElement('sp-table-head-cell', TableHeadCell);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-table-head-cell': TableHeadCell;\n }\n}\n"],
|
|
5
|
+
"mappings": ";AAWA,SAAS,qBAAqB;AAC9B,SAAS,qBAAqB;AAE9B,cAAc,sBAAsB,aAAa;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/sp-table-head-cell.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";import{TableHeadCell as e}from"./src/TableHeadCell.js";
|
|
1
|
+
"use strict";import{TableHeadCell as e}from"./src/TableHeadCell.js";import{defineElement as l}from"@spectrum-web-components/base/src/define-element.js";l("sp-table-head-cell",e);
|
|
2
2
|
//# sourceMappingURL=sp-table-head-cell.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["sp-table-head-cell.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2022 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { TableHeadCell } from './src/TableHeadCell.js';\n\
|
|
5
|
-
"mappings": "aAWA,OAAS,iBAAAA,MAAqB,
|
|
6
|
-
"names": ["TableHeadCell"]
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2022 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { TableHeadCell } from './src/TableHeadCell.js';\nimport { defineElement } from '@spectrum-web-components/base/src/define-element.js';\n\ndefineElement('sp-table-head-cell', TableHeadCell);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-table-head-cell': TableHeadCell;\n }\n}\n"],
|
|
5
|
+
"mappings": "aAWA,OAAS,iBAAAA,MAAqB,yBAC9B,OAAS,iBAAAC,MAAqB,sDAE9BA,EAAc,qBAAsBD,CAAa",
|
|
6
|
+
"names": ["TableHeadCell", "defineElement"]
|
|
7
7
|
}
|
package/sp-table-head.dev.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
import { TableHead } from "./src/TableHead.dev.js";
|
|
3
|
-
|
|
3
|
+
import { defineElement } from "@spectrum-web-components/base/src/define-element.js";
|
|
4
|
+
defineElement("sp-table-head", TableHead);
|
|
4
5
|
//# sourceMappingURL=sp-table-head.dev.js.map
|
package/sp-table-head.dev.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["sp-table-head.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2022 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { TableHead } from './src/TableHead.dev.js'\n\
|
|
5
|
-
"mappings": ";AAWA,SAAS,iBAAiB;
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2022 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { TableHead } from './src/TableHead.dev.js'\nimport { defineElement } from '@spectrum-web-components/base/src/define-element.js';\n\ndefineElement('sp-table-head', TableHead);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-table-head': TableHead;\n }\n}\n"],
|
|
5
|
+
"mappings": ";AAWA,SAAS,iBAAiB;AAC1B,SAAS,qBAAqB;AAE9B,cAAc,iBAAiB,SAAS;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/sp-table-head.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";import{TableHead as e}from"./src/TableHead.js";
|
|
1
|
+
"use strict";import{TableHead as e}from"./src/TableHead.js";import{defineElement as a}from"@spectrum-web-components/base/src/define-element.js";a("sp-table-head",e);
|
|
2
2
|
//# sourceMappingURL=sp-table-head.js.map
|
package/sp-table-head.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["sp-table-head.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2022 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { TableHead } from './src/TableHead.js';\n\
|
|
5
|
-
"mappings": "aAWA,OAAS,aAAAA,MAAiB,
|
|
6
|
-
"names": ["TableHead"]
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2022 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { TableHead } from './src/TableHead.js';\nimport { defineElement } from '@spectrum-web-components/base/src/define-element.js';\n\ndefineElement('sp-table-head', TableHead);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-table-head': TableHead;\n }\n}\n"],
|
|
5
|
+
"mappings": "aAWA,OAAS,aAAAA,MAAiB,qBAC1B,OAAS,iBAAAC,MAAqB,sDAE9BA,EAAc,gBAAiBD,CAAS",
|
|
6
|
+
"names": ["TableHead", "defineElement"]
|
|
7
7
|
}
|
package/sp-table-row.dev.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
import { TableRow } from "./src/TableRow.dev.js";
|
|
3
|
-
|
|
3
|
+
import { defineElement } from "@spectrum-web-components/base/src/define-element.js";
|
|
4
|
+
defineElement("sp-table-row", TableRow);
|
|
4
5
|
//# sourceMappingURL=sp-table-row.dev.js.map
|
package/sp-table-row.dev.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["sp-table-row.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2022 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { TableRow } from './src/TableRow.dev.js'\n\
|
|
5
|
-
"mappings": ";AAWA,SAAS,gBAAgB;
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2022 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { TableRow } from './src/TableRow.dev.js'\nimport { defineElement } from '@spectrum-web-components/base/src/define-element.js';\n\ndefineElement('sp-table-row', TableRow);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-table-row': TableRow;\n }\n}\n"],
|
|
5
|
+
"mappings": ";AAWA,SAAS,gBAAgB;AACzB,SAAS,qBAAqB;AAE9B,cAAc,gBAAgB,QAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/sp-table-row.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";import{TableRow as e}from"./src/TableRow.js";
|
|
1
|
+
"use strict";import{TableRow as e}from"./src/TableRow.js";import{defineElement as a}from"@spectrum-web-components/base/src/define-element.js";a("sp-table-row",e);
|
|
2
2
|
//# sourceMappingURL=sp-table-row.js.map
|
package/sp-table-row.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["sp-table-row.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2022 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { TableRow } from './src/TableRow.js';\n\
|
|
5
|
-
"mappings": "aAWA,OAAS,YAAAA,MAAgB,
|
|
6
|
-
"names": ["TableRow"]
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2022 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { TableRow } from './src/TableRow.js';\nimport { defineElement } from '@spectrum-web-components/base/src/define-element.js';\n\ndefineElement('sp-table-row', TableRow);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-table-row': TableRow;\n }\n}\n"],
|
|
5
|
+
"mappings": "aAWA,OAAS,YAAAA,MAAgB,oBACzB,OAAS,iBAAAC,MAAqB,sDAE9BA,EAAc,eAAgBD,CAAQ",
|
|
6
|
+
"names": ["TableRow", "defineElement"]
|
|
7
7
|
}
|
package/sp-table.dev.js
CHANGED
package/sp-table.dev.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["sp-table.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2022 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { Table } from './src/Table.dev.js'\n\
|
|
5
|
-
"mappings": ";AAWA,SAAS,aAAa;
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2022 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { Table } from './src/Table.dev.js'\nimport { defineElement } from '@spectrum-web-components/base/src/define-element.js';\n\ndefineElement('sp-table', Table);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-table': Table;\n }\n}\n"],
|
|
5
|
+
"mappings": ";AAWA,SAAS,aAAa;AACtB,SAAS,qBAAqB;AAE9B,cAAc,YAAY,KAAK;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/sp-table.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";import{Table as e}from"./src/Table.js";
|
|
1
|
+
"use strict";import{Table as e}from"./src/Table.js";import{defineElement as a}from"@spectrum-web-components/base/src/define-element.js";a("sp-table",e);
|
|
2
2
|
//# sourceMappingURL=sp-table.js.map
|
package/sp-table.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["sp-table.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2022 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { Table } from './src/Table.js';\n\
|
|
5
|
-
"mappings": "aAWA,OAAS,SAAAA,MAAa,
|
|
6
|
-
"names": ["Table"]
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2022 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { Table } from './src/Table.js';\nimport { defineElement } from '@spectrum-web-components/base/src/define-element.js';\n\ndefineElement('sp-table', Table);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-table': Table;\n }\n}\n"],
|
|
5
|
+
"mappings": "aAWA,OAAS,SAAAA,MAAa,iBACtB,OAAS,iBAAAC,MAAqB,sDAE9BA,EAAc,WAAYD,CAAK",
|
|
6
|
+
"names": ["Table", "defineElement"]
|
|
7
7
|
}
|
package/src/Table.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["Table.ts"],
|
|
4
4
|
"sourcesContent": ["/*\nCopyright 2022 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport {\n CSSResultArray,\n html,\n PropertyValues,\n render,\n SizedMixin,\n SpectrumElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport '../sp-table-row.js';\nimport '../sp-table-checkbox-cell.js';\nimport '../sp-table-body.js';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport styles from './table.css.js';\nimport { TableBody } from './TableBody.js';\nimport type { TableCheckboxCell } from './TableCheckboxCell.js';\nimport type { TableHead } from './TableHead.js';\nimport type { TableHeadCell } from './TableHeadCell.js';\nimport type { TableRow } from './TableRow.js';\nimport {\n virtualize,\n VirtualizeDirectiveConfig,\n virtualizerRef,\n} from '@lit-labs/virtualizer/virtualize.js';\nimport { Virtualizer } from '@lit-labs/virtualizer/Virtualizer.js';\n\ninterface Range {\n first: number;\n last: number;\n}\n\nexport enum RowType {\n ITEM = 0,\n INFORMATION = 1,\n}\n\nexport interface TableItem extends Record<string, unknown> {\n _$rowType$?: RowType;\n}\n\nexport class RangeChangedEvent extends Event {\n static eventName = 'rangeChanged';\n\n first: number;\n last: number;\n\n constructor(range: Range) {\n super(RangeChangedEvent.eventName, { bubbles: true });\n this.first = range.first;\n this.last = range.last;\n }\n}\n\n/**\n * @element sp-table\n *\n * @fires rangeChanged - Announces a change in the range of visible cells on the table body\n * @event change - Announces a change in the `selected` property of a table row\n */\n\nexport class Table extends SizedMixin(SpectrumElement, {\n validSizes: ['s', 'm'],\n defaultSize: 'm',\n}) {\n public static override get styles(): CSSResultArray {\n return [styles];\n }\n\n get renderItem(): (\n item: Record<string, unknown>,\n index: number\n ) => TemplateResult {\n return this._renderItem;\n }\n\n set renderItem(\n fn: (item: Record<string, unknown>, index: number) => TemplateResult\n ) {\n this._renderItem = (\n item: Record<string, unknown>,\n index: number\n ): TemplateResult => {\n const value = this.itemValue(item, index);\n const selected = this.selected.includes(value);\n const hasCheckbox = this.selects && item?._$rowType$ !== 1;\n\n return html`\n <sp-table-row\n value=${value}\n aria-rowindex=${index + 1}\n ?selected=${selected}\n >\n ${hasCheckbox\n ? html`\n <sp-table-checkbox-cell\n ?checked=${selected}\n ></sp-table-checkbox-cell>\n `\n : html``}\n ${fn(item, index)}\n </sp-table-row>\n `;\n };\n }\n\n private _renderItem: (\n item: Record<string, unknown>,\n index: number\n ) => TemplateResult = /* c8 ignore next */ () => html``;\n\n @property({ reflect: true })\n public role = 'grid';\n\n /**\n * Whether the Table allows users to select a row or rows, and thus controls whether or not the Table also renders checkboxes.\n */\n @property({ type: String, reflect: true })\n public selects: undefined | 'single' | 'multiple';\n\n /**\n * An array of <sp-row> values that have been selected.\n */\n @property({ type: Array })\n public selected: string[] = [];\n\n private selectedSet = new Set<string>();\n\n /**\n * The content of the rows rendered by the virtualized table. The key is the value of the sp-table-row, and the value is the sp-table-row's content (not the row itself).\n */\n @property({ type: Array })\n public items: Record<string, unknown>[] = [];\n\n /**\n * The value of an item. By default, it is set to the index of the sp-table-row.\n */\n @property({ type: Object })\n public itemValue = (_item: unknown, index: number): string => {\n return `${index}`;\n };\n\n /**\n * Whether or not the virtualized table has a scroll bar. If this is set to true, make sure to specify a height in the sp-table's inline styles.\n */\n @property({ type: Boolean, reflect: true })\n public scroller = false;\n\n private tableBody?: TableBody;\n\n private tableHeadCheckboxCell?: TableCheckboxCell;\n\n private get tableHead(): TableHead {\n return this.querySelector('sp-table-head') as TableHead;\n }\n\n private get tableRows(): TableRow[] {\n if (this.isVirtualized) {\n return [];\n }\n return [...this.querySelectorAll('sp-table-row')] as TableRow[];\n }\n\n private get isVirtualized(): boolean {\n return !!this.items.length;\n }\n\n public override focus(): void {\n const sortableHeadCell = this.querySelector(\n 'sp-table-head-cell[sortable]'\n ) as TableHeadCell;\n if (sortableHeadCell) {\n sortableHeadCell.focus();\n }\n }\n\n private selectAllRows(): void {\n if (this.isVirtualized) {\n this.items.forEach((item, index: number) => {\n if (item._$rowType$ !== 1) {\n this.selectedSet.add(this.itemValue(item, index));\n }\n });\n } else {\n this.tableRows.forEach((row) => {\n row.selected = true; // Visually\n this.selectedSet.add(row.value); // Prepares table state\n });\n }\n this.selected = [...this.selectedSet];\n\n if (!this.tableHeadCheckboxCell) /* c8 ignore next */ return;\n this.tableHeadCheckboxCell.checked = true;\n this.tableHeadCheckboxCell.indeterminate = false;\n }\n\n private deselectAllRows(): void {\n this.selectedSet.clear();\n this.selected = [];\n\n if (!this.isVirtualized) {\n const selectedRows = [\n ...this.querySelectorAll('[selected]'),\n ] as TableRow[];\n\n selectedRows.forEach((row) => {\n row.selected = false;\n });\n }\n\n if (!this.tableHeadCheckboxCell) /* c8 ignore next */ return;\n this.tableHeadCheckboxCell.checked = false;\n this.tableHeadCheckboxCell.indeterminate = false;\n }\n\n protected manageSelects(): void {\n const checkboxes = this.querySelectorAll('sp-table-checkbox-cell');\n const checkbox = document.createElement('sp-table-checkbox-cell');\n if (!!this.selects) {\n let allSelected = false;\n if (this.isVirtualized) {\n allSelected =\n this.selected.length > 0 &&\n this.selected.length === this.items.length;\n } else {\n this.tableRows.forEach((row) => {\n row.selected = this.selectedSet.has(row.value);\n if (!row.querySelector(':scope > sp-table-checkbox-cell')) {\n const clonedCheckbox =\n checkbox.cloneNode() as TableCheckboxCell;\n row.insertAdjacentElement('afterbegin', clonedCheckbox);\n checkbox.checked = row.selected;\n }\n });\n allSelected = this.selected.length === this.tableRows.length;\n }\n\n if (!this.tableHeadCheckboxCell) {\n this.tableHeadCheckboxCell = document.createElement(\n 'sp-table-checkbox-cell'\n ) as TableCheckboxCell;\n this.tableHead.insertAdjacentElement(\n 'afterbegin',\n this.tableHeadCheckboxCell\n );\n }\n this.manageHeadCheckbox(allSelected);\n } else {\n checkboxes.forEach((box) => {\n box.remove();\n });\n delete this.tableHeadCheckboxCell;\n }\n }\n\n protected validateSelected(): void {\n const rowValues = new Set<string>();\n\n if (this.isVirtualized) {\n this.items.forEach((item, index) => {\n const value = this.itemValue(item, index);\n rowValues.add(value);\n });\n } else {\n this.tableRows.forEach((row) => {\n rowValues.add(row.value);\n });\n }\n\n const oldSelectedCount = this.selected.length;\n\n this.selected = this.selected.filter((selectedItem) =>\n rowValues.has(selectedItem)\n );\n if (oldSelectedCount !== this.selected.length) {\n this.dispatchEvent(\n new Event('change', {\n cancelable: true,\n bubbles: true,\n composed: true,\n })\n );\n }\n this.selectedSet = new Set(this.selected);\n }\n\n protected manageSelected(): void {\n this.validateSelected();\n\n if (this.isVirtualized) return;\n\n this.tableRows.forEach((row) => {\n row.selected = this.selectedSet.has(row.value);\n });\n if (this.tableHeadCheckboxCell) {\n this.tableHeadCheckboxCell.checked =\n this.selected.length === this.tableRows.length;\n }\n }\n\n protected manageCheckboxes(): void {\n if (!!this.selects) {\n this.tableHeadCheckboxCell = document.createElement(\n 'sp-table-checkbox-cell'\n );\n const allSelected = this.selected.length === this.tableRows.length;\n\n this.manageHeadCheckbox(allSelected);\n\n this.tableHead.insertAdjacentElement(\n 'afterbegin',\n this.tableHeadCheckboxCell\n );\n\n this.tableRows.forEach((row) => {\n const checkbox = document.createElement(\n 'sp-table-checkbox-cell'\n );\n row.insertAdjacentElement('afterbegin', checkbox);\n row.selected = this.selectedSet.has(row.value);\n checkbox.checked = row.selected;\n });\n } else {\n this.tableHead.querySelector('sp-table-checkbox-cell')?.remove();\n this.tableRows.forEach((row) => {\n row.checkboxCells[0]?.remove();\n if (this.selected.length) {\n row.selected = this.selectedSet.has(row.value);\n }\n });\n }\n }\n\n protected manageHeadCheckbox(allSelected: boolean): void {\n if (!this.tableHeadCheckboxCell) /* c8 ignore next */ return;\n\n this.tableHeadCheckboxCell.selectsSingle = this.selects === 'single';\n this.tableHeadCheckboxCell.checked = allSelected;\n this.tableHeadCheckboxCell.indeterminate =\n this.selected.length > 0 && !allSelected;\n }\n\n protected handleChange(event: Event): void {\n event.stopPropagation();\n\n const previousSelectedSet = new Set(this.selectedSet);\n const previousSelected = [...this.selected];\n\n const { target } = event;\n const { parentElement: rowItem } = target as HTMLElement & {\n parentElement: TableRow;\n };\n if (!rowItem.value) {\n const { checkbox } = target as TableCheckboxCell;\n if (!checkbox) return;\n if (checkbox.checked || checkbox.indeterminate) {\n this.selectAllRows();\n } else {\n this.deselectAllRows();\n }\n } else {\n switch (this.selects) {\n case 'single': {\n this.deselectAllRows();\n if (rowItem.selected) {\n this.selectedSet.add(rowItem.value);\n this.selected = [...this.selectedSet];\n }\n break;\n }\n case 'multiple': {\n if (rowItem.selected) {\n this.selectedSet.add(rowItem.value);\n } else {\n this.selectedSet.delete(rowItem.value);\n }\n this.selected = [...this.selectedSet];\n\n const allSelected =\n this.selected.length === this.tableRows.length;\n\n if (!this.tableHeadCheckboxCell)\n /* c8 ignore next */ return;\n this.tableHeadCheckboxCell.checked = allSelected;\n this.tableHeadCheckboxCell.indeterminate =\n this.selected.length > 0 && !allSelected;\n break;\n }\n default: {\n break;\n }\n }\n }\n const applyDefault = this.dispatchEvent(\n new Event('change', {\n cancelable: true,\n bubbles: true,\n composed: true,\n })\n );\n if (!applyDefault) {\n event.preventDefault();\n this.selectedSet = previousSelectedSet;\n this.selected = previousSelected;\n }\n }\n\n public scrollToIndex(index?: number): void {\n if (index && !!this.tableBody) {\n const virtualizerParent = this.tableBody as unknown as {\n [virtualizerRef]: Virtualizer;\n };\n const item = virtualizerParent[virtualizerRef].element(index);\n if (item) {\n item.scrollIntoView();\n }\n }\n }\n\n protected override render(): TemplateResult {\n return html`\n <slot @change=${this.handleChange}></slot>\n `;\n }\n\n protected override willUpdate(changed: PropertyValues<this>): void {\n if (!this.hasUpdated) {\n this.validateSelected();\n this.manageCheckboxes();\n }\n if (changed.has('selects')) {\n this.manageSelects();\n }\n\n if (changed.has('selected') && this.hasUpdated) {\n this.manageSelected();\n }\n }\n\n protected override updated(): void {\n if (this.items.length) {\n this.renderVirtualizedItems();\n }\n }\n\n protected renderVirtualizedItems(): void {\n // Rendering updates into the table while disconnected can\n // cause runaway event binding in ancestor elements.\n if (!this.isConnected) return;\n if (!this.tableBody) {\n this.tableBody = this.querySelector('sp-table-body') as TableBody;\n if (!this.tableBody) {\n this.tableBody = document.createElement('sp-table-body');\n this.append(this.tableBody);\n }\n this.tableBody.addEventListener(\n 'rangeChanged',\n (event: RangeChangedEvent) => {\n this.dispatchEvent(\n new RangeChangedEvent({\n first: event.first,\n last: event.last,\n })\n );\n }\n );\n }\n const config: VirtualizeDirectiveConfig<Record<string, unknown>> = {\n items: this.items,\n renderItem: this.renderItem,\n scroller: this.scroller,\n };\n render(\n html`\n ${virtualize(config)}\n `,\n this.tableBody\n );\n }\n\n public override disconnectedCallback(): void {\n super.disconnectedCallback();\n }\n}\n"],
|
|
5
|
-
"mappings": "qNAYA,OAEI,QAAAA,EAEA,UAAAC,EACA,cAAAC,EACA,mBAAAC,MAEG,gCACP,MAAO,qBACP,MAAO,+BACP,MAAO,sBACP,OAAS,YAAAC,MAAgB,kDACzB,OAAOC,MAAY,iBAMnB,OACI,cAAAC,EAEA,kBAAAC,MACG,sCAQA,WAAK,SAAAC,IACRA,IAAA,KAAO,GAAP,OACAA,IAAA,YAAc,GAAd,cAFQA,IAAA,aASL,MAAMC,EAAN,cAAgC,KAAM,CAMzC,YAAYC,EAAc,CACtB,MAAMD,EAAkB,UAAW,CAAE,QAAS,EAAK,CAAC,EACpD,KAAK,MAAQC,EAAM,MACnB,KAAK,KAAOA,EAAM,IACtB,CACJ,EAXO,WAAM,kBAAND,EAAM,kBACF,UAAY,eAmBhB,aAAM,cAAcP,EAAWC,EAAiB,CACnD,WAAY,CAAC,IAAK,GAAG,EACrB,YAAa,GACjB,CAAC,CAAE,CAHI,kCA6CH,KAAQ,YAGmC,IAAMH,IAGjD,KAAO,KAAO,OAYd,KAAO,SAAqB,CAAC,EAE7B,KAAQ,YAAc,IAAI,IAM1B,KAAO,MAAmC,CAAC,EAM3C,KAAO,UAAY,CAACW,EAAgBC,IACz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EAAS,CAAE,KAAM,MAAO,CAAC,GA5EjB,MA6EF,yBAQAgC,EAAA,CADNhC,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GApFjC,MAqFF",
|
|
6
6
|
"names": ["html", "render", "SizedMixin", "SpectrumElement", "property", "styles", "virtualize", "virtualizerRef", "RowType", "_RangeChangedEvent", "range", "_item", "index", "fn", "item", "value", "selected", "hasCheckbox", "sortableHeadCell", "row", "checkboxes", "checkbox", "allSelected", "clonedCheckbox", "box", "rowValues", "oldSelectedCount", "selectedItem", "_a", "event", "previousSelectedSet", "previousSelected", "target", "rowItem", "changed", "config", "__decorateClass"]
|
|
7
7
|
}
|
package/src/TableBody.dev.js
CHANGED
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
} from "@spectrum-web-components/base";
|
|
17
17
|
import { property } from "@spectrum-web-components/base/src/decorators.js";
|
|
18
18
|
import styles from "./table-body.css.js";
|
|
19
|
-
import { MutationController } from "@lit-labs/observers/
|
|
19
|
+
import { MutationController } from "@lit-labs/observers/mutation-controller.js";
|
|
20
20
|
export class TableBody extends SpectrumElement {
|
|
21
21
|
constructor() {
|
|
22
22
|
super();
|
package/src/TableBody.dev.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["TableBody.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2022 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport {\n CSSResultArray,\n html,\n SpectrumElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport styles from './table-body.css.js';\nimport { MutationController } from '@lit-labs/observers/
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2022 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport {\n CSSResultArray,\n html,\n SpectrumElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport styles from './table-body.css.js';\nimport { MutationController } from '@lit-labs/observers/mutation-controller.js';\n\n/**\n * @element sp-table-body\n */\nexport class TableBody extends SpectrumElement {\n public static override get styles(): CSSResultArray {\n return [styles];\n }\n\n constructor() {\n super();\n new MutationController(this, {\n config: {\n childList: true,\n subtree: true,\n },\n callback: () => {\n requestAnimationFrame(() => {\n this.shouldHaveTabIndex();\n });\n },\n });\n }\n\n protected shouldHaveTabIndex(): void {\n if (this.offsetHeight < this.scrollHeight) {\n this.tabIndex = 0;\n } else {\n this.removeAttribute('tabindex');\n }\n }\n\n @property({ reflect: true })\n public role = 'rowgroup';\n\n protected override render(): TemplateResult {\n return html`\n <slot></slot>\n `;\n }\n}\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;AAWA;AAAA,EAEI;AAAA,EACA;AAAA,OAEG;AACP,SAAS,gBAAgB;AACzB,OAAO,YAAY;AACnB,SAAS,0BAA0B;AAK5B,aAAM,kBAAkB,gBAAgB;AAAA,EAK3C,cAAc;AACV,UAAM;AAuBV,SAAO,OAAO;AAtBV,QAAI,mBAAmB,MAAM;AAAA,MACzB,QAAQ;AAAA,QACJ,WAAW;AAAA,QACX,SAAS;AAAA,MACb;AAAA,MACA,UAAU,MAAM;AACZ,8BAAsB,MAAM;AACxB,eAAK,mBAAmB;AAAA,QAC5B,CAAC;AAAA,MACL;AAAA,IACJ,CAAC;AAAA,EACL;AAAA,EAjBA,WAA2B,SAAyB;AAChD,WAAO,CAAC,MAAM;AAAA,EAClB;AAAA,EAiBU,qBAA2B;AACjC,QAAI,KAAK,eAAe,KAAK,cAAc;AACvC,WAAK,WAAW;AAAA,IACpB,OAAO;AACH,WAAK,gBAAgB,UAAU;AAAA,IACnC;AAAA,EACJ;AAAA,EAKmB,SAAyB;AACxC,WAAO;AAAA;AAAA;AAAA,EAGX;AACJ;AAPW;AAAA,EADN,SAAS,EAAE,SAAS,KAAK,CAAC;AAAA,GA5BlB,UA6BF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/src/TableBody.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var a=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var u=(o,t,s,r)=>{for(var e=r>1?void 0:r?m(t,s):t,i=o.length-1,l;i>=0;i--)(l=o[i])&&(e=(r?l(t,s,e):l(e))||e);return r&&e&&a(t,s,e),e};import{html as n,SpectrumElement as p}from"@spectrum-web-components/base";import{property as c}from"@spectrum-web-components/base/src/decorators.js";import d from"./table-body.css.js";import{MutationController as h}from"@lit-labs/observers/
|
|
1
|
+
"use strict";var a=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var u=(o,t,s,r)=>{for(var e=r>1?void 0:r?m(t,s):t,i=o.length-1,l;i>=0;i--)(l=o[i])&&(e=(r?l(t,s,e):l(e))||e);return r&&e&&a(t,s,e),e};import{html as n,SpectrumElement as p}from"@spectrum-web-components/base";import{property as c}from"@spectrum-web-components/base/src/decorators.js";import d from"./table-body.css.js";import{MutationController as h}from"@lit-labs/observers/mutation-controller.js";export class TableBody extends p{constructor(){super();this.role="rowgroup";new h(this,{config:{childList:!0,subtree:!0},callback:()=>{requestAnimationFrame(()=>{this.shouldHaveTabIndex()})}})}static get styles(){return[d]}shouldHaveTabIndex(){this.offsetHeight<this.scrollHeight?this.tabIndex=0:this.removeAttribute("tabindex")}render(){return n`
|
|
2
2
|
<slot></slot>
|
|
3
3
|
`}}u([c({reflect:!0})],TableBody.prototype,"role",2);
|
|
4
4
|
//# sourceMappingURL=TableBody.js.map
|
package/src/TableBody.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["TableBody.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2022 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport {\n CSSResultArray,\n html,\n SpectrumElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport styles from './table-body.css.js';\nimport { MutationController } from '@lit-labs/observers/
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2022 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport {\n CSSResultArray,\n html,\n SpectrumElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport styles from './table-body.css.js';\nimport { MutationController } from '@lit-labs/observers/mutation-controller.js';\n\n/**\n * @element sp-table-body\n */\nexport class TableBody extends SpectrumElement {\n public static override get styles(): CSSResultArray {\n return [styles];\n }\n\n constructor() {\n super();\n new MutationController(this, {\n config: {\n childList: true,\n subtree: true,\n },\n callback: () => {\n requestAnimationFrame(() => {\n this.shouldHaveTabIndex();\n });\n },\n });\n }\n\n protected shouldHaveTabIndex(): void {\n if (this.offsetHeight < this.scrollHeight) {\n this.tabIndex = 0;\n } else {\n this.removeAttribute('tabindex');\n }\n }\n\n @property({ reflect: true })\n public role = 'rowgroup';\n\n protected override render(): TemplateResult {\n return html`\n <slot></slot>\n `;\n }\n}\n"],
|
|
5
5
|
"mappings": "qNAWA,OAEI,QAAAA,EACA,mBAAAC,MAEG,gCACP,OAAS,YAAAC,MAAgB,kDACzB,OAAOC,MAAY,sBACnB,OAAS,sBAAAC,MAA0B,6CAK5B,aAAM,kBAAkBH,CAAgB,CAK3C,aAAc,CACV,MAAM,EAuBV,KAAO,KAAO,WAtBV,IAAIG,EAAmB,KAAM,CACzB,OAAQ,CACJ,UAAW,GACX,QAAS,EACb,EACA,SAAU,IAAM,CACZ,sBAAsB,IAAM,CACxB,KAAK,mBAAmB,CAC5B,CAAC,CACL,CACJ,CAAC,CACL,CAjBA,WAA2B,QAAyB,CAChD,MAAO,CAACD,CAAM,CAClB,CAiBU,oBAA2B,CAC7B,KAAK,aAAe,KAAK,aACzB,KAAK,SAAW,EAEhB,KAAK,gBAAgB,UAAU,CAEvC,CAKmB,QAAyB,CACxC,OAAOH;AAAA;AAAA,SAGX,CACJ,CAPWK,EAAA,CADNH,EAAS,CAAE,QAAS,EAAK,CAAC,GA5BlB,UA6BF",
|
|
6
6
|
"names": ["html", "SpectrumElement", "property", "styles", "MutationController", "__decorateClass"]
|
|
7
7
|
}
|