@livenetworks/ashlar 2.0.7 → 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-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/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 +1 -0
- 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 -1308
- 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 -184
- package/components/ln-data-store/src/ln-data-store.js +1 -1
- 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-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-modal/ln-modal.js +1 -1
- package/components/ln-modal/ln-modal.schema.json +65 -65
- 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-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/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-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/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-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 -208
- 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,120 +1,120 @@
|
|
|
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-translations",
|
|
4
|
-
"generator": "scripts/sync-ln-schemas.mjs",
|
|
5
|
-
"attributes": {
|
|
6
|
-
"data-ln-debug": {
|
|
7
|
-
"direction": null,
|
|
8
|
-
"sources": [
|
|
9
|
-
"ln-translations-dev.scss"
|
|
10
|
-
]
|
|
11
|
-
},
|
|
12
|
-
"data-ln-dropdown": {
|
|
13
|
-
"direction": "author",
|
|
14
|
-
"sources": [
|
|
15
|
-
"src/ln-translations.js"
|
|
16
|
-
]
|
|
17
|
-
},
|
|
18
|
-
"data-ln-toggle": {
|
|
19
|
-
"direction": "both",
|
|
20
|
-
"sources": [
|
|
21
|
-
"src/ln-translations.js"
|
|
22
|
-
]
|
|
23
|
-
},
|
|
24
|
-
"data-ln-translatable": {
|
|
25
|
-
"direction": "author",
|
|
26
|
-
"sources": [
|
|
27
|
-
"ln-translations-dev.scss",
|
|
28
|
-
"src/ln-translations.js"
|
|
29
|
-
],
|
|
30
|
-
"type": "marker",
|
|
31
|
-
"description": "Marks form control as translatable into multiple languages"
|
|
32
|
-
},
|
|
33
|
-
"data-ln-translatable-lang": {
|
|
34
|
-
"direction": "both",
|
|
35
|
-
"sources": [
|
|
36
|
-
"src/ln-translations.js"
|
|
37
|
-
],
|
|
38
|
-
"type": "string",
|
|
39
|
-
"description": "Language code assigned to specific translatable input instance"
|
|
40
|
-
},
|
|
41
|
-
"data-ln-translations": {
|
|
42
|
-
"direction": null,
|
|
43
|
-
"sources": [
|
|
44
|
-
"ln-translations-dev.scss",
|
|
45
|
-
"src/ln-translations.js"
|
|
46
|
-
],
|
|
47
|
-
"type": "marker",
|
|
48
|
-
"description": "Mounts multi-language translation manager on form container"
|
|
49
|
-
},
|
|
50
|
-
"data-ln-translations-active": {
|
|
51
|
-
"direction": "author",
|
|
52
|
-
"sources": [
|
|
53
|
-
"ln-translations-dev.scss",
|
|
54
|
-
"src/ln-translations.js"
|
|
55
|
-
],
|
|
56
|
-
"type": "marker",
|
|
57
|
-
"description": "Container holding active language badge tags"
|
|
58
|
-
},
|
|
59
|
-
"data-ln-translations-add": {
|
|
60
|
-
"direction": "author",
|
|
61
|
-
"sources": [
|
|
62
|
-
"src/ln-translations.js"
|
|
63
|
-
],
|
|
64
|
-
"type": "string",
|
|
65
|
-
"description": "Trigger button action to add specified language translation fields"
|
|
66
|
-
},
|
|
67
|
-
"data-ln-translations-default": {
|
|
68
|
-
"direction": null,
|
|
69
|
-
"sources": [
|
|
70
|
-
"src/ln-translations.js"
|
|
71
|
-
],
|
|
72
|
-
"type": "string",
|
|
73
|
-
"fallback": "",
|
|
74
|
-
"description": "Default primary language code (e.g. en)"
|
|
75
|
-
},
|
|
76
|
-
"data-ln-translations-lang": {
|
|
77
|
-
"direction": "both",
|
|
78
|
-
"sources": [
|
|
79
|
-
"src/ln-translations.js"
|
|
80
|
-
],
|
|
81
|
-
"type": "string",
|
|
82
|
-
"description": "Language code associated with active language badge"
|
|
83
|
-
},
|
|
84
|
-
"data-ln-translations-locales": {
|
|
85
|
-
"direction": null,
|
|
86
|
-
"sources": [
|
|
87
|
-
"src/ln-translations.js"
|
|
88
|
-
],
|
|
89
|
-
"type": "json",
|
|
90
|
-
"fallback": "",
|
|
91
|
-
"description": "JSON dictionary of supported locale codes and display labels"
|
|
92
|
-
},
|
|
93
|
-
"data-ln-translations-placeholder": {
|
|
94
|
-
"direction": null,
|
|
95
|
-
"sources": [
|
|
96
|
-
"src/ln-translations.js"
|
|
97
|
-
],
|
|
98
|
-
"type": "string",
|
|
99
|
-
"fallback": "{lang} translation",
|
|
100
|
-
"description": "Placeholder label pattern for cloned translation inputs"
|
|
101
|
-
},
|
|
102
|
-
"data-ln-translations-prefix": {
|
|
103
|
-
"direction": "author",
|
|
104
|
-
"sources": [
|
|
105
|
-
"src/ln-translations.js"
|
|
106
|
-
],
|
|
107
|
-
"type": "string",
|
|
108
|
-
"description": "Prefix format pattern for cloned translated field names"
|
|
109
|
-
},
|
|
110
|
-
"data-ln-translations-remove-label": {
|
|
111
|
-
"direction": null,
|
|
112
|
-
"sources": [
|
|
113
|
-
"src/ln-translations.js"
|
|
114
|
-
],
|
|
115
|
-
"type": "string",
|
|
116
|
-
"fallback": "Remove {lang}",
|
|
117
|
-
"description": "Accessible label template for translation removal buttons"
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
}
|
|
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-translations",
|
|
4
|
+
"generator": "scripts/sync-ln-schemas.mjs",
|
|
5
|
+
"attributes": {
|
|
6
|
+
"data-ln-debug": {
|
|
7
|
+
"direction": null,
|
|
8
|
+
"sources": [
|
|
9
|
+
"ln-translations-dev.scss"
|
|
10
|
+
]
|
|
11
|
+
},
|
|
12
|
+
"data-ln-dropdown": {
|
|
13
|
+
"direction": "author",
|
|
14
|
+
"sources": [
|
|
15
|
+
"src/ln-translations.js"
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
"data-ln-toggle": {
|
|
19
|
+
"direction": "both",
|
|
20
|
+
"sources": [
|
|
21
|
+
"src/ln-translations.js"
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
"data-ln-translatable": {
|
|
25
|
+
"direction": "author",
|
|
26
|
+
"sources": [
|
|
27
|
+
"ln-translations-dev.scss",
|
|
28
|
+
"src/ln-translations.js"
|
|
29
|
+
],
|
|
30
|
+
"type": "marker",
|
|
31
|
+
"description": "Marks form control as translatable into multiple languages"
|
|
32
|
+
},
|
|
33
|
+
"data-ln-translatable-lang": {
|
|
34
|
+
"direction": "both",
|
|
35
|
+
"sources": [
|
|
36
|
+
"src/ln-translations.js"
|
|
37
|
+
],
|
|
38
|
+
"type": "string",
|
|
39
|
+
"description": "Language code assigned to specific translatable input instance"
|
|
40
|
+
},
|
|
41
|
+
"data-ln-translations": {
|
|
42
|
+
"direction": null,
|
|
43
|
+
"sources": [
|
|
44
|
+
"ln-translations-dev.scss",
|
|
45
|
+
"src/ln-translations.js"
|
|
46
|
+
],
|
|
47
|
+
"type": "marker",
|
|
48
|
+
"description": "Mounts multi-language translation manager on form container"
|
|
49
|
+
},
|
|
50
|
+
"data-ln-translations-active": {
|
|
51
|
+
"direction": "author",
|
|
52
|
+
"sources": [
|
|
53
|
+
"ln-translations-dev.scss",
|
|
54
|
+
"src/ln-translations.js"
|
|
55
|
+
],
|
|
56
|
+
"type": "marker",
|
|
57
|
+
"description": "Container holding active language badge tags"
|
|
58
|
+
},
|
|
59
|
+
"data-ln-translations-add": {
|
|
60
|
+
"direction": "author",
|
|
61
|
+
"sources": [
|
|
62
|
+
"src/ln-translations.js"
|
|
63
|
+
],
|
|
64
|
+
"type": "string",
|
|
65
|
+
"description": "Trigger button action to add specified language translation fields"
|
|
66
|
+
},
|
|
67
|
+
"data-ln-translations-default": {
|
|
68
|
+
"direction": null,
|
|
69
|
+
"sources": [
|
|
70
|
+
"src/ln-translations.js"
|
|
71
|
+
],
|
|
72
|
+
"type": "string",
|
|
73
|
+
"fallback": "",
|
|
74
|
+
"description": "Default primary language code (e.g. en)"
|
|
75
|
+
},
|
|
76
|
+
"data-ln-translations-lang": {
|
|
77
|
+
"direction": "both",
|
|
78
|
+
"sources": [
|
|
79
|
+
"src/ln-translations.js"
|
|
80
|
+
],
|
|
81
|
+
"type": "string",
|
|
82
|
+
"description": "Language code associated with active language badge"
|
|
83
|
+
},
|
|
84
|
+
"data-ln-translations-locales": {
|
|
85
|
+
"direction": null,
|
|
86
|
+
"sources": [
|
|
87
|
+
"src/ln-translations.js"
|
|
88
|
+
],
|
|
89
|
+
"type": "json",
|
|
90
|
+
"fallback": "",
|
|
91
|
+
"description": "JSON dictionary of supported locale codes and display labels"
|
|
92
|
+
},
|
|
93
|
+
"data-ln-translations-placeholder": {
|
|
94
|
+
"direction": null,
|
|
95
|
+
"sources": [
|
|
96
|
+
"src/ln-translations.js"
|
|
97
|
+
],
|
|
98
|
+
"type": "string",
|
|
99
|
+
"fallback": "{lang} translation",
|
|
100
|
+
"description": "Placeholder label pattern for cloned translation inputs"
|
|
101
|
+
},
|
|
102
|
+
"data-ln-translations-prefix": {
|
|
103
|
+
"direction": "author",
|
|
104
|
+
"sources": [
|
|
105
|
+
"src/ln-translations.js"
|
|
106
|
+
],
|
|
107
|
+
"type": "string",
|
|
108
|
+
"description": "Prefix format pattern for cloned translated field names"
|
|
109
|
+
},
|
|
110
|
+
"data-ln-translations-remove-label": {
|
|
111
|
+
"direction": null,
|
|
112
|
+
"sources": [
|
|
113
|
+
"src/ln-translations.js"
|
|
114
|
+
],
|
|
115
|
+
"type": "string",
|
|
116
|
+
"fallback": "Remove {lang}",
|
|
117
|
+
"description": "Accessible label template for translation removal buttons"
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
# ln-ui-coordinator
|
|
2
|
-
|
|
3
|
-
> Applied to a container element (`<main data-ln-ui-coordinator>`). It listens for clicks on `a[href^="#"]` hash anchors and window `hashchange` events to synchronize `[data-ln-modal]` dialogs with the URL hash, intercepts bubbling `ln-ajax:success`/`ln-ajax:error` and `ln-upload:error` events to dispatch `ln-toast:enqueue` notifications from server response envelopes, and clears the modal URL hash and closes active modals upon successful AJAX submit. Button triggers (`data-ln-modal-for`) are handled autonomously by `ln-modal`.
|
|
4
|
-
|
|
5
|
-
A minimal **Layer 2 Coordinator** that mediates URL hash navigation, modal lifecycle, and server toast notifications.
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## 1. Responsibilities
|
|
10
|
-
|
|
11
|
-
1. **Hash Navigation & URL Synchronization:** Listens for clicks on `a[href^="#"]` hash anchors and window `hashchange` events, dispatching `ln-modal:request-open` to matching dialogs. Listens to `ln-modal:close` to clean up the URL hash segment.
|
|
12
|
-
2. **AJAX Submit Mediation:** Catches `ln-ajax:success` events:
|
|
13
|
-
- Dispatches `ln-toast:enqueue` notifications when the server returns `{ message: ... }`.
|
|
14
|
-
- Closes the active modal (if submit originated inside a modal) and cleans URL hash (`hashSet(modal.id, null)`).
|
|
15
|
-
3. **Server Error Feedback:** Catches `ln-ajax:error` and `ln-upload:error`:
|
|
16
|
-
- Dispatches error toasts when the server returns an error message.
|
|
17
|
-
- Keeps modals open on error so form validation messages remain visible.
|
|
18
|
-
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
## 2. HTML Markup
|
|
22
|
-
|
|
23
|
-
```html
|
|
24
|
-
<main data-ln-ui-coordinator>
|
|
25
|
-
<!-- Triggers (button opens autonomously; hash anchor deep-links) -->
|
|
26
|
-
<button type="button" data-ln-modal-for="user-modal">New User</button>
|
|
27
|
-
<a href="#user-modal">Open User Modal</a>
|
|
28
|
-
|
|
29
|
-
<!-- Modal Dialog -->
|
|
30
|
-
<dialog class="ln-modal" data-ln-modal id="user-modal">
|
|
31
|
-
<form action="/api/users" method="POST" data-ln-ajax id="user-form">
|
|
32
|
-
<input type="text" name="name" required />
|
|
33
|
-
<button type="submit">Save</button>
|
|
34
|
-
<button type="button" data-ln-modal-close>Cancel</button>
|
|
35
|
-
</form>
|
|
36
|
-
</dialog>
|
|
37
|
-
</main>
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
---
|
|
41
|
-
|
|
42
|
-
## 3. Declarative Attributes
|
|
43
|
-
|
|
44
|
-
| Attribute | Element | Description |
|
|
45
|
-
|:---|:---|:---|
|
|
46
|
-
| `data-ln-ui-coordinator` | Container | Activates UI coordination for hash-routing, modal closing on AJAX success, and server toast dispatching. |
|
|
47
|
-
|
|
48
|
-
---
|
|
49
|
-
|
|
50
|
-
## 4. DOM Events
|
|
51
|
-
|
|
52
|
-
| Event | Direction | Target | Description |
|
|
53
|
-
|:---|:---|:---|:---|
|
|
54
|
-
| `ln-modal:request-open` | Emits | `<dialog>` | Requests panel opening on target `ln-modal` from URL hash routes. |
|
|
55
|
-
| `ln-modal:request-close` | Emits | `<dialog>` | Requests panel closing on target `ln-modal` upon AJAX success. |
|
|
56
|
-
| `ln-toast:enqueue` | Emits | `window` | Dispatched with server `{ type, title, message }` from response envelopes. |
|
|
57
|
-
| `click` | Listens | `document` | Intercepts `a[href^="#"]` hash navigation links. |
|
|
58
|
-
| `hashchange` | Listens | `window` | Synchronizes URL hash and active modals. |
|
|
59
|
-
| `ln-modal:close` | Listens | `document` | Cleans up modal hash segment when modal closes. |
|
|
60
|
-
| `ln-ajax:success` | Listens | `document` | Relays server message to toast, cleans modal URL hash, and closes parent modal. |
|
|
61
|
-
| `ln-ajax:error` | Listens | `document` | Relays server error message to toast while keeping modal open. |
|
|
62
|
-
| `ln-upload:error` | Listens | `document` | Relays server error message to toast. |
|
|
1
|
+
# ln-ui-coordinator
|
|
2
|
+
|
|
3
|
+
> Applied to a container element (`<main data-ln-ui-coordinator>`). It listens for clicks on `a[href^="#"]` hash anchors and window `hashchange` events to synchronize `[data-ln-modal]` dialogs with the URL hash, intercepts bubbling `ln-ajax:success`/`ln-ajax:error` and `ln-upload:error` events to dispatch `ln-toast:enqueue` notifications from server response envelopes, and clears the modal URL hash and closes active modals upon successful AJAX submit. Button triggers (`data-ln-modal-for`) are handled autonomously by `ln-modal`.
|
|
4
|
+
|
|
5
|
+
A minimal **Layer 2 Coordinator** that mediates URL hash navigation, modal lifecycle, and server toast notifications.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 1. Responsibilities
|
|
10
|
+
|
|
11
|
+
1. **Hash Navigation & URL Synchronization:** Listens for clicks on `a[href^="#"]` hash anchors and window `hashchange` events, dispatching `ln-modal:request-open` to matching dialogs. Listens to `ln-modal:close` to clean up the URL hash segment.
|
|
12
|
+
2. **AJAX Submit Mediation:** Catches `ln-ajax:success` events:
|
|
13
|
+
- Dispatches `ln-toast:enqueue` notifications when the server returns `{ message: ... }`.
|
|
14
|
+
- Closes the active modal (if submit originated inside a modal) and cleans URL hash (`hashSet(modal.id, null)`).
|
|
15
|
+
3. **Server Error Feedback:** Catches `ln-ajax:error` and `ln-upload:error`:
|
|
16
|
+
- Dispatches error toasts when the server returns an error message.
|
|
17
|
+
- Keeps modals open on error so form validation messages remain visible.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## 2. HTML Markup
|
|
22
|
+
|
|
23
|
+
```html
|
|
24
|
+
<main data-ln-ui-coordinator>
|
|
25
|
+
<!-- Triggers (button opens autonomously; hash anchor deep-links) -->
|
|
26
|
+
<button type="button" data-ln-modal-for="user-modal">New User</button>
|
|
27
|
+
<a href="#user-modal">Open User Modal</a>
|
|
28
|
+
|
|
29
|
+
<!-- Modal Dialog -->
|
|
30
|
+
<dialog class="ln-modal" data-ln-modal id="user-modal">
|
|
31
|
+
<form action="/api/users" method="POST" data-ln-ajax id="user-form">
|
|
32
|
+
<input type="text" name="name" required />
|
|
33
|
+
<button type="submit">Save</button>
|
|
34
|
+
<button type="button" data-ln-modal-close>Cancel</button>
|
|
35
|
+
</form>
|
|
36
|
+
</dialog>
|
|
37
|
+
</main>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## 3. Declarative Attributes
|
|
43
|
+
|
|
44
|
+
| Attribute | Element | Description |
|
|
45
|
+
|:---|:---|:---|
|
|
46
|
+
| `data-ln-ui-coordinator` | Container | Activates UI coordination for hash-routing, modal closing on AJAX success, and server toast dispatching. |
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## 4. DOM Events
|
|
51
|
+
|
|
52
|
+
| Event | Direction | Target | Description |
|
|
53
|
+
|:---|:---|:---|:---|
|
|
54
|
+
| `ln-modal:request-open` | Emits | `<dialog>` | Requests panel opening on target `ln-modal` from URL hash routes. |
|
|
55
|
+
| `ln-modal:request-close` | Emits | `<dialog>` | Requests panel closing on target `ln-modal` upon AJAX success. |
|
|
56
|
+
| `ln-toast:enqueue` | Emits | `window` | Dispatched with server `{ type, title, message }` from response envelopes. |
|
|
57
|
+
| `click` | Listens | `document` | Intercepts `a[href^="#"]` hash navigation links. |
|
|
58
|
+
| `hashchange` | Listens | `window` | Synchronizes URL hash and active modals. |
|
|
59
|
+
| `ln-modal:close` | Listens | `document` | Cleans up modal hash segment when modal closes. |
|
|
60
|
+
| `ln-ajax:success` | Listens | `document` | Relays server message to toast, cleans modal URL hash, and closes parent modal. |
|
|
61
|
+
| `ln-ajax:error` | Listens | `document` | Relays server error message to toast while keeping modal open. |
|
|
62
|
+
| `ln-upload:error` | Listens | `document` | Relays server error message to toast. |
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){"use strict";function L(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function y(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let r=null;for(let s=1;s<t.length;s++)if(t[s]&&t[s].nodeType===1){r=t[s];break}if(!y(r))return}e.apply(console,t)}}function h(e,t,n){const r=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,r),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:r}))}function p(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){p(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}const $={};function N(e,t){$[e]=t}function H(e){return $[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=N,window.lnCore.getDataMapper=H);function V(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,p(function(){new MutationObserver(function(){h(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const D={};function U(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];D[n]=t}function K(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return D[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=U,window.lnCore.getLocaleFallback=K,window.lnCore.ensureLocaleObserver=V);const A={};function Q(e,t){A[e]||(A[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=A[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function q(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let i=0;i<n.length;i++){const d=n[i],l=d.getAttribute("data-ln-field");t[l]!=null&&(d.textContent=t[l])}const r=e.querySelectorAll("[data-ln-attr]");for(let i=0;i<r.length;i++){const d=r[i],l=d.getAttribute("data-ln-attr").split(",");for(let c=0;c<l.length;c++){const a=l[c].trim().split(":");if(a.length!==2)continue;const u=a[0].trim(),f=a[1].trim();t[f]!=null&&d.setAttribute(u,t[f])}}const s=e.querySelectorAll("[data-ln-show]");for(let i=0;i<s.length;i++){const d=s[i],l=d.getAttribute("data-ln-show");l in t&&d.classList.toggle("hidden",!t[l])}const o=e.querySelectorAll("[data-ln-class]");for(let i=0;i<o.length;i++){const d=o[i],l=d.getAttribute("data-ln-class").split(",");for(let c=0;c<l.length;c++){const a=l[c].trim().split(":");if(a.length!==2)continue;const u=a[0].trim(),f=a[1].trim();f in t&&d.classList.toggle(u,!!t[f])}}return e}function G(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const n=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let r=0;r<n.length;r++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[r],t??null),n[r].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)q(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let n=0;n<t.length;n++)t[n].textContent=""}})));function I(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const o=n.currentNode;o.textContent.indexOf("{{")!==-1&&(o.textContent=o.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(i,d){return t[d]!==void 0?t[d]:""}))}const r=function(o,i){return t[i]!==void 0?t[i]:""},s=Array.from(e.querySelectorAll("*"));e.nodeType===1&&s.push(e);for(let o=0;o<s.length;o++){const i=s[o],d=i.attributes;for(let l=0;l<d.length;l++){const c=d[l];c.value.indexOf("{{")!==-1&&i.setAttribute(c.name,c.value.replace(/\{\{\s*(\w+)\s*\}\}/g,r))}}return e}function J(e,t,n,r,s,o){const i={};for(let l=0;l<e.children.length;l++){const c=e.children[l],a=c.getAttribute("data-ln-render-key");a&&(i[a]=c)}const d=document.createDocumentFragment();for(let l=0;l<t.length;l++){const c=t[l],a=String(r(c));let u=i[a];if(u)s(u,c,l);else{const f=Q(n,o);if(!f||(I(f,c),u=f.firstElementChild,!u))continue;u.setAttribute("data-ln-render-key",a),s(u,c,l)}d.appendChild(u)}e.textContent="",e.appendChild(d)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=I,window.lnCore.fill=q,window.lnCore.lnFill=G,window.lnCore.renderList=J);function M(e,t,n,r,s){if(!e||t===null)return!0;const o=r||"ln-component",i=e.type;if(i==="trigger"||i==="marker"||i==="string"||i==="list"||!i||t===""&&e.fallback!==void 0)return!0;const d=l=>{s?console.warn(l,s):console.warn(l)};if(i==="boolean"){const l=t.trim().toLowerCase();return l!==""&&l!=="true"&&l!=="false"&&l!=="1"&&l!=="0"?(d(`[${o}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(i==="enum"){const l=e.values||[];return l.includes(t)?!0:(d(`[${o}] Invalid value "${t}" for attribute "${n}". Allowed: ${l.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(i==="integer"){if(!/^-?\d+$/.test(t))return d(`[${o}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const l=parseInt(t,10);return e.min!==void 0&&l<e.min?(d(`[${o}] Value ${l} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&l>e.max?(d(`[${o}] Value ${l} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(i==="float")return isNaN(Number(t))?(d(`[${o}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(i==="json")try{return JSON.parse(t),!0}catch(l){return d(`[${o}] Invalid JSON for attribute "${n}": ${l.message}. Fallback: ${e.fallback}.`),!1}return!0}function P(e){const t={};for(const n in e){const r=e[n];r&&r.effect&&(t[n]=r.effect)}return Object.keys(t).length?t:null}function X(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const n in e.effects)t.add(n);if(e.onAttrChange&&e.declared)for(const n of e.declared)t.add(n);return t}function _(e,t,n,r){if(e.nodeType!==1)return;const o=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",i=Array.from(e.querySelectorAll(o));e.matches&&e.matches(o)&&i.push(e);for(const d of i)if(!d[n]){window.lnCore._persistSink&&d.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(d,t);try{d[n]=new r(d)}catch(l){console.error("["+n+"] init failed",d,l)}}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function z(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function Y(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function T(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function Z(e){const t=T(),n=e.observed||[];for(let r=0;r<n.length;r++){const s=n[r];t.byAttr.has(s)||t.byAttr.set(s,[]),t.byAttr.get(s).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const r in e.attributes){t.byDeclaredAttr.has(r)||t.byDeclaredAttr.set(r,[]);const s=t.byDeclaredAttr.get(r);s.some(o=>o.componentTag===e.componentTag)||s.push({spec:e.attributes[r],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const r=X(e);if(r===null)t.reactiveWildcard.push(e);else for(const s of r)t.byReactive.has(s)||t.byReactive.set(s,[]),t.byReactive.get(s).push(e)}e.persist&&t.persist.push(e)}function R(e,t,n,r){for(let s=0;s<e.length;s++){const o=e[s];if(!t[o.attribute])continue;const i=o.effects&&o.effects[n];i?i(t,n,r):o.onAttrChange&&(!o.declared||o.declared.has(n))&&o.onAttrChange(t,n,r)}}function ee(e){const t=e.target,n=e.attributeName;if(e.oldValue===t.getAttribute(n))return;const r=T(),s=r.byAttr.get(n);if(L()&&r.byDeclaredAttr&&r.byDeclaredAttr.has(n)&&y(t)){const o=r.byDeclaredAttr.get(n),i=t.getAttribute(n);for(let d=0;d<o.length;d++)M(o[d].spec,i,n,o[d].componentTag,t)}if(window.lnCore._debugSink&&(n.indexOf("data-ln-")===0||s)&&window.lnCore._debugSink("attr",n,t,{oldValue:e.oldValue,newValue:t.getAttribute(n)}),n.indexOf("data-ln-")===0){const o=r.byReactive.get(n);o&&R(o,t,n,e.oldValue),r.reactiveWildcard.length&&R(r.reactiveWildcard,t,n,e.oldValue)}if(s)for(let o=0;o<s.length;o++){const i=s[o];if(i.handler){i.handler(t,n,e.oldValue);continue}i.onAttributeChange&&t[i.attribute]?i.onAttributeChange(t,n):(_(t,i.selector,i.attribute,i.ComponentFn),i.onInit&&i.onInit(t))}}function te(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,p(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{ee(t[n])}catch(r){console.error("[ln-core] mutation handler failed",t[n].target,r)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function B(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function ne(e){const t=B();if(t.length){if(e.target)for(let n=0;n<t.length;n++){const r=t[n];if(r.onSubtreeChange){const s=r.query,o=e.target.nodeType===1?e.target.matches(s)?e.target:e.target.closest(s):e.target.parentElement?e.target.parentElement.closest(s):null;o&&r.onSubtreeChange(o,e)}}for(let n=0;n<e.addedNodes.length;n++){const r=e.addedNodes[n];if(r.nodeType===1)for(let s=0;s<t.length;s++){const o=t[s];_(r,o.selector,o.attribute,o.ComponentFn),o.onInit&&o.onInit(r)}}for(let n=0;n<e.removedNodes.length;n++){const r=e.removedNodes[n];if(r.nodeType===1)for(let s=0;s<t.length;s++){const o=t[s],i=o.query,d=Array.from(r.querySelectorAll(i));r.matches&&r.matches(i)&&d.push(r);for(let l=0;l<d.length;l++){const c=d[l];if(!document.contains(c)){const a=c[o.attribute];if(a&&typeof a.destroy=="function")try{a.destroy()}catch(u){console.error("["+o.attribute+"] destroy failed",c,u)}delete c[o.attribute]}}}}}}function oe(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,p(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++){const r=t[n];if(r.type==="childList")try{ne(r)}catch(s){console.error("[ln-core] lifecycle handler failed",r.target,s)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function re(e,t,n,r,s={}){const o=s.extraAttributes||[],i=s.onAttributeChange||null,d=s.onSubtreeChange||null,l=s.onInit||null,c=s.onAttrChange||null,a=s.effects||null,u=s.attributes||null,f=u?P(u):a,ae=u?new Set(Object.keys(u)):null,ue=s.persist||null;function m(k){const w=k||document.body;if(_(w,e,t,n),u&&L())for(const g in u){const we=u[g],O=Array.from(w.querySelectorAll("["+g+"]"));w.matches&&w.matches("["+g+"]")&&O.push(w);for(let E=0;E<O.length;E++){const x=O[E];y(x)&&M(we,x.getAttribute(g),g,r,x)}}l&&l(w)}const S=[];if(e.indexOf("[")!==-1){const k=/\[([\w-]+)/g;let w;for(;(w=k.exec(e))!==null;)S.push(w[1])}else S.push(e);Z({selector:e,attribute:t,componentTag:r,attributes:u,ComponentFn:n,onInit:l,observed:S.concat(o),onAttributeChange:i,onAttrChange:c,effects:f,declared:ae,persist:ue}),te();const fe=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1?e:"["+e+"]";B().push({selector:e,attribute:t,ComponentFn:n,onInit:l,onSubtreeChange:d,query:fe}),oe(),window[t]=m;function W(){z()>0?Y(function(){m(document.body)}):m(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",W):W(),m}function F(e){return(e||"").replace(/^#/,"")}function b(e){const t=e===void 0?location.hash:e,n={},r=F(t);if(!r)return n;const s=r.split("&");for(let o=0;o<s.length;o++){const i=s[o];if(!i)continue;const d=i.indexOf(":"),l=d>-1?i.slice(0,d):i,c=d>-1?i.slice(d+1):"";if(l)try{n[l]=decodeURIComponent(c)}catch{n[l]=c}}return n}function v(e){if(!e)return null;const t=b();return e in t?t[e]:null}function C(e,t){if(!e)return;const n=b();t==null?delete n[e]:n[e]=String(t);const s=Object.keys(n).map(function(o){const i=n[o];return i===""?o:o+":"+encodeURIComponent(i)}).join("&");F(location.hash)!==s&&(location.hash=s)}function j(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function ie(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const n=e.getAttribute("data-ln-hash");if(n&&n.trim()!=="")return n.trim();const r=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return r?t?r+"-"+t:r:t||null}function le(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function se(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function de(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function ce(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),r=e.slice(t+1),s=r?r.split(",").map(function(o){try{return decodeURIComponent(o)}catch{return o}}).filter(Boolean):[];return{key:n,values:s}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=b,window.lnCore.hashGet=v,window.lnCore.hashSet=C,window.lnCore.hashLinkClick=j,window.lnCore.resolveHashNamespace=ie,window.lnCore.hashSortEncode=le,window.lnCore.hashSortDecode=se,window.lnCore.hashFilterEncode=de,window.lnCore.hashFilterDecode=ce),(function(){const e="data-ln-ui-coordinator",t="lnUiCoordinator";if(window[t]!==void 0)return;const n={"data-ln-ui-coordinator":{type:"marker",description:"Mounts UI coordinator mediating global hash-routing, modals, and toasts"}};document.addEventListener("click",function(o){if(o.ctrlKey||o.metaKey||o.button===1)return;const i=o.target.closest('a[href^="#"]');if(!i)return;const d=i.getAttribute("href"),l=b(d);for(const c in l){const a=document.getElementById(c);if(a&&a.lnModal){if(!j(o))return;C(c,l[c]),a.lnModal.isOpen||h(a,"ln-modal:request-open",{});return}}});function r(){const o=location.hash;if(!o)return;const i=b(o);for(const d in i){const l=document.getElementById(d);l&&l.lnModal&&!l.lnModal.isOpen&&h(l,"ln-modal:request-open",{})}}window.addEventListener("hashchange",r),document.readyState==="loading"?document.addEventListener("DOMContentLoaded",r):r(),document.addEventListener("ln-modal:close",function(o){const i=o.target;i&&i.id&&v(i.id)!==null&&C(i.id,null)}),document.addEventListener("ln-ajax:success",function(o){const d=(o.detail||{}).data;if(d&&d.message){const c=d.message;h(window,"ln-toast:enqueue",{type:c.type||"success",title:c.title||"",message:typeof c=="string"?c:c.body||""})}const l=o.target.closest("[data-ln-modal]");l&&l.lnModal&&(l.id&&v(l.id)!==null&&C(l.id,null),h(l,"ln-modal:request-close",{}))}),document.addEventListener("ln-ajax:error",function(o){const d=(o.detail||{}).data;if(d&&d.message){const l=d.message;h(window,"ln-toast:enqueue",{type:l.type||"error",title:l.title||"",message:typeof l=="string"?l:l.body||""})}}),document.addEventListener("ln-upload:error",function(o){const i=o.detail||{};i.message&&h(window,"ln-toast:enqueue",{type:"error",title:"",message:i.message})});function s(o){return this.dom=o,this}s.prototype.destroy=function(){delete this.dom[t]},re(e,t,s,"ln-ui-coordinator",{attributes:n})})()})();
|
|
1
|
+
(function(){"use strict";function L(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function y(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let r=null;for(let s=1;s<t.length;s++)if(t[s]&&t[s].nodeType===1){r=t[s];break}if(!y(r))return}e.apply(console,t)}}function h(e,t,n){const r=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,r),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:r}))}function p(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){p(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}const D={};function N(e,t){D[e]=t}function U(e){return D[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=N,window.lnCore.getDataMapper=U);function H(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,p(function(){new MutationObserver(function(){h(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const $={};function V(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];$[n]=t}function K(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return $[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=V,window.lnCore.getLocaleFallback=K,window.lnCore.ensureLocaleObserver=H);const A={};function Q(e,t){A[e]||(A[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=A[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function I(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let i=0;i<n.length;i++){const d=n[i],l=d.getAttribute("data-ln-field");t[l]!=null&&(d.textContent=t[l])}const r=e.querySelectorAll("[data-ln-attr]");for(let i=0;i<r.length;i++){const d=r[i],l=d.getAttribute("data-ln-attr").split(",");for(let c=0;c<l.length;c++){const a=l[c].trim().split(":");if(a.length!==2)continue;const u=a[0].trim(),f=a[1].trim();t[f]!=null&&d.setAttribute(u,t[f])}}const s=e.querySelectorAll("[data-ln-show]");for(let i=0;i<s.length;i++){const d=s[i],l=d.getAttribute("data-ln-show");l in t&&d.classList.toggle("hidden",!t[l])}const o=e.querySelectorAll("[data-ln-class]");for(let i=0;i<o.length;i++){const d=o[i],l=d.getAttribute("data-ln-class").split(",");for(let c=0;c<l.length;c++){const a=l[c].trim().split(":");if(a.length!==2)continue;const u=a[0].trim(),f=a[1].trim();f in t&&d.classList.toggle(u,!!t[f])}}return e}function G(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const n=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let r=0;r<n.length;r++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[r],t??null),n[r].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)I(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let n=0;n<t.length;n++)t[n].textContent=""}})));function M(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const o=n.currentNode;o.textContent.indexOf("{{")!==-1&&(o.textContent=o.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(i,d){return t[d]!==void 0?t[d]:""}))}const r=function(o,i){return t[i]!==void 0?t[i]:""},s=Array.from(e.querySelectorAll("*"));e.nodeType===1&&s.push(e);for(let o=0;o<s.length;o++){const i=s[o],d=i.attributes;for(let l=0;l<d.length;l++){const c=d[l];c.value.indexOf("{{")!==-1&&i.setAttribute(c.name,c.value.replace(/\{\{\s*(\w+)\s*\}\}/g,r))}}return e}function J(e,t,n,r,s,o){const i={};for(let l=0;l<e.children.length;l++){const c=e.children[l],a=c.getAttribute("data-ln-render-key");a&&(i[a]=c)}const d=document.createDocumentFragment();for(let l=0;l<t.length;l++){const c=t[l],a=String(r(c));let u=i[a];if(u)s(u,c,l);else{const f=Q(n,o);if(!f||(M(f,c),u=f.firstElementChild,!u))continue;u.setAttribute("data-ln-render-key",a),s(u,c,l)}d.appendChild(u)}e.textContent="",e.appendChild(d)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=M,window.lnCore.fill=I,window.lnCore.lnFill=G,window.lnCore.renderList=J);function q(e,t,n,r,s){if(!e||t===null)return!0;const o=r||"ln-component",i=e.type;if(i==="trigger"||i==="marker"||i==="string"||i==="list"||!i||t===""&&e.fallback!==void 0)return!0;const d=l=>{s?console.warn(l,s):console.warn(l)};if(i==="boolean"){const l=t.trim().toLowerCase();return l!==""&&l!=="true"&&l!=="false"&&l!=="1"&&l!=="0"?(d(`[${o}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(i==="enum"){const l=e.values||[];return l.includes(t)?!0:(d(`[${o}] Invalid value "${t}" for attribute "${n}". Allowed: ${l.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(i==="integer"){if(!/^-?\d+$/.test(t))return d(`[${o}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const l=parseInt(t,10);return e.min!==void 0&&l<e.min?(d(`[${o}] Value ${l} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&l>e.max?(d(`[${o}] Value ${l} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(i==="float")return isNaN(Number(t))?(d(`[${o}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(i==="json")try{return JSON.parse(t),!0}catch(l){return d(`[${o}] Invalid JSON for attribute "${n}": ${l.message}. Fallback: ${e.fallback}.`),!1}return!0}function P(e){const t={};for(const n in e){const r=e[n];r&&r.effect&&(t[n]=r.effect)}return Object.keys(t).length?t:null}function X(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const n in e.effects)t.add(n);if(e.onAttrChange&&e.declared)for(const n of e.declared)t.add(n);return t}function x(e,t,n,r){if(e.nodeType!==1)return;const o=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",i=Array.from(e.querySelectorAll(o));e.matches&&e.matches(o)&&i.push(e);for(const d of i)if(!d[n]){window.lnCore._persistSink&&d.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(d,t);try{d[n]=new r(d)}catch(l){console.error("["+n+"] init failed",d,l)}}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function z(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function Y(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function T(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function Z(e){const t=T(),n=e.observed||[];for(let r=0;r<n.length;r++){const s=n[r];t.byAttr.has(s)||t.byAttr.set(s,[]),t.byAttr.get(s).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const r in e.attributes){t.byDeclaredAttr.has(r)||t.byDeclaredAttr.set(r,[]);const s=t.byDeclaredAttr.get(r);s.some(o=>o.componentTag===e.componentTag)||s.push({spec:e.attributes[r],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const r=X(e);if(r===null)t.reactiveWildcard.push(e);else for(const s of r)t.byReactive.has(s)||t.byReactive.set(s,[]),t.byReactive.get(s).push(e)}e.persist&&t.persist.push(e)}function R(e,t,n,r){for(let s=0;s<e.length;s++){const o=e[s];if(!t[o.attribute])continue;const i=o.effects&&o.effects[n];i?i(t,n,r):o.onAttrChange&&(!o.declared||o.declared.has(n))&&o.onAttrChange(t,n,r)}}function ee(e){const t=e.target,n=e.attributeName;if(e.oldValue===t.getAttribute(n))return;const r=T(),s=r.byAttr.get(n);if(L()&&r.byDeclaredAttr&&r.byDeclaredAttr.has(n)&&y(t)){const o=r.byDeclaredAttr.get(n),i=t.getAttribute(n);for(let d=0;d<o.length;d++)q(o[d].spec,i,n,o[d].componentTag,t)}if(window.lnCore._debugSink&&(n.indexOf("data-ln-")===0||s)&&window.lnCore._debugSink("attr",n,t,{oldValue:e.oldValue,newValue:t.getAttribute(n)}),n.indexOf("data-ln-")===0){const o=r.byReactive.get(n);o&&R(o,t,n,e.oldValue),r.reactiveWildcard.length&&R(r.reactiveWildcard,t,n,e.oldValue)}if(s)for(let o=0;o<s.length;o++){const i=s[o];if(i.handler){i.handler(t,n,e.oldValue);continue}i.onAttributeChange&&t[i.attribute]?i.onAttributeChange(t,n):(x(t,i.selector,i.attribute,i.ComponentFn),i.onInit&&i.onInit(t))}}function te(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,p(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{ee(t[n])}catch(r){console.error("[ln-core] mutation handler failed",t[n].target,r)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function B(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function ne(e){const t=B();if(t.length){if(e.target)for(let n=0;n<t.length;n++){const r=t[n];if(r.onSubtreeChange){const s=r.query,o=e.target.nodeType===1?e.target.matches(s)?e.target:e.target.closest(s):e.target.parentElement?e.target.parentElement.closest(s):null;o&&r.onSubtreeChange(o,e)}}for(let n=0;n<e.addedNodes.length;n++){const r=e.addedNodes[n];if(r.nodeType===1)for(let s=0;s<t.length;s++){const o=t[s];x(r,o.selector,o.attribute,o.ComponentFn),o.onInit&&o.onInit(r)}}for(let n=0;n<e.removedNodes.length;n++){const r=e.removedNodes[n];if(r.nodeType===1)for(let s=0;s<t.length;s++){const o=t[s],i=o.query,d=Array.from(r.querySelectorAll(i));r.matches&&r.matches(i)&&d.push(r);for(let l=0;l<d.length;l++){const c=d[l];if(!document.contains(c)){const a=c[o.attribute];if(a&&typeof a.destroy=="function")try{a.destroy()}catch(u){console.error("["+o.attribute+"] destroy failed",c,u)}delete c[o.attribute]}}}}}}function oe(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,p(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++){const r=t[n];if(r.type==="childList")try{ne(r)}catch(s){console.error("[ln-core] lifecycle handler failed",r.target,s)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function re(e,t,n,r,s={}){const o=s.extraAttributes||[],i=s.onAttributeChange||null,d=s.onSubtreeChange||null,l=s.onInit||null,c=s.onAttrChange||null,a=s.effects||null,u=s.attributes||null,f=u?P(u):a,ue=u?new Set(Object.keys(u)):null,fe=s.persist||null;function m(S){const w=S||document.body;if(x(w,e,t,n),u&&L())for(const g in u){const he=u[g],k=Array.from(w.querySelectorAll("["+g+"]"));w.matches&&w.matches("["+g+"]")&&k.push(w);for(let O=0;O<k.length;O++){const E=k[O];y(E)&&q(he,E.getAttribute(g),g,r,E)}}l&&l(w)}const _=[];if(e.indexOf("[")!==-1){const S=/\[([\w-]+)/g;let w;for(;(w=S.exec(e))!==null;)_.push(w[1])}else _.push(e);Z({selector:e,attribute:t,componentTag:r,attributes:u,ComponentFn:n,onInit:l,observed:_.concat(o),onAttributeChange:i,onAttrChange:c,effects:f,declared:ue,persist:fe}),te();const we=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1?e:"["+e+"]";B().push({selector:e,attribute:t,ComponentFn:n,onInit:l,onSubtreeChange:d,query:we}),oe(),window[t]=m;function W(){z()>0?Y(function(){m(document.body)}):m(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",W):W(),m}function F(e){return(e||"").replace(/^#/,"")}function b(e){const t=e===void 0?location.hash:e,n={},r=F(t);if(!r)return n;const s=r.split("&");for(let o=0;o<s.length;o++){const i=s[o];if(!i)continue;const d=i.indexOf(":"),l=d>-1?i.slice(0,d):i,c=d>-1?i.slice(d+1):"";if(l)try{n[l]=decodeURIComponent(c)}catch{n[l]=c}}return n}function v(e){if(!e)return null;const t=b();return e in t?t[e]:null}function C(e,t){if(!e)return;const n=b();t==null?delete n[e]:n[e]=String(t);const s=Object.keys(n).map(function(o){const i=n[o];return i===""?o:o+":"+encodeURIComponent(i)}).join("&");F(location.hash)!==s&&(location.hash=s)}function j(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function ie(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const n=e.getAttribute("data-ln-hash");if(n&&n.trim()!=="")return n.trim();const r=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return r?t?r+"-"+t:r:t||null}function le(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function se(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function de(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function ce(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),r=e.slice(t+1),s=r?r.split(",").map(function(o){try{return decodeURIComponent(o)}catch{return o}}).filter(Boolean):[];return{key:n,values:s}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=b,window.lnCore.hashGet=v,window.lnCore.hashSet=C,window.lnCore.hashLinkClick=j,window.lnCore.resolveHashNamespace=ie,window.lnCore.hashSortEncode=le,window.lnCore.hashSortDecode=se,window.lnCore.hashFilterEncode=de,window.lnCore.hashFilterDecode=ce);function ae(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=ae),(function(){const e="data-ln-ui-coordinator",t="lnUiCoordinator";if(window[t]!==void 0)return;const n={"data-ln-ui-coordinator":{type:"marker",description:"Mounts UI coordinator mediating global hash-routing, modals, and toasts"}};document.addEventListener("click",function(o){if(o.ctrlKey||o.metaKey||o.button===1)return;const i=o.target.closest('a[href^="#"]');if(!i)return;const d=i.getAttribute("href"),l=b(d);for(const c in l){const a=document.getElementById(c);if(a&&a.lnModal){if(!j(o))return;C(c,l[c]),a.lnModal.isOpen||h(a,"ln-modal:request-open",{});return}}});function r(){const o=location.hash;if(!o)return;const i=b(o);for(const d in i){const l=document.getElementById(d);l&&l.lnModal&&!l.lnModal.isOpen&&h(l,"ln-modal:request-open",{})}}window.addEventListener("hashchange",r),document.readyState==="loading"?document.addEventListener("DOMContentLoaded",r):r(),document.addEventListener("ln-modal:close",function(o){const i=o.target;i&&i.id&&v(i.id)!==null&&C(i.id,null)}),document.addEventListener("ln-ajax:success",function(o){const d=(o.detail||{}).data;if(d&&d.message){const c=d.message;h(window,"ln-toast:enqueue",{type:c.type||"success",title:c.title||"",message:typeof c=="string"?c:c.body||""})}const l=o.target.closest("[data-ln-modal]");l&&l.lnModal&&(l.id&&v(l.id)!==null&&C(l.id,null),h(l,"ln-modal:request-close",{}))}),document.addEventListener("ln-ajax:error",function(o){const d=(o.detail||{}).data;if(d&&d.message){const l=d.message;h(window,"ln-toast:enqueue",{type:l.type||"error",title:l.title||"",message:typeof l=="string"?l:l.body||""})}}),document.addEventListener("ln-upload:error",function(o){const i=o.detail||{};i.message&&h(window,"ln-toast:enqueue",{type:"error",title:"",message:i.message})});function s(o){return this.dom=o,this}s.prototype.destroy=function(){delete this.dom[t]},re(e,t,s,"ln-ui-coordinator",{attributes:n})})()})();
|
|
@@ -1,28 +1,28 @@
|
|
|
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-ui-coordinator",
|
|
4
|
-
"generator": "scripts/sync-ln-schemas.mjs",
|
|
5
|
-
"attributes": {
|
|
6
|
-
"data-ln-debug": {
|
|
7
|
-
"direction": null,
|
|
8
|
-
"sources": [
|
|
9
|
-
"ln-ui-coordinator-dev.scss"
|
|
10
|
-
]
|
|
11
|
-
},
|
|
12
|
-
"data-ln-modal": {
|
|
13
|
-
"direction": "author",
|
|
14
|
-
"sources": [
|
|
15
|
-
"src/ln-ui-coordinator.js"
|
|
16
|
-
]
|
|
17
|
-
},
|
|
18
|
-
"data-ln-ui-coordinator": {
|
|
19
|
-
"direction": null,
|
|
20
|
-
"sources": [
|
|
21
|
-
"ln-ui-coordinator-dev.scss",
|
|
22
|
-
"src/ln-ui-coordinator.js"
|
|
23
|
-
],
|
|
24
|
-
"type": "marker",
|
|
25
|
-
"description": "Mounts UI coordinator mediating global hash-routing, modals, and toasts"
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
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-ui-coordinator",
|
|
4
|
+
"generator": "scripts/sync-ln-schemas.mjs",
|
|
5
|
+
"attributes": {
|
|
6
|
+
"data-ln-debug": {
|
|
7
|
+
"direction": null,
|
|
8
|
+
"sources": [
|
|
9
|
+
"ln-ui-coordinator-dev.scss"
|
|
10
|
+
]
|
|
11
|
+
},
|
|
12
|
+
"data-ln-modal": {
|
|
13
|
+
"direction": "author",
|
|
14
|
+
"sources": [
|
|
15
|
+
"src/ln-ui-coordinator.js"
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
"data-ln-ui-coordinator": {
|
|
19
|
+
"direction": null,
|
|
20
|
+
"sources": [
|
|
21
|
+
"ln-ui-coordinator-dev.scss",
|
|
22
|
+
"src/ln-ui-coordinator.js"
|
|
23
|
+
],
|
|
24
|
+
"type": "marker",
|
|
25
|
+
"description": "Mounts UI coordinator mediating global hash-routing, modals, and toasts"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|