{"id":18916155,"url":"https://github.com/awman3703/modular-dialog-js","last_synced_at":"2025-06-13T05:33:59.467Z","repository":{"id":226112366,"uuid":"767792217","full_name":"AwMan3703/modular-dialog-js","owner":"AwMan3703","description":"Modular HTML dialog JS lib","archived":false,"fork":false,"pushed_at":"2025-02-07T14:24:53.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-07T15:27:57.449Z","etag":null,"topics":["dialog","javascript","javascript-library","min-js","modular"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AwMan3703.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-05T22:49:10.000Z","updated_at":"2025-02-07T14:24:57.000Z","dependencies_parsed_at":"2024-08-05T15:11:35.554Z","dependency_job_id":null,"html_url":"https://github.com/AwMan3703/modular-dialog-js","commit_stats":null,"previous_names":["awman3703/modular-dialog-js"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AwMan3703%2Fmodular-dialog-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AwMan3703%2Fmodular-dialog-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AwMan3703%2Fmodular-dialog-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AwMan3703%2Fmodular-dialog-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AwMan3703","download_url":"https://codeload.github.com/AwMan3703/modular-dialog-js/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239908498,"owners_count":19716802,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dialog","javascript","javascript-library","min-js","modular"],"created_at":"2024-11-08T10:18:28.231Z","updated_at":"2025-02-20T20:24:20.828Z","avatar_url":"https://github.com/AwMan3703.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Modular HTML dialog windows\nCustom modular HTML dialogs. Don't let the `window.prompt/alert/etc.` functions limit you!\n###### Also useful to prevent user mistakenly blocking window dialogs.\n### Contents\n- `modularDialog.js` - the library itself\n- `modularDialog.css` - template for styling the dialog\n### Usage\n#### CSS\nEdit the modularDialog.css file to customize the dialog's appearance. If not edited, the dialog windows' styles will default to the browser's built-in.\n#### JavaScript\nThe `Dialog()` functions takes two parameters:\n- `parent` - the node to append the dialog to\n- `structure` - an object defining the dialog's structure\nand what inputs the dialog needs to provide and return (see example below).\n\nStructure xample:\n```\n{\n    title : \"\u003cany string\u003e\",\n    description : \"\u003cany string, supports HTML\u003e\", --optional\n    inputs : { --optional\n        \"[inputname]\" : { ... (input data) },\n        \"[inputname2]\" : { ... (input data) },\n        \"[inputname3]\" : { ... (input data) },\n        \"[inputname4]\" : { ... (input data) }\n    },\n    options : {\n        completeDialog : {\n            label : \"\u003cany string\u003e\",\n            callback : () =\u003e {}\n        },\n        abortDialog : {\n            label : \"\u003cany string\u003e\",\n            callback : () =\u003e {}\n        }\n    }\n}\n```\nInput data:\n```\ndescription : \"\u003cany string\u003e\" --optional\n\ntype : \"text|number|checkbox|\u003cwhatever else...\u003e\"\n\ndefaultValue : [default input value]\n\nattributes : { } [all HTML attributes to apply to the input, format: {\"attrName\" : \"attrValue\"}]\n```\n\nDefault options:\n- completeDialog - returns an `object` in which:\n  - the keys correspond to the ones in the `structure.inputs` field\n  - the values hold the dialog's `HTMLInput` elements, so that their value can be read\n- abortDialog - returns `null`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fawman3703%2Fmodular-dialog-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fawman3703%2Fmodular-dialog-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fawman3703%2Fmodular-dialog-js/lists"}