@lighthouse/common 6.3.0 → 6.4.0-canary.0
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.
|
@@ -67,7 +67,7 @@ function getAuditItemsData(items, data) {
|
|
|
67
67
|
KeyPairId,
|
|
68
68
|
Signature
|
|
69
69
|
});
|
|
70
|
-
const link = `${awsS3BaseUrl}/${asset}`;
|
|
70
|
+
const link = shouldUseCloudfront ? `${cloudfrontBaseUrl}/${item.signedAssets[assetIndex]}` : `${awsS3BaseUrl}/${asset}`;
|
|
71
71
|
const thumbnailUrl = (0, _.buildFetchUrl)(asset, {
|
|
72
72
|
awsS3BaseUrl,
|
|
73
73
|
cloudfrontBaseUrl,
|
|
@@ -60,7 +60,7 @@ export function getAuditItemsData(items, data) {
|
|
|
60
60
|
KeyPairId: KeyPairId,
|
|
61
61
|
Signature: Signature
|
|
62
62
|
});
|
|
63
|
-
var link = "".concat(awsS3BaseUrl, "/").concat(asset);
|
|
63
|
+
var link = shouldUseCloudfront ? "".concat(cloudfrontBaseUrl, "/").concat(item.signedAssets[assetIndex]) : "".concat(awsS3BaseUrl, "/").concat(asset);
|
|
64
64
|
var thumbnailUrl = buildFetchUrl(asset, _defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
65
65
|
awsS3BaseUrl: awsS3BaseUrl,
|
|
66
66
|
cloudfrontBaseUrl: cloudfrontBaseUrl,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["find","groupBy","map","get","round","buildFetchUrl","getAuditItemsData","items","data","_data$settings","settings","_data$settings2","awsS3BaseUrl","cloudinaryBaseUrl","cloudfrontBaseUrl","Policy","KeyPairId","Signature","shouldUseCloudfront","_data$entity","entity","_data$entity2","groupScores","groupedItems","auditData","overallActualScore","overallMaximumScore","groupIndex","key","skipped","group","title","label","groupData","groupMaximumScore","groupActualScore","groupResultScore","groupPercentageResultScore","currentGroupScores","max","actual","result","percentageResult","item","itemIndex","hasScore","score","rawAssets","assets","assetCount","length","asset","assetIndex","assetUrl","height","width","quality","fit","link","concat","thumbnailUrl","_defineProperty","comments","matchingScore","scores","value","scoreLabel","scoreWeight","weight","questionId","_id"],"sources":["../../../src/helpers/get-audit-items-data/index.js"],"sourcesContent":["import { find, groupBy, map, get, round } from 'lodash'\n\nimport { buildFetchUrl } from '../'\n\nexport function getAuditItemsData(items, data) {\n const {\n settings: {\n awsS3BaseUrl,\n cloudinaryBaseUrl,\n cloudfrontBaseUrl,\n Policy,\n KeyPairId,\n Signature,\n shouldUseCloudfront,\n } = {},\n entity: { groupScores } = {},\n } = data\n\n const groupedItems = groupBy(items, 'group.id')\n\n const auditData = {\n overallActualScore: 0,\n overallMaximumScore: 0,\n }\n\n auditData.items = map(groupedItems, (items, groupIndex) => {\n const key = groupIndex\n const skipped = !!items[0].group.skipped\n const title = items[0].group.label\n\n const groupData = {\n key,\n groupMaximumScore: 0,\n groupActualScore: 0,\n groupResultScore: 0,\n groupPercentageResultScore: 0,\n skipped,\n title,\n }\n\n const currentGroupScores = get(groupScores, key)\n\n if (currentGroupScores) {\n groupData.groupMaximumScore = round(currentGroupScores.max, 2)\n groupData.groupActualScore = round(currentGroupScores.actual, 2)\n groupData.groupResultScore = currentGroupScores.result\n groupData.groupPercentageResultScore = currentGroupScores.percentageResult\n }\n\n groupData.items = items.map((item, itemIndex) => {\n // NOTE: we handle scores of -1, 0 and 1\n // -1 scores are skipped from group max and actual score\n // 0 and 1 must be included in the final scores\n const hasScore = item.score !== null && item.score !== -1\n const rawAssets = item.assets || []\n const assetCount = rawAssets.length\n\n const assets = rawAssets.map((asset, assetIndex) => {\n const assetUrl = buildFetchUrl(asset, {\n awsS3BaseUrl,\n cloudfrontBaseUrl,\n cloudinaryBaseUrl,\n height: 400,\n width: 600,\n quality: 50,\n fit: true,\n shouldUseCloudfront,\n Policy,\n KeyPairId,\n Signature,\n })\n\n const link = `${awsS3BaseUrl}/${asset}`\n\n const thumbnailUrl = buildFetchUrl(asset, {\n awsS3BaseUrl,\n cloudfrontBaseUrl,\n cloudinaryBaseUrl,\n shouldUseCloudfront,\n width: 100,\n quality: 50,\n fit: true,\n shouldUseCloudfront,\n Policy,\n KeyPairId,\n Signature,\n })\n\n const key = `${groupIndex}-item-asset-${assetIndex}`\n\n return {\n assetUrl,\n key,\n link,\n thumbnailUrl,\n }\n })\n\n const comments = item.comments\n const label = item.label\n const score = item.score\n const key = `${groupIndex}-item-${itemIndex}`\n const matchingScore = find(item.scores, { value: score })\n\n // NOTE: ensure we have a score otherwise fallback to - value\n const scoreLabel =\n hasScore && matchingScore && !skipped ? matchingScore.label : '-'\n const scoreWeight = hasScore && !skipped ? item.scoreWeight : '-'\n const weight = hasScore ? item.weight : '-'\n\n return {\n assetCount,\n assets,\n comments,\n key,\n label,\n questionId: item._id,\n score,\n scoreLabel,\n scoreWeight,\n weight,\n }\n })\n\n return groupData\n })\n\n return auditData\n}\n"],"mappings":";AAAA,SAASA,IAAI,EAAEC,OAAO,EAAEC,GAAG,EAAEC,GAAG,EAAEC,KAAK,QAAQ,QAAQ;AAEvD,SAASC,aAAa,QAAQ,KAAK;AAEnC,OAAO,SAASC,iBAAiBA,CAACC,KAAK,EAAEC,IAAI,EAAE;EAC7C,IAAAC,cAAA,GAWID,IAAI,CAVNE,QAAQ;IAAAC,eAAA,GAAAF,cAAA,cAQJ,CAAC,CAAC,GAAAA,cAAA;IAPJG,YAAY,GAAAD,eAAA,CAAZC,YAAY;IACZC,iBAAiB,GAAAF,eAAA,CAAjBE,iBAAiB;IACjBC,iBAAiB,GAAAH,eAAA,CAAjBG,iBAAiB;IACjBC,MAAM,GAAAJ,eAAA,CAANI,MAAM;IACNC,SAAS,GAAAL,eAAA,CAATK,SAAS;IACTC,SAAS,GAAAN,eAAA,CAATM,SAAS;IACTC,mBAAmB,GAAAP,eAAA,CAAnBO,mBAAmB;IAAAC,YAAA,GAGnBX,IAAI,CADNY,MAAM;IAAAC,aAAA,GAAAF,YAAA,cAAoB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,IAAMC,QAAQ,GAAGF,IAAI,CAACG,KAAK,KAAK,IAAI,IAAIH,IAAI,CAACG,KAAK,KAAK,CAAC,CAAC;MACzD,IAAMC,SAAS,GAAGJ,IAAI,CAACK,MAAM,IAAI,EAAE;MACnC,IAAMC,UAAU,GAAGF,SAAS,CAACG,MAAM;MAEnC,IAAMF,MAAM,GAAGD,SAAS,CAAC7C,GAAG,CAAC,UAACiD,KAAK,EAAEC,UAAU,EAAK;QAClD,IAAMC,QAAQ,GAAGhD,aAAa,CAAC8C,KAAK,EAAE;UACpCvC,YAAY,EAAZA,YAAY;UACZE,iBAAiB,EAAjBA,iBAAiB;UACjBD,iBAAiB,EAAjBA,iBAAiB;UACjByC,MAAM,EAAE,GAAG;UACXC,KAAK,EAAE,GAAG;UACVC,OAAO,EAAE,EAAE;UACXC,GAAG,EAAE,IAAI;UACTvC,mBAAmB,EAAnBA,mBAAmB;UACnBH,MAAM,EAANA,MAAM;UACNC,SAAS,EAATA,SAAS;UACTC,SAAS,EAATA;QACF,CAAC,CAAC;QAEF,IAAMyC,IAAI,
|
|
1
|
+
{"version":3,"file":"index.js","names":["find","groupBy","map","get","round","buildFetchUrl","getAuditItemsData","items","data","_data$settings","settings","_data$settings2","awsS3BaseUrl","cloudinaryBaseUrl","cloudfrontBaseUrl","Policy","KeyPairId","Signature","shouldUseCloudfront","_data$entity","entity","_data$entity2","groupScores","groupedItems","auditData","overallActualScore","overallMaximumScore","groupIndex","key","skipped","group","title","label","groupData","groupMaximumScore","groupActualScore","groupResultScore","groupPercentageResultScore","currentGroupScores","max","actual","result","percentageResult","item","itemIndex","hasScore","score","rawAssets","assets","assetCount","length","asset","assetIndex","assetUrl","height","width","quality","fit","link","concat","signedAssets","thumbnailUrl","_defineProperty","comments","matchingScore","scores","value","scoreLabel","scoreWeight","weight","questionId","_id"],"sources":["../../../src/helpers/get-audit-items-data/index.js"],"sourcesContent":["import { find, groupBy, map, get, round } from 'lodash'\n\nimport { buildFetchUrl } from '../'\n\nexport function getAuditItemsData(items, data) {\n const {\n settings: {\n awsS3BaseUrl,\n cloudinaryBaseUrl,\n cloudfrontBaseUrl,\n Policy,\n KeyPairId,\n Signature,\n shouldUseCloudfront,\n } = {},\n entity: { groupScores } = {},\n } = data\n\n const groupedItems = groupBy(items, 'group.id')\n\n const auditData = {\n overallActualScore: 0,\n overallMaximumScore: 0,\n }\n\n auditData.items = map(groupedItems, (items, groupIndex) => {\n const key = groupIndex\n const skipped = !!items[0].group.skipped\n const title = items[0].group.label\n\n const groupData = {\n key,\n groupMaximumScore: 0,\n groupActualScore: 0,\n groupResultScore: 0,\n groupPercentageResultScore: 0,\n skipped,\n title,\n }\n\n const currentGroupScores = get(groupScores, key)\n\n if (currentGroupScores) {\n groupData.groupMaximumScore = round(currentGroupScores.max, 2)\n groupData.groupActualScore = round(currentGroupScores.actual, 2)\n groupData.groupResultScore = currentGroupScores.result\n groupData.groupPercentageResultScore = currentGroupScores.percentageResult\n }\n\n groupData.items = items.map((item, itemIndex) => {\n // NOTE: we handle scores of -1, 0 and 1\n // -1 scores are skipped from group max and actual score\n // 0 and 1 must be included in the final scores\n const hasScore = item.score !== null && item.score !== -1\n const rawAssets = item.assets || []\n const assetCount = rawAssets.length\n\n const assets = rawAssets.map((asset, assetIndex) => {\n const assetUrl = buildFetchUrl(asset, {\n awsS3BaseUrl,\n cloudfrontBaseUrl,\n cloudinaryBaseUrl,\n height: 400,\n width: 600,\n quality: 50,\n fit: true,\n shouldUseCloudfront,\n Policy,\n KeyPairId,\n Signature,\n })\n\n const link = shouldUseCloudfront\n ? `${cloudfrontBaseUrl}/${item.signedAssets[assetIndex]}`\n : `${awsS3BaseUrl}/${asset}`\n\n const thumbnailUrl = buildFetchUrl(asset, {\n awsS3BaseUrl,\n cloudfrontBaseUrl,\n cloudinaryBaseUrl,\n shouldUseCloudfront,\n width: 100,\n quality: 50,\n fit: true,\n shouldUseCloudfront,\n Policy,\n KeyPairId,\n Signature,\n })\n\n const key = `${groupIndex}-item-asset-${assetIndex}`\n\n return {\n assetUrl,\n key,\n link,\n thumbnailUrl,\n }\n })\n\n const comments = item.comments\n const label = item.label\n const score = item.score\n const key = `${groupIndex}-item-${itemIndex}`\n const matchingScore = find(item.scores, { value: score })\n\n // NOTE: ensure we have a score otherwise fallback to - value\n const scoreLabel =\n hasScore && matchingScore && !skipped ? matchingScore.label : '-'\n const scoreWeight = hasScore && !skipped ? item.scoreWeight : '-'\n const weight = hasScore ? item.weight : '-'\n\n return {\n assetCount,\n assets,\n comments,\n key,\n label,\n questionId: item._id,\n score,\n scoreLabel,\n scoreWeight,\n weight,\n }\n })\n\n return groupData\n })\n\n return auditData\n}\n"],"mappings":";AAAA,SAASA,IAAI,EAAEC,OAAO,EAAEC,GAAG,EAAEC,GAAG,EAAEC,KAAK,QAAQ,QAAQ;AAEvD,SAASC,aAAa,QAAQ,KAAK;AAEnC,OAAO,SAASC,iBAAiBA,CAACC,KAAK,EAAEC,IAAI,EAAE;EAC7C,IAAAC,cAAA,GAWID,IAAI,CAVNE,QAAQ;IAAAC,eAAA,GAAAF,cAAA,cAQJ,CAAC,CAAC,GAAAA,cAAA;IAPJG,YAAY,GAAAD,eAAA,CAAZC,YAAY;IACZC,iBAAiB,GAAAF,eAAA,CAAjBE,iBAAiB;IACjBC,iBAAiB,GAAAH,eAAA,CAAjBG,iBAAiB;IACjBC,MAAM,GAAAJ,eAAA,CAANI,MAAM;IACNC,SAAS,GAAAL,eAAA,CAATK,SAAS;IACTC,SAAS,GAAAN,eAAA,CAATM,SAAS;IACTC,mBAAmB,GAAAP,eAAA,CAAnBO,mBAAmB;IAAAC,YAAA,GAGnBX,IAAI,CADNY,MAAM;IAAAC,aAAA,GAAAF,YAAA,cAAoB,CAAC,CAAC,GAAAA,YAAA;IAAlBG,WAAW,GAAAD,aAAA,CAAXC,WAAW;EAGvB,IAAMC,YAAY,GAAGtB,OAAO,CAACM,KAAK,EAAE,UAAU,CAAC;EAE/C,IAAMiB,SAAS,GAAG;IAChBC,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ACF,CAAC;MACH,CAAC,CAAC;MAEF,IAAME,QAAQ,GAAGpB,IAAI,CAACoB,QAAQ;MAC9B,IAAM/B,KAAK,GAAGW,IAAI,CAACX,KAAK;MACxB,IAAMc,KAAK,GAAGH,IAAI,CAACG,KAAK;MACxB,IAAMlB,GAAG,MAAA+B,MAAA,CAAMhC,UAAU,YAAAgC,MAAA,CAASf,SAAS,CAAE;MAC7C,IAAMoB,aAAa,GAAGhE,IAAI,CAAC2C,IAAI,CAACsB,MAAM,EAAE;QAAEC,KAAK,EAAEpB;MAAM,CAAC,CAAC;;MAEzD;MACA,IAAMqB,UAAU,GACdtB,QAAQ,IAAImB,aAAa,IAAI,CAACnC,OAAO,GAAGmC,aAAa,CAAChC,KAAK,GAAG,GAAG;MACnE,IAAMoC,WAAW,GAAGvB,QAAQ,IAAI,CAAChB,OAAO,GAAGc,IAAI,CAACyB,WAAW,GAAG,GAAG;MACjE,IAAMC,MAAM,GAAGxB,QAAQ,GAAGF,IAAI,CAAC0B,MAAM,GAAG,GAAG;MAE3C,OAAO;QACLpB,UAAU,EAAVA,UAAU;QACVD,MAAM,EAANA,MAAM;QACNe,QAAQ,EAARA,QAAQ;QACRnC,GAAG,EAAHA,GAAG;QACHI,KAAK,EAALA,KAAK;QACLsC,UAAU,EAAE3B,IAAI,CAAC4B,GAAG;QACpBzB,KAAK,EAALA,KAAK;QACLqB,UAAU,EAAVA,UAAU;QACVC,WAAW,EAAXA,WAAW;QACXC,MAAM,EAANA;MACF,CAAC;IACH,CAAC,CAAC;IAEF,OAAOpC,SAAS;EAClB,CAAC,CAAC;EAEF,OAAOT,SAAS;AAClB","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lighthouse/common",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.4.0-canary.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -17,17 +17,16 @@
|
|
|
17
17
|
"precommit": "lint-staged",
|
|
18
18
|
"prepublishOnly": "yarn build",
|
|
19
19
|
"preversion": "yarn test",
|
|
20
|
-
"storybook:html": "
|
|
21
|
-
"storybook:react": "
|
|
22
|
-
"build-storybook:html": "sb build -c .storybook-html",
|
|
23
|
-
"build-storybook:react": "sb build -c .storybook-react",
|
|
20
|
+
"storybook:html": "start-storybook -p 9001 -c .storybook-html -s ./src",
|
|
21
|
+
"storybook:react": "start-storybook -p 9002 -c .storybook-react -s ./src",
|
|
24
22
|
"test": "TZ=UTC vitest run",
|
|
25
|
-
"test:watch": "TZ=UTC vitest watch",
|
|
26
23
|
"test:ci": "yarn lint && yarn type-check && yarn test --coverage",
|
|
27
24
|
"type-check": "tsc --noEmit",
|
|
28
25
|
"type-check:watch": "yarn type-check --watch",
|
|
29
26
|
"validate:circleci": "circleci config validate -c .circleci/config.yml",
|
|
30
|
-
"version": "yarn build"
|
|
27
|
+
"version": "yarn build",
|
|
28
|
+
"watch:es": "nodemon --watch src --ext js,ts --exec \"yarn build:es\"",
|
|
29
|
+
"watch:node": "nodemon --watch src --ext js,ts --exec \"yarn build:node\""
|
|
31
30
|
},
|
|
32
31
|
"repository": {
|
|
33
32
|
"type": "git",
|
|
@@ -56,13 +55,11 @@
|
|
|
56
55
|
"@babel/preset-env": "^7.12.1",
|
|
57
56
|
"@babel/preset-react": "^7.8.3",
|
|
58
57
|
"@babel/preset-typescript": "^7.8.3",
|
|
59
|
-
"@storybook/addon-actions": "^
|
|
60
|
-
"@storybook/addon-
|
|
61
|
-
"@storybook/
|
|
62
|
-
"@storybook/html": "^
|
|
63
|
-
"@storybook/
|
|
64
|
-
"@storybook/react": "^7.6.20",
|
|
65
|
-
"@storybook/react-webpack5": "^7.6.20",
|
|
58
|
+
"@storybook/addon-actions": "^5.3.14",
|
|
59
|
+
"@storybook/addon-knobs": "^5.3.14",
|
|
60
|
+
"@storybook/addon-notes": "^5.3.14",
|
|
61
|
+
"@storybook/html": "^5.3.14",
|
|
62
|
+
"@storybook/react": "^5.3.14",
|
|
66
63
|
"@types/lodash": "^4.14.149",
|
|
67
64
|
"@types/node": "^12.7.5",
|
|
68
65
|
"@types/yup": "^0.26.32",
|
|
@@ -75,9 +72,8 @@
|
|
|
75
72
|
"lint-staged": "^15.2.0",
|
|
76
73
|
"mockdate": "^2.0.2",
|
|
77
74
|
"nock": "^12.0.2",
|
|
75
|
+
"nodemon": "^3.0.0",
|
|
78
76
|
"prettier": "^3.3.0",
|
|
79
|
-
"react": "^18.3.1",
|
|
80
|
-
"react-dom": "^18.3.1",
|
|
81
77
|
"react-visjs-timeline": "^1.6.0",
|
|
82
78
|
"rimraf": "^2.6.3",
|
|
83
79
|
"typescript": "^3.8.3",
|