From 5d3c4e5b84797b58fb8feca20419ab7faf039ee0 Mon Sep 17 00:00:00 2001 From: Ali Date: Sun, 16 Jun 2024 16:35:31 +0200 Subject: [PATCH 01/11] main --- server/schema-server.js | 9 +- server/schemas/new/questions.json | 122 +- .../schemas/newSchema/defaultQuestions.json | 96 ++ .../schemas/{new => newSchema}/details.json | 0 server/schemas/newSchema/questions.json | 1219 +++++++++++++++++ src/SchemaUtil.ts | 78 +- src/components/modules/ModuleFactory.ts | 1 + .../modules/base-class/ToolboxModule.ts | 1 + .../question/IQuestionModuleDataModel.ts | 5 +- .../modules/question/QuestionModule.ts | 45 +- .../modules/section/SectionModule.ts | 2 +- .../property-box/assets/layout.html | 1 + src/components/property-box/assets/style.css | 5 +- src/components/workspace/assets/style.css | 2 +- wwwroot/component/new/index.html | 73 +- wwwroot/component/new/schema/index.html | 74 +- 16 files changed, 1617 insertions(+), 116 deletions(-) create mode 100644 server/schemas/newSchema/defaultQuestions.json rename server/schemas/{new => newSchema}/details.json (100%) create mode 100644 server/schemas/newSchema/questions.json diff --git a/server/schema-server.js b/server/schema-server.js index a7e88dd..03f615a 100644 --- a/server/schema-server.js +++ b/server/schema-server.js @@ -53,9 +53,14 @@ router.get("/schemas/:id", function (req, res) { }); }); router.get("/details", async function (req, res) { - return res.json(JSON.parse(await fs.promises.readFile(path.join(__dirname, `/schemas/new/details.json`)))) + return res.json(JSON.parse(await fs.promises.readFile(path.join(__dirname, `/schemas/newSchema/details.json`)))) +}); +router.get("/new-schema", async function (req, res) { + return res.json(JSON.parse(await fs.promises.readFile(path.join(__dirname, `/schemas/newSchema/questions.json`)))) +}); +router.get("/add-to-log", async function (req, res) { + return res.json(JSON.parse(await fs.promises.readFile(path.join(__dirname, `/schemas/new/addToLog.json`)))) }); - router.get("/fix-data/:prpId/:part", function (req, res) { const fixDataStr = fs.readFileSync( path.join(__dirname, "/schemas/data.json"), diff --git a/server/schemas/new/questions.json b/server/schemas/new/questions.json index 740c661..c6e070e 100644 --- a/server/schemas/new/questions.json +++ b/server/schemas/new/questions.json @@ -26,9 +26,8 @@ "parts": [ { "part": 1, - "link": "/server/popup", - "viewType": "html", - "multi": false + "viewType": "text", + "cssClass": "css_13050_1" } ] }, @@ -58,9 +57,12 @@ "parts": [ { "part": 1, - "link": "/server/popup", - "viewType": "html", - "multi": false + "viewType": "text", + "validations": { + "required": true, + "minLength": 3, + "maxLength": 50 + } } ] }, @@ -93,7 +95,7 @@ "title": "Is Multi", "parts": [ { - "part": 1, + "part": 3, "viewType": "select", "fixValues": [ { @@ -147,6 +149,35 @@ ] } ] + }, { + "prpId": 7, + "vocab": "AddToLog", + "title": "AddToLog", + "multi": false, + "parts": [ + { + "part": 1, + "viewType": "radio", + "fixValues": [ + { + "id": 0, + "value": "off" + }, + { + "id": 4, + "value": "on", + "schema": { + "schemaId": 10, + "paramUrl": "add-to-log", + "lid": 1, + "schemaVersion": 1.1 + } + } + ], + "caption": "", + "link": "" + } + ] } ] }, @@ -163,9 +194,7 @@ "parts": [ { "part": 1, - "link": "/server/popup", - "viewType": "html", - "multi": false + "viewType": "text" } ] }, @@ -313,9 +342,7 @@ "parts": [ { "part": 1, - "link": "/server/popup", - "viewType": "html", - "multi": false + "viewType": "text" } ] }, @@ -371,9 +398,7 @@ "parts": [ { "part": 1, - "link": "/server/popup", - "viewType": "html", - "multi": false + "viewType": "text" } ] }, @@ -524,9 +549,7 @@ "parts": [ { "part": 1, - "link": "/server/popup", - "viewType": "html", - "multi": false + "viewType": "text" } ] }, @@ -596,9 +619,7 @@ "parts": [ { "part": 1, - "link": "/server/popup", - "viewType": "html", - "multi": false + "viewType": "text" } ] }, @@ -627,9 +648,7 @@ }, { "part": 2, - "link": "/server/popup", - "viewType": "html", - "multi": true, + "viewType": "text", "caption": "Title" } ] @@ -689,9 +708,7 @@ "parts": [ { "part": 1, - "link": "/server/popup", - "viewType": "html", - "multi": false + "viewType": "text" } ] }, @@ -720,9 +737,7 @@ }, { "part": 2, - "link": "/server/popup", - "viewType": "html", - "multi": true, + "viewType": "text", "caption": "Title" } ] @@ -807,9 +822,7 @@ "parts": [ { "part": 1, - "link": "/server/popup", - "viewType": "html", - "multi": false + "viewType": "text" } ] }, @@ -838,9 +851,7 @@ }, { "part": 2, - "link": "/server/popup", - "viewType": "html", - "multi": true, + "viewType": "text", "caption": "Title" } ] @@ -900,9 +911,7 @@ "parts": [ { "part": 1, - "link": "/server/popup", - "viewType": "html", - "multi": false + "viewType": "text" } ] }, @@ -972,9 +981,7 @@ "parts": [ { "part": 1, - "link": "/server/popup", - "viewType": "html", - "multi": false + "viewType": "text" } ] }, @@ -1093,9 +1100,7 @@ "parts": [ { "part": 1, - "link": "/server/popup", - "viewType": "html", - "multi": false + "viewType": "text" } ] }, @@ -1210,6 +1215,31 @@ "title": "Validations" } ] + }, + { + "paramUrl": "add-to-log", + + "schemaVersion": 1.1, + "lid": 1, + "schemaId": "add-to-log", + "baseVocab": "http://schema.site/FA/vo", + "questions": [ + { + "prpId": 1, + "vocab": "LogName", + "title": "LogName", + "multi": false, + "parts": [ + { + "part": 1, + "viewType": "text", + "validations": { + "required": true + } + } + ] + } + ] } ] } diff --git a/server/schemas/newSchema/defaultQuestions.json b/server/schemas/newSchema/defaultQuestions.json new file mode 100644 index 0000000..b677929 --- /dev/null +++ b/server/schemas/newSchema/defaultQuestions.json @@ -0,0 +1,96 @@ +{ + "setting": { + "keepalive": true + }, + "sources": [ + { + "options": { + "tableName": "answer.data", + "keyFieldName": "", + "statusFieldName": "", + "mergeType": 0 + }, + "data": [ + { + "lid": 1, + "questions": [ + { + "TypeID": 150, + "Ord": 700, + "multi": false, + "class": "css_150", + "Url": "FA/vo/عنوان", + "title": "عنوان", + "parts": [ + { + "part": 1, + "viewType": "text", + "cssClass": "css_150_1", + "validations": { + "required": true, + "minLength": "2", + "maxLength": "100" + } + } + ] + }, + { + "TypeID": 164, + "Ord": 720, + "multi": false, + "class": "css_164", + "Url": "FA/vo/برند", + "title": "برند", + "parts": [ + { + "part": 1, + "viewType": "text", + "cssClass": "css_164_1", + "validations": { + "minLength": "2", + "maxLength": "4000" + } + } + ] + }, + { + "TypeID": 163, + "Ord": 740, + "multi": false, + "class": "css_163", + "Url": "FA/vo/مدل", + "title": "مدل", + "parts": [ + { + "part": 1, + "viewType": "text", + "cssClass": "css_163_1", + "validations": { + "minLength": "2", + "maxLength": "4000" + } + } + ] + }, + { + "TypeID": 144, + "Ord": 1220, + "multi": true, + "class": "css_144", + "Url": "FA/vo/توضیحات", + "title": "توضیحات", + "parts": [ + { + "part": 1, + "viewType": "textarea", + "cssClass": "css_144_1", + "validations": {} + } + ] + } + ] + } + ] + } + ] + } \ No newline at end of file diff --git a/server/schemas/new/details.json b/server/schemas/newSchema/details.json similarity index 100% rename from server/schemas/new/details.json rename to server/schemas/newSchema/details.json diff --git a/server/schemas/newSchema/questions.json b/server/schemas/newSchema/questions.json new file mode 100644 index 0000000..73867ae --- /dev/null +++ b/server/schemas/newSchema/questions.json @@ -0,0 +1,1219 @@ +{ + "setting": { + "keepalive": true + }, + "sources": [ + { + "options": { + "tableName": "schema.newdata", + "keyFieldName": null, + "statusFieldName": null, + "mergeType": 0 + }, + "data": [ + { + "schemas": [ + { + "schemaId": "section", + "paramUrl": "section", + "schemaType": "section", + "title": "Section", + "image": "/assets/images/sections.png", + "questions": [ + { + "prpId": 1, + "title": "Title", + "parts": [ + { + "part": 1, + "link": "/server/popup", + "viewType": "html", + "multi": false + } + ] + }, + { + "prpId": 2, + "title": "Description", + "parts": [ + { + "part": 1, + "viewType": "textarea", + "cssClass": "css_13050_1" + } + ] + } + ] + }, + { + "schemaId": "question", + "paramUrl": "question", + "schemaType": "question", + "title": "Question", + "image": "/assets/images/question.png", + "questions": [ + { + "prpId": 1, + "title": "Title", + "parts": [ + { + "part": 1, + "link": "/server/popup", + "viewType": "html", + "multi": false + } + ] + }, + { + "prpId": 2, + "title": "Parts", + "parts": [ + { + "part": 1, + "viewType": "select", + "fixValues": [ + { + "id": 1, + "value": "1" + }, + { + "id": 2, + "value": "2" + }, + { + "id": 3, + "value": "3" + } + ] + } + ] + }, + { + "prpId": 3, + "title": "Is Multi", + "parts": [ + { + "part": 1, + "viewType": "select", + "fixValues": [ + { + "id": 1, + "value": "No" + }, + { + "id": 2, + "value": "Yes" + } + ] + } + ] + }, + { + "prpId": 4, + "title": "Css Class", + "parts": [ + { + "part": 1, + "viewType": "text" + } + ] + }, + { + "prpId": 5, + "title": "Help", + "parts": [ + { + "part": 1, + "viewType": "text" + } + ] + }, + { + "prpId": 6, + "title": "Use In List", + "parts": [ + { + "part": 1, + "viewType": "select", + "fixValues": [ + { + "id": 1, + "value": "No" + }, + { + "id": 2, + "value": "Yes" + } + ] + } + ] + } + ] + }, + { + "schemaId": "text", + "paramUrl": "text", + "schemaType": "part", + "title": "Short Text", + "image": "/assets/images/input.png", + "questions": [ + { + "prpId": 1, + "title": "Caption", + "parts": [ + { + "part": 1, + "link": "/server/popup", + "viewType": "html", + "multi": false + } + ] + }, + { + "prpId": 2, + "title": "Css Class", + "parts": [ + { + "part": 1, + "viewType": "text" + } + ] + }, + { + "prpId": 3001, + "title": "required", + "sectionId": 1, + "parts": [ + { + "part": 1, + "viewType": "select", + "fixValues": [ + { + "id": 0, + "value": "No" + }, + { + "id": 1, + "value": "Yes" + } + ] + } + ] + }, + { + "prpId": 3002, + "title": "minLength", + "sectionId": 1, + "parts": [ + { + "part": 1, + "viewType": "text", + "validations": { + "dataType": "int" + } + } + ] + }, + { + "prpId": 3003, + "title": "maxLength", + "sectionId": 1, + "parts": [ + { + "part": 1, + "viewType": "text", + "validations": { + "dataType": "int" + } + } + ] + }, + { + "prpId": 3004, + "title": "min", + "sectionId": 1, + "parts": [ + { + "part": 1, + "viewType": "text", + "validations": { + "dataType": "int" + } + } + ] + }, + { + "prpId": 3005, + "title": "max", + "sectionId": 1, + "parts": [ + { + "part": 1, + "viewType": "text", + "validations": { + "dataType": "int" + } + } + ] + }, + { + "prpId": 3006, + "title": "dataType", + "sectionId": 1, + "parts": [ + { + "part": 1, + "viewType": "select", + "fixValues": [ + { + "id": 0, + "value": "text" + }, + { + "id": "int", + "value": "int" + }, + { + "id": "float", + "value": "float" + } + ] + } + ] + }, + { + "prpId": 3007, + "title": "regex", + "sectionId": 1, + "parts": [ + { + "part": 1, + "viewType": "text" + } + ] + } + ], + "sections": [ + { + "id": 1, + "title": "Validations" + } + ] + }, + { + "schemaId": "color", + "paramUrl": "color", + "schemaType": "part", + "title": "Color", + "image": "/assets/images/color.png", + "questions": [ + { + "prpId": 1, + "title": "Caption", + "parts": [ + { + "part": 1, + "link": "/server/popup", + "viewType": "html", + "multi": false + } + ] + }, + { + "prpId": 2, + "title": "Css Class", + "parts": [ + { + "part": 1, + "viewType": "text" + } + ] + }, + { + "prpId": 3001, + "title": "required", + "sectionId": 1, + "parts": [ + { + "part": 1, + "viewType": "select", + "fixValues": [ + { + "id": 0, + "value": "No" + }, + { + "id": 1, + "value": "Yes" + } + ] + } + ] + } + ], + "sections": [ + { + "id": 1, + "title": "Validations" + } + ] + }, + { + "schemaId": "datepicker", + "paramUrl": "datepicker", + "schemaType": "part", + "title": "Datepicker", + "image": "/assets/images/date.png", + "questions": [ + { + "prpId": 1, + "title": "Caption", + "parts": [ + { + "part": 1, + "link": "/server/popup", + "viewType": "html", + "multi": false + } + ] + }, + { + "prpId": 2, + "title": "Css Class", + "parts": [ + { + "part": 1, + "viewType": "text" + } + ] + }, + { + "prpId": 3001, + "title": "required", + "sectionId": 1, + "parts": [ + { + "part": 1, + "viewType": "select", + "fixValues": [ + { + "id": 0, + "value": "No" + }, + { + "id": 1, + "value": "Yes" + } + ] + } + ] + } + ], + "sections": [ + { + "id": 1, + "title": "Validations" + } + ] + }, + { + "schemaId": "textarea", + "paramUrl": "textarea", + "schemaType": "part", + "title": "Long Text", + "image": "/assets/images/text-box.png", + "questions": [ + { + "prpId": 1, + "title": "Caption", + "parts": [ + { + "part": 1, + "viewType": "text" + } + ] + }, + { + "prpId": 2, + "title": "Css Class", + "parts": [ + { + "part": 1, + "viewType": "text" + } + ] + }, + { + "prpId": 3001, + "title": "required", + "sectionId": 1, + "parts": [ + { + "part": 1, + "viewType": "select", + "fixValues": [ + { + "id": 0, + "value": "No" + }, + { + "id": 1, + "value": "Yes" + } + ] + } + ] + }, + { + "prpId": 3002, + "title": "minLength", + "sectionId": 1, + "parts": [ + { + "part": 1, + "viewType": "text", + "validations": { + "dataType": "int" + } + } + ] + }, + { + "prpId": 3003, + "title": "maxLength", + "sectionId": 1, + "parts": [ + { + "part": 1, + "viewType": "text", + "validations": { + "dataType": "int" + } + } + ] + }, + { + "prpId": 3007, + "title": "regex", + "sectionId": 1, + "parts": [ + { + "part": 1, + "viewType": "text" + } + ] + } + ], + "sections": [ + { + "id": 1, + "title": "Validations" + } + ] + }, + { + "schemaId": "AutoComplete", + "paramUrl": "AutoComplete", + "schemaType": "part", + "title": "Autocomplete", + "image": "/assets/images/autoComplete.png", + "questions": [ + { + "prpId": 1, + "title": "Caption", + "parts": [ + { + "part": 1, + "link": "/server/popup", + "viewType": "html", + "multi": false + } + ] + }, + { + "prpId": 2, + "title": "Css Class", + "parts": [ + { + "part": 1, + "viewType": "text" + } + ] + }, + { + "prpId": 5, + "title": "Url", + "parts": [ + { + "part": 1, + "viewType": "text", + "validations": { + "required": true, + "regex1": "https?:\\/\\/(www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b([-a-zA-Z0-9()@:%_\\+.~#?&//=]*)" + } + } + ] + }, + { + "prpId": 3001, + "title": "required", + "sectionId": 1, + "parts": [ + { + "part": 1, + "viewType": "select", + "fixValues": [ + { + "id": 0, + "value": "No" + }, + { + "id": 1, + "value": "Yes" + } + ] + } + ] + } + ], + "sections": [ + { + "id": 1, + "title": "Validations" + } + ] + }, + { + "schemaId": "Select", + "paramUrl": "Select", + "schemaType": "part", + "title": "Select", + "image": "/assets/images/dropdown.png", + "questions": [ + { + "prpId": 1, + "title": "Caption", + "parts": [ + { + "part": 1, + "link": "/server/popup", + "viewType": "html", + "multi": false + } + ] + }, + { + "prpId": 2, + "title": "Css Class", + "parts": [ + { + "part": 1, + "viewType": "text" + } + ] + }, + { + "prpId": 4, + "title": "Items", + "multi": "true", + "parts": [ + { + "part": 1, + "viewType": "Text", + "caption": "Value", + "validations": { + "dataType": "int" + } + }, + { + "part": 2, + "link": "/server/popup", + "viewType": "html", + "multi": true, + "caption": "Title" + } + ] + }, + { + "prpId": 5, + "title": "Url", + "parts": [ + { + "part": 1, + "viewType": "text", + "validations": { + "regex1": "https?:\\/\\/(www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b([-a-zA-Z0-9()@:%_\\+.~#?&//=]*)" + } + } + ] + }, + { + "prpId": 3001, + "title": "required", + "sectionId": 1, + "parts": [ + { + "part": 1, + "viewType": "select", + "fixValues": [ + { + "id": 0, + "value": "No" + }, + { + "id": 1, + "value": "Yes" + } + ] + } + ] + } + ], + "sections": [ + { + "id": 1, + "title": "Validations" + } + ] + }, + { + "schemaId": "Checklist", + "paramUrl": "Checklist", + "schemaType": "part", + "title": "Checklist", + "image": "/assets/images/checklist.png", + "questions": [ + { + "prpId": 1, + "title": "Caption", + "parts": [ + { + "part": 1, + "link": "/server/popup", + "viewType": "html", + "multi": false + } + ] + }, + { + "prpId": 2, + "title": "Css Class", + "parts": [ + { + "part": 1, + "viewType": "text" + } + ] + }, + { + "prpId": 4, + "title": "Items", + "multi": "true", + "parts": [ + { + "part": 1, + "viewType": "Text", + "caption": "Value", + "validations": { + "dataType": "int" + } + }, + { + "part": 2, + "link": "/server/popup", + "viewType": "html", + "multi": true, + "caption": "Title" + } + ] + }, + { + "prpId": 5, + "title": "Url", + "parts": [ + { + "part": 1, + "viewType": "text" + } + ] + }, + { + "prpId": 3001, + "title": "required", + "sectionId": 1, + "parts": [ + { + "part": 1, + "viewType": "select", + "fixValues": [ + { + "id": 0, + "value": "No" + }, + { + "id": 1, + "value": "Yes" + } + ] + } + ] + }, + { + "prpId": 3002, + "title": "minLength", + "sectionId": 1, + "parts": [ + { + "part": 1, + "viewType": "text", + "validations": { + "dataType": "int" + } + } + ] + }, + { + "prpId": 3003, + "title": "maxLength", + "sectionId": 1, + "parts": [ + { + "part": 1, + "viewType": "text", + "validations": { + "dataType": "int" + } + } + ] + } + ], + "sections": [ + { + "id": 1, + "title": "Validations" + } + ] + }, + { + "schemaId": "Radio", + "paramUrl": "Radio", + "schemaType": "part", + "title": "Radio", + "image": "/assets/images/radio.png", + "questions": [ + { + "prpId": 1, + "title": "Caption", + "parts": [ + { + "part": 1, + "link": "/server/popup", + "viewType": "html", + "multi": false + } + ] + }, + { + "prpId": 2, + "title": "Css Class", + "parts": [ + { + "part": 1, + "viewType": "text" + } + ] + }, + { + "prpId": 4, + "title": "Items", + "multi": "true", + "parts": [ + { + "part": 1, + "viewType": "Text", + "caption": "Value", + "validations": { + "dataType": "int" + } + }, + { + "part": 2, + "link": "/server/popup", + "viewType": "html", + "multi": true, + "caption": "Title" + } + ] + }, + { + "prpId": 5, + "title": "Url", + "parts": [ + { + "part": 1, + "viewType": "text", + "validations": { + "regex1": "https?:\\/\\/(www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b([-a-zA-Z0-9()@:%_\\+.~#?&//=]*)" + } + } + ] + }, + { + "prpId": 3001, + "title": "required", + "sectionId": 1, + "parts": [ + { + "part": 1, + "viewType": "select", + "fixValues": [ + { + "id": 0, + "value": "No" + }, + { + "id": 1, + "value": "Yes" + } + ] + } + ] + } + ], + "sections": [ + { + "id": 1, + "title": "Validations" + } + ] + }, + { + "schemaId": "Lookup", + "paramUrl": "Lookup", + "schemaType": "part", + "title": "Lookup", + "image": "/assets/images/lookup.png", + "questions": [ + { + "prpId": 1, + "title": "Caption", + "parts": [ + { + "part": 1, + "link": "/server/popup", + "viewType": "html", + "multi": false + } + ] + }, + { + "prpId": 2, + "title": "Css Class", + "parts": [ + { + "part": 1, + "viewType": "text" + } + ] + }, + { + "prpId": 5, + "title": "Url", + "parts": [ + { + "part": 1, + "viewType": "text", + "validations": { + "required": true, + "regex1": "https?:\\/\\/(www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b([-a-zA-Z0-9()@:%_\\+.~#?&//=]*)" + } + } + ] + }, + { + "prpId": 3001, + "title": "required", + "sectionId": 1, + "parts": [ + { + "part": 1, + "viewType": "select", + "fixValues": [ + { + "id": 0, + "value": "No" + }, + { + "id": 1, + "value": "Yes" + } + ] + } + ] + } + ], + "sections": [ + { + "id": 1, + "title": "Validations" + } + ] + }, + { + "schemaId": "Upload", + "paramUrl": "Upload", + "schemaType": "part", + "title": "Upload", + "image": "/assets/images/upload.png", + "questions": [ + { + "prpId": 1, + "title": "Caption", + "parts": [ + { + "part": 1, + "link": "/server/popup", + "viewType": "html", + "multi": false + } + ] + }, + { + "prpId": 2, + "title": "Css Class", + "parts": [ + { + "part": 1, + "viewType": "text" + } + ] + }, + { + "prpId": 3, + "title": "multiple", + "parts": [ + { + "part": 1, + "viewType": "select", + "fixValues": [ + { + "id": 1, + "value": "No" + }, + { + "id": 2, + "value": "Yes" + } + ] + } + ] + }, + { + "prpId": 3001, + "title": "required", + "sectionId": 1, + "parts": [ + { + "part": 1, + "viewType": "select", + "fixValues": [ + { + "id": 0, + "value": "No" + }, + { + "id": 1, + "value": "Yes" + } + ] + } + ] + }, + { + "prpId": 3008, + "title": "mimes", + "multi": "true", + "sectionId": 1, + "parts": [ + { + "part": 1, + "viewType": "Text", + "caption": "mime" + }, + { + "part": 2, + "viewType": "text", + "caption": "minSize", + "validations": { + "dataType": "int" + } + }, + { + "part": 3, + "viewType": "text", + "caption": "maxSize", + "validations": { + "dataType": "int" + } + } + ] + }, + { + "prpId": 3009, + "title": "size", + "sectionId": 1, + "parts": [ + { + "part": 1, + "viewType": "text", + "validations": { + "dataType": "int" + } + } + ] + } + ], + "sections": [ + { + "id": 1, + "title": "Validations" + } + ] + }, + { + "schemaId": "Blob", + "paramUrl": "Blob", + "schemaType": "part", + "title": "Upload Multi Part", + "image": "/assets/images/upload.png", + "questions": [ + { + "prpId": 1, + "title": "Caption", + "parts": [ + { + "part": 1, + "link": "/server/popup", + "viewType": "html", + "multi": false + } + ] + }, + { + "prpId": 2, + "title": "Css Class", + "parts": [ + { + "part": 1, + "viewType": "text" + } + ] + }, + { + "prpId": 3, + "title": "multiple", + "parts": [ + { + "part": 1, + "viewType": "select", + "fixValues": [ + { + "id": 1, + "value": "No" + }, + { + "id": 2, + "value": "Yes" + } + ] + } + ] + }, + { + "prpId": 4, + "title": "upload token", + "parts": [ + { + "part": 1, + "viewType": "text" + } + ] + }, + { + "prpId": 3001, + "title": "required", + "sectionId": 1, + "parts": [ + { + "part": 1, + "viewType": "select", + "fixValues": [ + { + "id": 0, + "value": "No" + }, + { + "id": 1, + "value": "Yes" + } + ] + } + ] + }, + { + "prpId": 3008, + "title": "mimes", + "multi": "true", + "sectionId": 1, + "parts": [ + { + "part": 1, + "viewType": "Text", + "caption": "mime" + }, + { + "part": 2, + "viewType": "text", + "caption": "minSize", + "validations": { + "dataType": "int" + } + }, + { + "part": 3, + "viewType": "text", + "caption": "maxSize", + "validations": { + "dataType": "int" + } + } + ] + }, + { + "prpId": 3009, + "title": "size", + "sectionId": 1, + "parts": [ + { + "part": 1, + "viewType": "text", + "validations": { + "dataType": "int" + } + } + ] + } + ], + "sections": [ + { + "id": 1, + "title": "Validations" + } + ] + } + ] + } + ] + } + ] +} diff --git a/src/SchemaUtil.ts b/src/SchemaUtil.ts index 854ab15..cd4ed4d 100644 --- a/src/SchemaUtil.ts +++ b/src/SchemaUtil.ts @@ -110,6 +110,62 @@ export default class SchemaUtil { answerSchema.properties.push(retVal); } } + public static addSimpleValuePropertyToSubSchema( + answerSchema: IAnswerSchema, + value: any, + prpId: number, + innerPrpId: number, + innerValue: string + ): void { + if (value != null && value != undefined) { + const partValue: IPartValue = { + id: 0, + value: value, + answer: { + usedForId: 1, + lastUpdate: Date.now().toString(), + schemaVersion: "1.1", + schemaId: "add-to-log", + paramUrl: "add-to-log", + lid: 1, + properties: [ + { + prpId: innerPrpId, + answers: [ + { + id: 0, + parts: [ + { + part: 1, + values: [ + { + id: 0, + value: innerValue, + }, + ], + }, + ], + }, + ], + }, + ], + }, + }; + const partCollection: IPartCollection = { + part: 1, + values: [partValue], + }; + const answerPart: IAnswerPart = { + id: 0, + parts: [partCollection], + }; + const retVal: IAnswerProperty = { + prpId: prpId, + answers: [answerPart], + }; + answerSchema.properties.push(retVal); + } + } public static getPropertyValue( result: IUserActionResult, @@ -136,6 +192,26 @@ export default class SchemaUtil { } return retVal; } + public static getSubSchema( + result: IUserActionResult, + propId: number, + part: number = 0 + ): any { + let retVal: IUserActionResult = null; + const property = result.properties.find((x) => x.propId == propId); + if (property) { + if (property.edited) { + retVal = property.edited[0].parts[part].values[0].answer; + } + if (property.added) { + retVal = property.added[0].parts[part].values[0].answer; + } + if (property.deleted) { + retVal = property.deleted[0].parts[0].values[0].answer; + } + } + return retVal; + } public static getMimeValidationPropertyValue( result: IUserActionResult, @@ -245,7 +321,7 @@ export default class SchemaUtil { public static getMultipleProperty(result: IUserActionResult) { return SchemaUtil.getPropertyValue(result, SchemaUtil.MULTIPLE_ID); } - + public static addUploadTokenProperty( answerSchema: IAnswerSchema, uploadToken: string diff --git a/src/components/modules/ModuleFactory.ts b/src/components/modules/ModuleFactory.ts index a64b14b..4a0387f 100644 --- a/src/components/modules/ModuleFactory.ts +++ b/src/components/modules/ModuleFactory.ts @@ -46,6 +46,7 @@ export default class ModuleFactory implements IModuleFactory { break; } case "question": { + module = new QuestionModule(owner, container, isABuiltIn, model); break; } diff --git a/src/components/modules/base-class/ToolboxModule.ts b/src/components/modules/base-class/ToolboxModule.ts index 9560b57..b78d50e 100644 --- a/src/components/modules/base-class/ToolboxModule.ts +++ b/src/components/modules/base-class/ToolboxModule.ts @@ -63,6 +63,7 @@ export default abstract class ToolboxModule { this.container .querySelector("[data-btn-setting]") .addEventListener("click", (e) => { + console.log("888888888888",this.getAnswerSchema()) e.preventDefault(); this.rootComponent .getOwner() diff --git a/src/components/modules/question/IQuestionModuleDataModel.ts b/src/components/modules/question/IQuestionModuleDataModel.ts index 1951c76..5ef6dc5 100644 --- a/src/components/modules/question/IQuestionModuleDataModel.ts +++ b/src/components/modules/question/IQuestionModuleDataModel.ts @@ -1,12 +1,13 @@ import { HTMLValueType } from "basiscore"; - export default interface IQuestionModuleDataModel { - titleData : HTMLValueType, + titleData: HTMLValueType; title: string | HTMLValueType; part: number; multi: boolean; cssClass: string; help: string; useInList?: boolean; + addToLog?: boolean; + logValue? :string; } diff --git a/src/components/modules/question/QuestionModule.ts b/src/components/modules/question/QuestionModule.ts index db5e5f9..1f94c6e 100644 --- a/src/components/modules/question/QuestionModule.ts +++ b/src/components/modules/question/QuestionModule.ts @@ -22,6 +22,7 @@ export default class QuestionModule extends ContainerModule { private static readonly CSS_CLASS_ID = 4; private static readonly HELP_URL_ID = 5; private static readonly USE_IN_LIST_ID = 6; + private static readonly ADD_LOG_ID = 7; private readonly _data: Partial; private readonly _schema: IQuestion; @@ -36,6 +37,19 @@ export default class QuestionModule extends ContainerModule { getTitleData() { return this._data.titleData; } + set addToLog(value: boolean) { + this._data.addToLog = value; + } + get addToLog() { + return this._data.addToLog; + } + set logName(value: string) { + this._data.logValue = value; + } + get logName(): string { + return this._data.logValue; + } + get title(): string | HTMLValueType { return this._data.title; } @@ -95,6 +109,8 @@ export default class QuestionModule extends ContainerModule { if (this._schema) { this._data = { title: this._schema.title, + addToLog: this._schema?.addToLog, + logValue: this._schema?.logValue, cssClass: this._schema.cssClass, help: this._schema.help, multi: this._schema.multi, @@ -104,7 +120,7 @@ export default class QuestionModule extends ContainerModule { } else { this._data = { multi: false, - title: { value: "test value", id: 0 }, + title: "test title", part: 1, }; } @@ -148,10 +164,18 @@ export default class QuestionModule extends ContainerModule { this._data.useInList ? "2" : "1", QuestionModule.USE_IN_LIST_ID ); + console.log("RRRRRRRR",this.logName) + SchemaUtil.addSimpleValuePropertyToSubSchema( + ans, + this._data.addToLog, + QuestionModule.ADD_LOG_ID,1,this.logName + ); + console.log("mf doom",ans) return ans; } public update(result: IUserActionResult): void { + console.log("result", result); const title = SchemaUtil.getPropertyValue(result, QuestionModule.TITLE_ID); if (title != null) { this.title = title; @@ -187,6 +211,19 @@ export default class QuestionModule extends ContainerModule { result, QuestionModule.USE_IN_LIST_ID ); + const addToLog = SchemaUtil.getPropertyValue( + result, + QuestionModule.ADD_LOG_ID + ); + this.addToLog = addToLog; + if (this.addToLog) { + + const subSchema = SchemaUtil.getSubSchema(result, QuestionModule.ADD_LOG_ID); + this.logName = SchemaUtil.getPropertyValue( + subSchema, + 1 + );console.log("monster",this.addToLog,this.logName) + } if (useInList != null) { this._data.useInList = useInList == "2"; } @@ -196,7 +233,8 @@ export default class QuestionModule extends ContainerModule { const sectionId = this.owner .closest("[data-drop-acceptable-container-schema-type]") .getAttribute("data-bc-section-id"); - + console.log("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFff", this._data); + console.log("sina",this.logName) const question: IQuestion = { ...(this._schema && { prpId: this._schema.prpId }), ...(this._schema && { typeId: this._schema.typeId }), @@ -211,12 +249,15 @@ export default class QuestionModule extends ContainerModule { ...(this._data.titleData && { titleData: this.getTitleData(), }), + ...(this._schema && { wordId: this._schema.wordId }), ...(this._data.multi && { multi: this._data.multi }), ...(sectionId && { sectionId: parseInt(sectionId) }), ...(this._data.cssClass && { cssClass: this._data.cssClass }), ...(this._data.help && { help: this._data.help }), ...(this._data.useInList && { useInList: this._data.useInList }), + ...(this._data.addToLog && { addToLog: this._data.addToLog }), + ...(this.logName && {logValue : this.logName}), parts: null, }; diff --git a/src/components/modules/section/SectionModule.ts b/src/components/modules/section/SectionModule.ts index b28ba3f..3e15bb9 100644 --- a/src/components/modules/section/SectionModule.ts +++ b/src/components/modules/section/SectionModule.ts @@ -63,7 +63,7 @@ export default class SectionModule extends ContainerModule { if (!this._data) { this._data = { id: this.usedForId, - title: { id: 0, value: "test title" }, + title : "test title" , description: "", }; } diff --git a/src/components/property-box/assets/layout.html b/src/components/property-box/assets/layout.html index 05adbd0..ab8b38e 100644 --- a/src/components/property-box/assets/layout.html +++ b/src/components/property-box/assets/layout.html @@ -18,3 +18,4 @@ + diff --git a/src/components/property-box/assets/style.css b/src/components/property-box/assets/style.css index 130f35d..ca0aa19 100644 --- a/src/components/property-box/assets/style.css +++ b/src/components/property-box/assets/style.css @@ -183,4 +183,7 @@ [data-bc-properties-container] [data-bc-fm-lookup] input[type="text"] { margin-left: 0; margin-right: 10px; -} \ No newline at end of file +} +[data-bc-sm-sub-schema-container] [data-bc-part-container] { + width : -webkit-fill-available + } \ No newline at end of file diff --git a/src/components/workspace/assets/style.css b/src/components/workspace/assets/style.css index 6597084..28f7e0c 100644 --- a/src/components/workspace/assets/style.css +++ b/src/components/workspace/assets/style.css @@ -233,7 +233,7 @@ [data-bc-part-related-cell] { margin-left: 0px !important; } -[data-bc-title-container] { +[data-details] [data-bc-title-container] { width: 130px !important; height: 30px !important; margin-left: 0px; diff --git a/wwwroot/component/new/index.html b/wwwroot/component/new/index.html index 10e0049..62b79e1 100644 --- a/wwwroot/component/new/index.html +++ b/wwwroot/component/new/index.html @@ -1,38 +1,51 @@ + + + + + Schema Maker Command - Zero Config + + - - - - - Schema Maker Command - Zero Config - - - - - + - - - - - - - - + + + + + + diff --git a/wwwroot/component/new/schema/index.html b/wwwroot/component/new/schema/index.html index 37830f8..88c7fa4 100644 --- a/wwwroot/component/new/schema/index.html +++ b/wwwroot/component/new/schema/index.html @@ -1,38 +1,52 @@ + + + + + Schema Maker Command - Zero Config + + - - - - - Schema Maker Command - Zero Config - - - - - + - - - - - - - - + + + + + + From a999b599cd135769972f9b8ad275af9ec2382162 Mon Sep 17 00:00:00 2001 From: Ali Date: Tue, 18 Jun 2024 12:46:01 +0200 Subject: [PATCH 02/11] final --- server/schemas/new/questions.json | 13 +++------ src/SchemaUtil.ts | 15 ++++++----- .../modules/base-class/ToolboxModule.ts | 1 - .../question/IQuestionModuleDataModel.ts | 2 +- .../modules/question/QuestionModule.ts | 27 +++++++++---------- 5 files changed, 26 insertions(+), 32 deletions(-) diff --git a/server/schemas/new/questions.json b/server/schemas/new/questions.json index c6e070e..6b70280 100644 --- a/server/schemas/new/questions.json +++ b/server/schemas/new/questions.json @@ -157,15 +157,11 @@ "parts": [ { "part": 1, - "viewType": "radio", + "viewType": "checklist", "fixValues": [ { - "id": 0, - "value": "off" - }, - { - "id": 4, - "value": "on", + "id": 1, + "value": "", "schema": { "schemaId": 10, "paramUrl": "add-to-log", @@ -1218,14 +1214,13 @@ }, { "paramUrl": "add-to-log", - "schemaVersion": 1.1, "lid": 1, "schemaId": "add-to-log", "baseVocab": "http://schema.site/FA/vo", "questions": [ { - "prpId": 1, + "prpId": 71, "vocab": "LogName", "title": "LogName", "multi": false, diff --git a/src/SchemaUtil.ts b/src/SchemaUtil.ts index cd4ed4d..a8e53c8 100644 --- a/src/SchemaUtil.ts +++ b/src/SchemaUtil.ts @@ -115,31 +115,34 @@ export default class SchemaUtil { value: any, prpId: number, innerPrpId: number, - innerValue: string + innerValue: string, + usedForId :number ): void { + console.log(innerValue) if (value != null && value != undefined) { const partValue: IPartValue = { - id: 0, + id: 1, value: value, answer: { - usedForId: 1, - lastUpdate: Date.now().toString(), + usedForId: usedForId, + lastUpdate: "", schemaVersion: "1.1", schemaId: "add-to-log", paramUrl: "add-to-log", lid: 1, properties: [ { + //@ts-ignore prpId: innerPrpId, answers: [ { - id: 0, + id : 1, parts: [ { part: 1, values: [ { - id: 0, + id : 1, value: innerValue, }, ], diff --git a/src/components/modules/base-class/ToolboxModule.ts b/src/components/modules/base-class/ToolboxModule.ts index b78d50e..9560b57 100644 --- a/src/components/modules/base-class/ToolboxModule.ts +++ b/src/components/modules/base-class/ToolboxModule.ts @@ -63,7 +63,6 @@ export default abstract class ToolboxModule { this.container .querySelector("[data-btn-setting]") .addEventListener("click", (e) => { - console.log("888888888888",this.getAnswerSchema()) e.preventDefault(); this.rootComponent .getOwner() diff --git a/src/components/modules/question/IQuestionModuleDataModel.ts b/src/components/modules/question/IQuestionModuleDataModel.ts index 5ef6dc5..dc10f8a 100644 --- a/src/components/modules/question/IQuestionModuleDataModel.ts +++ b/src/components/modules/question/IQuestionModuleDataModel.ts @@ -9,5 +9,5 @@ export default interface IQuestionModuleDataModel { help: string; useInList?: boolean; addToLog?: boolean; - logValue? :string; + logName? :string; } diff --git a/src/components/modules/question/QuestionModule.ts b/src/components/modules/question/QuestionModule.ts index 1f94c6e..a2de90f 100644 --- a/src/components/modules/question/QuestionModule.ts +++ b/src/components/modules/question/QuestionModule.ts @@ -44,10 +44,10 @@ export default class QuestionModule extends ContainerModule { return this._data.addToLog; } set logName(value: string) { - this._data.logValue = value; + this._data.logName = value; } get logName(): string { - return this._data.logValue; + return this._data.logName; } get title(): string | HTMLValueType { @@ -109,8 +109,6 @@ export default class QuestionModule extends ContainerModule { if (this._schema) { this._data = { title: this._schema.title, - addToLog: this._schema?.addToLog, - logValue: this._schema?.logValue, cssClass: this._schema.cssClass, help: this._schema.help, multi: this._schema.multi, @@ -122,6 +120,7 @@ export default class QuestionModule extends ContainerModule { multi: false, title: "test title", part: 1, + logName : "test title" }; } this.title = this._data.title as string; @@ -164,13 +163,13 @@ export default class QuestionModule extends ContainerModule { this._data.useInList ? "2" : "1", QuestionModule.USE_IN_LIST_ID ); - console.log("RRRRRRRR",this.logName) + console.log(this.logName) SchemaUtil.addSimpleValuePropertyToSubSchema( ans, - this._data.addToLog, - QuestionModule.ADD_LOG_ID,1,this.logName + this._data.addToLog ? "1" : null, + QuestionModule.ADD_LOG_ID,71,this.logName,this.usedForId ); - console.log("mf doom",ans) + console.log(JSON.stringify(ans)) return ans; } @@ -215,14 +214,13 @@ export default class QuestionModule extends ContainerModule { result, QuestionModule.ADD_LOG_ID ); - this.addToLog = addToLog; + this.addToLog = addToLog ? true : false; if (this.addToLog) { - const subSchema = SchemaUtil.getSubSchema(result, QuestionModule.ADD_LOG_ID); - this.logName = SchemaUtil.getPropertyValue( + this.logName = SchemaUtil.getPropertyValue( subSchema, - 1 - );console.log("monster",this.addToLog,this.logName) + 71 + );console.log("monster",subSchema,this.addToLog,this.logName) } if (useInList != null) { this._data.useInList = useInList == "2"; @@ -233,7 +231,6 @@ export default class QuestionModule extends ContainerModule { const sectionId = this.owner .closest("[data-drop-acceptable-container-schema-type]") .getAttribute("data-bc-section-id"); - console.log("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFff", this._data); console.log("sina",this.logName) const question: IQuestion = { ...(this._schema && { prpId: this._schema.prpId }), @@ -257,7 +254,7 @@ export default class QuestionModule extends ContainerModule { ...(this._data.help && { help: this._data.help }), ...(this._data.useInList && { useInList: this._data.useInList }), ...(this._data.addToLog && { addToLog: this._data.addToLog }), - ...(this.logName && {logValue : this.logName}), + ...(this.logName && {logName : this.logName}), parts: null, }; From 42ada09a544ed0d2a080b3aefecb623ae0ca7383 Mon Sep 17 00:00:00 2001 From: Ali Date: Sat, 22 Jun 2024 07:43:07 +0200 Subject: [PATCH 03/11] remove logs --- src/SchemaUtil.ts | 1 - src/components/modules/question/QuestionModule.ts | 6 +----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/SchemaUtil.ts b/src/SchemaUtil.ts index a8e53c8..6969aaa 100644 --- a/src/SchemaUtil.ts +++ b/src/SchemaUtil.ts @@ -118,7 +118,6 @@ export default class SchemaUtil { innerValue: string, usedForId :number ): void { - console.log(innerValue) if (value != null && value != undefined) { const partValue: IPartValue = { id: 1, diff --git a/src/components/modules/question/QuestionModule.ts b/src/components/modules/question/QuestionModule.ts index a2de90f..9984838 100644 --- a/src/components/modules/question/QuestionModule.ts +++ b/src/components/modules/question/QuestionModule.ts @@ -163,18 +163,15 @@ export default class QuestionModule extends ContainerModule { this._data.useInList ? "2" : "1", QuestionModule.USE_IN_LIST_ID ); - console.log(this.logName) SchemaUtil.addSimpleValuePropertyToSubSchema( ans, this._data.addToLog ? "1" : null, QuestionModule.ADD_LOG_ID,71,this.logName,this.usedForId ); - console.log(JSON.stringify(ans)) return ans; } public update(result: IUserActionResult): void { - console.log("result", result); const title = SchemaUtil.getPropertyValue(result, QuestionModule.TITLE_ID); if (title != null) { this.title = title; @@ -220,7 +217,7 @@ export default class QuestionModule extends ContainerModule { this.logName = SchemaUtil.getPropertyValue( subSchema, 71 - );console.log("monster",subSchema,this.addToLog,this.logName) + ) } if (useInList != null) { this._data.useInList = useInList == "2"; @@ -231,7 +228,6 @@ export default class QuestionModule extends ContainerModule { const sectionId = this.owner .closest("[data-drop-acceptable-container-schema-type]") .getAttribute("data-bc-section-id"); - console.log("sina",this.logName) const question: IQuestion = { ...(this._schema && { prpId: this._schema.prpId }), ...(this._schema && { typeId: this._schema.typeId }), From aa3afd01dc1441d370083f76c10da1c1e9602d9a Mon Sep 17 00:00:00 2001 From: Ali Date: Sat, 13 Jul 2024 08:40:29 +0200 Subject: [PATCH 04/11] add priority --- server/schemas/new/questions.json | 27 ++++++++++++++++++- server/schemas/newSchema/questions.json | 24 +++++++++++++++++ src/SchemaUtil.ts | 27 ++++++++++++++----- .../modules/list-base/ListBaseModule.ts | 8 ++++-- 4 files changed, 77 insertions(+), 9 deletions(-) diff --git a/server/schemas/new/questions.json b/server/schemas/new/questions.json index 6b70280..a2d2738 100644 --- a/server/schemas/new/questions.json +++ b/server/schemas/new/questions.json @@ -149,7 +149,8 @@ ] } ] - }, { + }, + { "prpId": 7, "vocab": "AddToLog", "title": "AddToLog", @@ -646,6 +647,14 @@ "part": 2, "viewType": "text", "caption": "Title" + }, + { + "part": 3, + "viewType": "text", + "caption": "priority", + "validations": { + "dataType": "float" + } } ] }, @@ -735,6 +744,14 @@ "part": 2, "viewType": "text", "caption": "Title" + }, + { + "part": 3, + "viewType": "text", + "caption": "priority", + "validations": { + "dataType": "float" + } } ] }, @@ -849,6 +866,14 @@ "part": 2, "viewType": "text", "caption": "Title" + }, + { + "part": 3, + "viewType": "text", + "caption": "priority", + "validations": { + "dataType": "float" + } } ] }, diff --git a/server/schemas/newSchema/questions.json b/server/schemas/newSchema/questions.json index 73867ae..6a8d501 100644 --- a/server/schemas/newSchema/questions.json +++ b/server/schemas/newSchema/questions.json @@ -631,6 +631,14 @@ "viewType": "html", "multi": true, "caption": "Title" + }, + { + "part": 3, + "viewType": "text", + "caption": "priority", + "validations": { + "dataType": "float" + } } ] }, @@ -724,6 +732,14 @@ "viewType": "html", "multi": true, "caption": "Title" + }, + { + "part": 3, + "viewType": "text", + "caption": "priority", + "validations": { + "dataType": "float" + } } ] }, @@ -842,6 +858,14 @@ "viewType": "html", "multi": true, "caption": "Title" + }, + { + "part": 3, + "viewType": "text", + "caption": "priority", + "validations": { + "dataType": "float" + } } ] }, diff --git a/src/SchemaUtil.ts b/src/SchemaUtil.ts index 6969aaa..aacfbc4 100644 --- a/src/SchemaUtil.ts +++ b/src/SchemaUtil.ts @@ -116,7 +116,7 @@ export default class SchemaUtil { prpId: number, innerPrpId: number, innerValue: string, - usedForId :number + usedForId: number ): void { if (value != null && value != undefined) { const partValue: IPartValue = { @@ -135,13 +135,13 @@ export default class SchemaUtil { prpId: innerPrpId, answers: [ { - id : 1, + id: 1, parts: [ { part: 1, values: [ { - id : 1, + id: 1, value: innerValue, }, ], @@ -519,10 +519,17 @@ export default class SchemaUtil { part: 2, values: [valuePartValue], }; - + const priorityPartValue :IPartValue = { + id: 0, + value: index +1 , + }; + const priorityPartCollection: IPartCollection = { + part: 3, + values: [priorityPartValue], + }; const answerPart: IAnswerPart = { id: value.id ?? -1 * (index + 1), - parts: [idPartCollection, valuePartCollection], + parts: [idPartCollection, valuePartCollection,priorityPartCollection], }; answers.push(answerPart); }); @@ -553,6 +560,8 @@ export default class SchemaUtil { edited.id = parseInt(editedPart.values[0].value); } else if (editedPart.part == 2) { edited.value = editedPart.values[0].value; + } else if (editedPart.part == 3) { + edited.priority = editedPart.values[0].value; } }); }); @@ -576,14 +585,20 @@ export default class SchemaUtil { const id = addedItem.parts.find((x) => x.part == 1)?.values[0].value; const value = addedItem.parts.find((x) => x.part == 2)?.values[0] .value; + const priority = addedItem.parts.find((x) => x.part == 3)?.values[0] + .value; const added: IFixValue = { id: id ? parseInt(id) : null, value: value, + priority : priority }; retVal.push(added); }); + } } - return retVal.length > 0 ? retVal : null; + return retVal.length > 0 + ? retVal.sort((a, b) => a.priority - b.priority) + : null; } } diff --git a/src/components/modules/list-base/ListBaseModule.ts b/src/components/modules/list-base/ListBaseModule.ts index 22918ec..4a874f4 100644 --- a/src/components/modules/list-base/ListBaseModule.ts +++ b/src/components/modules/list-base/ListBaseModule.ts @@ -26,7 +26,7 @@ export default abstract class ListBaseModule extends PartBaseModule{ + return { + ...fixedValue,priority : index + 1 + } + }) : null , ListBaseModule.FIX_VALUES_ID ); From 3a7791daefbfb5585beb2f98004d6a353ccc7aa7 Mon Sep 17 00:00:00 2001 From: Ali Date: Sat, 13 Jul 2024 13:05:54 +0200 Subject: [PATCH 05/11] first steps --- server/schemas/new/questions.json | 118 ++++++++++++++++++ server/schemas/newSchema/questions.json | 118 ++++++++++++++++++ src/SchemaUtil.ts | 1 + .../text-base/ITextBaseModuleDataModel.ts | 5 +- .../text-base/date-picker/DatePickerModule.ts | 25 +++- .../date-picker/DatePickerOptions.ts | 11 ++ .../date-picker/IDateQuestionPart.ts | 13 ++ 7 files changed, 288 insertions(+), 3 deletions(-) create mode 100644 src/components/modules/text-base/date-picker/DatePickerOptions.ts create mode 100644 src/components/modules/text-base/date-picker/IDateQuestionPart.ts diff --git a/server/schemas/new/questions.json b/server/schemas/new/questions.json index a2d2738..38583b8 100644 --- a/server/schemas/new/questions.json +++ b/server/schemas/new/questions.json @@ -409,6 +409,120 @@ } ] }, + { + "prpId": 3, + "title": "dateProvider", + "sectionId": 2, + "parts": [ + { + "part": 1, + "viewType": "select", + "fixValues": [ + { + "id": 1, + "value": "basisCalendar" + } + ] + } + ] + }, + { + "prpId": 4, + "title": "yearsList", + "sectionId": 2, + "parts": [ + { + "part": 1, + "viewType": "select", + "fixValues": [ + { + "id": 0, + "value": "false" + }, + { + "id": 1, + "value": "true" + } + ] + } + ] + }, + { + "prpId": 6, + "title": "rangeDates", + "sectionId": 2, + "parts": [ + { + "part": 1, + "viewType": "select", + "fixValues": [ + { + "id": 0, + "value": "false" + }, + { + "id": 1, + "value": "true" + } + ] + } + ] + }, + { + "prpId": 7, + "title": "switchType", + "sectionId": 2, + "parts": [ + { + "part": 1, + "viewType": "select", + "fixValues": [ + { + "id": 0, + "value": "false" + }, + { + "id": 1, + "value": "true" + } + ] + } + ] + }, + { + "prpId": 8, + "title": "Type", + "sectionId": 2, + "parts": [ + { + "part": 1, + "viewType": "select", + "fixValues": [ + { + "id": 1, + "value": "click" + } + ] + } + ] + }, + { + "prpId": 9, + "title": "Mode", + "sectionId": 2, + "parts": [ + { + "part": 1, + "viewType": "select", + "fixValues": [ + { + "id": 1, + "value": "Desktop" + } + ] + } + ] + }, { "prpId": 3001, "title": "required", @@ -435,6 +549,10 @@ { "id": 1, "title": "Validations" + }, + { + "id" : 2, + "title" : "Options" } ] }, diff --git a/server/schemas/newSchema/questions.json b/server/schemas/newSchema/questions.json index 6a8d501..4103d05 100644 --- a/server/schemas/newSchema/questions.json +++ b/server/schemas/newSchema/questions.json @@ -387,6 +387,120 @@ } ] }, + { + "prpId": 3, + "title": "dateProvider", + "sectionId": 2, + "parts": [ + { + "part": 1, + "viewType": "select", + "fixValues": [ + { + "id": 1, + "value": "basisCalendar" + } + ] + } + ] + }, + { + "prpId": 4, + "title": "yearsList", + "sectionId": 2, + "parts": [ + { + "part": 1, + "viewType": "select", + "fixValues": [ + { + "id": 0, + "value": "false" + }, + { + "id": 1, + "value": "true" + } + ] + } + ] + }, + { + "prpId": 6, + "title": "rangeDates", + "sectionId": 2, + "parts": [ + { + "part": 1, + "viewType": "select", + "fixValues": [ + { + "id": 0, + "value": "false" + }, + { + "id": 1, + "value": "true" + } + ] + } + ] + }, + { + "prpId": 7, + "title": "switchType", + "sectionId": 2, + "parts": [ + { + "part": 1, + "viewType": "select", + "fixValues": [ + { + "id": 0, + "value": "false" + }, + { + "id": 1, + "value": "true" + } + ] + } + ] + }, + { + "prpId": 8, + "title": "Type", + "sectionId": 2, + "parts": [ + { + "part": 1, + "viewType": "select", + "fixValues": [ + { + "id": 1, + "value": "click" + } + ] + } + ] + }, + { + "prpId": 9, + "title": "Mode", + "sectionId": 2, + "parts": [ + { + "part": 1, + "viewType": "select", + "fixValues": [ + { + "id": 1, + "value": "Desktop" + } + ] + } + ] + }, { "prpId": 3001, "title": "required", @@ -413,6 +527,10 @@ { "id": 1, "title": "Validations" + }, + { + "id" : 2, + "title" : "Options" } ] }, diff --git a/src/SchemaUtil.ts b/src/SchemaUtil.ts index aacfbc4..10c265d 100644 --- a/src/SchemaUtil.ts +++ b/src/SchemaUtil.ts @@ -547,6 +547,7 @@ export default class SchemaUtil { propId: number ): IFixValue[] { const retVal = values ? [...values] : []; + console.log("alireza",result,values,propId) const property = result.properties.find((x) => x.propId == propId); if (property) { if (property.edited) { diff --git a/src/components/modules/text-base/ITextBaseModuleDataModel.ts b/src/components/modules/text-base/ITextBaseModuleDataModel.ts index 7948d00..ca1286e 100644 --- a/src/components/modules/text-base/ITextBaseModuleDataModel.ts +++ b/src/components/modules/text-base/ITextBaseModuleDataModel.ts @@ -1,4 +1,7 @@ import IPartBaseModuleDataModel from "../IPartBaseModuleDataModel"; +import IDatepickerOptions from "./date-picker/DatePickerOptions"; export default interface ITextBaseModuleDataModel - extends IPartBaseModuleDataModel {} + extends IPartBaseModuleDataModel { + options?: Partial +} diff --git a/src/components/modules/text-base/date-picker/DatePickerModule.ts b/src/components/modules/text-base/date-picker/DatePickerModule.ts index 63c16fe..ae95097 100644 --- a/src/components/modules/text-base/date-picker/DatePickerModule.ts +++ b/src/components/modules/text-base/date-picker/DatePickerModule.ts @@ -3,14 +3,35 @@ import IWorkspaceComponent from "../../../workspace/IWorkspaceComponent"; import TextBaseModule from "../TextBaseModule"; import layout from "./assets/layout.html"; import "./assets/style.css"; +import IDateQuestionPart from "./IDateQuestionPart"; export default class DatePickerModule extends TextBaseModule { + + private readonly DATE_PROVIDER_ID = 3 + private readonly YEARS_LIST_ID =4 + private readonly MONTH_LIST_ID =5 + protected readonly RANGE_DATES_ID = 6 + protected readonly SWITCH_TYPE_ID = 7 + protected readonly TYPE_ID = 8 + protected readonly MODE_ID = 9 + constructor( owner: HTMLElement, component: IWorkspaceComponent, isABuiltIn: boolean, - model: IQuestionPart + questionPart: IDateQuestionPart ) { - super(layout, owner, component, "Datepicker", isABuiltIn, model); + super(layout, owner, component, "Datepicker", isABuiltIn, questionPart); + if(questionPart){ + this.data.options = { + Culture : questionPart.Culture, + lid : questionPart.lid, + yearsList : questionPart.yearsList, + monthList : questionPart.monthList, + switchType : questionPart.switchType, + Type : questionPart.Type, + Style : questionPart.Style + } + } } } diff --git a/src/components/modules/text-base/date-picker/DatePickerOptions.ts b/src/components/modules/text-base/date-picker/DatePickerOptions.ts new file mode 100644 index 0000000..3f9f2c3 --- /dev/null +++ b/src/components/modules/text-base/date-picker/DatePickerOptions.ts @@ -0,0 +1,11 @@ +export default interface IDatepickerOptions { + Culture: string; + lid: string; + yearsList: boolean; + monthList: boolean; + rangeDates: boolean; + switchType: string; + Type: string; + Mode: string; + Style: string; +} diff --git a/src/components/modules/text-base/date-picker/IDateQuestionPart.ts b/src/components/modules/text-base/date-picker/IDateQuestionPart.ts new file mode 100644 index 0000000..01eef97 --- /dev/null +++ b/src/components/modules/text-base/date-picker/IDateQuestionPart.ts @@ -0,0 +1,13 @@ +import { IQuestionPart } from "basiscore"; + +export default interface IDateQuestionPart extends IQuestionPart { + Culture?: string; + lid?: string; + yearsList?: boolean; + monthList?: boolean; + rangeDates?: boolean; + switchType?: string; + Type?: string; + Mode?: string; + Style?: string; +} From 87df071af3d03a213a9af4a306d74ae155d0ad98 Mon Sep 17 00:00:00 2001 From: Ali Date: Sat, 13 Jul 2024 13:13:13 +0200 Subject: [PATCH 06/11] final --- src/SchemaUtil.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/SchemaUtil.ts b/src/SchemaUtil.ts index aacfbc4..f0518fc 100644 --- a/src/SchemaUtil.ts +++ b/src/SchemaUtil.ts @@ -10,6 +10,9 @@ import { IMimes, } from "basiscore"; +interface IFixValueEx extends IFixValue { + priority : number +} export default class SchemaUtil { private static readonly CAPTION_ID = 1; private static readonly CSS_CLASS_ID = 2; @@ -543,9 +546,9 @@ export default class SchemaUtil { public static getFixValueProperty( result: IUserActionResult, - values: IFixValue[], + values: IFixValueEx[], propId: number - ): IFixValue[] { + ): IFixValueEx[] { const retVal = values ? [...values] : []; const property = result.properties.find((x) => x.propId == propId); if (property) { @@ -587,7 +590,7 @@ export default class SchemaUtil { .value; const priority = addedItem.parts.find((x) => x.part == 3)?.values[0] .value; - const added: IFixValue = { + const added: IFixValueEx = { id: id ? parseInt(id) : null, value: value, priority : priority From 9bdb99aac7160008b796cabde30402a55e080f2e Mon Sep 17 00:00:00 2001 From: Ali Date: Sat, 13 Jul 2024 13:17:02 +0200 Subject: [PATCH 07/11] final --- server/schemas/new/questions.json | 6 +++--- server/schemas/newSchema/questions.json | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/server/schemas/new/questions.json b/server/schemas/new/questions.json index a2d2738..1baa1dc 100644 --- a/server/schemas/new/questions.json +++ b/server/schemas/new/questions.json @@ -638,7 +638,7 @@ { "part": 1, "viewType": "Text", - "caption": "Value", + "caption": "Id", "validations": { "dataType": "int" } @@ -735,7 +735,7 @@ { "part": 1, "viewType": "Text", - "caption": "Value", + "caption": "Id", "validations": { "dataType": "int" } @@ -857,7 +857,7 @@ { "part": 1, "viewType": "Text", - "caption": "Value", + "caption": "Id", "validations": { "dataType": "int" } diff --git a/server/schemas/newSchema/questions.json b/server/schemas/newSchema/questions.json index 6a8d501..51e4ae1 100644 --- a/server/schemas/newSchema/questions.json +++ b/server/schemas/newSchema/questions.json @@ -620,7 +620,7 @@ { "part": 1, "viewType": "Text", - "caption": "Value", + "caption": "Id", "validations": { "dataType": "int" } @@ -721,7 +721,7 @@ { "part": 1, "viewType": "Text", - "caption": "Value", + "caption": "Id", "validations": { "dataType": "int" } @@ -847,7 +847,7 @@ { "part": 1, "viewType": "Text", - "caption": "Value", + "caption": "Id", "validations": { "dataType": "int" } From c43cf15f622f79c3ab6c2ce244eaedaf589b2149 Mon Sep 17 00:00:00 2001 From: Ali Date: Sat, 13 Jul 2024 14:10:42 +0200 Subject: [PATCH 08/11] FINAL --- src/SchemaUtil.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SchemaUtil.ts b/src/SchemaUtil.ts index f0518fc..dfa4ce9 100644 --- a/src/SchemaUtil.ts +++ b/src/SchemaUtil.ts @@ -548,7 +548,7 @@ export default class SchemaUtil { result: IUserActionResult, values: IFixValueEx[], propId: number - ): IFixValueEx[] { + ): IFixValue[] { const retVal = values ? [...values] : []; const property = result.properties.find((x) => x.propId == propId); if (property) { From e549253d63286a84625e3812fd243d75df80178b Mon Sep 17 00:00:00 2001 From: Ali Date: Sat, 13 Jul 2024 16:00:38 +0200 Subject: [PATCH 09/11] STEP 1 --- server/schemas/new/questions.json | 42 +++++----- server/schemas/newSchema/questions.json | 42 +++++----- .../text-base/date-picker/DatePickerModule.ts | 84 +++++++++++++++---- .../date-picker/DatePickerOptions.ts | 15 ++-- .../date-picker/IDateQuestionPart.ts | 15 ++-- 5 files changed, 122 insertions(+), 76 deletions(-) diff --git a/server/schemas/new/questions.json b/server/schemas/new/questions.json index c20d1cc..d9f600b 100644 --- a/server/schemas/new/questions.json +++ b/server/schemas/new/questions.json @@ -411,16 +411,20 @@ }, { "prpId": 3, - "title": "dateProvider", + "title": "todayButton", "sectionId": 2, "parts": [ { "part": 1, "viewType": "select", "fixValues": [ + { + "id": 0, + "value": "false" + }, { "id": 1, - "value": "basisCalendar" + "value": "true" } ] } @@ -448,8 +452,8 @@ ] }, { - "prpId": 6, - "title": "rangeDates", + "prpId": 5, + "title": "monthList", "sectionId": 2, "parts": [ { @@ -469,8 +473,8 @@ ] }, { - "prpId": 7, - "title": "switchType", + "prpId": 6, + "title": "rangeDates", "sectionId": 2, "parts": [ { @@ -490,36 +494,34 @@ ] }, { - "prpId": 8, - "title": "Type", + "prpId": 7, + "title": "switchType", "sectionId": 2, "parts": [ { "part": 1, "viewType": "select", "fixValues": [ + { + "id": 0, + "value": "false" + }, { "id": 1, - "value": "click" + "value": "true" } ] } ] }, { - "prpId": 9, - "title": "Mode", + "prpId": 8, + "title": "style", "sectionId": 2, "parts": [ { "part": 1, - "viewType": "select", - "fixValues": [ - { - "id": 1, - "value": "Desktop" - } - ] + "viewType": "text" } ] }, @@ -551,8 +553,8 @@ "title": "Validations" }, { - "id" : 2, - "title" : "Options" + "id": 2, + "title": "Options" } ] }, diff --git a/server/schemas/newSchema/questions.json b/server/schemas/newSchema/questions.json index c65217f..ca8ec9f 100644 --- a/server/schemas/newSchema/questions.json +++ b/server/schemas/newSchema/questions.json @@ -389,16 +389,20 @@ }, { "prpId": 3, - "title": "dateProvider", + "title": "todayButton", "sectionId": 2, "parts": [ { "part": 1, "viewType": "select", "fixValues": [ + { + "id": 0, + "value": "false" + }, { "id": 1, - "value": "basisCalendar" + "value": "true" } ] } @@ -426,8 +430,8 @@ ] }, { - "prpId": 6, - "title": "rangeDates", + "prpId": 5, + "title": "monthList", "sectionId": 2, "parts": [ { @@ -447,8 +451,8 @@ ] }, { - "prpId": 7, - "title": "switchType", + "prpId": 6, + "title": "rangeDates", "sectionId": 2, "parts": [ { @@ -468,36 +472,34 @@ ] }, { - "prpId": 8, - "title": "Type", + "prpId": 7, + "title": "switchType", "sectionId": 2, "parts": [ { "part": 1, "viewType": "select", "fixValues": [ + { + "id": 0, + "value": "false" + }, { "id": 1, - "value": "click" + "value": "true" } ] } ] }, { - "prpId": 9, - "title": "Mode", + "prpId": 8, + "title": "style", "sectionId": 2, "parts": [ { "part": 1, - "viewType": "select", - "fixValues": [ - { - "id": 1, - "value": "Desktop" - } - ] + "viewType": "text" } ] }, @@ -529,8 +531,8 @@ "title": "Validations" }, { - "id" : 2, - "title" : "Options" + "id": 2, + "title": "Options" } ] }, diff --git a/src/components/modules/text-base/date-picker/DatePickerModule.ts b/src/components/modules/text-base/date-picker/DatePickerModule.ts index ae95097..eaad38e 100644 --- a/src/components/modules/text-base/date-picker/DatePickerModule.ts +++ b/src/components/modules/text-base/date-picker/DatePickerModule.ts @@ -1,19 +1,24 @@ -import { IQuestionPart } from "basiscore"; +import SchemaUtil from "../../../../SchemaUtil"; import IWorkspaceComponent from "../../../workspace/IWorkspaceComponent"; import TextBaseModule from "../TextBaseModule"; import layout from "./assets/layout.html"; import "./assets/style.css"; import IDateQuestionPart from "./IDateQuestionPart"; +import { + IFixValue, + IQuestionPart, + ViewType, + IAnswerSchema, + IUserActionResult, +} from "basiscore"; export default class DatePickerModule extends TextBaseModule { - - private readonly DATE_PROVIDER_ID = 3 - private readonly YEARS_LIST_ID =4 - private readonly MONTH_LIST_ID =5 - protected readonly RANGE_DATES_ID = 6 - protected readonly SWITCH_TYPE_ID = 7 - protected readonly TYPE_ID = 8 - protected readonly MODE_ID = 9 + private readonly TODAY_BUTTON_ID = 3; + private readonly YEARS_LIST_ID = 4; + private readonly MONTH_LIST_ID = 5; + protected readonly RANGE_DATES_ID = 6; + protected readonly SWITCH_TYPE_ID = 7; + protected readonly STYLE_ID = 8; constructor( owner: HTMLElement, @@ -22,16 +27,59 @@ export default class DatePickerModule extends TextBaseModule { questionPart: IDateQuestionPart ) { super(layout, owner, component, "Datepicker", isABuiltIn, questionPart); - if(questionPart){ + if (questionPart) { this.data.options = { - Culture : questionPart.Culture, - lid : questionPart.lid, - yearsList : questionPart.yearsList, - monthList : questionPart.monthList, - switchType : questionPart.switchType, - Type : questionPart.Type, - Style : questionPart.Style - } + todayButton: questionPart.todayButton, + yearsList: questionPart.yearsList, + monthList: questionPart.monthList, + rangeDates: questionPart.rangeDates, + switchType: questionPart.switchType, + style: questionPart.style, + }; } } + + protected getAnswerSchema(): IAnswerSchema { + var ans = super.getAnswerSchema(); + SchemaUtil.addSimpleValueProperty( + ans, + this.data.options.todayButton == true ? 1 : 0, + this.TODAY_BUTTON_ID + ); + SchemaUtil.addSimpleValueProperty( + ans, + this.data.options.yearsList == true ? 1 : 0, + this.YEARS_LIST_ID + ); + SchemaUtil.addSimpleValueProperty( + ans, + this.data.options.yearsList == true ? 1 : 0, + this.MONTH_LIST_ID + ); + SchemaUtil.addSimpleValueProperty( + ans, + this.data.options.rangeDates == true ? 1 : 0, + this.RANGE_DATES_ID + ); + SchemaUtil.addSimpleValueProperty( + ans, + this.data.options.switchType == true ? 1 : 0, + this.SWITCH_TYPE_ID + ); + SchemaUtil.addSimpleValueProperty( + ans, + this.data.options.style, + this.STYLE_ID + ); + return ans; + } + public update(userAction: IUserActionResult): void { + super.update(userAction); + this.data.options.monthList = SchemaUtil.getPropertyValue(userAction,this.MONTH_LIST_ID) == 1 + this.data.options.yearsList = SchemaUtil.getPropertyValue(userAction,this.YEARS_LIST_ID) == 1 + this.data.options.rangeDates = SchemaUtil.getPropertyValue(userAction,this.RANGE_DATES_ID) == 1 + this.data.options.todayButton = SchemaUtil.getPropertyValue(userAction,this.TODAY_BUTTON_ID) == 1 + this.data.options.switchType = SchemaUtil.getPropertyValue(userAction,this.SWITCH_TYPE_ID) == 1 + this.data.options.style= SchemaUtil.getPropertyValue(userAction,this.SWITCH_TYPE_ID) + } } diff --git a/src/components/modules/text-base/date-picker/DatePickerOptions.ts b/src/components/modules/text-base/date-picker/DatePickerOptions.ts index 3f9f2c3..ade3140 100644 --- a/src/components/modules/text-base/date-picker/DatePickerOptions.ts +++ b/src/components/modules/text-base/date-picker/DatePickerOptions.ts @@ -1,11 +1,8 @@ export default interface IDatepickerOptions { - Culture: string; - lid: string; - yearsList: boolean; - monthList: boolean; - rangeDates: boolean; - switchType: string; - Type: string; - Mode: string; - Style: string; + "todayButton": boolean, + "yearsList" : boolean, + "monthList":boolean, + "rangeDates": boolean, + "switchType" : boolean, + "style": string } diff --git a/src/components/modules/text-base/date-picker/IDateQuestionPart.ts b/src/components/modules/text-base/date-picker/IDateQuestionPart.ts index 01eef97..71a46c5 100644 --- a/src/components/modules/text-base/date-picker/IDateQuestionPart.ts +++ b/src/components/modules/text-base/date-picker/IDateQuestionPart.ts @@ -1,13 +1,10 @@ import { IQuestionPart } from "basiscore"; export default interface IDateQuestionPart extends IQuestionPart { - Culture?: string; - lid?: string; - yearsList?: boolean; - monthList?: boolean; - rangeDates?: boolean; - switchType?: string; - Type?: string; - Mode?: string; - Style?: string; + todayButton: boolean; + yearsList: boolean; + monthList: boolean; + rangeDates: boolean; + switchType: boolean; + style: string; } From 618f64122d7f7b25e5598d44d295e77a6ba77405 Mon Sep 17 00:00:00 2001 From: alibazregar Date: Sun, 14 Jul 2024 13:42:41 +0330 Subject: [PATCH 10/11] commits --- server/schemas/new/questions.json | 81 ++++++++++++++++++ server/schemas/newSchema/questions.json | 81 ++++++++++++++++++ src/components/modules/ModuleFactory.ts | 5 ++ .../text-base/date-picker/DatePickerModule.ts | 11 +++ .../date-picker/DatePickerOptions.ts | 13 +-- .../text-base/timePicker/ITimeQuestionPart.ts | 5 ++ .../text-base/timePicker/TimePickerModule.ts | 51 +++++++++++ .../text-base/timePicker/assets/layout.html | 1 + .../text-base/timePicker/assets/style.css | 24 ++++++ wwwroot/assets/images/time.png | Bin 0 -> 4282 bytes 10 files changed, 266 insertions(+), 6 deletions(-) create mode 100644 src/components/modules/text-base/timePicker/ITimeQuestionPart.ts create mode 100644 src/components/modules/text-base/timePicker/TimePickerModule.ts create mode 100644 src/components/modules/text-base/timePicker/assets/layout.html create mode 100644 src/components/modules/text-base/timePicker/assets/style.css create mode 100644 wwwroot/assets/images/time.png diff --git a/server/schemas/new/questions.json b/server/schemas/new/questions.json index d9f600b..d6616b5 100644 --- a/server/schemas/new/questions.json +++ b/server/schemas/new/questions.json @@ -558,6 +558,87 @@ } ] }, + { + "schemaId": "TimePicker", + "paramUrl": "TimePicker", + "schemaType": "part", + "title": "TimePicker", + "image": "/assets/images/time.png", + "questions": [ + { + "prpId": 1, + "title": "Caption", + "parts": [ + { + "part": 1, + "viewType": "text" + } + ] + }, + { + "prpId": 2, + "title": "Css Class", + "parts": [ + { + "part": 1, + "viewType": "text" + } + ] + }, + { + "prpId": 3, + "title": "clockType", + "sectionId": 2, + "parts": [ + { + "part": 1, + "viewType": "select", + "fixValues": [ + { + "id": 0, + "value": "12h" + }, + { + "id": 1, + "value": "24h" + } + ] + } + ] + }, + { + "prpId": 3001, + "title": "required", + "sectionId": 1, + "parts": [ + { + "part": 1, + "viewType": "select", + "fixValues": [ + { + "id": 0, + "value": "No" + }, + { + "id": 1, + "value": "Yes" + } + ] + } + ] + } + ], + "sections": [ + { + "id": 1, + "title": "Validations" + }, + { + "id": 2, + "title": "Options" + } + ] + }, { "schemaId": "textarea", "paramUrl": "textarea", diff --git a/server/schemas/newSchema/questions.json b/server/schemas/newSchema/questions.json index ca8ec9f..ddd6cc9 100644 --- a/server/schemas/newSchema/questions.json +++ b/server/schemas/newSchema/questions.json @@ -536,6 +536,87 @@ } ] }, + { + "schemaId": "timepicker", + "paramUrl": "timepicker", + "schemaType": "part", + "title": "TimePicker", + "image": "/assets/images/time.png", + "questions": [ + { + "prpId": 1, + "title": "Caption", + "parts": [ + { + "part": 1, + "viewType": "text" + } + ] + }, + { + "prpId": 2, + "title": "Css Class", + "parts": [ + { + "part": 1, + "viewType": "text" + } + ] + }, + { + "prpId": 3, + "title": "clockType", + "sectionId": 2, + "parts": [ + { + "part": 1, + "viewType": "select", + "fixValues": [ + { + "id": 0, + "value": "12h" + }, + { + "id": 1, + "value": "24h" + } + ] + } + ] + }, + { + "prpId": 3001, + "title": "required", + "sectionId": 1, + "parts": [ + { + "part": 1, + "viewType": "select", + "fixValues": [ + { + "id": 0, + "value": "No" + }, + { + "id": 1, + "value": "Yes" + } + ] + } + ] + } + ], + "sections": [ + { + "id": 1, + "title": "Validations" + }, + { + "id": 2, + "title": "Options" + } + ] + }, { "schemaId": "textarea", "paramUrl": "textarea", diff --git a/src/components/modules/ModuleFactory.ts b/src/components/modules/ModuleFactory.ts index 4a0387f..d1fdabd 100644 --- a/src/components/modules/ModuleFactory.ts +++ b/src/components/modules/ModuleFactory.ts @@ -14,6 +14,7 @@ import DatePickerModule from "./text-base/date-picker/DatePickerModule"; import IModuleFactory from "./IModuleFactory"; import QuestionModule from "./question/QuestionModule"; import SectionModule from "./section/SectionModule"; +import TimePickerModule from "./text-base/timePicker/TimePickerModule"; export default class ModuleFactory implements IModuleFactory { public create( @@ -78,6 +79,10 @@ export default class ModuleFactory implements IModuleFactory { module = new DatePickerModule(owner, container, isABuiltIn, model); break; } + case "timepicker": { + module = new TimePickerModule(owner, container, isABuiltIn, model); + break; + } } return module; diff --git a/src/components/modules/text-base/date-picker/DatePickerModule.ts b/src/components/modules/text-base/date-picker/DatePickerModule.ts index eaad38e..ab6241a 100644 --- a/src/components/modules/text-base/date-picker/DatePickerModule.ts +++ b/src/components/modules/text-base/date-picker/DatePickerModule.ts @@ -40,6 +40,9 @@ export default class DatePickerModule extends TextBaseModule { } protected getAnswerSchema(): IAnswerSchema { + if(!this.data.options){ + this.data.options = {} + } var ans = super.getAnswerSchema(); SchemaUtil.addSimpleValueProperty( ans, @@ -75,6 +78,9 @@ export default class DatePickerModule extends TextBaseModule { } public update(userAction: IUserActionResult): void { super.update(userAction); + if(!this.data.options){ + this.data.options = {}; + } this.data.options.monthList = SchemaUtil.getPropertyValue(userAction,this.MONTH_LIST_ID) == 1 this.data.options.yearsList = SchemaUtil.getPropertyValue(userAction,this.YEARS_LIST_ID) == 1 this.data.options.rangeDates = SchemaUtil.getPropertyValue(userAction,this.RANGE_DATES_ID) == 1 @@ -82,4 +88,9 @@ export default class DatePickerModule extends TextBaseModule { this.data.options.switchType = SchemaUtil.getPropertyValue(userAction,this.SWITCH_TYPE_ID) == 1 this.data.options.style= SchemaUtil.getPropertyValue(userAction,this.SWITCH_TYPE_ID) } + public getPartSchema(part: number): IQuestionPart { + const retVal = super.getPartSchema(part) + retVal.options = this.data.options + return retVal + } } diff --git a/src/components/modules/text-base/date-picker/DatePickerOptions.ts b/src/components/modules/text-base/date-picker/DatePickerOptions.ts index ade3140..0a14015 100644 --- a/src/components/modules/text-base/date-picker/DatePickerOptions.ts +++ b/src/components/modules/text-base/date-picker/DatePickerOptions.ts @@ -1,8 +1,9 @@ export default interface IDatepickerOptions { - "todayButton": boolean, - "yearsList" : boolean, - "monthList":boolean, - "rangeDates": boolean, - "switchType" : boolean, - "style": string + todayButton: boolean; + yearsList: boolean; + monthList: boolean; + rangeDates: boolean; + switchType: boolean; + style: string; + clockType: "24h" | "12h"; } diff --git a/src/components/modules/text-base/timePicker/ITimeQuestionPart.ts b/src/components/modules/text-base/timePicker/ITimeQuestionPart.ts new file mode 100644 index 0000000..73d1f56 --- /dev/null +++ b/src/components/modules/text-base/timePicker/ITimeQuestionPart.ts @@ -0,0 +1,5 @@ +import { IQuestionPart } from "basiscore"; + +export default interface ITimeQuestionPart extends IQuestionPart { + clockType: "24h" | "12h"; +} diff --git a/src/components/modules/text-base/timePicker/TimePickerModule.ts b/src/components/modules/text-base/timePicker/TimePickerModule.ts new file mode 100644 index 0000000..5f33673 --- /dev/null +++ b/src/components/modules/text-base/timePicker/TimePickerModule.ts @@ -0,0 +1,51 @@ +import SchemaUtil from "../../../../SchemaUtil"; +import IWorkspaceComponent from "../../../workspace/IWorkspaceComponent"; +import TextBaseModule from "../TextBaseModule"; +import layout from "./assets/layout.html"; +import "./assets/style.css"; +import ITimeQuestionPart from "./ITimeQuestionPart"; +import { IQuestionPart, IAnswerSchema, IUserActionResult } from "basiscore"; + +export default class TimePickerModule extends TextBaseModule { + private readonly CLOCK_TYPE_ID = 3; + constructor( + owner: HTMLElement, + component: IWorkspaceComponent, + isABuiltIn: boolean, + questionPart: ITimeQuestionPart + ) { + super(layout, owner, component, "Timepicker", isABuiltIn, questionPart); + if (!this.data.options) { + this.data.options = {}; + } + if (questionPart) { + this.data.options.clockType = questionPart.clockType; + } + } + + protected getAnswerSchema(): IAnswerSchema { + if (!this.data.options) { + this.data.options = {}; + } + var ans = super.getAnswerSchema(); + SchemaUtil.addSimpleValueProperty( + ans, + this.data.options.clockType == "24h" ? 1 : 0, + this.CLOCK_TYPE_ID + ); + return ans; + } + public update(userAction: IUserActionResult): void { + super.update(userAction); + if (!this.data.options) { + this.data.options = {}; + } + this.data.options.clockType = + SchemaUtil.getPropertyValue(userAction, this.CLOCK_TYPE_ID) == 1 ? "24h" : "12h"; + } + public getPartSchema(part: number): IQuestionPart { + const retVal = super.getPartSchema(part); + retVal.options = this.data.options; + return retVal; + } +} diff --git a/src/components/modules/text-base/timePicker/assets/layout.html b/src/components/modules/text-base/timePicker/assets/layout.html new file mode 100644 index 0000000..6ba1ad1 --- /dev/null +++ b/src/components/modules/text-base/timePicker/assets/layout.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/components/modules/text-base/timePicker/assets/style.css b/src/components/modules/text-base/timePicker/assets/style.css new file mode 100644 index 0000000..8671f13 --- /dev/null +++ b/src/components/modules/text-base/timePicker/assets/style.css @@ -0,0 +1,24 @@ +[data-bc-sm-board] [data-input] { + pointer-events: none; +} + +[data-bc-sm-question-module] input[type="time"][data-input] { + padding: 0.1em 0.4em; + display: inline-block; + border: 1px solid #c7d6db; + background: #f5f8f9; + border-radius: 4px; + transition: border 0.3s linear 0s; + box-sizing: border-box; + width: 100%; + font-size: 12px; + color: #555; + height: 30px; +} + +[data-bc-sm-question-module] input[type="time"][data-input]:focus { + border-color: #66afe9; + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 8px rgba(102, 175, 233, 0.6); + outline: 0 none; + background: #fff8ee; +} \ No newline at end of file diff --git a/wwwroot/assets/images/time.png b/wwwroot/assets/images/time.png new file mode 100644 index 0000000000000000000000000000000000000000..2f285d37897202b6879b39b8b66e9771965f2963 GIT binary patch literal 4282 zcmV;r5Jm5aP)DBx~X$+|Nr-Wy?{2QqR@h#@8LaX+c{1{)22z9CM`k@8Z>Coph1HM4H`6P(4aws z1`QfCXwaa64G{K4_>au5^e_KwAcQfJG9z)+WgPw=xO~I`p{)MRCGx)D!}qz5y+W+rFqnNTU(G`< zc=v~X;n9=PTECi$ERu=CfBZbBTJjP0&|^DVFPLVbcDwsCvcMmO(`F{*jTCCql5NWp ze@w>NIKB^u96iRL;~309h0pco)ht0oj_7`iaNDnDN`Q&dW&C8Ly`bedZscmMNw#~O z>8rV8?9soQ(SyMoxc++j(d!L2f2$aW^Y6{D*ZVoQ1Hr0uhe3)q^Ub?2)H(doM>;mT z=84z5^1yex+l{!3h(vsV52<1ZdZyYrzODMg%#--9;f;l02#jR;;liNmR*DF{1Ky&hO|)^N@b{%!w>A;(>8}{>^-y z9l`cD?cb&E;5o``$3snnzOWO2QCh1=MX6EU~epqLpi$hl{Vg zUyr$%Uxi>EX1a4)HHSZ$rNsH#tGr>s4zqmdVt( z#UYMjawcsj%wpu~gFDWS0F{8nEmX>9+*+RS?8~3qVkX-%a%J%L)P3fS5%$NYIPkG7@Lvgo1Z|ah z?`?IKVa+UB@u)mOJDoLURu+yS#y{m4c-R0mbV1D5p{6g(Awi!mo|VuB1kJGfn|+x+ zV5b;hw~}Zveb5NQF+AQ8#%-*TwMXPx5Bl5e$dkkd0gNn*X~M-?eg+-Ph0SL?zyhqN zoCm&PNqj4|cU@;(fvD@zzX~3rM7CR(8Z%+KY}E)5S(Q^xY77|+Hg!h7n5|SyvHhq9 zRig4#I3aSWkwf~dAHbk9;ICVILKn4R59TZoD#HXep>0=8hcIvwP79K%SEV9tqh_N^qw?+ zSSaesmM`}j!k;&WZlk576uzpFF>s>V^IiB-Wf(aFFcYJ+fu=ZtN$4?AS+DGneiE!V zSIjRC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cy9FV}Q!yIDEwz&XrUAKP+lDOMkAZ{iV~VD$y%FwPpF~Kl9q)I`+Kpd%ZXSC0}kWgnl1hc=yQI!gH3ZqNiCJ@ zoM!f@KlS`JJpMAyKR3KMeWau<&}YFI@cCw>MP2RuV|-F zy$fcXL^A;Bl-c?G9H~OI*}I4SP7^$2Pf(B8wwDnPoA9IFL^aeZ)V?c%;|1ySGib9* zGDb+wdSPo-?^K1FBO(+Fj=gg=1xG|2T3+U)|0wj zX|QqB8vw`X$_@_{kMk8>{$9>n2sldVb%|7Z&mZf0-nTt=bQotc?a$XUO!)TzJNY5T zyv|>FUU1u}U_a#OsKeDjGvx9WJ`*O6X$bc9LxNB zW_VHO)naV?%xx&`T0&qK&4taoIahDgQm{?u`%QRw&rCPM&W1ZO^UPf#PHkyfea)@7 zYc8pw$NZd}IQs(**{Rmp3u!Mx3FSJ5ni7krq~(F2PKHH~pQ`qgT>NnVvyV8Wee-MLxrd#iCGlA(OX6{IpgV%?3Jf@^;?zTN3880BL~PMkT%FMQRCmdJ z8H|3qmXCKc!!@}zN$4|0o5iZqpy|6Xc|&KGhQ*5sZ2Iol>J32F!TbGh=ND5rx2_nB z_P=kWU$VGbuGJ)hO@E5R8M|8iU1d{%+|Ett_NS4b%NJxaZvS*pGJNmK9>ewC1djfG z{G8$mrys)e>jBy9>kU-n83@uT$dv8>1BVS7G-%MEL4yVj8Z>Coph1HM4H`6P c(BK{L9|R+zvi~O&+5i9m07*qoM6N<$f^phT761SM literal 0 HcmV?d00001 From 7be585bf5406229eddb4740613c2ae5622657d72 Mon Sep 17 00:00:00 2001 From: alibazregar Date: Thu, 18 Jul 2024 11:22:31 +0330 Subject: [PATCH 11/11] final --- wwwroot/assets/images/time.png | Bin 4282 -> 830 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/wwwroot/assets/images/time.png b/wwwroot/assets/images/time.png index 2f285d37897202b6879b39b8b66e9771965f2963..b750fa3965c7068361342964b8365275d1ea7379 100644 GIT binary patch liter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