@modelform/react-native 0.4.0 → 0.6.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.
@@ -26,3 +26,4 @@ export * from './mappings';
26
26
  export * from './panelOptions';
27
27
  export * from './sample';
28
28
  export * from './snippets';
29
+ export * from './templates';
@@ -200,7 +200,6 @@
200
200
 
201
201
 
202
202
 
203
- var _chunkWMRDOYPVjs = require('../chunk-WMRDOYPV.js');
204
203
 
205
204
 
206
205
 
@@ -221,6 +220,7 @@ var _chunkWMRDOYPVjs = require('../chunk-WMRDOYPV.js');
221
220
 
222
221
 
223
222
 
223
+ var _chunkYUXA7I4Jjs = require('../chunk-YUXA7I4J.js');
224
224
 
225
225
 
226
226
 
@@ -403,4 +403,44 @@ var _chunkWMRDOYPVjs = require('../chunk-WMRDOYPV.js');
403
403
 
404
404
 
405
405
 
406
- exports.ALL = _chunkWMRDOYPVjs.ALL; exports.BUNDLE_ACCEPT = _chunkWMRDOYPVjs.BUNDLE_ACCEPT; exports.BUNDLE_TYPE = _chunkWMRDOYPVjs.BUNDLE_TYPE; exports.CANVAS_GAP = _chunkWMRDOYPVjs.CANVAS_GAP; exports.CANVAS_ROW_HEADER = _chunkWMRDOYPVjs.CANVAS_ROW_HEADER; exports.ConfigLoader = _chunkWMRDOYPVjs.ConfigLoader; exports.DASHBOARD_DS = _chunkWMRDOYPVjs.DASHBOARD_DS; exports.DEFAULT_GAZETTEER = _chunkWMRDOYPVjs.DEFAULT_GAZETTEER; exports.EDITABLE_VARIABLE_TYPES = _chunkWMRDOYPVjs.EDITABLE_VARIABLE_TYPES; exports.GRID_COLUMNS = _chunkWMRDOYPVjs.GRID_COLUMNS; exports.GrafanaClient = _chunkWMRDOYPVjs.GrafanaClient; exports.GrafanaDataSource = _chunkWMRDOYPVjs.GrafanaDataSource; exports.GrafanaError = _chunkWMRDOYPVjs.GrafanaError; exports.HttpConfigFiles = _chunkWMRDOYPVjs.HttpConfigFiles; exports.INPUT_OPTION_KEYS = _chunkWMRDOYPVjs.INPUT_OPTION_KEYS; exports.INPUT_TYPES = _chunkWMRDOYPVjs.INPUT_TYPES; exports.LOCAL_DATASOURCE_TYPE = _chunkWMRDOYPVjs.LOCAL_DATASOURCE_TYPE; exports.LocalDataSource = _chunkWMRDOYPVjs.LocalDataSource; exports.MANIFEST_VERSION = _chunkWMRDOYPVjs.MANIFEST_VERSION; exports.MAPPING_TYPES = _chunkWMRDOYPVjs.MAPPING_TYPES; exports.MemoryEntryStore = _chunkWMRDOYPVjs.MemoryEntryStore; exports.NAMED_COLORS = _chunkWMRDOYPVjs.NAMED_COLORS; exports.OPTION_CATEGORIES = _chunkWMRDOYPVjs.OPTION_CATEGORIES; exports.OVERRIDE_MATCHERS = _chunkWMRDOYPVjs.OVERRIDE_MATCHERS; exports.PANEL_TYPES = _chunkWMRDOYPVjs.PANEL_TYPES; exports.REDUCER_LABELS = _chunkWMRDOYPVjs.REDUCER_LABELS; exports.REFRESH_CHOICES = _chunkWMRDOYPVjs.REFRESH_CHOICES; exports.RELATIVE_RANGES = _chunkWMRDOYPVjs.RELATIVE_RANGES; exports.SERIES_PALETTE = _chunkWMRDOYPVjs.SERIES_PALETTE; exports.SNIPPET_VERSION = _chunkWMRDOYPVjs.SNIPPET_VERSION; exports.SPECIAL_MATCHES = _chunkWMRDOYPVjs.SPECIAL_MATCHES; exports.SaveConflictError = _chunkWMRDOYPVjs.SaveConflictError; exports.TIME_PRESETS = _chunkWMRDOYPVjs.TIME_PRESETS; exports.UNIT_CHOICES = _chunkWMRDOYPVjs.UNIT_CHOICES; exports.addTime = _chunkWMRDOYPVjs.addTime; exports.appSchema = _chunkWMRDOYPVjs.appSchema; exports.applyDashboardLink = _chunkWMRDOYPVjs.applyDashboardLink; exports.applyJsonEdits = _chunkWMRDOYPVjs.applyJsonEdits; exports.applyTransformations = _chunkWMRDOYPVjs.applyTransformations; exports.assembleBundle = _chunkWMRDOYPVjs.assembleBundle; exports.assembleFromResponse = _chunkWMRDOYPVjs.assembleFromResponse; exports.buildFrames = _chunkWMRDOYPVjs.buildFrames; exports.bundleFromFiles = _chunkWMRDOYPVjs.bundleFromFiles; exports.bundleRoot = _chunkWMRDOYPVjs.bundleRoot; exports.calculateInterval = _chunkWMRDOYPVjs.calculateInterval; exports.checkFiles = _chunkWMRDOYPVjs.checkFiles; exports.cleanDashboard = _chunkWMRDOYPVjs.cleanDashboard; exports.cleanPanelOptions = _chunkWMRDOYPVjs.cleanPanelOptions; exports.collapseRow = _chunkWMRDOYPVjs.collapseRow; exports.compactGrid = _chunkWMRDOYPVjs.compactGrid; exports.copyPanels = _chunkWMRDOYPVjs.copyPanels; exports.dashboardSchema = _chunkWMRDOYPVjs.dashboardSchema; exports.dashboardSchemaIssues = _chunkWMRDOYPVjs.dashboardSchemaIssues; exports.dashboardSourceIds = _chunkWMRDOYPVjs.dashboardSourceIds; exports.defaultFetchJson = _chunkWMRDOYPVjs.defaultFetchJson; exports.describeRange = _chunkWMRDOYPVjs.describeRange; exports.diffJson = _chunkWMRDOYPVjs.diffJson; exports.documentIdFor = _chunkWMRDOYPVjs.documentIdFor; exports.documentUses = _chunkWMRDOYPVjs.documentUses; exports.dropTarget = _chunkWMRDOYPVjs.dropTarget; exports.duplicatePanel = _chunkWMRDOYPVjs.duplicatePanel; exports.entriesSavedWith = _chunkWMRDOYPVjs.entriesSavedWith; exports.entryToInputValue = _chunkWMRDOYPVjs.entryToInputValue; exports.expandRow = _chunkWMRDOYPVjs.expandRow; exports.fetchBundle = _chunkWMRDOYPVjs.fetchBundle; exports.fetchJsonWithToken = _chunkWMRDOYPVjs.fetchJsonWithToken; exports.fieldDisplayName = _chunkWMRDOYPVjs.fieldDisplayName; exports.fieldMatches = _chunkWMRDOYPVjs.fieldMatches; exports.formatClock = _chunkWMRDOYPVjs.formatClock; exports.formatDisplay = _chunkWMRDOYPVjs.formatDisplay; exports.formatDuration = _chunkWMRDOYPVjs.formatDuration; exports.formatJsonText = _chunkWMRDOYPVjs.formatJsonText; exports.formatLocalDateTime = _chunkWMRDOYPVjs.formatLocalDateTime; exports.formatValue = _chunkWMRDOYPVjs.formatValue; exports.frameLength = _chunkWMRDOYPVjs.frameLength; exports.framesToOptions = _chunkWMRDOYPVjs.framesToOptions; exports.fromWire = _chunkWMRDOYPVjs.fromWire; exports.getPath = _chunkWMRDOYPVjs.getPath; exports.gridOffsetPx = _chunkWMRDOYPVjs.gridOffsetPx; exports.gridUnitsToPx = _chunkWMRDOYPVjs.gridUnitsToPx; exports.httpFetchJson = _chunkWMRDOYPVjs.httpFetchJson; exports.initialVariableValues = _chunkWMRDOYPVjs.initialVariableValues; exports.inputPanels = _chunkWMRDOYPVjs.inputPanels; exports.inputProblem = _chunkWMRDOYPVjs.inputProblem; exports.insertPanel = _chunkWMRDOYPVjs.insertPanel; exports.interpolate = _chunkWMRDOYPVjs.interpolate; exports.interpolateDeep = _chunkWMRDOYPVjs.interpolateDeep; exports.isBundleResponse = _chunkWMRDOYPVjs.isBundleResponse; exports.isEditableVariableType = _chunkWMRDOYPVjs.isEditableVariableType; exports.isInputPanel = _chunkWMRDOYPVjs.isInputPanel; exports.isInputType = _chunkWMRDOYPVjs.isInputType; exports.isLocalDatasource = _chunkWMRDOYPVjs.isLocalDatasource; exports.isReducer = _chunkWMRDOYPVjs.isReducer; exports.isRow = _chunkWMRDOYPVjs.isRow; exports.isSqlDatasource = _chunkWMRDOYPVjs.isSqlDatasource; exports.layoutCanvas = _chunkWMRDOYPVjs.layoutCanvas; exports.layoutDashboard = _chunkWMRDOYPVjs.layoutDashboard; exports.lineColumn = _chunkWMRDOYPVjs.lineColumn; exports.loadGazetteer = _chunkWMRDOYPVjs.loadGazetteer; exports.locate = _chunkWMRDOYPVjs.locate; exports.manifestSchemaIssues = _chunkWMRDOYPVjs.manifestSchemaIssues; exports.mappedResult = _chunkWMRDOYPVjs.mappedResult; exports.mappingProblem = _chunkWMRDOYPVjs.mappingProblem; exports.mappingRow = _chunkWMRDOYPVjs.mappingRow; exports.mappingRows = _chunkWMRDOYPVjs.mappingRows; exports.metricChanges = _chunkWMRDOYPVjs.metricChanges; exports.movePanel = _chunkWMRDOYPVjs.movePanel; exports.newDocument = _chunkWMRDOYPVjs.newDocument; exports.newPanel = _chunkWMRDOYPVjs.newPanel; exports.newVariable = _chunkWMRDOYPVjs.newVariable; exports.nextPanelId = _chunkWMRDOYPVjs.nextPanelId; exports.normalizeRef = _chunkWMRDOYPVjs.normalizeRef; exports.numberFields = _chunkWMRDOYPVjs.numberFields; exports.optionValue = _chunkWMRDOYPVjs.optionValue; exports.overrideProperties = _chunkWMRDOYPVjs.overrideProperties; exports.panelEdits = _chunkWMRDOYPVjs.panelEdits; exports.panelHasQueries = _chunkWMRDOYPVjs.panelHasQueries; exports.panelKey = _chunkWMRDOYPVjs.panelKey; exports.panelOptions = _chunkWMRDOYPVjs.panelOptions; exports.panelOverrides = _chunkWMRDOYPVjs.panelOverrides; exports.panelSize = _chunkWMRDOYPVjs.panelSize; exports.panelSpan = _chunkWMRDOYPVjs.panelSpan; exports.parseClockDigits = _chunkWMRDOYPVjs.parseClockDigits; exports.parseDashboardLink = _chunkWMRDOYPVjs.parseDashboardLink; exports.parseDuration = _chunkWMRDOYPVjs.parseDuration; exports.parseGazetteer = _chunkWMRDOYPVjs.parseGazetteer; exports.parseJsonText = _chunkWMRDOYPVjs.parseJsonText; exports.parseLocalDateTime = _chunkWMRDOYPVjs.parseLocalDateTime; exports.parseRange = _chunkWMRDOYPVjs.parseRange; exports.parseSnippet = _chunkWMRDOYPVjs.parseSnippet; exports.parseTime = _chunkWMRDOYPVjs.parseTime; exports.pasteSnippet = _chunkWMRDOYPVjs.pasteSnippet; exports.placePanel = _chunkWMRDOYPVjs.placePanel; exports.pointerToPath = _chunkWMRDOYPVjs.pointerToPath; exports.prepareDashboard = _chunkWMRDOYPVjs.prepareDashboard; exports.previewPaste = _chunkWMRDOYPVjs.previewPaste; exports.queryPanel = _chunkWMRDOYPVjs.queryPanel; exports.queryParam = _chunkWMRDOYPVjs.queryParam; exports.readConfigFiles = _chunkWMRDOYPVjs.readConfigFiles; exports.readingOrder = _chunkWMRDOYPVjs.readingOrder; exports.reduce = _chunkWMRDOYPVjs.reduce; exports.refineOptions = _chunkWMRDOYPVjs.refineOptions; exports.refreshedVariables = _chunkWMRDOYPVjs.refreshedVariables; exports.removeDocumentFromManifest = _chunkWMRDOYPVjs.removeDocumentFromManifest; exports.removePanel = _chunkWMRDOYPVjs.removePanel; exports.renameDocumentInManifest = _chunkWMRDOYPVjs.renameDocumentInManifest; exports.renameVariableInPanels = _chunkWMRDOYPVjs.renameVariableInPanels; exports.repack = _chunkWMRDOYPVjs.repack; exports.repeatOptions = _chunkWMRDOYPVjs.repeatOptions; exports.resizePanel = _chunkWMRDOYPVjs.resizePanel; exports.resolveColor = _chunkWMRDOYPVjs.resolveColor; exports.resolveFieldConfig = _chunkWMRDOYPVjs.resolveFieldConfig; exports.resolveLinks = _chunkWMRDOYPVjs.resolveLinks; exports.resolveTimezone = _chunkWMRDOYPVjs.resolveTimezone; exports.resolveUrl = _chunkWMRDOYPVjs.resolveUrl; exports.resolveVariables = _chunkWMRDOYPVjs.resolveVariables; exports.revalidateBundle = _chunkWMRDOYPVjs.revalidateBundle; exports.rowsToMappings = _chunkWMRDOYPVjs.rowsToMappings; exports.sampleEntries = _chunkWMRDOYPVjs.sampleEntries; exports.screenDocuments = _chunkWMRDOYPVjs.screenDocuments; exports.screenOfType = _chunkWMRDOYPVjs.screenOfType; exports.selectValue = _chunkWMRDOYPVjs.selectValue; exports.seriesColor = _chunkWMRDOYPVjs.seriesColor; exports.setHiddenOnPhones = _chunkWMRDOYPVjs.setHiddenOnPhones; exports.setJsonValue = _chunkWMRDOYPVjs.setJsonValue; exports.setOption = _chunkWMRDOYPVjs.setOption; exports.setOptionValue = _chunkWMRDOYPVjs.setOptionValue; exports.setOverrides = _chunkWMRDOYPVjs.setOverrides; exports.settleLayout = _chunkWMRDOYPVjs.settleLayout; exports.snapToGrid = _chunkWMRDOYPVjs.snapToGrid; exports.splitPath = _chunkWMRDOYPVjs.splitPath; exports.startOf = _chunkWMRDOYPVjs.startOf; exports.stringifyCompact = _chunkWMRDOYPVjs.stringifyCompact; exports.tabIdFor = _chunkWMRDOYPVjs.tabIdFor; exports.textSuggestions = _chunkWMRDOYPVjs.textSuggestions; exports.thresholdStep = _chunkWMRDOYPVjs.thresholdStep; exports.timeExprError = _chunkWMRDOYPVjs.timeExprError; exports.timeField = _chunkWMRDOYPVjs.timeField; exports.toEntries = _chunkWMRDOYPVjs.toEntries; exports.toMillis = _chunkWMRDOYPVjs.toMillis; exports.toSeries = _chunkWMRDOYPVjs.toSeries; exports.toXYSeries = _chunkWMRDOYPVjs.toXYSeries; exports.uniqueNames = _chunkWMRDOYPVjs.uniqueNames; exports.validateBundle = _chunkWMRDOYPVjs.validateBundle; exports.validateDashboard = _chunkWMRDOYPVjs.validateDashboard; exports.validateManifest = _chunkWMRDOYPVjs.validateManifest; exports.valueColor = _chunkWMRDOYPVjs.valueColor; exports.valueText = _chunkWMRDOYPVjs.valueText; exports.variableDependents = _chunkWMRDOYPVjs.variableDependents; exports.variableInfo = _chunkWMRDOYPVjs.variableInfo; exports.variableNameError = _chunkWMRDOYPVjs.variableNameError; exports.variableOptions = _chunkWMRDOYPVjs.variableOptions; exports.variableOrder = _chunkWMRDOYPVjs.variableOrder; exports.variableReferences = _chunkWMRDOYPVjs.variableReferences; exports.variableUses = _chunkWMRDOYPVjs.variableUses; exports.variableWithCurrent = _chunkWMRDOYPVjs.variableWithCurrent; exports.variableWithFlags = _chunkWMRDOYPVjs.variableWithFlags; exports.variableWithQuery = _chunkWMRDOYPVjs.variableWithQuery; exports.variableWithType = _chunkWMRDOYPVjs.variableWithType; exports.visibleVariables = _chunkWMRDOYPVjs.visibleVariables; exports.zoomRange = _chunkWMRDOYPVjs.zoomRange;
406
+
407
+
408
+
409
+
410
+
411
+
412
+
413
+
414
+
415
+
416
+
417
+
418
+
419
+
420
+
421
+
422
+
423
+
424
+
425
+
426
+
427
+
428
+
429
+
430
+
431
+
432
+
433
+
434
+
435
+
436
+
437
+
438
+
439
+
440
+
441
+
442
+
443
+
444
+
445
+
446
+ exports.ALL = _chunkYUXA7I4Jjs.ALL; exports.BUNDLE_ACCEPT = _chunkYUXA7I4Jjs.BUNDLE_ACCEPT; exports.BUNDLE_TYPE = _chunkYUXA7I4Jjs.BUNDLE_TYPE; exports.CANVAS_GAP = _chunkYUXA7I4Jjs.CANVAS_GAP; exports.CANVAS_ROW_HEADER = _chunkYUXA7I4Jjs.CANVAS_ROW_HEADER; exports.ConfigLoader = _chunkYUXA7I4Jjs.ConfigLoader; exports.DASHBOARD_DS = _chunkYUXA7I4Jjs.DASHBOARD_DS; exports.DEFAULT_GAZETTEER = _chunkYUXA7I4Jjs.DEFAULT_GAZETTEER; exports.EDITABLE_VARIABLE_TYPES = _chunkYUXA7I4Jjs.EDITABLE_VARIABLE_TYPES; exports.GRID_COLUMNS = _chunkYUXA7I4Jjs.GRID_COLUMNS; exports.GROUP_FIELD_TYPES = _chunkYUXA7I4Jjs.GROUP_FIELD_TYPES; exports.GrafanaClient = _chunkYUXA7I4Jjs.GrafanaClient; exports.GrafanaDataSource = _chunkYUXA7I4Jjs.GrafanaDataSource; exports.GrafanaError = _chunkYUXA7I4Jjs.GrafanaError; exports.HttpConfigFiles = _chunkYUXA7I4Jjs.HttpConfigFiles; exports.INPUT_GROUP = _chunkYUXA7I4Jjs.INPUT_GROUP; exports.INPUT_OPTION_KEYS = _chunkYUXA7I4Jjs.INPUT_OPTION_KEYS; exports.INPUT_TYPES = _chunkYUXA7I4Jjs.INPUT_TYPES; exports.LOCAL_DATASOURCE_TYPE = _chunkYUXA7I4Jjs.LOCAL_DATASOURCE_TYPE; exports.LocalDataSource = _chunkYUXA7I4Jjs.LocalDataSource; exports.MANIFEST_VERSION = _chunkYUXA7I4Jjs.MANIFEST_VERSION; exports.MAPPING_TYPES = _chunkYUXA7I4Jjs.MAPPING_TYPES; exports.MemoryEntryStore = _chunkYUXA7I4Jjs.MemoryEntryStore; exports.NAMED_COLORS = _chunkYUXA7I4Jjs.NAMED_COLORS; exports.OPTION_CATEGORIES = _chunkYUXA7I4Jjs.OPTION_CATEGORIES; exports.OVERRIDE_MATCHERS = _chunkYUXA7I4Jjs.OVERRIDE_MATCHERS; exports.PANEL_TYPES = _chunkYUXA7I4Jjs.PANEL_TYPES; exports.REDUCER_LABELS = _chunkYUXA7I4Jjs.REDUCER_LABELS; exports.REFRESH_CHOICES = _chunkYUXA7I4Jjs.REFRESH_CHOICES; exports.RELATIVE_RANGES = _chunkYUXA7I4Jjs.RELATIVE_RANGES; exports.SERIES_PALETTE = _chunkYUXA7I4Jjs.SERIES_PALETTE; exports.SNIPPET_VERSION = _chunkYUXA7I4Jjs.SNIPPET_VERSION; exports.SPECIAL_MATCHES = _chunkYUXA7I4Jjs.SPECIAL_MATCHES; exports.SaveConflictError = _chunkYUXA7I4Jjs.SaveConflictError; exports.TEMPLATE_VERSION = _chunkYUXA7I4Jjs.TEMPLATE_VERSION; exports.TIME_PRESETS = _chunkYUXA7I4Jjs.TIME_PRESETS; exports.UNIT_CHOICES = _chunkYUXA7I4Jjs.UNIT_CHOICES; exports.addTime = _chunkYUXA7I4Jjs.addTime; exports.appSchema = _chunkYUXA7I4Jjs.appSchema; exports.applyDashboardLink = _chunkYUXA7I4Jjs.applyDashboardLink; exports.applyJsonEdits = _chunkYUXA7I4Jjs.applyJsonEdits; exports.applyTemplate = _chunkYUXA7I4Jjs.applyTemplate; exports.applyTransformations = _chunkYUXA7I4Jjs.applyTransformations; exports.assembleBundle = _chunkYUXA7I4Jjs.assembleBundle; exports.assembleFromResponse = _chunkYUXA7I4Jjs.assembleFromResponse; exports.buildFrames = _chunkYUXA7I4Jjs.buildFrames; exports.bundleFromFiles = _chunkYUXA7I4Jjs.bundleFromFiles; exports.bundleRoot = _chunkYUXA7I4Jjs.bundleRoot; exports.calculateInterval = _chunkYUXA7I4Jjs.calculateInterval; exports.checkFiles = _chunkYUXA7I4Jjs.checkFiles; exports.cleanDashboard = _chunkYUXA7I4Jjs.cleanDashboard; exports.cleanPanelOptions = _chunkYUXA7I4Jjs.cleanPanelOptions; exports.collapseRow = _chunkYUXA7I4Jjs.collapseRow; exports.compactGrid = _chunkYUXA7I4Jjs.compactGrid; exports.copyPanels = _chunkYUXA7I4Jjs.copyPanels; exports.dashboardSchema = _chunkYUXA7I4Jjs.dashboardSchema; exports.dashboardSchemaIssues = _chunkYUXA7I4Jjs.dashboardSchemaIssues; exports.dashboardSourceIds = _chunkYUXA7I4Jjs.dashboardSourceIds; exports.defaultFetchJson = _chunkYUXA7I4Jjs.defaultFetchJson; exports.describeRange = _chunkYUXA7I4Jjs.describeRange; exports.diffJson = _chunkYUXA7I4Jjs.diffJson; exports.documentIdFor = _chunkYUXA7I4Jjs.documentIdFor; exports.documentUses = _chunkYUXA7I4Jjs.documentUses; exports.dropTarget = _chunkYUXA7I4Jjs.dropTarget; exports.duplicatePanel = _chunkYUXA7I4Jjs.duplicatePanel; exports.entriesSavedWith = _chunkYUXA7I4Jjs.entriesSavedWith; exports.entriesToItems = _chunkYUXA7I4Jjs.entriesToItems; exports.entryToInputValue = _chunkYUXA7I4Jjs.entryToInputValue; exports.expandRow = _chunkYUXA7I4Jjs.expandRow; exports.fetchBundle = _chunkYUXA7I4Jjs.fetchBundle; exports.fetchJsonWithToken = _chunkYUXA7I4Jjs.fetchJsonWithToken; exports.fieldDisplayName = _chunkYUXA7I4Jjs.fieldDisplayName; exports.fieldMatches = _chunkYUXA7I4Jjs.fieldMatches; exports.formatClock = _chunkYUXA7I4Jjs.formatClock; exports.formatDisplay = _chunkYUXA7I4Jjs.formatDisplay; exports.formatDuration = _chunkYUXA7I4Jjs.formatDuration; exports.formatJsonText = _chunkYUXA7I4Jjs.formatJsonText; exports.formatLocalDateTime = _chunkYUXA7I4Jjs.formatLocalDateTime; exports.formatValue = _chunkYUXA7I4Jjs.formatValue; exports.frameLength = _chunkYUXA7I4Jjs.frameLength; exports.framesToOptions = _chunkYUXA7I4Jjs.framesToOptions; exports.fromWire = _chunkYUXA7I4Jjs.fromWire; exports.getPath = _chunkYUXA7I4Jjs.getPath; exports.gridOffsetPx = _chunkYUXA7I4Jjs.gridOffsetPx; exports.gridUnitsToPx = _chunkYUXA7I4Jjs.gridUnitsToPx; exports.groupFields = _chunkYUXA7I4Jjs.groupFields; exports.groupProblems = _chunkYUXA7I4Jjs.groupProblems; exports.groupToEntries = _chunkYUXA7I4Jjs.groupToEntries; exports.httpFetchJson = _chunkYUXA7I4Jjs.httpFetchJson; exports.initialVariableValues = _chunkYUXA7I4Jjs.initialVariableValues; exports.inputGroups = _chunkYUXA7I4Jjs.inputGroups; exports.inputPanels = _chunkYUXA7I4Jjs.inputPanels; exports.inputProblem = _chunkYUXA7I4Jjs.inputProblem; exports.insertPanel = _chunkYUXA7I4Jjs.insertPanel; exports.interpolate = _chunkYUXA7I4Jjs.interpolate; exports.interpolateDeep = _chunkYUXA7I4Jjs.interpolateDeep; exports.isBundleResponse = _chunkYUXA7I4Jjs.isBundleResponse; exports.isEditableVariableType = _chunkYUXA7I4Jjs.isEditableVariableType; exports.isEmptyItem = _chunkYUXA7I4Jjs.isEmptyItem; exports.isFormPanelType = _chunkYUXA7I4Jjs.isFormPanelType; exports.isInputGroup = _chunkYUXA7I4Jjs.isInputGroup; exports.isInputPanel = _chunkYUXA7I4Jjs.isInputPanel; exports.isInputType = _chunkYUXA7I4Jjs.isInputType; exports.isLocalDatasource = _chunkYUXA7I4Jjs.isLocalDatasource; exports.isReducer = _chunkYUXA7I4Jjs.isReducer; exports.isRow = _chunkYUXA7I4Jjs.isRow; exports.isSqlDatasource = _chunkYUXA7I4Jjs.isSqlDatasource; exports.layoutCanvas = _chunkYUXA7I4Jjs.layoutCanvas; exports.layoutDashboard = _chunkYUXA7I4Jjs.layoutDashboard; exports.lineColumn = _chunkYUXA7I4Jjs.lineColumn; exports.loadGazetteer = _chunkYUXA7I4Jjs.loadGazetteer; exports.locate = _chunkYUXA7I4Jjs.locate; exports.makeTemplate = _chunkYUXA7I4Jjs.makeTemplate; exports.manifestSchemaIssues = _chunkYUXA7I4Jjs.manifestSchemaIssues; exports.mappedResult = _chunkYUXA7I4Jjs.mappedResult; exports.mappingProblem = _chunkYUXA7I4Jjs.mappingProblem; exports.mappingRow = _chunkYUXA7I4Jjs.mappingRow; exports.mappingRows = _chunkYUXA7I4Jjs.mappingRows; exports.metricChanges = _chunkYUXA7I4Jjs.metricChanges; exports.movePanel = _chunkYUXA7I4Jjs.movePanel; exports.newDocument = _chunkYUXA7I4Jjs.newDocument; exports.newPanel = _chunkYUXA7I4Jjs.newPanel; exports.newSaveId = _chunkYUXA7I4Jjs.newSaveId; exports.newVariable = _chunkYUXA7I4Jjs.newVariable; exports.nextPanelId = _chunkYUXA7I4Jjs.nextPanelId; exports.normalizeRef = _chunkYUXA7I4Jjs.normalizeRef; exports.numberFields = _chunkYUXA7I4Jjs.numberFields; exports.optionValue = _chunkYUXA7I4Jjs.optionValue; exports.overrideProperties = _chunkYUXA7I4Jjs.overrideProperties; exports.panelEdits = _chunkYUXA7I4Jjs.panelEdits; exports.panelHasQueries = _chunkYUXA7I4Jjs.panelHasQueries; exports.panelKey = _chunkYUXA7I4Jjs.panelKey; exports.panelMetrics = _chunkYUXA7I4Jjs.panelMetrics; exports.panelOptions = _chunkYUXA7I4Jjs.panelOptions; exports.panelOverrides = _chunkYUXA7I4Jjs.panelOverrides; exports.panelSize = _chunkYUXA7I4Jjs.panelSize; exports.panelSpan = _chunkYUXA7I4Jjs.panelSpan; exports.parseClockDigits = _chunkYUXA7I4Jjs.parseClockDigits; exports.parseDashboardLink = _chunkYUXA7I4Jjs.parseDashboardLink; exports.parseDuration = _chunkYUXA7I4Jjs.parseDuration; exports.parseGazetteer = _chunkYUXA7I4Jjs.parseGazetteer; exports.parseJsonText = _chunkYUXA7I4Jjs.parseJsonText; exports.parseLocalDateTime = _chunkYUXA7I4Jjs.parseLocalDateTime; exports.parseRange = _chunkYUXA7I4Jjs.parseRange; exports.parseSnippet = _chunkYUXA7I4Jjs.parseSnippet; exports.parseTemplate = _chunkYUXA7I4Jjs.parseTemplate; exports.parseTime = _chunkYUXA7I4Jjs.parseTime; exports.pasteSnippet = _chunkYUXA7I4Jjs.pasteSnippet; exports.placePanel = _chunkYUXA7I4Jjs.placePanel; exports.plainInputPanels = _chunkYUXA7I4Jjs.plainInputPanels; exports.pointerToPath = _chunkYUXA7I4Jjs.pointerToPath; exports.prepareDashboard = _chunkYUXA7I4Jjs.prepareDashboard; exports.previewPaste = _chunkYUXA7I4Jjs.previewPaste; exports.queryPanel = _chunkYUXA7I4Jjs.queryPanel; exports.queryParam = _chunkYUXA7I4Jjs.queryParam; exports.readConfigFiles = _chunkYUXA7I4Jjs.readConfigFiles; exports.readingOrder = _chunkYUXA7I4Jjs.readingOrder; exports.reduce = _chunkYUXA7I4Jjs.reduce; exports.refineOptions = _chunkYUXA7I4Jjs.refineOptions; exports.refreshedVariables = _chunkYUXA7I4Jjs.refreshedVariables; exports.removeDocumentFromManifest = _chunkYUXA7I4Jjs.removeDocumentFromManifest; exports.removePanel = _chunkYUXA7I4Jjs.removePanel; exports.renameDocumentInManifest = _chunkYUXA7I4Jjs.renameDocumentInManifest; exports.renameMetrics = _chunkYUXA7I4Jjs.renameMetrics; exports.renameVariableInPanels = _chunkYUXA7I4Jjs.renameVariableInPanels; exports.repack = _chunkYUXA7I4Jjs.repack; exports.repeatOptions = _chunkYUXA7I4Jjs.repeatOptions; exports.resizePanel = _chunkYUXA7I4Jjs.resizePanel; exports.resolveColor = _chunkYUXA7I4Jjs.resolveColor; exports.resolveFieldConfig = _chunkYUXA7I4Jjs.resolveFieldConfig; exports.resolveLinks = _chunkYUXA7I4Jjs.resolveLinks; exports.resolveTimezone = _chunkYUXA7I4Jjs.resolveTimezone; exports.resolveUrl = _chunkYUXA7I4Jjs.resolveUrl; exports.resolveVariables = _chunkYUXA7I4Jjs.resolveVariables; exports.revalidateBundle = _chunkYUXA7I4Jjs.revalidateBundle; exports.rowsToMappings = _chunkYUXA7I4Jjs.rowsToMappings; exports.sameSave = _chunkYUXA7I4Jjs.sameSave; exports.sampleEntries = _chunkYUXA7I4Jjs.sampleEntries; exports.screenDocuments = _chunkYUXA7I4Jjs.screenDocuments; exports.screenOfType = _chunkYUXA7I4Jjs.screenOfType; exports.selectValue = _chunkYUXA7I4Jjs.selectValue; exports.seriesColor = _chunkYUXA7I4Jjs.seriesColor; exports.setHiddenOnPhones = _chunkYUXA7I4Jjs.setHiddenOnPhones; exports.setJsonValue = _chunkYUXA7I4Jjs.setJsonValue; exports.setOption = _chunkYUXA7I4Jjs.setOption; exports.setOptionValue = _chunkYUXA7I4Jjs.setOptionValue; exports.setOverrides = _chunkYUXA7I4Jjs.setOverrides; exports.settleLayout = _chunkYUXA7I4Jjs.settleLayout; exports.snapToGrid = _chunkYUXA7I4Jjs.snapToGrid; exports.splitPath = _chunkYUXA7I4Jjs.splitPath; exports.startOf = _chunkYUXA7I4Jjs.startOf; exports.stringifyCompact = _chunkYUXA7I4Jjs.stringifyCompact; exports.tabIdFor = _chunkYUXA7I4Jjs.tabIdFor; exports.templateNeeds = _chunkYUXA7I4Jjs.templateNeeds; exports.textSuggestions = _chunkYUXA7I4Jjs.textSuggestions; exports.thresholdStep = _chunkYUXA7I4Jjs.thresholdStep; exports.timeExprError = _chunkYUXA7I4Jjs.timeExprError; exports.timeField = _chunkYUXA7I4Jjs.timeField; exports.toEntries = _chunkYUXA7I4Jjs.toEntries; exports.toMillis = _chunkYUXA7I4Jjs.toMillis; exports.toSeries = _chunkYUXA7I4Jjs.toSeries; exports.toXYSeries = _chunkYUXA7I4Jjs.toXYSeries; exports.uniqueNames = _chunkYUXA7I4Jjs.uniqueNames; exports.validateBundle = _chunkYUXA7I4Jjs.validateBundle; exports.validateDashboard = _chunkYUXA7I4Jjs.validateDashboard; exports.validateManifest = _chunkYUXA7I4Jjs.validateManifest; exports.valueColor = _chunkYUXA7I4Jjs.valueColor; exports.valueText = _chunkYUXA7I4Jjs.valueText; exports.variableDependents = _chunkYUXA7I4Jjs.variableDependents; exports.variableInfo = _chunkYUXA7I4Jjs.variableInfo; exports.variableNameError = _chunkYUXA7I4Jjs.variableNameError; exports.variableOptions = _chunkYUXA7I4Jjs.variableOptions; exports.variableOrder = _chunkYUXA7I4Jjs.variableOrder; exports.variableReferences = _chunkYUXA7I4Jjs.variableReferences; exports.variableUses = _chunkYUXA7I4Jjs.variableUses; exports.variableWithCurrent = _chunkYUXA7I4Jjs.variableWithCurrent; exports.variableWithFlags = _chunkYUXA7I4Jjs.variableWithFlags; exports.variableWithQuery = _chunkYUXA7I4Jjs.variableWithQuery; exports.variableWithType = _chunkYUXA7I4Jjs.variableWithType; exports.visibleVariables = _chunkYUXA7I4Jjs.visibleVariables; exports.zoomRange = _chunkYUXA7I4Jjs.zoomRange;
@@ -9,10 +9,12 @@ import {
9
9
  DEFAULT_GAZETTEER,
10
10
  EDITABLE_VARIABLE_TYPES,
11
11
  GRID_COLUMNS,
12
+ GROUP_FIELD_TYPES,
12
13
  GrafanaClient,
13
14
  GrafanaDataSource,
14
15
  GrafanaError,
15
16
  HttpConfigFiles,
17
+ INPUT_GROUP,
16
18
  INPUT_OPTION_KEYS,
17
19
  INPUT_TYPES,
18
20
  LOCAL_DATASOURCE_TYPE,
@@ -31,12 +33,14 @@ import {
31
33
  SNIPPET_VERSION,
32
34
  SPECIAL_MATCHES,
33
35
  SaveConflictError,
36
+ TEMPLATE_VERSION,
34
37
  TIME_PRESETS,
35
38
  UNIT_CHOICES,
36
39
  addTime,
37
40
  appSchema,
38
41
  applyDashboardLink,
39
42
  applyJsonEdits,
43
+ applyTemplate,
40
44
  applyTransformations,
41
45
  assembleBundle,
42
46
  assembleFromResponse,
@@ -61,6 +65,7 @@ import {
61
65
  dropTarget,
62
66
  duplicatePanel,
63
67
  entriesSavedWith,
68
+ entriesToItems,
64
69
  entryToInputValue,
65
70
  expandRow,
66
71
  fetchBundle,
@@ -79,8 +84,12 @@ import {
79
84
  getPath,
80
85
  gridOffsetPx,
81
86
  gridUnitsToPx,
87
+ groupFields,
88
+ groupProblems,
89
+ groupToEntries,
82
90
  httpFetchJson,
83
91
  initialVariableValues,
92
+ inputGroups,
84
93
  inputPanels,
85
94
  inputProblem,
86
95
  insertPanel,
@@ -88,6 +97,9 @@ import {
88
97
  interpolateDeep,
89
98
  isBundleResponse,
90
99
  isEditableVariableType,
100
+ isEmptyItem,
101
+ isFormPanelType,
102
+ isInputGroup,
91
103
  isInputPanel,
92
104
  isInputType,
93
105
  isLocalDatasource,
@@ -99,6 +111,7 @@ import {
99
111
  lineColumn,
100
112
  loadGazetteer,
101
113
  locate,
114
+ makeTemplate,
102
115
  manifestSchemaIssues,
103
116
  mappedResult,
104
117
  mappingProblem,
@@ -108,6 +121,7 @@ import {
108
121
  movePanel,
109
122
  newDocument,
110
123
  newPanel,
124
+ newSaveId,
111
125
  newVariable,
112
126
  nextPanelId,
113
127
  normalizeRef,
@@ -117,6 +131,7 @@ import {
117
131
  panelEdits,
118
132
  panelHasQueries,
119
133
  panelKey,
134
+ panelMetrics,
120
135
  panelOptions,
121
136
  panelOverrides,
122
137
  panelSize,
@@ -129,9 +144,11 @@ import {
129
144
  parseLocalDateTime,
130
145
  parseRange,
131
146
  parseSnippet,
147
+ parseTemplate,
132
148
  parseTime,
133
149
  pasteSnippet,
134
150
  placePanel,
151
+ plainInputPanels,
135
152
  pointerToPath,
136
153
  prepareDashboard,
137
154
  previewPaste,
@@ -145,6 +162,7 @@ import {
145
162
  removeDocumentFromManifest,
146
163
  removePanel,
147
164
  renameDocumentInManifest,
165
+ renameMetrics,
148
166
  renameVariableInPanels,
149
167
  repack,
150
168
  repeatOptions,
@@ -157,6 +175,7 @@ import {
157
175
  resolveVariables,
158
176
  revalidateBundle,
159
177
  rowsToMappings,
178
+ sameSave,
160
179
  sampleEntries,
161
180
  screenDocuments,
162
181
  screenOfType,
@@ -173,6 +192,7 @@ import {
173
192
  startOf,
174
193
  stringifyCompact,
175
194
  tabIdFor,
195
+ templateNeeds,
176
196
  textSuggestions,
177
197
  thresholdStep,
178
198
  timeExprError,
@@ -200,7 +220,7 @@ import {
200
220
  variableWithType,
201
221
  visibleVariables,
202
222
  zoomRange
203
- } from "../chunk-ATRMUHKJ.mjs";
223
+ } from "../chunk-BW6HKFAB.mjs";
204
224
  export {
205
225
  ALL,
206
226
  BUNDLE_ACCEPT,
@@ -212,10 +232,12 @@ export {
212
232
  DEFAULT_GAZETTEER,
213
233
  EDITABLE_VARIABLE_TYPES,
214
234
  GRID_COLUMNS,
235
+ GROUP_FIELD_TYPES,
215
236
  GrafanaClient,
216
237
  GrafanaDataSource,
217
238
  GrafanaError,
218
239
  HttpConfigFiles,
240
+ INPUT_GROUP,
219
241
  INPUT_OPTION_KEYS,
220
242
  INPUT_TYPES,
221
243
  LOCAL_DATASOURCE_TYPE,
@@ -234,12 +256,14 @@ export {
234
256
  SNIPPET_VERSION,
235
257
  SPECIAL_MATCHES,
236
258
  SaveConflictError,
259
+ TEMPLATE_VERSION,
237
260
  TIME_PRESETS,
238
261
  UNIT_CHOICES,
239
262
  addTime,
240
263
  appSchema,
241
264
  applyDashboardLink,
242
265
  applyJsonEdits,
266
+ applyTemplate,
243
267
  applyTransformations,
244
268
  assembleBundle,
245
269
  assembleFromResponse,
@@ -264,6 +288,7 @@ export {
264
288
  dropTarget,
265
289
  duplicatePanel,
266
290
  entriesSavedWith,
291
+ entriesToItems,
267
292
  entryToInputValue,
268
293
  expandRow,
269
294
  fetchBundle,
@@ -282,8 +307,12 @@ export {
282
307
  getPath,
283
308
  gridOffsetPx,
284
309
  gridUnitsToPx,
310
+ groupFields,
311
+ groupProblems,
312
+ groupToEntries,
285
313
  httpFetchJson,
286
314
  initialVariableValues,
315
+ inputGroups,
287
316
  inputPanels,
288
317
  inputProblem,
289
318
  insertPanel,
@@ -291,6 +320,9 @@ export {
291
320
  interpolateDeep,
292
321
  isBundleResponse,
293
322
  isEditableVariableType,
323
+ isEmptyItem,
324
+ isFormPanelType,
325
+ isInputGroup,
294
326
  isInputPanel,
295
327
  isInputType,
296
328
  isLocalDatasource,
@@ -302,6 +334,7 @@ export {
302
334
  lineColumn,
303
335
  loadGazetteer,
304
336
  locate,
337
+ makeTemplate,
305
338
  manifestSchemaIssues,
306
339
  mappedResult,
307
340
  mappingProblem,
@@ -311,6 +344,7 @@ export {
311
344
  movePanel,
312
345
  newDocument,
313
346
  newPanel,
347
+ newSaveId,
314
348
  newVariable,
315
349
  nextPanelId,
316
350
  normalizeRef,
@@ -320,6 +354,7 @@ export {
320
354
  panelEdits,
321
355
  panelHasQueries,
322
356
  panelKey,
357
+ panelMetrics,
323
358
  panelOptions,
324
359
  panelOverrides,
325
360
  panelSize,
@@ -332,9 +367,11 @@ export {
332
367
  parseLocalDateTime,
333
368
  parseRange,
334
369
  parseSnippet,
370
+ parseTemplate,
335
371
  parseTime,
336
372
  pasteSnippet,
337
373
  placePanel,
374
+ plainInputPanels,
338
375
  pointerToPath,
339
376
  prepareDashboard,
340
377
  previewPaste,
@@ -348,6 +385,7 @@ export {
348
385
  removeDocumentFromManifest,
349
386
  removePanel,
350
387
  renameDocumentInManifest,
388
+ renameMetrics,
351
389
  renameVariableInPanels,
352
390
  repack,
353
391
  repeatOptions,
@@ -360,6 +398,7 @@ export {
360
398
  resolveVariables,
361
399
  revalidateBundle,
362
400
  rowsToMappings,
401
+ sameSave,
363
402
  sampleEntries,
364
403
  screenDocuments,
365
404
  screenOfType,
@@ -376,6 +415,7 @@ export {
376
415
  startOf,
377
416
  stringifyCompact,
378
417
  tabIdFor,
418
+ templateNeeds,
379
419
  textSuggestions,
380
420
  thresholdStep,
381
421
  timeExprError,
@@ -63,7 +63,54 @@ export type InputPanel = Panel & {
63
63
  options: InputOptions;
64
64
  };
65
65
  export declare const isInputPanel: (p: Panel) => p is InputPanel;
66
+ /** One field of an input-group: an input panel without `id` or `gridPos`, `span` columns (of 24) wide in its item. */
67
+ export interface GroupField {
68
+ type: InputType;
69
+ title?: string;
70
+ description?: string;
71
+ /** Width inside an item, out of 24 (default 24). */
72
+ span?: number;
73
+ options: InputOptions;
74
+ }
75
+ /**
76
+ * input-group: fields filled in once per item, for as many items as the user adds (the
77
+ * entree and sides of a meal, the sets of a workout). Each field records to its own
78
+ * metric; entries of one item share `save` and `item`.
79
+ */
80
+ export interface InputGroupOptions {
81
+ /** The inputs each item has. Any input type but input-counter. */
82
+ fields: GroupField[];
83
+ /** Items are titled "<itemTitle> 1", "<itemTitle> 2"… (default "Item"). */
84
+ itemTitle?: string;
85
+ /** A field's metric whose value titles its item once it has one. */
86
+ titleFrom?: string;
87
+ /** Fewest items Save accepts (default 0). Items left completely empty don't count. */
88
+ min?: number;
89
+ /** Most items the user can add. */
90
+ max?: number;
91
+ /** Empty items a new form starts with (default 1), or "last" for the items saved last time. */
92
+ start?: number | 'last';
93
+ /** Text of the add button (default "Add <itemTitle>"). */
94
+ addLabel?: string;
95
+ }
96
+ export declare const INPUT_GROUP = "input-group";
97
+ export type InputGroupPanel = Panel & {
98
+ type: typeof INPUT_GROUP;
99
+ options: InputGroupOptions;
100
+ };
101
+ /** Panel types that belong in forms: the inputs and input-group. */
102
+ export declare const isFormPanelType: (type: string) => type is InputType | "input-group";
103
+ export declare const isInputGroup: (p: Panel) => p is InputGroupPanel;
104
+ /** Input types a group's fields can have. */
105
+ export declare const GROUP_FIELD_TYPES: ("input-number" | "input-slider" | "input-select" | "input-toggle" | "input-rating" | "input-text" | "input-duration")[];
106
+ /** A group's fields as input panels, the shape the input components and helpers take. Fields without a metric are left out. */
107
+ export declare function groupFields(group: InputGroupPanel): InputPanel[];
108
+ /** Every input that records, groups' fields included. */
66
109
  export declare function inputPanels(dashboard: Dashboard): InputPanel[];
110
+ /** The form's input-group panels. */
111
+ export declare function inputGroups(dashboard: Dashboard): InputGroupPanel[];
112
+ /** Inputs outside groups. */
113
+ export declare function plainInputPanels(dashboard: Dashboard): InputPanel[];
67
114
  /**
68
115
  * input-duration: lap-timer style MM:SS.hh. Digits fill from the right as they're typed,
69
116
  * so "13245" reads 01:32.45, which is recorded as 92.45 seconds.
@@ -80,9 +127,32 @@ export interface Entry {
80
127
  ts: number;
81
128
  value: number | null;
82
129
  text: string | null;
130
+ /** Id of the Save that recorded it, shared by every entry of that Save. Missing on entries recorded before saves had ids. */
131
+ save?: string | null;
132
+ /** Position (0, 1, 2…) of the input-group item it belongs to; null outside a group. */
133
+ item?: number | null;
83
134
  }
84
135
  export type NewEntry = Omit<Entry, 'id'>;
85
- export declare function toEntries(panel: InputPanel, value: InputValue, ts: number): NewEntry[];
136
+ /** Where an entry came from: the Save, and the group item within it. */
137
+ export interface EntryOrigin {
138
+ save?: string | null;
139
+ item?: number | null;
140
+ }
141
+ export declare function toEntries(panel: InputPanel, value: InputValue, ts: number, origin?: EntryOrigin): NewEntry[];
142
+ /** An id for one Save. Unique enough to tell saves apart, without needing a crypto API. */
143
+ export declare function newSaveId(now?: number): string;
144
+ /** The values of one input-group item, keyed by field metric. */
145
+ export type GroupItem = Record<string, InputValue>;
146
+ /** Whether an item has nothing filled in. Empty items aren't recorded, checked or counted. Toggles don't count as filled in. */
147
+ export declare function isEmptyItem(group: InputGroupPanel, item: GroupItem): boolean;
148
+ /** Entries for a group's items, numbered in order, skipping empty items. */
149
+ export declare function groupToEntries(group: InputGroupPanel, items: GroupItem[], ts: number, save?: string | null): NewEntry[];
150
+ /** Rebuilds a group's items from the entries of one Save, in item order. */
151
+ export declare function entriesToItems(group: InputGroupPanel, entries: Entry[]): GroupItem[];
152
+ /** A group's problems before Save: too few items, or items with fields that need fixing ("Set 3: Reps is required"). */
153
+ export declare function groupProblems(group: InputGroupPanel, items: GroupItem[]): string[];
154
+ /** The Save `entries` came from, and the entries of it among `candidates` (by `save`, or by time for entries without one). */
155
+ export declare function sameSave(entry: Entry, candidates: Entry[]): Entry[];
86
156
  /** Why a value can't be saved as it is: empty when required, or outside a number input's min and max. */
87
157
  export declare function inputProblem(panel: InputPanel, value: InputValue): string | undefined;
88
158
  export declare function entryToInputValue(panel: InputPanel, entry: Entry | undefined): InputValue;
@@ -75,6 +75,8 @@ export declare class MemoryEntryStore implements EntryStore {
75
75
  value: number | null;
76
76
  text: string | null;
77
77
  ts: number;
78
+ save?: string | null | undefined;
79
+ item?: number | null | undefined;
78
80
  }[]>;
79
81
  list({ metrics, from, to }: {
80
82
  metrics: string[];
@@ -89,6 +91,8 @@ export declare class MemoryEntryStore implements EntryStore {
89
91
  value: number | null;
90
92
  text: string | null;
91
93
  ts: number;
94
+ save?: string | null | undefined;
95
+ item?: number | null | undefined;
92
96
  }[]>;
93
97
  subscribe(listener: () => void): () => boolean;
94
98
  private emit;
@@ -12,6 +12,10 @@ export interface PanelSnippet {
12
12
  /** Every metric the panels record (inputs) or read (local queries). */
13
13
  metrics: string[];
14
14
  }
15
+ /** The metrics a panel records or reads, leaving out ones taken from a variable ($metric). */
16
+ export declare function panelMetrics(p: Panel): string[];
17
+ /** `panels` (and the panels inside rows) with every recorded or read metric renamed per `map`. */
18
+ export declare function renameMetrics(panels: Panel[], map: Record<string, string>): Panel[];
15
19
  /**
16
20
  * The top-level panels at `indices` as a snippet. A row brings the panels under it, down to the
17
21
  * next row; a collapsed row already holds them. Ids go, positions become relative to the block.
@@ -0,0 +1,74 @@
1
+ import { type AppManifest, type Tab } from './manifest';
2
+ import type { Dashboard } from './schema';
3
+ export declare const TEMPLATE_VERSION = 1;
4
+ export interface TemplateDocument {
5
+ kind: 'form' | 'dashboard';
6
+ /** The document's id where the template was made; it gets a new one if the config has it already. */
7
+ id: string;
8
+ dashboard: Dashboard;
9
+ }
10
+ export interface AppTemplate {
11
+ $modelform: 'template';
12
+ version: number;
13
+ title: string;
14
+ description: string;
15
+ documents: TemplateDocument[];
16
+ /** Tabs showing the template's documents, in the manifest's shape. Added only when asked for. */
17
+ tabs: Tab[];
18
+ /** What the forms record and the dashboards read. */
19
+ metrics: string[];
20
+ }
21
+ /**
22
+ * A template of the config's documents `ids` (forms and dashboards by their manifest id), with
23
+ * the tabs that show only those documents.
24
+ */
25
+ export declare function makeTemplate(manifest: Pick<AppManifest, 'tabs'>, documents: Record<string, Dashboard>, ids: string[], meta: {
26
+ title: string;
27
+ description?: string;
28
+ }): AppTemplate;
29
+ /**
30
+ * Reads a template, or says why it isn't one. Documents that can't render are refused; tabs
31
+ * that show anything outside the template are dropped; metrics are worked out again.
32
+ */
33
+ export declare function parseTemplate(text: string): {
34
+ template: AppTemplate;
35
+ } | {
36
+ error: string;
37
+ };
38
+ export interface TemplateNeeds {
39
+ /** Metrics the chosen documents read that neither their forms nor the config record: worth asking to map. */
40
+ unknown: string[];
41
+ /** The template's forms whose metrics the config already records (directly or once mapped): ones it could do without. */
42
+ covered: string[];
43
+ }
44
+ /**
45
+ * What using a template would need decided, given the metrics the config's forms record, which
46
+ * of its documents are chosen (all by default), and any mapping so far.
47
+ */
48
+ export declare function templateNeeds(template: AppTemplate, recorded: Iterable<string>, chosen?: string[], metrics?: Record<string, string>): TemplateNeeds;
49
+ export interface ApplyOptions {
50
+ /** Ids of the template's documents to add. Defaults to all of them. */
51
+ documents?: string[];
52
+ /** Metrics to read and record as ones the config already has, e.g. { weight: 'body-weight' }. */
53
+ metrics?: Record<string, string>;
54
+ /** Ids of the template's tabs to add. Defaults to none. */
55
+ tabs?: string[];
56
+ }
57
+ export interface AppliedTemplate {
58
+ /** The manifest's new text: the documents listed, and any tabs added. */
59
+ manifest: string;
60
+ /** New files by path, e.g. "dashboards/progress.json". */
61
+ files: Record<string, string>;
62
+ /** Each added document's id in the config, by its id in the template. */
63
+ ids: Record<string, string>;
64
+ /** Ids of the tabs added, in order. */
65
+ tabs: string[];
66
+ }
67
+ /**
68
+ * Adds a template's documents to a config: a file each under forms/ or dashboards/, listed in
69
+ * the manifest, with ids and paths that clash renamed (`workout-2`) and metrics mapped. Tabs
70
+ * asked for are added at the end, pointing at the new ids; one left showing nothing is skipped.
71
+ * `paths` are the files the config has (saved or not), so a new one never lands on one.
72
+ * Returns the manifest's new text, keeping its formatting, and the new files.
73
+ */
74
+ export declare function applyTemplate(manifestText: string, paths: Iterable<string>, template: AppTemplate, options?: ApplyOptions): AppliedTemplate;
package/dist/index.d.ts CHANGED
@@ -6,6 +6,6 @@ export { RenderBoundary } from './ui/RenderBoundary';
6
6
  export { DashboardToolbar, Chip } from './ui/Toolbar';
7
7
  export { InputForm, type InputFormProps } from './ui/inputs/InputForm';
8
8
  export { Calendar } from './ui/TimeRangeSheet';
9
- export { InputFormContext, useInputForm, type InputFormState } from './ui/inputs/formContext';
9
+ export { groupKey, InputFormContext, useInputForm, type FormGroup, type InputFormState } from './ui/inputs/formContext';
10
10
  export { registerPanel } from './ui/panels/registry';
11
11
  export { Legend, NoData, type PanelProps } from './ui/panels/common';