@livenetworks/ashlar 1.6.1 → 2.0.1

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.
Files changed (559) hide show
  1. package/LICENSE +641 -0
  2. package/README.md +190 -86
  3. package/{js → components}/COMPONENTS.md +1116 -1108
  4. package/{js → components}/index.js +81 -58
  5. package/{js → components}/ln-accordion/README.md +7 -6
  6. package/components/ln-accordion/ln-accordion-dev.scss +8 -0
  7. package/components/ln-accordion/ln-accordion.js +1 -0
  8. package/components/ln-accordion/ln-accordion.schema.json +30 -0
  9. package/components/ln-accordion/ln-accordion.scss +8 -0
  10. package/{js → components}/ln-accordion/src/ln-accordion.js +8 -2
  11. package/{js → components}/ln-ajax/README.md +171 -160
  12. package/components/ln-ajax/ln-ajax-dev.scss +8 -0
  13. package/components/ln-ajax/ln-ajax.js +1 -0
  14. package/components/ln-ajax/ln-ajax.schema.json +30 -0
  15. package/{js → components}/ln-ajax/src/ln-ajax.js +65 -30
  16. package/{js → components}/ln-api-connector/README.md +27 -5
  17. package/components/ln-api-connector/ln-api-connector.js +1 -0
  18. package/components/ln-api-connector/ln-api-connector.schema.json +96 -0
  19. package/components/ln-api-connector/src/connector-core.js +97 -0
  20. package/components/ln-api-connector/src/ln-api-connector.js +447 -0
  21. package/{js → components}/ln-api-queue/README.md +12 -9
  22. package/components/ln-api-queue/ln-api-queue.js +1 -0
  23. package/components/ln-api-queue/ln-api-queue.schema.json +34 -0
  24. package/{js → components}/ln-api-queue/src/ln-api-queue.js +33 -14
  25. package/{js → components}/ln-api-queue/src/queue-storage.js +7 -3
  26. package/{js → components}/ln-autoresize/README.md +129 -127
  27. package/components/ln-autoresize/ln-autoresize-dev.scss +8 -0
  28. package/components/ln-autoresize/ln-autoresize.js +1 -0
  29. package/components/ln-autoresize/ln-autoresize.schema.json +22 -0
  30. package/{js → components}/ln-autoresize/src/ln-autoresize.js +8 -1
  31. package/{js → components}/ln-autosave/README.md +127 -124
  32. package/components/ln-autosave/ln-autosave-dev.scss +13 -0
  33. package/components/ln-autosave/ln-autosave.js +1 -0
  34. package/components/ln-autosave/ln-autosave.schema.json +48 -0
  35. package/components/ln-autosave/src/autosave-model.js +34 -0
  36. package/{js → components}/ln-autosave/src/ln-autosave.js +65 -58
  37. package/components/ln-chart/README.md +145 -0
  38. package/components/ln-chart/ln-chart-dev.scss +20 -0
  39. package/components/ln-chart/ln-chart.js +1 -0
  40. package/components/ln-chart/ln-chart.schema.json +146 -0
  41. package/components/ln-chart/ln-chart.scss +8 -0
  42. package/components/ln-chart/src/chart-model.js +154 -0
  43. package/components/ln-chart/src/ln-chart.js +176 -0
  44. package/{js → components}/ln-circular-progress/README.md +15 -14
  45. package/components/ln-circular-progress/ln-circular-progress-dev.scss +8 -0
  46. package/components/ln-circular-progress/ln-circular-progress.js +1 -0
  47. package/components/ln-circular-progress/ln-circular-progress.schema.json +42 -0
  48. package/{js → components}/ln-circular-progress/src/ln-circular-progress.js +32 -50
  49. package/{js → components}/ln-confirm/README.md +69 -18
  50. package/components/ln-confirm/ln-confirm-dev.scss +24 -0
  51. package/components/ln-confirm/ln-confirm.js +1 -0
  52. package/components/ln-confirm/ln-confirm.schema.json +66 -0
  53. package/components/ln-confirm/ln-confirm.scss +24 -0
  54. package/{js → components}/ln-confirm/src/ln-confirm.js +180 -171
  55. package/{js → components}/ln-core/README.md +374 -149
  56. package/components/ln-core/attrs.js +273 -0
  57. package/components/ln-core/compare.js +40 -0
  58. package/components/ln-core/crypto.js +265 -0
  59. package/components/ln-core/date.js +50 -0
  60. package/components/ln-core/dom.js +115 -0
  61. package/components/ln-core/events.js +122 -0
  62. package/components/ln-core/form.js +136 -0
  63. package/{js → components}/ln-core/hash.js +149 -92
  64. package/components/ln-core/helpers.js +33 -0
  65. package/components/ln-core/http.js +48 -0
  66. package/components/ln-core/index.js +11 -0
  67. package/components/ln-core/lifecycle.js +403 -0
  68. package/components/ln-core/ln-core.schema.json +109 -0
  69. package/components/ln-core/locale.js +55 -0
  70. package/components/ln-core/matching.js +78 -0
  71. package/components/ln-core/number.js +125 -0
  72. package/components/ln-core/progress.js +30 -0
  73. package/components/ln-core/template.js +206 -0
  74. package/{js → components}/ln-core/window-cache.js +247 -213
  75. package/{js → components}/ln-couchdb-connector/README.md +7 -5
  76. package/components/ln-couchdb-connector/ln-couchdb-connector.js +1 -0
  77. package/components/ln-couchdb-connector/ln-couchdb-connector.schema.json +50 -0
  78. package/{js → components}/ln-couchdb-connector/src/ln-couchdb-connector.js +29 -43
  79. package/{js → components}/ln-data-coordinator/README.md +109 -73
  80. package/components/ln-data-coordinator/ln-data-coordinator-dev.scss +8 -0
  81. package/components/ln-data-coordinator/ln-data-coordinator.js +1 -0
  82. package/components/ln-data-coordinator/ln-data-coordinator.schema.json +196 -0
  83. package/components/ln-data-coordinator/src/data-read-policy.js +41 -0
  84. package/{js → components}/ln-data-coordinator/src/ln-data-coordinator.js +411 -154
  85. package/{js → components}/ln-data-coordinator/src/mutation-receipts.js +0 -5
  86. package/{js → components}/ln-data-store/README.md +42 -17
  87. package/components/ln-data-store/ln-data-store-dev.scss +13 -0
  88. package/components/ln-data-store/ln-data-store.js +1 -0
  89. package/components/ln-data-store/ln-data-store.schema.json +84 -0
  90. package/components/ln-data-store/src/data-store-model.js +155 -0
  91. package/{js → components}/ln-data-store/src/ln-data-store.js +407 -105
  92. package/components/ln-data-store/src/window-index.js +119 -0
  93. package/{js → components}/ln-date/README.md +17 -7
  94. package/{js → components}/ln-date/ln-date-dev.scss +14 -14
  95. package/components/ln-date/ln-date.js +1 -0
  96. package/components/ln-date/ln-date.schema.json +92 -0
  97. package/components/ln-date/src/date-model.js +186 -0
  98. package/components/ln-date/src/ln-date.js +486 -0
  99. package/components/ln-debug/README.md +132 -0
  100. package/components/ln-debug/ln-debug.js +1 -0
  101. package/components/ln-debug/ln-debug.schema.json +28 -0
  102. package/components/ln-debug/src/console-sink.js +19 -0
  103. package/components/ln-debug/src/debug-verifier.js +331 -0
  104. package/components/ln-debug/src/gate.js +95 -0
  105. package/components/ln-debug/src/generated-attributes.js +299 -0
  106. package/components/ln-debug/src/ln-debug.js +60 -0
  107. package/{js → components}/ln-dropdown/README.md +150 -140
  108. package/components/ln-dropdown/ln-dropdown-dev.scss +13 -0
  109. package/components/ln-dropdown/ln-dropdown.js +1 -0
  110. package/components/ln-dropdown/ln-dropdown.schema.json +90 -0
  111. package/components/ln-dropdown/ln-dropdown.scss +18 -0
  112. package/{js → components}/ln-dropdown/src/ln-dropdown.js +114 -11
  113. package/{js → components}/ln-editor/README.md +11 -9
  114. package/components/ln-editor/ln-editor-dev.scss +18 -0
  115. package/components/ln-editor/ln-editor.js +1 -0
  116. package/components/ln-editor/ln-editor.schema.json +58 -0
  117. package/components/ln-editor/ln-editor.scss +13 -0
  118. package/{js → components}/ln-editor/src/ln-editor.js +59 -11
  119. package/{js → components}/ln-external-links/README.md +10 -8
  120. package/components/ln-external-links/ln-external-links.js +1 -0
  121. package/components/ln-external-links/ln-external-links.schema.json +18 -0
  122. package/{js → components}/ln-external-links/src/ln-external-links.js +13 -11
  123. package/{js → components}/ln-fill/README.md +6 -8
  124. package/components/ln-fill/ln-fill.js +1 -0
  125. package/components/ln-fill/ln-fill.schema.json +23 -0
  126. package/{js → components}/ln-fill/src/ln-fill.js +7 -1
  127. package/components/ln-filter/README.md +131 -0
  128. package/components/ln-filter/ln-filter-dev.scss +13 -0
  129. package/components/ln-filter/ln-filter.js +1 -0
  130. package/components/ln-filter/ln-filter.schema.json +153 -0
  131. package/components/ln-filter/src/filter-model.js +185 -0
  132. package/components/ln-filter/src/ln-filter.js +435 -0
  133. package/{js → components}/ln-form/README.md +260 -264
  134. package/components/ln-form/ln-form-dev.scss +8 -0
  135. package/components/ln-form/ln-form.js +1 -0
  136. package/components/ln-form/ln-form.schema.json +45 -0
  137. package/{js → components}/ln-form/src/ln-form.js +107 -99
  138. package/{js → components}/ln-http/README.md +11 -6
  139. package/components/ln-http/ln-http.js +1 -0
  140. package/components/ln-http/ln-http.schema.json +6 -0
  141. package/components/ln-http/src/http-core.js +51 -0
  142. package/{js → components}/ln-http/src/ln-http.js +28 -33
  143. package/{js → components}/ln-icon/README.md +16 -9
  144. package/components/ln-icon/ln-icon.schema.json +6 -0
  145. package/components/ln-include/README.md +75 -0
  146. package/components/ln-include/ln-include-dev.scss +13 -0
  147. package/components/ln-include/ln-include.js +1 -0
  148. package/components/ln-include/ln-include.schema.json +23 -0
  149. package/components/ln-include/src/ln-include.js +111 -0
  150. package/components/ln-key/README.md +130 -0
  151. package/components/ln-key/ln-key-dev.scss +18 -0
  152. package/components/ln-key/ln-key.js +1 -0
  153. package/components/ln-key/ln-key.schema.json +56 -0
  154. package/components/ln-key/src/key-model.js +146 -0
  155. package/components/ln-key/src/ln-key.js +201 -0
  156. package/{js → components}/ln-link/README.md +7 -9
  157. package/components/ln-link/ln-link-dev.scss +8 -0
  158. package/components/ln-link/ln-link.js +1 -0
  159. package/components/ln-link/ln-link.schema.json +22 -0
  160. package/{js → components}/ln-link/src/ln-link.js +16 -11
  161. package/components/ln-list/README.md +152 -0
  162. package/components/ln-list/ln-list-dev.scss +8 -0
  163. package/components/ln-list/ln-list.js +1 -0
  164. package/components/ln-list/ln-list.schema.json +166 -0
  165. package/components/ln-list/ln-list.scss +25 -0
  166. package/{js → components}/ln-list/src/ln-list.js +1301 -1216
  167. package/{js → components}/ln-modal/README.md +13 -10
  168. package/components/ln-modal/ln-modal-dev.scss +18 -0
  169. package/components/ln-modal/ln-modal.js +1 -0
  170. package/components/ln-modal/ln-modal.schema.json +54 -0
  171. package/components/ln-modal/ln-modal.scss +51 -0
  172. package/{js → components}/ln-modal/src/ln-modal.js +164 -137
  173. package/{js → components}/ln-nav/README.md +11 -11
  174. package/components/ln-nav/ln-nav.js +1 -0
  175. package/components/ln-nav/ln-nav.schema.json +25 -0
  176. package/{js → components}/ln-nav/src/ln-nav.js +25 -14
  177. package/components/ln-number/README.md +205 -0
  178. package/{js → components}/ln-number/ln-number-dev.scss +13 -13
  179. package/components/ln-number/ln-number.js +1 -0
  180. package/components/ln-number/ln-number.schema.json +63 -0
  181. package/components/ln-number/src/ln-number.js +400 -0
  182. package/components/ln-number/src/number-model.js +31 -0
  183. package/components/ln-obfuscator/README.md +60 -0
  184. package/components/ln-obfuscator/ln-obfuscator.js +1 -0
  185. package/components/ln-obfuscator/ln-obfuscator.schema.json +49 -0
  186. package/components/ln-obfuscator/src/ln-obfuscator.js +159 -0
  187. package/components/ln-obfuscator/src/obfuscator-model.js +250 -0
  188. package/{js → components}/ln-options/README.md +3 -1
  189. package/components/ln-options/ln-options-dev.scss +13 -0
  190. package/components/ln-options/ln-options.js +1 -0
  191. package/components/ln-options/ln-options.schema.json +41 -0
  192. package/{js → components}/ln-options/src/ln-options.js +13 -5
  193. package/components/ln-persist/README.md +151 -0
  194. package/components/ln-persist/ln-persist.js +1 -0
  195. package/components/ln-persist/ln-persist.schema.json +28 -0
  196. package/components/ln-persist/src/ln-persist.js +83 -0
  197. package/components/ln-picklist/README.md +230 -0
  198. package/components/ln-picklist/ln-picklist-dev.scss +22 -0
  199. package/components/ln-picklist/ln-picklist.js +1 -0
  200. package/components/ln-picklist/ln-picklist.schema.json +49 -0
  201. package/components/ln-picklist/src/ln-picklist.js +228 -0
  202. package/{js → components}/ln-popover/README.md +164 -162
  203. package/components/ln-popover/ln-popover-dev.scss +13 -0
  204. package/components/ln-popover/ln-popover.js +1 -0
  205. package/components/ln-popover/ln-popover.schema.json +82 -0
  206. package/components/ln-popover/ln-popover.scss +18 -0
  207. package/{js → components}/ln-popover/src/ln-popover.js +42 -36
  208. package/{js → components}/ln-progress/README.md +410 -413
  209. package/components/ln-progress/ln-progress-dev.scss +8 -0
  210. package/components/ln-progress/ln-progress.js +1 -0
  211. package/components/ln-progress/ln-progress.schema.json +40 -0
  212. package/components/ln-progress/src/ln-progress.js +91 -0
  213. package/components/ln-progress/src/progress-model.js +20 -0
  214. package/{js → components}/ln-router/README.md +443 -432
  215. package/components/ln-router/ln-router-dev.scss +13 -0
  216. package/components/ln-router/ln-router.js +1 -0
  217. package/components/ln-router/ln-router.schema.json +68 -0
  218. package/{js → components}/ln-router/src/ln-router.js +585 -539
  219. package/components/ln-router/src/router-model.js +50 -0
  220. package/components/ln-scroll/README.md +45 -0
  221. package/components/ln-scroll/ln-scroll.js +1 -0
  222. package/components/ln-scroll/ln-scroll.schema.json +85 -0
  223. package/components/ln-scroll/src/ln-scroll.js +150 -0
  224. package/components/ln-search/README.md +188 -0
  225. package/components/ln-search/ln-search-dev.scss +13 -0
  226. package/components/ln-search/ln-search.js +1 -0
  227. package/components/ln-search/ln-search.schema.json +103 -0
  228. package/components/ln-search/src/ln-search.js +330 -0
  229. package/{js → components}/ln-slug/README.md +6 -3
  230. package/components/ln-slug/ln-slug-dev.scss +18 -0
  231. package/components/ln-slug/ln-slug.js +1 -0
  232. package/components/ln-slug/ln-slug.schema.json +23 -0
  233. package/{js → components}/ln-slug/src/ln-slug.js +20 -13
  234. package/components/ln-slug/src/slug-model.js +21 -0
  235. package/{js → components}/ln-sort/README.md +178 -170
  236. package/{js → components}/ln-sort/ln-sort-dev.scss +8 -8
  237. package/components/ln-sort/ln-sort.js +1 -0
  238. package/components/ln-sort/ln-sort.schema.json +104 -0
  239. package/components/ln-sort/src/ln-sort.js +321 -0
  240. package/components/ln-sort/src/sort-model.js +117 -0
  241. package/{js → components}/ln-sortable/README.md +7 -11
  242. package/components/ln-sortable/ln-sortable-dev.scss +13 -0
  243. package/components/ln-sortable/ln-sortable.js +1 -0
  244. package/components/ln-sortable/ln-sortable.schema.json +36 -0
  245. package/{js → components}/ln-sortable/src/ln-sortable.js +8 -13
  246. package/{js → components}/ln-stat/README.md +3 -1
  247. package/components/ln-stat/ln-stat-dev.scss +8 -0
  248. package/components/ln-stat/ln-stat.js +1 -0
  249. package/components/ln-stat/ln-stat.schema.json +32 -0
  250. package/{js → components}/ln-stat/src/ln-stat.js +14 -18
  251. package/components/ln-stat/src/stat-model.js +28 -0
  252. package/{js → components}/ln-table/README.md +37 -24
  253. package/{js → components}/ln-table/ln-table-dev.scss +17 -17
  254. package/components/ln-table/ln-table.js +1 -0
  255. package/components/ln-table/ln-table.schema.json +211 -0
  256. package/components/ln-table/ln-table.scss +15 -0
  257. package/{js → components}/ln-table/src/ln-table.js +1365 -1493
  258. package/components/ln-table/src/table-model.js +98 -0
  259. package/components/ln-table-coordinator/README.md +61 -0
  260. package/components/ln-table-coordinator/ln-table-coordinator.js +1 -0
  261. package/components/ln-table-coordinator/ln-table-coordinator.schema.json +93 -0
  262. package/components/ln-table-coordinator/src/ln-table-coordinator.js +193 -0
  263. package/{js → components}/ln-tabs/README.md +32 -14
  264. package/components/ln-tabs/ln-tabs-dev.scss +24 -0
  265. package/components/ln-tabs/ln-tabs.js +1 -0
  266. package/components/ln-tabs/ln-tabs.schema.json +75 -0
  267. package/components/ln-tabs/ln-tabs.scss +8 -0
  268. package/components/ln-tabs/src/ln-tabs.js +207 -0
  269. package/components/ln-tabs/src/tabs-model.js +82 -0
  270. package/{js → components}/ln-time/README.md +96 -95
  271. package/components/ln-time/ln-time-dev.scss +13 -0
  272. package/components/ln-time/ln-time.js +1 -0
  273. package/components/ln-time/ln-time.schema.json +38 -0
  274. package/{js → components}/ln-time/src/ln-time.js +206 -223
  275. package/components/ln-time/src/time-model.js +64 -0
  276. package/{js → components}/ln-toast/README.md +23 -5
  277. package/components/ln-toast/ln-toast-dev.scss +8 -0
  278. package/components/ln-toast/ln-toast.js +1 -0
  279. package/components/ln-toast/ln-toast.schema.json +65 -0
  280. package/components/ln-toast/ln-toast.scss +59 -0
  281. package/{js → components}/ln-toast/src/ln-toast.js +233 -232
  282. package/{js → components}/ln-toggle/README.md +198 -196
  283. package/{js → components}/ln-toggle/ln-toggle-dev.scss +13 -13
  284. package/components/ln-toggle/ln-toggle.js +1 -0
  285. package/components/ln-toggle/ln-toggle.schema.json +52 -0
  286. package/components/ln-toggle/ln-toggle.scss +37 -0
  287. package/{js → components}/ln-toggle/src/ln-toggle.js +61 -46
  288. package/{js → components}/ln-tooltip/README.md +6 -6
  289. package/{js → components}/ln-tooltip/ln-tooltip-dev.scss +9 -9
  290. package/components/ln-tooltip/ln-tooltip.js +1 -0
  291. package/components/ln-tooltip/ln-tooltip.schema.json +86 -0
  292. package/components/ln-tooltip/ln-tooltip.scss +9 -0
  293. package/{js → components}/ln-tooltip/src/ln-tooltip.js +14 -3
  294. package/{js → components}/ln-translations/README.md +3 -1
  295. package/components/ln-translations/ln-translations-dev.scss +13 -0
  296. package/components/ln-translations/ln-translations.js +1 -0
  297. package/components/ln-translations/ln-translations.schema.json +120 -0
  298. package/{js → components}/ln-translations/src/ln-translations.js +25 -10
  299. package/components/ln-ui-coordinator/README.md +101 -0
  300. package/components/ln-ui-coordinator/ln-ui-coordinator-dev.scss +8 -0
  301. package/components/ln-ui-coordinator/ln-ui-coordinator.js +1 -0
  302. package/components/ln-ui-coordinator/ln-ui-coordinator.schema.json +60 -0
  303. package/{js/ln-modal-coordinator/src/ln-modal-coordinator.js → components/ln-ui-coordinator/src/ln-ui-coordinator.js} +403 -345
  304. package/components/ln-upload/README.md +133 -0
  305. package/components/ln-upload/ln-upload-dev.scss +18 -0
  306. package/components/ln-upload/ln-upload.js +1 -0
  307. package/components/ln-upload/ln-upload.schema.json +193 -0
  308. package/components/ln-upload/ln-upload.scss +20 -0
  309. package/components/ln-upload/src/ln-upload.js +652 -0
  310. package/components/ln-upload/src/upload-model.js +78 -0
  311. package/{js → components}/ln-validate/README.md +182 -180
  312. package/{js → components}/ln-validate/ln-validate-dev.scss +15 -15
  313. package/components/ln-validate/ln-validate.js +1 -0
  314. package/components/ln-validate/ln-validate.schema.json +50 -0
  315. package/components/ln-validate/ln-validate.scss +7 -0
  316. package/{js → components}/ln-validate/src/ln-validate.js +23 -45
  317. package/components/ln-validate/src/validate-model.js +64 -0
  318. package/components/ln-websocket-connector/README.md +166 -0
  319. package/components/ln-websocket-connector/ln-websocket-connector.js +1 -0
  320. package/components/ln-websocket-connector/ln-websocket-connector.schema.json +29 -0
  321. package/components/ln-websocket-connector/src/ln-websocket-connector.js +279 -0
  322. package/ln-ashlar.html-data.json +1796 -0
  323. package/package.json +84 -61
  324. package/{scss → theme}/base/_global.scss +1 -2
  325. package/{scss → theme}/base/_reset.scss +1 -1
  326. package/{scss → theme}/base/_typography.scss +2 -0
  327. package/theme/brand.css +73 -0
  328. package/{scss → theme}/components/_app-shell.scss +8 -0
  329. package/theme/components/_button.scss +24 -0
  330. package/theme/components/_chart.scss +5 -0
  331. package/theme/components/_confirm.scss +6 -0
  332. package/{scss → theme}/components/_date.scss +30 -22
  333. package/{scss → theme}/components/_dropdown.scss +6 -1
  334. package/theme/components/_form.scss +140 -0
  335. package/{scss → theme}/components/_layout.scss +6 -0
  336. package/{scss → theme}/components/_ln-table.scss +1 -6
  337. package/theme/components/_picklist.scss +3 -0
  338. package/{scss → theme}/components/_sort.scss +10 -10
  339. package/theme/components/_status-badge.scss +6 -0
  340. package/{scss → theme}/components/_table.scss +16 -0
  341. package/{scss → theme}/components/_tabs.scss +0 -4
  342. package/theme/components/_toast.scss +48 -0
  343. package/{scss → theme}/components/_toggle.scss +1 -1
  344. package/theme/components/_upload.scss +45 -0
  345. package/{scss → theme}/config/_breakpoints.scss +1 -1
  346. package/theme/config/_contrast.scss +128 -0
  347. package/{scss → theme}/config/_density.scss +191 -205
  348. package/theme/config/_palette.scss +274 -0
  349. package/theme/config/_theme.scss +293 -0
  350. package/{scss → theme}/config/_tokens.scss +285 -441
  351. package/{scss → theme}/config/mixins/_accordion.scss +1 -1
  352. package/{scss → theme}/config/mixins/_alert.scss +1 -0
  353. package/{scss → theme}/config/mixins/_app-shell.scss +4 -2
  354. package/{scss → theme}/config/mixins/_borders.scss +2 -0
  355. package/theme/config/mixins/_btn.scss +175 -0
  356. package/{scss → theme}/config/mixins/_card.scss +55 -46
  357. package/theme/config/mixins/_chart.scss +82 -0
  358. package/{scss → theme}/config/mixins/_collapsible.scss +2 -1
  359. package/{scss → theme}/config/mixins/_colors.scss +8 -14
  360. package/{scss → theme}/config/mixins/_diagnostics.scss +48 -48
  361. package/theme/config/mixins/_dropdown.scss +169 -0
  362. package/{scss → theme}/config/mixins/_editor.scss +0 -7
  363. package/{scss → theme}/config/mixins/_filter.scss +47 -47
  364. package/{scss → theme}/config/mixins/_footer.scss +1 -1
  365. package/{scss → theme}/config/mixins/_form.scss +49 -18
  366. package/{scss → theme}/config/mixins/_index.scss +62 -61
  367. package/{scss → theme}/config/mixins/_layout.scss +6 -2
  368. package/{scss → theme}/config/mixins/_ln-table.scss +31 -10
  369. package/{scss → theme}/config/mixins/_loader.scss +1 -1
  370. package/{scss → theme}/config/mixins/_modal.scss +145 -149
  371. package/{scss → theme}/config/mixins/_motion.scss +13 -0
  372. package/{scss → theme}/config/mixins/_nav.scss +7 -7
  373. package/theme/config/mixins/_picklist.scss +66 -0
  374. package/theme/config/mixins/_popover.scss +96 -0
  375. package/{scss → theme}/config/mixins/_sidebar.scss +7 -4
  376. package/{scss → theme}/config/mixins/_sort.scss +43 -42
  377. package/{scss → theme}/config/mixins/_status-badge.scss +15 -2
  378. package/{scss → theme}/config/mixins/_table.scss +25 -14
  379. package/{scss → theme}/config/mixins/_tabs.scss +1 -1
  380. package/{scss → theme}/config/mixins/_toast.scss +174 -179
  381. package/{scss → theme}/config/mixins/_tooltip.scss +2 -2
  382. package/{scss → theme}/config/mixins/_typography.scss +16 -5
  383. package/{scss → theme}/config/mixins/_upload.scss +8 -6
  384. package/theme/ln-ashlar-core.scss +24 -0
  385. package/theme/ln-ashlar-dev.scss +66 -0
  386. package/theme/ln-ashlar-landing.scss +56 -0
  387. package/{scss/ln-ashlar.scss → theme/ln-ashlar-theme.scss} +63 -69
  388. package/theme/ln-ashlar.scss +8 -0
  389. package/theme/presentation/_bento.scss +151 -0
  390. package/theme/presentation/_cta.scss +111 -0
  391. package/theme/presentation/_effects.scss +216 -0
  392. package/theme/presentation/_features.scss +108 -0
  393. package/theme/presentation/_footer.scss +129 -0
  394. package/theme/presentation/_hero.scss +158 -0
  395. package/theme/presentation/_layout.scss +170 -0
  396. package/theme/presentation/_navbar.scss +140 -0
  397. package/theme/presentation/_pricing.scss +262 -0
  398. package/theme/presentation/_stats.scss +87 -0
  399. package/theme/presentation/_testimonials.scss +124 -0
  400. package/theme/presentation/_tokens.scss +39 -0
  401. package/theme/presentation/_typography.scss +163 -0
  402. package/{scss → theme}/utilities/_animations.scss +38 -0
  403. package/{scss → theme}/utilities/_utilities.scss +6 -0
  404. package/web-types.json +2312 -0
  405. package/js/ln-accordion/ln-accordion.js +0 -1
  406. package/js/ln-ajax/ln-ajax.js +0 -1
  407. package/js/ln-api-connector/ln-api-connector.js +0 -1
  408. package/js/ln-api-connector/src/ln-api-connector.js +0 -368
  409. package/js/ln-api-queue/ln-api-queue.js +0 -1
  410. package/js/ln-autoresize/ln-autoresize.js +0 -1
  411. package/js/ln-autosave/ln-autosave.js +0 -1
  412. package/js/ln-circular-progress/ln-circular-progress.js +0 -1
  413. package/js/ln-confirm/_ln-confirm.scss +0 -24
  414. package/js/ln-confirm/ln-confirm.js +0 -1
  415. package/js/ln-core/crypto.js +0 -83
  416. package/js/ln-core/helpers.js +0 -788
  417. package/js/ln-core/index.js +0 -7
  418. package/js/ln-core/persist.js +0 -97
  419. package/js/ln-couchdb-connector/ln-couchdb-connector.js +0 -1
  420. package/js/ln-data-coordinator/ln-data-coordinator.js +0 -1
  421. package/js/ln-data-coordinator/src/data-read-policy.js +0 -18
  422. package/js/ln-data-store/ln-data-store.js +0 -1
  423. package/js/ln-date/ln-date.js +0 -1
  424. package/js/ln-date/src/ln-date.js +0 -603
  425. package/js/ln-debug/README.md +0 -58
  426. package/js/ln-debug/ln-debug.js +0 -1
  427. package/js/ln-debug/src/ln-debug.js +0 -19
  428. package/js/ln-dropdown/ln-dropdown.js +0 -1
  429. package/js/ln-dropdown/ln-dropdown.scss +0 -15
  430. package/js/ln-editor/ln-editor.js +0 -1
  431. package/js/ln-editor/ln-editor.scss +0 -43
  432. package/js/ln-external-links/ln-external-links.js +0 -1
  433. package/js/ln-fill/ln-fill.js +0 -1
  434. package/js/ln-filter/README.md +0 -189
  435. package/js/ln-filter/ln-filter-dev.scss +0 -8
  436. package/js/ln-filter/ln-filter.js +0 -1
  437. package/js/ln-filter/src/ln-filter.js +0 -419
  438. package/js/ln-form/ln-form.js +0 -1
  439. package/js/ln-http/ln-http.js +0 -1
  440. package/js/ln-link/ln-link.js +0 -1
  441. package/js/ln-list/README.md +0 -129
  442. package/js/ln-list/ln-list.js +0 -1
  443. package/js/ln-list/ln-list.scss +0 -28
  444. package/js/ln-modal/ln-modal-dev.scss +0 -13
  445. package/js/ln-modal/ln-modal.js +0 -1
  446. package/js/ln-modal/ln-modal.scss +0 -35
  447. package/js/ln-modal-coordinator/README.md +0 -99
  448. package/js/ln-modal-coordinator/ln-modal-coordinator-dev.scss +0 -8
  449. package/js/ln-modal-coordinator/ln-modal-coordinator.js +0 -1
  450. package/js/ln-nav/ln-nav.js +0 -1
  451. package/js/ln-number/README.md +0 -149
  452. package/js/ln-number/ln-number.js +0 -1
  453. package/js/ln-number/src/ln-number.js +0 -443
  454. package/js/ln-options/ln-options.js +0 -1
  455. package/js/ln-popover/ln-popover.js +0 -1
  456. package/js/ln-progress/ln-progress.js +0 -1
  457. package/js/ln-progress/src/ln-progress.js +0 -98
  458. package/js/ln-router/ln-router.js +0 -1
  459. package/js/ln-search/README.md +0 -158
  460. package/js/ln-search/ln-search-dev.scss +0 -8
  461. package/js/ln-search/ln-search.js +0 -1
  462. package/js/ln-search/src/ln-search.js +0 -117
  463. package/js/ln-slug/ln-slug.js +0 -1
  464. package/js/ln-sort/ln-sort.js +0 -1
  465. package/js/ln-sort/src/ln-sort.js +0 -178
  466. package/js/ln-sortable/ln-sortable.js +0 -1
  467. package/js/ln-stat/ln-stat.js +0 -1
  468. package/js/ln-table/ln-table.js +0 -1
  469. package/js/ln-table/ln-table.scss +0 -11
  470. package/js/ln-table-coordinator/README.md +0 -73
  471. package/js/ln-table-coordinator/ln-table-coordinator.js +0 -1
  472. package/js/ln-table-coordinator/src/ln-table-coordinator.js +0 -160
  473. package/js/ln-tabs/ln-tabs-dev.scss +0 -18
  474. package/js/ln-tabs/ln-tabs.js +0 -1
  475. package/js/ln-tabs/src/ln-tabs.js +0 -188
  476. package/js/ln-time/ln-time.js +0 -1
  477. package/js/ln-toast/ln-toast.js +0 -1
  478. package/js/ln-toggle/ln-toggle.js +0 -1
  479. package/js/ln-tooltip/ln-tooltip.js +0 -1
  480. package/js/ln-tooltip/ln-tooltip.scss +0 -9
  481. package/js/ln-translations/ln-translations.js +0 -1
  482. package/js/ln-upload/README.md +0 -255
  483. package/js/ln-upload/ln-upload.js +0 -1
  484. package/js/ln-upload/ln-upload.scss +0 -20
  485. package/js/ln-upload/src/ln-upload.js +0 -423
  486. package/js/ln-validate/ln-validate.js +0 -1
  487. package/scss/components/_button.scss +0 -20
  488. package/scss/components/_confirm.scss +0 -5
  489. package/scss/components/_form.scss +0 -107
  490. package/scss/components/_status-badge.scss +0 -4
  491. package/scss/components/_toast.scss +0 -68
  492. package/scss/components/_upload.scss +0 -51
  493. package/scss/config/_theme.scss +0 -216
  494. package/scss/config/mixins/_btn.scss +0 -179
  495. package/scss/config/mixins/_confirm.scss +0 -31
  496. package/scss/config/mixins/_dropdown.scss +0 -141
  497. package/scss/config/mixins/_popover.scss +0 -64
  498. package/scss/ln-ashlar-dev.scss +0 -39
  499. /package/{js → components}/ln-core/positioning.js +0 -0
  500. /package/{js → components}/ln-core/reactive.js +0 -0
  501. /package/{js → components}/ln-filter/ln-filter.scss +0 -0
  502. /package/{js → components}/ln-icon/ln-icon.js +0 -0
  503. /package/{js → components}/ln-icon/src/ln-icon.js +0 -0
  504. /package/{js → components}/ln-search/ln-search.scss +0 -0
  505. /package/{js → components}/ln-toast/template.html +0 -0
  506. /package/{scss → theme}/components/_accordion.scss +0 -0
  507. /package/{scss → theme}/components/_ajax.scss +0 -0
  508. /package/{scss → theme}/components/_alert.scss +0 -0
  509. /package/{scss → theme}/components/_avatar.scss +0 -0
  510. /package/{scss → theme}/components/_breadcrumbs.scss +0 -0
  511. /package/{scss → theme}/components/_card.scss +0 -0
  512. /package/{scss → theme}/components/_chip.scss +0 -0
  513. /package/{scss → theme}/components/_circular-progress.scss +0 -0
  514. /package/{scss → theme}/components/_editor.scss +0 -0
  515. /package/{scss → theme}/components/_empty-state.scss +0 -0
  516. /package/{scss → theme}/components/_filter.scss +0 -0
  517. /package/{scss → theme}/components/_link.scss +0 -0
  518. /package/{scss → theme}/components/_loader.scss +0 -0
  519. /package/{scss → theme}/components/_modal.scss +0 -0
  520. /package/{scss → theme}/components/_nav.scss +0 -0
  521. /package/{scss → theme}/components/_page-header.scss +0 -0
  522. /package/{scss → theme}/components/_popover.scss +0 -0
  523. /package/{scss → theme}/components/_progress.scss +0 -0
  524. /package/{scss → theme}/components/_prose.scss +0 -0
  525. /package/{scss → theme}/components/_scrollbar.scss +0 -0
  526. /package/{scss → theme}/components/_sections.scss +0 -0
  527. /package/{scss → theme}/components/_sidebar.scss +0 -0
  528. /package/{scss → theme}/components/_stat-card.scss +0 -0
  529. /package/{scss → theme}/components/_stepper.scss +0 -0
  530. /package/{scss → theme}/components/_timeline.scss +0 -0
  531. /package/{scss → theme}/components/_tooltip.scss +0 -0
  532. /package/{scss → theme}/components/_translations.scss +0 -0
  533. /package/{scss → theme}/config/_icons.scss +0 -0
  534. /package/{scss → theme}/config/_mixins.scss +0 -0
  535. /package/{scss → theme}/config/mixins/_ajax.scss +0 -0
  536. /package/{scss → theme}/config/mixins/_avatar.scss +0 -0
  537. /package/{scss → theme}/config/mixins/_breadcrumbs.scss +0 -0
  538. /package/{scss → theme}/config/mixins/_breakpoints.scss +0 -0
  539. /package/{scss → theme}/config/mixins/_chip.scss +0 -0
  540. /package/{scss → theme}/config/mixins/_circular-progress.scss +0 -0
  541. /package/{scss → theme}/config/mixins/_display.scss +0 -0
  542. /package/{scss → theme}/config/mixins/_empty-state.scss +0 -0
  543. /package/{scss → theme}/config/mixins/_focus.scss +0 -0
  544. /package/{scss → theme}/config/mixins/_interaction.scss +0 -0
  545. /package/{scss → theme}/config/mixins/_kbd.scss +0 -0
  546. /package/{scss → theme}/config/mixins/_link.scss +0 -0
  547. /package/{scss → theme}/config/mixins/_page-header.scss +0 -0
  548. /package/{scss → theme}/config/mixins/_position.scss +0 -0
  549. /package/{scss → theme}/config/mixins/_progress.scss +0 -0
  550. /package/{scss → theme}/config/mixins/_prose.scss +0 -0
  551. /package/{scss → theme}/config/mixins/_shadows.scss +0 -0
  552. /package/{scss → theme}/config/mixins/_sizing.scss +0 -0
  553. /package/{scss → theme}/config/mixins/_spacing.scss +0 -0
  554. /package/{scss → theme}/config/mixins/_stat-card.scss +0 -0
  555. /package/{scss → theme}/config/mixins/_stepper.scss +0 -0
  556. /package/{scss → theme}/config/mixins/_timeline.scss +0 -0
  557. /package/{scss → theme}/config/mixins/_transitions.scss +0 -0
  558. /package/{scss → theme}/config/mixins/_translations.scss +0 -0
  559. /package/{scss → theme}/tabler-icons.txt +0 -0
