@simplysm/angular 14.0.11 → 14.0.12
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.
- package/README.md +8 -5
- package/dist/core/directives/sd-router-link.directive.js +2 -2
- package/dist/core/pipes/format.pipe.d.ts.map +1 -1
- package/dist/core/pipes/format.pipe.js +2 -0
- package/dist/core/plugins/commands/findTopOpenModalEl.d.ts +1 -1
- package/dist/core/plugins/commands/findTopOpenModalEl.d.ts.map +1 -1
- package/dist/core/plugins/commands/findTopOpenModalEl.js +2 -2
- package/dist/core/plugins/commands/sd-insert-command-event.plugin.d.ts +1 -0
- package/dist/core/plugins/commands/sd-insert-command-event.plugin.d.ts.map +1 -1
- package/dist/core/plugins/commands/sd-insert-command-event.plugin.js +4 -3
- package/dist/core/plugins/commands/sd-refresh-command-event.plugin.d.ts +1 -0
- package/dist/core/plugins/commands/sd-refresh-command-event.plugin.d.ts.map +1 -1
- package/dist/core/plugins/commands/sd-refresh-command-event.plugin.js +4 -3
- package/dist/core/plugins/commands/sd-save-command-event.plugin.d.ts +1 -0
- package/dist/core/plugins/commands/sd-save-command-event.plugin.d.ts.map +1 -1
- package/dist/core/plugins/commands/sd-save-command-event.plugin.js +4 -3
- package/dist/core/plugins/events/sd-intersection-event.plugin.d.ts.map +1 -1
- package/dist/core/plugins/events/sd-intersection-event.plugin.js +2 -3
- package/dist/core/plugins/events/sd-option-event.plugin.d.ts +1 -0
- package/dist/core/plugins/events/sd-option-event.plugin.d.ts.map +1 -1
- package/dist/core/plugins/events/sd-option-event.plugin.js +2 -1
- package/dist/core/plugins/sd-global-error-handler.plugin.d.ts.map +1 -1
- package/dist/core/plugins/sd-global-error-handler.plugin.js +3 -1
- package/dist/core/provideSdAngular.d.ts.map +1 -1
- package/dist/core/provideSdAngular.js +14 -4
- package/dist/core/providers/sd-app-structure.provider.d.ts.map +1 -1
- package/dist/core/providers/sd-app-structure.provider.js +8 -7
- package/dist/core/providers/sd-file-dialog.provider.d.ts.map +1 -1
- package/dist/core/providers/sd-file-dialog.provider.js +15 -7
- package/dist/core/providers/sd-local-storage.provider.d.ts.map +1 -1
- package/dist/core/providers/sd-local-storage.provider.js +6 -1
- package/dist/core/providers/sd-navigate-window.provider.js +4 -1
- package/dist/core/providers/sd-print.provider.js +2 -2
- package/dist/core/providers/sd-shared-data.provider.d.ts.map +1 -1
- package/dist/core/providers/sd-shared-data.provider.js +14 -3
- package/dist/core/utils/injectParent.js +9 -5
- package/dist/core/utils/setups/setupModelHook.d.ts.map +1 -1
- package/dist/core/utils/setups/setupModelHook.js +4 -1
- package/dist/core/utils/setups/setupRevealOnShow.d.ts.map +1 -1
- package/dist/core/utils/setups/setupRevealOnShow.js +3 -2
- package/dist/core/utils/useExpandingManager.d.ts.map +1 -1
- package/dist/core/utils/useExpandingManager.js +3 -2
- package/dist/core/utils/useSdSystemConfigResource.d.ts +1 -1
- package/dist/core/utils/useSdSystemConfigResource.d.ts.map +1 -1
- package/dist/core/utils/useSdSystemConfigResource.js +13 -12
- package/dist/core/utils/withBusy.d.ts +3 -0
- package/dist/core/utils/withBusy.d.ts.map +1 -0
- package/dist/core/utils/withBusy.js +9 -0
- package/dist/features/address/sd-address-search.modal.d.ts.map +1 -1
- package/dist/features/address/sd-address-search.modal.js +5 -2
- package/dist/features/data-view/sd-data-detail.control.d.ts.map +1 -1
- package/dist/features/data-view/sd-data-detail.control.js +14 -18
- package/dist/features/data-view/sd-data-sheet.control.d.ts.map +1 -1
- package/dist/features/data-view/sd-data-sheet.control.js +23 -30
- package/dist/features/permission-table/sd-permission-table.control.d.ts +4 -0
- package/dist/features/permission-table/sd-permission-table.control.d.ts.map +1 -1
- package/dist/features/permission-table/sd-permission-table.control.js +113 -43
- package/dist/features/shared-data/matchesSearchText.d.ts +2 -0
- package/dist/features/shared-data/matchesSearchText.d.ts.map +1 -0
- package/dist/features/shared-data/matchesSearchText.js +11 -0
- package/dist/features/shared-data/sd-shared-data-select-button.control.d.ts +2 -2
- package/dist/features/shared-data/sd-shared-data-select-button.control.d.ts.map +1 -1
- package/dist/features/shared-data/sd-shared-data-select-list.control.d.ts +1 -0
- package/dist/features/shared-data/sd-shared-data-select-list.control.d.ts.map +1 -1
- package/dist/features/shared-data/sd-shared-data-select-list.control.js +16 -11
- package/dist/features/shared-data/sd-shared-data-select.control.d.ts +2 -1
- package/dist/features/shared-data/sd-shared-data-select.control.d.ts.map +1 -1
- package/dist/features/shared-data/sd-shared-data-select.control.js +44 -29
- package/dist/index.d.ts +4 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/ui/data/sheet/sd-sheet.control.d.ts +5 -2
- package/dist/ui/data/sheet/sd-sheet.control.d.ts.map +1 -1
- package/dist/ui/data/sheet/sd-sheet.control.js +48 -47
- package/dist/ui/data/sheet/types.d.ts +5 -1
- package/dist/ui/data/sheet/types.d.ts.map +1 -1
- package/dist/ui/data/sheet/useSheetCellAgent.d.ts.map +1 -1
- package/dist/ui/data/sheet/useSheetCellAgent.js +8 -4
- package/dist/ui/data/sheet/useSheetColumnFixing.d.ts +6 -0
- package/dist/ui/data/sheet/useSheetColumnFixing.d.ts.map +1 -1
- package/dist/ui/data/sheet/useSheetColumnFixing.js +6 -0
- package/dist/ui/form/editor/sd-tiptap-editor.control.d.ts +2 -2
- package/dist/ui/form/editor/sd-tiptap-editor.control.d.ts.map +1 -1
- package/dist/ui/form/editor/sd-tiptap-editor.control.js +15 -13
- package/dist/ui/form/input/sd-date-range.picker.d.ts.map +1 -1
- package/dist/ui/form/input/sd-date-range.picker.js +8 -1
- package/dist/ui/form/select/sd-select.control.d.ts.map +1 -1
- package/dist/ui/form/select/sd-select.control.js +20 -16
- package/dist/ui/layout/dock/sd-dock.control.js +4 -4
- package/dist/ui/navigation/pagination/sd-pagination.control.js +1 -1
- package/dist/ui/navigation/sidebar/sd-sidebar-menu.control.d.ts +7 -13
- package/dist/ui/navigation/sidebar/sd-sidebar-menu.control.d.ts.map +1 -1
- package/dist/ui/navigation/sidebar/sd-sidebar-menu.control.js +1 -1
- package/dist/ui/navigation/topbar/sd-topbar-menu.control.d.ts +7 -13
- package/dist/ui/navigation/topbar/sd-topbar-menu.control.d.ts.map +1 -1
- package/dist/ui/navigation/topbar/sd-topbar-menu.control.js +1 -1
- package/dist/ui/overlay/dropdown/sd-dropdown-popup.control.d.ts +0 -3
- package/dist/ui/overlay/dropdown/sd-dropdown-popup.control.d.ts.map +1 -1
- package/dist/ui/overlay/dropdown/sd-dropdown-popup.control.js +8 -21
- package/dist/ui/overlay/dropdown/sd-dropdown.control.d.ts +1 -1
- package/dist/ui/overlay/dropdown/sd-dropdown.control.d.ts.map +1 -1
- package/dist/ui/overlay/dropdown/sd-dropdown.control.js +19 -20
- package/dist/ui/overlay/modal/sd-modal.control.d.ts.map +1 -1
- package/dist/ui/overlay/modal/sd-modal.control.js +21 -5
- package/dist/ui/overlay/toast/sd-toast.provider.d.ts +1 -0
- package/dist/ui/overlay/toast/sd-toast.provider.d.ts.map +1 -1
- package/dist/ui/overlay/toast/sd-toast.provider.js +16 -2
- package/dist/ui/visual/sd-barcode.control.d.ts +2 -2
- package/dist/ui/visual/sd-barcode.control.d.ts.map +1 -1
- package/dist/ui/visual/sd-barcode.control.js +25 -18
- package/dist/ui/visual/sd-progress.control.d.ts.map +1 -1
- package/dist/ui/visual/sd-progress.control.js +1 -1
- package/docs/core.md +19 -0
- package/docs/features.md +25 -0
- package/docs/ui-data.md +20 -4
- package/docs/ui-navigation.md +8 -44
- package/package.json +25 -25
- package/src/core/directives/sd-router-link.directive.ts +1 -1
- package/src/core/pipes/format.pipe.ts +1 -0
- package/src/core/plugins/commands/findTopOpenModalEl.ts +2 -2
- package/src/core/plugins/commands/sd-insert-command-event.plugin.ts +5 -3
- package/src/core/plugins/commands/sd-refresh-command-event.plugin.ts +5 -3
- package/src/core/plugins/commands/sd-save-command-event.plugin.ts +5 -3
- package/src/core/plugins/events/sd-intersection-event.plugin.ts +2 -3
- package/src/core/plugins/events/sd-option-event.plugin.ts +3 -1
- package/src/core/plugins/sd-global-error-handler.plugin.ts +4 -1
- package/src/core/provideSdAngular.ts +17 -4
- package/src/core/providers/sd-app-structure.provider.ts +7 -7
- package/src/core/providers/sd-file-dialog.provider.ts +18 -9
- package/src/core/providers/sd-local-storage.provider.ts +5 -1
- package/src/core/providers/sd-navigate-window.provider.ts +3 -3
- package/src/core/providers/sd-print.provider.ts +2 -2
- package/src/core/providers/sd-shared-data.provider.ts +14 -3
- package/src/core/utils/injectParent.ts +10 -6
- package/src/core/utils/setups/setupModelHook.ts +6 -1
- package/src/core/utils/setups/setupRevealOnShow.ts +3 -2
- package/src/core/utils/useExpandingManager.ts +4 -2
- package/src/core/utils/useSdSystemConfigResource.ts +13 -11
- package/src/core/utils/withBusy.ts +13 -0
- package/src/features/address/sd-address-search.modal.ts +5 -2
- package/src/features/data-view/sd-data-detail.control.ts +37 -33
- package/src/features/data-view/sd-data-sheet.control.ts +61 -54
- package/src/features/permission-table/sd-permission-table.control.ts +127 -51
- package/src/features/shared-data/matchesSearchText.ts +16 -0
- package/src/features/shared-data/sd-shared-data-select-button.control.ts +4 -4
- package/src/features/shared-data/sd-shared-data-select-list.control.ts +19 -11
- package/src/features/shared-data/sd-shared-data-select.control.ts +50 -30
- package/src/index.ts +4 -8
- package/src/ui/data/sheet/sd-sheet.control.ts +51 -48
- package/src/ui/data/sheet/types.ts +6 -1
- package/src/ui/data/sheet/useSheetCellAgent.ts +5 -3
- package/src/ui/data/sheet/useSheetColumnFixing.ts +6 -0
- package/src/ui/form/editor/sd-tiptap-editor.control.ts +14 -12
- package/src/ui/form/input/sd-date-range.picker.ts +7 -1
- package/src/ui/form/select/sd-select.control.ts +18 -14
- package/src/ui/layout/dock/sd-dock.control.ts +4 -4
- package/src/ui/navigation/pagination/sd-pagination.control.ts +1 -1
- package/src/ui/navigation/sidebar/sd-sidebar-menu.control.ts +7 -14
- package/src/ui/navigation/topbar/sd-topbar-menu.control.ts +7 -14
- package/src/ui/overlay/dropdown/sd-dropdown-popup.control.ts +2 -17
- package/src/ui/overlay/dropdown/sd-dropdown.control.ts +19 -19
- package/src/ui/overlay/modal/sd-modal.control.ts +21 -5
- package/src/ui/overlay/toast/sd-toast.provider.ts +14 -1
- package/src/ui/visual/sd-barcode.control.ts +18 -16
- package/src/ui/visual/sd-progress.control.ts +1 -1
|
@@ -418,39 +418,51 @@ export class SdSheetControl {
|
|
|
418
418
|
const col = this._columnControlMap().get(key);
|
|
419
419
|
return col?.summaryTplRef() ?? null;
|
|
420
420
|
}
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
421
|
+
// Pre-computed column styles: header/footer (fixed z-index:3)
|
|
422
|
+
_headerColumnStyles = computed(() => {
|
|
423
|
+
const map = new Map();
|
|
424
|
+
for (const colDef of this.layout.columnDefs()) {
|
|
425
|
+
const parts = [];
|
|
426
|
+
const colStyle = this._getColDefStyle(colDef);
|
|
427
|
+
if (colStyle != null)
|
|
428
|
+
parts.push(colStyle);
|
|
429
|
+
const fixedStyle = this._getFixedStyle(colDef, 3, "var(--theme-secondary-lightest)");
|
|
430
|
+
if (fixedStyle != null)
|
|
430
431
|
parts.push(fixedStyle);
|
|
431
|
-
|
|
432
|
+
map.set(colDef.key, parts.length > 0 ? parts.join("; ") : null);
|
|
432
433
|
}
|
|
433
|
-
return
|
|
434
|
+
return map;
|
|
435
|
+
}, ...(ngDevMode ? [{ debugName: "_headerColumnStyles" }] : /* istanbul ignore next */ []));
|
|
436
|
+
// Pre-computed column styles: body (fixed z-index:1)
|
|
437
|
+
_dataColumnBaseStyles = computed(() => {
|
|
438
|
+
const map = new Map();
|
|
439
|
+
for (const colDef of this.layout.columnDefs()) {
|
|
440
|
+
const parts = [];
|
|
441
|
+
const colStyle = this._getColDefStyle(colDef);
|
|
442
|
+
if (colStyle != null)
|
|
443
|
+
parts.push(colStyle);
|
|
444
|
+
const fixedStyle = this._getFixedStyle(colDef);
|
|
445
|
+
if (fixedStyle != null)
|
|
446
|
+
parts.push(fixedStyle);
|
|
447
|
+
map.set(colDef.key, parts.length > 0 ? parts.join("; ") : null);
|
|
448
|
+
}
|
|
449
|
+
return map;
|
|
450
|
+
}, ...(ngDevMode ? [{ debugName: "_dataColumnBaseStyles" }] : /* istanbul ignore next */ []));
|
|
451
|
+
getHeaderCellStyle(cell) {
|
|
452
|
+
if (cell.colDef == null)
|
|
453
|
+
return null;
|
|
454
|
+
return this._headerColumnStyles().get(cell.colDef.key) ?? null;
|
|
434
455
|
}
|
|
435
456
|
getCellStyle(item, colDef) {
|
|
436
|
-
const
|
|
437
|
-
const baseStyle = this._getColDefStyle(colDef);
|
|
438
|
-
if (baseStyle != null) {
|
|
439
|
-
parts.push(baseStyle);
|
|
440
|
-
}
|
|
441
|
-
const fixedStyle = this._getFixedStyle(colDef);
|
|
442
|
-
if (fixedStyle != null) {
|
|
443
|
-
parts.push(fixedStyle);
|
|
444
|
-
}
|
|
457
|
+
const baseStyle = this._dataColumnBaseStyles().get(colDef.key) ?? null;
|
|
445
458
|
const styleFn = this.getItemCellStyleFn();
|
|
446
459
|
const customStyle = styleFn != null ? styleFn(item, colDef.key) : undefined;
|
|
447
|
-
if (customStyle != null)
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
return parts.length > 0 ? parts.join("; ") : null;
|
|
460
|
+
if (baseStyle != null && customStyle != null)
|
|
461
|
+
return `${baseStyle}; ${customStyle}`;
|
|
462
|
+
return customStyle ?? baseStyle ?? null;
|
|
451
463
|
}
|
|
452
464
|
getFixedCellStyle(colDef) {
|
|
453
|
-
return this._getFixedStyle(colDef);
|
|
465
|
+
return this._getFixedStyle(colDef, 3);
|
|
454
466
|
}
|
|
455
467
|
getSelectableTooltip(item) {
|
|
456
468
|
const result = this.selection.getSelectable(item);
|
|
@@ -507,8 +519,10 @@ export class SdSheetControl {
|
|
|
507
519
|
getItemDef(item) {
|
|
508
520
|
return this.expanding.def(item);
|
|
509
521
|
}
|
|
522
|
+
// PERF-005: Set-based lookup for O(1) isExpanded check
|
|
523
|
+
_expandedSet = computed(() => new Set(this.expandedItems()), ...(ngDevMode ? [{ debugName: "_expandedSet" }] : /* istanbul ignore next */ []));
|
|
510
524
|
isExpanded(item) {
|
|
511
|
-
return this.
|
|
525
|
+
return this._expandedSet().has(item);
|
|
512
526
|
}
|
|
513
527
|
getAriaExpanded(item) {
|
|
514
528
|
if (this.getChildrenFn() == null)
|
|
@@ -531,33 +545,20 @@ export class SdSheetControl {
|
|
|
531
545
|
return sortDef.desc ? "descending" : "ascending";
|
|
532
546
|
}
|
|
533
547
|
_getColDefStyle(colDef) {
|
|
534
|
-
const parts = [];
|
|
535
|
-
if (colDef.width != null) {
|
|
536
|
-
parts.push(`width: ${colDef.width}`);
|
|
537
|
-
parts.push(`min-width: ${colDef.width}`);
|
|
538
|
-
parts.push(`max-width: ${colDef.width}`);
|
|
539
|
-
}
|
|
540
548
|
if (colDef.collapse) {
|
|
541
|
-
|
|
542
|
-
parts.push("width: 0");
|
|
543
|
-
parts.push("min-width: 0");
|
|
544
|
-
parts.push("max-width: 0");
|
|
545
|
-
parts.push("overflow: hidden");
|
|
546
|
-
parts.push("border: none");
|
|
549
|
+
return "padding: 0; width: 0; min-width: 0; max-width: 0; overflow: hidden; border: none";
|
|
547
550
|
}
|
|
548
|
-
|
|
551
|
+
if (colDef.width != null) {
|
|
552
|
+
return `width: ${colDef.width}; min-width: ${colDef.width}; max-width: ${colDef.width}`;
|
|
553
|
+
}
|
|
554
|
+
return null;
|
|
549
555
|
}
|
|
550
|
-
_getFixedStyle(colDef) {
|
|
556
|
+
_getFixedStyle(colDef, zIndex = 1, background = "var(--control-color)") {
|
|
551
557
|
const fixedLeftMap = this.fixing.fixedLeftMap();
|
|
552
558
|
const leftValue = fixedLeftMap.get(colDef.key);
|
|
553
559
|
if (leftValue == null)
|
|
554
560
|
return null;
|
|
555
|
-
|
|
556
|
-
parts.push("position: sticky");
|
|
557
|
-
parts.push(`left: ${leftValue}px`);
|
|
558
|
-
parts.push("z-index: 1");
|
|
559
|
-
parts.push("background: var(--control-color)");
|
|
560
|
-
return parts.join("; ");
|
|
561
|
+
return `position: sticky; left: ${leftValue}px; z-index: ${zIndex}; background: ${background}`;
|
|
561
562
|
}
|
|
562
563
|
getDataCellClass(item, colDef, r, c) {
|
|
563
564
|
const parts = [];
|
|
@@ -845,4 +846,4 @@ export class SdSheetControl {
|
|
|
845
846
|
"(blur.capture)": "onBlurCapture($event)",
|
|
846
847
|
}, styles: ["sd-sheet {\n display: block;\n position: relative;\n overflow: hidden;\n border: 1px solid var(--trans-lighter);\n}\nsd-sheet[data-sd-inset=true] {\n border: none;\n}\nsd-sheet > ._tool {\n display: flex;\n align-items: center;\n gap: var(--gap-sm);\n padding: var(--gap-sm) var(--gap-default);\n border-bottom: 1px solid var(--trans-lighter);\n background: var(--theme-secondary-lightest);\n}\nsd-sheet > ._container {\n overflow: auto;\n width: 100%;\n height: 100%;\n}\nsd-sheet > ._container > table {\n width: 100%;\n border-collapse: collapse;\n table-layout: fixed;\n}\nsd-sheet > ._container > table > thead > tr > th {\n position: sticky;\n top: 0;\n z-index: 2;\n background: var(--theme-secondary-lightest);\n border: 1px solid var(--trans-lighter);\n padding: var(--gap-sm) var(--gap-default);\n text-align: left;\n font-weight: bold;\n white-space: nowrap;\n cursor: pointer;\n user-select: none;\n}\nsd-sheet > ._container > table > thead > tr > th:not(._select-col):not(._expand-col) {\n position: relative;\n}\nsd-sheet > ._container > table > thead > tr > th > ._sort-icon {\n font-size: 0.85em;\n vertical-align: middle;\n margin-left: 0.25em;\n}\nsd-sheet > ._container > table > thead > tr > th > ._sort-index {\n font-size: 0.75em;\n vertical-align: super;\n}\nsd-sheet > ._container > table > thead > tr > th > ._resizer {\n position: absolute;\n top: 0;\n right: -2px;\n width: 5px;\n height: 100%;\n cursor: col-resize;\n z-index: 3;\n}\nsd-sheet > ._container > table > tbody > tr > td {\n border: 1px solid var(--trans-lighter);\n padding: var(--gap-sm) var(--gap-default);\n white-space: nowrap;\n}\nsd-sheet > ._container > table > tbody > tr > td:focus {\n outline: 2px solid var(--theme-primary-default);\n outline-offset: -2px;\n}\nsd-sheet > ._container > table > thead > tr > th._select-col,\nsd-sheet > ._container > table > tbody > tr > td._select-col {\n width: 2em;\n min-width: 2em;\n max-width: 2em;\n text-align: center;\n padding: 0;\n}\nsd-sheet > ._container > table > thead > tr > th._expand-col,\nsd-sheet > ._container > table > tbody > tr > td._expand-col {\n width: 2em;\n min-width: 2em;\n max-width: 2em;\n text-align: center;\n padding: 0;\n}\nsd-sheet > ._container > table > tfoot > tr > td {\n position: sticky;\n bottom: 0;\n z-index: 2;\n background: var(--theme-secondary-lightest);\n border: 1px solid var(--trans-lighter);\n padding: var(--gap-sm) var(--gap-default);\n}\nsd-sheet > ._container > ._resize-indicator {\n position: absolute;\n top: 0;\n width: 2px;\n height: 100%;\n background: var(--theme-primary-default);\n z-index: 10;\n pointer-events: none;\n}"] }]
|
|
847
848
|
}], () => [], { key: [{ type: i0.Input, args: [{ isSignal: true, alias: "key", required: false }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], trackByFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "trackByFn", required: false }] }], selectMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectMode", required: false }] }], autoSelect: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoSelect", required: false }] }], getItemSelectableFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "getItemSelectableFn", required: false }] }], getChildrenFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "getChildrenFn", required: false }] }], useAutoSort: [{ type: i0.Input, args: [{ isSignal: true, alias: "useAutoSort", required: false }] }], visiblePageCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "visiblePageCount", required: false }] }], totalPageCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "totalPageCount", required: false }] }], itemsPerPage: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemsPerPage", required: false }] }], focusMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "focusMode", required: false }] }], inset: [{ type: i0.Input, args: [{ isSignal: true, alias: "inset", required: false }] }], contentStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentStyle", required: false }] }], getItemCellClassFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "getItemCellClassFn", required: false }] }], getItemCellStyleFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "getItemCellStyleFn", required: false }] }], hideConfigBar: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideConfigBar", required: false }] }], itemKeydown: [{ type: i0.Output, args: ["itemKeydown"] }], cellKeydown: [{ type: i0.Output, args: ["cellKeydown"] }], selectedItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedItems", required: false }] }, { type: i0.Output, args: ["selectedItemsChange"] }], expandedItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandedItems", required: false }] }, { type: i0.Output, args: ["expandedItemsChange"] }], sorts: [{ type: i0.Input, args: [{ isSignal: true, alias: "sorts", required: false }] }, { type: i0.Output, args: ["sortsChange"] }], currentPage: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentPage", required: false }] }, { type: i0.Output, args: ["currentPageChange"] }], columnControls: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => SdSheetColumnDirective), { isSignal: true }] }] }); })();
|
|
848
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SdSheetControl, { className: "SdSheetControl", filePath: "packages/angular/src/ui/data/sheet/sd-sheet.control.ts", lineNumber:
|
|
849
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SdSheetControl, { className: "SdSheetControl", filePath: "packages/angular/src/ui/data/sheet/sd-sheet.control.ts", lineNumber: 338, forbidOrphanRendering: true }); })();
|
|
@@ -26,7 +26,11 @@ export interface ISdSheetConfig {
|
|
|
26
26
|
}
|
|
27
27
|
export interface ISdSheetItemKeydownEventParam<T> {
|
|
28
28
|
item: T;
|
|
29
|
-
|
|
29
|
+
event: KeyboardEvent;
|
|
30
|
+
}
|
|
31
|
+
export interface ISdSheetCellKeydownEventParam<T> {
|
|
32
|
+
item: T;
|
|
33
|
+
key: string;
|
|
30
34
|
event: KeyboardEvent;
|
|
31
35
|
}
|
|
32
36
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/ui/data/sheet/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC1B,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;IAClB,cAAc,EAAE,OAAO,CAAC;IACxB,eAAe,EAAE,OAAO,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,iBAAiB,GAAG,SAAS,CAAC;CACvC;AAED,MAAM,WAAW,cAAc;IAC7B,YAAY,EAAE,MAAM,CAClB,MAAM,EACN;QACE,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CACF,CAAC;CACH;AAED,MAAM,WAAW,6BAA6B,CAAC,CAAC;IAC9C,IAAI,EAAE,CAAC,CAAC;IACR,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/ui/data/sheet/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC1B,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;IAClB,cAAc,EAAE,OAAO,CAAC;IACxB,eAAe,EAAE,OAAO,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,iBAAiB,GAAG,SAAS,CAAC;CACvC;AAED,MAAM,WAAW,cAAc;IAC7B,YAAY,EAAE,MAAM,CAClB,MAAM,EACN;QACE,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CACF,CAAC;CACH;AAED,MAAM,WAAW,6BAA6B,CAAC,CAAC;IAC9C,IAAI,EAAE,CAAC,CAAC;IACR,KAAK,EAAE,aAAa,CAAC;CACtB;AAED,MAAM,WAAW,6BAA6B,CAAC,CAAC;IAC9C,IAAI,EAAE,CAAC,CAAC;IACR,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,aAAa,CAAC;CACtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSheetCellAgent.d.ts","sourceRoot":"","sources":["../../../../src/ui/data/sheet/useSheetCellAgent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEjE,wBAAgB,iBAAiB,CAAC,OAAO,EAAE;IACzC,WAAW,EAAE,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC;CACrD;;WACsC,MAAM;WAAK,MAAM;;2BAGxB;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,KAAG,OAAO;sBAMvC,oBAAoB,KAAG;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE;kCAwD7B,aAAa,KAAG,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"useSheetCellAgent.d.ts","sourceRoot":"","sources":["../../../../src/ui/data/sheet/useSheetCellAgent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEjE,wBAAgB,iBAAiB,CAAC,OAAO,EAAE;IACzC,WAAW,EAAE,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC;CACrD;;WACsC,MAAM;WAAK,MAAM;;2BAGxB;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,KAAG,OAAO;sBAMvC,oBAAoB,KAAG;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE;kCAwD7B,aAAa,KAAG,OAAO,CAAC,IAAI,CAAC;mCA6JlC,UAAU,KAAG,IAAI;+BAQrB,UAAU,KAAG,IAAI;EA+BpD"}
|
|
@@ -14,12 +14,12 @@ export function useSheetCellAgent(options) {
|
|
|
14
14
|
return { r, c };
|
|
15
15
|
}
|
|
16
16
|
function _enterEditMode(r, c) {
|
|
17
|
-
const cell = options.domAccessor.getCell(r, c);
|
|
18
|
-
if (cell == null)
|
|
19
|
-
return;
|
|
20
17
|
editModeCellAddr.set({ r, c });
|
|
21
|
-
//
|
|
18
|
+
// Re-query DOM inside queueMicrotask to avoid stale reference after Angular re-render
|
|
22
19
|
queueMicrotask(() => {
|
|
20
|
+
const cell = options.domAccessor.getCell(r, c);
|
|
21
|
+
if (cell == null)
|
|
22
|
+
return;
|
|
23
23
|
const focusable = cell.findFirstFocusableChild();
|
|
24
24
|
if (focusable !== undefined) {
|
|
25
25
|
focusable.focus();
|
|
@@ -164,6 +164,8 @@ export function useSheetCellAgent(options) {
|
|
|
164
164
|
}
|
|
165
165
|
// Ctrl+C (copy)
|
|
166
166
|
if (event.key === "c" && event.ctrlKey && !event.altKey && !event.shiftKey) {
|
|
167
|
+
if (!("clipboard" in navigator))
|
|
168
|
+
return;
|
|
167
169
|
const td = _getClosestDataCell(target);
|
|
168
170
|
if (td == null)
|
|
169
171
|
return;
|
|
@@ -180,6 +182,8 @@ export function useSheetCellAgent(options) {
|
|
|
180
182
|
}
|
|
181
183
|
// Ctrl+V (paste)
|
|
182
184
|
if (event.key === "v" && event.ctrlKey && !event.altKey && !event.shiftKey) {
|
|
185
|
+
if (!("clipboard" in navigator))
|
|
186
|
+
return;
|
|
183
187
|
const td = _getClosestDataCell(target);
|
|
184
188
|
if (td == null)
|
|
185
189
|
return;
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { type Signal } from "@angular/core";
|
|
2
2
|
import type { ISdSheetColumnDef } from "./types";
|
|
3
|
+
/**
|
|
4
|
+
* Fixed column의 left offset을 계산한다.
|
|
5
|
+
*
|
|
6
|
+
* **주의:** fixed column의 `width`는 반드시 px 단위여야 정확한 offset이 계산된다.
|
|
7
|
+
* em, rem, % 등 non-px 단위의 width는 offset 누적에 반영되지 않는다 (0으로 처리).
|
|
8
|
+
*/
|
|
3
9
|
export declare function useSheetColumnFixing(options: {
|
|
4
10
|
columnDefs: Signal<ISdSheetColumnDef[]>;
|
|
5
11
|
}): {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSheetColumnFixing.d.ts","sourceRoot":"","sources":["../../../../src/ui/data/sheet/useSheetColumnFixing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,MAAM,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD,wBAAgB,oBAAoB,CAAC,OAAO,EAAE;IAC5C,UAAU,EAAE,MAAM,CAAC,iBAAiB,EAAE,CAAC,CAAC;CACzC;;;EA+BA"}
|
|
1
|
+
{"version":3,"file":"useSheetColumnFixing.d.ts","sourceRoot":"","sources":["../../../../src/ui/data/sheet/useSheetColumnFixing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,MAAM,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE;IAC5C,UAAU,EAAE,MAAM,CAAC,iBAAiB,EAAE,CAAC,CAAC;CACzC;;;EA+BA"}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { computed } from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* Fixed column의 left offset을 계산한다.
|
|
4
|
+
*
|
|
5
|
+
* **주의:** fixed column의 `width`는 반드시 px 단위여야 정확한 offset이 계산된다.
|
|
6
|
+
* em, rem, % 등 non-px 단위의 width는 offset 누적에 반영되지 않는다 (0으로 처리).
|
|
7
|
+
*/
|
|
2
8
|
export function useSheetColumnFixing(options) {
|
|
3
9
|
const fixedLeftMap = computed(() => {
|
|
4
10
|
const map = new Map();
|
|
@@ -31,10 +31,10 @@ export declare class SdTiptapEditorControl {
|
|
|
31
31
|
activeStates: WritableSignal<TiptapActiveStates>;
|
|
32
32
|
activeColor: WritableSignal<string>;
|
|
33
33
|
activeBgColor: WritableSignal<string>;
|
|
34
|
-
colorPickerMode: "text" | "bg" | undefined
|
|
34
|
+
colorPickerMode: WritableSignal<"text" | "bg" | undefined>;
|
|
35
35
|
/** @internal -- TipTap Editor 인스턴스. 테스트 및 고급 사용자용 */
|
|
36
36
|
editor: WritableSignal<Editor | undefined>;
|
|
37
|
-
private
|
|
37
|
+
private lastEditorHtml;
|
|
38
38
|
private lastExtensions;
|
|
39
39
|
private readonly resolvedExtensions;
|
|
40
40
|
constructor();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-tiptap-editor.control.d.ts","sourceRoot":"","sources":["../../../../src/ui/form/editor/sd-tiptap-editor.control.ts"],"names":[],"mappings":"AAAA,OAAO,EAcL,KAAK,cAAc,EACpB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;;AASzD,UAAU,kBAAkB;IAC1B,EAAE,EAAE,OAAO,CAAC;IACZ,EAAE,EAAE,OAAO,CAAC;IACZ,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;CACvB;AA4BD,qBAsMa,qBAAqB;IAChC,KAAK,0DAAmB;IACxB,QAAQ,qEAAiD;IACzD,QAAQ,qEAAiD;IACzD,QAAQ,qEAAiD;IACzD,WAAW,0DAAmB;IAC9B,WAAW,+CAAiB,MAAM,GAAG,SAAS,KAAK,MAAM,GAAG,SAAS,eAAI;IACzE,UAAU,kEAA2B;IAErC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAA+C;IACrE,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAsB;IAEjD,QAAQ,CAAC,YAAY,WAMnB;IAEF,YAAY,EAAE,cAAc,CAAC,kBAAkB,CAAC,CAAiC;IACjF,WAAW,yBAAc;IACzB,aAAa,yBAAc;IAC3B,eAAe,
|
|
1
|
+
{"version":3,"file":"sd-tiptap-editor.control.d.ts","sourceRoot":"","sources":["../../../../src/ui/form/editor/sd-tiptap-editor.control.ts"],"names":[],"mappings":"AAAA,OAAO,EAcL,KAAK,cAAc,EACpB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;;AASzD,UAAU,kBAAkB;IAC1B,EAAE,EAAE,OAAO,CAAC;IACZ,EAAE,EAAE,OAAO,CAAC;IACZ,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;CACvB;AA4BD,qBAsMa,qBAAqB;IAChC,KAAK,0DAAmB;IACxB,QAAQ,qEAAiD;IACzD,QAAQ,qEAAiD;IACzD,QAAQ,qEAAiD;IACzD,WAAW,0DAAmB;IAC9B,WAAW,+CAAiB,MAAM,GAAG,SAAS,KAAK,MAAM,GAAG,SAAS,eAAI;IACzE,UAAU,kEAA2B;IAErC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAA+C;IACrE,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAsB;IAEjD,QAAQ,CAAC,YAAY,WAMnB;IAEF,YAAY,EAAE,cAAc,CAAC,kBAAkB,CAAC,CAAiC;IACjF,WAAW,yBAAc;IACzB,aAAa,yBAAc;IAC3B,eAAe,4CAAgD;IAE/D,qDAAqD;IACrD,MAAM,EAAE,cAAc,CAAC,MAAM,GAAG,SAAS,CAAC,CAAqB;IAC/D,OAAO,CAAC,cAAc,CAAqB;IAC3C,OAAO,CAAC,cAAc,CAA6B;IAEnD,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAShC;;IA4DH,OAAO,CAAC,YAAY;IAoBpB,OAAO,CAAC,aAAa;IASrB,OAAO,CAAC,iBAAiB;IAMzB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IA4D1B,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAI5C,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI;IAsB3C,OAAO,CAAC,mBAAmB;yCA5NhB,qBAAqB;2CAArB,qBAAqB;CAqPjC"}
|
|
@@ -148,7 +148,7 @@ function SdTiptapEditorControl_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
|
148
148
|
i0.ɵɵadvance(2);
|
|
149
149
|
i0.ɵɵclassProp("_active", ctx_r1.activeStates().alignJustify);
|
|
150
150
|
i0.ɵɵadvance(5);
|
|
151
|
-
i0.ɵɵconditional(ctx_r1.colorPickerMode !== undefined ? 48 : -1);
|
|
151
|
+
i0.ɵɵconditional(ctx_r1.colorPickerMode() !== undefined ? 48 : -1);
|
|
152
152
|
} }
|
|
153
153
|
const DEFAULT_ACTIVE_STATES = {
|
|
154
154
|
h1: false,
|
|
@@ -194,10 +194,10 @@ export class SdTiptapEditorControl {
|
|
|
194
194
|
activeStates = signal(DEFAULT_ACTIVE_STATES, ...(ngDevMode ? [{ debugName: "activeStates" }] : /* istanbul ignore next */ []));
|
|
195
195
|
activeColor = signal("", ...(ngDevMode ? [{ debugName: "activeColor" }] : /* istanbul ignore next */ []));
|
|
196
196
|
activeBgColor = signal("", ...(ngDevMode ? [{ debugName: "activeBgColor" }] : /* istanbul ignore next */ []));
|
|
197
|
-
colorPickerMode;
|
|
197
|
+
colorPickerMode = signal(undefined, ...(ngDevMode ? [{ debugName: "colorPickerMode" }] : /* istanbul ignore next */ []));
|
|
198
198
|
/** @internal -- TipTap Editor 인스턴스. 테스트 및 고급 사용자용 */
|
|
199
199
|
editor = signal(undefined, ...(ngDevMode ? [{ debugName: "editor" }] : /* istanbul ignore next */ []));
|
|
200
|
-
|
|
200
|
+
lastEditorHtml;
|
|
201
201
|
lastExtensions;
|
|
202
202
|
resolvedExtensions = computed(() => {
|
|
203
203
|
const custom = this.extensions();
|
|
@@ -214,9 +214,6 @@ export class SdTiptapEditorControl {
|
|
|
214
214
|
effect(() => {
|
|
215
215
|
const extensions = this.resolvedExtensions();
|
|
216
216
|
const val = this.value();
|
|
217
|
-
// Skip if value change originated from editor input
|
|
218
|
-
if (this.updatingFromEditor)
|
|
219
|
-
return;
|
|
220
217
|
// Recreate editor if extensions changed
|
|
221
218
|
if (this.lastExtensions !== extensions) {
|
|
222
219
|
this.lastExtensions = extensions;
|
|
@@ -224,6 +221,9 @@ export class SdTiptapEditorControl {
|
|
|
224
221
|
this.createEditor(extensions, val);
|
|
225
222
|
return;
|
|
226
223
|
}
|
|
224
|
+
// Skip if value matches last editor output (editor-originated change)
|
|
225
|
+
if (val === this.lastEditorHtml)
|
|
226
|
+
return;
|
|
227
227
|
// Sync value to existing editor
|
|
228
228
|
const currentEditor = untracked(() => this.editor());
|
|
229
229
|
if (currentEditor == null)
|
|
@@ -232,6 +232,7 @@ export class SdTiptapEditorControl {
|
|
|
232
232
|
if (currentHtml === val)
|
|
233
233
|
return;
|
|
234
234
|
currentEditor.commands.setContent(val ?? "", { emitUpdate: false });
|
|
235
|
+
this.lastEditorHtml = undefined;
|
|
235
236
|
});
|
|
236
237
|
// disabled/readonly → editor.setEditable()
|
|
237
238
|
effect(() => {
|
|
@@ -272,9 +273,8 @@ export class SdTiptapEditorControl {
|
|
|
272
273
|
editable: untracked(() => !this.disabled() && !this.readonly()),
|
|
273
274
|
onUpdate: ({ editor }) => {
|
|
274
275
|
const html = this.getEditorHtmlFrom(editor);
|
|
275
|
-
this.
|
|
276
|
+
this.lastEditorHtml = html;
|
|
276
277
|
this.value.set(html);
|
|
277
|
-
this.updatingFromEditor = false;
|
|
278
278
|
},
|
|
279
279
|
onTransaction: () => {
|
|
280
280
|
this.refreshActiveStates();
|
|
@@ -287,6 +287,7 @@ export class SdTiptapEditorControl {
|
|
|
287
287
|
ed.destroy();
|
|
288
288
|
this.editor.set(undefined);
|
|
289
289
|
}
|
|
290
|
+
this.lastEditorHtml = undefined;
|
|
290
291
|
}
|
|
291
292
|
getEditorHtmlFrom(editor) {
|
|
292
293
|
const html = editor.getHTML();
|
|
@@ -354,14 +355,15 @@ export class SdTiptapEditorControl {
|
|
|
354
355
|
}
|
|
355
356
|
}
|
|
356
357
|
toggleColorPicker(mode) {
|
|
357
|
-
this.colorPickerMode
|
|
358
|
+
this.colorPickerMode.set(this.colorPickerMode() === mode ? undefined : mode);
|
|
358
359
|
}
|
|
359
360
|
applyColor(color) {
|
|
360
361
|
const ed = this.editor();
|
|
361
362
|
if (ed == null)
|
|
362
363
|
return;
|
|
363
364
|
const chain = ed.chain().focus();
|
|
364
|
-
|
|
365
|
+
const mode = this.colorPickerMode();
|
|
366
|
+
if (mode === "text") {
|
|
365
367
|
if (color !== undefined) {
|
|
366
368
|
chain.setColor(color).run();
|
|
367
369
|
}
|
|
@@ -369,7 +371,7 @@ export class SdTiptapEditorControl {
|
|
|
369
371
|
chain.unsetColor().run();
|
|
370
372
|
}
|
|
371
373
|
}
|
|
372
|
-
else if (
|
|
374
|
+
else if (mode === "bg") {
|
|
373
375
|
if (color !== undefined) {
|
|
374
376
|
chain.setHighlight({ color }).run();
|
|
375
377
|
}
|
|
@@ -377,7 +379,7 @@ export class SdTiptapEditorControl {
|
|
|
377
379
|
chain.unsetHighlight().run();
|
|
378
380
|
}
|
|
379
381
|
}
|
|
380
|
-
this.colorPickerMode
|
|
382
|
+
this.colorPickerMode.set(undefined);
|
|
381
383
|
}
|
|
382
384
|
refreshActiveStates() {
|
|
383
385
|
const ed = this.editor();
|
|
@@ -475,7 +477,7 @@ export class SdTiptapEditorControl {
|
|
|
475
477
|
<button type="button" data-cmd="clean" (click)="execCmd('clean')">Tx</button>
|
|
476
478
|
</div>
|
|
477
479
|
</div>
|
|
478
|
-
@if (colorPickerMode !== undefined) {
|
|
480
|
+
@if (colorPickerMode() !== undefined) {
|
|
479
481
|
<div class="_color-picker">
|
|
480
482
|
@for (color of colorPresets; track color) {
|
|
481
483
|
<button type="button" class="_color-swatch"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-date-range.picker.d.ts","sourceRoot":"","sources":["../../../../src/ui/form/input/sd-date-range.picker.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;;AAEjD,qBA+Ca,iBAAiB;IAC5B,UAAU,wDAAiC;IAC3C,IAAI,4DAAqB;IACzB,EAAE,4DAAqB;IAEvB,QAAQ,qEAAiD;IAEzD,2BAA2B,IAAI,IAAI;IAenC,qBAAqB,IAAI,IAAI;yCAtBlB,iBAAiB;2CAAjB,iBAAiB;
|
|
1
|
+
{"version":3,"file":"sd-date-range.picker.d.ts","sourceRoot":"","sources":["../../../../src/ui/form/input/sd-date-range.picker.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;;AAEjD,qBA+Ca,iBAAiB;IAC5B,UAAU,wDAAiC;IAC3C,IAAI,4DAAqB;IACzB,EAAE,4DAAqB;IAEvB,QAAQ,qEAAiD;IAEzD,2BAA2B,IAAI,IAAI;IAenC,qBAAqB,IAAI,IAAI;yCAtBlB,iBAAiB;2CAAjB,iBAAiB;CA2C7B"}
|
|
@@ -52,7 +52,14 @@ export class SdDateRangePicker {
|
|
|
52
52
|
handleFromDateChanged() {
|
|
53
53
|
if (this.periodType() === "월") {
|
|
54
54
|
const fromDate = this.from();
|
|
55
|
-
|
|
55
|
+
if (fromDate) {
|
|
56
|
+
const firstOfMonth = fromDate.setDay(1);
|
|
57
|
+
this.from.set(firstOfMonth);
|
|
58
|
+
this.to.set(firstOfMonth.addMonths(1).addDays(-1));
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
this.to.set(undefined);
|
|
62
|
+
}
|
|
56
63
|
}
|
|
57
64
|
else if (this.periodType() === "일") {
|
|
58
65
|
this.to.set(this.from());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-select.control.d.ts","sourceRoot":"","sources":["../../../../src/ui/form/select/sd-select.control.ts"],"names":[],"mappings":"AAAA,OAAO,EAWL,WAAW,
|
|
1
|
+
{"version":3,"file":"sd-select.control.d.ts","sourceRoot":"","sources":["../../../../src/ui/form/select/sd-select.control.ts"],"names":[],"mappings":"AAAA,OAAO,EAWL,WAAW,EAIZ,MAAM,eAAe,CAAC;AAIvB,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;;AAU/D,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI;IAChC,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,MAAM,EAAE,CAAC,CAAC;CACX,CAAC;AAEF,qBAmJa,eAAe,CAAC,CAAC,SAAS,QAAQ,GAAG,OAAO,EAAE,CAAC;IAC1D,UAAU,yCAAwB;IAClC,KAAK,4EAAqC;IAC1C,WAAW,0DAAmB;IAC9B,QAAQ,qEAAiD;IACzD,MAAM,qEAAiD;IACvD,KAAK,qEAAiD;IACtD,IAAI,+DAAwB;IAC5B,QAAQ,qEAAiD;IAEzD,aAAa,qEAAiD;IAC9D,8BAA8B,8DAAuB;IAErD,KAAK,uDAAgB;IACrB,aAAa,8CAAgB,CAAC,KAAK,CAAC,EAAE,GAAG,SAAS,eAAI;IAEtD,YAAY,0DAAmB;IAC/B,YAAY,0DAAmB;IAE/B,YAAY,kDAAiB;IAE7B,SAAS,CAAC,QAAQ,CAAC,eAAe,iUAAmB;IAErD,aAAa,sEAAwC;IACrD,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAyC;IAC1E,OAAO,CAAC,QAAQ,CAAC,cAAc,CAG7B;IAEF,UAAU,gEAAgD;IAC1D,UAAU,gEAAgD;IAC1D,UAAU,+DAAkE;IAE5E,wBAAwB,6DAAyC;IAEjE,UAAU;cAAkB,CAAC;eAAS,MAAM;eAAS,MAAM;SAAU;;IA2JrE,UAAU,CAAC,SAAS,EAAE,CAAC,GAAG,IAAI;IAO9B,UAAU,CAAC,SAAS,EAAE,CAAC,GAAG,IAAI;IAI9B,OAAO,CAAC,YAAY;IAepB,WAAW,IAAI,IAAI;IAQnB,aAAa,IAAI,IAAI;IAIrB,aAAa,IAAI,IAAI;IAIrB,YAAY,IAAI,IAAI;yCAzOT,eAAe;2CAAf,eAAe;CA6O3B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { booleanAttribute, ChangeDetectionStrategy, Component, contentChild, contentChildren, effect, ElementRef, input, model, signal, TemplateRef, viewChild, ViewEncapsulation, } from "@angular/core";
|
|
1
|
+
import { booleanAttribute, ChangeDetectionStrategy, Component, contentChild, contentChildren, effect, ElementRef, input, model, signal, TemplateRef, untracked, viewChild, ViewEncapsulation, } from "@angular/core";
|
|
2
2
|
import { NgTemplateOutlet } from "@angular/common";
|
|
3
3
|
import { SdDropdownControl } from "../../overlay/dropdown/sd-dropdown.control";
|
|
4
4
|
import { SdDropdownPopupControl } from "../../overlay/dropdown/sd-dropdown-popup.control";
|
|
@@ -221,6 +221,8 @@ export class SdSelectControl {
|
|
|
221
221
|
}
|
|
222
222
|
});
|
|
223
223
|
// Mirror selected item's contentHTML to the trigger display area
|
|
224
|
+
// PERF-004: item.value() reads are untracked to reduce signal subscriptions from O(N) to O(K).
|
|
225
|
+
// _itemControls() already tracks item additions/removals, value() tracks selection changes.
|
|
224
226
|
effect(() => {
|
|
225
227
|
const items = this._itemControls();
|
|
226
228
|
const currentValue = this.value();
|
|
@@ -234,14 +236,13 @@ export class SdSelectControl {
|
|
|
234
236
|
this._selectedItemContentHTML.set(undefined);
|
|
235
237
|
return;
|
|
236
238
|
}
|
|
239
|
+
const selectedItems = untracked(() => items.filter((item) => arr.includes(item.value())));
|
|
237
240
|
const separator = this.multiSelectionDisplayDirection() === "vertical" ? "<br>" : ", ";
|
|
238
241
|
const htmlParts = [];
|
|
239
|
-
for (const item of
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
htmlParts.push(html);
|
|
244
|
-
}
|
|
242
|
+
for (const item of selectedItems) {
|
|
243
|
+
const html = item.contentHTML();
|
|
244
|
+
if (html !== "") {
|
|
245
|
+
htmlParts.push(html);
|
|
245
246
|
}
|
|
246
247
|
}
|
|
247
248
|
if (htmlParts.length > 0) {
|
|
@@ -252,16 +253,19 @@ export class SdSelectControl {
|
|
|
252
253
|
}
|
|
253
254
|
return;
|
|
254
255
|
}
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
256
|
+
const selectedItem = untracked(() => items.find((item) => item.value() === currentValue));
|
|
257
|
+
if (selectedItem != null) {
|
|
258
|
+
const html = selectedItem.contentHTML();
|
|
259
|
+
if (html !== "") {
|
|
260
|
+
this._selectedItemContentHTML.set(html);
|
|
261
|
+
}
|
|
262
|
+
else {
|
|
263
|
+
this._selectedItemContentHTML.set(undefined);
|
|
262
264
|
}
|
|
263
265
|
}
|
|
264
|
-
|
|
266
|
+
else {
|
|
267
|
+
this._selectedItemContentHTML.set(undefined);
|
|
268
|
+
}
|
|
265
269
|
});
|
|
266
270
|
}
|
|
267
271
|
selectItem(itemValue) {
|
|
@@ -427,4 +431,4 @@ export class SdSelectControl {
|
|
|
427
431
|
"[attr.data-sd-disabled]": "disabled()",
|
|
428
432
|
}, styles: ["sd-select {\n display: block;\n position: relative;\n}\nsd-select > sd-dropdown > ._sd-select-control {\n display: block;\n padding: var(--gap-sm) var(--gap-default);\n border: 1px solid transparent;\n font-size: var(--font-size-default);\n font-family: var(--font-family);\n font-variant-numeric: tabular-nums;\n line-height: var(--line-height);\n color: var(--text-trans-default);\n display: flex;\n align-items: center;\n cursor: pointer;\n border: 1px solid var(--trans-lighter);\n border-radius: var(--border-radius-default);\n background: var(--theme-secondary-lightest);\n}\nsd-select > sd-dropdown > ._sd-select-control > ._sd-select-control-content {\n flex: 1;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\nsd-select > sd-dropdown > ._sd-select-control > ._sd-select-control-icon {\n margin-left: var(--gap-sm);\n opacity: 0.3;\n}\nsd-select > sd-dropdown:focus-within > ._sd-select-control {\n border-color: var(--theme-secondary-default);\n}\nsd-select[data-sd-size=sm] > sd-dropdown > ._sd-select-control {\n padding: var(--gap-xs) var(--gap-sm);\n}\nsd-select[data-sd-size=lg] > sd-dropdown > ._sd-select-control {\n padding: var(--gap-default) var(--gap-lg);\n}\nsd-select[data-sd-inline=true] {\n display: inline-block;\n width: auto;\n}\nsd-select[data-sd-inset=true] > sd-dropdown > ._sd-select-control {\n border: none;\n border-radius: 0;\n}\nsd-select[data-sd-inset=true] > sd-dropdown > ._sd-select-control:focus-within {\n outline: 1px solid var(--theme-primary-default);\n}\nsd-select[data-sd-disabled=true] > sd-dropdown > ._sd-select-control {\n background: var(--trans-lighter);\n cursor: default;\n}\nsd-select[data-sd-disabled=true] > sd-dropdown > ._sd-select-control > ._sd-select-control-icon {\n display: none;\n}\n\n._sd-select-all-bar {\n display: flex;\n padding: var(--gap-sm) var(--gap-default);\n border-bottom: 1px solid var(--border-color-light);\n}"] }]
|
|
429
433
|
}], () => [], { selectMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectMode", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], inline: [{ type: i0.Input, args: [{ isSignal: true, alias: "inline", required: false }] }], inset: [{ type: i0.Input, args: [{ isSignal: true, alias: "inset", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], hideSelectAll: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideSelectAll", required: false }] }], multiSelectionDisplayDirection: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiSelectionDisplayDirection", required: false }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], getChildrenFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "getChildrenFn", required: false }] }], contentClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentClass", required: false }] }], contentStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentStyle", required: false }] }], _itemControls: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => SdSelectItemControl), { isSignal: true }] }], _dropdownControl: [{ type: i0.ViewChild, args: [i0.forwardRef(() => SdDropdownControl), { isSignal: true }] }], _dropdownElRef: [{ type: i0.ViewChild, args: [i0.forwardRef(() => SdDropdownControl), { ...{ read: ElementRef }, isSignal: true }] }], _headerTpl: [{ type: i0.ContentChild, args: ["headerTpl", { isSignal: true }] }], _beforeTpl: [{ type: i0.ContentChild, args: ["beforeTpl", { isSignal: true }] }], _itemOfTpl: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SdItemOfTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }] }); })();
|
|
430
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SdSelectControl, { className: "SdSelectControl", filePath: "packages/angular/src/ui/form/select/sd-select.control.ts", lineNumber:
|
|
434
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SdSelectControl, { className: "SdSelectControl", filePath: "packages/angular/src/ui/form/select/sd-select.control.ts", lineNumber: 182, forbidOrphanRendering: true }); })();
|
|
@@ -54,17 +54,17 @@ export class SdDockControl {
|
|
|
54
54
|
e.stopPropagation();
|
|
55
55
|
e.preventDefault();
|
|
56
56
|
if (this.position() === "bottom") {
|
|
57
|
-
thisEl.style.height = `${startHeight - e.clientY + startY}px`;
|
|
57
|
+
thisEl.style.height = `${Math.max(0, startHeight - e.clientY + startY)}px`;
|
|
58
58
|
}
|
|
59
59
|
else if (this.position() === "right") {
|
|
60
|
-
thisEl.style.width = `${startWidth - e.clientX + startX}px`;
|
|
60
|
+
thisEl.style.width = `${Math.max(0, startWidth - e.clientX + startX)}px`;
|
|
61
61
|
}
|
|
62
62
|
else if (this.position() === "top") {
|
|
63
|
-
thisEl.style.height = `${startHeight + e.clientY - startY}px`;
|
|
63
|
+
thisEl.style.height = `${Math.max(0, startHeight + e.clientY - startY)}px`;
|
|
64
64
|
}
|
|
65
65
|
else {
|
|
66
66
|
// left
|
|
67
|
-
thisEl.style.width = `${startWidth + e.clientX - startX}px`;
|
|
67
|
+
thisEl.style.width = `${Math.max(0, startWidth + e.clientX - startX)}px`;
|
|
68
68
|
}
|
|
69
69
|
};
|
|
70
70
|
const stopDrag = (e) => {
|
|
@@ -56,7 +56,7 @@ export class SdPaginationControl {
|
|
|
56
56
|
this.currentPage.set(page);
|
|
57
57
|
}
|
|
58
58
|
goToNextGroup() {
|
|
59
|
-
this.currentPage.set((this.groupIndex() + 1) * this.visiblePageCount());
|
|
59
|
+
this.currentPage.set((this.groupIndex() + 1) * Math.max(this.visiblePageCount(), 1));
|
|
60
60
|
}
|
|
61
61
|
goToPrevGroup() {
|
|
62
62
|
if (!this.hasPrev())
|
|
@@ -1,28 +1,22 @@
|
|
|
1
|
+
import { type ISdMenu } from "../menu-utils";
|
|
1
2
|
import * as i0 from "@angular/core";
|
|
2
3
|
export declare class SdSidebarMenuControl {
|
|
3
|
-
menus: import("@angular/core").InputSignal<
|
|
4
|
+
menus: import("@angular/core").InputSignal<ISdMenu[]>;
|
|
4
5
|
layout: import("@angular/core").InputSignal<"flat" | "accordion" | undefined>;
|
|
5
|
-
getMenuIsSelectedFn: import("@angular/core").InputSignal<((menu:
|
|
6
|
+
getMenuIsSelectedFn: import("@angular/core").InputSignal<((menu: ISdMenu) => boolean) | undefined>;
|
|
6
7
|
fullPageCode: import("@angular/core").Signal<string>;
|
|
7
8
|
rootLayout: import("@angular/core").Signal<"flat" | "accordion">;
|
|
8
|
-
getMenuRouterLinkOption(menu:
|
|
9
|
+
getMenuRouterLinkOption(menu: ISdMenu): {
|
|
9
10
|
link: string;
|
|
10
11
|
queryParams: Record<string, string> | undefined;
|
|
11
12
|
} | undefined;
|
|
12
|
-
getIsMenuSelected(menu:
|
|
13
|
-
onMenuClick(menu:
|
|
13
|
+
getIsMenuSelected(menu: ISdMenu): boolean;
|
|
14
|
+
onMenuClick(menu: ISdMenu): void;
|
|
14
15
|
protected readonly itemTemplateType: {
|
|
15
|
-
menus:
|
|
16
|
+
menus: ISdMenu[];
|
|
16
17
|
depth: number;
|
|
17
18
|
};
|
|
18
19
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdSidebarMenuControl, never>;
|
|
19
20
|
static ɵcmp: i0.ɵɵComponentDeclaration<SdSidebarMenuControl, "sd-sidebar-menu", never, { "menus": { "alias": "menus"; "required": false; "isSignal": true; }; "layout": { "alias": "layout"; "required": false; "isSignal": true; }; "getMenuIsSelectedFn": { "alias": "getMenuIsSelectedFn"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
20
21
|
}
|
|
21
|
-
export interface ISdSidebarMenu {
|
|
22
|
-
title: string;
|
|
23
|
-
codeChain: string[];
|
|
24
|
-
url?: string;
|
|
25
|
-
icon?: string;
|
|
26
|
-
children?: ISdSidebarMenu[];
|
|
27
|
-
}
|
|
28
22
|
//# sourceMappingURL=sd-sidebar-menu.control.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-sidebar-menu.control.d.ts","sourceRoot":"","sources":["../../../../src/ui/navigation/sidebar/sd-sidebar-menu.control.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sd-sidebar-menu.control.d.ts","sourceRoot":"","sources":["../../../../src/ui/navigation/sidebar/sd-sidebar-menu.control.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,OAAO,EAGb,MAAM,eAAe,CAAC;;AAQvB,qBA8Ea,oBAAoB;IAC/B,KAAK,iDAAwB;IAC7B,MAAM,wEAAiC;IACvC,mBAAmB,8CAAgB,OAAO,KAAK,OAAO,eAAI;IAE1D,YAAY,yCAA2B;IAEvC,UAAU,uDAAsF;IAEhG,uBAAuB,CACrB,IAAI,EAAE,OAAO,GACZ;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAA;KAAE,GAAG,SAAS;IAIhF,iBAAiB,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO;IAIzC,WAAW,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI;IAMhC,SAAS,CAAC,QAAQ,CAAC,gBAAgB,EAAG;QACpC,KAAK,EAAE,OAAO,EAAE,CAAC;QACjB,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;yCA5BS,oBAAoB;2CAApB,oBAAoB;CA6BhC"}
|
|
@@ -156,4 +156,4 @@ export class SdSidebarMenuControl {
|
|
|
156
156
|
</ng-template>
|
|
157
157
|
`, styles: ["sd-sidebar-menu > sd-list[data-sd-inset=true] sd-list {\n background: var(--trans-lightest);\n}\nsd-sidebar-menu > sd-list[data-sd-inset=true] > sd-list-item > ._content {\n padding-block: var(--gap-default);\n}\nsd-sidebar-menu:not([data-sd-root-layout=accordion]) > sd-list[data-sd-inset=true] > sd-list-item > sd-collapse > ._content > sd-list {\n background: transparent;\n}"] }]
|
|
158
158
|
}], null, { menus: [{ type: i0.Input, args: [{ isSignal: true, alias: "menus", required: false }] }], layout: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout", required: false }] }], getMenuIsSelectedFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "getMenuIsSelectedFn", required: false }] }] }); })();
|
|
159
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SdSidebarMenuControl, { className: "SdSidebarMenuControl", filePath: "packages/angular/src/ui/navigation/sidebar/sd-sidebar-menu.control.ts", lineNumber:
|
|
159
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SdSidebarMenuControl, { className: "SdSidebarMenuControl", filePath: "packages/angular/src/ui/navigation/sidebar/sd-sidebar-menu.control.ts", lineNumber: 93, forbidOrphanRendering: true }); })();
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
+
import { type ISdMenu } from "../menu-utils";
|
|
1
2
|
import * as i0 from "@angular/core";
|
|
2
3
|
export declare class SdTopbarMenuControl {
|
|
3
|
-
menus: import("@angular/core").InputSignal<
|
|
4
|
-
getMenuIsSelectedFn: import("@angular/core").InputSignal<((menu:
|
|
4
|
+
menus: import("@angular/core").InputSignal<ISdMenu[]>;
|
|
5
|
+
getMenuIsSelectedFn: import("@angular/core").InputSignal<((menu: ISdMenu) => boolean) | undefined>;
|
|
5
6
|
fullPageCode: import("@angular/core").Signal<string>;
|
|
6
7
|
private readonly _dropdowns;
|
|
7
|
-
getMenuRouterLinkOption(menu:
|
|
8
|
+
getMenuRouterLinkOption(menu: ISdMenu): {
|
|
8
9
|
link: string;
|
|
9
10
|
queryParams: Record<string, string> | undefined;
|
|
10
11
|
} | undefined;
|
|
11
|
-
getIsMenuSelected(menu:
|
|
12
|
-
onMenuClick(menu:
|
|
12
|
+
getIsMenuSelected(menu: ISdMenu): boolean;
|
|
13
|
+
onMenuClick(menu: ISdMenu, dropdownIndex: number): void;
|
|
13
14
|
protected readonly itemTemplateType: {
|
|
14
|
-
menus:
|
|
15
|
+
menus: ISdMenu[];
|
|
15
16
|
depth: number;
|
|
16
17
|
dropdownIndex: number;
|
|
17
18
|
};
|
|
@@ -19,11 +20,4 @@ export declare class SdTopbarMenuControl {
|
|
|
19
20
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdTopbarMenuControl, never>;
|
|
20
21
|
static ɵcmp: i0.ɵɵComponentDeclaration<SdTopbarMenuControl, "sd-topbar-menu", never, { "menus": { "alias": "menus"; "required": false; "isSignal": true; }; "getMenuIsSelectedFn": { "alias": "getMenuIsSelectedFn"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
21
22
|
}
|
|
22
|
-
export interface ISdTopbarMenu {
|
|
23
|
-
title: string;
|
|
24
|
-
codeChain: string[];
|
|
25
|
-
url?: string;
|
|
26
|
-
icon?: string;
|
|
27
|
-
children?: ISdTopbarMenu[];
|
|
28
|
-
}
|
|
29
23
|
//# sourceMappingURL=sd-topbar-menu.control.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-topbar-menu.control.d.ts","sourceRoot":"","sources":["../../../../src/ui/navigation/topbar/sd-topbar-menu.control.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sd-topbar-menu.control.d.ts","sourceRoot":"","sources":["../../../../src/ui/navigation/topbar/sd-topbar-menu.control.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,KAAK,OAAO,EAGb,MAAM,eAAe,CAAC;;AAYvB,qBAkGa,mBAAmB;IAC9B,KAAK,iDAAwB;IAC7B,mBAAmB,8CAAgB,OAAO,KAAK,OAAO,eAAI;IAE1D,YAAY,yCAA2B;IAEvC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAmC;IAE9D,uBAAuB,CACrB,IAAI,EAAE,OAAO,GACZ;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAA;KAAE,GAAG,SAAS;IAIhF,iBAAiB,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO;IAIzC,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,GAAG,IAAI;IAUvD,SAAS,CAAC,QAAQ,CAAC,gBAAgB,EAAG;QACpC,KAAK,EAAE,OAAO,EAAE,CAAC;QACjB,KAAK,EAAE,MAAM,CAAC;QACd,aAAa,EAAE,MAAM,CAAC;KACvB,CAAC;IAEF,SAAS,CAAC,QAAQ,CAAC,eAAe,iUAAmB;yCAlC1C,mBAAmB;2CAAnB,mBAAmB;CAmC/B"}
|