@remoteoss/remote-json-schema-form-kit 0.0.10 → 0.0.12

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.
@@ -0,0 +1,18 @@
1
+ type DayShift = {
2
+ start_time: string;
3
+ end_time: string;
4
+ break_duration_minutes: number;
5
+ };
6
+ /**
7
+ * Computes the total weekly work hours from a daily schedule.
8
+ *
9
+ * @param selectedDays - The day keys to include in the sum (e.g. ["monday", "tuesday"]).
10
+ * @param schedule - Per-day shift definitions keyed by day. Each entry has
11
+ * "HH:MM" start/end times and break duration in minutes.
12
+ * @param subtractBreaks - When true, each day's break_duration_minutes is
13
+ * subtracted from that day's worked minutes.
14
+ * @returns Total weekly hours, floored to 2 decimal places.
15
+ */
16
+ export declare function computeWorkHours(selectedDays: string[], schedule: Record<string, DayShift>, subtractBreaks: boolean): number;
17
+ export {};
18
+ //# sourceMappingURL=computeWorkHours.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"computeWorkHours.d.ts","sourceRoot":"","sources":["../../src/json-logic-operators/computeWorkHours.ts"],"names":[],"mappings":"AACA,KAAK,QAAQ,GAAG;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,sBAAsB,EAAE,MAAM,CAAC;CAChC,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAC9B,YAAY,EAAE,MAAM,EAAE,EACtB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,EAClC,cAAc,EAAE,OAAO,GACtB,MAAM,CA8BR"}
@@ -1,3 +1,4 @@
1
+ import { computeWorkHours } from './computeWorkHours';
1
2
  import { dateAddDays } from './dateAddDays';
2
3
  import { dateAddMonths } from './dateAddMonths';
3
4
  import { dateDifferenceInDays } from './dateDifferenceInDays';
@@ -11,5 +12,6 @@ export declare const operators: {
11
12
  date_difference_in_months: typeof dateDifferenceInMonths;
12
13
  date_format: typeof dateFormat;
13
14
  date_difference_in_weeks: typeof dateDifferenceInWeeks;
15
+ compute_work_hours: typeof computeWorkHours;
14
16
  };
15
17
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/json-logic-operators/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,eAAO,MAAM,SAAS;;;;;;;CAOrB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/json-logic-operators/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,eAAO,MAAM,SAAS;IACpB,aAAa;IACb,eAAe;IACf,uBAAuB;IACvB,yBAAyB;IACzB,WAAW;IACX,wBAAwB;IACxB,kBAAkB;CACnB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remoteoss/remote-json-schema-form-kit",
3
- "version": "0.0.10",
3
+ "version": "0.0.12",
4
4
  "description": "Remote's kit for json-schema-form",
5
5
  "keywords": [
6
6
  "JSON",
@@ -12,7 +12,6 @@
12
12
  "author": "Remote.com <engineering@remote.com> (https://remote.com/)",
13
13
  "main": "dist/index.mjs",
14
14
  "types": "dist/index.d.ts",
15
- "type": "module",
16
15
  "files": [
17
16
  "dist/",
18
17
  "README.md",
@@ -24,15 +23,14 @@
24
23
  },
25
24
  "scripts": {
26
25
  "build": "tsup && yarn build:types",
27
- "build:types": "tsc -p tsconfig.build.json",
26
+ "build:types": "tsgo -p tsconfig.build.json",
28
27
  "dev": "NODE_ENV=development tsup --watch",
29
28
  "test": "jest --colors --logHeapUsage --selectProjects test",
30
29
  "test:file": "yarn test --runTestsByPath",
31
30
  "lint": "jest --maxWorkers=4 --selectProjects eslint",
32
31
  "format": "oxfmt",
33
32
  "format:check": "oxfmt --check",
34
- "types:check": "tsc --noEmit",
35
- "check:pr-version:ci": "node scripts/pr-dev-version",
33
+ "types:check": "tsgo --noEmit",
36
34
  "prepack": "node -e \"let p=JSON.parse(require('fs').readFileSync('package.json','utf8'));p.main='dist/index.mjs';p.types='dist/index.d.ts';require('fs').writeFileSync('package.json',JSON.stringify(p,null,2)+'\\n')\"",
37
35
  "postpack": "git checkout -- package.json"
38
36
  },