Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,9 @@

# broccoli-debug
/DEBUG/

# Generated coverage output. `/coverage/` above covers the normal case; these two guard the
# reports istanbul writes for workspace-linked siblings, whose relative paths resolve out of
# the coverage folder and into the package root (see config/coverage.js).
/ember-core/
/*/addon/**/*.js.html
77 changes: 0 additions & 77 deletions addon/components/custom-field/form.hbs

This file was deleted.

103 changes: 0 additions & 103 deletions addon/components/custom-field/form.js

This file was deleted.

22 changes: 0 additions & 22 deletions addon/components/custom-field/options-input.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';
import { action } from '@ember/object';
import { isArray } from '@ember/array';
import isObject from '@fleetbase/ember-core/utils/is-object';

export default class CustomFieldOptionsInputComponent extends Component {
@tracked options = {};
Expand Down Expand Up @@ -130,25 +129,4 @@ export default class CustomFieldOptionsInputComponent extends Component {
this.args.onChange(options, this.args.customField);
}
}

/**
* Adds or updates a meta option with the given key and value.
* @param {string} key - The key of the meta option to add or update.
* @param {string} value - The value of the meta option.
*/
@action addMetaOption(key, value) {
if (!isObject(this.args.customField.meta)) {
this.args.customField.set('meta', {});
}

const meta = {
...this.args.customField.meta,
[key]: value,
};

this.args.customField.meta = meta;
if (typeof this.args.onMetaChanged === 'function') {
this.args.onMetaChanged(meta, this.args.customField);
}
}
}
14 changes: 0 additions & 14 deletions addon/components/custom-field/yield.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ export default class CustomFieldYieldComponent extends Component {
}

@task *loadCustomFields() {
// const subject = yield this.resolveSubject();
const owner = yield this.resolveOwner();

try {
Expand All @@ -66,10 +65,6 @@ export default class CustomFieldYieldComponent extends Component {
}
}

@action toggleGroupEdit(group) {
group.isEditing = !group.isEditing;
}

@action cancelEditing(group) {
group.isEditing = false;
}
Expand All @@ -84,15 +79,6 @@ export default class CustomFieldYieldComponent extends Component {
}
}

async resolveSubject() {
let subject = this.args.subject;
if (isThenable(subject)) {
subject = await subject;
}

return subject;
}

async resolveOwner() {
let owner = this.args.owner;
if (isThenable(owner)) {
Expand Down
2 changes: 0 additions & 2 deletions addon/components/dashboard/widget-panel.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@
@addedCount={{this.addedCount widget.id}}
@isAdding={{this.addWidgetToDashboard.isRunning}}
@onAdd={{perform this.addWidgetToDashboard widget}}
@onHover={{fn this.onHover widget}}
@onUnhover={{this.onUnhover}}
/>
{{/each}}
</div>
Expand Down
9 changes: 0 additions & 9 deletions addon/components/dashboard/widget-panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export default class DashboardWidgetPanelComponent extends Component {

@tracked searchQuery = '';
@tracked activeTab = TAB_ALL;
@tracked hoveredWidget = null;

get defaultDashboardId() {
return this.args.widgetSourceDashboardId ?? this.args.defaultDashboardId ?? 'dashboard';
Expand Down Expand Up @@ -125,14 +124,6 @@ export default class DashboardWidgetPanelComponent extends Component {
this.searchQuery = '';
}

@action onHover(widget) {
this.hoveredWidget = widget;
}

@action onUnhover() {
this.hoveredWidget = null;
}

@action onPressClose() {
if (typeof this.args.onClose === 'function') {
this.args.onClose();
Expand Down
29 changes: 0 additions & 29 deletions addon/components/event-calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,35 +158,6 @@ export default class EventCalendarComponent extends Component {
// Public API helpers (callable by parent via @onCalendarReady)
// -------------------------------------------------------------------------

/**
* Programmatically change the view type.
* @param {string} viewName e.g. 'resourceTimelineWeek'
*/
@action changeView(viewName) {
this._setOption('view', viewName);
}

/**
* Navigate the calendar to today.
*/
@action today() {
this._setOption('date', new Date());
}

/**
* Refetch events from the events source.
*/
@action refetchEvents() {
this._setOption('events', this.args.events ?? []);
}

/**
* Refetch resources from the resources source.
*/
@action refetchResources() {
this._setOption('resources', this.args.resources ?? []);
}

// -------------------------------------------------------------------------
// Private helpers
// -------------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion addon/components/layout/header/smart-nav-menu.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,5 @@
@maxVisible={{this.maxVisible}}
@onApply={{this.applyCustomization}}
@onClose={{this.closeCustomizer}}
@onReorder={{this.reorderPinned}}
/>
{{/if}}
10 changes: 0 additions & 10 deletions addon/components/layout/header/smart-nav-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -547,14 +547,4 @@ export default class LayoutHeaderSmartNavMenuComponent extends Component {
this._distributeFromAllItems();
later(this, this._recalculate, 50);
}
/**
* Reorder handler for drag-sort within the customiser.
* Kept here so the customiser sub-component stays stateless.
*/
@action reorderPinned({ sourceList, sourceIndex, targetList, targetIndex }) {
if (sourceList === targetList && sourceIndex === targetIndex) return;
const item = sourceList[sourceIndex];
sourceList.splice(sourceIndex, 1);
targetList.splice(targetIndex, 0, item);
}
}
6 changes: 0 additions & 6 deletions addon/components/layout/header/smart-nav-menu/customizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,6 @@ export default class LayoutHeaderSmartNavMenuCustomizerComponent extends Compone

// ─── Computed ─────────────────────────────────────────────────────────────

/** Items that are NOT in the working pinned list. */
get unpinnedItems() {
const pinnedIds = this.workingPinned.map((i) => i.id);
return (this.args.allItems ?? []).filter((i) => !pinnedIds.includes(i.id));
}

/** True when the user has reached the maximum allowed pinned items. */
get atPinnedLimit() {
return this.workingPinned.length >= (this.args.maxVisible ?? 5);
Expand Down
Loading