@claspo/templates 16.3.6 → 16.4.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.
Files changed (66) hide show
  1. package/EnvManager.d.ts +28 -28
  2. package/HttpDebugTemplateLoader.d.ts +8 -8
  3. package/HttpTemplateLoader.d.ts +7 -7
  4. package/InlineBackground.interface.d.ts +5 -5
  5. package/MapGridOptions.d.ts +2 -2
  6. package/PubSub.interface.d.ts +5 -5
  7. package/SortWeightRecordI.d.ts +5 -5
  8. package/SortableRecord.interface.d.ts +5 -5
  9. package/Template.interface.d.ts +43 -43
  10. package/TemplateBrief.interface.d.ts +3 -3
  11. package/TemplateDatasource.d.ts +43 -43
  12. package/TemplateDatasource.interface.d.ts +9 -9
  13. package/TemplateLauncherItem.interface.d.ts +3 -3
  14. package/TemplateMapper.d.ts +8 -8
  15. package/TemplatePublishStatus.enum.d.ts +4 -4
  16. package/TemplateSize.interface.d.ts +4 -4
  17. package/TemplateType.enum.d.ts +6 -6
  18. package/data/DataStrategy.d.ts +12 -12
  19. package/data/DataStrategy.interface.d.ts +6 -6
  20. package/data/strategies/default-strategy/DefaultStrategy.d.ts +7 -7
  21. package/data/strategies/shuffle.d.ts +1 -1
  22. package/data/strategies/similar-random-weight-strategy/SimilarRandomWeightStrategy.d.ts +9 -9
  23. package/data/strategies/weight-strategy/WeightStrategy.d.ts +7 -7
  24. package/data/strategies/weight-strategy/computeTemplateWeight.d.ts +3 -3
  25. package/data/strategies/weight-strategy/getPreferredWeight.d.ts +4 -4
  26. package/data/strategies/weight-strategy/sortByWeightPredicate.d.ts +2 -2
  27. package/data/strategies/width-based-strategy/WidthBasedStrategy.d.ts +7 -7
  28. package/data/strategies/width-based-strategy/width-first-algorithm/buildRow.d.ts +2 -2
  29. package/data/strategies/width-based-strategy/width-first-algorithm/convertArrayToMapByField.d.ts +1 -1
  30. package/data/strategies/width-based-strategy/width-first-algorithm/createSizeModels.d.ts +7 -7
  31. package/data/strategies/width-based-strategy/width-first-algorithm/filterOffDuplicates.d.ts +2 -2
  32. package/data/strategies/width-based-strategy/width-first-algorithm/findNextModel.d.ts +2 -2
  33. package/data/strategies/width-based-strategy/width-first-algorithm/generateRandomValue.d.ts +2 -2
  34. package/data/strategies/width-based-strategy/width-first-algorithm/getCurrentRowWidth.d.ts +1 -1
  35. package/data/strategies/width-based-strategy/width-first-algorithm/group.interface.d.ts +2 -2
  36. package/data/strategies/width-based-strategy/width-first-algorithm/groupModelsByPercentHeight.d.ts +3 -3
  37. package/data/strategies/width-based-strategy/width-first-algorithm/groupObjectMap.interface.d.ts +4 -4
  38. package/data/strategies/width-based-strategy/width-first-algorithm/isModelAlreadyPresent.d.ts +1 -1
  39. package/data/strategies/width-based-strategy/width-first-algorithm/mapSizeModel.d.ts +3 -3
  40. package/data/strategies/width-based-strategy/width-first-algorithm/sizeModelI.d.ts +6 -6
  41. package/data/strategies/width-based-strategy/width-first-algorithm/widthFirstAlgorithm.d.ts +3 -3
  42. package/dialog/ClDialogSliderComponent.d.ts +35 -35
  43. package/error/TemplateGridConstructorArgumentsError.d.ts +3 -3
  44. package/filter/FilterApplier.d.ts +10 -10
  45. package/filter/FilterGroup.d.ts +7 -7
  46. package/filter/FilterGroup.interface.d.ts +6 -6
  47. package/filter/FilterGroupType.d.ts +7 -7
  48. package/filter/FilterItem.d.ts +9 -9
  49. package/filter/FilterItem.interface.d.ts +9 -9
  50. package/filter/FilterResponse.interface.d.ts +2 -2
  51. package/filter/FilterTranslator.d.ts +9 -9
  52. package/filter/FilterValue.interface.d.ts +2 -2
  53. package/filter/FilterValueGroup.interface.d.ts +7 -7
  54. package/filter/HttpFilterLoader.d.ts +8 -8
  55. package/filter/TemplateFilterDatasource.d.ts +17 -17
  56. package/filter/TemplateFilterDatasource.interface.d.ts +9 -9
  57. package/filter/TemplateFilterObserver.d.ts +11 -11
  58. package/filter/mapFilterGroupTypeToTemplateField.d.ts +2 -2
  59. package/grid/DefaultGridOptions.d.ts +2 -2
  60. package/grid/GridAlgorithm.enum.d.ts +6 -6
  61. package/grid/GridOptions.interface.d.ts +7 -7
  62. package/grid-preview/GridPreview.d.ts +17 -17
  63. package/grid-preview/GridPreviewInit.interface.d.ts +21 -21
  64. package/helpers.d.ts +7 -7
  65. package/package.json +5 -5
  66. package/slider/TemplateSlider.d.ts +14 -14
