@researchdatabox/sails-ng-common 0.2.0 → 5.0.0-RC1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/config/base-field-component.model.d.ts +26 -0
- package/dist/src/config/base-field-component.model.js +29 -0
- package/dist/src/config/base-field-component.outline.d.ts +108 -0
- package/dist/src/config/base-field-component.outline.js +3 -0
- package/dist/src/config/component/accordion.model.d.ts +103 -0
- package/dist/src/config/component/accordion.model.js +127 -0
- package/dist/src/config/component/accordion.outline.d.ts +162 -0
- package/dist/src/config/component/accordion.outline.js +13 -0
- package/dist/src/config/component/action-row-layout.model.d.ts +28 -0
- package/dist/src/config/component/action-row-layout.model.js +35 -0
- package/dist/src/config/component/action-row-layout.outline.d.ts +36 -0
- package/dist/src/config/component/action-row-layout.outline.js +6 -0
- package/dist/src/config/component/cancel-button.model.d.ts +48 -0
- package/dist/src/config/component/cancel-button.model.js +58 -0
- package/dist/src/config/component/cancel-button.outline.d.ts +85 -0
- package/dist/src/config/component/cancel-button.outline.js +6 -0
- package/dist/src/config/component/checkbox-input.model.d.ts +67 -0
- package/dist/src/config/component/checkbox-input.model.js +79 -0
- package/dist/src/config/component/checkbox-input.outline.d.ts +93 -0
- package/dist/src/config/component/checkbox-input.outline.js +8 -0
- package/dist/src/config/component/checkbox-tree.model.d.ts +68 -0
- package/dist/src/config/component/checkbox-tree.model.js +80 -0
- package/dist/src/config/component/checkbox-tree.outline.d.ts +105 -0
- package/dist/src/config/component/checkbox-tree.outline.js +8 -0
- package/dist/src/config/component/content.model.d.ts +46 -0
- package/dist/src/config/component/content.model.js +56 -0
- package/dist/src/config/component/content.outline.d.ts +74 -0
- package/dist/src/config/component/content.outline.js +6 -0
- package/dist/src/config/component/data-location.model.d.ts +83 -0
- package/dist/src/config/component/data-location.model.js +95 -0
- package/dist/src/config/component/data-location.outline.d.ts +124 -0
- package/dist/src/config/component/data-location.outline.js +6 -0
- package/dist/src/config/component/date-input.model.d.ts +67 -0
- package/dist/src/config/component/date-input.model.js +80 -0
- package/dist/src/config/component/date-input.outline.d.ts +88 -0
- package/dist/src/config/component/date-input.outline.js +8 -0
- package/dist/src/config/component/default-layout.model.d.ts +22 -0
- package/dist/src/config/component/default-layout.model.js +30 -0
- package/dist/src/config/component/default-layout.outline.d.ts +29 -0
- package/dist/src/config/component/default-layout.outline.js +5 -0
- package/dist/src/config/component/delete-button.model.d.ts +46 -0
- package/dist/src/config/component/delete-button.model.js +48 -0
- package/dist/src/config/component/delete-button.outline.d.ts +89 -0
- package/dist/src/config/component/delete-button.outline.js +5 -0
- package/dist/src/config/component/dropdown-input.model.d.ts +65 -0
- package/dist/src/config/component/dropdown-input.model.js +78 -0
- package/dist/src/config/component/dropdown-input.outline.d.ts +92 -0
- package/dist/src/config/component/dropdown-input.outline.js +8 -0
- package/dist/src/config/component/file-upload.model.d.ts +67 -0
- package/dist/src/config/component/file-upload.model.js +81 -0
- package/dist/src/config/component/file-upload.outline.d.ts +99 -0
- package/dist/src/config/component/file-upload.outline.js +8 -0
- package/dist/src/config/component/group.model.d.ts +61 -0
- package/dist/src/config/component/group.model.js +75 -0
- package/dist/src/config/component/group.outline.d.ts +83 -0
- package/dist/src/config/component/group.outline.js +8 -0
- package/dist/src/config/component/inline-layout.model.d.ts +22 -0
- package/dist/src/config/component/inline-layout.model.js +29 -0
- package/dist/src/config/component/inline-layout.outline.d.ts +29 -0
- package/dist/src/config/component/inline-layout.outline.js +5 -0
- package/dist/src/config/component/integration-status.model.d.ts +49 -0
- package/dist/src/config/component/integration-status.model.js +65 -0
- package/dist/src/config/component/integration-status.outline.d.ts +61 -0
- package/dist/src/config/component/integration-status.outline.js +5 -0
- package/dist/src/config/component/map.model.d.ts +69 -0
- package/dist/src/config/component/map.model.js +86 -0
- package/dist/src/config/component/map.outline.d.ts +110 -0
- package/dist/src/config/component/map.outline.js +8 -0
- package/dist/src/config/component/pdf-list.model.d.ts +68 -0
- package/dist/src/config/component/pdf-list.model.js +71 -0
- package/dist/src/config/component/pdf-list.outline.d.ts +97 -0
- package/dist/src/config/component/pdf-list.outline.js +6 -0
- package/dist/src/config/component/publish-data-location-refresh.model.d.ts +39 -0
- package/dist/src/config/component/publish-data-location-refresh.model.js +52 -0
- package/dist/src/config/component/publish-data-location-refresh.outline.d.ts +58 -0
- package/dist/src/config/component/publish-data-location-refresh.outline.js +5 -0
- package/dist/src/config/component/publish-data-location-selector.model.d.ts +78 -0
- package/dist/src/config/component/publish-data-location-selector.model.js +104 -0
- package/dist/src/config/component/publish-data-location-selector.outline.d.ts +110 -0
- package/dist/src/config/component/publish-data-location-selector.outline.js +6 -0
- package/dist/src/config/component/question-tree.helper.d.ts +58 -0
- package/dist/src/config/component/question-tree.helper.js +291 -0
- package/dist/src/config/component/question-tree.model.d.ts +64 -0
- package/dist/src/config/component/question-tree.model.js +80 -0
- package/dist/src/config/component/question-tree.outline.d.ts +314 -0
- package/dist/src/config/component/question-tree.outline.js +9 -0
- package/dist/src/config/component/radio-input.model.d.ts +65 -0
- package/dist/src/config/component/radio-input.model.js +77 -0
- package/dist/src/config/component/radio-input.outline.d.ts +91 -0
- package/dist/src/config/component/radio-input.outline.js +8 -0
- package/dist/src/config/component/record-metadata-retriever.model.d.ts +41 -0
- package/dist/src/config/component/record-metadata-retriever.model.js +57 -0
- package/dist/src/config/component/record-metadata-retriever.outline.d.ts +53 -0
- package/dist/src/config/component/record-metadata-retriever.outline.js +5 -0
- package/dist/src/config/component/record-selector.model.d.ts +61 -0
- package/dist/src/config/component/record-selector.model.js +61 -0
- package/dist/src/config/component/record-selector.outline.d.ts +91 -0
- package/dist/src/config/component/record-selector.outline.js +6 -0
- package/dist/src/config/component/repeatable.model.d.ts +91 -0
- package/dist/src/config/component/repeatable.model.js +112 -0
- package/dist/src/config/component/repeatable.outline.d.ts +115 -0
- package/dist/src/config/component/repeatable.outline.js +10 -0
- package/dist/src/config/component/reusable.model.d.ts +42 -0
- package/dist/src/config/component/reusable.model.js +57 -0
- package/dist/src/config/component/reusable.outline.d.ts +55 -0
- package/dist/src/config/component/reusable.outline.js +6 -0
- package/dist/src/config/component/rich-text-editor.model.d.ts +65 -0
- package/dist/src/config/component/rich-text-editor.model.js +79 -0
- package/dist/src/config/component/rich-text-editor.outline.d.ts +92 -0
- package/dist/src/config/component/rich-text-editor.outline.js +8 -0
- package/dist/src/config/component/save-button.model.d.ts +49 -0
- package/dist/src/config/component/save-button.model.js +59 -0
- package/dist/src/config/component/save-button.outline.d.ts +90 -0
- package/dist/src/config/component/save-button.outline.js +6 -0
- package/dist/src/config/component/save-status.model.d.ts +42 -0
- package/dist/src/config/component/save-status.model.js +60 -0
- package/dist/src/config/component/save-status.outline.d.ts +58 -0
- package/dist/src/config/component/save-status.outline.js +6 -0
- package/dist/src/config/component/simple-input.model.d.ts +62 -0
- package/dist/src/config/component/simple-input.model.js +75 -0
- package/dist/src/config/component/simple-input.outline.d.ts +86 -0
- package/dist/src/config/component/simple-input.outline.js +9 -0
- package/dist/src/config/component/suggested-validation-summary.model.d.ts +45 -0
- package/dist/src/config/component/suggested-validation-summary.model.js +61 -0
- package/dist/src/config/component/suggested-validation-summary.outline.d.ts +57 -0
- package/dist/src/config/component/suggested-validation-summary.outline.js +5 -0
- package/dist/src/config/component/tab-content.model.d.ts +63 -0
- package/dist/src/config/component/tab-content.model.js +77 -0
- package/dist/src/config/component/tab-content.outline.d.ts +98 -0
- package/dist/src/config/component/tab-content.outline.js +8 -0
- package/dist/src/config/component/tab-nav-button.model.d.ts +45 -0
- package/dist/src/config/component/tab-nav-button.model.js +55 -0
- package/dist/src/config/component/tab-nav-button.outline.d.ts +70 -0
- package/dist/src/config/component/tab-nav-button.outline.js +6 -0
- package/dist/src/config/component/tab.model.d.ts +71 -0
- package/dist/src/config/component/tab.model.js +84 -0
- package/dist/src/config/component/tab.outline.d.ts +112 -0
- package/dist/src/config/component/tab.outline.js +9 -0
- package/dist/src/config/component/text-area.model.d.ts +63 -0
- package/dist/src/config/component/text-area.model.js +76 -0
- package/dist/src/config/component/text-area.outline.d.ts +87 -0
- package/dist/src/config/component/text-area.outline.js +8 -0
- package/dist/src/config/component/typeahead-input.model.d.ts +83 -0
- package/dist/src/config/component/typeahead-input.model.js +97 -0
- package/dist/src/config/component/typeahead-input.outline.d.ts +199 -0
- package/dist/src/config/component/typeahead-input.outline.js +10 -0
- package/dist/src/config/component/validation-summary.model.d.ts +42 -0
- package/dist/src/config/component/validation-summary.model.js +60 -0
- package/dist/src/config/component/validation-summary.outline.d.ts +63 -0
- package/dist/src/config/component/validation-summary.outline.js +6 -0
- package/dist/src/config/dictionary.model.d.ts +648 -0
- package/dist/src/config/dictionary.model.js +181 -0
- package/dist/src/config/dictionary.outline.d.ts +96 -0
- package/dist/src/config/dictionary.outline.js +3 -0
- package/dist/src/config/field-component.model.d.ts +7 -0
- package/dist/src/config/field-component.model.js +11 -0
- package/dist/src/config/field-component.outline.d.ts +20 -0
- package/dist/src/config/field-component.outline.js +3 -0
- package/dist/src/config/field-layout.model.d.ts +19 -0
- package/dist/src/config/field-layout.model.js +23 -0
- package/dist/src/config/field-layout.outline.d.ts +42 -0
- package/dist/src/config/field-layout.outline.js +3 -0
- package/dist/src/config/field-model.model.d.ts +21 -0
- package/dist/src/config/field-model.model.js +24 -0
- package/dist/src/config/field-model.outline.d.ts +63 -0
- package/dist/src/config/field-model.outline.js +3 -0
- package/dist/src/config/field.model.d.ts +12 -0
- package/dist/src/config/field.model.js +12 -0
- package/dist/src/config/field.outline.d.ts +19 -0
- package/dist/src/config/field.outline.js +3 -0
- package/dist/src/config/form-behaviour.outline.d.ts +128 -0
- package/dist/src/config/form-behaviour.outline.js +40 -0
- package/dist/src/config/form-component.model.d.ts +38 -0
- package/dist/src/config/form-component.model.js +36 -0
- package/dist/src/config/form-component.outline.d.ts +305 -0
- package/dist/src/config/form-component.outline.js +27 -0
- package/dist/src/config/form-config.model.d.ts +33 -0
- package/dist/src/config/form-config.model.js +36 -0
- package/dist/src/config/form-config.outline.d.ts +111 -0
- package/dist/src/config/form-config.outline.js +3 -0
- package/dist/src/config/form-override.model.d.ts +146 -0
- package/dist/src/config/form-override.model.js +1523 -0
- package/dist/src/config/form-override.outline.d.ts +15 -0
- package/dist/src/config/form-override.outline.js +3 -0
- package/dist/src/config/form-prehydrate.outline.d.ts +17 -0
- package/dist/src/config/form-prehydrate.outline.js +5 -0
- package/dist/src/config/form-types.model.d.ts +6 -0
- package/dist/src/config/form-types.model.js +23 -0
- package/dist/src/config/form-types.outline.d.ts +48 -0
- package/dist/src/config/form-types.outline.js +137 -0
- package/dist/src/config/helpers.d.ts +31 -0
- package/dist/src/config/helpers.js +122 -0
- package/dist/src/config/names/naming-helpers.d.ts +112 -0
- package/dist/src/config/names/naming-helpers.js +188 -0
- package/dist/src/config/names/query-helpers.d.ts +43 -0
- package/dist/src/config/names/query-helpers.js +59 -0
- package/dist/src/config/shared.outline.d.ts +54 -0
- package/dist/src/config/shared.outline.js +41 -0
- package/dist/src/config/visitor/base.model.d.ts +143 -0
- package/dist/src/config/visitor/base.model.js +336 -0
- package/dist/src/config/visitor/base.outline.d.ts +146 -0
- package/dist/src/config/visitor/base.outline.js +3 -0
- package/dist/src/config/visitor/common.model.d.ts +119 -0
- package/dist/src/config/visitor/common.model.js +422 -0
- package/dist/src/date-format-helpers.d.ts +1 -0
- package/dist/src/date-format-helpers.js +21 -0
- package/dist/src/handlebars-helpers.d.ts +258 -0
- package/dist/src/handlebars-helpers.js +715 -0
- package/dist/src/html-helpers.d.ts +15 -0
- package/dist/src/html-helpers.js +42 -0
- package/dist/src/index.d.ts +118 -3
- package/dist/src/index.js +127 -2
- package/dist/src/jsonata-helpers.d.ts +40 -0
- package/dist/src/jsonata-helpers.js +118 -0
- package/dist/src/logger.interface.d.ts +14 -0
- package/dist/src/logger.interface.js +3 -0
- package/dist/src/record.model.d.ts +23 -0
- package/dist/src/record.model.js +19 -1
- package/dist/src/report.model.d.ts +46 -0
- package/dist/src/status.model.d.ts +22 -0
- package/dist/src/status.model.js +28 -0
- package/dist/src/template.outline.d.ts +82 -0
- package/dist/src/template.outline.js +14 -0
- package/dist/src/translation-helpers.d.ts +26 -0
- package/dist/src/translation-helpers.js +71 -0
- package/dist/src/validation/form.model.d.ts +306 -24
- package/dist/src/validation/form.model.js +29 -1
- package/dist/src/validation/helpers.d.ts +15 -7
- package/dist/src/validation/helpers.js +49 -13
- package/dist/src/validation/validators-support.d.ts +39 -2
- package/dist/src/validation/validators-support.js +162 -12
- package/dist/src/validation/validators.d.ts +28 -0
- package/dist/src/validation/validators.js +531 -0
- package/package.json +51 -34
- package/LICENSE +0 -674
- package/dist/src/validation/index.d.ts +0 -1
- package/dist/src/validation/index.js +0 -18
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { FieldComponentConfigFrameKindType, FieldComponentConfigKindType, FieldComponentDefinitionFrameKindType, FieldComponentDefinitionKindType, FieldModelConfigFrameKindType, FieldModelConfigKindType, FieldModelDefinitionFrameKindType, FieldModelDefinitionKindType, FormComponentDefinitionFrameKindType, FormComponentDefinitionKindType } from "../shared.outline";
|
|
2
|
+
import { FieldComponentConfigFrame, FieldComponentConfigOutline, FieldComponentDefinitionFrame, FieldComponentDefinitionOutline } from "../field-component.outline";
|
|
3
|
+
import { FieldModelConfigFrame, FieldModelConfigOutline, FieldModelDefinitionFrame, FieldModelDefinitionOutline } from "../field-model.outline";
|
|
4
|
+
import { FormComponentDefinitionFrame, FormComponentDefinitionOutline } from "../form-component.outline";
|
|
5
|
+
import { AvailableFieldLayoutDefinitionFrames, AvailableFieldLayoutDefinitionOutlines } from "../dictionary.outline";
|
|
6
|
+
import type { HistoricalVocabMode } from "./dropdown-input.outline";
|
|
7
|
+
export declare const CheckboxTreeComponentName: "CheckboxTreeComponent";
|
|
8
|
+
export type CheckboxTreeComponentNameType = typeof CheckboxTreeComponentName;
|
|
9
|
+
export interface CheckboxTreeNode {
|
|
10
|
+
id: string;
|
|
11
|
+
label: string;
|
|
12
|
+
value: string;
|
|
13
|
+
notation?: string;
|
|
14
|
+
parent?: string | null;
|
|
15
|
+
children?: CheckboxTreeNode[];
|
|
16
|
+
hasChildren?: boolean;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export interface CheckboxTreeSelectedItem {
|
|
20
|
+
notation: string;
|
|
21
|
+
label: string;
|
|
22
|
+
name: string;
|
|
23
|
+
genealogy?: string[];
|
|
24
|
+
}
|
|
25
|
+
export interface CheckboxTreeFieldComponentConfigFrame extends FieldComponentConfigFrame {
|
|
26
|
+
vocabRef?: string;
|
|
27
|
+
inlineVocab?: boolean;
|
|
28
|
+
historicalVocabMode?: HistoricalVocabMode;
|
|
29
|
+
treeData?: CheckboxTreeNode[];
|
|
30
|
+
leafOnly?: boolean;
|
|
31
|
+
maxDepth?: number;
|
|
32
|
+
labelTemplate?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface CheckboxTreeFieldComponentConfigOutline extends CheckboxTreeFieldComponentConfigFrame, FieldComponentConfigOutline {
|
|
35
|
+
}
|
|
36
|
+
export interface CheckboxTreeFieldComponentDefinitionFrame extends FieldComponentDefinitionFrame {
|
|
37
|
+
class: CheckboxTreeComponentNameType;
|
|
38
|
+
config?: CheckboxTreeFieldComponentConfigFrame;
|
|
39
|
+
}
|
|
40
|
+
export interface CheckboxTreeFieldComponentDefinitionOutline extends CheckboxTreeFieldComponentDefinitionFrame, FieldComponentDefinitionOutline {
|
|
41
|
+
class: CheckboxTreeComponentNameType;
|
|
42
|
+
config?: CheckboxTreeFieldComponentConfigOutline;
|
|
43
|
+
}
|
|
44
|
+
export declare const CheckboxTreeModelName: "CheckboxTreeModel";
|
|
45
|
+
export type CheckboxTreeModelNameType = typeof CheckboxTreeModelName;
|
|
46
|
+
export type CheckboxTreeModelValueType = CheckboxTreeSelectedItem[];
|
|
47
|
+
export interface CheckboxTreeFieldModelConfigFrame extends FieldModelConfigFrame<CheckboxTreeModelValueType> {
|
|
48
|
+
}
|
|
49
|
+
export interface CheckboxTreeFieldModelConfigOutline extends CheckboxTreeFieldModelConfigFrame, FieldModelConfigOutline<CheckboxTreeModelValueType> {
|
|
50
|
+
}
|
|
51
|
+
export interface CheckboxTreeFieldModelDefinitionFrame extends FieldModelDefinitionFrame<CheckboxTreeModelValueType> {
|
|
52
|
+
class: CheckboxTreeModelNameType;
|
|
53
|
+
config?: CheckboxTreeFieldModelConfigFrame;
|
|
54
|
+
}
|
|
55
|
+
export interface CheckboxTreeFieldModelDefinitionOutline extends CheckboxTreeFieldModelDefinitionFrame, FieldModelDefinitionOutline<CheckboxTreeModelValueType> {
|
|
56
|
+
class: CheckboxTreeModelNameType;
|
|
57
|
+
config?: CheckboxTreeFieldModelConfigOutline;
|
|
58
|
+
}
|
|
59
|
+
export interface CheckboxTreeFormComponentDefinitionFrame extends FormComponentDefinitionFrame {
|
|
60
|
+
component: CheckboxTreeFieldComponentDefinitionFrame;
|
|
61
|
+
model?: CheckboxTreeFieldModelDefinitionFrame;
|
|
62
|
+
layout?: AvailableFieldLayoutDefinitionFrames;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Configures hierarchical checkbox selection from tree-shaped option data.
|
|
66
|
+
*
|
|
67
|
+
* @extensionPoint Use `CheckboxTreeComponent` with its model to collect one or more values from a hierarchy.
|
|
68
|
+
* @see https://github.com/redbox-mint/redbox-portal/wiki/Configuring-Record-Forms
|
|
69
|
+
*/
|
|
70
|
+
export interface CheckboxTreeFormComponentDefinitionOutline extends CheckboxTreeFormComponentDefinitionFrame, FormComponentDefinitionOutline {
|
|
71
|
+
component: CheckboxTreeFieldComponentDefinitionOutline;
|
|
72
|
+
model?: CheckboxTreeFieldModelDefinitionOutline;
|
|
73
|
+
layout?: AvailableFieldLayoutDefinitionOutlines;
|
|
74
|
+
}
|
|
75
|
+
export type CheckboxTreeTypes = {
|
|
76
|
+
kind: FieldComponentConfigFrameKindType;
|
|
77
|
+
class: CheckboxTreeFieldComponentConfigFrame;
|
|
78
|
+
} | {
|
|
79
|
+
kind: FieldComponentDefinitionFrameKindType;
|
|
80
|
+
class: CheckboxTreeFieldComponentDefinitionFrame;
|
|
81
|
+
} | {
|
|
82
|
+
kind: FieldModelConfigFrameKindType;
|
|
83
|
+
class: CheckboxTreeFieldModelConfigFrame;
|
|
84
|
+
} | {
|
|
85
|
+
kind: FieldModelDefinitionFrameKindType;
|
|
86
|
+
class: CheckboxTreeFieldModelDefinitionFrame;
|
|
87
|
+
} | {
|
|
88
|
+
kind: FormComponentDefinitionFrameKindType;
|
|
89
|
+
class: CheckboxTreeFormComponentDefinitionFrame;
|
|
90
|
+
} | {
|
|
91
|
+
kind: FieldComponentConfigKindType;
|
|
92
|
+
class: CheckboxTreeFieldComponentConfigOutline;
|
|
93
|
+
} | {
|
|
94
|
+
kind: FieldComponentDefinitionKindType;
|
|
95
|
+
class: CheckboxTreeFieldComponentDefinitionOutline;
|
|
96
|
+
} | {
|
|
97
|
+
kind: FieldModelConfigKindType;
|
|
98
|
+
class: CheckboxTreeFieldModelConfigOutline;
|
|
99
|
+
} | {
|
|
100
|
+
kind: FieldModelDefinitionKindType;
|
|
101
|
+
class: CheckboxTreeFieldModelDefinitionOutline;
|
|
102
|
+
} | {
|
|
103
|
+
kind: FormComponentDefinitionKindType;
|
|
104
|
+
class: CheckboxTreeFormComponentDefinitionOutline;
|
|
105
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CheckboxTreeModelName = exports.CheckboxTreeComponentName = void 0;
|
|
4
|
+
/* Checkbox Tree Component */
|
|
5
|
+
exports.CheckboxTreeComponentName = "CheckboxTreeComponent";
|
|
6
|
+
/* Checkbox Tree Model */
|
|
7
|
+
exports.CheckboxTreeModelName = "CheckboxTreeModel";
|
|
8
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hlY2tib3gtdHJlZS5vdXRsaW5lLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2NvbmZpZy9jb21wb25lbnQvY2hlY2tib3gtdHJlZS5vdXRsaW5lLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQXVCQSw2QkFBNkI7QUFDaEIsUUFBQSx5QkFBeUIsR0FBRyx1QkFBZ0MsQ0FBQztBQTRDMUUseUJBQXlCO0FBQ1osUUFBQSxxQkFBcUIsR0FBRyxtQkFBNEIsQ0FBQyJ9
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { FormConfigVisitorOutline } from "../visitor/base.outline";
|
|
2
|
+
import { FieldComponentConfig, FieldComponentDefinition } from "../field-component.model";
|
|
3
|
+
import { FormComponentDefinition } from "../form-component.model";
|
|
4
|
+
import { AvailableFieldLayoutDefinitionOutlines } from "../dictionary.outline";
|
|
5
|
+
import { ContentFieldComponentConfigOutline, ContentFieldComponentDefinitionOutline, ContentFormComponentDefinitionOutline } from "./content.outline";
|
|
6
|
+
export declare class ContentFieldComponentConfig extends FieldComponentConfig implements ContentFieldComponentConfigOutline {
|
|
7
|
+
template?: string;
|
|
8
|
+
content?: unknown;
|
|
9
|
+
contentIsTranslationCode?: boolean;
|
|
10
|
+
translationContentFormat?: 'plain' | 'html';
|
|
11
|
+
outputFormat?: string;
|
|
12
|
+
constructor();
|
|
13
|
+
}
|
|
14
|
+
export declare class ContentFieldComponentDefinition extends FieldComponentDefinition implements ContentFieldComponentDefinitionOutline {
|
|
15
|
+
class: "ContentComponent";
|
|
16
|
+
config?: ContentFieldComponentConfig;
|
|
17
|
+
constructor();
|
|
18
|
+
accept(visitor: FormConfigVisitorOutline): Promise<void>;
|
|
19
|
+
}
|
|
20
|
+
export declare class ContentFormComponentDefinition extends FormComponentDefinition implements ContentFormComponentDefinitionOutline {
|
|
21
|
+
component: ContentFieldComponentDefinitionOutline;
|
|
22
|
+
model?: never;
|
|
23
|
+
layout?: AvailableFieldLayoutDefinitionOutlines;
|
|
24
|
+
constructor();
|
|
25
|
+
accept(visitor: FormConfigVisitorOutline): Promise<void>;
|
|
26
|
+
}
|
|
27
|
+
export declare const ContentMap: ({
|
|
28
|
+
kind: "FieldComponentConfigKind";
|
|
29
|
+
def: typeof ContentFieldComponentConfig;
|
|
30
|
+
class?: undefined;
|
|
31
|
+
} | {
|
|
32
|
+
kind: "FieldComponentDefinitionKind";
|
|
33
|
+
def: typeof ContentFieldComponentDefinition;
|
|
34
|
+
class: "ContentComponent";
|
|
35
|
+
} | {
|
|
36
|
+
kind: "FormComponentDefinitionKind";
|
|
37
|
+
def: typeof ContentFormComponentDefinition;
|
|
38
|
+
class: "ContentComponent";
|
|
39
|
+
})[];
|
|
40
|
+
export declare const ContentDefaults: {
|
|
41
|
+
FormComponentDefinitionKind: {
|
|
42
|
+
ContentComponent: {
|
|
43
|
+
FieldComponentDefinitionKind: "ContentComponent";
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ContentDefaults = exports.ContentMap = exports.ContentFormComponentDefinition = exports.ContentFieldComponentDefinition = exports.ContentFieldComponentConfig = void 0;
|
|
4
|
+
const shared_outline_1 = require("../shared.outline");
|
|
5
|
+
const field_component_model_1 = require("../field-component.model");
|
|
6
|
+
const form_component_model_1 = require("../form-component.model");
|
|
7
|
+
const content_outline_1 = require("./content.outline");
|
|
8
|
+
/* Content Component */
|
|
9
|
+
class ContentFieldComponentConfig extends field_component_model_1.FieldComponentConfig {
|
|
10
|
+
template;
|
|
11
|
+
content;
|
|
12
|
+
contentIsTranslationCode;
|
|
13
|
+
translationContentFormat;
|
|
14
|
+
outputFormat;
|
|
15
|
+
constructor() {
|
|
16
|
+
super();
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.ContentFieldComponentConfig = ContentFieldComponentConfig;
|
|
20
|
+
class ContentFieldComponentDefinition extends field_component_model_1.FieldComponentDefinition {
|
|
21
|
+
class = content_outline_1.ContentComponentName;
|
|
22
|
+
config;
|
|
23
|
+
constructor() {
|
|
24
|
+
super();
|
|
25
|
+
}
|
|
26
|
+
async accept(visitor) {
|
|
27
|
+
await visitor.visitContentFieldComponentDefinition(this);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.ContentFieldComponentDefinition = ContentFieldComponentDefinition;
|
|
31
|
+
/* Content Form Component */
|
|
32
|
+
class ContentFormComponentDefinition extends form_component_model_1.FormComponentDefinition {
|
|
33
|
+
component;
|
|
34
|
+
model;
|
|
35
|
+
layout;
|
|
36
|
+
constructor() {
|
|
37
|
+
super();
|
|
38
|
+
}
|
|
39
|
+
async accept(visitor) {
|
|
40
|
+
await visitor.visitContentFormComponentDefinition(this);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
exports.ContentFormComponentDefinition = ContentFormComponentDefinition;
|
|
44
|
+
exports.ContentMap = [
|
|
45
|
+
{ kind: shared_outline_1.FieldComponentConfigKind, def: ContentFieldComponentConfig },
|
|
46
|
+
{ kind: shared_outline_1.FieldComponentDefinitionKind, def: ContentFieldComponentDefinition, class: content_outline_1.ContentComponentName },
|
|
47
|
+
{ kind: shared_outline_1.FormComponentDefinitionKind, def: ContentFormComponentDefinition, class: content_outline_1.ContentComponentName },
|
|
48
|
+
];
|
|
49
|
+
exports.ContentDefaults = {
|
|
50
|
+
[shared_outline_1.FormComponentDefinitionKind]: {
|
|
51
|
+
[content_outline_1.ContentComponentName]: {
|
|
52
|
+
[shared_outline_1.FieldComponentDefinitionKind]: content_outline_1.ContentComponentName,
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGVudC5tb2RlbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy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ksRUFBRSx5Q0FBd0IsRUFBRSxHQUFHLEVBQUUsMkJBQTJCLEVBQUM7SUFDbEUsRUFBQyxJQUFJLEVBQUUsNkNBQTRCLEVBQUUsR0FBRyxFQUFFLCtCQUErQixFQUFFLEtBQUssRUFBRSxzQ0FBb0IsRUFBQztJQUN2RyxFQUFDLElBQUksRUFBRSw0Q0FBMkIsRUFBRSxHQUFHLEVBQUUsOEJBQThCLEVBQUUsS0FBSyxFQUFFLHNDQUFvQixFQUFDO0NBQ3hHLENBQUM7QUFDVyxRQUFBLGVBQWUsR0FBRztJQUMzQixDQUFDLDRDQUEyQixDQUFDLEVBQUU7UUFDM0IsQ0FBQyxzQ0FBb0IsQ0FBQyxFQUFFO1lBQ3BCLENBQUMsNkNBQTRCLENBQUMsRUFBRSxzQ0FBb0I7U0FDdkQ7S0FDSjtDQUNKLENBQUMifQ==
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { AvailableFieldLayoutDefinitionFrames, AvailableFieldLayoutDefinitionOutlines } from "../dictionary.outline";
|
|
2
|
+
import { FormComponentDefinitionFrame, FormComponentDefinitionOutline } from "../form-component.outline";
|
|
3
|
+
import { FieldComponentConfigFrame, FieldComponentConfigOutline, FieldComponentDefinitionFrame, FieldComponentDefinitionOutline } from "../field-component.outline";
|
|
4
|
+
import { FieldComponentConfigFrameKindType, FieldComponentConfigKindType, FieldComponentDefinitionFrameKindType, FieldComponentDefinitionKindType, FormComponentDefinitionFrameKindType, FormComponentDefinitionKindType } from "../shared.outline";
|
|
5
|
+
export declare const ContentComponentName: "ContentComponent";
|
|
6
|
+
export type ContentComponentNameType = typeof ContentComponentName;
|
|
7
|
+
export interface ContentFieldComponentConfigFrame extends FieldComponentConfigFrame {
|
|
8
|
+
/**
|
|
9
|
+
* The template that can be used for setting content in innerHtml.
|
|
10
|
+
*/
|
|
11
|
+
template?: string;
|
|
12
|
+
/**
|
|
13
|
+
* The value available to the template as `content`.
|
|
14
|
+
* Set 'content' to static content, with no template, to just show the static content.
|
|
15
|
+
*/
|
|
16
|
+
content?: unknown;
|
|
17
|
+
/**
|
|
18
|
+
* Optional auxiliary template context used by view-mode transforms.
|
|
19
|
+
*/
|
|
20
|
+
outputFormat?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Whether the `content` value should be treated as a translation key.
|
|
23
|
+
*/
|
|
24
|
+
contentIsTranslationCode?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* The expected format of translated content when `contentIsTranslationCode` is true.
|
|
27
|
+
*/
|
|
28
|
+
translationContentFormat?: 'plain' | 'html';
|
|
29
|
+
}
|
|
30
|
+
export interface ContentFieldComponentConfigOutline extends ContentFieldComponentConfigFrame, FieldComponentConfigOutline {
|
|
31
|
+
}
|
|
32
|
+
export interface ContentFieldComponentDefinitionFrame extends FieldComponentDefinitionFrame {
|
|
33
|
+
class: ContentComponentNameType;
|
|
34
|
+
config?: ContentFieldComponentConfigFrame;
|
|
35
|
+
}
|
|
36
|
+
export interface ContentFieldComponentDefinitionOutline extends ContentFieldComponentDefinitionFrame, FieldComponentDefinitionOutline {
|
|
37
|
+
class: ContentComponentNameType;
|
|
38
|
+
config?: ContentFieldComponentConfigOutline;
|
|
39
|
+
}
|
|
40
|
+
export interface ContentFormComponentDefinitionFrame extends FormComponentDefinitionFrame {
|
|
41
|
+
component: ContentFieldComponentDefinitionFrame;
|
|
42
|
+
model?: never;
|
|
43
|
+
layout?: AvailableFieldLayoutDefinitionFrames;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Renders configured informational content without contributing a model value.
|
|
47
|
+
*
|
|
48
|
+
* @extensionPoint Use `ContentComponent` in FormConfig for headings, guidance, or other non-field content.
|
|
49
|
+
* @see https://github.com/redbox-mint/redbox-portal/wiki/Configuring-Record-Forms
|
|
50
|
+
*/
|
|
51
|
+
export interface ContentFormComponentDefinitionOutline extends ContentFormComponentDefinitionFrame, FormComponentDefinitionOutline {
|
|
52
|
+
component: ContentFieldComponentDefinitionOutline;
|
|
53
|
+
model?: never;
|
|
54
|
+
layout?: AvailableFieldLayoutDefinitionOutlines;
|
|
55
|
+
}
|
|
56
|
+
export type ContentTypes = {
|
|
57
|
+
kind: FieldComponentConfigFrameKindType;
|
|
58
|
+
class: ContentFieldComponentConfigFrame;
|
|
59
|
+
} | {
|
|
60
|
+
kind: FieldComponentDefinitionFrameKindType;
|
|
61
|
+
class: ContentFieldComponentDefinitionFrame;
|
|
62
|
+
} | {
|
|
63
|
+
kind: FormComponentDefinitionFrameKindType;
|
|
64
|
+
class: ContentFormComponentDefinitionFrame;
|
|
65
|
+
} | {
|
|
66
|
+
kind: FieldComponentConfigKindType;
|
|
67
|
+
class: ContentFieldComponentConfigOutline;
|
|
68
|
+
} | {
|
|
69
|
+
kind: FieldComponentDefinitionKindType;
|
|
70
|
+
class: ContentFieldComponentDefinitionOutline;
|
|
71
|
+
} | {
|
|
72
|
+
kind: FormComponentDefinitionKindType;
|
|
73
|
+
class: ContentFormComponentDefinitionOutline;
|
|
74
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ContentComponentName = void 0;
|
|
4
|
+
/* Content Component */
|
|
5
|
+
exports.ContentComponentName = `ContentComponent`;
|
|
6
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGVudC5vdXRsaW5lLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2NvbmZpZy9jb21wb25lbnQvY29udGVudC5vdXRsaW5lLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQWNBLHVCQUF1QjtBQUVWLFFBQUEsb0JBQW9CLEdBQUcsa0JBQTJCLENBQUMifQ==
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { FieldModelConfig, FieldModelDefinition } from "../field-model.model";
|
|
2
|
+
import { FormComponentDefinition } from "../form-component.model";
|
|
3
|
+
import { FormConfigVisitorOutline } from "../visitor/base.outline";
|
|
4
|
+
import { FieldComponentConfig, FieldComponentDefinition } from "../field-component.model";
|
|
5
|
+
import { AvailableFieldLayoutDefinitionOutlines } from "../dictionary.outline";
|
|
6
|
+
import { DataLocationFieldComponentConfigOutline, DataLocationFieldComponentDefinitionOutline, DataLocationFieldModelConfigOutline, DataLocationFieldModelDefinitionOutline, DataLocationFormComponentDefinitionOutline, DataLocationModelValueType, DataLocationOption, DataLocationValueType } from "./data-location.outline";
|
|
7
|
+
import { FileUploadSourceType } from "./file-upload.outline";
|
|
8
|
+
export declare class DataLocationFieldComponentConfig extends FieldComponentConfig implements DataLocationFieldComponentConfigOutline {
|
|
9
|
+
restrictions?: Record<string, unknown>;
|
|
10
|
+
enabledSources: FileUploadSourceType[];
|
|
11
|
+
companionUrl?: string;
|
|
12
|
+
allowUploadWithoutSave: boolean;
|
|
13
|
+
uppyDashboardNote: string;
|
|
14
|
+
tusHeaders?: Record<string, string>;
|
|
15
|
+
notesEnabled: boolean;
|
|
16
|
+
iscEnabled: boolean;
|
|
17
|
+
iscHeader: string;
|
|
18
|
+
defaultSelect: string;
|
|
19
|
+
securityClassificationOptions: DataLocationOption[];
|
|
20
|
+
locationAddText: string;
|
|
21
|
+
typeHeader: string;
|
|
22
|
+
locationHeader: string;
|
|
23
|
+
notesHeader: string;
|
|
24
|
+
columns: string[] | Record<string, unknown>[];
|
|
25
|
+
editNotesButtonText: string;
|
|
26
|
+
editNotesTitle: string;
|
|
27
|
+
cancelEditNotesButtonText: string;
|
|
28
|
+
applyEditNotesButtonText: string;
|
|
29
|
+
editNotesCssClasses: string;
|
|
30
|
+
dataTypes: DataLocationOption[];
|
|
31
|
+
dataTypePlaceholder: string;
|
|
32
|
+
dataTypeLookup: Record<string, string>;
|
|
33
|
+
hideNotesForLocationTypes: string[];
|
|
34
|
+
}
|
|
35
|
+
export declare class DataLocationFieldComponentDefinition extends FieldComponentDefinition implements DataLocationFieldComponentDefinitionOutline {
|
|
36
|
+
class: "DataLocationComponent";
|
|
37
|
+
config?: DataLocationFieldComponentConfigOutline;
|
|
38
|
+
accept(visitor: FormConfigVisitorOutline): Promise<void>;
|
|
39
|
+
}
|
|
40
|
+
export declare class DataLocationFieldModelConfig extends FieldModelConfig<DataLocationModelValueType> implements DataLocationFieldModelConfigOutline {
|
|
41
|
+
defaultValue: DataLocationValueType[];
|
|
42
|
+
constructor();
|
|
43
|
+
}
|
|
44
|
+
export declare class DataLocationFieldModelDefinition extends FieldModelDefinition<DataLocationModelValueType> implements DataLocationFieldModelDefinitionOutline {
|
|
45
|
+
class: "DataLocationModel";
|
|
46
|
+
config?: DataLocationFieldModelConfigOutline;
|
|
47
|
+
accept(visitor: FormConfigVisitorOutline): Promise<void>;
|
|
48
|
+
}
|
|
49
|
+
export declare class DataLocationFormComponentDefinition extends FormComponentDefinition implements DataLocationFormComponentDefinitionOutline {
|
|
50
|
+
component: DataLocationFieldComponentDefinitionOutline;
|
|
51
|
+
model?: DataLocationFieldModelDefinitionOutline;
|
|
52
|
+
layout?: AvailableFieldLayoutDefinitionOutlines;
|
|
53
|
+
accept(visitor: FormConfigVisitorOutline): Promise<void>;
|
|
54
|
+
}
|
|
55
|
+
export declare const DataLocationMap: ({
|
|
56
|
+
kind: "FieldComponentConfigKind";
|
|
57
|
+
def: typeof DataLocationFieldComponentConfig;
|
|
58
|
+
class?: undefined;
|
|
59
|
+
} | {
|
|
60
|
+
kind: "FieldComponentDefinitionKind";
|
|
61
|
+
def: typeof DataLocationFieldComponentDefinition;
|
|
62
|
+
class: "DataLocationComponent";
|
|
63
|
+
} | {
|
|
64
|
+
kind: "FieldModelConfigKind";
|
|
65
|
+
def: typeof DataLocationFieldModelConfig;
|
|
66
|
+
class?: undefined;
|
|
67
|
+
} | {
|
|
68
|
+
kind: "FieldModelDefinitionKind";
|
|
69
|
+
def: typeof DataLocationFieldModelDefinition;
|
|
70
|
+
class: "DataLocationModel";
|
|
71
|
+
} | {
|
|
72
|
+
kind: "FormComponentDefinitionKind";
|
|
73
|
+
def: typeof DataLocationFormComponentDefinition;
|
|
74
|
+
class: "DataLocationComponent";
|
|
75
|
+
})[];
|
|
76
|
+
export declare const DataLocationDefaults: {
|
|
77
|
+
FormComponentDefinitionKind: {
|
|
78
|
+
DataLocationComponent: {
|
|
79
|
+
FieldComponentDefinitionKind: "DataLocationComponent";
|
|
80
|
+
FieldModelDefinitionKind: "DataLocationModel";
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DataLocationDefaults = exports.DataLocationMap = exports.DataLocationFormComponentDefinition = exports.DataLocationFieldModelDefinition = exports.DataLocationFieldModelConfig = exports.DataLocationFieldComponentDefinition = exports.DataLocationFieldComponentConfig = void 0;
|
|
4
|
+
const field_model_model_1 = require("../field-model.model");
|
|
5
|
+
const form_component_model_1 = require("../form-component.model");
|
|
6
|
+
const shared_outline_1 = require("../shared.outline");
|
|
7
|
+
const field_component_model_1 = require("../field-component.model");
|
|
8
|
+
const data_location_outline_1 = require("./data-location.outline");
|
|
9
|
+
class DataLocationFieldComponentConfig extends field_component_model_1.FieldComponentConfig {
|
|
10
|
+
restrictions;
|
|
11
|
+
enabledSources = [];
|
|
12
|
+
companionUrl;
|
|
13
|
+
allowUploadWithoutSave = false;
|
|
14
|
+
uppyDashboardNote = "Maximum upload size: 1 Gb per file";
|
|
15
|
+
tusHeaders;
|
|
16
|
+
notesEnabled = true;
|
|
17
|
+
iscEnabled = false;
|
|
18
|
+
iscHeader = "Information Security Classification";
|
|
19
|
+
defaultSelect = "confidential";
|
|
20
|
+
securityClassificationOptions = [];
|
|
21
|
+
locationAddText = "";
|
|
22
|
+
typeHeader = "Type";
|
|
23
|
+
locationHeader = "Location";
|
|
24
|
+
notesHeader = "Notes";
|
|
25
|
+
columns = [];
|
|
26
|
+
editNotesButtonText = "Edit";
|
|
27
|
+
editNotesTitle = "Edit Notes";
|
|
28
|
+
cancelEditNotesButtonText = "Cancel";
|
|
29
|
+
applyEditNotesButtonText = "Apply";
|
|
30
|
+
editNotesCssClasses = "form-control";
|
|
31
|
+
dataTypes = [
|
|
32
|
+
{ label: "URL", value: "url" },
|
|
33
|
+
{ label: "Physical location", value: "physical" },
|
|
34
|
+
{ label: "File path", value: "file" },
|
|
35
|
+
{ label: "Attachment", value: "attachment" }
|
|
36
|
+
];
|
|
37
|
+
dataTypePlaceholder = "";
|
|
38
|
+
dataTypeLookup = {
|
|
39
|
+
url: "URL",
|
|
40
|
+
physical: "Physical location",
|
|
41
|
+
file: "File path",
|
|
42
|
+
attachment: "Attachment"
|
|
43
|
+
};
|
|
44
|
+
hideNotesForLocationTypes = [];
|
|
45
|
+
}
|
|
46
|
+
exports.DataLocationFieldComponentConfig = DataLocationFieldComponentConfig;
|
|
47
|
+
class DataLocationFieldComponentDefinition extends field_component_model_1.FieldComponentDefinition {
|
|
48
|
+
class = data_location_outline_1.DataLocationComponentName;
|
|
49
|
+
config;
|
|
50
|
+
async accept(visitor) {
|
|
51
|
+
await visitor.visitDataLocationFieldComponentDefinition(this);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
exports.DataLocationFieldComponentDefinition = DataLocationFieldComponentDefinition;
|
|
55
|
+
class DataLocationFieldModelConfig extends field_model_model_1.FieldModelConfig {
|
|
56
|
+
defaultValue;
|
|
57
|
+
constructor() {
|
|
58
|
+
super();
|
|
59
|
+
this.defaultValue = [];
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
exports.DataLocationFieldModelConfig = DataLocationFieldModelConfig;
|
|
63
|
+
class DataLocationFieldModelDefinition extends field_model_model_1.FieldModelDefinition {
|
|
64
|
+
class = data_location_outline_1.DataLocationModelName;
|
|
65
|
+
config;
|
|
66
|
+
async accept(visitor) {
|
|
67
|
+
await visitor.visitDataLocationFieldModelDefinition(this);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
exports.DataLocationFieldModelDefinition = DataLocationFieldModelDefinition;
|
|
71
|
+
class DataLocationFormComponentDefinition extends form_component_model_1.FormComponentDefinition {
|
|
72
|
+
component;
|
|
73
|
+
model;
|
|
74
|
+
layout;
|
|
75
|
+
async accept(visitor) {
|
|
76
|
+
await visitor.visitDataLocationFormComponentDefinition(this);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
exports.DataLocationFormComponentDefinition = DataLocationFormComponentDefinition;
|
|
80
|
+
exports.DataLocationMap = [
|
|
81
|
+
{ kind: shared_outline_1.FieldComponentConfigKind, def: DataLocationFieldComponentConfig },
|
|
82
|
+
{ kind: shared_outline_1.FieldComponentDefinitionKind, def: DataLocationFieldComponentDefinition, class: data_location_outline_1.DataLocationComponentName },
|
|
83
|
+
{ kind: shared_outline_1.FieldModelConfigKind, def: DataLocationFieldModelConfig },
|
|
84
|
+
{ kind: shared_outline_1.FieldModelDefinitionKind, def: DataLocationFieldModelDefinition, class: data_location_outline_1.DataLocationModelName },
|
|
85
|
+
{ kind: shared_outline_1.FormComponentDefinitionKind, def: DataLocationFormComponentDefinition, class: data_location_outline_1.DataLocationComponentName },
|
|
86
|
+
];
|
|
87
|
+
exports.DataLocationDefaults = {
|
|
88
|
+
[shared_outline_1.FormComponentDefinitionKind]: {
|
|
89
|
+
[data_location_outline_1.DataLocationComponentName]: {
|
|
90
|
+
[shared_outline_1.FieldComponentDefinitionKind]: data_location_outline_1.DataLocationComponentName,
|
|
91
|
+
[shared_outline_1.FieldModelDefinitionKind]: data_location_outline_1.DataLocationModelName,
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0YS1sb2NhdGlvbi5tb2RlbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy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BEO0tBQ0o7Q0FDSixDQUFDIn0=
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { FieldComponentConfigFrameKindType, FieldComponentConfigKindType, FieldComponentDefinitionFrameKindType, FieldComponentDefinitionKindType, FieldModelConfigFrameKindType, FieldModelConfigKindType, FieldModelDefinitionFrameKindType, FieldModelDefinitionKindType, FormComponentDefinitionFrameKindType, FormComponentDefinitionKindType } from "../shared.outline";
|
|
2
|
+
import { FieldComponentDefinitionFrame, FieldComponentDefinitionOutline } from "../field-component.outline";
|
|
3
|
+
import { FieldModelConfigFrame, FieldModelConfigOutline, FieldModelDefinitionFrame, FieldModelDefinitionOutline } from "../field-model.outline";
|
|
4
|
+
import { FormComponentDefinitionFrame, FormComponentDefinitionOutline } from "../form-component.outline";
|
|
5
|
+
import { AvailableFieldLayoutDefinitionFrames, AvailableFieldLayoutDefinitionOutlines } from "../dictionary.outline";
|
|
6
|
+
import { FileUploadAttachmentValue, FileUploadFieldComponentConfigFrame, FileUploadFieldComponentConfigOutline } from "./file-upload.outline";
|
|
7
|
+
export declare const DataLocationComponentName: "DataLocationComponent";
|
|
8
|
+
export type DataLocationComponentNameType = typeof DataLocationComponentName;
|
|
9
|
+
export declare const DataLocationModelName: "DataLocationModel";
|
|
10
|
+
export type DataLocationModelNameType = typeof DataLocationModelName;
|
|
11
|
+
export interface DataLocationOption {
|
|
12
|
+
value: string;
|
|
13
|
+
label: string;
|
|
14
|
+
}
|
|
15
|
+
export interface DataLocationBaseValue {
|
|
16
|
+
location: string;
|
|
17
|
+
notes?: string;
|
|
18
|
+
isc?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface DataLocationUrlValue extends DataLocationBaseValue {
|
|
21
|
+
type: "url";
|
|
22
|
+
}
|
|
23
|
+
export interface DataLocationPhysicalValue extends DataLocationBaseValue {
|
|
24
|
+
type: "physical";
|
|
25
|
+
}
|
|
26
|
+
export interface DataLocationFileValue extends DataLocationBaseValue {
|
|
27
|
+
type: "file";
|
|
28
|
+
}
|
|
29
|
+
export interface DataLocationAttachmentValue extends FileUploadAttachmentValue {
|
|
30
|
+
type: "attachment";
|
|
31
|
+
isc?: string;
|
|
32
|
+
}
|
|
33
|
+
export type DataLocationValueType = DataLocationUrlValue | DataLocationPhysicalValue | DataLocationFileValue | DataLocationAttachmentValue;
|
|
34
|
+
export type DataLocationModelValueType = DataLocationValueType[];
|
|
35
|
+
export interface DataLocationFieldComponentConfigFrame extends FileUploadFieldComponentConfigFrame {
|
|
36
|
+
notesEnabled?: boolean;
|
|
37
|
+
iscEnabled?: boolean;
|
|
38
|
+
iscHeader?: string;
|
|
39
|
+
defaultSelect?: string;
|
|
40
|
+
securityClassificationOptions?: DataLocationOption[];
|
|
41
|
+
locationAddText?: string;
|
|
42
|
+
typeHeader?: string;
|
|
43
|
+
locationHeader?: string;
|
|
44
|
+
notesHeader?: string;
|
|
45
|
+
columns?: string[] | Record<string, unknown>[];
|
|
46
|
+
editNotesButtonText?: string;
|
|
47
|
+
editNotesTitle?: string;
|
|
48
|
+
cancelEditNotesButtonText?: string;
|
|
49
|
+
applyEditNotesButtonText?: string;
|
|
50
|
+
editNotesCssClasses?: string;
|
|
51
|
+
dataTypes?: DataLocationOption[];
|
|
52
|
+
dataTypePlaceholder?: string;
|
|
53
|
+
dataTypeLookup?: Record<string, string>;
|
|
54
|
+
hideNotesForLocationTypes?: string[];
|
|
55
|
+
}
|
|
56
|
+
export interface DataLocationFieldComponentConfigOutline extends DataLocationFieldComponentConfigFrame, FileUploadFieldComponentConfigOutline {
|
|
57
|
+
}
|
|
58
|
+
export interface DataLocationFieldComponentDefinitionFrame extends FieldComponentDefinitionFrame {
|
|
59
|
+
class: DataLocationComponentNameType;
|
|
60
|
+
config?: DataLocationFieldComponentConfigFrame;
|
|
61
|
+
}
|
|
62
|
+
export interface DataLocationFieldComponentDefinitionOutline extends DataLocationFieldComponentDefinitionFrame, FieldComponentDefinitionOutline {
|
|
63
|
+
class: DataLocationComponentNameType;
|
|
64
|
+
config?: DataLocationFieldComponentConfigOutline;
|
|
65
|
+
}
|
|
66
|
+
export interface DataLocationFieldModelConfigFrame extends FieldModelConfigFrame<DataLocationModelValueType> {
|
|
67
|
+
}
|
|
68
|
+
export interface DataLocationFieldModelConfigOutline extends DataLocationFieldModelConfigFrame, FieldModelConfigOutline<DataLocationModelValueType> {
|
|
69
|
+
}
|
|
70
|
+
export interface DataLocationFieldModelDefinitionFrame extends FieldModelDefinitionFrame<DataLocationModelValueType> {
|
|
71
|
+
class: DataLocationModelNameType;
|
|
72
|
+
config?: DataLocationFieldModelConfigFrame;
|
|
73
|
+
}
|
|
74
|
+
export interface DataLocationFieldModelDefinitionOutline extends DataLocationFieldModelDefinitionFrame, FieldModelDefinitionOutline<DataLocationModelValueType> {
|
|
75
|
+
class: DataLocationModelNameType;
|
|
76
|
+
config?: DataLocationFieldModelConfigOutline;
|
|
77
|
+
}
|
|
78
|
+
export interface DataLocationFormComponentDefinitionFrame extends FormComponentDefinitionFrame {
|
|
79
|
+
component: DataLocationFieldComponentDefinitionFrame;
|
|
80
|
+
model?: DataLocationFieldModelDefinitionFrame;
|
|
81
|
+
layout?: AvailableFieldLayoutDefinitionFrames;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Captures and displays a configured research-data location.
|
|
85
|
+
*
|
|
86
|
+
* @extensionPoint Use `DataLocationComponent` with `DataLocationModel` where a form records storage or access locations.
|
|
87
|
+
* @see https://github.com/redbox-mint/redbox-portal/wiki/Configuring-Record-Forms
|
|
88
|
+
*/
|
|
89
|
+
export interface DataLocationFormComponentDefinitionOutline extends DataLocationFormComponentDefinitionFrame, FormComponentDefinitionOutline {
|
|
90
|
+
component: DataLocationFieldComponentDefinitionOutline;
|
|
91
|
+
model?: DataLocationFieldModelDefinitionOutline;
|
|
92
|
+
layout?: AvailableFieldLayoutDefinitionOutlines;
|
|
93
|
+
}
|
|
94
|
+
export type DataLocationTypes = {
|
|
95
|
+
kind: FieldComponentConfigFrameKindType;
|
|
96
|
+
class: DataLocationFieldComponentConfigFrame;
|
|
97
|
+
} | {
|
|
98
|
+
kind: FieldComponentDefinitionFrameKindType;
|
|
99
|
+
class: DataLocationFieldComponentDefinitionFrame;
|
|
100
|
+
} | {
|
|
101
|
+
kind: FieldModelConfigFrameKindType;
|
|
102
|
+
class: DataLocationFieldModelConfigFrame;
|
|
103
|
+
} | {
|
|
104
|
+
kind: FieldModelDefinitionFrameKindType;
|
|
105
|
+
class: DataLocationFieldModelDefinitionFrame;
|
|
106
|
+
} | {
|
|
107
|
+
kind: FormComponentDefinitionFrameKindType;
|
|
108
|
+
class: DataLocationFormComponentDefinitionFrame;
|
|
109
|
+
} | {
|
|
110
|
+
kind: FieldComponentConfigKindType;
|
|
111
|
+
class: DataLocationFieldComponentConfigOutline;
|
|
112
|
+
} | {
|
|
113
|
+
kind: FieldComponentDefinitionKindType;
|
|
114
|
+
class: DataLocationFieldComponentDefinitionOutline;
|
|
115
|
+
} | {
|
|
116
|
+
kind: FieldModelConfigKindType;
|
|
117
|
+
class: DataLocationFieldModelConfigOutline;
|
|
118
|
+
} | {
|
|
119
|
+
kind: FieldModelDefinitionKindType;
|
|
120
|
+
class: DataLocationFieldModelDefinitionOutline;
|
|
121
|
+
} | {
|
|
122
|
+
kind: FormComponentDefinitionKindType;
|
|
123
|
+
class: DataLocationFormComponentDefinitionOutline;
|
|
124
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DataLocationModelName = exports.DataLocationComponentName = void 0;
|
|
4
|
+
exports.DataLocationComponentName = "DataLocationComponent";
|
|
5
|
+
exports.DataLocationModelName = "DataLocationModel";
|
|
6
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0YS1sb2NhdGlvbi5vdXRsaW5lLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2NvbmZpZy9jb21wb25lbnQvZGF0YS1sb2NhdGlvbi5vdXRsaW5lLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQThCYSxRQUFBLHlCQUF5QixHQUFHLHVCQUFnQyxDQUFDO0FBRzdELFFBQUEscUJBQXFCLEdBQUcsbUJBQTRCLENBQUMifQ==
|