@wishbone-media/spark 0.16.0 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -899,7 +899,7 @@ const U = new vs(), bs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
899
899
  }, 200);
900
900
  l.addEventListener("keyup", (o) => r(e, o)), s.appendChild(a);
901
901
  }, Hs = (e, s, t) => {
902
- e.classList.add("spark-table-head"), (!t || !t.hideSort) && e.classList.add("can-sort"), (!t || !t.hideFilter) && e.classList.add("can-filter"), e.querySelector(".relative").classList.add("spark-table-head-title-wrapper");
902
+ e.classList.add("spark-table-head"), t && t.columnSort && e.classList.add("can-sort"), t && t.columnFilter && e.classList.add("can-filter"), e.querySelector(".relative").classList.add("spark-table-head-title-wrapper");
903
903
  const l = e.querySelector(".colHeader");
904
904
  l.classList.add("spark-table-head-title"), l.innerHTML = Ss(s);
905
905
  }, Ts = (e, s, t) => {
@@ -909,7 +909,7 @@ const U = new vs(), bs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
909
909
  return;
910
910
  let a = 2;
911
911
  const l = t.methods.colToProp(e), r = t.methods.getSettingsForProp(l);
912
- s.childElementCount === 1 && (r && r.hideSort && a--, r && r.hideFilter && a--, (!r || !r.hideSort) && $s(l, s, t), (!r || !r.hideFilter) && Ls(l, s, t)), (s.childElementCount === a || a === 0) && Hs(s, l, r);
912
+ s.childElementCount === 1 && ((!r || !r.columnSort) && a--, (!r || !r.columnFilter) && a--, r && r.columnSort && $s(l, s, t), r && r.columnFilter && Ls(l, s, t)), (s.childElementCount === a || a === 0) && Hs(s, l, r);
913
913
  }, Vs = (e) => {
914
914
  if (!e.hotInstance || !e.hotInstance.rootElement)
915
915
  return;
package/formkit.config.js CHANGED
@@ -15,18 +15,6 @@ import {
15
15
  } from '@formkit/pro';
16
16
  import { rootClasses } from '@wishbone-media/spark/formkit.theme.mjs';
17
17
 
18
- const proPlugin = createProPlugin('fk-8c746502a21', {
19
- autocomplete,
20
- colorpicker,
21
- datepicker,
22
- dropdown,
23
- rating,
24
- repeater,
25
- slider,
26
- taglist,
27
- toggle
28
- });
29
-
30
18
  const autoAnimatePlugin = createAutoAnimatePlugin(
31
19
  {
32
20
  /* optional AutoAnimate config */
@@ -44,12 +32,30 @@ const autoAnimatePlugin = createAutoAnimatePlugin(
44
32
  }
45
33
  );
46
34
 
47
- export default defaultConfig({
48
- config: {
49
- rootClasses
50
- },
51
- icons: {
52
- ...genesisIcons
53
- },
54
- plugins: [proPlugin, autoAnimatePlugin]
55
- });
35
+ export default function createFormKitConfig(formKitProKey) {
36
+ if (!formKitProKey) {
37
+ throw new Error('FormKit Pro key is required. Please provide VITE_FORMKIT_PRO_KEY in your environment variables.');
38
+ }
39
+
40
+ const proPlugin = createProPlugin(formKitProKey, {
41
+ autocomplete,
42
+ colorpicker,
43
+ datepicker,
44
+ dropdown,
45
+ rating,
46
+ repeater,
47
+ slider,
48
+ taglist,
49
+ toggle
50
+ });
51
+
52
+ return defaultConfig({
53
+ config: {
54
+ rootClasses
55
+ },
56
+ icons: {
57
+ ...genesisIcons
58
+ },
59
+ plugins: [proPlugin, autoAnimatePlugin]
60
+ });
61
+ }