@aglyn/plugins-data 1.23.0 → 1.24.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aglyn/plugins-data",
3
- "version": "1.23.0",
3
+ "version": "1.24.0",
4
4
  "license": "Apache-2.0",
5
5
  "homepage": "https://aglyn.com",
6
6
  "repository": {
@@ -25,16 +25,17 @@
25
25
  "./package.json": "./package.json"
26
26
  },
27
27
  "dependencies": {
28
- "@aglyn/aglyn": "1.23.0",
29
- "@aglyn/shared-data-mdi": "1.23.0",
30
- "@aglyn/shared-ui-jsx": "1.23.0",
31
- "@aglyn/shared-ui-next": "1.23.0",
32
- "@aglyn/shared-ui-snackstack": "1.23.0",
33
- "@aglyn/shared-util-http": "1.23.0",
34
- "@aglyn/shared-util-timestamp": "1.23.0",
35
- "@aglyn/tenant-data-admin": "1.23.0",
36
- "@aglyn/tenant-feature-instance": "1.23.0",
37
- "@aglyn/tenant-runtime": "1.23.0",
28
+ "@aglyn/aglyn": "1.24.0",
29
+ "@aglyn/shared-data-mdi": "1.24.0",
30
+ "@aglyn/shared-ui-jsx": "1.24.0",
31
+ "@aglyn/shared-ui-jsx-forms": "1.24.0",
32
+ "@aglyn/shared-ui-next": "1.24.0",
33
+ "@aglyn/shared-ui-snackstack": "1.24.0",
34
+ "@aglyn/shared-util-http": "1.24.0",
35
+ "@aglyn/shared-util-timestamp": "1.24.0",
36
+ "@aglyn/tenant-data-admin": "1.24.0",
37
+ "@aglyn/tenant-feature-instance": "1.24.0",
38
+ "@aglyn/tenant-runtime": "1.24.0",
38
39
  "@swc/helpers": "0.5.24"
39
40
  },