@@ -1,158 +0,0 @@
1
- # ln-search
2
-
3
- A zero-dependency, event-driven **Debounced Search Primitive** that intercepts text input, debounces keystrokes, and coordinates list-filtering states.
4
-
5
- It acts as an intent announcer. It does not own data filtering directly; instead, it announces a normalized search query on the target element via a cancelable event, allowing tables, lists, or custom server integrations to intercept and handle the query or fall back to a built-in DOM-walking filter.
6
-
7
- ---
8
-
9
- ## ✅ Canonical Markup — Copy This (REQUIRED)
10
-
11
- **Hard rule — non-negotiable.** Every search or filter text input MUST use the
12
- full `.search` chrome below: the leading magnifier icon **and** the clear
13
- ("x") button. This applies everywhere — toolbars, table headers, **and
14
- popovers/dropdowns**. The previously-accepted "lightweight" bare
15
- `<input data-ln-search>` (no icon, no clear button) is **no longer acceptable
16
- for authoring**.
17
-
18
- Copy this block. Change only the `placeholder`, the
19
- `data-ln-search="<targetId>"`, and the `aria-label`. If a field needs a
20
- page-specific tweak, add one extra class beside `search`
21
- (`class="search my-extra"`) — never alter the structure, the icons, or the
22
- clear button.
23
-
24
- ```html
25
- <label class="search">
26
- <svg class="ln-icon" aria-hidden="true"><use href="#ln-icon-search"></use></svg>
27
- <input type="search" placeholder="Search …" data-ln-search="<targetId>">
28
- <button type="button" data-ln-search-clear aria-label="Clear search">
29
- <svg class="ln-icon" aria-hidden="true"><use href="#ln-icon-x"></use></svg>
30
- </button>
31
- </label>
32
- ```
33
-
34
- For deep targeting (e.g. checkbox lists inside a popover) add
35
- `data-ln-search-items="<selector>"` to the **same `<input>`** — the chrome is
36
- identical:
37
-
38
- ```html
39
- <input type="search" placeholder="Search …" data-ln-search="<targetId>" data-ln-search-items="label">
40
- ```
41
-
42
- ---
43
-
44
- ## 🧭 Philosophy & Architecture
45
-
46
- 1. **Decoupled Search Intent:** The component does not manipulate collections directly. It debounces keystrokes (150ms trailing-edge) and dispatches a cancelable `ln-search:change` custom event on the **target** element (not the input).
47
- 2. **The Default DOM-Walk Fallback:** If no listener calls `e.preventDefault()`, the component automatically runs a fast DOM-walk on the target's children, applying `data-ln-search-hide="true"` to non-matching elements.
48
- 3. **Reactive Form-Restore Hook:** During page reloads or back-button navigation, browsers auto-fill input fields before scripts initialize. `ln-search` detects this pre-filled state at construction and schedules an initial search dispatch via `queueMicrotask` to ensure all listener components have fully initialized first.
49
-
50
- ---
51
-
52
- ## 📦 Minimal Blueprint
53
-
54
- ### Standard List Filtering (Zero-JS Fallback)
55
- Bind the search input to a list `id` via `data-ln-search`.
56
-
57
- > ⚠️ **Not an authoring pattern.** The component still *accepts* a bare input
58
- > (backward-compat / JS-internal fallback), but you must always author the full
59
- > `.search` chrome shown in [Canonical Markup](#-canonical-markup--copy-this-required).
60
-
61
- ```html
62
- <input type="search" placeholder="Search..." data-ln-search="countries-list">
63
-
64
- <ul id="countries-list">
65
- <li>Argentina</li>
66
- <li>Brazil</li>
67
- <li>Canada</li>
68
- </ul>
69
- ```
70
-
71
- ### Premium Icon Wrapper with Clear Button
72
- The canonical input-host form places `data-ln-search` directly on the `<input>`
73
- and uses `class="search"` for the compact icon-group chrome (leading magnifier,
74
- recessed fill, clear button):
75
- ```html
76
- <label class="search">
77
- <svg class="ln-icon" aria-hidden="true"><use href="#ln-icon-search"></use></svg>
78
- <input type="search" placeholder="Search countries..." data-ln-search="countries-list">
79
- <button type="button" data-ln-search-clear aria-label="Clear search">
80
- <svg class="ln-icon" aria-hidden="true"><use href="#ln-icon-x"></use></svg>
81
- </button>
82
- </label>
83
- ```
84
- `class="search"` binds `@include search` (library `scss/components/_form.scss`).
85
- Wrapper-host (`data-ln-search` on the `<label>`) is retained only so existing
86
- markup keeps working — input-host is **required** for all new code.
87
-
88
- ---
89
-
90
- ## 🛠️ Declarative API Contract
91
-
92
- ### HTML Attributes
93
-
94
- | Attribute | Elements | Description |
95
- | :--- | :--- | :--- |
96
- | `data-ln-search` | `<input>` (canonical); `<label>`/wrapper (backward-compat) | Component root and namespace. Value is the `id` of the target to filter. |
97
- | `data-ln-search-items` | Same as root | Opt-in. Deep CSS selector (e.g. `tbody tr`) to query deep matching elements instead of direct children. |
98
- | `data-ln-search-clear` | `<button>` | Identifies the clear button. Click clears input and triggers synchronous search reset. |
99
- | `data-ln-search-hide` | Children of target | *State*. Automatically toggled on non-matching elements (`display: none !important`). |
100
-
101
- ### JavaScript API (`el.lnSearch`)
102
-
103
- | Member | Type | Description |
104
- | :--- | :--- | :--- |
105
- | `targetId` | `string` | The ID of the target element. |
106
- | `input` | `HTMLInputElement` | The resolved input element driving the search. |
107
- | `destroy()` | `() => void` | Removes listeners, cancels debounces, and tears down the instance. |
108
-
109
- ---
110
-
111
- ## ⚡ DOM Events
112
-
113
- ### `ln-search:change`
114
- Dispatched on the **target** element whenever the search term changes.
115
- - **Cancelable**: Yes. Calling `e.preventDefault()` disables the default DOM-walk.
116
- - **Payload (`detail`)**: `{ term: string, targetId: string }` (where `term` is lowercased and trimmed).
117
-
118
- ---
119
-
120
- ## ⚠️ Common Pitfalls
121
-
122
- - **Driving an `ln-table` search box:** placing `data-ln-search="<tableId>"` on the search input (or its label wrapper) is the sole supported pattern, but the consumer differs by mode. **SSR mode** consumes `ln-search:change` directly on the table. **Data-driven mode** requires the table to be wrapped in `[data-ln-table-coordinator]`, which receives `ln-search:change` and translates it into `ln-table:set-search`, joined with sort and column filters into the `ln-table:request-data` payload. Note: `data-ln-table-search` has been removed — use `data-ln-search="<tableId>"` instead.
123
- - **Bypassing Debounce via Native Input Listeners:** Listening to native `input` events directly will bypass the 150ms debounce and execute expensive logic on every single keystroke. Always listen to `ln-search:change`.
124
- - **Programmatic Value Mutations:** Assigning `input.value = "text"` programmatically does not trigger search. You must manually dispatch an `input` event:
125
- ```javascript
126
- input.value = 'Argentina';
127
- input.dispatchEvent(new Event('input', { bubbles: true }));
128
- ```
129
-
130
- ---
131
-
132
- ## 🔧 Internals
133
-
134
- Source: `js/ln-search/ln-search.js` (114 lines). One instance per `[data-ln-search]`, stored at `element.lnSearch`. `targetId` is captured once at construction; `document.getElementById(targetId)` is re-resolved on every search — cheaper than caching a node across AJAX re-renders.
135
-
136
- ### Debounce shape
137
-
138
- Trailing-edge, 150ms, cancel-and-reschedule per keystroke — no leading-edge fire (would flicker partial filtering mid-type). The clear button bypasses the debounce entirely, calling `_search('')` synchronously.
139
-
140
- ### Dispatch flow
141
-
142
- `_search` resolves the target, dispatches cancelable `ln-search:change` on it (not on the input — so consumers listen on the thing they care about), and only runs the default DOM-walk if `!evt.defaultPrevented`. There is no separate `:before-change` event — the cancelable shape of `:change` IS the before-hook.
143
-
144
- ### Form-restore detection
145
-
146
- If the input already has a value at construction (browser autofill / back-button restore), the initial search is scheduled via `queueMicrotask` rather than fired synchronously — other components (`ln-table`) may not have attached their `ln-search:change` listener yet during the same `DOMContentLoaded` burst; the microtask waits for the current task to drain first.
147
-
148
- ### Clear-button resolution
149
-
150
- Scope for locating `[data-ln-search-clear]` is `input.parentElement` when `data-ln-search` sits on the input (canonical), or `dom` itself in the legacy wrapper-host form. Null-guarded — a missing button just means no clear wiring.
151
-
152
- ### Cross-component coordination
153
-
154
- No imports of other components. In SSR mode, `ln-table` consumes `ln-search:change` via `preventDefault()` and runs its own in-memory filter; in data-driven mode, `ln-table-coordinator` consumes it instead and translates it into `ln-table:set-search`. `ln-filter` runs independently on the same target through a parallel `data-ln-search-hide` / `data-ln-filter-hide` pair — CSS unions both, neither component is aware of the other.
155
-
156
- ### Destroy
157
-
158
- Cancels the pending debounce timer, removes both listeners, removes the init marker. Does NOT walk the target to clear `data-ln-search-hide` — that is a rendering side effect, not the search component's own state.
@@ -1,8 +0,0 @@
1
- @use '../../scss/config/mixins' as *;
2
-
3
- [data-ln-debug] {
4
- // 1. Search Trigger Check: data-ln-search must target a component ID and cannot be empty
5
- [data-ln-search=""] {
6
- @include dev-inline-error("data-ln-search target is empty");
7
- }
8
- }
@@ -1 +0,0 @@
1
- (function(){"use strict";if(typeof window<"u"){const t=console.warn;console.warn=function(...e){typeof e[0]=="string"&&(e[0].startsWith("[ln-")||e[0].startsWith("[lnCore"))&&!(document.documentElement.hasAttribute("data-ln-debug")||document.body&&document.body.hasAttribute("data-ln-debug"))||t.apply(console,e)}}const g={};function q(t,e){g[t]||(g[t]=document.querySelector('[data-ln-template="'+t+'"]'));const o=g[t];return o?o.content.cloneNode(!0):(console.warn("["+(e||"ln-core")+'] Template "'+t+'" not found'),null)}function I(t,e,o){const a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:o||{}});return t.dispatchEvent(a),a}function A(t,e){if(!t||!e)return t;const o=t.querySelectorAll("[data-ln-field]");for(let n=0;n<o.length;n++){const r=o[n],l=r.getAttribute("data-ln-field");e[l]!=null&&(r.textContent=e[l])}const a=t.querySelectorAll("[data-ln-attr]");for(let n=0;n<a.length;n++){const r=a[n],l=r.getAttribute("data-ln-attr").split(",");for(let s=0;s<l.length;s++){const u=l[s].trim().split(":");if(u.length!==2)continue;const d=u[0].trim(),f=u[1].trim();e[f]!=null&&r.setAttribute(d,e[f])}}const c=t.querySelectorAll("[data-ln-show]");for(let n=0;n<c.length;n++){const r=c[n],l=r.getAttribute("data-ln-show");l in e&&r.classList.toggle("hidden",!e[l])}const i=t.querySelectorAll("[data-ln-class]");for(let n=0;n<i.length;n++){const r=i[n],l=r.getAttribute("data-ln-class").split(",");for(let s=0;s<l.length;s++){const u=l[s].trim().split(":");if(u.length!==2)continue;const d=u[0].trim(),f=u[1].trim();f in e&&r.classList.toggle(d,!!e[f])}}return t}function D(t,e){t.matches&&t.matches("[data-ln-form], [data-ln-fillable]")&&t.dispatchEvent(new CustomEvent("ln-fill",{detail:e??null,bubbles:!0}));const o=t.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let a=0;a<o.length;a++)o[a].dispatchEvent(new CustomEvent("ln-fill",{detail:e??null,bubbles:!0}));return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(t){if(!(!t.target.matches||!t.target.matches("[data-ln-fillable]")))if(t.detail)A(t.target,t.detail);else{const e=t.target.querySelectorAll("[data-ln-field]");for(let o=0;o<e.length;o++)e[o].textContent=""}})));function v(t,e){if(!t||!e)return t;const o=document.createTreeWalker(t,NodeFilter.SHOW_TEXT);for(;o.nextNode();){const i=o.currentNode;i.textContent.indexOf("{{")!==-1&&(i.textContent=i.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(n,r){return e[r]!==void 0?e[r]:""}))}const a=function(i,n){return e[n]!==void 0?e[n]:""},c=Array.from(t.querySelectorAll("*"));t.nodeType===1&&c.push(t);for(let i=0;i<c.length;i++){const n=c[i],r=n.attributes;for(let l=0;l<r.length;l++){const s=r[l];s.value.indexOf("{{")!==-1&&n.setAttribute(s.name,s.value.replace(/\{\{\s*(\w+)\s*\}\}/g,a))}}return t}function N(t,e,o,a,c,i){const n={};for(let l=0;l<t.children.length;l++){const s=t.children[l],u=s.getAttribute("data-ln-key");u&&(n[u]=s)}const r=document.createDocumentFragment();for(let l=0;l<e.length;l++){const s=e[l],u=String(a(s));let d=n[u];if(d)c(d,s,l);else{const f=q(o,i);if(!f||(v(f,s),d=f.firstElementChild,!d))continue;d.setAttribute("data-ln-key",u),c(d,s,l)}r.appendChild(d)}t.textContent="",t.appendChild(r)}function S(t,e){if(!document.body){document.addEventListener("DOMContentLoaded",function(){S(t,e)}),console.warn("["+e+'] Script loaded before <body> — add "defer" to your <script> tag');return}t()}function w(t,e,o,a){if(t.nodeType!==1)return;const i=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1?e:"["+e+"]",n=Array.from(t.querySelectorAll(i));t.matches&&t.matches(i)&&n.push(t);for(const r of n)r[o]||(r[o]=new a(r))}function B(t,e,o,a,c={}){const i=c.extraAttributes||[],n=c.onAttributeChange||null,r=c.onInit||null;function l(s){const u=s||document.body;w(u,t,e,o),r&&r(u)}return S(function(){const s=new MutationObserver(function(d){for(let f=0;f<d.length;f++){const h=d[f];if(h.type==="childList"){for(let m=0;m<h.addedNodes.length;m++){const p=h.addedNodes[m];p.nodeType===1&&(w(p,t,e,o),r&&r(p))}for(let m=0;m<h.removedNodes.length;m++){const p=h.removedNodes[m];if(p.nodeType===1){const O=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",y=Array.from(p.querySelectorAll(O));p.matches&&p.matches(O)&&y.push(p);for(let C=0;C<y.length;C++){const k=y[C];if(!document.contains(k)){const _=k[e];_&&typeof _.destroy=="function"&&_.destroy()}}}}}else h.type==="attributes"&&(n&&h.target[e]?n(h.target,h.attributeName):(w(h.target,t,e,o),r&&r(h.target)))}});let u=[];if(t.indexOf("[")!==-1){const d=/\[([\w-]+)/g;let f;for(;(f=d.exec(t))!==null;)u.push(f[1])}else u.push(t);s.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:u.concat(i)})},a),window[e]=l,document.readyState==="loading"?document.addEventListener("DOMContentLoaded",function(){l(document.body)}):l(document.body),l}const E={};function M(t,e){E[t]=e}function j(t){return E[t]||{ingress:e=>e,egress:e=>e}}const L={};function T(t,e){if(!t||typeof e!="object")return;const o=t.toLowerCase().split("-")[0];L[o]=e}function U(t){if(!t)return null;const e=t.toLowerCase().split("-")[0];return L[e]||null}T("mk",{monthsLong:["јануари","февруари","март","април","мај","јуни","јули","август","септември","октомври","ноември","декември"],monthsShort:["јан","фев","мар","апр","мај","јун","јул","авг","септ","окт","ноем","дек"],daysLong:["недела","понеделник","вторник","среда","четврток","петок","сабота"],daysShort:["нед","пон","вт","ср","чет","пет","саб"]}),typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=M,window.lnCore.getDataMapper=j,window.lnCore.registerLocaleFallback=T,window.lnCore.getLocaleFallback=U,window.lnCore.fillTemplate=v,window.lnCore.fill=A,window.lnCore.lnFill=D,window.lnCore.renderList=N);function x(t){return(t||"").replace(/^#/,"")}function b(t){const e=t===void 0?location.hash:t,o={},a=x(e);if(!a)return o;const c=a.split("&");for(let i=0;i<c.length;i++){const n=c[i];if(!n)continue;const r=n.indexOf(":"),l=r>-1?n.slice(0,r):n,s=r>-1?n.slice(r+1):"";if(l)try{o[l]=decodeURIComponent(s)}catch{o[l]=s}}return o}function W(t){if(!t)return null;const e=b();return t in e?e[t]:null}function F(t,e){if(!t)return;const o=b();e==null?delete o[t]:o[t]=String(e);const c=Object.keys(o).map(function(i){const n=o[i];return n===""?i:i+":"+encodeURIComponent(n)}).join("&");x(location.hash)!==c&&(location.hash=c)}function R(t){return t.button===1||t.ctrlKey||t.metaKey||t.shiftKey?!1:(t.preventDefault(),!0)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=b,window.lnCore.hashGet=W,window.lnCore.hashSet=F,window.lnCore.hashLinkClick=R),(function(){const t="data-ln-search",e="lnSearch",o="data-ln-search-hide";if(window[e]!==void 0)return;function c(i){this.dom=i,this.targetId=i.getAttribute(t);const n=i.tagName;this.input=n==="INPUT"||n==="TEXTAREA"?i:i.querySelector('[name="search"]')||i.querySelector('input[type="search"]')||i.querySelector('input[type="text"]'),this.itemsSelector=i.getAttribute("data-ln-search-items")||null;const r=i.getAttribute("data-ln-search-debounce");if(this.debounceTime=r!==null?parseInt(r,10):500,isNaN(this.debounceTime)&&(this.debounceTime=500),this._debounceTimer=null,this._attachHandler(),this.input&&this.input.value.trim()){const l=this;queueMicrotask(function(){l._search(l.input.value.trim().toLowerCase())})}return this}c.prototype._attachHandler=function(){if(!this.input)return;const i=this,n=this.dom===this.input?this.input.parentElement:this.dom;this._clearBtn=n?n.querySelector("[data-ln-search-clear]"):null,this._clearBtn&&(this._onClear=function(){i.input.value="",i._search(""),i.input.focus()},this._clearBtn.addEventListener("click",this._onClear)),this._onInput=function(){clearTimeout(i._debounceTimer),i._debounceTimer=setTimeout(function(){i._search(i.input.value.trim().toLowerCase())},i.debounceTime)},this.input.addEventListener("input",this._onInput)},c.prototype._search=function(i){const n=document.getElementById(this.targetId);if(!n||I(n,"ln-search:change",{term:i,targetId:this.targetId}).defaultPrevented)return;const l=this.itemsSelector?n.querySelectorAll(this.itemsSelector):n.children;for(let s=0;s<l.length;s++){const u=l[s];u.removeAttribute(o),i&&!u.textContent.replace(/\s+/g," ").toLowerCase().includes(i)&&u.setAttribute(o,"true")}},c.prototype.destroy=function(){this.dom[e]&&(clearTimeout(this._debounceTimer),this.input&&this._onInput&&this.input.removeEventListener("input",this._onInput),this._clearBtn&&this._onClear&&this._clearBtn.removeEventListener("click",this._onClear),delete this.dom[e])},B(t,e,c,"ln-search")})()})();
@@ -1,117 +0,0 @@
1
- import { dispatchCancelable, registerComponent } from '../../ln-core';
2
-
3
- (function () {
4
- const DOM_SELECTOR = 'data-ln-search';
5
- const DOM_ATTRIBUTE = 'lnSearch';
6
- const HIDE_ATTR = 'data-ln-search-hide';
7
- const DEBOUNCE_MS = 500;
8
-
9
- if (window[DOM_ATTRIBUTE] !== undefined) return;
10
-
11
- // ─── Component ─────────────────────────────────────────────
12
-
13
- function _component(dom) {
14
- this.dom = dom;
15
- this.targetId = dom.getAttribute(DOM_SELECTOR);
16
-
17
- // Support data-ln-search directly on <input> or on a wrapper element
18
- const tag = dom.tagName;
19
- this.input = (tag === 'INPUT' || tag === 'TEXTAREA') ? dom
20
- : dom.querySelector('[name="search"]')
21
- || dom.querySelector('input[type="search"]')
22
- || dom.querySelector('input[type="text"]');
23
-
24
- this.itemsSelector = dom.getAttribute('data-ln-search-items') || null;
25
-
26
- const debounceVal = dom.getAttribute('data-ln-search-debounce');
27
- this.debounceTime = debounceVal !== null ? parseInt(debounceVal, 10) : DEBOUNCE_MS;
28
- if (isNaN(this.debounceTime)) this.debounceTime = DEBOUNCE_MS;
29
-
30
- this._debounceTimer = null;
31
-
32
- this._attachHandler();
33
-
34
- // Apply initial value (browser form restore may pre-fill the input).
35
- // Deferred so all components finish init before the event dispatches.
36
- if (this.input && this.input.value.trim()) {
37
- const self = this;
38
- queueMicrotask(function () {
39
- self._search(self.input.value.trim().toLowerCase());
40
- });
41
- }
42
-
43
- return this;
44
- }
45
-
46
- // ─── Handler ───────────────────────────────────────────────
47
-
48
- _component.prototype._attachHandler = function () {
49
- if (!this.input) return;
50
- const self = this;
51
-
52
- // Clear button: when data-ln-search is on the input itself, the clear button
53
- // lives in the input's immediate wrapper (inputs have no element children).
54
- // Otherwise (wrapper-host) scope is dom — unchanged behavior.
55
- const scope = (this.dom === this.input) ? this.input.parentElement : this.dom;
56
- this._clearBtn = scope ? scope.querySelector('[data-ln-search-clear]') : null;
57
- if (this._clearBtn) {
58
- this._onClear = function () {
59
- self.input.value = '';
60
- self._search('');
61
- self.input.focus();
62
- };
63
- this._clearBtn.addEventListener('click', this._onClear);
64
- }
65
-
66
- this._onInput = function () {
67
- clearTimeout(self._debounceTimer);
68
- self._debounceTimer = setTimeout(function () {
69
- self._search(self.input.value.trim().toLowerCase());
70
- }, self.debounceTime);
71
- };
72
-
73
- this.input.addEventListener('input', this._onInput);
74
- };
75
-
76
- _component.prototype._search = function (term) {
77
- const target = document.getElementById(this.targetId);
78
- if (!target) return;
79
-
80
- // Dispatch cancelable event on target.
81
- // Consumers (e.g. ln-table) can call preventDefault() to handle filtering
82
- // themselves and skip the default DOM show/hide behaviour.
83
- const evt = dispatchCancelable(target, 'ln-search:change', { term: term, targetId: this.targetId });
84
- if (evt.defaultPrevented) return;
85
-
86
- // Default behaviour: show/hide items in target
87
- // data-ln-search-items="selector" enables deep targeting via querySelectorAll
88
- const children = this.itemsSelector
89
- ? target.querySelectorAll(this.itemsSelector)
90
- : target.children;
91
-
92
- for (let i = 0; i < children.length; i++) {
93
- const el = children[i];
94
- el.removeAttribute(HIDE_ATTR);
95
-
96
- if (term && !el.textContent.replace(/\s+/g, ' ').toLowerCase().includes(term)) {
97
- el.setAttribute(HIDE_ATTR, 'true');
98
- }
99
- }
100
- };
101
-
102
- _component.prototype.destroy = function () {
103
- if (!this.dom[DOM_ATTRIBUTE]) return;
104
- clearTimeout(this._debounceTimer);
105
- if (this.input && this._onInput) {
106
- this.input.removeEventListener('input', this._onInput);
107
- }
108
- if (this._clearBtn && this._onClear) {
109
- this._clearBtn.removeEventListener('click', this._onClear);
110
- }
111
- delete this.dom[DOM_ATTRIBUTE];
112
- };
113
-
114
- // ─── Init ──────────────────────────────────────────────────
115
-
116
- registerComponent(DOM_SELECTOR, DOM_ATTRIBUTE, _component, 'ln-search');
117
- })();
@@ -1 +0,0 @@
1
- (function(){"use strict";if(typeof window<"u"){const t=console.warn;console.warn=function(...e){typeof e[0]=="string"&&(e[0].startsWith("[ln-")||e[0].startsWith("[lnCore"))&&!(document.documentElement.hasAttribute("data-ln-debug")||document.body&&document.body.hasAttribute("data-ln-debug"))||t.apply(console,e)}}const m={};function N(t,e){m[t]||(m[t]=document.querySelector('[data-ln-template="'+t+'"]'));const r=m[t];return r?r.content.cloneNode(!0):(console.warn("["+(e||"ln-core")+'] Template "'+t+'" not found'),null)}function S(t,e){if(!t||!e)return t;const r=t.querySelectorAll("[data-ln-field]");for(let n=0;n<r.length;n++){const i=r[n],o=i.getAttribute("data-ln-field");e[o]!=null&&(i.textContent=e[o])}const c=t.querySelectorAll("[data-ln-attr]");for(let n=0;n<c.length;n++){const i=c[n],o=i.getAttribute("data-ln-attr").split(",");for(let u=0;u<o.length;u++){const a=o[u].trim().split(":");if(a.length!==2)continue;const f=a[0].trim(),d=a[1].trim();e[d]!=null&&i.setAttribute(f,e[d])}}const l=t.querySelectorAll("[data-ln-show]");for(let n=0;n<l.length;n++){const i=l[n],o=i.getAttribute("data-ln-show");o in e&&i.classList.toggle("hidden",!e[o])}const s=t.querySelectorAll("[data-ln-class]");for(let n=0;n<s.length;n++){const i=s[n],o=i.getAttribute("data-ln-class").split(",");for(let u=0;u<o.length;u++){const a=o[u].trim().split(":");if(a.length!==2)continue;const f=a[0].trim(),d=a[1].trim();d in e&&i.classList.toggle(f,!!e[d])}}return t}function q(t,e){t.matches&&t.matches("[data-ln-form], [data-ln-fillable]")&&t.dispatchEvent(new CustomEvent("ln-fill",{detail:e??null,bubbles:!0}));const r=t.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let c=0;c<r.length;c++)r[c].dispatchEvent(new CustomEvent("ln-fill",{detail:e??null,bubbles:!0}));return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(t){if(!(!t.target.matches||!t.target.matches("[data-ln-fillable]")))if(t.detail)S(t.target,t.detail);else{const e=t.target.querySelectorAll("[data-ln-field]");for(let r=0;r<e.length;r++)e[r].textContent=""}})));function v(t,e){if(!t||!e)return t;const r=document.createTreeWalker(t,NodeFilter.SHOW_TEXT);for(;r.nextNode();){const s=r.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(n,i){return e[i]!==void 0?e[i]:""}))}const c=function(s,n){return e[n]!==void 0?e[n]:""},l=Array.from(t.querySelectorAll("*"));t.nodeType===1&&l.push(t);for(let s=0;s<l.length;s++){const n=l[s],i=n.attributes;for(let o=0;o<i.length;o++){const u=i[o];u.value.indexOf("{{")!==-1&&n.setAttribute(u.name,u.value.replace(/\{\{\s*(\w+)\s*\}\}/g,c))}}return t}function D(t,e,r,c,l,s){const n={};for(let o=0;o<t.children.length;o++){const u=t.children[o],a=u.getAttribute("data-ln-key");a&&(n[a]=u)}const i=document.createDocumentFragment();for(let o=0;o<e.length;o++){const u=e[o],a=String(c(u));let f=n[a];if(f)l(f,u,o);else{const d=N(r,s);if(!d||(v(d,u),f=d.firstElementChild,!f))continue;f.setAttribute("data-ln-key",a),l(f,u,o)}i.appendChild(f)}t.textContent="",t.appendChild(i)}function A(t,e){if(!document.body){document.addEventListener("DOMContentLoaded",function(){A(t,e)}),console.warn("["+e+'] Script loaded before <body> — add "defer" to your <script> tag');return}t()}function w(t,e,r,c){if(t.nodeType!==1)return;const s=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1?e:"["+e+"]",n=Array.from(t.querySelectorAll(s));t.matches&&t.matches(s)&&n.push(t);for(const i of n)i[r]||(i[r]=new c(i))}function M(t,e,r,c,l={}){const s=l.extraAttributes||[],n=l.onAttributeChange||null,i=l.onInit||null;function o(u){const a=u||document.body;w(a,t,e,r),i&&i(a)}return A(function(){const u=new MutationObserver(function(f){for(let d=0;d<f.length;d++){const h=f[d];if(h.type==="childList"){for(let g=0;g<h.addedNodes.length;g++){const p=h.addedNodes[g];p.nodeType===1&&(w(p,t,e,r),i&&i(p))}for(let g=0;g<h.removedNodes.length;g++){const p=h.removedNodes[g];if(p.nodeType===1){const k=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",b=Array.from(p.querySelectorAll(k));p.matches&&p.matches(k)&&b.push(p);for(let C=0;C<b.length;C++){const T=b[C];if(!document.contains(T)){const L=T[e];L&&typeof L.destroy=="function"&&L.destroy()}}}}}else h.type==="attributes"&&(n&&h.target[e]?n(h.target,h.attributeName):(w(h.target,t,e,r),i&&i(h.target)))}});let a=[];if(t.indexOf("[")!==-1){const f=/\[([\w-]+)/g;let d;for(;(d=f.exec(t))!==null;)a.push(d[1])}else a.push(t);u.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:a.concat(s)})},c),window[e]=o,document.readyState==="loading"?document.addEventListener("DOMContentLoaded",function(){o(document.body)}):o(document.body),o}const _={};function j(t,e){_[t]=e}function W(t){return _[t]||{ingress:e=>e,egress:e=>e}}const x={};function E(t,e){if(!t||typeof e!="object")return;const r=t.toLowerCase().split("-")[0];x[r]=e}function F(t){if(!t)return null;const e=t.toLowerCase().split("-")[0];return x[e]||null}E("mk",{monthsLong:["јануари","февруари","март","април","мај","јуни","јули","август","септември","октомври","ноември","декември"],monthsShort:["јан","фев","мар","апр","мај","јун","јул","авг","септ","окт","ноем","дек"],daysLong:["недела","понеделник","вторник","среда","четврток","петок","сабота"],daysShort:["нед","пон","вт","ср","чет","пет","саб"]}),typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=j,window.lnCore.getDataMapper=W,window.lnCore.registerLocaleFallback=E,window.lnCore.getLocaleFallback=F,window.lnCore.fillTemplate=v,window.lnCore.fill=S,window.lnCore.lnFill=q,window.lnCore.renderList=D);function O(t){return(t||"").replace(/^#/,"")}function y(t){const e=t===void 0?location.hash:t,r={},c=O(e);if(!c)return r;const l=c.split("&");for(let s=0;s<l.length;s++){const n=l[s];if(!n)continue;const i=n.indexOf(":"),o=i>-1?n.slice(0,i):n,u=i>-1?n.slice(i+1):"";if(o)try{r[o]=decodeURIComponent(u)}catch{r[o]=u}}return r}function I(t){if(!t)return null;const e=y();return t in e?e[t]:null}function B(t,e){if(!t)return;const r=y();e==null?delete r[t]:r[t]=String(e);const l=Object.keys(r).map(function(s){const n=r[s];return n===""?s:s+":"+encodeURIComponent(n)}).join("&");O(location.hash)!==l&&(location.hash=l)}function R(t){return t.button===1||t.ctrlKey||t.metaKey||t.shiftKey?!1:(t.preventDefault(),!0)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=y,window.lnCore.hashGet=I,window.lnCore.hashSet=B,window.lnCore.hashLinkClick=R),(function(){const t="data-ln-slug-from",e="lnSlug";if(window[e]!==void 0)return;function r(l){return String(l).toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}function c(l){if(l.tagName!=="INPUT")return console.warn("[ln-slug] Can only be applied to <input>, got:",l.tagName),this;const s=l.form;if(!s)return console.warn("[ln-slug] Slug input is not inside a <form>:",l),this;const n=l.getAttribute(t),i=s.elements[n];if(!i)return console.warn('[ln-slug] Source field "'+n+'" not found in form:',l),this;if(typeof i.addEventListener!="function")return console.warn('[ln-slug] Source field "'+n+'" is a RadioNodeList (same-name group) — single source field required:',l),this;this.dom=l,this.source=i,this._pristine=l.value==="",this._mirroring=!1;const o=this;return this._onSource=function(){o._pristine&&o._mirror()},this._onSlug=function(){o._mirroring||(o._pristine=o.dom.value==="")},i.addEventListener("input",this._onSource),l.addEventListener("input",this._onSlug),this}c.prototype._mirror=function(){this._mirroring=!0,this.dom.value=r(this.source.value),this.dom.dispatchEvent(new Event("input",{bubbles:!0})),this._mirroring=!1},c.prototype.destroy=function(){this.dom[e]&&(this.source.removeEventListener("input",this._onSource),this.dom.removeEventListener("input",this._onSlug),delete this.dom[e])},M(t,e,c,"ln-slug")})()})();
@@ -1 +0,0 @@
1
- (function(){"use strict";if(typeof window<"u"){const t=console.warn;console.warn=function(...e){typeof e[0]=="string"&&(e[0].startsWith("[ln-")||e[0].startsWith("[lnCore"))&&!(document.documentElement.hasAttribute("data-ln-debug")||document.body&&document.body.hasAttribute("data-ln-debug"))||t.apply(console,e)}}const S={};function B(t,e){S[t]||(S[t]=document.querySelector('[data-ln-template="'+t+'"]'));const n=S[t];return n?n.content.cloneNode(!0):(console.warn("["+(e||"ln-core")+'] Template "'+t+'" not found'),null)}function j(t,e,n){const i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n||{}});return t.dispatchEvent(i),i}function L(t,e){if(!t||!e)return t;const n=t.querySelectorAll("[data-ln-field]");for(let l=0;l<n.length;l++){const o=n[l],c=o.getAttribute("data-ln-field");e[c]!=null&&(o.textContent=e[c])}const i=t.querySelectorAll("[data-ln-attr]");for(let l=0;l<i.length;l++){const o=i[l],c=o.getAttribute("data-ln-attr").split(",");for(let r=0;r<c.length;r++){const u=c[r].trim().split(":");if(u.length!==2)continue;const s=u[0].trim(),d=u[1].trim();e[d]!=null&&o.setAttribute(s,e[d])}}const f=t.querySelectorAll("[data-ln-show]");for(let l=0;l<f.length;l++){const o=f[l],c=o.getAttribute("data-ln-show");c in e&&o.classList.toggle("hidden",!e[c])}const a=t.querySelectorAll("[data-ln-class]");for(let l=0;l<a.length;l++){const o=a[l],c=o.getAttribute("data-ln-class").split(",");for(let r=0;r<c.length;r++){const u=c[r].trim().split(":");if(u.length!==2)continue;const s=u[0].trim(),d=u[1].trim();d in e&&o.classList.toggle(s,!!e[d])}}return t}function K(t,e){t.matches&&t.matches("[data-ln-form], [data-ln-fillable]")&&t.dispatchEvent(new CustomEvent("ln-fill",{detail:e??null,bubbles:!0}));const n=t.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let i=0;i<n.length;i++)n[i].dispatchEvent(new CustomEvent("ln-fill",{detail:e??null,bubbles:!0}));return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(t){if(!(!t.target.matches||!t.target.matches("[data-ln-fillable]")))if(t.detail)L(t.target,t.detail);else{const e=t.target.querySelectorAll("[data-ln-field]");for(let n=0;n<e.length;n++)e[n].textContent=""}})));function E(t,e){if(!t||!e)return t;const n=document.createTreeWalker(t,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const a=n.currentNode;a.textContent.indexOf("{{")!==-1&&(a.textContent=a.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(l,o){return e[o]!==void 0?e[o]:""}))}const i=function(a,l){return e[l]!==void 0?e[l]:""},f=Array.from(t.querySelectorAll("*"));t.nodeType===1&&f.push(t);for(let a=0;a<f.length;a++){const l=f[a],o=l.attributes;for(let c=0;c<o.length;c++){const r=o[c];r.value.indexOf("{{")!==-1&&l.setAttribute(r.name,r.value.replace(/\{\{\s*(\w+)\s*\}\}/g,i))}}return t}function W(t,e,n,i,f,a){const l={};for(let c=0;c<t.children.length;c++){const r=t.children[c],u=r.getAttribute("data-ln-key");u&&(l[u]=r)}const o=document.createDocumentFragment();for(let c=0;c<e.length;c++){const r=e[c],u=String(i(r));let s=l[u];if(s)f(s,r,c);else{const d=B(n,a);if(!d||(E(d,r),s=d.firstElementChild,!s))continue;s.setAttribute("data-ln-key",u),f(s,r,c)}o.appendChild(s)}t.textContent="",t.appendChild(o)}function T(t,e){if(!document.body){document.addEventListener("DOMContentLoaded",function(){T(t,e)}),console.warn("["+e+'] Script loaded before <body> — add "defer" to your <script> tag');return}t()}function _(t,e,n,i){if(t.nodeType!==1)return;const a=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1?e:"["+e+"]",l=Array.from(t.querySelectorAll(a));t.matches&&t.matches(a)&&l.push(t);for(const o of l)o[n]||(o[n]=new i(o))}const x={mk:"mk-MK",de:"de-DE",fr:"fr-FR",es:"es-ES",it:"it-IT",nl:"nl-NL",pt:"pt-PT",ru:"ru-RU",bg:"bg-BG",hr:"hr-HR",sr:"sr-RS",sq:"sq-AL",el:"el-GR",en:"en-US"};function U(t){const e=t?t.closest("[lang]"):null,n=(e?e.getAttribute("lang")||e.lang:null)||(document.documentElement?document.documentElement.getAttribute("lang")||document.documentElement.lang:null)||navigator.language;if(!n)return"en-US";const i=n.trim().toLowerCase();return i.indexOf("-")===-1&&x[i]?x[i]:n}function k(t){return t.hasAttribute("data-ln-value")?t.getAttribute("data-ln-value"):t.textContent.trim()}function G(t){let e=!1;for(let n=0;n<t.length;n++){const i=t[n];if(!(i===""||i==null)&&(e=!0,!Number.isFinite(Number(i))))return"string"}return e?"number":"string"}function V(t,e,n,i){if(n==="number"){const l=parseFloat(t),o=parseFloat(e);return(isNaN(l)?0:l)-(isNaN(o)?0:o)}const f=t!=null?String(t):"",a=e!=null?String(e):"";return i?i.compare(f,a):f<a?-1:f>a?1:0}function P(t,e,n,i,f={}){const a=f.extraAttributes||[],l=f.onAttributeChange||null,o=f.onInit||null;function c(r){const u=r||document.body;_(u,t,e,n),o&&o(u)}return T(function(){const r=new MutationObserver(function(s){for(let d=0;d<s.length;d++){const h=s[d];if(h.type==="childList"){for(let p=0;p<h.addedNodes.length;p++){const g=h.addedNodes[p];g.nodeType===1&&(_(g,t,e,n),o&&o(g))}for(let p=0;p<h.removedNodes.length;p++){const g=h.removedNodes[p];if(g.nodeType===1){const A=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",b=Array.from(g.querySelectorAll(A));g.matches&&g.matches(A)&&b.push(g);for(let w=0;w<b.length;w++){const y=b[w];if(!document.contains(y)){const C=y[e];C&&typeof C.destroy=="function"&&C.destroy()}}}}}else h.type==="attributes"&&(l&&h.target[e]?l(h.target,h.attributeName):(_(h.target,t,e,n),o&&o(h.target)))}});let u=[];if(t.indexOf("[")!==-1){const s=/\[([\w-]+)/g;let d;for(;(d=s.exec(t))!==null;)u.push(d[1])}else u.push(t);r.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:u.concat(a)})},i),window[e]=c,document.readyState==="loading"?document.addEventListener("DOMContentLoaded",function(){c(document.body)}):c(document.body),c}const I={};function H(t,e){I[t]=e}function J(t){return I[t]||{ingress:e=>e,egress:e=>e}}const O={};function q(t,e){if(!t||typeof e!="object")return;const n=t.toLowerCase().split("-")[0];O[n]=e}function X(t){if(!t)return null;const e=t.toLowerCase().split("-")[0];return O[e]||null}q("mk",{monthsLong:["јануари","февруари","март","април","мај","јуни","јули","август","септември","октомври","ноември","декември"],monthsShort:["јан","фев","мар","апр","мај","јун","јул","авг","септ","окт","ноем","дек"],daysLong:["недела","понеделник","вторник","среда","четврток","петок","сабота"],daysShort:["нед","пон","вт","ср","чет","пет","саб"]}),typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=H,window.lnCore.getDataMapper=J,window.lnCore.registerLocaleFallback=q,window.lnCore.getLocaleFallback=X,window.lnCore.fillTemplate=E,window.lnCore.fill=L,window.lnCore.lnFill=K,window.lnCore.renderList=W);const $="ln:";let m=null;function N(){if(m!==null)return m;try{if(typeof localStorage>"u")return m=!1,!1;const t="__ln_test__";localStorage.setItem(t,t),localStorage.removeItem(t),m=!0}catch{m=!1}return m}function z(){return location.pathname.replace(/\/+$/,"").toLowerCase()||"/"}function D(t,e){const n=e.getAttribute("data-ln-persist"),i=n!==null&&n!==""?n:e.id;return i?$+t+":"+z()+":"+i:(console.warn('[ln-persist] Element requires id or data-ln-persist="key"',e),null)}function Q(t,e){if(!N())return null;const n=D(t,e);if(!n)return null;try{const i=localStorage.getItem(n);return i!==null?JSON.parse(i):null}catch{return null}}function R(t,e,n){if(!N())return;const i=D(t,e);if(i)try{n==null?localStorage.removeItem(i):localStorage.setItem(i,JSON.stringify(n))}catch{}}function F(t){return(t||"").replace(/^#/,"")}function v(t){const e=t===void 0?location.hash:t,n={},i=F(e);if(!i)return n;const f=i.split("&");for(let a=0;a<f.length;a++){const l=f[a];if(!l)continue;const o=l.indexOf(":"),c=o>-1?l.slice(0,o):l,r=o>-1?l.slice(o+1):"";if(c)try{n[c]=decodeURIComponent(r)}catch{n[c]=r}}return n}function Y(t){if(!t)return null;const e=v();return t in e?e[t]:null}function Z(t,e){if(!t)return;const n=v();e==null?delete n[t]:n[t]=String(e);const f=Object.keys(n).map(function(a){const l=n[a];return l===""?a:a+":"+encodeURIComponent(l)}).join("&");F(location.hash)!==f&&(location.hash=f)}function tt(t){return t.button===1||t.ctrlKey||t.metaKey||t.shiftKey?!1:(t.preventDefault(),!0)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=v,window.lnCore.hashGet=Y,window.lnCore.hashSet=Z,window.lnCore.hashLinkClick=tt),(function(){const t="data-ln-sort",e="lnSort",n="data-ln-sort-field",i="data-ln-sort-state",f="data-ln-sort-dir",a="data-ln-sort-items";if(window[e]!==void 0)return;function l(r,u){if(u){const s=r.querySelector('[data-ln-field="'+u+'"]');if(s)return k(s)}return k(r)}function o(r){this.dom=r,this.targetId=r.getAttribute(t),this.field=r.getAttribute(n)||null;const u=r.closest("th");this.column=!this.field&&u?u.cellIndex:null,this.itemsSelector=r.getAttribute(a)||null,this._initialOrder=null;const s=document.getElementById(this.targetId);s&&(this._initialOrder=this.itemsSelector?Array.from(s.querySelectorAll(this.itemsSelector)):Array.from(s.children)),this._target=s;const d=this;if(this._onClick=function(h){const p=h.target.closest("["+f+"]");p&&d._apply(p.getAttribute(f))},r.addEventListener("click",this._onClick),this._onTargetChange=function(h){(d.field?h.detail.field===d.field:h.detail.column===d.column)||(r.setAttribute(i,"none"),r.hasAttribute("data-ln-persist")&&R("sort",r,null))},s&&s.addEventListener("ln-sort:change",this._onTargetChange),r.hasAttribute("data-ln-persist")){const h=Q("sort",r);h&&h.direction&&queueMicrotask(function(){d._apply(h.direction,!0)})}return this}o.prototype._apply=function(r,u){this.dom.setAttribute(i,r);const s=this._target||document.getElementById(this.targetId);if(!s)return;const d={field:this.field,column:this.column,direction:r,targetId:this.targetId};!u&&this.dom.hasAttribute("data-ln-persist")&&R("sort",this.dom,r==="none"?null:d),!j(s,"ln-sort:change",d).defaultPrevented&&this._defaultSort(s,r)},o.prototype._defaultSort=function(r,u){const s=this.itemsSelector?Array.from(r.querySelectorAll(this.itemsSelector)):Array.from(r.children);if(!s.length)return;const d=s[0].parentNode;let h;if(u==="none")h=(this._initialOrder||s).filter(function(g){return g.parentNode===d});else{const g=this.field,M=s.map(function(y){return l(y,g)}),A=G(M),b=typeof Intl<"u"?new Intl.Collator(U(this.dom),{sensitivity:"base"}):null,w=u==="desc"?-1:1;h=s.slice().sort(function(y,C){return V(l(y,g),l(C,g),A,b)*w})}const p=document.createDocumentFragment();for(let g=0;g<h.length;g++)p.appendChild(h[g]);d.appendChild(p)},o.prototype.destroy=function(){this.dom[e]&&(this.dom.removeEventListener("click",this._onClick),this._target&&this._target.removeEventListener("ln-sort:change",this._onTargetChange),delete this.dom[e])};function c(r,u){const s=r[e];if(s)if(u===n){s.field=r.getAttribute(n)||null;const d=r.closest("th");s.column=!s.field&&d?d.cellIndex:null}else u===a&&(s.itemsSelector=r.getAttribute(a)||null)}P(t,e,o,"ln-sort",{extraAttributes:[n,a],onAttributeChange:c})})()})();
@@ -1,178 +0,0 @@
1
- import { dispatchCancelable, readValue, getLocale, detectValueType, compareValues, registerComponent, persistGet, persistSet } from '../../ln-core';
2
-
3
- (function () {
4
- const DOM_SELECTOR = 'data-ln-sort';
5
- const DOM_ATTRIBUTE = 'lnSort';
6
- const FIELD_ATTR = 'data-ln-sort-field';
7
- const STATE_ATTR = 'data-ln-sort-state';
8
- const DIR_ATTR = 'data-ln-sort-dir';
9
- const ITEMS_ATTR = 'data-ln-sort-items';
10
-
11
- if (window[DOM_ATTRIBUTE] !== undefined) return;
12
-
13
- // Read the value a default-DOM sort compares by: field-matched descendant
14
- // first, else the item itself. Never the column-index fallback — that
15
- // path is SSR/DOM-payload only (see README "No index/field bridge").
16
- function _readItemValue(item, field) {
17
- if (field) {
18
- const el = item.querySelector('[data-ln-field="' + field + '"]');
19
- if (el) return readValue(el);
20
- }
21
- return readValue(item);
22
- }
23
-
24
- // ─── Component ─────────────────────────────────────────────
25
-
26
- function _component(dom) {
27
- this.dom = dom;
28
- this.targetId = dom.getAttribute(DOM_SELECTOR);
29
- this.field = dom.getAttribute(FIELD_ATTR) || null;
30
-
31
- // Index fallback — resolved once, only when no field is authored.
32
- // SSR/DOM-payload path only; never bridged back to `field`.
33
- const th = dom.closest('th');
34
- this.column = (!this.field && th) ? th.cellIndex : null;
35
-
36
- this.itemsSelector = dom.getAttribute(ITEMS_ATTR) || null;
37
-
38
- // Snapshot the pre-sort DOM order once — the only state this
39
- // component holds, needed to restore direction "none".
40
- this._initialOrder = null;
41
- const target = document.getElementById(this.targetId);
42
- if (target) {
43
- this._initialOrder = this.itemsSelector
44
- ? Array.from(target.querySelectorAll(this.itemsSelector))
45
- : Array.from(target.children);
46
- }
47
- this._target = target;
48
-
49
- const self = this;
50
-
51
- this._onClick = function (e) {
52
- const btn = e.target.closest('[' + DIR_ATTR + ']');
53
- if (!btn) return;
54
- self._apply(btn.getAttribute(DIR_ATTR));
55
- };
56
- dom.addEventListener('click', this._onClick);
57
-
58
- // Mutual exclusion — listen on the TARGET (not self). A sibling
59
- // ln-sort instance targeting the same target wins; this instance
60
- // resets to "none". Self-originated events naturally compare equal
61
- // (own field/column always matches itself) and no-op here.
62
- this._onTargetChange = function (e) {
63
- const same = self.field
64
- ? e.detail.field === self.field
65
- : e.detail.column === self.column;
66
- if (same) return;
67
- dom.setAttribute(STATE_ATTR, 'none');
68
- // Single-sort invariant holds in storage too — a losing instance
69
- // must drop its key, else two non-null keys race on next load.
70
- if (dom.hasAttribute('data-ln-persist')) persistSet('sort', dom, null);
71
- };
72
- if (target) target.addEventListener('ln-sort:change', this._onTargetChange);
73
-
74
- // ─── Restore persisted sort ─────────────────────────────
75
- // Deferred — same hazard as ln-search's form-restore dispatch
76
- // (js/ln-search/src/ln-search.js): _apply() dispatches synchronously,
77
- // and a consumer (ln-table/ln-list) targeting the same id may not
78
- // have bound its ln-sort:change listener yet if it constructs later
79
- // in this same init sweep. queueMicrotask waits for that sweep to
80
- // finish first.
81
- if (dom.hasAttribute('data-ln-persist')) {
82
- const saved = persistGet('sort', dom);
83
- if (saved && saved.direction) {
84
- queueMicrotask(function () {
85
- self._apply(saved.direction, true);
86
- });
87
- }
88
- }
89
-
90
- return this;
91
- }
92
-
93
- _component.prototype._apply = function (direction, skipPersist) {
94
- this.dom.setAttribute(STATE_ATTR, direction);
95
-
96
- const target = this._target || document.getElementById(this.targetId);
97
- if (!target) return;
98
-
99
- const detail = {
100
- field: this.field,
101
- column: this.column,
102
- direction: direction,
103
- targetId: this.targetId
104
- };
105
-
106
- if (!skipPersist && this.dom.hasAttribute('data-ln-persist')) {
107
- persistSet('sort', this.dom, direction === 'none' ? null : detail);
108
- }
109
-
110
- const evt = dispatchCancelable(target, 'ln-sort:change', detail);
111
- if (evt.defaultPrevented) return;
112
-
113
- this._defaultSort(target, direction);
114
- };
115
-
116
- // ─── Default DOM behaviour (no consumer claimed the event) ────
117
-
118
- _component.prototype._defaultSort = function (target, direction) {
119
- const items = this.itemsSelector
120
- ? Array.from(target.querySelectorAll(this.itemsSelector))
121
- : Array.from(target.children);
122
- if (!items.length) return;
123
- const parent = items[0].parentNode;
124
-
125
- let ordered;
126
- if (direction === 'none') {
127
- ordered = (this._initialOrder || items).filter(function (el) {
128
- return el.parentNode === parent;
129
- });
130
- } else {
131
- const field = this.field;
132
- const values = items.map(function (el) { return _readItemValue(el, field); });
133
- const type = detectValueType(values);
134
- const collator = typeof Intl !== 'undefined'
135
- ? new Intl.Collator(getLocale(this.dom), { sensitivity: 'base' })
136
- : null;
137
- const multiplier = direction === 'desc' ? -1 : 1;
138
-
139
- ordered = items.slice().sort(function (a, b) {
140
- return compareValues(_readItemValue(a, field), _readItemValue(b, field), type, collator) * multiplier;
141
- });
142
- }
143
-
144
- const frag = document.createDocumentFragment();
145
- for (let i = 0; i < ordered.length; i++) frag.appendChild(ordered[i]);
146
- parent.appendChild(frag);
147
- };
148
-
149
- // ─── Destroy ───────────────────────────────────────────────
150
-
151
- _component.prototype.destroy = function () {
152
- if (!this.dom[DOM_ATTRIBUTE]) return;
153
- this.dom.removeEventListener('click', this._onClick);
154
- if (this._target) this._target.removeEventListener('ln-sort:change', this._onTargetChange);
155
- delete this.dom[DOM_ATTRIBUTE];
156
- };
157
-
158
- // ─── Attribute Sync ────────────────────────────────────────
159
-
160
- function _syncAttribute(el, attrName) {
161
- const instance = el[DOM_ATTRIBUTE];
162
- if (!instance) return;
163
- if (attrName === FIELD_ATTR) {
164
- instance.field = el.getAttribute(FIELD_ATTR) || null;
165
- const th = el.closest('th');
166
- instance.column = (!instance.field && th) ? th.cellIndex : null;
167
- } else if (attrName === ITEMS_ATTR) {
168
- instance.itemsSelector = el.getAttribute(ITEMS_ATTR) || null;
169
- }
170
- }
171
-
172
- // ─── Init ──────────────────────────────────────────────────
173
-
174
- registerComponent(DOM_SELECTOR, DOM_ATTRIBUTE, _component, 'ln-sort', {
175
- extraAttributes: [FIELD_ATTR, ITEMS_ATTR],
176
- onAttributeChange: _syncAttribute
177
- });
178
- })();
@@ -1 +0,0 @@
1
- (function(){"use strict";if(typeof window<"u"){const t=console.warn;console.warn=function(...e){typeof e[0]=="string"&&(e[0].startsWith("[ln-")||e[0].startsWith("[lnCore"))&&!(document.documentElement.hasAttribute("data-ln-debug")||document.body&&document.body.hasAttribute("data-ln-debug"))||t.apply(console,e)}}const g={};function q(t,e){g[t]||(g[t]=document.querySelector('[data-ln-template="'+t+'"]'));const r=g[t];return r?r.content.cloneNode(!0):(console.warn("["+(e||"ln-core")+'] Template "'+t+'" not found'),null)}function m(t,e,r){t.dispatchEvent(new CustomEvent(e,{bubbles:!0,detail:r||{}}))}function M(t,e,r){const d=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r||{}});return t.dispatchEvent(d),d}function L(t,e){if(!t||!e)return t;const r=t.querySelectorAll("[data-ln-field]");for(let n=0;n<r.length;n++){const o=r[n],l=o.getAttribute("data-ln-field");e[l]!=null&&(o.textContent=e[l])}const d=t.querySelectorAll("[data-ln-attr]");for(let n=0;n<d.length;n++){const o=d[n],l=o.getAttribute("data-ln-attr").split(",");for(let s=0;s<l.length;s++){const a=l[s].trim().split(":");if(a.length!==2)continue;const c=a[0].trim(),u=a[1].trim();e[u]!=null&&o.setAttribute(c,e[u])}}const f=t.querySelectorAll("[data-ln-show]");for(let n=0;n<f.length;n++){const o=f[n],l=o.getAttribute("data-ln-show");l in e&&o.classList.toggle("hidden",!e[l])}const i=t.querySelectorAll("[data-ln-class]");for(let n=0;n<i.length;n++){const o=i[n],l=o.getAttribute("data-ln-class").split(",");for(let s=0;s<l.length;s++){const a=l[s].trim().split(":");if(a.length!==2)continue;const c=a[0].trim(),u=a[1].trim();u in e&&o.classList.toggle(c,!!e[u])}}return t}function P(t,e){t.matches&&t.matches("[data-ln-form], [data-ln-fillable]")&&t.dispatchEvent(new CustomEvent("ln-fill",{detail:e??null,bubbles:!0}));const r=t.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let d=0;d<r.length;d++)r[d].dispatchEvent(new CustomEvent("ln-fill",{detail:e??null,bubbles:!0}));return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(t){if(!(!t.target.matches||!t.target.matches("[data-ln-fillable]")))if(t.detail)L(t.target,t.detail);else{const e=t.target.querySelectorAll("[data-ln-field]");for(let r=0;r<e.length;r++)e[r].textContent=""}})));function A(t,e){if(!t||!e)return t;const r=document.createTreeWalker(t,NodeFilter.SHOW_TEXT);for(;r.nextNode();){const i=r.currentNode;i.textContent.indexOf("{{")!==-1&&(i.textContent=i.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(n,o){return e[o]!==void 0?e[o]:""}))}const d=function(i,n){return e[n]!==void 0?e[n]:""},f=Array.from(t.querySelectorAll("*"));t.nodeType===1&&f.push(t);for(let i=0;i<f.length;i++){const n=f[i],o=n.attributes;for(let l=0;l<o.length;l++){const s=o[l];s.value.indexOf("{{")!==-1&&n.setAttribute(s.name,s.value.replace(/\{\{\s*(\w+)\s*\}\}/g,d))}}return t}function I(t,e,r,d,f,i){const n={};for(let l=0;l<t.children.length;l++){const s=t.children[l],a=s.getAttribute("data-ln-key");a&&(n[a]=s)}const o=document.createDocumentFragment();for(let l=0;l<e.length;l++){const s=e[l],a=String(d(s));let c=n[a];if(c)f(c,s,l);else{const u=q(r,i);if(!u||(A(u,s),c=u.firstElementChild,!c))continue;c.setAttribute("data-ln-key",a),f(c,s,l)}o.appendChild(c)}t.textContent="",t.appendChild(o)}function x(t,e){if(!document.body){document.addEventListener("DOMContentLoaded",function(){x(t,e)}),console.warn("["+e+'] Script loaded before <body> — add "defer" to your <script> tag');return}t()}function w(t,e,r,d){if(t.nodeType!==1)return;const i=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1?e:"["+e+"]",n=Array.from(t.querySelectorAll(i));t.matches&&t.matches(i)&&n.push(t);for(const o of n)o[r]||(o[r]=new d(o))}function N(t,e,r,d,f={}){const i=f.extraAttributes||[],n=f.onAttributeChange||null,o=f.onInit||null;function l(s){const a=s||document.body;w(a,t,e,r),o&&o(a)}return x(function(){const s=new MutationObserver(function(c){for(let u=0;u<c.length;u++){const h=c[u];if(h.type==="childList"){for(let p=0;p<h.addedNodes.length;p++){const b=h.addedNodes[p];b.nodeType===1&&(w(b,t,e,r),o&&o(b))}for(let p=0;p<h.removedNodes.length;p++){const b=h.removedNodes[p];if(b.nodeType===1){const D=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",C=Array.from(b.querySelectorAll(D));b.matches&&b.matches(D)&&C.push(b);for(let v=0;v<C.length;v++){const T=C[v];if(!document.contains(T)){const E=T[e];E&&typeof E.destroy=="function"&&E.destroy()}}}}}else h.type==="attributes"&&(n&&h.target[e]?n(h.target,h.attributeName):(w(h.target,t,e,r),o&&o(h.target)))}});let a=[];if(t.indexOf("[")!==-1){const c=/\[([\w-]+)/g;let u;for(;(u=c.exec(t))!==null;)a.push(u[1])}else a.push(t);s.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:a.concat(i)})},d),window[e]=l,document.readyState==="loading"?document.addEventListener("DOMContentLoaded",function(){l(document.body)}):l(document.body),l}const _={};function B(t,e){_[t]=e}function j(t){return _[t]||{ingress:e=>e,egress:e=>e}}const S={};function k(t,e){if(!t||typeof e!="object")return;const r=t.toLowerCase().split("-")[0];S[r]=e}function W(t){if(!t)return null;const e=t.toLowerCase().split("-")[0];return S[e]||null}k("mk",{monthsLong:["јануари","февруари","март","април","мај","јуни","јули","август","септември","октомври","ноември","декември"],monthsShort:["јан","фев","мар","апр","мај","јун","јул","авг","септ","окт","ноем","дек"],daysLong:["недела","понеделник","вторник","среда","четврток","петок","сабота"],daysShort:["нед","пон","вт","ср","чет","пет","саб"]}),typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=B,window.lnCore.getDataMapper=j,window.lnCore.registerLocaleFallback=k,window.lnCore.getLocaleFallback=W,window.lnCore.fillTemplate=A,window.lnCore.fill=L,window.lnCore.lnFill=P,window.lnCore.renderList=I);function O(t){return(t||"").replace(/^#/,"")}function y(t){const e=t===void 0?location.hash:t,r={},d=O(e);if(!d)return r;const f=d.split("&");for(let i=0;i<f.length;i++){const n=f[i];if(!n)continue;const o=n.indexOf(":"),l=o>-1?n.slice(0,o):n,s=o>-1?n.slice(o+1):"";if(l)try{r[l]=decodeURIComponent(s)}catch{r[l]=s}}return r}function F(t){if(!t)return null;const e=y();return t in e?e[t]:null}function R(t,e){if(!t)return;const r=y();e==null?delete r[t]:r[t]=String(e);const f=Object.keys(r).map(function(i){const n=r[i];return n===""?i:i+":"+encodeURIComponent(n)}).join("&");O(location.hash)!==f&&(location.hash=f)}function K(t){return t.button===1||t.ctrlKey||t.metaKey||t.shiftKey?!1:(t.preventDefault(),!0)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=y,window.lnCore.hashGet=F,window.lnCore.hashSet=R,window.lnCore.hashLinkClick=K),(function(){const t="data-ln-sortable",e="lnSortable",r="data-ln-sortable-handle";if(window[e]!==void 0)return;function d(i){this.dom=i,this.isEnabled=i.getAttribute(t)!=="disabled",this._dragging=null,i.setAttribute("aria-roledescription","sortable list");const n=this;return this._onPointerDown=function(o){n.isEnabled&&n._handlePointerDown(o)},i.addEventListener("pointerdown",this._onPointerDown),this}d.prototype.enable=function(){this.isEnabled||this.dom.setAttribute(t,"")},d.prototype.disable=function(){this.isEnabled&&this.dom.setAttribute(t,"disabled")},d.prototype.destroy=function(){this.dom[e]&&(this.dom.removeEventListener("pointerdown",this._onPointerDown),m(this.dom,"ln-sortable:destroyed",{target:this.dom}),delete this.dom[e])},d.prototype._handlePointerDown=function(i){let n=i.target.closest("["+r+"]"),o;if(n){for(o=n;o&&o.parentElement!==this.dom;)o=o.parentElement;if(!o||o.parentElement!==this.dom)return}else{if(this.dom.querySelector("["+r+"]"))return;for(o=i.target;o&&o.parentElement!==this.dom;)o=o.parentElement;if(!o||o.parentElement!==this.dom)return;n=o}const s=Array.from(this.dom.children).indexOf(o);if(M(this.dom,"ln-sortable:before-drag",{item:o,index:s}).defaultPrevented)return;i.preventDefault(),n.setPointerCapture(i.pointerId),this._dragging=o,o.classList.add("ln-sortable--dragging"),o.setAttribute("aria-grabbed","true"),this.dom.classList.add("ln-sortable--active"),m(this.dom,"ln-sortable:drag-start",{item:o,index:s});const c=this,u=function(p){c._handlePointerMove(p)},h=function(p){c._handlePointerEnd(p),n.removeEventListener("pointermove",u),n.removeEventListener("pointerup",h),n.removeEventListener("pointercancel",h)};n.addEventListener("pointermove",u),n.addEventListener("pointerup",h),n.addEventListener("pointercancel",h)},d.prototype._handlePointerMove=function(i){if(!this._dragging)return;const n=Array.from(this.dom.children),o=this._dragging;for(const l of n)l.classList.remove("ln-sortable--drop-before","ln-sortable--drop-after");for(const l of n){if(l===o)continue;const s=l.getBoundingClientRect(),a=s.top+s.height/2;if(i.clientY>=s.top&&i.clientY<a){l.classList.add("ln-sortable--drop-before");break}else if(i.clientY>=a&&i.clientY<=s.bottom){l.classList.add("ln-sortable--drop-after");break}}},d.prototype._handlePointerEnd=function(i){if(!this._dragging)return;const n=this._dragging,o=Array.from(this.dom.children),l=o.indexOf(n);let s=null,a=null;for(const c of o){if(c.classList.contains("ln-sortable--drop-before")){s=c,a="before";break}if(c.classList.contains("ln-sortable--drop-after")){s=c,a="after";break}}for(const c of o)c.classList.remove("ln-sortable--drop-before","ln-sortable--drop-after");if(n.classList.remove("ln-sortable--dragging"),n.removeAttribute("aria-grabbed"),this.dom.classList.remove("ln-sortable--active"),s&&s!==n){a==="before"?this.dom.insertBefore(n,s):this.dom.insertBefore(n,s.nextElementSibling);const u=Array.from(this.dom.children).indexOf(n);m(this.dom,"ln-sortable:reordered",{item:n,oldIndex:l,newIndex:u})}this._dragging=null};function f(i){const n=i[e];if(!n)return;const o=i.getAttribute(t)!=="disabled";o!==n.isEnabled&&(n.isEnabled=o,m(i,o?"ln-sortable:enabled":"ln-sortable:disabled",{target:i}))}N(t,e,d,"ln-sortable",{onAttributeChange:f})})()})();
@@ -1 +0,0 @@
1
- (function(){"use strict";if(typeof window<"u"){const t=console.warn;console.warn=function(...e){typeof e[0]=="string"&&(e[0].startsWith("[ln-")||e[0].startsWith("[lnCore"))&&!(document.documentElement.hasAttribute("data-ln-debug")||document.body&&document.body.hasAttribute("data-ln-debug"))||t.apply(console,e)}}const w={};function q(t,e){w[t]||(w[t]=document.querySelector('[data-ln-template="'+t+'"]'));const o=w[t];return o?o.content.cloneNode(!0):(console.warn("["+(e||"ln-core")+'] Template "'+t+'" not found'),null)}function D(t,e,o){t.dispatchEvent(new CustomEvent(e,{bubbles:!0,detail:o||{}}))}function A(t,e){if(!t||!e)return t;const o=t.querySelectorAll("[data-ln-field]");for(let n=0;n<o.length;n++){const i=o[n],l=i.getAttribute("data-ln-field");e[l]!=null&&(i.textContent=e[l])}const u=t.querySelectorAll("[data-ln-attr]");for(let n=0;n<u.length;n++){const i=u[n],l=i.getAttribute("data-ln-attr").split(",");for(let c=0;c<l.length;c++){const d=l[c].trim().split(":");if(d.length!==2)continue;const a=d[0].trim(),f=d[1].trim();e[f]!=null&&i.setAttribute(a,e[f])}}const r=t.querySelectorAll("[data-ln-show]");for(let n=0;n<r.length;n++){const i=r[n],l=i.getAttribute("data-ln-show");l in e&&i.classList.toggle("hidden",!e[l])}const s=t.querySelectorAll("[data-ln-class]");for(let n=0;n<s.length;n++){const i=s[n],l=i.getAttribute("data-ln-class").split(",");for(let c=0;c<l.length;c++){const d=l[c].trim().split(":");if(d.length!==2)continue;const a=d[0].trim(),f=d[1].trim();f in e&&i.classList.toggle(a,!!e[f])}}return t}function N(t,e){t.matches&&t.matches("[data-ln-form], [data-ln-fillable]")&&t.dispatchEvent(new CustomEvent("ln-fill",{detail:e??null,bubbles:!0}));const o=t.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let u=0;u<o.length;u++)o[u].dispatchEvent(new CustomEvent("ln-fill",{detail:e??null,bubbles:!0}));return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(t){if(!(!t.target.matches||!t.target.matches("[data-ln-fillable]")))if(t.detail)A(t.target,t.detail);else{const e=t.target.querySelectorAll("[data-ln-field]");for(let o=0;o<e.length;o++)e[o].textContent=""}})));function L(t,e){if(!t||!e)return t;const o=document.createTreeWalker(t,NodeFilter.SHOW_TEXT);for(;o.nextNode();){const s=o.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(n,i){return e[i]!==void 0?e[i]:""}))}const u=function(s,n){return e[n]!==void 0?e[n]:""},r=Array.from(t.querySelectorAll("*"));t.nodeType===1&&r.push(t);for(let s=0;s<r.length;s++){const n=r[s],i=n.attributes;for(let l=0;l<i.length;l++){const c=i[l];c.value.indexOf("{{")!==-1&&n.setAttribute(c.name,c.value.replace(/\{\{\s*(\w+)\s*\}\}/g,u))}}return t}function M(t,e,o,u,r,s){const n={};for(let l=0;l<t.children.length;l++){const c=t.children[l],d=c.getAttribute("data-ln-key");d&&(n[d]=c)}const i=document.createDocumentFragment();for(let l=0;l<e.length;l++){const c=e[l],d=String(u(c));let a=n[d];if(a)r(a,c,l);else{const f=q(o,s);if(!f||(L(f,c),a=f.firstElementChild,!a))continue;a.setAttribute("data-ln-key",d),r(a,c,l)}i.appendChild(a)}t.textContent="",t.appendChild(i)}function S(t,e){if(!document.body){document.addEventListener("DOMContentLoaded",function(){S(t,e)}),console.warn("["+e+'] Script loaded before <body> — add "defer" to your <script> tag');return}t()}function g(t,e,o,u){if(t.nodeType!==1)return;const s=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1?e:"["+e+"]",n=Array.from(t.querySelectorAll(s));t.matches&&t.matches(s)&&n.push(t);for(const i of n)i[o]||(i[o]=new u(i))}function j(t,e,o,u,r={}){const s=r.extraAttributes||[],n=r.onAttributeChange||null,i=r.onInit||null;function l(c){const d=c||document.body;g(d,t,e,o),i&&i(d)}return S(function(){const c=new MutationObserver(function(a){for(let f=0;f<a.length;f++){const h=a[f];if(h.type==="childList"){for(let m=0;m<h.addedNodes.length;m++){const p=h.addedNodes[m];p.nodeType===1&&(g(p,t,e,o),i&&i(p))}for(let m=0;m<h.removedNodes.length;m++){const p=h.removedNodes[m];if(p.nodeType===1){const k=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",b=Array.from(p.querySelectorAll(k));p.matches&&p.matches(k)&&b.push(p);for(let C=0;C<b.length;C++){const T=b[C];if(!document.contains(T)){const x=T[e];x&&typeof x.destroy=="function"&&x.destroy()}}}}}else h.type==="attributes"&&(n&&h.target[e]?n(h.target,h.attributeName):(g(h.target,t,e,o),i&&i(h.target)))}});let d=[];if(t.indexOf("[")!==-1){const a=/\[([\w-]+)/g;let f;for(;(f=a.exec(t))!==null;)d.push(f[1])}else d.push(t);c.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:d.concat(s)})},u),window[e]=l,document.readyState==="loading"?document.addEventListener("DOMContentLoaded",function(){l(document.body)}):l(document.body),l}const v={};function F(t,e){v[t]=e}function W(t){return v[t]||{ingress:e=>e,egress:e=>e}}const _={};function O(t,e){if(!t||typeof e!="object")return;const o=t.toLowerCase().split("-")[0];_[o]=e}function I(t){if(!t)return null;const e=t.toLowerCase().split("-")[0];return _[e]||null}O("mk",{monthsLong:["јануари","февруари","март","април","мај","јуни","јули","август","септември","октомври","ноември","декември"],monthsShort:["јан","фев","мар","апр","мај","јун","јул","авг","септ","окт","ноем","дек"],daysLong:["недела","понеделник","вторник","среда","четврток","петок","сабота"],daysShort:["нед","пон","вт","ср","чет","пет","саб"]}),typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=F,window.lnCore.getDataMapper=W,window.lnCore.registerLocaleFallback=O,window.lnCore.getLocaleFallback=I,window.lnCore.fillTemplate=L,window.lnCore.fill=A,window.lnCore.lnFill=N,window.lnCore.renderList=M);function E(t){return(t||"").replace(/^#/,"")}function y(t){const e=t===void 0?location.hash:t,o={},u=E(e);if(!u)return o;const r=u.split("&");for(let s=0;s<r.length;s++){const n=r[s];if(!n)continue;const i=n.indexOf(":"),l=i>-1?n.slice(0,i):n,c=i>-1?n.slice(i+1):"";if(l)try{o[l]=decodeURIComponent(c)}catch{o[l]=c}}return o}function B(t){if(!t)return null;const e=y();return t in e?e[t]:null}function K(t,e){if(!t)return;const o=y();e==null?delete o[t]:o[t]=String(e);const r=Object.keys(o).map(function(s){const n=o[s];return n===""?s:s+":"+encodeURIComponent(n)}).join("&");E(location.hash)!==r&&(location.hash=r)}function R(t){return t.button===1||t.ctrlKey||t.metaKey||t.shiftKey?!1:(t.preventDefault(),!0)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=y,window.lnCore.hashGet=B,window.lnCore.hashSet=K,window.lnCore.hashLinkClick=R),(function(){const t="data-ln-stat",e="lnStat";if(window[e]!==void 0)return;function o(r){if(!r)return null;const s=r.indexOf(":");if(s===-1)return null;const n=r.slice(0,s),i=r.slice(s+1),l={};return l[n]=[i],l}function u(r){return this.dom=r,this._storeName=r.getAttribute(t),this._filters=o(r.getAttribute("data-ln-stat-filter")),this._onSetCount=function(s){r.textContent=String(s.detail.count),r.classList.remove("is-loading")},r.addEventListener("ln-stat:set-count",this._onSetCount),D(r,"ln-stat:request-count",{stat:this._storeName,filters:this._filters}),this}u.prototype.destroy=function(){this.dom[e]&&(this.dom.removeEventListener("ln-stat:set-count",this._onSetCount),delete this.dom[e])},j(t,e,u,"ln-stat")})()})();