pds-dev-kit-web-test 2.3.9 → 2.3.11

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 (52) hide show
  1. package/dist/src/sub/DynamicLayout/components/SectionMatcher/SectionMatcher.js +3 -0
  2. package/dist/src/sub/DynamicLayout/pagesPreviewMock.d.ts +1112 -446
  3. package/dist/src/sub/DynamicLayout/pagesPreviewMock.js +2071 -814
  4. package/dist/src/sub/DynamicLayout/sectionActionTypes.d.ts +10 -0
  5. package/dist/src/sub/DynamicLayout/sections/CustomSection/CustomSection.d.ts +6 -0
  6. package/dist/src/sub/DynamicLayout/sections/CustomSection/CustomSection.js +79 -64
  7. package/dist/src/sub/DynamicLayout/sections/CustomSection/NewCustomSection.d.ts +3 -0
  8. package/dist/src/sub/DynamicLayout/sections/CustomSection/NewCustomSection.js +70 -0
  9. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/ComponentBlockMatcher.d.ts +2 -1
  10. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/ComponentBlockMatcher.js +3 -3
  11. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Button/Button.js +1 -1
  12. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text/Text.d.ts +3 -1
  13. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text/Text.js +57 -1
  14. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text/index.d.ts +1 -0
  15. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text/index.js +8 -0
  16. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/components/S_CB_Box.js +1 -1
  17. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/index.d.ts +1 -1
  18. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/index.js +3 -3
  19. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/index.d.ts +1 -1
  20. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/index.js +2 -2
  21. package/dist/src/sub/DynamicLayout/sections/CustomSection/customSectionContext.d.ts +10 -0
  22. package/dist/src/sub/DynamicLayout/sections/CustomSection/customSectionContext.js +21 -0
  23. package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/textUtil.js +12 -1
  24. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parsePlacement.d.ts +3 -1
  25. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parsePlacement.js +7 -4
  26. package/dist/src/sub/DynamicLayout/sections/TempCustomSection/FlexGridItem.d.ts +11 -0
  27. package/dist/src/sub/DynamicLayout/sections/TempCustomSection/FlexGridItem.js +69 -0
  28. package/dist/src/sub/DynamicLayout/sections/TempCustomSection/TempCustomSection.d.ts +7 -0
  29. package/dist/src/sub/DynamicLayout/sections/TempCustomSection/TempCustomSection.js +87 -0
  30. package/dist/src/sub/DynamicLayout/sections/TempCustomSection/useIsMounted.d.ts +1 -0
  31. package/dist/src/sub/DynamicLayout/sections/TempCustomSection/useIsMounted.js +15 -0
  32. package/dist/src/sub/DynamicLayout/sections/TempCustomSection/useResizableObserver.d.ts +12 -0
  33. package/dist/src/sub/DynamicLayout/sections/TempCustomSection/useResizableObserver.js +74 -0
  34. package/package.json +5 -2
  35. package/dist/src/sub/SandollFontKit/api/getSandollFonts.d.ts +0 -14
  36. package/dist/src/sub/SandollFontKit/api/getSandollFonts.js +0 -247
  37. package/dist/src/sub/SandollFontKit/api/types.d.ts +0 -50
  38. package/dist/src/sub/SandollFontKit/api/types.js +0 -2
  39. package/dist/src/sub/SandollFontKit/constants.d.ts +0 -9
  40. package/dist/src/sub/SandollFontKit/constants.js +0 -33
  41. package/dist/src/sub/SandollFontKit/headless/SandollFontItem.d.ts +0 -13
  42. package/dist/src/sub/SandollFontKit/headless/SandollFontItem.js +0 -64
  43. package/dist/src/sub/SandollFontKit/headless/SandollFontsList.d.ts +0 -18
  44. package/dist/src/sub/SandollFontKit/headless/SandollFontsList.js +0 -74
  45. package/dist/src/sub/SandollFontKit/hooks/useQueryParamsReducer.d.ts +0 -30
  46. package/dist/src/sub/SandollFontKit/hooks/useQueryParamsReducer.js +0 -69
  47. package/dist/src/sub/SandollFontKit/index.d.ts +0 -5
  48. package/dist/src/sub/SandollFontKit/index.js +0 -28
  49. package/dist/src/sub/SandollFontKit/types.d.ts +0 -14
  50. package/dist/src/sub/SandollFontKit/types.js +0 -2
  51. package/dist/src/sub/SandollFontKit/utils/createSandollFontLink.d.ts +0 -2
  52. package/dist/src/sub/SandollFontKit/utils/createSandollFontLink.js +0 -24
