Compare commits

..

8 Commits

Author SHA1 Message Date
6e680085a4 1.0.215 2023-09-22 20:02:49 +02:00
286a843b67 fix(core): update 2023-09-22 20:02:48 +02:00
df7c5ebafc 1.0.214 2023-09-22 19:42:23 +02:00
9927323a9d fix(core): update 2023-09-22 19:42:23 +02:00
66f3e66c8b 1.0.213 2023-09-22 19:04:03 +02:00
c68b0c5090 fix(core): update 2023-09-22 19:04:02 +02:00
53ac03507d 1.0.212 2023-09-22 13:15:34 +02:00
0031b51bcf fix(core): update 2023-09-22 13:15:34 +02:00
5 changed files with 34 additions and 31 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@design.estate/dees-catalog",
"version": "1.0.211",
"version": "1.0.215",
"private": false,
"description": "website for lossless.com",
"main": "dist_ts_web/index.js",

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@design.estate/dees-catalog',
version: '1.0.211',
version: '1.0.215',
description: 'website for lossless.com'
}

View File

@ -54,6 +54,7 @@ import {
faMinus as faMinusSolid,
faPaste as faPasteSolid,
faPenToSquare as faPenToSquareSolid,
faPlus as faPlusSolid,
faRss as faRssSolid,
faUsers as faUsersSolid,
faShare as faShareSolid,
@ -68,51 +69,34 @@ export const faIcons = {
// normal
arrowRight: faArrowRightSolid,
arrowUpRightFromSquare: faArrowUpRightFromSquareSolid,
arrowUpRightFromSquareSolid: faArrowUpRightFromSquareSolid,
bell: faBellSolid,
bellSolid: faBellSolid,
bug: faBugSolid,
bugSolid: faBugSolid,
building: faBuildingSolid,
buildingSolid: faBuildingSolid,
caretLeft: faCaretLeftSolid,
caretLeftSolid: faCaretLeftSolid,
caretRight: faCaretRightSolid,
caretRightSolid: faCaretRightSolid,
check: faCheckSolid,
checkSolid: faCheckSolid,
circleInfo: faCircleInfoSolid,
circleInfoSolid: faCircleInfoSolid,
circleCheck: faCircleCheckRegular,
circleCheckSolid: faCircleCheckSolid,
circleXmark: faCircleXmarkRegular,
circleXmarkSolid: faCircleXmarkSolid,
clockRotateLeft: faClockRotateLeftSolid,
clockRotateLeftSolid: faClockRotateLeftSolid,
copy: faCopyRegular,
copySolid: faCopySolid,
desktop: faDesktopSolid,
desktopSolid: faDesktopSolid,
eye: faEyeSolid,
eyeSolid: faEyeSolid,
eyeSlash: faEyeSlashSolid,
eyeSlashSolid: faEyeSlashSolid,
grip: faGripSolid,
gripSolid: faGripSolid,
message: faMessageRegular,
messageSolid: faMessageSolid,
mugHot: faMugHotSolid,
mugHotSolid: faMugHotSolid,
minus: faMinusSolid,
minusSolid: faMinusSolid,
paste: faPasteRegular,
pasteSolid: faPasteSolid,
penToSquare: faPenToSquareSolid,
penToSquareSolid: faPenToSquareSolid,
plus: faPlusSolid,
rss: faRssSolid,
rssSolid: faRssSolid,
share: faShareSolid,
shareSolid: faShareSolid,
sun: faSunRegular,
sunSolid: faSunSolid,
trash: faTrashSolid,
@ -121,7 +105,6 @@ export const faIcons = {
trashCanSolid: faTrashCanSolid,
users: faUsersSolid,
xmark: faXmarkSolid,
xmarkSolid: faXmarkSolid,
// brands
facebook: faFacebook,
google: faGoogle,

View File

@ -58,8 +58,8 @@ export const demoFunc = () => html`
iconName: 'bell',
useTableBehaviour: 'upload',
type: ['inRow'],
actionFunc: async (itemArg) => {
alert(itemArg.amount);
actionFunc: async (optionsArg) => {
alert(optionsArg.item.amount);
},
},
{
@ -112,7 +112,7 @@ export const demoFunc = () => html`
type: ['doubleClick', 'contextmenu'],
iconName: 'eye',
actionFunc: async (itemArg) => {
alert(itemArg.amount);
alert(itemArg.item.amount);
return null;
},
}

View File

@ -57,7 +57,12 @@ export interface ITableAction<T = any> {
* @param itemArg
* @returns
*/
actionFunc: (itemArg: T) => Promise<any>;
actionFunc: (actionDataArg: ITableActionDataArg<T>) => Promise<any>;
}
export interface ITableActionDataArg<T> {
item: T,
table: DeesTable<T>,
}
export type TDisplayFunction<T = any> = (itemArg: T) => object;
@ -117,7 +122,7 @@ export class DeesTable<T> extends DeesElement {
public files: File[] = [];
public fileWeakMap = new WeakMap();
public itemChangeSubject = new domtools.plugins.smartrx.rxjs.Subject();
public dataChangeSubject = new domtools.plugins.smartrx.rxjs.Subject();
constructor() {
super();
@ -339,7 +344,10 @@ export class DeesTable<T> extends DeesElement {
html`<div
class="headerAction"
@click=${() => {
action.actionFunc(this.selectedDataRow);
action.actionFunc({
item: this.selectedDataRow,
table: this,
});
}}
>
${action.iconName
@ -439,7 +447,10 @@ export class DeesTable<T> extends DeesElement {
name: action.name,
iconName: action.iconName as any,
action: async () => {
await action.actionFunc(itemArg);
await action.actionFunc({
item: itemArg,
table: this,
});
return null;
},
};
@ -460,7 +471,10 @@ export class DeesTable<T> extends DeesElement {
actionArg.type.includes('doubleClick')
);
if (wantedAction) {
wantedAction.actionFunc(itemArg);
wantedAction.actionFunc({
item: itemArg,
table: this,
});
}
}
}}
@ -477,7 +491,10 @@ export class DeesTable<T> extends DeesElement {
${this.getActionsForType('inRow').map(
(actionArg) => html`<div
class="action"
@click=${() => actionArg.actionFunc(itemArg)}
@click=${() => actionArg.actionFunc({
item: itemArg,
table: this,
})}
>
${actionArg.iconName
? html`
@ -513,7 +530,10 @@ export class DeesTable<T> extends DeesElement {
html`<div
class="footerAction"
@click=${() => {
action.actionFunc(this.selectedDataRow);
action.actionFunc({
item: this.selectedDataRow,
table: this,
});
}}
>
${action.iconName