@etsoo/appscript 1.3.65 → 1.3.66
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/lib/cjs/app/CoreApp.d.ts +5 -0
- package/lib/cjs/app/CoreApp.js +11 -0
- package/lib/cjs/app/IApp.d.ts +5 -0
- package/lib/mjs/app/CoreApp.d.ts +5 -0
- package/lib/mjs/app/CoreApp.js +11 -0
- package/lib/mjs/app/IApp.d.ts +5 -0
- package/package.json +3 -3
- package/src/app/CoreApp.ts +12 -0
- package/src/app/IApp.ts +6 -0
package/lib/cjs/app/CoreApp.d.ts
CHANGED
|
@@ -347,6 +347,11 @@ export declare abstract class CoreApp<U extends IUser, S extends IAppSettings, N
|
|
|
347
347
|
getLabels<T extends string>(...keys: T[]): {
|
|
348
348
|
[K in T]: string;
|
|
349
349
|
};
|
|
350
|
+
/**
|
|
351
|
+
* Get bool items
|
|
352
|
+
* @returns Bool items
|
|
353
|
+
*/
|
|
354
|
+
getBools(): ListType1[];
|
|
350
355
|
/**
|
|
351
356
|
* Get cached token
|
|
352
357
|
* @returns Cached token
|
package/lib/cjs/app/CoreApp.js
CHANGED
|
@@ -853,6 +853,17 @@ class CoreApp {
|
|
|
853
853
|
const init = {};
|
|
854
854
|
return keys.reduce((a, v) => { var _a; return ({ ...a, [v]: (_a = this.get(v)) !== null && _a !== void 0 ? _a : '' }); }, init);
|
|
855
855
|
}
|
|
856
|
+
/**
|
|
857
|
+
* Get bool items
|
|
858
|
+
* @returns Bool items
|
|
859
|
+
*/
|
|
860
|
+
getBools() {
|
|
861
|
+
const { no = 'No', yes = 'Yes' } = this.getLabels('no', 'yes');
|
|
862
|
+
return [
|
|
863
|
+
{ id: 'false', label: no },
|
|
864
|
+
{ id: 'true', label: yes }
|
|
865
|
+
];
|
|
866
|
+
}
|
|
856
867
|
/**
|
|
857
868
|
* Get cached token
|
|
858
869
|
* @returns Cached token
|
package/lib/cjs/app/IApp.d.ts
CHANGED
|
@@ -283,6 +283,11 @@ export interface IApp {
|
|
|
283
283
|
getLabels<T extends string>(...keys: T[]): {
|
|
284
284
|
[K in T]: string;
|
|
285
285
|
};
|
|
286
|
+
/**
|
|
287
|
+
* Get bool items
|
|
288
|
+
* @returns Bool items
|
|
289
|
+
*/
|
|
290
|
+
getBools(): ListType1[];
|
|
286
291
|
/**
|
|
287
292
|
* Get cached token
|
|
288
293
|
* @returns Cached token
|
package/lib/mjs/app/CoreApp.d.ts
CHANGED
|
@@ -347,6 +347,11 @@ export declare abstract class CoreApp<U extends IUser, S extends IAppSettings, N
|
|
|
347
347
|
getLabels<T extends string>(...keys: T[]): {
|
|
348
348
|
[K in T]: string;
|
|
349
349
|
};
|
|
350
|
+
/**
|
|
351
|
+
* Get bool items
|
|
352
|
+
* @returns Bool items
|
|
353
|
+
*/
|
|
354
|
+
getBools(): ListType1[];
|
|
350
355
|
/**
|
|
351
356
|
* Get cached token
|
|
352
357
|
* @returns Cached token
|
package/lib/mjs/app/CoreApp.js
CHANGED
|
@@ -850,6 +850,17 @@ export class CoreApp {
|
|
|
850
850
|
const init = {};
|
|
851
851
|
return keys.reduce((a, v) => { var _a; return ({ ...a, [v]: (_a = this.get(v)) !== null && _a !== void 0 ? _a : '' }); }, init);
|
|
852
852
|
}
|
|
853
|
+
/**
|
|
854
|
+
* Get bool items
|
|
855
|
+
* @returns Bool items
|
|
856
|
+
*/
|
|
857
|
+
getBools() {
|
|
858
|
+
const { no = 'No', yes = 'Yes' } = this.getLabels('no', 'yes');
|
|
859
|
+
return [
|
|
860
|
+
{ id: 'false', label: no },
|
|
861
|
+
{ id: 'true', label: yes }
|
|
862
|
+
];
|
|
863
|
+
}
|
|
853
864
|
/**
|
|
854
865
|
* Get cached token
|
|
855
866
|
* @returns Cached token
|
package/lib/mjs/app/IApp.d.ts
CHANGED
|
@@ -283,6 +283,11 @@ export interface IApp {
|
|
|
283
283
|
getLabels<T extends string>(...keys: T[]): {
|
|
284
284
|
[K in T]: string;
|
|
285
285
|
};
|
|
286
|
+
/**
|
|
287
|
+
* Get bool items
|
|
288
|
+
* @returns Bool items
|
|
289
|
+
*/
|
|
290
|
+
getBools(): ListType1[];
|
|
286
291
|
/**
|
|
287
292
|
* Get cached token
|
|
288
293
|
* @returns Cached token
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etsoo/appscript",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.66",
|
|
4
4
|
"description": "Applications shared TypeScript framework",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/mjs/index.js",
|
|
@@ -65,8 +65,8 @@
|
|
|
65
65
|
"@babel/preset-env": "^7.20.2",
|
|
66
66
|
"@babel/runtime-corejs3": "^7.20.13",
|
|
67
67
|
"@types/jest": "^29.4.0",
|
|
68
|
-
"jest": "^29.4.
|
|
69
|
-
"jest-environment-jsdom": "^29.4.
|
|
68
|
+
"jest": "^29.4.3",
|
|
69
|
+
"jest-environment-jsdom": "^29.4.3",
|
|
70
70
|
"ts-jest": "^29.0.5",
|
|
71
71
|
"typescript": "^4.9.5"
|
|
72
72
|
}
|
package/src/app/CoreApp.ts
CHANGED
|
@@ -1178,6 +1178,18 @@ export abstract class CoreApp<
|
|
|
1178
1178
|
);
|
|
1179
1179
|
}
|
|
1180
1180
|
|
|
1181
|
+
/**
|
|
1182
|
+
* Get bool items
|
|
1183
|
+
* @returns Bool items
|
|
1184
|
+
*/
|
|
1185
|
+
getBools(): ListType1[] {
|
|
1186
|
+
const { no = 'No', yes = 'Yes' } = this.getLabels('no', 'yes');
|
|
1187
|
+
return [
|
|
1188
|
+
{ id: 'false', label: no },
|
|
1189
|
+
{ id: 'true', label: yes }
|
|
1190
|
+
];
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1181
1193
|
/**
|
|
1182
1194
|
* Get cached token
|
|
1183
1195
|
* @returns Cached token
|
package/src/app/IApp.ts
CHANGED
|
@@ -379,6 +379,12 @@ export interface IApp {
|
|
|
379
379
|
*/
|
|
380
380
|
getLabels<T extends string>(...keys: T[]): { [K in T]: string };
|
|
381
381
|
|
|
382
|
+
/**
|
|
383
|
+
* Get bool items
|
|
384
|
+
* @returns Bool items
|
|
385
|
+
*/
|
|
386
|
+
getBools(): ListType1[];
|
|
387
|
+
|
|
382
388
|
/**
|
|
383
389
|
* Get cached token
|
|
384
390
|
* @returns Cached token
|