@@ -1,69 +0,0 @@
1
- "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
14
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
15
- if (ar || !(i in from)) {
16
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
17
- ar[i] = from[i];
18
- }
19
- }
20
- return to.concat(ar || Array.prototype.slice.call(from));
21
- };
22
- Object.defineProperty(exports, "__esModule", { value: true });
23
- exports.useQueryParamsReducer = exports.DEFAULT_QUERY_PARAMS = void 0;
24
- var react_1 = require("react");
25
- // Initial state
26
- exports.DEFAULT_QUERY_PARAMS = {
27
- pagination: {
28
- page: 1,
29
- limit: 100
30
- },
31
- searchQuery: {
32
- usecase: 'EDITOR',
33
- searchTerm: ''
34
- },
35
- filter: {
36
- sort: 'date',
37
- order: 'ASC'
38
- },
39
- categories: ['blackLetter', 'deco', 'round', 'sans-serif', 'script', 'serif', 'slab', 'symbol']
40
- };
41
- // Reducer function
42
- function queryParamsReducer(state, action) {
43
- switch (action.type) {
44
- case 'SET_PAGE':
45
- return __assign(__assign({}, state), { pagination: __assign(__assign({}, state.pagination), { page: action.payload }) });
46
- case 'SET_LIMIT':
47
- return __assign(__assign({}, state), { pagination: __assign(__assign({}, state.pagination), { limit: action.payload }) });
48
- case 'SET_SEARCH_TERM':
49
- return __assign(__assign({}, state), { searchQuery: __assign(__assign({}, state.searchQuery), { searchTerm: action.payload }) });
50
- case 'SET_SORT':
51
- return __assign(__assign({}, state), { filter: __assign(__assign({}, state.filter), { sort: action.payload }) });
52
- case 'SET_ORDER':
53
- return __assign(__assign({}, state), { filter: __assign(__assign({}, state.filter), { order: action.payload }) });
54
- case 'TOGGLE_CATEGORIES': {
55
- var category_1 = action.payload;
56
- var categories = state.categories.includes(category_1)
57
- ? state.categories.filter(function (c) { return c !== category_1; })
58
- : __spreadArray(__spreadArray([], state.categories, true), [category_1], false);
59
- return __assign(__assign({}, state), { categories: categories });
60
- }
61
- default:
62
- return state;
63
- }
64
- }
65
- // Usage of useReducer with the defined reducer and initial state
66
- function useQueryParamsReducer(initialQueryParams) {
67
- return (0, react_1.useReducer)(queryParamsReducer, initialQueryParams);
68
- }
69
- exports.useQueryParamsReducer = useQueryParamsReducer;
@@ -1,5 +0,0 @@
1
- export { default as SandollFontItem } from './headless/SandollFontItem';
2
- export { default as SandollFontsList } from './headless/SandollFontsList';
3
- export { default as createSandollFontLink } from './utils/createSandollFontLink';
4
- export * from './types';
5
- export * from './constants';
@@ -1,28 +0,0 @@
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
- var __importDefault = (this && this.__importDefault) || function (mod) {
17
- return (mod && mod.__esModule) ? mod : { "default": mod };
18
- };
19
- Object.defineProperty(exports, "__esModule", { value: true });
20
- exports.createSandollFontLink = exports.SandollFontsList = exports.SandollFontItem = void 0;
21
- var SandollFontItem_1 = require("./headless/SandollFontItem");
22
- Object.defineProperty(exports, "SandollFontItem", { enumerable: true, get: function () { return __importDefault(SandollFontItem_1).default; } });
23
- var SandollFontsList_1 = require("./headless/SandollFontsList");
24
- Object.defineProperty(exports, "SandollFontsList", { enumerable: true, get: function () { return __importDefault(SandollFontsList_1).default; } });
25
- var createSandollFontLink_1 = require("./utils/createSandollFontLink");
26
- Object.defineProperty(exports, "createSandollFontLink", { enumerable: true, get: function () { return __importDefault(createSandollFontLink_1).default; } });
27
- __exportStar(require("./types"), exports);
28
- __exportStar(require("./constants"), exports);
@@ -1,14 +0,0 @@
1
- import type { SandollFont } from './api/types';
2
- import type { PDSIconType } from '../../common/types';
3
- export type SANDOLL_Font = SandollFont;
4
- export type SANDOLL_CategoryType = 'serif' | 'sans-serif' | 'slab' | 'round' | 'script' | 'deco' | 'symbol' | 'blackLetter';
5
- export type SANDOLL_SortOptionType = 'date' | 'alpha';
6
- export type SANDOLL_CategoryIconType = Record<SANDOLL_CategoryType, PDSIconType>;
7
- export type SANDOLL_FilterOptionHandlerArgType = {
8
- name: 'searchQuery';
9
- value: string;
10
- } | {
11
- name: 'categories';
12
- value: SANDOLL_CategoryType[];
13
- };
14
- export type SANDOLL_ChangeFilterOptionHandler = (arg: SANDOLL_FilterOptionHandlerArgType) => void;
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- declare function createSandollFontLink(href: string, id?: string): void;
2
- export default createSandollFontLink;
@@ -1,24 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- // href: CSS_URI_FOR_PUBL_OR_INDIVIDUAL_URI
4
- var SANDOLL_LINK_ID = 'sandoll-css-link';
5
- function createSandollFontLink(href, id) {
6
- if (id === void 0) { id = SANDOLL_LINK_ID; }
7
- try {
8
- var sandollLink = document.getElementById(id);
9
- if (sandollLink) {
10
- sandollLink.setAttribute('href', href);
11
- return;
12
- }
13
- var linkTag = document.createElement('link');
14
- linkTag.setAttribute('rel', 'stylesheet');
15
- linkTag.setAttribute('charset', 'utf-8');
16
- linkTag.setAttribute('href', href);
17
- linkTag.id = 'sandoll-css-link';
18
- document.head.appendChild(linkTag);
19
- }
20
- catch (error) {
21
- console.error(error);
22
- }
23
- }
24
- exports.default = createSandollFontLink;