generated from Exabyte-io/template-definitions
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #93 from Exabyte-io/update/SOF-7161
SOF-7161: deps versions
- Loading branch information
Showing
100 changed files
with
6,149 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
dist/ | ||
build/ | ||
node_modules/ | ||
.eslintcache | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npx lint-staged | ||
npm run lint:fix | ||
npm run transpile | ||
git add dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
export namespace coefficients { | ||
const EV_TO_RY: number; | ||
const BOHR_TO_ANGSTROM: number; | ||
const ANGSTROM_TO_BOHR: number; | ||
const EV_A_TO_RY_BOHR: number; | ||
} | ||
export namespace tolerance { | ||
const length: number; | ||
const lengthAngstrom: number; | ||
const pointsDistance: number; | ||
} | ||
export namespace units { | ||
const bohr: string; | ||
const angstrom: string; | ||
const degree: string; | ||
const radian: string; | ||
const alat: string; | ||
} | ||
export namespace ATOMIC_COORD_UNITS { | ||
const crystal: string; | ||
const cartesian: string; | ||
} | ||
export const HASH_TOLERANCE: 3; | ||
declare namespace _default { | ||
export { coefficients }; | ||
export { tolerance }; | ||
export { units }; | ||
export { ATOMIC_COORD_UNITS }; | ||
} | ||
export default _default; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.HASH_TOLERANCE = exports.ATOMIC_COORD_UNITS = exports.units = exports.tolerance = exports.coefficients = void 0; | ||
exports.coefficients = { | ||
EV_TO_RY: 0.0734986176, | ||
BOHR_TO_ANGSTROM: 0.52917721092, | ||
ANGSTROM_TO_BOHR: 1 / 0.52917721092, | ||
EV_A_TO_RY_BOHR: 1 / 25.71104309541616, | ||
}; | ||
exports.tolerance = { | ||
// in crystal coordinates | ||
length: 0.01, | ||
lengthAngstrom: 0.001, | ||
pointsDistance: 0.001, | ||
}; | ||
exports.units = { | ||
bohr: "bohr", | ||
angstrom: "angstrom", | ||
degree: "degree", | ||
radian: "radian", | ||
alat: "alat", | ||
}; | ||
/** | ||
* @summary Coordinates units for a material's basis. | ||
*/ | ||
exports.ATOMIC_COORD_UNITS = { | ||
crystal: "crystal", | ||
cartesian: "cartesian", | ||
}; | ||
// Only 3 digits will be considered for lattice and basis params on hashing | ||
exports.HASH_TOLERANCE = 3; | ||
exports.default = { | ||
coefficients: exports.coefficients, | ||
tolerance: exports.tolerance, | ||
units: exports.units, | ||
ATOMIC_COORD_UNITS: exports.ATOMIC_COORD_UNITS, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { JSONSchemaFormDataProvider } from "./json_schema_provider"; | ||
import { ApplicationContextMixin, JobContextMixin, MaterialContextMixin, MaterialsContextMixin, MaterialsSetContextMixin, MethodDataContextMixin, WorkflowContextMixin } from "./mixins"; | ||
import { JobContextPickKeysForMixin, WorkflowContextPickKeysForMixin } from "./pickers"; | ||
import { ContextProvider } from "./provider"; | ||
import { ContextProviderRegistryContainer, createAndPatchRegistry, extendAndPatchRegistry } from "./registry"; | ||
export { ContextProvider, ContextProviderRegistryContainer, extendAndPatchRegistry, createAndPatchRegistry, JobContextPickKeysForMixin, JSONSchemaFormDataProvider, WorkflowContextPickKeysForMixin, ApplicationContextMixin, MaterialContextMixin, MaterialsContextMixin, MaterialsSetContextMixin, MethodDataContextMixin, JobContextMixin, WorkflowContextMixin, }; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { UiSchema } from "react-jsonschema-form"; | ||
import { ContextProvider, ContextProviderConfig } from "./provider"; | ||
interface JSONSchemaFormDataProviderConfig extends ContextProviderConfig { | ||
isUsingJinjaVariables?: boolean; | ||
} | ||
/** | ||
* @summary Provides jsonSchema and uiSchema for generating react-jsonschema-form | ||
* See https://github.com/mozilla-services/react-jsonschema-form for Form UI. | ||
* Form generation example: | ||
* ``` | ||
* <Form schema={provider.jsonSchema} | ||
* uiSchema={provider.uiSchema} | ||
* formData={provider.getData(unit.important)} /> | ||
* ``` | ||
*/ | ||
declare class JSONSchemaFormDataProvider extends ContextProvider { | ||
defaultClassNames: string; | ||
isUsingJinjaVariables: boolean; | ||
constructor(config: JSONSchemaFormDataProviderConfig); | ||
get jsonSchema(): void; | ||
get uiSchema(): UiSchema; | ||
get fields(): {}; | ||
get defaultFieldStyles(): { | ||
classNames: string; | ||
}; | ||
fieldStyles(classNames: string, overrideDefault?: boolean): { | ||
classNames: string; | ||
}; | ||
get uiSchemaStyled(): UiSchema; | ||
} | ||
export { JSONSchemaFormDataProvider }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.JSONSchemaFormDataProvider = void 0; | ||
const underscore_1 = __importDefault(require("underscore")); | ||
const provider_1 = require("./provider"); | ||
/** | ||
* @summary Provides jsonSchema and uiSchema for generating react-jsonschema-form | ||
* See https://github.com/mozilla-services/react-jsonschema-form for Form UI. | ||
* Form generation example: | ||
* ``` | ||
* <Form schema={provider.jsonSchema} | ||
* uiSchema={provider.uiSchema} | ||
* formData={provider.getData(unit.important)} /> | ||
* ``` | ||
*/ | ||
class JSONSchemaFormDataProvider extends provider_1.ContextProvider { | ||
constructor(config) { | ||
super(config); | ||
this.defaultClassNames = "col-xs-12 col-sm-6 col-md-4 col-lg-3"; | ||
this.isUsingJinjaVariables = Boolean(config === null || config === void 0 ? void 0 : config.isUsingJinjaVariables); | ||
} | ||
// eslint-disable-next-line class-methods-use-this | ||
get jsonSchema() { | ||
throw new Error("Not implemented."); | ||
} | ||
// eslint-disable-next-line class-methods-use-this | ||
get uiSchema() { | ||
throw new Error("Not implemented."); | ||
} | ||
// eslint-disable-next-line class-methods-use-this | ||
get fields() { | ||
return {}; | ||
} | ||
get defaultFieldStyles() { | ||
return { classNames: this.defaultClassNames }; | ||
} | ||
fieldStyles(classNames, overrideDefault = false) { | ||
let names = classNames; | ||
if (!overrideDefault) | ||
names += " " + this.defaultClassNames; | ||
return { classNames: names }; | ||
} | ||
get uiSchemaStyled() { | ||
const schema = this.uiSchema; | ||
// @ts-ignore | ||
return underscore_1.default.each(schema, (v, k, l) => { | ||
l[k] = { ...v, ...this.defaultFieldStyles }; | ||
// @ts-ignore | ||
l[k].classNames = `${v.classNames || ""} ${this.defaultClassNames || ""}`; | ||
return null; | ||
}); | ||
} | ||
} | ||
exports.JSONSchemaFormDataProvider = JSONSchemaFormDataProvider; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
import { ApplicationSchemaBase, JobSchema, MaterialSchema, WorkflowSchema } from "@mat3ra/esse/lib/js/types"; | ||
import { InMemoryEntity } from "../entity"; | ||
type Constructor<T = any> = new (...args: any[]) => T; | ||
export declare function ApplicationContextMixin<T extends Constructor>(superclass: T): { | ||
new (...args: any): { | ||
[x: string]: any; | ||
_application: ApplicationSchemaBase; | ||
readonly application: ApplicationSchemaBase; | ||
}; | ||
} & T; | ||
type Material = InMemoryEntity & MaterialSchema & { | ||
hash: string; | ||
}; | ||
export declare function MaterialContextMixin<T extends Constructor>(superclass: T): { | ||
new (...args: any): { | ||
[x: string]: any; | ||
_material: Material; | ||
extraData?: { | ||
materialHash: string; | ||
} | undefined; | ||
isEdited?: boolean | undefined; | ||
readonly isEditedIsSetToFalseOnMaterialUpdate: boolean; | ||
updateMaterialHash(): void; | ||
readonly isMaterialCreatedDefault: boolean; | ||
readonly isMaterialUpdated: boolean; | ||
readonly material: Material; | ||
}; | ||
} & T; | ||
export declare function MaterialsSetContextMixin<T extends Constructor>(superclass: T): { | ||
new (...params: any): { | ||
[x: string]: any; | ||
_materialsSet: any; | ||
readonly materialsSet: any; | ||
sortMaterialsByIndexInSet(materials?: never[]): never[]; | ||
}; | ||
} & T; | ||
export declare function MaterialsContextMixin<T extends Constructor>(superclass: T): { | ||
new (...params: any): { | ||
[x: string]: any; | ||
_materials: any; | ||
readonly materials: any; | ||
}; | ||
} & T; | ||
export declare function MethodDataContextMixin<T extends Constructor>(superclass: T): { | ||
new (...params: any): { | ||
[x: string]: any; | ||
_methodData: any; | ||
isEdited: boolean; | ||
methodDataHash?: string | undefined; | ||
extraData?: { | ||
methodDataHash?: string | undefined; | ||
} | undefined; | ||
_initMethodDataHash(): void; | ||
readonly methodData: any; | ||
readonly isMethodDataUpdated: boolean; | ||
}; | ||
} & T; | ||
export declare function WorkflowContextMixin<T extends Constructor>(superclass: T): { | ||
new (...params: any): { | ||
[x: string]: any; | ||
_workflow: WorkflowSchema; | ||
isEdited: boolean; | ||
readonly workflow: WorkflowSchema; | ||
}; | ||
} & T; | ||
export declare function JobContextMixin<T extends Constructor>(superclass: T): { | ||
new (...params: any): { | ||
[x: string]: any; | ||
_job: JobSchema; | ||
isEdited: boolean; | ||
readonly job: JobSchema; | ||
}; | ||
} & T; | ||
export {}; |
Oops, something went wrong.