@ship-ui/core 0.13.28 → 0.13.30
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/bin/src/ship-fg-node.js +12 -3
- package/bin/src/ship-fg.ts +11 -5
- package/bin/src/utilities.js +4 -2
- package/bin/src/utilities.ts +4 -2
- package/fesm2022/ship-ui-core.mjs +113 -59
- package/fesm2022/ship-ui-core.mjs.map +1 -1
- package/index.d.ts +9 -5
- package/package.json +1 -1
- package/styles/components/ship-button-group.component.scss +8 -1
- package/styles/components/ship-button.component.scss +8 -1
- package/styles/components/ship-datepicker.component.scss +17 -7
- package/styles/components/ship-event-card.component.scss +208 -0
- package/styles/components/ship-form-field.component.scss +7 -0
- package/styles/components/ship-list.component.scss +7 -0
- package/styles/components/ship-menu.component.scss +6 -0
- package/styles/components/ship-tabs.component.scss +7 -0
- package/styles/index.scss +4 -0
package/bin/src/ship-fg-node.js
CHANGED
|
@@ -33,6 +33,7 @@ const run = async (PROJECT_SRC, LIB_ICONS, PROJECT_PUBLIC, GLYPH_MAP, TARGET_FON
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
const tsFiles = await glob('**/*.ts', { cwd: PROJECT_SRC });
|
|
36
|
+
|
|
36
37
|
for (const file of tsFiles) {
|
|
37
38
|
const fileText = await fs.readFile(join(PROJECT_SRC, file), 'utf8');
|
|
38
39
|
const matches = Array.from(fileText.matchAll(regex2), (m) => m[1]);
|
|
@@ -50,7 +51,8 @@ const run = async (PROJECT_SRC, LIB_ICONS, PROJECT_PUBLIC, GLYPH_MAP, TARGET_FON
|
|
|
50
51
|
const thin = icon.endsWith('-thin');
|
|
51
52
|
const light = icon.endsWith('-light');
|
|
52
53
|
const fill = icon.endsWith('-fill');
|
|
53
|
-
const
|
|
54
|
+
const duotone = icon.endsWith('-duotone');
|
|
55
|
+
const regular = !bold && !thin && !light && !fill && !duotone;
|
|
54
56
|
const glyph = GLYPH_MAP[icon];
|
|
55
57
|
|
|
56
58
|
if (!glyph) {
|
|
@@ -78,6 +80,10 @@ const run = async (PROJECT_SRC, LIB_ICONS, PROJECT_PUBLIC, GLYPH_MAP, TARGET_FON
|
|
|
78
80
|
acc['regular'].push([icon, '']);
|
|
79
81
|
acc['regular'].push(glyph);
|
|
80
82
|
}
|
|
83
|
+
if (duotone) {
|
|
84
|
+
acc['duotone'].push([icon, '']);
|
|
85
|
+
acc['duotone'].push(glyph);
|
|
86
|
+
}
|
|
81
87
|
|
|
82
88
|
return acc;
|
|
83
89
|
},
|
|
@@ -87,6 +93,7 @@ const run = async (PROJECT_SRC, LIB_ICONS, PROJECT_PUBLIC, GLYPH_MAP, TARGET_FON
|
|
|
87
93
|
light: [],
|
|
88
94
|
fill: [],
|
|
89
95
|
regular: [],
|
|
96
|
+
duotone: [],
|
|
90
97
|
text: [],
|
|
91
98
|
}
|
|
92
99
|
);
|
|
@@ -239,7 +246,7 @@ const textMateSnippet = async (GLYPH_MAP) => {
|
|
|
239
246
|
const iconsSnippetContent = `
|
|
240
247
|
{
|
|
241
248
|
"Phosphor icons": {
|
|
242
|
-
"prefix": ["
|
|
249
|
+
"prefix": ["shicon:"],
|
|
243
250
|
"scope": "javascript,typescript,html",
|
|
244
251
|
"body": "\${1|${Object.keys(GLYPH_MAP).join(',')}|}",
|
|
245
252
|
"description": "Add a phosphor icon"
|
|
@@ -285,9 +292,11 @@ export const main = async (values) => {
|
|
|
285
292
|
fontVariant,
|
|
286
293
|
'selection.json'
|
|
287
294
|
);
|
|
295
|
+
|
|
288
296
|
const selectionJson = JSON.parse(await fs.readFile(selectionJsonFullPath, 'utf8'));
|
|
297
|
+
const unicodeObj = getUnicodeObject(selectionJson.icons, fontVariant === 'duotone');
|
|
289
298
|
|
|
290
|
-
return
|
|
299
|
+
return unicodeObj;
|
|
291
300
|
})
|
|
292
301
|
);
|
|
293
302
|
|
package/bin/src/ship-fg.ts
CHANGED
|
@@ -60,7 +60,8 @@ const run = async (
|
|
|
60
60
|
const thin = icon.endsWith('-thin');
|
|
61
61
|
const light = icon.endsWith('-light');
|
|
62
62
|
const fill = icon.endsWith('-fill');
|
|
63
|
-
const
|
|
63
|
+
const duotone = icon.endsWith('-duotone');
|
|
64
|
+
const regular = !bold && !thin && !light && !fill && !duotone;
|
|
64
65
|
const glyph = GLYPH_MAP[icon];
|
|
65
66
|
|
|
66
67
|
if (!glyph) {
|
|
@@ -88,6 +89,10 @@ const run = async (
|
|
|
88
89
|
acc['regular'].push([icon, '']);
|
|
89
90
|
acc['regular'].push(glyph);
|
|
90
91
|
}
|
|
92
|
+
if (duotone) {
|
|
93
|
+
acc['duotone'].push([icon, '']);
|
|
94
|
+
acc['duotone'].push(glyph);
|
|
95
|
+
}
|
|
91
96
|
|
|
92
97
|
return acc;
|
|
93
98
|
},
|
|
@@ -97,6 +102,7 @@ const run = async (
|
|
|
97
102
|
light: [],
|
|
98
103
|
fill: [],
|
|
99
104
|
regular: [],
|
|
105
|
+
duotone: [],
|
|
100
106
|
text: [],
|
|
101
107
|
} as {
|
|
102
108
|
[key: string]: [string, string][];
|
|
@@ -259,7 +265,7 @@ const textMateSnippet = async (GLYPH_MAP: Record<string, [string, string]>) => {
|
|
|
259
265
|
const iconsSnippetContent = `
|
|
260
266
|
{
|
|
261
267
|
"Phosphor icons": {
|
|
262
|
-
"prefix": ["
|
|
268
|
+
"prefix": ["shicon:"],
|
|
263
269
|
"scope": "javascript,typescript,html",
|
|
264
270
|
"body": "\${1|${Object.keys(GLYPH_MAP).join(',')}|}",
|
|
265
271
|
"description": "Add a phosphor icon"
|
|
@@ -298,11 +304,11 @@ export const main = async (values: InputArguments) => {
|
|
|
298
304
|
fontVariant,
|
|
299
305
|
'selection.json'
|
|
300
306
|
);
|
|
307
|
+
|
|
301
308
|
const selectionJson = await Bun.file(selectionJsonFullPath).json();
|
|
309
|
+
const unicodeObj = getUnicodeObject(selectionJson.icons, fontVariant === 'duotone');
|
|
302
310
|
|
|
303
|
-
|
|
304
|
-
// return createNameCodeObject(selectionJson.icons);
|
|
305
|
-
return getUnicodeObject(selectionJson.icons);
|
|
311
|
+
return unicodeObj;
|
|
306
312
|
})
|
|
307
313
|
);
|
|
308
314
|
|
package/bin/src/utilities.js
CHANGED
|
@@ -12,7 +12,7 @@ export function createNameCodeObject(jsonData) {
|
|
|
12
12
|
return nameCodeObject;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
export const getUnicodeObject = (jsonData) => {
|
|
15
|
+
export const getUnicodeObject = (jsonData, isDuotone) => {
|
|
16
16
|
const nameCodeObject = {};
|
|
17
17
|
|
|
18
18
|
for (let i = 0; i < jsonData.length; i++) {
|
|
@@ -24,7 +24,9 @@ export const getUnicodeObject = (jsonData) => {
|
|
|
24
24
|
console.warn(`Invalid codepoint 0x${hexCode} for ligature ${item.properties.ligatures}`);
|
|
25
25
|
continue;
|
|
26
26
|
}
|
|
27
|
-
|
|
27
|
+
|
|
28
|
+
const glyphName = isDuotone ? item.properties.name : item.properties.ligatures;
|
|
29
|
+
nameCodeObject[glyphName] = [glyph, 'U+' + hexCode];
|
|
28
30
|
}
|
|
29
31
|
|
|
30
32
|
return nameCodeObject;
|
package/bin/src/utilities.ts
CHANGED
|
@@ -12,7 +12,7 @@ export function createNameCodeObject(jsonData: Item[]): Record<string, string> {
|
|
|
12
12
|
return nameCodeObject;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
export const getUnicodeObject = (jsonData: Item[]): Record<string, [string, string]> => {
|
|
15
|
+
export const getUnicodeObject = (jsonData: Item[], isDuotone = false): Record<string, [string, string]> => {
|
|
16
16
|
const nameCodeObject: Record<string, [string, string]> = {};
|
|
17
17
|
|
|
18
18
|
for (let i = 0; i < jsonData.length; i++) {
|
|
@@ -24,7 +24,9 @@ export const getUnicodeObject = (jsonData: Item[]): Record<string, [string, stri
|
|
|
24
24
|
console.warn(`Invalid codepoint 0x${hexCode} for ligature ${item.properties.ligatures}`);
|
|
25
25
|
continue;
|
|
26
26
|
}
|
|
27
|
-
|
|
27
|
+
|
|
28
|
+
const glyphName = isDuotone ? item.properties.name : item.properties.ligatures;
|
|
29
|
+
nameCodeObject[glyphName] = [glyph, 'U+' + hexCode];
|
|
28
30
|
}
|
|
29
31
|
|
|
30
32
|
return nameCodeObject;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, ElementRef, Renderer2, ChangeDetectionStrategy, Component, input, computed, viewChild, effect, HostListener, NgModule, signal, Injectable, InjectionToken, model, output, ApplicationRef, createComponent, isSignal, OutputEmitterRef, contentChildren, afterNextRender, assertInInjectionContext, Injector,
|
|
2
|
+
import { inject, ElementRef, Renderer2, ChangeDetectionStrategy, Component, input, computed, viewChild, effect, HostListener, NgModule, signal, Injectable, InjectionToken, model, output, ApplicationRef, createComponent, isSignal, OutputEmitterRef, DestroyRef, contentChildren, afterNextRender, assertInInjectionContext, Injector, HostBinding, contentChild, TemplateRef, runInInjectionContext, Directive, ChangeDetectorRef, viewChildren, ViewContainerRef, EnvironmentInjector } from '@angular/core';
|
|
3
3
|
import { DatePipe, NgTemplateOutlet } from '@angular/common';
|
|
4
4
|
import { SIGNAL } from '@angular/core/primitives/signals';
|
|
5
5
|
|
|
6
|
-
const iconTypes = ['bold', 'thin', 'light', 'fill'];
|
|
6
|
+
const iconTypes = ['bold', 'thin', 'light', 'fill', 'duotone'];
|
|
7
7
|
class ShipIconComponent {
|
|
8
8
|
#selfRef = inject(ElementRef);
|
|
9
9
|
#renderer = inject(Renderer2);
|
|
@@ -1140,14 +1140,16 @@ class ShipFormFieldPopoverComponent {
|
|
|
1140
1140
|
function delayedResize() {
|
|
1141
1141
|
setTimeout(resize, 0);
|
|
1142
1142
|
}
|
|
1143
|
-
text
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1143
|
+
if (text) {
|
|
1144
|
+
text.addEventListener('change', resize);
|
|
1145
|
+
text.addEventListener('cut', delayedResize);
|
|
1146
|
+
text.addEventListener('paste', delayedResize);
|
|
1147
|
+
text.addEventListener('drop', delayedResize);
|
|
1148
|
+
text.addEventListener('keydown', delayedResize);
|
|
1149
|
+
text.focus();
|
|
1150
|
+
text.select();
|
|
1151
|
+
resize();
|
|
1152
|
+
}
|
|
1151
1153
|
}
|
|
1152
1154
|
}
|
|
1153
1155
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: ShipFormFieldPopoverComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
@@ -1246,8 +1248,58 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImpor
|
|
|
1246
1248
|
args: ['click']
|
|
1247
1249
|
}] } });
|
|
1248
1250
|
|
|
1251
|
+
function classMutationSignal(element) {
|
|
1252
|
+
const classListSignal = signal(element.className, ...(ngDevMode ? [{ debugName: "classListSignal" }] : []));
|
|
1253
|
+
if (typeof MutationObserver === 'undefined')
|
|
1254
|
+
return classListSignal.asReadonly();
|
|
1255
|
+
const destroyRef = inject(DestroyRef);
|
|
1256
|
+
const observer = new MutationObserver((mutations) => {
|
|
1257
|
+
for (const mutation of mutations) {
|
|
1258
|
+
if (mutation.type === 'attributes' && mutation.attributeName === 'class') {
|
|
1259
|
+
const target = mutation.target;
|
|
1260
|
+
classListSignal.set(target.className);
|
|
1261
|
+
}
|
|
1262
|
+
}
|
|
1263
|
+
});
|
|
1264
|
+
observer.observe(element, { attributes: true });
|
|
1265
|
+
destroyRef.onDestroy(() => observer.disconnect());
|
|
1266
|
+
return classListSignal.asReadonly();
|
|
1267
|
+
}
|
|
1268
|
+
|
|
1269
|
+
function contentProjectionSignal(hostElement, querySelector) {
|
|
1270
|
+
const projectedElementsSignal = signal([], ...(ngDevMode ? [{ debugName: "projectedElementsSignal" }] : []));
|
|
1271
|
+
const destroyRef = inject(DestroyRef);
|
|
1272
|
+
const updateElements = () => {
|
|
1273
|
+
let elements = [];
|
|
1274
|
+
// If a querySelector is provided, use it to filter the children.
|
|
1275
|
+
if (querySelector) {
|
|
1276
|
+
elements = Array.from(hostElement.querySelectorAll(querySelector));
|
|
1277
|
+
}
|
|
1278
|
+
else {
|
|
1279
|
+
// Otherwise, get all direct child elements.
|
|
1280
|
+
elements = Array.from(hostElement.children);
|
|
1281
|
+
}
|
|
1282
|
+
projectedElementsSignal.set(elements);
|
|
1283
|
+
};
|
|
1284
|
+
const observer = new MutationObserver((mutations) => {
|
|
1285
|
+
// Only update if child nodes have been added or removed.
|
|
1286
|
+
const hasChildListChanges = mutations.some((mutation) => mutation.type === 'childList');
|
|
1287
|
+
if (hasChildListChanges) {
|
|
1288
|
+
updateElements();
|
|
1289
|
+
}
|
|
1290
|
+
});
|
|
1291
|
+
// Observe the host element for child list changes.
|
|
1292
|
+
observer.observe(hostElement, { childList: true });
|
|
1293
|
+
// Disconnect the observer when the component is destroyed.
|
|
1294
|
+
destroyRef.onDestroy(() => observer.disconnect());
|
|
1295
|
+
// Perform an initial update to get the current list of elements.
|
|
1296
|
+
updateElements();
|
|
1297
|
+
return projectedElementsSignal.asReadonly();
|
|
1298
|
+
}
|
|
1299
|
+
|
|
1249
1300
|
class ShipDatepickerComponent {
|
|
1250
1301
|
constructor() {
|
|
1302
|
+
this.#selfRef = inject(ElementRef);
|
|
1251
1303
|
this.#INIT_DATE = this.#getUTCDate(new Date());
|
|
1252
1304
|
this.date = model(null, ...(ngDevMode ? [{ debugName: "date" }] : []));
|
|
1253
1305
|
this.endDate = model(null, ...(ngDevMode ? [{ debugName: "endDate" }] : []));
|
|
@@ -1267,12 +1319,18 @@ class ShipDatepickerComponent {
|
|
|
1267
1319
|
const weekdayLabels = this.weekdayLabels();
|
|
1268
1320
|
return weekdayLabels.slice(startOfWeek).concat(weekdayLabels.slice(0, startOfWeek));
|
|
1269
1321
|
}, ...(ngDevMode ? [{ debugName: "weekdays" }] : []));
|
|
1322
|
+
this.currentClasses = classMutationSignal(this.#selfRef.nativeElement);
|
|
1323
|
+
this.someEffect = effect(() => {
|
|
1324
|
+
const _ = this.currentClasses();
|
|
1325
|
+
this.#findSelectedAndCalc();
|
|
1326
|
+
}, ...(ngDevMode ? [{ debugName: "someEffect" }] : []));
|
|
1270
1327
|
this.#newDateEffect = effect(() => {
|
|
1271
1328
|
if (this.monthsToShow() > 1)
|
|
1272
1329
|
return;
|
|
1273
1330
|
this.#setDateAsCurrent();
|
|
1274
1331
|
}, ...(ngDevMode ? [{ debugName: "#newDateEffect" }] : []));
|
|
1275
1332
|
}
|
|
1333
|
+
#selfRef;
|
|
1276
1334
|
#INIT_DATE;
|
|
1277
1335
|
getLastVisibleMonth() {
|
|
1278
1336
|
const lastMonthOffset = this.monthsToShow() - 1;
|
|
@@ -1576,14 +1634,11 @@ class ShipDatepickerInputComponent {
|
|
|
1576
1634
|
this.#datePipe = inject(DatePipe);
|
|
1577
1635
|
this.#elementRef = inject((ElementRef));
|
|
1578
1636
|
this.#inputRef = signal(null, ...(ngDevMode ? [{ debugName: "#inputRef" }] : []));
|
|
1579
|
-
this.#triggerInput = signal(false, ...(ngDevMode ? [{ debugName: "#triggerInput" }] : []));
|
|
1580
|
-
this.inputWrapRef = viewChild.required('inputWrap');
|
|
1581
1637
|
this.masking = input('mediumDate', ...(ngDevMode ? [{ debugName: "masking" }] : []));
|
|
1582
1638
|
this.closed = output();
|
|
1583
1639
|
this._maskedDate = computed(() => {
|
|
1584
1640
|
const date = this.internalDate();
|
|
1585
1641
|
const mask = this.masking();
|
|
1586
|
-
// console.log(date, mask);
|
|
1587
1642
|
if (!mask)
|
|
1588
1643
|
return date;
|
|
1589
1644
|
if (!date)
|
|
@@ -1592,31 +1647,13 @@ class ShipDatepickerInputComponent {
|
|
|
1592
1647
|
}, ...(ngDevMode ? [{ debugName: "_maskedDate" }] : []));
|
|
1593
1648
|
this.internalDate = signal(this.#INIT_DATE, ...(ngDevMode ? [{ debugName: "internalDate" }] : []));
|
|
1594
1649
|
this.isOpen = model(false, ...(ngDevMode ? [{ debugName: "isOpen" }] : []));
|
|
1595
|
-
this.
|
|
1596
|
-
this.#
|
|
1597
|
-
new MutationObserver((mutations) => {
|
|
1598
|
-
mutations.forEach((mutation) => {
|
|
1599
|
-
if (mutation.type === 'attributes' && mutation.attributeName === 'class') {
|
|
1600
|
-
const classString = this.#elementRef.nativeElement.classList.value;
|
|
1601
|
-
let classObj = classString.split(' ').reduce((acc, className) => {
|
|
1602
|
-
acc[className] = true;
|
|
1603
|
-
return acc;
|
|
1604
|
-
}, {});
|
|
1605
|
-
this.styleClasses.set(classObj);
|
|
1606
|
-
}
|
|
1607
|
-
});
|
|
1608
|
-
});
|
|
1609
|
-
this.#inputObserver = typeof MutationObserver !== 'undefined' &&
|
|
1610
|
-
new MutationObserver((mutations) => {
|
|
1611
|
-
for (var mutation of mutations) {
|
|
1612
|
-
if (mutation.type == 'childList' && mutation.target.classList.contains('input')) {
|
|
1613
|
-
this.#triggerInput.set(!this.#triggerInput());
|
|
1614
|
-
}
|
|
1615
|
-
}
|
|
1616
|
-
});
|
|
1650
|
+
this.currentClass = classMutationSignal(this.#elementRef.nativeElement);
|
|
1651
|
+
this.#inputObserver = contentProjectionSignal(this.#elementRef.nativeElement, '#input-wrap input');
|
|
1617
1652
|
this.#inputRefEffect = effect(() => {
|
|
1618
|
-
this.#
|
|
1619
|
-
|
|
1653
|
+
const inputs = this.#inputObserver();
|
|
1654
|
+
if (!inputs.length)
|
|
1655
|
+
return;
|
|
1656
|
+
const input = inputs[0];
|
|
1620
1657
|
if (!input)
|
|
1621
1658
|
return;
|
|
1622
1659
|
this.#createCustomInputEventListener(input);
|
|
@@ -1638,8 +1675,6 @@ class ShipDatepickerInputComponent {
|
|
|
1638
1675
|
#datePipe;
|
|
1639
1676
|
#elementRef;
|
|
1640
1677
|
#inputRef;
|
|
1641
|
-
#triggerInput;
|
|
1642
|
-
#styleObserver;
|
|
1643
1678
|
#inputObserver;
|
|
1644
1679
|
onDateChange(date) {
|
|
1645
1680
|
this.internalDate.set(date);
|
|
@@ -1655,16 +1690,6 @@ class ShipDatepickerInputComponent {
|
|
|
1655
1690
|
close() {
|
|
1656
1691
|
this.closed.emit(this.internalDate());
|
|
1657
1692
|
}
|
|
1658
|
-
ngOnInit() {
|
|
1659
|
-
this.styleClasses.set(this.#elementRef.nativeElement.classList.value);
|
|
1660
|
-
if (typeof MutationObserver !== 'undefined') {
|
|
1661
|
-
this.#styleObserver.observe(this.#elementRef.nativeElement, { attributes: true });
|
|
1662
|
-
this.#inputObserver.observe(this.inputWrapRef().nativeElement, {
|
|
1663
|
-
attributes: true,
|
|
1664
|
-
childList: true,
|
|
1665
|
-
});
|
|
1666
|
-
}
|
|
1667
|
-
}
|
|
1668
1693
|
#inputRefEffect;
|
|
1669
1694
|
#createCustomInputEventListener(input) {
|
|
1670
1695
|
Object.defineProperty(input, 'value', {
|
|
@@ -1689,24 +1714,20 @@ class ShipDatepickerInputComponent {
|
|
|
1689
1714
|
});
|
|
1690
1715
|
return input;
|
|
1691
1716
|
}
|
|
1692
|
-
ngOnDestroy() {
|
|
1693
|
-
this.#styleObserver && this.#styleObserver.disconnect();
|
|
1694
|
-
this.#inputObserver && this.#inputObserver.disconnect();
|
|
1695
|
-
}
|
|
1696
1717
|
#getUTCDate(date) {
|
|
1697
1718
|
const offsetMinutes = date.getTimezoneOffset();
|
|
1698
1719
|
const timeDiffMillis = offsetMinutes * 60 * 1000;
|
|
1699
1720
|
return new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()) + timeDiffMillis);
|
|
1700
1721
|
}
|
|
1701
1722
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: ShipDatepickerInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1702
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.6", type: ShipDatepickerInputComponent, isStandalone: true, selector: "sh-datepicker-input", inputs: { masking: { classPropertyName: "masking", publicName: "masking", isSignal: true, isRequired: false, transformFunction: null }, isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed", isOpen: "isOpenChange" }, providers: [DatePipe],
|
|
1723
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.6", type: ShipDatepickerInputComponent, isStandalone: true, selector: "sh-datepicker-input", inputs: { masking: { classPropertyName: "masking", publicName: "masking", isSignal: true, isRequired: false, transformFunction: null }, isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed", isOpen: "isOpenChange" }, providers: [DatePipe], ngImport: i0, template: `
|
|
1703
1724
|
<sh-form-field-popover (click)="open($event)" (closed)="close()" [(isOpen)]="isOpen">
|
|
1704
1725
|
<ng-content select="label" ngProjectAs="label" />
|
|
1705
1726
|
|
|
1706
1727
|
<ng-content select="[prefix]" ngProjectAs="[prefix]" />
|
|
1707
1728
|
<ng-content select="[textPrefix]" ngProjectAs="[textPrefix]" />
|
|
1708
1729
|
|
|
1709
|
-
<div class="input" ngProjectAs="input"
|
|
1730
|
+
<div id="input-wrap" class="input" ngProjectAs="input">
|
|
1710
1731
|
@if (this.masking()) {
|
|
1711
1732
|
<div class="masked-value" (click)="open($event)">
|
|
1712
1733
|
{{ _maskedDate() }}
|
|
@@ -1721,7 +1742,7 @@ class ShipDatepickerInputComponent {
|
|
|
1721
1742
|
|
|
1722
1743
|
<div popoverContent>
|
|
1723
1744
|
@if (this.isOpen()) {
|
|
1724
|
-
<sh-datepicker [date]="internalDate()" (dateChange)="onDateChange($event)" [class]="
|
|
1745
|
+
<sh-datepicker [date]="internalDate()" (dateChange)="onDateChange($event)" [class]="currentClass()" />
|
|
1725
1746
|
}
|
|
1726
1747
|
</div>
|
|
1727
1748
|
</sh-form-field-popover>
|
|
@@ -1742,7 +1763,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImpor
|
|
|
1742
1763
|
<ng-content select="[prefix]" ngProjectAs="[prefix]" />
|
|
1743
1764
|
<ng-content select="[textPrefix]" ngProjectAs="[textPrefix]" />
|
|
1744
1765
|
|
|
1745
|
-
<div class="input" ngProjectAs="input"
|
|
1766
|
+
<div id="input-wrap" class="input" ngProjectAs="input">
|
|
1746
1767
|
@if (this.masking()) {
|
|
1747
1768
|
<div class="masked-value" (click)="open($event)">
|
|
1748
1769
|
{{ _maskedDate() }}
|
|
@@ -1757,7 +1778,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImpor
|
|
|
1757
1778
|
|
|
1758
1779
|
<div popoverContent>
|
|
1759
1780
|
@if (this.isOpen()) {
|
|
1760
|
-
<sh-datepicker [date]="internalDate()" (dateChange)="onDateChange($event)" [class]="
|
|
1781
|
+
<sh-datepicker [date]="internalDate()" (dateChange)="onDateChange($event)" [class]="currentClass()" />
|
|
1761
1782
|
}
|
|
1762
1783
|
</div>
|
|
1763
1784
|
</sh-form-field-popover>
|
|
@@ -1977,6 +1998,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImpor
|
|
|
1977
1998
|
}]
|
|
1978
1999
|
}] });
|
|
1979
2000
|
|
|
2001
|
+
class ShipEventCardComponent {
|
|
2002
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: ShipEventCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2003
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.6", type: ShipEventCardComponent, isStandalone: true, selector: "sh-event-card", ngImport: i0, template: `
|
|
2004
|
+
<div class="content">
|
|
2005
|
+
<ng-content />
|
|
2006
|
+
</div>
|
|
2007
|
+
|
|
2008
|
+
<div class="actions">
|
|
2009
|
+
<ng-content select="[actions]" />
|
|
2010
|
+
<ng-content select="button" />
|
|
2011
|
+
</div>
|
|
2012
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2013
|
+
}
|
|
2014
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: ShipEventCardComponent, decorators: [{
|
|
2015
|
+
type: Component,
|
|
2016
|
+
args: [{
|
|
2017
|
+
selector: 'sh-event-card',
|
|
2018
|
+
imports: [],
|
|
2019
|
+
template: `
|
|
2020
|
+
<div class="content">
|
|
2021
|
+
<ng-content />
|
|
2022
|
+
</div>
|
|
2023
|
+
|
|
2024
|
+
<div class="actions">
|
|
2025
|
+
<ng-content select="[actions]" />
|
|
2026
|
+
<ng-content select="button" />
|
|
2027
|
+
</div>
|
|
2028
|
+
`,
|
|
2029
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2030
|
+
}]
|
|
2031
|
+
}] });
|
|
2032
|
+
|
|
1980
2033
|
class ShipFormFieldComponent {
|
|
1981
2034
|
#selfRef = inject(ElementRef);
|
|
1982
2035
|
onClick() {
|
|
@@ -2329,6 +2382,7 @@ function observeFirstChild(parentEl, elementTags) {
|
|
|
2329
2382
|
return elementSignal.asReadonly();
|
|
2330
2383
|
const initialElement = _upperCaseElementTags.find((tag) => parentEl.nativeElement.querySelector(tag));
|
|
2331
2384
|
if (initialElement) {
|
|
2385
|
+
console.log('initialElement', initialElement);
|
|
2332
2386
|
elementSignal.set(new ElementRef(parentEl.nativeElement.querySelector(elementTags[0])));
|
|
2333
2387
|
return elementSignal.asReadonly();
|
|
2334
2388
|
}
|
|
@@ -5533,5 +5587,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImpor
|
|
|
5533
5587
|
* Generated bundle index. Do not edit.
|
|
5534
5588
|
*/
|
|
5535
5589
|
|
|
5536
|
-
export { GridSortableDirective, SHIP_CONFIG, ShipAlertComponent, ShipAlertContainerComponent, ShipAlertModule, ShipAlertService, ShipButtonComponent, ShipButtonGroupComponent, ShipCardComponent, ShipCheckboxComponent, ShipChipComponent, ShipColorPickerComponent, ShipDatepickerComponent, ShipDatepickerInputComponent, ShipDaterangeInputComponent, ShipDialogComponent, ShipDialogService, ShipDividerComponent, ShipFileDragDropDirective, ShipFileUploadComponent, ShipFormFieldComponent, ShipIconComponent, ShipListComponent, ShipMenuComponent, ShipPopoverComponent, ShipPreventWheelDirective, ShipProgressBarComponent, ShipRadioComponent, ShipRangeSliderComponent, ShipResizeDirective, ShipSelectComponent, ShipSidenavComponent, ShipSortDirective, ShipSortableComponent, ShipSortableDirective, ShipSpinnerComponent, ShipStepperComponent, ShipStickyColumnsDirective, ShipStickyRowsDirective, ShipTableComponent, ShipTabsComponent, ShipToggleCardComponent, ShipToggleComponent, ShipTooltipComponent, ShipTooltipDirective, ShipTooltipWrapper, ShipVirtualScrollComponent, moveIndex, watchHostClass };
|
|
5590
|
+
export { GridSortableDirective, SHIP_CONFIG, ShipAlertComponent, ShipAlertContainerComponent, ShipAlertModule, ShipAlertService, ShipButtonComponent, ShipButtonGroupComponent, ShipCardComponent, ShipCheckboxComponent, ShipChipComponent, ShipColorPickerComponent, ShipDatepickerComponent, ShipDatepickerInputComponent, ShipDaterangeInputComponent, ShipDialogComponent, ShipDialogService, ShipDividerComponent, ShipEventCardComponent, ShipFileDragDropDirective, ShipFileUploadComponent, ShipFormFieldComponent, ShipIconComponent, ShipListComponent, ShipMenuComponent, ShipPopoverComponent, ShipPreventWheelDirective, ShipProgressBarComponent, ShipRadioComponent, ShipRangeSliderComponent, ShipResizeDirective, ShipSelectComponent, ShipSidenavComponent, ShipSortDirective, ShipSortableComponent, ShipSortableDirective, ShipSpinnerComponent, ShipStepperComponent, ShipStickyColumnsDirective, ShipStickyRowsDirective, ShipTableComponent, ShipTabsComponent, ShipToggleCardComponent, ShipToggleComponent, ShipTooltipComponent, ShipTooltipDirective, ShipTooltipWrapper, ShipVirtualScrollComponent, moveIndex, watchHostClass };
|
|
5537
5591
|
//# sourceMappingURL=ship-ui-core.mjs.map
|