@@ -1,3 +1,3 @@
1
- import TemplateBriefI from "../../../../TemplateBrief.interface";
2
- import { SizeModelI } from "./sizeModelI";
3
- export declare function mapSizeModel(m: TemplateBriefI): SizeModelI;
1
+ import TemplateBriefI from "../../../../TemplateBrief.interface";
2
+ import { SizeModelI } from "./sizeModelI";
3
+ export declare function mapSizeModel(m: TemplateBriefI): SizeModelI;
@@ -1,6 +1,6 @@
1
- export interface SizeModelI {
2
- id: number;
3
- widthPx: number;
4
- heightPx: number;
5
- heightPercent: number;
6
- }
1
+ export interface SizeModelI {
2
+ id: number;
3
+ widthPx: number;
4
+ heightPx: number;
5
+ heightPercent: number;
6
+ }
@@ -1,3 +1,3 @@
1
- import TemplateBriefI from "../../../../TemplateBrief.interface";
2
- export type TemplateRows = TemplateBriefI[][];
3
- export default function widthFirstAlgorithm(inputModels: TemplateBriefI[], maxRowWidthPx: number, zoomIndex: number, modelGapPx: number): TemplateBriefI[];
1
+ import TemplateBriefI from "../../../../TemplateBrief.interface";
2
+ export type TemplateRows = TemplateBriefI[][];
3
+ export default function widthFirstAlgorithm(inputModels: TemplateBriefI[], maxRowWidthPx: number, zoomIndex: number, modelGapPx: number): TemplateBriefI[];
@@ -1,35 +1,35 @@
1
- export interface ClDialogSliderComponentI extends HTMLElement {
2
- open(): void;
3
- close(): void;
4
- }
5
- declare class ClDialogSliderComponent extends HTMLElement implements ClDialogSliderComponentI {
6
- private _dynamicData;
7
- private _boundEscapeListener;
8
- static dialogSelector: string;
9
- static dialogContentSelector: string;
10
- static dialogCloseIconSelector: string;
11
- static dialogLeftArrowSelector: string;
12
- static dialogRightArrowSelector: string;
13
- static template: string;
14
- private dialogContainerElement;
15
- private dialogLeftArrowElement;
16
- private dialogRightArrowElement;
17
- private dialogCloseIconElement;
18
- private currentOverflowValue;
19
- static get observedAttributes(): never[];
20
- constructor();
21
- get disabledLeft(): boolean | undefined;
22
- set disabledLeft(disabled: boolean | undefined);
23
- get disabledRight(): boolean | undefined;
24
- set disabledRight(disabled: boolean | undefined);
25
- get hideCloseBtn(): boolean | undefined;
26
- set hideCloseBtn(isHidden: boolean | undefined);
27
- open(): void;
28
- close(): void;
29
- attributeChangedCallback(): void;
30
- disconnectedCallback(): void;
31
- _upgradeProperty(prop: string): void;
32
- keyboardListenerCallback(event: KeyboardEvent): void;
33
- _dispatchEvent(eventType: string): void;
34
- }
35
- export default ClDialogSliderComponent;
1
+ export interface ClDialogSliderComponentI extends HTMLElement {
2
+ open(): void;
3
+ close(): void;
4
+ }
5
+ declare class ClDialogSliderComponent extends HTMLElement implements ClDialogSliderComponentI {
6
+ private _dynamicData;
7
+ private _boundEscapeListener;
8
+ static dialogSelector: string;
9
+ static dialogContentSelector: string;
10
+ static dialogCloseIconSelector: string;
11
+ static dialogLeftArrowSelector: string;
12
+ static dialogRightArrowSelector: string;
13
+ static template: string;
14
+ private dialogContainerElement;
15
+ private dialogLeftArrowElement;
16
+ private dialogRightArrowElement;
17
+ private dialogCloseIconElement;
18
+ private currentOverflowValue;
19
+ static get observedAttributes(): never[];
20
+ constructor();
21
+ get disabledLeft(): boolean | undefined;
22
+ set disabledLeft(disabled: boolean | undefined);
23
+ get disabledRight(): boolean | undefined;
24
+ set disabledRight(disabled: boolean | undefined);
25
+ get hideCloseBtn(): boolean | undefined;
26
+ set hideCloseBtn(isHidden: boolean | undefined);
27
+ open(): void;
28
+ close(): void;
29
+ attributeChangedCallback(): void;
30
+ disconnectedCallback(): void;
31
+ _upgradeProperty(prop: string): void;
32
+ keyboardListenerCallback(event: KeyboardEvent): void;
33
+ _dispatchEvent(eventType: string): void;
34
+ }
35
+ export default ClDialogSliderComponent;
@@ -1,3 +1,3 @@
1
- export default class TemplateGridConstructorArgumentsError extends Error {
2
- constructor(message: any);
3
- }
1
+ export default class TemplateGridConstructorArgumentsError extends Error {
2
+ constructor(message: any);
3
+ }
@@ -1,10 +1,10 @@
1
- import TemplateBriefI from "../TemplateBrief.interface";
2
- import { FilterValueI } from "./FilterValue.interface";
3
- import { FilterGroupType } from "./FilterGroupType";
4
- export default class FilterApplier {
5
- static apply(items: TemplateBriefI[], filterValue: FilterValueI | null): TemplateBriefI[];
6
- static filterValuePredicate(t: TemplateBriefI, f: FilterValueI | null): boolean;
7
- private static getSwitchedOnItemsFromGroup;
8
- static templateHasAtLeastOneItem(t: TemplateBriefI, groupType: FilterGroupType, switchedOnItems: string[]): boolean;
9
- private static templateHasItem;
10
- }
1
+ import TemplateBriefI from "../TemplateBrief.interface";
2
+ import { FilterValueI } from "./FilterValue.interface";
3
+ import { FilterGroupType } from "./FilterGroupType";
4
+ export default class FilterApplier {
5
+ static apply(items: TemplateBriefI[], filterValue: FilterValueI | null): TemplateBriefI[];
6
+ static filterValuePredicate(t: TemplateBriefI, f: FilterValueI | null): boolean;
7
+ private static getSwitchedOnItemsFromGroup;
8
+ static templateHasAtLeastOneItem(t: TemplateBriefI, groupType: FilterGroupType, switchedOnItems: string[]): boolean;
9
+ private static templateHasItem;
10
+ }
@@ -1,7 +1,7 @@
1
- import { FilterGroupI } from "./FilterGroup.interface";
2
- import FilterItemI from "./FilterItem.interface";
3
- export default class FilterGroup implements FilterGroupI {
4
- type: any;
5
- items: FilterItemI[];
6
- constructor(type: any, items: FilterItemI[]);
7
- }
1
+ import { FilterGroupI } from "./FilterGroup.interface";
2
+ import FilterItemI from "./FilterItem.interface";
3
+ export default class FilterGroup implements FilterGroupI {
4
+ type: any;
5
+ items: FilterItemI[];
6
+ constructor(type: any, items: FilterItemI[]);
7
+ }
@@ -1,6 +1,6 @@
1
- import FilterItemI from "./FilterItem.interface";
2
- import { FilterGroupType } from "./FilterGroupType";
3
- export interface FilterGroupI {
4
- type: FilterGroupType;
5
- items: FilterItemI[];
6
- }
1
+ import FilterItemI from "./FilterItem.interface";
2
+ import { FilterGroupType } from "./FilterGroupType";
3
+ export interface FilterGroupI {
4
+ type: FilterGroupType;
5
+ items: FilterItemI[];
6
+ }
@@ -1,7 +1,7 @@
1
- export declare enum FilterGroupType {
2
- USE_CASE = "USE_CASE",
3
- LAYOUT = "LAYOUT",
4
- INDUSTRY = "INDUSTRY",
5
- THEME = "THEME",
6
- FEATURES = "FEATURES"
7
- }
1
+ export declare enum FilterGroupType {
2
+ USE_CASE = "USE_CASE",
3
+ LAYOUT = "LAYOUT",
4
+ INDUSTRY = "INDUSTRY",
5
+ THEME = "THEME",
6
+ FEATURES = "FEATURES"
7
+ }
@@ -1,9 +1,9 @@
1
- import FilterItemI from "./FilterItem.interface";
2
- export default class FilterItem implements FilterItemI {
3
- key: any;
4
- translations: any;
5
- sortWeight: any;
6
- isActive: boolean;
7
- hidden: boolean;
8
- constructor(key: any, translations: any, sortWeight: any, isActive?: boolean, hidden?: boolean);
9
- }
1
+ import FilterItemI from "./FilterItem.interface";
2
+ export default class FilterItem implements FilterItemI {
3
+ key: any;
4
+ translations: any;
5
+ sortWeight: any;
6
+ isActive: boolean;
7
+ hidden: boolean;
8
+ constructor(key: any, translations: any, sortWeight: any, isActive?: boolean, hidden?: boolean);
9
+ }
@@ -1,9 +1,9 @@
1
- import SortableRecordI from "../SortableRecord.interface";
2
- export default interface FilterItemI extends SortableRecordI {
3
- key: string;
4
- translations: {
5
- [key: string]: string;
6
- };
7
- isActive: boolean;
8
- hidden?: boolean;
9
- }
1
+ import SortableRecordI from "../SortableRecord.interface";
2
+ export default interface FilterItemI extends SortableRecordI {
3
+ key: string;
4
+ translations: {
5
+ [key: string]: string;
6
+ };
7
+ isActive: boolean;
8
+ hidden?: boolean;
9
+ }
@@ -1,2 +1,2 @@
1
- import { FilterGroupI } from "./FilterGroup.interface";
2
- export type FilterResponseI = FilterGroupI[];
1
+ import { FilterGroupI } from "./FilterGroup.interface";
2
+ export type FilterResponseI = FilterGroupI[];
@@ -1,9 +1,9 @@
1
- import { FilterGroupI } from "./FilterGroup.interface";
2
- export default class FilterTranslator {
3
- private lang;
4
- private filterGroups;
5
- private map;
6
- constructor(lang: string, filterGroups: FilterGroupI[]);
7
- translate(key: any): string;
8
- getTranslationsMap(): Map<string, string>;
9
- }
1
+ import { FilterGroupI } from "./FilterGroup.interface";
2
+ export default class FilterTranslator {
3
+ private lang;
4
+ private filterGroups;
5
+ private map;
6
+ constructor(lang: string, filterGroups: FilterGroupI[]);
7
+ translate(key: any): string;
8
+ getTranslationsMap(): Map<string, string>;
9
+ }
@@ -1,2 +1,2 @@
1
- import { FilterValueGroupI } from "./FilterValueGroup.interface";
2
- export type FilterValueI = FilterValueGroupI[];
1
+ import { FilterValueGroupI } from "./FilterValueGroup.interface";
2
+ export type FilterValueI = FilterValueGroupI[];
@@ -1,7 +1,7 @@
1
- import { FilterGroupType } from "./FilterGroupType";
2
- export interface FilterValueGroupI {
3
- type: FilterGroupType;
4
- items: {
5
- [key: string]: boolean;
6
- };
7
- }
1
+ import { FilterGroupType } from "./FilterGroupType";
2
+ export interface FilterValueGroupI {
3
+ type: FilterGroupType;
4
+ items: {
5
+ [key: string]: boolean;
6
+ };
7
+ }
@@ -1,8 +1,8 @@
1
- import { FilterResponseI } from "./FilterResponse.interface";
2
- import HttpAbortableLoader from "@claspo/common/HttpAbortableLoader";
3
- export default class HttpFilterLoader extends HttpAbortableLoader {
4
- private filterResponse;
5
- constructor(url: any, headers?: {});
6
- load(): Promise<FilterResponseI>;
7
- private map;
8
- }
1
+ import { FilterResponseI } from "./FilterResponse.interface";
2
+ import HttpAbortableLoader from "@claspo/common/HttpAbortableLoader";
3
+ export default class HttpFilterLoader extends HttpAbortableLoader {
4
+ private filterResponse;
5
+ constructor(url: any, headers?: {});
6
+ load(): Promise<FilterResponseI>;
7
+ private map;
8
+ }
@@ -1,17 +1,17 @@
1
- import { FilterResponseI } from "./FilterResponse.interface";
2
- import TemplateBriefI from "../TemplateBrief.interface";
3
- import TemplateFilterDatasourceI from "./TemplateFilterDatasource.interface";
4
- import { FilterGroupI } from "./FilterGroup.interface";
5
- export default class TemplateFilterDatasource implements TemplateFilterDatasourceI {
6
- private envManager;
7
- private filterLoader;
8
- private filterGroups;
9
- private initialFilters;
10
- constructor(initialFilters?: FilterGroupI[]);
11
- get(items?: TemplateBriefI[]): Promise<FilterResponseI>;
12
- getAllFilterGroups(): Promise<FilterResponseI>;
13
- getAllFilterGroupsSync(): FilterResponseI;
14
- getInitialFilters(): FilterGroupI[];
15
- private filter;
16
- static sort(filterGroups: FilterResponseI): FilterResponseI;
17
- }
1
+ import { FilterResponseI } from "./FilterResponse.interface";
2
+ import TemplateBriefI from "../TemplateBrief.interface";
3
+ import TemplateFilterDatasourceI from "./TemplateFilterDatasource.interface";
4
+ import { FilterGroupI } from "./FilterGroup.interface";
5
+ export default class TemplateFilterDatasource implements TemplateFilterDatasourceI {
6
+ private envManager;
7
+ private filterLoader;
8
+ private filterGroups;
9
+ private initialFilters;
10
+ constructor(initialFilters?: FilterGroupI[]);
11
+ get(items?: TemplateBriefI[]): Promise<FilterResponseI>;
12
+ getAllFilterGroups(): Promise<FilterResponseI>;
13
+ getAllFilterGroupsSync(): FilterResponseI;
14
+ getInitialFilters(): FilterGroupI[];
15
+ private filter;
16
+ static sort(filterGroups: FilterResponseI): FilterResponseI;
17
+ }
@@ -1,9 +1,9 @@
1
- import { FilterResponseI } from "./FilterResponse.interface";
2
- import TemplateBriefI from "../TemplateBrief.interface";
3
- interface TemplateFilterDatasourceI {
4
- get(items: TemplateBriefI[]): Promise<FilterResponseI>;
5
- getAllFilterGroups(): Promise<FilterResponseI>;
6
- getAllFilterGroupsSync(): FilterResponseI;
7
- getInitialFilters(): FilterResponseI;
8
- }
9
- export default TemplateFilterDatasourceI;
1
+ import { FilterResponseI } from "./FilterResponse.interface";
2
+ import TemplateBriefI from "../TemplateBrief.interface";
3
+ interface TemplateFilterDatasourceI {
4
+ get(items: TemplateBriefI[]): Promise<FilterResponseI>;
5
+ getAllFilterGroups(): Promise<FilterResponseI>;
6
+ getAllFilterGroupsSync(): FilterResponseI;
7
+ getInitialFilters(): FilterResponseI;
8
+ }
9
+ export default TemplateFilterDatasourceI;
@@ -1,11 +1,11 @@
1
- import { FilterValueI } from "./FilterValue.interface";
2
- declare const TemplateFilterObserver_base: any;
3
- export default class TemplateFilterObserver extends TemplateFilterObserver_base {
4
- static FILTER_CHANGED_EVENT_NAME: string;
5
- constructor();
6
- next(value: FilterValueI): void;
7
- subscribe(listener: (value: FilterValueI) => void): {
8
- off: () => void;
9
- };
10
- }
11
- export {};
1
+ import { FilterValueI } from "./FilterValue.interface";
2
+ declare const TemplateFilterObserver_base: any;
3
+ export default class TemplateFilterObserver extends TemplateFilterObserver_base {
4
+ static FILTER_CHANGED_EVENT_NAME: string;
5
+ constructor();
6
+ next(value: FilterValueI): void;
7
+ subscribe(listener: (value: FilterValueI) => void): {
8
+ off: () => void;
9
+ };
10
+ }
11
+ export {};
@@ -1,2 +1,2 @@
1
- import { FilterGroupType } from "./FilterGroupType";
2
- export default function mapFilterGroupTypeToTemplateField(t: FilterGroupType): string | null;
1
+ import { FilterGroupType } from "./FilterGroupType";
2
+ export default function mapFilterGroupTypeToTemplateField(t: FilterGroupType): string | null;
@@ -1,2 +1,2 @@
1
- import { GridOptionsI } from "./GridOptions.interface";
2
- export declare let defaultGridOptions: GridOptionsI;
1
+ import { GridOptionsI } from "./GridOptions.interface";
2
+ export declare let defaultGridOptions: GridOptionsI;
@@ -1,6 +1,6 @@
1
- export declare enum GridAlgorithm {
2
- WIDTH_FIRST = "WIDTH_FIRST",
3
- DEFAULT = "DEFAULT",
4
- WEIGHT_FIRST = "WEIGHT_FIRST",
5
- SIMILAR_RANDOM_WEIGHT = "SIMILAR_RANDOM_WEIGHT"
6
- }
1
+ export declare enum GridAlgorithm {
2
+ WIDTH_FIRST = "WIDTH_FIRST",
3
+ DEFAULT = "DEFAULT",
4
+ WEIGHT_FIRST = "WEIGHT_FIRST",
5
+ SIMILAR_RANDOM_WEIGHT = "SIMILAR_RANDOM_WEIGHT"
6
+ }
@@ -1,7 +1,7 @@
1
- import { GridAlgorithm } from "./GridAlgorithm.enum";
2
- export interface GridOptionsI {
3
- algorithm: GridAlgorithm;
4
- zoomIndex: number;
5
- rowGapPx: number;
6
- gridGapPx: number;
7
- }
1
+ import { GridAlgorithm } from "./GridAlgorithm.enum";
2
+ export interface GridOptionsI {
3
+ algorithm: GridAlgorithm;
4
+ zoomIndex: number;
5
+ rowGapPx: number;
6
+ gridGapPx: number;
7
+ }
@@ -1,17 +1,17 @@
1
- import { GridPreviewInitParamsI } from './GridPreviewInit.interface';
2
- export default class GridPreview {
3
- private documentConnector;
4
- private viewComponentResourcesLoadedListener;
5
- init(params: GridPreviewInitParamsI): HTMLElement;
6
- destroy(): void;
7
- private renderDynamicPreviewInIframe;
8
- private setWidgetStyles;
9
- private shouldBeResized;
10
- private resizeUntilScrollbarDisappears;
11
- private adjustWidgetSize;
12
- private applyScaleToPreviewInIframe;
13
- private getWidgetWidth;
14
- private getWidgetHeight;
15
- private addClickHandlerToItem;
16
- private createLoaderElement;
17
- }
1
+ import { GridPreviewInitParamsI } from './GridPreviewInit.interface';
2
+ export default class GridPreview {
3
+ private documentConnector;
4
+ private viewComponentResourcesLoadedListener;
5
+ init(params: GridPreviewInitParamsI): HTMLElement;
6
+ destroy(): void;
7
+ private renderDynamicPreviewInIframe;
8
+ private setWidgetStyles;
9
+ private shouldBeResized;
10
+ private resizeUntilScrollbarDisappears;
11
+ private adjustWidgetSize;
12
+ private applyScaleToPreviewInIframe;
13
+ private getWidgetWidth;
14
+ private getWidgetHeight;
15
+ private addClickHandlerToItem;
16
+ private createLoaderElement;
17
+ }
@@ -1,21 +1,21 @@
1
- import { ClDocumentI } from '@claspo/common/document/Document.interface';
2
- import { PrizePoolModelI } from '@claspo/common/PrizePool.interface';
3
- import { LayoutType } from '@claspo/common/LayoutType';
4
- import { WidgetType } from '@claspo/common/WidgetType';
5
- export interface GridPreviewInitParamsI {
6
- layoutType: LayoutType;
7
- widgetType: WidgetType;
8
- documentModel: ClDocumentI;
9
- width: number;
10
- height: number;
11
- staticResourcesUrl: string;
12
- hostUrl?: string;
13
- prizePoolModels?: PrizePoolModelI[];
14
- id?: number;
15
- clickCallback?: () => void;
16
- containerCssClasses?: string[];
17
- templateVisibleCallback?: () => void;
18
- bundledComponentClasses?: any[];
19
- useDefaultBundledComponentClasses?: boolean;
20
- productKeyPrefix?: string;
21
- }
1
+ import { ClDocumentI } from '@claspo/common/document/Document.interface';
2
+ import { PrizePoolModelI } from '@claspo/common/PrizePool.interface';
3
+ import { LayoutType } from '@claspo/common/LayoutType';
4
+ import { WidgetType } from '@claspo/common/WidgetType';
5
+ export interface GridPreviewInitParamsI {
6
+ layoutType: LayoutType;
7
+ widgetType: WidgetType;
8
+ documentModel: ClDocumentI;
9
+ width: number;
10
+ height: number;
11
+ staticResourcesUrl: string;
12
+ hostUrl?: string;
13
+ prizePoolModels?: PrizePoolModelI[];
14
+ id?: number;
15
+ clickCallback?: () => void;
16
+ containerCssClasses?: string[];
17
+ templateVisibleCallback?: () => void;
18
+ bundledComponentClasses?: any[];
19
+ useDefaultBundledComponentClasses?: boolean;
20
+ productKeyPrefix?: string;
21
+ }
package/helpers.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import TemplateBriefI from './TemplateBrief.interface';
2
- import { SizeModelI } from './data/strategies/width-based-strategy/width-first-algorithm/sizeModelI';
3
- declare const createModel: (id: number, widthPx: number, heightPx: number) => SizeModelI;
4
- declare function createSizeModel(id: number, widthPx: number, heightPx: number, heightPercent: number): SizeModelI;
5
- declare function createTemplateBrief(id: number, width: string | number | null, height: string | number | null, fallbackWeight: number): TemplateBriefI;
6
- declare function createDocumentModelShell(): Record<string, any>;
7
- export { createModel, createSizeModel, createTemplateBrief, createDocumentModelShell };
1
+ import TemplateBriefI from './TemplateBrief.interface';
2
+ import { SizeModelI } from './data/strategies/width-based-strategy/width-first-algorithm/sizeModelI';
3
+ declare const createModel: (id: number, widthPx: number, heightPx: number) => SizeModelI;
4
+ declare function createSizeModel(id: number, widthPx: number, heightPx: number, heightPercent: number): SizeModelI;
5
+ declare function createTemplateBrief(id: number, width: string | number | null, height: string | number | null, fallbackWeight: number): TemplateBriefI;
6
+ declare function createDocumentModelShell(): Record<string, any>;
7
+ export { createModel, createSizeModel, createTemplateBrief, createDocumentModelShell };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claspo/templates",
3
- "version": "16.3.6",
3
+ "version": "16.4.0",
4
4
  "engines": {
5
5
  "node": ">=18.16.0"
6
6
  },
