json-crud-ui-comp-table 1.3.2 → 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.
- package/bin/v3/commands/TableComp/template/v3/Index/Configs/Create/config.json +65 -0
- package/bin/v3/commands/TableComp/template/v3/Index/Configs/ShowAll/config.json +60 -0
- package/bin/v3/commands/TableComp/template/v3/Index/Configs/WithSearch/config.json +69 -0
- package/bin/v3/commands/TableComp/template/v3/Index/Configs/WithSerial/config.json +69 -0
- package/bin/v3/commands/TableComp/template/v3/Index/FormLoad/DomContentLoaded/AddListeners/AddItemHtmlId/BuildTable/callKSSubTable.js +13 -0
- package/bin/v3/commands/TableComp/template/v3/Index/FormLoad/DomContentLoaded/AddListeners/AddItemHtmlId/BuildTable/callKSTable.js +11 -0
- package/bin/v3/commands/TableComp/template/v3/Index/FormLoad/DomContentLoaded/AddListeners/AddItemHtmlId/BuildTable/formSearchParamsFunc.js +8 -0
- package/bin/v3/commands/TableComp/template/v3/Index/FormLoad/DomContentLoaded/AddListeners/AddItemHtmlId/BuildTable/getKSTableConfig.js +27 -0
- package/bin/v3/commands/TableComp/template/v3/Index/FormLoad/DomContentLoaded/AddListeners/AddItemHtmlId/BuildTable/index.js +34 -0
- package/bin/v3/commands/TableComp/template/v3/Index/FormLoad/DomContentLoaded/AddListeners/AddItemHtmlId/FetchAsGet/AfterFetch/entryFile.js +7 -0
- package/bin/v3/commands/TableComp/template/v3/Index/FormLoad/DomContentLoaded/AddListeners/AddItemHtmlId/FetchAsGet/AfterFetch/status200.js +7 -0
- package/bin/v3/commands/TableComp/template/v3/Index/FormLoad/DomContentLoaded/AddListeners/AddItemHtmlId/FetchAsGet/AfterFetch/status401.js +23 -0
- package/bin/v3/commands/TableComp/template/v3/Index/FormLoad/DomContentLoaded/AddListeners/AddItemHtmlId/FetchAsGet/AfterFetch/status409.js +9 -0
- package/bin/v3/commands/TableComp/template/v3/Index/FormLoad/DomContentLoaded/AddListeners/AddItemHtmlId/FetchAsGet/AfterFetch/url.json +4 -0
- package/bin/v3/commands/TableComp/template/v3/Index/FormLoad/DomContentLoaded/AddListeners/AddItemHtmlId/FetchAsGet/fetchFuncs.js +12 -0
- package/bin/v3/commands/TableComp/template/v3/Index/FormLoad/DomContentLoaded/AddListeners/AddItemHtmlId/FetchAsGet/getUrl.json +3 -0
- package/bin/v3/commands/TableComp/template/v3/Index/FormLoad/DomContentLoaded/AddListeners/AddItemHtmlId/FetchAsGet/start.js +13 -0
- package/bin/v3/commands/TableComp/template/v3/Index/FormLoad/DomContentLoaded/AddListeners/AddItemHtmlId/clickFunc.js +46 -0
- package/bin/v3/commands/TableComp/template/v3/Index/FormLoad/DomContentLoaded/AddListeners/AddItemHtmlId/start.js +11 -0
- package/bin/v3/commands/TableComp/template/v3/Index/FormLoad/DomContentLoaded/AddListeners/ShowAllHtmlId/BuildTable/callKSTable.js +5 -0
- package/bin/v3/commands/TableComp/template/v3/Index/FormLoad/DomContentLoaded/AddListeners/ShowAllHtmlId/BuildTable/getKSTableConfig.js +7 -0
- package/bin/v3/commands/TableComp/template/v3/Index/FormLoad/DomContentLoaded/AddListeners/ShowAllHtmlId/BuildTable/index.js +10 -0
- package/bin/v3/commands/TableComp/template/v3/Index/FormLoad/DomContentLoaded/AddListeners/ShowAllHtmlId/clickFunc.js +24 -0
- package/bin/v3/commands/TableComp/template/v3/Index/FormLoad/DomContentLoaded/AddListeners/ShowAllHtmlId/start.js +11 -0
- package/bin/v3/commands/TableComp/template/v3/Index/FormLoad/DomContentLoaded/AddListeners/WithSearchHtmlId/BuildTable/callKSTable.js +5 -0
- package/bin/v3/commands/TableComp/template/v3/Index/FormLoad/DomContentLoaded/AddListeners/WithSearchHtmlId/BuildTable/getKSTableConfig.js +7 -0
- package/bin/v3/commands/TableComp/template/v3/Index/FormLoad/DomContentLoaded/AddListeners/WithSearchHtmlId/BuildTable/index.js +10 -0
- package/bin/v3/commands/TableComp/template/v3/Index/FormLoad/DomContentLoaded/AddListeners/WithSearchHtmlId/clickFunc.js +24 -0
- package/bin/v3/commands/TableComp/template/v3/Index/FormLoad/DomContentLoaded/AddListeners/WithSearchHtmlId/start.js +11 -0
- package/bin/v3/commands/TableComp/template/v3/Index/FormLoad/DomContentLoaded/AddListeners/WithSerialHtmlId/BuildTable/callKSTable.js +5 -0
- package/bin/v3/commands/TableComp/template/v3/Index/FormLoad/DomContentLoaded/AddListeners/WithSerialHtmlId/BuildTable/getKSTableConfig.js +18 -0
- package/bin/v3/commands/TableComp/template/v3/Index/FormLoad/DomContentLoaded/AddListeners/WithSerialHtmlId/BuildTable/index.js +10 -0
- package/bin/v3/commands/TableComp/template/v3/Index/FormLoad/DomContentLoaded/AddListeners/WithSerialHtmlId/clickFunc.js +24 -0
- package/bin/v3/commands/TableComp/template/v3/Index/FormLoad/DomContentLoaded/AddListeners/WithSerialHtmlId/start.js +11 -0
- package/bin/v3/commands/TableComp/template/v3/Index/FormLoad/DomContentLoaded/AddListeners/loginButtonId/clickFunc.js +47 -0
- package/bin/v3/commands/TableComp/template/v3/Index/FormLoad/DomContentLoaded/AddListeners/loginButtonId/start.js +11 -0
- package/bin/v3/commands/TableComp/template/v3/Index/FormLoad/DomContentLoaded/AddListeners/loginHeaderHtmlId/clickFunc.js +21 -0
- package/bin/v3/commands/TableComp/template/v3/Index/FormLoad/DomContentLoaded/AddListeners/loginHeaderHtmlId/start.js +11 -0
- package/bin/v3/commands/TableComp/template/v3/Index/FormLoad/DomContentLoaded/AddListeners/start.js +15 -0
- package/bin/v3/commands/TableComp/template/v3/Index/FormLoad/DomContentLoaded/CommonFuncs/afterHeadSave.js +33 -0
- package/bin/v3/commands/TableComp/template/v3/Index/FormLoad/DomContentLoaded/CommonFuncs/onSuccess.js +13 -0
- package/bin/v3/commands/TableComp/template/v3/Index/FormLoad/DomContentLoaded/buildHeader.js +12 -0
- package/bin/v3/commands/TableComp/template/v3/Index/FormLoad/DomContentLoaded/runAfterDomLoad.js +12 -0
- package/bin/v3/commands/TableComp/template/v3/Index/FormLoad/DomContentLoaded/start.js +7 -0
- package/bin/v3/commands/TableComp/template/v3/Index/FormLoad/start.js +5 -0
- package/bin/v3/commands/TableComp/template/v3/Index/headers.json +51 -0
- package/bin/v3/commands/TableComp/template/v3/Index/start.js +7 -0
- package/bin/v3/commands/TableComp/template/v3/index.html +132 -0
- package/bin/v3/commands/TableComp/template/v3/script.js +276 -0
- package/bin/v3/commands/TableComp/template/v3/tailwind-3.css +1 -0
- package/bin/v3/commands/TableComp/template/v4/Index/Configs/Create/config.json +65 -0
- package/bin/v3/commands/TableComp/template/v4/Index/Configs/ShowAll/config.json +66 -0
- package/bin/v3/commands/TableComp/template/v4/Index/Configs/WithSearch/config.json +75 -0
- package/bin/v3/commands/TableComp/template/v4/Index/Configs/WithSerial/config.json +69 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/AddItemHtmlId/BuildTable/callKSSubTable.js +13 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/AddItemHtmlId/BuildTable/callKSTable.js +11 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/AddItemHtmlId/BuildTable/formSearchParamsFunc.js +8 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/AddItemHtmlId/BuildTable/getKSTableConfig.js +27 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/AddItemHtmlId/BuildTable/index.js +34 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/AddItemHtmlId/FetchAsGet/AfterFetch/entryFile.js +7 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/AddItemHtmlId/FetchAsGet/AfterFetch/status200.js +7 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/AddItemHtmlId/FetchAsGet/AfterFetch/status401.js +23 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/AddItemHtmlId/FetchAsGet/AfterFetch/status409.js +9 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/AddItemHtmlId/FetchAsGet/AfterFetch/url.json +4 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/AddItemHtmlId/FetchAsGet/fetchFuncs.js +12 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/AddItemHtmlId/FetchAsGet/getUrl.json +3 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/AddItemHtmlId/FetchAsGet/start.js +13 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/AddItemHtmlId/clickFunc.js +46 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/AddItemHtmlId/start.js +11 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/EscapeKey/keydownFunc.js +15 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/EscapeKey/start.js +7 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/ShowAllHtmlId/BuildTable/callKSTable.js +5 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/ShowAllHtmlId/BuildTable/getKSTableConfig.js +12 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/ShowAllHtmlId/BuildTable/index.js +10 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/ShowAllHtmlId/clickFunc.js +24 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/ShowAllHtmlId/start.js +11 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/UserHeaderHtmlId/clickFunc/confirmLogout.js +4 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/UserHeaderHtmlId/clickFunc/index.js +16 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/UserHeaderHtmlId/start.js +11 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/WithSearchHtmlId/BuildTable/callKSTable.js +5 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/WithSearchHtmlId/BuildTable/getKSTableConfig.js +11 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/WithSearchHtmlId/BuildTable/index.js +10 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/WithSearchHtmlId/clickFunc.js +24 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/WithSearchHtmlId/start.js +11 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/WithSerialHtmlId/BuildTable/callKSTable.js +5 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/WithSerialHtmlId/BuildTable/getKSTableConfig.js +12 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/WithSerialHtmlId/BuildTable/index.js +10 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/WithSerialHtmlId/clickFunc.js +24 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/WithSerialHtmlId/start.js +11 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/loginButtonId/clickFunc/api/postLogin.js +15 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/loginButtonId/clickFunc/credentials/getLoginPayload.js +9 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/loginButtonId/clickFunc/credentials/getPassword.js +4 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/loginButtonId/clickFunc/credentials/getUserName.js +4 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/loginButtonId/clickFunc/index.js +16 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/loginButtonId/clickFunc/ui/loginFailure/index.js +7 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/loginButtonId/clickFunc/ui/loginFailure/showLoginError.js +15 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/loginButtonId/clickFunc/ui/loginSuccess/hideLoginError.js +11 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/loginButtonId/clickFunc/ui/loginSuccess/index.js +11 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/loginButtonId/clickFunc copy.js +74 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/loginButtonId/start.js +11 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/loginHeaderHtmlId/clickFunc.js +21 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/loginHeaderHtmlId/start.js +11 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/start.js +19 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/ApplyMenuFromCookie/index.js +16 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/Common/AuthCookie/decodeJwt.js +10 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/Common/AuthCookie/deleteKSTokenCookie.js +5 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/Common/AuthCookie/getTokenFromCookie.js +7 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/Common/AuthCookie/getUserCode.js +12 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/Common/LoginModal/hide.js +7 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/Common/MenuState/applyLoggedInMenu.js +11 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/Common/MenuState/applyLoggedOutMenu.js +11 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/Common/MenuState/hideLoginMenu.js +8 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/Common/MenuState/hideUserMenu.js +8 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/Common/MenuState/resetUserHeader.js +8 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/Common/MenuState/showLoginMenu.js +8 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/Common/MenuState/showUserMenu.js +8 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/Common/MenuState/updateUserHeader.js +10 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/CommonFuncs/afterHeadSave.js +33 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/CommonFuncs/onReadFail.js +10 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/CommonFuncs/onSuccess.js +13 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/buildHeader.js +12 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/runAfterDomLoad.js +14 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/start.js +7 -0
- package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/start.js +5 -0
- package/bin/v3/commands/TableComp/template/v4/Index/headers.json +63 -0
- package/bin/v3/commands/TableComp/template/v4/Index/start.js +7 -0
- package/bin/v3/commands/TableComp/template/v4/index.html +117 -0
- package/bin/v3/commands/TableComp/template/v4/script.js +278 -0
- package/bin/v3/commands/TableComp/template/v4/tailwind-3.css +1 -0
- package/package.json +1 -1
package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/AddListeners/start.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import showAllHtmlId from "./ShowAllHtmlId/start.js";
|
|
2
|
+
import withSerialHtmlId from "./WithSerialHtmlId/start.js";
|
|
3
|
+
import withSearchHtmlId from "./WithSearchHtmlId/start.js";
|
|
4
|
+
import loginHeaderHtmlId from "./loginHeaderHtmlId/start.js";
|
|
5
|
+
import loginButtonId from "./loginButtonId/start.js";
|
|
6
|
+
import userHeaderHtmlId from "./UserHeaderHtmlId/start.js";
|
|
7
|
+
import escapeKey from "./EscapeKey/start.js";
|
|
8
|
+
|
|
9
|
+
const hookAllListeners = () => {
|
|
10
|
+
showAllHtmlId();
|
|
11
|
+
withSerialHtmlId();
|
|
12
|
+
withSearchHtmlId();
|
|
13
|
+
loginHeaderHtmlId();
|
|
14
|
+
loginButtonId();
|
|
15
|
+
userHeaderHtmlId();
|
|
16
|
+
escapeKey();
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export { hookAllListeners };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import getTokenFromCookie from "../Common/AuthCookie/getTokenFromCookie.js";
|
|
2
|
+
import applyLoggedInMenu from "../Common/MenuState/applyLoggedInMenu.js";
|
|
3
|
+
import applyLoggedOutMenu from "../Common/MenuState/applyLoggedOutMenu.js";
|
|
4
|
+
|
|
5
|
+
const applyMenuFromCookie = () => {
|
|
6
|
+
const token = getTokenFromCookie();
|
|
7
|
+
|
|
8
|
+
if (!token) {
|
|
9
|
+
applyLoggedOutMenu();
|
|
10
|
+
return;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
applyLoggedInMenu();
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export default applyMenuFromCookie;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import decodeJwt from "./decodeJwt.js";
|
|
2
|
+
import getTokenFromCookie from "./getTokenFromCookie.js";
|
|
3
|
+
|
|
4
|
+
const getUserCode = () => {
|
|
5
|
+
const token = getTokenFromCookie();
|
|
6
|
+
|
|
7
|
+
if (!token) return "";
|
|
8
|
+
|
|
9
|
+
return decodeJwt(token).payload;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export default getUserCode;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import hideLoginMenu from "./hideLoginMenu.js";
|
|
2
|
+
import showUserMenu from "./showUserMenu.js";
|
|
3
|
+
import updateUserHeader from "./updateUserHeader.js";
|
|
4
|
+
|
|
5
|
+
const applyLoggedInMenu = () => {
|
|
6
|
+
showUserMenu();
|
|
7
|
+
hideLoginMenu();
|
|
8
|
+
updateUserHeader();
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export default applyLoggedInMenu;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import hideUserMenu from "./hideUserMenu.js";
|
|
2
|
+
import resetUserHeader from "./resetUserHeader.js";
|
|
3
|
+
import showLoginMenu from "./showLoginMenu.js";
|
|
4
|
+
|
|
5
|
+
const applyLoggedOutMenu = () => {
|
|
6
|
+
hideUserMenu();
|
|
7
|
+
showLoginMenu();
|
|
8
|
+
resetUserHeader();
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export default applyLoggedOutMenu;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import onSuccessFunc from "./onSuccess.js";
|
|
2
|
+
|
|
3
|
+
const afterHeadSave = async (inPk) => {
|
|
4
|
+
const config = await fetch("Index/Configs/AddItem/config.json");
|
|
5
|
+
const configJson = await config.json();
|
|
6
|
+
|
|
7
|
+
configJson.endPoints.findFromParams = configJson.endPoints.findFromParams.replace("{pk}", inPk);
|
|
8
|
+
configJson.callbacks.vertical.onSuccess = onSuccessFunc;
|
|
9
|
+
|
|
10
|
+
if (window.KSTable) {
|
|
11
|
+
console.log("table loaded from cdn");
|
|
12
|
+
|
|
13
|
+
await window.KSTable.initCreate(configJson);
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const configForSubTable = await fetch("Index/Configs/AddItem/configForSubTable.json");
|
|
17
|
+
const configForSubTableJson = await configForSubTable.json();
|
|
18
|
+
|
|
19
|
+
const findColumn = configForSubTableJson.columnsConfig.find(element => {
|
|
20
|
+
return element.columnName === "ParentPk";
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
findColumn.defaultValue = inPk.toString();
|
|
24
|
+
configForSubTableJson.endPoints.read += inPk.toString();
|
|
25
|
+
|
|
26
|
+
if (window.KSTable) {
|
|
27
|
+
console.log("table loaded from cdn");
|
|
28
|
+
|
|
29
|
+
await window.KSTable.initTableWithFooter(configForSubTableJson);
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export default afterHeadSave;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import afterHeadSave from "./afterHeadSave.js";
|
|
2
|
+
|
|
3
|
+
const onSuccessFunc = async (res) => {
|
|
4
|
+
const fromReponse = await res.json();
|
|
5
|
+
// console.log("fromReponse : ", fromReponse);
|
|
6
|
+
|
|
7
|
+
document.getElementById("htmlId").innerHTML = fromReponse.pk;
|
|
8
|
+
|
|
9
|
+
// window.location.href = `../WithSubTable/index.html?pk=${fromReponse.pk}`;
|
|
10
|
+
await afterHeadSave(fromReponse.pk);
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export default onSuccessFunc;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// import headerBuild from "/header/v3/initHeader.js";
|
|
2
|
+
|
|
3
|
+
const buildHeader = async () => {
|
|
4
|
+
const fromFetch = await fetch("./Index/headers.json");
|
|
5
|
+
const headerConfig = await fromFetch.json();
|
|
6
|
+
// debugger;
|
|
7
|
+
await window.KSHeader(headerConfig);
|
|
8
|
+
|
|
9
|
+
// await headerBuild(headerConfig);
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export { buildHeader };
|
package/bin/v3/commands/TableComp/template/v4/Index/FormLoad/DomContentLoaded/runAfterDomLoad.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { buildHeader } from "./buildHeader.js";
|
|
2
|
+
import { hookAllListeners } from "./AddListeners/start.js";
|
|
3
|
+
import applyMenuFromCookie from "./ApplyMenuFromCookie/index.js";
|
|
4
|
+
|
|
5
|
+
const runAfterDomLoad = () => {
|
|
6
|
+
import("../../../script.js").then(fromPromise => {
|
|
7
|
+
buildHeader().then(fromPromise => {
|
|
8
|
+
applyMenuFromCookie();
|
|
9
|
+
hookAllListeners();
|
|
10
|
+
});
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export { runAfterDomLoad };
|
|
@@ -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,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>
|