@aglyn/plugins-data 1.23.1 → 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.
@@ -25,6 +25,7 @@ import { registerPluginSitemapReader } from "@aglyn/aglyn/plugin-manager/plugin-
25
25
  import { registerPluginLivePaths } from "@aglyn/aglyn/plugin-manager/plugin-live-paths";
26
26
  import { registerPluginSiteResourceEraser } from "@aglyn/aglyn/plugin-manager/plugin-site-resources";
27
27
  import { BUNDLE_ID, DATASET_REPEAT_SOURCE_ID, DATASET_STEP_TYPES, DATASET_STORAGE_METER_ID } from "./constants/bundle-common.js";
28
+ import { DATASET_ICON_FIELD } from "./model/dataset-icon-field.js";
28
29
  import { DATASET_IMAGE_FIELD } from "./model/dataset-image-field.js";
29
30
  import { DATASET_PAGE_FIELD } from "./model/dataset-page-field.js";
30
31
  import { RECORD_PAGE_ADDRESS_FIELD } from "./record-pages/record-pages.js";
@@ -105,6 +106,8 @@ import { datasetsSitePackage } from "./site-bundle/datasets-package.js";
105
106
  registerCustomFieldType(DATASET_IMAGE_FIELD);
106
107
  // A record's page (AGL-3763), the `screen:` reference a Button or Link binds.
107
108
  registerCustomFieldType(DATASET_PAGE_FIELD);
109
+ // A record's icon (AGL-4190), the id and path an Icon element binds.
110
+ registerCustomFieldType(DATASET_ICON_FIELD);
108
111
  // Record pages in the sitemap and `/llms.txt` (AGL-3475), declared as the
109
112
  // `records` family in `plugins.config.json`; the reads load with the first
