@todoist/ui-extensions-server 0.0.0-stage → 4.0.0
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 +2 -2
- package/dist/analytics/events.d.ts +8 -0
- package/dist/analytics/events.js +15 -0
- package/dist/analytics/events.js.map +1 -0
- package/dist/buffer/cloneBuffer.d.ts +1 -0
- package/dist/buffer/cloneBuffer.js +12 -0
- package/dist/buffer/cloneBuffer.js.map +1 -0
- package/dist/buffer/incomingMessageWithRawBody.d.ts +4 -0
- package/dist/buffer/incomingMessageWithRawBody.js +8 -0
- package/dist/buffer/incomingMessageWithRawBody.js.map +1 -0
- package/dist/buffer/index.d.ts +2 -0
- package/dist/buffer/index.js +19 -0
- package/dist/buffer/index.js.map +1 -0
- package/dist/config/configurationBase.d.ts +29 -0
- package/dist/config/configurationBase.js +58 -0
- package/dist/config/configurationBase.js.map +1 -0
- package/dist/constants/card-actions.d.ts +12 -0
- package/dist/constants/card-actions.js +17 -0
- package/dist/constants/card-actions.js.map +1 -0
- package/dist/constants/core-strings.d.ts +61 -0
- package/dist/constants/core-strings.js +66 -0
- package/dist/constants/core-strings.js.map +1 -0
- package/dist/constants/images.d.ts +25 -0
- package/dist/constants/images.js +29 -0
- package/dist/constants/images.js.map +1 -0
- package/dist/constants/index.d.ts +4 -0
- package/dist/constants/index.js +21 -0
- package/dist/constants/index.js.map +1 -0
- package/dist/constants/ui-constants.d.ts +1 -0
- package/dist/constants/ui-constants.js +5 -0
- package/dist/constants/ui-constants.js.map +1 -0
- package/dist/controllers/app.controller.d.ts +15 -0
- package/dist/controllers/app.controller.js +76 -0
- package/dist/controllers/app.controller.js.map +1 -0
- package/dist/controllers/auth.controller.d.ts +47 -0
- package/dist/controllers/auth.controller.js +348 -0
- package/dist/controllers/auth.controller.js.map +1 -0
- package/dist/controllers/index.d.ts +3 -0
- package/dist/controllers/index.js +20 -0
- package/dist/controllers/index.js.map +1 -0
- package/dist/controllers/ping.controller.d.ts +3 -0
- package/dist/controllers/ping.controller.js +30 -0
- package/dist/controllers/ping.controller.js.map +1 -0
- package/dist/decorators/action-decorators.d.ts +12 -0
- package/dist/decorators/action-decorators.js +12 -0
- package/dist/decorators/action-decorators.js.map +1 -0
- package/dist/decorators/app-token.decorator.d.ts +1 -0
- package/dist/decorators/app-token.decorator.js +12 -0
- package/dist/decorators/app-token.decorator.js.map +1 -0
- package/dist/decorators/index.d.ts +2 -0
- package/dist/decorators/index.js +19 -0
- package/dist/decorators/index.js.map +1 -0
- package/dist/decorators/typed-method-decorator.d.ts +1 -0
- package/dist/decorators/typed-method-decorator.js +3 -0
- package/dist/decorators/typed-method-decorator.js.map +1 -0
- package/dist/entities/User.d.ts +24 -0
- package/dist/entities/User.js +89 -0
- package/dist/entities/User.js.map +1 -0
- package/dist/entities/index.d.ts +1 -0
- package/dist/entities/index.js +18 -0
- package/dist/entities/index.js.map +1 -0
- package/dist/exceptions/index.d.ts +1 -0
- package/dist/exceptions/index.js +18 -0
- package/dist/exceptions/index.js.map +1 -0
- package/dist/exceptions/integration.exception.d.ts +32 -0
- package/dist/exceptions/integration.exception.js +17 -0
- package/dist/exceptions/integration.exception.js.map +1 -0
- package/dist/filters/index.d.ts +1 -0
- package/dist/filters/index.js +18 -0
- package/dist/filters/index.js.map +1 -0
- package/dist/filters/integration-exception.filter.d.ts +10 -0
- package/dist/filters/integration-exception.filter.js +83 -0
- package/dist/filters/integration-exception.filter.js.map +1 -0
- package/dist/guards/extensionVerification.guard.d.ts +6 -0
- package/dist/guards/extensionVerification.guard.js +55 -0
- package/dist/guards/extensionVerification.guard.js.map +1 -0
- package/dist/guards/index.d.ts +1 -0
- package/dist/guards/index.js +18 -0
- package/dist/guards/index.js.map +1 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.js +34 -0
- package/dist/index.js.map +1 -0
- package/dist/interceptors/sentry.interceptor.d.ts +5 -0
- package/dist/interceptors/sentry.interceptor.js +30 -0
- package/dist/interceptors/sentry.interceptor.js.map +1 -0
- package/dist/logging/index.d.ts +1 -0
- package/dist/logging/index.js +18 -0
- package/dist/logging/index.js.map +1 -0
- package/dist/logging/json.logger.d.ts +7 -0
- package/dist/logging/json.logger.js +23 -0
- package/dist/logging/json.logger.js.map +1 -0
- package/dist/middleware/index.d.ts +1 -0
- package/dist/middleware/index.js +18 -0
- package/dist/middleware/index.js.map +1 -0
- package/dist/middleware/request-header.middleware.d.ts +8 -0
- package/dist/middleware/request-header.middleware.js +29 -0
- package/dist/middleware/request-header.middleware.js.map +1 -0
- package/dist/middleware/workflow-initial-action.middleware.d.ts +13 -0
- package/dist/middleware/workflow-initial-action.middleware.js +23 -0
- package/dist/middleware/workflow-initial-action.middleware.js.map +1 -0
- package/dist/modules/analytics.module.d.ts +5 -0
- package/dist/modules/analytics.module.js +37 -0
- package/dist/modules/analytics.module.js.map +1 -0
- package/dist/modules/app-token.module.d.ts +2 -0
- package/dist/modules/app-token.module.js +22 -0
- package/dist/modules/app-token.module.js.map +1 -0
- package/dist/modules/auth.module.d.ts +17 -0
- package/dist/modules/auth.module.js +44 -0
- package/dist/modules/auth.module.js.map +1 -0
- package/dist/modules/core.module.d.ts +4 -0
- package/dist/modules/core.module.js +38 -0
- package/dist/modules/core.module.js.map +1 -0
- package/dist/modules/error.module.d.ts +7 -0
- package/dist/modules/error.module.js +39 -0
- package/dist/modules/error.module.js.map +1 -0
- package/dist/modules/index.d.ts +3 -0
- package/dist/modules/index.js +20 -0
- package/dist/modules/index.js.map +1 -0
- package/dist/modules/request-headers.module.d.ts +2 -0
- package/dist/modules/request-headers.module.js +22 -0
- package/dist/modules/request-headers.module.js.map +1 -0
- package/dist/server.d.ts +11 -0
- package/dist/server.js +52 -0
- package/dist/server.js.map +1 -0
- package/dist/services/actions.service.d.ts +19 -0
- package/dist/services/actions.service.js +126 -0
- package/dist/services/actions.service.js.map +1 -0
- package/dist/services/adaptive-card.service.d.ts +57 -0
- package/dist/services/adaptive-card.service.js +284 -0
- package/dist/services/adaptive-card.service.js.map +1 -0
- package/dist/services/analytics.service.d.ts +7 -0
- package/dist/services/analytics.service.js +20 -0
- package/dist/services/analytics.service.js.map +1 -0
- package/dist/services/app-token.service.d.ts +6 -0
- package/dist/services/app-token.service.js +47 -0
- package/dist/services/app-token.service.js.map +1 -0
- package/dist/services/authentication-client.d.ts +42 -0
- package/dist/services/authentication-client.js +95 -0
- package/dist/services/authentication-client.js.map +1 -0
- package/dist/services/composer-append-formatting.service.d.ts +9 -0
- package/dist/services/composer-append-formatting.service.js +37 -0
- package/dist/services/composer-append-formatting.service.js.map +1 -0
- package/dist/services/composer-append-settings.service.d.ts +7 -0
- package/dist/services/composer-append-settings.service.js +39 -0
- package/dist/services/composer-append-settings.service.js.map +1 -0
- package/dist/services/errorCard.service.d.ts +14 -0
- package/dist/services/errorCard.service.js +129 -0
- package/dist/services/errorCard.service.js.map +1 -0
- package/dist/services/google-analytics.service.d.ts +10 -0
- package/dist/services/google-analytics.service.js +56 -0
- package/dist/services/google-analytics.service.js.map +1 -0
- package/dist/services/index.d.ts +15 -0
- package/dist/services/index.js +32 -0
- package/dist/services/index.js.map +1 -0
- package/dist/services/legacy-google-analytics.service.d.ts +10 -0
- package/dist/services/legacy-google-analytics.service.js +56 -0
- package/dist/services/legacy-google-analytics.service.js.map +1 -0
- package/dist/services/login.service.d.ts +31 -0
- package/dist/services/login.service.js +165 -0
- package/dist/services/login.service.js.map +1 -0
- package/dist/services/request-headers.service.d.ts +9 -0
- package/dist/services/request-headers.service.js +53 -0
- package/dist/services/request-headers.service.js.map +1 -0
- package/dist/services/state.service.d.ts +18 -0
- package/dist/services/state.service.js +96 -0
- package/dist/services/state.service.js.map +1 -0
- package/dist/services/theme.service.d.ts +5 -0
- package/dist/services/theme.service.js +28 -0
- package/dist/services/theme.service.js.map +1 -0
- package/dist/services/translation.service.d.ts +3 -0
- package/dist/services/translation.service.js +20 -0
- package/dist/services/translation.service.js.map +1 -0
- package/dist/services/user-database.service.d.ts +18 -0
- package/dist/services/user-database.service.js +87 -0
- package/dist/services/user-database.service.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/dist/types/auth.d.ts +8 -0
- package/dist/types/auth.js +3 -0
- package/dist/types/auth.js.map +1 -0
- package/dist/types/data.d.ts +12 -0
- package/dist/types/data.js +10 -0
- package/dist/types/data.js.map +1 -0
- package/dist/types/endpoints.d.ts +1 -0
- package/dist/types/endpoints.js +3 -0
- package/dist/types/endpoints.js.map +1 -0
- package/dist/types/error-card-options.d.ts +11 -0
- package/dist/types/error-card-options.js +3 -0
- package/dist/types/error-card-options.js.map +1 -0
- package/dist/types/error.d.ts +2 -0
- package/dist/types/error.js +12 -0
- package/dist/types/error.js.map +1 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/index.js +24 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/logging.d.ts +1 -0
- package/dist/types/logging.js +3 -0
- package/dist/types/logging.js.map +1 -0
- package/dist/types/product.d.ts +1 -0
- package/dist/types/product.js +3 -0
- package/dist/types/product.js.map +1 -0
- package/dist/types/retry.d.ts +11 -0
- package/dist/types/retry.js +12 -0
- package/dist/types/retry.js.map +1 -0
- package/dist/ui/back-button.d.ts +7 -0
- package/dist/ui/back-button.js +33 -0
- package/dist/ui/back-button.js.map +1 -0
- package/dist/ui/button.d.ts +15 -0
- package/dist/ui/button.js +27 -0
- package/dist/ui/button.js.map +1 -0
- package/dist/ui/column.d.ts +4 -0
- package/dist/ui/column.js +23 -0
- package/dist/ui/column.js.map +1 -0
- package/dist/ui/container.d.ts +11 -0
- package/dist/ui/container.js +31 -0
- package/dist/ui/container.js.map +1 -0
- package/dist/ui/date-time-input.d.ts +17 -0
- package/dist/ui/date-time-input.js +59 -0
- package/dist/ui/date-time-input.js.map +1 -0
- package/dist/ui/index.d.ts +9 -0
- package/dist/ui/index.js +26 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/profile-details.d.ts +3 -0
- package/dist/ui/profile-details.js +16 -0
- package/dist/ui/profile-details.js.map +1 -0
- package/dist/ui/stock-button.d.ts +20 -0
- package/dist/ui/stock-button.js +131 -0
- package/dist/ui/stock-button.js.map +1 -0
- package/dist/ui/text-block.d.ts +9 -0
- package/dist/ui/text-block.js +24 -0
- package/dist/ui/text-block.js.map +1 -0
- package/dist/ui/ui-builder-context.d.ts +7 -0
- package/dist/ui/ui-builder-context.js +3 -0
- package/dist/ui/ui-builder-context.js.map +1 -0
- package/dist/utils/action-utils.d.ts +5 -0
- package/dist/utils/action-utils.js +29 -0
- package/dist/utils/action-utils.js.map +1 -0
- package/dist/utils/card-bridge.d.ts +7 -0
- package/dist/utils/card-bridge.js +30 -0
- package/dist/utils/card-bridge.js.map +1 -0
- package/dist/utils/context-utils.d.ts +3 -0
- package/dist/utils/context-utils.js +21 -0
- package/dist/utils/context-utils.js.map +1 -0
- package/dist/utils/dateUtils.d.ts +10 -0
- package/dist/utils/dateUtils.js +88 -0
- package/dist/utils/dateUtils.js.map +1 -0
- package/dist/utils/encryption.d.ts +10 -0
- package/dist/utils/encryption.js +70 -0
- package/dist/utils/encryption.js.map +1 -0
- package/dist/utils/endpointUtils.d.ts +2 -0
- package/dist/utils/endpointUtils.js +7 -0
- package/dist/utils/endpointUtils.js.map +1 -0
- package/dist/utils/envUtils.d.ts +1 -0
- package/dist/utils/envUtils.js +7 -0
- package/dist/utils/envUtils.js.map +1 -0
- package/dist/utils/errorUtils.d.ts +6 -0
- package/dist/utils/errorUtils.js +51 -0
- package/dist/utils/errorUtils.js.map +1 -0
- package/dist/utils/header-utils.d.ts +9 -0
- package/dist/utils/header-utils.js +24 -0
- package/dist/utils/header-utils.js.map +1 -0
- package/dist/utils/index.d.ts +13 -0
- package/dist/utils/index.js +30 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/logger.d.ts +10 -0
- package/dist/utils/logger.js +50 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/paginationDataUtils.d.ts +6 -0
- package/dist/utils/paginationDataUtils.js +52 -0
- package/dist/utils/paginationDataUtils.js.map +1 -0
- package/dist/utils/urlUtils.d.ts +2 -0
- package/dist/utils/urlUtils.js +20 -0
- package/dist/utils/urlUtils.js.map +1 -0
- package/dist/utils/validationUtils.d.ts +3 -0
- package/dist/utils/validationUtils.js +22 -0
- package/dist/utils/validationUtils.js.map +1 -0
- package/package.json +63 -5
- package/views/authDetails.hbs +97 -0
- package/views/partials/errorBody.hbs +7 -0
- package/views/partials/errorTitle.hbs +1 -0
- package/views/partials/successBody.hbs +2 -0
- package/views/partials/successTitle.hbs +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/types/auth.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type BackButtonBehavior = 'LastPage' | 'PreviousPage';
|
|
2
|
+
export type PaginationData = {
|
|
3
|
+
previousPageTokens?: string[];
|
|
4
|
+
nextPageToken?: string;
|
|
5
|
+
pageNumber: number;
|
|
6
|
+
totalPageCount?: number;
|
|
7
|
+
};
|
|
8
|
+
export declare enum PaginationCardData {
|
|
9
|
+
PreviousPageTokens = "previousPageTokens",
|
|
10
|
+
NextPageToken = "nextPageToken",
|
|
11
|
+
PageNumber = "pageNumber"
|
|
12
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PaginationCardData = void 0;
|
|
4
|
+
var PaginationCardData;
|
|
5
|
+
(function (PaginationCardData) {
|
|
6
|
+
PaginationCardData["PreviousPageTokens"] = "previousPageTokens";
|
|
7
|
+
PaginationCardData["NextPageToken"] = "nextPageToken";
|
|
8
|
+
PaginationCardData["PageNumber"] = "pageNumber";
|
|
9
|
+
})(PaginationCardData || (exports.PaginationCardData = PaginationCardData = {}));
|
|
10
|
+
//# sourceMappingURL=data.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data.js","sourceRoot":"","sources":["../../src/types/data.ts"],"names":[],"mappings":";;;AA2CA,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC1B,+DAAyC,CAAA;IACzC,qDAA+B,CAAA;IAC/B,+CAAyB,CAAA;AAC7B,CAAC,EAJW,kBAAkB,kCAAlB,kBAAkB,QAI7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type Endpoints = 'process' | 'settings';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"endpoints.js","sourceRoot":"","sources":["../../src/types/endpoints.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { RetryRequest } from './retry';
|
|
2
|
+
export type ErrorCardOptions = {
|
|
3
|
+
retryRequest?: RetryRequest;
|
|
4
|
+
errorId?: string;
|
|
5
|
+
helpCenterLink?: string;
|
|
6
|
+
showSignout?: boolean;
|
|
7
|
+
showGoHome?: boolean;
|
|
8
|
+
errorMessage?: string;
|
|
9
|
+
exceptionMessage?: string;
|
|
10
|
+
maximumDoistCardVersion?: number;
|
|
11
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-card-options.js","sourceRoot":"","sources":["../../src/types/error-card-options.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.authErrorMessageMap = void 0;
|
|
4
|
+
exports.authErrorMessageMap = new Map([
|
|
5
|
+
['CODE', 'Code parameter cannot be empty'],
|
|
6
|
+
['STATE', 'State parameter cannot be empty'],
|
|
7
|
+
['UNKNOWNSTATE', 'Unknown state, cannot be paired to a user id'],
|
|
8
|
+
['STATEEXPIRED', 'State has expired'],
|
|
9
|
+
['CSRFDETECTED', 'OAuth CSRF attack detected: user identity mismatch'],
|
|
10
|
+
['UNKNOWNERROR', 'An unknown error occurred during authentication'],
|
|
11
|
+
]);
|
|
12
|
+
//# sourceMappingURL=error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error.js","sourceRoot":"","sources":["../../src/types/error.ts"],"names":[],"mappings":";;;AAOa,QAAA,mBAAmB,GAA+B,IAAI,GAAG,CAAC;IACnE,CAAC,MAAM,EAAE,gCAAgC,CAAC;IAC1C,CAAC,OAAO,EAAE,iCAAiC,CAAC;IAC5C,CAAC,cAAc,EAAE,8CAA8C,CAAC;IAChE,CAAC,cAAc,EAAE,mBAAmB,CAAC;IACrC,CAAC,cAAc,EAAE,oDAAoD,CAAC;IACtE,CAAC,cAAc,EAAE,iDAAiD,CAAC;CACtE,CAAC,CAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./auth"), exports);
|
|
18
|
+
__exportStar(require("./data"), exports);
|
|
19
|
+
__exportStar(require("./endpoints"), exports);
|
|
20
|
+
__exportStar(require("./error"), exports);
|
|
21
|
+
__exportStar(require("./error-card-options"), exports);
|
|
22
|
+
__exportStar(require("./logging"), exports);
|
|
23
|
+
__exportStar(require("./retry"), exports);
|
|
24
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAsB;AACtB,yCAAsB;AACtB,8CAA2B;AAC3B,0CAAuB;AACvB,uDAAoC;AACpC,4CAAyB;AACzB,0CAAuB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type CustomLoggingCategory = 'GENERAL' | 'ANALYTICS' | 'REQUEST_DEBUG';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logging.js","sourceRoot":"","sources":["../../src/types/logging.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type DoistProduct = 'twist' | 'todoist';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"product.js","sourceRoot":"","sources":["../../src/types/product.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { TodoistCardAction } from '@todoist/ui-extensions-core';
|
|
2
|
+
export declare const ORIGINAL_DATA = "originalData";
|
|
3
|
+
export declare enum RetryAttributes {
|
|
4
|
+
ACTION_TYPE = "actionType",
|
|
5
|
+
COMMAND = "command",
|
|
6
|
+
ORIGINAL_DATA = "originalData",
|
|
7
|
+
ORIGINAL_INPUTS = "originalInputs"
|
|
8
|
+
}
|
|
9
|
+
export type RetryRequest = {
|
|
10
|
+
retryAction: TodoistCardAction;
|
|
11
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RetryAttributes = exports.ORIGINAL_DATA = void 0;
|
|
4
|
+
exports.ORIGINAL_DATA = 'originalData';
|
|
5
|
+
var RetryAttributes;
|
|
6
|
+
(function (RetryAttributes) {
|
|
7
|
+
RetryAttributes["ACTION_TYPE"] = "actionType";
|
|
8
|
+
RetryAttributes["COMMAND"] = "command";
|
|
9
|
+
RetryAttributes["ORIGINAL_DATA"] = "originalData";
|
|
10
|
+
RetryAttributes["ORIGINAL_INPUTS"] = "originalInputs";
|
|
11
|
+
})(RetryAttributes || (exports.RetryAttributes = RetryAttributes = {}));
|
|
12
|
+
//# sourceMappingURL=retry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retry.js","sourceRoot":"","sources":["../../src/types/retry.ts"],"names":[],"mappings":";;;AAEa,QAAA,aAAa,GAAG,cAAc,CAAA;AAE3C,IAAY,eAKX;AALD,WAAY,eAAe;IACvB,6CAA0B,CAAA;IAC1B,sCAAmB,CAAA;IACnB,iDAA8B,CAAA;IAC9B,qDAAkC,CAAA;AACtC,CAAC,EALW,eAAe,+BAAf,eAAe,QAK1B"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CardElement, SubmitAction } from '@todoist/ui-extensions-core';
|
|
2
|
+
import type { UIBuilderContext } from './ui-builder-context';
|
|
3
|
+
export declare enum Items {
|
|
4
|
+
BackImage = "BackImage"
|
|
5
|
+
}
|
|
6
|
+
export declare function createBackAction(context: UIBuilderContext, pageNumber?: number, createBackButtonData?: () => Record<string, unknown>, actionId?: string): SubmitAction;
|
|
7
|
+
export declare function createBackImageButton(context: UIBuilderContext, pageNumber?: number, createBackButtonData?: () => Record<string, unknown>, actionId?: string): CardElement;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Items = void 0;
|
|
4
|
+
exports.createBackAction = createBackAction;
|
|
5
|
+
exports.createBackImageButton = createBackImageButton;
|
|
6
|
+
const ui_extensions_core_1 = require("@todoist/ui-extensions-core");
|
|
7
|
+
const constants_1 = require("../constants");
|
|
8
|
+
const _1 = require(".");
|
|
9
|
+
var Items;
|
|
10
|
+
(function (Items) {
|
|
11
|
+
Items["BackImage"] = "BackImage";
|
|
12
|
+
})(Items || (exports.Items = Items = {}));
|
|
13
|
+
function createBackAction(context, pageNumber, createBackButtonData, actionId) {
|
|
14
|
+
const backButton = new ui_extensions_core_1.SubmitAction();
|
|
15
|
+
backButton.associatedInputs = 'none';
|
|
16
|
+
backButton.title = context.translationService.getTranslation(constants_1.Core.GO_BACK);
|
|
17
|
+
backButton.data = createBackButtonData === null || createBackButtonData === void 0 ? void 0 : createBackButtonData();
|
|
18
|
+
backButton.id = actionId
|
|
19
|
+
? actionId
|
|
20
|
+
: pageNumber === undefined || pageNumber <= 1
|
|
21
|
+
? constants_1.CardActions.GoHome
|
|
22
|
+
: constants_1.CardActions.Previous;
|
|
23
|
+
return backButton;
|
|
24
|
+
}
|
|
25
|
+
function createBackImageButton(context, pageNumber, createBackButtonData, actionId) {
|
|
26
|
+
return (0, _1.createIconImage)(context, {
|
|
27
|
+
selectAction: createBackAction(context, pageNumber, createBackButtonData, actionId),
|
|
28
|
+
imagePath: constants_1.BACK_IMAGE,
|
|
29
|
+
altText: context.translationService.getTranslation(constants_1.Core.BACK),
|
|
30
|
+
imageId: Items.BackImage,
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=back-button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"back-button.js","sourceRoot":"","sources":["../../src/ui/back-button.ts"],"names":[],"mappings":";;;AAYA,4CAiBC;AAED,sDAYC;AA3CD,oEAAuE;AAEvE,4CAA4D;AAE5D,wBAAmC;AAInC,IAAY,KAEX;AAFD,WAAY,KAAK;IACb,gCAAuB,CAAA;AAC3B,CAAC,EAFW,KAAK,qBAAL,KAAK,QAEhB;AAED,SAAgB,gBAAgB,CAC5B,OAAyB,EACzB,UAAmB,EACnB,oBAAoD,EACpD,QAAiB;IAEjB,MAAM,UAAU,GAAG,IAAI,iCAAY,EAAE,CAAA;IACrC,UAAU,CAAC,gBAAgB,GAAG,MAAM,CAAA;IACpC,UAAU,CAAC,KAAK,GAAG,OAAO,CAAC,kBAAkB,CAAC,cAAc,CAAC,gBAAI,CAAC,OAAO,CAAC,CAAA;IAC1E,UAAU,CAAC,IAAI,GAAG,oBAAoB,aAApB,oBAAoB,uBAApB,oBAAoB,EAAI,CAAA;IAC1C,UAAU,CAAC,EAAE,GAAG,QAAQ;QACpB,CAAC,CAAC,QAAQ;QACV,CAAC,CAAC,UAAU,KAAK,SAAS,IAAI,UAAU,IAAI,CAAC;YAC3C,CAAC,CAAC,uBAAW,CAAC,MAAM;YACpB,CAAC,CAAC,uBAAW,CAAC,QAAQ,CAAA;IAE5B,OAAO,UAAU,CAAA;AACrB,CAAC;AAED,SAAgB,qBAAqB,CACjC,OAAyB,EACzB,UAAmB,EACnB,oBAAoD,EACpD,QAAiB;IAEjB,OAAO,IAAA,kBAAe,EAAC,OAAO,EAAE;QAC5B,YAAY,EAAE,gBAAgB,CAAC,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,QAAQ,CAAC;QACnF,SAAS,EAAE,sBAAU;QACrB,OAAO,EAAE,OAAO,CAAC,kBAAkB,CAAC,cAAc,CAAC,gBAAI,CAAC,IAAI,CAAC;QAC7D,OAAO,EAAE,KAAK,CAAC,SAAS;KAC3B,CAAC,CAAA;AACN,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Action, ActionStyle, AssociatedInputs, Image, SubmitAction } from '@todoist/ui-extensions-core';
|
|
2
|
+
import type { UIBuilderContext } from './ui-builder-context';
|
|
3
|
+
export declare function createButtonSubmitAction({ id, title, data, associatedInputs, style, }: {
|
|
4
|
+
id: string;
|
|
5
|
+
title?: string;
|
|
6
|
+
data?: () => Record<string, unknown>;
|
|
7
|
+
associatedInputs?: AssociatedInputs;
|
|
8
|
+
style?: ActionStyle;
|
|
9
|
+
}): SubmitAction;
|
|
10
|
+
export declare function createIconImage(context: UIBuilderContext, options: {
|
|
11
|
+
imagePath: string;
|
|
12
|
+
imageId?: string;
|
|
13
|
+
selectAction: Action;
|
|
14
|
+
altText?: string;
|
|
15
|
+
}): Image;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createButtonSubmitAction = createButtonSubmitAction;
|
|
4
|
+
exports.createIconImage = createIconImage;
|
|
5
|
+
const ui_extensions_core_1 = require("@todoist/ui-extensions-core");
|
|
6
|
+
const constants_1 = require("../constants");
|
|
7
|
+
function createButtonSubmitAction({ id, title, data, associatedInputs, style, }) {
|
|
8
|
+
const action = new ui_extensions_core_1.SubmitAction();
|
|
9
|
+
action.id = id;
|
|
10
|
+
action.data = data === null || data === void 0 ? void 0 : data();
|
|
11
|
+
action.title = title;
|
|
12
|
+
action.associatedInputs = associatedInputs !== null && associatedInputs !== void 0 ? associatedInputs : 'none';
|
|
13
|
+
action.style = style;
|
|
14
|
+
return action;
|
|
15
|
+
}
|
|
16
|
+
function createIconImage(context, options) {
|
|
17
|
+
const { imagePath, imageId, selectAction, altText } = options;
|
|
18
|
+
const image = new ui_extensions_core_1.Image();
|
|
19
|
+
image.url = context.createThemeBasedUrl(imagePath);
|
|
20
|
+
image.altText = altText;
|
|
21
|
+
image.id = imageId;
|
|
22
|
+
image.pixelWidth = constants_1.ICON_SIZE;
|
|
23
|
+
image.pixelHeight = constants_1.ICON_SIZE;
|
|
24
|
+
image.selectAction = selectAction;
|
|
25
|
+
return image;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../src/ui/button.ts"],"names":[],"mappings":";;AAYA,4DAoBC;AAED,0CAqBC;AAvDD,oEAMoC;AAEpC,4CAAwC;AAIxC,SAAgB,wBAAwB,CAAC,EACrC,EAAE,EACF,KAAK,EACL,IAAI,EACJ,gBAAgB,EAChB,KAAK,GAOR;IACG,MAAM,MAAM,GAAG,IAAI,iCAAY,EAAE,CAAA;IACjC,MAAM,CAAC,EAAE,GAAG,EAAE,CAAA;IACd,MAAM,CAAC,IAAI,GAAG,IAAI,aAAJ,IAAI,uBAAJ,IAAI,EAAI,CAAA;IACtB,MAAM,CAAC,KAAK,GAAG,KAAK,CAAA;IACpB,MAAM,CAAC,gBAAgB,GAAG,gBAAgB,aAAhB,gBAAgB,cAAhB,gBAAgB,GAAI,MAAM,CAAA;IACpD,MAAM,CAAC,KAAK,GAAG,KAAK,CAAA;IACpB,OAAO,MAAM,CAAA;AACjB,CAAC;AAED,SAAgB,eAAe,CAC3B,OAAyB,EACzB,OAKC;IAED,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,GAAG,OAAO,CAAA;IAE7D,MAAM,KAAK,GAAG,IAAI,0BAAK,EAAE,CAAA;IACzB,KAAK,CAAC,GAAG,GAAG,OAAO,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAA;IAClD,KAAK,CAAC,OAAO,GAAG,OAAO,CAAA;IACvB,KAAK,CAAC,EAAE,GAAG,OAAO,CAAA;IAClB,KAAK,CAAC,UAAU,GAAG,qBAAS,CAAA;IAC5B,KAAK,CAAC,WAAW,GAAG,qBAAS,CAAA;IAE7B,KAAK,CAAC,YAAY,GAAG,YAAY,CAAA;IAEjC,OAAO,KAAK,CAAA;AAChB,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Props } from '@todoist/ui-extensions-core';
|
|
2
|
+
import { CardElement, Column, ColumnSet } from '@todoist/ui-extensions-core';
|
|
3
|
+
export declare function autoColumn(items: CardElement[], columnOptions?: Props<Column>): Column;
|
|
4
|
+
export declare function autoColumnSet(items: CardElement[], columnOptions?: Props<Column>): ColumnSet;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.autoColumn = autoColumn;
|
|
4
|
+
exports.autoColumnSet = autoColumnSet;
|
|
5
|
+
const ui_extensions_core_1 = require("@todoist/ui-extensions-core");
|
|
6
|
+
function autoColumn(items, columnOptions) {
|
|
7
|
+
const column = ui_extensions_core_1.Column.from({
|
|
8
|
+
width: 'auto',
|
|
9
|
+
...columnOptions,
|
|
10
|
+
});
|
|
11
|
+
items.forEach((item) => {
|
|
12
|
+
column.addItem(item);
|
|
13
|
+
});
|
|
14
|
+
return column;
|
|
15
|
+
}
|
|
16
|
+
function autoColumnSet(items, columnOptions) {
|
|
17
|
+
const columnSet = new ui_extensions_core_1.ColumnSet();
|
|
18
|
+
items.forEach((item) => {
|
|
19
|
+
columnSet.addColumn(autoColumn([item], columnOptions));
|
|
20
|
+
});
|
|
21
|
+
return columnSet;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=column.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"column.js","sourceRoot":"","sources":["../../src/ui/column.ts"],"names":[],"mappings":";;AAGA,gCAUC;AAED,sCAMC;AApBD,oEAA4E;AAE5E,SAAgB,UAAU,CAAC,KAAoB,EAAE,aAA6B;IAC1E,MAAM,MAAM,GAAG,2BAAM,CAAC,IAAI,CAAC;QACvB,KAAK,EAAE,MAAM;QACb,GAAG,aAAa;KACnB,CAAC,CAAA;IAEF,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QACnB,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;IACxB,CAAC,CAAC,CAAA;IACF,OAAO,MAAM,CAAA;AACjB,CAAC;AAED,SAAgB,aAAa,CAAC,KAAoB,EAAE,aAA6B;IAC7E,MAAM,SAAS,GAAG,IAAI,8BAAS,EAAE,CAAA;IACjC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QACnB,SAAS,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,EAAE,aAAa,CAAC,CAAC,CAAA;IAC1D,CAAC,CAAC,CAAA;IACF,OAAO,SAAS,CAAA;AACpB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CardElement, Column, HorizontalAlignment, Spacing } from '@todoist/ui-extensions-core';
|
|
2
|
+
export declare function columnSet(item: CardElement, options?: {
|
|
3
|
+
horizontalAlignment?: HorizontalAlignment;
|
|
4
|
+
spacing?: Spacing;
|
|
5
|
+
columnsBefore?: Column[];
|
|
6
|
+
}): CardElement;
|
|
7
|
+
export declare function pageActions(item: CardElement, options?: {
|
|
8
|
+
columnsBefore?: Column[];
|
|
9
|
+
horizontalAlignment?: HorizontalAlignment;
|
|
10
|
+
spacing?: Spacing;
|
|
11
|
+
}): CardElement;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.columnSet = columnSet;
|
|
4
|
+
exports.pageActions = pageActions;
|
|
5
|
+
const ui_extensions_core_1 = require("@todoist/ui-extensions-core");
|
|
6
|
+
function columnSet(item, options) {
|
|
7
|
+
const { horizontalAlignment, spacing, columnsBefore } = options !== null && options !== void 0 ? options : {};
|
|
8
|
+
const actionColumn = new ui_extensions_core_1.Column('auto');
|
|
9
|
+
actionColumn.addItem(item);
|
|
10
|
+
const actionColumns = new ui_extensions_core_1.ColumnSet();
|
|
11
|
+
if (horizontalAlignment !== undefined) {
|
|
12
|
+
actionColumns.horizontalAlignment = horizontalAlignment;
|
|
13
|
+
}
|
|
14
|
+
if (spacing !== undefined) {
|
|
15
|
+
actionColumns.spacing = spacing;
|
|
16
|
+
}
|
|
17
|
+
columnsBefore === null || columnsBefore === void 0 ? void 0 : columnsBefore.forEach((column) => {
|
|
18
|
+
actionColumns.addColumn(column);
|
|
19
|
+
});
|
|
20
|
+
actionColumns.addColumn(actionColumn);
|
|
21
|
+
return actionColumns;
|
|
22
|
+
}
|
|
23
|
+
function pageActions(item, options) {
|
|
24
|
+
const { columnsBefore, horizontalAlignment, spacing } = options !== null && options !== void 0 ? options : {};
|
|
25
|
+
return columnSet(item, {
|
|
26
|
+
horizontalAlignment: horizontalAlignment !== null && horizontalAlignment !== void 0 ? horizontalAlignment : 'right',
|
|
27
|
+
spacing: spacing !== null && spacing !== void 0 ? spacing : 'medium',
|
|
28
|
+
columnsBefore,
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=container.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"container.js","sourceRoot":"","sources":["../../src/ui/container.ts"],"names":[],"mappings":";;AAQA,8BA4BC;AAED,kCAeC;AArDD,oEAMoC;AAEpC,SAAgB,SAAS,CACrB,IAAiB,EACjB,OAIC;IAED,MAAM,EAAE,mBAAmB,EAAE,OAAO,EAAE,aAAa,EAAE,GAAG,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,EAAE,CAAA;IAErE,MAAM,YAAY,GAAG,IAAI,2BAAM,CAAC,MAAM,CAAC,CAAA;IACvC,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;IAE1B,MAAM,aAAa,GAAG,IAAI,8BAAS,EAAE,CAAA;IACrC,IAAI,mBAAmB,KAAK,SAAS,EAAE,CAAC;QACpC,aAAa,CAAC,mBAAmB,GAAG,mBAAmB,CAAA;IAC3D,CAAC;IACD,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QACxB,aAAa,CAAC,OAAO,GAAG,OAAO,CAAA;IACnC,CAAC;IAED,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;QAC9B,aAAa,CAAC,SAAS,CAAC,MAAM,CAAC,CAAA;IACnC,CAAC,CAAC,CAAA;IAEF,aAAa,CAAC,SAAS,CAAC,YAAY,CAAC,CAAA;IAErC,OAAO,aAAa,CAAA;AACxB,CAAC;AAED,SAAgB,WAAW,CACvB,IAAiB,EACjB,OAIC;IAED,MAAM,EAAE,aAAa,EAAE,mBAAmB,EAAE,OAAO,EAAE,GAAG,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,EAAE,CAAA;IAErE,OAAO,SAAS,CAAC,IAAI,EAAE;QACnB,mBAAmB,EAAE,mBAAmB,aAAnB,mBAAmB,cAAnB,mBAAmB,GAAI,OAAO;QACnD,OAAO,EAAE,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,QAAQ;QAC5B,aAAa;KAChB,CAAC,CAAA;AACN,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DateInput, TimeInput } from '@todoist/ui-extensions-core';
|
|
2
|
+
type DateTimeInputOptions = {
|
|
3
|
+
id: string;
|
|
4
|
+
timezone: string;
|
|
5
|
+
defaultToToday?: boolean;
|
|
6
|
+
min?: Date;
|
|
7
|
+
max?: Date;
|
|
8
|
+
isRequired?: boolean;
|
|
9
|
+
label?: string;
|
|
10
|
+
errorMessage?: string;
|
|
11
|
+
defaultToNow?: boolean;
|
|
12
|
+
defaultDate?: Date | string;
|
|
13
|
+
defaultTime?: Date | string;
|
|
14
|
+
};
|
|
15
|
+
export declare function createDateInput(options?: DateTimeInputOptions): DateInput;
|
|
16
|
+
export declare function createTimeInput(options?: DateTimeInputOptions): TimeInput;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createDateInput = createDateInput;
|
|
4
|
+
exports.createTimeInput = createTimeInput;
|
|
5
|
+
const ui_extensions_core_1 = require("@todoist/ui-extensions-core");
|
|
6
|
+
const dateUtils_1 = require("../utils/dateUtils");
|
|
7
|
+
const DATE_FORMAT = 'YYYY-MM-DD';
|
|
8
|
+
const TIME_FORMAT = 'HH:mm';
|
|
9
|
+
function createDateInput(options) {
|
|
10
|
+
const input = new ui_extensions_core_1.DateInput();
|
|
11
|
+
if (options) {
|
|
12
|
+
const { min, max, id, isRequired, label, errorMessage, defaultToToday, defaultDate, timezone, } = options;
|
|
13
|
+
input.id = id;
|
|
14
|
+
if (min)
|
|
15
|
+
input.min = (0, dateUtils_1.getDayjs)(min, false, timezone).format(DATE_FORMAT);
|
|
16
|
+
if (max)
|
|
17
|
+
input.max = (0, dateUtils_1.getDayjs)(max, false, timezone).format(DATE_FORMAT);
|
|
18
|
+
if (isRequired)
|
|
19
|
+
input.isRequired = isRequired;
|
|
20
|
+
if (label)
|
|
21
|
+
input.label = label;
|
|
22
|
+
if (errorMessage)
|
|
23
|
+
input.errorMessage = errorMessage;
|
|
24
|
+
if (defaultToToday && !defaultDate)
|
|
25
|
+
input.defaultValue = (0, dateUtils_1.getDayjs)().format(DATE_FORMAT);
|
|
26
|
+
if (defaultDate)
|
|
27
|
+
input.defaultValue = (0, dateUtils_1.getDayjs)(defaultDate, false, timezone).format(DATE_FORMAT);
|
|
28
|
+
}
|
|
29
|
+
return input;
|
|
30
|
+
}
|
|
31
|
+
function createTimeInput(options) {
|
|
32
|
+
const input = new ui_extensions_core_1.TimeInput();
|
|
33
|
+
if (options) {
|
|
34
|
+
const { min, max, id, defaultToNow, errorMessage, isRequired, label, defaultTime, timezone, } = options;
|
|
35
|
+
input.id = id;
|
|
36
|
+
if (min)
|
|
37
|
+
input.min = (0, dateUtils_1.getDayjs)(min, false, timezone).format(TIME_FORMAT);
|
|
38
|
+
if (max)
|
|
39
|
+
input.max = (0, dateUtils_1.getDayjs)(max, false, timezone).format(TIME_FORMAT);
|
|
40
|
+
if (isRequired)
|
|
41
|
+
input.isRequired = isRequired;
|
|
42
|
+
if (label)
|
|
43
|
+
input.label = label;
|
|
44
|
+
if (errorMessage)
|
|
45
|
+
input.errorMessage = errorMessage;
|
|
46
|
+
if (defaultToNow && !defaultTime)
|
|
47
|
+
input.defaultValue = (0, dateUtils_1.getDayjs)(undefined, false, timezone).format(TIME_FORMAT);
|
|
48
|
+
if (defaultTime) {
|
|
49
|
+
if (defaultTime instanceof Date) {
|
|
50
|
+
input.defaultValue = (0, dateUtils_1.getDayjs)(defaultTime, false, timezone).format(TIME_FORMAT);
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
input.defaultValue = defaultTime;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return input;
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=date-time-input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-time-input.js","sourceRoot":"","sources":["../../src/ui/date-time-input.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './back-button';
|
|
2
|
+
export * from './button';
|
|
3
|
+
export * from './column';
|
|
4
|
+
export * from './container';
|
|
5
|
+
export * from './date-time-input';
|
|
6
|
+
export * from './profile-details';
|
|
7
|
+
export * from './stock-button';
|
|
8
|
+
export * from './text-block';
|
|
9
|
+
export * from './ui-builder-context';
|
package/dist/ui/index.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./back-button"), exports);
|
|
18
|
+
__exportStar(require("./button"), exports);
|
|
19
|
+
__exportStar(require("./column"), exports);
|
|
20
|
+
__exportStar(require("./container"), exports);
|
|
21
|
+
__exportStar(require("./date-time-input"), exports);
|
|
22
|
+
__exportStar(require("./profile-details"), exports);
|
|
23
|
+
__exportStar(require("./stock-button"), exports);
|
|
24
|
+
__exportStar(require("./text-block"), exports);
|
|
25
|
+
__exportStar(require("./ui-builder-context"), exports);
|
|
26
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA6B;AAC7B,2CAAwB;AACxB,2CAAwB;AACxB,8CAA2B;AAC3B,oDAAiC;AACjC,oDAAiC;AACjC,iDAA8B;AAC9B,+CAA4B;AAC5B,uDAAoC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createProfileDetails = createProfileDetails;
|
|
4
|
+
const integrations_common_1 = require("@todoist/integrations-common");
|
|
5
|
+
const ui_extensions_core_1 = require("@todoist/ui-extensions-core");
|
|
6
|
+
function createProfileDetails(user, detailsWithNameTemplate, detailsWithoutNameTemplate) {
|
|
7
|
+
var _a, _b;
|
|
8
|
+
const text = user.name && user.emailAddress
|
|
9
|
+
? (0, integrations_common_1.formatString)(detailsWithNameTemplate, user.name, user.emailAddress)
|
|
10
|
+
: (0, integrations_common_1.formatString)(detailsWithoutNameTemplate, (_b = (_a = user.emailAddress) !== null && _a !== void 0 ? _a : user.name) !== null && _b !== void 0 ? _b : user.externalUserId);
|
|
11
|
+
const profileDetails = new ui_extensions_core_1.TextBlock(text);
|
|
12
|
+
profileDetails.spacing = 'medium';
|
|
13
|
+
profileDetails.wrap = true;
|
|
14
|
+
return profileDetails;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=profile-details.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile-details.js","sourceRoot":"","sources":["../../src/ui/profile-details.ts"],"names":[],"mappings":";;AAKA,oDAiBC;AAtBD,sEAA2D;AAC3D,oEAAoE;AAIpE,SAAgB,oBAAoB,CAChC,IAAU,EACV,uBAA+B,EAC/B,0BAAkC;;IAElC,MAAM,IAAI,GACN,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,YAAY;QAC1B,CAAC,CAAC,IAAA,kCAAY,EAAC,uBAAuB,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,YAAY,CAAC;QACrE,CAAC,CAAC,IAAA,kCAAY,EACR,0BAA0B,EAC1B,MAAA,MAAA,IAAI,CAAC,YAAY,mCAAI,IAAI,CAAC,IAAI,mCAAI,IAAI,CAAC,cAAc,CACxD,CAAA;IACX,MAAM,cAAc,GAAG,IAAI,8BAAS,CAAC,IAAI,CAAC,CAAA;IAC1C,cAAc,CAAC,OAAO,GAAG,QAAQ,CAAA;IACjC,cAAc,CAAC,IAAI,GAAG,IAAI,CAAA;IAE1B,OAAO,cAAc,CAAA;AACzB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Action, CardElement, HorizontalAlignment, Image, TextColor } from '@todoist/ui-extensions-core';
|
|
2
|
+
import type { UIBuilderContext } from './ui-builder-context';
|
|
3
|
+
export declare const NEXT_ACTIONSET_ID = "NextActions";
|
|
4
|
+
export declare function createSignOutButton(context: UIBuilderContext, options?: {
|
|
5
|
+
horizontalAlignment: HorizontalAlignment;
|
|
6
|
+
}): CardElement;
|
|
7
|
+
export declare function createCloseButton(context: UIBuilderContext): Image;
|
|
8
|
+
export declare function createPlusButton(context: UIBuilderContext, id: string, data?: () => Record<string, unknown>, title?: string): Image;
|
|
9
|
+
export declare function createSettingsButton(context: UIBuilderContext, data?: () => Record<string, unknown>): Image;
|
|
10
|
+
export declare function createFeedbackButton(context: UIBuilderContext, targetUrl: string): Image;
|
|
11
|
+
export declare function createShareButton(context: UIBuilderContext, id: string, data: () => Record<string, unknown>, title?: string, textColor?: TextColor, isSubtle?: boolean, imagePath?: string): CardElement;
|
|
12
|
+
export declare function createEditButton(context: UIBuilderContext, request: {
|
|
13
|
+
id: string;
|
|
14
|
+
data?: () => Record<string, unknown>;
|
|
15
|
+
}): CardElement;
|
|
16
|
+
export declare function createOpenButton(context: UIBuilderContext, url: string): CardElement;
|
|
17
|
+
export declare function createLearnMoreButton(context: UIBuilderContext, url: string): CardElement;
|
|
18
|
+
export declare function createNewItemButton(context: UIBuilderContext, id: string, newItemData?: () => Record<string, unknown>, title?: string): CardElement;
|
|
19
|
+
export declare function createNextButton(context: UIBuilderContext, data: () => Record<string, unknown>): Action;
|
|
20
|
+
export declare function createLoadMoreButton(context: UIBuilderContext, data: () => Record<string, unknown>): CardElement;
|