@f1studio/form-spec 5.0.0-alpha.117 → 5.0.0-alpha.123

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.
Files changed (95) hide show
  1. package/FormSpec.FS/FormSpec.d.ts +41 -1
  2. package/FormSpec.FS/FormSpec.d.ts.map +1 -1
  3. package/FormSpec.FS/FormSpecHelpers.d.ts.map +1 -1
  4. package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRAdapter.d.ts +6 -1
  5. package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRAdapter.d.ts.map +1 -1
  6. package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRElementTypeMap.d.ts +5 -0
  7. package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRElementTypeMap.d.ts.map +1 -1
  8. package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateMapper.d.ts +72 -0
  9. package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateMapper.d.ts.map +1 -0
  10. package/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateToFormSpec.d.ts.map +1 -1
  11. package/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMREncoder.d.ts.map +1 -1
  12. package/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRSourceMap.d.ts +15 -9
  13. package/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRSourceMap.d.ts.map +1 -1
  14. package/FormSpec.FS/Interop/FormSpec.Api.Helpers.d.ts +0 -7
  15. package/FormSpec.FS/Interop/FormSpec.Api.Helpers.d.ts.map +1 -1
  16. package/FormSpec.FS/Interop/FormSpec.Api.Option.d.ts.map +1 -1
  17. package/FormSpec.TS/FormSpec.FS/BlueprintValidation.js +1 -1
  18. package/FormSpec.TS/FormSpec.FS/BlueprintValidation.js.map +1 -1
  19. package/FormSpec.TS/FormSpec.FS/BlueprintValidation.ts.map +1 -1
  20. package/FormSpec.TS/FormSpec.FS/Designer.js +1 -1
  21. package/FormSpec.TS/FormSpec.FS/Designer.js.map +1 -1
  22. package/FormSpec.TS/FormSpec.FS/Designer.ts.map +1 -1
  23. package/FormSpec.TS/FormSpec.FS/FormSpec.js +129 -1
  24. package/FormSpec.TS/FormSpec.FS/FormSpec.js.map +1 -1
  25. package/FormSpec.TS/FormSpec.FS/FormSpec.ts.map +1 -1
  26. package/FormSpec.TS/FormSpec.FS/FormSpecHelpers.js +1 -1
  27. package/FormSpec.TS/FormSpec.FS/FormSpecHelpers.js.map +1 -1
  28. package/FormSpec.TS/FormSpec.FS/FormSpecHelpers.ts.map +1 -1
  29. package/FormSpec.TS/FormSpec.FS/FormSpecValues.js +2 -2
  30. package/FormSpec.TS/FormSpec.FS/FormSpecValues.js.map +1 -1
  31. package/FormSpec.TS/FormSpec.FS/FormSpecValues.ts.map +1 -1
  32. package/FormSpec.TS/FormSpec.FS/Helpers.js +11 -11
  33. package/FormSpec.TS/FormSpec.FS/Helpers.js.map +1 -1
  34. package/FormSpec.TS/FormSpec.FS/Helpers.ts.map +1 -1
  35. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRAdapter.js +4 -4
  36. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRAdapter.js.map +1 -1
  37. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRAdapter.ts.map +1 -1
  38. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRElementTypeMap.js +9 -2
  39. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRElementTypeMap.js.map +1 -1
  40. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRElementTypeMap.ts.map +1 -1
  41. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateMapper.js +360 -0
  42. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateMapper.js.map +1 -0
  43. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateMapper.ts.map +1 -0
  44. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateToFormSpec.js +1 -1
  45. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateToFormSpec.js.map +1 -1
  46. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateToFormSpec.ts.map +1 -1
  47. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMREncoder.js +119 -46
  48. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMREncoder.js.map +1 -1
  49. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMREncoder.ts.map +1 -1
  50. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRSourceMap.js +40 -24
  51. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRSourceMap.js.map +1 -1
  52. package/FormSpec.TS/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRSourceMap.ts.map +1 -1
  53. package/FormSpec.TS/FormSpec.FS/Interop/FormSpec.Api.Helpers.js +41 -106
  54. package/FormSpec.TS/FormSpec.FS/Interop/FormSpec.Api.Helpers.js.map +1 -1
  55. package/FormSpec.TS/FormSpec.FS/Interop/FormSpec.Api.Helpers.ts.map +1 -1
  56. package/FormSpec.TS/FormSpec.FS/Interop/FormSpec.Api.Option.js +1 -1
  57. package/FormSpec.TS/FormSpec.FS/Interop/FormSpec.Api.Option.js.map +1 -1
  58. package/FormSpec.TS/FormSpec.FS/Interop/FormSpec.Api.Option.ts.map +1 -1
  59. package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Encode.fs.js.map +1 -1
  60. package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Encode.fs.ts.map +1 -1
  61. package/FormSpec.TS/fable_modules/project_cracked.json +1 -1
  62. package/FormSpec.TS/plugins/bmi/src/BMIField.js +193 -275
  63. package/FormSpec.TS/plugins/bmi/src/BMIField.js.map +1 -1
  64. package/FormSpec.TS/plugins/bmi/src/BMIField.ts.map +1 -1
  65. package/FormSpec.TS/plugins/likert/src/LikertField.js +19 -138
  66. package/FormSpec.TS/plugins/likert/src/LikertField.js.map +1 -1
  67. package/FormSpec.TS/plugins/likert/src/LikertField.ts.map +1 -1
  68. package/README.md +19 -13
  69. package/package.json +1 -1
  70. package/plugins/bmi/src/BMIField.d.ts.map +1 -1
  71. package/plugins/likert/src/LikertField.d.ts.map +1 -1
  72. package/src/FormSpec.FS/BlueprintValidation.ts +1 -1
  73. package/src/FormSpec.FS/Designer.ts +1 -1
  74. package/src/FormSpec.FS/FormSpec.ts +92 -2
  75. package/src/FormSpec.FS/FormSpecHelpers.ts +2 -2
  76. package/src/FormSpec.FS/FormSpecValues.ts +2 -2
  77. package/src/FormSpec.FS/Helpers.ts +11 -11
  78. package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRAdapter.ts +8 -4
  79. package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRElementTypeMap.ts +11 -2
  80. package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateMapper.ts +222 -0
  81. package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CorEMRTemplateToFormSpec.ts +2 -2
  82. package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMREncoder.ts +123 -51
  83. package/src/FormSpec.FS/Integrations/Adapters/CorEMR/CoreMRSourceMap.ts +44 -25
  84. package/src/FormSpec.FS/Interop/FormSpec.Api.Helpers.ts +57 -102
  85. package/src/FormSpec.FS/Interop/FormSpec.Api.Option.ts +2 -2
  86. package/src/plugins/bmi/src/BMIField.ts +62 -82
  87. package/src/plugins/likert/src/LikertField.ts +20 -95
  88. package/FormSpec.FS/Interop/PluginPropertyKeyRegistry.d.ts +0 -16
  89. package/FormSpec.FS/Interop/PluginPropertyKeyRegistry.d.ts.map +0 -1
  90. package/FormSpec.TS/FormSpec.FS/Interop/PluginPropertyKeyRegistry.js +0 -121
  91. package/FormSpec.TS/FormSpec.FS/Interop/PluginPropertyKeyRegistry.js.map +0 -1
  92. package/FormSpec.TS/FormSpec.FS/Interop/PluginPropertyKeyRegistry.ts.map +0 -1
  93. package/fable_modules/Feliz.2.8.0/Colors.fs.d.ts +0 -9
  94. package/fable_modules/Feliz.2.8.0/Colors.fs.d.ts.map +0 -1
  95. package/src/FormSpec.FS/Interop/PluginPropertyKeyRegistry.ts +0 -96
