@rentman/rm-core 63.3.0-RM4-47067 → 63.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,9 +13,6 @@ import { FactuurNumberseriesBusinessLogicRule } from './Factuur/FactuurNumberser
13
13
  import { FilesNameExtensionBusinessLogicRule } from './Files/FilesNameExtensionBusinessLogicRule';
14
14
  import { FunctieNaaminternBusinessLogicRule } from './Functie/FunctieNaaminternBusinessLogicRule';
15
15
  import { FunctieRecureindBusinessLogicRule } from './Functie/FunctieRecureindBusinessLogicRule';
16
- import { FunctieTravelDistanceFromLocationBusinessLogicRule } from './Functie/FunctieTravelDistanceFromLocationBusinessLogicRule';
17
- import { FunctieTravelDistanceUnlinkLocationBusinessLogicRule } from './Functie/FunctieTravelDistanceUnlinkLocationBusinessLogicRule';
18
- import { FunctieTravelTimeFromLocationBusinessLogicRule } from './Functie/FunctieTravelTimeFromLocationBusinessLogicRule';
19
16
  import { FunctieTwowayBusinessLogicRule } from './Functie/FunctieTwowayBusinessLogicRule';
20
17
  import { FunctiegroepSubprojectBusinessLogicRule } from './Functiegroep/FunctiegroepSubprojectBusinessLogicRule';
21
18
  import { InhuurmateriaalAantalBusinessLogicRule } from './Inhuurmateriaal/InhuurmateriaalAantalBusinessLogicRule';
@@ -68,4 +65,4 @@ import { TaakDeadlineTypeBusinessLogicRule } from './Taak/TaakDeadlineTypeBusine
68
65
  import { TaakDeadlineOffsetBusinessLogicRule } from './Taak/TaakDeadlineOffsetBusinessLogicRule';
69
66
  import { TijdNameChangedBusinessLogicRule } from './Tijd/TijdNameChangedBusinessLogicRule';
70
67
  import { TijdSubprojectChangedBusinessLogicRule } from './Tijd/TijdSubprojectChangedBusinessLogicRule';
