@qrvey/utils 1.2.9-35 → 1.2.9-36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +111 -111
- package/bitbucket-pipelines.yml +1 -1
- package/dist/cjs/charts/constants/index.js +5 -1
- package/dist/cjs/charts/helpers/index.js +5 -1
- package/dist/cjs/charts/index.js +5 -1
- package/dist/cjs/charts/interfaces/index.js +5 -1
- package/dist/cjs/columns/constants/COLUMN_LABEL.d.ts +1 -0
- package/dist/cjs/columns/constants/COLUMN_LABEL.js +1 -1
- package/dist/cjs/columns/constants/COLUMN_PROPERTY_INFO.js +1 -1
- package/dist/cjs/columns/constants/index.js +5 -1
- package/dist/cjs/columns/helpers/index.js +5 -1
- package/dist/cjs/columns/index.js +5 -1
- package/dist/cjs/columns/interfaces/index.js +5 -1
- package/dist/cjs/constants/index.js +5 -1
- package/dist/cjs/dates/constants/index.js +5 -1
- package/dist/cjs/dates/helpers/index.js +5 -1
- package/dist/cjs/dates/index.js +5 -1
- package/dist/cjs/dates/interfaces/index.js +5 -1
- package/dist/cjs/dates/range/index.js +5 -1
- package/dist/cjs/dates/relative/constants/index.js +5 -1
- package/dist/cjs/dates/relative/constants/ui/index.js +5 -1
- package/dist/cjs/dates/relative/helpers/dayjs-module.js +5 -1
- package/dist/cjs/dates/relative/helpers/index.js +5 -1
- package/dist/cjs/dates/relative/index.js +5 -1
- package/dist/cjs/dates/relative/interfaces/index.js +5 -1
- package/dist/cjs/dates/relative/interfaces/ui/index.js +5 -1
- package/dist/cjs/filters/adapters/index.js +5 -1
- package/dist/cjs/filters/classes/index.js +5 -1
- package/dist/cjs/filters/constants/backend/index.js +5 -1
- package/dist/cjs/filters/constants/builder/index.js +5 -1
- package/dist/cjs/filters/constants/common/index.js +5 -1
- package/dist/cjs/filters/constants/index.js +5 -1
- package/dist/cjs/filters/constants/panel/index.js +5 -1
- package/dist/cjs/filters/helpers/backend/index.js +5 -1
- package/dist/cjs/filters/helpers/builder/index.js +5 -1
- package/dist/cjs/filters/helpers/common/index.js +5 -1
- package/dist/cjs/filters/helpers/index.js +5 -1
- package/dist/cjs/filters/helpers/ui/index.js +5 -1
- package/dist/cjs/filters/index.js +5 -1
- package/dist/cjs/filters/interfaces/backend/index.js +5 -1
- package/dist/cjs/filters/interfaces/builder/index.js +5 -1
- package/dist/cjs/filters/interfaces/common/index.js +5 -1
- package/dist/cjs/filters/interfaces/index.js +5 -1
- package/dist/cjs/filters/interfaces/panel/index.js +5 -1
- package/dist/cjs/filters/interfaces/ui/index.js +5 -1
- package/dist/cjs/format/format.d.ts +1 -1
- package/dist/cjs/format/format.js +3 -0
- package/dist/cjs/format/index.js +5 -1
- package/dist/cjs/format/localization.js +2 -2
- package/dist/cjs/formulas/constants/index.js +5 -1
- package/dist/cjs/formulas/index.js +5 -1
- package/dist/cjs/formulas/interfaces/index.js +5 -1
- package/dist/cjs/general/array/index.js +5 -1
- package/dist/cjs/general/function/index.js +5 -1
- package/dist/cjs/general/index.js +5 -1
- package/dist/cjs/general/mix/index.js +5 -1
- package/dist/cjs/general/object/index.js +5 -1
- package/dist/cjs/general/string/index.js +5 -1
- package/dist/cjs/globalization/helpers/index.js +5 -1
- package/dist/cjs/globalization/index.js +5 -1
- package/dist/cjs/globalization/interfaces/bucket_builder/index.js +5 -1
- package/dist/cjs/globalization/interfaces/calendar/index.js +5 -1
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderTableStyleOptions.d.ts +6 -0
- package/dist/cjs/globalization/interfaces/chart_builder/index.js +5 -1
- package/dist/cjs/globalization/interfaces/columns/index.js +5 -1
- package/dist/cjs/globalization/interfaces/common/II18nColumnTypes.d.ts +1 -0
- package/dist/cjs/globalization/interfaces/common/index.js +5 -1
- package/dist/cjs/globalization/interfaces/cross_tabs/index.js +5 -1
- package/dist/cjs/globalization/interfaces/dashboard/II18nDashboardToast.d.ts +1 -0
- package/dist/cjs/globalization/interfaces/dashboard/index.js +5 -1
- package/dist/cjs/globalization/interfaces/filters/index.js +5 -1
- package/dist/cjs/globalization/interfaces/formula_builder/II18nFormulaBuilderDeleteDialog.d.ts +3 -3
- package/dist/cjs/globalization/interfaces/formula_builder/II18nFormulaBuilderListTable.d.ts +5 -5
- package/dist/cjs/globalization/interfaces/formula_builder/index.js +5 -1
- package/dist/cjs/globalization/interfaces/index.js +5 -1
- package/dist/cjs/globalization/interfaces/panel/index.js +5 -1
- package/dist/cjs/globalization/interfaces/style_themes/II18nStyleThemesTheme.d.ts +2 -0
- package/dist/cjs/globalization/interfaces/style_themes/index.js +5 -1
- package/dist/cjs/globalization/interfaces/table_charts/index.js +5 -1
- package/dist/cjs/globalization/labels/bucket_builder/index.js +5 -1
- package/dist/cjs/globalization/labels/calendar/index.js +5 -1
- package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_STYLE_OPTIONS.js +6 -0
- package/dist/cjs/globalization/labels/chart_builder/index.js +5 -1
- package/dist/cjs/globalization/labels/columns/index.js +5 -1
- package/dist/cjs/globalization/labels/common/I18N_COLUMN_LABEL.d.ts +1 -0
- package/dist/cjs/globalization/labels/common/I18N_COLUMN_LABEL.js +1 -0
- package/dist/cjs/globalization/labels/common/index.js +5 -1
- package/dist/cjs/globalization/labels/cross_tabs/index.js +5 -1
- package/dist/cjs/globalization/labels/dashboard/I18N_DASHBOARD.js +1 -0
- package/dist/cjs/globalization/labels/dashboard/index.js +5 -1
- package/dist/cjs/globalization/labels/filters/index.js +5 -1
- package/dist/cjs/globalization/labels/formula_builder/I18N_FORMULA_BUILDER.js +9 -9
- package/dist/cjs/globalization/labels/formula_builder/index.js +5 -1
- package/dist/cjs/globalization/labels/index.js +5 -1
- package/dist/cjs/globalization/labels/panel/index.js +5 -1
- package/dist/cjs/globalization/labels/style_themes/I18N_STYLE_THEMES.js +2 -0
- package/dist/cjs/globalization/labels/style_themes/index.js +5 -1
- package/dist/cjs/globalization/labels/table_charts/index.js +5 -1
- package/dist/cjs/globalization/service/index.js +5 -1
- package/dist/cjs/index.js +5 -1
- package/dist/cjs/interfaces/format/index.js +5 -1
- package/dist/cjs/interfaces/general/index.js +5 -1
- package/dist/cjs/interfaces/index.js +5 -1
- package/dist/cjs/qrvey/constants/index.js +5 -1
- package/dist/cjs/qrvey/helpers/index.js +5 -1
- package/dist/cjs/qrvey/index.js +5 -1
- package/dist/cjs/qrvey/interfaces/index.js +5 -1
- package/dist/cjs/services/adapters/index.js +5 -1
- package/dist/cjs/services/api/index.js +5 -1
- package/dist/cjs/services/constants/index.js +5 -1
- package/dist/cjs/services/helpers/index.js +5 -1
- package/dist/cjs/services/index.js +5 -1
- package/dist/cjs/services/interfaces/index.js +5 -1
- package/dist/cjs/stencil/decorators/index.js +5 -1
- package/dist/cjs/stencil/index.js +5 -1
- package/dist/cjs/stencil/util/index.js +5 -1
- package/dist/cjs/tokens/index.js +5 -1
- package/dist/cjs/typescript/decorators/index.js +5 -1
- package/dist/cjs/typescript/index.js +5 -1
- package/dist/columns/constants/COLUMN_LABEL.d.ts +1 -0
- package/dist/columns/constants/COLUMN_LABEL.js +1 -1
- package/dist/columns/constants/COLUMN_PROPERTY_INFO.js +1 -1
- package/dist/format/format.d.ts +1 -1
- package/dist/format/format.js +3 -0
- package/dist/format/localization.js +2 -2
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderTableStyleOptions.d.ts +6 -0
- package/dist/globalization/interfaces/common/II18nColumnTypes.d.ts +1 -0
- package/dist/globalization/interfaces/dashboard/II18nDashboardToast.d.ts +1 -0
- package/dist/globalization/interfaces/formula_builder/II18nFormulaBuilderDeleteDialog.d.ts +3 -3
- package/dist/globalization/interfaces/formula_builder/II18nFormulaBuilderListTable.d.ts +5 -5
- package/dist/globalization/interfaces/style_themes/II18nStyleThemesTheme.d.ts +2 -0
- package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_STYLE_OPTIONS.js +6 -0
- package/dist/globalization/labels/common/I18N_COLUMN_LABEL.d.ts +1 -0
- package/dist/globalization/labels/common/I18N_COLUMN_LABEL.js +1 -0
- package/dist/globalization/labels/dashboard/I18N_DASHBOARD.js +1 -0
- package/dist/globalization/labels/formula_builder/I18N_FORMULA_BUILDER.js +9 -9
- package/dist/globalization/labels/style_themes/I18N_STYLE_THEMES.js +2 -0
- package/package.json +21 -16
- package/scripts/clean-build/index.js +62 -0
- package/{prepareToPublish.js → scripts/prepare-publish/index.js} +0 -0
- package/scripts/publishing/index.js +204 -0
- package/src/columns/constants/COLUMN_LABEL.ts +1 -0
- package/src/columns/constants/COLUMN_PROPERTY_INFO.ts +1 -1
- package/src/format/format.ts +3 -1
- package/src/globalization/interfaces/chart_builder/II18nChartBuilderTableStyleOptions.ts +6 -0
- package/src/globalization/interfaces/common/II18nColumnTypes.ts +1 -0
- package/src/globalization/interfaces/dashboard/II18nDashboardToast.ts +1 -0
- package/src/globalization/interfaces/formula_builder/II18nFormulaBuilderDeleteDialog.ts +3 -3
- package/src/globalization/interfaces/formula_builder/II18nFormulaBuilderListTable.ts +5 -5
- package/src/globalization/interfaces/style_themes/II18nStyleThemesTheme.ts +2 -0
- package/src/globalization/labels/chart_builder/I18N_CHART_BUILDER_STYLE_OPTIONS.ts +6 -0
- package/src/globalization/labels/common/I18N_COLUMN_LABEL.ts +1 -0
- package/src/globalization/labels/dashboard/I18N_DASHBOARD.ts +1 -0
- package/src/globalization/labels/formula_builder/I18N_FORMULA_BUILDER.ts +9 -9
- package/src/globalization/labels/style_themes/I18N_STYLE_THEMES.ts +2 -0
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* New version for publishing a new version of Qrvey Utils
|
|
3
|
+
* 1- Publish the version with np
|
|
4
|
+
* 2- Update the README.md doc with doxdox
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
const fs = require('fs');
|
|
8
|
+
const util = require('util');
|
|
9
|
+
const childProcess = require('child_process');
|
|
10
|
+
const exec = util.promisify(childProcess.exec);
|
|
11
|
+
const spawn = childProcess.spawn;
|
|
12
|
+
const proc = require('process');
|
|
13
|
+
const readline = require("readline");
|
|
14
|
+
const { exit } = require('process');
|
|
15
|
+
const rl = readline.createInterface({
|
|
16
|
+
input: proc.stdin,
|
|
17
|
+
output: proc.stdout
|
|
18
|
+
});
|
|
19
|
+
const question = util.promisify(rl.question).bind(rl);
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
async function execute(command) {
|
|
23
|
+
console.log(command);
|
|
24
|
+
const response = await exec(command);
|
|
25
|
+
if (response.error != null) {
|
|
26
|
+
throw new Error(response.error);
|
|
27
|
+
}
|
|
28
|
+
if (response.stderr != null && response.stderr !== '') {
|
|
29
|
+
console.error(response.stderr);
|
|
30
|
+
}
|
|
31
|
+
if (response.stdout != null && response.stdout !== '') {
|
|
32
|
+
console.log(response.stdout);
|
|
33
|
+
}
|
|
34
|
+
return response;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
async function spawning(command, sArguments) {
|
|
38
|
+
let newProcess;
|
|
39
|
+
await new Promise(function (resolve, reject) {
|
|
40
|
+
newProcess = spawn(command, sArguments, { shell: true });
|
|
41
|
+
newProcess.stdout.on("data", data => {
|
|
42
|
+
console.log(`stdout: ${data}`);
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
newProcess.stderr.on("data", data => {
|
|
46
|
+
console.log(`stderr: ${data}`);
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
newProcess.on('error', (_error) => {
|
|
50
|
+
newProcess.stdin.pause();
|
|
51
|
+
newProcess.stdin.destroy();
|
|
52
|
+
newProcess.stdout.pause();
|
|
53
|
+
newProcess.stdout.destroy();
|
|
54
|
+
newProcess.kill();
|
|
55
|
+
reject();
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
newProcess.on("close", code => {
|
|
59
|
+
newProcess.stdin.pause();
|
|
60
|
+
newProcess.stdin.destroy();
|
|
61
|
+
newProcess.stdout.pause();
|
|
62
|
+
newProcess.stdout.destroy();
|
|
63
|
+
newProcess.kill();
|
|
64
|
+
if (code == '1') {
|
|
65
|
+
reject();
|
|
66
|
+
}
|
|
67
|
+
resolve();
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
async function getPackageJson(settings) {
|
|
73
|
+
console.log('==>>> Opening package.json file...');
|
|
74
|
+
const packageJson = await fs.readFileSync(settings.packagePath, 'utf8');
|
|
75
|
+
const packageObject = JSON.parse(packageJson);
|
|
76
|
+
if (packageObject != null) {
|
|
77
|
+
console.log(`**** The current version is ${packageObject.version}`);
|
|
78
|
+
return packageObject.version;
|
|
79
|
+
}
|
|
80
|
+
return '';
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
async function getNewVersion() {
|
|
84
|
+
console.log('==>>> Checking the new version provided...');
|
|
85
|
+
let newVersion;
|
|
86
|
+
const versionIndex = proc.argv.findIndex(function (argv) { return argv.includes('--np-new-version='); });
|
|
87
|
+
if (versionIndex > -1) {
|
|
88
|
+
const versionArg = proc.argv[versionIndex].split('--np-new-version=');
|
|
89
|
+
newVersion = versionArg[1] == null || versionArg[1] === '' ? undefined : versionArg[1];
|
|
90
|
+
}
|
|
91
|
+
if (newVersion == null) {
|
|
92
|
+
newVersion = question('No version provided. Type the new version: ');
|
|
93
|
+
}
|
|
94
|
+
console.log('**** Version to publish: ' + newVersion);
|
|
95
|
+
return newVersion;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
async function cleaningProject(settings) {
|
|
99
|
+
console.log('==>>> Cleaning project...');
|
|
100
|
+
await execute(`rm -f ${settings.packageLockPath}`);
|
|
101
|
+
await execute(`rm -f -R ${settings.nodeModulesPath}`);
|
|
102
|
+
await execute(`rm -f -R ${settings.distPath}`);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
async function buildingBundle(_settings) {
|
|
106
|
+
console.log('==>>> Installing Dependencies...');
|
|
107
|
+
await execute('npm install');
|
|
108
|
+
|
|
109
|
+
console.log('==>>> Generating Build...');
|
|
110
|
+
await execute('npm run build');
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
async function startPublishingVersion(settings) {
|
|
114
|
+
await callingPublisher(settings);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
async function callingPublisher(settings) {
|
|
118
|
+
console.log('==>>> Calling Publisher');
|
|
119
|
+
let anyBranch = '', tag = '';
|
|
120
|
+
const anyBranchIndex = proc.argv.findIndex(function (argv) { return argv.includes('--np-any-branch='); });
|
|
121
|
+
const tagIndex = proc.argv.findIndex(function (argv) { return argv.includes('--np-tag='); });
|
|
122
|
+
if (anyBranchIndex > -1) {
|
|
123
|
+
const anyBranchArg = proc.argv[anyBranchIndex].split('--np-any-branch=');
|
|
124
|
+
anyBranch = anyBranchArg[1] == null || anyBranchArg[1] === '' ? '' : '--any-branch';
|
|
125
|
+
}
|
|
126
|
+
if (tagIndex > -1) {
|
|
127
|
+
const tagArg = proc.argv[tagIndex].split('--np-tag=');
|
|
128
|
+
tag = tagArg[1] == null || tagArg[1] === '' ? '' : proc.argv[tagIndex].replace('--np-tag=', '--tag=');
|
|
129
|
+
}
|
|
130
|
+
await spawning(`np ${settings.newVersion}`, [anyBranch, tag]);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
async function startGeneratingDocs(settings) {
|
|
134
|
+
console.log('==>>> Starting the Docs generation');
|
|
135
|
+
|
|
136
|
+
await generatingDocument(settings);
|
|
137
|
+
await changingVersion(settings);
|
|
138
|
+
await pushingChanges(settings);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
async function generatingDocument(settings) {
|
|
142
|
+
console.log('==>>> Generating Document...');
|
|
143
|
+
await execute(`doxdox './dist/**/*.js' --output ${settings.docsFileName} --ignore './dist/cjs/**/*.js' --package ${settings.packagePath} --layout markdown`);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
async function changingVersion(settings) {
|
|
147
|
+
console.log('==>>> Replacing the old version in the document');
|
|
148
|
+
const doc = await fs.readFileSync(settings.docsPath, 'utf8');
|
|
149
|
+
const replacedDoc = doc.replace(settings.currentVersion, settings.newVersion);
|
|
150
|
+
await fs.writeFileSync(settings.docsPath, replacedDoc, 'utf8');
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
async function pushingChanges(settings) {
|
|
154
|
+
console.log('==>>> Commiting and Pushing Docs changes...');
|
|
155
|
+
|
|
156
|
+
const gitStdout = await execute('git rev-parse --abbrev-ref HEAD');
|
|
157
|
+
console.log('gitStdout', gitStdout);
|
|
158
|
+
await execute(`git add ${settings.docsPath}`);
|
|
159
|
+
await execute(`git commit -m "📝 docs: Updated docs${settings.newVersion != null || settings.newVersion !== '' ? ' for ' + settings.newVersion : ''}"`);
|
|
160
|
+
await execute(`git push -u origin ${gitStdout.stdout}`);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
async function revertChanges(settings) {
|
|
164
|
+
console.log('>>> Checking for modifications...');
|
|
165
|
+
console.warn(`>>> Unstaging posible changes from ${settings.docsFileName} and ${settings.packageFileName} file`);
|
|
166
|
+
await execute(`git restore --staged ${settings.docsPath} ${settings.packagePath}`);
|
|
167
|
+
console.warn(`>>> Discarting posible changes of ${settings.docsFileName} and ${settings.packageFileName} file`);
|
|
168
|
+
await execute(`git checkout -- ${settings.docsPath} ${settings.packagePath}`);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
async function init() {
|
|
172
|
+
let settings = {
|
|
173
|
+
currentVersion: '',
|
|
174
|
+
distPath: './dist',
|
|
175
|
+
docsPath: './README.md',
|
|
176
|
+
docsFileName: 'README.md',
|
|
177
|
+
newVersion: undefined,
|
|
178
|
+
nodeModulesPath: './node_modules',
|
|
179
|
+
packageFileName: 'package.json',
|
|
180
|
+
packageLockPath: './package-lock.json',
|
|
181
|
+
packagePath: './package.json',
|
|
182
|
+
|
|
183
|
+
};
|
|
184
|
+
|
|
185
|
+
console.log('Welcome. The publishing operationg will begin.');
|
|
186
|
+
try {
|
|
187
|
+
settings["currentVersion"] = await getPackageJson(settings);
|
|
188
|
+
settings["newVersion"] = await getNewVersion();
|
|
189
|
+
|
|
190
|
+
await cleaningProject(settings);
|
|
191
|
+
await buildingBundle(settings);
|
|
192
|
+
await startGeneratingDocs(settings);
|
|
193
|
+
await startPublishingVersion(settings);
|
|
194
|
+
console.info('Finished Publishing');
|
|
195
|
+
} catch (err) {
|
|
196
|
+
console.error('Error: ', err);
|
|
197
|
+
await revertChanges(settings);
|
|
198
|
+
} finally {
|
|
199
|
+
console.log('Execution finished');
|
|
200
|
+
exit();
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
init();
|
|
@@ -12,7 +12,7 @@ import { DATE_DISTINCT_TIME_PROPERTY_INFO_LIST } from "../../dates/constants/DAT
|
|
|
12
12
|
export const COLUMN_PROPERTY_INFO: { [key in IColumnType]?: IColumnPropertyInfo[] } = {
|
|
13
13
|
[COLUMN.LOOKUP]: [
|
|
14
14
|
{ value: COLUMN_PROPERTY.LOOKUP_DISPLAY, label: 'Display', shortLabel: 'Display', abbrLabel: 'DSY', displayed: true, i18nLabelPath: 'common.properties.lookup_display_label' },
|
|
15
|
-
{ value: COLUMN_PROPERTY.LOOKUP_VALUE, label: 'Value', shortLabel: 'Value', abbrLabel: 'Val', displayed: true, i18nLabelPath: 'common.properties.
|
|
15
|
+
{ value: COLUMN_PROPERTY.LOOKUP_VALUE, label: 'Value', shortLabel: 'Value', abbrLabel: 'Val', displayed: true, i18nLabelPath: 'common.properties.lookup_value_label' }
|
|
16
16
|
],
|
|
17
17
|
[COLUMN.DATE]: [
|
|
18
18
|
...DATE_GROUPING_PROPERTY_INFO_LIST,
|
package/src/format/format.ts
CHANGED
|
@@ -6,8 +6,9 @@ import { isEmpty } from '../general/mix/isEmpty';
|
|
|
6
6
|
import { _get } from '../general/object/get';
|
|
7
7
|
import { COLUMN } from '../columns/constants/COLUMN';
|
|
8
8
|
import { FORMULA } from '../formulas/constants/FORMULA';
|
|
9
|
-
import { IFormatConfig } from '..';
|
|
10
9
|
import { formatWithLocale } from './localization';
|
|
10
|
+
import { isObject } from '../general/object/isObject';
|
|
11
|
+
import { IFormatConfig } from '../interfaces/format/IFormatConfig.Interface';
|
|
11
12
|
|
|
12
13
|
dayjs.extend(advancedFormat); // Add support to advanced formats https://day.js.org/docs/en/plugin/advanced-format
|
|
13
14
|
|
|
@@ -21,6 +22,7 @@ function isValidDateString(dateString = '') {
|
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
export function formatDate(dateString, format) {
|
|
25
|
+
if(isObject(format)) format = format.format || "";
|
|
24
26
|
if (isEmpty(dateString) || !isNaN(dateString) || format === 'Default') return dateString;
|
|
25
27
|
if (!isValidDateString(dateString)) return dateString;
|
|
26
28
|
const dateValue = dateString?.replace(/Z$/i, '');
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export interface II18nFormulaBuilderListTable{
|
|
2
|
-
name: string;
|
|
3
|
-
formula: string;
|
|
4
|
-
menu_edit: string;
|
|
5
|
-
menu_duplicate: string;
|
|
6
|
-
menu_delete: string;
|
|
7
2
|
duplicate_copy: string;
|
|
8
3
|
duplicate_toast: string
|
|
4
|
+
formula: string;
|
|
5
|
+
menu_delete: string;
|
|
6
|
+
menu_duplicate: string;
|
|
7
|
+
menu_edit: string;
|
|
8
|
+
name: string;
|
|
9
9
|
}
|
|
@@ -13,10 +13,12 @@ export interface II18nStyleThemesTheme {
|
|
|
13
13
|
legends: string;
|
|
14
14
|
main_color: string;
|
|
15
15
|
name_placeholder: string;
|
|
16
|
+
panel_background: string;
|
|
16
17
|
panel_styles: string;
|
|
17
18
|
qrvey_theme: string;
|
|
18
19
|
restore_to_default: string;
|
|
19
20
|
save_theme: string;
|
|
21
|
+
show_title: string;
|
|
20
22
|
table_header_styles: string;
|
|
21
23
|
text_styles: string;
|
|
22
24
|
tooltips: string;
|
|
@@ -188,6 +188,12 @@ export const I18N_CHART_BUILDER_STYLE_OPTIONS: Pick<II18nChartBuilder, StyleOpti
|
|
|
188
188
|
target_value: 'Target Value'
|
|
189
189
|
},
|
|
190
190
|
table_style_options: {
|
|
191
|
+
align: 'Align',
|
|
192
|
+
align_all_columns: 'All Columns',
|
|
193
|
+
align_default: 'Default',
|
|
194
|
+
align_left: 'Align Left',
|
|
195
|
+
align_right: 'Align Right',
|
|
196
|
+
align_center: 'Align Center',
|
|
191
197
|
typeface: 'Typeface',
|
|
192
198
|
weight: 'Weight',
|
|
193
199
|
weight_bold: 'Bold',
|
|
@@ -21,6 +21,7 @@ export const I18N_COLUMN_LABEL = {
|
|
|
21
21
|
checklist_label: COLUMN_LABEL.CHECKLIST,
|
|
22
22
|
nps_score_label: COLUMN_LABEL.NPS_SCORE,
|
|
23
23
|
nps_feedback_label: COLUMN_LABEL.NPS_FEEDBACK,
|
|
24
|
+
text_label: COLUMN_LABEL.TEXT,
|
|
24
25
|
text_label_label: COLUMN_LABEL.TEXT_LABEL,
|
|
25
26
|
text_category_label: COLUMN_LABEL.TEXT_CATEGORY,
|
|
26
27
|
lookup_label: COLUMN_LABEL.LOOKUP,
|
|
@@ -25,6 +25,7 @@ export const I18N_DASHBOARD: II18nDashboard = {
|
|
|
25
25
|
data_views_updated_message: 'Data views updated successfully.',
|
|
26
26
|
delete_record_message: 'Record Successfully Deleted.',
|
|
27
27
|
refresh_table_message: 'Record Successfully Edited.',
|
|
28
|
+
failed_download: 'The file(s) could not be exported at this time.',
|
|
28
29
|
},
|
|
29
30
|
tooltips: {
|
|
30
31
|
buckets: "Buckets",
|
|
@@ -9,20 +9,20 @@ export const I18N_FORMULA_BUILDER: II18nFormulaBuilder = {
|
|
|
9
9
|
information_text_text: 'create and work with formulas',
|
|
10
10
|
},
|
|
11
11
|
list_table: {
|
|
12
|
-
|
|
12
|
+
duplicate_copy: 'Copy',
|
|
13
|
+
duplicate_toast: 'Formula Duplicated Successfully',
|
|
13
14
|
formula: 'Formula',
|
|
14
|
-
menu_edit: 'Edit',
|
|
15
|
-
menu_duplicate: 'Duplicate',
|
|
16
15
|
menu_delete: 'Delete',
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
menu_duplicate: 'Duplicate',
|
|
17
|
+
menu_edit: 'Edit',
|
|
18
|
+
name: 'Formula Name'
|
|
19
19
|
},
|
|
20
20
|
delete_dialog: {
|
|
21
|
-
|
|
22
|
-
description: 'Deleting this formula will remove all instances of this calculation in your analytics.',
|
|
23
|
-
toast_description: 'Formula Successfully Deleted',
|
|
21
|
+
apply_button: 'Delete',
|
|
24
22
|
cancel_button: 'Cancel',
|
|
25
|
-
|
|
23
|
+
description: 'Deleting this formula will remove all instances of this calculation in your analytics.',
|
|
24
|
+
title: 'Delete Formula',
|
|
25
|
+
toast_description: 'Formula Deleted Successfully'
|
|
26
26
|
},
|
|
27
27
|
create_modal: {
|
|
28
28
|
title_header_create: 'Create Formula',
|
|
@@ -37,10 +37,12 @@ export const I18N_STYLE_THEMES: II18nStyleThemes = {
|
|
|
37
37
|
legends: 'Legends',
|
|
38
38
|
main_color: 'Main Color',
|
|
39
39
|
name_placeholder: 'Type name',
|
|
40
|
+
panel_background: 'Panel Background',
|
|
40
41
|
panel_styles: 'Panel Styles',
|
|
41
42
|
qrvey_theme: 'Qrvey Theme',
|
|
42
43
|
restore_to_default: 'Restore to Default',
|
|
43
44
|
save_theme: 'Save Theme',
|
|
45
|
+
show_title: 'Show Title',
|
|
44
46
|
table_header_styles: 'Table Header Styles',
|
|
45
47
|
text_styles: 'Text Styles',
|
|
46
48
|
tooltips: 'Tooltips',
|