@@ -12,10 +12,10 @@
12
12
  "package": "npm i && npm run test && npm run build && cp package.json out && cd out && npm publish --access=public && cd .."
13
13
  },
14
14
  "dependencies": {
15
- "@claspo/common": "7.3.0",
16
- "@claspo/document-connector": "16.7.14",
17
- "@claspo/renderer": "18.7.5",
18
- "@claspo/components": "1.10.2"
15
+ "@claspo/common": "7.4.0",
16
+ "@claspo/document-connector": "16.9.0",
17
+ "@claspo/renderer": "18.8.0",
18
+ "@claspo/components": "1.10.6"
19
19
  },
20
20
  "devDependencies": {
21
21
  "@types/jest": "^27.5.1",
@@ -1,14 +1,14 @@
1
- import TemplateBriefI from "../TemplateBrief.interface";
2
- import TemplateDatasourceI from "../TemplateDatasource.interface";
3
- export default class TemplateSlider {
4
- private datasource;
5
- private currentTemplate;
6
- constructor(datasource: TemplateDatasourceI);
7
- setCurrent(template: TemplateBriefI): void;
8
- getCurrent(): TemplateBriefI | null;
9
- getPrev(): TemplateBriefI | null;
10
- getNext(): TemplateBriefI | null;
11
- hasPrev(): boolean;
12
- hasNext(): boolean;
13
- private getCurrentIndex;
14
- }
1
+ import TemplateBriefI from "../TemplateBrief.interface";
2
+ import TemplateDatasourceI from "../TemplateDatasource.interface";
3
+ export default class TemplateSlider {
4
+ private datasource;
5
+ private currentTemplate;
6
+ constructor(datasource: TemplateDatasourceI);
7
+ setCurrent(template: TemplateBriefI): void;
8
+ getCurrent(): TemplateBriefI | null;
9
+ getPrev(): TemplateBriefI | null;
10
+ getNext(): TemplateBriefI | null;
11
+ hasPrev(): boolean;
12
+ hasNext(): boolean;
13
+ private getCurrentIndex;
14
+ }