71
- export declare const registeredBusinessLogicRules: readonly [typeof DefaultContactPersonUpdateBusinessLogicRule, typeof ContactAddressBusinessLogicRule, typeof CustomFieldLinkedItemTypeBusinessLogicRule, typeof CustomFieldTypeBusinessLogicRule, typeof DocumentTemplateBusinessLogicRule, typeof ExemplaarAanschafdatumBusinessLogicRule, typeof ExemplaarBarcodeDeleteBusinessLogicRule, typeof FactuurBetalingsconditieBusinessLogicRule, typeof FactuurDatumBusinessLogicRule, typeof FactuurNumberseriesBusinessLogicRule, typeof FilesNameExtensionBusinessLogicRule, typeof FunctieNaaminternBusinessLogicRule, typeof FunctieTravelDistanceFromLocationBusinessLogicRule, typeof FunctieTravelDistanceUnlinkLocationBusinessLogicRule, typeof FunctieTravelTimeFromLocationBusinessLogicRule, typeof FunctieTwowayBusinessLogicRule, typeof FunctieRecureindBusinessLogicRule, typeof FunctiegroepSubprojectBusinessLogicRule, typeof InhuurmateriaalAantaltotaalBusinessLogicRule, typeof InhuurmateriaalAantalBusinessLogicRule, typeof MateriaalIsCombinationBusinessLogicRule, typeof MateriaalIsPhysicalCombinationBulkBusinessLogicRule, typeof MateriaalToVirtualBusinessLogicRule, typeof MateriaalToPhysicalBusinessLogicRule, typeof MateriaalBulkToSerialBusinessLogicRule, typeof MateriaalSerialToBulkBusinessLogicRule, typeof MateriaalTypePropertiesBusinessLogicRule, typeof MateriaalVerhuurBusinessLogicRule, typeof SurfaceArticleSizeBusinessLogicRule, typeof LinkedTimeItemDurationBusinessLogicRule, typeof LinkedTimeItemTimeSchemeBusinessLogicRule, typeof LinkedTimeItemTimeSchemeStartBusinessLogicRule, typeof LinkedTimeItemTimeValueStartBusinessLogicRule, typeof LinkedTimeItemSubprojectBusinessLogicRule, typeof LinkedTimeItemMateriaalCatBusinessLogicRule, typeof OfferteContractDatumBusinessLogicRule, typeof PlanningmateriaalAantalBusinessLogicRule, typeof PlanningmateriaalAantaltotaalBusinessLogicRule, typeof PlanningmateriaalOptieBusinessLogicRule, typeof PlanningmateriaalParentBusinessLogicRule, typeof PlanningmateriaalStaysAtLocationBusinessLogicRule, typeof PlanningPersoneelTransportBusinessLogicRule, typeof ProjectClientChangedBusinessLogicRule, typeof ProjectContactProjectNoteBusinessLogicRule, typeof ProjectOneSubLocationAlignBusinessLogicRule, typeof ProjectSubprojectDefaultTimeBusinessLogicRule, typeof PurchaseOrderOwnerBusinessLogicRule, typeof PurchaseOrderApprovalStatusBusinessLogicRule, typeof RateUpdatedBusinessLogicRule, typeof ReparatiesExemplaarAantalBusinessLogicRule, typeof ReparatieLostItemExemplaarLocationBusinessLogicRule, typeof RolEditOwnDataBusinessLogicRule, typeof RolFileAccessBusinessLogicRule, typeof RolPersoneelsplannerToegangBusinessLogicRule, typeof RolProjectenBewerkenBusinessLogicRule, typeof RolProjectenToegangBusinessLogicRule, typeof RolVisibilityFinancialsBusinessLogicRule, typeof RolWarehouseTrackingLogAccessBusinessLogicRule, typeof RolPurchaseOrderAttachPlanningBusinessLogicRule, typeof SetinhoudCreateFixedBusinessLogicRule, typeof SetinhoudUpdateFixedBusinessLogicRule, typeof SubprojectOneSubLocationAlignBusinessLogicRule, typeof SubprojectOneSubNameAlignBusinessLogicRule, typeof SubprojectInPlanningBusinessLogicRule, typeof TaakDeadlineTypeBusinessLogicRule, typeof TaakDeadlineOffsetBusinessLogicRule, typeof TijdSubprojectChangedBusinessLogicRule, typeof TijdNameChangedBusinessLogicRule, typeof AfspraakRecureindBusinessLogicRule, typeof BeschikbaarheidRecureindBusinessLogicRule];
68
+ export declare const registeredBusinessLogicRules: readonly [typeof DefaultContactPersonUpdateBusinessLogicRule, typeof ContactAddressBusinessLogicRule, typeof CustomFieldLinkedItemTypeBusinessLogicRule, typeof CustomFieldTypeBusinessLogicRule, typeof DocumentTemplateBusinessLogicRule, typeof ExemplaarAanschafdatumBusinessLogicRule, typeof ExemplaarBarcodeDeleteBusinessLogicRule, typeof FactuurBetalingsconditieBusinessLogicRule, typeof FactuurDatumBusinessLogicRule, typeof FactuurNumberseriesBusinessLogicRule, typeof FilesNameExtensionBusinessLogicRule, typeof FunctieNaaminternBusinessLogicRule, typeof FunctieTwowayBusinessLogicRule, typeof FunctieRecureindBusinessLogicRule, typeof FunctiegroepSubprojectBusinessLogicRule, typeof InhuurmateriaalAantaltotaalBusinessLogicRule, typeof InhuurmateriaalAantalBusinessLogicRule, typeof MateriaalIsCombinationBusinessLogicRule, typeof MateriaalIsPhysicalCombinationBulkBusinessLogicRule, typeof MateriaalToVirtualBusinessLogicRule, typeof MateriaalToPhysicalBusinessLogicRule, typeof MateriaalBulkToSerialBusinessLogicRule, typeof MateriaalSerialToBulkBusinessLogicRule, typeof MateriaalTypePropertiesBusinessLogicRule, typeof MateriaalVerhuurBusinessLogicRule, typeof SurfaceArticleSizeBusinessLogicRule, typeof LinkedTimeItemDurationBusinessLogicRule, typeof LinkedTimeItemTimeSchemeBusinessLogicRule, typeof LinkedTimeItemTimeSchemeStartBusinessLogicRule, typeof LinkedTimeItemTimeValueStartBusinessLogicRule, typeof LinkedTimeItemSubprojectBusinessLogicRule, typeof LinkedTimeItemMateriaalCatBusinessLogicRule, typeof OfferteContractDatumBusinessLogicRule, typeof PlanningmateriaalAantalBusinessLogicRule, typeof PlanningmateriaalAantaltotaalBusinessLogicRule, typeof PlanningmateriaalOptieBusinessLogicRule, typeof PlanningmateriaalParentBusinessLogicRule, typeof PlanningmateriaalStaysAtLocationBusinessLogicRule, typeof PlanningPersoneelTransportBusinessLogicRule, typeof ProjectClientChangedBusinessLogicRule, typeof ProjectContactProjectNoteBusinessLogicRule, typeof ProjectOneSubLocationAlignBusinessLogicRule, typeof ProjectSubprojectDefaultTimeBusinessLogicRule, typeof PurchaseOrderOwnerBusinessLogicRule, typeof PurchaseOrderApprovalStatusBusinessLogicRule, typeof RateUpdatedBusinessLogicRule, typeof ReparatiesExemplaarAantalBusinessLogicRule, typeof ReparatieLostItemExemplaarLocationBusinessLogicRule, typeof RolEditOwnDataBusinessLogicRule, typeof RolFileAccessBusinessLogicRule, typeof RolPersoneelsplannerToegangBusinessLogicRule, typeof RolProjectenBewerkenBusinessLogicRule, typeof RolProjectenToegangBusinessLogicRule, typeof RolVisibilityFinancialsBusinessLogicRule, typeof RolWarehouseTrackingLogAccessBusinessLogicRule, typeof RolPurchaseOrderAttachPlanningBusinessLogicRule, typeof SetinhoudCreateFixedBusinessLogicRule, typeof SetinhoudUpdateFixedBusinessLogicRule, typeof SubprojectOneSubLocationAlignBusinessLogicRule, typeof SubprojectOneSubNameAlignBusinessLogicRule, typeof SubprojectInPlanningBusinessLogicRule, typeof TaakDeadlineTypeBusinessLogicRule, typeof TaakDeadlineOffsetBusinessLogicRule, typeof TijdSubprojectChangedBusinessLogicRule, typeof TijdNameChangedBusinessLogicRule, typeof AfspraakRecureindBusinessLogicRule, typeof BeschikbaarheidRecureindBusinessLogicRule];
package/package.json CHANGED
@@ -1,56 +1,56 @@
1
- {
2
- "name": "@rentman/rm-core",
3
- "version": "63.3.0-RM4-47067",
4
- "description": "Rentman core functionalities",
5
- "main": "./dist/rm-core.js",
6
- "types": "./dist/types/src/index.d.ts",
7
- "engines": {
8
- "node": ">= 22.9.x <= 22.13.x",
9
- "npm": ">= 10.8.x <= 10.9.x"
10
- },
11
- "repository": {
12
- "type": "git",
13
- "url": "https://github.com/rentmanpublic/frontend-core"
14
- },
15
- "devDependencies": {
16
- "@angular/core": "^20",
17
- "@eslint/js": "^9.8.0",
18
- "@rentman/backend-types": "4.833.1-18-g69108fad18",
19
- "@stylistic/eslint-plugin-ts": "^2.7.2",
20
- "@types/eslint__js": "^8.42.3",
21
- "clean-webpack-plugin": "^0.1.19",
22
- "eslint": "^9.8.0",
23
- "jsdom": "^26.1.0",
24
- "moment": "^2.30.1",
25
- "rxjs": "^7",
26
- "terser-webpack-plugin": "^4.2.3",
27
- "ts-loader": "^9.3.1",
28
- "typescript": "5.5.4",
29
- "typescript-eslint": "^8.4.0",
30
- "vitest": "^3.2.3",
31
- "webpack": "^5.74.0",
32
- "webpack-cli": "^5.1.4",
33
- "webpack-merge": "^6.0.1"
34
- },
35
- "peerDependencies": {
36
- "@angular/core": "^20",
37
- "@rentman/backend-types": ">=4.818.0-28-gc3d424afbb",
38
- "moment": "^2.30.1",
39
- "rxjs": "^7"
40
- },
41
- "files": [
42
- "dist"
43
- ],
44
- "scripts": {
45
- "prepublishOnly": "npm run bundle",
46
- "bundle-dev": "webpack --config webpack.dev.js",
47
- "bundle": "webpack --config webpack.prod.js",
48
- "type-check": "tsc --noEmit -p ./tsconfig.json && tsc --noEmit -p ./tests/tsconfig.test.json",
49
- "lint": "eslint src/**/*.ts tests/**/*.ts --quiet",
50
- "test": "vitest --pool forks --poolOptions.forks.isolate",
51
- "vitest-watch": "vitest --watch",
52
- "coverage": "vitest --coverage"
53
- },
54
- "author": "Martijn Welker <martijn@rentman.nl>",
55
- "license": "UNLICENSED"
56
- }
1
+ {
2
+ "name": "@rentman/rm-core",
3
+ "version": "63.3.1",
4
+ "description": "Rentman core functionalities",
5
+ "main": "./dist/rm-core.js",
6
+ "types": "./dist/types/src/index.d.ts",
7
+ "engines": {
8
+ "node": ">= 22.9.x <= 22.13.x",
9
+ "npm": ">= 10.8.x <= 10.9.x"
10
+ },
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "https://github.com/rentmanpublic/frontend-core"
14
+ },
15
+ "devDependencies": {
16
+ "@angular/core": "^20",
17
+ "@eslint/js": "^9.8.0",
18
+ "@rentman/backend-types": "4.818.0-28-gc3d424afbb",
19
+ "@stylistic/eslint-plugin-ts": "^2.7.2",
20
+ "@types/eslint__js": "^8.42.3",
21
+ "clean-webpack-plugin": "^0.1.19",
22
+ "eslint": "^9.8.0",
23
+ "jsdom": "^26.1.0",
24
+ "moment": "^2.30.1",
25
+ "rxjs": "^7",
26
+ "terser-webpack-plugin": "^4.2.3",
27
+ "ts-loader": "^9.3.1",
28
+ "typescript": "5.5.4",
29
+ "typescript-eslint": "^8.4.0",
30
+ "vitest": "^3.2.3",
31
+ "webpack": "^5.74.0",
32
+ "webpack-cli": "^5.1.4",
33
+ "webpack-merge": "^6.0.1"
34
+ },
35
+ "peerDependencies": {
36
+ "@angular/core": "^20",
37
+ "@rentman/backend-types": ">=4.818.0-28-gc3d424afbb",
38
+ "moment": "^2.30.1",
39
+ "rxjs": "^7"
40
+ },
41
+ "files": [
42
+ "dist"
43
+ ],
44
+ "scripts": {
45
+ "prepublishOnly": "npm run bundle",
46
+ "bundle-dev": "webpack --config webpack.dev.js",
47
+ "bundle": "webpack --config webpack.prod.js",
48
+ "type-check": "tsc --noEmit -p ./tsconfig.json && tsc --noEmit -p ./tests/tsconfig.test.json",
49
+ "lint": "eslint src/**/*.ts tests/**/*.ts --quiet",
50
+ "test": "vitest --pool forks --poolOptions.forks.isolate",
51
+ "vitest-watch": "vitest --watch",
52
+ "coverage": "vitest --coverage"
53
+ },
54
+ "author": "Martijn Welker <martijn@rentman.nl>",
55
+ "license": "UNLICENSED"
56
+ }
package/readme.md CHANGED
@@ -1,42 +1,42 @@
1
- # Running a local test version
2
- 1. Make changes
3
- 2. run `npm run bundle-dev`
4
- 3. copy `dist` folder to `<project>/node_modules/@rentman/rm-core/`
5
- 4. Delete the Angular build cache (`.angular`) folder before rebuilding
6
-
7
- # Releasing
8
-
9
- ## Production versions
10
-
11
- For stable releases to master:
12
-
13
- 1. Go to [Release workflow](https://github.com/rentmanpublic/frontend-core/actions/workflows/release.yml)
14
- 2. Click "Run workflow"
15
- 3. Select version bump type:
16
- - `major` – incompatible / breaking changes
17
- - `minor` – adding functionality in a backward compatible manner
18
- - `patch` – backward compatible changes / bug fixes
19
- 4. Run the workflow
20
-
21
- This will publish to npm with the `latest` tag and create a git tag (e.g., `v59.4.0`).
22
-
23
- ## Prereleases (Testing / PoC versions)
24
-
25
- For testing versions from feature branches:
26
-
27
- 1. Go to [Prerelease workflow](https://github.com/rentmanpublic/frontend-core/actions/workflows/prerelease.yml)
28
- 2. Click "Run workflow"
29
- 3. Select the **branch** you want to release from
30
- 4. Enter a prerelease identifier (e.g., `RM4-12345`, `beta`, `feature-x`)
31
- 5. Run the workflow
32
-
33
- This will:
34
- - Create a version like `59.3.0-RM4-12345` (based on the last git tag)
35
- - Publish to npm with a custom tag (e.g., `RM4-12345`)
36
- - Commit and tag on your branch (e.g., `v59.3.0-RM4-12345`)
37
- - Auto-increment if tag exists: `59.3.0-RM4-12345-02`, `59.3.0-RM4-12345-03`, etc.
38
-
39
- To install a prerelease:
40
- ```bash
41
- npm install @rentman/rm-core@RM4-12345
42
- ```
1
+ # Running a local test version
2
+ 1. Make changes
3
+ 2. run `npm run bundle-dev`
4
+ 3. copy `dist` folder to `<project>/node_modules/@rentman/rm-core/`
5
+ 4. Delete the Angular build cache (`.angular`) folder before rebuilding
6
+
7
+ # Releasing
8
+
9
+ ## Production versions
10
+
11
+ For stable releases to master:
12
+
13
+ 1. Go to [Release workflow](https://github.com/rentmanpublic/frontend-core/actions/workflows/release.yml)
14
+ 2. Click "Run workflow"
15
+ 3. Select version bump type:
16
+ - `major` – incompatible / breaking changes
17
+ - `minor` – adding functionality in a backward compatible manner
18
+ - `patch` – backward compatible changes / bug fixes
19
+ 4. Run the workflow
20
+
21
+ This will publish to npm with the `latest` tag and create a git tag (e.g., `v59.4.0`).
22
+
23
+ ## Prereleases (Testing / PoC versions)
24
+
25
+ For testing versions from feature branches:
26
+
27
+ 1. Go to [Prerelease workflow](https://github.com/rentmanpublic/frontend-core/actions/workflows/prerelease.yml)
28
+ 2. Click "Run workflow"
29
+ 3. Select the **branch** you want to release from
30
+ 4. Enter a prerelease identifier (e.g., `RM4-12345`, `beta`, `feature-x`)
31
+ 5. Run the workflow
32
+
33
+ This will:
34
+ - Create a version like `59.3.0-RM4-12345` (based on the last git tag)
35
+ - Publish to npm with a custom tag (e.g., `RM4-12345`)
36
+ - Commit and tag on your branch (e.g., `v59.3.0-RM4-12345`)
37
+ - Auto-increment if tag exists: `59.3.0-RM4-12345-02`, `59.3.0-RM4-12345-03`, etc.
38
+
39
+ To install a prerelease:
40
+ ```bash
41
+ npm install @rentman/rm-core@RM4-12345
42
+ ```
@@ -1,18 +0,0 @@
1
- import { ItemId } from '@rentman/backend-types';
2
- import { TransactionCache } from '../../cache/transaction/TransactionCache';
3
- import { BLR_SKIP_RULE, BusinessLogicRule } from '../BusinessLogicRule';
4
- import { BusinessLogicRuleApplyContext } from '../BusinessLogicRuleApplyContext';
5
- import { BusinessLogicRuleConditionContext } from '../BusinessLogicRuleConditionContext';
6
- import { FunctieTravelDistanceDependency } from './functieTravelDistanceUtils';
7
- type ConditionResult = ItemId[];
8
- /**
9
- * @description
10
- * When the `afstand_van_locatie` field is updated to true, we want to calculate the distance based on the linked location.
11
- * If `twoway` is true, we want to multiply that distance by 2.
12
- */
13
- export declare class FunctieTravelDistanceFromLocationBusinessLogicRule extends BusinessLogicRule<ConditionResult, FunctieTravelDistanceDependency> {
14
- condition(context: BusinessLogicRuleConditionContext): ConditionResult | typeof BLR_SKIP_RULE;
15
- dependency(transaction: TransactionCache, conditionResult: ConditionResult): Promise<FunctieTravelDistanceDependency>;
16
- apply(context: BusinessLogicRuleApplyContext, dependencies: FunctieTravelDistanceDependency): void;
17
- }
18
- export {};
@@ -1,17 +0,0 @@
1
- import { ItemId } from '@rentman/backend-types';
2
- import { TransactionCache } from '../../cache/transaction/TransactionCache';
3
- import { BLR_SKIP_RULE, BusinessLogicRule } from '../BusinessLogicRule';
4
- import { BusinessLogicRuleApplyContext } from '../BusinessLogicRuleApplyContext';
5
- import { BusinessLogicRuleConditionContext } from '../BusinessLogicRuleConditionContext';
6
- import { FunctieTravelDistanceDependency } from './functieTravelDistanceUtils';
7
- type ConditionResult = ItemId[];
8
- /**
9
- * @description
10
- * When we set a distance manually, we want to set afstand_van_locatie to false if the new distance doesn't match the distance of the location
11
- */
12
- export declare class FunctieTravelDistanceUnlinkLocationBusinessLogicRule extends BusinessLogicRule<ConditionResult, FunctieTravelDistanceDependency> {
13
- condition(context: BusinessLogicRuleConditionContext): ConditionResult | typeof BLR_SKIP_RULE;
14
- dependency(transaction: TransactionCache, conditionResult: ConditionResult): Promise<FunctieTravelDistanceDependency>;
15
- apply(context: BusinessLogicRuleApplyContext, dependencies: FunctieTravelDistanceDependency): void;
16
- }
17
- export {};
@@ -1,23 +0,0 @@
1
- import { ItemId } from '@rentman/backend-types';
2
- import { ItemResource } from '../../../models/ItemResource';
3
- import { TransactionCache } from '../../cache/transaction/TransactionCache';
4
- import { BLR_SKIP_RULE, BusinessLogicRule } from '../BusinessLogicRule';
5
- import { BusinessLogicRuleApplyContext } from '../BusinessLogicRuleApplyContext';
6
- import { BusinessLogicRuleConditionContext } from '../BusinessLogicRuleConditionContext';
7
- type ConditionResult = ItemId[];
8
- declare const functieColumns: readonly [{
9
- readonly subproject: readonly [{
10
- readonly locatie: readonly ["reistijd"];
11
- }];
12
- }];
13
- type Dependency = ItemResource<'Functie', typeof functieColumns>[];
14
- /**
15
- * @description
16
- * When the `reistijd_van_locatie` field is updated to true, we want to calculate the travel times (reistijd_vooraf, reistijd_achteraf) based on the linked location.
17
- */
18
- export declare class FunctieTravelTimeFromLocationBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
19
- condition(context: BusinessLogicRuleConditionContext): ConditionResult | typeof BLR_SKIP_RULE;
20
- dependency(transaction: TransactionCache, conditionResult: ConditionResult): Promise<Dependency>;
21
- apply(context: BusinessLogicRuleApplyContext, dependencies: Dependency): void;
22
- }
23
- export {};
@@ -1,9 +0,0 @@
1
- import { ItemResource } from '../../../models/ItemResource';
2
- import { BusinessLogicRuleApplyContext } from '../BusinessLogicRuleApplyContext';
3
- export declare const functieTravelDistanceColumns: readonly ["twoway", {
4
- readonly subproject: readonly [{
5
- readonly locatie: readonly ["kilometers"];
6
- }];
7
- }];
8
- export type FunctieTravelDistanceDependency = ItemResource<'Functie', typeof functieTravelDistanceColumns>[];
9
- export declare function calculateTravelDistance(context: BusinessLogicRuleApplyContext, functieResource: FunctieTravelDistanceDependency[number]): number;