@qrvey/utils 1.3.0-2 → 1.3.0-5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (226) hide show
  1. package/dist/cjs/column_format/constants/CHART_GROUP.d.ts +4 -0
  2. package/dist/cjs/column_format/constants/CHART_GROUP.js +8 -0
  3. package/dist/cjs/column_format/constants/DATEGROUP_UNSUPPORT_FORMAT.d.ts +2 -0
  4. package/dist/cjs/column_format/constants/DATEGROUP_UNSUPPORT_FORMAT.js +16 -0
  5. package/dist/cjs/column_format/constants/DATEGROUP_WITHOUT_FORMAT.d.ts +12 -0
  6. package/dist/cjs/column_format/constants/DATEGROUP_WITHOUT_FORMAT.js +16 -0
  7. package/dist/cjs/column_format/constants/SHELF_TYPE.d.ts +7 -0
  8. package/dist/cjs/column_format/constants/SHELF_TYPE.js +11 -0
  9. package/dist/cjs/column_format/constants/STRING_FORMAT.d.ts +3 -0
  10. package/dist/cjs/column_format/constants/STRING_FORMAT.js +7 -0
  11. package/dist/cjs/column_format/constants/TABLE_TYPE.d.ts +5 -0
  12. package/dist/cjs/column_format/constants/TABLE_TYPE.js +9 -0
  13. package/dist/cjs/column_format/constants/index.d.ts +6 -0
  14. package/dist/cjs/column_format/constants/index.js +22 -0
  15. package/dist/cjs/column_format/helpers/columnTypeByChart.d.ts +16 -0
  16. package/dist/cjs/column_format/helpers/columnTypeByChart.js +28 -0
  17. package/dist/cjs/column_format/helpers/defineFormatV2.d.ts +11 -0
  18. package/dist/cjs/column_format/helpers/defineFormatV2.js +17 -0
  19. package/dist/cjs/column_format/helpers/defineTableChartFormat.d.ts +9 -0
  20. package/dist/cjs/column_format/helpers/defineTableChartFormat.js +71 -0
  21. package/dist/cjs/column_format/helpers/defineXYChartFormat.d.ts +11 -0
  22. package/dist/cjs/column_format/helpers/defineXYChartFormat.js +76 -0
  23. package/dist/cjs/column_format/helpers/index.d.ts +5 -0
  24. package/dist/cjs/column_format/helpers/index.js +21 -0
  25. package/dist/cjs/column_format/helpers/parseFormulaTypeByCharts.d.ts +7 -0
  26. package/dist/cjs/column_format/helpers/parseFormulaTypeByCharts.js +20 -0
  27. package/dist/cjs/column_format/index.d.ts +3 -0
  28. package/dist/cjs/column_format/index.js +19 -0
  29. package/dist/cjs/column_format/interfaces/IChartColumn.d.ts +23 -0
  30. package/dist/cjs/column_format/interfaces/IChartColumn.js +2 -0
  31. package/dist/cjs/column_format/interfaces/IChartGroupType.d.ts +2 -0
  32. package/dist/cjs/column_format/interfaces/IChartGroupType.js +2 -0
  33. package/dist/cjs/column_format/interfaces/IChartShelfType.d.ts +2 -0
  34. package/dist/cjs/column_format/interfaces/IChartShelfType.js +2 -0
  35. package/dist/cjs/column_format/interfaces/IChartTableType.d.ts +2 -0
  36. package/dist/cjs/column_format/interfaces/IChartTableType.js +2 -0
  37. package/dist/cjs/column_format/interfaces/IColumnFormatReturnType.d.ts +3 -0
  38. package/dist/cjs/column_format/interfaces/IColumnFormatReturnType.js +2 -0
  39. package/dist/cjs/column_format/interfaces/IColumnFormatSettings.d.ts +9 -0
  40. package/dist/cjs/column_format/interfaces/IColumnFormatSettings.js +2 -0
  41. package/dist/cjs/column_format/interfaces/IFormatStringType.d.ts +2 -0
  42. package/dist/cjs/column_format/interfaces/IFormatStringType.js +2 -0
  43. package/dist/cjs/column_format/interfaces/index.d.ts +7 -0
  44. package/dist/cjs/column_format/interfaces/index.js +23 -0
  45. package/dist/cjs/columns/interfaces/IColumnAggregate.d.ts +7 -0
  46. package/dist/cjs/columns/interfaces/IColumnAggregate.js +2 -0
  47. package/dist/cjs/columns/interfaces/IColumnDateGroupSettings.d.ts +7 -0
  48. package/dist/cjs/columns/interfaces/IColumnDateGroupSettings.js +2 -0
  49. package/dist/cjs/columns/interfaces/IColumnScale.d.ts +5 -0
  50. package/dist/cjs/columns/interfaces/IColumnScale.js +2 -0
  51. package/dist/cjs/dates/adapters/dateToHms.d.ts +6 -0
  52. package/dist/cjs/dates/adapters/dateToHms.js +18 -0
  53. package/dist/cjs/dates/adapters/dateToMdyDate.d.ts +6 -0
  54. package/dist/cjs/dates/adapters/dateToMdyDate.js +19 -0
  55. package/dist/cjs/dates/adapters/dateToMonthYear.d.ts +6 -0
  56. package/dist/cjs/dates/adapters/dateToMonthYear.js +18 -0
  57. package/dist/cjs/dates/adapters/dateToQuarterYear.d.ts +6 -0
  58. package/dist/cjs/dates/adapters/dateToQuarterYear.js +19 -0
  59. package/dist/cjs/dates/adapters/dateToWeekYear.d.ts +6 -0
  60. package/dist/cjs/dates/adapters/dateToWeekYear.js +19 -0
  61. package/dist/cjs/dates/adapters/dateToYear.d.ts +6 -0
  62. package/dist/cjs/dates/adapters/dateToYear.js +17 -0
  63. package/dist/cjs/dates/adapters/mdyDateToDate.d.ts +1 -1
  64. package/dist/cjs/dates/adapters/monthYearToDate.d.ts +1 -1
  65. package/dist/cjs/dates/adapters/quarterYearToDate.d.ts +1 -1
  66. package/dist/cjs/dates/adapters/weekYearToDate.d.ts +1 -1
  67. package/dist/cjs/dates/adapters/yearToDate.d.ts +1 -1
  68. package/dist/cjs/dates/helpers/getDateByDateFormat.d.ts +1 -1
  69. package/dist/cjs/dates/helpers/getDatePickerPickLevel.d.ts +7 -0
  70. package/dist/cjs/dates/helpers/getDatePickerPickLevel.js +14 -0
  71. package/dist/cjs/dates/helpers/getFormattedDateByFormat.d.ts +8 -0
  72. package/dist/cjs/dates/helpers/getFormattedDateByFormat.js +36 -0
  73. package/dist/cjs/dates/helpers/includeDateTokens.d.ts +9 -0
  74. package/dist/cjs/dates/helpers/includeDateTokens.js +29 -0
  75. package/dist/cjs/dates/helpers/index.d.ts +4 -0
  76. package/dist/cjs/dates/helpers/index.js +4 -0
  77. package/dist/cjs/filters/helpers/common/resolveFilterConditions.js +5 -5
  78. package/dist/cjs/filters/interfaces/common/IFSParamsToGetFilter.d.ts +1 -1
  79. package/dist/cjs/general/string/index.d.ts +2 -0
  80. package/dist/cjs/general/string/index.js +2 -0
  81. package/dist/cjs/general/string/padLeadingZeros.d.ts +1 -0
  82. package/dist/cjs/general/string/padLeadingZeros.js +12 -0
  83. package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_STYLE_OPTIONS.js +3 -3
  84. package/dist/cjs/index.d.ts +1 -0
  85. package/dist/cjs/index.js +1 -0
  86. package/dist/cjs/interfaces/format/IFormatDefaultFormat.d.ts +5 -0
  87. package/dist/cjs/interfaces/format/IFormatDefaultFormat.js +2 -0
  88. package/dist/cjs/interfaces/format/IFormatOutputFormat.Interface.d.ts +3 -5
  89. package/dist/column_format/constants/CHART_GROUP.d.ts +4 -0
  90. package/dist/column_format/constants/CHART_GROUP.js +5 -0
  91. package/dist/column_format/constants/DATEGROUP_UNSUPPORT_FORMAT.d.ts +2 -0
  92. package/dist/column_format/constants/DATEGROUP_UNSUPPORT_FORMAT.js +13 -0
  93. package/dist/column_format/constants/DATEGROUP_WITHOUT_FORMAT.d.ts +12 -0
  94. package/dist/column_format/constants/DATEGROUP_WITHOUT_FORMAT.js +13 -0
  95. package/dist/column_format/constants/SHELF_TYPE.d.ts +7 -0
  96. package/dist/column_format/constants/SHELF_TYPE.js +8 -0
  97. package/dist/column_format/constants/STRING_FORMAT.d.ts +3 -0
  98. package/dist/column_format/constants/STRING_FORMAT.js +4 -0
  99. package/dist/column_format/constants/TABLE_TYPE.d.ts +5 -0
  100. package/dist/column_format/constants/TABLE_TYPE.js +6 -0
  101. package/dist/column_format/constants/index.d.ts +6 -0
  102. package/dist/column_format/constants/index.js +6 -0
  103. package/dist/column_format/helpers/columnTypeByChart.d.ts +16 -0
  104. package/dist/column_format/helpers/columnTypeByChart.js +24 -0
  105. package/dist/column_format/helpers/defineFormatV2.d.ts +11 -0
  106. package/dist/column_format/helpers/defineFormatV2.js +13 -0
  107. package/dist/column_format/helpers/defineTableChartFormat.d.ts +9 -0
  108. package/dist/column_format/helpers/defineTableChartFormat.js +67 -0
  109. package/dist/column_format/helpers/defineXYChartFormat.d.ts +11 -0
  110. package/dist/column_format/helpers/defineXYChartFormat.js +72 -0
  111. package/dist/column_format/helpers/index.d.ts +5 -0
  112. package/dist/column_format/helpers/index.js +5 -0
  113. package/dist/column_format/helpers/parseFormulaTypeByCharts.d.ts +7 -0
  114. package/dist/column_format/helpers/parseFormulaTypeByCharts.js +16 -0
  115. package/dist/column_format/index.d.ts +3 -0
  116. package/dist/column_format/index.js +3 -0
  117. package/dist/column_format/interfaces/IChartColumn.d.ts +23 -0
  118. package/dist/column_format/interfaces/IChartColumn.js +1 -0
  119. package/dist/column_format/interfaces/IChartGroupType.d.ts +2 -0
  120. package/dist/column_format/interfaces/IChartGroupType.js +1 -0
  121. package/dist/column_format/interfaces/IChartShelfType.d.ts +2 -0
  122. package/dist/column_format/interfaces/IChartShelfType.js +1 -0
  123. package/dist/column_format/interfaces/IChartTableType.d.ts +2 -0
  124. package/dist/column_format/interfaces/IChartTableType.js +1 -0
  125. package/dist/column_format/interfaces/IColumnFormatReturnType.d.ts +3 -0
  126. package/dist/column_format/interfaces/IColumnFormatReturnType.js +1 -0
  127. package/dist/column_format/interfaces/IColumnFormatSettings.d.ts +9 -0
  128. package/dist/column_format/interfaces/IColumnFormatSettings.js +1 -0
  129. package/dist/column_format/interfaces/IFormatStringType.d.ts +2 -0
  130. package/dist/column_format/interfaces/IFormatStringType.js +1 -0
  131. package/dist/column_format/interfaces/index.d.ts +7 -0
  132. package/dist/column_format/interfaces/index.js +7 -0
  133. package/dist/columns/interfaces/IColumnAggregate.d.ts +7 -0
  134. package/dist/columns/interfaces/IColumnAggregate.js +1 -0
  135. package/dist/columns/interfaces/IColumnDateGroupSettings.d.ts +7 -0
  136. package/dist/columns/interfaces/IColumnDateGroupSettings.js +1 -0
  137. package/dist/columns/interfaces/IColumnScale.d.ts +5 -0
  138. package/dist/columns/interfaces/IColumnScale.js +1 -0
  139. package/dist/dates/adapters/dateToHms.d.ts +6 -0
  140. package/dist/dates/adapters/dateToHms.js +14 -0
  141. package/dist/dates/adapters/dateToMdyDate.d.ts +6 -0
  142. package/dist/dates/adapters/dateToMdyDate.js +15 -0
  143. package/dist/dates/adapters/dateToMonthYear.d.ts +6 -0
  144. package/dist/dates/adapters/dateToMonthYear.js +14 -0
  145. package/dist/dates/adapters/dateToQuarterYear.d.ts +6 -0
  146. package/dist/dates/adapters/dateToQuarterYear.js +15 -0
  147. package/dist/dates/adapters/dateToWeekYear.d.ts +6 -0
  148. package/dist/dates/adapters/dateToWeekYear.js +15 -0
  149. package/dist/dates/adapters/dateToYear.d.ts +6 -0
  150. package/dist/dates/adapters/dateToYear.js +13 -0
  151. package/dist/dates/adapters/mdyDateToDate.d.ts +1 -1
  152. package/dist/dates/adapters/monthYearToDate.d.ts +1 -1
  153. package/dist/dates/adapters/quarterYearToDate.d.ts +1 -1
  154. package/dist/dates/adapters/weekYearToDate.d.ts +1 -1
  155. package/dist/dates/adapters/yearToDate.d.ts +1 -1
  156. package/dist/dates/helpers/getDateByDateFormat.d.ts +1 -1
  157. package/dist/dates/helpers/getDatePickerPickLevel.d.ts +7 -0
  158. package/dist/dates/helpers/getDatePickerPickLevel.js +10 -0
  159. package/dist/dates/helpers/getFormattedDateByFormat.d.ts +8 -0
  160. package/dist/dates/helpers/getFormattedDateByFormat.js +32 -0
  161. package/dist/dates/helpers/includeDateTokens.d.ts +9 -0
  162. package/dist/dates/helpers/includeDateTokens.js +25 -0
  163. package/dist/dates/helpers/index.d.ts +4 -0
  164. package/dist/dates/helpers/index.js +4 -0
  165. package/dist/filters/helpers/common/resolveFilterConditions.js +5 -5
  166. package/dist/filters/interfaces/common/IFSParamsToGetFilter.d.ts +1 -1
  167. package/dist/general/string/index.d.ts +2 -0
  168. package/dist/general/string/index.js +2 -0
  169. package/dist/general/string/padLeadingZeros.d.ts +1 -0
  170. package/dist/general/string/padLeadingZeros.js +8 -0
  171. package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_STYLE_OPTIONS.js +3 -3
  172. package/dist/index.d.ts +1 -0
  173. package/dist/index.js +1 -0
  174. package/dist/interfaces/format/IFormatDefaultFormat.d.ts +5 -0
  175. package/dist/interfaces/format/IFormatDefaultFormat.js +1 -0
  176. package/dist/interfaces/format/IFormatOutputFormat.Interface.d.ts +3 -5
  177. package/package.json +1 -1
  178. package/src/column_format/constants/CHART_GROUP.ts +4 -0
  179. package/src/column_format/constants/DATEGROUP_UNSUPPORT_FORMAT.ts +14 -0
  180. package/src/column_format/constants/DATEGROUP_WITHOUT_FORMAT.ts +12 -0
  181. package/src/column_format/constants/SHELF_TYPE.ts +7 -0
  182. package/src/column_format/constants/STRING_FORMAT.ts +3 -0
  183. package/src/column_format/constants/TABLE_TYPE.ts +5 -0
  184. package/src/column_format/constants/index.ts +6 -0
  185. package/src/column_format/helpers/columnTypeByChart.ts +27 -0
  186. package/src/column_format/helpers/defineFormatV2.ts +17 -0
  187. package/src/column_format/helpers/defineTableChartFormat.ts +70 -0
  188. package/src/column_format/helpers/defineXYChartFormat.ts +81 -0
  189. package/src/column_format/helpers/index.ts +5 -0
  190. package/src/column_format/helpers/parseFormulaTypeByCharts.ts +17 -0
  191. package/src/column_format/index.ts +3 -0
  192. package/src/column_format/interfaces/IChartColumn.ts +24 -0
  193. package/src/column_format/interfaces/IChartGroupType.ts +3 -0
  194. package/src/column_format/interfaces/IChartShelfType.ts +3 -0
  195. package/src/column_format/interfaces/IChartTableType.ts +3 -0
  196. package/src/column_format/interfaces/IColumnFormatReturnType.ts +4 -0
  197. package/src/column_format/interfaces/IColumnFormatSettings.ts +11 -0
  198. package/src/column_format/interfaces/IFormatStringType.ts +3 -0
  199. package/src/column_format/interfaces/index.ts +7 -0
  200. package/src/columns/interfaces/IColumnAggregate.ts +7 -0
  201. package/src/columns/interfaces/IColumnDateGroupSettings.ts +7 -0
  202. package/src/columns/interfaces/IColumnScale.ts +5 -0
  203. package/src/dates/adapters/dateToHms.ts +15 -0
  204. package/src/dates/adapters/dateToMdyDate.ts +16 -0
  205. package/src/dates/adapters/dateToMonthYear.ts +15 -0
  206. package/src/dates/adapters/dateToQuarterYear.ts +16 -0
  207. package/src/dates/adapters/dateToWeekYear.ts +16 -0
  208. package/src/dates/adapters/dateToYear.ts +14 -0
  209. package/src/dates/adapters/mdyDateToDate.ts +1 -1
  210. package/src/dates/adapters/monthYearToDate.ts +1 -1
  211. package/src/dates/adapters/quarterYearToDate.ts +1 -1
  212. package/src/dates/adapters/weekYearToDate.ts +1 -1
  213. package/src/dates/adapters/yearToDate.ts +1 -1
  214. package/src/dates/helpers/getDateByDateFormat.ts +1 -1
  215. package/src/dates/helpers/getDatePickerPickLevel.ts +12 -0
  216. package/src/dates/helpers/getFormattedDateByFormat.ts +29 -0
  217. package/src/dates/helpers/includeDateTokens.ts +26 -0
  218. package/src/dates/helpers/index.ts +4 -0
  219. package/src/filters/helpers/common/resolveFilterConditions.ts +4 -4
  220. package/src/filters/interfaces/common/IFSParamsToGetFilter.ts +2 -2
  221. package/src/general/string/index.ts +3 -1
  222. package/src/general/string/padLeadingZeros.ts +7 -0
  223. package/src/globalization/labels/chart_builder/I18N_CHART_BUILDER_STYLE_OPTIONS.ts +3 -3
  224. package/src/index.ts +1 -0
  225. package/src/interfaces/format/IFormatDefaultFormat.ts +5 -0
  226. package/src/interfaces/format/IFormatOutputFormat.Interface.ts +3 -5
