terrier-engine 4.5.1 → 4.6.2
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/data-dive/dives/dive-runs.ts +25 -3
- package/data-dive/queries/queries.ts +11 -12
- package/package.json +1 -1
- package/terrier/api.ts +3 -13
- package/terrier/dropdowns.ts +1 -1
- package/terrier/glyps.ts +5 -5
- package/terrier/logging.ts +75 -0
- package/terrier/overlays.ts +15 -17
- package/terrier/parts/panel-part.ts +11 -3
- package/terrier/progress.ts +10 -0
|
@@ -16,6 +16,7 @@ import inflection from "inflection"
|
|
|
16
16
|
import Dates, {DateLiteral, DatePeriodPickerPart, DatePeriodPickerState, LiteralDateRange} from "../queries/dates"
|
|
17
17
|
import dayjs from "dayjs"
|
|
18
18
|
import {ProgressBarPart} from "../../terrier/progress";
|
|
19
|
+
import {LogListPart} from "../../terrier/logging";
|
|
19
20
|
|
|
20
21
|
const log = new Logger("DiveRuns")
|
|
21
22
|
|
|
@@ -26,6 +27,10 @@ type RunQueryResult = {
|
|
|
26
27
|
message?: string
|
|
27
28
|
}
|
|
28
29
|
|
|
30
|
+
type InitRunResult = {
|
|
31
|
+
total_steps: number
|
|
32
|
+
}
|
|
33
|
+
|
|
29
34
|
const statusIcons: Record<RunQueryResult['status'], IconName> = {
|
|
30
35
|
pending: 'glyp-pending',
|
|
31
36
|
success: 'glyp-complete',
|
|
@@ -48,6 +53,7 @@ export class DiveRunModal extends ModalPart<{dive: DdDive }> {
|
|
|
48
53
|
fileOutput?: RunFileOutput
|
|
49
54
|
queryResults: Record<string, RunQueryResult> = {}
|
|
50
55
|
progressBar!: ProgressBarPart
|
|
56
|
+
logList!: LogListPart
|
|
51
57
|
|
|
52
58
|
startKey = messages.untypedKey()
|
|
53
59
|
pickDateKey = messages.typedKey<{ input_key: string }>()
|
|
@@ -58,9 +64,8 @@ export class DiveRunModal extends ModalPart<{dive: DdDive }> {
|
|
|
58
64
|
|
|
59
65
|
this.schema = await Schema.get()
|
|
60
66
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
this.progressBar = this.makePart(ProgressBarPart, {total})
|
|
67
|
+
this.progressBar = this.makePart(ProgressBarPart, {total: 10})
|
|
68
|
+
this.logList = this.makePart(LogListPart, {})
|
|
64
69
|
|
|
65
70
|
// initialize the inputs
|
|
66
71
|
this.filters = Dives.computeFilterInputs(this.schema, this.state.dive)
|
|
@@ -123,6 +128,7 @@ export class DiveRunModal extends ModalPart<{dive: DdDive }> {
|
|
|
123
128
|
const res = await Db().upsert('dd_dive_run', newRun)
|
|
124
129
|
if (res.status == 'success' && res.record) {
|
|
125
130
|
this.beginStreaming(res.record)
|
|
131
|
+
this.logList.info(`Created dive run`)
|
|
126
132
|
} else {
|
|
127
133
|
this.alertToast(`Error creating dive run: ${res.message}`)
|
|
128
134
|
}
|
|
@@ -133,6 +139,11 @@ export class DiveRunModal extends ModalPart<{dive: DdDive }> {
|
|
|
133
139
|
beginStreaming(run: DdDiveRun) {
|
|
134
140
|
this.run = run
|
|
135
141
|
Api.stream(`/data_dive/stream_run/${this.run.id}`)
|
|
142
|
+
.on<InitRunResult>('init_run', res => {
|
|
143
|
+
this.progressBar.setTotal(res.total_steps)
|
|
144
|
+
log.info(`Total steps for run: ${res.total_steps}`)
|
|
145
|
+
this.dirty()
|
|
146
|
+
})
|
|
136
147
|
.on<RunQueryResult>('query_result', res => {
|
|
137
148
|
this.queryResults[res.id] = res
|
|
138
149
|
this.progressBar.increment()
|
|
@@ -144,6 +155,12 @@ export class DiveRunModal extends ModalPart<{dive: DdDive }> {
|
|
|
144
155
|
this.progressBar.complete('success')
|
|
145
156
|
this.dirty()
|
|
146
157
|
})
|
|
158
|
+
.onLog(evt => {
|
|
159
|
+
this.progressBar.increment()
|
|
160
|
+
log.log(evt.level, evt.message)
|
|
161
|
+
this.logList.push(evt)
|
|
162
|
+
this.dirty()
|
|
163
|
+
})
|
|
147
164
|
.onError(evt => {
|
|
148
165
|
this.error = evt
|
|
149
166
|
this.stopActionLoading()
|
|
@@ -160,6 +177,8 @@ export class DiveRunModal extends ModalPart<{dive: DdDive }> {
|
|
|
160
177
|
renderContent(parent: PartTag): void {
|
|
161
178
|
parent.div('.tt-flex.padded.gap.column', col => {
|
|
162
179
|
col.part(this.progressBar)
|
|
180
|
+
|
|
181
|
+
// inputs and outputs row
|
|
163
182
|
col.div('.tt-flex.collapsible.gap.tt-form', row => {
|
|
164
183
|
// inputs
|
|
165
184
|
row.div('.tt-flex.column.shrink.dd-dive-run-inputs', col => {
|
|
@@ -197,6 +216,9 @@ export class DiveRunModal extends ModalPart<{dive: DdDive }> {
|
|
|
197
216
|
}
|
|
198
217
|
})
|
|
199
218
|
})
|
|
219
|
+
|
|
220
|
+
// log
|
|
221
|
+
col.part(this.logList)
|
|
200
222
|
})
|
|
201
223
|
}
|
|
202
224
|
|
|
@@ -50,24 +50,19 @@ async function validate(query: Query): Promise<QueryValidation> {
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
|
|
53
|
-
////////////////////////////////////////////////////////////////////////////////
|
|
54
|
-
// Inputs
|
|
55
|
-
////////////////////////////////////////////////////////////////////////////////
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
53
|
////////////////////////////////////////////////////////////////////////////////
|
|
60
54
|
// Preview
|
|
61
55
|
////////////////////////////////////////////////////////////////////////////////
|
|
62
56
|
|
|
63
57
|
export type QueryResultRow = Record<string, any>
|
|
64
58
|
|
|
65
|
-
const ColumnTypes = ['string', 'integer', 'float', 'date', '
|
|
59
|
+
const ColumnTypes = ['string', 'integer', 'float', 'date', 'datetime', 'cents', 'dollars'] as const
|
|
66
60
|
|
|
67
61
|
export type ColumnType = typeof ColumnTypes[number]
|
|
68
62
|
|
|
69
63
|
export type QueryResultColumn = {
|
|
70
|
-
|
|
64
|
+
select_name: string
|
|
65
|
+
column_name: string
|
|
71
66
|
type: ColumnType
|
|
72
67
|
}
|
|
73
68
|
|
|
@@ -102,15 +97,19 @@ function renderCell(td: TableCellTag, col: QueryResultColumn, val: any): any {
|
|
|
102
97
|
case 'date':
|
|
103
98
|
const date = dayjs(val.toString())
|
|
104
99
|
return td.div('.date').text(date.format(DateFormat))
|
|
105
|
-
case '
|
|
100
|
+
case 'datetime':
|
|
106
101
|
const time = dayjs(val.toString())
|
|
107
102
|
td.div('.date').text(time.format(DateFormat))
|
|
108
103
|
return td.div('.time').text(time.format(TimeFormat))
|
|
109
104
|
case 'dollars':
|
|
110
105
|
const dollars = parseFloat(val)
|
|
111
106
|
return td.div('.dollars').text(`\$${dollars}`)
|
|
107
|
+
case 'cents':
|
|
108
|
+
const cents = parseInt(val)
|
|
109
|
+
const d = (cents/100.0).toFixed(2)
|
|
110
|
+
return td.div('.dollars').text(`\$${d}`)
|
|
112
111
|
case 'string':
|
|
113
|
-
if (col.
|
|
112
|
+
if (col.select_name.endsWith('id')) {
|
|
114
113
|
const id = val.toString()
|
|
115
114
|
td.a('.id')
|
|
116
115
|
.data({tooltip: id})
|
|
@@ -134,7 +133,7 @@ function renderTable(parent: PartTag, rows: QueryResultRow[], columns: QueryResu
|
|
|
134
133
|
thead.tr(tr => {
|
|
135
134
|
for (const col of columns) {
|
|
136
135
|
tr.th(col.type, th => {
|
|
137
|
-
th.a().text(col.
|
|
136
|
+
th.a().text(col.select_name)
|
|
138
137
|
})
|
|
139
138
|
}
|
|
140
139
|
})
|
|
@@ -146,7 +145,7 @@ function renderTable(parent: PartTag, rows: QueryResultRow[], columns: QueryResu
|
|
|
146
145
|
tbody.tr(tr => {
|
|
147
146
|
for (const col of columns) {
|
|
148
147
|
tr.td(td => {
|
|
149
|
-
const val = row[col.
|
|
148
|
+
const val = row[col.select_name]
|
|
150
149
|
if (val) {
|
|
151
150
|
renderCell(td, col, val)
|
|
152
151
|
}
|
package/package.json
CHANGED
package/terrier/api.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Logger } from "tuff-core/logging"
|
|
2
2
|
import { QueryParams } from "tuff-core/urls"
|
|
3
|
+
import {LogEntry} from "./logging"
|
|
3
4
|
|
|
4
5
|
const log = new Logger('Api')
|
|
5
6
|
log.level = 'debug'
|
|
@@ -113,17 +114,6 @@ async function post<ResponseType>(url: string, body: Record<string, unknown> | F
|
|
|
113
114
|
// Event Streams
|
|
114
115
|
////////////////////////////////////////////////////////////////////////////////
|
|
115
116
|
|
|
116
|
-
type LogLevel = 'success' | 'info' | 'warn' | 'debug'
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* Type of log events from a streaming response.
|
|
120
|
-
*/
|
|
121
|
-
export type LogEvent = {
|
|
122
|
-
level: LogLevel
|
|
123
|
-
prefix?: string
|
|
124
|
-
message: string
|
|
125
|
-
}
|
|
126
|
-
|
|
127
117
|
/**
|
|
128
118
|
* Type of error events from a streaming response.
|
|
129
119
|
*/
|
|
@@ -188,8 +178,8 @@ export class Streamer {
|
|
|
188
178
|
* Listen specifically for log events.
|
|
189
179
|
* @param listener
|
|
190
180
|
*/
|
|
191
|
-
onLog(listener: (event:
|
|
192
|
-
return this.on<
|
|
181
|
+
onLog(listener: (event: LogEntry) => any) {
|
|
182
|
+
return this.on<LogEntry>('_log', listener)
|
|
193
183
|
}
|
|
194
184
|
|
|
195
185
|
/**
|
package/terrier/dropdowns.ts
CHANGED
|
@@ -77,7 +77,7 @@ export abstract class Dropdown<TState> extends TerrierPart<TState> {
|
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
update(_elem: HTMLElement) {
|
|
80
|
-
const content = _elem.querySelector('.tt-dropdown-content')
|
|
80
|
+
const content: HTMLElement | null = _elem.querySelector('.tt-dropdown-content')
|
|
81
81
|
if (content) {
|
|
82
82
|
if (this.anchorTarget) {
|
|
83
83
|
log.info(`Anchoring dropdown`, content, this.anchorTarget)
|
package/terrier/glyps.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
// This file was automatically generated by glyps:compile on
|
|
1
|
+
// This file was automatically generated by glyps:compile on 08/19/23 9:07 AM, DO NOT MANUALLY EDIT!
|
|
2
2
|
|
|
3
3
|
import {strings} from "tuff-core"
|
|
4
4
|
|
|
5
|
-
const names = ['glyp-abacus', 'glyp-account', 'glyp-accounts_payable', 'glyp-accounts_receivable', 'glyp-action_log', 'glyp-activate', 'glyp-active', 'glyp-activity_high', 'glyp-activity_low', 'glyp-activity_medium', 'glyp-activity_none', 'glyp-address1', 'glyp-adjustment', 'glyp-admin', 'glyp-administration', 'glyp-air_freshener', 'glyp-alert', 'glyp-align_horizontal', 'glyp-align_vertical', 'glyp-anchor', 'glyp-announcement', 'glyp-app_update', 'glyp-append_selection', 'glyp-appointment', 'glyp-appointment_setup', 'glyp-archive', 'glyp-arrow_down', 'glyp-arrow_left', 'glyp-arrow_right', 'glyp-arrow_transfer', 'glyp-arrow_up', 'glyp-ascending', 'glyp-attachment', 'glyp-audit_analyzer', 'glyp-autopay', 'glyp-availability', 'glyp-background_batch', 'glyp-background_job', 'glyp-bait_for_demolition', 'glyp-bar_chart', 'glyp-barcode', 'glyp-bat_exclusion', 'glyp-bed_bug_fumigation', 'glyp-begin_service', 'glyp-belongs_to', 'glyp-billing', 'glyp-billing_office', 'glyp-billing_terms', 'glyp-billto', 'glyp-bioremediation', 'glyp-bird_exclusion', 'glyp-black_light', 'glyp-branch', 'glyp-branch_bats', 'glyp-branch_birds', 'glyp-branch_general', 'glyp-branch_irrigation', 'glyp-branch_landscape', 'glyp-branch_multi_housing', 'glyp-branch_office', 'glyp-branch_orders', 'glyp-branch_residential', 'glyp-branch_sales', 'glyp-branch_termites', 'glyp-branch_weeds', 'glyp-branch_wildlife', 'glyp-build', 'glyp-calculate', 'glyp-calendar', 'glyp-calendar_branch', 'glyp-calendar_map', 'glyp-calendar_rolling', 'glyp-calendar_share', 'glyp-calendar_snap', 'glyp-california', 'glyp-call', 'glyp-callback', 'glyp-camera', 'glyp-cancellation', 'glyp-cancelled', 'glyp-card_american_express', 'glyp-card_discover', 'glyp-card_mastercard', 'glyp-card_visa', 'glyp-catalog', 'glyp-caught', 'glyp-cert', 'glyp-check_all', 'glyp-check_in', 'glyp-check_in_service', 'glyp-checked', 'glyp-checked_empty', 'glyp-checkmark', 'glyp-checkmark_filled', 'glyp-checkout', 'glyp-chemical', 'glyp-chemical_authorization', 'glyp-chemical_backpack_sprayer', 'glyp-chemical_biological_controls', 'glyp-chemical_disinfectant', 'glyp-chemical_fertilizer', 'glyp-chemical_flying_insect_bait', 'glyp-chemical_fumigants', 'glyp-chemical_insect_aerosol', 'glyp-chemical_insect_bait', 'glyp-chemical_insect_dust', 'glyp-chemical_insect_granules', 'glyp-chemical_insect_spray', 'glyp-chemical_label', 'glyp-chemical_mole_bait', 'glyp-chemical_pest_bird_control', 'glyp-chemical_pheromone_products', 'glyp-chemical_power_sprayer', 'glyp-chemical_rodenticide_block', 'glyp-chemical_rodenticide_non_block', 'glyp-chemical_sds', 'glyp-chemical_tree_products', 'glyp-chemical_weed_control', 'glyp-chemical_wildlife_repellents', 'glyp-chemical_wildlife_toxicants', 'glyp-chevron_down', 'glyp-chevron_left', 'glyp-chevron_right', 'glyp-chevron_up', 'glyp-city', 'glyp-click', 'glyp-client_actions', 'glyp-client_pest_sightings', 'glyp-client_required', 'glyp-close', 'glyp-cloud', 'glyp-clypboard', 'glyp-clypedia', 'glyp-clypmart', 'glyp-code', 'glyp-code_details', 'glyp-collections', 'glyp-columns', 'glyp-comment', 'glyp-comment_filled', 'glyp-commission_origin', 'glyp-commissions', 'glyp-company_setup', 'glyp-compass', 'glyp-complete', 'glyp-complete_certificate', 'glyp-complete_enrollment', 'glyp-condition_appliance_machinery', 'glyp-condition_customer', 'glyp-condition_device', 'glyp-condition_door_window', 'glyp-condition_dumpster', 'glyp-condition_entry_point', 'glyp-condition_evidence', 'glyp-condition_exclusion', 'glyp-condition_exterior', 'glyp-condition_interior', 'glyp-condition_plumbing', 'glyp-condition_prep_storage', 'glyp-condition_rodent_evidence', 'glyp-condition_rodent_exclusion', 'glyp-condition_roof_ceiling', 'glyp-condition_structure', 'glyp-condition_supplies', 'glyp-condition_termites', 'glyp-condition_ventilation', 'glyp-condition_wall_floor', 'glyp-condition_wildlife', 'glyp-conditions', 'glyp-consolidate', 'glyp-construction', 'glyp-contract', 'glyp-contract_cancellation', 'glyp-contract_overview', 'glyp-conversation', 'glyp-copesan', 'glyp-copy', 'glyp-credit_memo', 'glyp-credit_non_revenue', 'glyp-credit_production', 'glyp-credit_prospect', 'glyp-credit_sales_bonus', 'glyp-crew', 'glyp-cumulative', 'glyp-cursor', 'glyp-custom_form', 'glyp-customer', 'glyp-customer_service', 'glyp-dashboard', 'glyp-data_dive', 'glyp-data_dive_query', 'glyp-data_dives', 'glyp-database', 'glyp-dead_animal_removal', 'glyp-default', 'glyp-delete', 'glyp-demo_mode', 'glyp-descending', 'glyp-design', 'glyp-desktop', 'glyp-detail_report', 'glyp-developer', 'glyp-device', 'glyp-device_sync', 'glyp-differential', 'glyp-disable', 'glyp-disabled_filled', 'glyp-distribute_horizontal', 'glyp-distribute_vertical', 'glyp-division', 'glyp-document', 'glyp-documentation', 'glyp-documents', 'glyp-download', 'glyp-driving', 'glyp-duplicate', 'glyp-duplicate_location', 'glyp-duration', 'glyp-edit', 'glyp-email', 'glyp-employment', 'glyp-entertainment_public_venues', 'glyp-equipment_bear_trap', 'glyp-equipment_flying_insect_bait_station', 'glyp-equipment_flying_insect_light_trap', 'glyp-equipment_insect_monitor', 'glyp-equipment_lethal_animal_trap', 'glyp-equipment_live_animal_trap', 'glyp-equipment_live_rodent_trap', 'glyp-equipment_maintenance', 'glyp-equipment_map_viewer', 'glyp-equipment_maps', 'glyp-equipment_mosquito_trap', 'glyp-equipment_other', 'glyp-equipment_pheromone_trap', 'glyp-equipment_pick_up', 'glyp-equipment_rodent_bait', 'glyp-equipment_rodent_trap', 'glyp-equipment_termite_bait_station', 'glyp-equipment_termite_monitor', 'glyp-exclusion', 'glyp-expand', 'glyp-expiring', 'glyp-exterior', 'glyp-extras', 'glyp-facebook', 'glyp-farm', 'glyp-farm_grain_seed', 'glyp-fast_and_frequent', 'glyp-favorite', 'glyp-feedback', 'glyp-field_guide', 'glyp-field_training', 'glyp-file_blank', 'glyp-file_html', 'glyp-file_image', 'glyp-file_pdf', 'glyp-file_printable', 'glyp-file_spreadsheet', 'glyp-file_text', 'glyp-filter', 'glyp-finance', 'glyp-finding', 'glyp-folder', 'glyp-followup', 'glyp-food_bev_pharma', 'glyp-formula', 'glyp-fuel', 'glyp-fumigation', 'glyp-function', 'glyp-function_aggregate', 'glyp-function_time', 'glyp-gain_loss', 'glyp-generate_invoices', 'glyp-generate_orders', 'glyp-geo', 'glyp-geo_heat_map', 'glyp-google', 'glyp-google_calendar', 'glyp-government', 'glyp-grain_seed', 'glyp-grid', 'glyp-grouped', 'glyp-grouping_combine', 'glyp-grouping_separate', 'glyp-has_many', 'glyp-health_care', 'glyp-heat_map', 'glyp-heat_treatment', 'glyp-help', 'glyp-hidden', 'glyp-hint', 'glyp-honeybee_removal', 'glyp-housing', 'glyp-in_progress', 'glyp-incomplete_certificate', 'glyp-industrial', 'glyp-info', 'glyp-information_technology', 'glyp-inspect_map', 'glyp-inspections', 'glyp-insulation', 'glyp-interior', 'glyp-invoice', 'glyp-invoice_review', 'glyp-irrigation_install', 'glyp-irrigation_maintenance', 'glyp-items', 'glyp-job', 'glyp-join', 'glyp-join_inner', 'glyp-join_left', 'glyp-justice', 'glyp-k9_inspection', 'glyp-key', 'glyp-label_bottom', 'glyp-label_left', 'glyp-label_right', 'glyp-label_top', 'glyp-labor', 'glyp-landscape', 'glyp-landscape_maintenance', 'glyp-laptop', 'glyp-lead', 'glyp-lead_listing', 'glyp-lead_source', 'glyp-leads_report', 'glyp-learning_hub', 'glyp-ledger', 'glyp-legal', 'glyp-license', 'glyp-lifetime', 'glyp-line_cap_arrow', 'glyp-line_cap_bar', 'glyp-line_cap_circle', 'glyp-line_cap_none', 'glyp-line_caps', 'glyp-line_style', 'glyp-link', 'glyp-location', 'glyp-location_charge', 'glyp-location_credit', 'glyp-location_kind', 'glyp-location_message', 'glyp-location_origin', 'glyp-location_tags', 'glyp-locations', 'glyp-locked', 'glyp-lodging', 'glyp-log_in', 'glyp-log_out', 'glyp-log_report', 'glyp-logbook', 'glyp-logbook_documents', 'glyp-lot_number', 'glyp-manager', 'glyp-map', 'glyp-markdown', 'glyp-market', 'glyp-materials', 'glyp-mattress_encasement', 'glyp-merge', 'glyp-message_billing', 'glyp-message_collections', 'glyp-message_complaint', 'glyp-message_misc', 'glyp-message_technician', 'glyp-messages', 'glyp-misc', 'glyp-miscellaneous', 'glyp-move_order', 'glyp-mowing', 'glyp-multi_housing', 'glyp-mute', 'glyp-navicon', 'glyp-new_location', 'glyp-no_charge', 'glyp-no_service', 'glyp-note', 'glyp-note_access', 'glyp-note_billing', 'glyp-note_collection', 'glyp-note_complaint', 'glyp-note_directions', 'glyp-note_focused', 'glyp-note_office', 'glyp-note_preservice', 'glyp-note_sales', 'glyp-note_service', 'glyp-notification', 'glyp-number', 'glyp-office', 'glyp-office_government', 'glyp-office_training', 'glyp-on_demand', 'glyp-on_demand_order', 'glyp-open', 'glyp-open_invoice', 'glyp-operations', 'glyp-options', 'glyp-order_actions', 'glyp-order_approved', 'glyp-order_batch', 'glyp-order_editor', 'glyp-order_pending', 'glyp-order_series', 'glyp-order_unapproved', 'glyp-org_structure', 'glyp-org_unit', 'glyp-org_unit_settings', 'glyp-origin', 'glyp-origin_client', 'glyp-origin_tech', 'glyp-outlook', 'glyp-overlap', 'glyp-password', 'glyp-past_due', 'glyp-paused', 'glyp-pay_brackets', 'glyp-payment', 'glyp-payment_ach', 'glyp-payment_application_apply', 'glyp-payment_application_correction', 'glyp-payment_application_initial', 'glyp-payment_application_refund', 'glyp-payment_application_transfer', 'glyp-payment_application_unapply', 'glyp-payment_application_unapply_all', 'glyp-payment_applications', 'glyp-payment_batch', 'glyp-payment_cash', 'glyp-payment_check', 'glyp-payment_coupon', 'glyp-payment_credit', 'glyp-payment_discount', 'glyp-payment_eft', 'glyp-payment_finance_charge', 'glyp-payments', 'glyp-payroll', 'glyp-pdf', 'glyp-pending', 'glyp-periodic', 'glyp-periodic_assessment', 'glyp-permission', 'glyp-pest', 'glyp-pest_ants', 'glyp-pest_bats', 'glyp-pest_bed_bugs', 'glyp-pest_birds', 'glyp-pest_crawling_insects', 'glyp-pest_dermestids', 'glyp-pest_fall_invaders', 'glyp-pest_flying_insects', 'glyp-pest_moles', 'glyp-pest_mosquitoes', 'glyp-pest_nuisance_animals', 'glyp-pest_ornamental', 'glyp-pest_ornamental_diseases', 'glyp-pest_roaches', 'glyp-pest_rodents', 'glyp-pest_scorpions', 'glyp-pest_snakes', 'glyp-pest_spiders', 'glyp-pest_stinging_insects', 'glyp-pest_stored_product_pests', 'glyp-pest_ticks_and_fleas', 'glyp-pest_viruses_and_bacteria', 'glyp-pest_weeds', 'glyp-pest_wood_destroyers', 'glyp-phone', 'glyp-pick_date', 'glyp-pick_list', 'glyp-platform_android', 'glyp-platform_ios', 'glyp-platform_macos', 'glyp-platform_windows', 'glyp-play', 'glyp-plus', 'glyp-plus_filled', 'glyp-plus_outline', 'glyp-portal', 'glyp-price_increase', 'glyp-price_increase_alt', 'glyp-pricing_table', 'glyp-print', 'glyp-privacy', 'glyp-product_sale', 'glyp-production', 'glyp-professional_consultation', 'glyp-program', 'glyp-program_elements', 'glyp-program_initiation', 'glyp-program_order', 'glyp-program_review', 'glyp-promo', 'glyp-proposal', 'glyp-protection', 'glyp-purchase_order', 'glyp-quality', 'glyp-query', 'glyp-radio_checked', 'glyp-radio_empty', 'glyp-reassign', 'glyp-receipt', 'glyp-recent', 'glyp-recommendation', 'glyp-record_details', 'glyp-recurring_revenue', 'glyp-redo', 'glyp-refresh', 'glyp-refund', 'glyp-region', 'glyp-released', 'glyp-remove', 'glyp-renewal', 'glyp-report', 'glyp-required_input', 'glyp-reschedule', 'glyp-restaurant_bar', 'glyp-revenue', 'glyp-review', 'glyp-rfid', 'glyp-ride_along', 'glyp-rodent_exclusion', 'glyp-route_change', 'glyp-route_optimization', 'glyp-rows', 'glyp-ruler', 'glyp-sales', 'glyp-sales_contest', 'glyp-sales_pipeline', 'glyp-sales_tax', 'glyp-sales_tax_exemption', 'glyp-schedule_lock', 'glyp-schedule_lock_afternoon', 'glyp-schedule_lock_day', 'glyp-schedule_lock_exact', 'glyp-schedule_lock_four_hour', 'glyp-schedule_lock_morning', 'glyp-schedule_lock_none', 'glyp-schedule_lock_two_day', 'glyp-schedule_lock_two_hour', 'glyp-schedule_lock_week', 'glyp-schedule_tyoe_every', 'glyp-schedule_type_every', 'glyp-schedule_type_none', 'glyp-schedule_type_on_demand', 'glyp-schedule_type_schedule', 'glyp-scheduled', 'glyp-scheduling', 'glyp-school_church', 'glyp-script', 'glyp-search', 'glyp-seeding', 'glyp-segment', 'glyp-sent', 'glyp-sentricon', 'glyp-service_agreement', 'glyp-service_form', 'glyp-service_miscellaneous', 'glyp-service_reminder', 'glyp-service_report', 'glyp-service_request', 'glyp-services', 'glyp-settings', 'glyp-setup', 'glyp-signature', 'glyp-simulator', 'glyp-site_map', 'glyp-site_map_annotation', 'glyp-site_map_chemical', 'glyp-site_map_edit_details', 'glyp-site_map_edit_geo', 'glyp-site_map_equipment', 'glyp-site_map_exterior', 'glyp-site_map_foundation', 'glyp-site_map_icon', 'glyp-site_map_interior', 'glyp-site_map_label', 'glyp-site_map_perimeter', 'glyp-site_map_settings_left', 'glyp-site_map_settings_right', 'glyp-site_map_template', 'glyp-skip', 'glyp-smart_traps', 'glyp-sms', 'glyp-snow_removal', 'glyp-sort', 'glyp-special', 'glyp-split', 'glyp-spp_scorecard', 'glyp-square_edge', 'glyp-start_sheet', 'glyp-start_time', 'glyp-statement', 'glyp-states', 'glyp-sticky', 'glyp-stop_time', 'glyp-store_material', 'glyp-store_order', 'glyp-store_order_back_order', 'glyp-store_order_cancelled', 'glyp-store_order_complete', 'glyp-store_order_pending', 'glyp-store_order_pending_return', 'glyp-store_order_pre_order', 'glyp-store_order_returned', 'glyp-stores', 'glyp-styling', 'glyp-subscribe', 'glyp-supplemental', 'glyp-support', 'glyp-sync', 'glyp-table', 'glyp-tablet', 'glyp-tablets', 'glyp-tag_manager', 'glyp-tags', 'glyp-task_runs', 'glyp-tech_pest_sightings', 'glyp-technician', 'glyp-technician_approach', 'glyp-template', 'glyp-termite_fumigation', 'glyp-terrier', 'glyp-territory', 'glyp-text', 'glyp-thermometer', 'glyp-third_party_billing', 'glyp-ticket_type', 'glyp-tickets', 'glyp-tidy', 'glyp-time', 'glyp-time_entry', 'glyp-timeline', 'glyp-toolbox', 'glyp-tqi', 'glyp-tracker', 'glyp-tracking', 'glyp-training_course', 'glyp-treatment_split', 'glyp-trends', 'glyp-trip_charge', 'glyp-ui_type', 'glyp-unchecked', 'glyp-undo', 'glyp-unit_sweep', 'glyp-unit_tag', 'glyp-university', 'glyp-unlocked', 'glyp-unscheduled', 'glyp-update_check_positions', 'glyp-upload', 'glyp-user', 'glyp-user_credit', 'glyp-user_tags', 'glyp-users', 'glyp-utility', 'glyp-vacation', 'glyp-vacuum', 'glyp-variant', 'glyp-vendor', 'glyp-versions', 'glyp-video', 'glyp-visible', 'glyp-warehouse', 'glyp-wdo', 'glyp-web_dusting', 'glyp-website', 'glyp-wildlife', 'glyp-wildlife_exclusion', 'glyp-winter_check', 'glyp-wizard', 'glyp-work', 'glyp-work_class', 'glyp-work_code', 'glyp-work_order', 'glyp-work_production', 'glyp-work_progress', 'glyp-work_yield', 'glyp-year', 'glyp-yield', 'glyp-zip_code', 'glyp-zone_adjacent', 'glyp-zone_check', 'glyp-zone_production', 'glyp-zone_remote', 'glyp-zoom_fit'] as const
|
|
5
|
+
const names = ['glyp-abacus', 'glyp-account', 'glyp-accounts_payable', 'glyp-accounts_receivable', 'glyp-action_log', 'glyp-activate', 'glyp-active', 'glyp-activity_high', 'glyp-activity_low', 'glyp-activity_medium', 'glyp-activity_none', 'glyp-address1', 'glyp-adjustment', 'glyp-admin', 'glyp-administration', 'glyp-air_freshener', 'glyp-alert', 'glyp-align_horizontal', 'glyp-align_vertical', 'glyp-anchor', 'glyp-announcement', 'glyp-app_update', 'glyp-append_selection', 'glyp-appointment', 'glyp-appointment_setup', 'glyp-archive', 'glyp-arrow_down', 'glyp-arrow_left', 'glyp-arrow_right', 'glyp-arrow_transfer', 'glyp-arrow_up', 'glyp-ascending', 'glyp-attachment', 'glyp-audit_analyzer', 'glyp-autopay', 'glyp-availability', 'glyp-background_batch', 'glyp-background_job', 'glyp-bait_for_demolition', 'glyp-bar_chart', 'glyp-barcode', 'glyp-bat_exclusion', 'glyp-bed_bug_fumigation', 'glyp-begin_service', 'glyp-belongs_to', 'glyp-billing', 'glyp-billing_office', 'glyp-billing_terms', 'glyp-billto', 'glyp-bioremediation', 'glyp-bird_exclusion', 'glyp-black_light', 'glyp-branch', 'glyp-branch_bats', 'glyp-branch_birds', 'glyp-branch_general', 'glyp-branch_irrigation', 'glyp-branch_landscape', 'glyp-branch_multi_housing', 'glyp-branch_office', 'glyp-branch_orders', 'glyp-branch_residential', 'glyp-branch_sales', 'glyp-branch_termites', 'glyp-branch_weeds', 'glyp-branch_wildlife', 'glyp-build', 'glyp-calculate', 'glyp-calendar', 'glyp-calendar_branch', 'glyp-calendar_map', 'glyp-calendar_rolling', 'glyp-calendar_share', 'glyp-calendar_snap', 'glyp-california', 'glyp-call', 'glyp-callback', 'glyp-camera', 'glyp-cancellation', 'glyp-cancelled', 'glyp-card_american_express', 'glyp-card_discover', 'glyp-card_mastercard', 'glyp-card_visa', 'glyp-catalog', 'glyp-caught', 'glyp-cert', 'glyp-check_all', 'glyp-check_in', 'glyp-check_in_service', 'glyp-checked', 'glyp-checked_empty', 'glyp-checkmark', 'glyp-checkmark_filled', 'glyp-checkout', 'glyp-chemical', 'glyp-chemical_authorization', 'glyp-chemical_backpack_sprayer', 'glyp-chemical_biological_controls', 'glyp-chemical_disinfectant', 'glyp-chemical_fertilizer', 'glyp-chemical_flying_insect_bait', 'glyp-chemical_fumigants', 'glyp-chemical_insect_aerosol', 'glyp-chemical_insect_bait', 'glyp-chemical_insect_dust', 'glyp-chemical_insect_granules', 'glyp-chemical_insect_spray', 'glyp-chemical_label', 'glyp-chemical_mole_bait', 'glyp-chemical_pest_bird_control', 'glyp-chemical_pheromone_products', 'glyp-chemical_power_sprayer', 'glyp-chemical_rodenticide_block', 'glyp-chemical_rodenticide_non_block', 'glyp-chemical_sds', 'glyp-chemical_tree_products', 'glyp-chemical_weed_control', 'glyp-chemical_wildlife_repellents', 'glyp-chemical_wildlife_toxicants', 'glyp-chevron_down', 'glyp-chevron_left', 'glyp-chevron_right', 'glyp-chevron_up', 'glyp-city', 'glyp-click', 'glyp-client_actions', 'glyp-client_pest_sightings', 'glyp-client_required', 'glyp-close', 'glyp-cloud', 'glyp-clypboard', 'glyp-clypedia', 'glyp-clypmart', 'glyp-code', 'glyp-code_details', 'glyp-collections', 'glyp-columns', 'glyp-comment', 'glyp-comment_filled', 'glyp-commission_origin', 'glyp-commissions', 'glyp-company_setup', 'glyp-compass', 'glyp-complete', 'glyp-complete_certificate', 'glyp-complete_enrollment', 'glyp-condition_appliance_machinery', 'glyp-condition_customer', 'glyp-condition_device', 'glyp-condition_door_window', 'glyp-condition_dumpster', 'glyp-condition_entry_point', 'glyp-condition_evidence', 'glyp-condition_exclusion', 'glyp-condition_exterior', 'glyp-condition_interior', 'glyp-condition_plumbing', 'glyp-condition_prep_storage', 'glyp-condition_rodent_evidence', 'glyp-condition_rodent_exclusion', 'glyp-condition_roof_ceiling', 'glyp-condition_structure', 'glyp-condition_supplies', 'glyp-condition_termites', 'glyp-condition_ventilation', 'glyp-condition_wall_floor', 'glyp-condition_wildlife', 'glyp-conditions', 'glyp-consolidate', 'glyp-construction', 'glyp-contract', 'glyp-contract_cancellation', 'glyp-contract_overview', 'glyp-conversation', 'glyp-copesan', 'glyp-copy', 'glyp-credit_memo', 'glyp-credit_non_revenue', 'glyp-credit_production', 'glyp-credit_prospect', 'glyp-credit_sales_bonus', 'glyp-crew', 'glyp-cumulative', 'glyp-cursor', 'glyp-custom_form', 'glyp-customer', 'glyp-customer_service', 'glyp-dashboard', 'glyp-data_dive', 'glyp-data_dive_query', 'glyp-data_dives', 'glyp-database', 'glyp-dead_animal_removal', 'glyp-default', 'glyp-delete', 'glyp-demo_mode', 'glyp-descending', 'glyp-design', 'glyp-desktop', 'glyp-detail_report', 'glyp-developer', 'glyp-device', 'glyp-device_sync', 'glyp-differential', 'glyp-disable', 'glyp-disabled_filled', 'glyp-distribute_horizontal', 'glyp-distribute_vertical', 'glyp-division', 'glyp-document', 'glyp-documentation', 'glyp-documents', 'glyp-download', 'glyp-driving', 'glyp-duplicate', 'glyp-duplicate_location', 'glyp-duration', 'glyp-edit', 'glyp-email', 'glyp-employment', 'glyp-entertainment_public_venues', 'glyp-equipment_bear_trap', 'glyp-equipment_flying_insect_bait_station', 'glyp-equipment_flying_insect_light_trap', 'glyp-equipment_insect_monitor', 'glyp-equipment_lethal_animal_trap', 'glyp-equipment_live_animal_trap', 'glyp-equipment_live_rodent_trap', 'glyp-equipment_maintenance', 'glyp-equipment_map_viewer', 'glyp-equipment_maps', 'glyp-equipment_mosquito_trap', 'glyp-equipment_other', 'glyp-equipment_pheromone_trap', 'glyp-equipment_pick_up', 'glyp-equipment_rodent_bait', 'glyp-equipment_rodent_trap', 'glyp-equipment_termite_bait_station', 'glyp-equipment_termite_monitor', 'glyp-exclusion', 'glyp-expand', 'glyp-expired', 'glyp-expiring', 'glyp-exterior', 'glyp-extras', 'glyp-facebook', 'glyp-farm', 'glyp-farm_grain_seed', 'glyp-fast_and_frequent', 'glyp-favorite', 'glyp-feedback', 'glyp-field_guide', 'glyp-field_training', 'glyp-file_blank', 'glyp-file_html', 'glyp-file_image', 'glyp-file_pdf', 'glyp-file_printable', 'glyp-file_spreadsheet', 'glyp-file_text', 'glyp-filter', 'glyp-finance', 'glyp-finding', 'glyp-folder', 'glyp-followup', 'glyp-food_bev_pharma', 'glyp-formula', 'glyp-fuel', 'glyp-fumigation', 'glyp-function', 'glyp-function_aggregate', 'glyp-function_time', 'glyp-gain_loss', 'glyp-generate_invoices', 'glyp-generate_orders', 'glyp-geo', 'glyp-geo_heat_map', 'glyp-google', 'glyp-google_calendar', 'glyp-government', 'glyp-grain_seed', 'glyp-grid', 'glyp-grouped', 'glyp-grouping_combine', 'glyp-grouping_separate', 'glyp-has_many', 'glyp-health_care', 'glyp-heat_map', 'glyp-heat_treatment', 'glyp-help', 'glyp-hidden', 'glyp-hint', 'glyp-honeybee_removal', 'glyp-housing', 'glyp-in_progress', 'glyp-inbox', 'glyp-incomplete_certificate', 'glyp-industrial', 'glyp-info', 'glyp-information_technology', 'glyp-inspect_map', 'glyp-inspections', 'glyp-insulation', 'glyp-interior', 'glyp-invoice', 'glyp-invoice_review', 'glyp-irrigation_install', 'glyp-irrigation_maintenance', 'glyp-items', 'glyp-job', 'glyp-join', 'glyp-join_inner', 'glyp-join_left', 'glyp-justice', 'glyp-k9_inspection', 'glyp-key', 'glyp-label_bottom', 'glyp-label_left', 'glyp-label_right', 'glyp-label_top', 'glyp-labor', 'glyp-landscape', 'glyp-landscape_maintenance', 'glyp-laptop', 'glyp-lead', 'glyp-lead_listing', 'glyp-lead_source', 'glyp-leads_report', 'glyp-learning_hub', 'glyp-ledger', 'glyp-legal', 'glyp-license', 'glyp-lifetime', 'glyp-line_cap_arrow', 'glyp-line_cap_bar', 'glyp-line_cap_circle', 'glyp-line_cap_none', 'glyp-line_caps', 'glyp-line_style', 'glyp-link', 'glyp-location', 'glyp-location_charge', 'glyp-location_credit', 'glyp-location_kind', 'glyp-location_message', 'glyp-location_origin', 'glyp-location_tags', 'glyp-locations', 'glyp-locked', 'glyp-lodging', 'glyp-log_in', 'glyp-log_out', 'glyp-log_report', 'glyp-logbook', 'glyp-logbook_documents', 'glyp-lot_number', 'glyp-manager', 'glyp-map', 'glyp-markdown', 'glyp-market', 'glyp-materials', 'glyp-mattress_encasement', 'glyp-merge', 'glyp-message_billing', 'glyp-message_collections', 'glyp-message_complaint', 'glyp-message_misc', 'glyp-message_technician', 'glyp-messages', 'glyp-misc', 'glyp-miscellaneous', 'glyp-move_order', 'glyp-mowing', 'glyp-multi_housing', 'glyp-mute', 'glyp-navicon', 'glyp-new_location', 'glyp-new_ticket', 'glyp-no_charge', 'glyp-no_service', 'glyp-note', 'glyp-note_access', 'glyp-note_billing', 'glyp-note_collection', 'glyp-note_complaint', 'glyp-note_directions', 'glyp-note_focused', 'glyp-note_office', 'glyp-note_preservice', 'glyp-note_sales', 'glyp-note_service', 'glyp-notification', 'glyp-number', 'glyp-office', 'glyp-office_government', 'glyp-office_training', 'glyp-on_demand', 'glyp-on_demand_order', 'glyp-open', 'glyp-open_invoice', 'glyp-operations', 'glyp-options', 'glyp-order_actions', 'glyp-order_approved', 'glyp-order_batch', 'glyp-order_editor', 'glyp-order_pending', 'glyp-order_series', 'glyp-order_unapproved', 'glyp-org_structure', 'glyp-org_unit', 'glyp-org_unit_settings', 'glyp-origin', 'glyp-origin_client', 'glyp-origin_tech', 'glyp-outbox', 'glyp-outlook', 'glyp-overlap', 'glyp-password', 'glyp-past_due', 'glyp-paused', 'glyp-pay_brackets', 'glyp-payment', 'glyp-payment_ach', 'glyp-payment_application_apply', 'glyp-payment_application_correction', 'glyp-payment_application_initial', 'glyp-payment_application_refund', 'glyp-payment_application_transfer', 'glyp-payment_application_unapply', 'glyp-payment_application_unapply_all', 'glyp-payment_applications', 'glyp-payment_batch', 'glyp-payment_cash', 'glyp-payment_check', 'glyp-payment_coupon', 'glyp-payment_credit', 'glyp-payment_discount', 'glyp-payment_eft', 'glyp-payment_finance_charge', 'glyp-payments', 'glyp-payroll', 'glyp-pdf', 'glyp-pending', 'glyp-periodic', 'glyp-periodic_assessment', 'glyp-permission', 'glyp-pest', 'glyp-pest_ants', 'glyp-pest_bats', 'glyp-pest_bed_bugs', 'glyp-pest_birds', 'glyp-pest_crawling_insects', 'glyp-pest_dermestids', 'glyp-pest_fall_invaders', 'glyp-pest_flying_insects', 'glyp-pest_moles', 'glyp-pest_mosquitoes', 'glyp-pest_nuisance_animals', 'glyp-pest_ornamental', 'glyp-pest_ornamental_diseases', 'glyp-pest_roaches', 'glyp-pest_rodents', 'glyp-pest_scorpions', 'glyp-pest_snakes', 'glyp-pest_spiders', 'glyp-pest_stinging_insects', 'glyp-pest_stored_product_pests', 'glyp-pest_ticks_and_fleas', 'glyp-pest_viruses_and_bacteria', 'glyp-pest_weeds', 'glyp-pest_wood_destroyers', 'glyp-phone', 'glyp-pick_date', 'glyp-pick_list', 'glyp-platform_android', 'glyp-platform_ios', 'glyp-platform_macos', 'glyp-platform_windows', 'glyp-play', 'glyp-plus', 'glyp-plus_filled', 'glyp-plus_outline', 'glyp-portal', 'glyp-price_increase', 'glyp-price_increase_alt', 'glyp-pricing_table', 'glyp-print', 'glyp-privacy', 'glyp-product_sale', 'glyp-production', 'glyp-professional_consultation', 'glyp-program', 'glyp-program_elements', 'glyp-program_initiation', 'glyp-program_order', 'glyp-program_review', 'glyp-promo', 'glyp-proposal', 'glyp-protection', 'glyp-purchase_order', 'glyp-quality', 'glyp-query', 'glyp-radio_checked', 'glyp-radio_empty', 'glyp-reassign', 'glyp-receipt', 'glyp-recent', 'glyp-recommendation', 'glyp-record_details', 'glyp-recurring_revenue', 'glyp-redo', 'glyp-refresh', 'glyp-refund', 'glyp-region', 'glyp-released', 'glyp-remove', 'glyp-renewal', 'glyp-report', 'glyp-required_input', 'glyp-reschedule', 'glyp-restaurant_bar', 'glyp-revenue', 'glyp-review', 'glyp-rfid', 'glyp-ride_along', 'glyp-rodent_exclusion', 'glyp-route_change', 'glyp-route_optimization', 'glyp-rows', 'glyp-ruler', 'glyp-sales', 'glyp-sales_contest', 'glyp-sales_pipeline', 'glyp-sales_tax', 'glyp-sales_tax_exemption', 'glyp-schedule_lock', 'glyp-schedule_lock_afternoon', 'glyp-schedule_lock_day', 'glyp-schedule_lock_exact', 'glyp-schedule_lock_four_hour', 'glyp-schedule_lock_morning', 'glyp-schedule_lock_none', 'glyp-schedule_lock_two_day', 'glyp-schedule_lock_two_hour', 'glyp-schedule_lock_week', 'glyp-schedule_tyoe_every', 'glyp-schedule_type_every', 'glyp-schedule_type_none', 'glyp-schedule_type_on_demand', 'glyp-schedule_type_schedule', 'glyp-scheduled', 'glyp-scheduling', 'glyp-school_church', 'glyp-script', 'glyp-search', 'glyp-seeding', 'glyp-segment', 'glyp-sent', 'glyp-sentricon', 'glyp-service_agreement', 'glyp-service_form', 'glyp-service_miscellaneous', 'glyp-service_reminder', 'glyp-service_report', 'glyp-service_request', 'glyp-services', 'glyp-settings', 'glyp-setup', 'glyp-signature', 'glyp-simulator', 'glyp-site_map', 'glyp-site_map_annotation', 'glyp-site_map_chemical', 'glyp-site_map_edit_details', 'glyp-site_map_edit_geo', 'glyp-site_map_equipment', 'glyp-site_map_exterior', 'glyp-site_map_foundation', 'glyp-site_map_icon', 'glyp-site_map_interior', 'glyp-site_map_label', 'glyp-site_map_perimeter', 'glyp-site_map_settings_left', 'glyp-site_map_settings_right', 'glyp-site_map_template', 'glyp-skip', 'glyp-smart_traps', 'glyp-sms', 'glyp-snow_removal', 'glyp-sort', 'glyp-special', 'glyp-split', 'glyp-spp_scorecard', 'glyp-square_edge', 'glyp-start_sheet', 'glyp-start_time', 'glyp-statement', 'glyp-states', 'glyp-sticky', 'glyp-stop_time', 'glyp-store_material', 'glyp-store_order', 'glyp-store_order_back_order', 'glyp-store_order_cancelled', 'glyp-store_order_complete', 'glyp-store_order_pending', 'glyp-store_order_pending_return', 'glyp-store_order_pre_order', 'glyp-store_order_returned', 'glyp-stores', 'glyp-styling', 'glyp-subscribe', 'glyp-supplemental', 'glyp-support', 'glyp-sync', 'glyp-table', 'glyp-tablet', 'glyp-tablets', 'glyp-tag_manager', 'glyp-tags', 'glyp-task_runs', 'glyp-tech_pest_sightings', 'glyp-technician', 'glyp-technician_approach', 'glyp-template', 'glyp-termite_fumigation', 'glyp-terrier', 'glyp-territory', 'glyp-text', 'glyp-thermometer', 'glyp-third_party_billing', 'glyp-ticket', 'glyp-ticket_type', 'glyp-tickets', 'glyp-tidy', 'glyp-time', 'glyp-time_entry', 'glyp-timeline', 'glyp-toolbox', 'glyp-tqi', 'glyp-tracker', 'glyp-tracking', 'glyp-training_course', 'glyp-treatment_split', 'glyp-trends', 'glyp-trip_charge', 'glyp-ui_type', 'glyp-unarchive', 'glyp-unchecked', 'glyp-undo', 'glyp-unfavorite', 'glyp-unit_sweep', 'glyp-unit_tag', 'glyp-university', 'glyp-unlocked', 'glyp-unmute', 'glyp-unscheduled', 'glyp-update_check_positions', 'glyp-upload', 'glyp-user', 'glyp-user_credit', 'glyp-user_tags', 'glyp-users', 'glyp-utility', 'glyp-vacation', 'glyp-vacuum', 'glyp-variant', 'glyp-vendor', 'glyp-versions', 'glyp-video', 'glyp-visible', 'glyp-warehouse', 'glyp-wdo', 'glyp-web_dusting', 'glyp-website', 'glyp-wildlife', 'glyp-wildlife_exclusion', 'glyp-winter_check', 'glyp-wizard', 'glyp-work', 'glyp-work_class', 'glyp-work_code', 'glyp-work_order', 'glyp-work_production', 'glyp-work_progress', 'glyp-work_yield', 'glyp-year', 'glyp-yield', 'glyp-zip_code', 'glyp-zone_adjacent', 'glyp-zone_check', 'glyp-zone_production', 'glyp-zone_remote', 'glyp-zoom_fit'] as const
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Format a glyp name so that it's suitable to show to the user.
|
|
9
9
|
* @param glyp
|
|
10
10
|
*/
|
|
11
11
|
const displayName = (glyp: string): string => {
|
|
12
|
-
|
|
12
|
+
return strings.titleize(glyp.replace('glyp-', ''))
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
const Glyps = {
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
names,
|
|
17
|
+
displayName
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
export type GlypName = typeof names[number]
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import TerrierPart from "./parts/terrier-part"
|
|
2
|
+
import {NoState, PartTag} from "tuff-core/parts"
|
|
3
|
+
|
|
4
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
5
|
+
// Types
|
|
6
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
7
|
+
|
|
8
|
+
export type LogLevel = 'success' | 'info' | 'warn' | 'error' | 'debug'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Type of log events from a streaming response.
|
|
12
|
+
*/
|
|
13
|
+
export type LogEntry = {
|
|
14
|
+
level: LogLevel
|
|
15
|
+
prefix?: string
|
|
16
|
+
message: string
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
21
|
+
// List Part
|
|
22
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
23
|
+
|
|
24
|
+
export class LogListPart extends TerrierPart<NoState> {
|
|
25
|
+
|
|
26
|
+
entries: LogEntry[] = []
|
|
27
|
+
|
|
28
|
+
async init() {
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
render(parent: PartTag): any {
|
|
32
|
+
parent.div('.tt-log-entries', entries => {
|
|
33
|
+
for (const entry of this.entries) {
|
|
34
|
+
this.renderEntry(entries, entry)
|
|
35
|
+
}
|
|
36
|
+
})
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Pushes an entry to the list and renders it.
|
|
41
|
+
* @todo make this more performant for large lists!
|
|
42
|
+
* @param entry
|
|
43
|
+
*/
|
|
44
|
+
push(entry: LogEntry) {
|
|
45
|
+
this.entries.push(entry)
|
|
46
|
+
this.dirty()
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
success(message: string, prefix: string | undefined) {
|
|
50
|
+
this.push({message, prefix, level: "success"})
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
info(message: string, prefix?: string) {
|
|
54
|
+
this.push({message, prefix, level: "info"})
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
warn(message: string, prefix?: string) {
|
|
58
|
+
this.push({message, prefix, level: "warn"})
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
error(message: string, prefix?: string) {
|
|
62
|
+
this.push({message, prefix, level: "error"})
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
debug(message: string, prefix?: string) {
|
|
66
|
+
this.push({message, prefix, level: "debug"})
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
renderEntry(parent: PartTag, entry: LogEntry) {
|
|
70
|
+
parent.div(`.log-entry.${entry.level}`, row => {
|
|
71
|
+
row.div('.message').text(entry.message)
|
|
72
|
+
})
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
}
|
package/terrier/overlays.ts
CHANGED
|
@@ -164,15 +164,24 @@ type AnchorResult = {
|
|
|
164
164
|
valid: boolean
|
|
165
165
|
}
|
|
166
166
|
|
|
167
|
-
function
|
|
167
|
+
function clampAnchorResult(result: AnchorResult, size: Size, container: Size) {
|
|
168
168
|
if (container.width < size.width) {
|
|
169
169
|
result.width = container.width
|
|
170
170
|
}
|
|
171
171
|
const rightOffset = container.width - (result.width ?? size.width) // don't hang off the right side of the viewport
|
|
172
|
-
result.left = Math.max(0, Math.min(result.left, rightOffset))
|
|
172
|
+
result.left = Math.max(0, Math.min(result.left, rightOffset))
|
|
173
173
|
if (result.top < 0 || result.top+size.height > container.height) {
|
|
174
174
|
result.valid = false
|
|
175
175
|
}
|
|
176
|
+
|
|
177
|
+
if (container.height < size.height) {
|
|
178
|
+
result.height = container.height
|
|
179
|
+
}
|
|
180
|
+
const bottomOffset = container.height - (result.height ?? size.height) // don't hang off the bottom of the viewport
|
|
181
|
+
result.top = Math.max(0, Math.min(result.top, bottomOffset))
|
|
182
|
+
if (result.left < 0 || result.left + size.width > container.width) {
|
|
183
|
+
result.valid = false
|
|
184
|
+
}
|
|
176
185
|
}
|
|
177
186
|
|
|
178
187
|
function anchorBoxBottom(size: Size, anchor: Box, container: Size): AnchorResult {
|
|
@@ -181,7 +190,7 @@ function anchorBoxBottom(size: Size, anchor: Box, container: Size): AnchorResult
|
|
|
181
190
|
left: anchor.x + anchor.width / 2 - size.width / 2,
|
|
182
191
|
valid: true
|
|
183
192
|
}
|
|
184
|
-
|
|
193
|
+
clampAnchorResult(result, size, container)
|
|
185
194
|
return result
|
|
186
195
|
}
|
|
187
196
|
|
|
@@ -191,28 +200,17 @@ function anchorBoxTop(size: Size, anchor: Box, container: Size): AnchorResult {
|
|
|
191
200
|
left: anchor.x + anchor.width / 2 - size.width / 2,
|
|
192
201
|
valid: true
|
|
193
202
|
}
|
|
194
|
-
|
|
203
|
+
clampAnchorResult(result, size, container)
|
|
195
204
|
return result
|
|
196
205
|
}
|
|
197
206
|
|
|
198
|
-
function clampVertical(result: AnchorResult, size: Size, container: Size) {
|
|
199
|
-
if (container.height < size.height) {
|
|
200
|
-
result.height = container.height
|
|
201
|
-
}
|
|
202
|
-
const bottomOffset = container.height - (result.height ?? size.height) // don't hang off the bottom of the viewport
|
|
203
|
-
result.top = Math.max(0, Math.min(result.top, bottomOffset)) // don't hang off the top of the viewport
|
|
204
|
-
if (result.left < 0 || result.left + size.width > container.width) {
|
|
205
|
-
result.valid = false
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
|
|
209
207
|
function anchorBoxLeft(size: Size, anchor: Box, container: Size): AnchorResult {
|
|
210
208
|
const result = {
|
|
211
209
|
top: anchor.y + anchor.height/2 - size.height / 2,
|
|
212
210
|
left: anchor.x - size.width,
|
|
213
211
|
valid: true
|
|
214
212
|
}
|
|
215
|
-
|
|
213
|
+
clampAnchorResult(result, size, container)
|
|
216
214
|
return result
|
|
217
215
|
}
|
|
218
216
|
|
|
@@ -222,7 +220,7 @@ function anchorBoxRight(size: Size, anchor: Box, container: Size): AnchorResult
|
|
|
222
220
|
left: anchor.x + anchor.width,
|
|
223
221
|
valid: true
|
|
224
222
|
}
|
|
225
|
-
|
|
223
|
+
clampAnchorResult(result, size, container)
|
|
226
224
|
return result
|
|
227
225
|
}
|
|
228
226
|
|
|
@@ -13,7 +13,8 @@ export type CollapsibleConfig = {
|
|
|
13
13
|
export default abstract class PanelPart<TState> extends ContentPart<TState & { collapsible?: CollapsibleConfig}> {
|
|
14
14
|
protected static readonly DEFAULT_CHEVRON_SIDE: 'left' | 'right' = 'left'
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
private _toggleCollapseKey = untypedKey()
|
|
17
|
+
private _transitionEndKey = untypedKey()
|
|
17
18
|
|
|
18
19
|
private _prevCollapsedState?: boolean
|
|
19
20
|
|
|
@@ -21,9 +22,14 @@ export default abstract class PanelPart<TState> extends ContentPart<TState & { c
|
|
|
21
22
|
if (this.state.collapsible) {
|
|
22
23
|
this._prevCollapsedState = this.state.collapsible.collapsed
|
|
23
24
|
this.state.collapsible.chevronSide ??= PanelPart.DEFAULT_CHEVRON_SIDE
|
|
24
|
-
this.onClick(this.
|
|
25
|
+
this.onClick(this._toggleCollapseKey, _ => {
|
|
25
26
|
this.toggleCollapse()
|
|
26
27
|
})
|
|
28
|
+
this.onTransitionEnd(this._transitionEndKey, m => {
|
|
29
|
+
if (m.event.propertyName != 'flex-basis') return
|
|
30
|
+
if (!(m.event.currentTarget instanceof HTMLElement)) return
|
|
31
|
+
m.event.currentTarget.querySelector('.tt-panel')?.classList.remove('collapsing')
|
|
32
|
+
})
|
|
27
33
|
}
|
|
28
34
|
}
|
|
29
35
|
|
|
@@ -49,6 +55,7 @@ export default abstract class PanelPart<TState> extends ContentPart<TState & { c
|
|
|
49
55
|
parent.div('.tt-panel', panel => {
|
|
50
56
|
panel.class(...this.panelClasses)
|
|
51
57
|
if (collapsibleConfig?.collapsed) panel.class('collapsed')
|
|
58
|
+
panel.emitTransitionEnd(this._transitionEndKey)
|
|
52
59
|
if (this._title?.length || this.hasActions('tertiary')) {
|
|
53
60
|
panel.div('.panel-header', header => {
|
|
54
61
|
if (collapsibleConfig?.chevronSide == 'left') {
|
|
@@ -107,6 +114,7 @@ export default abstract class PanelPart<TState> extends ContentPart<TState & { c
|
|
|
107
114
|
content.style.flexBasis = height
|
|
108
115
|
}
|
|
109
116
|
|
|
117
|
+
panelElem.classList.add('collapsing') // 'collapsing' is applied for the duration of the open and close animation
|
|
110
118
|
panelElem.classList.toggle('collapsed', collapsibleConfig.collapsed)
|
|
111
119
|
}
|
|
112
120
|
|
|
@@ -122,7 +130,7 @@ export default abstract class PanelPart<TState> extends ContentPart<TState & { c
|
|
|
122
130
|
if (this.state.collapsible) {
|
|
123
131
|
parent.a('.collapsible-chevron', chev => {
|
|
124
132
|
this.renderChevronIcon(chev, this.state.collapsible?.collapsed!)
|
|
125
|
-
}).emitClick(this.
|
|
133
|
+
}).emitClick(this._toggleCollapseKey)
|
|
126
134
|
}
|
|
127
135
|
}
|
|
128
136
|
|
package/terrier/progress.ts
CHANGED
|
@@ -14,6 +14,16 @@ export class ProgressBarPart extends TerrierPart<ProgressState> {
|
|
|
14
14
|
progress = 0
|
|
15
15
|
color: ColorName = 'primary'
|
|
16
16
|
|
|
17
|
+
/**
|
|
18
|
+
* Set the total number of steps.
|
|
19
|
+
* @param total
|
|
20
|
+
*/
|
|
21
|
+
setTotal(total: number) {
|
|
22
|
+
this.state.total = total
|
|
23
|
+
this.progress = Math.min(this.progress, this.state.total)
|
|
24
|
+
this.dirty()
|
|
25
|
+
}
|
|
26
|
+
|
|
17
27
|
/**
|
|
18
28
|
* Sets the progress and (optionally) color, then dirties the part.
|
|
19
29
|
* @param progress
|