Skip to content

Commit 72a4dd0

Browse files
committed
chore: remove HashedInputArrayMixin
1 parent 556631e commit 72a4dd0

File tree

6 files changed

+2
-74
lines changed

6 files changed

+2
-74
lines changed

dist/js/entity/index.d.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { InMemoryEntity } from "./in_memory";
22
import { ContextAndRenderFieldsMixin } from "./mixins/context";
33
import { RuntimeContextFieldMixin } from "./mixins/context_runtime";
44
import { FlowchartEntityMixin, FlowchartItemMixin } from "./mixins/flowchart";
5-
import { HashedInputArrayMixin } from "./mixins/hash";
65
import { HasScopeTrackMixin } from "./mixins/props";
76
import { RuntimeItemsMixin } from "./mixins/runtime_items";
87
import { DefaultableInMemoryEntity, HasConsistencyChecksHasMetadataNamedDefaultableInMemoryEntity, HasMetadataNamedDefaultableInMemoryEntity, NamedDefaultableInMemoryEntity, NamedDefaultableRepetitionContextAndRenderInMemoryEntity, NamedDefaultableRepetitionImportantSettingsInMemoryEntity, NamedDefaultableRepetitionRuntimeItemsImportantSettingsContextAndRenderHashedInMemoryEntity, NamedInMemoryEntity } from "./other";
@@ -12,4 +11,4 @@ import { constructEntitySetFactoryByConfig } from "./set/factory";
1211
import { InMemoryEntityInSetMixin, InMemoryEntitySetMixin } from "./set/mixins";
1312
import { OrderedInMemoryEntityInSetMixin, OrderedInMemoryEntitySetMixin } from "./set/ordered/mixins";
1413
import * as selectorsForEntitySet from "./set/selectors";
15-
export { InMemoryEntity, NamedInMemoryEntity, DefaultableInMemoryEntity, NamedDefaultableInMemoryEntity, HasMetadataNamedDefaultableInMemoryEntity, NamedDefaultableRepetitionContextAndRenderInMemoryEntity, NamedDefaultableRepetitionImportantSettingsInMemoryEntity, NamedDefaultableRepetitionRuntimeItemsImportantSettingsContextAndRenderHashedInMemoryEntity, HasConsistencyChecksHasMetadataNamedDefaultableInMemoryEntity, HasScopeTrackMixin, RuntimeItemsMixin, RuntimeContextFieldMixin, HashedInputArrayMixin, InMemoryEntitySet, ENTITY_SET_TYPES, constructEntitySetFactoryByConfig, selectorsForEntitySet, InMemoryEntitySetMixin, InMemoryEntityInSetMixin, OrderedInMemoryEntitySetMixin, OrderedInMemoryEntityInSetMixin, ContextAndRenderFieldsMixin, FlowchartEntityMixin, FlowchartItemMixin, };
14+
export { InMemoryEntity, NamedInMemoryEntity, DefaultableInMemoryEntity, NamedDefaultableInMemoryEntity, HasMetadataNamedDefaultableInMemoryEntity, NamedDefaultableRepetitionContextAndRenderInMemoryEntity, NamedDefaultableRepetitionImportantSettingsInMemoryEntity, NamedDefaultableRepetitionRuntimeItemsImportantSettingsContextAndRenderHashedInMemoryEntity, HasConsistencyChecksHasMetadataNamedDefaultableInMemoryEntity, HasScopeTrackMixin, RuntimeItemsMixin, RuntimeContextFieldMixin, InMemoryEntitySet, ENTITY_SET_TYPES, constructEntitySetFactoryByConfig, selectorsForEntitySet, InMemoryEntitySetMixin, InMemoryEntityInSetMixin, OrderedInMemoryEntitySetMixin, OrderedInMemoryEntityInSetMixin, ContextAndRenderFieldsMixin, FlowchartEntityMixin, FlowchartItemMixin, };