40
41
  "peerDependencies": {
@@ -0,0 +1,30 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import type { CustomFieldInputProps } from '@aglyn/aglyn/plugin-manager/custom-fields';
18
+ /** A record's icon as the records table and the editor draw it: the icon, then its name. */
19
+ export declare function DatasetIconPreview({ value }: {
20
+ value: unknown;
21
+ }): import("react").JSX.Element;
22
+ /**
23
+ * A record's icon (AGL-4190): chosen from the same icon library the Besigner's
24
+ * Icon element offers, never typed. The pick is stored with its SVG path, so
25
+ * the published page that shows it never needs the library.
26
+ *
27
+ * The value travels in the record editor's input form, a JSON string, which
28
+ * the editor's coercion turns back into the stored map.
29
+ */
30
+ export declare function DatasetIconFieldInput(props: CustomFieldInputProps): import("react").JSX.Element;
@@ -0,0 +1,142 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */ 'use client';
17
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
18
+ import { mdiShapePlus } from "@aglyn/shared-data-mdi";
19
+ import { MdiIcon } from "@aglyn/shared-ui-jsx";
20
+ import { Box, Button, CircularProgress, Stack, Typography } from "@mui/material";
21
+ import { lazy, Suspense, useState } from "react";
22
+ import { datasetIconLabel, readDatasetIconValue } from "../model/dataset-icon-field.js";
23
+ /**
24
+ * The library picker, loaded when the person opens it: the icon catalog
25
+ * behind it is large, and most record edits never touch an icon.
26
+ */ const DatasetIconPicker = /*#__PURE__*/ lazy(()=>import("./dataset-icon-picker.component.js"));
27
+ /** A record's icon as the records table and the editor draw it: the icon, then its name. */ export function DatasetIconPreview({ value }) {
28
+ const icon = readDatasetIconValue(value);
29
+ if (!icon) return null;
30
+ return /*#__PURE__*/ _jsxs(Stack, {
31
+ direction: "row",
32
+ spacing: 1,
33
+ sx: {
34
+ alignItems: 'center',
35
+ minWidth: 0,
36
+ height: '100%'
37
+ },
38
+ children: [
39
+ icon.iconPath ? /*#__PURE__*/ _jsx(MdiIcon, {
40
+ path: icon.iconPath,
41
+ size: 0.9
42
+ }) : null,
43
+ /*#__PURE__*/ _jsx(Typography, {
44
+ variant: "body2",
45
+ noWrap: true,
46
+ children: datasetIconLabel(icon.iconId)
47
+ })
48
+ ]
49
+ });
50
+ }
51
+ /**
52
+ * A record's icon (AGL-4190): chosen from the same icon library the Besigner's
53
+ * Icon element offers, never typed. The pick is stored with its SVG path, so
54
+ * the published page that shows it never needs the library.
55
+ *
56
+ * The value travels in the record editor's input form, a JSON string, which
57
+ * the editor's coercion turns back into the stored map.
58
+ */ export function DatasetIconFieldInput(props) {
59
+ var _ref;
60
+ const { value, onChange, disabled, label } = props;
61
+ const icon = readDatasetIconValue(value);
62
+ const [open, setOpen] = useState(false);
63
+ return /*#__PURE__*/ _jsxs(Stack, {
64
+ spacing: 1,
65
+ children: [
66
+ label ? /*#__PURE__*/ _jsx(Typography, {
67
+ variant: "body2",
68
+ color: "text.secondary",
69
+ children: label
70
+ }) : null,
71
+ /*#__PURE__*/ _jsxs(Stack, {
72
+ direction: "row",
73
+ spacing: 1.5,
74
+ useFlexGap: true,
75
+ sx: {
76
+ alignItems: 'center',
77
+ flexWrap: 'wrap'
78
+ },
79
+ children: [
80
+ /*#__PURE__*/ _jsx(Stack, {
81
+ sx: {
82
+ width: 48,
83
+ height: 48,
84
+ alignItems: 'center',
85
+ justifyContent: 'center',
86
+ borderRadius: 1,
87
+ border: 1,
88
+ borderStyle: icon ? 'solid' : 'dashed',
89
+ borderColor: 'divider',
90
+ color: icon ? 'text.primary' : 'text.secondary'
91
+ },
92
+ children: /*#__PURE__*/ _jsx(MdiIcon, {
93
+ path: (icon == null ? void 0 : icon.iconPath) || mdiShapePlus.path,
94
+ size: 1
95
+ })
96
+ }),
97
+ icon ? /*#__PURE__*/ _jsx(Typography, {
98
+ variant: "body2",
99
+ children: datasetIconLabel(icon.iconId)
100
+ }) : null,
101
+ /*#__PURE__*/ _jsx(Button, {
102
+ size: "small",
103
+ variant: "outlined",
104
+ disabled: disabled,
105
+ onClick: ()=>setOpen((was)=>!was),
106
+ children: open ? 'Close library' : icon ? 'Change icon' : 'Choose icon'
107
+ }),
108
+ icon ? /*#__PURE__*/ _jsx(Button, {
109
+ size: "small",
110
+ color: "error",
111
+ disabled: disabled,
112
+ onClick: ()=>onChange(''),
113
+ children: 'Remove'
114
+ }) : null
115
+ ]
116
+ }),
117
+ open ? /*#__PURE__*/ _jsx(Suspense, {
118
+ fallback: /*#__PURE__*/ _jsx(Box, {
119
+ sx: {
120
+ py: 2,
121
+ display: 'flex',
122
+ justifyContent: 'center'
123
+ },
124
+ children: /*#__PURE__*/ _jsx(CircularProgress, {
125
+ size: 24,
126
+ "aria-label": "Loading the icon library"
127
+ })
128
+ }),
129
+ children: /*#__PURE__*/ _jsx(DatasetIconPicker, {
130
+ iconId: (_ref = icon == null ? void 0 : icon.iconId) != null ? _ref : '',
131
+ disabled: disabled,
132
+ onPick: (picked)=>{
133
+ onChange(picked ? JSON.stringify(picked) : '');
134
+ setOpen(false);
135
+ }
136
+ })
137
+ }) : null
138
+ ]
139
+ });
140
+ }
141
+
142
+ //# sourceMappingURL=dataset-icon-field-input.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../libs/plugins/data/src/lib/components/dataset-icon-field-input.component.tsx"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n'use client'\n\nimport type { CustomFieldInputProps } from '@aglyn/aglyn/plugin-manager/custom-fields'\nimport { mdiShapePlus } from '@aglyn/shared-data-mdi'\nimport { MdiIcon } from '@aglyn/shared-ui-jsx'\nimport { Box, Button, CircularProgress, Stack, Typography } from '@mui/material'\nimport { lazy, Suspense, useState } from 'react'\nimport { datasetIconLabel, readDatasetIconValue } from '../model/dataset-icon-field'\n\n/**\n * The library picker, loaded when the person opens it: the icon catalog\n * behind it is large, and most record edits never touch an icon.\n */\nconst DatasetIconPicker = lazy(() => import('./dataset-icon-picker.component'))\n\n/** A record's icon as the records table and the editor draw it: the icon, then its name. */\nexport function DatasetIconPreview({ value }: { value: unknown }) {\n const icon = readDatasetIconValue(value)\n if (!icon) return null\n return (\n <Stack direction=\"row\" spacing={1} sx={{ alignItems: 'center', minWidth: 0, height: '100%' }}>\n {icon.iconPath ? <MdiIcon path={icon.iconPath} size={0.9} /> : null}\n <Typography variant=\"body2\" noWrap>\n {datasetIconLabel(icon.iconId)}\n </Typography>\n </Stack>\n )\n}\n\n/**\n * A record's icon (AGL-4190): chosen from the same icon library the Besigner's\n * Icon element offers, never typed. The pick is stored with its SVG path, so\n * the published page that shows it never needs the library.\n *\n * The value travels in the record editor's input form, a JSON string, which\n * the editor's coercion turns back into the stored map.\n */\nexport function DatasetIconFieldInput(props: CustomFieldInputProps) {\n const { value, onChange, disabled, label } = props\n const icon = readDatasetIconValue(value)\n const [open, setOpen] = useState(false)\n\n return (\n <Stack spacing={1}>\n {label ? (\n <Typography variant=\"body2\" color=\"text.secondary\">\n {label}\n </Typography>\n ) : null}\n <Stack direction=\"row\" spacing={1.5} useFlexGap sx={{ alignItems: 'center', flexWrap: 'wrap' }}>\n <Stack\n sx={{\n width: 48,\n height: 48,\n alignItems: 'center',\n justifyContent: 'center',\n borderRadius: 1,\n border: 1,\n borderStyle: icon ? 'solid' : 'dashed',\n borderColor: 'divider',\n color: icon ? 'text.primary' : 'text.secondary',\n }}\n >\n <MdiIcon path={icon?.iconPath || mdiShapePlus.path} size={1} />\n </Stack>\n {icon ? (\n <Typography variant=\"body2\">{datasetIconLabel(icon.iconId)}</Typography>\n ) : null}\n <Button size=\"small\" variant=\"outlined\" disabled={disabled} onClick={() => setOpen((was) => !was)}>\n {open ? 'Close library' : icon ? 'Change icon' : 'Choose icon'}\n </Button>\n {icon ? (\n <Button size=\"small\" color=\"error\" disabled={disabled} onClick={() => onChange('')}>\n {'Remove'}\n </Button>\n ) : null}\n </Stack>\n {open ? (\n <Suspense\n fallback={\n <Box sx={{ py: 2, display: 'flex', justifyContent: 'center' }}>\n <CircularProgress size={24} aria-label=\"Loading the icon library\" />\n </Box>\n }\n >\n <DatasetIconPicker\n iconId={icon?.iconId ?? ''}\n disabled={disabled}\n onPick={(picked) => {\n onChange(picked ? JSON.stringify(picked) : '')\n setOpen(false)\n }}\n />\n </Suspense>\n ) : null}\n </Stack>\n )\n}\n"],"names":["mdiShapePlus","MdiIcon","Box","Button","CircularProgress","Stack","Typography","lazy","Suspense","useState","datasetIconLabel","readDatasetIconValue","DatasetIconPicker","DatasetIconPreview","value","icon","direction","spacing","sx","alignItems","minWidth","height","iconPath","path","size","variant","noWrap","iconId","DatasetIconFieldInput","props","onChange","disabled","label","open","setOpen","color","useFlexGap","flexWrap","width","justifyContent","borderRadius","border","borderStyle","borderColor","onClick","was","fallback","py","display","aria-label","onPick","picked","JSON","stringify"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED;;AAGA,SAASA,YAAY,QAAQ,yBAAwB;AACrD,SAASC,OAAO,QAAQ,uBAAsB;AAC9C,SAASC,GAAG,EAAEC,MAAM,EAAEC,gBAAgB,EAAEC,KAAK,EAAEC,UAAU,QAAQ,gBAAe;AAChF,SAASC,IAAI,EAAEC,QAAQ,EAAEC,QAAQ,QAAQ,QAAO;AAChD,SAASC,gBAAgB,EAAEC,oBAAoB,QAAQ,iCAA6B;AAEpF;;;CAGC,GACD,MAAMC,kCAAoBL,KAAK,IAAM,MAAM,CAAC;AAE5C,0FAA0F,GAC1F,OAAO,SAASM,mBAAmB,EAAEC,KAAK,EAAsB;IAC9D,MAAMC,OAAOJ,qBAAqBG;IAClC,IAAI,CAACC,MAAM,OAAO;IAClB,qBACE,MAACV;QAAMW,WAAU;QAAMC,SAAS;QAAGC,IAAI;YAAEC,YAAY;YAAUC,UAAU;YAAGC,QAAQ;QAAO;;YACxFN,KAAKO,QAAQ,iBAAG,KAACrB;gBAAQsB,MAAMR,KAAKO,QAAQ;gBAAEE,MAAM;iBAAU;0BAC/D,KAAClB;gBAAWmB,SAAQ;gBAAQC,MAAM;0BAC/BhB,iBAAiBK,KAAKY,MAAM;;;;AAIrC;AAEA;;;;;;;CAOC,GACD,OAAO,SAASC,sBAAsBC,KAA4B;;IAChE,MAAM,EAAEf,KAAK,EAAEgB,QAAQ,EAAEC,QAAQ,EAAEC,KAAK,EAAE,GAAGH;IAC7C,MAAMd,OAAOJ,qBAAqBG;IAClC,MAAM,CAACmB,MAAMC,QAAQ,GAAGzB,SAAS;IAEjC,qBACE,MAACJ;QAAMY,SAAS;;YACbe,sBACC,KAAC1B;gBAAWmB,SAAQ;gBAAQU,OAAM;0BAC/BH;iBAED;0BACJ,MAAC3B;gBAAMW,WAAU;gBAAMC,SAAS;gBAAKmB,UAAU;gBAAClB,IAAI;oBAAEC,YAAY;oBAAUkB,UAAU;gBAAO;;kCAC3F,KAAChC;wBACCa,IAAI;4BACFoB,OAAO;4BACPjB,QAAQ;4BACRF,YAAY;4BACZoB,gBAAgB;4BAChBC,cAAc;4BACdC,QAAQ;4BACRC,aAAa3B,OAAO,UAAU;4BAC9B4B,aAAa;4BACbR,OAAOpB,OAAO,iBAAiB;wBACjC;kCAEA,cAAA,KAACd;4BAAQsB,MAAMR,CAAAA,wBAAAA,KAAMO,QAAQ,KAAItB,aAAauB,IAAI;4BAAEC,MAAM;;;oBAE3DT,qBACC,KAACT;wBAAWmB,SAAQ;kCAASf,iBAAiBK,KAAKY,MAAM;yBACvD;kCACJ,KAACxB;wBAAOqB,MAAK;wBAAQC,SAAQ;wBAAWM,UAAUA;wBAAUa,SAAS,IAAMV,QAAQ,CAACW,MAAQ,CAACA;kCAC1FZ,OAAO,kBAAkBlB,OAAO,gBAAgB;;oBAElDA,qBACC,KAACZ;wBAAOqB,MAAK;wBAAQW,OAAM;wBAAQJ,UAAUA;wBAAUa,SAAS,IAAMd,SAAS;kCAC5E;yBAED;;;YAELG,qBACC,KAACzB;gBACCsC,wBACE,KAAC5C;oBAAIgB,IAAI;wBAAE6B,IAAI;wBAAGC,SAAS;wBAAQT,gBAAgB;oBAAS;8BAC1D,cAAA,KAACnC;wBAAiBoB,MAAM;wBAAIyB,cAAW;;;0BAI3C,cAAA,KAACrC;oBACCe,MAAM,UAAEZ,wBAAAA,KAAMY,MAAM,mBAAI;oBACxBI,UAAUA;oBACVmB,QAAQ,CAACC;wBACPrB,SAASqB,SAASC,KAAKC,SAAS,CAACF,UAAU;wBAC3CjB,QAAQ;oBACV;;iBAGF;;;AAGV"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import type { DatasetIconValue } from '../model/dataset-icon-field';
18
+ export interface DatasetIconPickerProps {
19
+ iconId: string;
20
+ disabled?: boolean;
21
+ /** The pick with its path, or `undefined` when the picker was cleared. */
22
+ onPick: (icon: DatasetIconValue | undefined) => void;
23
+ }
24
+ /**
25
+ * The icon library, as the Besigner's Icon element offers it (AGL-4190).
26
+ *
27
+ * Its own chunk, loaded by the record editor's Icon field only when opened.
28
+ * The path is looked up here, at the moment of the pick, for the reason the
29
+ * Besigner stores `iconPath` beside an Icon's `iconId` (AGL-1212): this is
30
+ * the one moment the catalog is certainly loaded, since the picker needed it
31
+ * to offer the icon.
32
+ */
33
+ export default function DatasetIconPicker({ iconId, disabled, onPick }: DatasetIconPickerProps): import("react").JSX.Element;
@@ -0,0 +1,49 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */ 'use client';
17
+ import { jsx as _jsx } from "react/jsx-runtime";
18
+ import { getMdiIconPath } from "@aglyn/shared-data-mdi";
19
+ import { IconSelectControl } from "@aglyn/shared-ui-jsx-forms/components/icon-select.component";
20
+ /**
21
+ * The icon library, as the Besigner's Icon element offers it (AGL-4190).
22
+ *
23
+ * Its own chunk, loaded by the record editor's Icon field only when opened.
24
+ * The path is looked up here, at the moment of the pick, for the reason the
25
+ * Besigner stores `iconPath` beside an Icon's `iconId` (AGL-1212): this is
26
+ * the one moment the catalog is certainly loaded, since the picker needed it
27
+ * to offer the icon.
28
+ */ export default function DatasetIconPicker({ iconId, disabled, onPick }) {
29
+ return /*#__PURE__*/ _jsx(IconSelectControl, {
30
+ value: iconId,
31
+ "aria-disabled": disabled || undefined,
32
+ onChange: (picked)=>{
33
+ if (disabled) return;
34
+ if (!picked) {
35
+ onPick(undefined);
36
+ return;
37
+ }
38
+ const iconPath = getMdiIconPath(picked);
39
+ onPick(iconPath ? {
40
+ iconId: picked,
41
+ iconPath
42
+ } : {
43
+ iconId: picked
44
+ });
45
+ }
46
+ });
47
+ }
48
+
49
+ //# sourceMappingURL=dataset-icon-picker.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../libs/plugins/data/src/lib/components/dataset-icon-picker.component.tsx"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n'use client'\n\nimport { getMdiIconPath } from '@aglyn/shared-data-mdi'\nimport { IconSelectControl } from '@aglyn/shared-ui-jsx-forms/components/icon-select.component'\nimport type { DatasetIconValue } from '../model/dataset-icon-field'\n\nexport interface DatasetIconPickerProps {\n iconId: string\n disabled?: boolean\n /** The pick with its path, or `undefined` when the picker was cleared. */\n onPick: (icon: DatasetIconValue | undefined) => void\n}\n\n/**\n * The icon library, as the Besigner's Icon element offers it (AGL-4190).\n *\n * Its own chunk, loaded by the record editor's Icon field only when opened.\n * The path is looked up here, at the moment of the pick, for the reason the\n * Besigner stores `iconPath` beside an Icon's `iconId` (AGL-1212): this is\n * the one moment the catalog is certainly loaded, since the picker needed it\n * to offer the icon.\n */\nexport default function DatasetIconPicker({ iconId, disabled, onPick }: DatasetIconPickerProps) {\n return (\n <IconSelectControl\n value={iconId}\n aria-disabled={disabled || undefined}\n onChange={(picked: string) => {\n if (disabled) return\n if (!picked) {\n onPick(undefined)\n return\n }\n const iconPath = getMdiIconPath(picked)\n onPick(iconPath ? { iconId: picked, iconPath } : { iconId: picked })\n }}\n />\n )\n}\n"],"names":["getMdiIconPath","IconSelectControl","DatasetIconPicker","iconId","disabled","onPick","value","aria-disabled","undefined","onChange","picked","iconPath"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED;;AAEA,SAASA,cAAc,QAAQ,yBAAwB;AACvD,SAASC,iBAAiB,QAAQ,8DAA6D;AAU/F;;;;;;;;CAQC,GACD,eAAe,SAASC,kBAAkB,EAAEC,MAAM,EAAEC,QAAQ,EAAEC,MAAM,EAA0B;IAC5F,qBACE,KAACJ;QACCK,OAAOH;QACPI,iBAAeH,YAAYI;QAC3BC,UAAU,CAACC;YACT,IAAIN,UAAU;YACd,IAAI,CAACM,QAAQ;gBACXL,OAAOG;gBACP;YACF;YACA,MAAMG,WAAWX,eAAeU;YAChCL,OAAOM,WAAW;gBAAER,QAAQO;gBAAQC;YAAS,IAAI;gBAAER,QAAQO;YAAO;QACpE;;AAGN"}
@@ -42,6 +42,8 @@ import { authorizedFetch } from "@aglyn/shared-util-http/authorized-token";
42
42
  import { DatasetSchemaDialog } from "./dataset-schema-dialog.component.js";
43
43
  import { DatasetRecordDialog, DatasetRecordFieldList } from "./dataset-record-dialog.component.js";
44
44
  import { DatasetRecordSiteContext } from "./dataset-field-inputs.component.js";
45
+ import { DatasetIconPreview } from "./dataset-icon-field-input.component.js";
46
+ import { DATASET_ICON_FIELD_TYPE, readDatasetIconValue } from "../model/dataset-icon-field.js";
45
47
  import { datasetRecordFilter, planRecordQuery, recordColumn } from "./dataset-record-filter.js";
46
48
  import { coerceDocumentValues, datasetIntegrityUpdate, datasetValueToInput, effectiveDatasetModel, formatDatasetValue, modelFromFieldEntries, validateDocument } from "../model/dataset-models.js";
47
49
  import { fillRecordAddresses } from "../record-pages/record-pages.js";
@@ -1272,9 +1274,12 @@ export function newDatasetSharingNote(siteOnly) {
1272
1274
  ...fields.map((fieldId, column)=>{
1273
1275
  var _ref;
1274
1276
  const field = model.fields[fieldId];
1277
+ const isIcon = (field == null ? void 0 : field.customType) === DATASET_ICON_FIELD_TYPE;
1275
1278
  const shown = (row)=>{
1276
- var _row_values, _row_values1;
1277
- return (field == null ? void 0 : field.type) === 'reference' ? referenceLabel(fieldId, (_row_values = row.values) == null ? void 0 : _row_values[fieldId]) || '--' : field ? formatDatasetValue(field, (_row_values1 = row.values) == null ? void 0 : _row_values1[fieldId]) || '--' : '--';
1279
+ var _row_values, _row_values1, _row_values2, _row_values3;
1280
+ return (field == null ? void 0 : field.type) === 'reference' ? referenceLabel(fieldId, (_row_values = row.values) == null ? void 0 : _row_values[fieldId]) || '--' : isIcon ? readDatasetIconValue((_row_values1 = row.values) == null ? void 0 : _row_values1[fieldId]) ? /*#__PURE__*/ _jsx(DatasetIconPreview, {
1281
+ value: (_row_values2 = row.values) == null ? void 0 : _row_values2[fieldId]
1282
+ }) : '--' : field ? formatDatasetValue(field, (_row_values3 = row.values) == null ? void 0 : _row_values3[fieldId]) || '--' : '--';
1278
1283
  };
1279
1284
  return {
1280
1285
  field: recordColumn(fieldId),