use @cityssm/font-awesome-v5-iconclasses
parent
cbcdebf24b
commit
4b771f102c
|
|
@ -1,5 +1,5 @@
|
||||||
|
import { getSolidIconClasses } from '@cityssm/font-awesome-v5-iconclasses';
|
||||||
import { getLotOccupantTypes, getLotStatuses, getWorkOrderMilestoneTypes, getWorkOrderTypes } from '../../helpers/functions.cache.js';
|
import { getLotOccupantTypes, getLotStatuses, getWorkOrderMilestoneTypes, getWorkOrderTypes } from '../../helpers/functions.cache.js';
|
||||||
import { getSolidIconClasses } from '../../helpers/functions.icons.js';
|
|
||||||
export async function handler(_request, response) {
|
export async function handler(_request, response) {
|
||||||
const workOrderTypes = await getWorkOrderTypes();
|
const workOrderTypes = await getWorkOrderTypes();
|
||||||
const workOrderMilestoneTypes = await getWorkOrderMilestoneTypes();
|
const workOrderMilestoneTypes = await getWorkOrderMilestoneTypes();
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { getSolidIconClasses } from '@cityssm/font-awesome-v5-iconclasses'
|
||||||
import type { Request, Response } from 'express'
|
import type { Request, Response } from 'express'
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
|
@ -6,7 +7,6 @@ import {
|
||||||
getWorkOrderMilestoneTypes,
|
getWorkOrderMilestoneTypes,
|
||||||
getWorkOrderTypes
|
getWorkOrderTypes
|
||||||
} from '../../helpers/functions.cache.js'
|
} from '../../helpers/functions.cache.js'
|
||||||
import { getSolidIconClasses } from '../../helpers/functions.icons.js'
|
|
||||||
|
|
||||||
export async function handler(_request: Request, response: Response): Promise<void> {
|
export async function handler(_request: Request, response: Response): Promise<void> {
|
||||||
const workOrderTypes = await getWorkOrderTypes()
|
const workOrderTypes = await getWorkOrderTypes()
|
||||||
|
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
export declare function getSolidIconClasses(): Promise<string[]>;
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
import faIcons from 'font-awesome-v5-icons';
|
|
||||||
let solidIcons = [];
|
|
||||||
export async function getSolidIconClasses() {
|
|
||||||
if (solidIcons.length === 0) {
|
|
||||||
const allIcons = await faIcons.getListByKeys(['name', 'styles']);
|
|
||||||
const list = [];
|
|
||||||
for (const icon of allIcons) {
|
|
||||||
if ((icon.styles ?? []).includes('solid')) {
|
|
||||||
list.push(icon.name);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
solidIcons = list;
|
|
||||||
}
|
|
||||||
return solidIcons;
|
|
||||||
}
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
||||||
import faIcons from 'font-awesome-v5-icons'
|
|
||||||
|
|
||||||
let solidIcons: string[] = []
|
|
||||||
|
|
||||||
export async function getSolidIconClasses(): Promise<string[]> {
|
|
||||||
if (solidIcons.length === 0) {
|
|
||||||
const allIcons = await faIcons.getListByKeys(['name', 'styles'])
|
|
||||||
|
|
||||||
const list: string[] = []
|
|
||||||
|
|
||||||
for (const icon of allIcons) {
|
|
||||||
if ((icon.styles ?? []).includes('solid')) {
|
|
||||||
list.push(icon.name!)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
solidIcons = list
|
|
||||||
}
|
|
||||||
|
|
||||||
return solidIcons
|
|
||||||
}
|
|
||||||
|
|
@ -14,6 +14,7 @@
|
||||||
"@cityssm/date-diff": "^2.2.3",
|
"@cityssm/date-diff": "^2.2.3",
|
||||||
"@cityssm/dynamics-gp": "^1.0.3",
|
"@cityssm/dynamics-gp": "^1.0.3",
|
||||||
"@cityssm/expressjs-server-js": "^2.3.3",
|
"@cityssm/expressjs-server-js": "^2.3.3",
|
||||||
|
"@cityssm/font-awesome-v5-iconclasses": "^0.1.0",
|
||||||
"@cityssm/ntfy-publish": "^1.0.1",
|
"@cityssm/ntfy-publish": "^1.0.1",
|
||||||
"@cityssm/pdf-puppeteer": "^4.2.0",
|
"@cityssm/pdf-puppeteer": "^4.2.0",
|
||||||
"@cityssm/utils-datetime": "^1.2.0",
|
"@cityssm/utils-datetime": "^1.2.0",
|
||||||
|
|
@ -34,7 +35,6 @@
|
||||||
"express": "^4.19.2",
|
"express": "^4.19.2",
|
||||||
"express-rate-limit": "^7.3.1",
|
"express-rate-limit": "^7.3.1",
|
||||||
"express-session": "^1.18.0",
|
"express-session": "^1.18.0",
|
||||||
"font-awesome-v5-icons": "^1.3.0",
|
|
||||||
"http-errors": "^2.0.0",
|
"http-errors": "^2.0.0",
|
||||||
"ical-generator": "^7.1.0",
|
"ical-generator": "^7.1.0",
|
||||||
"leaflet": "^1.9.4",
|
"leaflet": "^1.9.4",
|
||||||
|
|
@ -93,7 +93,7 @@
|
||||||
"sass": "^1.77.6"
|
"sass": "^1.77.6"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^14.13.1 || >=16.0.0"
|
"node": ">=18.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@aashutoshrathi/word-wrap": {
|
"node_modules/@aashutoshrathi/word-wrap": {
|
||||||
|
|
@ -515,6 +515,17 @@
|
||||||
"integrity": "sha512-lHddtgbHA26+xgKBBgVQl6japGah2M+L+5z+lRuEV/P76DBSI2fifuCukUhX6k7Rvbiw+qkDSPPxwKJGggr+BA==",
|
"integrity": "sha512-lHddtgbHA26+xgKBBgVQl6japGah2M+L+5z+lRuEV/P76DBSI2fifuCukUhX6k7Rvbiw+qkDSPPxwKJGggr+BA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"node_modules/@cityssm/font-awesome-v5-iconclasses": {
|
||||||
|
"version": "0.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@cityssm/font-awesome-v5-iconclasses/-/font-awesome-v5-iconclasses-0.1.0.tgz",
|
||||||
|
"integrity": "sha512-eUv2+hrYv7P2XmPTTg8WPxAr7J1yucOq+SgIklEdSVIjHXCB0RhxRTuzlr1gKJ2y+4NyPJdkQzOLl9g4chkrPA==",
|
||||||
|
"dependencies": {
|
||||||
|
"font-awesome-v5-icons": "^1.3.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "^14.13.1 || >=16.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@cityssm/mssql-multi-pool": {
|
"node_modules/@cityssm/mssql-multi-pool": {
|
||||||
"version": "3.1.5",
|
"version": "3.1.5",
|
||||||
"resolved": "https://registry.npmjs.org/@cityssm/mssql-multi-pool/-/mssql-multi-pool-3.1.5.tgz",
|
"resolved": "https://registry.npmjs.org/@cityssm/mssql-multi-pool/-/mssql-multi-pool-3.1.5.tgz",
|
||||||
|
|
@ -1266,9 +1277,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@types/http-cache-semantics": {
|
"node_modules/@types/http-cache-semantics": {
|
||||||
"version": "4.0.1",
|
"version": "4.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz",
|
||||||
"integrity": "sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ=="
|
"integrity": "sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA=="
|
||||||
},
|
},
|
||||||
"node_modules/@types/http-errors": {
|
"node_modules/@types/http-errors": {
|
||||||
"version": "2.0.4",
|
"version": "2.0.4",
|
||||||
|
|
@ -1406,9 +1417,9 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@types/responselike": {
|
"node_modules/@types/responselike": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.3.tgz",
|
||||||
"integrity": "sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==",
|
"integrity": "sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/node": "*"
|
"@types/node": "*"
|
||||||
}
|
}
|
||||||
|
|
@ -2765,9 +2776,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/cacheable-request": {
|
"node_modules/cacheable-request": {
|
||||||
"version": "7.0.2",
|
"version": "7.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.4.tgz",
|
||||||
"integrity": "sha512-pouW8/FmiPQbuGpkXQ9BAPv/Mo5xDGANgSNXzTzJ8DrKGuXOssM4wIQRjfanNRh3Yu5cfYPvcorqbhg2KIJtew==",
|
"integrity": "sha512-v+p6ongsrp0yTGbJXjgxPow2+DL93DASP4kXCDKb8/bwRtt9OEF3whggkkDkGNzgcWy2XaF4a8nZglC7uElscg==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"clone-response": "^1.0.2",
|
"clone-response": "^1.0.2",
|
||||||
"get-stream": "^5.1.0",
|
"get-stream": "^5.1.0",
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@
|
||||||
"@cityssm/date-diff": "^2.2.3",
|
"@cityssm/date-diff": "^2.2.3",
|
||||||
"@cityssm/dynamics-gp": "^1.0.3",
|
"@cityssm/dynamics-gp": "^1.0.3",
|
||||||
"@cityssm/expressjs-server-js": "^2.3.3",
|
"@cityssm/expressjs-server-js": "^2.3.3",
|
||||||
|
"@cityssm/font-awesome-v5-iconclasses": "^0.1.0",
|
||||||
"@cityssm/ntfy-publish": "^1.0.1",
|
"@cityssm/ntfy-publish": "^1.0.1",
|
||||||
"@cityssm/pdf-puppeteer": "^4.2.0",
|
"@cityssm/pdf-puppeteer": "^4.2.0",
|
||||||
"@cityssm/utils-datetime": "^1.2.0",
|
"@cityssm/utils-datetime": "^1.2.0",
|
||||||
|
|
@ -58,7 +59,6 @@
|
||||||
"express": "^4.19.2",
|
"express": "^4.19.2",
|
||||||
"express-rate-limit": "^7.3.1",
|
"express-rate-limit": "^7.3.1",
|
||||||
"express-session": "^1.18.0",
|
"express-session": "^1.18.0",
|
||||||
"font-awesome-v5-icons": "^1.3.0",
|
|
||||||
"http-errors": "^2.0.0",
|
"http-errors": "^2.0.0",
|
||||||
"ical-generator": "^7.1.0",
|
"ical-generator": "^7.1.0",
|
||||||
"leaflet": "^1.9.4",
|
"leaflet": "^1.9.4",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue