@spscommerce/ds-shared 3.12.2 → 3.15.3
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/button.d.ts +0 -2
- package/lib/datetime.d.ts +1 -1
- package/lib/examples.d.ts +28 -10
- package/lib/feedback.d.ts +6 -6
- package/lib/growler.d.ts +1 -1
- package/lib/index.cjs.js +40 -39
- package/lib/index.d.ts +25 -25
- package/lib/index.esm.js +40 -39
- package/lib/insight-card.d.ts +6 -6
- package/lib/option-list.d.ts +12 -9
- package/lib/sps-action.d.ts +1 -1
- package/lib/tabs.d.ts +1 -1
- package/lib/task-queue.d.ts +6 -6
- package/lib/translations.d.ts +99 -98
- package/package.json +5 -4
- package/rollup.config.js +24 -0
package/lib/button.d.ts
CHANGED
|
@@ -12,7 +12,6 @@ declare enum ButtonKindLink {
|
|
|
12
12
|
}
|
|
13
13
|
export declare type DropdownKind = StdButtonKind | ButtonKindIcon;
|
|
14
14
|
export declare const DropdownKind: Readonly<{
|
|
15
|
-
[x: number]: string;
|
|
16
15
|
ICON: ButtonKindIcon.ICON;
|
|
17
16
|
DEFAULT: StdButtonKind.DEFAULT;
|
|
18
17
|
CONFIRM: StdButtonKind.CONFIRM;
|
|
@@ -21,7 +20,6 @@ export declare const DropdownKind: Readonly<{
|
|
|
21
20
|
}>;
|
|
22
21
|
export declare type ButtonKind = StdButtonKind | ButtonKindIcon | ButtonKindLink;
|
|
23
22
|
export declare const ButtonKind: Readonly<{
|
|
24
|
-
[x: number]: string;
|
|
25
23
|
LINK: ButtonKindLink.LINK;
|
|
26
24
|
ICON: ButtonKindIcon.ICON;
|
|
27
25
|
DEFAULT: StdButtonKind.DEFAULT;
|
package/lib/datetime.d.ts
CHANGED
package/lib/examples.d.ts
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
export declare type ExtraExampleRendererArgs = {
|
|
3
|
+
naviagateTo: (selection: string) => void;
|
|
4
|
+
NavigateTo: (props: {
|
|
5
|
+
to: string;
|
|
6
|
+
children: ReactElement | string;
|
|
7
|
+
slugPrefix?: string;
|
|
8
|
+
}) => ReactElement;
|
|
9
|
+
Link: (props: {
|
|
10
|
+
to: string;
|
|
11
|
+
children: ReactElement | string;
|
|
12
|
+
}) => ReactElement;
|
|
13
|
+
};
|
|
14
|
+
declare type ReactChildOrRenderer = ReactElement | string | ((args: ExtraExampleRendererArgs) => ReactElement | string);
|
|
1
15
|
export interface DSExampleBase {
|
|
2
|
-
description?:
|
|
16
|
+
description?: ReactChildOrRenderer;
|
|
3
17
|
}
|
|
4
18
|
export interface DSReactExampleJSX {
|
|
5
19
|
jsx: string;
|
|
@@ -8,17 +22,14 @@ export interface DSReactExampleComponent {
|
|
|
8
22
|
react: string;
|
|
9
23
|
}
|
|
10
24
|
export declare type DSReactExample = DSExampleBase & (DSReactExampleComponent | DSReactExampleJSX);
|
|
11
|
-
export
|
|
12
|
-
template: string;
|
|
13
|
-
class?: string;
|
|
14
|
-
}
|
|
15
|
-
export declare type DSExample = DSReactExample | DSAngularExample;
|
|
25
|
+
export declare type DSExample = DSReactExample;
|
|
16
26
|
export declare function exampleIsReactComponentExample(example: DSExample): example is DSReactExampleComponent;
|
|
17
27
|
export declare function exampleIsReactJSXExample(example: DSExample): example is DSReactExampleJSX;
|
|
18
28
|
export interface DSExamplesTab<T extends DSExample = DSExample> {
|
|
19
|
-
label?:
|
|
20
|
-
description?:
|
|
21
|
-
|
|
29
|
+
label?: ReactChildOrRenderer;
|
|
30
|
+
description?: ReactChildOrRenderer;
|
|
31
|
+
customSection?: ReactChildOrRenderer;
|
|
32
|
+
examples?: {
|
|
22
33
|
[key: string]: T;
|
|
23
34
|
};
|
|
24
35
|
}
|
|
@@ -26,4 +37,11 @@ export interface DSExamples<T extends DSExample = DSExample> {
|
|
|
26
37
|
[key: string]: DSExamplesTab<T>;
|
|
27
38
|
}
|
|
28
39
|
export declare type DSReactExamples = DSExamples<DSReactExample>;
|
|
29
|
-
export
|
|
40
|
+
export interface ComponentManifest {
|
|
41
|
+
[key: string]: {
|
|
42
|
+
description?: ReactChildOrRenderer;
|
|
43
|
+
components: Array<any>;
|
|
44
|
+
examples: DSReactExamples;
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
export {};
|
package/lib/feedback.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SpsIcon } from
|
|
1
|
+
import { SpsIcon } from './icon';
|
|
2
2
|
export declare enum FeedbackBlockKind {
|
|
3
3
|
TIP = "tip",
|
|
4
4
|
SUCCESS = "success",
|
|
@@ -7,9 +7,9 @@ export declare enum FeedbackBlockKind {
|
|
|
7
7
|
INFO = "info"
|
|
8
8
|
}
|
|
9
9
|
export declare const FeedbackBlockIcons: Readonly<{
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
tip: SpsIcon;
|
|
11
|
+
error: SpsIcon;
|
|
12
|
+
info: SpsIcon;
|
|
13
|
+
success: SpsIcon;
|
|
14
|
+
warning: SpsIcon;
|
|
15
15
|
}>;
|
package/lib/growler.d.ts
CHANGED
package/lib/index.cjs.js
CHANGED
|
@@ -45,8 +45,10 @@ var ButtonKindLink;
|
|
|
45
45
|
(function (ButtonKindLink) {
|
|
46
46
|
ButtonKindLink["LINK"] = "link";
|
|
47
47
|
})(ButtonKindLink || (ButtonKindLink = {}));
|
|
48
|
-
|
|
49
|
-
var
|
|
48
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
49
|
+
var DropdownKind = Object.freeze(__assign(__assign({}, exports.StdButtonKind), ButtonKindIcon));
|
|
50
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
51
|
+
var ButtonKind = Object.freeze(__assign(__assign(__assign({}, exports.StdButtonKind), ButtonKindIcon), ButtonKindLink));
|
|
50
52
|
exports.ButtonType = void 0;
|
|
51
53
|
(function (ButtonType) {
|
|
52
54
|
ButtonType["BUTTON"] = "button";
|
|
@@ -66,10 +68,10 @@ exports.ClickableTagKind = void 0;
|
|
|
66
68
|
})(exports.ClickableTagKind || (exports.ClickableTagKind = {}));
|
|
67
69
|
|
|
68
70
|
function exampleIsReactComponentExample(example) {
|
|
69
|
-
return
|
|
71
|
+
return Object.prototype.hasOwnProperty.call(example, 'react');
|
|
70
72
|
}
|
|
71
73
|
function exampleIsReactJSXExample(example) {
|
|
72
|
-
return
|
|
74
|
+
return Object.prototype.hasOwnProperty.call(example, 'jsx');
|
|
73
75
|
}
|
|
74
76
|
|
|
75
77
|
exports.SpsIconSize = void 0;
|
|
@@ -294,14 +296,14 @@ var GrowlerIcon = new Map([
|
|
|
294
296
|
[exports.GrowlerKind.INFO, exports.SpsIcon.INFO_CIRCLE],
|
|
295
297
|
[exports.GrowlerKind.WARNING, exports.SpsIcon.EXCLAMATION_TRIANGLE],
|
|
296
298
|
[exports.GrowlerKind.ERROR, exports.SpsIcon.EXCLAMATION_CIRCLE],
|
|
297
|
-
[exports.GrowlerKind.SUCCESS, exports.SpsIcon.CHECKMARK]
|
|
299
|
+
[exports.GrowlerKind.SUCCESS, exports.SpsIcon.CHECKMARK],
|
|
298
300
|
]);
|
|
299
301
|
|
|
300
|
-
var translations = { "advancedSearch": { "clear": "Clear", "search": "Search" }, "button": { "spinningTitle": "Loading…" }, "columnChooser": { "removeButton": "Remove {{elementName}}" }, "contentRow": { "collapse": "Collapse", "expand": "Expand" }, "datepicker": { "calendar": { "prevMonth": "View Previous Month", "nextMonth": "View Next Month" }, "preset": { "custom": "Custom", "today": "Today", "sevenDays": "Last 7 days", "thirtyDays": "Last 30 days", "sixtyDays": "Last 60 days", "ninetyDays": "Last 90 days", "oneYear": "Last year" }, "presetsLabel": "Ranges" }, "fileUpload": { "acceptedTypes": "{{fileTypes}} format accepted", "acceptedTypes_plural": "{{fileTypes}} formats accepted", "cancelled": "File Upload Failed", "cancelled_plural": "File Upload(s) Failed", "close": "Close", "instructions": "Drag and drop your file here or |browse for a file| on your desktop.", "instructions_plural": "Drag and drop your files here or |browse for files| on your desktop.", "maximumSize": "{{size}} maximum", "processing": "Processing Upload…", "title": "Upload Your {{description}}" }, "focusedTask": { "close": "Close" }, "growler": { "dismiss": "Dismiss" }, "insightCard": { "all": "ALL", "partnerCount": "{{count}} |of| {{total}}", "partners": "PARTNERS" }, "label": { "errors": { "dateConstraint": { "max": "Please enter a date on or prior to {{context.maxExceeded}}.", "min": "Please enter a date on or after {{context.minExceeded}}." }, "dateFormat": "Please enter a date in the format {{context}}.", "dateRangeOrder": "End date cannot be before start date.", "dateValidity": "Please enter a valid date.", "max": "Please enter a value no greater than {{context}}.", "maxLength": "Please enter no more than {{context}} characters.", "min": "Please enter a value no less than {{context}}.", "minLength": "Please enter at least {{context}} characters.", "required": "This field is required." }, "stronglySuggested": "This field is strongly suggested." }, "listActionBar": { "clearSelected": "Clear Selected", "itemsSelected": "Items Selected" }, "listToolbar": { "advancedSearchToggle": "Advanced Search" }, "modal": { "defaultButtonLabel": "Okay", "defaultTitle": { "general": "Action", "info": "Info", "success": "Success", "warning": "Warning", "serious-warning": "Warning" } }, "pagination": { "nextPage": "Next Page", "ofMany": "of many", "ofPageCount": "of {{pageCount}}", "page": "Page", "prevPage": "Previous Page" }, "progressBar": { "closeButtonTitle": "Close progress bar" }, "searchResultsBar": { "clear": "Clear", "count": "{{count}} of {{total}}", "matchingResults": "Matching results" }, "select": { "defaultPlaceholder": "Select one…" }, "slackLink": { "label": "Chat" }, "spinner": { "defaultAltText": "Loading…" }, "taskQueue": { "clearCompleted": "Clear Completed", "newTask": "You have a new task in your queue.", "noTasks": "There are currently no tasks in your queue." } };
|
|
302
|
+
var translations = { "advancedSearch": { "clear": "Clear", "search": "Search" }, "button": { "spinningTitle": "Loading…" }, "columnChooser": { "removeButton": "Remove {{elementName}}" }, "contentRow": { "collapse": "Collapse", "expand": "Expand" }, "datepicker": { "calendar": { "prevMonth": "View Previous Month", "nextMonth": "View Next Month" }, "preset": { "custom": "Custom", "today": "Today", "sevenDays": "Last 7 days", "thirtyDays": "Last 30 days", "sixtyDays": "Last 60 days", "ninetyDays": "Last 90 days", "oneYear": "Last year" }, "presetsLabel": "Ranges" }, "fileUpload": { "acceptedTypes": "{{fileTypes}} format accepted", "acceptedTypes_plural": "{{fileTypes}} formats accepted", "cancelled": "File Upload Failed", "cancelled_plural": "File Upload(s) Failed", "close": "Close", "instructions": "Drag and drop your file here or |browse for a file| on your desktop.", "instructions_plural": "Drag and drop your files here or |browse for files| on your desktop.", "maximumSize": "{{size}} maximum", "processing": "Processing Upload…", "title": "Upload Your {{description}}" }, "focusedTask": { "close": "Close" }, "growler": { "dismiss": "Dismiss" }, "insightCard": { "all": "ALL", "partnerCount": "{{count}} |of| {{total}}", "partners": "PARTNERS" }, "label": { "errors": { "dateConstraint": { "max": "Please enter a date on or prior to {{context.maxExceeded}}.", "min": "Please enter a date on or after {{context.minExceeded}}." }, "dateFormat": "Please enter a date in the format {{context}}.", "dateRangeOrder": "End date cannot be before start date.", "dateValidity": "Please enter a valid date.", "max": "Please enter a value no greater than {{context}}.", "maxLength": "Please enter no more than {{context}} characters.", "min": "Please enter a value no less than {{context}}.", "minLength": "Please enter at least {{context}} characters.", "required": "This field is required." }, "stronglySuggested": "This field is strongly suggested." }, "listActionBar": { "clearSelected": "Clear Selected", "itemsSelected": "Items Selected" }, "listToolbar": { "advancedSearchToggle": "Advanced Search" }, "modal": { "close": "Close modal", "defaultButtonLabel": "Okay", "defaultTitle": { "general": "Action", "info": "Info", "success": "Success", "warning": "Warning", "serious-warning": "Warning" } }, "pagination": { "nextPage": "Next Page", "ofMany": "of many", "ofPageCount": "of {{pageCount}}", "page": "Page", "prevPage": "Previous Page" }, "progressBar": { "closeButtonTitle": "Close progress bar" }, "searchResultsBar": { "clear": "Clear", "count": "{{count}} of {{total}}", "matchingResults": "Matching results" }, "select": { "defaultPlaceholder": "Select one…" }, "slackLink": { "label": "Chat" }, "spinner": { "defaultAltText": "Loading…" }, "taskQueue": { "clearCompleted": "Clear Completed", "newTask": "You have a new task in your queue.", "noTasks": "There are currently no tasks in your queue." } };
|
|
301
303
|
|
|
302
304
|
var noI18nI18n = {
|
|
303
305
|
t: function (key, interpolations) {
|
|
304
|
-
var text = utils.getPath(translations, key.replace(/^design-system:/,
|
|
306
|
+
var text = utils.getPath(translations, key.replace(/^design-system:/, ''));
|
|
305
307
|
return interpolations ? utils.template(text)(interpolations) : text;
|
|
306
308
|
},
|
|
307
309
|
};
|
|
@@ -356,73 +358,74 @@ var SpsOptionListOption = /** @class */ (function () {
|
|
|
356
358
|
}
|
|
357
359
|
Object.defineProperty(SpsOptionListOption.prototype, "text", {
|
|
358
360
|
get: function () {
|
|
359
|
-
if (this.
|
|
360
|
-
return this.
|
|
361
|
+
if (this.textInternal) {
|
|
362
|
+
return this.textInternal;
|
|
361
363
|
}
|
|
362
364
|
if (!this.value) {
|
|
363
|
-
return
|
|
365
|
+
return '';
|
|
364
366
|
}
|
|
365
367
|
return this.textKey ? this.value[this.textKey] : this.value.toString();
|
|
366
368
|
},
|
|
367
369
|
set: function (value) {
|
|
368
|
-
this.
|
|
370
|
+
this.textInternal = value;
|
|
369
371
|
},
|
|
370
|
-
enumerable:
|
|
372
|
+
enumerable: false,
|
|
371
373
|
configurable: true
|
|
372
374
|
});
|
|
373
375
|
Object.defineProperty(SpsOptionListOption.prototype, "caption", {
|
|
374
376
|
get: function () {
|
|
375
|
-
if (this.
|
|
376
|
-
return this.
|
|
377
|
+
if (this.captionInternal) {
|
|
378
|
+
return this.captionInternal;
|
|
377
379
|
}
|
|
378
380
|
if (!this.value) {
|
|
379
|
-
return
|
|
381
|
+
return '';
|
|
380
382
|
}
|
|
381
|
-
return this.captionKey ? this.value[this.captionKey] :
|
|
383
|
+
return this.captionKey ? this.value[this.captionKey] : '';
|
|
382
384
|
},
|
|
383
385
|
set: function (value) {
|
|
384
|
-
this.
|
|
386
|
+
this.captionInternal = value;
|
|
385
387
|
},
|
|
386
|
-
enumerable:
|
|
388
|
+
enumerable: false,
|
|
387
389
|
configurable: true
|
|
388
390
|
});
|
|
389
391
|
Object.defineProperty(SpsOptionListOption.prototype, "href", {
|
|
390
392
|
get: function () {
|
|
391
393
|
if (this.value) {
|
|
392
|
-
return this.value
|
|
394
|
+
return this.value.isLink && typeof this.value === 'function'
|
|
393
395
|
? this.value()
|
|
394
|
-
: this.value
|
|
396
|
+
: this.value.href;
|
|
395
397
|
}
|
|
398
|
+
return null;
|
|
396
399
|
},
|
|
397
|
-
enumerable:
|
|
400
|
+
enumerable: false,
|
|
398
401
|
configurable: true
|
|
399
402
|
});
|
|
400
403
|
Object.defineProperty(SpsOptionListOption.prototype, "disabled", {
|
|
401
404
|
get: function () {
|
|
402
|
-
if (typeof this.
|
|
403
|
-
return this.
|
|
405
|
+
if (typeof this.disabledInternal !== 'undefined') {
|
|
406
|
+
return this.disabledInternal;
|
|
404
407
|
}
|
|
405
|
-
return this.value ? this.value
|
|
408
|
+
return this.value ? this.value.disabled : false;
|
|
406
409
|
},
|
|
407
410
|
set: function (value) {
|
|
408
|
-
this.
|
|
411
|
+
this.disabledInternal = value;
|
|
409
412
|
},
|
|
410
|
-
enumerable:
|
|
413
|
+
enumerable: false,
|
|
411
414
|
configurable: true
|
|
412
415
|
});
|
|
413
416
|
Object.defineProperty(SpsOptionListOption.prototype, "bold", {
|
|
414
417
|
get: function () {
|
|
415
|
-
if (typeof this.
|
|
416
|
-
return this.
|
|
418
|
+
if (typeof this.boldInternal !== 'undefined') {
|
|
419
|
+
return this.boldInternal;
|
|
417
420
|
}
|
|
418
|
-
return this.value ? this.value
|
|
421
|
+
return this.value ? this.value.bold && this.value.bold === true : false;
|
|
419
422
|
},
|
|
420
|
-
enumerable:
|
|
423
|
+
enumerable: false,
|
|
421
424
|
configurable: true
|
|
422
425
|
});
|
|
423
426
|
SpsOptionListOption.prototype.getHtml = function (patternToUnderline) {
|
|
424
427
|
if (patternToUnderline) {
|
|
425
|
-
return this.text.replace(patternToUnderline,
|
|
428
|
+
return this.text.replace(patternToUnderline, '<u>$&</u>');
|
|
426
429
|
}
|
|
427
430
|
return this.text;
|
|
428
431
|
};
|
|
@@ -496,11 +499,11 @@ exports.TooltipKind = void 0;
|
|
|
496
499
|
})(exports.TooltipKind || (exports.TooltipKind = {}));
|
|
497
500
|
|
|
498
501
|
var SPS_ACTION_DEFAULTS = {
|
|
499
|
-
icon:
|
|
500
|
-
label:
|
|
501
|
-
caption:
|
|
502
|
+
icon: '',
|
|
503
|
+
label: '',
|
|
504
|
+
caption: '',
|
|
502
505
|
disabled: false,
|
|
503
|
-
isLink: false
|
|
506
|
+
isLink: false,
|
|
504
507
|
};
|
|
505
508
|
/** Attaches metadata to the decorated method, designating it as an "action"
|
|
506
509
|
* that can be passed in to components such as modal and select. For example,
|
|
@@ -508,9 +511,7 @@ var SPS_ACTION_DEFAULTS = {
|
|
|
508
511
|
* specified label, icon, etc, and clicking that button will call the method.
|
|
509
512
|
*/
|
|
510
513
|
function SpsAction(actionDescriptor) {
|
|
511
|
-
return function (target, key, descriptor) {
|
|
512
|
-
return utils.simpleMetadataDecoratorApplicator(actionDescriptor, SPS_ACTION_DEFAULTS, target, key, descriptor);
|
|
513
|
-
};
|
|
514
|
+
return function (target, key, descriptor) { return utils.simpleMetadataDecoratorApplicator(actionDescriptor, SPS_ACTION_DEFAULTS, target, key, descriptor); };
|
|
514
515
|
}
|
|
515
516
|
|
|
516
517
|
var _a;
|
|
@@ -526,7 +527,7 @@ var SpsTaskStatusIcons = Object.freeze((_a = {},
|
|
|
526
527
|
_a[exports.SpsTaskStatus.COMPLETED] = exports.SpsIcon.STATUS_OK,
|
|
527
528
|
_a[exports.SpsTaskStatus.ERRORED] = exports.SpsIcon.STATUS_ERROR,
|
|
528
529
|
_a[exports.SpsTaskStatus.WARNING] = exports.SpsIcon.STATUS_WARNING,
|
|
529
|
-
_a[exports.SpsTaskStatus.IN_PROGRESS] =
|
|
530
|
+
_a[exports.SpsTaskStatus.IN_PROGRESS] = 'sps-spinner sps-spinner--small',
|
|
530
531
|
_a));
|
|
531
532
|
var TASK_QUEUE_NOTIFICATION_DURATION_MS = 5000;
|
|
532
533
|
|
package/lib/index.d.ts
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
12
|
-
export * from
|
|
13
|
-
export * from
|
|
14
|
-
export * from
|
|
15
|
-
export * from
|
|
16
|
-
export * from
|
|
17
|
-
export * from
|
|
18
|
-
export * from
|
|
19
|
-
export * from
|
|
20
|
-
export * from
|
|
21
|
-
export * from
|
|
22
|
-
export * from
|
|
23
|
-
export * from
|
|
24
|
-
export * from
|
|
25
|
-
export * from
|
|
1
|
+
export * from './button';
|
|
2
|
+
export * from './datetime';
|
|
3
|
+
export * from './clickable-tag';
|
|
4
|
+
export * from './examples';
|
|
5
|
+
export * from './feedback';
|
|
6
|
+
export * from './growler';
|
|
7
|
+
export * from './grid';
|
|
8
|
+
export * from './i18n';
|
|
9
|
+
export * from './icon';
|
|
10
|
+
export * from './insight-card';
|
|
11
|
+
export * from './modal';
|
|
12
|
+
export * from './multi-select';
|
|
13
|
+
export * from './option-list';
|
|
14
|
+
export * from './pagination';
|
|
15
|
+
export * from './positioning';
|
|
16
|
+
export * from './ring-size';
|
|
17
|
+
export * from './spinner';
|
|
18
|
+
export * from './table';
|
|
19
|
+
export * from './tabs';
|
|
20
|
+
export * from './tag';
|
|
21
|
+
export * from './tooltip';
|
|
22
|
+
export * from './sps-action';
|
|
23
|
+
export * from './task-queue';
|
|
24
|
+
export * from './wizard-substep-condition';
|
|
25
|
+
export * from './z-strata';
|
package/lib/index.esm.js
CHANGED
|
@@ -41,8 +41,10 @@ var ButtonKindLink;
|
|
|
41
41
|
(function (ButtonKindLink) {
|
|
42
42
|
ButtonKindLink["LINK"] = "link";
|
|
43
43
|
})(ButtonKindLink || (ButtonKindLink = {}));
|
|
44
|
-
|
|
45
|
-
var
|
|
44
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
45
|
+
var DropdownKind = Object.freeze(__assign(__assign({}, StdButtonKind), ButtonKindIcon));
|
|
46
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
47
|
+
var ButtonKind = Object.freeze(__assign(__assign(__assign({}, StdButtonKind), ButtonKindIcon), ButtonKindLink));
|
|
46
48
|
var ButtonType;
|
|
47
49
|
(function (ButtonType) {
|
|
48
50
|
ButtonType["BUTTON"] = "button";
|
|
@@ -62,10 +64,10 @@ var ClickableTagKind;
|
|
|
62
64
|
})(ClickableTagKind || (ClickableTagKind = {}));
|
|
63
65
|
|
|
64
66
|
function exampleIsReactComponentExample(example) {
|
|
65
|
-
return
|
|
67
|
+
return Object.prototype.hasOwnProperty.call(example, 'react');
|
|
66
68
|
}
|
|
67
69
|
function exampleIsReactJSXExample(example) {
|
|
68
|
-
return
|
|
70
|
+
return Object.prototype.hasOwnProperty.call(example, 'jsx');
|
|
69
71
|
}
|
|
70
72
|
|
|
71
73
|
var SpsIconSize;
|
|
@@ -290,14 +292,14 @@ var GrowlerIcon = new Map([
|
|
|
290
292
|
[GrowlerKind.INFO, SpsIcon.INFO_CIRCLE],
|
|
291
293
|
[GrowlerKind.WARNING, SpsIcon.EXCLAMATION_TRIANGLE],
|
|
292
294
|
[GrowlerKind.ERROR, SpsIcon.EXCLAMATION_CIRCLE],
|
|
293
|
-
[GrowlerKind.SUCCESS, SpsIcon.CHECKMARK]
|
|
295
|
+
[GrowlerKind.SUCCESS, SpsIcon.CHECKMARK],
|
|
294
296
|
]);
|
|
295
297
|
|
|
296
|
-
var translations = { "advancedSearch": { "clear": "Clear", "search": "Search" }, "button": { "spinningTitle": "Loading…" }, "columnChooser": { "removeButton": "Remove {{elementName}}" }, "contentRow": { "collapse": "Collapse", "expand": "Expand" }, "datepicker": { "calendar": { "prevMonth": "View Previous Month", "nextMonth": "View Next Month" }, "preset": { "custom": "Custom", "today": "Today", "sevenDays": "Last 7 days", "thirtyDays": "Last 30 days", "sixtyDays": "Last 60 days", "ninetyDays": "Last 90 days", "oneYear": "Last year" }, "presetsLabel": "Ranges" }, "fileUpload": { "acceptedTypes": "{{fileTypes}} format accepted", "acceptedTypes_plural": "{{fileTypes}} formats accepted", "cancelled": "File Upload Failed", "cancelled_plural": "File Upload(s) Failed", "close": "Close", "instructions": "Drag and drop your file here or |browse for a file| on your desktop.", "instructions_plural": "Drag and drop your files here or |browse for files| on your desktop.", "maximumSize": "{{size}} maximum", "processing": "Processing Upload…", "title": "Upload Your {{description}}" }, "focusedTask": { "close": "Close" }, "growler": { "dismiss": "Dismiss" }, "insightCard": { "all": "ALL", "partnerCount": "{{count}} |of| {{total}}", "partners": "PARTNERS" }, "label": { "errors": { "dateConstraint": { "max": "Please enter a date on or prior to {{context.maxExceeded}}.", "min": "Please enter a date on or after {{context.minExceeded}}." }, "dateFormat": "Please enter a date in the format {{context}}.", "dateRangeOrder": "End date cannot be before start date.", "dateValidity": "Please enter a valid date.", "max": "Please enter a value no greater than {{context}}.", "maxLength": "Please enter no more than {{context}} characters.", "min": "Please enter a value no less than {{context}}.", "minLength": "Please enter at least {{context}} characters.", "required": "This field is required." }, "stronglySuggested": "This field is strongly suggested." }, "listActionBar": { "clearSelected": "Clear Selected", "itemsSelected": "Items Selected" }, "listToolbar": { "advancedSearchToggle": "Advanced Search" }, "modal": { "defaultButtonLabel": "Okay", "defaultTitle": { "general": "Action", "info": "Info", "success": "Success", "warning": "Warning", "serious-warning": "Warning" } }, "pagination": { "nextPage": "Next Page", "ofMany": "of many", "ofPageCount": "of {{pageCount}}", "page": "Page", "prevPage": "Previous Page" }, "progressBar": { "closeButtonTitle": "Close progress bar" }, "searchResultsBar": { "clear": "Clear", "count": "{{count}} of {{total}}", "matchingResults": "Matching results" }, "select": { "defaultPlaceholder": "Select one…" }, "slackLink": { "label": "Chat" }, "spinner": { "defaultAltText": "Loading…" }, "taskQueue": { "clearCompleted": "Clear Completed", "newTask": "You have a new task in your queue.", "noTasks": "There are currently no tasks in your queue." } };
|
|
298
|
+
var translations = { "advancedSearch": { "clear": "Clear", "search": "Search" }, "button": { "spinningTitle": "Loading…" }, "columnChooser": { "removeButton": "Remove {{elementName}}" }, "contentRow": { "collapse": "Collapse", "expand": "Expand" }, "datepicker": { "calendar": { "prevMonth": "View Previous Month", "nextMonth": "View Next Month" }, "preset": { "custom": "Custom", "today": "Today", "sevenDays": "Last 7 days", "thirtyDays": "Last 30 days", "sixtyDays": "Last 60 days", "ninetyDays": "Last 90 days", "oneYear": "Last year" }, "presetsLabel": "Ranges" }, "fileUpload": { "acceptedTypes": "{{fileTypes}} format accepted", "acceptedTypes_plural": "{{fileTypes}} formats accepted", "cancelled": "File Upload Failed", "cancelled_plural": "File Upload(s) Failed", "close": "Close", "instructions": "Drag and drop your file here or |browse for a file| on your desktop.", "instructions_plural": "Drag and drop your files here or |browse for files| on your desktop.", "maximumSize": "{{size}} maximum", "processing": "Processing Upload…", "title": "Upload Your {{description}}" }, "focusedTask": { "close": "Close" }, "growler": { "dismiss": "Dismiss" }, "insightCard": { "all": "ALL", "partnerCount": "{{count}} |of| {{total}}", "partners": "PARTNERS" }, "label": { "errors": { "dateConstraint": { "max": "Please enter a date on or prior to {{context.maxExceeded}}.", "min": "Please enter a date on or after {{context.minExceeded}}." }, "dateFormat": "Please enter a date in the format {{context}}.", "dateRangeOrder": "End date cannot be before start date.", "dateValidity": "Please enter a valid date.", "max": "Please enter a value no greater than {{context}}.", "maxLength": "Please enter no more than {{context}} characters.", "min": "Please enter a value no less than {{context}}.", "minLength": "Please enter at least {{context}} characters.", "required": "This field is required." }, "stronglySuggested": "This field is strongly suggested." }, "listActionBar": { "clearSelected": "Clear Selected", "itemsSelected": "Items Selected" }, "listToolbar": { "advancedSearchToggle": "Advanced Search" }, "modal": { "close": "Close modal", "defaultButtonLabel": "Okay", "defaultTitle": { "general": "Action", "info": "Info", "success": "Success", "warning": "Warning", "serious-warning": "Warning" } }, "pagination": { "nextPage": "Next Page", "ofMany": "of many", "ofPageCount": "of {{pageCount}}", "page": "Page", "prevPage": "Previous Page" }, "progressBar": { "closeButtonTitle": "Close progress bar" }, "searchResultsBar": { "clear": "Clear", "count": "{{count}} of {{total}}", "matchingResults": "Matching results" }, "select": { "defaultPlaceholder": "Select one…" }, "slackLink": { "label": "Chat" }, "spinner": { "defaultAltText": "Loading…" }, "taskQueue": { "clearCompleted": "Clear Completed", "newTask": "You have a new task in your queue.", "noTasks": "There are currently no tasks in your queue." } };
|
|
297
299
|
|
|
298
300
|
var noI18nI18n = {
|
|
299
301
|
t: function (key, interpolations) {
|
|
300
|
-
var text = getPath(translations, key.replace(/^design-system:/,
|
|
302
|
+
var text = getPath(translations, key.replace(/^design-system:/, ''));
|
|
301
303
|
return interpolations ? template(text)(interpolations) : text;
|
|
302
304
|
},
|
|
303
305
|
};
|
|
@@ -352,73 +354,74 @@ var SpsOptionListOption = /** @class */ (function () {
|
|
|
352
354
|
}
|
|
353
355
|
Object.defineProperty(SpsOptionListOption.prototype, "text", {
|
|
354
356
|
get: function () {
|
|
355
|
-
if (this.
|
|
356
|
-
return this.
|
|
357
|
+
if (this.textInternal) {
|
|
358
|
+
return this.textInternal;
|
|
357
359
|
}
|
|
358
360
|
if (!this.value) {
|
|
359
|
-
return
|
|
361
|
+
return '';
|
|
360
362
|
}
|
|
361
363
|
return this.textKey ? this.value[this.textKey] : this.value.toString();
|
|
362
364
|
},
|
|
363
365
|
set: function (value) {
|
|
364
|
-
this.
|
|
366
|
+
this.textInternal = value;
|
|
365
367
|
},
|
|
366
|
-
enumerable:
|
|
368
|
+
enumerable: false,
|
|
367
369
|
configurable: true
|
|
368
370
|
});
|
|
369
371
|
Object.defineProperty(SpsOptionListOption.prototype, "caption", {
|
|
370
372
|
get: function () {
|
|
371
|
-
if (this.
|
|
372
|
-
return this.
|
|
373
|
+
if (this.captionInternal) {
|
|
374
|
+
return this.captionInternal;
|
|
373
375
|
}
|
|
374
376
|
if (!this.value) {
|
|
375
|
-
return
|
|
377
|
+
return '';
|
|
376
378
|
}
|
|
377
|
-
return this.captionKey ? this.value[this.captionKey] :
|
|
379
|
+
return this.captionKey ? this.value[this.captionKey] : '';
|
|
378
380
|
},
|
|
379
381
|
set: function (value) {
|
|
380
|
-
this.
|
|
382
|
+
this.captionInternal = value;
|
|
381
383
|
},
|
|
382
|
-
enumerable:
|
|
384
|
+
enumerable: false,
|
|
383
385
|
configurable: true
|
|
384
386
|
});
|
|
385
387
|
Object.defineProperty(SpsOptionListOption.prototype, "href", {
|
|
386
388
|
get: function () {
|
|
387
389
|
if (this.value) {
|
|
388
|
-
return this.value
|
|
390
|
+
return this.value.isLink && typeof this.value === 'function'
|
|
389
391
|
? this.value()
|
|
390
|
-
: this.value
|
|
392
|
+
: this.value.href;
|
|
391
393
|
}
|
|
394
|
+
return null;
|
|
392
395
|
},
|
|
393
|
-
enumerable:
|
|
396
|
+
enumerable: false,
|
|
394
397
|
configurable: true
|
|
395
398
|
});
|
|
396
399
|
Object.defineProperty(SpsOptionListOption.prototype, "disabled", {
|
|
397
400
|
get: function () {
|
|
398
|
-
if (typeof this.
|
|
399
|
-
return this.
|
|
401
|
+
if (typeof this.disabledInternal !== 'undefined') {
|
|
402
|
+
return this.disabledInternal;
|
|
400
403
|
}
|
|
401
|
-
return this.value ? this.value
|
|
404
|
+
return this.value ? this.value.disabled : false;
|
|
402
405
|
},
|
|
403
406
|
set: function (value) {
|
|
404
|
-
this.
|
|
407
|
+
this.disabledInternal = value;
|
|
405
408
|
},
|
|
406
|
-
enumerable:
|
|
409
|
+
enumerable: false,
|
|
407
410
|
configurable: true
|
|
408
411
|
});
|
|
409
412
|
Object.defineProperty(SpsOptionListOption.prototype, "bold", {
|
|
410
413
|
get: function () {
|
|
411
|
-
if (typeof this.
|
|
412
|
-
return this.
|
|
414
|
+
if (typeof this.boldInternal !== 'undefined') {
|
|
415
|
+
return this.boldInternal;
|
|
413
416
|
}
|
|
414
|
-
return this.value ? this.value
|
|
417
|
+
return this.value ? this.value.bold && this.value.bold === true : false;
|
|
415
418
|
},
|
|
416
|
-
enumerable:
|
|
419
|
+
enumerable: false,
|
|
417
420
|
configurable: true
|
|
418
421
|
});
|
|
419
422
|
SpsOptionListOption.prototype.getHtml = function (patternToUnderline) {
|
|
420
423
|
if (patternToUnderline) {
|
|
421
|
-
return this.text.replace(patternToUnderline,
|
|
424
|
+
return this.text.replace(patternToUnderline, '<u>$&</u>');
|
|
422
425
|
}
|
|
423
426
|
return this.text;
|
|
424
427
|
};
|
|
@@ -492,11 +495,11 @@ var TooltipKind;
|
|
|
492
495
|
})(TooltipKind || (TooltipKind = {}));
|
|
493
496
|
|
|
494
497
|
var SPS_ACTION_DEFAULTS = {
|
|
495
|
-
icon:
|
|
496
|
-
label:
|
|
497
|
-
caption:
|
|
498
|
+
icon: '',
|
|
499
|
+
label: '',
|
|
500
|
+
caption: '',
|
|
498
501
|
disabled: false,
|
|
499
|
-
isLink: false
|
|
502
|
+
isLink: false,
|
|
500
503
|
};
|
|
501
504
|
/** Attaches metadata to the decorated method, designating it as an "action"
|
|
502
505
|
* that can be passed in to components such as modal and select. For example,
|
|
@@ -504,9 +507,7 @@ var SPS_ACTION_DEFAULTS = {
|
|
|
504
507
|
* specified label, icon, etc, and clicking that button will call the method.
|
|
505
508
|
*/
|
|
506
509
|
function SpsAction(actionDescriptor) {
|
|
507
|
-
return function (target, key, descriptor) {
|
|
508
|
-
return simpleMetadataDecoratorApplicator(actionDescriptor, SPS_ACTION_DEFAULTS, target, key, descriptor);
|
|
509
|
-
};
|
|
510
|
+
return function (target, key, descriptor) { return simpleMetadataDecoratorApplicator(actionDescriptor, SPS_ACTION_DEFAULTS, target, key, descriptor); };
|
|
510
511
|
}
|
|
511
512
|
|
|
512
513
|
var _a;
|
|
@@ -522,7 +523,7 @@ var SpsTaskStatusIcons = Object.freeze((_a = {},
|
|
|
522
523
|
_a[SpsTaskStatus.COMPLETED] = SpsIcon.STATUS_OK,
|
|
523
524
|
_a[SpsTaskStatus.ERRORED] = SpsIcon.STATUS_ERROR,
|
|
524
525
|
_a[SpsTaskStatus.WARNING] = SpsIcon.STATUS_WARNING,
|
|
525
|
-
_a[SpsTaskStatus.IN_PROGRESS] =
|
|
526
|
+
_a[SpsTaskStatus.IN_PROGRESS] = 'sps-spinner sps-spinner--small',
|
|
526
527
|
_a));
|
|
527
528
|
var TASK_QUEUE_NOTIFICATION_DURATION_MS = 5000;
|
|
528
529
|
|
package/lib/insight-card.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SpsIcon } from
|
|
1
|
+
import { SpsIcon } from './icon';
|
|
2
2
|
export declare enum SpsInsightCardKind {
|
|
3
3
|
GENERAL = "general",
|
|
4
4
|
SUCCESS = "success",
|
|
@@ -7,9 +7,9 @@ export declare enum SpsInsightCardKind {
|
|
|
7
7
|
PROCESSING = "processing"
|
|
8
8
|
}
|
|
9
9
|
export declare const SpsInsightCardIcons: Readonly<{
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
general: SpsIcon;
|
|
11
|
+
success: SpsIcon;
|
|
12
|
+
error: SpsIcon;
|
|
13
|
+
warning: SpsIcon;
|
|
14
|
+
processing: SpsIcon;
|
|
15
15
|
}>;
|
package/lib/option-list.d.ts
CHANGED
|
@@ -13,16 +13,19 @@ export interface SpsOptionListOptionConfig {
|
|
|
13
13
|
export declare class SpsOptionListOption<T> {
|
|
14
14
|
value: T;
|
|
15
15
|
constructor(value: T, config?: SpsOptionListOptionConfig);
|
|
16
|
-
text: string;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
get text(): string;
|
|
17
|
+
set text(value: string);
|
|
18
|
+
get caption(): string;
|
|
19
|
+
set caption(value: string);
|
|
20
|
+
get href(): any;
|
|
21
|
+
get disabled(): boolean;
|
|
22
|
+
set disabled(value: boolean);
|
|
23
|
+
get bold(): boolean;
|
|
21
24
|
textKey: string;
|
|
22
25
|
captionKey: string;
|
|
23
|
-
private
|
|
24
|
-
private
|
|
25
|
-
private
|
|
26
|
-
private
|
|
26
|
+
private textInternal;
|
|
27
|
+
private captionInternal;
|
|
28
|
+
private disabledInternal;
|
|
29
|
+
private boldInternal;
|
|
27
30
|
getHtml(patternToUnderline?: RegExp): string;
|
|
28
31
|
}
|
package/lib/sps-action.d.ts
CHANGED
package/lib/tabs.d.ts
CHANGED
package/lib/task-queue.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SpsIcon } from
|
|
2
|
-
import { SpsActionMethod } from
|
|
1
|
+
import { SpsIcon } from './icon';
|
|
2
|
+
import { SpsActionMethod } from './sps-action';
|
|
3
3
|
/** The possible statuses for a task in the Task Queue. */
|
|
4
4
|
export declare enum SpsTaskStatus {
|
|
5
5
|
COMPLETED = "completed",
|
|
@@ -8,10 +8,10 @@ export declare enum SpsTaskStatus {
|
|
|
8
8
|
IN_PROGRESS = "in_progress"
|
|
9
9
|
}
|
|
10
10
|
export declare const SpsTaskStatusIcons: Readonly<{
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
completed: SpsIcon;
|
|
12
|
+
errored: SpsIcon;
|
|
13
|
+
warning: SpsIcon;
|
|
14
|
+
in_progress: string;
|
|
15
15
|
}>;
|
|
16
16
|
/** Represents a task in the Task Queue. */
|
|
17
17
|
export interface SpsTask {
|
package/lib/translations.d.ts
CHANGED
|
@@ -1,119 +1,120 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
advancedSearch: {
|
|
3
|
+
clear: string;
|
|
4
|
+
search: string;
|
|
5
5
|
};
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
button: {
|
|
7
|
+
spinningTitle: string;
|
|
8
8
|
};
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
columnChooser: {
|
|
10
|
+
removeButton: string;
|
|
11
11
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
contentRow: {
|
|
13
|
+
collapse: string;
|
|
14
|
+
expand: string;
|
|
15
15
|
};
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
datepicker: {
|
|
17
|
+
calendar: {
|
|
18
|
+
prevMonth: string;
|
|
19
|
+
nextMonth: string;
|
|
20
20
|
};
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
21
|
+
preset: {
|
|
22
|
+
custom: string;
|
|
23
|
+
today: string;
|
|
24
|
+
sevenDays: string;
|
|
25
|
+
thirtyDays: string;
|
|
26
|
+
sixtyDays: string;
|
|
27
|
+
ninetyDays: string;
|
|
28
|
+
oneYear: string;
|
|
29
29
|
};
|
|
30
|
-
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
30
|
+
presetsLabel: string;
|
|
31
|
+
};
|
|
32
|
+
fileUpload: {
|
|
33
|
+
acceptedTypes: string;
|
|
34
|
+
acceptedTypes_plural: string;
|
|
35
|
+
cancelled: string;
|
|
36
|
+
cancelled_plural: string;
|
|
37
|
+
close: string;
|
|
38
|
+
instructions: string;
|
|
39
|
+
instructions_plural: string;
|
|
40
|
+
maximumSize: string;
|
|
41
|
+
processing: string;
|
|
42
|
+
title: string;
|
|
43
|
+
};
|
|
44
|
+
focusedTask: {
|
|
45
|
+
close: string;
|
|
46
|
+
};
|
|
47
|
+
growler: {
|
|
48
|
+
dismiss: string;
|
|
49
|
+
};
|
|
50
|
+
insightCard: {
|
|
51
|
+
all: string;
|
|
52
|
+
partnerCount: string;
|
|
53
|
+
partners: string;
|
|
54
|
+
};
|
|
55
|
+
label: {
|
|
56
|
+
errors: {
|
|
57
|
+
dateConstraint: {
|
|
58
|
+
max: string;
|
|
59
|
+
min: string;
|
|
60
60
|
};
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
61
|
+
dateFormat: string;
|
|
62
|
+
dateRangeOrder: string;
|
|
63
|
+
dateValidity: string;
|
|
64
|
+
max: string;
|
|
65
|
+
maxLength: string;
|
|
66
|
+
min: string;
|
|
67
|
+
minLength: string;
|
|
68
|
+
required: string;
|
|
69
69
|
};
|
|
70
|
-
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
70
|
+
stronglySuggested: string;
|
|
71
|
+
};
|
|
72
|
+
listActionBar: {
|
|
73
|
+
clearSelected: string;
|
|
74
|
+
itemsSelected: string;
|
|
75
|
+
};
|
|
76
|
+
listToolbar: {
|
|
77
|
+
advancedSearchToggle: string;
|
|
78
|
+
};
|
|
79
|
+
modal: {
|
|
80
|
+
close: string;
|
|
81
|
+
defaultButtonLabel: string;
|
|
82
|
+
defaultTitle: {
|
|
83
|
+
general: string;
|
|
84
|
+
info: string;
|
|
85
|
+
success: string;
|
|
86
|
+
warning: string;
|
|
86
87
|
"serious-warning": string;
|
|
87
88
|
};
|
|
88
89
|
};
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
90
|
+
pagination: {
|
|
91
|
+
nextPage: string;
|
|
92
|
+
ofMany: string;
|
|
93
|
+
ofPageCount: string;
|
|
94
|
+
page: string;
|
|
95
|
+
prevPage: string;
|
|
95
96
|
};
|
|
96
|
-
|
|
97
|
-
|
|
97
|
+
progressBar: {
|
|
98
|
+
closeButtonTitle: string;
|
|
98
99
|
};
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
100
|
+
searchResultsBar: {
|
|
101
|
+
clear: string;
|
|
102
|
+
count: string;
|
|
103
|
+
matchingResults: string;
|
|
103
104
|
};
|
|
104
|
-
|
|
105
|
-
|
|
105
|
+
select: {
|
|
106
|
+
defaultPlaceholder: string;
|
|
106
107
|
};
|
|
107
|
-
|
|
108
|
-
|
|
108
|
+
slackLink: {
|
|
109
|
+
label: string;
|
|
109
110
|
};
|
|
110
|
-
|
|
111
|
-
|
|
111
|
+
spinner: {
|
|
112
|
+
defaultAltText: string;
|
|
112
113
|
};
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
114
|
+
taskQueue: {
|
|
115
|
+
clearCompleted: string;
|
|
116
|
+
newTask: string;
|
|
117
|
+
noTasks: string;
|
|
117
118
|
};
|
|
118
119
|
};
|
|
119
120
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spscommerce/ds-shared",
|
|
3
3
|
"description": "Package for sharing code and types between DS Angular and DS React.",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.15.3",
|
|
5
5
|
"author": "SPS Commerce",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"repository": "https://github.com/spscommerce/design-system/tree/main/packages/@spscommerce/ds-shared",
|
|
8
8
|
"homepage": "https://github.com/spscommerce/design-system/tree/main/packages/@spscommerce/ds-shared#readme",
|
|
9
9
|
"scripts": {
|
|
10
10
|
"build": "yarn run build:copy-translations && yarn run build:rollup",
|
|
11
|
-
"build:rollup": "npx rollup -c rollup.config.
|
|
11
|
+
"build:rollup": "npx rollup -c rollup.config.js",
|
|
12
12
|
"clean": "git clean -fdX",
|
|
13
13
|
"pub": "node ../../../scripts/publish-package.js",
|
|
14
14
|
"build:copy-translations": "echo \"export default \"$(cat ../i18n/locales/en-US/design-system.json)\";\" > src/translations.ts"
|
|
@@ -20,12 +20,13 @@
|
|
|
20
20
|
"module": "./lib/index.esm.js",
|
|
21
21
|
"types": "./lib/index.d.ts",
|
|
22
22
|
"peerDependencies": {
|
|
23
|
-
"@spscommerce/utils": "^3.
|
|
23
|
+
"@spscommerce/utils": "^3.15.3",
|
|
24
24
|
"moment": "^2.25.3",
|
|
25
25
|
"moment-timezone": "^0.5.28"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@
|
|
28
|
+
"@types/react": "^16.8.8",
|
|
29
|
+
"@spscommerce/utils": "^3.15.3",
|
|
29
30
|
"moment": "^2.25.3",
|
|
30
31
|
"moment-timezone": "^0.5.28"
|
|
31
32
|
}
|
package/rollup.config.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import commonjs from "@rollup/plugin-commonjs";
|
|
2
|
+
import resolve from "@rollup/plugin-node-resolve";
|
|
3
|
+
import typescript from "rollup-plugin-typescript2";
|
|
4
|
+
import pkg from "./package.json";
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
input: "src/index.ts",
|
|
8
|
+
output: [
|
|
9
|
+
{
|
|
10
|
+
file: pkg.main,
|
|
11
|
+
format: "cjs",
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
file: pkg.module,
|
|
15
|
+
format: "es",
|
|
16
|
+
},
|
|
17
|
+
],
|
|
18
|
+
external: Object.keys(pkg.peerDependencies || {}),
|
|
19
|
+
plugins: [
|
|
20
|
+
resolve(),
|
|
21
|
+
commonjs(),
|
|
22
|
+
typescript(),
|
|
23
|
+
],
|
|
24
|
+
};
|