{"version":3,"file":"index.js","sources":["../../../Framework/FieldTypes/addressField.partial.ts","../../../Framework/FieldTypes/booleanField.partial.ts","../../../Framework/FieldTypes/campusField.partial.ts","../../../Framework/FieldTypes/campusesField.partial.ts","../../../Framework/FieldTypes/colorField.partial.ts","../../../Framework/FieldTypes/currencyField.partial.ts","../../../Framework/FieldTypes/dateField.partial.ts","../../../Framework/FieldTypes/dateRangeField.partial.ts","../../../Framework/FieldTypes/dateTimeField.partial.ts","../../../Framework/FieldTypes/dayOfWeekField.partial.ts","../../../Framework/FieldTypes/daysOfWeekField.partial.ts","../../../Framework/FieldTypes/decimalField.partial.ts","../../../Framework/FieldTypes/decimalRangeField.partial.ts","../../../Framework/FieldTypes/definedValueField.partial.ts","../../../Framework/FieldTypes/definedValueRangeField.partial.ts","../../../Framework/FieldTypes/emailField.partial.ts","../../../Framework/FieldTypes/fileField.partial.ts","../../../Framework/FieldTypes/genderField.partial.ts","../../../Framework/FieldTypes/imageField.partial.ts","../../../Framework/FieldTypes/integerField.partial.ts","../../../Framework/FieldTypes/integerRangeField.partial.ts","../../../Framework/FieldTypes/keyValueListField.partial.ts","../../../Framework/FieldTypes/memoField.partial.ts","../../../Framework/FieldTypes/monthDayField.partial.ts","../../../Framework/FieldTypes/multiSelectField.partial.ts","../../../Framework/FieldTypes/phoneNumberField.partial.ts","../../../Framework/FieldTypes/ratingField.partial.ts","../../../Framework/FieldTypes/reminderTypeField.partial.ts","../../../Framework/FieldTypes/reminderTypesField.partial.ts","../../../Framework/FieldTypes/singleSelectField.partial.ts","../../../Framework/FieldTypes/ssnField.partial.ts","../../../Framework/FieldTypes/textField.partial.ts","../../../Framework/FieldTypes/timeField.partial.ts","../../../Framework/FieldTypes/urlLinkField.partial.ts","../../../Framework/FieldTypes/valueListField.partial.ts","../../../Framework/FieldTypes/index.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 { FieldTypeBase } from \"./fieldType\";\r\n\r\nexport type AddressFieldValue = {\r\n street1?: string;\r\n street2?: string;\r\n city?: string;\r\n state?: string;\r\n postalCode?: string;\r\n country?: string;\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(\"./addressFieldComponents\")).EditComponent;\r\n});\r\n\r\n// The configuration component can be quite large, so load it only as needed.\r\nconst configurationComponent = defineAsyncComponent(async () => {\r\n return (await import(\"./addressFieldComponents\")).ConfigurationComponent;\r\n});\r\n\r\n/**\r\n * The field type handler for the Address field.\r\n */\r\nexport class AddressFieldType extends FieldTypeBase {\r\n public override getTextValue(value: string, _configurationValues: Record): string {\r\n try {\r\n const addressValue = JSON.parse(value || \"{}\") as AddressFieldValue;\r\n let textValue = `${addressValue.street1 ?? \"\"} ${addressValue.street2 ?? \"\"} ${addressValue.city ?? \"\"}, ${addressValue.state ?? \"\"} ${addressValue.postalCode ?? \"\"}`;\r\n\r\n textValue = textValue.replace(/ +/, \" \");\r\n textValue = textValue.replace(/^ +/, \"\");\r\n textValue = textValue.replace(/ +$/, \"\");\r\n\r\n return textValue === \",\" ? \"\" : textValue;\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 isFilterable(): boolean {\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 { Component } from \"vue\";\r\nimport { ComparisonType } from \"@Obsidian/Enums/Reporting/comparisonType\";\r\nimport { asBooleanOrNull } from \"@Obsidian/Utility/booleanUtils\";\r\nimport { defineAsyncComponent } from \"@Obsidian/Utility/component\";\r\nimport { FieldTypeBase } from \"./fieldType\";\r\nimport { getStandardFilterComponent } from \"./utils\";\r\n\r\nexport const enum ConfigurationValueKey {\r\n BooleanControlType = \"BooleanControlType\",\r\n FalseText = \"falsetext\",\r\n TrueText = \"truetext\"\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(\"./booleanFieldComponents\")).EditComponent;\r\n});\r\n\r\n// The configuration component can be quite large, so load it only as needed.\r\nconst configurationComponent = defineAsyncComponent(async () => {\r\n return (await import(\"./booleanFieldComponents\")).ConfigurationComponent;\r\n});\r\n\r\n// Only load the filter component as needed.\r\nconst filterComponent = defineAsyncComponent(async () => {\r\n return (await import(\"./booleanFieldComponents\")).FilterComponent;\r\n});\r\n\r\n/**\r\n * The field type handler for the Boolean field.\r\n */\r\nexport class BooleanFieldType extends FieldTypeBase {\r\n public override getCondensedTextValue(value: string, _configurationValues: Record): string {\r\n const boolValue = asBooleanOrNull(value);\r\n\r\n if (boolValue === null) {\r\n return \"\";\r\n }\r\n else if (boolValue === true) {\r\n return \"Y\";\r\n }\r\n else {\r\n return \"N\";\r\n }\r\n }\r\n\r\n public override getTextValue(value: string, configurationValues: Record): string {\r\n const boolValue = asBooleanOrNull(value);\r\n\r\n if (boolValue === null) {\r\n return \"\";\r\n }\r\n else if (boolValue === true) {\r\n return configurationValues[ConfigurationValueKey.TrueText] || \"Yes\";\r\n }\r\n else {\r\n return configurationValues[ConfigurationValueKey.FalseText] || \"No\";\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 getSupportedComparisonTypes(): ComparisonType {\r\n return ComparisonType.EqualTo | ComparisonType.NotEqualTo;\r\n }\r\n\r\n public override getFilterComponent(): Component {\r\n return getStandardFilterComponent(this.getSupportedComparisonTypes(), filterComponent);\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 { Component } from \"vue\";\r\nimport { defineAsyncComponent } from \"@Obsidian/Utility/component\";\r\nimport { ComparisonType } from \"@Obsidian/Enums/Reporting/comparisonType\";\r\nimport { ComparisonValue } from \"@Obsidian/Types/Reporting/comparisonValue\";\r\nimport { areEqual } from \"@Obsidian/Utility/guid\";\r\nimport { ListItemBag } from \"@Obsidian/ViewModels/Utility/listItemBag\";\r\nimport { FieldTypeBase } from \"./fieldType\";\r\nimport { getStandardFilterComponent } from \"./utils\";\r\n\r\nexport const enum ConfigurationValueKey {\r\n Values = \"values\",\r\n IncludeInactive = \"includeInactive\",\r\n FilterCampusTypes = \"filterCampusTypes\",\r\n FilterCampusStatus = \"filterCampusStatus\",\r\n SelectableCampuses = \"selectableCampuses\"\r\n}\r\n\r\nexport const enum ConfigurationPropertyKey {\r\n Campuses = \"campuses\",\r\n CampusTypes = \"campusTypes\",\r\n CampusStatuses = \"campusStatuses\"\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(\"./campusFieldComponents\")).EditComponent;\r\n});\r\n\r\n// Load the filter component only as needed.\r\nconst filterComponent = defineAsyncComponent(async () => {\r\n return (await import(\"./campusFieldComponents\")).FilterComponent;\r\n});\r\n\r\n// Load the configuration component only as needed.\r\nconst configurationComponent = defineAsyncComponent(async () => {\r\n return (await import(\"./campusFieldComponents\")).ConfigurationComponent;\r\n});\r\n\r\n/**\r\n * The field type handler for the Campus field.\r\n */\r\nexport class CampusFieldType extends FieldTypeBase {\r\n public override getTextValue(value: string, configurationValues: Record): string {\r\n if (value === undefined || value === null || 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(o => o.value === value);\r\n\r\n return selectedValues.map(o => o.text).join(\", \");\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 getSupportedComparisonTypes(): ComparisonType {\r\n return ComparisonType.None;\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(o => rawValues.filter(v => areEqual(v, o.value)).length > 0);\r\n\r\n return `'${selectedValues.map(o => o.text).join(\"' OR '\")}'`;\r\n }\r\n catch {\r\n return `'${value.value}'`;\r\n }\r\n }\r\n\r\n public override getFilterComponent(): Component {\r\n return getStandardFilterComponent(\"Is\", filterComponent);\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 { Component } from \"vue\";\r\nimport { defineAsyncComponent } from \"@Obsidian/Utility/component\";\r\nimport { ListItemBag } from \"@Obsidian/ViewModels/Utility/listItemBag\";\r\nimport { FieldTypeBase } from \"./fieldType\";\r\nimport { ComparisonValue } from \"@Obsidian/Types/Reporting/comparisonValue\";\r\nimport { ComparisonType } from \"@Obsidian/Enums/Reporting/comparisonType\";\r\n\r\nexport const enum ConfigurationValueKey {\r\n Values = \"values\",\r\n EnhancedSelection = \"enhancedselection\",\r\n RepeatColumns = \"repeatColumns\",\r\n IncludeInactive = \"includeInactive\",\r\n FilterCampusTypes = \"filterCampusTypes\",\r\n FilterCampusStatus = \"filterCampusStatus\",\r\n SelectableCampuses = \"selectableCampuses\"\r\n}\r\n\r\nexport const enum ConfigurationPropertyKey {\r\n Campuses = \"campuses\",\r\n CampusTypes = \"campusTypes\",\r\n CampusStatuses = \"campusStatuses\"\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(\"./campusesFieldComponents\")).EditComponent;\r\n});\r\n\r\n// Load the configuration component only as needed.\r\nconst configurationComponent = defineAsyncComponent(async () => {\r\n return (await import(\"./campusesFieldComponents\")).ConfigurationComponent;\r\n});\r\n\r\n/**\r\n * The field type handler for the Campuses field.\r\n */\r\nexport class CampusesFieldType extends FieldTypeBase {\r\n public override getTextValue(value: string, configurationValues: Record): string {\r\n if (value === undefined || value === null || 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 userValues = value.split(\",\");\r\n const selectedValues = values.filter(o => userValues.includes(o.value ?? \"\"));\r\n\r\n return selectedValues.map(o => o.text).join(\", \");\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 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 { Component } from \"vue\";\r\nimport { defineAsyncComponent } from \"@Obsidian/Utility/component\";\r\nimport { FieldTypeBase } from \"./fieldType\";\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(\"./colorFieldComponents\")).EditComponent;\r\n});\r\n\r\n// The configuration component can be quite large, so load it only as needed.\r\nconst configurationComponent = defineAsyncComponent(async () => {\r\n return (await import(\"./colorFieldComponents\")).ConfigurationComponent;\r\n});\r\n\r\n/**\r\n * The field type handler for the Color field.\r\n */\r\nexport class ColorFieldType extends FieldTypeBase {\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","// \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 { ComparisonType } from \"@Obsidian/Enums/Reporting/comparisonType\";\r\nimport { numericComparisonTypes } from \"@Obsidian/Core/Reporting/comparisonType\";\r\nimport { toCurrencyOrNull } from \"@Obsidian/Utility/numberUtils\";\r\nimport { FieldTypeBase } from \"./fieldType\";\r\n\r\n// The components can be quite large, so load only as needed.\r\nconst editComponent = defineAsyncComponent(async () => {\r\n return (await import(\"./currencyFieldComponents\")).EditComponent;\r\n});\r\n\r\n// The configuration component can be quite large, so load it only as needed.\r\nconst configurationComponent = defineAsyncComponent(async () => {\r\n return (await import(\"./currencyFieldComponents\")).ConfigurationComponent;\r\n});\r\n\r\n/**\r\n * The field type handler for the Currency field.\r\n */\r\nexport class CurrencyFieldType extends FieldTypeBase {\r\n public override getTextValue(value: string, _configurationValues: Record): string {\r\n return toCurrencyOrNull(value) ?? \"\";\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 override getSupportedComparisonTypes(): ComparisonType {\r\n return numericComparisonTypes;\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 { Component } from \"vue\";\r\nimport { defineAsyncComponent } from \"@Obsidian/Utility/component\";\r\nimport { ComparisonType } from \"@Obsidian/Enums/Reporting/comparisonType\";\r\nimport { dateComparisonTypes } from \"@Obsidian/Core/Reporting/comparisonType\";\r\nimport { ComparisonValue } from \"@Obsidian/Types/Reporting/comparisonValue\";\r\nimport { asBoolean } from \"@Obsidian/Utility/booleanUtils\";\r\nimport { toNumber } from \"@Obsidian/Utility/numberUtils\";\r\nimport { calculateSlidingDateRange, getRangeTypeText, getTimeUnitText, parseSlidingDateRangeString, RangeType, TimeUnit } from \"@Obsidian/Utility/slidingDateRange\";\r\nimport { RockDateTime } from \"@Obsidian/Utility/rockDateTime\";\r\nimport { FieldTypeBase } from \"./fieldType\";\r\nimport { getStandardFilterComponent } from \"./utils\";\r\n\r\nexport const enum ConfigurationValueKey {\r\n Format = \"format\",\r\n DisplayDiff = \"displayDiff\",\r\n DisplayCurrentOption = \"displayCurrentOption\",\r\n DatePickerControlType = \"datePickerControlType\",\r\n FutureYearCount = \"futureYearCount\"\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(\"./dateFieldComponents\")).EditComponent;\r\n});\r\n\r\n// The configuration component can be quite large, so load it only as needed.\r\nconst configurationComponent = defineAsyncComponent(async () => {\r\n return (await import(\"./dateFieldComponents\")).ConfigurationComponent;\r\n});\r\n\r\n// Load the filter component as needed.\r\nconst filterComponent = defineAsyncComponent(async () => {\r\n return (await import(\"./dateFieldComponents\")).FilterComponent;\r\n});\r\n\r\n/**\r\n * The field type handler for the Date field.\r\n */\r\nexport class DateFieldType extends FieldTypeBase {\r\n public override getTextValue(value: string, configurationValues: Record): string {\r\n if (this.isCurrentDateValue(value)) {\r\n return this.getCurrentDateText(value);\r\n }\r\n else if (value) {\r\n const dateValue = RockDateTime.parseISO(value);\r\n const dateFormatTemplate = configurationValues[ConfigurationValueKey.Format] || \"MM/dd/yyy\";\r\n\r\n if (dateValue !== null) {\r\n let textValue = dateValue.toASPString(dateFormatTemplate);\r\n\r\n const displayDiff = asBoolean(configurationValues[ConfigurationValueKey.DisplayDiff]);\r\n\r\n if (displayDiff === true) {\r\n textValue = `${textValue} ${dateValue.toElapsedString()}`;\r\n }\r\n\r\n return textValue;\r\n }\r\n else {\r\n return \"\";\r\n }\r\n }\r\n else {\r\n return \"\";\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 getSupportedComparisonTypes(): ComparisonType {\r\n return dateComparisonTypes;\r\n }\r\n\r\n public override getFilterComponent(): Component {\r\n return getStandardFilterComponent(this.getSupportedComparisonTypes(), filterComponent, {\r\n updateComparisonTypeNames: (options) => {\r\n options.filter(o => o.value === ComparisonType.Between.toString())\r\n .forEach(o => o.text = \"Range\");\r\n }\r\n });\r\n }\r\n\r\n public override getFilterValueDescription(value: ComparisonValue, configurationValues: Record): string {\r\n if (value.comparisonType === ComparisonType.Between) {\r\n return `During '${this.getFilterValueText(value, configurationValues)}'`;\r\n }\r\n\r\n return super.getFilterValueDescription(value, configurationValues);\r\n }\r\n\r\n public override getFilterValueText(value: ComparisonValue, _configurationValues: Record): string {\r\n const filterValues = value.value.split(\"\\t\");\r\n\r\n // If the comparison type is Between, then we need to use the second\r\n // value that was specified.\r\n if (value.comparisonType === ComparisonType.Between && filterValues.length > 1) {\r\n const range = parseSlidingDateRangeString(filterValues[1]);\r\n\r\n // If we couldn't parse the range information then just return\r\n // the raw value, which should be an empty string, but would give\r\n // some indication that something is wrong if it isn't.\r\n if (range === null) {\r\n return filterValues[1];\r\n }\r\n\r\n // Get the calculated values from the SlidingDateRange.\r\n const rangeTypeText = getRangeTypeText(range.rangeType);\r\n const timeUnitValue = range.timeValue ?? 1;\r\n const timeUnitText = getTimeUnitText(range.timeUnit ?? TimeUnit.Hour) + (timeUnitValue !== 1 ? \"s\" : \"\");\r\n\r\n // Format the text depending on the range type.\r\n if (range.rangeType === RangeType.Current) {\r\n return `${rangeTypeText} ${timeUnitText}`;\r\n }\r\n else if (([RangeType.Last, RangeType.Previous, RangeType.Next, RangeType.Upcoming] as number[]).includes(range.rangeType)) {\r\n return `${rangeTypeText} ${timeUnitValue} ${timeUnitText}`;\r\n }\r\n else {\r\n if (range.lowerDate && range.upperDate) {\r\n return `${range.lowerDate} to ${range.upperDate}`;\r\n }\r\n else if (range.lowerDate) {\r\n return `from ${range.lowerDate}`;\r\n }\r\n else if (range.upperDate) {\r\n return `through ${range.upperDate}`;\r\n }\r\n else {\r\n return \"\";\r\n }\r\n }\r\n }\r\n else {\r\n // If it's not a between, check if it's a \"Current Date\" value.\r\n if (this.isCurrentDateValue(filterValues[0])) {\r\n return `'${this.getCurrentDateText(filterValues[0])}'`;\r\n }\r\n\r\n // Nope, just use the date value specified.\r\n return filterValues[0] ? `'${filterValues[0]}'` : \"\";\r\n }\r\n }\r\n\r\n public override doesValueMatchFilter(value: string, filterValue: ComparisonValue, configurationValues: Record): boolean {\r\n if (!filterValue.comparisonType) {\r\n return false;\r\n }\r\n\r\n const filterValueValues = filterValue.value.split(\"\\t\");\r\n\r\n // Try to parse the value as a date. If it can't be parsed then check\r\n // it against the Is Blank and Is Not Blank comparison types.\r\n const valueDate = RockDateTime.parseISO(value ?? \"\");\r\n\r\n if (filterValue.comparisonType === ComparisonType.IsBlank) {\r\n return valueDate === null;\r\n }\r\n else if (filterValue.comparisonType === ComparisonType.IsNotBlank) {\r\n return valueDate !== null;\r\n }\r\n else if (valueDate === null) {\r\n return false;\r\n }\r\n\r\n if (filterValue.comparisonType === ComparisonType.Between && filterValueValues.length > 1) {\r\n const slidingRange = parseSlidingDateRangeString(filterValueValues[1]);\r\n\r\n if (!slidingRange) {\r\n return false;\r\n }\r\n\r\n const dateRange = calculateSlidingDateRange(slidingRange);\r\n\r\n // check if the date range was not valid or the value is before the\r\n // start date and time.\r\n if (!dateRange.start || valueDate.toMilliseconds() < dateRange.start.toMilliseconds()) {\r\n return false;\r\n }\r\n\r\n if (dateRange.end && valueDate.toMilliseconds() >= dateRange.end.toMilliseconds()) {\r\n return false;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n // Try to parse the filter date. If it can't be parsed then no match.\r\n const filterDate = this.getRelativeOrAbsoluteDate(filterValueValues[0]);\r\n\r\n if (filterDate === null) {\r\n return false;\r\n }\r\n\r\n // Convert the two dates into a format that we can do numeric comparison on.\r\n const newFilterValue: ComparisonValue = {\r\n comparisonType: filterValue.comparisonType,\r\n value: filterDate.toASPString(\"yyyyMMdd\")\r\n };\r\n\r\n return super.doesValueMatchFilter(valueDate.toASPString(\"yyyyMMdd\"), newFilterValue, configurationValues);\r\n }\r\n\r\n /**\r\n * Determines if the value is a \"current date\" value, which would then\r\n * specify the number of days +/- to adjust.\r\n *\r\n * @param value The value to be checked.\r\n *\r\n * @returns true if the value represents a \"current date\" value; otherwise false.\r\n */\r\n private isCurrentDateValue(value: string): boolean {\r\n return value.indexOf(\"CURRENT\") === 0;\r\n }\r\n\r\n /**\r\n * Get the text that describes the \"current date\" value specified.\r\n *\r\n * @param value The value that contains the \"current date\" value.\r\n *\r\n * @returns A human friendly description of the \"current date\" value.\r\n */\r\n private getCurrentDateText(value: string): string {\r\n const parts = (value ?? \"\").split(\":\");\r\n const diff = parts.length === 2 ? toNumber(parts[1]) : 0;\r\n\r\n if (diff === 1) {\r\n return \"Current Date plus 1 day\";\r\n }\r\n else if (diff > 0) {\r\n return `Current Date plus ${diff} days`;\r\n }\r\n else if (diff === -1) {\r\n return \"Current Date minus 1 day\";\r\n }\r\n else if (diff < 0) {\r\n return `Current Date minus ${Math.abs(diff)} days`;\r\n }\r\n else {\r\n return \"Current Date\";\r\n }\r\n }\r\n\r\n /**\r\n * Gets the relatative date if available otherwise the absolute date.\r\n *\r\n * @param value The string value to be parsed as relative or absolute.\r\n *\r\n * @returns A new RockDateTime instance that represents the value or null if it couldn't be determined.\r\n */\r\n private getRelativeOrAbsoluteDate(value: string): RockDateTime | null {\r\n if (!this.isCurrentDateValue(value)) {\r\n return RockDateTime.parseISO(value);\r\n }\r\n\r\n const today = RockDateTime.now().date;\r\n const valueParts = value.split(\":\");\r\n\r\n if (valueParts.length > 1) {\r\n return today.addDays(toNumber(valueParts[1]));\r\n }\r\n\r\n return today;\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 { Component } from \"vue\";\r\nimport { defineAsyncComponent } from \"@Obsidian/Utility/component\";\r\nimport { toNumber } from \"@Obsidian/Utility/numberUtils\";\r\nimport { DateTimeFormat, RockDateTime } from \"@Obsidian/Utility/rockDateTime\";\r\nimport { FieldTypeBase } from \"./fieldType\";\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(\"./dateRangeFieldComponents\")).EditComponent;\r\n});\r\n\r\n// The configuration component can be quite large, so load it only as needed.\r\nconst configurationComponent = defineAsyncComponent(async () => {\r\n return (await import(\"./dateRangeFieldComponents\")).ConfigurationComponent;\r\n});\r\n\r\n/**\r\n * The field type handler for the Date Range field.\r\n */\r\nexport class DateRangeFieldType extends FieldTypeBase {\r\n public override getTextValue(value: string, _configurationValues: Record): string {\r\n const dateParts = (value ?? \"\").split(\",\");\r\n\r\n if (dateParts.length !== 2) {\r\n return \"\";\r\n }\r\n\r\n const lowerDateParts = /^(\\d+)-(\\d+)-(\\d+)/.exec(dateParts[0]);\r\n const upperDateParts = /^(\\d+)-(\\d+)-(\\d+)/.exec(dateParts[1]);\r\n\r\n const lowerDate = lowerDateParts !== null ? RockDateTime.fromParts(toNumber(lowerDateParts[1]), toNumber(lowerDateParts[2]), toNumber(lowerDateParts[3])) : null;\r\n const upperDate = upperDateParts !== null ? RockDateTime.fromParts(toNumber(upperDateParts[1]), toNumber(upperDateParts[2]), toNumber(upperDateParts[3])) : null;\r\n\r\n if (lowerDate !== null && upperDate !== null) {\r\n return `${lowerDate.toLocaleString(DateTimeFormat.DateShort)} to ${upperDate.toLocaleString(DateTimeFormat.DateShort)}`;\r\n }\r\n else if (lowerDate !== null) {\r\n return `from ${lowerDate.toLocaleString(DateTimeFormat.DateShort)}`;\r\n }\r\n else if (upperDate !== null) {\r\n return `through ${upperDate.toLocaleString(DateTimeFormat.DateShort)}`;\r\n }\r\n else {\r\n return \"\";\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 isFilterable(): boolean {\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 { Component } from \"vue\";\r\nimport { defineAsyncComponent } from \"@Obsidian/Utility/component\";\r\nimport { ComparisonType } from \"@Obsidian/Enums/Reporting/comparisonType\";\r\nimport { dateComparisonTypes } from \"@Obsidian/Core/Reporting/comparisonType\";\r\nimport { ComparisonValue } from \"@Obsidian/Types/Reporting/comparisonValue\";\r\nimport { asBoolean } from \"@Obsidian/Utility/booleanUtils\";\r\nimport { toNumber } from \"@Obsidian/Utility/numberUtils\";\r\nimport { getRangeTypeText, getTimeUnitText, parseSlidingDateRangeString, RangeType, TimeUnit } from \"@Obsidian/Utility/slidingDateRange\";\r\nimport { RockDateTime } from \"@Obsidian/Utility/rockDateTime\";\r\nimport { FieldTypeBase } from \"./fieldType\";\r\nimport { getStandardFilterComponent } from \"./utils\";\r\n\r\nexport const enum ConfigurationValueKey {\r\n Format = \"format\",\r\n DisplayAsElapsedTime = \"displayDiff\",\r\n DisplayCurrentOption = \"displayCurrentOption\"\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(\"./dateTimeFieldComponents\")).EditComponent;\r\n});\r\n\r\n// The configuration component can be quite large, so load it only as needed.\r\nconst configurationComponent = defineAsyncComponent(async () => {\r\n return (await import(\"./dateTimeFieldComponents\")).ConfigurationComponent;\r\n});\r\n\r\n// Load the filter component as needed.\r\nconst filterComponent = defineAsyncComponent(async () => {\r\n return (await import(\"./dateTimeFieldComponents\")).FilterComponent;\r\n});\r\n\r\n\r\n/**\r\n * The field type handler for the Date Time field.\r\n */\r\nexport class DateTimeFieldType extends FieldTypeBase {\r\n public override getTextValue(value: string, configurationValues: Record): string {\r\n if (this.isCurrentDateValue(value)) {\r\n return this.getCurrentDateText(value);\r\n }\r\n else if (value) {\r\n const dateValue = RockDateTime.parseISO(value);\r\n const dateFormatTemplate = configurationValues[ConfigurationValueKey.Format] || \"MM/dd/yyy\";\r\n\r\n if (dateValue !== null) {\r\n let textValue = dateValue.toASPString(dateFormatTemplate);\r\n\r\n const displayDiff = asBoolean(configurationValues[ConfigurationValueKey.DisplayAsElapsedTime]);\r\n\r\n if (displayDiff === true) {\r\n textValue = `${textValue} ${dateValue.toElapsedString()}`;\r\n }\r\n\r\n return textValue;\r\n }\r\n else {\r\n return \"\";\r\n }\r\n }\r\n else {\r\n return \"\";\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 getSupportedComparisonTypes(): ComparisonType {\r\n return dateComparisonTypes;\r\n }\r\n\r\n public override getFilterComponent(): Component {\r\n return getStandardFilterComponent(this.getSupportedComparisonTypes(), filterComponent, {\r\n updateComparisonTypeNames: (options) => {\r\n options.filter(o => o.value === ComparisonType.Between.toString())\r\n .forEach(o => o.text = \"Range\");\r\n }\r\n });\r\n }\r\n\r\n public override getFilterValueDescription(value: ComparisonValue, configurationValues: Record): string {\r\n if (value.comparisonType === ComparisonType.Between) {\r\n return `During '${this.getFilterValueText(value, configurationValues)}'`;\r\n }\r\n\r\n return super.getFilterValueDescription(value, configurationValues);\r\n }\r\n\r\n public override getFilterValueText(value: ComparisonValue, _configurationValues: Record): string {\r\n const filterValues = value.value.split(\"\\t\");\r\n\r\n // If the comparison type is Between, then we need to use the second\r\n // value that was specified.\r\n if (value.comparisonType === ComparisonType.Between && filterValues.length > 1) {\r\n const range = parseSlidingDateRangeString(filterValues[1]);\r\n\r\n // If we couldn't parse the range information then just return\r\n // the raw value, which should be an empty string, but would give\r\n // some indication that something is wrong if it isn't.\r\n if (range === null) {\r\n return filterValues[1];\r\n }\r\n\r\n // Get the calculated values from the SlidingDateRange.\r\n const rangeTypeText = getRangeTypeText(range.rangeType);\r\n const timeUnitValue = range.timeValue ?? 1;\r\n const timeUnitText = getTimeUnitText(range.timeUnit ?? TimeUnit.Hour) + (timeUnitValue !== 1 ? \"s\" : \"\");\r\n\r\n // Format the text depending on the range type.\r\n if (range.rangeType === RangeType.Current) {\r\n return `${rangeTypeText} ${timeUnitText}`;\r\n }\r\n else if (([RangeType.Last, RangeType.Previous, RangeType.Next, RangeType.Upcoming] as number[]).includes(range.rangeType)) {\r\n return `${rangeTypeText} ${timeUnitValue} ${timeUnitText}`;\r\n }\r\n else {\r\n if (range.lowerDate && range.upperDate) {\r\n return `${range.lowerDate} to ${range.upperDate}`;\r\n }\r\n else if (range.lowerDate) {\r\n return `from ${range.lowerDate}`;\r\n }\r\n else if (range.upperDate) {\r\n return `through ${range.upperDate}`;\r\n }\r\n else {\r\n return \"\";\r\n }\r\n }\r\n }\r\n else {\r\n // If it's not a between, check if it's a \"Current Date\" value.\r\n if (this.isCurrentDateValue(filterValues[0])) {\r\n return `'${this.getCurrentDateText(filterValues[0])}'`;\r\n }\r\n\r\n // Nope, just use the date value specified.\r\n return filterValues[0] ? `'${filterValues[0]}'` : \"\";\r\n }\r\n }\r\n\r\n /**\r\n * Determines if the value is a \"current date\" value, which would then\r\n * specify the number of minutes +/- to adjust.\r\n *\r\n * @param value The value to be checked.\r\n *\r\n * @returns true if the value represents a \"current date\" value; otherwise false.\r\n */\r\n private isCurrentDateValue(value: string): boolean {\r\n return value.indexOf(\"CURRENT\") === 0;\r\n }\r\n\r\n /**\r\n * Get the text that describes the \"current date\" value specified.\r\n *\r\n * @param value The value that contains the \"current date\" value.\r\n *\r\n * @returns A human friendly description of the \"current date\" value.\r\n */\r\n private getCurrentDateText(value: string): string {\r\n const parts = value.split(\":\");\r\n const diff = parts.length === 2 ? toNumber(parts[1]) : 0;\r\n\r\n if (diff === 1) {\r\n return \"Current Time plus 1 minute\";\r\n }\r\n else if (diff > 0) {\r\n return `Current Time plus ${diff} minutes`;\r\n }\r\n else if (diff === -1) {\r\n return \"Current Time minus 1 minute\";\r\n }\r\n else if (diff < 0) {\r\n return `Current Time minus ${Math.abs(diff)} minutes`;\r\n }\r\n else {\r\n return \"Current Time\";\r\n }\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 { Component } from \"vue\";\r\nimport { defineAsyncComponent } from \"@Obsidian/Utility/component\";\r\nimport { toNumberOrNull } from \"@Obsidian/Utility/numberUtils\";\r\nimport { FieldTypeBase } from \"./fieldType\";\r\nimport { getStandardFilterComponent } from \"./utils\";\r\nimport { DayOfWeek } from \"@Obsidian/Enums/Controls/dayOfWeek\";\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(\"./dayOfWeekFieldComponents\")).EditComponent;\r\n});\r\n\r\n// The filter component can be quite large, so load it only as needed.\r\nconst filterComponent = defineAsyncComponent(async () => {\r\n return (await import(\"./dayOfWeekFieldComponents\")).FilterComponent;\r\n});\r\n\r\n// The configuration component can be quite large, so load it only as needed.\r\nconst configurationComponent = defineAsyncComponent(async () => {\r\n return (await import(\"./dayOfWeekFieldComponents\")).ConfigurationComponent;\r\n});\r\n\r\n/**\r\n * The field type handler for the DayOfWeek field.\r\n */\r\nexport class DayOfWeekFieldType extends FieldTypeBase {\r\n public override getTextValue(value: string, _configurationValues: Record): string {\r\n const dayValue = toNumberOrNull(value);\r\n\r\n if (dayValue === null) {\r\n return \"\";\r\n }\r\n else {\r\n switch (dayValue) {\r\n case DayOfWeek.Sunday:\r\n return \"Sunday\";\r\n\r\n case DayOfWeek.Monday:\r\n return \"Monday\";\r\n\r\n case DayOfWeek.Tuesday:\r\n return \"Tuesday\";\r\n\r\n case DayOfWeek.Wednesday:\r\n return \"Wednesday\";\r\n\r\n case DayOfWeek.Thursday:\r\n return \"Thursday\";\r\n\r\n case DayOfWeek.Friday:\r\n return \"Friday\";\r\n\r\n case DayOfWeek.Saturday:\r\n return \"Saturday\";\r\n\r\n default:\r\n return \"\";\r\n }\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","// \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 { ComparisonType } from \"@Obsidian/Enums/Reporting/comparisonType\";\r\nimport { containsComparisonTypes } from \"@Obsidian/Core/Reporting/comparisonType\";\r\nimport { toNumberOrNull } from \"@Obsidian/Utility/numberUtils\";\r\nimport { DayOfWeek } from \"@Obsidian/Enums/Controls/dayOfWeek\";\r\nimport { FieldTypeBase } from \"./fieldType\";\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(\"./daysOfWeekFieldComponents\")).EditComponent;\r\n});\r\n\r\n// The configuration component can be quite large, so load it only as needed.\r\nconst configurationComponent = defineAsyncComponent(async () => {\r\n return (await import(\"./daysOfWeekFieldComponents\")).ConfigurationComponent;\r\n});\r\n\r\n/**\r\n * The field type handler for the DaysOfWeek field.\r\n */\r\nexport class DaysOfWeekFieldType extends FieldTypeBase {\r\n public override getTextValue(value: string, _configurationValues: Record): string {\r\n if (value === null || value === undefined || value === \"\") {\r\n return \"\";\r\n }\r\n\r\n return value.split(\",\")\r\n .map(v => {\r\n const dayValue = toNumberOrNull(v);\r\n\r\n if (dayValue === null) {\r\n return \"\";\r\n }\r\n else {\r\n switch (dayValue) {\r\n case DayOfWeek.Sunday:\r\n return \"Sunday\";\r\n\r\n case DayOfWeek.Monday:\r\n return \"Monday\";\r\n\r\n case DayOfWeek.Tuesday:\r\n return \"Tuesday\";\r\n\r\n case DayOfWeek.Wednesday:\r\n return \"Wednesday\";\r\n\r\n case DayOfWeek.Thursday:\r\n return \"Thursday\";\r\n\r\n case DayOfWeek.Friday:\r\n return \"Friday\";\r\n\r\n case DayOfWeek.Saturday:\r\n return \"Saturday\";\r\n\r\n default:\r\n return \"\";\r\n }\r\n }\r\n })\r\n .filter(v => v != \"\")\r\n .join(\", \");\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 getSupportedComparisonTypes(): ComparisonType {\r\n return containsComparisonTypes;\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 { Component } from \"vue\";\r\nimport { defineAsyncComponent } from \"@Obsidian/Utility/component\";\r\nimport { ComparisonType } from \"@Obsidian/Enums/Reporting/comparisonType\";\r\nimport { numericComparisonTypes } from \"@Obsidian/Core/Reporting/comparisonType\";\r\nimport { toNumberOrNull } from \"@Obsidian/Utility/numberUtils\";\r\nimport { FieldTypeBase } from \"./fieldType\";\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(\"./decimalFieldComponents\")).EditComponent;\r\n});\r\n\r\n// The configuration component can be quite large, so load it only as needed.\r\nconst configurationComponent = defineAsyncComponent(async () => {\r\n return (await import(\"./decimalFieldComponents\")).ConfigurationComponent;\r\n});\r\n\r\n/**\r\n * The field type handler for the Decimal field.\r\n */\r\nexport class DecimalFieldType extends FieldTypeBase {\r\n public override getTextValue(value: string, _configurationValues: Record): string {\r\n return toNumberOrNull(value)?.toString() ?? \"\";\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 getSupportedComparisonTypes(): ComparisonType {\r\n return numericComparisonTypes;\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 { Component } from \"vue\";\r\nimport { defineAsyncComponent } from \"@Obsidian/Utility/component\";\r\nimport { toNumberOrNull } from \"@Obsidian/Utility/numberUtils\";\r\nimport { FieldTypeBase } from \"./fieldType\";\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(\"./decimalRangeFieldComponents\")).EditComponent;\r\n});\r\n\r\n// The configuration component can be quite large, so load it only as needed.\r\nconst configurationComponent = defineAsyncComponent(async () => {\r\n return (await import(\"./decimalRangeFieldComponents\")).ConfigurationComponent;\r\n});\r\n\r\n/**\r\n * The field type handler for the Decimal Range field.\r\n */\r\nexport class DecimalRangeFieldType extends FieldTypeBase {\r\n public override getTextValue(value: string, _configurationValues: Record): string {\r\n if (value === null || value === undefined || value === \"\" || value === \",\") {\r\n return \"\";\r\n }\r\n\r\n const numbers = value.split(\",\").map(v => toNumberOrNull(v));\r\n\r\n // If there are not two components then it's not valid, or if both\r\n // components are not numbers then it's not valid.\r\n if (numbers.length !== 2 || (numbers[0] === null && numbers[1] === null)) {\r\n return \"\";\r\n }\r\n\r\n if (numbers[0] === null) {\r\n return `through ${numbers[1]}`;\r\n }\r\n else if (numbers[1] === null) {\r\n return `from ${numbers[0]}`;\r\n }\r\n else {\r\n return `${numbers[0]} to ${numbers[1]}`;\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 isFilterable(): boolean {\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 { Component } from \"vue\";\r\nimport { defineAsyncComponent } from \"@Obsidian/Utility/component\";\r\nimport { ComparisonType } from \"@Obsidian/Enums/Reporting/comparisonType\";\r\nimport { containsComparisonTypes } from \"@Obsidian/Core/Reporting/comparisonType\";\r\nimport { ComparisonValue } from \"@Obsidian/Types/Reporting/comparisonValue\";\r\nimport { asBoolean } from \"@Obsidian/Utility/booleanUtils\";\r\nimport { FieldTypeBase } from \"./fieldType\";\r\nimport { getStandardFilterComponent } from \"./utils\";\r\n\r\n/**\r\n * The key names for the configuration properties available when editing the\r\n * configuration of a DefinedValue field type.\r\n */\r\nexport const enum ConfigurationPropertyKey {\r\n /** The defined types available to be picked. */\r\n DefinedTypes = \"definedTypes\",\r\n\r\n /** The defined values available to be picked. */\r\n DefinedValues = \"definedValues\"\r\n}\r\n\r\n/**\r\n * The configuration value keys used by the configuraiton and edit controls.\r\n */\r\nexport const enum ConfigurationValueKey {\r\n /** The unique identifier of the defined type currently selected. */\r\n DefinedType = \"definedtype\",\r\n\r\n /**\r\n * The unique identifiers of the defined values that can be selected\r\n * during editing.\r\n */\r\n Values = \"values\",\r\n\r\n /**\r\n * Contains \"True\" if the edit control should be rendered to allow\r\n * selecting multiple values.\r\n */\r\n AllowMultiple = \"allowmultiple\",\r\n\r\n /**\r\n * Contains \"True\" if the edit control should display descriptions instead\r\n * of values.\r\n */\r\n DisplayDescription = \"displaydescription\",\r\n\r\n /**\r\n * Contains \"True\" if the edit control should use enhanced selection.\r\n */\r\n EnhancedSelection = \"enhancedselection\",\r\n\r\n /** Contains \"True\" if in-active values should be included. */\r\n IncludeInactive = \"includeInactive\",\r\n\r\n /** A comma separated list of selectable value identifiers. */\r\n SelectableValues = \"selectableValues\",\r\n\r\n /** Contains \"True\" if adding new values is permitted. */\r\n AllowAddingNewValues = \"AllowAddingNewValues\",\r\n\r\n /** The number of columns to use when multiple selection is allowed. */\r\n RepeatColumns = \"RepeatColumns\"\r\n}\r\n\r\nexport type ValueItem = {\r\n value: string,\r\n text: string,\r\n description: string\r\n};\r\n\r\nexport type ClientValue = {\r\n value: string,\r\n text: string,\r\n description: string\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(\"./definedValueFieldComponents\")).EditComponent;\r\n});\r\n\r\n// The configuration component can be quite large, so load it only as needed.\r\nconst configurationComponent = defineAsyncComponent(async () => {\r\n return (await import(\"./definedValueFieldComponents\")).ConfigurationComponent;\r\n});\r\n\r\n// Load the filter component only as needed.\r\nconst filterComponent = defineAsyncComponent(async () => {\r\n return (await import(\"./definedValueFieldComponents\")).FilterComponent;\r\n});\r\n\r\n/**\r\n * The field type handler for the Defined Value field.\r\n */\r\nexport class DefinedValueFieldType extends FieldTypeBase {\r\n public override getTextValue(value: string, configurationValues: Record): string {\r\n try {\r\n const clientValue = JSON.parse(value ?? \"\") as ClientValue;\r\n\r\n try {\r\n const values = JSON.parse(configurationValues[ConfigurationValueKey.Values] ?? \"[]\") as ValueItem[];\r\n const displayDescription = asBoolean(configurationValues[ConfigurationValueKey.DisplayDescription]);\r\n const rawValues = clientValue.value.split(\",\");\r\n\r\n return values.filter(v => rawValues.includes(v.value))\r\n .map(v => displayDescription && v.description ? v.description : v.text)\r\n .join(\", \");\r\n }\r\n catch {\r\n return clientValue.value;\r\n }\r\n }\r\n catch {\r\n return \"\";\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 getSupportedComparisonTypes(): ComparisonType {\r\n return containsComparisonTypes;\r\n }\r\n\r\n public override getFilterValueText(value: ComparisonValue, configurationValues: Record): string {\r\n try {\r\n const clientValue = JSON.parse(value.value ?? \"\") as ClientValue;\r\n\r\n const values = JSON.parse(configurationValues?.[ConfigurationValueKey.Values] ?? \"[]\") as ValueItem[];\r\n const useDescription = asBoolean(configurationValues?.[ConfigurationValueKey.DisplayDescription]);\r\n const rawValues = clientValue.value.split(\",\");\r\n\r\n const text = values.filter(v => rawValues.includes(v.value))\r\n .map(v => useDescription ? v.description : v.text)\r\n .join(\"' OR '\");\r\n\r\n return text ? `'${text}'` : \"\";\r\n }\r\n catch {\r\n return \"\";\r\n }\r\n }\r\n\r\n public override getFilterComponent(): Component {\r\n return getStandardFilterComponent(this.getSupportedComparisonTypes(), filterComponent);\r\n }\r\n\r\n public override doesValueMatchFilter(value: string, filterValue: ComparisonValue, _configurationValues: Record): boolean {\r\n const clientValue = JSON.parse(value || \"{}\") as ClientValue;\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 (clientValue.value ?? \"\") === \"\";\r\n }\r\n else if (comparisonType === ComparisonType.IsNotBlank) {\r\n return (clientValue.value ?? \"\") !== \"\";\r\n }\r\n\r\n if (selectedValues.length > 0) {\r\n const userValues = (clientValue.value ?? \"\").toLowerCase().split(\",\").filter(v => v !== \"\");\r\n\r\n if (comparisonType === ComparisonType.Contains) {\r\n let matchedCount = 0;\r\n\r\n for (const userValue of userValues) {\r\n if (selectedValues.includes(userValue)) {\r\n matchedCount += 1;\r\n }\r\n }\r\n\r\n return matchedCount > 0;\r\n }\r\n else {\r\n let matchedCount = 0;\r\n\r\n for (const userValue of userValues) {\r\n if (selectedValues.includes(userValue)) {\r\n matchedCount += 1;\r\n }\r\n }\r\n\r\n return matchedCount !== selectedValues.length;\r\n }\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 { Component } from \"vue\";\r\nimport { defineAsyncComponent } from \"@Obsidian/Utility/component\";\r\nimport { asBoolean } from \"@Obsidian/Utility/booleanUtils\";\r\nimport { List } from \"@Obsidian/Utility/linq\";\r\nimport { FieldTypeBase } from \"./fieldType\";\r\n\r\nexport const enum ConfigurationValueKey {\r\n Values = \"values\",\r\n DisplayDescription = \"displaydescription\"\r\n}\r\n\r\nexport type ValueItem = {\r\n value: string,\r\n text: string,\r\n description: string\r\n};\r\n\r\nexport type ClientValue = {\r\n value?: string;\r\n text?: string;\r\n description?: string;\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(\"./definedValueRangeFieldComponents\")).EditComponent;\r\n});\r\n\r\n/**\r\n * The field type handler for the Defined Value Range field.\r\n */\r\nexport class DefinedValueRangeFieldType extends FieldTypeBase {\r\n public override getTextValue(value: string, configurationValues: Record): string {\r\n try {\r\n const clientValue = JSON.parse(value) as ClientValue;\r\n\r\n try {\r\n const values = new List(JSON.parse(configurationValues[ConfigurationValueKey.Values] ?? \"[]\") as ValueItem[]);\r\n const displayDescription = asBoolean(configurationValues[ConfigurationValueKey.DisplayDescription]);\r\n const rawValues = (clientValue.value ?? \"\").split(\",\");\r\n\r\n if (rawValues.length !== 2) {\r\n return value;\r\n }\r\n\r\n const lowerValue = values.firstOrUndefined(v => v?.value === rawValues[0]);\r\n const upperValue = values.firstOrUndefined(v => v?.value === rawValues[1]);\r\n\r\n if (lowerValue === undefined && upperValue === undefined) {\r\n return \"\";\r\n }\r\n\r\n if (displayDescription) {\r\n return `${lowerValue?.description ?? \"\"} to ${upperValue?.description ?? \"\"}`;\r\n }\r\n else {\r\n return `${lowerValue?.text ?? \"\"} to ${upperValue?.text ?? \"\"}`;\r\n }\r\n }\r\n catch {\r\n return clientValue.value ?? \"\";\r\n }\r\n }\r\n catch {\r\n return value;\r\n }\r\n }\r\n\r\n public override getCondensedTextValue(value: string, _configurationValues: Record): string {\r\n try {\r\n const clientValue = JSON.parse(value ?? \"\") as ClientValue;\r\n\r\n return clientValue.text ?? \"\";\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 isFilterable(): boolean {\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 { Component } from \"vue\";\r\nimport { defineAsyncComponent } from \"@Obsidian/Utility/component\";\r\nimport { ComparisonType } from \"@Obsidian/Enums/Reporting/comparisonType\";\r\nimport { stringComparisonTypes } from \"@Obsidian/Core/Reporting/comparisonType\";\r\nimport { FieldTypeBase } from \"./fieldType\";\r\nimport { getStandardFilterComponent } from \"./utils\";\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(\"./emailFieldComponents\")).EditComponent;\r\n});\r\n\r\n// The filter component can be quite large, so load it only as needed.\r\nconst filterComponent = defineAsyncComponent(async () => {\r\n return (await import(\"./emailFieldComponents\")).FilterComponent;\r\n});\r\n\r\n// The configuration component can be quite large, so load it only as needed.\r\nconst configurationComponent = defineAsyncComponent(async () => {\r\n return (await import(\"./emailFieldComponents\")).ConfigurationComponent;\r\n});\r\n\r\n/**\r\n * The field type handler for the Email field.\r\n */\r\nexport class EmailFieldType extends FieldTypeBase {\r\n public override getHtmlValue(value: string, configurationValues: Record): string {\r\n const textValue = this.getTextValue(value, configurationValues);\r\n\r\n return textValue ? `${textValue}` : \"\";\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(this.getSupportedComparisonTypes(), filterComponent);\r\n }\r\n\r\n public override getSupportedComparisonTypes(): ComparisonType {\r\n return stringComparisonTypes;\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 { Component } from \"vue\";\r\nimport { defineAsyncComponent } from \"@Obsidian/Utility/component\";\r\nimport { ComparisonType } from \"@Obsidian/Enums/Reporting/comparisonType\";\r\nimport { escapeHtml } from \"@Obsidian/Utility/stringUtils\";\r\nimport { ListItemBag } from \"@Obsidian/ViewModels/Utility/listItemBag\";\r\nimport { FieldTypeBase } from \"./fieldType\";\r\n\r\n/**\r\n * The key names for the configuration properties available when editing the\r\n * configuration of a File field type.\r\n */\r\nexport const enum ConfigurationPropertyKey {\r\n /** The binary file types available to pick from. */\r\n BinaryFileTypes = \"binaryFileTypes\"\r\n}\r\n\r\n/**\r\n * The configuration value keys used by the configuraiton and edit controls.\r\n */\r\nexport const enum ConfigurationValueKey {\r\n /** The unique identifier of the BinaryFileType to use for uploads. */\r\n BinaryFileType = \"binaryFileType\",\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(\"./fileFieldComponents\")).EditComponent;\r\n});\r\n\r\n// The configuration component can be quite large, so load it only as needed.\r\nconst configurationComponent = defineAsyncComponent(async () => {\r\n return (await import(\"./fileFieldComponents\")).ConfigurationComponent;\r\n});\r\n\r\n/**\r\n * The field type handler for the File field.\r\n */\r\nexport class FileFieldType extends FieldTypeBase {\r\n public override getTextValue(value: string, configurationValues: Record): string {\r\n try {\r\n const realValue = JSON.parse(value) as ListItemBag;\r\n\r\n return realValue.text ?? \"\";\r\n }\r\n catch {\r\n return value;\r\n }\r\n }\r\n\r\n public override getHtmlValue(value: string, _configurationValues: Record): string {\r\n try {\r\n const realValue = JSON.parse(value ?? \"\") as ListItemBag;\r\n\r\n return `View`;\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 getSupportedComparisonTypes(): ComparisonType {\r\n return ComparisonType.IsBlank | ComparisonType.IsNotBlank;\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 { Component } from \"vue\";\r\nimport { defineAsyncComponent } from \"@Obsidian/Utility/component\";\r\nimport { toNumberOrNull } from \"@Obsidian/Utility/numberUtils\";\r\nimport { FieldTypeBase } from \"./fieldType\";\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(\"./genderFieldComponents\")).EditComponent;\r\n});\r\n\r\n// The configuration component can be quite large, so load it only as needed.\r\nconst configurationComponent = defineAsyncComponent(async () => {\r\n return (await import(\"./genderFieldComponents\")).ConfigurationComponent;\r\n});\r\n\r\n/**\r\n * The field type handler for the Gender field.\r\n */\r\nexport class GenderFieldType extends FieldTypeBase {\r\n public override getTextValue(value: string, _configurationValues: Record): string {\r\n const numberValue = toNumberOrNull(value);\r\n\r\n if (numberValue === 0) {\r\n return \"Unknown\";\r\n }\r\n else if (numberValue === 1) {\r\n return \"Male\";\r\n }\r\n else if (numberValue === 2) {\r\n return \"Female\";\r\n }\r\n else {\r\n return \"\";\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","// \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 { ComparisonType } from \"@Obsidian/Enums/Reporting/comparisonType\";\r\nimport { ListItemBag } from \"@Obsidian/ViewModels/Utility/listItemBag\";\r\nimport { FieldTypeBase } from \"./fieldType\";\r\n\r\n/**\r\n * The key names for the configuration properties available when editing the\r\n * configuration of an Image field type.\r\n */\r\nexport const enum ConfigurationPropertyKey {\r\n /** The binary file types available to pick from. */\r\n BinaryFileTypes = \"binaryFileTypes\"\r\n}\r\n\r\n/**\r\n * The configuration value keys used by the configuraiton and edit controls.\r\n */\r\nexport const enum ConfigurationValueKey {\r\n /** The unique identifier of the BinaryFileType to use for uploads. */\r\n BinaryFileType = \"binaryFileType\",\r\n\r\n /** Determines if the rendered HTML should be clickable. */\r\n FormatAsLink = \"formatAsLink\"\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(\"./imageFieldComponents\")).EditComponent;\r\n});\r\n\r\n// The configuration component can be quite large, so load it only as needed.\r\nconst configurationComponent = defineAsyncComponent(async () => {\r\n return (await import(\"./imageFieldComponents\")).ConfigurationComponent;\r\n});\r\n\r\n/**\r\n * The field type handler for the Image field.\r\n */\r\nexport class ImageFieldType extends FieldTypeBase {\r\n public override getTextValue(value: string, _configurationValues: Record): string {\r\n try {\r\n const realValue = JSON.parse(value ?? \"\") as ListItemBag;\r\n\r\n if (!realValue.value) {\r\n return \"\";\r\n }\r\n\r\n return realValue.text ?? \"\";\r\n }\r\n catch {\r\n return value;\r\n }\r\n }\r\n\r\n public override getHtmlValue(value: string, _configurationValues: Record): string {\r\n try {\r\n const realValue = JSON.parse(value ?? \"\") as ListItemBag;\r\n\r\n if (!realValue.value) {\r\n return \"\";\r\n }\r\n\r\n return ``;\r\n }\r\n catch {\r\n return value ?? \"\";\r\n }\r\n }\r\n\r\n public override getCondensedHtmlValue(value: string, _configurationValues: Record): string {\r\n try {\r\n const realValue = JSON.parse(value ?? \"\") as ListItemBag;\r\n\r\n if (!realValue.value) {\r\n return \"\";\r\n }\r\n\r\n return ``;\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 getSupportedComparisonTypes(): ComparisonType {\r\n return ComparisonType.IsBlank | ComparisonType.IsNotBlank;\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 { Component } from \"vue\";\r\nimport { defineAsyncComponent } from \"@Obsidian/Utility/component\";\r\nimport { ComparisonType } from \"@Obsidian/Enums/Reporting/comparisonType\";\r\nimport { numericComparisonTypes } from \"@Obsidian/Core/Reporting/comparisonType\";\r\nimport { toNumberOrNull } from \"@Obsidian/Utility/numberUtils\";\r\nimport { FieldTypeBase } from \"./fieldType\";\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(\"./integerFieldComponents\")).EditComponent;\r\n});\r\n\r\n// The configuration component can be quite large, so load it only as needed.\r\nconst configurationComponent = defineAsyncComponent(async () => {\r\n return (await import(\"./integerFieldComponents\")).ConfigurationComponent;\r\n});\r\n\r\n/**\r\n * The field type handler for the Integer field.\r\n */\r\nexport class IntegerFieldType extends FieldTypeBase {\r\n public override getTextValue(value: string, _configurationValues: Record): string {\r\n return toNumberOrNull(value)?.toString() ?? \"\";\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 getSupportedComparisonTypes(): ComparisonType {\r\n return numericComparisonTypes;\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 { Component } from \"vue\";\r\nimport { defineAsyncComponent } from \"@Obsidian/Utility/component\";\r\nimport { toNumberOrNull } from \"@Obsidian/Utility/numberUtils\";\r\nimport { FieldTypeBase } from \"./fieldType\";\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(\"./integerRangeFieldComponents\")).EditComponent;\r\n});\r\n\r\n// The configuration component can be quite large, so load it only as needed.\r\nconst configurationComponent = defineAsyncComponent(async () => {\r\n return (await import(\"./integerRangeFieldComponents\")).ConfigurationComponent;\r\n});\r\n\r\n/**\r\n * The field type handler for the Integer Range field.\r\n */\r\nexport class IntegerRangeFieldType extends FieldTypeBase {\r\n public override getTextValue(value: string, _configurationValues: Record): string {\r\n if (value === \"\" || value === \",\") {\r\n return \"\";\r\n }\r\n\r\n const numbers = value.split(\",\").map(v => toNumberOrNull(v));\r\n\r\n // If there are not two components then it's not valid, or if both\r\n // components are not numbers then it's not valid.\r\n if (numbers.length !== 2 || (numbers[0] === null && numbers[1] === null)) {\r\n return \"\";\r\n }\r\n\r\n if (numbers[0] === null) {\r\n return `through ${numbers[1]}`;\r\n }\r\n else if (numbers[1] === null) {\r\n return `from ${numbers[0]}`;\r\n }\r\n else {\r\n return `${numbers[0]} to ${numbers[1]}`;\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 isFilterable(): boolean {\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 { Component } from \"vue\";\r\nimport { defineAsyncComponent } from \"@Obsidian/Utility/component\";\r\nimport { List } from \"@Obsidian/Utility/linq\";\r\nimport { FieldTypeBase } from \"./fieldType\";\r\n\r\nexport const enum ConfigurationValueKey {\r\n Values = \"values\",\r\n KeyPrompt = \"keyprompt\",\r\n ValuePrompt = \"valueprompt\",\r\n DisplayValueFirst = \"displayvaluefirst\",\r\n AllowHtml = \"allowhtml\",\r\n\r\n // Only used during editing of the field type configuration.\r\n CustomValues = \"customvalues\",\r\n DefinedType = \"definedtype\"\r\n}\r\n\r\nexport const enum ConfigurationPropertyKey {\r\n DefinedTypes = \"definedTypes\"\r\n}\r\n\r\nexport type ValueItem = {\r\n value: string,\r\n text: string\r\n};\r\n\r\nexport type ClientValue = {\r\n key: string,\r\n value: string\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(\"./keyValueListFieldComponents\")).EditComponent;\r\n});\r\n\r\n// Load the configuration component as needed.\r\nconst configurationComponent = defineAsyncComponent(async () => {\r\n return (await import(\"./keyValueListFieldComponents\")).ConfigurationComponent;\r\n});\r\n\r\n/**\r\n * The field type handler for the Key Value List field.\r\n */\r\nexport class KeyValueListFieldType extends FieldTypeBase {\r\n public override getTextValue(value: string, configurationValues: Record): string {\r\n try {\r\n const clientValues = JSON.parse(value ?? \"[]\") as ClientValue[];\r\n const configuredValues = new List(JSON.parse(configurationValues[ConfigurationValueKey.Values] ?? \"[]\") as ValueItem[]);\r\n const values: string[] = [];\r\n\r\n for (const clientValue of clientValues) {\r\n const configuredValue = configuredValues.firstOrUndefined(v => v.value === clientValue.value);\r\n\r\n if (configuredValue !== undefined) {\r\n values.push(`${clientValue.key}: ${configuredValue.text}`);\r\n }\r\n else {\r\n values.push(`${clientValue.key}: ${clientValue.value}`);\r\n }\r\n }\r\n\r\n return values.join(\", \");\r\n }\r\n catch {\r\n return \"\";\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 isFilterable(): boolean {\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 { Component } from \"vue\";\r\nimport { defineAsyncComponent } from \"@Obsidian/Utility/component\";\r\nimport { ComparisonType } from \"@Obsidian/Enums/Reporting/comparisonType\";\r\nimport { stringComparisonTypes } from \"@Obsidian/Core/Reporting/comparisonType\";\r\nimport { FieldTypeBase } from \"./fieldType\";\r\nimport { getStandardFilterComponent } from \"./utils\";\r\n\r\nexport const enum ConfigurationValueKey {\r\n NumberOfRows = \"numberofrows\",\r\n AllowHtml = \"allowhtml\",\r\n MaxCharacters = \"maxcharacters\",\r\n ShowCountDown = \"showcountdown\"\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(\"./memoFieldComponents\")).EditComponent;\r\n});\r\n\r\n// The filter component can be quite large, so load it only as needed.\r\nconst filterComponent = defineAsyncComponent(async () => {\r\n return (await import(\"./memoFieldComponents\")).FilterComponent;\r\n});\r\n\r\n// The configuration component can be quite large, so load it only as needed.\r\nconst configurationComponent = defineAsyncComponent(async () => {\r\n return (await import(\"./memoFieldComponents\")).ConfigurationComponent;\r\n});\r\n\r\n/**\r\n * The field type handler for the Memo field.\r\n */\r\nexport class MemoFieldType extends FieldTypeBase {\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 getSupportedComparisonTypes(): ComparisonType {\r\n return stringComparisonTypes;\r\n }\r\n\r\n public override getFilterComponent(): Component {\r\n return getStandardFilterComponent(this.getSupportedComparisonTypes(), filterComponent);\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 { Component } from \"vue\";\r\nimport { defineAsyncComponent } from \"@Obsidian/Utility/component\";\r\nimport { toNumber } from \"@Obsidian/Utility/numberUtils\";\r\nimport { FieldTypeBase } from \"./fieldType\";\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(\"./monthDayFieldComponents\")).EditComponent;\r\n});\r\n\r\n// The configuration component can be quite large, so load it only as needed.\r\nconst configurationComponent = defineAsyncComponent(async () => {\r\n return (await import(\"./monthDayFieldComponents\")).ConfigurationComponent;\r\n});\r\n\r\n/**\r\n * The field type handler for the MonthDay field.\r\n */\r\nexport class MonthDayFieldType extends FieldTypeBase {\r\n public override getTextValue(value: string, _configurationValues: Record): string {\r\n const components = (value).split(\"/\");\r\n\r\n if (components.length !== 2) {\r\n return \"\";\r\n }\r\n\r\n const month = toNumber(components[0]);\r\n const day = toNumber(components[1]);\r\n\r\n if (month >= 1 && day >= 1 && month <= 12 && day <= 31) {\r\n const months = [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"];\r\n\r\n return `${months[month-1]} ${day}`;\r\n }\r\n else {\r\n return \"\";\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","// \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 { ComparisonType } from \"@Obsidian/Enums/Reporting/comparisonType\";\r\nimport { containsComparisonTypes } from \"@Obsidian/Core/Reporting/comparisonType\";\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\n\r\nexport const enum ConfigurationValueKey {\r\n Values = \"values\",\r\n RepeatColumns = \"repeatColumns\",\r\n RepeatDirection = \"repeatDirection\",\r\n EnhancedSelection = \"enhancedselection\",\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(\"./multiSelectFieldComponents\")).EditComponent;\r\n});\r\n\r\n// Load the filter component only as needed.\r\nconst filterComponent = defineAsyncComponent(async () => {\r\n return (await import(\"./multiSelectFieldComponents\")).FilterComponent;\r\n});\r\n\r\n// Load the configuration component only as needed.\r\nconst configurationComponent = defineAsyncComponent(async () => {\r\n return (await import(\"./multiSelectFieldComponents\")).ConfigurationComponent;\r\n});\r\n\r\n/**\r\n * The field type handler for the MultiSelect field.\r\n */\r\nexport class MultiSelectFieldType 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 userValues = value.split(\",\");\r\n const selectedValues = values.filter(v => userValues.includes(v.value ?? \"\"));\r\n\r\n return selectedValues.map(v => v.text).join(\", \");\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 getSupportedComparisonTypes(): ComparisonType {\r\n return containsComparisonTypes;\r\n }\r\n\r\n public override getFilterComponent(): Component {\r\n return getStandardFilterComponent(this.getSupportedComparisonTypes(), 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 const userValues = value?.split(\",\").filter(v => v !== \"\").map(v => v.toLowerCase()) ?? [];\r\n\r\n if (comparisonType === ComparisonType.Contains) {\r\n let matchedCount = 0;\r\n\r\n for (const userValue of userValues) {\r\n if (selectedValues.includes(userValue)) {\r\n matchedCount += 1;\r\n }\r\n }\r\n\r\n return matchedCount > 0;\r\n }\r\n else {\r\n let matchedCount = 0;\r\n\r\n for (const userValue of userValues) {\r\n if (selectedValues.includes(userValue)) {\r\n matchedCount += 1;\r\n }\r\n }\r\n\r\n return matchedCount !== selectedValues.length;\r\n }\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 { Component } from \"vue\";\r\nimport { defineAsyncComponent } from \"@Obsidian/Utility/component\";\r\nimport { FieldTypeBase } from \"./fieldType\";\r\nimport { formatPhoneNumber } from \"@Obsidian/Utility/phone\";\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(\"./phoneNumberFieldComponents\")).EditComponent;\r\n});\r\n\r\n// The configuration component can be quite large, so load it only as needed.\r\nconst configurationComponent = defineAsyncComponent(async () => {\r\n return (await import(\"./phoneNumberFieldComponents\")).ConfigurationComponent;\r\n});\r\n\r\n/**\r\n * The field type handler for the Phone Number field.\r\n */\r\nexport class PhoneNumberFieldType extends FieldTypeBase {\r\n public override getTextValue(value: string, _configurationValues: Record): string {\r\n return formatPhoneNumber(value || \"\");\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","// \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 { ComparisonType } from \"@Obsidian/Enums/Reporting/comparisonType\";\r\nimport { numericComparisonTypes } from \"@Obsidian/Core/Reporting/comparisonType\";\r\nimport { toNumberOrNull } from \"@Obsidian/Utility/numberUtils\";\r\nimport { FieldTypeBase } from \"./fieldType\";\r\nimport { ComparisonValue } from \"@Obsidian/Types/Reporting/comparisonValue\";\r\n\r\nexport const enum ConfigurationValueKey {\r\n MaxRating = \"max\"\r\n}\r\n\r\nexport type RatingValue = {\r\n value?: number;\r\n\r\n maxValue?: number;\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(\"./ratingFieldComponents\")).EditComponent;\r\n});\r\n\r\n// The configuration component can be quite large, so load it only as needed.\r\nconst configurationComponent = defineAsyncComponent(async () => {\r\n return (await import(\"./ratingFieldComponents\")).ConfigurationComponent;\r\n});\r\n\r\n/**\r\n * The field type handler for the Rating field.\r\n */\r\nexport class RatingFieldType extends FieldTypeBase {\r\n public override getHtmlValue(value: string, configurationValues: Record): string {\r\n let ratingValue: RatingValue | null;\r\n\r\n try {\r\n ratingValue = JSON.parse(value ?? \"\") as RatingValue;\r\n }\r\n catch {\r\n ratingValue = null;\r\n }\r\n\r\n const rating = ratingValue?.value ?? 0;\r\n const maxRating = toNumberOrNull(configurationValues[ConfigurationValueKey.MaxRating]) ?? 5;\r\n let html = \"\";\r\n\r\n for (let i = 0; i < rating && i < maxRating; i++) {\r\n html += ``;\r\n }\r\n\r\n for (let i = rating; i < maxRating; i++) {\r\n html += ``;\r\n }\r\n\r\n return html;\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 getSupportedComparisonTypes(): ComparisonType {\r\n return numericComparisonTypes;\r\n }\r\n\r\n public override doesValueMatchFilter(value: string, filterValue: ComparisonValue, configurationValues: Record): boolean {\r\n let ratingValue: RatingValue | null;\r\n\r\n try {\r\n ratingValue = JSON.parse(value) as RatingValue;\r\n }\r\n catch {\r\n ratingValue = null;\r\n }\r\n\r\n const rating = ratingValue?.value ?? 0;\r\n\r\n if (filterValue.comparisonType === ComparisonType.IsBlank) {\r\n return rating === 0;\r\n }\r\n else if (filterValue.comparisonType === ComparisonType.IsNotBlank) {\r\n return rating !== 0;\r\n }\r\n else {\r\n return super.doesValueMatchFilter(rating.toString(), filterValue, configurationValues);\r\n }\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 { Component } from \"vue\";\r\nimport { defineAsyncComponent } from \"@Obsidian/Utility/component\";\r\nimport { FieldTypeBase } from \"./fieldType\";\r\nimport { Guid } from \"@Obsidian/Types\";\r\n\r\nexport const enum ConfigurationValueKey {\r\n Values = \"values\"\r\n}\r\n\r\nexport type ReminderTypeFieldItem = {\r\n guid: Guid\r\n name: string,\r\n entityTypeName: string\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(\"./reminderTypeFieldComponents\")).EditComponent;\r\n});\r\n\r\n// The configuration component can be quite large, so load it only as needed.\r\nconst configurationComponent = defineAsyncComponent(async () => {\r\n return (await import(\"./reminderTypeFieldComponents\")).ConfigurationComponent;\r\n});\r\n\r\n/**\r\n * The field type handler for the Reminder Type field.\r\n */\r\nexport class ReminderTypeFieldType extends FieldTypeBase {\r\n public override getTextValue(value: string, configurationValues: Record): string {\r\n if (value === undefined || value === null || value === \"\") {\r\n return \"\";\r\n }\r\n\r\n try {\r\n const values = JSON.parse(configurationValues[ConfigurationValueKey.Values] ?? \"[]\") as ReminderTypeFieldItem[];\r\n const selectedValues = values.filter(o => o.guid.toLowerCase() === value.toLowerCase());\r\n\r\n return selectedValues[0].name;\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","// \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 { ListItemBag } from \"@Obsidian/ViewModels/Utility/listItemBag\";\r\nimport { ComparisonType } from \"@Obsidian/Enums/Reporting/comparisonType\";\r\nimport { binaryComparisonTypes, containsComparisonTypes } from \"@Obsidian/Core/Reporting/comparisonType\";\r\nimport { toNumberOrNull } from \"@Obsidian/Utility/numberUtils\";\r\nimport { FieldTypeBase } from \"./fieldType\";\r\n\r\nexport const enum ConfigurationValueKey {\r\n Values = \"values\",\r\n EnhancedSelection = \"enhancedselection\",\r\n RepeatColumns = \"repeatColumns\",\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(\"./reminderTypesFieldComponents\")).EditComponent;\r\n});\r\n\r\n// The configuration component can be quite large, so load it only as needed.\r\nconst configurationComponent = defineAsyncComponent(async () => {\r\n return (await import(\"./reminderTypesFieldComponents\")).ConfigurationComponent;\r\n});\r\n\r\n/**\r\n * The field type handler for the Reminder Types field.\r\n */\r\nexport class ReminderTypesFieldType extends FieldTypeBase {\r\n public override getTextValue(value: string, configurationValues: Record): string {\r\n if (value === undefined || value === null || 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 userValues = value.split(\",\");\r\n const selectedValues = values.filter(o => userValues.includes(o.value ?? \"\"));\r\n\r\n return selectedValues.map(o => o.text).join(\", \");\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 getSupportedComparisonTypes(): ComparisonType {\r\n return binaryComparisonTypes | containsComparisonTypes;\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 { 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\n\r\nimport { Component } from \"vue\";\r\nimport { defineAsyncComponent } from \"@Obsidian/Utility/component\";\r\nimport { FieldTypeBase } from \"./fieldType\";\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(\"./ssnFieldComponents\")).EditComponent;\r\n});\r\n\r\n// The configuration component can be quite large, so load it only as needed.\r\nconst configurationComponent = defineAsyncComponent(async () => {\r\n return (await import(\"./ssnFieldComponents\")).ConfigurationComponent;\r\n});\r\n\r\nexport class SSNFieldType extends FieldTypeBase {\r\n public override getTextValue(value: string, _configurationValues: Record): string {\r\n const strippedValue = value.replace(/[^0-9]/g, \"\");\r\n\r\n if (strippedValue.length !== 9) {\r\n return \"\";\r\n }\r\n\r\n return `xxx-xx-${value.substr(5, 4)}`;\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 isFilterable(): boolean {\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\n\r\nimport { Component } from \"vue\";\r\nimport { defineAsyncComponent } from \"@Obsidian/Utility/component\";\r\nimport { ComparisonType } from \"@Obsidian/Enums/Reporting/comparisonType\";\r\nimport { stringComparisonTypes } from \"@Obsidian/Core/Reporting/comparisonType\";\r\nimport { FieldTypeBase } from \"./fieldType\";\r\n\r\nexport const enum ConfigurationValueKey {\r\n /** Contains \"True\" if the text field is designed for password entry. */\r\n IsPassword = \"ispassword\",\r\n\r\n /** The maximum number of characters allowed in the text entry field. */\r\n MaxCharacters = \"maxcharacters\",\r\n\r\n /** Contains \"True\" if the text field should show the character countdown. */\r\n ShowCountdown = \"showcountdown\"\r\n}\r\n\r\n// The configuration component can be quite large, so load it only as needed.\r\nconst configurationComponent = defineAsyncComponent(async () => {\r\n return (await import(\"./textFieldComponents\")).ConfigurationComponent;\r\n});\r\n\r\nexport class TextFieldType extends FieldTypeBase {\r\n public override getConfigurationComponent(): Component {\r\n return configurationComponent;\r\n }\r\n\r\n public override getSupportedComparisonTypes(): ComparisonType {\r\n return stringComparisonTypes;\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 { Component } from \"vue\";\r\nimport { defineAsyncComponent } from \"@Obsidian/Utility/component\";\r\nimport { ComparisonType } from \"@Obsidian/Enums/Reporting/comparisonType\";\r\nimport { dateComparisonTypes } from \"@Obsidian/Core/Reporting/comparisonType\";\r\nimport { toNumber } from \"@Obsidian/Utility/numberUtils\";\r\nimport { padLeft } from \"@Obsidian/Utility/stringUtils\";\r\nimport { FieldTypeBase } from \"./fieldType\";\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(\"./timeFieldComponents\")).EditComponent;\r\n});\r\n\r\n// The configuration component can be quite large, so load it only as needed.\r\nconst configurationComponent = defineAsyncComponent(async () => {\r\n return (await import(\"./timeFieldComponents\")).ConfigurationComponent;\r\n});\r\n\r\n/**\r\n * The field type handler for the Time field.\r\n */\r\nexport class TimeFieldType extends FieldTypeBase {\r\n public override getTextValue(value: string, _configurationValues: Record): string {\r\n const values = /^(\\d+):(\\d+)/.exec(value ?? \"\");\r\n\r\n if (values === null || values.length < 3) {\r\n return \"\";\r\n }\r\n\r\n let hour = toNumber(values[1]);\r\n const minute = toNumber(values[2]);\r\n const meridiem = hour >= 12 ? \"PM\" : \"AM\";\r\n\r\n if (hour > 12) {\r\n hour -= 12;\r\n }\r\n\r\n return `${hour}:${padLeft(minute.toString(), 2, \"0\")} ${meridiem}`;\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 getSupportedComparisonTypes(): ComparisonType {\r\n return dateComparisonTypes;\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 { Component } from \"vue\";\r\nimport { defineAsyncComponent } from \"@Obsidian/Utility/component\";\r\nimport { ComparisonType } from \"@Obsidian/Enums/Reporting/comparisonType\";\r\nimport { stringComparisonTypes } from \"@Obsidian/Core/Reporting/comparisonType\";\r\nimport { FieldTypeBase } from \"./fieldType\";\r\n\r\nexport const enum ConfigurationValueKey {\r\n ShouldRequireTrailingForwardSlash = \"ShouldRequireTrailingForwardSlash\",\r\n ShouldAlwaysShowCondensed = \"ShouldAlwaysShowCondensed\"\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(\"./urlLinkFieldComponents\")).EditComponent;\r\n});\r\n\r\n/**\r\n * The field type handler for the Email field.\r\n */\r\nexport class UrlLinkFieldType extends FieldTypeBase {\r\n public override getHtmlValue(value: string, configurationValues: Record): string {\r\n const textValue = this.getTextValue(value, configurationValues);\r\n\r\n return textValue ? `${textValue}` : \"\";\r\n }\r\n\r\n public override getEditComponent(): Component {\r\n return editComponent;\r\n }\r\n\r\n public override getSupportedComparisonTypes(): ComparisonType {\r\n return stringComparisonTypes;\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 { Component } from \"vue\";\r\nimport { defineAsyncComponent } from \"@Obsidian/Utility/component\";\r\nimport { FieldTypeBase } from \"./fieldType\";\r\nimport { ListItemBag } from \"@Obsidian/ViewModels/Utility/listItemBag\";\r\n\r\nexport const enum ConfigurationValueKey {\r\n Values = \"values\",\r\n ValuePrompt = \"valueprompt\",\r\n AllowHtml = \"allowhtml\",\r\n\r\n // Only used during editing of the field type configuration.\r\n CustomValues = \"customvalues\",\r\n DefinedType = \"definedtype\"\r\n}\r\n\r\nexport const enum ConfigurationPropertyKey {\r\n DefinedTypes = \"definedTypes\"\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(\"./valueListFieldComponents\")).EditComponent;\r\n});\r\n\r\n// Load the configuration component as needed.\r\nconst configurationComponent = defineAsyncComponent(async () => {\r\n return (await import(\"./valueListFieldComponents\")).ConfigurationComponent;\r\n});\r\n\r\n/**\r\n * The field type handler for the Value List field.\r\n */\r\nexport class ValueListFieldType extends FieldTypeBase {\r\n public override getTextValue(value: string, configurationValues: Record): string {\r\n try {\r\n const clientValues = JSON.parse(value ?? \"[]\") as string[];\r\n const configuredValues = JSON.parse(configurationValues[ConfigurationValueKey.Values] ?? \"[]\") as ListItemBag[];\r\n const values: string[] = [];\r\n\r\n for (const clientValue of clientValues) {\r\n if (configuredValues.length > 0) {\r\n const configuredValue = configuredValues.find(v => v.value === clientValue);\r\n\r\n if (configuredValue) {\r\n values.push(configuredValue.text ?? \"\");\r\n }\r\n }\r\n else {\r\n values.push(clientValue);\r\n }\r\n }\r\n\r\n return values.join(\", \");\r\n }\r\n catch {\r\n return \"\";\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 isFilterable(): boolean {\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 { FieldType as FieldTypeGuids } from \"@Obsidian/SystemGuids/fieldType\";\r\nimport { registerFieldType } from \"@Obsidian/Utility/fieldTypes\";\r\n\r\nexport { ConfigurationValues, getFieldEditorProps } from \"./utils\";\r\n\r\n/*\r\n * Define the standard field types in Rock.\r\n */\r\n\r\nimport { AddressFieldType } from \"./addressField.partial\";\r\nregisterFieldType(FieldTypeGuids.Address, new AddressFieldType());\r\n\r\nimport { BooleanFieldType } from \"./booleanField.partial\";\r\nregisterFieldType(FieldTypeGuids.Boolean, new BooleanFieldType());\r\n\r\nimport { CampusFieldType } from \"./campusField.partial\";\r\nregisterFieldType(FieldTypeGuids.Campus, new CampusFieldType());\r\n\r\nimport { CampusesFieldType } from \"./campusesField.partial\";\r\nregisterFieldType(FieldTypeGuids.Campuses, new CampusesFieldType());\r\n\r\nimport { ColorFieldType } from \"./colorField.partial\";\r\nregisterFieldType(FieldTypeGuids.Color, new ColorFieldType());\r\n\r\nimport { CurrencyFieldType } from \"./currencyField.partial\";\r\nregisterFieldType(FieldTypeGuids.Currency, new CurrencyFieldType());\r\n\r\nimport { DateFieldType } from \"./dateField.partial\";\r\nregisterFieldType(FieldTypeGuids.Date, new DateFieldType());\r\n\r\nimport { DateRangeFieldType } from \"./dateRangeField.partial\";\r\nregisterFieldType(FieldTypeGuids.DateRange, new DateRangeFieldType());\r\n\r\nimport { DateTimeFieldType } from \"./dateTimeField.partial\";\r\nregisterFieldType(FieldTypeGuids.DateTime, new DateTimeFieldType());\r\n\r\nimport { DayOfWeekFieldType } from \"./dayOfWeekField.partial\";\r\nregisterFieldType(FieldTypeGuids.DayOfWeek, new DayOfWeekFieldType());\r\n\r\nimport { DaysOfWeekFieldType } from \"./daysOfWeekField.partial\";\r\nregisterFieldType(FieldTypeGuids.DaysOfWeek, new DaysOfWeekFieldType());\r\n\r\nimport { DecimalFieldType } from \"./decimalField.partial\";\r\nregisterFieldType(FieldTypeGuids.Decimal, new DecimalFieldType());\r\n\r\nimport { DecimalRangeFieldType } from \"./decimalRangeField.partial\";\r\nregisterFieldType(FieldTypeGuids.DecimalRange, new DecimalRangeFieldType());\r\n\r\nimport { DefinedValueFieldType } from \"./definedValueField.partial\";\r\nregisterFieldType(FieldTypeGuids.DefinedValue, new DefinedValueFieldType());\r\n\r\nimport { DefinedValueRangeFieldType } from \"./definedValueRangeField.partial\";\r\nregisterFieldType(FieldTypeGuids.DefinedValueRange, new DefinedValueRangeFieldType());\r\n\r\nimport { EmailFieldType } from \"./emailField.partial\";\r\nregisterFieldType(FieldTypeGuids.Email, new EmailFieldType());\r\n\r\nimport { FileFieldType } from \"./fileField.partial\";\r\nregisterFieldType(FieldTypeGuids.File, new FileFieldType());\r\n\r\nimport { GenderFieldType } from \"./genderField.partial\";\r\nregisterFieldType(FieldTypeGuids.Gender, new GenderFieldType());\r\n\r\nimport { ImageFieldType } from \"./imageField.partial\";\r\nregisterFieldType(FieldTypeGuids.Image, new ImageFieldType());\r\n\r\nimport { IntegerFieldType } from \"./integerField.partial\";\r\nregisterFieldType(FieldTypeGuids.Integer, new IntegerFieldType());\r\n\r\nimport { IntegerRangeFieldType } from \"./integerRangeField.partial\";\r\nregisterFieldType(FieldTypeGuids.IntegerRange, new IntegerRangeFieldType());\r\n\r\nimport { KeyValueListFieldType } from \"./keyValueListField.partial\";\r\nregisterFieldType(FieldTypeGuids.KeyValueList, new KeyValueListFieldType());\r\n\r\nimport { MemoFieldType } from \"./memoField.partial\";\r\nregisterFieldType(FieldTypeGuids.Memo, new MemoFieldType());\r\n\r\nimport { MonthDayFieldType } from \"./monthDayField.partial\";\r\nregisterFieldType(FieldTypeGuids.MonthDay, new MonthDayFieldType());\r\n\r\nimport { MultiSelectFieldType } from \"./multiSelectField.partial\";\r\nregisterFieldType(FieldTypeGuids.MultiSelect, new MultiSelectFieldType());\r\n\r\nimport { PhoneNumberFieldType } from \"./phoneNumberField.partial\";\r\nregisterFieldType(FieldTypeGuids.PhoneNumber, new PhoneNumberFieldType());\r\n\r\nimport { RatingFieldType } from \"./ratingField.partial\";\r\nregisterFieldType(FieldTypeGuids.Rating, new RatingFieldType());\r\n\r\nimport { ReminderTypeFieldType } from \"./reminderTypeField.partial\";\r\nregisterFieldType(FieldTypeGuids.ReminderType, new ReminderTypeFieldType());\r\n\r\nimport { ReminderTypesFieldType } from \"./reminderTypesField.partial\";\r\nregisterFieldType(FieldTypeGuids.ReminderTypes, new ReminderTypesFieldType());\r\n\r\nimport { SingleSelectFieldType } from \"./singleSelectField.partial\";\r\nregisterFieldType(FieldTypeGuids.SingleSelect, new SingleSelectFieldType());\r\n\r\nimport { SSNFieldType } from \"./ssnField.partial\";\r\nregisterFieldType(FieldTypeGuids.Ssn, new SSNFieldType());\r\n\r\nimport { TextFieldType } from \"./textField.partial\";\r\nregisterFieldType(FieldTypeGuids.Text, new TextFieldType());\r\n\r\nimport { TimeFieldType } from \"./timeField.partial\";\r\nregisterFieldType(FieldTypeGuids.Time, new TimeFieldType());\r\n\r\nimport { UrlLinkFieldType } from \"./urlLinkField.partial\";\r\nregisterFieldType(FieldTypeGuids.UrlLink, new UrlLinkFieldType());\r\n\r\nimport { ValueListFieldType } from \"./valueListField.partial\";\r\nregisterFieldType(FieldTypeGuids.ValueList, new ValueListFieldType());\r\n"],"names":["editComponent","defineAsyncComponent","_asyncToGenerator","EditComponent","configurationComponent","ConfigurationComponent","AddressFieldType","FieldTypeBase","getTextValue","value","_configurationValues","_addressValue$street","_addressValue$street2","_addressValue$city","_addressValue$state","_addressValue$postalC","addressValue","JSON","parse","textValue","concat","street1","street2","city","state","postalCode","replace","_unused","getEditComponent","getConfigurationComponent","isFilterable","ConfigurationValueKey","filterComponent","FilterComponent","BooleanFieldType","getCondensedTextValue","boolValue","asBooleanOrNull","configurationValues","TrueText","FalseText","getSupportedComparisonTypes","ComparisonType","EqualTo","NotEqualTo","getFilterComponent","getStandardFilterComponent","ConfigurationPropertyKey","CampusFieldType","undefined","_configurationValues$","values","Values","selectedValues","filter","o","map","text","join","None","getFilterValueText","_configurationValues$2","rawValues","split","v","areEqual","length","_unused2","doesValueMatchFilter","filterValue","_filterValue$value","toLowerCase","comparisonType","Contains","DoesNotContain","IsBlank","IsNotBlank","matched","includes","CampusesFieldType","userValues","_o$value","ColorFieldType","CurrencyFieldType","_toCurrencyOrNull","toCurrencyOrNull","numericComparisonTypes","DateFieldType","isCurrentDateValue","getCurrentDateText","dateValue","RockDateTime","parseISO","dateFormatTemplate","Format","toASPString","displayDiff","asBoolean","DisplayDiff","toElapsedString","dateComparisonTypes","updateComparisonTypeNames","options","Between","toString","forEach","getFilterValueDescription","filterValues","_range$timeValue","_range$timeUnit","range","parseSlidingDateRangeString","rangeTypeText","getRangeTypeText","rangeType","timeUnitValue","timeValue","timeUnitText","getTimeUnitText","timeUnit","TimeUnit","Hour","RangeType","Current","Last","Previous","Next","Upcoming","lowerDate","upperDate","filterValueValues","valueDate","slidingRange","dateRange","calculateSlidingDateRange","start","toMilliseconds","end","filterDate","getRelativeOrAbsoluteDate","newFilterValue","indexOf","parts","diff","toNumber","Math","abs","today","now","date","valueParts","addDays","DateRangeFieldType","dateParts","lowerDateParts","exec","upperDateParts","fromParts","toLocaleString","DateTimeFormat","DateShort","DateTimeFieldType","DisplayAsElapsedTime","DayOfWeekFieldType","dayValue","toNumberOrNull","DayOfWeek","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","DaysOfWeekFieldType","containsComparisonTypes","DecimalFieldType","_toNumberOrNull$toStr","_toNumberOrNull","DecimalRangeFieldType","numbers","DefinedValueFieldType","clientValue","displayDescription","DisplayDescription","description","_value$value","useDescription","_unused3","_clientValue$value","_clientValue$value2","_clientValue$value3","matchedCount","_iterator","_createForOfIteratorHelper","_step","s","n","done","userValue","err","e","f","_iterator2","_step2","DefinedValueRangeFieldType","List","lowerValue","firstOrUndefined","upperValue","_lowerValue$descripti","_upperValue$descripti","_lowerValue$text","_upperValue$text","_clientValue$text","EmailFieldType","getHtmlValue","stringComparisonTypes","FileFieldType","_realValue$text","realValue","_realValue$text2","escapeHtml","GenderFieldType","numberValue","ImageFieldType","getCondensedHtmlValue","IntegerFieldType","IntegerRangeFieldType","KeyValueListFieldType","clientValues","configuredValues","_loop","configuredValue","push","key","MemoFieldType","MonthDayFieldType","components","month","day","months","MultiSelectFieldType","_v$value","_v$value2","_value$split$filter$m","PhoneNumberFieldType","formatPhoneNumber","RatingFieldType","_ratingValue$value","_ratingValue","ratingValue","rating","maxRating","MaxRating","html","i","_ratingValue$value2","_ratingValue2","ReminderTypeFieldType","guid","name","ReminderTypesFieldType","binaryComparisonTypes","SingleSelectFieldType","_selectedValues$0$tex","SSNFieldType","strippedValue","substr","TextFieldType","TimeFieldType","hour","minute","meridiem","padLeft","UrlLinkFieldType","ValueListFieldType","find","_configuredValue$text","registerFieldType","FieldTypeGuids","Address","Boolean","Campus","Campuses","Color","Currency","Date","DateRange","DateTime","DaysOfWeek","Decimal","DecimalRange","DefinedValue","DefinedValueRange","Email","File","Gender","Image","Integer","IntegerRange","KeyValueList","Memo","MonthDay","MultiSelect","PhoneNumber","Rating","ReminderType","ReminderTypes","SingleSelect","Ssn","Text","Time","UrlLink","ValueList"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA8BA,IAAMA,eAAa,GAAGC,oBAAoB,CAAAC,iBAAA,CAAC,aAAY;MACnD,EAAA,OAAO,OAAO,cAAO,0BAA0B,CAAC,EAAEC,aAAa,CAAA;MACnE,CAAC,CAAC,CAAA,CAAA;MAGF,IAAMC,wBAAsB,GAAGH,oBAAoB,CAAAC,iBAAA,CAAC,aAAY;MAC5D,EAAA,OAAO,OAAO,cAAO,0BAA0B,CAAC,EAAEG,sBAAsB,CAAA;MAC5E,CAAC,CAAC,CAAA,CAAA;MAKK,MAAMC,gBAAgB,SAASC,aAAa,CAAC;MAChCC,EAAAA,YAAYA,CAACC,KAAa,EAAEC,oBAA4C,EAAU;UAC9F,IAAI;YAAA,IAAAC,oBAAA,EAAAC,qBAAA,EAAAC,kBAAA,EAAAC,mBAAA,EAAAC,qBAAA,CAAA;YACA,IAAMC,YAAY,GAAGC,IAAI,CAACC,KAAK,CAACT,KAAK,IAAI,IAAI,CAAsB,CAAA;MACnE,MAAA,IAAIU,SAAS,GAAA,EAAA,CAAAC,MAAA,CAAA,CAAAT,oBAAA,GAAMK,YAAY,CAACK,OAAO,MAAAV,IAAAA,IAAAA,oBAAA,KAAAA,KAAAA,CAAAA,GAAAA,oBAAA,GAAI,EAAE,EAAA,GAAA,CAA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