@design.estate/dees-catalog 1.0.223 → 1.0.225

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.
@@ -8385,7 +8385,7 @@ var require_core = __commonJS({
8385
8385
  var HLJS = function(hljs) {
8386
8386
  const languages = /* @__PURE__ */ Object.create(null);
8387
8387
  const aliases = /* @__PURE__ */ Object.create(null);
8388
- const plugins9 = [];
8388
+ const plugins8 = [];
8389
8389
  let SAFE_MODE = true;
8390
8390
  const LANGUAGE_NOT_FOUND = "Could not find the language '{}', did you forget to load/include a language module?";
8391
8391
  const PLAINTEXT_LANGUAGE = { disableAutodetect: true, name: "Plain text", contains: [] };
@@ -8954,17 +8954,17 @@ var require_core = __commonJS({
8954
8954
  }
8955
8955
  function addPlugin(plugin) {
8956
8956
  upgradePluginAPI(plugin);
8957
- plugins9.push(plugin);
8957
+ plugins8.push(plugin);
8958
8958
  }
8959
8959
  function removePlugin(plugin) {
8960
- const index = plugins9.indexOf(plugin);
8960
+ const index = plugins8.indexOf(plugin);
8961
8961
  if (index !== -1) {
8962
- plugins9.splice(index, 1);
8962
+ plugins8.splice(index, 1);
8963
8963
  }
8964
8964
  }
8965
8965
  function fire(event, args) {
8966
8966
  const cb = event;
8967
- plugins9.forEach(function(plugin) {
8967
+ plugins8.forEach(function(plugin) {
8968
8968
  if (plugin[cb]) {
8969
8969
  plugin[cb](args);
8970
8970
  }
@@ -69438,7 +69438,6 @@ var DeesInputText = class extends DeesElement {
69438
69438
  super(...arguments);
69439
69439
  // INSTANCE
69440
69440
  this.changeSubject = new smartrx_plugins_rxjs_exports.Subject();
69441
- this.valueChangeSubject = new smartrx_plugins_rxjs_exports.Subject();
69442
69441
  this.value = "";
69443
69442
  this.required = false;
69444
69443
  this.disabled = false;
@@ -69530,7 +69529,6 @@ var DeesInputText = class extends DeesElement {
69530
69529
  const target = eventArg.target;
69531
69530
  this.value = target.value;
69532
69531
  this.changeSubject.next(this);
69533
- this.valueChangeSubject.next(this.value);
69534
69532
  }
69535
69533
  async freeze() {
69536
69534
  this.disabled = true;
@@ -69838,12 +69836,733 @@ DeesInputRadio = __decorateClass([
69838
69836
  e7("dees-input-radio")
69839
69837
  ], DeesInputRadio);
69840
69838
 
69839
+ // ts_web/elements/dees-table.demo.ts
69840
+ var demoFunc5 = () => x`
69841
+ <style>
69842
+ .demoWrapper {
69843
+ box-sizing: border-box;
69844
+ position: absolute;
69845
+ width: 100%;
69846
+ height: 100%;
69847
+ padding: 20px;
69848
+ background: #000000;
69849
+ }
69850
+ </style>
69851
+ <div class="demoWrapper">
69852
+ <dees-table
69853
+ heading1="Current Account Statement"
69854
+ heading2="Bunq - Payment Account 2 - April 2021"
69855
+ .editableFields="${["description"]}"
69856
+ .data=${[
69857
+ {
69858
+ date: "2021-04-01",
69859
+ amount: "2464.65 \u20AC",
69860
+ description: "Printing Paper (Office Supplies) - STAPLES BREMEN"
69861
+ },
69862
+ {
69863
+ date: "2021-04-02",
69864
+ amount: "165.65 \u20AC",
69865
+ description: "Logitech Mouse (Hardware) - logi.com OnlineShop"
69866
+ },
69867
+ {
69868
+ date: "2021-04-03",
69869
+ amount: "2999,00 \u20AC",
69870
+ description: "Macbook Pro 16inch (Hardware) - Apple.de OnlineShop"
69871
+ },
69872
+ {
69873
+ date: "2021-04-01",
69874
+ amount: "2464.65 \u20AC",
69875
+ description: "Office-Supplies - STAPLES BREMEN"
69876
+ },
69877
+ {
69878
+ date: "2021-04-01",
69879
+ amount: "2464.65 \u20AC",
69880
+ description: "Office-Supplies - STAPLES BREMEN"
69881
+ }
69882
+ ]}
69883
+ dataName="transactions"
69884
+ .dataActions="${[
69885
+ {
69886
+ name: "upload",
69887
+ iconName: "bell",
69888
+ useTableBehaviour: "upload",
69889
+ type: ["inRow"],
69890
+ actionFunc: async (optionsArg) => {
69891
+ alert(optionsArg.item.amount);
69892
+ }
69893
+ },
69894
+ {
69895
+ name: "visibility",
69896
+ iconName: "copy",
69897
+ type: ["inRow"],
69898
+ useTableBehaviour: "preview",
69899
+ actionFunc: async (itemArg) => {
69900
+ }
69901
+ },
69902
+ {
69903
+ name: "create new",
69904
+ iconName: "instagram",
69905
+ type: ["header"],
69906
+ useTableBehaviour: "preview",
69907
+ actionFunc: async (itemArg) => {
69908
+ }
69909
+ },
69910
+ {
69911
+ name: "to gallery",
69912
+ iconName: "message",
69913
+ type: ["footer"],
69914
+ useTableBehaviour: "preview",
69915
+ actionFunc: async (itemArg) => {
69916
+ }
69917
+ },
69918
+ {
69919
+ name: "copy",
69920
+ iconName: "copySolid",
69921
+ type: ["contextmenu", "inRow"],
69922
+ action: async () => {
69923
+ return null;
69924
+ }
69925
+ },
69926
+ {
69927
+ name: "edit (from demo)",
69928
+ iconName: "penToSquare",
69929
+ type: ["contextmenu"],
69930
+ action: async () => {
69931
+ return null;
69932
+ }
69933
+ },
69934
+ {
69935
+ name: "paste",
69936
+ iconName: "pasteSolid",
69937
+ type: ["contextmenu"],
69938
+ action: async () => {
69939
+ return null;
69940
+ }
69941
+ },
69942
+ {
69943
+ name: "preview",
69944
+ type: ["doubleClick", "contextmenu"],
69945
+ iconName: "eye",
69946
+ actionFunc: async (itemArg) => {
69947
+ alert(itemArg.item.amount);
69948
+ return null;
69949
+ }
69950
+ }
69951
+ ]}"
69952
+ .displayFunction=${(itemArg) => {
69953
+ return {
69954
+ ...itemArg,
69955
+ onlyDisplayProp: "onlyDisplay"
69956
+ };
69957
+ }}
69958
+ >This is a slotted Text</dees-table
69959
+ >
69960
+ </div>
69961
+ `;
69962
+
69963
+ // ts_web/elements/dees-table.ts
69964
+ var DeesTable = class extends DeesElement {
69965
+ constructor() {
69966
+ super();
69967
+ this.heading1 = "heading 1";
69968
+ this.heading2 = "heading 2";
69969
+ this.data = [];
69970
+ this.disabled = false;
69971
+ this.required = false;
69972
+ this.changeSubject = new smartrx_plugins_rxjs_exports.Subject();
69973
+ this.dataActions = [];
69974
+ this.displayFunction = (itemArg) => itemArg;
69975
+ this.reverseDisplayFunction = (itemArg) => itemArg;
69976
+ this.editableFields = [];
69977
+ this.files = [];
69978
+ this.fileWeakMap = /* @__PURE__ */ new WeakMap();
69979
+ this.dataChangeSubject = new plugins.smartrx.rxjs.Subject();
69980
+ }
69981
+ get value() {
69982
+ return this.data;
69983
+ }
69984
+ set value(valueArg) {
69985
+ }
69986
+ render() {
69987
+ return x`
69988
+ <div class="mainbox">
69989
+ <!-- the heading part -->
69990
+ <div class="header">
69991
+ <div class="headingContainer">
69992
+ <div class="heading heading1">${this.label || this.heading1}</div>
69993
+ <div class="heading heading2">${this.heading2}</div>
69994
+ </div>
69995
+ <div class="headerActions">
69996
+ ${resolveExec(async () => {
69997
+ const resultArray = [];
69998
+ for (const action of this.dataActions) {
69999
+ if (!action.type.includes("header"))
70000
+ continue;
70001
+ resultArray.push(
70002
+ x`<div
70003
+ class="headerAction"
70004
+ @click=${() => {
70005
+ action.actionFunc({
70006
+ item: this.selectedDataRow,
70007
+ table: this
70008
+ });
70009
+ }}
70010
+ >
70011
+ ${action.iconName ? x`<dees-icon .iconSize=${14} .iconFA=${action.iconName}></dees-icon>
70012
+ ${action.name}` : action.name}
70013
+ </div>`
70014
+ );
70015
+ }
70016
+ return resultArray;
70017
+ })}
70018
+ </div>
70019
+ </div>
70020
+ <div class="headingSeparation"></div>
70021
+
70022
+ <!-- the actual table -->
70023
+ <style></style>
70024
+ ${this.data.length > 0 ? (() => {
70025
+ const firstTransformedItem = this.displayFunction(this.data[0]);
70026
+ const headings = Object.keys(firstTransformedItem);
70027
+ return x`
70028
+ <table>
70029
+ <tr>
70030
+ ${headings.map(
70031
+ (headingArg) => x`
70032
+ <th>
70033
+ <div class="innerCellContainer">${headingArg}</div>
70034
+ </th>
70035
+ `
70036
+ )}
70037
+ ${(() => {
70038
+ if (this.dataActions && this.dataActions.length > 0) {
70039
+ return x`
70040
+ <th>
70041
+ <div class="innerCellContainer">Actions</div>
70042
+ </th>
70043
+ `;
70044
+ }
70045
+ })()}
70046
+ </tr>
70047
+ ${this.data.map((itemArg) => {
70048
+ const transformedItem = this.displayFunction(itemArg);
70049
+ const getTr = (elementArg) => {
70050
+ if (elementArg.tagName === "TR") {
70051
+ return elementArg;
70052
+ } else {
70053
+ return getTr(elementArg.parentElement);
70054
+ }
70055
+ };
70056
+ return x`
70057
+ <tr
70058
+ @click=${() => {
70059
+ this.selectedDataRow = itemArg;
70060
+ }}
70061
+ @dragenter=${async (eventArg) => {
70062
+ eventArg.preventDefault();
70063
+ eventArg.stopPropagation();
70064
+ const realTarget = getTr(eventArg.target);
70065
+ console.log("dragenter");
70066
+ console.log(realTarget);
70067
+ setTimeout(() => {
70068
+ realTarget.classList.add("hasAttachment");
70069
+ }, 0);
70070
+ }}
70071
+ @dragleave=${async (eventArg) => {
70072
+ eventArg.preventDefault();
70073
+ eventArg.stopPropagation();
70074
+ const realTarget = getTr(eventArg.target);
70075
+ realTarget.classList.remove("hasAttachment");
70076
+ }}
70077
+ @dragover=${async (eventArg) => {
70078
+ eventArg.preventDefault();
70079
+ }}
70080
+ @drop=${async (eventArg) => {
70081
+ eventArg.preventDefault();
70082
+ const newFiles = [];
70083
+ for (const file of Array.from(eventArg.dataTransfer.files)) {
70084
+ this.files.push(file);
70085
+ newFiles.push(file);
70086
+ this.requestUpdate();
70087
+ }
70088
+ const result = this.fileWeakMap.get(itemArg);
70089
+ if (!result) {
70090
+ this.fileWeakMap.set(itemArg, newFiles);
70091
+ } else {
70092
+ result.push(...newFiles);
70093
+ }
70094
+ }}
70095
+ @contextmenu=${async (eventArg) => {
70096
+ DeesContextmenu.openContextMenuWithOptions(
70097
+ eventArg,
70098
+ this.getActionsForType("contextmenu").map((action) => {
70099
+ const menuItem = {
70100
+ name: action.name,
70101
+ iconName: action.iconName,
70102
+ action: async () => {
70103
+ await action.actionFunc({
70104
+ item: itemArg,
70105
+ table: this
70106
+ });
70107
+ return null;
70108
+ }
70109
+ };
70110
+ return menuItem;
70111
+ })
70112
+ );
70113
+ }}
70114
+ class="${itemArg === this.selectedDataRow ? "selected" : ""}"
70115
+ >
70116
+ ${headings.map(
70117
+ (headingArg) => x`
70118
+ <td
70119
+ @dblclick=${(e12) => {
70120
+ if (this.editableFields.includes(headingArg)) {
70121
+ this.handleCellEditing(e12, itemArg, headingArg);
70122
+ } else {
70123
+ const wantedAction = this.dataActions.find(
70124
+ (actionArg) => actionArg.type.includes("doubleClick")
70125
+ );
70126
+ if (wantedAction) {
70127
+ wantedAction.actionFunc({
70128
+ item: itemArg,
70129
+ table: this
70130
+ });
70131
+ }
70132
+ }
70133
+ }}
70134
+ >
70135
+ <div class="innerCellContainer">${transformedItem[headingArg]}</div>
70136
+ </td>
70137
+ `
70138
+ )}
70139
+ ${(() => {
70140
+ if (this.dataActions && this.dataActions.length > 0) {
70141
+ return x`
70142
+ <td>
70143
+ <div class="innerCellContainer">
70144
+ ${this.getActionsForType("inRow").map(
70145
+ (actionArg) => x`<div
70146
+ class="action"
70147
+ @click=${() => actionArg.actionFunc({
70148
+ item: itemArg,
70149
+ table: this
70150
+ })}
70151
+ >
70152
+ ${actionArg.iconName ? x`
70153
+ <dees-icon .iconFA=${actionArg.iconName}></dees-icon>
70154
+ ` : actionArg.name}
70155
+ </div>`
70156
+ )}
70157
+ </div>
70158
+ </td>
70159
+ `;
70160
+ }
70161
+ })()}
70162
+ </tr>
70163
+ `;
70164
+ })}
70165
+ </table>
70166
+ `;
70167
+ })() : x` <div class="noDataSet">No data set!</div> `}
70168
+ <div class="footer">
70169
+ <div class="tableStatistics">
70170
+ ${this.data.length} ${this.dataName || "data rows"} (total) |
70171
+ ${this.selectedDataRow ? `# ${this.data.indexOf(this.selectedDataRow) + 1}` : `No`}
70172
+ selected
70173
+ </div>
70174
+ <div class="footerActions">
70175
+ ${resolveExec(async () => {
70176
+ const resultArray = [];
70177
+ for (const action of this.dataActions) {
70178
+ if (!action.type.includes("footer"))
70179
+ continue;
70180
+ resultArray.push(
70181
+ x`<div
70182
+ class="footerAction"
70183
+ @click=${() => {
70184
+ action.actionFunc({
70185
+ item: this.selectedDataRow,
70186
+ table: this
70187
+ });
70188
+ }}
70189
+ >
70190
+ ${action.iconName ? x`<dees-icon .iconSize=${14} .iconFA=${action.iconName}></dees-icon>
70191
+ ${action.name}` : action.name}
70192
+ </div>`
70193
+ );
70194
+ }
70195
+ return resultArray;
70196
+ })}
70197
+ </div>
70198
+ </div>
70199
+ </div>
70200
+ `;
70201
+ }
70202
+ async firstUpdated() {
70203
+ }
70204
+ async updated(changedProperties) {
70205
+ super.updated(changedProperties);
70206
+ this.determineColumnWidths();
70207
+ }
70208
+ async determineColumnWidths() {
70209
+ const domtools6 = await this.domtoolsPromise;
70210
+ await domtools6.convenience.smartdelay.delayFor(0);
70211
+ const table = this.shadowRoot.querySelector("table");
70212
+ if (!table)
70213
+ return;
70214
+ const cells = table.rows[0].cells;
70215
+ const handleColumnByIndex = async (i8, waitForRenderArg = false) => {
70216
+ const done = dist_ts_exports.defer();
70217
+ const cell = cells[i8];
70218
+ const width = window.getComputedStyle(cell).width;
70219
+ if (cell.textContent.includes("Actions")) {
70220
+ cell.style.minWidth = "68px";
70221
+ cell.style.width = `${this.dataActions.filter((actionArg) => actionArg.type.includes("inRow")).length * 35}px`;
70222
+ } else {
70223
+ cell.style.width = width;
70224
+ }
70225
+ if (waitForRenderArg) {
70226
+ requestAnimationFrame(() => {
70227
+ done.resolve();
70228
+ });
70229
+ await done.promise;
70230
+ }
70231
+ };
70232
+ if (cells[cells.length - 1].textContent.includes("Actions")) {
70233
+ await handleColumnByIndex(cells.length - 1, true);
70234
+ }
70235
+ for (let i8 = 0; i8 < cells.length; i8++) {
70236
+ if (cells[i8].textContent.includes("Actions")) {
70237
+ continue;
70238
+ }
70239
+ await handleColumnByIndex(i8);
70240
+ }
70241
+ table.style.tableLayout = "fixed";
70242
+ }
70243
+ getActionsForType(typeArg) {
70244
+ const actions = [];
70245
+ for (const action of this.dataActions) {
70246
+ if (!action.type.includes(typeArg))
70247
+ continue;
70248
+ actions.push(action);
70249
+ }
70250
+ return actions;
70251
+ }
70252
+ async handleCellEditing(event, itemArg, key) {
70253
+ const domtools6 = await this.domtoolsPromise;
70254
+ const target = event.target;
70255
+ const originalColor = target.style.color;
70256
+ target.style.color = "transparent";
70257
+ const transformedItem = this.displayFunction(itemArg);
70258
+ const initialValue = transformedItem[key] || "";
70259
+ const input = document.createElement("input");
70260
+ input.type = "text";
70261
+ input.value = initialValue;
70262
+ const blurInput = async (blurArg = true, saveArg = false) => {
70263
+ if (blurArg) {
70264
+ input.blur();
70265
+ }
70266
+ if (saveArg) {
70267
+ itemArg[key] = input.value;
70268
+ this.changeSubject.next(this);
70269
+ }
70270
+ input.remove();
70271
+ target.style.color = originalColor;
70272
+ this.requestUpdate();
70273
+ };
70274
+ input.addEventListener("blur", () => {
70275
+ blurInput(false, false);
70276
+ });
70277
+ input.addEventListener("keydown", (e12) => {
70278
+ if (e12.key === "Enter") {
70279
+ blurInput(true, true);
70280
+ }
70281
+ });
70282
+ target.appendChild(input);
70283
+ input.focus();
70284
+ }
70285
+ };
70286
+ DeesTable.demo = demoFunc5;
70287
+ DeesTable.styles = [
70288
+ cssManager.defaultStyles,
70289
+ i`
70290
+ .mainbox {
70291
+ color: ${cssManager.bdTheme("#333", "#fff")};
70292
+ font-family: 'Roboto', 'Inter', sans-serif;
70293
+ font-weight: 400;
70294
+ font-size: 14px;
70295
+ padding: 16px;
70296
+ display: block;
70297
+ width: 100%;
70298
+ min-height: 50px;
70299
+ background: ${cssManager.bdTheme("#ffffff", "#333333")};
70300
+ border-radius: 3px;
70301
+ border-top: 1px solid ${cssManager.bdTheme("#fff", "#444")};
70302
+ box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.3);
70303
+ overflow-x: auto;
70304
+ }
70305
+
70306
+ .header {
70307
+ display: flex;
70308
+ justify-content: flex-end;
70309
+ align-items: center;
70310
+ font-family: 'Roboto', 'Inter', sans-serif;
70311
+ }
70312
+
70313
+ .headingContainer {
70314
+ }
70315
+
70316
+ .heading {
70317
+ }
70318
+
70319
+ .heading1 {
70320
+ font-weight: 600;
70321
+ }
70322
+ .heading2 {
70323
+ opacity: 0.6;
70324
+ }
70325
+
70326
+ .headingSeparation {
70327
+ margin-top: 7px;
70328
+ border-bottom: 1px solid ${cssManager.bdTheme("#bcbcbc", "#bcbcbc")};
70329
+ }
70330
+
70331
+ .headerActions {
70332
+ margin-left: auto;
70333
+ cursor: pointer;
70334
+ }
70335
+ .headerAction {
70336
+ display: flex;
70337
+ color: ${cssManager.bdTheme("#333", "#ccc")};
70338
+ }
70339
+
70340
+ .headerAction:hover {
70341
+ color: ${cssManager.bdTheme("#555", "#fff")};
70342
+ }
70343
+
70344
+ .headerAction dees-icon {
70345
+ margin-right: 8px;
70346
+ }
70347
+
70348
+ table,
70349
+ .noDataSet {
70350
+ margin-top: 16px;
70351
+ color: ${cssManager.bdTheme("#333", "#fff")};
70352
+ border-collapse: collapse;
70353
+ width: 100%;
70354
+ }
70355
+ .noDataSet {
70356
+ text-align: center;
70357
+ }
70358
+ tr {
70359
+ border-bottom: 1px dashed ${cssManager.bdTheme("#999", "#808080")};
70360
+ text-align: left;
70361
+ }
70362
+ tr:last-child {
70363
+ border-bottom: none;
70364
+ text-align: left;
70365
+ }
70366
+ tr:hover {
70367
+ cursor: pointer;
70368
+ }
70369
+ tr:hover td {
70370
+ background: ${cssManager.bdTheme("#22222210", "#ffffff10")};
70371
+ }
70372
+ tr:first-child:hover {
70373
+ cursor: auto;
70374
+ }
70375
+ tr:first-child:hover .innerCellContainer {
70376
+ background: none;
70377
+ }
70378
+ tr.selected td {
70379
+ background: ${cssManager.bdTheme("#22222220", "#ffffff20")};
70380
+ }
70381
+
70382
+ tr.hasAttachment td {
70383
+ background: ${cssManager.bdTheme("#0098847c", "#0098847c")};
70384
+ }
70385
+
70386
+ th {
70387
+ text-transform: none;
70388
+ font-family: 'Roboto', 'Inter', sans-serif;
70389
+ font-weight: 500;
70390
+ }
70391
+ th,
70392
+ td {
70393
+ position: relative;
70394
+ vertical-align: top;
70395
+
70396
+ padding: 0px;
70397
+ border-right: 1px dashed ${cssManager.bdTheme("#999", "#808080")};
70398
+ }
70399
+ .innerCellContainer {
70400
+ min-height: 36px;
70401
+ position: relative;
70402
+ height: 100%;
70403
+ width: 100%;
70404
+ padding: 6px 8px;
70405
+ line-height: 24px;
70406
+ }
70407
+ th:first-child .innerCellContainer,
70408
+ td:first-child .innerCellContainer {
70409
+ padding-left: 0px;
70410
+ }
70411
+ th:last-child .innerCellContainer,
70412
+ td:last-child .innerCellContainer {
70413
+ padding-right: 0px;
70414
+ }
70415
+ th:last-child,
70416
+ td:last-child {
70417
+ border-right: none;
70418
+ }
70419
+ td input {
70420
+ width: 100%;
70421
+ height: 100%;
70422
+ outline: none;
70423
+ border: 2px solid #fa6101;
70424
+ top: 0px;
70425
+ bottom: 0px;
70426
+ right: 0px;
70427
+ left: 0px;
70428
+ position: absolute;
70429
+ background: #fa610140;
70430
+ color: ${cssManager.bdTheme("#333", "#fff")};
70431
+ font-family: inherit;
70432
+ font-size: inherit;
70433
+ font-weight: inherit;
70434
+ padding: 0px 6px;
70435
+ }
70436
+
70437
+ .action {
70438
+ margin: -6px 0px;
70439
+ padding: 10px;
70440
+ line-height: 36px;
70441
+ height: 36px;
70442
+ display: inline-block;
70443
+ }
70444
+
70445
+ .action:first-child {
70446
+ margin-left: -8px;
70447
+ width: min-content;
70448
+ }
70449
+
70450
+ .action:hover {
70451
+ background: ${cssManager.bdTheme("#CCC", "#00000030")};
70452
+ }
70453
+
70454
+ .footer {
70455
+ font-family: 'Roboto', 'Inter', sans-serif;
70456
+ font-size: 14px;
70457
+ color: ${cssManager.bdTheme("#111", "#ffffff90")};
70458
+ background: ${cssManager.bdTheme("#eeeeeb", "#00000050")};
70459
+ margin: 16px -16px -16px -16px;
70460
+ border-bottom-left-radius: 3px;
70461
+ border-bottom-right-radius: 3px;
70462
+ display: flex;
70463
+ }
70464
+
70465
+ .tableStatistics {
70466
+ padding: 8px 16px;
70467
+ }
70468
+
70469
+ .footerActions {
70470
+ margin-left: auto;
70471
+ }
70472
+
70473
+ .footerActions .footerAction {
70474
+ cursor: pointer;
70475
+ padding: 8px 16px;
70476
+ display: flex;
70477
+ }
70478
+
70479
+ .footerActions .footerAction:hover {
70480
+ background: ${cssManager.bdTheme("#CCC", "#111")};
70481
+ }
70482
+
70483
+ .footerActions dees-icon {
70484
+ display: flex;
70485
+ margin-right: 8px;
70486
+ }
70487
+ `
70488
+ ];
70489
+ __decorateClass([
70490
+ n5({
70491
+ type: String
70492
+ })
70493
+ ], DeesTable.prototype, "heading1", 2);
70494
+ __decorateClass([
70495
+ n5({
70496
+ type: String
70497
+ })
70498
+ ], DeesTable.prototype, "heading2", 2);
70499
+ __decorateClass([
70500
+ n5({
70501
+ type: Array
70502
+ })
70503
+ ], DeesTable.prototype, "data", 2);
70504
+ __decorateClass([
70505
+ n5({
70506
+ type: String
70507
+ })
70508
+ ], DeesTable.prototype, "key", 2);
70509
+ __decorateClass([
70510
+ n5({
70511
+ type: String
70512
+ })
70513
+ ], DeesTable.prototype, "label", 2);
70514
+ __decorateClass([
70515
+ n5({
70516
+ type: Boolean
70517
+ })
70518
+ ], DeesTable.prototype, "disabled", 2);
70519
+ __decorateClass([
70520
+ n5({
70521
+ type: Boolean
70522
+ })
70523
+ ], DeesTable.prototype, "required", 2);
70524
+ __decorateClass([
70525
+ n5({
70526
+ type: String,
70527
+ reflect: true
70528
+ })
70529
+ ], DeesTable.prototype, "dataName", 2);
70530
+ __decorateClass([
70531
+ n5({
70532
+ type: Array
70533
+ })
70534
+ ], DeesTable.prototype, "dataActions", 2);
70535
+ __decorateClass([
70536
+ n5({
70537
+ attribute: false
70538
+ })
70539
+ ], DeesTable.prototype, "displayFunction", 2);
70540
+ __decorateClass([
70541
+ n5({
70542
+ attribute: false
70543
+ })
70544
+ ], DeesTable.prototype, "reverseDisplayFunction", 2);
70545
+ __decorateClass([
70546
+ n5({
70547
+ type: Object
70548
+ })
70549
+ ], DeesTable.prototype, "selectedDataRow", 2);
70550
+ __decorateClass([
70551
+ n5({
70552
+ type: Array
70553
+ })
70554
+ ], DeesTable.prototype, "editableFields", 2);
70555
+ DeesTable = __decorateClass([
70556
+ e7("dees-table")
70557
+ ], DeesTable);
70558
+
69841
70559
  // ts_web/elements/dees-form.ts
69842
70560
  var FORM_INPUT_TYPES = [
69843
70561
  DeesInputCheckbox,
69844
70562
  DeesInputText,
69845
70563
  DeesInputQuantitySelector,
69846
- DeesInputRadio
70564
+ DeesInputRadio,
70565
+ DeesTable
69847
70566
  ];
69848
70567
  var DeesForm = class extends DeesElement {
69849
70568
  constructor() {
@@ -70061,7 +70780,7 @@ DeesFormSubmit = __decorateClass([
70061
70780
  ], DeesFormSubmit);
70062
70781
 
70063
70782
  // ts_web/elements/dees-hint.demo.ts
70064
- var demoFunc5 = () => x`
70783
+ var demoFunc6 = () => x`
70065
70784
  <dees-hint></dees-hint>
70066
70785
  `;
70067
70786
 
@@ -70076,7 +70795,7 @@ var DeesHint = class extends DeesElement {
70076
70795
  return x` <div class="mainbox"></div> `;
70077
70796
  }
70078
70797
  };
70079
- DeesHint.demo = demoFunc5;
70798
+ DeesHint.demo = demoFunc6;
70080
70799
  DeesHint.styles = [cssManager.defaultStyles, i``];
70081
70800
  __decorateClass([
70082
70801
  n5({ type: String })
@@ -72546,8 +73265,8 @@ var SvgSymbols = {
72546
73265
  };
72547
73266
  }
72548
73267
  };
72549
- var plugins4 = [InjectCSS, ReplaceElements, Layers, LayersCounter, LayersText, PseudoElements, MutationObserver$1, PowerTransforms, Masks, MissingIconIndicator, SvgSymbols];
72550
- registerPlugins(plugins4, {
73268
+ var plugins5 = [InjectCSS, ReplaceElements, Layers, LayersCounter, LayersText, PseudoElements, MutationObserver$1, PowerTransforms, Masks, MissingIconIndicator, SvgSymbols];
73269
+ registerPlugins(plugins5, {
72551
73270
  mixoutsTo: api
72552
73271
  });
72553
73272
  var noAuto$1 = api.noAuto;
@@ -72820,7 +73539,7 @@ var faFileInvoice = {
72820
73539
  };
72821
73540
 
72822
73541
  // ts_web/elements/dees-icon.demo.ts
72823
- var demoFunc6 = () => x`
73542
+ var demoFunc7 = () => x`
72824
73543
  <style>
72825
73544
  .demoContainer {
72826
73545
 
@@ -72954,7 +73673,7 @@ var DeesIcon = class extends DeesElement {
72954
73673
  }
72955
73674
  }
72956
73675
  };
72957
- DeesIcon.demo = demoFunc6;
73676
+ DeesIcon.demo = demoFunc7;
72958
73677
  DeesIcon.styles = [
72959
73678
  cssManager.defaultStyles,
72960
73679
  i`
@@ -73511,7 +74230,7 @@ DeesMobilenavigation = __decorateClass([
73511
74230
  ], DeesMobilenavigation);
73512
74231
 
73513
74232
  // ts_web/elements/dees-modal.demo.ts
73514
- var demoFunc7 = () => x`
74233
+ var demoFunc8 = () => x`
73515
74234
  <dees-button @click=${() => {
73516
74235
  DeesModal.createAndShow({
73517
74236
  heading: "This is a heading",
@@ -73616,7 +74335,7 @@ var DeesModal = class extends DeesElement {
73616
74335
  }
73617
74336
  };
73618
74337
  // STATIC
73619
- DeesModal.demo = demoFunc7;
74338
+ DeesModal.demo = demoFunc8;
73620
74339
  DeesModal.styles = [
73621
74340
  cssManager.defaultStyles,
73622
74341
  i`
@@ -73799,7 +74518,7 @@ DeesPdf = __decorateClass([
73799
74518
  ], DeesPdf);
73800
74519
 
73801
74520
  // ts_web/elements/dees-simple-appdash.demo.ts
73802
- var demoFunc8 = () => x`
74521
+ var demoFunc9 = () => x`
73803
74522
  <dees-simple-appdash>Hello there</dees-simple-appdash>
73804
74523
  `;
73805
74524
 
@@ -73825,7 +74544,7 @@ var DeesSimpleAppDash = class extends DeesElement {
73825
74544
  }
73826
74545
  };
73827
74546
  // STATIC
73828
- DeesSimpleAppDash.demo = demoFunc8;
74547
+ DeesSimpleAppDash.demo = demoFunc9;
73829
74548
  DeesSimpleAppDash.styles = [
73830
74549
  cssManager.defaultStyles,
73831
74550
  i`
@@ -73862,7 +74581,7 @@ DeesSimpleAppDash = __decorateClass([
73862
74581
  ], DeesSimpleAppDash);
73863
74582
 
73864
74583
  // ts_web/elements/dees-simple-login.demo.ts
73865
- var demoFunc9 = () => x` <dees-simple-login name="someapp"> Hello there </dees-simple-login> `;
74584
+ var demoFunc10 = () => x` <dees-simple-login name="someapp"> Hello there </dees-simple-login> `;
73866
74585
 
73867
74586
  // ts_web/elements/dees-simple-login.ts
73868
74587
  var DeesSimpleLogin = class extends DeesElement {
@@ -73919,7 +74638,7 @@ var DeesSimpleLogin = class extends DeesElement {
73919
74638
  }
73920
74639
  };
73921
74640
  // STATIC
73922
- DeesSimpleLogin.demo = demoFunc9;
74641
+ DeesSimpleLogin.demo = demoFunc10;
73923
74642
  DeesSimpleLogin.styles = [
73924
74643
  cssManager.defaultStyles,
73925
74644
  i`
@@ -73984,1126 +74703,451 @@ var DeesSpeechbubble = class extends DeesElement {
73984
74703
  }
73985
74704
  globalThis.location.href = "https://launch.sh";
73986
74705
  }
73987
- async firstUpdated() {
73988
- if (!this.textContent) {
73989
- this.textContent = "Button";
73990
- this.performUpdate();
73991
- }
73992
- }
73993
- };
73994
- DeesSpeechbubble.demo = () => x` <dees-speechbubble></dees-speechbubble> `;
73995
- DeesSpeechbubble.styles = [
73996
- cssManager.defaultStyles,
73997
- i`
73998
- :host {
73999
- position: relative;
74000
- display: block;
74001
- box-sizing: border-box;
74002
- color: ${cssManager.bdTheme("#333", "#fff")};
74003
- cursor: pointer;
74004
- user-select: none;
74005
- }
74006
- :host([hidden]) {
74007
- display: none;
74008
- }
74009
-
74010
- .maincontainer {
74011
- will-change: transform;
74012
- transition: transform 0.2s;
74013
- transform: translateX(0px);
74014
- position: relative;
74015
- transition: all 0.2s;
74016
- margin-left: 0px;
74017
- }
74018
-
74019
- .maincontainer:hover {
74020
- transform: translateX(3px);
74021
- }
74022
-
74023
- .arrow {
74024
- position: absolute;
74025
- transform: rotate(45deg);
74026
- background: ${cssManager.bdTheme("#fff", "#333")};
74027
- height: 15px;
74028
- width: 15px;
74029
- left: 4px;
74030
- top: 5px;
74031
- border-radius: 2px;
74032
- }
74033
-
74034
- .speechbubble {
74035
- background: ${cssManager.bdTheme("#fff", "#333")};
74036
- padding: 0px 10px;
74037
- border-radius: 3px;
74038
- position: absolute;
74039
- line-height: 25px;
74040
- font-size: 12px;
74041
- top: 0px;
74042
- left: 8px;
74043
- }
74044
-
74045
- .wave {
74046
- animation-name: wave-animation; /* Refers to the name of your @keyframes element below */
74047
- animation-duration: 2.5s; /* Change to speed up or slow down */
74048
- animation-iteration-count: infinite; /* Never stop waving :) */
74049
- transform-origin: 70% 70%; /* Pivot around the bottom-left palm */
74050
- display: inline-block;
74051
- }
74052
-
74053
- @keyframes wave-animation {
74054
- 0% {
74055
- transform: rotate(0deg);
74056
- }
74057
- 10% {
74058
- transform: rotate(14deg);
74059
- } /* The following five values can be played with to make the waving more or less extreme */
74060
- 20% {
74061
- transform: rotate(-8deg);
74062
- }
74063
- 30% {
74064
- transform: rotate(14deg);
74065
- }
74066
- 40% {
74067
- transform: rotate(-4deg);
74068
- }
74069
- 50% {
74070
- transform: rotate(10deg);
74071
- }
74072
- 60% {
74073
- transform: rotate(0deg);
74074
- } /* Reset for the last half to pause */
74075
- 100% {
74076
- transform: rotate(0deg);
74077
- }
74078
- }
74079
- `
74080
- ];
74081
- __decorateClass([
74082
- n5()
74083
- ], DeesSpeechbubble.prototype, "text", 2);
74084
- __decorateClass([
74085
- n5({
74086
- type: Boolean
74087
- })
74088
- ], DeesSpeechbubble.prototype, "disabled", 2);
74089
- __decorateClass([
74090
- n5({
74091
- type: Boolean
74092
- })
74093
- ], DeesSpeechbubble.prototype, "isHidden", 2);
74094
- __decorateClass([
74095
- n5({
74096
- type: String
74097
- })
74098
- ], DeesSpeechbubble.prototype, "status", 2);
74099
- DeesSpeechbubble = __decorateClass([
74100
- e7("dees-speechbubble")
74101
- ], DeesSpeechbubble);
74102
-
74103
- // ts_web/elements/dees-spinner.ts
74104
- var DeesSpinner = class extends DeesElement {
74105
- constructor() {
74106
- super();
74107
- this.size = 20;
74108
- this.bnw = false;
74109
- this.status = "normal";
74110
- }
74111
- render() {
74112
- return x`
74113
- <style>
74114
- #loading {
74115
- width: ${this.size}px;
74116
- height: ${this.size}px;
74117
- }
74118
- #loading.success {
74119
- color: ${cssManager.bdTheme(this.bnw ? "#333" : `#8bc34a`, this.bnw ? "#fff" : `#8bc34a`)};
74120
-
74121
- }
74122
- #loading.error {
74123
- color: ${cssManager.bdTheme(this.bnw ? "#333" : `#e64a19`, this.bnw ? "#fff" : `#e64a19`)};
74124
- }
74125
- dees-icon {
74126
- font-size: ${this.size}px;
74127
- }
74128
- </style>
74129
- <div class="${this.status}" id="loading">
74130
- ${(() => {
74131
- if (this.status === "success") {
74132
- return x`<dees-icon style="transform: translateX(1%) translateY(3%);" .iconFA=${"circleCheck"}></dees-icon>`;
74133
- } else if (this.status === "error") {
74134
- return x`<dees-icon .iconFA=${"circleXmark"}></dees-icon>`;
74135
- }
74136
- })()}
74137
- </div>
74138
- `;
74139
- }
74140
- };
74141
- DeesSpinner.demo = () => x`
74142
- <dees-spinner></dees-spinner>
74143
- <dees-spinner status="success"></dees-spinner>
74144
- <dees-spinner status="error"></dees-spinner>
74145
- <dees-spinner size=${64} status="success"></dees-spinner>
74146
- <dees-spinner .size=${64} status="error"></dees-spinner>
74147
- `;
74148
- DeesSpinner.styles = [
74149
- cssManager.defaultStyles,
74150
- i`
74151
- :host {
74152
- display: block;
74153
- }
74154
-
74155
- #loading {
74156
- position: relative;
74157
- transition: none;
74158
- display: flex;
74159
- justify-content: center;
74160
- align-content: center;
74161
- background: #8bc34a00;
74162
- border: 3px solid ${cssManager.bdTheme("rgba(0, 0, 0, 0.1)", "rgba(255, 255, 255, 0.3)")};
74163
- border-radius: 50%;
74164
- border-top-color: ${cssManager.bdTheme("#333", "#fff")};
74165
- animation: spin 1s ease-in-out infinite;
74166
- -webkit-animation: spin 1s ease-in-out infinite;
74167
- }
74168
-
74169
- #loading.success {
74170
- border: none;
74171
- border-radius: 50%;
74172
- animation: none;
74173
- -webkit-animation: none;
74174
- }
74175
-
74176
- #loading.error {
74177
- border: none;
74178
- border-radius: 50%;
74179
- animation: none;
74180
- -webkit-animation: none;
74181
- }
74182
-
74183
- @keyframes spin {
74184
- to {
74185
- -webkit-transform: rotate(360deg);
74186
- }
74187
- }
74188
- @-webkit-keyframes spin {
74189
- to {
74190
- -webkit-transform: rotate(360deg);
74191
- }
74192
- }
74193
-
74194
- dees-icon {
74195
- position: absolute;
74196
- height: 100%;
74197
- width: 100%;
74198
- }
74199
- `
74200
- ];
74201
- __decorateClass([
74202
- n5({
74203
- type: Number
74204
- })
74205
- ], DeesSpinner.prototype, "size", 2);
74206
- __decorateClass([
74207
- n5({
74208
- type: String
74209
- })
74210
- ], DeesSpinner.prototype, "bnw", 2);
74211
- __decorateClass([
74212
- n5()
74213
- ], DeesSpinner.prototype, "status", 2);
74214
- DeesSpinner = __decorateClass([
74215
- e7("dees-spinner")
74216
- ], DeesSpinner);
74217
-
74218
- // ts_web/elements/dees-stepper.ts
74219
- var DeesStepper = class extends DeesElement {
74220
- constructor() {
74221
- super();
74222
- this.steps = [];
74223
- this.getIndexOfStep = (stepArg) => {
74224
- return this.steps.findIndex((stepArg2) => stepArg === stepArg2);
74225
- };
74226
- }
74227
- render() {
74228
- return x`
74229
- <div class="stepperContainer">
74230
- ${this.steps.map(
74231
- (stepArg) => x`<div
74232
- class="step ${stepArg === this.selectedStep ? "selected" : null} ${this.getIndexOfStep(stepArg) > this.getIndexOfStep(this.selectedStep) ? "hiddenStep" : ""}"
74233
- >
74234
- ${this.getIndexOfStep(stepArg) > 0 ? x`<div class="goBack" @click=${this.goBack}><- go to previous step</div>` : ``}
74235
- <div class="stepCounter">
74236
- Step ${this.steps.findIndex((elementArg) => elementArg === stepArg) + 1} of
74237
- ${this.steps.length}
74238
- </div>
74239
- <div class="title">${stepArg.title}</div>
74240
- <div class="content">${stepArg.content}</div>
74241
- </div> `
74242
- )}
74243
- </div>
74244
- `;
74245
- }
74246
- async firstUpdated() {
74247
- await this.domtoolsPromise;
74248
- await this.domtools.convenience.smartdelay.delayFor(0);
74249
- this.selectedStep = this.steps[0];
74250
- this.setScrollStatus();
74251
- }
74252
- async updated() {
74253
- this.setScrollStatus();
74254
- }
74255
- async setScrollStatus() {
74256
- const stepperContainer = this.shadowRoot.querySelector(".stepperContainer");
74257
- const firstStepElement = this.shadowRoot.querySelector(".step");
74258
- const selectedStepElement = this.shadowRoot.querySelector(".selected");
74259
- if (!selectedStepElement) {
74260
- return;
74261
- }
74262
- if (!stepperContainer.style.paddingTop) {
74263
- stepperContainer.style.paddingTop = `${stepperContainer.offsetHeight / 2 - selectedStepElement.offsetHeight / 2}px`;
74264
- }
74265
- console.log("Setting scroll status");
74266
- console.log(selectedStepElement);
74267
- const scrollPosition = selectedStepElement.offsetTop - stepperContainer.offsetHeight / 2 + selectedStepElement.offsetHeight / 2;
74268
- console.log(scrollPosition);
74269
- const domtoolsInstance = await DomTools.setupDomTools();
74270
- if (!this.scroller) {
74271
- this.scroller = new plugins.SweetScroll(
74272
- {
74273
- vertical: true,
74274
- horizontal: false,
74275
- easing: "easeInOutExpo",
74276
- duration: 700
74277
- },
74278
- stepperContainer
74279
- );
74280
- }
74281
- if (!this.selectedStep.validationFuncCalled && this.selectedStep.validationFunc) {
74282
- this.selectedStep.validationFuncCalled = true;
74283
- await this.selectedStep.validationFunc(this, selectedStepElement);
74284
- }
74285
- this.scroller.to(scrollPosition);
74286
- }
74287
- async goBack() {
74288
- const currentIndex = this.steps.findIndex((stepArg) => stepArg === this.selectedStep);
74289
- this.selectedStep = this.steps[currentIndex - 1];
74290
- await this.domtoolsPromise;
74291
- await this.domtools.convenience.smartdelay.delayFor(100);
74292
- this.selectedStep.onReturnToStepFunc?.(this, this.shadowRoot.querySelector(".selected"));
74293
- }
74294
- goNext() {
74295
- const currentIndex = this.steps.findIndex((stepArg) => stepArg === this.selectedStep);
74296
- this.selectedStep = this.steps[currentIndex + 1];
74297
- }
74298
- };
74299
- DeesStepper.demo = () => x`
74300
- <dees-stepper
74301
- .steps=${[
74302
- {
74303
- title: "Whats your name?",
74304
- content: x`
74305
- <dees-form>
74306
- <dees-input-text
74307
- key="email"
74308
- label="Your Email"
74309
- value="hello@something.com"
74310
- disabled
74311
- ></dees-input-text>
74312
- <dees-input-text key="firstName" required label="Vorname"></dees-input-text>
74313
- <dees-input-text key="lastName" required label="Nachname"></dees-input-text>
74314
- <dees-form-submit>Next</dees-form-submit>
74315
- </dees-form>
74316
- `,
74317
- validationFunc: async (stepperArg, elementArg) => {
74318
- const deesForm = elementArg.querySelector("dees-form");
74319
- deesForm.addEventListener("formData", (eventArg) => {
74320
- stepperArg.goNext();
74321
- });
74706
+ async firstUpdated() {
74707
+ if (!this.textContent) {
74708
+ this.textContent = "Button";
74709
+ this.performUpdate();
74322
74710
  }
74323
- },
74324
- {
74325
- title: "Whats your mobile number?",
74326
- content: x``
74327
74711
  }
74328
- ]}
74329
- ></dees-stepper>
74330
- `;
74331
- DeesStepper.styles = [
74712
+ };
74713
+ DeesSpeechbubble.demo = () => x` <dees-speechbubble></dees-speechbubble> `;
74714
+ DeesSpeechbubble.styles = [
74332
74715
  cssManager.defaultStyles,
74333
74716
  i`
74334
74717
  :host {
74335
- position: absolute;
74336
- width: 100%;
74337
- height: 100%;
74338
- }
74339
- .stepperContainer {
74340
- position: absolute;
74341
- width: 100%;
74342
- height: 100%;
74343
- background: ${cssManager.bdTheme("#eeeeeb", "#000")};
74344
- overflow: hidden;
74345
- }
74346
-
74347
- .step {
74348
74718
  position: relative;
74349
- pointer-events: none;
74350
- overflow: hidden;
74351
- transition: all 0.7s ease-in-out;
74352
- max-width: 500px;
74353
- min-height: 300px;
74354
- border-radius: 3px;
74355
- background: ${cssManager.bdTheme("#ffffff", "#181818")};
74356
- border-top: 1px solid ${cssManager.bdTheme("#ffffff", "#181818")};
74719
+ display: block;
74720
+ box-sizing: border-box;
74357
74721
  color: ${cssManager.bdTheme("#333", "#fff")};
74358
- margin: auto;
74359
- margin-bottom: 20px;
74360
- filter: opacity(0.5) grayscale(1);
74361
- box-shadow: 0px 0px 3px #00000010;
74722
+ cursor: pointer;
74362
74723
  user-select: none;
74363
74724
  }
74364
-
74365
- .step.selected {
74366
- border-top: 1px solid #e4002b;
74367
- pointer-events: all;
74368
- filter: opacity(1) grayscale(0);
74369
- box-shadow: 0px 0px 5px #00000010;
74370
- user-select: auto;
74725
+ :host([hidden]) {
74726
+ display: none;
74371
74727
  }
74372
74728
 
74373
- .step.hiddenStep {
74374
- filter: opacity(0);
74729
+ .maincontainer {
74730
+ will-change: transform;
74731
+ transition: transform 0.2s;
74732
+ transform: translateX(0px);
74733
+ position: relative;
74734
+ transition: all 0.2s;
74735
+ margin-left: 0px;
74375
74736
  }
74376
74737
 
74377
- .step:last-child {
74378
- margin-bottom: 100vh;
74738
+ .maincontainer:hover {
74739
+ transform: translateX(3px);
74379
74740
  }
74380
74741
 
74381
- .step .stepCounter {
74742
+ .arrow {
74382
74743
  position: absolute;
74383
- top: 0px;
74384
- right: 0px;
74385
- padding: 10px 15px;
74386
- font-size: 12px;
74387
- border-bottom-left-radius: 3px;
74388
- background: ${cssManager.bdTheme("#00000008", "#ffffff08")};
74744
+ transform: rotate(45deg);
74745
+ background: ${cssManager.bdTheme("#fff", "#333")};
74746
+ height: 15px;
74747
+ width: 15px;
74748
+ left: 4px;
74749
+ top: 5px;
74750
+ border-radius: 2px;
74389
74751
  }
74390
74752
 
74391
- .step .goBack {
74753
+ .speechbubble {
74754
+ background: ${cssManager.bdTheme("#fff", "#333")};
74755
+ padding: 0px 10px;
74756
+ border-radius: 3px;
74392
74757
  position: absolute;
74393
- top: 0px;
74394
- left: 0px;
74395
- padding: 10px 15px;
74758
+ line-height: 25px;
74396
74759
  font-size: 12px;
74397
- border-bottom-right-radius: 3px;
74398
- background: ${cssManager.bdTheme("#00000008", "#ffffff08")};
74399
- cursor: pointer;
74400
- }
74401
-
74402
- .step .goBack:hover {
74403
- background: ${cssManager.bdTheme("#00000012", "#ffffff12")};
74760
+ top: 0px;
74761
+ left: 8px;
74404
74762
  }
74405
74763
 
74406
- .step .title {
74407
- text-align: center;
74408
- padding-top: 50px;
74409
- font-family: 'Roboto', 'Inter', sans-serif;
74410
- font-size: 25px;
74411
- font-weight: 300;
74764
+ .wave {
74765
+ animation-name: wave-animation; /* Refers to the name of your @keyframes element below */
74766
+ animation-duration: 2.5s; /* Change to speed up or slow down */
74767
+ animation-iteration-count: infinite; /* Never stop waving :) */
74768
+ transform-origin: 70% 70%; /* Pivot around the bottom-left palm */
74769
+ display: inline-block;
74412
74770
  }
74413
74771
 
74414
- .step .content {
74415
- padding: 20px;
74772
+ @keyframes wave-animation {
74773
+ 0% {
74774
+ transform: rotate(0deg);
74775
+ }
74776
+ 10% {
74777
+ transform: rotate(14deg);
74778
+ } /* The following five values can be played with to make the waving more or less extreme */
74779
+ 20% {
74780
+ transform: rotate(-8deg);
74781
+ }
74782
+ 30% {
74783
+ transform: rotate(14deg);
74784
+ }
74785
+ 40% {
74786
+ transform: rotate(-4deg);
74787
+ }
74788
+ 50% {
74789
+ transform: rotate(10deg);
74790
+ }
74791
+ 60% {
74792
+ transform: rotate(0deg);
74793
+ } /* Reset for the last half to pause */
74794
+ 100% {
74795
+ transform: rotate(0deg);
74796
+ }
74416
74797
  }
74417
74798
  `
74418
74799
  ];
74800
+ __decorateClass([
74801
+ n5()
74802
+ ], DeesSpeechbubble.prototype, "text", 2);
74419
74803
  __decorateClass([
74420
74804
  n5({
74421
- type: Array
74805
+ type: Boolean
74422
74806
  })
74423
- ], DeesStepper.prototype, "steps", 2);
74807
+ ], DeesSpeechbubble.prototype, "disabled", 2);
74424
74808
  __decorateClass([
74425
74809
  n5({
74426
- type: Object
74810
+ type: Boolean
74427
74811
  })
74428
- ], DeesStepper.prototype, "selectedStep", 2);
74429
- DeesStepper = __decorateClass([
74430
- e7("dees-stepper")
74431
- ], DeesStepper);
74432
-
74433
- // ts_web/elements/dees-table.demo.ts
74434
- var demoFunc10 = () => x`
74435
- <style>
74436
- .demoWrapper {
74437
- box-sizing: border-box;
74438
- position: absolute;
74439
- width: 100%;
74440
- height: 100%;
74441
- padding: 20px;
74442
- background: #000000;
74443
- }
74444
- </style>
74445
- <div class="demoWrapper">
74446
- <dees-table
74447
- heading1="Current Account Statement"
74448
- heading2="Bunq - Payment Account 2 - April 2021"
74449
- .editableFields="${["description"]}"
74450
- .data=${[
74451
- {
74452
- date: "2021-04-01",
74453
- amount: "2464.65 \u20AC",
74454
- description: "Printing Paper (Office Supplies) - STAPLES BREMEN"
74455
- },
74456
- {
74457
- date: "2021-04-02",
74458
- amount: "165.65 \u20AC",
74459
- description: "Logitech Mouse (Hardware) - logi.com OnlineShop"
74460
- },
74461
- {
74462
- date: "2021-04-03",
74463
- amount: "2999,00 \u20AC",
74464
- description: "Macbook Pro 16inch (Hardware) - Apple.de OnlineShop"
74465
- },
74466
- {
74467
- date: "2021-04-01",
74468
- amount: "2464.65 \u20AC",
74469
- description: "Office-Supplies - STAPLES BREMEN"
74470
- },
74471
- {
74472
- date: "2021-04-01",
74473
- amount: "2464.65 \u20AC",
74474
- description: "Office-Supplies - STAPLES BREMEN"
74475
- }
74476
- ]}
74477
- dataName="transactions"
74478
- .dataActions="${[
74479
- {
74480
- name: "upload",
74481
- iconName: "bell",
74482
- useTableBehaviour: "upload",
74483
- type: ["inRow"],
74484
- actionFunc: async (optionsArg) => {
74485
- alert(optionsArg.item.amount);
74486
- }
74487
- },
74488
- {
74489
- name: "visibility",
74490
- iconName: "copy",
74491
- type: ["inRow"],
74492
- useTableBehaviour: "preview",
74493
- actionFunc: async (itemArg) => {
74494
- }
74495
- },
74496
- {
74497
- name: "create new",
74498
- iconName: "instagram",
74499
- type: ["header"],
74500
- useTableBehaviour: "preview",
74501
- actionFunc: async (itemArg) => {
74502
- }
74503
- },
74504
- {
74505
- name: "to gallery",
74506
- iconName: "message",
74507
- type: ["footer"],
74508
- useTableBehaviour: "preview",
74509
- actionFunc: async (itemArg) => {
74510
- }
74511
- },
74512
- {
74513
- name: "copy",
74514
- iconName: "copySolid",
74515
- type: ["contextmenu", "inRow"],
74516
- action: async () => {
74517
- return null;
74518
- }
74519
- },
74520
- {
74521
- name: "edit (from demo)",
74522
- iconName: "penToSquare",
74523
- type: ["contextmenu"],
74524
- action: async () => {
74525
- return null;
74526
- }
74527
- },
74528
- {
74529
- name: "paste",
74530
- iconName: "pasteSolid",
74531
- type: ["contextmenu"],
74532
- action: async () => {
74533
- return null;
74534
- }
74535
- },
74536
- {
74537
- name: "preview",
74538
- type: ["doubleClick", "contextmenu"],
74539
- iconName: "eye",
74540
- actionFunc: async (itemArg) => {
74541
- alert(itemArg.item.amount);
74542
- return null;
74543
- }
74544
- }
74545
- ]}"
74546
- .displayFunction=${(itemArg) => {
74547
- return {
74548
- ...itemArg,
74549
- onlyDisplayProp: "onlyDisplay"
74550
- };
74551
- }}
74552
- >This is a slotted Text</dees-table
74553
- >
74554
- </div>
74555
- `;
74812
+ ], DeesSpeechbubble.prototype, "isHidden", 2);
74813
+ __decorateClass([
74814
+ n5({
74815
+ type: String
74816
+ })
74817
+ ], DeesSpeechbubble.prototype, "status", 2);
74818
+ DeesSpeechbubble = __decorateClass([
74819
+ e7("dees-speechbubble")
74820
+ ], DeesSpeechbubble);
74556
74821
 
74557
- // ts_web/elements/dees-table.ts
74558
- var DeesTable = class extends DeesElement {
74822
+ // ts_web/elements/dees-spinner.ts
74823
+ var DeesSpinner = class extends DeesElement {
74559
74824
  constructor() {
74560
74825
  super();
74561
- this.heading1 = "heading 1";
74562
- this.heading2 = "heading 2";
74563
- this.data = [];
74564
- this.dataActions = [];
74565
- this.displayFunction = (itemArg) => itemArg;
74566
- this.reverseDisplayFunction = (itemArg) => itemArg;
74567
- this.editableFields = [];
74568
- this.files = [];
74569
- this.fileWeakMap = /* @__PURE__ */ new WeakMap();
74570
- this.dataChangeSubject = new plugins.smartrx.rxjs.Subject();
74826
+ this.size = 20;
74827
+ this.bnw = false;
74828
+ this.status = "normal";
74571
74829
  }
74572
74830
  render() {
74573
74831
  return x`
74574
- <div class="mainbox">
74575
- <!-- the heading part -->
74576
- <div class="header">
74577
- <div class="headingContainer">
74578
- <div class="heading heading1">${this.heading1}</div>
74579
- <div class="heading heading2">${this.heading2}</div>
74580
- </div>
74581
- <div class="headerActions">
74582
- ${resolveExec(async () => {
74583
- const resultArray = [];
74584
- for (const action of this.dataActions) {
74585
- if (!action.type.includes("header"))
74586
- continue;
74587
- resultArray.push(
74588
- x`<div
74589
- class="headerAction"
74590
- @click=${() => {
74591
- action.actionFunc({
74592
- item: this.selectedDataRow,
74593
- table: this
74594
- });
74595
- }}
74596
- >
74597
- ${action.iconName ? x`<dees-icon .iconSize=${14} .iconFA=${action.iconName}></dees-icon>
74598
- ${action.name}` : action.name}
74599
- </div>`
74600
- );
74601
- }
74602
- return resultArray;
74603
- })}
74604
- </div>
74605
- </div>
74606
- <div class="headingSeparation"></div>
74607
-
74608
- <!-- the actual table -->
74609
- <style></style>
74610
- ${this.data.length > 0 ? (() => {
74611
- const firstTransformedItem = this.displayFunction(this.data[0]);
74612
- const headings = Object.keys(firstTransformedItem);
74613
- return x`
74614
- <table>
74615
- <tr>
74616
- ${headings.map(
74617
- (headingArg) => x`
74618
- <th>
74619
- <div class="innerCellContainer">${headingArg}</div>
74620
- </th>
74621
- `
74622
- )}
74623
- ${(() => {
74624
- if (this.dataActions && this.dataActions.length > 0) {
74625
- return x`
74626
- <th>
74627
- <div class="innerCellContainer">Actions</div>
74628
- </th>
74629
- `;
74832
+ <style>
74833
+ #loading {
74834
+ width: ${this.size}px;
74835
+ height: ${this.size}px;
74630
74836
  }
74631
- })()}
74632
- </tr>
74633
- ${this.data.map((itemArg) => {
74634
- const transformedItem = this.displayFunction(itemArg);
74635
- const getTr = (elementArg) => {
74636
- if (elementArg.tagName === "TR") {
74637
- return elementArg;
74638
- } else {
74639
- return getTr(elementArg.parentElement);
74640
- }
74641
- };
74642
- return x`
74643
- <tr
74644
- @click=${() => {
74645
- this.selectedDataRow = itemArg;
74646
- }}
74647
- @dragenter=${async (eventArg) => {
74648
- eventArg.preventDefault();
74649
- eventArg.stopPropagation();
74650
- const realTarget = getTr(eventArg.target);
74651
- console.log("dragenter");
74652
- console.log(realTarget);
74653
- setTimeout(() => {
74654
- realTarget.classList.add("hasAttachment");
74655
- }, 0);
74656
- }}
74657
- @dragleave=${async (eventArg) => {
74658
- eventArg.preventDefault();
74659
- eventArg.stopPropagation();
74660
- const realTarget = getTr(eventArg.target);
74661
- realTarget.classList.remove("hasAttachment");
74662
- }}
74663
- @dragover=${async (eventArg) => {
74664
- eventArg.preventDefault();
74665
- }}
74666
- @drop=${async (eventArg) => {
74667
- eventArg.preventDefault();
74668
- const newFiles = [];
74669
- for (const file of Array.from(eventArg.dataTransfer.files)) {
74670
- this.files.push(file);
74671
- newFiles.push(file);
74672
- this.requestUpdate();
74673
- }
74674
- const result = this.fileWeakMap.get(itemArg);
74675
- if (!result) {
74676
- this.fileWeakMap.set(itemArg, newFiles);
74677
- } else {
74678
- result.push(...newFiles);
74679
- }
74680
- }}
74681
- @contextmenu=${async (eventArg) => {
74682
- DeesContextmenu.openContextMenuWithOptions(
74683
- eventArg,
74684
- this.getActionsForType("contextmenu").map((action) => {
74685
- const menuItem = {
74686
- name: action.name,
74687
- iconName: action.iconName,
74688
- action: async () => {
74689
- await action.actionFunc({
74690
- item: itemArg,
74691
- table: this
74692
- });
74693
- return null;
74694
- }
74695
- };
74696
- return menuItem;
74697
- })
74698
- );
74699
- }}
74700
- class="${itemArg === this.selectedDataRow ? "selected" : ""}"
74701
- >
74702
- ${headings.map(
74703
- (headingArg) => x`
74704
- <td
74705
- @dblclick=${(e12) => {
74706
- if (this.editableFields.includes(headingArg)) {
74707
- this.handleCellEditing(e12, itemArg, headingArg);
74708
- } else {
74709
- const wantedAction = this.dataActions.find(
74710
- (actionArg) => actionArg.type.includes("doubleClick")
74711
- );
74712
- if (wantedAction) {
74713
- wantedAction.actionFunc({
74714
- item: itemArg,
74715
- table: this
74716
- });
74717
- }
74718
- }
74719
- }}
74720
- >
74721
- <div class="innerCellContainer">${transformedItem[headingArg]}</div>
74722
- </td>
74723
- `
74724
- )}
74725
- ${(() => {
74726
- if (this.dataActions && this.dataActions.length > 0) {
74727
- return x`
74728
- <td>
74729
- <div class="innerCellContainer">
74730
- ${this.getActionsForType("inRow").map(
74731
- (actionArg) => x`<div
74732
- class="action"
74733
- @click=${() => actionArg.actionFunc({
74734
- item: itemArg,
74735
- table: this
74736
- })}
74737
- >
74738
- ${actionArg.iconName ? x`
74739
- <dees-icon .iconFA=${actionArg.iconName}></dees-icon>
74740
- ` : actionArg.name}
74741
- </div>`
74742
- )}
74743
- </div>
74744
- </td>
74745
- `;
74746
- }
74747
- })()}
74748
- </tr>
74749
- `;
74750
- })}
74751
- </table>
74752
- `;
74753
- })() : x` <div class="noDataSet">No data set!</div> `}
74754
- <div class="footer">
74755
- <div class="tableStatistics">
74756
- ${this.data.length} ${this.dataName || "data rows"} (total) |
74757
- ${this.selectedDataRow ? `# ${this.data.indexOf(this.selectedDataRow) + 1}` : `No`}
74758
- selected
74759
- </div>
74760
- <div class="footerActions">
74761
- ${resolveExec(async () => {
74762
- const resultArray = [];
74763
- for (const action of this.dataActions) {
74764
- if (!action.type.includes("footer"))
74765
- continue;
74766
- resultArray.push(
74767
- x`<div
74768
- class="footerAction"
74769
- @click=${() => {
74770
- action.actionFunc({
74771
- item: this.selectedDataRow,
74772
- table: this
74773
- });
74774
- }}
74775
- >
74776
- ${action.iconName ? x`<dees-icon .iconSize=${14} .iconFA=${action.iconName}></dees-icon>
74777
- ${action.name}` : action.name}
74778
- </div>`
74779
- );
74837
+ #loading.success {
74838
+ color: ${cssManager.bdTheme(this.bnw ? "#333" : `#8bc34a`, this.bnw ? "#fff" : `#8bc34a`)};
74839
+
74840
+ }
74841
+ #loading.error {
74842
+ color: ${cssManager.bdTheme(this.bnw ? "#333" : `#e64a19`, this.bnw ? "#fff" : `#e64a19`)};
74843
+ }
74844
+ dees-icon {
74845
+ font-size: ${this.size}px;
74846
+ }
74847
+ </style>
74848
+ <div class="${this.status}" id="loading">
74849
+ ${(() => {
74850
+ if (this.status === "success") {
74851
+ return x`<dees-icon style="transform: translateX(1%) translateY(3%);" .iconFA=${"circleCheck"}></dees-icon>`;
74852
+ } else if (this.status === "error") {
74853
+ return x`<dees-icon .iconFA=${"circleXmark"}></dees-icon>`;
74780
74854
  }
74781
- return resultArray;
74782
- })}
74783
- </div>
74784
- </div>
74855
+ })()}
74785
74856
  </div>
74786
74857
  `;
74787
74858
  }
74788
- async firstUpdated() {
74789
- }
74790
- async updated(changedProperties) {
74791
- super.updated(changedProperties);
74792
- this.freezeColumnWidths();
74793
- }
74794
- freezeColumnWidths() {
74795
- const table = this.shadowRoot.querySelector("table");
74796
- if (!table)
74797
- return;
74798
- let colgroup = table.querySelector("colgroup");
74799
- if (!colgroup) {
74800
- colgroup = document.createElement("colgroup");
74801
- table.insertBefore(colgroup, table.firstChild);
74802
- }
74803
- const cells = table.rows[0].cells;
74804
- for (let i8 = 0; i8 < cells.length; i8++) {
74805
- const cell = cells[i8];
74806
- const width = window.getComputedStyle(cell).width;
74807
- let col = colgroup.children[i8];
74808
- if (!col) {
74809
- col = document.createElement("col");
74810
- colgroup.appendChild(col);
74811
- }
74812
- col.style.width = width;
74813
- }
74814
- }
74815
- getActionsForType(typeArg) {
74816
- const actions = [];
74817
- for (const action of this.dataActions) {
74818
- if (!action.type.includes(typeArg))
74819
- continue;
74820
- actions.push(action);
74821
- }
74822
- return actions;
74823
- }
74824
- async handleCellEditing(event, itemArg, key) {
74825
- const domtools6 = await this.domtoolsPromise;
74826
- const target = event.target;
74827
- const originalColor = target.style.color;
74828
- target.style.color = "transparent";
74829
- const transformedItem = this.displayFunction(itemArg);
74830
- const initialValue = transformedItem[key] || "";
74831
- const input = document.createElement("input");
74832
- input.type = "text";
74833
- input.value = initialValue;
74834
- const blurInput = async (blurArg = true, saveArg = false) => {
74835
- if (blurArg) {
74836
- input.blur();
74837
- }
74838
- if (saveArg) {
74839
- itemArg[key] = input.value;
74840
- }
74841
- input.remove();
74842
- target.style.color = originalColor;
74843
- this.requestUpdate();
74844
- };
74845
- input.addEventListener("blur", () => {
74846
- blurInput(false, false);
74847
- });
74848
- input.addEventListener("keydown", (e12) => {
74849
- if (e12.key === "Enter") {
74850
- blurInput(true, true);
74851
- }
74852
- });
74853
- target.appendChild(input);
74854
- input.focus();
74855
- }
74856
74859
  };
74857
- DeesTable.demo = demoFunc10;
74858
- DeesTable.styles = [
74860
+ DeesSpinner.demo = () => x`
74861
+ <dees-spinner></dees-spinner>
74862
+ <dees-spinner status="success"></dees-spinner>
74863
+ <dees-spinner status="error"></dees-spinner>
74864
+ <dees-spinner size=${64} status="success"></dees-spinner>
74865
+ <dees-spinner .size=${64} status="error"></dees-spinner>
74866
+ `;
74867
+ DeesSpinner.styles = [
74859
74868
  cssManager.defaultStyles,
74860
74869
  i`
74861
- .mainbox {
74862
- color: ${cssManager.bdTheme("#333", "#fff")};
74863
- font-family: 'Roboto', 'Inter', sans-serif;
74864
- font-weight: 400;
74865
- font-size: 14px;
74866
- padding: 16px;
74870
+ :host {
74867
74871
  display: block;
74868
- width: 100%;
74869
- min-height: 50px;
74870
- background: ${cssManager.bdTheme("#ffffff", "#333333")};
74871
- border-radius: 3px;
74872
- border-top: 1px solid ${cssManager.bdTheme("#fff", "#444")};
74873
- box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.3);
74874
- overflow-x: auto;
74875
74872
  }
74876
74873
 
74877
- .header {
74874
+ #loading {
74875
+ position: relative;
74876
+ transition: none;
74878
74877
  display: flex;
74879
- justify-content: flex-end;
74880
- align-items: center;
74881
- font-family: 'Roboto', 'Inter', sans-serif;
74882
- }
74883
-
74884
- .headingContainer {
74885
- }
74886
-
74887
- .heading {
74888
- }
74889
-
74890
- .heading1 {
74891
- font-weight: 600;
74892
- }
74893
- .heading2 {
74894
- opacity: 0.6;
74878
+ justify-content: center;
74879
+ align-content: center;
74880
+ background: #8bc34a00;
74881
+ border: 3px solid ${cssManager.bdTheme("rgba(0, 0, 0, 0.1)", "rgba(255, 255, 255, 0.3)")};
74882
+ border-radius: 50%;
74883
+ border-top-color: ${cssManager.bdTheme("#333", "#fff")};
74884
+ animation: spin 1s ease-in-out infinite;
74885
+ -webkit-animation: spin 1s ease-in-out infinite;
74895
74886
  }
74896
74887
 
74897
- .headingSeparation {
74898
- margin-top: 7px;
74899
- border-bottom: 1px solid ${cssManager.bdTheme("#bcbcbc", "#bcbcbc")};
74888
+ #loading.success {
74889
+ border: none;
74890
+ border-radius: 50%;
74891
+ animation: none;
74892
+ -webkit-animation: none;
74900
74893
  }
74901
74894
 
74902
- .headerActions {
74903
- margin-left: auto;
74904
- cursor: pointer;
74905
- }
74906
- .headerAction {
74907
- display: flex;
74908
- color: ${cssManager.bdTheme("#333", "#ccc")};
74895
+ #loading.error {
74896
+ border: none;
74897
+ border-radius: 50%;
74898
+ animation: none;
74899
+ -webkit-animation: none;
74909
74900
  }
74910
74901
 
74911
- .headerAction:hover {
74912
- color: ${cssManager.bdTheme("#555", "#fff")};
74902
+ @keyframes spin {
74903
+ to {
74904
+ -webkit-transform: rotate(360deg);
74905
+ }
74913
74906
  }
74914
-
74915
- .headerAction dees-icon {
74916
- margin-right: 8px;
74907
+ @-webkit-keyframes spin {
74908
+ to {
74909
+ -webkit-transform: rotate(360deg);
74910
+ }
74917
74911
  }
74918
74912
 
74919
- table,
74920
- .noDataSet {
74921
- margin-top: 16px;
74922
- color: ${cssManager.bdTheme("#333", "#fff")};
74923
- border-collapse: collapse;
74913
+ dees-icon {
74914
+ position: absolute;
74915
+ height: 100%;
74924
74916
  width: 100%;
74925
74917
  }
74926
- .noDataSet {
74927
- text-align: center;
74928
- }
74929
- tr {
74930
- border-bottom: 1px dashed ${cssManager.bdTheme("#999", "#808080")};
74931
- text-align: left;
74932
- }
74933
- tr:last-child {
74934
- border-bottom: none;
74935
- text-align: left;
74936
- }
74937
- tr:hover {
74938
- cursor: pointer;
74939
- }
74940
- tr:hover td {
74941
- background: ${cssManager.bdTheme("#22222210", "#ffffff10")};
74942
- }
74943
- tr:first-child:hover {
74944
- cursor: auto;
74945
- }
74946
- tr:first-child:hover .innerCellContainer {
74947
- background: none;
74948
- }
74949
- tr.selected td {
74950
- background: ${cssManager.bdTheme("#22222220", "#ffffff20")};
74951
- }
74952
-
74953
- tr.hasAttachment td {
74954
- background: ${cssManager.bdTheme("#0098847c", "#0098847c")};
74955
- }
74918
+ `
74919
+ ];
74920
+ __decorateClass([
74921
+ n5({
74922
+ type: Number
74923
+ })
74924
+ ], DeesSpinner.prototype, "size", 2);
74925
+ __decorateClass([
74926
+ n5({
74927
+ type: String
74928
+ })
74929
+ ], DeesSpinner.prototype, "bnw", 2);
74930
+ __decorateClass([
74931
+ n5()
74932
+ ], DeesSpinner.prototype, "status", 2);
74933
+ DeesSpinner = __decorateClass([
74934
+ e7("dees-spinner")
74935
+ ], DeesSpinner);
74956
74936
 
74957
- th {
74958
- text-transform: none;
74959
- font-family: 'Roboto', 'Inter', sans-serif;
74960
- font-weight: 500;
74961
- }
74962
- th,
74963
- td {
74964
- position: relative;
74965
- padding: 0px;
74966
- border-right: 1px dashed ${cssManager.bdTheme("#999", "#808080")};
74967
- }
74968
- .innerCellContainer {
74969
- min-height: 36px;
74970
- position: relative;
74971
- height: 100%;
74937
+ // ts_web/elements/dees-stepper.ts
74938
+ var DeesStepper = class extends DeesElement {
74939
+ constructor() {
74940
+ super();
74941
+ this.steps = [];
74942
+ this.getIndexOfStep = (stepArg) => {
74943
+ return this.steps.findIndex((stepArg2) => stepArg === stepArg2);
74944
+ };
74945
+ }
74946
+ render() {
74947
+ return x`
74948
+ <div class="stepperContainer">
74949
+ ${this.steps.map(
74950
+ (stepArg) => x`<div
74951
+ class="step ${stepArg === this.selectedStep ? "selected" : null} ${this.getIndexOfStep(stepArg) > this.getIndexOfStep(this.selectedStep) ? "hiddenStep" : ""}"
74952
+ >
74953
+ ${this.getIndexOfStep(stepArg) > 0 ? x`<div class="goBack" @click=${this.goBack}><- go to previous step</div>` : ``}
74954
+ <div class="stepCounter">
74955
+ Step ${this.steps.findIndex((elementArg) => elementArg === stepArg) + 1} of
74956
+ ${this.steps.length}
74957
+ </div>
74958
+ <div class="title">${stepArg.title}</div>
74959
+ <div class="content">${stepArg.content}</div>
74960
+ </div> `
74961
+ )}
74962
+ </div>
74963
+ `;
74964
+ }
74965
+ async firstUpdated() {
74966
+ await this.domtoolsPromise;
74967
+ await this.domtools.convenience.smartdelay.delayFor(0);
74968
+ this.selectedStep = this.steps[0];
74969
+ this.setScrollStatus();
74970
+ }
74971
+ async updated() {
74972
+ this.setScrollStatus();
74973
+ }
74974
+ async setScrollStatus() {
74975
+ const stepperContainer = this.shadowRoot.querySelector(".stepperContainer");
74976
+ const firstStepElement = this.shadowRoot.querySelector(".step");
74977
+ const selectedStepElement = this.shadowRoot.querySelector(".selected");
74978
+ if (!selectedStepElement) {
74979
+ return;
74980
+ }
74981
+ if (!stepperContainer.style.paddingTop) {
74982
+ stepperContainer.style.paddingTop = `${stepperContainer.offsetHeight / 2 - selectedStepElement.offsetHeight / 2}px`;
74983
+ }
74984
+ console.log("Setting scroll status");
74985
+ console.log(selectedStepElement);
74986
+ const scrollPosition = selectedStepElement.offsetTop - stepperContainer.offsetHeight / 2 + selectedStepElement.offsetHeight / 2;
74987
+ console.log(scrollPosition);
74988
+ const domtoolsInstance = await DomTools.setupDomTools();
74989
+ if (!this.scroller) {
74990
+ this.scroller = new plugins.SweetScroll(
74991
+ {
74992
+ vertical: true,
74993
+ horizontal: false,
74994
+ easing: "easeInOutExpo",
74995
+ duration: 700
74996
+ },
74997
+ stepperContainer
74998
+ );
74999
+ }
75000
+ if (!this.selectedStep.validationFuncCalled && this.selectedStep.validationFunc) {
75001
+ this.selectedStep.validationFuncCalled = true;
75002
+ await this.selectedStep.validationFunc(this, selectedStepElement);
75003
+ }
75004
+ this.scroller.to(scrollPosition);
75005
+ }
75006
+ async goBack() {
75007
+ const currentIndex = this.steps.findIndex((stepArg) => stepArg === this.selectedStep);
75008
+ this.selectedStep = this.steps[currentIndex - 1];
75009
+ await this.domtoolsPromise;
75010
+ await this.domtools.convenience.smartdelay.delayFor(100);
75011
+ this.selectedStep.onReturnToStepFunc?.(this, this.shadowRoot.querySelector(".selected"));
75012
+ }
75013
+ goNext() {
75014
+ const currentIndex = this.steps.findIndex((stepArg) => stepArg === this.selectedStep);
75015
+ this.selectedStep = this.steps[currentIndex + 1];
75016
+ }
75017
+ };
75018
+ DeesStepper.demo = () => x`
75019
+ <dees-stepper
75020
+ .steps=${[
75021
+ {
75022
+ title: "Whats your name?",
75023
+ content: x`
75024
+ <dees-form>
75025
+ <dees-input-text
75026
+ key="email"
75027
+ label="Your Email"
75028
+ value="hello@something.com"
75029
+ disabled
75030
+ ></dees-input-text>
75031
+ <dees-input-text key="firstName" required label="Vorname"></dees-input-text>
75032
+ <dees-input-text key="lastName" required label="Nachname"></dees-input-text>
75033
+ <dees-form-submit>Next</dees-form-submit>
75034
+ </dees-form>
75035
+ `,
75036
+ validationFunc: async (stepperArg, elementArg) => {
75037
+ const deesForm = elementArg.querySelector("dees-form");
75038
+ deesForm.addEventListener("formData", (eventArg) => {
75039
+ stepperArg.goNext();
75040
+ });
75041
+ }
75042
+ },
75043
+ {
75044
+ title: "Whats your mobile number?",
75045
+ content: x``
75046
+ }
75047
+ ]}
75048
+ ></dees-stepper>
75049
+ `;
75050
+ DeesStepper.styles = [
75051
+ cssManager.defaultStyles,
75052
+ i`
75053
+ :host {
75054
+ position: absolute;
74972
75055
  width: 100%;
74973
- padding: 6px 8px;
74974
- line-height: 24px;
74975
- }
74976
- th:first-child .innerCellContainer,
74977
- td:first-child .innerCellContainer {
74978
- padding-left: 0px;
74979
- }
74980
- th:last-child .innerCellContainer,
74981
- td:last-child .innerCellContainer {
74982
- padding-right: 0px;
74983
- }
74984
- th:last-child,
74985
- td:last-child {
74986
- border-right: none;
75056
+ height: 100%;
74987
75057
  }
74988
- td input {
75058
+ .stepperContainer {
75059
+ position: absolute;
74989
75060
  width: 100%;
74990
75061
  height: 100%;
74991
- outline: none;
74992
- border: 2px solid #fa6101;
74993
- top: 0px;
74994
- bottom: 0px;
74995
- right: 0px;
74996
- left: 0px;
74997
- position: absolute;
74998
- background: #fa610140;
74999
- color: ${cssManager.bdTheme("#333", "#fff")};
75000
- font-family: inherit;
75001
- font-size: inherit;
75002
- font-weight: inherit;
75003
- padding: 0px 6px;
75062
+ background: ${cssManager.bdTheme("#eeeeeb", "#000")};
75063
+ overflow: hidden;
75004
75064
  }
75005
75065
 
75006
- .action {
75007
- margin: -6px 0px;
75008
- padding: 10px;
75009
- line-height: 36px;
75010
- height: 36px;
75011
- display: inline-block;
75066
+ .step {
75067
+ position: relative;
75068
+ pointer-events: none;
75069
+ overflow: hidden;
75070
+ transition: all 0.7s ease-in-out;
75071
+ max-width: 500px;
75072
+ min-height: 300px;
75073
+ border-radius: 3px;
75074
+ background: ${cssManager.bdTheme("#ffffff", "#181818")};
75075
+ border-top: 1px solid ${cssManager.bdTheme("#ffffff", "#181818")};
75076
+ color: ${cssManager.bdTheme("#333", "#fff")};
75077
+ margin: auto;
75078
+ margin-bottom: 20px;
75079
+ filter: opacity(0.5) grayscale(1);
75080
+ box-shadow: 0px 0px 3px #00000010;
75081
+ user-select: none;
75012
75082
  }
75013
75083
 
75014
- .action:first-child {
75015
- margin-left: -8px;
75016
- width: min-content;
75084
+ .step.selected {
75085
+ border-top: 1px solid #e4002b;
75086
+ pointer-events: all;
75087
+ filter: opacity(1) grayscale(0);
75088
+ box-shadow: 0px 0px 5px #00000010;
75089
+ user-select: auto;
75017
75090
  }
75018
75091
 
75019
- .action:hover {
75020
- background: ${cssManager.bdTheme("#CCC", "#00000030")};
75092
+ .step.hiddenStep {
75093
+ filter: opacity(0);
75021
75094
  }
75022
75095
 
75023
- .footer {
75024
- font-family: 'Roboto', 'Inter', sans-serif;
75025
- font-size: 14px;
75026
- color: ${cssManager.bdTheme("#111", "#ffffff90")};
75027
- background: ${cssManager.bdTheme("#eeeeeb", "#00000050")};
75028
- margin: 16px -16px -16px -16px;
75029
- border-bottom-left-radius: 3px;
75030
- border-bottom-right-radius: 3px;
75031
- display: flex;
75096
+ .step:last-child {
75097
+ margin-bottom: 100vh;
75032
75098
  }
75033
75099
 
75034
- .tableStatistics {
75035
- padding: 8px 16px;
75100
+ .step .stepCounter {
75101
+ position: absolute;
75102
+ top: 0px;
75103
+ right: 0px;
75104
+ padding: 10px 15px;
75105
+ font-size: 12px;
75106
+ border-bottom-left-radius: 3px;
75107
+ background: ${cssManager.bdTheme("#00000008", "#ffffff08")};
75036
75108
  }
75037
75109
 
75038
- .footerActions {
75039
- margin-left: auto;
75110
+ .step .goBack {
75111
+ position: absolute;
75112
+ top: 0px;
75113
+ left: 0px;
75114
+ padding: 10px 15px;
75115
+ font-size: 12px;
75116
+ border-bottom-right-radius: 3px;
75117
+ background: ${cssManager.bdTheme("#00000008", "#ffffff08")};
75118
+ cursor: pointer;
75040
75119
  }
75041
75120
 
75042
- .footerActions .footerAction {
75043
- cursor: pointer;
75044
- padding: 8px 16px;
75045
- display: flex;
75121
+ .step .goBack:hover {
75122
+ background: ${cssManager.bdTheme("#00000012", "#ffffff12")};
75046
75123
  }
75047
75124
 
75048
- .footerActions .footerAction:hover {
75049
- background: ${cssManager.bdTheme("#CCC", "#111")};
75125
+ .step .title {
75126
+ text-align: center;
75127
+ padding-top: 50px;
75128
+ font-family: 'Roboto', 'Inter', sans-serif;
75129
+ font-size: 25px;
75130
+ font-weight: 300;
75050
75131
  }
75051
75132
 
75052
- .footerActions dees-icon {
75053
- display: flex;
75054
- margin-right: 8px;
75133
+ .step .content {
75134
+ padding: 20px;
75055
75135
  }
75056
75136
  `
75057
75137
  ];
75058
- __decorateClass([
75059
- n5({
75060
- type: String
75061
- })
75062
- ], DeesTable.prototype, "heading1", 2);
75063
- __decorateClass([
75064
- n5({
75065
- type: String
75066
- })
75067
- ], DeesTable.prototype, "heading2", 2);
75068
- __decorateClass([
75069
- n5({
75070
- type: Array
75071
- })
75072
- ], DeesTable.prototype, "data", 2);
75073
- __decorateClass([
75074
- n5({
75075
- type: String,
75076
- reflect: true
75077
- })
75078
- ], DeesTable.prototype, "dataName", 2);
75079
75138
  __decorateClass([
75080
75139
  n5({
75081
75140
  type: Array
75082
75141
  })
75083
- ], DeesTable.prototype, "dataActions", 2);
75084
- __decorateClass([
75085
- n5({
75086
- attribute: false
75087
- })
75088
- ], DeesTable.prototype, "displayFunction", 2);
75089
- __decorateClass([
75090
- n5({
75091
- attribute: false
75092
- })
75093
- ], DeesTable.prototype, "reverseDisplayFunction", 2);
75142
+ ], DeesStepper.prototype, "steps", 2);
75094
75143
  __decorateClass([
75095
75144
  n5({
75096
75145
  type: Object
75097
75146
  })
75098
- ], DeesTable.prototype, "selectedDataRow", 2);
75099
- __decorateClass([
75100
- n5({
75101
- type: Array
75102
- })
75103
- ], DeesTable.prototype, "editableFields", 2);
75104
- DeesTable = __decorateClass([
75105
- e7("dees-table")
75106
- ], DeesTable);
75147
+ ], DeesStepper.prototype, "selectedStep", 2);
75148
+ DeesStepper = __decorateClass([
75149
+ e7("dees-stepper")
75150
+ ], DeesStepper);
75107
75151
 
75108
75152
  // ts_web/elements/dees-toast.demo.ts
75109
75153
  var demoFunc11 = async () => {