110
113
  // sitemap a crawler asks for.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../libs/plugins/data/src/lib/declarations.server.ts"],"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// The seam from its own module, not the plugin-manager barrel: boot needs the\n// registry and nothing else, and the barrel reaches the client contexts.\nimport { registerFormRecordTarget } from '@aglyn/aglyn/plugin-manager/submission-record-target'\nimport { registerRepeatRowReader } from '@aglyn/aglyn/plugin-manager/repeat-rows'\nimport { registerPluginSiteBundleSection } from '@aglyn/aglyn/plugin-manager/plugin-site-bundle'\nimport { registerPluginUsageMeter } from '@aglyn/aglyn/plugin-manager/plugin-usage-meters'\nimport { registerServerStepExecutor } from '@aglyn/aglyn/plugin-manager/plugin-server-steps'\nimport { registerCustomFieldType } from '@aglyn/aglyn/plugin-manager/custom-fields'\nimport { registerPluginSitemapReader } from '@aglyn/aglyn/plugin-manager/plugin-sitemap-readers'\nimport { registerPluginLivePaths } from '@aglyn/aglyn/plugin-manager/plugin-live-paths'\nimport { registerPluginSiteResourceEraser } from '@aglyn/aglyn/plugin-manager/plugin-site-resources'\nimport {\n BUNDLE_ID,\n DATASET_REPEAT_SOURCE_ID,\n DATASET_STEP_TYPES,\n DATASET_STORAGE_METER_ID,\n} from './constants/bundle-common'\nimport { DATASET_IMAGE_FIELD } from './model/dataset-image-field'\nimport { DATASET_PAGE_FIELD } from './model/dataset-page-field'\nimport { RECORD_PAGE_ADDRESS_FIELD } from './record-pages/record-pages'\nimport { datasetsSitePackage } from './site-bundle/datasets-package'\n\n/**\n * The data plugin's server declarations: the light registrations core reads\n * at boot, before any surface loads.\n *\n * A published page that repeats an element over a dataset asks the platform\n * for the rows, and this is who answers — in every process that composes a\n * page, the tenant's and the console's previews alike. The reader, and the\n * Admin SDK with it, loads on the first page that repeats, not at boot.\n * `plugins.config.json` declares the same source (`repeatSource`), so a boot\n * that skipped this is refused rather than rendered as \"no rows\".\n *\n * A form can also file every submission as a dataset record, and this is the\n * target that stamps such a form with its signed binding when a page renders\n * and writes the record when the submission comes back. Declared the same way\n * (`formRecordTarget`), and just as light: both halves load on first use.\n *\n * A site's datasets are also its section of the whole-site backup: the\n * console's export and restore ask this plugin for them. Declared too\n * (`siteBundleSections`), so a boot that skipped this fails the export rather\n * than shipping a backup without them; the answers load when a backup is made\n * or restored.\n *\n * And the monthly usage sweep, a core cron, measures what the datasets store\n * through this plugin's meter — declared in `usageAxes`, so the sweep refuses\n * to bill a month without it. Its reads load with the first sweep.\n *\n * An automation that writes a dataset record runs that step through this\n * plugin: the workflows engine reaches it through the platform's server-step\n * seam, in whichever process runs the automation. Declared too (`serverSteps`),\n * so a boot that skipped this fails the step with its reason rather than\n * reporting a record that was never written; the writes load with the first\n * step.\n *\n * And the \"Page address\" field type a record template reads a record's page\n * from, so every write path holds an address to the shape a URL can carry, and\n * the reader that lists record pages in the sitemap — declared too\n * (`sitemapReaders`), so a boot that skipped this degrades the sitemap rather\n * than dropping every record page from it.\n *\n * And a deleted site's own datasets (AGL-4003): the ones shared with that site\n * alone go with it, records included, and the ones it shares with others lose\n * it. The Delete site card lists them first through the same eraser.\n */\nexport function registerDataServerDeclarations(): void {\n registerRepeatRowReader(\n DATASET_REPEAT_SOURCE_ID,\n async (request) =>\n (await import('./repeat/dataset-repeat-rows.server')).readPublishedDatasetRows(\n request,\n ),\n { pluginId: BUNDLE_ID },\n )\n registerFormRecordTarget(\n {\n stamp: async (nodes, hostId) =>\n (await import('./form-target/stamp-form-dataset-bindings')).stampFormDatasetBindings(\n nodes,\n hostId,\n ),\n write: async (request) =>\n (await import('./form-target/dataset-form-record-target.server')).writeFormSubmissionRecord(\n request,\n ),\n },\n { pluginId: BUNDLE_ID },\n )\n const datasets = () => import('./site-bundle/datasets-site-bundle.server')\n registerPluginSiteBundleSection(\n 'datasets',\n {\n export: async (request) => (await datasets()).exportSiteDatasets(request),\n refusal: async (request) => (await datasets()).siteDatasetsRefusal(request),\n import: async (request) => (await datasets()).importSiteDatasets(request),\n package: datasetsSitePackage,\n },\n { pluginId: BUNDLE_ID },\n )\n registerPluginUsageMeter({\n pluginId: BUNDLE_ID,\n id: DATASET_STORAGE_METER_ID,\n measure: async (context) =>\n (await import('./server/dataset-storage-meter')).measureDatasetStorage(context),\n })\n registerServerStepExecutor(\n DATASET_STEP_TYPES,\n async (request) => (await import('./server/dataset-steps.server')).runDatasetStep(request),\n { pluginId: BUNDLE_ID },\n )\n // A record's page address (AGL-3475) is checked on every server path that\n // writes a record, the tenant's form and automation writes included.\n registerCustomFieldType(RECORD_PAGE_ADDRESS_FIELD)\n // A record's photo (AGL-3616), the address an Image binds, checked the same way.\n registerCustomFieldType(DATASET_IMAGE_FIELD)\n // A record's page (AGL-3763), the `screen:` reference a Button or Link binds.\n registerCustomFieldType(DATASET_PAGE_FIELD)\n // Record pages in the sitemap and `/llms.txt` (AGL-3475), declared as the\n // `records` family in `plugins.config.json`; the reads load with the first\n // sitemap a crawler asks for.\n const sitemap = async () =>\n (await import('./record-pages/record-page-sitemap.server')).recordPagesSitemapReader\n registerPluginSitemapReader(\n 'records',\n {\n children: async (request) => (await sitemap()).children(request),\n urls: async (request) => (await sitemap()).urls(request),\n listings: async (request) => (await sitemap()).listings?.(request) ?? [],\n },\n { pluginId: BUNDLE_ID },\n )\n // And the record pages a publish makes stale, which no routing-map entry\n // names (AGL-3475).\n registerPluginLivePaths(\n async (request) =>\n (await import('./record-pages/record-page-live-paths.server')).recordPageLivePaths(\n request,\n ),\n { pluginId: BUNDLE_ID },\n )\n // A deleted site's own datasets (AGL-4003); the reads load with the first\n // site delete.\n const siteErasure = () => import('./server/dataset-site-erasure')\n registerPluginSiteResourceEraser(\n {\n preview: async (request) => (await siteErasure()).previewSiteDatasets(request),\n erase: async (request) => (await siteErasure()).eraseSiteDatasets(request),\n },\n { pluginId: BUNDLE_ID },\n )\n}\n"],"names":["registerFormRecordTarget","registerRepeatRowReader","registerPluginSiteBundleSection","registerPluginUsageMeter","registerServerStepExecutor","registerCustomFieldType","registerPluginSitemapReader","registerPluginLivePaths","registerPluginSiteResourceEraser","BUNDLE_ID","DATASET_REPEAT_SOURCE_ID","DATASET_STEP_TYPES","DATASET_STORAGE_METER_ID","DATASET_IMAGE_FIELD","DATASET_PAGE_FIELD","RECORD_PAGE_ADDRESS_FIELD","datasetsSitePackage","registerDataServerDeclarations","request","readPublishedDatasetRows","pluginId","stamp","nodes","hostId","stampFormDatasetBindings","write","writeFormSubmissionRecord","datasets","export","exportSiteDatasets","refusal","siteDatasetsRefusal","import","importSiteDatasets","package","id","measure","context","measureDatasetStorage","runDatasetStep","sitemap","recordPagesSitemapReader","children","urls","listings","recordPageLivePaths","siteErasure","preview","previewSiteDatasets","erase","eraseSiteDatasets"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,8EAA8E;AAC9E,yEAAyE;AACzE,SAASA,wBAAwB,QAAQ,uDAAsD;AAC/F,SAASC,uBAAuB,QAAQ,0CAAyC;AACjF,SAASC,+BAA+B,QAAQ,iDAAgD;AAChG,SAASC,wBAAwB,QAAQ,kDAAiD;AAC1F,SAASC,0BAA0B,QAAQ,kDAAiD;AAC5F,SAASC,uBAAuB,QAAQ,4CAA2C;AACnF,SAASC,2BAA2B,QAAQ,qDAAoD;AAChG,SAASC,uBAAuB,QAAQ,gDAA+C;AACvF,SAASC,gCAAgC,QAAQ,oDAAmD;AACpG,SACEC,SAAS,EACTC,wBAAwB,EACxBC,kBAAkB,EAClBC,wBAAwB,QACnB,+BAA2B;AAClC,SAASC,mBAAmB,QAAQ,iCAA6B;AACjE,SAASC,kBAAkB,QAAQ,gCAA4B;AAC/D,SAASC,yBAAyB,QAAQ,iCAA6B;AACvE,SAASC,mBAAmB,QAAQ,oCAAgC;AAEpE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0CC,GACD,OAAO,SAASC;IACdhB,wBACES,0BACA,OAAOQ,UACL,AAAC,CAAA,MAAM,MAAM,CAAC,yCAAqC,EAAGC,wBAAwB,CAC5ED,UAEJ;QAAEE,UAAUX;IAAU;IAExBT,yBACE;QACEq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OAAO1B;;gBAAY,WAAC;4BAAD,YAAA,CAAC,QAAA,MAAMsB,WAAWI,QAAQ,qBAA1B,eAAC,OAA4B1B,2BAAY,EAAE;;IAC1E,GACA;QAAEE,UAAUX;IAAU;IAExB,yEAAyE;IACzE,oBAAoB;IACpBF,wBACE,OAAOW,UACL,AAAC,CAAA,MAAM,MAAM,CAAC,kDAA8C,EAAG2B,mBAAmB,CAChF3B,UAEJ;QAAEE,UAAUX;IAAU;IAExB,0EAA0E;IAC1E,eAAe;IACf,MAAMqC,cAAc,IAAM,MAAM,CAAC;IACjCtC,iCACE;QACEuC,SAAS,OAAO7B,UAAY,AAAC,CAAA,MAAM4B,aAAY,EAAGE,mBAAmB,CAAC9B;QACtE+B,OAAO,OAAO/B,UAAY,AAAC,CAAA,MAAM4B,aAAY,EAAGI,iBAAiB,CAAChC;IACpE,GACA;QAAEE,UAAUX;IAAU;AAE1B"}
