@abcagency/hc-ui-components 1.9.16 → 1.9.17

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.
@@ -1 +1 @@
1
- {"version":3,"file":"field-mapper-mobile.js","sources":["../../../../src/components/modules/list/field-mapper-mobile.jsx"],"sourcesContent":["import React from 'react';\nimport Grid from '~/components/modules/grid';\nimport Icon from '~/components/modules/icon';\nimport PillWrapper from '~/components/modules/buttons/pill-wrapper';\nimport { getFieldValue } from '~/util/filterUtil';\nimport { twMerge } from 'tailwind-merge';\n\nconst FieldMapperMobile = ({\n\titem,\n\tfieldsShown,\n\tspecialFeatures,\n\tspecialFeaturePills,\n\thandleFavouriteClick,\n\tisFavorite,\n\tincludeFavorite = true\n}) => {\n\tconst specialFeaturePillsRender = field => {\n\t\tif (field !== 'title' || !specialFeatures || !specialFeaturePills) return null;\n\t\t\n\t\treturn Object.entries(specialFeatures).map(([featureKey, featureLabel]) => {\n\t\t\t// Only show pill if it's configured in specialFeaturePills\n\t\t\tif (!specialFeaturePills[featureKey]) return null;\n\t\t\t\n\t\t\tconst value = getFieldValue(item, featureKey);\n\t\t\tconst customClassName = specialFeaturePills[featureKey]?.className || '';\n\t\t\t\n\t\t\t// Handle boolean fields (value == 1 or \"true\")\n\t\t\tif (value == 1 || value === 1 || value === '1' || value === 'true' || value === 'True' || value === true) {\n\t\t\t\treturn <PillWrapper key={featureKey} className={customClassName}>{featureLabel}</PillWrapper>;\n\t\t\t}\n\t\t\t// Handle multi-value custom fields - show the value if it's not empty/false\n\t\t\tif (value && value !== '' && value !== 'false' && value !== 'False' && value !== '0' && value !== 0) {\n\t\t\t\treturn <PillWrapper key={featureKey} className={customClassName}>{featureLabel}: {value}</PillWrapper>;\n\t\t\t}\n\t\t\treturn null;\n\t\t});\n\t};\n\n\treturn (\n\t\t<Grid.Item className=\"md:hc-hidden\">\n\t\t\t{fieldsShown.includes(\"title\") &&\n <>\n \t<div className=\"hc-flex hc-items-start\">\n \t\t<div className=\"hc-flex hc-justify-between hc-items-center hc-min-w-[100%]\">\n \t\t\t<h3 className=\"hc-font-bold hc-mb-3 hc-flex-1\">{getFieldValue(item, \"title\")}</h3>\n \t\t\t{includeFavorite && <div className=\"hc-flex hc-justify-end hc-pb-2\">\n \t\t\t\t<Icon\n \t\t\t\t\ticon={isFavorite ? \"mdi:heart\" : \"mdi:heart-outline\"}\n \t\t\t\t\tsize=\"hc-size-3.5\"\n \t\t\t\t\ticonClasses={isFavorite ? \"hc-text-primary\" : \"\"}\n \t\t\t\t\tclassName={`hc-transition-opacity hc-duration-300 hc-cursor-pointer\n ${isFavorite ? \"hc-opacity-100\" : \"hc-text-uiText/60 group-hover:hc-opacity-100\"}\n `}\n \t\t\t\t\tonClick={e => handleFavouriteClick(e, item)}\n \t\t\t\t/>\n \t\t\t</div>\n \t\t\t}\n \t\t</div>\n \t</div>\n\t\t\t{specialFeatures && <div className='hc-pb-4'>{specialFeaturePillsRender(\"title\")} </div>}\n\n\t\t\t<ul className=\"hc-space-y-2 hc-text-xs\">\n\t\t\t\t{[\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: \"category\",\n\t\t\t\t\t\tname: \"category\",\n\t\t\t\t\t\ticon: \"icon-park-solid:tree-list\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: \"subCategory\",\n\t\t\t\t\t\tname: \"subCategory\",\n\t\t\t\t\t\ticon: \"icon-park-solid:tree-list\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: \"schedule\",\n\t\t\t\t\t\tname: \"Schedule\",\n\t\t\t\t\t\ticon: \"gravity-ui:clock-fill\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: \"city\",\n\t\t\t\t\t\tname: \"Location\",\n\t\t\t\t\t\ticon: \"fluent:location-16-filled\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: \"state\",\n\t\t\t\t\t\tname: \"Location\",\n\t\t\t\t\t\ticon: \"fluent:location-16-filled\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: \"cityState\",\n\t\t\t\t\t\tname: \"Location\",\n\t\t\t\t\t\ticon: \"fluent:location-16-filled\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: \"travelTime\",\n\t\t\t\t\t\tname: \"Commute\",\n\t\t\t\t\t\ticon: \"ri:pin-distance-fill\"\n\t\t\t\t\t}\n\t\t\t\t].map(listItem => (\n\t\t\t\t\t(fieldsShown.includes(listItem.field) && getFieldValue(item, listItem.field)) &&\n <li\n \tkey={listItem.field}\n \tclassName=\"hc-flex hc-gap-2\"\n >\n \t<Icon\n \t\ticon={listItem.icon}\n \t\tsize=\"hc-size-3.5\"\n \t\tclassName=\"hc-text-uiAccent/30\"\n \t/>\n \t<span className=\"hc-sr-only\">{listItem.name}</span>\n \t{getFieldValue(item, listItem.field)}\n </li>\n\t\t\t\t))}\n\t\t\t</ul>\n </>\n\t\t\t}\n\t\t</Grid.Item>\n\t);\n};\n\nexport default FieldMapperMobile;"],"names":["FieldMapperMobile","_ref","item","fieldsShown","specialFeatures","specialFeaturePills","handleFavouriteClick","isFavorite","_ref$includeFavorite","includeFavorite","specialFeaturePillsRender","field","Object","entries","map","_ref2","_specialFeaturePills$","_ref3","_slicedToArray","featureKey","featureLabel","value","getFieldValue","customClassName","className","React","createElement","PillWrapper","key","Grid","Item","includes","Fragment","Icon","icon","size","iconClasses","concat","onClick","e","name","listItem"],"mappings":";;;;;;;;AAOA,IAAMA,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAAC,IAAA,EAQjB;AAAA,EAAA,IAPLC,IAAI,GAAAD,IAAA,CAAJC,IAAI;IACJC,WAAW,GAAAF,IAAA,CAAXE,WAAW;IACXC,eAAe,GAAAH,IAAA,CAAfG,eAAe;IACfC,mBAAmB,GAAAJ,IAAA,CAAnBI,mBAAmB;IACnBC,oBAAoB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CvB,IAAAA,KAAK,EAAE,WAAW;AAClB6B,IAAAA,IAAI,EAAE,UAAU;AAChBN,IAAAA,IAAI,EAAE,2BAAA;AACP,GAAC,EACD;AACCvB,IAAAA,KAAK,EAAE,YAAY;AACnB6B,IAAAA,IAAI,EAAE,SAAS;AACfN,IAAAA,IAAI,EAAE,sBAAA;AACP,GAAC,CACD,CAACpB,GAAG,CAAC,UAAA2B,QAAQ,EAAA;IAAA,OACZtC,WAAW,CAAC4B,QAAQ,CAACU,QAAQ,CAAC9B,KAAK,CAAC,IAAIW,aAAa,CAACpB,IAAI,EAAEuC,QAAQ,CAAC9B,KAAK,CAAC,iBACvEc,KAAA,CAAAC,aAAA,CAAA,IAAA,EAAA;MACCE,GAAG,EAAEa,QAAQ,CAAC9B,KAAM;AACpBa,MAAAA,SAAS,EAAC,kBAAA;AAAkB,KAAA,eAE5BC,KAAA,CAAAC,aAAA,CAACO,aAAI,EAAA;MACJC,IAAI,EAAEO,QAAQ,CAACP,IAAK;AACpBC,MAAAA,IAAI,EAAC,aAAa;AAClBX,MAAAA,SAAS,EAAC,qBAAA;AAAqB,KAC/B,CAAC,eACFC,KAAA,CAAAC,aAAA,CAAA,MAAA,EAAA;AAAMF,MAAAA,SAAS,EAAC,YAAA;AAAY,KAAA,EAAEiB,QAAQ,CAACD,IAAW,CAAC,EAClDlB,aAAa,CAACpB,IAAI,EAAEuC,QAAQ,CAAC9B,KAAK,CAChC,CAAC,CAAA;GACV,CACE,CACG,CAEG,CAAC,CAAA;AAEd;;;;"}
1
+ {"version":3,"file":"field-mapper-mobile.js","sources":["../../../../src/components/modules/list/field-mapper-mobile.jsx"],"sourcesContent":["import React from 'react';\nimport Grid from '~/components/modules/grid';\nimport Icon from '~/components/modules/icon';\nimport PillWrapper from '~/components/modules/buttons/pill-wrapper';\nimport { getFieldValue } from '~/util/filterUtil';\nimport { twMerge } from 'tailwind-merge';\n\nconst FieldMapperMobile = ({\n\titem,\n\tfieldsShown,\n\tspecialFeatures,\n\tspecialFeaturePills,\n\thandleFavouriteClick,\n\tisFavorite,\n\tincludeFavorite = true\n}) => {\n\tconst specialFeaturePillsRender = field => {\n\t\tif (field !== 'title' || !specialFeatures || !specialFeaturePills) return null;\n\n\t\treturn Object.entries(specialFeatures).map(([featureKey, featureLabel]) => {\n\t\t\t// Only show pill if it's configured in specialFeaturePills\n\t\t\tif (!specialFeaturePills[featureKey]) return null;\n\n\t\t\tconst value = getFieldValue(item, featureKey);\n\t\t\tconst customClassName = specialFeaturePills[featureKey]?.className || '';\n\n\t\t\t// Handle boolean fields (value == 1 or \"true\")\n\t\t\tif (value == 1 || value === 1 || value === '1' || value === 'true' || value === 'True' || value === true) {\n\t\t\t\treturn <PillWrapper key={featureKey} className={customClassName}>{featureLabel}</PillWrapper>;\n\t\t\t}\n\t\t\t// Handle multi-value custom fields - show the value if it's not empty/false\n\t\t\tif (value && value !== '' && value !== 'false' && value !== 'False' && value !== '0' && value !== 0) {\n\t\t\t\treturn <PillWrapper key={featureKey} className={customClassName}>{featureLabel}: {value}</PillWrapper>;\n\t\t\t}\n\t\t\treturn null;\n\t\t});\n\t};\n\n\treturn (\n\t\t<Grid.Item className=\"md:hc-hidden\">\n\t\t\t{fieldsShown.includes(\"title\") &&\n <>\n \t<div className=\"hc-flex hc-items-start\">\n \t\t<div className=\"hc-flex hc-justify-between hc-items-center hc-min-w-[100%]\">\n \t\t\t<h3 className=\"hc-font-bold hc-mb-3 hc-flex-1\">{getFieldValue(item, \"title\")}</h3>\n \t\t\t{includeFavorite && <div className=\"hc-flex hc-justify-end hc-pb-2\">\n \t\t\t\t<Icon\n \t\t\t\t\ticon={isFavorite ? \"mdi:heart\" : \"mdi:heart-outline\"}\n \t\t\t\t\tsize=\"hc-size-3.5\"\n \t\t\t\t\ticonClasses={isFavorite ? \"hc-text-primary\" : \"\"}\n \t\t\t\t\tclassName={`hc-transition-opacity hc-duration-300 hc-cursor-pointer\n ${isFavorite ? \"hc-opacity-100\" : \"hc-text-uiText/60 group-hover:hc-opacity-100\"}\n `}\n \t\t\t\t\tonClick={e => handleFavouriteClick(e, item)}\n \t\t\t\t/>\n \t\t\t</div>\n \t\t\t}\n \t\t</div>\n \t</div>\n \t{specialFeatures && <div className='hc-pb-4'>{specialFeaturePillsRender(\"title\")} </div>}\n\n \t<ul className=\"hc-space-y-2 hc-text-xs\">\n \t\t{[\n \t\t\t{\n \t\t\t\tfield: \"category\",\n \t\t\t\tname: \"category\",\n \t\t\t\ticon: \"icon-park-solid:tree-list\"\n \t\t\t},\n \t\t\t{\n \t\t\t\tfield: \"subCategory\",\n \t\t\t\tname: \"subCategory\",\n \t\t\t\ticon: \"icon-park-solid:tree-list\"\n \t\t\t},\n \t\t\t{\n \t\t\t\tfield: \"schedule\",\n \t\t\t\tname: \"Schedule\",\n \t\t\t\ticon: \"gravity-ui:clock-fill\"\n \t\t\t},\n \t\t\t{\n \t\t\t\tfield: \"city\",\n \t\t\t\tname: \"Location\",\n \t\t\t\ticon: \"fluent:location-16-filled\"\n \t\t\t},\n \t\t\t{\n \t\t\t\tfield: \"state\",\n \t\t\t\tname: \"Location\",\n \t\t\t\ticon: \"fluent:location-16-filled\"\n \t\t\t},\n \t\t\t{\n \t\t\t\tfield: \"cityState\",\n \t\t\t\tname: \"Location\",\n \t\t\t\ticon: \"fluent:location-16-filled\"\n \t\t\t},\n \t\t\t{\n \t\t\t\tfield: \"travelTime\",\n \t\t\t\tname: \"Commute\",\n \t\t\t\ticon: \"ri:pin-distance-fill\"\n \t\t\t}\n \t\t].map(listItem => (\n \t\t\t(fieldsShown.includes(listItem.field) && getFieldValue(item, listItem.field)) &&\n <li\n \tkey={listItem.field}\n \tclassName=\"hc-flex hc-gap-2\"\n >\n \t<Icon\n \t\ticon={listItem.icon}\n \t\tsize=\"hc-size-3.5\"\n \t\tclassName=\"hc-text-uiAccent/30\"\n \t/>\n \t<span className=\"hc-sr-only\">{listItem.name}</span>\n \t{getFieldValue(item, listItem.field)}\n </li>\n \t\t))}\n \t</ul>\n </>\n\t\t\t}\n\t\t</Grid.Item>\n\t);\n};\n\nexport default FieldMapperMobile;\n"],"names":["FieldMapperMobile","_ref","item","fieldsShown","specialFeatures","specialFeaturePills","handleFavouriteClick","isFavorite","_ref$includeFavorite","includeFavorite","specialFeaturePillsRender","field","Object","entries","map","_ref2","_specialFeaturePills$","_ref3","_slicedToArray","featureKey","featureLabel","value","getFieldValue","customClassName","className","React","createElement","PillWrapper","key","Grid","Item","includes","Fragment","Icon","icon","size","iconClasses","concat","onClick","e","name","listItem"],"mappings":";;;;;;;;AAOA,IAAMA,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAAC,IAAA,EAQjB;AAAA,EAAA,IAPLC,IAAI,GAAAD,IAAA,CAAJC,IAAI;IACJC,WAAW,GAAAF,IAAA,CAAXE,WAAW;IACXC,eAAe,GAAAH,IAAA,CAAfG,eAAe;IACfC,mBAAmB,GAAAJ,IAAA,CAAnBI,mBAAmB;IACnBC,oBAAoB,GAAAL,IAAA,CAApBK,oBAAoB;IACpBC,UAAU,GAAAN,IAAA,CAAVM,UAAU;IAAAC,oBAAA,GAAAP,IAAA,CACVQ,eAAe;AAAfA,IAAAA,eAAe,GAAAD,oBAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,oBAAA,CAAA;AAEtB,EAAA,IAAME,yBAAyB,GAAG,SAA5BA,yBAAyBA,CAAGC,KAAK,EAAI;IAC1C,IAAyB,CAACP,eAAe,IAAI,CAACC,mBAAmB,EAAE,OAAO,IAAI,CAAA;IAE9E,OAAOO,MAAM,CAACC,OAAO,CAACT,eAAe,CAAC,CAACU,GAAG,CAAC,UAAAC,KAAA,EAAgC;AAAA,MAAA,IAAAC,qBAAA,CAAA;AAAA,MAAA,IAAAC,KAAA,GAAAC,cAAA,CAAAH,KAAA,EAAA,CAAA,CAAA;AAA9BI,QAAAA,UAAU,GAAAF,KAAA,CAAA,CAAA,CAAA;AAAEG,QAAAA,YAAY,GAAAH,KAAA,CAAA,CAAA,CAAA,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IAAI,EAAC,aAAa;AAClBX,MAAAA,SAAS,EAAC,qBAAA;AAAqB,KAC/B,CAAC,eACFC,KAAA,CAAAC,aAAA,CAAA,MAAA,EAAA;AAAMF,MAAAA,SAAS,EAAC,YAAA;AAAY,KAAA,EAAEiB,QAAQ,CAACD,IAAW,CAAC,EAClDlB,aAAa,CAACpB,IAAI,EAAEuC,QAAQ,CAAC9B,KAAK,CAChC,CAAC,CAAA;GACJ,CACE,CACH,CAEG,CAAC,CAAA;AAEd;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abcagency/hc-ui-components",
3
- "version": "1.9.16",
3
+ "version": "1.9.17",
4
4
  "description": "UI Components for HireControl",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -16,14 +16,14 @@ const FieldMapperMobile = ({
16
16
  }) => {
17
17
  const specialFeaturePillsRender = field => {
18
18
  if (field !== 'title' || !specialFeatures || !specialFeaturePills) return null;
19
-
19
+
20
20
  return Object.entries(specialFeatures).map(([featureKey, featureLabel]) => {
21
21
  // Only show pill if it's configured in specialFeaturePills
22
22
  if (!specialFeaturePills[featureKey]) return null;
23
-
23
+
24
24
  const value = getFieldValue(item, featureKey);
25
25
  const customClassName = specialFeaturePills[featureKey]?.className || '';
26
-
26
+
27
27
  // Handle boolean fields (value == 1 or "true")
28
28
  if (value == 1 || value === 1 || value === '1' || value === 'true' || value === 'True' || value === true) {
29
29
  return <PillWrapper key={featureKey} className={customClassName}>{featureLabel}</PillWrapper>;
@@ -57,47 +57,47 @@ const FieldMapperMobile = ({
57
57
  }
58
58
  </div>
59
59
  </div>
60
- {specialFeatures && <div className='hc-pb-4'>{specialFeaturePillsRender("title")} </div>}
60
+ {specialFeatures && <div className='hc-pb-4'>{specialFeaturePillsRender("title")} </div>}
61
61
 
62
- <ul className="hc-space-y-2 hc-text-xs">
63
- {[
64
- {
65
- field: "category",
66
- name: "category",
67
- icon: "icon-park-solid:tree-list"
68
- },
69
- {
70
- field: "subCategory",
71
- name: "subCategory",
72
- icon: "icon-park-solid:tree-list"
73
- },
74
- {
75
- field: "schedule",
76
- name: "Schedule",
77
- icon: "gravity-ui:clock-fill"
78
- },
79
- {
80
- field: "city",
81
- name: "Location",
82
- icon: "fluent:location-16-filled"
83
- },
84
- {
85
- field: "state",
86
- name: "Location",
87
- icon: "fluent:location-16-filled"
88
- },
89
- {
90
- field: "cityState",
91
- name: "Location",
92
- icon: "fluent:location-16-filled"
93
- },
94
- {
95
- field: "travelTime",
96
- name: "Commute",
97
- icon: "ri:pin-distance-fill"
98
- }
99
- ].map(listItem => (
100
- (fieldsShown.includes(listItem.field) && getFieldValue(item, listItem.field)) &&
62
+ <ul className="hc-space-y-2 hc-text-xs">
63
+ {[
64
+ {
65
+ field: "category",
66
+ name: "category",
67
+ icon: "icon-park-solid:tree-list"
68
+ },
69
+ {
70
+ field: "subCategory",
71
+ name: "subCategory",
72
+ icon: "icon-park-solid:tree-list"
73
+ },
74
+ {
75
+ field: "schedule",
76
+ name: "Schedule",
77
+ icon: "gravity-ui:clock-fill"
78
+ },
79
+ {
80
+ field: "city",
81
+ name: "Location",
82
+ icon: "fluent:location-16-filled"
83
+ },
84
+ {
85
+ field: "state",
86
+ name: "Location",
87
+ icon: "fluent:location-16-filled"
88
+ },
89
+ {
90
+ field: "cityState",
91
+ name: "Location",
92
+ icon: "fluent:location-16-filled"
93
+ },
94
+ {
95
+ field: "travelTime",
96
+ name: "Commute",
97
+ icon: "ri:pin-distance-fill"
98
+ }
99
+ ].map(listItem => (
100
+ (fieldsShown.includes(listItem.field) && getFieldValue(item, listItem.field)) &&
101
101
  <li
102
102
  key={listItem.field}
103
103
  className="hc-flex hc-gap-2"
@@ -110,12 +110,12 @@ const FieldMapperMobile = ({
110
110
  <span className="hc-sr-only">{listItem.name}</span>
111
111
  {getFieldValue(item, listItem.field)}
112
112
  </li>
113
- ))}
114
- </ul>
113
+ ))}
114
+ </ul>
115
115
  </>
116
116
  }
117
117
  </Grid.Item>
118
118
  );
119
119
  };
120
120
 
121
- export default FieldMapperMobile;
121
+ export default FieldMapperMobile;