json-crud-ui-comp-table 1.3.3 → 1.3.4

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 (80) hide show
  1. package/bin/v3/commands/TableComp/template/v4/Index/Configs/Create/config.json +65 -0
  2. package/bin/v3/commands/TableComp/template/v4/Index/Configs/ShowAll/config.json +66 -0
  3. package/bin/v3/commands/TableComp/template/v4/Index/Configs/WithSearch/config.json +75 -0
  4. package/bin/v3/commands/TableComp/template/v4/Index/Configs/WithSerial/config.json +69 -0
  5. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/AddItemHtmlId/BuildTable/callKSSubTable.js +13 -0
  6. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/AddItemHtmlId/BuildTable/callKSTable.js +11 -0
  7. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/AddItemHtmlId/BuildTable/formSearchParamsFunc.js +8 -0
  8. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/AddItemHtmlId/BuildTable/getKSTableConfig.js +27 -0
  9. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/AddItemHtmlId/BuildTable/index.js +34 -0
  10. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/AddItemHtmlId/FetchAsGet/AfterFetch/entryFile.js +7 -0
  11. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/AddItemHtmlId/FetchAsGet/AfterFetch/status200.js +7 -0
  12. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/AddItemHtmlId/FetchAsGet/AfterFetch/status401.js +23 -0
  13. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/AddItemHtmlId/FetchAsGet/AfterFetch/status409.js +9 -0
  14. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/AddItemHtmlId/FetchAsGet/AfterFetch/url.json +4 -0
  15. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/AddItemHtmlId/FetchAsGet/fetchFuncs.js +12 -0
  16. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/AddItemHtmlId/FetchAsGet/getUrl.json +3 -0
  17. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/AddItemHtmlId/FetchAsGet/start.js +13 -0
  18. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/AddItemHtmlId/clickFunc.js +46 -0
  19. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/AddItemHtmlId/start.js +11 -0
  20. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/EscapeKey/keydownFunc.js +15 -0
  21. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/EscapeKey/start.js +7 -0
  22. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/ShowAllHtmlId/BuildTable/callKSTable.js +5 -0
  23. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/ShowAllHtmlId/BuildTable/getKSTableConfig.js +12 -0
  24. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/ShowAllHtmlId/BuildTable/index.js +10 -0
  25. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/ShowAllHtmlId/clickFunc.js +24 -0
  26. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/ShowAllHtmlId/start.js +11 -0
  27. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/UserHeaderHtmlId/clickFunc/confirmLogout.js +4 -0
  28. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/UserHeaderHtmlId/clickFunc/index.js +16 -0
  29. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/UserHeaderHtmlId/start.js +11 -0
  30. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/WithSearchHtmlId/BuildTable/callKSTable.js +5 -0
  31. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/WithSearchHtmlId/BuildTable/getKSTableConfig.js +11 -0
  32. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/WithSearchHtmlId/BuildTable/index.js +10 -0
  33. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/WithSearchHtmlId/clickFunc.js +24 -0
  34. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/WithSearchHtmlId/start.js +11 -0
  35. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/WithSerialHtmlId/BuildTable/callKSTable.js +5 -0
  36. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/WithSerialHtmlId/BuildTable/getKSTableConfig.js +12 -0
  37. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/WithSerialHtmlId/BuildTable/index.js +10 -0
  38. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/WithSerialHtmlId/clickFunc.js +24 -0
  39. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/WithSerialHtmlId/start.js +11 -0
  40. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/loginButtonId/clickFunc/api/postLogin.js +15 -0
  41. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/loginButtonId/clickFunc/credentials/getLoginPayload.js +9 -0
  42. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/loginButtonId/clickFunc/credentials/getPassword.js +4 -0
  43. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/loginButtonId/clickFunc/credentials/getUserName.js +4 -0
  44. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/loginButtonId/clickFunc/index.js +16 -0
  45. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/loginButtonId/clickFunc/ui/loginFailure/index.js +7 -0
  46. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/loginButtonId/clickFunc/ui/loginFailure/showLoginError.js +15 -0
  47. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/loginButtonId/clickFunc/ui/loginSuccess/hideLoginError.js +11 -0
  48. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/loginButtonId/clickFunc/ui/loginSuccess/index.js +11 -0
  49. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/loginButtonId/clickFunc copy.js +74 -0
  50. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/loginButtonId/start.js +11 -0
  51. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/loginHeaderHtmlId/clickFunc.js +21 -0
  52. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/loginHeaderHtmlId/start.js +11 -0
  53. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/start.js +19 -0
  54. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/ApplyMenuFromCookie/index.js +16 -0
  55. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/Common/AuthCookie/decodeJwt.js +10 -0
  56. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/Common/AuthCookie/deleteKSTokenCookie.js +5 -0
  57. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/Common/AuthCookie/getTokenFromCookie.js +7 -0
  58. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/Common/AuthCookie/getUserCode.js +12 -0
  59. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/Common/LoginModal/hide.js +7 -0
  60. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/Common/MenuState/applyLoggedInMenu.js +11 -0
  61. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/Common/MenuState/applyLoggedOutMenu.js +11 -0
  62. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/Common/MenuState/hideLoginMenu.js +8 -0
  63. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/Common/MenuState/hideUserMenu.js +8 -0
  64. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/Common/MenuState/resetUserHeader.js +8 -0
  65. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/Common/MenuState/showLoginMenu.js +8 -0
  66. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/Common/MenuState/showUserMenu.js +8 -0
  67. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/Common/MenuState/updateUserHeader.js +10 -0
  68. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/CommonFuncs/afterHeadSave.js +33 -0
  69. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/CommonFuncs/onReadFail.js +10 -0
  70. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/CommonFuncs/onSuccess.js +13 -0
  71. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/buildHeader.js +12 -0
  72. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/runAfterDomLoad.js +14 -0
  73. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/start.js +7 -0
  74. package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/start.js +5 -0
  75. package/bin/v3/commands/TableComp/template/v4/Index/headers.json +63 -0
  76. package/bin/v3/commands/TableComp/template/v4/Index/start.js +7 -0
  77. package/bin/v3/commands/TableComp/template/v4/index.html +117 -0
  78. package/bin/v3/commands/TableComp/template/v4/script.js +278 -0
  79. package/bin/v3/commands/TableComp/template/v4/tailwind-3.css +1 -0
  80. package/package.json +1 -1
@@ -0,0 +1,63 @@
1
+ {
2
+ "uiClasses": {
3
+ "ulClass1": "[&_svg]:size-6"
4
+ },
5
+ "title": {
6
+ "text": "Items",
7
+ "htmlId": "htmlId"
8
+ },
9
+ "items": [
10
+ {
11
+ "text": "ShowAll",
12
+ "id": "ShowAllHtmlId",
13
+ "icon": [],
14
+ "uiClasses": {
15
+ "aClass": "",
16
+ "svgDivClass": "size-10"
17
+ },
18
+ "svgName": "home"
19
+ },
20
+ {
21
+ "text": "WithSerial",
22
+ "id": "WithSerialHtmlId",
23
+ "icon": [],
24
+ "uiClasses": {
25
+ "aClass": "",
26
+ "svgDivClass": "size-10"
27
+ },
28
+ "svgName": "serial"
29
+ },
30
+ {
31
+ "text": "WithSearch",
32
+ "id": "WithSearchHtmlId",
33
+ "icon": [],
34
+ "uiClasses": {
35
+ "aClass": "",
36
+ "svgDivClass": "size-10"
37
+ },
38
+ "svgName": "search"
39
+ },
40
+ {
41
+ "text": "User",
42
+ "id": "UserHeaderHtmlId",
43
+ "icon": [],
44
+ "uiClasses": {
45
+ "aClass": "",
46
+ "svgDivClass": "size-10",
47
+ "liClass": "md:text-left",
48
+ "isDisplayNone": true
49
+ },
50
+ "svgName": "user"
51
+ },
52
+ {
53
+ "text": "Login",
54
+ "id": "loginHeaderHtmlId",
55
+ "icon": [],
56
+ "uiClasses": {
57
+ "aClass": "",
58
+ "svgDivClass": "size-10"
59
+ },
60
+ "svgName": "xmark"
61
+ }
62
+ ]
63
+ }
@@ -0,0 +1,7 @@
1
+ import { startFormLoad } from "./FormLoad/start.js";
2
+
3
+ function startApp() {
4
+ startFormLoad();
5
+ };
6
+
7
+ startApp();
@@ -0,0 +1,117 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+ <meta charset="UTF-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title>KeshavSoft8</title>
8
+
9
+ <!-- Tailwind CDN -->
10
+ <script src="https://cdn.tailwindcss.com"></script>
11
+
12
+ <!-- <link rel="stylesheet" href="./tailwind-3.css"> -->
13
+
14
+ <!-- Heroicons (SVG inline, no extra CDN needed) -->
15
+
16
+ <style>
17
+ tfoot tr {
18
+ background-color: #fff8dc;
19
+ }
20
+
21
+ tfoot tr:has(input:focus) {
22
+ background-color: #ffe082;
23
+ }
24
+
25
+ input:focus {
26
+ outline: none;
27
+ border: 2px solid #2563eb;
28
+ box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.3);
29
+ }
30
+
31
+ mark {
32
+ background-color: yellow;
33
+ color: black;
34
+ }
35
+
36
+ .active svg {
37
+ stroke: #3b82f6;
38
+ /* Example color */
39
+ }
40
+
41
+ .active span {
42
+ color: #3b82f6;
43
+ /* Example color */
44
+ }
45
+
46
+ .danger svg {
47
+ stroke: #c41d14;
48
+ /* Example color */
49
+ }
50
+
51
+ .danger span {
52
+ color: #c41d14;
53
+ /* Example color */
54
+ }
55
+ </style>
56
+ </head>
57
+
58
+ <body class="bg-gray-100 flex flex-col min-h-screen">
59
+ <main class="flex-grow">
60
+ <!-- NAVBAR -->
61
+
62
+ <div id="header"></div>
63
+
64
+ <!-- body -->
65
+ <section class="mx-auto px-3 py-6
66
+ max-w-3xl
67
+ lg:max-w-5xl
68
+ xl:max-w-6xl">
69
+
70
+ <!-- Table container -->
71
+
72
+ <div id="kSTableContainer">
73
+ </div>
74
+
75
+ <div id="kSSubTableContainer">
76
+ </div>
77
+ </section>
78
+
79
+
80
+ </main>
81
+ <footer class="bg-gray-200 text-gray-700 text-center py-4">
82
+ <div class="max-w-6xl mx-auto px-4">
83
+ © 2026 KeshavSoft • Contact
84
+ </div>
85
+ </footer>
86
+
87
+ <!-- Login Modal -->
88
+
89
+ <!-- Modal -->
90
+ <div id="loginModal" class="hidden fixed inset-0 z-50 bg-black/40 flex items-center justify-center">
91
+
92
+ <div id="loginModalContent" class="bg-white rounded-lg shadow-lg w-full max-w-sm p-6">
93
+
94
+ <h2 class="text-xl font-semibold mb-4">
95
+ Login
96
+ </h2>
97
+
98
+ <input type="text" placeholder="Username" id="Username" class="w-full border rounded px-3 py-2 mb-3">
99
+
100
+ <input type="password" placeholder="Password" id="Password" class="w-full border rounded px-3 py-2 mb-2">
101
+
102
+ <p id="loginError" class="hidden text-red-600 text-sm mb-3">
103
+ </p>
104
+
105
+ <button class="w-full bg-blue-600 text-white py-2 rounded" id="loginButtonId">
106
+ Login
107
+ </button>
108
+
109
+ </div>
110
+
111
+ </div>
112
+
113
+ <script type="module" src="./Index/start.js"></script>
114
+
115
+ </body>
116
+
117
+ </html>
@@ -0,0 +1,278 @@
1
+ async function ensureTailwind() {
2
+ function loadCss(href) {
3
+ return new Promise((resolve, reject) => {
4
+ const link = document.createElement("link");
5
+
6
+ link.rel = "stylesheet";
7
+ link.href = href;
8
+
9
+ link.onload = resolve;
10
+ link.onerror = reject;
11
+
12
+ document.head.appendChild(link);
13
+ });
14
+ };
15
+
16
+ const tryLocal = async () => {
17
+ try {
18
+ await loadCss("./tailwind-3.css");
19
+
20
+ console.log("Tailwind loaded locally");
21
+ return true;
22
+ } catch { return false; }
23
+ };
24
+
25
+ const tryKsWebExtension = async () => {
26
+ try {
27
+ await loadCss("https://keshavsoft.github.io/KsWebExtension/tailwind-3.css");
28
+
29
+ console.log("Tailwind loaded from KsWebExtension");
30
+ return true;
31
+ } catch { return false; }
32
+ };
33
+
34
+ const tryGit = async () => {
35
+ try {
36
+ await loadCss("https://keshavsoft.github.io/tailwind-gen-css/tailwind-3.css");
37
+
38
+ console.log("Tailwind loaded from tailwind-gen-css");
39
+ return true;
40
+ } catch { return false; }
41
+ };
42
+
43
+ if (document.getElementById("KSTableTailwind")) {
44
+ console.log("Tailwind loaded from Firefox Extension");
45
+ return;
46
+ };
47
+
48
+ if (await tryLocal()) return;
49
+ if (await tryKsWebExtension()) return;
50
+ if (await tryGit()) return;
51
+
52
+ throw new Error("Tailwind could not be loaded");
53
+ };
54
+
55
+ async function ensureKSHeader() {
56
+ function loadScriptAsModule(src) {
57
+ return new Promise((resolve, reject) => {
58
+ const script = document.createElement("script");
59
+
60
+ script.src = src;
61
+ script.onload = () => resolve(true);
62
+ script.onerror = () => reject(new Error(`Failed to load: ${src}`));
63
+ script.type = "module";
64
+
65
+ document.head.appendChild(script);
66
+ });
67
+ };
68
+
69
+ function isKSTableLoaded() {
70
+ return !!window.KSHeader;
71
+ };
72
+
73
+ async function tryGitHub() {
74
+ try {
75
+ const fromPromise = await loadScriptAsModule("https://keshavsoft.github.io/tailwind-header-dom/Public/v4.7/ksheader.js");
76
+
77
+ console.log("KSHeader loaded from git : tailwind-header-dom");
78
+
79
+ if (fromPromise) return true;
80
+ } catch { return false };
81
+
82
+ return false;
83
+ };
84
+
85
+ async function tryLocal() {
86
+ try {
87
+ const fromPromise = await loadScriptAsModule("/header/v8/initHeader.js");
88
+
89
+ console.log("KSHeader loaded from local : header-v8");
90
+
91
+ if (fromPromise) return true;
92
+ } catch { return false };
93
+
94
+ return false;
95
+ };
96
+
97
+ if (isKSTableLoaded()) {
98
+ console.log("KSHeader loaded from Firefox Extension");
99
+ return;
100
+ };
101
+
102
+ if (await tryLocal()) return;
103
+
104
+ if (await tryGitHub()) return;
105
+
106
+ throw new Error("KSTable could not be loaded");
107
+ };
108
+
109
+ async function ensureKSTable() {
110
+ function loadScriptAsModule(src) {
111
+ return new Promise((resolve, reject) => {
112
+ const script = document.createElement("script");
113
+
114
+ script.src = src;
115
+ script.onload = () => resolve(true);
116
+ script.onerror = () => reject(new Error(`Failed to load: ${src}`));
117
+ script.type = "module";
118
+
119
+ document.head.appendChild(script);
120
+ });
121
+ };
122
+
123
+ function isKSTableLoaded() {
124
+ return !!window.KSTable;
125
+ };
126
+
127
+ async function tryGitHub() {
128
+ try {
129
+ const fromPromise = await loadScriptAsModule("https://keshavsoft.github.io/tailwind-table-dom/Public/v12/kstable.js");
130
+
131
+ console.log("KSTable loaded from Local Server");
132
+
133
+ if (fromPromise) return true;
134
+ } catch { return false };
135
+
136
+ return false;
137
+ };
138
+
139
+ async function tryLocal() {
140
+ try {
141
+ const fromPromise = await loadScriptAsModule("/KSTable/v1/entry.js");
142
+
143
+ console.log("KSTable loaded from Local Server");
144
+
145
+ if (fromPromise) return true;
146
+ } catch { return false };
147
+
148
+ return false;
149
+ };
150
+
151
+ if (isKSTableLoaded()) {
152
+ console.log("KSTable loaded from Firefox Extension");
153
+ return;
154
+ };
155
+
156
+ if (await tryLocal()) return;
157
+
158
+ if (await tryGitHub()) return;
159
+
160
+ throw new Error("KSTable could not be loaded");
161
+ };
162
+
163
+ async function ensureKSTableComp() {
164
+ function loadScriptAsModule(src) {
165
+ return new Promise((resolve, reject) => {
166
+ const script = document.createElement("script");
167
+
168
+ script.src = src;
169
+ script.onload = () => resolve(true);
170
+ script.onerror = () => reject(new Error(`Failed to load: ${src}`));
171
+ script.type = "module";
172
+
173
+ document.head.appendChild(script);
174
+ });
175
+ };
176
+
177
+ function isKSTableLoaded() {
178
+ return !!window.KSTableComp;
179
+ };
180
+
181
+ async function tryGitHub() {
182
+ try {
183
+ const fromPromise = await loadScriptAsModule("https://keshavsoft.github.io/tailwind-table-dom-comp/Public/v6/kstable.js");
184
+
185
+ console.log("KSTableComp loaded from git : tailwind-table-dom-comp-4");
186
+
187
+ if (fromPromise) return true;
188
+ } catch { return false };
189
+
190
+ return false;
191
+ };
192
+
193
+ async function tryLocal() {
194
+ try {
195
+ const fromPromise = await loadScriptAsModule("/TableComp/v5/entry.js");
196
+
197
+ console.log("KSTableComp loaded from Local Server : TableComp/v5");
198
+
199
+ if (fromPromise) return true;
200
+ } catch { return false };
201
+
202
+ return false;
203
+ };
204
+
205
+ if (isKSTableLoaded()) {
206
+ console.log("KSTable loaded from Firefox Extension");
207
+ return;
208
+ };
209
+
210
+ if (await tryLocal()) return;
211
+
212
+ if (await tryGitHub()) return;
213
+
214
+ throw new Error("KSTableComp could not be loaded");
215
+ };
216
+
217
+ async function ensureKSVertical() {
218
+ function loadScriptAsModule(src) {
219
+ return new Promise((resolve, reject) => {
220
+ const script = document.createElement("script");
221
+
222
+ script.src = src;
223
+ script.onload = () => resolve(true);
224
+ script.onerror = () => reject(new Error(`Failed to load: ${src}`));
225
+ script.type = "module";
226
+
227
+ document.head.appendChild(script);
228
+ });
229
+ };
230
+
231
+ function isKSVerticalLoaded() {
232
+ return !!window.KSVertical;
233
+ };
234
+
235
+ async function tryGitHub() {
236
+ try {
237
+ const fromPromise = await loadScriptAsModule("https://keshavsoft.github.io/tailwind-vertical-dom/Public/v3/ksvertical.js");
238
+
239
+ console.log("KSVertical loaded from git : tailwind-vertical-dom");
240
+
241
+ if (fromPromise) return true;
242
+ } catch { return false };
243
+
244
+ return false;
245
+ };
246
+
247
+ async function tryLocal() {
248
+ try {
249
+ const fromPromise = await loadScriptAsModule("/TableComp/v4/entry.js");
250
+
251
+ console.log("KSVertical loaded from Local Server : TableComp/v1");
252
+
253
+ if (fromPromise) return true;
254
+ } catch { return false };
255
+
256
+ return false;
257
+ };
258
+
259
+ if (isKSVerticalLoaded()) {
260
+ console.log("KSVertical loaded from Firefox Extension");
261
+ return;
262
+ };
263
+
264
+ if (await tryLocal()) return;
265
+
266
+ if (await tryGitHub()) return;
267
+
268
+ throw new Error("KSVertical could not be loaded");
269
+ };
270
+
271
+ await ensureTailwind();
272
+ await ensureKSHeader();
273
+
274
+ // ensureKSTable().then();
275
+
276
+ ensureKSTableComp().then();
277
+
278
+ ensureKSVertical().then();
@@ -0,0 +1 @@
1
+ *,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.collapse{visibility:collapse}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.right-2{right:.5rem}.top-2{top:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.ml-0{margin-left:0}.ml-3{margin-left:.75rem}.mt-0{margin-top:0}.mt-4{margin-top:1rem}.block{display:block}.flex{display:flex}.table{display:table}.grid{display:grid}.list-item{display:list-item}.hidden{display:none}.h-4{height:1rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-9{height:2.25rem}.min-h-screen{min-height:100vh}.w-1{width:.25rem}.w-1\/2{width:50%}.w-24{width:6rem}.w-36{width:9rem}.w-4{width:1rem}.w-6{width:1.5rem}.w-7{width:1.75rem}.w-auto{width:auto}.w-full{width:100%}.max-w-3xl{max-width:48rem}.max-w-5xl{max-width:64rem}.max-w-6xl{max-width:72rem}.max-w-full{max-width:100%}.max-w-md{max-width:28rem}.flex-1{flex:1 1 0%}.flex-grow{flex-grow:1}.table-fixed{table-layout:fixed}.border-collapse{border-collapse:collapse}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-pointer{cursor:pointer}.resize{resize:both}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-x-8{-moz-column-gap:2rem;column-gap:2rem}.gap-y-4{row-gap:1rem}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1rem*var(--tw-space-x-reverse));margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)))}.space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(0px*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px*var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem*var(--tw-space-y-reverse))}.overflow-x-auto{overflow-x:auto}.rounded{border-radius:.25rem}.rounded-md{border-radius:.375rem}.rounded-b-lg{border-bottom-right-radius:.5rem;border-bottom-left-radius:.5rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.bg-green-500{--tw-bg-opacity:1;background-color:rgb(34 197 94/var(--tw-bg-opacity,1))}.bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bg-yellow-400{--tw-bg-opacity:1;background-color:rgb(250 204 21/var(--tw-bg-opacity,1))}.p-2{padding:.5rem}.p-6{padding:1.5rem}.px-10{padding-left:2.5rem;padding-right:2.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.pb-2{padding-bottom:.5rem}.pl-3{padding-left:.75rem}.pr-9{padding-right:2.25rem}.pt-2{padding-top:.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.font-medium{font-weight:500}.font-semibold{font-weight:600}.text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.underline{text-decoration-line:underline}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-150,.transition-colors{transition-duration:.15s}.odd\:bg-gray-100:nth-child(odd){--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.hover\:bg-blue-100:hover{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.hover\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.hover\:bg-gray-600:hover{--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity,1))}.active\:scale-95:active{--tw-scale-x:.95;--tw-scale-y:.95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\:bg-gray-500:active{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}@media (min-width:768px){.md\:ml-0{margin-left:0}.md\:mt-0{margin-top:0}.md\:flex{display:flex}.md\:hidden{display:none}.md\:w-auto{width:auto}.md\:flex-row{flex-direction:row}.md\:flex-col{flex-direction:column}.md\:flex-wrap{flex-wrap:wrap}.md\:items-center{align-items:center}.md\:justify-center{justify-content:center}.md\:gap-4{gap:1rem}.md\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(0px*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px*var(--tw-space-y-reverse))}.md\:text-center{text-align:center}}@media (min-width:1024px){.lg\:h-7{height:1.75rem}.lg\:w-7{width:1.75rem}.lg\:max-w-5xl{max-width:64rem}.lg\:bg-transparent{background-color:transparent}.lg\:px-2{padding-left:.5rem;padding-right:.5rem}.lg\:py-1{padding-top:.25rem;padding-bottom:.25rem}.lg\:text-lg{font-size:1.125rem;line-height:1.75rem}}@media (min-width:1280px){.xl\:max-w-6xl{max-width:72rem}.xl\:max-w-full{max-width:100%}.xl\:px-10{padding-left:2.5rem;padding-right:2.5rem}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "json-crud-ui-comp-table",
3
- "version": "1.3.3",
3
+ "version": "1.3.4",
4
4
  "description": "ui boilerplate code in public folder, with html and js for table build",
5
5
  "keywords": [
6
6
  "cli",