From 501797ddcb1c169e2ab26f2b742631939c012c6b Mon Sep 17 00:00:00 2001 From: Pranab Das <31024886+pranabdas@users.noreply.github.com> Date: Thu, 28 Mar 2024 14:15:18 +0800 Subject: [PATCH 01/20] SOF-7315: accomodate constrained magnetization in CollinearMagnetizationContextProvider --- package-lock.json | 10 +- package.json | 4 +- src/context/providers.js | 2 +- .../CollinearMagnetizationContextProvider.js | 110 ++++++++++++------ 4 files changed, 80 insertions(+), 46 deletions(-) diff --git a/package-lock.json b/package-lock.json index 72505fe..90a9e2e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1470,9 +1470,8 @@ } }, "@exabyte-io/ade.js": { - "version": "2024.3.26-0", - "resolved": "https://registry.npmjs.org/@exabyte-io/ade.js/-/ade.js-2024.3.26-0.tgz", - "integrity": "sha512-qvJceq32IAbGCZwnhkVrqHXI91hI7mCA6GPv9rA6wD/YDvLLr4JTa9UFjPcSrAirChG+4BT7Qw8TtrFu250f7A==", + "version": "git+https://github.com/Exabyte-io/ade.js.git#7473eba2cb264cadc4f52c7bf0077a422b4b7cbd", + "from": "git+https://github.com/Exabyte-io/ade.js.git#7473eba2cb264cadc4f52c7bf0077a422b4b7cbd", "dev": true, "requires": { "@babel/cli": "7.16.0", @@ -1492,9 +1491,8 @@ } }, "@exabyte-io/application-flavors.js": { - "version": "2024.3.26-0", - "resolved": "https://registry.npmjs.org/@exabyte-io/application-flavors.js/-/application-flavors.js-2024.3.26-0.tgz", - "integrity": "sha512-InoarO6VZZJZpPbQiPNdHr8Q5meryxQ36pMtajshevXM4mKYmBcxTD7YE+2zhipetB3ersUuKbE2Qd2rlvcMeg==", + "version": "git+https://github.com/Exabyte-io/application-flavors.git#cb89570dfad2182cc8424dec5ccf2fcea3a6f8e4", + "from": "git+https://github.com/Exabyte-io/application-flavors.git#cb89570dfad2182cc8424dec5ccf2fcea3a6f8e4", "dev": true, "requires": { "@babel/cli": "7.16.0", diff --git a/package.json b/package.json index 7c20a58..6a8db13 100644 --- a/package.json +++ b/package.json @@ -46,8 +46,8 @@ "underscore.string": "^3.3.4" }, "devDependencies": { - "@exabyte-io/ade.js": "2024.3.26-0", - "@exabyte-io/application-flavors.js": "2024.3.26-0", + "@exabyte-io/ade.js": "https://github.com/Exabyte-io/ade.js.git#7473eba2cb264cadc4f52c7bf0077a422b4b7cbd", + "@exabyte-io/application-flavors.js": "https://github.com/Exabyte-io/application-flavors.git#cb89570dfad2182cc8424dec5ccf2fcea3a6f8e4", "@exabyte-io/eslint-config": "^2022.11.17-0", "@exabyte-io/ide.js": "2024.3.26-0", "@exabyte-io/mode.js": "2024.3.26-0", diff --git a/src/context/providers.js b/src/context/providers.js index 894ffe8..530c8e2 100644 --- a/src/context/providers.js +++ b/src/context/providers.js @@ -105,6 +105,6 @@ export const wodeProviders = { }, CollinearMagnetizationDataManager: { providerCls: CollinearMagnetizationContextProvider, - config: _makeImportant({ name: "starting_magnetization" }), + config: _makeImportant({ name: "collinear_magnetization" }), }, }; diff --git a/src/context/providers/CollinearMagnetizationContextProvider.js b/src/context/providers/CollinearMagnetizationContextProvider.js index 90683d9..c68ac4e 100644 --- a/src/context/providers/CollinearMagnetizationContextProvider.js +++ b/src/context/providers/CollinearMagnetizationContextProvider.js @@ -18,35 +18,56 @@ export class CollinearMagnetizationContextProvider extends mix(JSONSchemaFormDat // eslint-disable-next-line class-methods-use-this get defaultData() { - return [ - { - index: 1, - atomicSpecies: - this.uniqueElementsWithLabels?.length > 0 - ? this.uniqueElementsWithLabels[0] - : "", - value: 0.0, - }, - ]; + return { + starting_magnetization: [ + { + index: 1, + atomicSpecies: + this.uniqueElementsWithLabels?.length > 0 + ? this.uniqueElementsWithLabels[0] + : "", + value: 0.0, + }, + ], + is_constrained_magnetization: false, + constrained_magnetization: 0.0, + }; } transformData = (data) => { - return data.map((row) => ({ + const startingMagnetizationWithIndex = data.starting_magnetization.map((row) => ({ ...row, index: this.indexOfElement(row.atomicSpecies), })); + + return { + ...data, + starting_magnetization: startingMagnetizationWithIndex, + }; }; get uiSchemaStyled() { return { - "ui:options": { - addable: true, - orderable: false, - removable: true, - }, items: { - atomicSpecies: this.defaultFieldStyles, - value: this.defaultFieldStyles, + starting_magnetization: { + "ui:options": { + addable: true, + orderable: false, + removable: true, + }, + items: { + atomicSpecies: this.defaultFieldStyles, + value: this.defaultFieldStyles, + }, + "ui:classNames": "col-xs-12", + }, + is_constrained_magnetization: { + "ui:widget": "radio", + "ui:classNames": "col-xs-12", + }, + constrained_magnetization: { + "ui:classNames": "col-xs-12", + }, }, }; } @@ -56,27 +77,42 @@ export class CollinearMagnetizationContextProvider extends mix(JSONSchemaFormDat $schema: "http://json-schema.org/draft-04/schema#", title: "", description: "Set starting magnetization, can have values in the range [-1, +1].", - type: "array", - items: { - type: "object", - properties: { - atomicSpecies: { - type: "string", - title: "Atomic species", - enum: this.uniqueElementsWithLabels, - default: - this.uniqueElementsWithLabels?.length > 0 - ? this.uniqueElementsWithLabels[0] - : "", - }, - value: { - type: "number", - title: "Starting magnetization", - default: 0.0, - minimum: -1.0, - maximum: 1.0, + type: "object", + properties: { + starting_magnetization: { + type: "array", + items: { + type: "object", + properties: { + atomicSpecies: { + type: "string", + title: "Atomic species", + enum: this.uniqueElementsWithLabels, + default: + this.uniqueElementsWithLabels?.length > 0 + ? this.uniqueElementsWithLabels[0] + : "", + }, + value: { + type: "number", + title: "Starting magnetization", + default: 0.0, + minimum: -1.0, + maximum: 1.0, + }, + }, }, }, + is_constrained_magnetization: { + type: "boolean", + title: "Set constrained magnetization instead", + default: false, + }, + constrained_magnetization: { + type: "number", + title: "Constrained magnetization", + default: 0.0, + }, }, }; } From 42f90bb3abac65a85be81b3c1f737b05ca4a37f4 Mon Sep 17 00:00:00 2001 From: Pranab Das <31024886+pranabdas@users.noreply.github.com> Date: Thu, 28 Mar 2024 14:49:44 +0800 Subject: [PATCH 02/20] SOF-7315: fix total_magnetization and styling --- .../CollinearMagnetizationContextProvider.js | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/src/context/providers/CollinearMagnetizationContextProvider.js b/src/context/providers/CollinearMagnetizationContextProvider.js index c68ac4e..422ca09 100644 --- a/src/context/providers/CollinearMagnetizationContextProvider.js +++ b/src/context/providers/CollinearMagnetizationContextProvider.js @@ -30,7 +30,7 @@ export class CollinearMagnetizationContextProvider extends mix(JSONSchemaFormDat }, ], is_constrained_magnetization: false, - constrained_magnetization: 0.0, + total_magnetization: 0.0, }; } @@ -46,6 +46,7 @@ export class CollinearMagnetizationContextProvider extends mix(JSONSchemaFormDat }; }; + // eslint-disable-next-line class-methods-use-this get uiSchemaStyled() { return { items: { @@ -55,18 +56,22 @@ export class CollinearMagnetizationContextProvider extends mix(JSONSchemaFormDat orderable: false, removable: true, }, + "ui:classNames": "col-xs-12", items: { - atomicSpecies: this.defaultFieldStyles, - value: this.defaultFieldStyles, + atomicSpecies: { + "ui:classNames": "col-xs-3 ", + }, + value: { + "ui:classNames": "col-xs-6 ", + }, }, - "ui:classNames": "col-xs-12", }, is_constrained_magnetization: { "ui:widget": "radio", "ui:classNames": "col-xs-12", }, - constrained_magnetization: { - "ui:classNames": "col-xs-12", + total_magnetization: { + "ui:classNames": "col-xs-6", }, }, }; @@ -108,9 +113,9 @@ export class CollinearMagnetizationContextProvider extends mix(JSONSchemaFormDat title: "Set constrained magnetization instead", default: false, }, - constrained_magnetization: { + total_magnetization: { type: "number", - title: "Constrained magnetization", + title: "total magnetization", default: 0.0, }, }, From 70a6f165a8c6c1c738b7391dfce60aa39d55829b Mon Sep 17 00:00:00 2001 From: Pranab Das <31024886+pranabdas@users.noreply.github.com> Date: Thu, 28 Mar 2024 16:28:30 +0800 Subject: [PATCH 03/20] SOF-7315: bump json-schema version to draft-07 --- src/context/providers/CollinearMagnetizationContextProvider.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/context/providers/CollinearMagnetizationContextProvider.js b/src/context/providers/CollinearMagnetizationContextProvider.js index 422ca09..cdce747 100644 --- a/src/context/providers/CollinearMagnetizationContextProvider.js +++ b/src/context/providers/CollinearMagnetizationContextProvider.js @@ -79,7 +79,7 @@ export class CollinearMagnetizationContextProvider extends mix(JSONSchemaFormDat get jsonSchema() { return { - $schema: "http://json-schema.org/draft-04/schema#", + $schema: "http://json-schema.org/draft-07/schema#", title: "", description: "Set starting magnetization, can have values in the range [-1, +1].", type: "object", From 6973ff3cea0ca5a605f716a892287af770e0316d Mon Sep 17 00:00:00 2001 From: Pranab Das <31024886+pranabdas@users.noreply.github.com> Date: Thu, 28 Mar 2024 17:42:08 +0800 Subject: [PATCH 04/20] SOF-7315: replace radio button with checkbox --- src/context/providers/CollinearMagnetizationContextProvider.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/context/providers/CollinearMagnetizationContextProvider.js b/src/context/providers/CollinearMagnetizationContextProvider.js index cdce747..a0804a8 100644 --- a/src/context/providers/CollinearMagnetizationContextProvider.js +++ b/src/context/providers/CollinearMagnetizationContextProvider.js @@ -67,7 +67,7 @@ export class CollinearMagnetizationContextProvider extends mix(JSONSchemaFormDat }, }, is_constrained_magnetization: { - "ui:widget": "radio", + "ui:widget": "checkboxes", "ui:classNames": "col-xs-12", }, total_magnetization: { From d3c4d13610d66f75dc27d45727084b009e61869f Mon Sep 17 00:00:00 2001 From: Pranab Das <31024886+pranabdas@users.noreply.github.com> Date: Thu, 28 Mar 2024 21:02:55 +0800 Subject: [PATCH 05/20] SOF-7315: clear ui styling --- .../CollinearMagnetizationContextProvider.js | 28 ++----------------- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/src/context/providers/CollinearMagnetizationContextProvider.js b/src/context/providers/CollinearMagnetizationContextProvider.js index a0804a8..ebd0752 100644 --- a/src/context/providers/CollinearMagnetizationContextProvider.js +++ b/src/context/providers/CollinearMagnetizationContextProvider.js @@ -49,31 +49,9 @@ export class CollinearMagnetizationContextProvider extends mix(JSONSchemaFormDat // eslint-disable-next-line class-methods-use-this get uiSchemaStyled() { return { - items: { - starting_magnetization: { - "ui:options": { - addable: true, - orderable: false, - removable: true, - }, - "ui:classNames": "col-xs-12", - items: { - atomicSpecies: { - "ui:classNames": "col-xs-3 ", - }, - value: { - "ui:classNames": "col-xs-6 ", - }, - }, - }, - is_constrained_magnetization: { - "ui:widget": "checkboxes", - "ui:classNames": "col-xs-12", - }, - total_magnetization: { - "ui:classNames": "col-xs-6", - }, - }, + starting_magnetization: {}, + is_constrained_magnetization: {}, + total_magnetization: {}, }; } From 384b176c4bb177933cb81f904d920c56d557d87f Mon Sep 17 00:00:00 2001 From: Pranab Das <31024886+pranabdas@users.noreply.github.com> Date: Thu, 28 Mar 2024 22:04:10 +0800 Subject: [PATCH 06/20] SOF-7315: apply style for nested array items --- .../CollinearMagnetizationContextProvider.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/context/providers/CollinearMagnetizationContextProvider.js b/src/context/providers/CollinearMagnetizationContextProvider.js index ebd0752..4a6c8ba 100644 --- a/src/context/providers/CollinearMagnetizationContextProvider.js +++ b/src/context/providers/CollinearMagnetizationContextProvider.js @@ -49,7 +49,16 @@ export class CollinearMagnetizationContextProvider extends mix(JSONSchemaFormDat // eslint-disable-next-line class-methods-use-this get uiSchemaStyled() { return { - starting_magnetization: {}, + starting_magnetization: { + items: { + atomicSpecies: { + "ui:classNames": "col-xs-3 ", + }, + value: { + "ui:classNames": "col-xs-6 ", + }, + }, + }, is_constrained_magnetization: {}, total_magnetization: {}, }; From 34181b2f39db25f69e8e30ec4698d5836177c95f Mon Sep 17 00:00:00 2001 From: Pranab Das <31024886+pranabdas@users.noreply.github.com> Date: Thu, 28 Mar 2024 22:13:04 +0800 Subject: [PATCH 07/20] SOF-7315: improve styling --- .../providers/CollinearMagnetizationContextProvider.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/context/providers/CollinearMagnetizationContextProvider.js b/src/context/providers/CollinearMagnetizationContextProvider.js index 4a6c8ba..c736190 100644 --- a/src/context/providers/CollinearMagnetizationContextProvider.js +++ b/src/context/providers/CollinearMagnetizationContextProvider.js @@ -60,7 +60,9 @@ export class CollinearMagnetizationContextProvider extends mix(JSONSchemaFormDat }, }, is_constrained_magnetization: {}, - total_magnetization: {}, + total_magnetization: { + "ui:classNames": "col-xs-6 ", + }, }; } From fc42fb45d4f8b063c70f4167aa30b9e9ae529c83 Mon Sep 17 00:00:00 2001 From: Pranab Das <31024886+pranabdas@users.noreply.github.com> Date: Fri, 29 Mar 2024 10:20:55 +0800 Subject: [PATCH 08/20] SOF-7315: try using rjsf ui widget --- .../providers/CollinearMagnetizationContextProvider.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/context/providers/CollinearMagnetizationContextProvider.js b/src/context/providers/CollinearMagnetizationContextProvider.js index c736190..b3525db 100644 --- a/src/context/providers/CollinearMagnetizationContextProvider.js +++ b/src/context/providers/CollinearMagnetizationContextProvider.js @@ -52,16 +52,18 @@ export class CollinearMagnetizationContextProvider extends mix(JSONSchemaFormDat starting_magnetization: { items: { atomicSpecies: { - "ui:classNames": "col-xs-3 ", + "ui:classNames": "col-xs-3", }, value: { - "ui:classNames": "col-xs-6 ", + "ui:classNames": "col-xs-6", }, }, }, - is_constrained_magnetization: {}, + is_constrained_magnetization: { + "ui:widget": "checkbox", + }, total_magnetization: { - "ui:classNames": "col-xs-6 ", + "ui:classNames": "col-xs-6", }, }; } From 241340f10b2d512bfa5271fff10388732cbdb9e6 Mon Sep 17 00:00:00 2001 From: Pranab Das <31024886+pranabdas@users.noreply.github.com> Date: Fri, 29 Mar 2024 10:32:50 +0800 Subject: [PATCH 09/20] SOF-7315: checkbox is default in rjsf --- .../providers/CollinearMagnetizationContextProvider.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/context/providers/CollinearMagnetizationContextProvider.js b/src/context/providers/CollinearMagnetizationContextProvider.js index b3525db..ff900e5 100644 --- a/src/context/providers/CollinearMagnetizationContextProvider.js +++ b/src/context/providers/CollinearMagnetizationContextProvider.js @@ -59,9 +59,7 @@ export class CollinearMagnetizationContextProvider extends mix(JSONSchemaFormDat }, }, }, - is_constrained_magnetization: { - "ui:widget": "checkbox", - }, + is_constrained_magnetization: {}, total_magnetization: { "ui:classNames": "col-xs-6", }, @@ -106,7 +104,7 @@ export class CollinearMagnetizationContextProvider extends mix(JSONSchemaFormDat }, total_magnetization: { type: "number", - title: "total magnetization", + title: "Total magnetization", default: 0.0, }, }, From 381551df204423c243e326f5b3349b18e2d60e01 Mon Sep 17 00:00:00 2001 From: Pranab Das <31024886+pranabdas@users.noreply.github.com> Date: Fri, 29 Mar 2024 13:09:16 +0800 Subject: [PATCH 10/20] SOF-7315: update libs --- package-lock.json | 8 ++++---- package.json | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 90a9e2e..ae3c7ca 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1470,8 +1470,8 @@ } }, "@exabyte-io/ade.js": { - "version": "git+https://github.com/Exabyte-io/ade.js.git#7473eba2cb264cadc4f52c7bf0077a422b4b7cbd", - "from": "git+https://github.com/Exabyte-io/ade.js.git#7473eba2cb264cadc4f52c7bf0077a422b4b7cbd", + "version": "git+https://github.com/Exabyte-io/ade.js.git#aa77cdb89b2faee2c9f22639e32ae16367826efe", + "from": "git+https://github.com/Exabyte-io/ade.js.git#aa77cdb89b2faee2c9f22639e32ae16367826efe", "dev": true, "requires": { "@babel/cli": "7.16.0", @@ -1491,8 +1491,8 @@ } }, "@exabyte-io/application-flavors.js": { - "version": "git+https://github.com/Exabyte-io/application-flavors.git#cb89570dfad2182cc8424dec5ccf2fcea3a6f8e4", - "from": "git+https://github.com/Exabyte-io/application-flavors.git#cb89570dfad2182cc8424dec5ccf2fcea3a6f8e4", + "version": "git+https://github.com/Exabyte-io/application-flavors.git#b18e7e571491fe372db70e06ec95b8e21503cbe1", + "from": "git+https://github.com/Exabyte-io/application-flavors.git#b18e7e571491fe372db70e06ec95b8e21503cbe1", "dev": true, "requires": { "@babel/cli": "7.16.0", diff --git a/package.json b/package.json index 6a8db13..e3aecd5 100644 --- a/package.json +++ b/package.json @@ -46,8 +46,8 @@ "underscore.string": "^3.3.4" }, "devDependencies": { - "@exabyte-io/ade.js": "https://github.com/Exabyte-io/ade.js.git#7473eba2cb264cadc4f52c7bf0077a422b4b7cbd", - "@exabyte-io/application-flavors.js": "https://github.com/Exabyte-io/application-flavors.git#cb89570dfad2182cc8424dec5ccf2fcea3a6f8e4", + "@exabyte-io/ade.js": "https://github.com/Exabyte-io/ade.js.git#aa77cdb89b2faee2c9f22639e32ae16367826efe", + "@exabyte-io/application-flavors.js": "https://github.com/Exabyte-io/application-flavors.git#b18e7e571491fe372db70e06ec95b8e21503cbe1", "@exabyte-io/eslint-config": "^2022.11.17-0", "@exabyte-io/ide.js": "2024.3.26-0", "@exabyte-io/mode.js": "2024.3.26-0", From af4e78e8cce36d612cb0aba74f9f5754cce8b3ea Mon Sep 17 00:00:00 2001 From: Pranab Das <31024886+pranabdas@users.noreply.github.com> Date: Fri, 29 Mar 2024 16:37:02 +0800 Subject: [PATCH 11/20] SOF-7315: remove redundant class names, bump json-schema to draft-07, refactor default/first element --- .../CollinearMagnetizationContextProvider.js | 16 ++++++++-------- .../providers/HubbardContextProviderLegacy.js | 3 --- src/context/providers/HubbardJContextProvider.js | 5 +---- src/context/providers/HubbardUContextProvider.js | 5 +---- src/context/providers/HubbardVContextProvider.js | 5 +---- .../providers/IonDynamicsContextProvider.js | 2 +- 6 files changed, 12 insertions(+), 24 deletions(-) diff --git a/src/context/providers/CollinearMagnetizationContextProvider.js b/src/context/providers/CollinearMagnetizationContextProvider.js index ff900e5..13161d8 100644 --- a/src/context/providers/CollinearMagnetizationContextProvider.js +++ b/src/context/providers/CollinearMagnetizationContextProvider.js @@ -7,6 +7,12 @@ export class CollinearMagnetizationContextProvider extends mix(JSONSchemaFormDat ) { static Material = Made.Material; + constructor(config) { + super(config); + this.firstElement = + this.uniqueElementsWithLabels?.length > 0 ? this.uniqueElementsWithLabels[0] : ""; + } + get uniqueElementsWithLabels() { const elementsWithLabelsArray = this.material?.Basis?.elementsWithLabelsArray || []; return [...new Set(elementsWithLabelsArray)]; @@ -22,10 +28,7 @@ export class CollinearMagnetizationContextProvider extends mix(JSONSchemaFormDat starting_magnetization: [ { index: 1, - atomicSpecies: - this.uniqueElementsWithLabels?.length > 0 - ? this.uniqueElementsWithLabels[0] - : "", + atomicSpecies: this.firstElement, value: 0.0, }, ], @@ -82,10 +85,7 @@ export class CollinearMagnetizationContextProvider extends mix(JSONSchemaFormDat type: "string", title: "Atomic species", enum: this.uniqueElementsWithLabels, - default: - this.uniqueElementsWithLabels?.length > 0 - ? this.uniqueElementsWithLabels[0] - : "", + default: this.firstElement, }, value: { type: "number", diff --git a/src/context/providers/HubbardContextProviderLegacy.js b/src/context/providers/HubbardContextProviderLegacy.js index 2a802ee..8088171 100644 --- a/src/context/providers/HubbardContextProviderLegacy.js +++ b/src/context/providers/HubbardContextProviderLegacy.js @@ -35,9 +35,6 @@ export class HubbardContextProviderLegacy extends HubbardUContextProvider { orderable: false, removable: true, }, - title: { - "ui:classNames": "col-xs-12", - }, items: { atomicSpecies: this.defaultFieldStyles, atomicSpeciesIndex: { ...this.defaultFieldStyles, "ui:readonly": true }, diff --git a/src/context/providers/HubbardJContextProvider.js b/src/context/providers/HubbardJContextProvider.js index 5caa06c..8ea8664 100644 --- a/src/context/providers/HubbardJContextProvider.js +++ b/src/context/providers/HubbardJContextProvider.js @@ -24,9 +24,6 @@ export class HubbardJContextProvider extends HubbardUContextProvider { orderable: true, removable: true, }, - title: { - "ui:classNames": "col-xs-12", - }, items: { paramType: this.defaultFieldStyles, atomicSpecies: this.defaultFieldStyles, @@ -38,7 +35,7 @@ export class HubbardJContextProvider extends HubbardUContextProvider { get jsonSchema() { return { - $schema: "http://json-schema.org/draft-04/schema#", + $schema: "http://json-schema.org/draft-07/schema#", title: "", description: "Hubbard parameters for DFT+U+J calculation.", type: "array", diff --git a/src/context/providers/HubbardUContextProvider.js b/src/context/providers/HubbardUContextProvider.js index 742a105..2324af3 100644 --- a/src/context/providers/HubbardUContextProvider.js +++ b/src/context/providers/HubbardUContextProvider.js @@ -58,9 +58,6 @@ export class HubbardUContextProvider extends mix(JSONSchemaFormDataProvider).wit orderable: false, removable: true, }, - title: { - "ui:classNames": "col-xs-12", - }, items: { atomicSpecies: this.defaultFieldStyles, atomicOrbital: this.defaultFieldStyles, @@ -71,7 +68,7 @@ export class HubbardUContextProvider extends mix(JSONSchemaFormDataProvider).wit get jsonSchema() { return { - $schema: "http://json-schema.org/draft-04/schema#", + $schema: "http://json-schema.org/draft-07/schema#", title: "", description: "Hubbard U parameters for DFT+U or DFT+U+V calculation.", type: "array", diff --git a/src/context/providers/HubbardVContextProvider.js b/src/context/providers/HubbardVContextProvider.js index fa3cfd3..262115b 100644 --- a/src/context/providers/HubbardVContextProvider.js +++ b/src/context/providers/HubbardVContextProvider.js @@ -40,9 +40,6 @@ export class HubbardVContextProvider extends HubbardUContextProvider { orderable: true, removable: true, }, - title: { - "ui:classNames": "col-xs-12", - }, items: { atomicSpecies: this.defaultFieldStyles, atomicOrbital: this.defaultFieldStyles, @@ -57,7 +54,7 @@ export class HubbardVContextProvider extends HubbardUContextProvider { get jsonSchema() { return { - $schema: "http://json-schema.org/draft-04/schema#", + $schema: "http://json-schema.org/draft-07/schema#", title: "", description: "Hubbard V parameters for DFT+U+V calculation.", type: "array", diff --git a/src/context/providers/IonDynamicsContextProvider.js b/src/context/providers/IonDynamicsContextProvider.js index ff3f315..097d5fe 100644 --- a/src/context/providers/IonDynamicsContextProvider.js +++ b/src/context/providers/IonDynamicsContextProvider.js @@ -26,7 +26,7 @@ export class IonDynamicsContextProvider extends JSONSchemaFormDataProvider { // eslint-disable-next-line class-methods-use-this get jsonSchema() { return { - $schema: "http://json-schema.org/draft-04/schema#", + $schema: "http://json-schema.org/draft-07/schema#", type: "object", description: "Important parameters for molecular dynamics calculation", properties: { From 2ccda74cd72b6b90c2ba8ec6ea3bf6ed76a6820f Mon Sep 17 00:00:00 2001 From: Pranab Das <31024886+pranabdas@users.noreply.github.com> Date: Fri, 29 Mar 2024 17:53:31 +0800 Subject: [PATCH 12/20] SOF-7315: make part of ui readonly based on is_constrained_magnetization --- .../providers/CollinearMagnetizationContextProvider.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/context/providers/CollinearMagnetizationContextProvider.js b/src/context/providers/CollinearMagnetizationContextProvider.js index 13161d8..880f5dd 100644 --- a/src/context/providers/CollinearMagnetizationContextProvider.js +++ b/src/context/providers/CollinearMagnetizationContextProvider.js @@ -1,5 +1,6 @@ import { JSONSchemaFormDataProvider, MaterialContextMixin } from "@mat3ra/code/dist/js/context"; import { Made } from "@mat3ra/made"; +import lodash from "lodash"; import { mix } from "mixwith"; export class CollinearMagnetizationContextProvider extends mix(JSONSchemaFormDataProvider).with( @@ -11,6 +12,11 @@ export class CollinearMagnetizationContextProvider extends mix(JSONSchemaFormDat super(config); this.firstElement = this.uniqueElementsWithLabels?.length > 0 ? this.uniqueElementsWithLabels[0] : ""; + this.is_constrained_magnetization = lodash.get( + this.data, + "is_constrained_magnetization", + false, + ); } get uniqueElementsWithLabels() { @@ -61,10 +67,12 @@ export class CollinearMagnetizationContextProvider extends mix(JSONSchemaFormDat "ui:classNames": "col-xs-6", }, }, + "ui:readonly": this.is_constrained_magnetization, }, is_constrained_magnetization: {}, total_magnetization: { "ui:classNames": "col-xs-6", + "ui:readonly": !this.is_constrained_magnetization, }, }; } From e3d20cb7d21ee1c5b496882c4cbcc51e91603d7b Mon Sep 17 00:00:00 2001 From: Pranab Das <31024886+pranabdas@users.noreply.github.com> Date: Fri, 29 Mar 2024 18:47:16 +0800 Subject: [PATCH 13/20] =?UTF-8?q?SOF-7315:=20rename=20is=5Fconstrained=5Fm?= =?UTF-8?q?agnetization=20=E2=86=92=20is=5Ftotal=5Fmagnetization?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 8 ++++---- package.json | 4 ++-- .../CollinearMagnetizationContextProvider.js | 18 +++++++----------- 3 files changed, 13 insertions(+), 17 deletions(-) diff --git a/package-lock.json b/package-lock.json index af78761..61d3dc3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1470,8 +1470,8 @@ } }, "@exabyte-io/ade.js": { - "version": "git+https://github.com/Exabyte-io/ade.js.git#6c3634821c749f880d2168de924a2d58a9b33f5d", - "from": "git+https://github.com/Exabyte-io/ade.js.git#6c3634821c749f880d2168de924a2d58a9b33f5d", + "version": "git+https://github.com/Exabyte-io/ade.js.git#8449549b4c8a9c7a721c015123746930bb4acbcb", + "from": "git+https://github.com/Exabyte-io/ade.js.git#8449549b4c8a9c7a721c015123746930bb4acbcb", "dev": true, "requires": { "@babel/cli": "7.16.0", @@ -1491,8 +1491,8 @@ } }, "@exabyte-io/application-flavors.js": { - "version": "git+https://github.com/Exabyte-io/application-flavors.git#d4d07dec422f62e30df70c649b038c3a2ab3e21e", - "from": "git+https://github.com/Exabyte-io/application-flavors.git#d4d07dec422f62e30df70c649b038c3a2ab3e21e", + "version": "git+https://github.com/Exabyte-io/application-flavors.git#1f8546c9454fa8f396f0c3f85bd5443d67fd2c7e", + "from": "git+https://github.com/Exabyte-io/application-flavors.git#1f8546c9454fa8f396f0c3f85bd5443d67fd2c7e", "dev": true, "requires": { "@babel/cli": "7.16.0", diff --git a/package.json b/package.json index 4da31e2..c5b3d93 100644 --- a/package.json +++ b/package.json @@ -46,8 +46,8 @@ "underscore.string": "^3.3.4" }, "devDependencies": { - "@exabyte-io/ade.js": "https://github.com/Exabyte-io/ade.js.git#6c3634821c749f880d2168de924a2d58a9b33f5d", - "@exabyte-io/application-flavors.js": "https://github.com/Exabyte-io/application-flavors.git#d4d07dec422f62e30df70c649b038c3a2ab3e21e", + "@exabyte-io/ade.js": "https://github.com/Exabyte-io/ade.js.git#8449549b4c8a9c7a721c015123746930bb4acbcb", + "@exabyte-io/application-flavors.js": "https://github.com/Exabyte-io/application-flavors.git#1f8546c9454fa8f396f0c3f85bd5443d67fd2c7e", "@exabyte-io/eslint-config": "^2022.11.17-0", "@exabyte-io/ide.js": "2024.3.26-0", "@exabyte-io/mode.js": "2024.3.26-0", diff --git a/src/context/providers/CollinearMagnetizationContextProvider.js b/src/context/providers/CollinearMagnetizationContextProvider.js index 880f5dd..d8ba1ab 100644 --- a/src/context/providers/CollinearMagnetizationContextProvider.js +++ b/src/context/providers/CollinearMagnetizationContextProvider.js @@ -12,11 +12,7 @@ export class CollinearMagnetizationContextProvider extends mix(JSONSchemaFormDat super(config); this.firstElement = this.uniqueElementsWithLabels?.length > 0 ? this.uniqueElementsWithLabels[0] : ""; - this.is_constrained_magnetization = lodash.get( - this.data, - "is_constrained_magnetization", - false, - ); + this.is_total_magnetization = lodash.get(this.data, "is_total_magnetization", false); } get uniqueElementsWithLabels() { @@ -38,7 +34,7 @@ export class CollinearMagnetizationContextProvider extends mix(JSONSchemaFormDat value: 0.0, }, ], - is_constrained_magnetization: false, + is_total_magnetization: false, total_magnetization: 0.0, }; } @@ -67,12 +63,12 @@ export class CollinearMagnetizationContextProvider extends mix(JSONSchemaFormDat "ui:classNames": "col-xs-6", }, }, - "ui:readonly": this.is_constrained_magnetization, + "ui:readonly": this.is_total_magnetization, }, - is_constrained_magnetization: {}, + is_total_magnetization: {}, total_magnetization: { "ui:classNames": "col-xs-6", - "ui:readonly": !this.is_constrained_magnetization, + "ui:readonly": !this.is_total_magnetization, }, }; } @@ -105,9 +101,9 @@ export class CollinearMagnetizationContextProvider extends mix(JSONSchemaFormDat }, }, }, - is_constrained_magnetization: { + is_total_magnetization: { type: "boolean", - title: "Set constrained magnetization instead", + title: "Set total magnetization instead", default: false, }, total_magnetization: { From a588d904da97f60b1bcad2c545fb2222ab7fb0f1 Mon Sep 17 00:00:00 2001 From: Pranab Das <31024886+pranabdas@users.noreply.github.com> Date: Fri, 29 Mar 2024 19:02:22 +0800 Subject: [PATCH 14/20] SOF-7315: set maxItems in starting_magnetization array --- src/context/providers/CollinearMagnetizationContextProvider.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/context/providers/CollinearMagnetizationContextProvider.js b/src/context/providers/CollinearMagnetizationContextProvider.js index d8ba1ab..79ed6e6 100644 --- a/src/context/providers/CollinearMagnetizationContextProvider.js +++ b/src/context/providers/CollinearMagnetizationContextProvider.js @@ -82,6 +82,7 @@ export class CollinearMagnetizationContextProvider extends mix(JSONSchemaFormDat properties: { starting_magnetization: { type: "array", + maxItems: this.uniqueElementsWithLabels.length, items: { type: "object", properties: { From 3e7ac518ebd1799e9a6d96e374d4678bcb6c2c9a Mon Sep 17 00:00:00 2001 From: Pranab Das <31024886+pranabdas@users.noreply.github.com> Date: Fri, 29 Mar 2024 19:35:03 +0800 Subject: [PATCH 15/20] SOF-7315: update deps --- package-lock.json | 8 ++++---- package.json | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 61d3dc3..b3aff74 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1470,8 +1470,8 @@ } }, "@exabyte-io/ade.js": { - "version": "git+https://github.com/Exabyte-io/ade.js.git#8449549b4c8a9c7a721c015123746930bb4acbcb", - "from": "git+https://github.com/Exabyte-io/ade.js.git#8449549b4c8a9c7a721c015123746930bb4acbcb", + "version": "git+https://github.com/Exabyte-io/ade.js.git#0c02cb777caf441fac31b806916faf107d42bcd9", + "from": "git+https://github.com/Exabyte-io/ade.js.git#0c02cb777caf441fac31b806916faf107d42bcd9", "dev": true, "requires": { "@babel/cli": "7.16.0", @@ -1491,8 +1491,8 @@ } }, "@exabyte-io/application-flavors.js": { - "version": "git+https://github.com/Exabyte-io/application-flavors.git#1f8546c9454fa8f396f0c3f85bd5443d67fd2c7e", - "from": "git+https://github.com/Exabyte-io/application-flavors.git#1f8546c9454fa8f396f0c3f85bd5443d67fd2c7e", + "version": "git+https://github.com/Exabyte-io/application-flavors.git#77dca4100e6c39dd1da2eaac748e0f97fc49db61", + "from": "git+https://github.com/Exabyte-io/application-flavors.git#77dca4100e6c39dd1da2eaac748e0f97fc49db61", "dev": true, "requires": { "@babel/cli": "7.16.0", diff --git a/package.json b/package.json index c5b3d93..387bd10 100644 --- a/package.json +++ b/package.json @@ -46,8 +46,8 @@ "underscore.string": "^3.3.4" }, "devDependencies": { - "@exabyte-io/ade.js": "https://github.com/Exabyte-io/ade.js.git#8449549b4c8a9c7a721c015123746930bb4acbcb", - "@exabyte-io/application-flavors.js": "https://github.com/Exabyte-io/application-flavors.git#1f8546c9454fa8f396f0c3f85bd5443d67fd2c7e", + "@exabyte-io/ade.js": "https://github.com/Exabyte-io/ade.js.git#0c02cb777caf441fac31b806916faf107d42bcd9", + "@exabyte-io/application-flavors.js": "https://github.com/Exabyte-io/application-flavors.git#77dca4100e6c39dd1da2eaac748e0f97fc49db61", "@exabyte-io/eslint-config": "^2022.11.17-0", "@exabyte-io/ide.js": "2024.3.26-0", "@exabyte-io/mode.js": "2024.3.26-0", From 4f3e438594127801164770ca7813bd65c366c2a9 Mon Sep 17 00:00:00 2001 From: Pranab Das <31024886+pranabdas@users.noreply.github.com> Date: Sun, 31 Mar 2024 14:34:35 +0800 Subject: [PATCH 16/20] SOF-7315: update deps after inclusion of nscf and bands templates --- package-lock.json | 8 ++++---- package.json | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index b3aff74..3987931 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1470,8 +1470,8 @@ } }, "@exabyte-io/ade.js": { - "version": "git+https://github.com/Exabyte-io/ade.js.git#0c02cb777caf441fac31b806916faf107d42bcd9", - "from": "git+https://github.com/Exabyte-io/ade.js.git#0c02cb777caf441fac31b806916faf107d42bcd9", + "version": "git+https://github.com/Exabyte-io/ade.js.git#f45478625b20589718316c755bdc6a2ecc24e656", + "from": "git+https://github.com/Exabyte-io/ade.js.git#f45478625b20589718316c755bdc6a2ecc24e656", "dev": true, "requires": { "@babel/cli": "7.16.0", @@ -1491,8 +1491,8 @@ } }, "@exabyte-io/application-flavors.js": { - "version": "git+https://github.com/Exabyte-io/application-flavors.git#77dca4100e6c39dd1da2eaac748e0f97fc49db61", - "from": "git+https://github.com/Exabyte-io/application-flavors.git#77dca4100e6c39dd1da2eaac748e0f97fc49db61", + "version": "git+https://github.com/Exabyte-io/application-flavors.git#692a37b48d4bb06365d727d24a492bd92a979baf", + "from": "git+https://github.com/Exabyte-io/application-flavors.git#692a37b48d4bb06365d727d24a492bd92a979baf", "dev": true, "requires": { "@babel/cli": "7.16.0", diff --git a/package.json b/package.json index 387bd10..003c394 100644 --- a/package.json +++ b/package.json @@ -46,8 +46,8 @@ "underscore.string": "^3.3.4" }, "devDependencies": { - "@exabyte-io/ade.js": "https://github.com/Exabyte-io/ade.js.git#0c02cb777caf441fac31b806916faf107d42bcd9", - "@exabyte-io/application-flavors.js": "https://github.com/Exabyte-io/application-flavors.git#77dca4100e6c39dd1da2eaac748e0f97fc49db61", + "@exabyte-io/ade.js": "https://github.com/Exabyte-io/ade.js.git#f45478625b20589718316c755bdc6a2ecc24e656", + "@exabyte-io/application-flavors.js": "https://github.com/Exabyte-io/application-flavors.git#692a37b48d4bb06365d727d24a492bd92a979baf", "@exabyte-io/eslint-config": "^2022.11.17-0", "@exabyte-io/ide.js": "2024.3.26-0", "@exabyte-io/mode.js": "2024.3.26-0", From 9639c473a4499508c70bd99b1ddded79694f405e Mon Sep 17 00:00:00 2001 From: Pranab Das <31024886+pranabdas@users.noreply.github.com> Date: Sun, 31 Mar 2024 15:16:26 +0800 Subject: [PATCH 17/20] SOF-7315: update deps x2 --- package-lock.json | 8 ++++---- package.json | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3987931..53f0dd4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1470,8 +1470,8 @@ } }, "@exabyte-io/ade.js": { - "version": "git+https://github.com/Exabyte-io/ade.js.git#f45478625b20589718316c755bdc6a2ecc24e656", - "from": "git+https://github.com/Exabyte-io/ade.js.git#f45478625b20589718316c755bdc6a2ecc24e656", + "version": "git+https://github.com/Exabyte-io/ade.js.git#dcb587e0d9145d53f1444c2b7dd475b797e66f0d", + "from": "git+https://github.com/Exabyte-io/ade.js.git#dcb587e0d9145d53f1444c2b7dd475b797e66f0d", "dev": true, "requires": { "@babel/cli": "7.16.0", @@ -1491,8 +1491,8 @@ } }, "@exabyte-io/application-flavors.js": { - "version": "git+https://github.com/Exabyte-io/application-flavors.git#692a37b48d4bb06365d727d24a492bd92a979baf", - "from": "git+https://github.com/Exabyte-io/application-flavors.git#692a37b48d4bb06365d727d24a492bd92a979baf", + "version": "git+https://github.com/Exabyte-io/application-flavors.git#410f92ea01e202597c576545d44dd65478fcc891", + "from": "git+https://github.com/Exabyte-io/application-flavors.git#410f92ea01e202597c576545d44dd65478fcc891", "dev": true, "requires": { "@babel/cli": "7.16.0", diff --git a/package.json b/package.json index 003c394..721757e 100644 --- a/package.json +++ b/package.json @@ -46,8 +46,8 @@ "underscore.string": "^3.3.4" }, "devDependencies": { - "@exabyte-io/ade.js": "https://github.com/Exabyte-io/ade.js.git#f45478625b20589718316c755bdc6a2ecc24e656", - "@exabyte-io/application-flavors.js": "https://github.com/Exabyte-io/application-flavors.git#692a37b48d4bb06365d727d24a492bd92a979baf", + "@exabyte-io/ade.js": "https://github.com/Exabyte-io/ade.js.git#dcb587e0d9145d53f1444c2b7dd475b797e66f0d", + "@exabyte-io/application-flavors.js": "https://github.com/Exabyte-io/application-flavors.git#410f92ea01e202597c576545d44dd65478fcc891", "@exabyte-io/eslint-config": "^2022.11.17-0", "@exabyte-io/ide.js": "2024.3.26-0", "@exabyte-io/mode.js": "2024.3.26-0", From ec2d28653fded72103382bc7fd11a2e4119186df Mon Sep 17 00:00:00 2001 From: Pranab Das <31024886+pranabdas@users.noreply.github.com> Date: Thu, 4 Apr 2024 19:57:36 +0800 Subject: [PATCH 18/20] SOF-7315: chore ==> camelCase naming for the js variables --- package-lock.json | 8 ++--- package.json | 4 +-- .../CollinearMagnetizationContextProvider.js | 29 +++++++++---------- 3 files changed, 20 insertions(+), 21 deletions(-) diff --git a/package-lock.json b/package-lock.json index 53f0dd4..97ccd28 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1470,8 +1470,8 @@ } }, "@exabyte-io/ade.js": { - "version": "git+https://github.com/Exabyte-io/ade.js.git#dcb587e0d9145d53f1444c2b7dd475b797e66f0d", - "from": "git+https://github.com/Exabyte-io/ade.js.git#dcb587e0d9145d53f1444c2b7dd475b797e66f0d", + "version": "git+https://github.com/Exabyte-io/ade.js.git#bfa0e821c7f3e747d655144766450f7b929b6da2", + "from": "git+https://github.com/Exabyte-io/ade.js.git#bfa0e821c7f3e747d655144766450f7b929b6da2", "dev": true, "requires": { "@babel/cli": "7.16.0", @@ -1491,8 +1491,8 @@ } }, "@exabyte-io/application-flavors.js": { - "version": "git+https://github.com/Exabyte-io/application-flavors.git#410f92ea01e202597c576545d44dd65478fcc891", - "from": "git+https://github.com/Exabyte-io/application-flavors.git#410f92ea01e202597c576545d44dd65478fcc891", + "version": "git+https://github.com/Exabyte-io/application-flavors.git#b6c152d5a773b16634228a026a5f0da600fe55da", + "from": "git+https://github.com/Exabyte-io/application-flavors.git#b6c152d5a773b16634228a026a5f0da600fe55da", "dev": true, "requires": { "@babel/cli": "7.16.0", diff --git a/package.json b/package.json index 721757e..7655677 100644 --- a/package.json +++ b/package.json @@ -46,8 +46,8 @@ "underscore.string": "^3.3.4" }, "devDependencies": { - "@exabyte-io/ade.js": "https://github.com/Exabyte-io/ade.js.git#dcb587e0d9145d53f1444c2b7dd475b797e66f0d", - "@exabyte-io/application-flavors.js": "https://github.com/Exabyte-io/application-flavors.git#410f92ea01e202597c576545d44dd65478fcc891", + "@exabyte-io/ade.js": "https://github.com/Exabyte-io/ade.js.git#bfa0e821c7f3e747d655144766450f7b929b6da2", + "@exabyte-io/application-flavors.js": "https://github.com/Exabyte-io/application-flavors.git#b6c152d5a773b16634228a026a5f0da600fe55da", "@exabyte-io/eslint-config": "^2022.11.17-0", "@exabyte-io/ide.js": "2024.3.26-0", "@exabyte-io/mode.js": "2024.3.26-0", diff --git a/src/context/providers/CollinearMagnetizationContextProvider.js b/src/context/providers/CollinearMagnetizationContextProvider.js index 79ed6e6..39a6d6d 100644 --- a/src/context/providers/CollinearMagnetizationContextProvider.js +++ b/src/context/providers/CollinearMagnetizationContextProvider.js @@ -12,7 +12,7 @@ export class CollinearMagnetizationContextProvider extends mix(JSONSchemaFormDat super(config); this.firstElement = this.uniqueElementsWithLabels?.length > 0 ? this.uniqueElementsWithLabels[0] : ""; - this.is_total_magnetization = lodash.get(this.data, "is_total_magnetization", false); + this.isTotalMagnetization = lodash.get(this.data, "isTotalMagnetization", false); } get uniqueElementsWithLabels() { @@ -24,37 +24,36 @@ export class CollinearMagnetizationContextProvider extends mix(JSONSchemaFormDat return this.uniqueElementsWithLabels.indexOf(element) + 1; }; - // eslint-disable-next-line class-methods-use-this get defaultData() { return { - starting_magnetization: [ + startingMagnetization: [ { index: 1, atomicSpecies: this.firstElement, value: 0.0, }, ], - is_total_magnetization: false, - total_magnetization: 0.0, + isTotalMagnetization: false, + totalMagnetization: 0.0, }; } transformData = (data) => { - const startingMagnetizationWithIndex = data.starting_magnetization.map((row) => ({ + const startingMagnetizationWithIndex = data.startingMagnetization.map((row) => ({ ...row, index: this.indexOfElement(row.atomicSpecies), })); return { ...data, - starting_magnetization: startingMagnetizationWithIndex, + startingMagnetization: startingMagnetizationWithIndex, }; }; // eslint-disable-next-line class-methods-use-this get uiSchemaStyled() { return { - starting_magnetization: { + startingMagnetization: { items: { atomicSpecies: { "ui:classNames": "col-xs-3", @@ -63,12 +62,12 @@ export class CollinearMagnetizationContextProvider extends mix(JSONSchemaFormDat "ui:classNames": "col-xs-6", }, }, - "ui:readonly": this.is_total_magnetization, + "ui:readonly": this.isTotalMagnetization, }, - is_total_magnetization: {}, - total_magnetization: { + isTotalMagnetization: {}, + totalMagnetization: { "ui:classNames": "col-xs-6", - "ui:readonly": !this.is_total_magnetization, + "ui:readonly": !this.isTotalMagnetization, }, }; } @@ -80,7 +79,7 @@ export class CollinearMagnetizationContextProvider extends mix(JSONSchemaFormDat description: "Set starting magnetization, can have values in the range [-1, +1].", type: "object", properties: { - starting_magnetization: { + startingMagnetization: { type: "array", maxItems: this.uniqueElementsWithLabels.length, items: { @@ -102,12 +101,12 @@ export class CollinearMagnetizationContextProvider extends mix(JSONSchemaFormDat }, }, }, - is_total_magnetization: { + isTotalMagnetization: { type: "boolean", title: "Set total magnetization instead", default: false, }, - total_magnetization: { + totalMagnetization: { type: "number", title: "Total magnetization", default: 0.0, From 5c8e52fc2e7df7fb19ac2c136b3041c139ca6ef6 Mon Sep 17 00:00:00 2001 From: Pranab Das <31024886+pranabdas@users.noreply.github.com> Date: Thu, 4 Apr 2024 20:11:26 +0800 Subject: [PATCH 19/20] SOF-7315: chore ==> camelCase naming for the js variables x2 --- package-lock.json | 8 ++++---- package.json | 4 ++-- src/context/providers.js | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 97ccd28..d55bfb2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1470,8 +1470,8 @@ } }, "@exabyte-io/ade.js": { - "version": "git+https://github.com/Exabyte-io/ade.js.git#bfa0e821c7f3e747d655144766450f7b929b6da2", - "from": "git+https://github.com/Exabyte-io/ade.js.git#bfa0e821c7f3e747d655144766450f7b929b6da2", + "version": "git+https://github.com/Exabyte-io/ade.js.git#af12d051aeced23f5b404e6869c5437af13109a1", + "from": "git+https://github.com/Exabyte-io/ade.js.git#af12d051aeced23f5b404e6869c5437af13109a1", "dev": true, "requires": { "@babel/cli": "7.16.0", @@ -1491,8 +1491,8 @@ } }, "@exabyte-io/application-flavors.js": { - "version": "git+https://github.com/Exabyte-io/application-flavors.git#b6c152d5a773b16634228a026a5f0da600fe55da", - "from": "git+https://github.com/Exabyte-io/application-flavors.git#b6c152d5a773b16634228a026a5f0da600fe55da", + "version": "git+https://github.com/Exabyte-io/application-flavors.git#4cfec90a135d7a98608efd0211abb9358c69dbf8", + "from": "git+https://github.com/Exabyte-io/application-flavors.git#4cfec90a135d7a98608efd0211abb9358c69dbf8", "dev": true, "requires": { "@babel/cli": "7.16.0", diff --git a/package.json b/package.json index 7655677..5610287 100644 --- a/package.json +++ b/package.json @@ -46,8 +46,8 @@ "underscore.string": "^3.3.4" }, "devDependencies": { - "@exabyte-io/ade.js": "https://github.com/Exabyte-io/ade.js.git#bfa0e821c7f3e747d655144766450f7b929b6da2", - "@exabyte-io/application-flavors.js": "https://github.com/Exabyte-io/application-flavors.git#b6c152d5a773b16634228a026a5f0da600fe55da", + "@exabyte-io/ade.js": "https://github.com/Exabyte-io/ade.js.git#af12d051aeced23f5b404e6869c5437af13109a1", + "@exabyte-io/application-flavors.js": "https://github.com/Exabyte-io/application-flavors.git#4cfec90a135d7a98608efd0211abb9358c69dbf8", "@exabyte-io/eslint-config": "^2022.11.17-0", "@exabyte-io/ide.js": "2024.3.26-0", "@exabyte-io/mode.js": "2024.3.26-0", diff --git a/src/context/providers.js b/src/context/providers.js index 530c8e2..2f8c8c8 100644 --- a/src/context/providers.js +++ b/src/context/providers.js @@ -105,6 +105,6 @@ export const wodeProviders = { }, CollinearMagnetizationDataManager: { providerCls: CollinearMagnetizationContextProvider, - config: _makeImportant({ name: "collinear_magnetization" }), + config: _makeImportant({ name: "collinearMagnetization" }), }, }; From cf7e99fb36f0639873ce244ba3fe94552129a99f Mon Sep 17 00:00:00 2001 From: Pranab Das <31024886+pranabdas@users.noreply.github.com> Date: Fri, 5 Apr 2024 10:04:06 +0800 Subject: [PATCH 20/20] SOF-7315: update libs with published version --- package-lock.json | 10 ++++++---- package.json | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index d55bfb2..4b968b7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1470,8 +1470,9 @@ } }, "@exabyte-io/ade.js": { - "version": "git+https://github.com/Exabyte-io/ade.js.git#af12d051aeced23f5b404e6869c5437af13109a1", - "from": "git+https://github.com/Exabyte-io/ade.js.git#af12d051aeced23f5b404e6869c5437af13109a1", + "version": "2024.4.5-0", + "resolved": "https://registry.npmjs.org/@exabyte-io/ade.js/-/ade.js-2024.4.5-0.tgz", + "integrity": "sha512-XiZbHpw+QPwdxUBRezMgvYp0bbzX6QGgjN7kCyy4c1wysYJIZA07NnyOzUy5doYzOds/XpeY/s7fNnq6VTZSmg==", "dev": true, "requires": { "@babel/cli": "7.16.0", @@ -1491,8 +1492,9 @@ } }, "@exabyte-io/application-flavors.js": { - "version": "git+https://github.com/Exabyte-io/application-flavors.git#4cfec90a135d7a98608efd0211abb9358c69dbf8", - "from": "git+https://github.com/Exabyte-io/application-flavors.git#4cfec90a135d7a98608efd0211abb9358c69dbf8", + "version": "2024.4.5-0", + "resolved": "https://registry.npmjs.org/@exabyte-io/application-flavors.js/-/application-flavors.js-2024.4.5-0.tgz", + "integrity": "sha512-lI9L0bWGAv+UxjoRRenF1JOu49ZvCiGtQqpGPVVoz4D9ZlTeIyJmZxjaQeLZBOIW9r610NRN9huXkz9//t3hdQ==", "dev": true, "requires": { "@babel/cli": "7.16.0", diff --git a/package.json b/package.json index 5610287..aa80a36 100644 --- a/package.json +++ b/package.json @@ -46,8 +46,8 @@ "underscore.string": "^3.3.4" }, "devDependencies": { - "@exabyte-io/ade.js": "https://github.com/Exabyte-io/ade.js.git#af12d051aeced23f5b404e6869c5437af13109a1", - "@exabyte-io/application-flavors.js": "https://github.com/Exabyte-io/application-flavors.git#4cfec90a135d7a98608efd0211abb9358c69dbf8", + "@exabyte-io/ade.js": "2024.4.5-0", + "@exabyte-io/application-flavors.js": "2024.4.5-0", "@exabyte-io/eslint-config": "^2022.11.17-0", "@exabyte-io/ide.js": "2024.3.26-0", "@exabyte-io/mode.js": "2024.3.26-0",