{"version":3,"file":"singleSelectFieldComponents.js","sources":["../../../Framework/FieldTypes/singleSelectField.partial.ts","../../../Framework/FieldTypes/singleSelectFieldComponents.ts"],"sourcesContent":["// \r\n// Copyright by the Spark Development Network\r\n//\r\n// Licensed under the Rock Community License (the \"License\");\r\n// you may not use this file except in compliance with the License.\r\n// You may obtain a copy of the License at\r\n//\r\n// http://www.rockrms.com/license\r\n//\r\n// Unless required by applicable law or agreed to in writing, software\r\n// distributed under the License is distributed on an \"AS IS\" BASIS,\r\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n// See the License for the specific language governing permissions and\r\n// limitations under the License.\r\n// \r\n//\r\nimport { Component } from \"vue\";\r\nimport { defineAsyncComponent } from \"@Obsidian/Utility/component\";\r\nimport { ComparisonValue } from \"@Obsidian/Types/Reporting/comparisonValue\";\r\nimport { ListItemBag } from \"@Obsidian/ViewModels/Utility/listItemBag\";\r\nimport { FieldTypeBase } from \"./fieldType\";\r\nimport { getStandardFilterComponent } from \"./utils\";\r\nimport { ComparisonType } from \"@Obsidian/Enums/Reporting/comparisonType\";\r\n\r\nexport const enum ConfigurationValueKey {\r\n Values = \"values\",\r\n FieldType = \"fieldtype\",\r\n RepeatColumns = \"repeatColumns\",\r\n\r\n /** Only used during editing of the field type configuration. */\r\n CustomValues = \"customValues\"\r\n}\r\n\r\n\r\n// The edit component can be quite large, so load it only as needed.\r\nconst editComponent = defineAsyncComponent(async () => {\r\n return (await import(\"./singleSelectFieldComponents\")).EditComponent;\r\n});\r\n\r\n// Load the filter component only as needed.\r\nconst filterComponent = defineAsyncComponent(async () => {\r\n return (await import(\"./singleSelectFieldComponents\")).FilterComponent;\r\n});\r\n\r\n// Load the configuration component only as needed.\r\nconst configurationComponent = defineAsyncComponent(async () => {\r\n return (await import(\"./singleSelectFieldComponents\")).ConfigurationComponent;\r\n});\r\n\r\n/**\r\n * The field type handler for the SingleSelect field.\r\n */\r\nexport class SingleSelectFieldType extends FieldTypeBase {\r\n public override getTextValue(value: string, configurationValues: Record): string {\r\n if (value === \"\") {\r\n return \"\";\r\n }\r\n\r\n try {\r\n const values = JSON.parse(configurationValues[ConfigurationValueKey.Values] ?? \"[]\") as ListItemBag[];\r\n const selectedValues = values.filter(v => v.value === value);\r\n\r\n if (selectedValues.length >= 1) {\r\n return selectedValues[0].text ?? \"\";\r\n }\r\n else {\r\n return \"\";\r\n }\r\n }\r\n catch {\r\n return value;\r\n }\r\n }\r\n\r\n public override getEditComponent(): Component {\r\n return editComponent;\r\n }\r\n\r\n public override getConfigurationComponent(): Component {\r\n return configurationComponent;\r\n }\r\n\r\n public override getFilterComponent(): Component {\r\n return getStandardFilterComponent(\"Is\", filterComponent);\r\n }\r\n\r\n public override getFilterValueText(value: ComparisonValue, configurationValues: Record): string {\r\n if (value.value === \"\") {\r\n return \"\";\r\n }\r\n\r\n try {\r\n const rawValues = value.value.split(\",\");\r\n const values = JSON.parse(configurationValues?.[ConfigurationValueKey.Values] ?? \"[]\") as ListItemBag[];\r\n const selectedValues = values.filter(v => rawValues.includes(v.value ?? \"\"));\r\n\r\n if (selectedValues.length >= 1) {\r\n return `'${selectedValues.map(v => v.value).join(\"' OR '\")}'`;\r\n }\r\n else {\r\n return \"\";\r\n }\r\n }\r\n catch {\r\n return value.value;\r\n }\r\n }\r\n\r\n public override doesValueMatchFilter(value: string, filterValue: ComparisonValue, _configurationValues: Record): boolean {\r\n const selectedValues = (filterValue.value ?? \"\").split(\",\").filter(v => v !== \"\").map(v => v.toLowerCase());\r\n let comparisonType = filterValue.comparisonType;\r\n\r\n if (comparisonType === ComparisonType.EqualTo) {\r\n // Treat EqualTo as if it were Contains.\r\n comparisonType = ComparisonType.Contains;\r\n }\r\n else if (comparisonType === ComparisonType.NotEqualTo) {\r\n // Treat NotEqualTo as if it were DoesNotContain.\r\n comparisonType = ComparisonType.DoesNotContain;\r\n }\r\n\r\n if (comparisonType === ComparisonType.IsBlank) {\r\n return value === \"\";\r\n }\r\n else if (comparisonType === ComparisonType.IsNotBlank) {\r\n return value !== \"\";\r\n }\r\n\r\n if (selectedValues.length > 0) {\r\n let matched = selectedValues.includes(value.toLowerCase());\r\n\r\n if (comparisonType === ComparisonType.DoesNotContain) {\r\n matched = !matched;\r\n }\r\n\r\n return matched;\r\n }\r\n\r\n return false;\r\n }\r\n}\r\n","// \r\n// Copyright by the Spark Development Network\r\n//\r\n// Licensed under the Rock Community License (the \"License\");\r\n// you may not use this file except in compliance with the License.\r\n// You may obtain a copy of the License at\r\n//\r\n// http://www.rockrms.com/license\r\n//\r\n// Unless required by applicable law or agreed to in writing, software\r\n// distributed under the License is distributed on an \"AS IS\" BASIS,\r\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n// See the License for the specific language governing permissions and\r\n// limitations under the License.\r\n// \r\n//\r\nimport { computed, defineComponent, inject, ref, watch } from \"vue\";\r\nimport { getFieldConfigurationProps, getFieldEditorProps } from \"./utils\";\r\nimport CheckBoxList from \"@Obsidian/Controls/checkBoxList\";\r\nimport DropDownList from \"@Obsidian/Controls/dropDownList\";\r\nimport NumberBox from \"@Obsidian/Controls/numberBox\";\r\nimport RadioButtonList from \"@Obsidian/Controls/radioButtonList\";\r\nimport TextBox from \"@Obsidian/Controls/textBox\";\r\nimport { toNumberOrNull } from \"@Obsidian/Utility/numberUtils\";\r\nimport { ConfigurationValueKey } from \"./singleSelectField.partial\";\r\nimport { ListItemBag } from \"@Obsidian/ViewModels/Utility/listItemBag\";\r\nimport { updateRefValue } from \"@Obsidian/Utility/component\";\r\n\r\nexport const EditComponent = defineComponent({\r\n name: \"SingleSelectField.Edit\",\r\n\r\n components: {\r\n DropDownList,\r\n RadioButtonList\r\n },\r\n\r\n props: getFieldEditorProps(),\r\n\r\n setup() {\r\n return {\r\n isRequired: inject(\"isRequired\") as boolean\r\n };\r\n },\r\n\r\n data() {\r\n return {\r\n internalValue: \"\"\r\n };\r\n },\r\n\r\n computed: {\r\n /** The options to choose from in the drop down list */\r\n options(): ListItemBag[] {\r\n try {\r\n const providedOptions = JSON.parse(this.configurationValues[ConfigurationValueKey.Values] ?? \"[]\") as ListItemBag[];\r\n\r\n if (this.isRadioButtons && !this.isRequired) {\r\n providedOptions.unshift({\r\n text: \"None\",\r\n value: \"\"\r\n });\r\n }\r\n\r\n return providedOptions;\r\n }\r\n catch {\r\n return [];\r\n }\r\n },\r\n\r\n /** Any additional attributes that will be assigned to the drop down list control */\r\n ddlConfigAttributes(): Record {\r\n const attributes: Record = {};\r\n const fieldTypeConfig = this.configurationValues[ConfigurationValueKey.FieldType];\r\n\r\n if (fieldTypeConfig === \"ddl_enhanced\") {\r\n attributes.enhanceForLongLists = true;\r\n }\r\n\r\n return attributes;\r\n },\r\n\r\n /** Any additional attributes that will be assigned to the radio button control */\r\n rbConfigAttributes(): Record {\r\n const attributes: Record = {};\r\n const repeatColumnsConfig = this.configurationValues[ConfigurationValueKey.RepeatColumns];\r\n\r\n if (repeatColumnsConfig) {\r\n attributes[\"repeatColumns\"] = toNumberOrNull(repeatColumnsConfig) || 0;\r\n }\r\n\r\n return attributes;\r\n },\r\n\r\n /** Is the control going to be radio buttons? */\r\n isRadioButtons(): boolean {\r\n const fieldTypeConfig = this.configurationValues[ConfigurationValueKey.FieldType];\r\n return fieldTypeConfig === \"rb\";\r\n }\r\n },\r\n\r\n watch: {\r\n internalValue() {\r\n this.$emit(\"update:modelValue\", this.internalValue);\r\n },\r\n\r\n modelValue: {\r\n immediate: true,\r\n handler() {\r\n this.internalValue = this.modelValue || \"\";\r\n }\r\n }\r\n },\r\n\r\n template: `\r\n\r\n\r\n`\r\n});\r\n\r\nexport const FilterComponent = defineComponent({\r\n name: \"SingleSelectField.Filter\",\r\n\r\n components: {\r\n CheckBoxList\r\n },\r\n\r\n props: getFieldEditorProps(),\r\n\r\n setup(props, { emit }) {\r\n const internalValue = ref(props.modelValue.split(\",\").filter(v => v !== \"\"));\r\n\r\n const options = computed((): ListItemBag[] => {\r\n try {\r\n const providedOptions = JSON.parse(props.configurationValues[ConfigurationValueKey.Values] ?? \"[]\") as ListItemBag[];\r\n\r\n return providedOptions;\r\n }\r\n catch {\r\n return [];\r\n }\r\n });\r\n\r\n watch(() => props.modelValue, () => {\r\n updateRefValue(internalValue, props.modelValue.split(\",\").filter(v => v !== \"\"));\r\n });\r\n\r\n watch(internalValue, () => {\r\n emit(\"update:modelValue\", internalValue.value.join(\",\"));\r\n });\r\n\r\n return {\r\n internalValue,\r\n options\r\n };\r\n },\r\n\r\n template: `\r\n\r\n`\r\n});\r\n\r\nconst controlTypeOptions: ListItemBag[] = [\r\n {\r\n value: \"ddl\",\r\n text: \"Drop Down List\"\r\n },\r\n {\r\n value: \"ddl_enhanced\",\r\n text: \"Drop Down List (Enhanced for Long Lists)\"\r\n },\r\n {\r\n value: \"rb\",\r\n text: \"Radio Buttons\"\r\n }\r\n];\r\n\r\nexport const ConfigurationComponent = defineComponent({\r\n name: \"SingleSelectField.Configuration\",\r\n\r\n components: {\r\n DropDownList,\r\n TextBox,\r\n NumberBox\r\n },\r\n\r\n props: getFieldConfigurationProps(),\r\n\r\n emits: [\r\n \"update:modelValue\",\r\n \"updateConfiguration\",\r\n \"updateConfigurationValue\"\r\n ],\r\n\r\n setup(props, { emit }) {\r\n // Define the properties that will hold the current selections.\r\n const rawValues = ref(\"\");\r\n const internalRawValues = ref(\"\");\r\n const controlType = ref(\"\");\r\n const repeatColumns = ref(null);\r\n\r\n const isRadioList = computed((): boolean => {\r\n return controlType.value === \"rb\";\r\n });\r\n\r\n const onBlur = (): void => {\r\n internalRawValues.value = rawValues.value;\r\n };\r\n\r\n /**\r\n * Update the modelValue property if any value of the dictionary has\r\n * actually changed. This helps prevent unwanted postbacks if the value\r\n * didn't really change - which can happen if multiple values get updated\r\n * at the same time.\r\n *\r\n * @returns true if a new modelValue was emitted to the parent component.\r\n */\r\n const maybeUpdateModelValue = (): boolean => {\r\n const newValue: Record = {...props.modelValue};\r\n\r\n // Construct the new value that will be emitted if it is different\r\n // than the current value.\r\n newValue[ConfigurationValueKey.CustomValues] = internalRawValues.value ?? \"\";\r\n newValue[ConfigurationValueKey.FieldType] = controlType.value ?? \"\";\r\n newValue[ConfigurationValueKey.RepeatColumns] = repeatColumns.value?.toString() ?? \"\";\r\n\r\n // Compare the new value and the old value.\r\n const anyValueChanged = newValue[ConfigurationValueKey.CustomValues] !== (props.modelValue[ConfigurationValueKey.CustomValues] ?? \"\")\r\n || newValue[ConfigurationValueKey.FieldType] !== (props.modelValue[ConfigurationValueKey.FieldType] ?? \"\")\r\n || newValue[ConfigurationValueKey.RepeatColumns] !== (props.modelValue[ConfigurationValueKey.RepeatColumns] ?? \"\");\r\n\r\n // If any value changed then emit the new model value.\r\n if (anyValueChanged) {\r\n emit(\"update:modelValue\", newValue);\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n };\r\n\r\n /**\r\n * Emits the updateConfigurationValue if the value has actually changed.\r\n * \r\n * @param key The key that was possibly modified.\r\n * @param value The new value.\r\n */\r\n const maybeUpdateConfiguration = (key: string, value: string): void => {\r\n if (maybeUpdateModelValue()) {\r\n emit(\"updateConfigurationValue\", key, value);\r\n }\r\n };\r\n\r\n // Watch for changes coming in from the parent component and update our\r\n // data to match the new information.\r\n watch(() => [props.modelValue, props.configurationProperties], () => {\r\n rawValues.value = props.modelValue[ConfigurationValueKey.CustomValues] ?? \"\";\r\n internalRawValues.value = rawValues.value;\r\n controlType.value = props.modelValue[ConfigurationValueKey.FieldType] ?? \"ddl\";\r\n repeatColumns.value = toNumberOrNull(props.modelValue[ConfigurationValueKey.RepeatColumns]);\r\n }, {\r\n immediate: true\r\n });\r\n\r\n // Watch for changes in properties that require new configuration\r\n // properties to be retrieved from the server.\r\n watch([internalRawValues], () => {\r\n if (maybeUpdateModelValue()) {\r\n emit(\"updateConfiguration\");\r\n }\r\n });\r\n\r\n // Watch for changes in properties that only require a local UI update.\r\n watch(controlType, () => maybeUpdateConfiguration(ConfigurationValueKey.FieldType, controlType.value ?? \"ddl\"));\r\n watch(repeatColumns, () => maybeUpdateConfiguration(ConfigurationValueKey.RepeatColumns, repeatColumns.value?.toString() ?? \"\"));\r\n\r\n return {\r\n controlType,\r\n controlTypeOptions,\r\n isRadioList,\r\n onBlur,\r\n rawValues,\r\n repeatColumns\r\n };\r\n },\r\n\r\n template: `\r\n
\r\n .\"\r\n textMode=\"multiline\"\r\n @blur=\"onBlur\" />\r\n\r\n \r\n\r\n \r\n
\r\n`\r\n});\r\n"],"names":["ConfigurationValueKey","defineAsyncComponent","_asyncToGenerator","EditComponent","FilterComponent","ConfigurationComponent","defineComponent","name","components","DropDownList","RadioButtonList","props","getFieldEditorProps","setup","isRequired","inject","data","internalValue","computed","options","_this$configurationVa","providedOptions","JSON","parse","configurationValues","Values","isRadioButtons","unshift","text","value","_unused","ddlConfigAttributes","attributes","fieldTypeConfig","FieldType","enhanceForLongLists","rbConfigAttributes","repeatColumnsConfig","RepeatColumns","toNumberOrNull","watch","$emit","modelValue","immediate","handler","template","CheckBoxList","_ref","emit","ref","split","filter","v","_props$configurationV","_unused2","updateRefValue","join","controlTypeOptions","TextBox","NumberBox","getFieldConfigurationProps","emits","_ref2","rawValues","internalRawValues","controlType","repeatColumns","isRadioList","onBlur","maybeUpdateModelValue","_internalRawValues$va","_controlType$value","_repeatColumns$value$","_repeatColumns$value","_props$modelValue$Con","_props$modelValue$Con2","_props$modelValue$Con3","newValue","_objectSpread","CustomValues","toString","anyValueChanged","maybeUpdateConfiguration","key","configurationProperties","_props$modelValue$Con4","_props$modelValue$Con5","_controlType$value2","_repeatColumns$value$2","_repeatColumns$value2"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAwBkBA,IAAAA,qBAAqB,aAArBA,qBAAqB,EAAA;QAArBA,qBAAqB,CAAA,QAAA,CAAA,GAAA,QAAA,CAAA;QAArBA,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