@livenetworks/ashlar 2.0.6 → 2.0.8
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/LICENSE +641 -641
- package/components/COMPONENTS.md +1116 -1116
- package/components/index.js +81 -81
- package/components/ln-accordion/ln-accordion-dev.scss +8 -8
- package/components/ln-accordion/ln-accordion.js +1 -1
- package/components/ln-accordion/ln-accordion.schema.json +30 -30
- package/components/ln-accordion/src/ln-accordion.js +1 -0
- package/components/ln-ajax/ln-ajax-dev.scss +8 -8
- package/components/ln-ajax/ln-ajax.js +1 -1
- package/components/ln-ajax/ln-ajax.schema.json +30 -30
- package/components/ln-api-connector/ln-api-connector.js +1 -1
- package/components/ln-api-connector/ln-api-connector.schema.json +96 -96
- package/components/ln-api-connector/src/ln-api-connector.js +1 -0
- package/components/ln-api-queue/ln-api-queue.js +1 -1
- package/components/ln-api-queue/ln-api-queue.schema.json +34 -34
- package/components/ln-api-queue/src/ln-api-queue.js +3 -13
- package/components/ln-autoresize/ln-autoresize-dev.scss +8 -8
- package/components/ln-autoresize/ln-autoresize.js +1 -1
- package/components/ln-autoresize/ln-autoresize.schema.json +22 -22
- package/components/ln-autosave/ln-autosave-dev.scss +13 -13
- package/components/ln-autosave/ln-autosave.js +1 -1
- package/components/ln-autosave/ln-autosave.schema.json +48 -48
- package/components/ln-autosave/src/autosave-model.js +34 -34
- package/components/ln-chart/ln-chart.js +1 -1
- package/components/ln-chart/ln-chart.schema.json +146 -146
- package/components/ln-chart/src/chart-model.js +154 -154
- package/components/ln-circular-progress/ln-circular-progress.js +1 -1
- package/components/ln-circular-progress/ln-circular-progress.schema.json +42 -42
- package/components/ln-confirm/ln-confirm-dev.scss +24 -24
- package/components/ln-confirm/ln-confirm.js +1 -1
- package/components/ln-confirm/ln-confirm.schema.json +66 -66
- package/components/ln-confirm/src/ln-confirm.js +178 -178
- package/components/ln-core/crypto.js +286 -265
- package/components/ln-core/dom.js +115 -115
- package/components/ln-core/form.js +136 -136
- package/components/ln-core/helpers.js +33 -33
- package/components/ln-core/http.js +48 -48
- package/components/ln-core/index.js +1 -1
- package/components/ln-core/ln-core.schema.json +109 -109
- package/components/ln-core/locale.js +55 -55
- package/components/ln-core/matching.js +78 -78
- package/components/ln-core/number.js +125 -125
- package/components/ln-core/template.js +206 -206
- package/components/ln-couchdb-connector/README.md +4 -0
- package/components/ln-couchdb-connector/ln-couchdb-connector.js +1 -1
- package/components/ln-couchdb-connector/ln-couchdb-connector.schema.json +50 -50
- package/components/ln-couchdb-connector/src/ln-couchdb-connector.js +19 -1
- package/components/ln-data-coordinator/README.md +9 -38
- package/components/ln-data-coordinator/ln-data-coordinator-dev.scss +8 -8
- package/components/ln-data-coordinator/ln-data-coordinator.js +1 -1
- package/components/ln-data-coordinator/ln-data-coordinator.schema.json +16 -16
- package/components/ln-data-coordinator/src/data-read-policy.js +0 -7
- package/components/ln-data-coordinator/src/ln-data-coordinator.js +428 -1299
- package/components/ln-data-store/README.md +3 -2
- package/components/ln-data-store/ln-data-store-dev.scss +13 -13
- package/components/ln-data-store/ln-data-store.js +1 -1
- package/components/ln-data-store/ln-data-store.schema.json +84 -84
- package/components/ln-data-store/src/data-store-model.js +184 -155
- package/components/ln-data-store/src/ln-data-store.js +58 -11
- package/components/ln-date/README.md +4 -0
- package/components/ln-date/ln-date.js +1 -1
- package/components/ln-date/ln-date.schema.json +92 -92
- package/components/ln-date/src/date-model.js +186 -186
- package/components/ln-date/src/ln-date.js +3 -3
- package/components/ln-debug/ln-debug.js +1 -1
- package/components/ln-debug/ln-debug.schema.json +28 -28
- package/components/ln-debug/src/console-sink.js +19 -19
- package/components/ln-debug/src/gate.js +95 -95
- package/components/ln-debug/src/generated-attributes.js +2 -2
- package/components/ln-dropdown/ln-dropdown-dev.scss +13 -13
- package/components/ln-dropdown/ln-dropdown.js +1 -1
- package/components/ln-dropdown/ln-dropdown.schema.json +90 -90
- package/components/ln-editor/ln-editor.js +1 -1
- package/components/ln-editor/ln-editor.schema.json +58 -58
- package/components/ln-external-links/ln-external-links.js +1 -1
- package/components/ln-external-links/ln-external-links.schema.json +18 -18
- package/components/ln-fill/ln-fill.js +1 -1
- package/components/ln-fill/ln-fill.schema.json +23 -23
- package/components/ln-filter/ln-filter.js +1 -1
- package/components/ln-filter/ln-filter.schema.json +153 -153
- package/components/ln-filter/src/filter-model.js +185 -185
- package/components/ln-form/ln-form-dev.scss +8 -8
- package/components/ln-form/ln-form.js +1 -1
- package/components/ln-form/ln-form.schema.json +45 -45
- package/components/ln-http/ln-http.js +1 -1
- package/components/ln-http/ln-http.schema.json +6 -6
- package/components/ln-icon/ln-icon.schema.json +6 -6
- package/components/ln-include/ln-include.js +1 -1
- package/components/ln-include/ln-include.schema.json +23 -23
- package/components/ln-key/ln-key-dev.scss +18 -18
- package/components/ln-key/ln-key.js +1 -1
- package/components/ln-key/ln-key.schema.json +56 -56
- package/components/ln-key/src/ln-key.js +10 -10
- package/components/ln-link/ln-link-dev.scss +8 -8
- package/components/ln-link/ln-link.js +1 -1
- package/components/ln-link/ln-link.schema.json +22 -22
- package/components/ln-list/README.md +152 -152
- package/components/ln-list/ln-list-dev.scss +8 -8
- package/components/ln-list/ln-list.js +1 -1
- package/components/ln-list/ln-list.schema.json +166 -166
- package/components/ln-list/src/ln-list.js +4 -4
- package/components/ln-modal/README.md +4 -6
- package/components/ln-modal/ln-modal.js +1 -1
- package/components/ln-modal/ln-modal.schema.json +65 -65
- package/components/ln-modal/src/ln-modal.js +28 -8
- package/components/ln-nav/ln-nav.js +1 -1
- package/components/ln-nav/ln-nav.schema.json +25 -25
- package/components/ln-number/ln-number.js +1 -1
- package/components/ln-number/ln-number.schema.json +63 -63
- package/components/ln-number/src/number-model.js +31 -31
- package/components/ln-obfuscator/README.md +60 -60
- package/components/ln-obfuscator/ln-obfuscator.js +1 -1
- package/components/ln-obfuscator/ln-obfuscator.schema.json +49 -49
- package/components/ln-obfuscator/src/ln-obfuscator.js +159 -159
- package/components/ln-obfuscator/src/obfuscator-model.js +250 -250
- package/components/ln-options/ln-options.js +1 -1
- package/components/ln-options/ln-options.schema.json +41 -41
- package/components/ln-options/src/ln-options.js +1 -0
- package/components/ln-persist/README.md +151 -151
- package/components/ln-persist/ln-persist.js +1 -1
- package/components/ln-persist/ln-persist.schema.json +28 -28
- package/components/ln-persist/src/ln-persist.js +83 -83
- package/components/ln-picklist/README.md +230 -230
- package/components/ln-picklist/ln-picklist-dev.scss +22 -22
- package/components/ln-picklist/ln-picklist.js +1 -1
- package/components/ln-picklist/ln-picklist.schema.json +49 -49
- package/components/ln-picklist/src/ln-picklist.js +228 -228
- package/components/ln-popover/README.md +4 -0
- package/components/ln-popover/ln-popover-dev.scss +13 -13
- package/components/ln-popover/ln-popover.js +1 -1
- package/components/ln-popover/ln-popover.schema.json +82 -82
- package/components/ln-popover/src/ln-popover.js +9 -0
- package/components/ln-progress/ln-progress-dev.scss +8 -8
- package/components/ln-progress/ln-progress.js +1 -1
- package/components/ln-progress/ln-progress.schema.json +40 -40
- package/components/ln-router/ln-router.js +1 -1
- package/components/ln-router/ln-router.schema.json +76 -76
- package/components/ln-scroll/README.md +45 -45
- package/components/ln-scroll/ln-scroll.js +1 -1
- package/components/ln-scroll/ln-scroll.schema.json +85 -85
- package/components/ln-scroll/src/ln-scroll.js +150 -150
- package/components/ln-search/README.md +188 -188
- package/components/ln-search/ln-search.js +1 -1
- package/components/ln-search/ln-search.schema.json +103 -103
- package/components/ln-slug/ln-slug.js +1 -1
- package/components/ln-slug/ln-slug.schema.json +23 -23
- package/components/ln-sort/ln-sort.js +1 -1
- package/components/ln-sort/ln-sort.schema.json +104 -104
- package/components/ln-sort/src/ln-sort.js +321 -321
- package/components/ln-sort/src/sort-model.js +117 -117
- package/components/ln-sortable/ln-sortable-dev.scss +13 -13
- package/components/ln-sortable/ln-sortable.js +1 -1
- package/components/ln-sortable/ln-sortable.schema.json +36 -36
- package/components/ln-stat/ln-stat-dev.scss +8 -8
- package/components/ln-stat/ln-stat.js +1 -1
- package/components/ln-stat/ln-stat.schema.json +32 -32
- package/components/ln-stat/src/stat-model.js +28 -28
- package/components/ln-table/ln-table.js +1 -1
- package/components/ln-table/ln-table.schema.json +211 -211
- package/components/ln-table/src/ln-table.js +2 -0
- package/components/ln-table/src/table-model.js +98 -98
- package/components/ln-table-coordinator/ln-table-coordinator.js +1 -1
- package/components/ln-table-coordinator/ln-table-coordinator.schema.json +93 -93
- package/components/ln-table-coordinator/src/ln-table-coordinator.js +3 -3
- package/components/ln-tabs/README.md +2 -2
- package/components/ln-tabs/ln-tabs.js +1 -1
- package/components/ln-tabs/ln-tabs.schema.json +75 -75
- package/components/ln-tabs/src/ln-tabs.js +208 -207
- package/components/ln-tabs/src/tabs-model.js +82 -82
- package/components/ln-time/ln-time-dev.scss +13 -13
- package/components/ln-time/ln-time.js +1 -1
- package/components/ln-time/ln-time.schema.json +38 -38
- package/components/ln-toast/ln-toast.js +1 -1
- package/components/ln-toast/ln-toast.schema.json +65 -65
- package/components/ln-toggle/ln-toggle.js +1 -1
- package/components/ln-toggle/ln-toggle.schema.json +52 -52
- package/components/ln-tooltip/ln-tooltip.js +1 -1
- package/components/ln-tooltip/ln-tooltip.schema.json +86 -86
- package/components/ln-translations/ln-translations.js +1 -1
- package/components/ln-translations/ln-translations.schema.json +120 -120
- package/components/ln-ui-coordinator/README.md +62 -62
- package/components/ln-ui-coordinator/ln-ui-coordinator.js +1 -1
- package/components/ln-ui-coordinator/ln-ui-coordinator.schema.json +28 -28
- package/components/ln-ui-coordinator/src/ln-ui-coordinator.js +140 -140
- package/components/ln-upload/ln-upload.js +1 -1
- package/components/ln-upload/ln-upload.schema.json +193 -193
- package/components/ln-upload/src/upload-model.js +78 -78
- package/components/ln-validate/ln-validate.js +1 -1
- package/components/ln-validate/ln-validate.schema.json +50 -50
- package/components/ln-validate/src/validate-model.js +64 -64
- package/components/ln-websocket-connector/README.md +166 -166
- package/components/ln-websocket-connector/ln-websocket-connector.js +1 -1
- package/components/ln-websocket-connector/ln-websocket-connector.schema.json +29 -29
- package/components/ln-websocket-connector/src/ln-websocket-connector.js +283 -279
- package/ln-ashlar.html-data.json +7 -8
- package/package.json +84 -84
- package/theme/brand.css +73 -73
- package/theme/components/_confirm.scss +6 -6
- package/theme/components/_picklist.scss +3 -3
- package/theme/config/_palette.scss +274 -274
- package/theme/config/_theme.scss +292 -292
- package/theme/config/_tokens.scss +285 -285
- package/theme/config/mixins/_index.scss +62 -62
- package/theme/config/mixins/_picklist.scss +66 -66
- package/theme/ln-ashlar-dev.scss +66 -66
- package/theme/ln-ashlar-landing.scss +56 -56
- package/theme/ln-ashlar-theme.scss +63 -63
- package/theme/presentation/_bento.scss +151 -151
- package/theme/presentation/_cta.scss +111 -111
- package/theme/presentation/_effects.scss +216 -216
- package/theme/presentation/_features.scss +108 -108
- package/theme/presentation/_footer.scss +129 -129
- package/theme/presentation/_hero.scss +158 -158
- package/theme/presentation/_layout.scss +170 -170
- package/theme/presentation/_navbar.scss +140 -140
- package/theme/presentation/_pricing.scss +262 -262
- package/theme/presentation/_stats.scss +87 -87
- package/theme/presentation/_testimonials.scss +124 -124
- package/theme/presentation/_tokens.scss +39 -39
- package/theme/presentation/_typography.scss +163 -163
- package/web-types.json +12 -12
|
@@ -1,211 +1,211 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$comment": "This file is partly generated. The $comment, component, generator, and each attribute's direction, sources, type, values, fallback, and description keys are owned by the generator and synchronized from JS source code. All other keys are preserved and safe to hand-author. Regenerate with `npm run sync:ln-schemas`.",
|
|
3
|
-
"component": "ln-table",
|
|
4
|
-
"generator": "scripts/sync-ln-schemas.mjs",
|
|
5
|
-
"attributes": {
|
|
6
|
-
"data-ln-debug": {
|
|
7
|
-
"direction": null,
|
|
8
|
-
"sources": [
|
|
9
|
-
"ln-table-dev.scss"
|
|
10
|
-
]
|
|
11
|
-
},
|
|
12
|
-
"data-ln-sort": {
|
|
13
|
-
"direction": null,
|
|
14
|
-
"sources": [
|
|
15
|
-
"ln-table-dev.scss",
|
|
16
|
-
"ln-table.scss"
|
|
17
|
-
]
|
|
18
|
-
},
|
|
19
|
-
"data-ln-sort-icon": {
|
|
20
|
-
"direction": null,
|
|
21
|
-
"sources": [
|
|
22
|
-
"ln-table.scss"
|
|
23
|
-
]
|
|
24
|
-
},
|
|
25
|
-
"data-ln-table": {
|
|
26
|
-
"direction": null,
|
|
27
|
-
"sources": [
|
|
28
|
-
"ln-table-dev.scss",
|
|
29
|
-
"ln-table.scss",
|
|
30
|
-
"src/ln-table.js"
|
|
31
|
-
],
|
|
32
|
-
"type": "string",
|
|
33
|
-
"fallback": "",
|
|
34
|
-
"description": "Table instance name or identifier"
|
|
35
|
-
},
|
|
36
|
-
"data-ln-table-body": {
|
|
37
|
-
"direction": "author",
|
|
38
|
-
"sources": [
|
|
39
|
-
"src/ln-table.js"
|
|
40
|
-
]
|
|
41
|
-
},
|
|
42
|
-
"data-ln-table-cell-attr": {
|
|
43
|
-
"direction": "author",
|
|
44
|
-
"sources": [
|
|
45
|
-
"src/ln-table.js"
|
|
46
|
-
],
|
|
47
|
-
"type": "string",
|
|
48
|
-
"description": "Cell attribute template mapping"
|
|
49
|
-
},
|
|
50
|
-
"data-ln-table-col": {
|
|
51
|
-
"direction": "author",
|
|
52
|
-
"sources": [
|
|
53
|
-
"src/ln-table.js"
|
|
54
|
-
],
|
|
55
|
-
"type": "string",
|
|
56
|
-
"description": "Column header identifier or field mapping"
|
|
57
|
-
},
|
|
58
|
-
"data-ln-table-col-select": {
|
|
59
|
-
"direction": "author",
|
|
60
|
-
"sources": [
|
|
61
|
-
"src/ln-table.js"
|
|
62
|
-
],
|
|
63
|
-
"type": "trigger",
|
|
64
|
-
"description": "Header select-all checkbox trigger"
|
|
65
|
-
},
|
|
66
|
-
"data-ln-table-col-sort": {
|
|
67
|
-
"direction": null,
|
|
68
|
-
"sources": [
|
|
69
|
-
"ln-table-dev.scss"
|
|
70
|
-
]
|
|
71
|
-
},
|
|
72
|
-
"data-ln-table-count": {
|
|
73
|
-
"direction": "author",
|
|
74
|
-
"sources": [
|
|
75
|
-
"src/ln-table.js"
|
|
76
|
-
],
|
|
77
|
-
"type": "integer",
|
|
78
|
-
"min": 0,
|
|
79
|
-
"description": "Total record count override for virtual scrollbar calculation"
|
|
80
|
-
},
|
|
81
|
-
"data-ln-table-dict": {
|
|
82
|
-
"direction": "author",
|
|
83
|
-
"sources": [
|
|
84
|
-
"src/ln-table.js"
|
|
85
|
-
]
|
|
86
|
-
},
|
|
87
|
-
"data-ln-table-empty": {
|
|
88
|
-
"direction": "author",
|
|
89
|
-
"sources": [
|
|
90
|
-
"src/ln-table.js"
|
|
91
|
-
],
|
|
92
|
-
"type": "marker",
|
|
93
|
-
"description": "Container for table empty state"
|
|
94
|
-
},
|
|
95
|
-
"data-ln-table-empty-when": {
|
|
96
|
-
"direction": "author",
|
|
97
|
-
"sources": [
|
|
98
|
-
"src/ln-table.js"
|
|
99
|
-
]
|
|
100
|
-
},
|
|
101
|
-
"data-ln-table-filtered": {
|
|
102
|
-
"direction": "author",
|
|
103
|
-
"sources": [
|
|
104
|
-
"src/ln-table.js"
|
|
105
|
-
]
|
|
106
|
-
},
|
|
107
|
-
"data-ln-table-row": {
|
|
108
|
-
"direction": "both",
|
|
109
|
-
"sources": [
|
|
110
|
-
"src/ln-table.js"
|
|
111
|
-
],
|
|
112
|
-
"type": "marker",
|
|
113
|
-
"description": "Table row template element"
|
|
114
|
-
},
|
|
115
|
-
"data-ln-table-row-action": {
|
|
116
|
-
"direction": "author",
|
|
117
|
-
"sources": [
|
|
118
|
-
"src/ln-table.js"
|
|
119
|
-
],
|
|
120
|
-
"type": "trigger",
|
|
121
|
-
"description": "Action trigger inside a table row"
|
|
122
|
-
},
|
|
123
|
-
"data-ln-table-row-id": {
|
|
124
|
-
"direction": "both",
|
|
125
|
-
"sources": [
|
|
126
|
-
"src/ln-table.js"
|
|
127
|
-
],
|
|
128
|
-
"type": "string",
|
|
129
|
-
"description": "Record identifier on row element"
|
|
130
|
-
},
|
|
131
|
-
"data-ln-table-row-select": {
|
|
132
|
-
"direction": "both",
|
|
133
|
-
"sources": [
|
|
134
|
-
"src/ln-table.js"
|
|
135
|
-
],
|
|
136
|
-
"type": "trigger",
|
|
137
|
-
"description": "Row selection checkbox trigger"
|
|
138
|
-
},
|
|
139
|
-
"data-ln-table-select-all-label": {
|
|
140
|
-
"direction": "author",
|
|
141
|
-
"sources": [
|
|
142
|
-
"src/ln-table.js"
|
|
143
|
-
],
|
|
144
|
-
"type": "string",
|
|
145
|
-
"description": "Accessibility label for select-all header trigger"
|
|
146
|
-
},
|
|
147
|
-
"data-ln-table-selectable": {
|
|
148
|
-
"direction": null,
|
|
149
|
-
"sources": [
|
|
150
|
-
"src/ln-table.js"
|
|
151
|
-
],
|
|
152
|
-
"type": "boolean",
|
|
153
|
-
"description": "Enables row selection check controls"
|
|
154
|
-
},
|
|
155
|
-
"data-ln-table-selected": {
|
|
156
|
-
"direction": "author",
|
|
157
|
-
"sources": [
|
|
158
|
-
"src/ln-table.js"
|
|
159
|
-
]
|
|
160
|
-
},
|
|
161
|
-
"data-ln-table-sort": {
|
|
162
|
-
"direction": null,
|
|
163
|
-
"sources": [
|
|
164
|
-
"ln-table-dev.scss"
|
|
165
|
-
]
|
|
166
|
-
},
|
|
167
|
-
"data-ln-table-source": {
|
|
168
|
-
"direction": "author",
|
|
169
|
-
"sources": [
|
|
170
|
-
"src/ln-table.js"
|
|
171
|
-
],
|
|
172
|
-
"type": "string",
|
|
173
|
-
"fallback": "",
|
|
174
|
-
"description": "Source store or coordinator addressing"
|
|
175
|
-
},
|
|
176
|
-
"data-ln-table-total": {
|
|
177
|
-
"direction": "author",
|
|
178
|
-
"sources": [
|
|
179
|
-
"src/ln-table.js"
|
|
180
|
-
]
|
|
181
|
-
},
|
|
182
|
-
"data-ln-table-window": {
|
|
183
|
-
"direction": "author",
|
|
184
|
-
"sources": [
|
|
185
|
-
"src/ln-table.js"
|
|
186
|
-
],
|
|
187
|
-
"type": "integer",
|
|
188
|
-
"min": 10,
|
|
189
|
-
"description": "Virtual scrolling window size in rows"
|
|
190
|
-
},
|
|
191
|
-
"data-ln-table-window-page": {
|
|
192
|
-
"direction": "author",
|
|
193
|
-
"sources": [
|
|
194
|
-
"src/ln-table.js"
|
|
195
|
-
],
|
|
196
|
-
"type": "integer",
|
|
197
|
-
"min": 5,
|
|
198
|
-
"description": "Virtual scrolling slice page size"
|
|
199
|
-
},
|
|
200
|
-
"data-ln-table-window-threshold": {
|
|
201
|
-
"direction": "author",
|
|
202
|
-
"sources": [
|
|
203
|
-
"src/ln-table.js"
|
|
204
|
-
],
|
|
205
|
-
"type": "integer",
|
|
206
|
-
"fallback": 50,
|
|
207
|
-
"min": 0,
|
|
208
|
-
"description": "Scroll threshold margin in pixels to trigger page fetch"
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"$comment": "This file is partly generated. The $comment, component, generator, and each attribute's direction, sources, type, values, fallback, and description keys are owned by the generator and synchronized from JS source code. All other keys are preserved and safe to hand-author. Regenerate with `npm run sync:ln-schemas`.",
|
|
3
|
+
"component": "ln-table",
|
|
4
|
+
"generator": "scripts/sync-ln-schemas.mjs",
|
|
5
|
+
"attributes": {
|
|
6
|
+
"data-ln-debug": {
|
|
7
|
+
"direction": null,
|
|
8
|
+
"sources": [
|
|
9
|
+
"ln-table-dev.scss"
|
|
10
|
+
]
|
|
11
|
+
},
|
|
12
|
+
"data-ln-sort": {
|
|
13
|
+
"direction": null,
|
|
14
|
+
"sources": [
|
|
15
|
+
"ln-table-dev.scss",
|
|
16
|
+
"ln-table.scss"
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
"data-ln-sort-icon": {
|
|
20
|
+
"direction": null,
|
|
21
|
+
"sources": [
|
|
22
|
+
"ln-table.scss"
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
"data-ln-table": {
|
|
26
|
+
"direction": null,
|
|
27
|
+
"sources": [
|
|
28
|
+
"ln-table-dev.scss",
|
|
29
|
+
"ln-table.scss",
|
|
30
|
+
"src/ln-table.js"
|
|
31
|
+
],
|
|
32
|
+
"type": "string",
|
|
33
|
+
"fallback": "",
|
|
34
|
+
"description": "Table instance name or identifier"
|
|
35
|
+
},
|
|
36
|
+
"data-ln-table-body": {
|
|
37
|
+
"direction": "author",
|
|
38
|
+
"sources": [
|
|
39
|
+
"src/ln-table.js"
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
"data-ln-table-cell-attr": {
|
|
43
|
+
"direction": "author",
|
|
44
|
+
"sources": [
|
|
45
|
+
"src/ln-table.js"
|
|
46
|
+
],
|
|
47
|
+
"type": "string",
|
|
48
|
+
"description": "Cell attribute template mapping"
|
|
49
|
+
},
|
|
50
|
+
"data-ln-table-col": {
|
|
51
|
+
"direction": "author",
|
|
52
|
+
"sources": [
|
|
53
|
+
"src/ln-table.js"
|
|
54
|
+
],
|
|
55
|
+
"type": "string",
|
|
56
|
+
"description": "Column header identifier or field mapping"
|
|
57
|
+
},
|
|
58
|
+
"data-ln-table-col-select": {
|
|
59
|
+
"direction": "author",
|
|
60
|
+
"sources": [
|
|
61
|
+
"src/ln-table.js"
|
|
62
|
+
],
|
|
63
|
+
"type": "trigger",
|
|
64
|
+
"description": "Header select-all checkbox trigger"
|
|
65
|
+
},
|
|
66
|
+
"data-ln-table-col-sort": {
|
|
67
|
+
"direction": null,
|
|
68
|
+
"sources": [
|
|
69
|
+
"ln-table-dev.scss"
|
|
70
|
+
]
|
|
71
|
+
},
|
|
72
|
+
"data-ln-table-count": {
|
|
73
|
+
"direction": "author",
|
|
74
|
+
"sources": [
|
|
75
|
+
"src/ln-table.js"
|
|
76
|
+
],
|
|
77
|
+
"type": "integer",
|
|
78
|
+
"min": 0,
|
|
79
|
+
"description": "Total record count override for virtual scrollbar calculation"
|
|
80
|
+
},
|
|
81
|
+
"data-ln-table-dict": {
|
|
82
|
+
"direction": "author",
|
|
83
|
+
"sources": [
|
|
84
|
+
"src/ln-table.js"
|
|
85
|
+
]
|
|
86
|
+
},
|
|
87
|
+
"data-ln-table-empty": {
|
|
88
|
+
"direction": "author",
|
|
89
|
+
"sources": [
|
|
90
|
+
"src/ln-table.js"
|
|
91
|
+
],
|
|
92
|
+
"type": "marker",
|
|
93
|
+
"description": "Container for table empty state"
|
|
94
|
+
},
|
|
95
|
+
"data-ln-table-empty-when": {
|
|
96
|
+
"direction": "author",
|
|
97
|
+
"sources": [
|
|
98
|
+
"src/ln-table.js"
|
|
99
|
+
]
|
|
100
|
+
},
|
|
101
|
+
"data-ln-table-filtered": {
|
|
102
|
+
"direction": "author",
|
|
103
|
+
"sources": [
|
|
104
|
+
"src/ln-table.js"
|
|
105
|
+
]
|
|
106
|
+
},
|
|
107
|
+
"data-ln-table-row": {
|
|
108
|
+
"direction": "both",
|
|
109
|
+
"sources": [
|
|
110
|
+
"src/ln-table.js"
|
|
111
|
+
],
|
|
112
|
+
"type": "marker",
|
|
113
|
+
"description": "Table row template element"
|
|
114
|
+
},
|
|
115
|
+
"data-ln-table-row-action": {
|
|
116
|
+
"direction": "author",
|
|
117
|
+
"sources": [
|
|
118
|
+
"src/ln-table.js"
|
|
119
|
+
],
|
|
120
|
+
"type": "trigger",
|
|
121
|
+
"description": "Action trigger inside a table row"
|
|
122
|
+
},
|
|
123
|
+
"data-ln-table-row-id": {
|
|
124
|
+
"direction": "both",
|
|
125
|
+
"sources": [
|
|
126
|
+
"src/ln-table.js"
|
|
127
|
+
],
|
|
128
|
+
"type": "string",
|
|
129
|
+
"description": "Record identifier on row element"
|
|
130
|
+
},
|
|
131
|
+
"data-ln-table-row-select": {
|
|
132
|
+
"direction": "both",
|
|
133
|
+
"sources": [
|
|
134
|
+
"src/ln-table.js"
|
|
135
|
+
],
|
|
136
|
+
"type": "trigger",
|
|
137
|
+
"description": "Row selection checkbox trigger"
|
|
138
|
+
},
|
|
139
|
+
"data-ln-table-select-all-label": {
|
|
140
|
+
"direction": "author",
|
|
141
|
+
"sources": [
|
|
142
|
+
"src/ln-table.js"
|
|
143
|
+
],
|
|
144
|
+
"type": "string",
|
|
145
|
+
"description": "Accessibility label for select-all header trigger"
|
|
146
|
+
},
|
|
147
|
+
"data-ln-table-selectable": {
|
|
148
|
+
"direction": null,
|
|
149
|
+
"sources": [
|
|
150
|
+
"src/ln-table.js"
|
|
151
|
+
],
|
|
152
|
+
"type": "boolean",
|
|
153
|
+
"description": "Enables row selection check controls"
|
|
154
|
+
},
|
|
155
|
+
"data-ln-table-selected": {
|
|
156
|
+
"direction": "author",
|
|
157
|
+
"sources": [
|
|
158
|
+
"src/ln-table.js"
|
|
159
|
+
]
|
|
160
|
+
},
|
|
161
|
+
"data-ln-table-sort": {
|
|
162
|
+
"direction": null,
|
|
163
|
+
"sources": [
|
|
164
|
+
"ln-table-dev.scss"
|
|
165
|
+
]
|
|
166
|
+
},
|
|
167
|
+
"data-ln-table-source": {
|
|
168
|
+
"direction": "author",
|
|
169
|
+
"sources": [
|
|
170
|
+
"src/ln-table.js"
|
|
171
|
+
],
|
|
172
|
+
"type": "string",
|
|
173
|
+
"fallback": "",
|
|
174
|
+
"description": "Source store or coordinator addressing"
|
|
175
|
+
},
|
|
176
|
+
"data-ln-table-total": {
|
|
177
|
+
"direction": "author",
|
|
178
|
+
"sources": [
|
|
179
|
+
"src/ln-table.js"
|
|
180
|
+
]
|
|
181
|
+
},
|
|
182
|
+
"data-ln-table-window": {
|
|
183
|
+
"direction": "author",
|
|
184
|
+
"sources": [
|
|
185
|
+
"src/ln-table.js"
|
|
186
|
+
],
|
|
187
|
+
"type": "integer",
|
|
188
|
+
"min": 10,
|
|
189
|
+
"description": "Virtual scrolling window size in rows"
|
|
190
|
+
},
|
|
191
|
+
"data-ln-table-window-page": {
|
|
192
|
+
"direction": "author",
|
|
193
|
+
"sources": [
|
|
194
|
+
"src/ln-table.js"
|
|
195
|
+
],
|
|
196
|
+
"type": "integer",
|
|
197
|
+
"min": 5,
|
|
198
|
+
"description": "Virtual scrolling slice page size"
|
|
199
|
+
},
|
|
200
|
+
"data-ln-table-window-threshold": {
|
|
201
|
+
"direction": "author",
|
|
202
|
+
"sources": [
|
|
203
|
+
"src/ln-table.js"
|
|
204
|
+
],
|
|
205
|
+
"type": "integer",
|
|
206
|
+
"fallback": 50,
|
|
207
|
+
"min": 0,
|
|
208
|
+
"description": "Scroll threshold margin in pixels to trigger page fetch"
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
@@ -299,6 +299,7 @@ import { calculateSelectionState, calculateVirtualWindow, toggleRowSelection, to
|
|
|
299
299
|
|
|
300
300
|
// --- Sort ---
|
|
301
301
|
this._onSort = function (e) {
|
|
302
|
+
if (!e.detail || e.detail.field == null) return;
|
|
302
303
|
e.preventDefault();
|
|
303
304
|
self.currentSort = e.detail.direction === 'none' ? null : { field: e.detail.field, direction: e.detail.direction };
|
|
304
305
|
self._requestData();
|
|
@@ -388,6 +389,7 @@ import { calculateSelectionState, calculateVirtualWindow, toggleRowSelection, to
|
|
|
388
389
|
}
|
|
389
390
|
|
|
390
391
|
this._onSort = function (e) {
|
|
392
|
+
if (!e.detail || e.detail.column == null) return;
|
|
391
393
|
e.preventDefault();
|
|
392
394
|
const direction = e.detail.direction === 'none' ? null : e.detail.direction;
|
|
393
395
|
self._sortCol = direction === null ? -1 : e.detail.column;
|
|
@@ -1,98 +1,98 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Calculates virtual scrolling slicing indices and padding heights.
|
|
3
|
-
* @param {number} scrollTop
|
|
4
|
-
* @param {number} viewportHeight
|
|
5
|
-
* @param {number} rowHeight
|
|
6
|
-
* @param {number} totalCount
|
|
7
|
-
* @param {number} [bufferRows=15]
|
|
8
|
-
* @returns {{ start: number, end: number, topPadding: number, bottomPadding: number }}
|
|
9
|
-
*/
|
|
10
|
-
export function calculateVirtualWindow(scrollTop, viewportHeight, rowHeight, totalCount, bufferRows = 15) {
|
|
11
|
-
if (totalCount <= 0 || rowHeight <= 0) {
|
|
12
|
-
return { start: 0, end: 0, topPadding: 0, bottomPadding: 0 };
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const safeScrollTop = Math.max(0, scrollTop || 0);
|
|
16
|
-
const safeViewportHeight = Math.max(0, viewportHeight || 0);
|
|
17
|
-
|
|
18
|
-
const visibleStartIndex = Math.floor(safeScrollTop / rowHeight);
|
|
19
|
-
const visibleCount = Math.ceil(safeViewportHeight / rowHeight);
|
|
20
|
-
|
|
21
|
-
const start = Math.max(0, visibleStartIndex - bufferRows);
|
|
22
|
-
const end = Math.min(totalCount, visibleStartIndex + visibleCount + bufferRows);
|
|
23
|
-
|
|
24
|
-
const topPadding = start * rowHeight;
|
|
25
|
-
const bottomPadding = Math.max(0, (totalCount - end) * rowHeight);
|
|
26
|
-
|
|
27
|
-
return { start, end, topPadding, bottomPadding };
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Computes selection state metadata across a dataset.
|
|
32
|
-
* @param {string[]|number[]} allIds
|
|
33
|
-
* @param {Set<string|number>|Array<string|number>} selectedIds
|
|
34
|
-
* @returns {{ totalCount: number, selectedCount: number, isAllSelected: boolean, isIndeterminate: boolean }}
|
|
35
|
-
*/
|
|
36
|
-
export function calculateSelectionState(allIds, selectedIds) {
|
|
37
|
-
const totalCount = Array.isArray(allIds) ? allIds.length : 0;
|
|
38
|
-
const selectedSet = selectedIds instanceof Set ? selectedIds : new Set(selectedIds || []);
|
|
39
|
-
let selectedCount = 0;
|
|
40
|
-
|
|
41
|
-
if (Array.isArray(allIds)) {
|
|
42
|
-
for (let i = 0; i < allIds.length; i++) {
|
|
43
|
-
if (selectedSet.has(allIds[i])) {
|
|
44
|
-
selectedCount++;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
} else {
|
|
48
|
-
selectedCount = selectedSet.size;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
const isAllSelected = totalCount > 0 && selectedCount === totalCount;
|
|
52
|
-
const isIndeterminate = selectedCount > 0 && selectedCount < totalCount;
|
|
53
|
-
|
|
54
|
-
return { totalCount, selectedCount, isAllSelected, isIndeterminate };
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Toggles a row ID within a Set of selected IDs.
|
|
59
|
-
* @param {Set<string|number>} selectedSet
|
|
60
|
-
* @param {string|number} rowId
|
|
61
|
-
* @param {boolean} [forceState]
|
|
62
|
-
* @returns {Set<string|number>}
|
|
63
|
-
*/
|
|
64
|
-
export function toggleRowSelection(selectedSet, rowId, forceState) {
|
|
65
|
-
const next = new Set(selectedSet);
|
|
66
|
-
if (rowId == null) return next;
|
|
67
|
-
|
|
68
|
-
const shouldSelect = forceState !== undefined ? forceState : !next.has(rowId);
|
|
69
|
-
if (shouldSelect) {
|
|
70
|
-
next.add(rowId);
|
|
71
|
-
} else {
|
|
72
|
-
next.delete(rowId);
|
|
73
|
-
}
|
|
74
|
-
return next;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* Selects or deselects all IDs.
|
|
79
|
-
* @param {Set<string|number>} selectedSet
|
|
80
|
-
* @param {Array<string|number>} allIds
|
|
81
|
-
* @param {boolean} selectAll
|
|
82
|
-
* @returns {Set<string|number>}
|
|
83
|
-
*/
|
|
84
|
-
export function toggleSelectAll(selectedSet, allIds, selectAll) {
|
|
85
|
-
const next = new Set(selectedSet);
|
|
86
|
-
if (!Array.isArray(allIds)) return next;
|
|
87
|
-
|
|
88
|
-
if (selectAll) {
|
|
89
|
-
for (let i = 0; i < allIds.length; i++) {
|
|
90
|
-
if (allIds[i] != null) next.add(allIds[i]);
|
|
91
|
-
}
|
|
92
|
-
} else {
|
|
93
|
-
for (let i = 0; i < allIds.length; i++) {
|
|
94
|
-
next.delete(allIds[i]);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
return next;
|
|
98
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* Calculates virtual scrolling slicing indices and padding heights.
|
|
3
|
+
* @param {number} scrollTop
|
|
4
|
+
* @param {number} viewportHeight
|
|
5
|
+
* @param {number} rowHeight
|
|
6
|
+
* @param {number} totalCount
|
|
7
|
+
* @param {number} [bufferRows=15]
|
|
8
|
+
* @returns {{ start: number, end: number, topPadding: number, bottomPadding: number }}
|
|
9
|
+
*/
|
|
10
|
+
export function calculateVirtualWindow(scrollTop, viewportHeight, rowHeight, totalCount, bufferRows = 15) {
|
|
11
|
+
if (totalCount <= 0 || rowHeight <= 0) {
|
|
12
|
+
return { start: 0, end: 0, topPadding: 0, bottomPadding: 0 };
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const safeScrollTop = Math.max(0, scrollTop || 0);
|
|
16
|
+
const safeViewportHeight = Math.max(0, viewportHeight || 0);
|
|
17
|
+
|
|
18
|
+
const visibleStartIndex = Math.floor(safeScrollTop / rowHeight);
|
|
19
|
+
const visibleCount = Math.ceil(safeViewportHeight / rowHeight);
|
|
20
|
+
|
|
21
|
+
const start = Math.max(0, visibleStartIndex - bufferRows);
|
|
22
|
+
const end = Math.min(totalCount, visibleStartIndex + visibleCount + bufferRows);
|
|
23
|
+
|
|
24
|
+
const topPadding = start * rowHeight;
|
|
25
|
+
const bottomPadding = Math.max(0, (totalCount - end) * rowHeight);
|
|
26
|
+
|
|
27
|
+
return { start, end, topPadding, bottomPadding };
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Computes selection state metadata across a dataset.
|
|
32
|
+
* @param {string[]|number[]} allIds
|
|
33
|
+
* @param {Set<string|number>|Array<string|number>} selectedIds
|
|
34
|
+
* @returns {{ totalCount: number, selectedCount: number, isAllSelected: boolean, isIndeterminate: boolean }}
|
|
35
|
+
*/
|
|
36
|
+
export function calculateSelectionState(allIds, selectedIds) {
|
|
37
|
+
const totalCount = Array.isArray(allIds) ? allIds.length : 0;
|
|
38
|
+
const selectedSet = selectedIds instanceof Set ? selectedIds : new Set(selectedIds || []);
|
|
39
|
+
let selectedCount = 0;
|
|
40
|
+
|
|
41
|
+
if (Array.isArray(allIds)) {
|
|
42
|
+
for (let i = 0; i < allIds.length; i++) {
|
|
43
|
+
if (selectedSet.has(allIds[i])) {
|
|
44
|
+
selectedCount++;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
} else {
|
|
48
|
+
selectedCount = selectedSet.size;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const isAllSelected = totalCount > 0 && selectedCount === totalCount;
|
|
52
|
+
const isIndeterminate = selectedCount > 0 && selectedCount < totalCount;
|
|
53
|
+
|
|
54
|
+
return { totalCount, selectedCount, isAllSelected, isIndeterminate };
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Toggles a row ID within a Set of selected IDs.
|
|
59
|
+
* @param {Set<string|number>} selectedSet
|
|
60
|
+
* @param {string|number} rowId
|
|
61
|
+
* @param {boolean} [forceState]
|
|
62
|
+
* @returns {Set<string|number>}
|
|
63
|
+
*/
|
|
64
|
+
export function toggleRowSelection(selectedSet, rowId, forceState) {
|
|
65
|
+
const next = new Set(selectedSet);
|
|
66
|
+
if (rowId == null) return next;
|
|
67
|
+
|
|
68
|
+
const shouldSelect = forceState !== undefined ? forceState : !next.has(rowId);
|
|
69
|
+
if (shouldSelect) {
|
|
70
|
+
next.add(rowId);
|
|
71
|
+
} else {
|
|
72
|
+
next.delete(rowId);
|
|
73
|
+
}
|
|
74
|
+
return next;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Selects or deselects all IDs.
|
|
79
|
+
* @param {Set<string|number>} selectedSet
|
|
80
|
+
* @param {Array<string|number>} allIds
|
|
81
|
+
* @param {boolean} selectAll
|
|
82
|
+
* @returns {Set<string|number>}
|
|
83
|
+
*/
|
|
84
|
+
export function toggleSelectAll(selectedSet, allIds, selectAll) {
|
|
85
|
+
const next = new Set(selectedSet);
|
|
86
|
+
if (!Array.isArray(allIds)) return next;
|
|
87
|
+
|
|
88
|
+
if (selectAll) {
|
|
89
|
+
for (let i = 0; i < allIds.length; i++) {
|
|
90
|
+
if (allIds[i] != null) next.add(allIds[i]);
|
|
91
|
+
}
|
|
92
|
+
} else {
|
|
93
|
+
for (let i = 0; i < allIds.length; i++) {
|
|
94
|
+
next.delete(allIds[i]);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
return next;
|
|
98
|
+
}
|