@civicactions/cmsds-open-data-components 3.1.10-alpha.3 → 3.1.10-alpha.4

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.
package/dist/main.js CHANGED
@@ -1641,6 +1641,7 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
1641
1641
  style: {
1642
1642
  maxWidth: header.getSize() - 16
1643
1643
  },
1644
+ title: header.column.columnDef.header,
1644
1645
  children: header.isPlaceholder ? null : (0, $hgUW1$flexRender)(header.column.columnDef.header, header.getContext())
1645
1646
  }),
1646
1647
  sortElement && /*#__PURE__*/ (0, $hgUW1$jsx)("button", {
@@ -3011,8 +3012,73 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
3011
3012
  columnFilters: columnFilters
3012
3013
  }
3013
3014
  });
3015
+ const sortOptions = [
3016
+ {
3017
+ value: "default",
3018
+ label: "No Sort"
3019
+ },
3020
+ {
3021
+ value: "titleasc",
3022
+ label: "Title A-Z"
3023
+ },
3024
+ {
3025
+ value: "titledesc",
3026
+ label: "Title Z-A"
3027
+ },
3028
+ {
3029
+ value: "typeasc",
3030
+ label: "Type A-Z"
3031
+ },
3032
+ {
3033
+ value: "typedesc",
3034
+ label: "Type Z-A"
3035
+ }
3036
+ ];
3037
+ const sortStatesLookup = {
3038
+ default: [],
3039
+ titleasc: [
3040
+ {
3041
+ id: "titleResizable",
3042
+ desc: false
3043
+ }
3044
+ ],
3045
+ titledesc: [
3046
+ {
3047
+ id: "titleResizable",
3048
+ desc: true
3049
+ }
3050
+ ],
3051
+ typeasc: [
3052
+ {
3053
+ id: "type",
3054
+ desc: false
3055
+ }
3056
+ ],
3057
+ typedesc: [
3058
+ {
3059
+ id: "type",
3060
+ desc: true
3061
+ }
3062
+ ]
3063
+ };
3014
3064
  return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
3015
3065
  children: [
3066
+ mobile && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
3067
+ className: "ds-u-margin-bottom--3",
3068
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dropdown), {
3069
+ className: "ds-l-col--12 ds-l-sm-col--6",
3070
+ labelClassName: "ds-u-margin-top--1 ds-u-sm-margin-top--0",
3071
+ options: sortOptions,
3072
+ label: "Sort",
3073
+ value: Object.keys(sortStatesLookup).find((key)=>{
3074
+ return JSON.stringify(sortStatesLookup[key]) == JSON.stringify(sorting);
3075
+ }),
3076
+ name: "dc-data-dictionary-type",
3077
+ onChange: (e)=>{
3078
+ setSorting(sortStatesLookup[e.target.value]);
3079
+ }
3080
+ })
3081
+ }),
3016
3082
  /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
3017
3083
  className: "dc-c-datadictionary-table",
3018
3084
  children: [