@@ -8,13 +8,11 @@ import { ofList, toList as toList_1, FSharpMap__get_Count, add, remove, tryFind,
8
8
  import { createElement } from "react";
9
9
  import React from "react";
10
10
  import { withLabelAndError } from "../../../fable_modules/Fable.Form.Simple.Bulma.5.0.1/Html.View.fs.js";
11
- import { map, empty, collect, singleton, append, delay, toList } from "@fable-org/fable-library-js/Seq.js";
11
+ import { empty, map, collect, singleton, append, delay, toList } from "@fable-org/fable-library-js/Seq.js";
12
12
  import { ReactElement } from "../../../fable_modules/Fable.React.Types.18.3.0/Fable.React.fs.js";
13
- import { map as map_2, defaultArg, some, value as value_123, Option } from "@fable-org/fable-library-js/Option.js";
14
- import { IStyleAttribute } from "../../../fable_modules/Feliz.2.8.0/Types.fs.js";
15
- import { rgba } from "../../../fable_modules/Feliz.2.8.0/Colors.fs.js";
16
- import { tryParse, int32, float64 } from "@fable-org/fable-library-js/Int32.js";
13
+ import { map as map_2, defaultArg, some, value as value_47, Option } from "@fable-org/fable-library-js/Option.js";
17
14
  import { reactApi } from "../../../fable_modules/Feliz.2.8.0/Interop.fs.js";
15
+ import { tryParse, int32 } from "@fable-org/fable-library-js/Int32.js";
18
16
  import { IStandardField$3_$reflection, IStandardField$3, IField$1, StandardRenderFieldConfig$2 } from "../../../fable_modules/Fable.Form.Simple.Bulma.5.0.1/Types.fs.js";
19
17
  import { Spec_FormField$1, Shared_FieldAnswer, Spec_FieldType_$union, Shared_MatrixAnswer, Shared_FieldOption, Shared_MatrixItemKey, Shared_FieldValue_$union, Shared_FieldKey, Shared_FieldValue_PluginData, Shared_PluginDataProperty, Shared_PluginPropertyKey, Spec_PluginFieldConfig } from "../../../FormSpec.FS/FormSpec.js";
20
18
  import { tryParse as tryParse_1 } from "@fable-org/fable-library-js/Guid.js";
@@ -87,46 +85,20 @@ export function LikertField_LikertFieldComponent(config: StandardRenderFieldConf
87
85
  const value: FSharpMap<string, string> = config.Value;
88
86
  return withLabelAndError(config.Attributes.Label, config.ShowError, config.Error, createElement<any>("div", createObj(ofArray([["className", "likert-field"] as [string, any], (elems_5 = toList<ReactElement>(delay<ReactElement>((): Iterable<ReactElement> => {
89
87
  let elems_3: Iterable<ReactElement>;
90
- return append<ReactElement>(singleton<ReactElement>(createElement<any>("div", createObj(ofArray([["className", "likert-container"] as [string, any], ["style", {
91
- width: 100 + "%",
92
- }] as [string, any], (elems_3 = toList<ReactElement>(delay<ReactElement>((): Iterable<ReactElement> => (isEmpty_2(config.Attributes.Items) ? singleton<ReactElement>(createElement<any>("div", {
93
- className: "likert-empty-message",
94
- style: {
95
- padding: 2 + "rem",
96
- textAlign: "center",
97
- color: "#7a7a7a",
98
- fontStyle: "italic",
99
- },
88
+ return append<ReactElement>(singleton<ReactElement>(createElement<any>("div", createObj(ofArray([["className", "likert-container w-full"] as [string, any], (elems_3 = toList<ReactElement>(delay<ReactElement>((): Iterable<ReactElement> => (isEmpty_2(config.Attributes.Items) ? singleton<ReactElement>(createElement<any>("div", {
89
+ className: "likert-empty-message p-8 text-center text-base-content/70 italic",
100
90
  children: "No items configured. Please add items to this Likert scale.",
101
91
  })) : collect<LikertField_LikertItemConfig, Iterable<ReactElement>, ReactElement>((item: LikertField_LikertItemConfig): Iterable<ReactElement> => {
102
92
  let elems_2: Iterable<ReactElement>, elems: Iterable<ReactElement>, elems_1: Iterable<ReactElement>;
103
93
  const selectedValue: Option<string> = tryFind<string, string>(item.Key, value);
104
- return singleton<ReactElement>(createElement<any>("div", createObj(ofArray([["className", "likert-item"] as [string, any], ["style", {
105
- marginBottom: 1.5 + "rem",
106
- padding: 1 + "rem",
107
- backgroundColor: "#fafafa",
108
- borderRadius: 8 + "px",
109
- border: (((1 + "px ") + "solid") + " ") + "#e8e8e8",
110
- }] as [string, any], (elems_2 = [createElement<any>("div", {
111
- className: "likert-item-label",
112
- style: {
113
- marginBottom: 0.75 + "rem",
114
- fontWeight: 500,
115
- fontSize: 1 + "rem",
116
- color: "#363636",
117
- },
94
+ return singleton<ReactElement>(createElement<any>("div", createObj(ofArray([["className", "likert-item mb-6 p-4 rounded-lg border border-base-300 bg-base-200"] as [string, any], (elems_2 = [createElement<any>("div", {
95
+ className: "likert-item-label mb-3 font-medium text-base text-base-content",
118
96
  children: item.Label,
119
- }), createElement<any>("div", createObj(ofArray([["className", "likert-options"] as [string, any], ["style", {
120
- display: "flex",
121
- justifyContent: "space-between",
122
- gap: 0.5 + "rem",
123
- flexWrap: "wrap",
124
- }] as [string, any], (elems = toList<ReactElement>(delay<ReactElement>((): Iterable<ReactElement> => collect<LikertField_LikertOptionConfig, Iterable<ReactElement>, ReactElement>((option: LikertField_LikertOptionConfig): Iterable<ReactElement> => {
125
- const isSelected: boolean = (selectedValue == null) ? false : (value_123(selectedValue) === option.Value);
97
+ }), createElement<any>("div", createObj(ofArray([["className", "likert-options flex justify-between gap-2 flex-wrap"] as [string, any], (elems = toList<ReactElement>(delay<ReactElement>((): Iterable<ReactElement> => collect<LikertField_LikertOptionConfig, Iterable<ReactElement>, ReactElement>((option: LikertField_LikertOptionConfig): Iterable<ReactElement> => {
98
+ const isSelected: boolean = (selectedValue == null) ? false : (value_47(selectedValue) === option.Value);
126
99
  return singleton<ReactElement>(createElement<any>("button", {
127
100
  type: "button",
128
- className: isSelected ? "button is-primary is-selected" : "button is-light",
129
- style: createObj(toList<IStyleAttribute>(delay<IStyleAttribute>((): Iterable<IStyleAttribute> => append<IStyleAttribute>(singleton<IStyleAttribute>(["flexGrow", 1] as [string, any]), delay<IStyleAttribute>((): Iterable<IStyleAttribute> => append<IStyleAttribute>(singleton<IStyleAttribute>(["flexBasis", 0] as [string, any]), delay<IStyleAttribute>((): Iterable<IStyleAttribute> => append<IStyleAttribute>(singleton<IStyleAttribute>(["minWidth", 60 + "px"] as [string, any]), delay<IStyleAttribute>((): Iterable<IStyleAttribute> => append<IStyleAttribute>(singleton<IStyleAttribute>(["margin", 2 + "px"] as [string, any]), delay<IStyleAttribute>((): Iterable<IStyleAttribute> => append<IStyleAttribute>(singleton<IStyleAttribute>(["transitionDuration", 200 + "ms"] as [string, any]), delay<IStyleAttribute>((): Iterable<IStyleAttribute> => (isSelected ? append<IStyleAttribute>(singleton<IStyleAttribute>(["fontWeight", "bold"] as [string, any]), delay<IStyleAttribute>((): Iterable<IStyleAttribute> => singleton<IStyleAttribute>(["boxShadow", (((((0 + "px ") + 2) + "px ") + 8) + "px ") + rgba<float64>(0, 0, 0, 0.15)] as [string, any]))) : empty<IStyleAttribute>())))))))))))))),
101
+ className: isSelected ? "btn btn-primary btn-sm flex-1 min-w-[60px] m-0.5 transition-all duration-200 font-bold" : "btn btn-ghost btn-sm flex-1 min-w-[60px] m-0.5 transition-all duration-200",
130
102
  children: option.Value,
131
103
  title: option.Label,
132
104
  disabled: config.Disabled ? true : config.IsReadOnly,
@@ -136,34 +108,16 @@ export function LikertField_LikertFieldComponent(config: StandardRenderFieldConf
136
108
  }
137
109
  },
138
110
  }));
139
- }, config.Attributes.Options))), ["children", reactApi.Children.toArray(Array.from(elems))] as [string, any])]))), createElement<any>("div", createObj(ofArray([["className", "likert-labels"] as [string, any], ["style", {
140
- display: "flex",
141
- justifyContent: "space-between",
142
- fontSize: 0.7 + "rem",
143
- color: "#7a7a7a",
144
- marginTop: 0.35 + "rem",
145
- }] as [string, any], (elems_1 = toList<ReactElement>(delay<ReactElement>((): Iterable<ReactElement> => map<LikertField_LikertOptionConfig, ReactElement>((option_1: LikertField_LikertOptionConfig): ReactElement => createElement<any>("span", {
146
- style: {
147
- flexGrow: 1,
148
- flexBasis: 0,
149
- textAlign: "center",
150
- padding: 2 + "px",
151
- },
111
+ }, config.Attributes.Options))), ["children", reactApi.Children.toArray(Array.from(elems))] as [string, any])]))), createElement<any>("div", createObj(ofArray([["className", "likert-labels flex justify-between text-xs text-base-content/70 mt-1.5"] as [string, any], (elems_1 = toList<ReactElement>(delay<ReactElement>((): Iterable<ReactElement> => map<LikertField_LikertOptionConfig, ReactElement>((option_1: LikertField_LikertOptionConfig): ReactElement => createElement<any>("span", {
112
+ className: "flex-1 text-center p-0.5",
152
113
  children: option_1.Label,
153
114
  }), config.Attributes.Options))), ["children", reactApi.Children.toArray(Array.from(elems_1))] as [string, any])])))], ["children", reactApi.Children.toArray(Array.from(elems_2))] as [string, any])]))));
154
115
  }, config.Attributes.Items)))), ["children", reactApi.Children.toArray(Array.from(elems_3))] as [string, any])])))), delay<ReactElement>((): Iterable<ReactElement> => {
155
116
  let elems_4: Iterable<ReactElement>;
156
117
  const completedCount: int32 = FSharpMap__get_Count(value) | 0;
157
118
  const totalCount: int32 = length(config.Attributes.Items) | 0;
158
- return (totalCount > 0) ? singleton<ReactElement>(createElement<any>("div", createObj(ofArray([["className", "likert-progress"] as [string, any], ["style", {
159
- marginTop: 1 + "rem",
160
- fontSize: 0.85 + "rem",
161
- color: (completedCount === totalCount) ? "#48c774" : "#7a7a7a",
162
- textAlign: "right",
163
- }] as [string, any], (elems_4 = toList<ReactElement>(delay<ReactElement>((): Iterable<ReactElement> => append<ReactElement>(singleton<ReactElement>(`Answered: ${completedCount} / ${totalCount}`), delay<ReactElement>((): Iterable<ReactElement> => ((completedCount === totalCount) ? singleton<ReactElement>(createElement<any>("span", {
164
- style: {
165
- marginLeft: 0.5 + "rem",
166
- },
119
+ return (totalCount > 0) ? singleton<ReactElement>(createElement<any>("div", createObj(ofArray([["className", (completedCount === totalCount) ? "likert-progress mt-4 text-sm text-success text-right" : "likert-progress mt-4 text-sm text-base-content/70 text-right"] as [string, any], (elems_4 = toList<ReactElement>(delay<ReactElement>((): Iterable<ReactElement> => append<ReactElement>(singleton<ReactElement>(`Answered: ${completedCount} / ${totalCount}`), delay<ReactElement>((): Iterable<ReactElement> => ((completedCount === totalCount) ? singleton<ReactElement>(createElement<any>("span", {
120
+ className: "ml-2",
167
121
  children: "✓",
168
122
  })) : empty<ReactElement>()))))), ["children", reactApi.Children.toArray(Array.from(elems_4))] as [string, any])])))) : empty<ReactElement>();
169
123
  }));
@@ -396,49 +350,20 @@ export const Form_likertConverter: IPluginValueConverter = (() => {
396
350
  */
397
351
  export function Form_designerPreview(props: RenderPreviewProps$1<Spec_FieldType_$union>): ReactElement {
398
352
  let elems_2: Iterable<ReactElement>, elems: Iterable<ReactElement>, elems_1: Iterable<ReactElement>;
399
- return createElement<any>("div", createObj(ofArray([["className", "likert-designer-preview"] as [string, any], ["style", {
400
- padding: 1 + "rem",
401
- backgroundColor: "#fafafa",
402
- borderRadius: 8 + "px",
403
- border: (((1 + "px ") + "dashed") + " ") + "#dbdbdb",
404
- }] as [string, any], (elems_2 = [createElement<any>("div", {
405
- style: {
406
- marginBottom: 0.75 + "rem",
407
- fontWeight: 500,
408
- color: "#4a4a4a",
409
- },
353
+ return createElement<any>("div", createObj(ofArray([["className", "likert-designer-preview p-4 rounded-lg border border-dashed border-base-300 bg-base-200"] as [string, any], (elems_2 = [createElement<any>("div", {
354
+ className: "mb-3 font-medium text-base-content",
410
355
  children: "📊 Likert Scale Preview",
411
- }), createElement<any>("div", createObj(ofArray([["style", {
412
- display: "flex",
413
- justifyContent: "space-between",
414
- gap: 0.25 + "rem",
415
- }] as [string, any], (elems = toList<ReactElement>(delay<ReactElement>((): Iterable<ReactElement> => map<int32, ReactElement>((i: int32): ReactElement => createElement<any>("span", {
416
- className: "button is-small is-light",
417
- style: {
418
- flexGrow: 1,
419
- textAlign: "center",
420
- fontSize: 0.75 + "rem",
421
- },
356
+ }), createElement<any>("div", createObj(ofArray([["className", "flex justify-between gap-1"] as [string, any], (elems = toList<ReactElement>(delay<ReactElement>((): Iterable<ReactElement> => map<int32, ReactElement>((i: int32): ReactElement => createElement<any>("span", {
357
+ className: "btn btn-ghost btn-sm flex-1 text-center text-xs",
422
358
  children: int32ToString(i),
423
- }), rangeDouble(1, 1, 5)))), ["children", reactApi.Children.toArray(Array.from(elems))] as [string, any])]))), createElement<any>("div", createObj(ofArray([["style", {
424
- display: "flex",
425
- justifyContent: "space-between",
426
- fontSize: 0.65 + "rem",
427
- color: "#7a7a7a",
428
- marginTop: 0.25 + "rem",
429
- }] as [string, any], (elems_1 = [createElement<any>("span", {
359
+ }), rangeDouble(1, 1, 5)))), ["children", reactApi.Children.toArray(Array.from(elems))] as [string, any])]))), createElement<any>("div", createObj(ofArray([["className", "flex justify-between text-xs text-base-content/70 mt-1"] as [string, any], (elems_1 = [createElement<any>("span", {
430
360
  children: "Disagree",
431
361
  }), createElement<any>("span", {
432
362
  children: "Neutral",
433
363
  }), createElement<any>("span", {
434
364
  children: "Agree",
435
365
  })], ["children", reactApi.Children.toArray(Array.from(elems_1))] as [string, any])]))), createElement<any>("div", {
436
- style: {
437
- fontSize: 0.75 + "rem",
438
- color: "#7a7a7a",
439
- textAlign: "center",
440
- marginTop: 0.75 + "rem",
441
- },
366
+ className: "text-xs text-base-content/70 text-center mt-3",
442
367
  children: "Multiple items can be rated using the same scale",
443
368
  })], ["children", reactApi.Children.toArray(Array.from(elems_2))] as [string, any])])));
444
369
  }
@@ -1,16 +0,0 @@
1
- import { Option } from "@fable-org/fable-library-js/Option.js";
2
- /**
3
- * Deterministic GUID-like string from name for unknown PluginPropertyKey when not in canonical registry.
4
- * Same hash logic as TS - must produce identical output for pathway compatibility.
5
- */
6
- export declare function deterministicPropertyKey(name: string): string;
7
- /**
8
- * Extract property key string from unknown JS value.
9
- * Handles: F# tuple ["PluginPropertyKey", "guid"], { Value }, plain string.
10
- */
11
- export declare function extractPropertyKeyFromUnknown(pk: any): string;
12
- /**
13
- * Resolve property key: lookup in registry, fallback to existingPk, else deterministicPropertyKey.
14
- */
15
- export declare function resolvePropertyKey(name: string, existingPk: Option<string>): string;
16
- //# sourceMappingURL=PluginPropertyKeyRegistry.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PluginPropertyKeyRegistry.d.ts","sourceRoot":"","sources":["../../../FormSpec.TS/FormSpec.FS/Interop/PluginPropertyKeyRegistry.ts"],"names":[],"mappings":"AAKA,OAAO,EAAS,MAAM,EAAE,MAAM,uCAAuC,CAAC;AAMtE;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAW7D;AAwBD;;;GAGG;AACH,wBAAgB,6BAA6B,CAAC,EAAE,EAAE,GAAG,GAAG,MAAM,CAO7D;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CA2BnF"}
@@ -1,121 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- function _export(target, all) {
6
- for(var name in all)Object.defineProperty(target, name, {
7
- enumerable: true,
8
- get: Object.getOwnPropertyDescriptor(all, name).get
9
- });
10
- }
11
- _export(exports, {
12
- get deterministicPropertyKey () {
13
- return deterministicPropertyKey;
14
- },
15
- get extractPropertyKeyFromUnknown () {
16
- return extractPropertyKeyFromUnknown;
17
- },
18
- get resolvePropertyKey () {
19
- return resolvePropertyKey;
20
- }
21
- });
22
- const _Map = require("@fable-org/fable-library-js/Map.js");
23
- const _List = require("@fable-org/fable-library-js/List.js");
24
- const _Util = require("@fable-org/fable-library-js/Util.js");
25
- const _String = require("@fable-org/fable-library-js/String.js");
26
- const _Option = require("@fable-org/fable-library-js/Option.js");
27
- const vitalsPropertyKeys = (0, _Map.ofList)((0, _List.ofArray)([
28
- [
29
- "temperature",
30
- "a1b2c3d4-5e6f-7890-abcd-ef1234567890"
31
- ],
32
- [
33
- "systolic_bp",
34
- "b2c3d4e5-6f78-90ab-cdef-123456789012"
35
- ],
36
- [
37
- "diastolic_bp",
38
- "c3d4e5f6-7890-abcd-ef12-345678901234"
39
- ],
40
- [
41
- "pulse",
42
- "d4e5f678-90ab-cdef-1234-56789012345a"
43
- ],
44
- [
45
- "respiration",
46
- "e5f67890-abcd-ef12-3456-789012345abc"
47
- ],
48
- [
49
- "oxygen_saturation",
50
- "f6789012-3456-789a-bcde-f012345678de"
51
- ],
52
- [
53
- "pain_scale",
54
- "67890123-4567-89ab-cdef-0123456789ef"
55
- ]
56
- ]), {
57
- Compare: _Util.comparePrimitives
58
- });
59
- function deterministicPropertyKey(name) {
60
- const str = "plugin-" + name;
61
- let h = 0;
62
- for(let i = 0; i <= str.length - 1; i++){
63
- h = (h << 5) - h + ~~str[i].charCodeAt(0) | 0;
64
- h = h & 2147483647 | 0;
65
- }
66
- let hex;
67
- const copyOfStruct = Math.abs(h) | 0;
68
- hex = (0, _String.format)('{0:' + "x8" + '}', copyOfStruct);
69
- return (0, _String.substring)((0, _String.toText)((0, _String.printf)("00000000-0000-0000-0000-%s00000000"))(hex), 0, 36);
70
- }
71
- function getValueOrEmpty(x) {
72
- const v = x != null && x.Value != null ? x.Value : '';
73
- if (!(0, _String.isNullOrEmpty)(v)) {
74
- return v;
75
- } else {
76
- return x != null && x.value != null ? x.value : '';
77
- }
78
- }
79
- function extractPropertyKeyFromUnknownJs(pk) {
80
- if (typeof pk === 'string') {
81
- return pk;
82
- } else if (Array.isArray(pk) && pk.length >= 2) {
83
- return pk[1];
84
- } else {
85
- return getValueOrEmpty(pk);
86
- }
87
- }
88
- function extractPropertyKeyFromUnknown(pk) {
89
- if (pk == null) {
90
- return "";
91
- } else {
92
- return extractPropertyKeyFromUnknownJs(pk);
93
- }
94
- }
95
- function resolvePropertyKey(name, existingPk) {
96
- let pk;
97
- const matchValue = (0, _Map.tryFind)((0, _String.replace)(name.toLowerCase(), "-", "_"), vitalsPropertyKeys);
98
- if (matchValue == null) {
99
- let matchResult, pk_1;
100
- if (existingPk != null) {
101
- if (pk = (0, _Option.value)(existingPk), !(0, _String.isNullOrEmpty)(pk) && pk !== "undefined") {
102
- matchResult = 0;
103
- pk_1 = (0, _Option.value)(existingPk);
104
- } else {
105
- matchResult = 1;
106
- }
107
- } else {
108
- matchResult = 1;
109
- }
110
- switch(matchResult){
111
- case 0:
112
- return pk_1;
113
- default:
114
- return deterministicPropertyKey(name);
115
- }
116
- } else {
117
- return (0, _Option.value)(matchValue);
118
- }
119
- } //# sourceMappingURL=PluginPropertyKeyRegistry.ts.map
120
-
121
- //# sourceMappingURL=PluginPropertyKeyRegistry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../FormSpec.TS/FormSpec.FS/Interop/PluginPropertyKeyRegistry.ts"],"names":["str","name","h","i","hex","copyOfStruct","v","x","pk","getValueOrEmpty","extractPropertyKeyFromUnknownJs","matchValue","vitalsPropertyKeys","existingPk","deterministicPropertyKey"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;+BAmBW,WAAA,MATH,aAAA,EAAA;IAAA;QACI;QAAA;KAAA;IAAA;QACA;QAAA;KAAA;IAAA;QACA;QAAA;KAAA;IAAA;QACA;QAAA;KAAA;IAAA;QACA;QAAA;KAAA;IAAA;QACA;QAAA;KAAA;IAAA;QACA;QAAA;KAAA;CAAA,GAAA;;;;IAQAA,MAAAA,MAAM,YAAYC;IACVC,IAAAA,IAAI;IAChB,IAAA,IAAA,IAAQ,GAAJC,KAASH,IAAAA,MAAAA,GAAa,GAAtBG,IAAAA;QACAD,IAAAA,CAAK,AAAEA,CAAD,KAAO,IAAKA,IAAAA,CAAAA,CAAUF,GAAAA,CAAKG,EAAAA,CAAAA,UAAAA,CAAAA,KAAAA;QACjCD,IAAAA,AAAKA,IAAM,aAAA;;IACXE,IAAAA;IAAMC,MAAAA,eAAC,KAAA,GAAA,CAAIH,KAAAA;IAAXE,UAAM,cAAA,EAAA,QAAiB,OAAA,KAAjBC;IACmD,WAAA,iBAAA,MAA7D,cAAA,MAAQ,cAAA,EAAA,uCAAqCD,MAA4B,GAAG;;;IAkBxEE,MAAAA,IAAiBC,KAAAA,QAAAA,EAAAA,KAAAA,IAAAA,OAAAA,EAAAA,KAAAA,GAAAA;IACrB,IAAG,KAAK,qBAAA,EAA4BD,IAAAA;eAAQA;;QAAO,OAAkBC,KAAAA,QAAAA,EAAAA,KAAAA,IAAAA,OAAAA,EAAAA,KAAAA,GAAAA;;;;IAGrE,IAAG,OAASC,OAAAA,UAAAA;eAAcA;WAC1B,IAAK,MAAA,OAAA,CAAaA,OAAAA,GAAAA,MAAAA,IAAAA,GAAAA;QAAQ,OAAeA,EAAAA,CAAAA,EAAAA;;QACpC,OAAAC,gBAAgBD;;;;IAMrB,IAAUA,MAAAA,MAAAA;eAAQ;;QAAQ,OAAAE,gCAAgCF;;;;QAU/CA;IAJLG,MAAAA,iBAAA,YAAA,MADe,eAAA,EAAAV,KAAAA,WAAAA,IAAgC,KAAK,MACzBW;IAA3B,IAAAD,cAAAA,MAAAA;yBAIKH;QADD,IAAAK,cAAAA,MAAAA;YAAA,IACCL,KAAAA,IAAAA,aAAAA,EAALK,aAAa,KAAK,qBAAA,EAA4BL,OAAOA,OAAM,aAAA;;gBAAtDA,OAAAA,IAAAA,aAAAA,EAALK;;;;;;;;;uBAA0EL;;gBACrE,OAAAM,yBAAyBb;;;kCAJrBU"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../FormSpec.FS/Interop/PluginPropertyKeyRegistry.fs"],"names":["str","name","h","i","hex","copyOfStruct","v","x","pk","getValueOrEmpty","extractPropertyKeyFromUnknownJs","matchValue","vitalsPropertyKeys","existingPk","deterministicPropertyKey"],"mappings":";;;;;;;sDAmBW,uBATH,UACI,6EACA,6EACA,8EACA,uEACA,6EACA,mFACA;;;;;;;;;AAQAA,wBAAM,YAAYC;AACVC,YAAI;AAChB,iBAAQ,GAAJC,MAAS,AAAAH,aAAa,IAAtBG;AACA,AAAAD,cAAK,CAAC,CAAC,AAAAA,KAAM,KAAKA,OAAU,AAAAF,IAAKG;AACjC,AAAAD,cAAK,AAAAA,IAAM;;AACXE;AAAMC,gCAAC,SAAIH;AAAL,AAANE,UAAM,OAAA,QAAiB,YAAjBC;AACmD,WAAA,UAA7D,OAAQ,OAAA,uCAAqCD,MAA4B,GAAG;;;;AAkBxEE,sBAAI,AAAaC,aAAAA,kBAAAA;AACrB,QAAG,CAAK,cAA4BD;eAAQA;;;AAAO,eAAA,AAAkBC,aAAAA,kBAAAA;;;;;AAGrE,QAAG,OAASC;eAAcA;;SAC1B,IAAK,cAAaA,OAAAA;AAAQ,eAAA,AAAeA;;;AACpC,eAAA,AAAAC,gBAAgBD;;;;;;;;;AAMrB,QAAG,AAAOA;eAAQ;;;AAAQ,eAAA,AAAAE,gCAAgCF;;;;;;;;QAU/CA;AAJLG,uCAAA,wBADe,QAAA,AAAAV,oBAAgC,KAAK,MACzBW;AAA3B,QAAA,AAAAD;gCAIKH;AADD,YAAA,AAAAK;AAAA,iBACCL,WAALK,aAAa,CAAK,cAA4BL,QAAO,AAAAA,OAAM;;AAAtDA,6BAALK;;;;;;;;;;;uBAA0EL;;AACrE,uBAAA,AAAAM,yBAAyBb;;;;qBAJrBU","file":null,"sourcesContent":null,"sourceRoot":null}
@@ -1,9 +0,0 @@
1
- import { int32, float64 } from "@fable-org/fable-library-js/Int32.js";
2
- /**
3
- * Creates a color from components [hue](https://en.wikipedia.org/wiki/Hue), [saturation](https://en.wikipedia.org/wiki/Colorfulness) and [lightness](https://en.wikipedia.org/wiki/Lightness) where hue is a number that goes from 0 to 360 and both
4
- * the `saturation` and `lightness` go from 0 to 100 as they are percentages.
5
- */
6
- export declare function hsl(hue: float64, saturation: float64, lightness: float64): string;
7
- export declare function rgb(r: int32, g: int32, b: int32): string;
8
- export declare function rgba<$a>(r: int32, g: int32, b: int32, a: $a): string;
9
- //# sourceMappingURL=Colors.fs.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Colors.fs.d.ts","sourceRoot":"","sources":["../../../FormSpec.TS/fable_modules/Feliz.2.8.0/Colors.fs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AAEtE;;;GAGG;AACH,wBAAgB,GAAG,CAAC,GAAG,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,GAAG,MAAM,CAEjF;AAED,wBAAgB,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,GAAG,MAAM,CAExD;AAED,wBAAgB,IAAI,CAAC,EAAE,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,GAAG,MAAM,CAEpE"}
@@ -1,96 +0,0 @@
1
- import { tryFind, FSharpMap, ofList } from "@fable-org/fable-library-js/Map.js";
2
- import { ofArray } from "@fable-org/fable-library-js/List.js";
3
- import { comparePrimitives } from "@fable-org/fable-library-js/Util.js";
4
- import { int32 } from "@fable-org/fable-library-js/Int32.js";
5
- import { replace, isNullOrEmpty, printf, toText, substring, format } from "@fable-org/fable-library-js/String.js";
6
- import { value, Option } from "@fable-org/fable-library-js/Option.js";
7
-
8
- const vitalsPropertyKeys: FSharpMap<string, string> = ofList<string, string>(ofArray([["temperature", "a1b2c3d4-5e6f-7890-abcd-ef1234567890"] as [string, string], ["systolic_bp", "b2c3d4e5-6f78-90ab-cdef-123456789012"] as [string, string], ["diastolic_bp", "c3d4e5f6-7890-abcd-ef12-345678901234"] as [string, string], ["pulse", "d4e5f678-90ab-cdef-1234-56789012345a"] as [string, string], ["respiration", "e5f67890-abcd-ef12-3456-789012345abc"] as [string, string], ["oxygen_saturation", "f6789012-3456-789a-bcde-f012345678de"] as [string, string], ["pain_scale", "67890123-4567-89ab-cdef-0123456789ef"] as [string, string]]), {
9
- Compare: comparePrimitives,
10
- });
11
-
12
- /**
13
- * Deterministic GUID-like string from name for unknown PluginPropertyKey when not in canonical registry.
14
- * Same hash logic as TS - must produce identical output for pathway compatibility.
15
- */
16
- export function deterministicPropertyKey(name: string): string {
17
- const str: string = "plugin-" + name;
18
- let h = 0;
19
- for (let i = 0; i <= (str.length - 1); i++) {
20
- h = ((((h << 5) - h) + ~~str[i].charCodeAt(0)) | 0);
21
- h = ((h & 2147483647) | 0);
22
- }
23
- let hex: string;
24
- const copyOfStruct: int32 = Math.abs(h) | 0;
25
- hex = format('{0:' + "x8" + '}', copyOfStruct);
26
- return substring(toText(printf("00000000-0000-0000-0000-%s00000000"))(hex), 0, 36);
27
- }
28
-
29
- function getValueOrEmpty(x: any): string {
30
- const v: string = x != null && x.Value != null ? x.Value : '';
31
- if (!isNullOrEmpty(v)) {
32
- return v;
33
- }
34
- else {
35
- return x != null && x.value != null ? x.value : '';
36
- }
37
- }
38
-
39
- function extractPropertyKeyFromUnknownJs(pk: any): string {
40
- if (typeof pk === 'string') {
41
- return pk;
42
- }
43
- else if (Array.isArray(pk) && pk.length >= 2) {
44
- return pk[1];
45
- }
46
- else {
47
- return getValueOrEmpty(pk);
48
- }
49
- }
50
-
51
- /**
52
- * Extract property key string from unknown JS value.
53
- * Handles: F# tuple ["PluginPropertyKey", "guid"], { Value }, plain string.
54
- */
55
- export function extractPropertyKeyFromUnknown(pk: any): string {
56
- if (pk == null) {
57
- return "";
58
- }
59
- else {
60
- return extractPropertyKeyFromUnknownJs(pk);
61
- }
62
- }
63
-
64
- /**
65
- * Resolve property key: lookup in registry, fallback to existingPk, else deterministicPropertyKey.
66
- */
67
- export function resolvePropertyKey(name: string, existingPk: Option<string>): string {
68
- let pk: string;
69
- const matchValue: Option<string> = tryFind<string, string>(replace(name.toLowerCase(), "-", "_"), vitalsPropertyKeys);
70
- if (matchValue == null) {
71
- let matchResult: int32, pk_1: string;
72
- if (existingPk != null) {
73
- if ((pk = value(existingPk), !isNullOrEmpty(pk) && (pk !== "undefined"))) {
74
- matchResult = 0;
75
- pk_1 = value(existingPk);
76
- }
77
- else {
78
- matchResult = 1;
79
- }
80
- }
81
- else {
82
- matchResult = 1;
83
- }
84
- switch (matchResult) {
85
- case 0:
86
- return pk_1!;
87
- default:
88
- return deterministicPropertyKey(name);
89
- }
90
- }
91
- else {
92
- return value(matchValue);
93
- }
94
- }
95
-
96
- //# sourceMappingURL=PluginPropertyKeyRegistry.ts.map