@pronto-tools-and-more/components 9.3.0 → 9.5.0

Sign up to get free protection for your applications and to get access to all the features.
package/dist/main.js CHANGED
@@ -242,7 +242,25 @@ var Heading = ({
242
242
  };
243
243
 
244
244
  // src/parts/CreateFilterFromProperties/CreateFilterFromProperties.ts
245
- var createFilterFromProperties = (properties) => {
245
+ var createFilterFromProperties = ({
246
+ properties,
247
+ authorId
248
+ }) => {
249
+ if (authorId) {
250
+ return [
251
+ {
252
+ taxonomies: {
253
+ content: {
254
+ value: {
255
+ id: {
256
+ value: authorId
257
+ }
258
+ }
259
+ }
260
+ }
261
+ }
262
+ ];
263
+ }
246
264
  const entries = Object.entries(properties);
247
265
  if (entries.length === 0) {
248
266
  return [];
@@ -272,9 +290,13 @@ var createFilterFromProperties = (properties) => {
272
290
  // src/parts/IssueList/IssueList.tsx
273
291
  var IssueList = ({
274
292
  properties,
275
- render
293
+ render,
294
+ authorId
276
295
  }) => {
277
- const additionalFilter = createFilterFromProperties(properties);
296
+ const additionalFilter = createFilterFromProperties({
297
+ properties,
298
+ authorId
299
+ });
278
300
  const json = {
279
301
  render,
280
302
  dataSource: {
@@ -338,9 +360,19 @@ var Link = ({
338
360
  to,
339
361
  message,
340
362
  className,
341
- icon
363
+ icon,
364
+ iconPosition
342
365
  }) => {
343
- const fullMessage = icon ? `<span class="LinkContent"><span>${message}</span><div class="MaskIcon MaskIcon${icon}"></div>` : `<span class="LinkContent">${message}</span>`;
366
+ let fullMessage;
367
+ if (icon) {
368
+ if (iconPosition === "left") {
369
+ fullMessage = `<span class="LinkContent"><div class="MaskIcon MaskIcon${icon}"></div><span>${message}</span></span>`;
370
+ } else {
371
+ fullMessage = `<span class="LinkContent"><span>${message}</span><div class="MaskIcon MaskIcon${icon}"></div></span>`;
372
+ }
373
+ } else {
374
+ fullMessage = `<span class="LinkContent">${message}</span>`;
375
+ }
344
376
  const json = {
345
377
  type: "button",
346
378
  tap: {
@@ -1 +1,4 @@
1
- export declare const createFilterFromProperties: (properties: any) => any[];
1
+ export declare const createFilterFromProperties: ({ properties, authorId, }: {
2
+ properties: any;
3
+ authorId?: string;
4
+ }) => any[];
@@ -1,5 +1,6 @@
1
1
  import { IssueListItemRenderer } from "../IssueListItemRenderer/IssueListItemRenderer.ts";
2
- export declare const IssueList: ({ properties, render, }: {
2
+ export declare const IssueList: ({ properties, render, authorId, }: {
3
3
  properties: any;
4
+ authorId?: string;
4
5
  render: IssueListItemRenderer;
5
6
  }) => import("react").JSX.Element;
@@ -1,6 +1,8 @@
1
- export declare const Link: ({ to, message, className, icon, }: {
1
+ export type LinkIconPosition = 'left' | 'right';
2
+ export declare const Link: ({ to, message, className, icon, iconPosition, }: {
2
3
  to: string;
3
4
  message: string;
4
5
  className?: string;
5
6
  icon?: string;
7
+ iconPosition?: LinkIconPosition;
6
8
  }) => import("react").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pronto-tools-and-more/components",
3
- "version": "9.3.0",
3
+ "version": "9.5.0",
4
4
  "description": "",
5
5
  "main": "dist/main.js",
6
6
  "types": "dist/main.d.ts",