@@ -0,0 +1,16 @@
1
+ import { NUMERICAL_COLUMN } from "../..";
2
+ import { COLUMN } from "../../columns";
3
+ import { IChartColumn } from "../interfaces/IChartColumn";
4
+ import { IChartGroupType } from "../interfaces/IChartGroupType";
5
+ import { IChartShelfType } from "../interfaces/IChartShelfType";
6
+ /**
7
+ * It returns the column type for a given column, shelf type, chart group, and whether the table is
8
+ * grouped or not
9
+ * @param {IChartColumn} column - IChartColumn
10
+ * @param {IChartShelfType} shelfType - IChartShelfType
11
+ * @param {IChartGroupType} chartGroup - IChartGroupType
12
+ * @param {boolean} [isGroupedTable] - boolean - this is a boolean that is true if the table is
13
+ * grouped.
14
+ * @returns The column type of the column.
15
+ */
16
+ export declare const columnTypeByChart: (column: IChartColumn, shelfType: IChartShelfType, chartGroup: IChartGroupType, isGroupedTable?: boolean) => import("../..").COMPLEX_COLUMN | import("../..").COMPOUND_COLUMN | NUMERICAL_COLUMN | COLUMN.SINGLE_CHOICE | COLUMN.MULTIPLE_CHOICE | COLUMN.YES_NO | COLUMN.RANKING | COLUMN.DATE | COLUMN.SIGNATURE | COLUMN.DROPDOWN | COLUMN.IMAGE | COLUMN.EMAIL_FORM | COLUMN.PHONE | COLUMN.PASSWORD | COLUMN.CHECKLIST | COLUMN.NPS_SCORE | COLUMN.NPS_FEEDBACK | COLUMN.TEXT_LABEL | COLUMN.TEXT_CATEGORY | COLUMN.LOOKUP | COLUMN.HEADLINE | COLUMN.SECTION | COLUMN.AGGREGATED_FORMULA | COLUMN.BUCKET | COLUMN.SLIDEBAR | COLUMN.NUMERIC | COLUMN.NUMERICC | COLUMN.NUMERICP | COLUMN.NUMERICG | COLUMN.RATING | COLUMN.TEXTFIELD | COLUMN.LONGTEXT | COLUMN.IMAGEUPLOAD | COLUMN.FILEUPLOAD | COLUMN.EXPRESSION | COLUMN.NAME | COLUMN.USADDRESS | COLUMN.ADDRESS | "DATE" | "NUMERIC" | "TEXT_LABEL";
@@ -0,0 +1,24 @@
1
+ import { NUMERICAL_COLUMN, NUMERICAL_COLUMNS } from "../..";
2
+ import { COLUMN } from "../../columns";
3
+ import { CHART_GROUPS } from "../constants/CHART_GROUP";
4
+ import { SHELF_TYPE } from "../constants/SHELF_TYPE";
5
+ import { parseFormulaTypeByCharts } from "./parseFormulaTypeByCharts";
6
+ /**
7
+ * It returns the column type for a given column, shelf type, chart group, and whether the table is
8
+ * grouped or not
9
+ * @param {IChartColumn} column - IChartColumn
10
+ * @param {IChartShelfType} shelfType - IChartShelfType
11
+ * @param {IChartGroupType} chartGroup - IChartGroupType
12
+ * @param {boolean} [isGroupedTable] - boolean - this is a boolean that is true if the table is
13
+ * grouped.
14
+ * @returns The column type of the column.
15
+ */
16
+ export const columnTypeByChart = (column, shelfType, chartGroup, isGroupedTable) => {
17
+ if (!column)
18
+ return;
19
+ const currentType = column.type === COLUMN.FORMULA ? parseFormulaTypeByCharts(column.formulaType) : column.type;
20
+ const isNumericalColumn = NUMERICAL_COLUMNS.some(colType => colType === currentType)
21
+ || ((chartGroup === CHART_GROUPS.TABLES) && (isGroupedTable === true) && (shelfType === SHELF_TYPE.COLUMNS))
22
+ || ((chartGroup === CHART_GROUPS.XY) && (shelfType === SHELF_TYPE.VALUE || shelfType === SHELF_TYPE.SERIES));
23
+ return isNumericalColumn === true ? NUMERICAL_COLUMN.NUMERIC : currentType;
24
+ };
@@ -0,0 +1,11 @@
1
+ import { IChartColumn } from "../interfaces/IChartColumn";
2
+ import { IColumnFormatReturnType } from "../interfaces/IColumnFormatReturnType";
3
+ import { IColumnFormatSettings } from "../interfaces/IColumnFormatSettings";
4
+ /**
5
+ * > If the chart is a table chart, then define the format for a table chart, otherwise define the
6
+ * format for an XY chart
7
+ * @param {IChartColumn} column - IChartColumn - this is the column object that is passed to the chart.
8
+ * @param {IColumnFormatSettings} settings - IColumnFormatSettings
9
+ * @returns IColumnFormatReturnType
10
+ */
11
+ export declare const defineFormatV2: (column: IChartColumn, settings: IColumnFormatSettings) => IColumnFormatReturnType;
@@ -0,0 +1,13 @@
1
+ import { defineTableChartFormat } from "./defineTableChartFormat";
2
+ import { defineXYChartFormat } from "./defineXYChartFormat";
3
+ /**
4
+ * > If the chart is a table chart, then define the format for a table chart, otherwise define the
5
+ * format for an XY chart
6
+ * @param {IChartColumn} column - IChartColumn - this is the column object that is passed to the chart.
7
+ * @param {IColumnFormatSettings} settings - IColumnFormatSettings
8
+ * @returns IColumnFormatReturnType
9
+ */
10
+ export const defineFormatV2 = (column, settings) => {
11
+ const { isTableChart, isXYChart } = settings;
12
+ return isTableChart && !isXYChart ? defineTableChartFormat(column, settings) : defineXYChartFormat(column, settings);
13
+ };
@@ -0,0 +1,9 @@
1
+ import { IChartColumn } from "../interfaces/IChartColumn";
2
+ import { IColumnFormatReturnType } from "../interfaces/IColumnFormatReturnType";
3
+ import { IColumnFormatSettings } from "../interfaces/IColumnFormatSettings";
4
+ /**
5
+ * It returns the format of a column based on the column type, the chart type, and the chart settings
6
+ * @param {IChartColumn} column - IChartColumn
7
+ * @param {IColumnFormatSettings} settings - IColumnFormatSettings
8
+ */
9
+ export declare const defineTableChartFormat: (column: IChartColumn, settings: IColumnFormatSettings) => IColumnFormatReturnType;
@@ -0,0 +1,67 @@
1
+ import { AGGREGATE, COLUMN, isEmpty } from "../..";
2
+ import { CHART_GROUPS } from "../constants/CHART_GROUP";
3
+ import { DATEGROUP_UNSUPPORT_FORMAT } from "../constants/DATEGROUP_UNSUPPORT_FORMAT";
4
+ import { STRING_FORMAT } from "../constants/STRING_FORMAT";
5
+ import { TABLE_TYPE } from "../constants/TABLE_TYPE";
6
+ import { columnTypeByChart } from "./columnTypeByChart";
7
+ /**
8
+ * It returns the format of a column based on the column type, the chart type, and the chart settings
9
+ * @param {IChartColumn} column - IChartColumn
10
+ * @param {IColumnFormatSettings} settings - IColumnFormatSettings
11
+ */
12
+ export const defineTableChartFormat = (column, settings) => {
13
+ const { aggregate, type, defaultFormat, outputFormat, selectedFormat, dateGroup } = column;
14
+ const { tableType, shelfType } = settings;
15
+ //Defaults
16
+ const defaultText = 'Default';
17
+ const defaultNumeric = { type: 'NUMERIC', format: 'Numeric' };
18
+ const defaultAbb = { type: 'NUMERIC', format: 'Abbreviated' };
19
+ const isGroupedTable = tableType === TABLE_TYPE.GROUPED;
20
+ const columnType = columnTypeByChart(column, shelfType, CHART_GROUPS.TABLES, isGroupedTable);
21
+ const noFormatSupported = DATEGROUP_UNSUPPORT_FORMAT.some(gp => gp === (dateGroup === null || dateGroup === void 0 ? void 0 : dateGroup.label));
22
+ const hasDefaultFormat = isEmpty(selectedFormat) && (outputFormat === null || outputFormat === void 0 ? void 0 : outputFormat.format) === defaultText;
23
+ const isUsedAsNumericColumn = type !== columnType;
24
+ switch (columnType) {
25
+ case COLUMN.YES_NO:
26
+ case COLUMN.PHONE:
27
+ case COLUMN.SINGLE_CHOICE:
28
+ case COLUMN.LONGTEXT:
29
+ case COLUMN.DROPDOWN:
30
+ case COLUMN.EXPRESSION:
31
+ case COLUMN.NAME:
32
+ case COLUMN.EMAIL_FORM:
33
+ case COLUMN.IMAGE:
34
+ case COLUMN.TEXT_LABEL:
35
+ return STRING_FORMAT.NONE;
36
+ case COLUMN.DATE: {
37
+ if (noFormatSupported) {
38
+ return STRING_FORMAT.NONE;
39
+ }
40
+ else if (hasDefaultFormat) {
41
+ return Object.assign(Object.assign({}, defaultFormat), { format: defaultText, originalFormat: Object.assign({}, column.outputFormat) });
42
+ }
43
+ else {
44
+ return selectedFormat;
45
+ }
46
+ }
47
+ case COLUMN.NUMERIC:
48
+ case COLUMN.RATING:
49
+ case COLUMN.SLIDEBAR: {
50
+ if (isUsedAsNumericColumn) {
51
+ if ((aggregate === null || aggregate === void 0 ? void 0 : aggregate.label) === AGGREGATE.COUNT && hasDefaultFormat)
52
+ return defaultNumeric;
53
+ else if (hasDefaultFormat)
54
+ return defaultAbb;
55
+ else
56
+ return outputFormat;
57
+ }
58
+ else {
59
+ if (hasDefaultFormat) {
60
+ return Object.assign(Object.assign({}, defaultFormat), { format: defaultText, originalFormat: Object.assign({}, column.outputFormat) });
61
+ }
62
+ else
63
+ return selectedFormat;
64
+ }
65
+ }
66
+ }
67
+ };
@@ -0,0 +1,11 @@
1
+ import { IChartColumn } from "../interfaces/IChartColumn";
2
+ import { IColumnFormatReturnType } from "../interfaces/IColumnFormatReturnType";
3
+ import { IColumnFormatSettings } from "../interfaces/IColumnFormatSettings";
4
+ /**
5
+ * > It returns the format of a column based on the column's type, the chart's type, and the column's
6
+ * aggregate
7
+ * > Also, if the settings contains the prop withoutFormat as true, returns the default format
8
+ * @param {IChartColumn} column - IChartColumn
9
+ * @param {IColumnFormatSettings} settings - IColumnFormatSettings
10
+ */
11
+ export declare const defineXYChartFormat: (column: IChartColumn, settings: IColumnFormatSettings) => IColumnFormatReturnType;
@@ -0,0 +1,72 @@
1
+ import { AGGREGATE, COLUMN, isEmpty } from "../..";
2
+ import { CHART_GROUPS } from "../constants/CHART_GROUP";
3
+ import { DATEGROUP_UNSUPPORT_FORMAT } from "../constants/DATEGROUP_UNSUPPORT_FORMAT";
4
+ import { STRING_FORMAT } from "../constants/STRING_FORMAT";
5
+ import { columnTypeByChart } from "./columnTypeByChart";
6
+ /**
7
+ * > It returns the format of a column based on the column's type, the chart's type, and the column's
8
+ * aggregate
9
+ * > Also, if the settings contains the prop withoutFormat as true, returns the default format
10
+ * @param {IChartColumn} column - IChartColumn
11
+ * @param {IColumnFormatSettings} settings - IColumnFormatSettings
12
+ */
13
+ export const defineXYChartFormat = (column, settings) => {
14
+ const { aggregate, type, defaultFormat, outputFormat, selectedFormat, dateGroup } = column;
15
+ const { shelfType, withoutFormat } = settings;
16
+ //Defaults
17
+ const defaultText = 'Default';
18
+ //const defaultNumeric = { type: 'NUMERIC', format: 'Numeric' };
19
+ const defaultAbb = { type: 'NUMERIC', format: 'Abbreviated' };
20
+ const columnType = columnTypeByChart(column, shelfType, CHART_GROUPS.XY);
21
+ const noFormatSupported = DATEGROUP_UNSUPPORT_FORMAT.some(gp => gp === (dateGroup === null || dateGroup === void 0 ? void 0 : dateGroup.label));
22
+ const isUsedAsNumericColumn = type !== columnType;
23
+ const hasDefaultFormat = (isEmpty(selectedFormat) && (outputFormat === null || outputFormat === void 0 ? void 0 : outputFormat.format) === defaultText) || ((selectedFormat === null || selectedFormat === void 0 ? void 0 : selectedFormat.format) === defaultText);
24
+ switch (columnType) {
25
+ case COLUMN.YES_NO:
26
+ case COLUMN.PHONE:
27
+ case COLUMN.SINGLE_CHOICE:
28
+ case COLUMN.LONGTEXT:
29
+ case COLUMN.DROPDOWN:
30
+ case COLUMN.EXPRESSION:
31
+ case COLUMN.NAME:
32
+ case COLUMN.EMAIL_FORM:
33
+ case COLUMN.IMAGE:
34
+ case COLUMN.TEXT_LABEL:
35
+ return STRING_FORMAT.NONE;
36
+ case COLUMN.DATE: {
37
+ if (noFormatSupported) {
38
+ return STRING_FORMAT.NONE;
39
+ }
40
+ else if (hasDefaultFormat) {
41
+ return Object.assign(Object.assign({}, defaultFormat), { format: defaultText, originalFormat: Object.assign({}, outputFormat) });
42
+ }
43
+ else {
44
+ return selectedFormat;
45
+ }
46
+ }
47
+ case COLUMN.NUMERIC:
48
+ case COLUMN.RATING:
49
+ case COLUMN.SLIDEBAR: {
50
+ if (isUsedAsNumericColumn) {
51
+ if (((aggregate === null || aggregate === void 0 ? void 0 : aggregate.label) === AGGREGATE.COUNT && hasDefaultFormat)
52
+ ||
53
+ (isUsedAsNumericColumn && (outputFormat === null || outputFormat === void 0 ? void 0 : outputFormat.type) !== COLUMN.NUMERIC)
54
+ ||
55
+ withoutFormat)
56
+ return defaultAbb;
57
+ else
58
+ return outputFormat;
59
+ }
60
+ else {
61
+ if (withoutFormat === true) {
62
+ return defaultFormat;
63
+ }
64
+ else if (hasDefaultFormat) {
65
+ return Object.assign({}, outputFormat);
66
+ }
67
+ else
68
+ return selectedFormat;
69
+ }
70
+ }
71
+ }
72
+ };
@@ -0,0 +1,5 @@
1
+ export * from './columnTypeByChart';
2
+ export * from './defineFormatV2';
3
+ export * from './defineTableChartFormat';
4
+ export * from './defineXYChartFormat';
5
+ export * from './parseFormulaTypeByCharts';
@@ -0,0 +1,5 @@
1
+ export * from './columnTypeByChart';
2
+ export * from './defineFormatV2';
3
+ export * from './defineTableChartFormat';
4
+ export * from './defineXYChartFormat';
5
+ export * from './parseFormulaTypeByCharts';
@@ -0,0 +1,7 @@
1
+ import { IFormulaType } from "../..";
2
+ /**
3
+ * It takes a string and returns a string
4
+ * @param {IFormulaType} type - IFormulaType - this is the type of the formula.
5
+ * @returns The type of the formula.
6
+ */
7
+ export declare const parseFormulaTypeByCharts: (type: IFormulaType) => "DATE" | "NUMERIC" | "TEXT_LABEL";
@@ -0,0 +1,16 @@
1
+ import { FORMULA } from "../..";
2
+ /**
3
+ * It takes a string and returns a string
4
+ * @param {IFormulaType} type - IFormulaType - this is the type of the formula.
5
+ * @returns The type of the formula.
6
+ */
7
+ export const parseFormulaTypeByCharts = (type) => {
8
+ switch (type) {
9
+ case FORMULA.NUMBER:
10
+ return 'NUMERIC';
11
+ case FORMULA.DATE:
12
+ return 'DATE';
13
+ default:
14
+ return 'TEXT_LABEL';
15
+ }
16
+ };
@@ -0,0 +1,3 @@
1
+ export * from './constants/index';
2
+ export * from './helpers/index';
3
+ export * from './interfaces/index';
@@ -0,0 +1,3 @@
1
+ export * from './constants/index';
2
+ export * from './helpers/index';
3
+ export * from './interfaces/index';
@@ -0,0 +1,23 @@
1
+ import { IColumnSortingSettings, IColumnType, IFormatOutputFormat, IFormulaType } from "../..";
2
+ import { IColumnAggregate } from "../../columns/interfaces/IColumnAggregate";
3
+ import { IColumnDateGroupSettings } from "../../columns/interfaces/IColumnDateGroupSettings";
4
+ import { IColumnScale } from "../../columns/interfaces/IColumnScale";
5
+ import { IFormatDefaultFormat } from "../../interfaces/format/IFormatDefaultFormat";
6
+ export interface IChartColumn {
7
+ aggregate: IColumnAggregate;
8
+ colIndex: number;
9
+ dateGroup?: IColumnDateGroupSettings;
10
+ defaultFormat: IFormatDefaultFormat;
11
+ format?: string;
12
+ formulaType?: IFormulaType;
13
+ groupAgg: string;
14
+ id: string;
15
+ isGroup: string;
16
+ outputFormat: IFormatOutputFormat;
17
+ property: string;
18
+ scaleType?: IColumnScale;
19
+ selectedFormat?: IFormatDefaultFormat;
20
+ sorting?: IColumnSortingSettings;
21
+ text: string;
22
+ type: IColumnType;
23
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ import { CHART_GROUPS } from "../constants/CHART_GROUP";
2
+ export declare type IChartGroupType = CHART_GROUPS;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ import { SHELF_TYPE } from "../constants/SHELF_TYPE";
2
+ export declare type IChartShelfType = SHELF_TYPE;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ import { TABLE_TYPE } from "../constants/TABLE_TYPE";
2
+ export declare type IChartTableType = TABLE_TYPE;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ import { IFormatOutputFormat } from "../..";
2
+ import { IFormatStringType } from "./IFormatStringType";
3
+ export declare type IColumnFormatReturnType = IFormatStringType | IFormatOutputFormat;
@@ -0,0 +1,9 @@
1
+ import { IChartShelfType } from "./IChartShelfType";
2
+ import { IChartTableType } from "./IChartTableType";
3
+ export interface IColumnFormatSettings {
4
+ tableType?: IChartTableType;
5
+ isTableChart?: boolean;
6
+ isXYChart?: boolean;
7
+ shelfType: IChartShelfType;
8
+ withoutFormat: boolean;
9
+ }
@@ -0,0 +1,2 @@
1
+ import { STRING_FORMAT } from "../constants/STRING_FORMAT";
2
+ export declare type IFormatStringType = STRING_FORMAT;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,7 @@
1
+ export * from './IChartColumn';
2
+ export * from './IChartGroupType';
3
+ export * from './IChartShelfType';
4
+ export * from './IChartTableType';
5
+ export * from './IColumnFormatReturnType';
6
+ export * from './IColumnFormatSettings';
7
+ export * from './IFormatStringType';
@@ -0,0 +1,7 @@
1
+ export * from './IChartColumn';
2
+ export * from './IChartGroupType';
3
+ export * from './IChartShelfType';
4
+ export * from './IChartTableType';
5
+ export * from './IColumnFormatReturnType';
6
+ export * from './IColumnFormatSettings';
7
+ export * from './IFormatStringType';
@@ -0,0 +1,7 @@
1
+ export interface IColumnAggregate {
2
+ abbreviation: string;
3
+ id: string;
4
+ key: string;
5
+ label: string;
6
+ text: string;
7
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,7 @@
1
+ export interface IColumnDateGroupSettings {
2
+ default: boolean;
3
+ format: string;
4
+ label: string;
5
+ secondatyText: string;
6
+ text: string;
7
+ }
@@ -0,0 +1,5 @@
1
+ export interface IColumnScale {
2
+ key: string;
3
+ text: string;
4
+ value: string;
5
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * * Transform a Date to [HH:mm:ss] date format.
3
+ * @param date String, object or millisencond number of the date
4
+ * @returns string of [HH:mm:ss] date format
5
+ */
6
+ export declare function dateToHms(date: string | Date | number): any;
@@ -0,0 +1,14 @@
1
+ import { isEmpty } from "../../general/mix/isEmpty";
2
+ import { padLeadingZeros } from "../../general/string/padLeadingZeros";
3
+ import { isTokenLabel } from "../../tokens/isTokenLabel";
4
+ /**
5
+ * * Transform a Date to [HH:mm:ss] date format.
6
+ * @param date String, object or millisencond number of the date
7
+ * @returns string of [HH:mm:ss] date format
8
+ */
9
+ export function dateToHms(date) {
10
+ if (isEmpty(date) || isTokenLabel(date))
11
+ return date;
12
+ const dt = new Date(date.valueOf());
13
+ return padLeadingZeros(dt.getHours(), 2).slice(-2) + ':' + padLeadingZeros(dt.getMinutes(), 2).slice(-2) + ':' + padLeadingZeros(dt.getSeconds(), 2).slice(-2);
14
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Transform a Date to [mm/dd/yyyy] date format.
3
+ * @param date String, object or millisencond number of the date
4
+ * @returns string of [mm/dd/yyyy] date format
5
+ */
6
+ export declare function dateToMdyDate(date: string | Date | number, includeTime?: boolean): string;
@@ -0,0 +1,15 @@
1
+ import { isEmpty } from "../../general/mix/isEmpty";
2
+ import { padLeadingZeros } from "../../general/string/padLeadingZeros";
3
+ import { isTokenLabel } from "../../tokens/isTokenLabel";
4
+ import { dateToHms } from "./dateToHms";
5
+ /**
6
+ * Transform a Date to [mm/dd/yyyy] date format.
7
+ * @param date String, object or millisencond number of the date
8
+ * @returns string of [mm/dd/yyyy] date format
9
+ */
10
+ export function dateToMdyDate(date, includeTime) {
11
+ if (isEmpty(date) || isTokenLabel(date))
12
+ return date;
13
+ const dt = new Date(date.valueOf());
14
+ return padLeadingZeros(dt.getMonth() + 1, 2).slice(-2) + '/' + padLeadingZeros(dt.getDate(), 2).slice(-2) + '/' + padLeadingZeros(dt.getFullYear(), 4) + (includeTime ? ' ' + dateToHms(date) : '');
15
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Transform a Date to [Month Year] date format.
3
+ * @param date String, object or millisencond number of the date
4
+ * @returns string of [Month Year] date format
5
+ */
6
+ export declare function dateToMonthYear(date: string | Date | number): string;
@@ -0,0 +1,14 @@
1
+ import { isEmpty } from "../../general/mix/isEmpty";
2
+ import { isTokenLabel } from "../../tokens/isTokenLabel";
3
+ import { DATE_YEAR_MONTHS } from "../constants/DATE_YEAR_MONTHS";
4
+ /**
5
+ * Transform a Date to [Month Year] date format.
6
+ * @param date String, object or millisencond number of the date
7
+ * @returns string of [Month Year] date format
8
+ */
9
+ export function dateToMonthYear(date) {
10
+ if (isEmpty(date) || isTokenLabel(date))
11
+ return date;
12
+ const dt = new Date(date.valueOf());
13
+ return DATE_YEAR_MONTHS[dt.getMonth()] + ' ' + dt.getFullYear();
14
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Transform a Date to [Quarter Year] date format.
3
+ * @param date String, object or millisencond number of the date
4
+ * @returns string of [Quarter Year] date format
5
+ */
6
+ export declare function dateToQuarterYear(date: string | Date | number): string;
@@ -0,0 +1,15 @@
1
+ import { isEmpty } from "../../general/mix/isEmpty";
2
+ import { isTokenLabel } from "../../tokens/isTokenLabel";
3
+ import { DATE_YEAR_QUARTERS } from "../constants/DATE_YEAR_QUARTERS";
4
+ /**
5
+ * Transform a Date to [Quarter Year] date format.
6
+ * @param date String, object or millisencond number of the date
7
+ * @returns string of [Quarter Year] date format
8
+ */
9
+ export function dateToQuarterYear(date) {
10
+ if (isEmpty(date) || isTokenLabel(date))
11
+ return date;
12
+ const dt = new Date(date.valueOf());
13
+ const quarter = Math.ceil((dt.getMonth() + 1) / 3);
14
+ return DATE_YEAR_QUARTERS[quarter - 1] + ' ' + dt.getFullYear();
15
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Transform a Date to [W# Year] date format.
3
+ * @param date String, object or millisencond number of the date
4
+ * @returns string of [W# Year] date format
5
+ */
6
+ export declare function dateToWeekYear(date: string | Date | number): string;
@@ -0,0 +1,15 @@
1
+ import { isEmpty } from "../../general/mix/isEmpty";
2
+ import { isTokenLabel } from "../../tokens/isTokenLabel";
3
+ import { getWeek } from "../helpers/getWeek";
4
+ /**
5
+ * Transform a Date to [W# Year] date format.
6
+ * @param date String, object or millisencond number of the date
7
+ * @returns string of [W# Year] date format
8
+ */
9
+ export function dateToWeekYear(date) {
10
+ if (isEmpty(date) || isTokenLabel(date))
11
+ return date;
12
+ const dt = new Date(date.valueOf());
13
+ const weekObj = getWeek(dt);
14
+ return `W${weekObj.week} ${weekObj.year}`;
15
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Transform a Date to [Year] date format.
3
+ * @param date String, object or millisencond number of the date
4
+ * @returns string of [Year] date format
5
+ */
6
+ export declare function dateToYear(date: string | Date | number): string;
@@ -0,0 +1,13 @@
1
+ import { isEmpty } from "../../general/mix/isEmpty";
2
+ import { isTokenLabel } from "../../tokens/isTokenLabel";
3
+ /**
4
+ * Transform a Date to [Year] date format.
5
+ * @param date String, object or millisencond number of the date
6
+ * @returns string of [Year] date format
7
+ */
8
+ export function dateToYear(date) {
9
+ if (isEmpty(date) || isTokenLabel(date))
10
+ return date;
11
+ const dt = new Date(date.valueOf());
12
+ return String(dt.getFullYear());
13
+ }
@@ -4,4 +4,4 @@
4
4
  * @param time Flag to parse the object date to milliseconds.
5
5
  * @returns The date object or the date in milliseconds
6
6
  */
7
- export declare function mdyDateToDate(date: string, time?: boolean): string | number | Date;
7
+ export declare function mdyDateToDate(date: string, time?: boolean): string | Date | number;
@@ -4,4 +4,4 @@
4
4
  * @param time Flag to parse the object date to milliseconds.
5
5
  * @returns The date object or the date in milliseconds
6
6
  */
7
- export declare function monthYearToDate(monthYearDate: string, time?: boolean): string | number | Date;
7
+ export declare function monthYearToDate(monthYearDate: string, time?: boolean): string | Date | number;
@@ -4,4 +4,4 @@
4
4
  * @param time Flag to parse the object date to milliseconds.
5
5
  * @returns The date object or the date in milliseconds
6
6
  */
7
- export declare function quarterYearToDate(quarterYearDate: string, time?: boolean): string | number | Date;
7
+ export declare function quarterYearToDate(quarterYearDate: string, time?: boolean): string | Date | number;
@@ -4,4 +4,4 @@
4
4
  * @param time Flag to parse the object date to milliseconds.
5
5
  * @returns The date object or the date in milliseconds
6
6
  */
7
- export declare function weekYearToDate(weekYear: string, time?: boolean): string | number | Date;
7
+ export declare function weekYearToDate(weekYear: string, time?: boolean): string | Date | number;
@@ -4,4 +4,4 @@
4
4
  * @param time Flag to parse the object date to milliseconds.
5
5
  * @returns The date object or the date in milliseconds
6
6
  */
7
- export declare function yearToDate(yearDate: string, time?: boolean): string | number | Date;
7
+ export declare function yearToDate(yearDate: string, time?: boolean): string | Date | number;
@@ -6,4 +6,4 @@ import { IDateFormat } from "../interfaces/IDateFormat";
6
6
  * @param time flag to convert the formatted date to miliseconds
7
7
  * @returns a Date object, milisecond time or the same value if date format does not match.
8
8
  */
9
- export declare function getDateByDateFormat(date: string, format: IDateFormat, time?: boolean): string | number | Date;
9
+ export declare function getDateByDateFormat(date: string, format: IDateFormat, time?: boolean): string | Date | number;
@@ -0,0 +1,7 @@
1
+ import { IDateFormat } from "../interfaces/IDateFormat";
2
+ /**
3
+ * Gets the pick level number related to the Date picker element
4
+ * @param {IDateFormat} format The date format
5
+ * @returns {number} A number of the pick level setting
6
+ */
7
+ export declare function getDatePickerPickLevel(format: IDateFormat): 0 | 1 | 2;
@@ -0,0 +1,10 @@
1
+ import { DATE_FORMAT } from "../constants/DATE_FORMAT";
2
+ /**
3
+ * Gets the pick level number related to the Date picker element
4
+ * @param {IDateFormat} format The date format
5
+ * @returns {number} A number of the pick level setting
6
+ */
7
+ export function getDatePickerPickLevel(format) {
8
+ return format === DATE_FORMAT.YEAR ? 2 :
9
+ format === DATE_FORMAT.MONTH ? 1 : 0;
10
+ }