1
+ {"version":3,"sources":["../../../../../../libs/plugins/data/src/lib/declarations.server.ts"],"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// The seam from its own module, not the plugin-manager barrel: boot needs the\n// registry and nothing else, and the barrel reaches the client contexts.\nimport { registerFormRecordTarget } from '@aglyn/aglyn/plugin-manager/submission-record-target'\nimport { registerRepeatRowReader } from '@aglyn/aglyn/plugin-manager/repeat-rows'\nimport { registerPluginSiteBundleSection } from '@aglyn/aglyn/plugin-manager/plugin-site-bundle'\nimport { registerPluginUsageMeter } from '@aglyn/aglyn/plugin-manager/plugin-usage-meters'\nimport { registerServerStepExecutor } from '@aglyn/aglyn/plugin-manager/plugin-server-steps'\nimport { registerCustomFieldType } from '@aglyn/aglyn/plugin-manager/custom-fields'\nimport { registerPluginSitemapReader } from '@aglyn/aglyn/plugin-manager/plugin-sitemap-readers'\nimport { registerPluginLivePaths } from '@aglyn/aglyn/plugin-manager/plugin-live-paths'\nimport { registerPluginSiteResourceEraser } from '@aglyn/aglyn/plugin-manager/plugin-site-resources'\nimport {\n BUNDLE_ID,\n DATASET_REPEAT_SOURCE_ID,\n DATASET_STEP_TYPES,\n DATASET_STORAGE_METER_ID,\n} from './constants/bundle-common'\nimport { DATASET_ICON_FIELD } from './model/dataset-icon-field'\nimport { DATASET_IMAGE_FIELD } from './model/dataset-image-field'\nimport { DATASET_PAGE_FIELD } from './model/dataset-page-field'\nimport { RECORD_PAGE_ADDRESS_FIELD } from './record-pages/record-pages'\nimport { datasetsSitePackage } from './site-bundle/datasets-package'\n\n/**\n * The data plugin's server declarations: the light registrations core reads\n * at boot, before any surface loads.\n *\n * A published page that repeats an element over a dataset asks the platform\n * for the rows, and this is who answers — in every process that composes a\n * page, the tenant's and the console's previews alike. The reader, and the\n * Admin SDK with it, loads on the first page that repeats, not at boot.\n * `plugins.config.json` declares the same source (`repeatSource`), so a boot\n * that skipped this is refused rather than rendered as \"no rows\".\n *\n * A form can also file every submission as a dataset record, and this is the\n * target that stamps such a form with its signed binding when a page renders\n * and writes the record when the submission comes back. Declared the same way\n * (`formRecordTarget`), and just as light: both halves load on first use.\n *\n * A site's datasets are also its section of the whole-site backup: the\n * console's export and restore ask this plugin for them. Declared too\n * (`siteBundleSections`), so a boot that skipped this fails the export rather\n * than shipping a backup without them; the answers load when a backup is made\n * or restored.\n *\n * And the monthly usage sweep, a core cron, measures what the datasets store\n * through this plugin's meter — declared in `usageAxes`, so the sweep refuses\n * to bill a month without it. Its reads load with the first sweep.\n *\n * An automation that writes a dataset record runs that step through this\n * plugin: the workflows engine reaches it through the platform's server-step\n * seam, in whichever process runs the automation. Declared too (`serverSteps`),\n * so a boot that skipped this fails the step with its reason rather than\n * reporting a record that was never written; the writes load with the first\n * step.\n *\n * And the \"Page address\" field type a record template reads a record's page\n * from, so every write path holds an address to the shape a URL can carry, and\n * the reader that lists record pages in the sitemap — declared too\n * (`sitemapReaders`), so a boot that skipped this degrades the sitemap rather\n * than dropping every record page from it.\n *\n * And a deleted site's own datasets (AGL-4003): the ones shared with that site\n * alone go with it, records included, and the ones it shares with others lose\n * it. The Delete site card lists them first through the same eraser.\n */\nexport function registerDataServerDeclarations(): void {\n registerRepeatRowReader(\n DATASET_REPEAT_SOURCE_ID,\n async (request) =>\n (await import('./repeat/dataset-repeat-rows.server')).readPublishedDatasetRows(\n request,\n ),\n { pluginId: BUNDLE_ID },\n )\n registerFormRecordTarget(\n {\n stamp: async (nodes, hostId) =>\n (await import('./form-target/stamp-form-dataset-bindings')).stampFormDatasetBindings(\n nodes,\n hostId,\n ),\n write: async (request) =>\n (await import('./form-target/dataset-form-record-target.server')).writeFormSubmissionRecord(\n request,\n ),\n },\n { pluginId: BUNDLE_ID },\n )\n const datasets = () => import('./site-bundle/datasets-site-bundle.server')\n registerPluginSiteBundleSection(\n 'datasets',\n {\n export: async (request) => (await datasets()).exportSiteDatasets(request),\n refusal: async (request) => (await datasets()).siteDatasetsRefusal(request),\n import: async (request) => (await datasets()).importSiteDatasets(request),\n package: datasetsSitePackage,\n },\n { pluginId: BUNDLE_ID },\n )\n registerPluginUsageMeter({\n pluginId: BUNDLE_ID,\n id: DATASET_STORAGE_METER_ID,\n measure: async (context) =>\n (await import('./server/dataset-storage-meter')).measureDatasetStorage(context),\n })\n registerServerStepExecutor(\n DATASET_STEP_TYPES,\n async (request) => (await import('./server/dataset-steps.server')).runDatasetStep(request),\n { pluginId: BUNDLE_ID },\n )\n // A record's page address (AGL-3475) is checked on every server path that\n // writes a record, the tenant's form and automation writes included.\n registerCustomFieldType(RECORD_PAGE_ADDRESS_FIELD)\n // A record's photo (AGL-3616), the address an Image binds, checked the same way.\n registerCustomFieldType(DATASET_IMAGE_FIELD)\n // A record's page (AGL-3763), the `screen:` reference a Button or Link binds.\n registerCustomFieldType(DATASET_PAGE_FIELD)\n // A record's icon (AGL-4190), the id and path an Icon element binds.\n registerCustomFieldType(DATASET_ICON_FIELD)\n // Record pages in the sitemap and `/llms.txt` (AGL-3475), declared as the\n // `records` family in `plugins.config.json`; the reads load with the first\n // sitemap a crawler asks for.\n const sitemap = async () =>\n (await import('./record-pages/record-page-sitemap.server')).recordPagesSitemapReader\n registerPluginSitemapReader(\n 'records',\n {\n children: async (request) => (await sitemap()).children(request),\n urls: async (request) => (await sitemap()).urls(request),\n listings: async (request) => (await sitemap()).listings?.(request) ?? [],\n },\n { pluginId: BUNDLE_ID },\n )\n // And the record pages a publish makes stale, which no routing-map entry\n // names (AGL-3475).\n registerPluginLivePaths(\n async (request) =>\n (await import('./record-pages/record-page-live-paths.server')).recordPageLivePaths(\n request,\n ),\n { pluginId: BUNDLE_ID },\n )\n // A deleted site's own datasets (AGL-4003); the reads load with the first\n // site delete.\n const siteErasure = () => import('./server/dataset-site-erasure')\n registerPluginSiteResourceEraser(\n {\n preview: async (request) => (await siteErasure()).previewSiteDatasets(request),\n erase: async (request) => (await siteErasure()).eraseSiteDatasets(request),\n },\n { pluginId: BUNDLE_ID },\n )\n}\n"],"names":["registerFormRecordTarget","registerRepeatRowReader","registerPluginSiteBundleSection","registerPluginUsageMeter","registerServerStepExecutor","registerCustomFieldType","registerPluginSitemapReader","registerPluginLivePaths","registerPluginSiteResourceEraser","BUNDLE_ID","DATASET_REPEAT_SOURCE_ID","DATASET_STEP_TYPES","DATASET_STORAGE_METER_ID","DATASET_ICON_FIELD","DATASET_IMAGE_FIELD","DATASET_PAGE_FIELD","RECORD_PAGE_ADDRESS_FIELD","datasetsSitePackage","registerDataServerDeclarations","request","readPublishedDatasetRows","pluginId","stamp","nodes","hostId","stampFormDatasetBindings","write","writeFormSubmissionRecord","datasets","export","exportSiteDatasets","refusal","siteDatasetsRefusal","import","importSiteDatasets","package","id","measure","context","measureDatasetStorage","runDatasetStep","sitemap","recordPagesSitemapReader","children","urls","listings","recordPageLivePaths","siteErasure","preview","previewSiteDatasets","erase","eraseSiteDatasets"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,8EAA8E;AAC9E,yEAAyE;AACzE,SAASA,wBAAwB,QAAQ,uDAAsD;AAC/F,SAASC,uBAAuB,QAAQ,0CAAyC;AACjF,SAASC,+BAA+B,QAAQ,iDAAgD;AAChG,SAASC,wBAAwB,QAAQ,kDAAiD;AAC1F,SAASC,0BAA0B,QAAQ,kDAAiD;AAC5F,SAASC,uBAAuB,QAAQ,4CAA2C;AACnF,SAASC,2BAA2B,QAAQ,qDAAoD;AAChG,SAASC,uBAAuB,QAAQ,gDAA+C;AACvF,SAASC,gCAAgC,QAAQ,oDAAmD;AACpG,SACEC,SAAS,EACTC,wBAAwB,EACxBC,kBAAkB,EAClBC,wBAAwB,QACnB,+BAA2B;AAClC,SAASC,kBAAkB,QAAQ,gCAA4B;AAC/D,SAASC,mBAAmB,QAAQ,iCAA6B;AACjE,SAASC,kBAAkB,QAAQ,gCAA4B;AAC/D,SAASC,yBAAyB,QAAQ,iCAA6B;AACvE,SAASC,mBAAmB,QAAQ,oCAAgC;AAEpE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0CC,GACD,OAAO,SAASC;IACdjB,wBACES,0BACA,OAAOS,UACL,AAAC,CAAA,MAAM,MAAM,CAAC,yCAAqC,EAAGC,wBAAwB,CAC5ED,UAEJ;QAAEE,UAAUZ;IAAU;IAExBT,yBACE;QACEsB,OAAO,OAAOC,OAAOC,SACnB,AAAC,CAAA,MAAM,MAAM,CAAC,+CAA2C,EAAGC,wBAAwB,CAClFF,OACAC;QAEJE,OAAO,OAAOP,UACZ,AAAC,CAAA,MAAM,MAAM,CAAC,qDAAiD,EAAGQ,yBAAyB,CACzFR;IAEN,GACA;QAAEE,UAAUZ;IAAU;IAExB,MAAMmB,W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,AAAC,CAAA,MAAM,MAAM,CAAC,kDAA8C,EAAG2B,mBAAmB,CAChF3B,UAEJ;QAAEE,UAAUZ;IAAU;IAExB,0EAA0E;IAC1E,eAAe;IACf,MAAMsC,cAAc,IAAM,MAAM,CAAC;IACjCvC,iCACE;QACEwC,SAAS,OAAO7B,UAAY,AAAC,CAAA,MAAM4B,aAAY,EAAGE,mBAAmB,CAAC9B;QACtE+B,OAAO,OAAO/B,UAAY,AAAC,CAAA,MAAM4B,aAAY,EAAGI,iBAAiB,CAAChC;IACpE,GACA;QAAEE,UAAUZ;IAAU;AAE1B"}
@@ -0,0 +1,52 @@
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 { CustomFieldType } from '@aglyn/aglyn/plugin-manager/custom-fields';
18
+ /**
19
+ * A RECORD'S ICON (AGL-4190): the "Icon" field type, riding `map` storage.
20
+ *
21
+ * A list of integrations, services or perks shows each one with its own icon,
22
+ * so the page that repeats over the records binds an Icon element to a field.
23
+ * A published page never loads the icon catalog (AGL-1212: it is ~2.9 MB), so
24
+ * an icon NAME alone draws nothing there. The record therefore keeps what an
25
+ * Icon element keeps when its icon is picked in the Besigner: the icon's id
26
+ * and its SVG path, written together at the moment of the pick, when the
27
+ * record editor's picker has the catalog loaded.
28
+ *
29
+ * Stored as `{ iconId, iconPath }`, the same shape a reusable component's
30
+ * Icon property holds (`ReusableComponentIcon`), so one icon value means one
31
+ * thing everywhere. A repeat reads `{{item.<field>}}` as the icon's id and
32
+ * `{{item.<field>.iconPath}}` as its path.
33
+ */
34
+ /** The custom field type a record's icon rides. Persisted on field definitions — never rename. */
35
+ export declare const DATASET_ICON_FIELD_TYPE = "icon";
36
+ /** An icon a record holds. */
37
+ export interface DatasetIconValue {
38
+ iconId: string;
39
+ iconPath?: string;
40
+ }
41
+ /**
42
+ * The icon a stored value holds, or `undefined` for anything else.
43
+ *
44
+ * A JSON string is read too, because the record editor hands values over in
45
+ * their input form and the import wizard reads a CSV cell as text.
46
+ */
47
+ export declare function readDatasetIconValue(value: unknown): DatasetIconValue | undefined;
48
+ /** Whether a value is an icon a record may hold. */
49
+ export declare function isDatasetIconValue(value: unknown): boolean;
50
+ /** An icon id as a person reads it: `bucket-outline` → "Bucket outline". */
51
+ export declare function datasetIconLabel(iconId: string): string;
52
+ export declare const DATASET_ICON_FIELD: CustomFieldType;
@@ -0,0 +1,86 @@
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
+ */ import { RECORD_ICON_FIELD_TYPE } from "@aglyn/aglyn/app-utils/binding-token-catalog";
17
+ import { BUNDLE_ID } from "../constants/bundle-common.js";
18
+ /**
19
+ * A RECORD'S ICON (AGL-4190): the "Icon" field type, riding `map` storage.
20
+ *
21
+ * A list of integrations, services or perks shows each one with its own icon,
22
+ * so the page that repeats over the records binds an Icon element to a field.
23
+ * A published page never loads the icon catalog (AGL-1212: it is ~2.9 MB), so
24
+ * an icon NAME alone draws nothing there. The record therefore keeps what an
25
+ * Icon element keeps when its icon is picked in the Besigner: the icon's id
26
+ * and its SVG path, written together at the moment of the pick, when the
27
+ * record editor's picker has the catalog loaded.
28
+ *
29
+ * Stored as `{ iconId, iconPath }`, the same shape a reusable component's
30
+ * Icon property holds (`ReusableComponentIcon`), so one icon value means one
31
+ * thing everywhere. A repeat reads `{{item.<field>}}` as the icon's id and
32
+ * `{{item.<field>.iconPath}}` as its path.
33
+ */ /** The custom field type a record's icon rides. Persisted on field definitions — never rename. */ export const DATASET_ICON_FIELD_TYPE = RECORD_ICON_FIELD_TYPE;
34
+ /** The longest icon id kept: the library's longest is under 50 characters. */ const ICON_ID_MAX = 100;
35
+ /** The longest path kept: the library's longest is under 6,000 characters. */ const ICON_PATH_MAX = 20000;
36
+ /** An icon id as the library names them: `bucket-outline`, `numeric-1-box`. */ const ICON_ID_PATTERN = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
37
+ /** SVG path data: commands, numbers, separators. Nothing that could be markup. */ const ICON_PATH_PATTERN = /^[MmLlHhVvCcSsQqTtAaZz0-9eE.,+\-\s]+$/;
38
+ /**
39
+ * The icon a stored value holds, or `undefined` for anything else.
40
+ *
41
+ * A JSON string is read too, because the record editor hands values over in
42
+ * their input form and the import wizard reads a CSV cell as text.
43
+ */ export function readDatasetIconValue(value) {
44
+ let parsed = value;
45
+ if (typeof parsed === 'string') {
46
+ const text = parsed.trim();
47
+ if (!text.startsWith('{')) return undefined;
48
+ try {
49
+ parsed = JSON.parse(text);
50
+ } catch (unused) {
51
+ return undefined;
52
+ }
53
+ }
54
+ if (!parsed || typeof parsed !== 'object' || Array.isArray(parsed)) return undefined;
55
+ const { iconId, iconPath } = parsed;
56
+ if (typeof iconId !== 'string' || !iconId || iconId.length > ICON_ID_MAX || !ICON_ID_PATTERN.test(iconId)) {
57
+ return undefined;
58
+ }
59
+ if (iconPath === undefined || iconPath === null || iconPath === '') return {
60
+ iconId
61
+ };
62
+ if (typeof iconPath !== 'string' || iconPath.length > ICON_PATH_MAX || !ICON_PATH_PATTERN.test(iconPath)) {
63
+ return undefined;
64
+ }
65
+ return {
66
+ iconId,
67
+ iconPath
68
+ };
69
+ }
70
+ /** Whether a value is an icon a record may hold. */ export function isDatasetIconValue(value) {
71
+ return readDatasetIconValue(value) !== undefined;
72
+ }
73
+ /** An icon id as a person reads it: `bucket-outline` → "Bucket outline". */ export function datasetIconLabel(iconId) {
74
+ const words = iconId.replace(/-/g, ' ').trim();
75
+ return words ? words.charAt(0).toUpperCase() + words.slice(1) : iconId;
76
+ }
77
+ export const DATASET_ICON_FIELD = {
78
+ name: DATASET_ICON_FIELD_TYPE,
79
+ pluginId: BUNDLE_ID,
80
+ label: 'Icon',
81
+ baseType: 'map',
82
+ description: 'An icon from the library, for an Icon element on a page to show',
83
+ validate: (value)=>isDatasetIconValue(value) ? null : 'Pick an icon from the library'
84
+ };
85
+
86
+ //# sourceMappingURL=dataset-icon-field.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../libs/plugins/data/src/lib/model/dataset-icon-field.ts"],"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\nimport { RECORD_ICON_FIELD_TYPE } from '@aglyn/aglyn/app-utils/binding-token-catalog'\nimport type { CustomFieldType } from '@aglyn/aglyn/plugin-manager/custom-fields'\nimport { BUNDLE_ID } from '../constants/bundle-common'\n\n/**\n * A RECORD'S ICON (AGL-4190): the \"Icon\" field type, riding `map` storage.\n *\n * A list of integrations, services or perks shows each one with its own icon,\n * so the page that repeats over the records binds an Icon element to a field.\n * A published page never loads the icon catalog (AGL-1212: it is ~2.9 MB), so\n * an icon NAME alone draws nothing there. The record therefore keeps what an\n * Icon element keeps when its icon is picked in the Besigner: the icon's id\n * and its SVG path, written together at the moment of the pick, when the\n * record editor's picker has the catalog loaded.\n *\n * Stored as `{ iconId, iconPath }`, the same shape a reusable component's\n * Icon property holds (`ReusableComponentIcon`), so one icon value means one\n * thing everywhere. A repeat reads `{{item.<field>}}` as the icon's id and\n * `{{item.<field>.iconPath}}` as its path.\n */\n\n/** The custom field type a record's icon rides. Persisted on field definitions — never rename. */\nexport const DATASET_ICON_FIELD_TYPE = RECORD_ICON_FIELD_TYPE\n\n/** An icon a record holds. */\nexport interface DatasetIconValue {\n iconId: string\n iconPath?: string\n}\n\n/** The longest icon id kept: the library's longest is under 50 characters. */\nconst ICON_ID_MAX = 100\n/** The longest path kept: the library's longest is under 6,000 characters. */\nconst ICON_PATH_MAX = 20_000\n/** An icon id as the library names them: `bucket-outline`, `numeric-1-box`. */\nconst ICON_ID_PATTERN = /^[a-z0-9]+(?:-[a-z0-9]+)*$/\n/** SVG path data: commands, numbers, separators. Nothing that could be markup. */\nconst ICON_PATH_PATTERN = /^[MmLlHhVvCcSsQqTtAaZz0-9eE.,+\\-\\s]+$/\n\n/**\n * The icon a stored value holds, or `undefined` for anything else.\n *\n * A JSON string is read too, because the record editor hands values over in\n * their input form and the import wizard reads a CSV cell as text.\n */\nexport function readDatasetIconValue(value: unknown): DatasetIconValue | undefined {\n let parsed = value\n if (typeof parsed === 'string') {\n const text = parsed.trim()\n if (!text.startsWith('{')) return undefined\n try {\n parsed = JSON.parse(text)\n } catch {\n return undefined\n }\n }\n if (!parsed || typeof parsed !== 'object' || Array.isArray(parsed)) return undefined\n const { iconId, iconPath } = parsed as Record<string, unknown>\n if (typeof iconId !== 'string' || !iconId || iconId.length > ICON_ID_MAX || !ICON_ID_PATTERN.test(iconId)) {\n return undefined\n }\n if (iconPath === undefined || iconPath === null || iconPath === '') return { iconId }\n if (typeof iconPath !== 'string' || iconPath.length > ICON_PATH_MAX || !ICON_PATH_PATTERN.test(iconPath)) {\n return undefined\n }\n return { iconId, iconPath }\n}\n\n/** Whether a value is an icon a record may hold. */\nexport function isDatasetIconValue(value: unknown): boolean {\n return readDatasetIconValue(value) !== undefined\n}\n\n/** An icon id as a person reads it: `bucket-outline` → \"Bucket outline\". */\nexport function datasetIconLabel(iconId: string): string {\n const words = iconId.replace(/-/g, ' ').trim()\n return words ? words.charAt(0).toUpperCase() + words.slice(1) : iconId\n}\n\nexport const DATASET_ICON_FIELD: CustomFieldType = {\n name: DATASET_ICON_FIELD_TYPE,\n pluginId: BUNDLE_ID,\n label: 'Icon',\n baseType: 'map',\n description: 'An icon from the library, for an Icon element on a page to show',\n validate: (value) => (isDatasetIconValue(value) ? null : 'Pick an icon from the library'),\n}\n"],"names":["RECORD_ICON_FIELD_TYPE","BUNDLE_ID","DATASET_ICON_FIELD_TYPE","ICON_ID_MAX","ICON_PATH_MAX","ICON_ID_PATTERN","ICON_PATH_PATTERN","readDatasetIconValue","value","parsed","text","trim","startsWith","undefined","JSON","parse","Array","isArray","iconId","iconPath","length","test","isDatasetIconValue","datasetIconLabel","words","replace","charAt","toUpperCase","slice","DATASET_ICON_FIELD","name","pluginId","label","baseType","description","validate"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,SAASA,sBAAsB,QAAQ,+CAA8C;AAErF,SAASC,SAAS,QAAQ,gCAA4B;AAEtD;;;;;;;;;;;;;;;CAeC,GAED,gGAAgG,GAChG,OAAO,MAAMC,0BAA0BF,uBAAsB;AAQ7D,4EAA4E,GAC5E,MAAMG,cAAc;AACpB,4EAA4E,GAC5E,MAAMC,gBAAgB;AACtB,6EAA6E,GAC7E,MAAMC,kBAAkB;AACxB,gFAAgF,GAChF,MAAMC,oBAAoB;AAE1B;;;;;CAKC,GACD,OAAO,SAASC,qBAAqBC,KAAc;IACjD,IAAIC,SAASD;IACb,IAAI,OAAOC,WAAW,UAAU;QAC9B,MAAMC,OAAOD,OAAOE,IAAI;QACxB,IAAI,CAACD,KAAKE,UAAU,CAAC,MAAM,OAAOC;QAClC,IAAI;YACFJ,SAASK,KAAKC,KAAK,CAACL;QACtB,EAAE,eAAM;YACN,OAAOG;QACT;IACF;IACA,IAAI,CAACJ,UAAU,OAAOA,WAAW,YAAYO,MAAMC,OAAO,CAACR,SAAS,OAAOI;IAC3E,MAAM,EAAEK,MAAM,EAAEC,QAAQ,EAAE,GAAGV;IAC7B,IAAI,OAAOS,WAAW,YAAY,CAACA,UAAUA,OAAOE,MAAM,GAAGjB,eAAe,CAACE,gBAAgBgB,IAAI,CAACH,SAAS;QACzG,OAAOL;IACT;IACA,IAAIM,aAAaN,aAAaM,aAAa,QAAQA,aAAa,IAAI,OAAO;QAAED;IAAO;IACpF,IAAI,OAAOC,aAAa,YAAYA,SAASC,MAAM,GAAGhB,iBAAiB,CAACE,kBAAkBe,IAAI,CAACF,WAAW;QACxG,OAAON;IACT;IACA,OAAO;QAAEK;QAAQC;IAAS;AAC5B;AAEA,kDAAkD,GAClD,OAAO,SAASG,mBAAmBd,KAAc;IAC/C,OAAOD,qBAAqBC,WAAWK;AACzC;AAEA,0EAA0E,GAC1E,OAAO,SAASU,iBAAiBL,MAAc;IAC7C,MAAMM,QAAQN,OAAOO,OAAO,CAAC,MAAM,KAAKd,IAAI;IAC5C,OAAOa,QAAQA,MAAME,MAAM,CAAC,GAAGC,WAAW,KAAKH,MAAMI,KAAK,CAAC,KAAKV;AAClE;AAEA,OAAO,MAAMW,qBAAsC;IACjDC,MAAM5B;IACN6B,UAAU9B;IACV+B,OAAO;IACPC,UAAU;IACVC,aAAa;IACbC,UAAU,CAAC3B,QAAWc,mBAAmBd,SAAS,OAAO;AAC3D,EAAC"}
package/src/lib/plugin.js CHANGED
@@ -25,9 +25,11 @@ import { registerPageRecordSource } from "@aglyn/aglyn/app-utils/page-record-sou
25
25
  import { registerPluginTransferResourceUi } from "@aglyn/aglyn/plugin-manager/plugin-transfer-resources";
26
26
  import { DATASET_TRANSFER_RESOURCE } from "./transfer/dataset-transfer-key.js";
27
27
  import { DATASET_REPEAT_SOURCE } from "./repeat/dataset-repeat-source.js";
28
+ import { DATASET_ICON_FIELD } from "./model/dataset-icon-field.js";
28
29
  import { DATASET_IMAGE_FIELD } from "./model/dataset-image-field.js";
29
30
  import { DATASET_PAGE_FIELD } from "./model/dataset-page-field.js";
30
31
  import { DatasetImageFieldInput, DatasetPageFieldInput } from "./components/dataset-field-inputs.component.js";
32
+ import { DatasetIconFieldInput } from "./components/dataset-icon-field-input.component.js";
31
33
  import { RECORD_PAGE_ADDRESS_FIELD } from "./record-pages/record-pages.js";
32
34
  import { RECORD_PAGE_SOURCE } from "./record-pages/record-page-source.js";
33
35
  import { registerDataRecordRoutes } from "./model/data-record-routes.js";
@@ -71,6 +73,10 @@ import RecordTemplateSection from "./record-pages/record-template-section.compon
71
73
  Aglyn.registerCustomFieldType(_extends({}, DATASET_PAGE_FIELD, {
72
74
  Input: DatasetPageFieldInput
73
75
  }));
76
+ // A record's icon (AGL-4190), which a page's Icon binds: picked, never typed.
77
+ Aglyn.registerCustomFieldType(_extends({}, DATASET_ICON_FIELD, {
78
+ Input: DatasetIconFieldInput
79
+ }));
74
80
  // A record template draws on the canvas for one of its records (AGL-3475).
75
81
  registerPageRecordSource(RECORD_PAGE_SOURCE);
76
82
  // The workspace's datasets, for another plugin's picker (AGL-3080).
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../libs/plugins/data/src/lib/plugin.ts"],"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\nimport { datasetInstanceImportAccess } from './components/use-dataset-writes-blocked'\nimport * as Aglyn from '@aglyn/aglyn'\nimport { registerRepeatSource } from '@aglyn/aglyn/app-utils/repeat-sources'\nimport { mdiDatabaseOutline } from '@aglyn/shared-data-mdi'\nimport { lazy } from 'react'\nimport { BUNDLE_ID } from './constants/bundle-common'\nimport { registerDatasetRecordList } from './model/dataset-record-list'\nimport { registerPageRecordSource } from '@aglyn/aglyn/app-utils/page-record-sources'\nimport { registerPluginTransferResourceUi } from '@aglyn/aglyn/plugin-manager/plugin-transfer-resources'\nimport { DATASET_TRANSFER_RESOURCE } from './transfer/dataset-transfer-key'\nimport { DATASET_REPEAT_SOURCE } from './repeat/dataset-repeat-source'\nimport { DATASET_IMAGE_FIELD } from './model/dataset-image-field'\nimport { DATASET_PAGE_FIELD } from './model/dataset-page-field'\nimport { DatasetImageFieldInput, DatasetPageFieldInput } from './components/dataset-field-inputs.component'\nimport { RECORD_PAGE_ADDRESS_FIELD } from './record-pages/record-pages'\nimport { RECORD_PAGE_SOURCE } from './record-pages/record-page-source'\nimport { registerDataRecordRoutes } from './model/data-record-routes'\nimport RecordTemplateRowChip from './record-pages/record-template-row-chip.component'\nimport RecordTemplateSection from './record-pages/record-template-section.component'\n\n/** Code-split: the Data console page only loads when opened. */\nconst DataConsolePage = lazy(() => import('./components/data-console-page'))\n/**\n * The org datasets card, split the same way: it loads where the `orgData`\n * slot mounts it (or inside the Data page's own chunk), not with the plugin.\n */\nexport const HostDatasetsCard = lazy(() => import('./components/host-datasets-card.component'))\n\n/**\n * Data feature plugin (AGL-395). Console-only — datasets are org-shared\n * document collections consumed by repeatable components at render time\n * through binding resolution, not a canvas element of their own, so there\n * is no UI bundle. The console half declares the host Data nav + page\n * through the ConsoleExtension registry, gated by the `dataStore`\n * entitlement. The org Data page (`Route.ORG_DATA`) is an org-scoped app route\n * that imports {@link HostDatasetsCard} directly.\n *\n * Record pages (AGL-3475) add a section to the besigner's Page Properties, a\n * chip to the Pages list's rows, and the page-record source that draws a\n * record template on the canvas for one of its records.\n *\n * It also registers datasets as a repeat source (AGL-3111), which is what puts\n * \"Repeat over dataset\" on every element's Attributes panel and draws a\n * repeat's copies from the real rows on the besigner canvas. Registered here,\n * inside the function the loader calls by name, and never by a module's own\n * load: this package declares no side effects, so a bundler deletes a module\n * imported only to run one (AGL-3025).\n */\nexport function registerDataConsole(): void {\n registerRepeatSource(DATASET_REPEAT_SOURCE)\n // The \"Page address\" field type (AGL-3475), for the schema dialog's type\n // list and the record editor's checks.\n Aglyn.registerCustomFieldType(RECORD_PAGE_ADDRESS_FIELD)\n // A record's photo (AGL-3616), which a page's Image binds, and its page\n // (AGL-3763), which a Button or Link binds — each chosen from a picker in\n // the record editor, never typed.\n Aglyn.registerCustomFieldType({ ...DATASET_IMAGE_FIELD, Input: DatasetImageFieldInput })\n Aglyn.registerCustomFieldType({ ...DATASET_PAGE_FIELD, Input: DatasetPageFieldInput })\n // A record template draws on the canvas for one of its records (AGL-3475).\n registerPageRecordSource(RECORD_PAGE_SOURCE)\n // The workspace's datasets, for another plugin's picker (AGL-3080).\n registerDatasetRecordList()\n // …and where one is read, for a surface that links it (AGL-3616): an AI\n // job's dataset opens on the Data page.\n registerDataRecordRoutes()\n // A dataset's records in the import wizard and the export dialog\n // (AGL-3530); the Data card names the dataset when it opens them.\n registerPluginTransferResourceUi(\n DATASET_TRANSFER_RESOURCE,\n // The Import & export hub lists each dataset from the `dataset` record list (AGL-3535).\n // Its Import there answers as this one's does on the Data page (AGL-4047).\n {\n label: 'Dataset records',\n icon: { path: mdiDatabaseOutline.path },\n instancesFrom: 'dataset',\n instanceImportAccess: datasetInstanceImportAccess,\n },\n { pluginId: BUNDLE_ID },\n )\n Aglyn.registerConsoleExtension({\n // Org datasets card (AGL-419): org/data renders it through the\n // 'orgData' widget slot.\n widgets: [\n {\n slot: 'orgData',\n widgetId: 'data-org-datasets',\n Component: HostDatasetsCard,\n },\n // Record pages (AGL-3475): the template's settings in Page Properties,\n // and its chip in the Pages list.\n {\n slot: 'besignerPageProperties',\n widgetId: 'data-record-template',\n Component: RecordTemplateSection,\n },\n {\n slot: 'hostScreenRow',\n widgetId: 'data-record-template-chip',\n Component: RecordTemplateRowChip,\n },\n ],\n pluginId: BUNDLE_ID,\n displayName: 'Data',\n featureFlag: 'dataStore',\n navItems: [\n {\n label: 'Data',\n href: '/data',\n // Each dataset is a tab of the page, at `/data/<datasetId>` (AGL-4047).\n ownsSubtree: true,\n recordTitle: 'Dataset',\n // Reuse the existing release-flag nav-tab so staff-preview gating is\n // unchanged now that the tab comes from the plugin (AGL-395).\n navTabId: 'nav-tab-data',\n icon: { path: mdiDatabaseOutline.path },\n header: {\n title: 'Data',\n icon: { path: mdiDatabaseOutline.path },\n docsTopic: 'datasets',\n },\n Component: DataConsolePage,\n },\n ],\n })\n}\n\nexport type { HostDatasetsCardProps } from './components/host-datasets-card.component'\n"],"names":["datasetInstanceImportAccess","Aglyn","registerRepeatSource","mdiDatabaseOutline","lazy","BUNDLE_ID","registerDatasetRecordList","registerPageRecordSource","registerPluginTransferResourceUi","DATASET_TRANSFER_RESOURCE","DATASET_REPEAT_SOURCE","DATASET_IMAGE_FIELD","DATASET_PAGE_FIELD","DatasetImageFieldInput","DatasetPageFieldInput","RECORD_PAGE_ADDRESS_FIELD","RECORD_PAGE_SOURCE","registerDataRecordRoutes","RecordTemplateRowChip","RecordTemplateSection","DataConsolePage","HostDatasetsCard","registerDataConsole","registerCustomFieldType","Input","label","icon","path","instancesFrom","instanceImportAccess","pluginId","registerConsoleExtension","widgets","slot","widgetId","Component","displayName","featureFlag","navItems","href","ownsSubtree","recordTitle","navTabId","header","title","docsTopic"],"mappings":";AAAA;;;;;;;;;;;;;;;CAeC,GAED,SAASA,2BAA2B,QAAQ,6CAAyC;AACrF,YAAYC,WAAW,eAAc;AACrC,SAASC,oBAAoB,QAAQ,wCAAuC;AAC5E,SAASC,kBAAkB,QAAQ,yBAAwB;AAC3D,SAASC,IAAI,QAAQ,QAAO;AAC5B,SAASC,SAAS,QAAQ,+B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B,CAAC;QAC7B,+DAA+D;QAC/D,yBAAyB;QACzBC,SAAS;YACP;gBACEC,MAAM;gBACNC,UAAU;gBACVC,WAAWd;YACb;YACA,uEAAuE;YACvE,kCAAkC;YAClC;gBACEY,MAAM;gBACNC,UAAU;gBACVC,WAAWhB;YACb;YACA;gBACEc,MAAM;gBACNC,UAAU;gBACVC,WAAWjB;YACb;SACD;QACDY,UAAUzB;QACV+B,aAAa;QACbC,aAAa;QACbC,UAAU;YACR;gBACEb,OAAO;gBACPc,MAAM;gBACN,wEAAwE;gBACxEC,aAAa;gBACbC,aAAa;gBACb,qEAAqE;gBACrE,8DAA8D;gBAC9DC,UAAU;gBACVhB,MAAM;oBAAEC,MAAMxB,mBAAmBwB,IAAI;gBAAC;gBACtCgB,QAAQ;oBACNC,OAAO;oBACPlB,MAAM;wBAAEC,MAAMxB,mBAAmBwB,IAAI;oBAAC;oBACtCkB,WAAW;gBACb;gBACAV,WAAWf;YACb;SACD;IACH;AACF"}
1
+ {"version":3,"sources":["../../../../../../libs/plugins/data/src/lib/plugin.ts"],"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\nimport { datasetInstanceImportAccess } from './components/use-dataset-writes-blocked'\nimport * as Aglyn from '@aglyn/aglyn'\nimport { registerRepeatSource } from '@aglyn/aglyn/app-utils/repeat-sources'\nimport { mdiDatabaseOutline } from '@aglyn/shared-data-mdi'\nimport { lazy } from 'react'\nimport { BUNDLE_ID } from './constants/bundle-common'\nimport { registerDatasetRecordList } from './model/dataset-record-list'\nimport { registerPageRecordSource } from '@aglyn/aglyn/app-utils/page-record-sources'\nimport { registerPluginTransferResourceUi } from '@aglyn/aglyn/plugin-manager/plugin-transfer-resources'\nimport { DATASET_TRANSFER_RESOURCE } from './transfer/dataset-transfer-key'\nimport { DATASET_REPEAT_SOURCE } from './repeat/dataset-repeat-source'\nimport { DATASET_ICON_FIELD } from './model/dataset-icon-field'\nimport { DATASET_IMAGE_FIELD } from './model/dataset-image-field'\nimport { DATASET_PAGE_FIELD } from './model/dataset-page-field'\nimport { DatasetImageFieldInput, DatasetPageFieldInput } from './components/dataset-field-inputs.component'\nimport { DatasetIconFieldInput } from './components/dataset-icon-field-input.component'\nimport { RECORD_PAGE_ADDRESS_FIELD } from './record-pages/record-pages'\nimport { RECORD_PAGE_SOURCE } from './record-pages/record-page-source'\nimport { registerDataRecordRoutes } from './model/data-record-routes'\nimport RecordTemplateRowChip from './record-pages/record-template-row-chip.component'\nimport RecordTemplateSection from './record-pages/record-template-section.component'\n\n/** Code-split: the Data console page only loads when opened. */\nconst DataConsolePage = lazy(() => import('./components/data-console-page'))\n/**\n * The org datasets card, split the same way: it loads where the `orgData`\n * slot mounts it (or inside the Data page's own chunk), not with the plugin.\n */\nexport const HostDatasetsCard = lazy(() => import('./components/host-datasets-card.component'))\n\n/**\n * Data feature plugin (AGL-395). Console-only — datasets are org-shared\n * document collections consumed by repeatable components at render time\n * through binding resolution, not a canvas element of their own, so there\n * is no UI bundle. The console half declares the host Data nav + page\n * through the ConsoleExtension registry, gated by the `dataStore`\n * entitlement. The org Data page (`Route.ORG_DATA`) is an org-scoped app route\n * that imports {@link HostDatasetsCard} directly.\n *\n * Record pages (AGL-3475) add a section to the besigner's Page Properties, a\n * chip to the Pages list's rows, and the page-record source that draws a\n * record template on the canvas for one of its records.\n *\n * It also registers datasets as a repeat source (AGL-3111), which is what puts\n * \"Repeat over dataset\" on every element's Attributes panel and draws a\n * repeat's copies from the real rows on the besigner canvas. Registered here,\n * inside the function the loader calls by name, and never by a module's own\n * load: this package declares no side effects, so a bundler deletes a module\n * imported only to run one (AGL-3025).\n */\nexport function registerDataConsole(): void {\n registerRepeatSource(DATASET_REPEAT_SOURCE)\n // The \"Page address\" field type (AGL-3475), for the schema dialog's type\n // list and the record editor's checks.\n Aglyn.registerCustomFieldType(RECORD_PAGE_ADDRESS_FIELD)\n // A record's photo (AGL-3616), which a page's Image binds, and its page\n // (AGL-3763), which a Button or Link binds — each chosen from a picker in\n // the record editor, never typed.\n Aglyn.registerCustomFieldType({ ...DATASET_IMAGE_FIELD, Input: DatasetImageFieldInput })\n Aglyn.registerCustomFieldType({ ...DATASET_PAGE_FIELD, Input: DatasetPageFieldInput })\n // A record's icon (AGL-4190), which a page's Icon binds: picked, never typed.\n Aglyn.registerCustomFieldType({ ...DATASET_ICON_FIELD, Input: DatasetIconFieldInput })\n // A record template draws on the canvas for one of its records (AGL-3475).\n registerPageRecordSource(RECORD_PAGE_SOURCE)\n // The workspace's datasets, for another plugin's picker (AGL-3080).\n registerDatasetRecordList()\n // …and where one is read, for a surface that links it (AGL-3616): an AI\n // job's dataset opens on the Data page.\n registerDataRecordRoutes()\n // A dataset's records in the import wizard and the export dialog\n // (AGL-3530); the Data card names the dataset when it opens them.\n registerPluginTransferResourceUi(\n DATASET_TRANSFER_RESOURCE,\n // The Import & export hub lists each dataset from the `dataset` record list (AGL-3535).\n // Its Import there answers as this one's does on the Data page (AGL-4047).\n {\n label: 'Dataset records',\n icon: { path: mdiDatabaseOutline.path },\n instancesFrom: 'dataset',\n instanceImportAccess: datasetInstanceImportAccess,\n },\n { pluginId: BUNDLE_ID },\n )\n Aglyn.registerConsoleExtension({\n // Org datasets card (AGL-419): org/data renders it through the\n // 'orgData' widget slot.\n widgets: [\n {\n slot: 'orgData',\n widgetId: 'data-org-datasets',\n Component: HostDatasetsCard,\n },\n // Record pages (AGL-3475): the template's settings in Page Properties,\n // and its chip in the Pages list.\n {\n slot: 'besignerPageProperties',\n widgetId: 'data-record-template',\n Component: RecordTemplateSection,\n },\n {\n slot: 'hostScreenRow',\n widgetId: 'data-record-template-chip',\n Component: RecordTemplateRowChip,\n },\n ],\n pluginId: BUNDLE_ID,\n displayName: 'Data',\n featureFlag: 'dataStore',\n navItems: [\n {\n label: 'Data',\n href: '/data',\n // Each dataset is a tab of the page, at `/data/<datasetId>` (AGL-4047).\n ownsSubtree: true,\n recordTitle: 'Dataset',\n // Reuse the existing release-flag nav-tab so staff-preview gating is\n // unchanged now that the tab comes from the plugin (AGL-395).\n navTabId: 'nav-tab-data',\n icon: { path: mdiDatabaseOutline.path },\n header: {\n title: 'Data',\n icon: { path: mdiDatabaseOutline.path },\n docsTopic: 'datasets',\n },\n Component: DataConsolePage,\n },\n ],\n })\n}\n\nexport type { HostDatasetsCardProps } from './components/host-datasets-card.component'\n"],"names":["datasetInstanceImportAccess","Aglyn","registerRepeatSource","mdiDatabaseOutline","lazy","BUNDLE_ID","registerDatasetRecordList","registerPageRecordSource","registerPluginTransferResourceUi","DATASET_TRANSFER_RESOURCE","DATASET_REPEAT_SOURCE","DATASET_ICON_FIELD","DATASET_IMAGE_FIELD","DATASET_PAGE_FIELD","DatasetImageFieldInput","DatasetPageFieldInput","DatasetIconFieldInput","RECORD_PAGE_ADDRESS_FIELD","RECORD_PAGE_SOURCE","registerDataRecordRoutes","RecordTemplateRowChip","RecordTemplateSection","DataConsolePage","HostDatasetsCard","registerDataConsole","registerCustomFieldType","Input","label","icon","path","instancesFrom","instanceImportAccess","pluginId","registerConsoleExtension","widgets","slot","widgetId","Component","displayName","featureFlag","navItems","href","ownsSubtree","recordTitle","navTabId","header","title","docsTopic"],"mappings":";AAAA;;;;;;;;;;;;;;;CAeC,GAED,SAASA,2BAA2B,QAAQ,6CAAyC;AACrF,YAAYC,WAAW,eAAc;AACrC,SAASC,oBAAoB,QAAQ,wCAAuC;AAC5E,SAASC,kBAAkB,QAAQ,yBAAwB;AAC3D,SAASC,IAAI,QAAQ,QAAO;AAC5B,SAASC,SAAS,QAAQ,+BAA2B;AACrD,SAASC,yBAAy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