dist/js/entity/index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
3333
};
3434
})();
3535
Object.defineProperty(exports, "__esModule", { value: true });
36-
exports.FlowchartItemMixin = exports.FlowchartEntityMixin = exports.ContextAndRenderFieldsMixin = exports.OrderedInMemoryEntityInSetMixin = exports.OrderedInMemoryEntitySetMixin = exports.InMemoryEntityInSetMixin = exports.InMemoryEntitySetMixin = exports.selectorsForEntitySet = exports.constructEntitySetFactoryByConfig = exports.ENTITY_SET_TYPES = exports.InMemoryEntitySet = exports.HashedInputArrayMixin = exports.RuntimeContextFieldMixin = exports.RuntimeItemsMixin = exports.HasScopeTrackMixin = exports.HasConsistencyChecksHasMetadataNamedDefaultableInMemoryEntity = exports.NamedDefaultableRepetitionRuntimeItemsImportantSettingsContextAndRenderHashedInMemoryEntity = exports.NamedDefaultableRepetitionImportantSettingsInMemoryEntity = exports.NamedDefaultableRepetitionContextAndRenderInMemoryEntity = exports.HasMetadataNamedDefaultableInMemoryEntity = exports.NamedDefaultableInMemoryEntity = exports.DefaultableInMemoryEntity = exports.NamedInMemoryEntity = exports.InMemoryEntity = void 0;
36+
exports.FlowchartItemMixin = exports.FlowchartEntityMixin = exports.ContextAndRenderFieldsMixin = exports.OrderedInMemoryEntityInSetMixin = exports.OrderedInMemoryEntitySetMixin = exports.InMemoryEntityInSetMixin = exports.InMemoryEntitySetMixin = exports.selectorsForEntitySet = exports.constructEntitySetFactoryByConfig = exports.ENTITY_SET_TYPES = exports.InMemoryEntitySet = exports.RuntimeContextFieldMixin = exports.RuntimeItemsMixin = exports.HasScopeTrackMixin = exports.HasConsistencyChecksHasMetadataNamedDefaultableInMemoryEntity = exports.NamedDefaultableRepetitionRuntimeItemsImportantSettingsContextAndRenderHashedInMemoryEntity = exports.NamedDefaultableRepetitionImportantSettingsInMemoryEntity = exports.NamedDefaultableRepetitionContextAndRenderInMemoryEntity = exports.HasMetadataNamedDefaultableInMemoryEntity = exports.NamedDefaultableInMemoryEntity = exports.DefaultableInMemoryEntity = exports.NamedInMemoryEntity = exports.InMemoryEntity = void 0;
3737
const in_memory_1 = require("./in_memory");
3838
Object.defineProperty(exports, "InMemoryEntity", { enumerable: true, get: function () { return in_memory_1.InMemoryEntity; } });
3939
const context_1 = require("./mixins/context");
@@ -43,8 +43,6 @@ Object.defineProperty(exports, "RuntimeContextFieldMixin", { enumerable: true, g
4343
const flowchart_1 = require("./mixins/flowchart");
4444
Object.defineProperty(exports, "FlowchartEntityMixin", { enumerable: true, get: function () { return flowchart_1.FlowchartEntityMixin; } });
4545
Object.defineProperty(exports, "FlowchartItemMixin", { enumerable: true, get: function () { return flowchart_1.FlowchartItemMixin; } });
46-
const hash_1 = require("./mixins/hash");
47-
Object.defineProperty(exports, "HashedInputArrayMixin", { enumerable: true, get: function () { return hash_1.HashedInputArrayMixin; } });
4846
const props_1 = require("./mixins/props");
4947
Object.defineProperty(exports, "HasScopeTrackMixin", { enumerable: true, get: function () { return props_1.HasScopeTrackMixin; } });
5048
const runtime_items_1 = require("./mixins/runtime_items");

dist/js/entity/mixins/hash.d.ts

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { ExecutionUnitInputItemSchemaForPhysicsBasedSimulationEngines } from "@mat3ra/esse/dist/js/types";
21
import { InMemoryEntityConstructor } from "../in_memory";
32
export declare function HashedEntityMixin<T extends InMemoryEntityConstructor>(superclass: T): {
43
new (...args: any[]): {
@@ -37,35 +36,3 @@ export declare function HashedEntityMixin<T extends InMemoryEntityConstructor>(s
3736
readonly isSystemEntity: boolean;
3837
};
3938
} & T;
40-
export declare function HashedInputArrayMixin<T extends InMemoryEntityConstructor>(superclass: T): {
41-
new (...args: any[]): {
42-
input: ExecutionUnitInputItemSchemaForPhysicsBasedSimulationEngines[];
43-
readonly hashFromArrayInputContent: string;
44-
_json: import("@mat3ra/esse/dist/js/esse/types").AnyObject;
45-
prop<T_1 = undefined>(name: string, defaultValue: T_1): T_1;
46-
prop<T_1 = undefined>(name: string): T_1 | undefined;
47-
setProp(name: string, value: unknown): void;
48-
unsetProp(name: string): void;
49-
setProps(json?: import("@mat3ra/esse/dist/js/esse/types").AnyObject): /*elided*/ any;
50-
toJSON(exclude?: string[]): import("@mat3ra/esse/dist/js/esse/types").AnyObject;
51-
toJSONSafe(exclude?: string[]): import("@mat3ra/esse/dist/js/esse/types").AnyObject;
52-
toJSONQuick(exclude?: string[]): import("@mat3ra/esse/dist/js/esse/types").AnyObject;
53-
clone(extraContext?: object): /*elided*/ any;
54-
validate(): void;
55-
clean(config: import("@mat3ra/esse/dist/js/esse/types").AnyObject): import("@mat3ra/esse/dist/js/esse/types").AnyObject;
56-
isValid(): boolean;
57-
readonly cls: string;
58-
getClsName(): string;
59-
getAsEntityReference(byIdOnly: true): {
60-
_id: string;
61-
};
62-
getAsEntityReference(byIdOnly?: false): Required<import("@mat3ra/esse/dist/js/types").EntityReferenceSchema>;
63-
getEntityByName(entities: import("../in_memory").InMemoryEntity[], entity: string, name: string): import("../in_memory").InMemoryEntity;
64-
id: string;
65-
_id: string;
66-
schemaVersion: string;
67-
systemName: string;
68-
readonly slug: string;
69-
readonly isSystemEntity: boolean;
70-
};
71-
} & T;

dist/js/entity/mixins/hash.js

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
"use strict";
22
Object.defineProperty(exports, "__esModule", { value: true });
33
exports.HashedEntityMixin = HashedEntityMixin;
4-
exports.HashedInputArrayMixin = HashedInputArrayMixin;
54
const hash_1 = require("../../utils/hash");
6-
const str_1 = require("../../utils/str");
75
function HashedEntityMixin(superclass) {
86
return class extends superclass {
97
/*
@@ -24,16 +22,3 @@ function HashedEntityMixin(superclass) {
2422
}
2523
};
2624
}
27-
function HashedInputArrayMixin(superclass) {
28-
return class extends superclass {
29-
/*
30-
* @summary expects an array with elements containing field [{content: "..."}]
31-
*/
32-
get hashFromArrayInputContent() {
33-
const objectForHashing = this.input.map((i) => {
34-
return (0, str_1.removeEmptyLinesFromString)((0, str_1.removeCommentsFromSourceCode)(i.content));
35-
});
36-
return (0, hash_1.calculateHashFromObject)(objectForHashing);
37-
}
38-
};
39-
}

src/js/entity/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { InMemoryEntity } from "./in_memory";
22
import { ContextAndRenderFieldsMixin } from "./mixins/context";
33
import { RuntimeContextFieldMixin } from "./mixins/context_runtime";
44
import { FlowchartEntityMixin, FlowchartItemMixin } from "./mixins/flowchart";
5-
import { HashedInputArrayMixin } from "./mixins/hash";
65
import { HasScopeTrackMixin } from "./mixins/props";
76
import { RuntimeItemsMixin } from "./mixins/runtime_items";
87
import {
@@ -38,7 +37,6 @@ export {
3837
HasScopeTrackMixin,
3938
RuntimeItemsMixin,
4039
RuntimeContextFieldMixin,
41-
HashedInputArrayMixin,
4240
InMemoryEntitySet,
4341
ENTITY_SET_TYPES,
4442
constructEntitySetFactoryByConfig,

src/js/entity/mixins/hash.ts

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
import { ExecutionUnitInputItemSchemaForPhysicsBasedSimulationEngines } from "@mat3ra/esse/dist/js/types";
2-
31
import { calculateHashFromObject } from "../../utils/hash";
4-
import { removeCommentsFromSourceCode, removeEmptyLinesFromString } from "../../utils/str";
52
import { InMemoryEntityConstructor } from "../in_memory";
63

74
export function HashedEntityMixin<T extends InMemoryEntityConstructor>(superclass: T) {
@@ -25,19 +22,3 @@ export function HashedEntityMixin<T extends InMemoryEntityConstructor>(superclas
2522
}
2623
};
2724
}
28-
29-
export function HashedInputArrayMixin<T extends InMemoryEntityConstructor>(superclass: T) {
30-
return class extends superclass {
31-
declare input: ExecutionUnitInputItemSchemaForPhysicsBasedSimulationEngines[];
32-
33-
/*
34-
* @summary expects an array with elements containing field [{content: "..."}]
35-
*/
36-
get hashFromArrayInputContent() {
37-
const objectForHashing = this.input.map((i) => {
38-
return removeEmptyLinesFromString(removeCommentsFromSourceCode(i.content));
39-
});
40-
return calculateHashFromObject(objectForHashing);
41-
}
42-
};
43-
}

0 commit comments

Comments
 (0)